Section 1
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import flash.utils.*;
import com.adobe.utils.*;
public class MD5 {
public static var digest:ByteArray;
public static function hash(_arg1:String):String{
var _local2:ByteArray = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (hashBinary(_local2));
}
public static function hashBytes(_arg1:ByteArray):String{
return (hashBinary(_arg1));
}
public static function hashBinary(_arg1:ByteArray):String{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local2 = 1732584193;
var _local3 = -271733879;
var _local4 = -1732584194;
var _local5 = 271733878;
var _local10:Array = createBlocks(_arg1);
var _local11:int = _local10.length;
var _local12:int;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 1))], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 3))], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 5))], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 7))], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 9))], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 11))], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 13))], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 15))], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 6))], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 0))], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 10))], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 4))], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 14))], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 8))], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 2))], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 12))], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 8))], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 14))], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 4))], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 10))], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 0))], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 6))], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 12))], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 2))], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 7))], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 5))], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 3))], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 1))], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 15))], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 13))], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 11))], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 9))], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
digest = new ByteArray();
digest.writeInt(_local2);
digest.writeInt(_local3);
digest.writeInt(_local4);
digest.writeInt(_local5);
digest.position = 0;
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function createBlocks(_arg1:ByteArray):Array{
var _local2:Array = new Array();
var _local3:int = (_arg1.length * 8);
var _local4 = 0xFF;
var _local5:int;
while (_local5 < _local3) {
_local2[int((_local5 >> 5))] = (_local2[int((_local5 >> 5))] | ((_arg1[(_local5 / 8)] & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[int((_local3 >> 5))] = (_local2[int((_local3 >> 5))] | (128 << (_local3 % 32)));
_local2[int(((((_local3 + 64) >>> 9) << 4) + 14))] = _local3;
return (_local2);
}
}
}//package com.adobe.crypto
Section 2
//PNGEncoder (com.adobe.images.PNGEncoder)
package com.adobe.images {
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class PNGEncoder {
private static var crcTable:Array;
private static var crcTableComputed:Boolean = false;
public static function encode(_arg1:BitmapData):ByteArray{
var _local6:uint;
var _local7:int;
var _local2:ByteArray = new ByteArray();
_local2.writeUnsignedInt(2303741511);
_local2.writeUnsignedInt(218765834);
var _local3:ByteArray = new ByteArray();
_local3.writeInt(_arg1.width);
_local3.writeInt(_arg1.height);
_local3.writeUnsignedInt(134610944);
_local3.writeByte(0);
writeChunk(_local2, 1229472850, _local3);
var _local4:ByteArray = new ByteArray();
var _local5:int;
while (_local5 < _arg1.height) {
_local4.writeByte(0);
if (!_arg1.transparent){
_local7 = 0;
while (_local7 < _arg1.width) {
_local6 = _arg1.getPixel(_local7, _local5);
_local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | 0xFF)));
_local7++;
};
} else {
_local7 = 0;
while (_local7 < _arg1.width) {
_local6 = _arg1.getPixel32(_local7, _local5);
_local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | (_local6 >>> 24))));
_local7++;
};
};
_local5++;
};
_local4.compress();
writeChunk(_local2, 1229209940, _local4);
writeChunk(_local2, 1229278788, null);
return (_local2);
}
private static function writeChunk(_arg1:ByteArray, _arg2:uint, _arg3:ByteArray):void{
var _local8:uint;
var _local9:uint;
var _local10:uint;
if (!crcTableComputed){
crcTableComputed = true;
crcTable = [];
_local9 = 0;
while (_local9 < 0x0100) {
_local8 = _local9;
_local10 = 0;
while (_local10 < 8) {
if ((_local8 & 1)){
_local8 = uint((uint(3988292384) ^ uint((_local8 >>> 1))));
} else {
_local8 = uint((_local8 >>> 1));
};
_local10++;
};
crcTable[_local9] = _local8;
_local9++;
};
};
var _local4:uint;
if (_arg3 != null){
_local4 = _arg3.length;
};
_arg1.writeUnsignedInt(_local4);
var _local5:uint = _arg1.position;
_arg1.writeUnsignedInt(_arg2);
if (_arg3 != null){
_arg1.writeBytes(_arg3);
};
var _local6:uint = _arg1.position;
_arg1.position = _local5;
_local8 = 4294967295;
var _local7:int;
while (_local7 < (_local6 - _local5)) {
_local8 = uint((crcTable[((_local8 ^ _arg1.readUnsignedByte()) & uint(0xFF))] ^ uint((_local8 >>> 8))));
_local7++;
};
_local8 = uint((_local8 ^ uint(4294967295)));
_arg1.position = _local6;
_arg1.writeUnsignedInt(_local8);
}
}
}//package com.adobe.images
Section 3
//JSON (com.adobe.serialization.json.JSON)
package com.adobe.serialization.json {
public class JSON {
public static function encode(_arg1:Object):String{
var _local2:JSONEncoder = new JSONEncoder(_arg1);
return (_local2.getString());
}
public static function decode(_arg1:String){
var _local2:JSONDecoder = new JSONDecoder(_arg1);
return (_local2.getValue());
}
}
}//package com.adobe.serialization.json
Section 4
//JSONDecoder (com.adobe.serialization.json.JSONDecoder)
package com.adobe.serialization.json {
public class JSONDecoder {
private var value;
private var tokenizer:JSONTokenizer;
private var token:JSONToken;
public function JSONDecoder(_arg1:String){
this.tokenizer = new JSONTokenizer(_arg1);
this.nextToken();
this.value = this.parseValue();
}
public function getValue(){
return (this.value);
}
private function nextToken():JSONToken{
return ((this.token = this.tokenizer.getNextToken()));
}
private function parseArray():Array{
var _local1:Array = new Array();
this.nextToken();
if (this.token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
while (true) {
_local1.push(this.parseValue());
this.nextToken();
if (this.token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
if (this.token.type == JSONTokenType.COMMA){
this.nextToken();
} else {
this.tokenizer.parseError(("Expecting ] or , but found " + this.token.value));
};
};
return (null);
}
private function parseObject():Object{
var _local2:String;
var _local1:Object = new Object();
this.nextToken();
if (this.token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
while (true) {
if (this.token.type == JSONTokenType.STRING){
_local2 = String(this.token.value);
this.nextToken();
if (this.token.type == JSONTokenType.COLON){
this.nextToken();
_local1[_local2] = this.parseValue();
this.nextToken();
if (this.token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
if (this.token.type == JSONTokenType.COMMA){
this.nextToken();
} else {
this.tokenizer.parseError(("Expecting } or , but found " + this.token.value));
};
} else {
this.tokenizer.parseError(("Expecting : but found " + this.token.value));
};
} else {
this.tokenizer.parseError(("Expecting string but found " + this.token.value));
};
};
return (null);
}
private function parseValue():Object{
if (this.token == null){
this.tokenizer.parseError("Unexpected end of input");
};
switch (this.token.type){
case JSONTokenType.LEFT_BRACE:
return (this.parseObject());
case JSONTokenType.LEFT_BRACKET:
return (this.parseArray());
case JSONTokenType.STRING:
case JSONTokenType.NUMBER:
case JSONTokenType.TRUE:
case JSONTokenType.FALSE:
case JSONTokenType.NULL:
return (this.token.value);
default:
this.tokenizer.parseError(("Unexpected " + this.token.value));
};
return (null);
}
}
}//package com.adobe.serialization.json
Section 5
//JSONEncoder (com.adobe.serialization.json.JSONEncoder)
package com.adobe.serialization.json {
import flash.utils.*;
public class JSONEncoder {
private var jsonString:String;
public function JSONEncoder(_arg1){
this.jsonString = this.convertToString(_arg1);
}
public function getString():String{
return (this.jsonString);
}
private function convertToString(_arg1):String{
if ((_arg1 is String)){
return (this.escapeString((_arg1 as String)));
};
if ((_arg1 is Number)){
return ((isFinite((_arg1 as Number))) ? _arg1.toString() : "null");
} else {
if ((_arg1 is Boolean)){
return ((_arg1) ? "true" : "false");
} else {
if ((_arg1 is Array)){
return (this.arrayToString((_arg1 as Array)));
};
if ((((_arg1 is Object)) && (!((_arg1 == null))))){
return (this.objectToString(_arg1));
};
};
};
return ("null");
}
private function escapeString(_arg1:String):String{
var _local3:String;
var _local6:String;
var _local7:String;
var _local2 = "";
var _local4:Number = _arg1.length;
var _local5:int;
while (_local5 < _local4) {
_local3 = _arg1.charAt(_local5);
switch (_local3){
case "\"":
_local2 = (_local2 + "\\\"");
break;
case "\\":
_local2 = (_local2 + "\\\\");
break;
case "\b":
_local2 = (_local2 + "\\b");
break;
case "\f":
_local2 = (_local2 + "\\f");
break;
case "\n":
_local2 = (_local2 + "\\n");
break;
case "\r":
_local2 = (_local2 + "\\r");
break;
case "\t":
_local2 = (_local2 + "\\t");
break;
default:
if (_local3 < " "){
_local6 = _local3.charCodeAt(0).toString(16);
_local7 = ((_local6.length == 2)) ? "00" : "000";
_local2 = (_local2 + (("\\u" + _local7) + _local6));
} else {
_local2 = (_local2 + _local3);
};
};
_local5++;
};
return ((("\"" + _local2) + "\""));
}
private function arrayToString(_arg1:Array):String{
var _local2 = "";
var _local3:int;
while (_local3 < _arg1.length) {
if (_local2.length > 0){
_local2 = (_local2 + ",");
};
_local2 = (_local2 + this.convertToString(_arg1[_local3]));
_local3++;
};
return ((("[" + _local2) + "]"));
}
private function objectToString(_arg1:Object):String{
var value:Object;
var key:String;
var v:XML;
var o = _arg1;
var s = "";
var classInfo:XML = describeType(o);
if (classInfo.@name.toString() == "Object"){
for (key in o) {
value = o[key];
if ((value is Function)){
} else {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((this.escapeString(key) + ":") + this.convertToString(value)));
};
};
} else {
for each (v in classInfo..*.(((name() == "variable")) || ((name() == "accessor")))) {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((this.escapeString(v.@name.toString()) + ":") + this.convertToString(o[v.@name])));
};
};
return ((("{" + s) + "}"));
}
}
}//package com.adobe.serialization.json
Section 6
//JSONParseError (com.adobe.serialization.json.JSONParseError)
package com.adobe.serialization.json {
public class JSONParseError extends Error {
private var _location:int;
private var _text:String;
public function JSONParseError(_arg1:String="", _arg2:int=0, _arg3:String=""){
super(_arg1);
name = "JSONParseError";
this._location = _arg2;
this._text = _arg3;
}
public function get location():int{
return (this._location);
}
public function get text():String{
return (this._text);
}
}
}//package com.adobe.serialization.json
Section 7
//JSONToken (com.adobe.serialization.json.JSONToken)
package com.adobe.serialization.json {
public class JSONToken {
private var _type:int;
private var _value:Object;
public function JSONToken(_arg1:int=-1, _arg2:Object=null){
this._type = _arg1;
this._value = _arg2;
}
public function get type():int{
return (this._type);
}
public function set type(_arg1:int):void{
this._type = _arg1;
}
public function get value():Object{
return (this._value);
}
public function set value(_arg1:Object):void{
this._value = _arg1;
}
}
}//package com.adobe.serialization.json
Section 8
//JSONTokenizer (com.adobe.serialization.json.JSONTokenizer)
package com.adobe.serialization.json {
public class JSONTokenizer {
private var obj:Object;
private var jsonString:String;
private var loc:int;
private var ch:String;
public function JSONTokenizer(_arg1:String){
this.jsonString = _arg1;
this.loc = 0;
this.nextChar();
}
public function getNextToken():JSONToken{
var _local2:String;
var _local3:String;
var _local4:String;
var _local1:JSONToken = new JSONToken();
this.skipIgnored();
switch (this.ch){
case "{":
_local1.type = JSONTokenType.LEFT_BRACE;
_local1.value = "{";
this.nextChar();
break;
case "}":
_local1.type = JSONTokenType.RIGHT_BRACE;
_local1.value = "}";
this.nextChar();
break;
case "[":
_local1.type = JSONTokenType.LEFT_BRACKET;
_local1.value = "[";
this.nextChar();
break;
case "]":
_local1.type = JSONTokenType.RIGHT_BRACKET;
_local1.value = "]";
this.nextChar();
break;
case ",":
_local1.type = JSONTokenType.COMMA;
_local1.value = ",";
this.nextChar();
break;
case ":":
_local1.type = JSONTokenType.COLON;
_local1.value = ":";
this.nextChar();
break;
case "t":
_local2 = ((("t" + this.nextChar()) + this.nextChar()) + this.nextChar());
if (_local2 == "true"){
_local1.type = JSONTokenType.TRUE;
_local1.value = true;
this.nextChar();
} else {
this.parseError(("Expecting 'true' but found " + _local2));
};
break;
case "f":
_local3 = (((("f" + this.nextChar()) + this.nextChar()) + this.nextChar()) + this.nextChar());
if (_local3 == "false"){
_local1.type = JSONTokenType.FALSE;
_local1.value = false;
this.nextChar();
} else {
this.parseError(("Expecting 'false' but found " + _local3));
};
break;
case "n":
_local4 = ((("n" + this.nextChar()) + this.nextChar()) + this.nextChar());
if (_local4 == "null"){
_local1.type = JSONTokenType.NULL;
_local1.value = null;
this.nextChar();
} else {
this.parseError(("Expecting 'null' but found " + _local4));
};
break;
case "\"":
_local1 = this.readString();
break;
default:
if (((this.isDigit(this.ch)) || ((this.ch == "-")))){
_local1 = this.readNumber();
} else {
if (this.ch == ""){
return (null);
};
this.parseError((("Unexpected " + this.ch) + " encountered"));
};
};
return (_local1);
}
private function readString():JSONToken{
var _local3:String;
var _local4:int;
var _local1:JSONToken = new JSONToken();
_local1.type = JSONTokenType.STRING;
var _local2 = "";
this.nextChar();
while (((!((this.ch == "\""))) && (!((this.ch == ""))))) {
if (this.ch == "\\"){
this.nextChar();
switch (this.ch){
case "\"":
_local2 = (_local2 + "\"");
break;
case "/":
_local2 = (_local2 + "/");
break;
case "\\":
_local2 = (_local2 + "\\");
break;
case "b":
_local2 = (_local2 + "\b");
break;
case "f":
_local2 = (_local2 + "\f");
break;
case "n":
_local2 = (_local2 + "\n");
break;
case "r":
_local2 = (_local2 + "\r");
break;
case "t":
_local2 = (_local2 + "\t");
break;
case "u":
_local3 = "";
_local4 = 0;
while (_local4 < 4) {
if (!this.isHexDigit(this.nextChar())){
this.parseError((" Excepted a hex digit, but found: " + this.ch));
};
_local3 = (_local3 + this.ch);
_local4++;
};
_local2 = (_local2 + String.fromCharCode(parseInt(_local3, 16)));
break;
default:
_local2 = (_local2 + ("\\" + this.ch));
};
} else {
_local2 = (_local2 + this.ch);
};
this.nextChar();
};
if (this.ch == ""){
this.parseError("Unterminated string literal");
};
this.nextChar();
_local1.value = _local2;
return (_local1);
}
private function readNumber():JSONToken{
var _local1:JSONToken = new JSONToken();
_local1.type = JSONTokenType.NUMBER;
var _local2 = "";
if (this.ch == "-"){
_local2 = (_local2 + "-");
this.nextChar();
};
if (!this.isDigit(this.ch)){
this.parseError("Expecting a digit");
};
if (this.ch == "0"){
_local2 = (_local2 + this.ch);
this.nextChar();
if (this.isDigit(this.ch)){
this.parseError("A digit cannot immediately follow 0");
};
} else {
while (this.isDigit(this.ch)) {
_local2 = (_local2 + this.ch);
this.nextChar();
};
};
if (this.ch == "."){
_local2 = (_local2 + ".");
this.nextChar();
if (!this.isDigit(this.ch)){
this.parseError("Expecting a digit");
};
while (this.isDigit(this.ch)) {
_local2 = (_local2 + this.ch);
this.nextChar();
};
};
if ((((this.ch == "e")) || ((this.ch == "E")))){
_local2 = (_local2 + "e");
this.nextChar();
if ((((this.ch == "+")) || ((this.ch == "-")))){
_local2 = (_local2 + this.ch);
this.nextChar();
};
if (!this.isDigit(this.ch)){
this.parseError("Scientific notation number needs exponent value");
};
while (this.isDigit(this.ch)) {
_local2 = (_local2 + this.ch);
this.nextChar();
};
};
var _local3:Number = Number(_local2);
if (((isFinite(_local3)) && (!(isNaN(_local3))))){
_local1.value = _local3;
return (_local1);
};
this.parseError((("Number " + _local3) + " is not valid!"));
return (null);
}
private function nextChar():String{
return ((this.ch = this.jsonString.charAt(this.loc++)));
}
private function skipIgnored():void{
var _local1:int;
do {
_local1 = this.loc;
this.skipWhite();
this.skipComments();
} while (_local1 != this.loc);
}
private function skipComments():void{
if (this.ch == "/"){
this.nextChar();
switch (this.ch){
case "/":
do {
this.nextChar();
} while (((!((this.ch == "\n"))) && (!((this.ch == "")))));
this.nextChar();
break;
case "*":
this.nextChar();
while (true) {
if (this.ch == "*"){
this.nextChar();
if (this.ch == "/"){
this.nextChar();
break;
};
} else {
this.nextChar();
};
if (this.ch == ""){
this.parseError("Multi-line comment not closed");
};
};
break;
default:
this.parseError((("Unexpected " + this.ch) + " encountered (expecting '/' or '*' )"));
};
};
}
private function skipWhite():void{
while (this.isWhiteSpace(this.ch)) {
this.nextChar();
};
}
private function isWhiteSpace(_arg1:String):Boolean{
return ((((((((_arg1 == " ")) || ((_arg1 == "\t")))) || ((_arg1 == "\n")))) || ((_arg1 == "\r"))));
}
private function isDigit(_arg1:String):Boolean{
return ((((_arg1 >= "0")) && ((_arg1 <= "9"))));
}
private function isHexDigit(_arg1:String):Boolean{
var _local2:String = _arg1.toUpperCase();
return (((this.isDigit(_arg1)) || ((((_local2 >= "A")) && ((_local2 <= "F"))))));
}
public function parseError(_arg1:String):void{
throw (new JSONParseError(_arg1, this.loc, this.jsonString));
}
}
}//package com.adobe.serialization.json
Section 9
//JSONTokenType (com.adobe.serialization.json.JSONTokenType)
package com.adobe.serialization.json {
public class JSONTokenType {
public static const UNKNOWN:int = -1;
public static const COMMA:int = 0;
public static const LEFT_BRACE:int = 1;
public static const RIGHT_BRACE:int = 2;
public static const LEFT_BRACKET:int = 3;
public static const RIGHT_BRACKET:int = 4;
public static const COLON:int = 6;
public static const TRUE:int = 7;
public static const FALSE:int = 8;
public static const NULL:int = 9;
public static const STRING:int = 10;
public static const NUMBER:int = 11;
}
}//package com.adobe.serialization.json
Section 10
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local4:int;
var _local5:int;
var _local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
}
}//package com.adobe.utils
Section 11
//APIConnector (com.newgrounds.components.APIConnector)
package com.newgrounds.components {
import flash.events.*;
import flash.display.*;
import com.newgrounds.*;
import flash.utils.*;
public class APIConnector extends MovieClip {
public var errorDialog:MovieClip;
public var background:MovieClip;
public var viewLatestButton:SimpleButton;
public var closeButton:SimpleButton;
public var viewAuthorizedButton:SimpleButton;
private var _initialized:Boolean;
private var _movieId:String;
private var _encryptionKey:String;
private var _movieVersion:String;
private var _showConnectingPopup:Boolean;// = true
private var _useErrorPopup:Boolean;// = true
private var _medalPopup:MedalPopup;
private var _popDelay:Timer;
public function APIConnector(){
this._popDelay = new Timer(3000, 1);
super();
addFrameScript(0, this.frame1, 6, this.frame7, 7, this.frame8);
if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){
return;
};
this.useErrorPopup = true;
this.useMedalPopup = true;
this._popDelay.addEventListener(TimerEvent.TIMER, this.errorTimerHandler);
addEventListener(Event.ENTER_FRAME, this.enterFrameHandler);
if (stage){
addEventListener(Event.RENDER, this.renderHandler);
stage.invalidate();
} else {
this.clear();
};
}
public function get movieId():String{
return (this._movieId);
}
public function set movieId(_arg1:String):void{
this._movieId = _arg1;
}
public function get encryptionKey():String{
return (this._encryptionKey);
}
public function set encryptionKey(_arg1:String):void{
this._encryptionKey = _arg1;
}
public function get movieVersion():String{
return (this._movieVersion);
}
public function set movieVersion(_arg1:String):void{
this._movieVersion = _arg1;
}
public function get debugMode():Boolean{
return (API.debugMode);
}
public function set debugMode(_arg1:Boolean):void{
API.debugMode = true;
}
public function get useMedalPopup():Boolean{
return (!((this._medalPopup == null)));
}
public function set useMedalPopup(_arg1:Boolean):void{
if (((_arg1) && (!(this._medalPopup)))){
this._medalPopup = new MedalPopup();
addChild(this._medalPopup);
} else {
if (((!(_arg1)) && (this._medalPopup))){
removeChild(this._medalPopup);
this._medalPopup = null;
};
};
}
public function get useErrorPopup():Boolean{
return (this._useErrorPopup);
}
public function set useErrorPopup(_arg1:Boolean):void{
this._useErrorPopup = _arg1;
API.addEventListener(APIEvent.API_CONNECTED, this.movieConnectedHandler);
if (this._useErrorPopup){
API.addEventListener(APIEvent.NEW_VERSION_AVAILABLE, this.newVersionAvailableHandler);
API.addEventListener(APIEvent.HOST_BLOCKED, this.hostBlockedHandler);
} else {
API.removeEventListener(APIEvent.NEW_VERSION_AVAILABLE, this.newVersionAvailableHandler);
API.removeEventListener(APIEvent.HOST_BLOCKED, this.hostBlockedHandler);
};
}
public function get showConnectingPopup():Boolean{
return (this._showConnectingPopup);
}
public function set showConnectingPopup(_arg1:Boolean):void{
this._showConnectingPopup = _arg1;
if (((!(_arg1)) && ((((currentLabel == "connecting")) || ((currentLabel == "connected")))))){
this.clear();
};
}
public function clear():void{
gotoAndStop("idle");
}
public function connect():void{
API.setVersion(this._movieVersion);
API.connect(root.loaderInfo, this._movieId, this._encryptionKey);
visible = true;
if (this.showConnectingPopup){
gotoAndStop("connecting");
};
}
private function renderHandler(_arg1:Event):void{
removeEventListener(Event.RENDER, this.renderHandler);
this.clear();
this.connect();
}
private function movieConnectedHandler(_arg1:APIEvent):void{
if (_arg1.success){
if (((((((API.isPublishedHost()) && (API.IsCompatible()))) && (!(API.hasUserSession())))) && (!(API.debugMode)))){
gotoAndStop("no_login");
this._popDelay.start();
visible = true;
} else {
if (this.showConnectingPopup){
gotoAndStop("connected");
};
};
} else {
gotoAndStop("no_connect");
this._popDelay.start();
visible = true;
};
}
private function newVersionAvailableHandler(_arg1:APIEvent):void{
gotoAndStop("new_version");
visible = true;
this.centerOnStage();
}
private function hostBlockedHandler(_arg1:APIEvent):void{
gotoAndStop("bad_host");
visible = true;
this.centerOnStage();
}
private function closeButtonClickHandler(_arg1:Event):void{
this.clear();
}
private function officialVersionClickHandler(_arg1:Event):void{
API.loadOfficialVersion();
}
private function enterFrameHandler(_arg1:Event):void{
this.forceAlwaysOnTop();
}
private function initButtons():void{
if (this.viewLatestButton){
this.viewLatestButton.addEventListener(MouseEvent.CLICK, this.officialVersionClickHandler);
};
if (this.viewAuthorizedButton){
this.viewAuthorizedButton.addEventListener(MouseEvent.CLICK, this.officialVersionClickHandler);
};
if (this.closeButton){
this.closeButton.addEventListener(MouseEvent.CLICK, this.closeButtonClickHandler);
};
}
private function forceAlwaysOnTop():void{
var myIndex:uint;
var topIndex:uint;
if (((parent) && (visible))){
try {
myIndex = parent.getChildIndex(this);
topIndex = (parent.numChildren - 1);
if (myIndex != topIndex){
parent.setChildIndex(this, topIndex);
};
} catch(e:Error) {
};
};
}
private function centerOnStage():void{
if (stage){
x = (stage.stageWidth / 2);
y = (stage.stageHeight / 2);
};
}
private function errorTimerHandler(_arg1:TimerEvent):void{
if (this.errorDialog){
this.errorDialog.gotoAndPlay("closeme");
} else {
this.clear();
};
}
function frame1(){
stop();
}
function frame7(){
this.initButtons();
}
function frame8(){
this.initButtons();
}
}
}//package com.newgrounds.components
Section 12
//FlashAd (com.newgrounds.components.FlashAd)
package com.newgrounds.components {
import flash.events.*;
import flash.display.*;
import com.newgrounds.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class FlashAd extends Sprite {
public var background:MovieClip;
private var _showBackground:Boolean;
private var _adURLLoader:URLLoader;
private var _adRect:Sprite;
private var _mask:Shape;
private var _ad:Loader;
private static const DEBUG_AD_URL:String = "http://www.ngads.com/adtest.php";
private static const REMOVED_FROM_STAGE:String = "removedFromStage";
private static var _adResetTime:uint = 0;
private static var _adURL:URLRequest;
public function FlashAd(_arg1:Boolean=true){
if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){
return;
};
this._adRect = new Sprite();
this._adRect.graphics.beginFill(0);
this._adRect.graphics.moveTo(0, 0);
this._adRect.graphics.lineTo(300, 0);
this._adRect.graphics.lineTo(300, 250);
this._adRect.graphics.lineTo(0, 250);
this._adRect.graphics.lineTo(0, 0);
this._adRect.graphics.endFill();
this._mask = new Shape();
this._mask.graphics.beginFill(0);
this._mask.graphics.moveTo(0, 0);
this._mask.graphics.lineTo(300, 0);
this._mask.graphics.lineTo(300, 250);
this._mask.graphics.lineTo(0, 250);
this._mask.graphics.lineTo(0, 0);
this._mask.graphics.endFill();
addChild(this._adRect);
this._adRect.addChild(this._mask);
this._adRect.visible = false;
x = Math.round(x);
y = Math.round(y);
scaleX = 1;
scaleY = 1;
if (this.background){
if (this.background.ngLinkButton){
this.background.ngLinkButton.addEventListener(MouseEvent.CLICK, this.linkClickHandler);
};
if (this.background.loadingClip){
this.background.loadingClip.visible = false;
};
};
if (API.isFlashVersion(9, 0, 28)){
addEventListener(REMOVED_FROM_STAGE, this.onRemovedFromStage);
};
if (API.adsApproved){
this.loadAdFeed(API.adFeedURL);
} else {
API.addEventListener(APIEvent.ADS_APPROVED, this.onAdsApproved, false, 0, true);
};
this.showBackground = _arg1;
}
public function get showBackground():Boolean{
return (this._showBackground);
}
public function set showBackground(_arg1:Boolean):void{
this._showBackground = _arg1;
if (this.background){
this.background.visible = _arg1;
this._adRect.mask = (_arg1) ? this.background.adMask : null;
};
}
public function removeAd():void{
removeEventListener(REMOVED_FROM_STAGE, this.onRemovedFromStage);
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = false;
};
if (this._adURLLoader){
try {
this._adURLLoader.close();
} catch(e:Error) {
};
};
if (this._adRect){
this._adRect.visible = false;
};
if (this._ad){
trace("[NewgroundsAPI] :: Ad removed");
try {
this._ad.close();
} catch(e:Error) {
};
try {
Object(this._ad).unloadAndStop(true);
} catch(e:Error) {
_ad.unload();
};
if (this._ad.parent){
this._ad.parent.removeChild(this._ad);
};
};
this._ad = null;
}
private function onAdsApproved(_arg1:APIEvent):void{
API.removeEventListener(APIEvent.ADS_APPROVED, this.onAdsApproved, false);
if (_arg1.success){
this.loadAdFeed(API.adFeedURL);
} else {
trace("[NewgroundsAPI] :: No ad feed URL supplied to Newgrounds API ad!");
};
}
private function loadAdFeed(_arg1:String):void{
var adFeedURL = _arg1;
this._adURLLoader = new URLLoader();
this._adURLLoader.addEventListener(Event.COMPLETE, this.onAdFeedLoaded);
this._adURLLoader.addEventListener(IOErrorEvent.IO_ERROR, this.onAdError);
this._adURLLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onAdError);
if (!adFeedURL){
trace("[Newgrounds API] :: Invalid feed URL!");
return;
};
if (this.hasAdElapsed){
if (adFeedURL.indexOf("?") > -1){
_adURL = new URLRequest(((adFeedURL + "&random=") + Math.random()));
} else {
_adURL = new URLRequest(((adFeedURL + "?random=") + Math.random()));
};
};
try {
this._adURLLoader.load(_adURL);
} catch(e:Error) {
onAdError(null);
};
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = true;
};
}
private function loadAd(_arg1:String):void{
if (this._ad){
this.removeAd();
};
this._ad = new Loader();
this._ad.contentLoaderInfo.addEventListener(Event.COMPLETE, this.onAdLoaded);
this._ad.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.onAdError);
this._ad.load(new URLRequest(_arg1), new LoaderContext(false, new ApplicationDomain(null)));
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = true;
};
}
private function onAdFeedLoaded(_arg1:Event):void{
var _local2:URLLoader = URLLoader(_arg1.target);
if (((_local2.data) && (!((_local2.data == ""))))){
this.loadAd((_local2.data as String));
} else {
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, false, new APIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad")));
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = false;
};
};
}
private function onAdFeedError(_arg1:Event):void{
trace("[NewgroundsAPI] :: Unable to load ad feed!");
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = false;
};
}
private function onAdError(_arg1:Event):void{
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, false, new APIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad")));
this.removeAd();
}
private function onAdLoaded(_arg1:Event):void{
this._adRect.addChild(this._ad);
this._ad.mask = this._mask;
this._adRect.visible = true;
if (this.background){
if (this._showBackground){
this._adRect.mask = this.background.adMask;
};
if (this.background.loadingClip){
this.background.loadingClip.visible = false;
};
};
trace("[NewgroundsAPI] :: Ad loaded!");
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, true));
}
private function onRemovedFromStage(_arg1:Event):void{
this.removeAd();
}
private function get hasAdElapsed():Boolean{
if (getTimer() >= _adResetTime){
_adResetTime = (getTimer() + ((1000 * 60) * 5));
return (true);
};
return (false);
}
private function linkClickHandler(_arg1:MouseEvent):void{
API.loadNewgrounds();
}
}
}//package com.newgrounds.components
Section 13
//MedalPopup (com.newgrounds.components.MedalPopup)
package com.newgrounds.components {
import flash.events.*;
import flash.display.*;
import com.newgrounds.*;
import flash.utils.*;
import flash.text.*;
public class MedalPopup extends MovieClip {
public var medalNameText:TextField;
public var medalValueText:TextField;
public var medalContainer:Sprite;
private var _initialized:Boolean;
private var _medal:Medal;
private var _medalIcon:Bitmap;
private var _medalQueue:Array;
private var _popDelay:Timer;
public function MedalPopup(){
this._medalQueue = [];
this._popDelay = new Timer(3000, 1);
super();
addFrameScript(0, this.frame1, 9, this.frame10, 18, this.frame19);
if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){
return;
};
visible = false;
addEventListener(Event.ENTER_FRAME, this.enterFrameHandler);
stop();
API.addEventListener(APIEvent.MEDAL_UNLOCKED, this.onMedalUnlocked, false, 0, true);
this._popDelay.addEventListener(TimerEvent.TIMER, this.timerHandler);
}
public function get popupTime():Number{
return ((this._popDelay.delay / 1000));
}
public function set popupTime(_arg1:Number):void{
if (isNaN(_arg1)){
_arg1 = 3;
};
this._popDelay.delay = (_arg1 * 1000);
}
private function enterFrameHandler(_arg1:Event):void{
var myIndex:uint;
var topIndex:uint;
var event = _arg1;
if (((this._medalQueue.length) && (!(visible)))){
this._medal = this._medalQueue.pop();
this._popDelay.start();
gotoAndPlay("medal_show");
visible = true;
};
if (((visible) && (parent))){
try {
myIndex = parent.getChildIndex(this);
topIndex = (parent.numChildren - 1);
if (myIndex != topIndex){
parent.setChildIndex(this, topIndex);
};
} catch(error:Error) {
};
};
}
private function onMedalUnlocked(_arg1:APIEvent):void{
if (((((_arg1.success) && (_arg1.data))) && ((_arg1.data is Medal)))){
this._medalQueue.push(Medal(_arg1.data));
};
}
private function showMedalInfo():void{
if (!this._medal){
return;
};
if (this.medalContainer){
this._medalIcon = this._medal.createIconBitmap();
this.medalContainer.addChild(this._medalIcon);
};
if (this.medalNameText){
this.medalNameText.text = this._medal.name;
};
if (this.medalValueText){
this.medalValueText.text = (this._medal.value.toString() + "pts");
};
this._popDelay.start();
stop();
}
private function timerHandler(_arg1:TimerEvent):void{
if (((this._medalIcon) && (this._medalIcon.parent))){
this._medalIcon.parent.removeChild(this._medalIcon);
this._medalIcon = null;
};
gotoAndPlay("medal_hide");
this._popDelay.stop();
}
function frame1(){
stop();
}
function frame10(){
this.showMedalInfo();
stop();
}
function frame19(){
stop();
visible = false;
}
}
}//package com.newgrounds.components
Section 14
//PreloaderBar (com.newgrounds.components.PreloaderBar)
package com.newgrounds.components {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class PreloaderBar extends MovieClip {
public var bar:DisplayObject;
public var playButton:DisplayObject;
private var _autoPlay:Boolean;// = false
public function PreloaderBar(){
addFrameScript(51, this.frame52);
if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){
return;
};
gotoAndStop("LOAD");
if (this.bar){
this.bar.scaleX = 0;
};
addEventListener(Event.ENTER_FRAME, this.enterFrameHandler);
}
public function onPlayButtonClicked(_arg1:MouseEvent):void{
this.startMovie();
}
public function get autoPlay():Boolean{
return (this._autoPlay);
}
public function set autoPlay(_arg1:Boolean):void{
this._autoPlay = _arg1;
}
private function enterFrameHandler(_arg1:Event):void{
var _local2:Number;
if (((root) && (root.loaderInfo))){
if ((root is MovieClip)){
MovieClip(root).stop();
};
_local2 = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal);
if (this.bar){
this.bar.scaleX = _local2;
};
if (_local2 == 1){
removeEventListener(Event.ENTER_FRAME, this.enterFrameHandler);
if (this.autoPlay){
this.startMovie();
} else {
gotoAndPlay("COMPLETE_STOP");
};
};
};
}
private function playButtonReady():void{
stop();
if (this.playButton){
this.playButton.addEventListener(MouseEvent.CLICK, this.playButtonClicked);
} else {
this.startMovie();
};
}
private function playButtonClicked(_arg1:MouseEvent):void{
this.startMovie();
}
private function startMovie():void{
if (((root) && ((root is MovieClip)))){
MovieClip(root).play();
};
dispatchEvent(new Event(Event.COMPLETE));
}
function frame52(){
stop();
if (this.playButton){
this.playButton.addEventListener(MouseEvent.CLICK, this.onPlayButtonClicked);
} else {
this.startMovie();
};
}
}
}//package com.newgrounds.components
Section 15
//API (com.newgrounds.API)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import com.newgrounds.components.*;
import flash.utils.*;
import com.adobe.serialization.json.*;
import flash.net.*;
import com.adobe.crypto.*;
import com.adobe.images.*;
import flash.system.*;
public class API {
public static const VERSION:String = "2.9";
private static const GATEWAY_URL:String = "http://www.ngads.com/gateway_v2.php";
private static const AD_TERMS_URL:String = "http://www.newgrounds.com/wiki/flashads/terms/";
private static const COMMANDS_WIKI_URL:String = "http://www.newgrounds.com/wiki/flashapi/commands/";
private static var do_echo:Boolean = false;
private static var _debug:Boolean = true;
private static var _connected:Boolean = false;
private static var _isMetadataLoaded:Boolean = false;
private static var _preloadComplete:Boolean = false;
private static var _adsApproved:Boolean = false;
private static var _saveGroupId:uint;
private static var _saveFileId:uint;
private static var _trackerId:uint;
private static var _movieId:String;
private static var _encryptionKey:String;
private static var _url:String;
private static var _host:String;
private static var connected:Boolean;
private static var version:String;
private static var ad_url:String;
private static var publisher_id:uint;
private static var session_id:String;
private static var user_email:String;
private static var user_name:String;
private static var user_id:uint;
private static var userpage_format:String;
private static var _medals:Array;
private static var timeoutTimer:Timer = new Timer(8000, 1);
private static var _userpageFormat:String;
private static var _scoreboards:Array = new Array();
private static var _bridge:Bridge;
private static var _saveFile:SaveFile;
private static var _imageFilePath:String;
private static var _saveFilePath:String;
private static var _saveGroups:Array = [];
private static var root:DisplayObject;
private static var _eventDispatcher:EventDispatcher = new EventDispatcher();
private static var score_page_counts:Object = new Object();
private static var compression_radix:String = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X";
private static var compressor:BaseN = new BaseN(compression_radix);
public static var errors:Dictionary = APIError.init_codes();
private static var sharedObjects:Dictionary = new Dictionary();
private static var _preloadAssets:Array = [];
public static var periods:Object = getPeriodAliases();
private static var period_aliases:Object = {t:{name:"Today", alias:"TODAY"}, p:{name:"Yesterday", alias:"YESTERDAY"}, w:{name:"This Week", alias:"THIS_WEEK"}, m:{name:"This Month", alias:"THIS_MONTH"}, y:{name:"This Year", alias:"THIS_YEAR"}, a:{name:"All-Time", alias:"ALL_TIME"}};
private static var secureCommand:String;
public static function get adFeedURL():String{
return (ad_url);
}
public static function get preloadComplete():Boolean{
return (_preloadComplete);
}
private static function assertConnected():Boolean{
if (!_connected){
return (false);
};
return (true);
}
public static function setVersion(_arg1:String):void{
if (((_arg1) && (!((_arg1 == ""))))){
version = _arg1;
};
}
public static function setUserEmail(_arg1:String):void{
user_email = _arg1;
}
public static function get debugMode():Boolean{
return (_debug);
}
public static function set debugMode(_arg1:Boolean):void{
_debug = _arg1;
}
public static function getTrackerID():uint{
return (_trackerId);
}
public static function getUserID():uint{
return (user_id);
}
public static function getUserName():String{
return (user_name);
}
public static function isConnected():Boolean{
return (_connected);
}
public static function getOfficialURL():String{
var _local1:String = ((((((GATEWAY_URL + "?tracker_id=") + _movieId) + "&command_id=") + getCommandID("loadOfficalVersion")) + "&seed=") + Math.random());
if (debugMode){
_local1 = (_local1 + "&debug=1");
};
return (_local1);
}
public static function get adsApproved():Boolean{
return (_adsApproved);
}
public static function hasUserSession():Boolean{
return (((((!((session_id == null))) && (!((session_id == ""))))) && (!((publisher_id == 0)))));
}
public static function isNewgrounds():Boolean{
return ((((publisher_id == 1)) || ((getHost().toLowerCase().indexOf("ungrounded.net") > -1))));
}
public static function IsCompatible():Boolean{
return (!((publisher_id == 0)));
}
public static function hasUserEmail():Boolean{
return (((!((user_email == null))) && (!((user_email == "")))));
}
public static function connectionTimeOut(_arg1:Event=null):void{
dispatchEvent(new APIEvent(APIEvent.API_CONNECTED, false, new APIError("CONNECTION_FAILED", "Connection to NewgroundsAPI gateway timed out.")));
}
public static function connect(_arg1:LoaderInfo, _arg2:String, _arg3:String=null):void{
var loaderInfo = _arg1;
var m_id = _arg2;
var encrypt_key = _arg3;
if (!loaderInfo){
fatalError("Null loaderInfo paremeter passed in to connectMovie!", "");
return;
};
try {
if (loaderInfo.loader){
loaderInfo = loaderInfo.loader.loaderInfo;
};
} catch(error:Error) {
};
_url = loaderInfo.url;
_host = _url;
if ((((_host.indexOf("http://") > -1)) || ((_host.indexOf("https://") > -1)))){
_host = _host.split("/")[2].toLowerCase();
} else {
_host = "localhost";
};
var flashVars:Object = loaderInfo.parameters;
if (isPublishedHost()){
debugMode = false;
};
if (((!(debugMode)) && (flashVars))){
if (flashVars.NewgroundsAPI_UserName){
user_name = flashVars.NewgroundsAPI_UserName;
};
if (flashVars.NewgroundsAPI_UserID){
user_id = flashVars.NewgroundsAPI_UserID;
};
if (flashVars.NewgroundsAPI_PublisherID){
publisher_id = flashVars.NewgroundsAPI_PublisherID;
} else {
publisher_id = 1;
};
if (flashVars.NewgroundsAPI_UserpageFormat){
_userpageFormat = flashVars.NewgroundsAPI_UserpageFormat;
};
if (flashVars.NewgroundsAPI_SessionID){
session_id = flashVars.NewgroundsAPI_SessionID;
};
if (flashVars.NewgroundsAPI_SaveGroupID){
_saveGroupId = flashVars.NewgroundsAPI_SaveGroupID;
};
if (flashVars.NewgroundsAPI_SaveFileID){
_saveFileId = flashVars.NewgroundsAPI_SaveFileID;
};
if (flashVars.NewgroundsAPI_SandboxID){
_bridge = new Bridge(flashVars.NewgroundsAPI_SandboxID);
};
} else {
publisher_id = 1;
session_id = "D3bu64p1U53R";
user_id = 10;
user_name = "API-Debugger";
};
if (connected){
fatalError("NewgroundsAPI.connect() - connection already in progress", "connect");
return;
};
timeoutTimer.start();
if (!m_id){
fatalError("NewgroundsAPI.connectMovie() - missing required movieId parameter", "connectMovie");
};
_movieId = String(m_id);
_trackerId = uint(_movieId.substring(0, _movieId.indexOf(":")));
_encryptionKey = encrypt_key;
connected = true;
sendCommand("connectMovie", {host:getHost(), movie_version:version});
}
private static function getHost():String{
return (_host);
}
public static function isPublishedHost():Boolean{
return (((!((getHost() == "localhost"))) && ((getHost().indexOf("file://") == -1))));
}
public static function loadUserPage(_arg1:uint=0, _arg2:String=null):Boolean{
var _local3:String;
if ((((_arg1 == 0)) && ((_arg2 == null)))){
if (hasUserSession()){
_arg1 = user_id;
_arg2 = user_name;
} else {
return (false);
};
};
if (publisher_id == 1){
_local3 = (("http://" + _arg2.toLowerCase()) + ".newgrounds.com");
navigateToURL(new URLRequest(_local3), "_blank");
return (true);
};
if (userpage_format){
_local3 = userpage_format;
_local3 = _local3.split(":user_id:").join(_arg1.toString());
_local3 = _local3.split(":user_name:").join(escape(_arg2));
navigateToURL(new URLRequest(_local3), "_blank");
return (true);
};
return (false);
}
public static function loadNewgrounds():void{
sendCommand("loadNewgrounds", {host:getHost()}, true);
}
public static function loadOfficialVersion():void{
navigateToURL(new URLRequest(getOfficialURL()));
}
public static function loadMySite():void{
sendCommand("loadMySite", {host:getHost()}, true);
}
public static function loadCustomLink(_arg1:String):void{
sendCommand("loadCustomLink", {host:getHost(), link:_arg1}, true);
}
public static function logCustomEvent(_arg1:String):void{
sendCommand("logCustomEvent", {host:getHost(), event:_arg1});
}
public static function getScoreBoardByName(_arg1:String):ScoreBoard{
var _local2:ScoreBoard;
for each (_local2 in _scoreboards) {
if (_local2.name == _arg1){
return (_local2);
};
};
return (null);
}
public static function getScoreBoardById(_arg1:uint):ScoreBoard{
var _local2:ScoreBoard;
for each (_local2 in _scoreboards) {
if (_local2.id == _arg1){
return (_local2);
};
};
return (null);
}
public static function postScore(_arg1:String, _arg2:uint, _arg3:String=""):void{
if (((!(_arg1)) || ((_arg1 == "")))){
sendError({command_id:getCommandID("postScore")}, new APIError("MISSING_PARAM", "missing required parameter(s)"));
return;
};
if (_arg3 == null){
_arg3 = "";
};
sendSecureCommand("postScore", {user_name:user_name, board:_arg1, value:_arg2, publisher_id:publisher_id, tag:_arg3});
}
public static function loadScores(_arg1:ScoreBoard, _arg2:String=null):void{
var _local3 = "loadScores";
if (!_arg1.id){
sendError({command_id:getCommandID(_local3)}, new APIError("MISSING_PARAM", "missing required ScoreBoard instance"));
return;
};
var _local4:Object = {};
_local4.publisher_id = publisher_id;
_local4.period = _arg1.period;
_local4.board = _arg1.id;
_local4.num_results = _arg1.num_results;
_local4.page = _arg1.page;
if (((!(_arg2)) || ((_arg2 == "")))){
_local4.tag = _arg1.tag;
} else {
_local4.tag = _arg2;
};
sendCommand(_local3, _local4);
}
public static function loadScoresInRange(_arg1:String, _arg2:String="All-Time", _arg3:uint=1, _arg4:uint=10):void{
if (((!(_arg1)) || ((_arg1 == "")))){
sendError({command_id:getCommandID("postScore")}, new APIError("MISSING_PARAM", "missing required parameter(s)"));
return;
};
var _local5:ScoreBoard = getScoreBoardByName(_arg1);
if (_local5){
_local5.loadScoresInRange(_arg2, _arg3, _arg4);
} else {
sendWarning((("loadScoresInRange: Scoreboard " + _arg1) + " could not be found."));
};
}
private static function populateMedals(_arg1:Array):void{
var _local2:uint;
var _local3:Object;
if (_medals === null){
_medals = new Array();
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = _arg1[_local2];
_medals.push(Medal.createFromObject(_local3));
_local2++;
};
};
sendMessage("Medals loaded!");
}
private static function populateSaveGroups(_arg1:Array):void{
var _local3:SaveGroup;
_saveGroups = [];
var _local2:uint;
while (_local2 < _arg1.length) {
_local3 = SaveGroup.createFromObject(_arg1[_local2]);
_saveGroups.push(_local3);
_local2++;
};
}
private static function populateScoreBoards(_arg1:Array):void{
_scoreboards = [];
var _local2:uint;
while (_local2 < _arg1.length) {
_scoreboards.push(new ScoreBoard(_arg1[_local2].id, _arg1[_local2].name, ""));
_local2++;
};
}
public static function get medals():Array{
return ((_medals) ? _medals.concat() : []);
}
public static function getMedalById(_arg1:uint):Medal{
var _local2:Medal;
for each (_local2 in _medals) {
if (_local2.id == _arg1){
return (_local2);
};
};
return (null);
}
public static function getMedalByName(_arg1:String):Medal{
var _local2:Medal;
for each (_local2 in _medals) {
if (_local2.name == _arg1){
return (_local2);
};
};
return (null);
}
public static function unlockMedal(_arg1:String):void{
var _local3:Object;
var _local4:Object;
if (((!(_arg1)) || ((_arg1 == "")))){
sendError({command_id:getCommandID("unlockMedal")}, new APIError("MISSING_PARAM", "missing required medal name"));
return;
};
var _local2:Medal = getMedalByName(_arg1);
if (!_local2){
sendMessage(("No medal with name: " + _arg1));
return;
};
if (((hasUserSession()) || (debugMode))){
sendMessage((("Attempting to unlock '" + _local2.name) + "'"));
if (_local2.unlocked){
sendWarning((("Medal '" + _local2.name) + "' is already unlocked!"));
return;
};
_local3 = new Object();
_local3.medal_id = _local2.id;
sendSecureCommand("unlockMedal", _local3);
} else {
sendMessage(("Locally unlocking " + _local2.name));
if (_local2.unlocked){
sendWarning((("Medal '" + _local2.name) + "' is already unlocked!"));
return;
};
_local2.unlocked = true;
_local4 = loadLocal("medals_unlocked");
if (!_local4){
_local4 = new Object();
};
_local4[_local2.id.toString()] = true;
saveLocal("medals_unlocked", _local4);
callListener(APIEvent.MEDAL_UNLOCKED, true, _local2);
};
}
public static function loadMedals():void{
if (_medals){
dispatchEvent(new APIEvent(APIEvent.MEDALS_LOADED, true, medals));
return;
};
var _local1:Object = new Object();
if (hasUserSession()){
_local1.publisher_id = publisher_id;
_local1.user_id = user_id;
};
sendCommand("getMedals", _local1);
}
public static function saveLocal(_arg1:String, _arg2:Object, _arg3:uint=0):void{
var sharedObj:SharedObject;
var save_id = _arg1;
var save_data = _arg2;
var size_allocation = _arg3;
try {
if (!sharedObjects[save_id]){
sharedObjects[save_id] = SharedObject.getLocal(((("ng_ap_secure_" + _trackerId) + "_") + save_id));
};
sharedObj = sharedObjects[save_id];
sharedObj.data[save_id] = encodeData(save_data);
sharedObj.flush();
} catch(e:Error) {
sendWarning(("saveLocal ERROR: " + e));
};
}
public static function loadLocal(_arg1:String):Object{
var sharedObj:SharedObject;
var save_id = _arg1;
try {
if (!sharedObjects[save_id]){
sharedObjects[save_id] = SharedObject.getLocal(((("ng_ap_secure_" + _trackerId) + "_") + save_id));
};
sharedObj = sharedObjects[save_id];
if (((((sharedObj) && (sharedObj.data))) && (sharedObj.data[save_id]))){
return (decodeData(sharedObj.data[save_id]));
} else {
return (null);
};
} catch(e:Error) {
sendWarning(("loadLocal ERROR: " + e));
};
return (null);
}
public static function encodeData(_arg1:Object):String{
return (compressHex(RC4.encrypt(JSON.encode(_arg1), _encryptionKey)));
}
public static function decodeData(_arg1:String){
return (JSON.decode(RC4.decrypt(uncompressHex(_arg1), _encryptionKey)));
}
private static function compressHex(_arg1:String):String{
var _local2:uint = (_arg1.length % 6);
var _local3 = "";
var _local4:uint;
while (_local4 < _arg1.length) {
_local3 = (_local3 + compressor.encode(uint(("0x" + _arg1.substr(_local4, 6))), 4));
_local4 = (_local4 + 6);
};
return ((_local2.toString() + _local3));
}
private static function uncompressHex(_arg1:String):String{
var _local4:uint;
var _local6:String;
var _local7:uint;
var _local8:String;
var _local2:uint = uint(_arg1.charAt(0));
var _local3 = "";
var _local5:uint = 1;
while (_local5 < _arg1.length) {
_local6 = _arg1.substr(_local5, 4);
_local7 = uint(compressor.decode(_local6));
_local8 = _local7.toString(16);
if ((_local5 + 4) < _arg1.length){
_local4 = 6;
} else {
_local4 = _local2;
};
while (_local8.length < _local4) {
_local8 = ("0" + _local8);
};
_local3 = (_local3 + _local8);
_local5 = (_local5 + 4);
};
return (_local3);
}
public static function getSaveGroupById(_arg1:uint):SaveGroup{
if (((!(_saveGroups)) || ((_saveGroups.length < 1)))){
sendWarning("No save groups found");
return (null);
};
var _local2:uint;
while (_local2 < _saveGroups.length) {
if (_saveGroups[_local2].id == _arg1){
return (_saveGroups[_local2]);
};
_local2++;
};
return (null);
}
public static function getSaveGroupByName(_arg1:String):SaveGroup{
if (((!(_saveGroups)) || ((_saveGroups.length < 1)))){
sendWarning("No save groups found");
return (null);
};
var _local2:uint;
while (_local2 < _saveGroups.length) {
if (_saveGroups[_local2].name == _arg1){
return (_saveGroups[_local2]);
};
_local2++;
};
return (null);
}
public static function createSaveQuery(_arg1:String):SaveGroupQuery{
var _local2:SaveGroup = getSaveGroupByName(_arg1);
if (_local2){
return (_local2.createQuery());
};
return (null);
}
public static function executeSaveQuery(_arg1:SaveGroupQuery):void{
sendCommand("lookupSaveFiles", {publisher_id:publisher_id, group_id:_arg1.groupId, query:JSON.encode(_arg1.toObject())}, false, null, _arg1);
}
public static function checkFilePrivledges(_arg1:SaveFile):void{
sendCommand("checkFilePrivs", {group:_arg1.groupId, filename:_arg1.name, user_id:(user_id) ? user_id : 0, publisher_id:publisher_id});
}
public static function newSaveFile(_arg1:String):SaveFile{
var _local2:SaveGroup = getSaveGroupByName(_arg1);
if (_local2){
return (new SaveFile(_local2));
};
sendError({command_id:"newSaveFile"}, new APIError("INVALID_SAVE_GROUP", (("'" + _local2) + "' is not a valid save group.")));
return (null);
}
public static function saveFile(_arg1:SaveFile, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Object = _arg1.toObject();
_local4.user_name = user_name;
if (_arg1.id){
_local4.save_id = _arg1.id;
};
_local4.overwrite = (_arg3) ? 1 : 0;
if (_arg2){
_local4.draft = 1;
};
var _local5:ByteArray = new ByteArray();
if ((_arg1.contents is ByteArray)){
_local5.writeByte(0);
_local5.writeBytes(_arg1.contents);
} else {
_local5.writeByte(1);
_local5.writeObject(_arg1.contents);
};
_local5.compress();
var _local6:Object = new Object();
_local6.file = _local5;
if (_arg1.thumbnail){
_local6.thumbnail = PNGEncoder.encode(_arg1.thumbnail);
};
sendSecureCommand("saveFile", _local4, null, _local6, _arg1);
}
public static function rateSaveFile(_arg1:SaveFile, _arg2:SaveRating, _arg3:Number):void{
sendSecureCommand("rateSaveFile", {group:_arg1.groupId, save_id:_arg1.id, rating_id:_arg2.id, vote:_arg3, user_id:user_id}, null, null, _arg1);
}
public static function loadSaveFile(_arg1:Number, _arg2:Boolean=true){
var _local3:Object = {publisher_id:publisher_id, save_id:_arg1, get_contents:_arg2};
sendCommand("loadSaveFile", _local3);
}
private static function doEvent(_arg1:Object):void{
var _local2:String;
var _local3:Object;
var _local4:String;
var _local5:Boolean;
var _local6:ScoreBoard;
var _local7:Array;
var _local8:*;
var _local9:String;
var _local10:Medal;
var _local11:SaveGroup;
var _local12:Object;
var _local13:Object;
var _local14:Object;
var _local15:SaveFile;
var _local16:uint;
var _local17:Object;
var _local18:uint;
switch (getCommandName(_arg1.command_id)){
case "connectMovie":
timeoutTimer.stop();
if (_arg1.success){
sendMessage("You have successfully connected to the Newgrounds API Gateway");
sendMessage((("Movie identified as \"" + _arg1.movie_name) + "\""));
callListener(APIEvent.API_CONNECTED, _arg1.success, {title:_arg1.movie_name});
} else {
callListener(APIEvent.API_CONNECTED, _arg1.success, {});
return;
};
_local5 = false;
if (_arg1.ad_status === -1){
_local2 = "This movie was not approved to run Flash Ads.";
sendWarning(_local2);
sendWarning((("visit " + AD_TERMS_URL) + " to view our approval guidelines"));
if (!_arg1.ad_url){
callListener(APIEvent.ADS_APPROVED, false, new APIError("FLASH_ADS_NOT_APPROVED", _local2));
} else {
_local5 = true;
};
} else {
if (_arg1.ad_status === 0){
_local2 = "Flash Ads are currently awaiting approval.";
sendNotice(_local2);
if (!_arg1.ad_url){
callListener(APIEvent.ADS_APPROVED, false, new APIError("FLASH_ADS_NOT_APPROVED", _local2));
} else {
_local5 = true;
};
};
};
if (_arg1.ad_url){
ad_url = unescape(_arg1.ad_url);
if (!_local5){
sendMessage("This movie has been approved to run Flash Ads!");
};
_adsApproved = true;
callListener(APIEvent.ADS_APPROVED, true);
};
if (_arg1.deny_host){
_local2 = (getHost() + " does not have permission to run this movie!");
sendWarning(_local2);
sendWarning(("\tUpdate your API configuration to unblock " + getHost()));
callListener(APIEvent.HOST_BLOCKED, true, {real_url:unescape(_arg1.movie_url), url:getOfficialURL()});
};
if (_arg1.movie_version){
sendWarning("According to your API Configuration, this version is out of date.");
if (version){
sendWarning(("\tThe this movie is version " + version));
};
sendWarning(("\tThe most current version is " + _arg1.movie_version));
callListener(APIEvent.NEW_VERSION_AVAILABLE, true, {version:_arg1.movie_version, real_url:unescape(_arg1.movie_url), url:getOfficialURL()});
};
if (_arg1.request_portal_url){
sendCommand("setPortalID", {portal_url:_url});
};
sendCommand("preloadSettings", {publisher_id:publisher_id, user_id:user_id});
break;
case "preloadSettings":
if (_arg1.medals){
populateMedals(_arg1.medals);
if (((!(hasUserSession())) && (!(debugMode)))){
echo("Checking for SharedObject Medals...");
_local8 = loadLocal("medals_unlocked");
if (_local8){
for (_local9 in _local8) {
if (_local8[_local9]){
_local10 = getMedalById(uint(_local9));
echo(("Now unlocking " + _local10.name));
_local10.unlocked = true;
};
};
};
};
};
if (_arg1.save_groups){
populateSaveGroups(_arg1.save_groups);
};
if (_arg1.save_file_path){
_saveFilePath = (_arg1.save_file_path + "/");
};
if (_arg1.image_file_path){
_imageFilePath = (_arg1.image_file_path + "/");
};
if (_arg1.score_boards){
populateScoreBoards(_arg1.score_boards);
};
sendMessage("Metadata loaded!");
callListener(APIEvent.METADATA_LOADED, _arg1.success);
if (((_saveFileId) && (_saveGroupId))){
_local11 = getSaveGroupById(_saveGroupId);
if (_local11){
callListener(APIEvent.FILE_REQUESTED, true, {save_id:_saveFileId, group:_local11});
};
};
_preloadComplete = true;
break;
case "logCustomEvent":
if (_arg1.success){
sendMessage((("Event '" + _arg1.event) + "' was logged."));
};
callListener(APIEvent.EVENT_LOGGED, _arg1.success, {event:_arg1.event});
break;
case "postScore":
if (_arg1.success){
_local4 = "User";
if (user_email){
_local4 = user_email;
} else {
if (user_name){
_local4 = user_name;
};
};
_local6 = getScoreBoardById(_arg1.board);
if (_local6){
sendMessage((((((_local4 + " posted ") + _arg1.value) + " to '") + _local6.name) + "'"));
};
if (_arg1.best_scores){
_local12 = {today:_arg1.best_scores.D, yesterday:_arg1.best_scores.P, week:_arg1.best_scores.W, year:_arg1.best_scores.Y, all_time:_arg1.best_scores.A};
} else {
_local12 = {};
};
if (_arg1.best_ranks){
_local13 = {today:_arg1.best_ranks.D, yesterday:_arg1.best_ranks.P, week:_arg1.best_ranks.W, year:_arg1.best_ranks.Y, all_time:_arg1.best_ranks.A};
} else {
_local13 = {};
};
if (_arg1.num_scores){
_local14 = {today:_arg1.num_scores.D, yesterday:_arg1.num_scores.P, week:_arg1.num_scores.W, year:_arg1.num_scores.Y, all_time:_arg1.num_scores.A};
} else {
_local14 = {};
};
_local3 = {score:_arg1.score, value:_arg1.value, username:_local4, best_scores:_local12, best_ranks:_local13, num_scores:_local14};
};
callListener(APIEvent.SCORE_POSTED, _arg1.success, _local3);
break;
case "loadScores":
_local3 = new Object();
_local6 = getScoreBoardById(_arg1.board);
if (_local6){
_local6.setScores(_arg1.scores, _arg1.period, _arg1.page, _arg1.num_results, _arg1.num_scores);
};
callListener(APIEvent.SCORES_LOADED, _arg1.success, _local6);
break;
case "unlockMedal":
if (_medals){
_local10 = getMedalByName(_arg1.medal_name);
if (_local10.unlocked){
return;
};
_local10.unlocked = true;
callListener(APIEvent.MEDAL_UNLOCKED, _arg1.success, _local10);
};
break;
case "getMedals":
if (_arg1.success){
populateMedals(_arg1.medals);
};
callListener(APIEvent.MEDALS_LOADED, _arg1.success, _local3);
break;
case "loadSaveFile":
if (_arg1.success){
_local11 = getSaveGroupById(_arg1.group_id);
_local15 = new SaveFile(_local11);
_local15.id = _arg1.file.save_id;
_local15.name = _arg1.file.filename;
_local15.fileUrl = (_saveFilePath + _arg1.file.file);
_local15.thumbnailUrl = (_imageFilePath + _arg1.file.thumb);
_local15.authorName = _arg1.file.user_name;
_local15.authorId = _arg1.file.user_id;
_local15.setStatus(_arg1.file.status);
_local15.description = _arg1.file.description;
_local15.setFileSize(_arg1.file.file_size);
if (((_arg1.file.keys) && (_arg1.file.keys.length))){
_local16 = 0;
while (_local16 < _arg1.file.keys.length) {
_local15.setKey(_arg1.file.keys[_local16].id, _arg1.file.keys[_local16].value);
_local16++;
};
};
if (((_arg1.file.ratings) && (_arg1.file.ratings.length))){
_local16 = 0;
while (_local16 < _arg1.file.ratings.length) {
_local15.setRating(_arg1.file.ratings[_local16].id, _arg1.file.ratings[_local16].votes, _arg1.file.ratings[_local16].score);
_local16++;
};
};
if (_arg1.get_contents){
_local15.loadContents();
};
};
callListener(APIEvent.FILE_INITIALIZED, _arg1.success, _local15);
break;
case "lookupSaveFiles":
_local7 = [];
if (((_arg1.success) && (_arg1.files))){
_local16 = 0;
while (_local16 < _arg1.files.length) {
_local17 = _arg1.files[_local16];
_local15 = new SaveFile(getSaveGroupById(_arg1.group_id));
_local15.name = _local17.filename;
_local15.id = _local17.save_id;
_local15.description = _local17.description;
_local15.thumbnailUrl = (_imageFilePath + _local17.thumb);
_local15.fileUrl = (_saveFilePath + _local17.file);
_local15.authorName = _local17.user_name;
_local15.authorId = _local17.user_id;
_local15.setStatus(_local17.status);
_local15.setFileSize(_local17.file_size);
if (((_local17.keys) && (_local17.keys.length))){
_local18 = 0;
while (_local18 < _local17.keys.length) {
_local15.setKey(_local17.keys[_local18].id, _local17.keys[_local18].value);
_local18++;
};
};
if (((_local17.ratings) && (_local17.ratings.length))){
_local18 = 0;
while (_local18 < _local17.ratings.length) {
_local15.setRating(_local17.ratings[_local18].id, _local17.ratings[_local18].votes, _local17.ratings[_local18].score);
_local18++;
};
};
_local7.push(_local15);
_local16++;
};
};
_arg1.owner.dispatchEvent(new APIEvent(APIEvent.QUERY_COMPLETE, _arg1.success, _local7));
break;
case "rateSaveFile":
_local15 = _arg1.owner;
_arg1.success = ((_arg1.success) && (!(_arg1.already_voted)));
if (_arg1.success){
_local15.setRating(_arg1.rating_id, _arg1.votes, _arg1.score);
};
_arg1.file = _local15;
_local15.dispatchEvent(new APIEvent(APIEvent.VOTE_COMPLETE, _arg1.success, _arg1));
break;
case "saveFile":
_local3 = {};
if (_arg1.success){
_local3 = {save_id:_arg1.save_id, filename:_arg1.filename, file_url:_arg1.file_url, thumbnail:_arg1.thumbnail, icon:_arg1.icon};
SaveFile(_arg1.owner).fileSaved(_local3);
};
_arg1.owner.dispatchEvent(new APIEvent(APIEvent.FILE_SAVED, _arg1.success, _local3));
break;
case "checkFilePrivs":
_local3 = {filename:_arg1.filename, folder:_arg1.folder, can_read:_arg1.can_read, can_write:_arg1.can_write};
callListener(APIEvent.FILE_PRIVS_LOADED, _arg1.success, _local3);
break;
};
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:uint=0, _arg5:Boolean=false):void{
_eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public static function hasEventListener(_arg1:String):Boolean{
return (_eventDispatcher.hasEventListener(_arg1));
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
_eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
private static function dispatchEvent(_arg1:Event):void{
_eventDispatcher.dispatchEvent(_arg1);
echo(("Fired Event: " + _arg1.type));
}
static function callListener(_arg1:String, _arg2:Boolean=true, _arg3=undefined):void{
dispatchEvent(new APIEvent(_arg1, _arg2, _arg3));
if (_bridge){
_bridge.sendEvent(_arg1, {success:_arg2, data:_arg3});
};
}
private static function getCommandName(_arg1:String):String{
return (_arg1);
}
private static function getCommandID(_arg1:String):String{
return (_arg1);
}
private static function getPeriodAliases():Object{
var _local2:String;
var _local1:Object = new Object();
for (_local2 in period_aliases) {
_local1[period_aliases[_local2].alias] = _local2;
};
return (_local1);
}
public static function getPeriodName(_arg1:String):String{
var _local2:String;
for (_local2 in period_aliases) {
if (_local2 == _arg1){
return (period_aliases[_local2].name);
};
};
return (null);
}
public static function getPeriodAlias(_arg1:String):String{
var _local2:String;
for (_local2 in period_aliases) {
if (_local2 == _arg1){
return (period_aliases[_local2].alias);
};
};
return (null);
}
private static function sendError(_arg1:Object, _arg2:APIError):void{
var _local3:String = ((((("[NewgroundsAPI ERROR] :: " + getCommandName(_arg1.command_id)) + "() - ") + _arg2.name) + ":\n\t\t\t\t") + _arg2.message);
trace(_local3);
if (_bridge){
_bridge.sendEvent("trace", {data:_local3});
};
}
private static function sendWarning(_arg1:String, _arg2:String=null):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n[NewgroundsAPI WARNING] :: \tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(_arg1);
if (_bridge){
_bridge.sendEvent("trace", {data:_arg1});
};
}
private static function sendNotice(_arg1:String, _arg2:String=null):void{
var _local3:String;
if (_arg2){
_arg1 = (_arg1 + ((("\n[NewgroundsAPI NOTICE] :: \tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(_arg1);
if (_bridge){
_bridge.sendEvent("trace", {data:_arg1});
};
}
private static function fatalError(_arg1:String, _arg2:String):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n\tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(("***ERROR*** class=API\n\n" + _arg1));
}
public static function sendSecureCommand(_arg1:String, _arg2:Object, _arg3:Object=null, _arg4:Object=null, _arg5=null):void{
if (((((!(debugMode)) && (!(hasUserSession())))) && (!(hasUserEmail())))){
sendError({command_id:getCommandID(_arg1)}, new APIError("IDENTIFICATION_REQUIRED", (("You must be logged in or provide an e-mail address ( using NewgroundsAPI.setUserEmail(\"name@domain.com\"); ) to use " + _arg1) + "().")));
return;
};
if (!_arg1){
fatalError("Missing command", "sendSecureCommand");
};
if (!_arg2){
fatalError("Missing secure_params", "sendSecureCommand");
};
if (!_arg3){
_arg3 = new Object();
};
var _local6 = "";
var _local7:uint;
while (_local7 < 16) {
_local6 = (_local6 + compression_radix.charAt(Math.floor((Math.random() * compression_radix.length))));
_local7++;
};
if (((debugMode) && (!(session_id)))){
_arg2.session_id = "";
} else {
_arg2.session_id = session_id;
};
_arg2.as_version = 3;
_arg2.user_email = user_email;
_arg2.publisher_id = publisher_id;
_arg2.seed = _local6;
_arg2.command_id = getCommandID(_arg1);
var _local8:String = MD5.hash(_local6);
var _local9:String = RC4.encrypt(JSON.encode(_arg2), _encryptionKey);
var _local10:String = (_local8 + _local9);
_arg3.secure = compressHex(_local10);
secureCommand = _arg1;
sendCommand("securePacket", _arg3, false, _arg4, _arg5);
}
public static function stopPendingCommands():void{
SmartURLLoader.closeAll();
}
private static function onCommandComplete(_arg1:Event):void{
var response:Object;
var error:APIError;
var e = _arg1;
var loader:SmartURLLoader = SmartURLLoader(e.target);
echo((("INPUT: \n" + loader.response) + "\n"));
var i:uint;
while (i < _preloadAssets.length) {
if (_preloadAssets[i] == loader){
_preloadAssets.splice(i, 1);
break;
};
i = (i + 1);
};
try {
response = JSON.decode(loader.response);
} catch(error:Error) {
};
if (!response){
response = {command_id:loader._command, success:false};
};
response.owner = loader.owner;
if (((!(response)) || (!(response.success)))){
if (response.command_id == "connectMovie"){
connected = false;
};
error = new APIError(response.error_code, response.error_msg);
sendError(response, error);
if (response.command_id){
doEvent(response);
};
} else {
doEvent(response);
};
}
private static function onCommandError(_arg1:Event):void{
var _local2:Object = {success:false};
var _local3:SmartURLLoader = SmartURLLoader(_arg1.target);
_local2.owner = _local3.owner;
var _local4:uint;
while (_local4 < _preloadAssets.length) {
if (_preloadAssets[_local4] == _local3){
_preloadAssets.splice(_local4, 1);
break;
};
_local4++;
};
if (_local3._command){
_local2.command_id = _local3._command;
if (_local2.command_id == "connectMovie"){
connected = false;
};
doEvent(_local2);
};
}
private static function sendCommand(_arg1:String, _arg2:Object, _arg3:Boolean=false, _arg4:Object=null, _arg5=null):void{
var _local7:String;
var _local8:String;
var _local9:String;
if (((!(connected)) && (!((_arg1 == "connectMovie"))))){
_local7 = (("NewgroundsAPI." + _arg1) + "() - NewgroundsAPI.connectMovie() must be called before this command can be called\n");
fatalError(_local7, "connectMovie");
};
var _local6:SmartURLLoader = new SmartURLLoader();
_local6.addVariable("command_id", getCommandID(_arg1));
_local6.addVariable("tracker_id", _movieId);
if (debugMode){
_local6.addVariable("debug", 1);
};
if (_arg2){
for (_local8 in _arg2) {
_local6.addVariable(_local8, _arg2[_local8]);
};
};
if (_arg4){
for (_local9 in _arg4) {
_local6.addFile(_local9, _arg4[_local9], _local9);
};
};
if (_arg3){
_local6.method = URLRequestMethod.GET;
} else {
_local6.method = URLRequestMethod.POST;
};
_local6.preventCache = true;
if (_arg3){
_local6.openBrowser = true;
_local6.method = URLRequestMethod.GET;
} else {
_local6.addEventListener(Event.COMPLETE, onCommandComplete);
_local6.addEventListener(IOErrorEvent.IO_ERROR, onCommandError);
_local6.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onCommandError);
_local6.method = URLRequestMethod.POST;
};
if (_arg2.secure){
_local6._command = secureCommand;
} else {
_local6._command = getCommandID(_arg1);
};
_local6.owner = _arg5;
_local6.load(GATEWAY_URL);
}
public static function isFlashVersion(_arg1:uint, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0):Boolean{
var _local6:Array = Capabilities.version.split(" ")[1].split(",");
var _local7:Array = arguments;
var _local8:uint;
while (_local8 < _local7.length) {
_local6[_local8] = uint(_local6[_local8]);
_local8++;
};
_local8 = 0;
while (_local8 < _local7.length) {
if (_local6[_local8] > _local7[_local8]){
return (true);
};
if (_local6[_local8] < _local7[_local8]){
return (false);
};
_local8++;
};
return (true);
}
public static function createAd():FlashAd{
sendMessage("You may see a security sandbox violation. This is normal!");
return (new FlashAd());
}
public static function sendMessage(_arg1:String, _arg2:Boolean=false):void{
var _local3:String = ("[NewgroundsAPI] :: " + _arg1);
trace(_local3);
if (_bridge){
_bridge.sendEvent("trace", {data:_local3});
};
}
private static function echo(_arg1:String):void{
if (do_echo){
trace(_arg1);
};
}
}
}//package com.newgrounds
Section 16
//APIError (com.newgrounds.APIError)
package com.newgrounds {
import flash.utils.*;
public class APIError {
public var code:Number;// = 0
public var message:String;
public var name:String;
public var alias:String;
public static const aliases:Array = new Array("UNKNOWN_ERROR", "INVALID_API_ID", "MISSING_PARAM", "INVALID_STAT_ID", "INVALID_COMMAND_ID", "FLASH_ADS_NOT_APPROVED", "PERMISSION_DENIED", "IDENTIFICATION_REQUIRED", "INVALID_EMAIL_ADDRESS", "BANNED_USER", "SESSION_EXPIRED", "INVALID_SCORE", "INVALID_MEDAL", "INVALID_FOLDER", "FILE_NOT_FOUND", "SITE_ID_REQUIRED", "UPLOAD_IN_PROGRESS", "USER_CANCELLED", "CONFIRM_REQUEST", "CONNECTION_FAILED");
private static const always_caps:Array = new Array("API", "URL", "ID");
public static const error_codes:Object = init_codes();
public static const error_names:Object = init_names();
public function APIError(_arg1, _arg2:String){
if ((_arg1 is String)){
_arg1 = error_codes[_arg1];
} else {
if (!(_arg1 is uint)){
_arg1 = 0;
};
};
this.code = _arg1;
this.message = _arg2;
this.name = error_names[_arg1];
this.alias = aliases[_arg1];
}
public function isError():Boolean{
return (true);
}
public static function init_codes():Dictionary{
var _local1:Dictionary = new Dictionary();
var _local2:uint;
while (_local2 < aliases.length) {
_local1[aliases[_local2]] = _local2;
_local2++;
};
return (_local1);
}
private static function init_names():Array{
var _local3:Array;
var _local4:uint;
var _local5:String;
var _local1:Array = new Array();
var _local2:uint;
while (_local2 < aliases.length) {
_local3 = aliases[_local2].toLowerCase().split("_");
_local4 = 0;
while (_local4 < _local3.length) {
_local3[_local4] = (_local3[_local4].substr(0, 1).toUpperCase() + _local3[_local4].substr(1, _local3[_local4].length));
for each (_local5 in always_caps) {
if (_local3[_local4].toUpperCase() == _local5){
_local3[_local4] = _local3[_local4].toUpperCase();
};
};
_local4++;
};
_local1[_local2] = _local3.join(" ");
_local2++;
};
return (_local1);
}
}
}//package com.newgrounds
Section 17
//APIEvent (com.newgrounds.APIEvent)
package com.newgrounds {
import flash.events.*;
public class APIEvent extends Event {
private var _data;
private var _success:Boolean;
private var _target;
private var _error:APIError;
public static const API_CONNECTED:String = "movieConnected";
public static const ADS_APPROVED:String = "adsApproved";
public static const AD_ATTACHED:String = "adAttached";
public static const HOST_BLOCKED:String = "hostBlocked";
public static const NEW_VERSION_AVAILABLE:String = "newVersionAvailable";
public static const EVENT_LOGGED:String = "eventLogged";
public static const SCORE_POSTED:String = "scorePosted";
public static const SCORES_LOADED:String = "scoresLoaded";
public static const MEDAL_UNLOCKED:String = "medalUnlocked";
public static const MEDALS_LOADED:String = "medalsLoaded";
public static const METADATA_LOADED:String = "metadataLoaded";
public static const FILE_PRIVS_LOADED:String = "filePrivsLoaded";
public static const FILE_SAVED:String = "fileSaved";
public static const FILE_LOADED:String = "fileLoaded";
public static const FILE_INITIALIZED:String = "fileInitialized";
public static const FILE_REQUESTED:String = "fileRequested";
public static const QUERY_COMPLETE:String = "queryComplete";
public static const VOTE_COMPLETE:String = "voteComplete";
public function APIEvent(_arg1:String, _arg2:Boolean=true, _arg3=undefined){
super(_arg1);
this._data = _arg3;
this._success = _arg2;
}
public function get success():Boolean{
return (this._success);
}
public function get data(){
return (this._data);
}
}
}//package com.newgrounds
Section 18
//BaseN (com.newgrounds.BaseN)
package com.newgrounds {
import flash.utils.*;
public class BaseN {
private var _hashIndex:String;
private var _hashVal:Dictionary;
private var _base:Number;
public function BaseN(_arg1:String=null){
if (_arg1){
this._hashIndex = _arg1;
} else {
this._hashIndex = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/";
};
this._base = this._hashIndex.length;
this._hashVal = new Dictionary();
var _local2:uint;
while (_local2 < this._base) {
this._hashVal[this._hashIndex.charAt(_local2)] = _local2;
_local2++;
};
}
public function encode(_arg1:Number, _arg2:uint=1):String{
var _local3:String = _arg1.toString();
var _local4 = "";
if (_local3.charAt(0) == "-"){
_local4 = "-";
_local3 = _local3.substring(1);
};
var _local5:Array = _local3.split(".", 2);
_local4 = (_local4 + this.baseNEncoder(_local5[0], _arg2));
if (_local5.length > 1){
_local4 = (_local4 + ("." + this.baseNEncoder(_local5[1])));
};
return (_local4);
}
public function decode(_arg1:String):Number{
var _local2 = "";
if (_arg1.charAt(0) == "-"){
_local2 = "-";
_arg1 = _arg1.substring(1);
};
var _local3:Array = _arg1.split(".", 2);
_local2 = (_local2 + this.baseNDecoder(_local3[0]));
if (_local3.length > 1){
_local2 = (_local2 + ".");
_local2 = (_local2 + this.baseNDecoder(_local3[1]));
};
return (Number(_local2));
}
private function baseNEncoder(_arg1:uint, _arg2:uint=1):String{
var _local3 = "";
var _local4:uint = _arg1;
while (_local4 != 0) {
_local3 = (this._hashIndex.charAt((_local4 % this._base)) + _local3);
_local4 = (_local4 / this._base);
};
if (_arg2){
while (_local3.length < _arg2) {
_local3 = (this._hashIndex.charAt(0) + _local3);
};
};
return (_local3);
}
private function baseNDecoder(_arg1:String):uint{
var _local2:uint;
var _local3:uint;
while (_local3 < _arg1.length) {
_local2 = (_local2 * this._base);
_local2 = (_local2 + this._hashVal[_arg1.charAt(_local3)]);
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 19
//Bridge (com.newgrounds.Bridge)
package com.newgrounds {
import flash.events.*;
import flash.net.*;
public class Bridge {
private var _inConnection:LocalConnection;
private var _outConnection:LocalConnection;
private var _widgetId:String;
public function Bridge(_arg1:String){
this._widgetId = _arg1;
this._inConnection = new LocalConnection();
this._outConnection = new LocalConnection();
this._inConnection.client = this;
this._inConnection.connect(("rec_" + this._widgetId));
this._outConnection.addEventListener(StatusEvent.STATUS, this.onStatus);
}
public function sendCommand(_arg1:String, _arg2:Object):void{
if (this._outConnection){
this._outConnection.send(this._widgetId, "sendCommand", _arg1, this.scrubParameters(_arg2));
};
}
public function sendEvent(_arg1:String, _arg2:Object):void{
if (this._outConnection){
this._outConnection.send(this._widgetId, "sendEvent", _arg1, this.scrubParameters(_arg2));
};
}
public function receiveEvent(_arg1:String, _arg2:Object):void{
API.callListener(_arg1, _arg2.success, _arg2.data);
}
public function scrubParameters(_arg1:Object):Object{
var _local3:String;
var _local2:Object = new Object();
for (_local3 in _arg1) {
if ((((((((((_arg1[_local3] is String)) || ((_arg1[_local3] is Number)))) || ((_arg1[_local3] is uint)))) || ((_arg1[_local3] is int)))) || ((_arg1[_local3] is Boolean)))){
_local2[_local3] = _arg1[_local3];
};
};
return (_local2);
}
private function onStatus(_arg1:Event):void{
}
}
}//package com.newgrounds
Section 20
//Medal (com.newgrounds.Medal)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class Medal {
private var _id:uint;
private var _name:String;
private var _value:uint;
private var _difficultyId:uint;
private var _unlocked:Boolean;// = false
private var _iconUrl:URLRequest;
private var _iconLoader:Loader;
private var _icon:BitmapData;
private static const DEFAULT_ICON:BitmapData = new BitmapData(50, 50, false, 0);
private static const DIFFICULT_NAMES:Array = [null, "Easy", "Moderate", "Challenging", "Difficult", "Brutal"];
public function Medal(_arg1:uint, _arg2:String, _arg3:uint, _arg4:uint, _arg5:Boolean, _arg6:String){
var id = _arg1;
var name = _arg2;
var value = _arg3;
var difficulty = _arg4;
var unlocked = _arg5;
var iconUrl = _arg6;
this._icon = DEFAULT_ICON;
super();
this._id = id;
this._name = name;
this._value = value;
this._difficultyId = difficulty;
this._unlocked = unlocked;
if (iconUrl){
this._iconUrl = new URLRequest(iconUrl);
this._iconLoader = new Loader();
this._iconLoader.contentLoaderInfo.addEventListener(Event.INIT, this.onIconLoaderInit);
this._iconLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.onIconLoaderError);
this._iconLoader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onIconLoaderError);
this._iconLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.onIconLoaderComplete);
try {
this._iconLoader.load(this._iconUrl, new LoaderContext(true));
} catch(e:Error) {
onIconLoaderError(null);
};
};
}
public function get difficulty():String{
return (DIFFICULT_NAMES[this._difficultyId]);
}
public function get difficultyId():uint{
return (this._difficultyId);
}
public function get icon():BitmapData{
return (this._icon);
}
public function get id():uint{
return (this._id);
}
public function get name():String{
return (this._name);
}
public function get unlocked():Boolean{
return (this._unlocked);
}
public function set unlocked(_arg1:Boolean):void{
this._unlocked = _arg1;
}
public function get value():uint{
return (this._value);
}
public function get bytesLoaded():uint{
return ((this._iconLoader) ? this._iconLoader.contentLoaderInfo.bytesLoaded : 0);
}
public function get bytesTotal():uint{
return ((this._iconLoader) ? this._iconLoader.contentLoaderInfo.bytesTotal : 0);
}
private function onIconLoaderInit(_arg1:Event):void{
}
private function onIconLoaderError(_arg1:IOErrorEvent):void{
trace((((("[NewgroundsAPI WARNING] :: Failed to load medal icon for " + this.name) + " (") + this._iconUrl.url.split("/").pop()) + ")"));
this._iconLoader.unload();
this._iconLoader = null;
}
private function onIconLoaderComplete(_arg1:Event):void{
var _local2:Bitmap = (this._iconLoader.content as Bitmap);
this._icon = _local2.bitmapData;
this._iconLoader.unload();
this._iconLoader = null;
}
public function unlock():void{
if (!this._unlocked){
API.unlockMedal(this._name);
};
}
public function createIconBitmap():Bitmap{
return (new Bitmap(this.icon));
}
public function toString():String{
return (this._name);
}
public static function createFromObject(_arg1:Object):Medal{
return (new Medal(_arg1.medal_id, _arg1.medal_name, _arg1.medal_value, _arg1.medal_difficulty, _arg1.medal_unlocked, _arg1.medal_icon));
}
}
}//package com.newgrounds
Section 21
//RC4 (com.newgrounds.RC4)
package com.newgrounds {
public class RC4 {
private static var sbox:Array = new Array(0xFF);
private static var mykey:Array = new Array(0xFF);
public static function encrypt(_arg1:String, _arg2:String):String{
var _local3:Array = strToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (charsToHex(_local5));
}
public static function encryptbin(_arg1:String, _arg2:String):Array{
var _local3:Array = strToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (_local5);
}
public static function decrypt(_arg1:String, _arg2:String):String{
var _local3:Array = hexToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (charsToStr(_local5));
}
private static function initialize(_arg1:Array):void{
var _local3:uint;
var _local2:uint;
var _local4:uint = _arg1.length;
var _local5:uint;
while (_local5 <= 0xFF) {
mykey[_local5] = _arg1[(_local5 % _local4)];
sbox[_local5] = _local5;
_local5++;
};
_local5 = 0;
while (_local5 <= 0xFF) {
_local2 = (((_local2 + sbox[_local5]) + mykey[_local5]) % 0x0100);
_local3 = sbox[_local5];
sbox[_local5] = sbox[_local2];
sbox[_local2] = _local3;
_local5++;
};
}
private static function calculate(_arg1:Array, _arg2:Array):Array{
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local10:uint;
initialize(_arg2);
var _local3:uint;
var _local4:uint;
var _local5:Array = new Array();
var _local9:uint;
while (_local9 < _arg1.length) {
_local3 = ((_local3 + 1) % 0x0100);
_local4 = ((_local4 + sbox[_local3]) % 0x0100);
_local7 = sbox[_local3];
sbox[_local3] = sbox[_local4];
sbox[_local4] = _local7;
_local10 = ((sbox[_local3] + sbox[_local4]) % 0x0100);
_local6 = sbox[_local10];
_local8 = (_arg1[_local9] ^ _local6);
_local5.push(_local8);
_local9++;
};
return (_local5);
}
private static function charsToHex(_arg1:Array):String{
var _local2:String = new String("");
var _local3:Array = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local4:uint;
while (_local4 < _arg1.length) {
_local2 = (_local2 + (_local3[(_arg1[_local4] >> 4)] + _local3[(_arg1[_local4] & 15)]));
_local4++;
};
return (_local2);
}
private static function hexToChars(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:uint = ((_arg1.substr(0, 2))=="0x") ? 2 : 0;
while (_local3 < _arg1.length) {
_local2.push(parseInt(_arg1.substr(_local3, 2), 16));
_local3 = (_local3 + 2);
};
return (_local2);
}
private static function charsToStr(_arg1:Array):String{
var _local2:String = new String("");
var _local3:uint;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(_arg1[_local3]));
_local3++;
};
return (_local2);
}
private static function strToChars(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:uint;
while (_local3 < _arg1.length) {
_local2.push(_arg1.charCodeAt(_local3));
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 22
//SaveFile (com.newgrounds.SaveFile)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
public class SaveFile extends EventDispatcher {
private var _filename:String;
private var _id:uint;
private var _description:String;
private var _contents;
private var _loader:SmartURLLoader;
private var _group:SaveGroup;
private var _keys:Dictionary;
private var _ratings:Dictionary;
private var _fileUrl:String;
private var _thumbnail:BitmapData;
private var _thumbnailUrl:String;
private var _authorId:uint;
private var _authorName:String;
private var _contentSize:uint;
private var _status:uint;
public static const STATUS_PRIVATE = 1;
public static const STATUS_SHARED = 2;
public static const STATUS_UNAPPROVED = 3;
public static const STATUS_APPROVED = 4;
public function SaveFile(_arg1:SaveGroup){
this._keys = new Dictionary();
this._ratings = new Dictionary();
this._group = _arg1;
this._description = "";
}
public function get name():String{
return (this._filename);
}
public function set name(_arg1:String):void{
this._filename = _arg1;
}
public function get id():uint{
return (this._id);
}
public function set id(_arg1:uint):void{
this._id = _arg1;
}
public function get description():String{
return (this._description);
}
public function set description(_arg1:String):void{
this._description = _arg1;
}
public function get contents(){
return (this._contents);
}
public function set contents(_arg1):void{
this._contents = _arg1;
this._contentSize = 0;
}
public function get thumbnailUrl():String{
return (this._thumbnailUrl);
}
public function set thumbnailUrl(_arg1:String):void{
this._thumbnailUrl = _arg1;
}
public function get fileUrl():String{
return (this._fileUrl);
}
public function set fileUrl(_arg1:String):void{
this._fileUrl = _arg1;
}
public function get thumbnail():BitmapData{
return (this._thumbnail);
}
public function set thumbnail(_arg1:BitmapData):void{
if (this._thumbnail){
this._thumbnail.dispose();
};
this._thumbnail = _arg1.clone();
}
public function loadThumbnail():Loader{
var _local1:Loader = new Loader();
if (this._thumbnailUrl){
_local1.load(new URLRequest(this._thumbnailUrl));
};
return (_local1);
}
public function get bytesLoaded():uint{
return ((this._loader) ? this._loader.bytesLoaded : this._contentSize);
}
public function get bytesTotal():uint{
return (this._contentSize);
}
public function get status():uint{
return (this._status);
}
function setStatus(_arg1:uint):void{
this._status = _arg1;
}
public function get groupId():uint{
return (this._group.id);
}
public function get groupName():String{
return (this._group.name);
}
public function get groupType():uint{
return (this._group.type);
}
public function get authorName():String{
return (this._authorName);
}
public function set authorName(_arg1:String):void{
this._authorName = _arg1;
}
public function get authorId():uint{
return (this._authorId);
}
public function set authorId(_arg1:uint):void{
this._authorId = _arg1;
}
public function get shared():Boolean{
return (true);
}
function setFileSize(_arg1:uint):void{
this._contentSize = _arg1;
}
public function setKey(_arg1, _arg2):void{
var _local3:SaveKey;
if ((_arg1 is String)){
_local3 = this._group.getKeyByName(_arg1);
} else {
_local3 = this._group.getKeyById(_arg1);
};
if (_local3){
switch (_local3.type){
case SaveKey.TYPE_BOOLEAN:
this._keys[_local3] = {id:_local3.id, val:Boolean(int(_arg2))};
break;
case SaveKey.TYPE_FLOAT:
this._keys[_local3] = {id:_local3.id, val:Number(_arg2)};
break;
case SaveKey.TYPE_INTEGER:
this._keys[_local3] = {id:_local3.id, val:int(_arg2)};
break;
case SaveKey.TYPE_STRING:
default:
this._keys[_local3] = {id:_local3.id, val:_arg2.toString()};
break;
};
};
}
public function getKey(_arg1){
var _local2:SaveKey;
if ((_arg1 is String)){
_local2 = this._group.getKeyByName(_arg1);
} else {
_local2 = this._group.getKeyById(_arg1);
};
if (_local2){
return (this._keys[_local2]);
};
return (null);
}
public function setRating(_arg1, _arg2:Number, _arg3:Number):void{
var _local4:SaveRating;
if ((_arg1 is String)){
_local4 = this._group.getRatingByName(_arg1);
} else {
_local4 = this._group.getRatingById(_arg1);
};
if (_local4){
this._ratings[_local4] = {id:_local4.id, name:_local4.name, votes:_arg2, score:_arg3};
};
}
public function getRating(_arg1):Object{
var _local2:SaveRating;
if ((_arg1 is String)){
_local2 = this._group.getRatingByName(_arg1);
} else {
_local2 = this._group.getRatingById(_arg1);
};
if (_local2){
return (this._ratings[_local2]);
};
return (null);
}
public function sendRating(_arg1:String, _arg2:Number):void{
var _local3:SaveRating = this._group.getRatingByName(_arg1);
if (!_local3){
trace((("[NewgroundsAPISaveFile] " + _arg1) + " is not a recognized save file"));
return;
};
if ((((_arg2 < _local3.minValue)) || ((_arg2 > _local3.maxValue)))){
trace(((("[NewgroundsAPISaveFile] Vote must be between " + _local3.minValue) + " and ") + _local3.maxValue));
return;
};
_local3.voted = true;
API.rateSaveFile(this, _local3, _arg2);
}
override public function toString():String{
var _local2:Object;
var _local3:Object;
var _local1 = (((((("Save File " + this._filename) + " ID: ") + this._id) + "\n ") + this._description) + "\n");
for each (_local2 in this._keys) {
_local1 = (_local1 + ((((" " + this._group.getKeyById(_local2.id).name) + ": ") + _local2.val) + "\n"));
};
for each (_local3 in this._ratings) {
_local1 = (_local1 + ((((((" " + this._group.getRatingById(_local3.id).name) + "\n Score: ") + _local3.score) + " Votes: ") + _local3.votes) + "\n"));
};
return (_local1);
}
public function toObject():Object{
var _local2:Object;
var _local1:Object = {group:this.groupId, filename:this.name, description:this.description, shared:true};
_local1.keys = [];
for each (_local2 in this._keys) {
_local1.keys.push({id:_local2.id, value:_local2.val});
};
return (_local1);
}
public function save(_arg1:Boolean=false, _arg2:Boolean=false):void{
API.saveFile(this, _arg1, _arg2);
}
public function loadContents():void{
if (this._fileUrl){
this._loader = new SmartURLLoader();
this._loader.responseFormat = URLLoaderDataFormat.BINARY;
this._loader.addEventListener(Event.COMPLETE, this.onContentsLoaded);
this._loader.addEventListener(IOErrorEvent.IO_ERROR, this.onContentsError);
this._loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onContentsError);
this._loader.load(this._fileUrl);
};
}
private function onContentsError(_arg1:Event):void{
this._loader = null;
dispatchEvent(new APIEvent(APIEvent.FILE_LOADED, false));
}
private function onContentsLoaded(_arg1:Event):void{
var _local2:ByteArray = _arg1.target.response;
this._contentSize = _local2.length;
_local2.uncompress();
var _local3:uint = _local2.readUnsignedByte();
if (_local3 == 0){
this._contents = new ByteArray();
this._contents.writeBytes(_local2, 1);
} else {
this._contents = _local2.readObject();
};
this._loader = null;
dispatchEvent(new APIEvent(APIEvent.FILE_LOADED, true, this.contents));
}
public function loadAuthorPage(){
API.loadUserPage(this._authorId, this._authorName);
}
function fileSaved(_arg1:Object):void{
this._id = _arg1.save_id;
this._thumbnailUrl = _arg1.thumbnail;
this._fileUrl = _arg1.file_url;
}
}
}//package com.newgrounds
Section 23
//SaveGroup (com.newgrounds.SaveGroup)
package com.newgrounds {
public class SaveGroup {
private var _name:String;
private var _id:uint;
private var _type:uint;
private var _keys:Array;
private var _ratings:Array;
private var _files:Array;
public static const TYPE_SYSTEM:uint = 0;
public static const TYPE_PRIVATE:uint = 1;
public static const TYPE_PUBLIC:uint = 2;
public static const TYPE_MODERATED:uint = 3;
public function SaveGroup(_arg1:uint, _arg2:String, _arg3:uint){
this._name = _arg2;
this._id = _arg1;
this._type = _arg3;
this._ratings = [];
this._keys = [];
this._files = [];
}
public function get name():String{
return (this._name);
}
public function get id():uint{
return (this._id);
}
public function get type():uint{
return (this._type);
}
public function get keys():Array{
return (this._keys.concat());
}
public function get ratings():Array{
return (this._ratings.concat());
}
public function addRating(_arg1:SaveRating):void{
this._ratings.push(_arg1);
}
public function getRatingById(_arg1:uint):SaveRating{
var _local2:uint;
while (_local2 < this._ratings.length) {
if (this._ratings[_local2].id == _arg1){
return (this._ratings[_local2]);
};
_local2++;
};
return (null);
}
public function getRatingByName(_arg1:String):SaveRating{
var _local2:uint;
while (_local2 < this._ratings.length) {
if (this._ratings[_local2].name == _arg1){
return (this._ratings[_local2]);
};
_local2++;
};
return (null);
}
public function addKey(_arg1:SaveKey):void{
this._keys.push(_arg1);
}
public function getKeyById(_arg1:uint):SaveKey{
var _local2:uint;
while (_local2 < this._keys.length) {
if (this._keys[_local2].id == _arg1){
return (this._keys[_local2]);
};
_local2++;
};
return (null);
}
public function getKeyByName(_arg1:String):SaveKey{
var _local2:uint;
while (_local2 < this._keys.length) {
if (this._keys[_local2].name == _arg1){
return (this._keys[_local2]);
};
_local2++;
};
return (null);
}
public function createQuery():SaveGroupQuery{
return (new SaveGroupQuery(this));
}
public function toString():String{
return ((((((("SaveGroup { name: " + this._name) + ", id: ") + this._id) + ", keys: ") + this._keys) + "}"));
}
public static function createFromObject(_arg1:Object):SaveGroup{
var _local4:Object;
var _local5:Object;
var _local2:SaveGroup = new SaveGroup(_arg1.group_id, _arg1.group_name, _arg1.group_type);
var _local3:uint;
while (_local3 < _arg1.keys.length) {
_local4 = _arg1.keys[_local3];
_local2.addKey(new SaveKey(_local4.id, _local4.name, _local4.type));
_local3++;
};
_local3 = 0;
while (_local3 < _arg1.ratings.length) {
_local5 = _arg1.ratings[_local3];
_local2.addRating(new SaveRating(_local5.id, _local5.name, _local5.float, _local5.min, _local5.max));
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 24
//SaveGroupQuery (com.newgrounds.SaveGroupQuery)
package com.newgrounds {
import flash.events.*;
public class SaveGroupQuery extends EventDispatcher {
private var _group:SaveGroup;
private var _groupBy:Array;
private var _lookupKeys:Array;
private var _lookupRatings:Array;
private var _fileConditions:Array;
private var _keyConditions:Array;
private var _ratingConditions:Array;
private var _sortConditions:Array;
private var _page:uint;
private var _resultsPerPage:uint;
private var _randomizeResults:Boolean;
public static const TABLE_FILES:uint = 1;
public static const TABLE_KEYS:uint = 2;
public static const TABLE_RATINGS:uint = 3;
public static const FILE_ID:uint = 0;
public static const AUTHOR_ID:uint = 1;
public static const AUTHOR_NAME:uint = 2;
public static const FILE_NAME:uint = 3;
public static const CREATED_ON:uint = 4;
public static const UPDATED_ON:uint = 5;
public static const TOTAL_VIEWS:uint = 6;
public static const FILE_STATUS:uint = 7;
public static const SCORE:String = "score";
public static const TOTAL_VOTES:String = "votes";
public function SaveGroupQuery(_arg1:SaveGroup){
this._group = _arg1;
this.reset();
}
public function get group():SaveGroup{
return (this._group);
}
public function get groupId():uint{
return (this._group.id);
}
public function get resultsPerPage():uint{
return (this._resultsPerPage);
}
public function set resultsPerPage(_arg1:uint):void{
this._resultsPerPage = _arg1;
}
public function get page():uint{
return (this._page);
}
public function set page(_arg1:uint):void{
this._page = _arg1;
}
public function get isRandomized():Boolean{
return (this._randomizeResults);
}
public function set isRandomized(_arg1:Boolean):void{
this._randomizeResults = _arg1;
}
public function reset():void{
this._fileConditions = [];
this._keyConditions = [];
this._ratingConditions = [];
this._sortConditions = [];
this._groupBy = [];
this._lookupKeys = [];
this._lookupRatings = [];
this._randomizeResults = false;
this._resultsPerPage = 20;
this._page = 1;
}
public function includeKey(_arg1:String):void{
var _local2:SaveKey = this._group.getKeyByName(_arg1);
if (_local2){
this._lookupKeys.push(_local2.id);
};
}
public function includeRating(_arg1:String):void{
var _local2:SaveRating = this._group.getRatingByName(_arg1);
if (_local2){
this._lookupRatings.push(_local2.id);
};
}
public function excludeKey(_arg1:String):void{
var _local2:SaveKey = this._group.getKeyByName(_arg1);
var _local3:uint;
while (_local3 < this._lookupKeys.length) {
if (this._lookupKeys[_local3] == _local2.id){
this._lookupKeys.splice(_local3, 1);
return;
};
_local3++;
};
}
public function excludeRating(_arg1:String):void{
var _local2:SaveRating = this._group.getRatingByName(_arg1);
var _local3:uint;
while (_local3 < this._lookupRatings.length) {
if (this._lookupRatings[_local3] == _local2.id){
this._lookupRatings.splice(_local3, 1);
return;
};
_local3++;
};
}
public function groupBy(_arg1:uint):void{
this._groupBy.push({table:TABLE_FILES, field:_arg1});
}
public function groupByRating(_arg1:String):void{
var _local2:SaveRating = this._group.getRatingByName(_arg1);
if (!_local2){
return;
};
this._groupBy.push({table:TABLE_RATINGS, field:_local2.id});
}
public function groupByKey(_arg1:String):void{
var _local2:SaveKey = this._group.getKeyByName(_arg1);
if (!_local2){
return;
};
this._groupBy.push({table:TABLE_KEYS, field:_local2.id});
}
public function addFileCondition(_arg1:uint, _arg2:String, _arg3):void{
this._fileConditions.push({field:_arg1, operator:_arg2, value:_arg3});
}
public function addKeyCondition(_arg1:String, _arg2:String, _arg3):void{
var _local4:SaveKey = this._group.getKeyByName(_arg1);
if (!_local4){
return;
};
if (!this.checkValue(_arg3, _local4.type)){
return;
};
this._keyConditions.push({key_id:_local4.id, operator:_arg2, value:_arg3});
}
public function addRatingCondition(_arg1:String, _arg2:String, _arg3, _arg4:String="score"):void{
var _local5:SaveRating = this._group.getRatingByName(_arg1);
if (!_local5){
return;
};
this._ratingConditions.push({rating_id:_local5.id, operator:_arg2, value:_arg3, column:_arg4});
}
private function addSortCondition(_arg1:uint, _arg2:uint, _arg3:Boolean=false, _arg4=null):void{
var _local5:Object = {table:_arg1, field:_arg2, desc:_arg3};
if (_arg4){
_local5.extra = _arg4;
};
this._sortConditions.push(_local5);
}
public function sortOn(_arg1:uint, _arg2:Boolean=false):void{
this.addSortCondition(TABLE_FILES, _arg1, _arg2);
}
public function sortOnKey(_arg1:String, _arg2:Boolean=false):void{
this.addSortCondition(TABLE_KEYS, this._group.getKeyByName(_arg1).id, _arg2);
}
public function sortOnRating(_arg1:String, _arg2:Boolean=false, _arg3:String="score"):void{
this.addSortCondition(TABLE_RATINGS, this._group.getRatingByName(_arg1).id, _arg2, _arg3);
}
public function execute():void{
API.executeSaveQuery(this);
}
private function checkValue(_arg1, _arg2:uint):Boolean{
return (true);
}
override public function toString():String{
return ("");
}
public function toObject():Object{
var _local1:Object = {page:this._page, num_results:this._resultsPerPage};
if (this.isRandomized){
_local1.randomize = 1;
};
if (((this._fileConditions) && ((this._fileConditions.length > 0)))){
_local1.file_conditions = this._fileConditions;
};
if (((this._keyConditions) && ((this._keyConditions.length > 0)))){
_local1.key_conditions = this._keyConditions;
};
if (((this._ratingConditions) && ((this._ratingConditions.length > 0)))){
_local1.rating_conditions = this._ratingConditions;
};
if (((this._sortConditions) && ((this._sortConditions.length > 0)))){
_local1.sort_conditions = this._sortConditions;
};
if (((this._lookupKeys) && ((this._lookupKeys.length > 0)))){
_local1.lookup_keys = this._lookupKeys;
};
if (((this._lookupRatings) && ((this._lookupRatings.length > 0)))){
_local1.lookup_ratings = this._lookupRatings;
};
if (((this._groupBy) && ((this._groupBy.length > 0)))){
_local1.group_by = this._groupBy;
};
return (_local1);
}
}
}//package com.newgrounds
Section 25
//SaveKey (com.newgrounds.SaveKey)
package com.newgrounds {
public class SaveKey {
private var _id:uint;
private var _name:String;
private var _type:uint;
public static const TYPE_FLOAT:uint = 1;
public static const TYPE_INTEGER:uint = 2;
public static const TYPE_STRING:uint = 3;
public static const TYPE_BOOLEAN:uint = 4;
public function SaveKey(_arg1:uint, _arg2:String, _arg3:uint){
this._id = _arg1;
this._name = _arg2;
this._type = _arg3;
}
public function get id():uint{
return (this._id);
}
public function get name():String{
return (this._name);
}
public function get type():uint{
return (this._type);
}
public function isValueValid(_arg1):Boolean{
if (this._type == TYPE_INTEGER){
return ((((_arg1 is int)) || ((_arg1 is uint))));
};
if (this._type == TYPE_FLOAT){
return ((((((_arg1 is int)) || ((_arg1 is uint)))) || ((_arg1 is Number))));
};
if (this._type == TYPE_STRING){
return ((_arg1 is String));
};
if (this._type == TYPE_BOOLEAN){
return ((((((((_arg1 is Boolean)) || ((_arg1 === 0)))) || ((_arg1 === 1)))) || ((_arg1 == ""))));
};
return (false);
}
public function toString():String{
return (this._name);
}
}
}//package com.newgrounds
Section 26
//SaveRating (com.newgrounds.SaveRating)
package com.newgrounds {
public class SaveRating {
private var _id:uint;
private var _name:String;
private var _minValue:Number;
private var _maxValue:Number;
private var _isFloat:Boolean;
private var _voted:Boolean;
public function SaveRating(_arg1:uint, _arg2:String, _arg3:Boolean, _arg4:Number=-INF, _arg5:Number=INF){
this._id = _arg1;
this._name = _arg2;
this._isFloat = _arg3;
this._minValue = _arg4;
this._maxValue = _arg5;
}
public function get id():uint{
return (this._id);
}
public function get name():String{
return (this._name);
}
public function get minValue():Number{
return (this._minValue);
}
public function get maxValue():Number{
return (this._maxValue);
}
public function get isFloat():Boolean{
return (this._isFloat);
}
public function get voted():Boolean{
return (this._voted);
}
public function set voted(_arg1:Boolean):void{
this._voted = _arg1;
}
public function toString():String{
return (this._name);
}
}
}//package com.newgrounds
Section 27
//Score (com.newgrounds.Score)
package com.newgrounds {
public class Score {
private var _board:ScoreBoard;
private var _position:uint;
private var _username:String;
private var _value:String;
private var _numeric_value:uint;
private var _tag:String;
public function Score(_arg1:ScoreBoard, _arg2:Number, _arg3:String, _arg4:String, _arg5:uint, _arg6:String){
this._board = _arg1;
this._position = _arg2;
this._username = _arg3;
this._value = _arg4;
this._numeric_value = _arg5;
this._tag = _arg6;
}
public function get board():ScoreBoard{
return (this._board);
}
public function get position():uint{
return (this._position);
}
public function get username():String{
return (this._username);
}
public function get value():String{
return (this._value);
}
public function get numeric_value():uint{
return (this._numeric_value);
}
public function get tag():String{
return (this._tag);
}
}
}//package com.newgrounds
Section 28
//ScoreBoard (com.newgrounds.ScoreBoard)
package com.newgrounds {
import flash.events.*;
public class ScoreBoard extends EventDispatcher {
private var _name:String;
private var _id:uint;
private var _scores:Array;
private var _period:String;// = "Today"
private var _num_results:uint;// = 10
private var _numScores:uint;
private var _desiredNumResults:uint;
private var _startRank:uint;
private var _endRank:uint;
private var _page:uint;// = 1
private var _tag:String;
public function ScoreBoard(_arg1:uint, _arg2:String, _arg3:String){
this._name = _arg2;
this._id = _arg1;
this._scores = [];
this._tag = _arg3;
}
public function exists():Boolean{
return ((this._id > 0));
}
public function get id():Number{
return (this._id);
}
public function get name():String{
return (this._name);
}
public function get period():String{
return (this._period);
}
public function get page():uint{
return (this._page);
}
public function get num_results():uint{
return (this._num_results);
}
public function get scores():Array{
return (this._scores);
}
public function get tag():String{
return (this._tag);
}
public function get num_scores():uint{
return (this._numScores);
}
public function postScore(_arg1:uint):void{
API.postScore(this._name, _arg1);
}
public function loadScores(_arg1:String="Today", _arg2:uint=1, _arg3:uint=10):void{
this._period = _arg1;
if (((!(this._period)) || ((this._period == "")))){
this._period = ScoreBoardPeriod.TODAY;
};
this._page = _arg2;
this._num_results = _arg3;
this._desiredNumResults = 0;
API.loadScores(this);
}
public function loadScoresInRange(_arg1:String="Today", _arg2:uint=1, _arg3:uint=10):void{
if (_arg2 == 0){
_arg2 = 1;
};
if (_arg3 < _arg2){
_arg3 = _arg2;
};
this._period = _arg1;
if (((!(this._period)) || ((this._period == "")))){
this._period = ScoreBoardPeriod.TODAY;
};
this._desiredNumResults = ((_arg3 - _arg2) + 1);
this._num_results = this._desiredNumResults;
while (int(((_arg2 - 1) / this._num_results)) != int(((_arg3 - 1) / this._num_results))) {
this._num_results++;
};
this._page = ((_arg2 - 1) / this._num_results);
this._startRank = _arg2;
this._endRank = _arg3;
this._page++;
API.loadScores(this);
}
function setScores(_arg1:Array, _arg2:String, _arg3:Number, _arg4:Number, _arg5:uint):void{
var _local7:uint;
this._period = _arg2;
this._page = _arg3;
this._num_results = _arg4;
this._numScores = _arg5;
this._scores = [];
var _local6:uint;
while (_local6 < _arg1.length) {
_local7 = (((this._num_results * (this._page - 1)) + 1) + _local6);
if (((!(this._desiredNumResults)) || ((((_local7 >= this._startRank)) && ((_local7 <= this._endRank)))))){
this._scores.push(new Score(this, _local7, _arg1[_local6].username, _arg1[_local6].value, _arg1[_local6].numeric_value, _arg1[_local6].tag));
};
_local6++;
};
this._num_results = this._scores.length;
}
}
}//package com.newgrounds
Section 29
//ScoreBoardPeriod (com.newgrounds.ScoreBoardPeriod)
package com.newgrounds {
public class ScoreBoardPeriod {
public static const TODAY:String = "Today";
public static const WEEK:String = "This Week";
public static const MONTH:String = "This Month";
public static const YEAR:String = "This Year";
public static const ALL_TIME:String = "All-Time";
}
}//package com.newgrounds
Section 30
//SmartURLLoader (com.newgrounds.SmartURLLoader)
package com.newgrounds {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.errors.*;
public class SmartURLLoader extends EventDispatcher {
private var _variables:Dictionary;
private var _files:Dictionary;
private var _hasVariables:Boolean;
private var _method:String;// = "GET"
private var _urlRequest:URLRequest;
private var _urlLoader:URLLoader;
private var _dataFormat:String;// = "text"
private var _openBrowser:Boolean;// = false
private var _preventCache:Boolean;// = false
var _command:String;
public var owner;
private static const CRLF:String = "
";
private static var _loaders:Dictionary = new Dictionary();
public function SmartURLLoader(){
this._urlRequest = new URLRequest();
this._variables = new Dictionary();
}
public function get responseFormat():String{
return (this._dataFormat);
}
public function set responseFormat(_arg1:String):void{
this._dataFormat = _arg1;
}
public function get response(){
return (this._urlLoader.data);
}
public function get hasFiles():Boolean{
return (Boolean(this._files));
}
public function get method():String{
return (this._method);
}
public function set method(_arg1:String):void{
if (((this.hasFiles) && ((_arg1 == URLRequestMethod.GET)))){
throw (new IllegalOperationError("GET cannot be used to upload files."));
};
this._method = _arg1;
}
public function get openBrowser():Boolean{
return (this._openBrowser);
}
public function set openBrowser(_arg1:Boolean):void{
this._openBrowser = _arg1;
}
public function get preventCache():Boolean{
return (this._preventCache);
}
public function set preventCache(_arg1:Boolean):void{
this._preventCache = _arg1;
}
public function get bytesLoaded():uint{
return ((this._urlLoader) ? this._urlLoader.bytesLoaded : 0);
}
public function get bytesTotal():uint{
return ((this._urlLoader) ? this._urlLoader.bytesTotal : 0);
}
public function addVariable(_arg1:String, _arg2=""):void{
this._variables[_arg1] = _arg2;
if (_arg2){
this._hasVariables = true;
};
}
public function addFile(_arg1:String, _arg2:ByteArray, _arg3:String, _arg4:String="application/octet-stream"):void{
this.method = URLRequestMethod.POST;
if (!this._files){
this._files = new Dictionary();
};
this._files[_arg1] = new File(_arg1, _arg2, _arg3, _arg4);
}
public function clearVariables():void{
this._variables = new Dictionary();
}
public function clearFiles():void{
this._files = null;
}
public function load(_arg1:String):void{
var urlVariables:URLVariables;
var key:String;
var boundary:String;
var i:uint;
var event:SecurityErrorEvent;
var url = _arg1;
this._urlRequest.url = url;
if (this._preventCache){
url = (url + ("?seed=" + Math.random()));
if (this._hasVariables){
url = (url + "&");
};
};
this._urlRequest.method = this._method;
if ((((this._urlRequest.method == URLRequestMethod.GET)) || (!(this.hasFiles)))){
this._urlRequest.contentType = "application/x-www-form-urlencoded";
if (this._hasVariables){
urlVariables = new URLVariables();
for (key in this._variables) {
urlVariables[key] = this._variables[key];
};
this._urlRequest.data = urlVariables;
};
} else {
boundary = "";
i = 0;
while (i < 32) {
boundary = (boundary + String.fromCharCode(uint((97 + (Math.random() * 25)))));
i = (i + 1);
};
this._urlRequest.contentType = (("multipart/form-data; boundary=\"" + boundary) + "\"");
this._urlRequest.data = this.buildMultipartData(boundary);
};
if (this.openBrowser){
navigateToURL(this._urlRequest, "_blank");
} else {
this._urlLoader = new URLLoader();
this._urlLoader.dataFormat = this._dataFormat;
this._urlLoader.addEventListener(Event.COMPLETE, this.onComplete);
this._urlLoader.addEventListener(ProgressEvent.PROGRESS, this.onProgress);
this._urlLoader.addEventListener(IOErrorEvent.IO_ERROR, this.onIOError);
this._urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, this.onHTTPStatus);
this._urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onSecurityError);
_loaders[this._urlLoader] = this;
try {
this._urlLoader.load(this._urlRequest);
} catch(error:Error) {
event = new SecurityErrorEvent(SecurityErrorEvent.SECURITY_ERROR, false, false, error.message);
onSecurityError(event);
};
};
}
public function close():void{
try {
this._urlLoader.close();
} catch(e:Error) {
};
}
public function dispose():void{
this.close();
this._files = null;
this._variables = null;
if (this._urlLoader){
this._urlLoader.removeEventListener(Event.COMPLETE, this.onComplete);
this._urlLoader.removeEventListener(ProgressEvent.PROGRESS, this.onProgress);
this._urlLoader.removeEventListener(IOErrorEvent.IO_ERROR, this.onIOError);
this._urlLoader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, this.onHTTPStatus);
this._urlLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onSecurityError);
this._urlLoader = null;
};
this._urlRequest = null;
delete _loaders[this];
}
private function buildMultipartData(_arg1:String):ByteArray{
var _local3:String;
var _local4:File;
var _local2:ByteArray = new ByteArray();
_local2.endian = Endian.BIG_ENDIAN;
_arg1 = ("--" + _arg1);
for (_local3 in this._variables) {
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(((("Content-Disposition: form-data; name=\"" + _local3) + "\"") + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes((this._variables[_local3] + CRLF));
};
if (this.hasFiles){
for each (_local4 in this._files) {
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(("Content-Disposition: form-data; name=\"Filename\"" + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes((_local4.fileName + CRLF));
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(((((("Content-Disposition: form-data; name=\"" + _local4.dataField) + "\"; filename=\"") + _local4.fileName) + "\"") + CRLF));
_local2.writeUTFBytes((("Content-Type: " + _local4.contentType) + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeBytes(_local4.data);
_local2.writeUTFBytes(CRLF);
};
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(("Content-Disposition: form-data; name=\"Upload\"" + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes(("Submit Query" + CRLF));
};
_local2.writeUTFBytes((_arg1 + "--"));
_local2.position = 0;
_local2.position = 0;
return (_local2);
}
private function onComplete(_arg1:Event):void{
dispatchEvent(_arg1);
this.dispose();
}
private function onProgress(_arg1:ProgressEvent):void{
dispatchEvent(_arg1);
}
private function onIOError(_arg1:IOErrorEvent):void{
dispatchEvent(_arg1);
this.dispose();
}
private function onSecurityError(_arg1:SecurityErrorEvent):void{
dispatchEvent(_arg1);
this.dispose();
}
private function onHTTPStatus(_arg1:HTTPStatusEvent):void{
dispatchEvent(_arg1);
}
public static function closeAll():void{
var _local1:SmartURLLoader;
for each (_local1 in _loaders) {
if (_local1){
_local1.dispose();
};
};
_loaders = new Dictionary();
}
}
}//package com.newgrounds
import flash.utils.*;
class File {
private var fileName:String;
private var data:ByteArray;
private var dataField:String;
private var contentType:String;
private function File(_arg1:String, _arg2:ByteArray, _arg3:String="Filedata", _arg4:String="application/octet-stream"){
this.fileName = _arg1;
this.data = _arg2;
this.dataField = _arg3;
this.contentType = _arg4;
}
}
Section 31
//NewgroundsAPIAsset_API_Conencted_11 (PreloaderBar_fla.NewgroundsAPIAsset_API_Conencted_11)
package PreloaderBar_fla {
import flash.display.*;
import com.newgrounds.components.*;
public dynamic class NewgroundsAPIAsset_API_Conencted_11 extends MovieClip {
public function NewgroundsAPIAsset_API_Conencted_11(){
addFrameScript(36, this.frame37);
}
function frame37(){
APIConnector(parent).clear();
}
}
}//package PreloaderBar_fla
Section 32
//NewgroundsAPIAsset_ConnectingAPI_9 (PreloaderBar_fla.NewgroundsAPIAsset_ConnectingAPI_9)
package PreloaderBar_fla {
import flash.display.*;
public dynamic class NewgroundsAPIAsset_ConnectingAPI_9 extends MovieClip {
public function NewgroundsAPIAsset_ConnectingAPI_9(){
addFrameScript(9, this.frame10);
}
function frame10(){
stop();
}
}
}//package PreloaderBar_fla
Section 33
//NewgroundsAPIAsset_Connection_Error_14 (PreloaderBar_fla.NewgroundsAPIAsset_Connection_Error_14)
package PreloaderBar_fla {
import flash.display.*;
import com.newgrounds.components.*;
public dynamic class NewgroundsAPIAsset_Connection_Error_14 extends MovieClip {
public function NewgroundsAPIAsset_Connection_Error_14(){
addFrameScript(9, this.frame10, 20, this.frame21);
}
function frame10(){
stop();
}
function frame21(){
APIConnector(parent).clear();
}
}
}//package PreloaderBar_fla
Section 34
//NewgroundsAPIAsset_FlashAd_Container_41 (PreloaderBar_fla.NewgroundsAPIAsset_FlashAd_Container_41)
package PreloaderBar_fla {
import flash.events.*;
import flash.display.*;
import com.newgrounds.*;
public dynamic class NewgroundsAPIAsset_FlashAd_Container_41 extends MovieClip {
public var adMask:MovieClip;
public var ngLinkButton:SimpleButton;
public function NewgroundsAPIAsset_FlashAd_Container_41(){
addFrameScript(0, this.frame1, 10, this.frame11);
}
public function onNGLinkClicked(_arg1:MouseEvent):void{
API.loadNewgrounds();
}
function frame1(){
this.ngLinkButton.addEventListener(MouseEvent.CLICK, this.onNGLinkClicked);
}
function frame11(){
gotoAndPlay(1);
}
}
}//package PreloaderBar_fla
Section 35
//NewgroundsAPIAsset_Load_Indicator_10 (PreloaderBar_fla.NewgroundsAPIAsset_Load_Indicator_10)
package PreloaderBar_fla {
import flash.events.*;
import flash.display.*;
public dynamic class NewgroundsAPIAsset_Load_Indicator_10 extends MovieClip {
public function NewgroundsAPIAsset_Load_Indicator_10(){
addFrameScript(0, this.frame1);
}
public function onEnterFrame(_arg1:Event):void{
if (((visible) && (stage))){
rotation = (rotation + 30);
} else {
removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
};
}
function frame1(){
addEventListener(Event.ENTER_FRAME, this.onEnterFrame);
}
}
}//package PreloaderBar_fla
Section 36
//NewgroundsAPIAsset_Login_Warning_12 (PreloaderBar_fla.NewgroundsAPIAsset_Login_Warning_12)
package PreloaderBar_fla {
import flash.display.*;
import com.newgrounds.components.*;
public dynamic class NewgroundsAPIAsset_Login_Warning_12 extends MovieClip {
public function NewgroundsAPIAsset_Login_Warning_12(){
addFrameScript(9, this.frame10, 20, this.frame21);
}
function frame10(){
stop();
}
function frame21(){
APIConnector(parent).clear();
}
}
}//package PreloaderBar_fla
Section 37
//Timeline_5 (PreloaderBar_fla.Timeline_5)
package PreloaderBar_fla {
import flash.display.*;
public dynamic class Timeline_5 extends MovieClip {
public function Timeline_5(){
addFrameScript(39, this.frame40);
}
function frame40(){
stop();
}
}
}//package PreloaderBar_fla
Section 38
//axeswing_32 (source_fla.axeswing_32)
package source_fla {
import flash.display.*;
public dynamic class axeswing_32 extends MovieClip {
public function axeswing_32(){
addFrameScript(12, frame13);
}
function frame13(){
gotoAndPlay(6);
}
}
}//package source_fla
Section 39
//background1a_10 (source_fla.background1a_10)
package source_fla {
import flash.display.*;
public dynamic class background1a_10 extends MovieClip {
public function background1a_10(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
}
}//package source_fla
Section 40
//background1b_11 (source_fla.background1b_11)
package source_fla {
import flash.display.*;
public dynamic class background1b_11 extends MovieClip {
public function background1b_11(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
}
}//package source_fla
Section 41
//background3a_9 (source_fla.background3a_9)
package source_fla {
import flash.display.*;
public dynamic class background3a_9 extends MovieClip {
public function background3a_9(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
}
}//package source_fla
Section 42
//batswing_30 (source_fla.batswing_30)
package source_fla {
import flash.display.*;
public dynamic class batswing_30 extends MovieClip {
public function batswing_30(){
addFrameScript(15, frame16);
}
function frame16(){
gotoAndPlay(6);
}
}
}//package source_fla
Section 43
//BIGCOMBO_55 (source_fla.BIGCOMBO_55)
package source_fla {
import flash.display.*;
public dynamic class BIGCOMBO_55 extends MovieClip {
public function BIGCOMBO_55(){
addFrameScript(0, frame1, 34, frame35);
}
function frame1(){
stop();
}
function frame35(){
gotoAndStop(1);
}
}
}//package source_fla
Section 44
//blockadedestroy_71 (source_fla.blockadedestroy_71)
package source_fla {
import flash.display.*;
public dynamic class blockadedestroy_71 extends MovieClip {
public function blockadedestroy_71(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package source_fla
Section 45
//blood_85 (source_fla.blood_85)
package source_fla {
import flash.display.*;
public dynamic class blood_85 extends MovieClip {
public function blood_85(){
addFrameScript(0, frame1);
}
function frame1(){
play();
}
}
}//package source_fla
Section 46
//boss1die_182 (source_fla.boss1die_182)
package source_fla {
import flash.display.*;
public dynamic class boss1die_182 extends MovieClip {
public function boss1die_182(){
addFrameScript(65, frame66);
}
function frame66(){
stop();
}
}
}//package source_fla
Section 47
//boss2die_186 (source_fla.boss2die_186)
package source_fla {
import flash.display.*;
public dynamic class boss2die_186 extends MovieClip {
public function boss2die_186(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package source_fla
Section 48
//boss3die_190 (source_fla.boss3die_190)
package source_fla {
import flash.display.*;
public dynamic class boss3die_190 extends MovieClip {
public function boss3die_190(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package source_fla
Section 49
//boss4die_208 (source_fla.boss4die_208)
package source_fla {
import flash.display.*;
public dynamic class boss4die_208 extends MovieClip {
public function boss4die_208(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package source_fla
Section 50
//boss6die_196 (source_fla.boss6die_196)
package source_fla {
import flash.display.*;
public dynamic class boss6die_196 extends MovieClip {
public function boss6die_196(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package source_fla
Section 51
//boss7headexplode_63 (source_fla.boss7headexplode_63)
package source_fla {
import flash.display.*;
public dynamic class boss7headexplode_63 extends MovieClip {
public function boss7headexplode_63(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package source_fla
Section 52
//boss7shotload_204 (source_fla.boss7shotload_204)
package source_fla {
import flash.display.*;
public dynamic class boss7shotload_204 extends MovieClip {
public function boss7shotload_204(){
addFrameScript(36, frame37);
}
function frame37(){
gotoAndPlay(25);
}
}
}//package source_fla
Section 53
//bossexplode_202 (source_fla.bossexplode_202)
package source_fla {
import flash.display.*;
public dynamic class bossexplode_202 extends MovieClip {
public function bossexplode_202(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package source_fla
Section 54
//chainsawattack_26 (source_fla.chainsawattack_26)
package source_fla {
import flash.display.*;
public dynamic class chainsawattack_26 extends MovieClip {
public function chainsawattack_26(){
addFrameScript(9, frame10);
}
function frame10(){
gotoAndPlay(2);
}
}
}//package source_fla
Section 55
//copdecap_170 (source_fla.copdecap_170)
package source_fla {
import flash.display.*;
public dynamic class copdecap_170 extends MovieClip {
public function copdecap_170(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package source_fla
Section 56
//copdie_166 (source_fla.copdie_166)
package source_fla {
import flash.display.*;
public dynamic class copdie_166 extends MovieClip {
public function copdie_166(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 57
//copheadshot_169 (source_fla.copheadshot_169)
package source_fla {
import flash.display.*;
public dynamic class copheadshot_169 extends MovieClip {
public function copheadshot_169(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 58
//copsawed_168 (source_fla.copsawed_168)
package source_fla {
import flash.display.*;
public dynamic class copsawed_168 extends MovieClip {
public function copsawed_168(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 59
//enemy10decap_121 (source_fla.enemy10decap_121)
package source_fla {
import flash.display.*;
public dynamic class enemy10decap_121 extends MovieClip {
public function enemy10decap_121(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package source_fla
Section 60
//enemy10die_117 (source_fla.enemy10die_117)
package source_fla {
import flash.display.*;
public dynamic class enemy10die_117 extends MovieClip {
public function enemy10die_117(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 61
//enemy10headshot_120 (source_fla.enemy10headshot_120)
package source_fla {
import flash.display.*;
public dynamic class enemy10headshot_120 extends MovieClip {
public function enemy10headshot_120(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 62
//enemy10sawed_119 (source_fla.enemy10sawed_119)
package source_fla {
import flash.display.*;
public dynamic class enemy10sawed_119 extends MovieClip {
public function enemy10sawed_119(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 63
//enemy2decap_156 (source_fla.enemy2decap_156)
package source_fla {
import flash.display.*;
public dynamic class enemy2decap_156 extends MovieClip {
public function enemy2decap_156(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package source_fla
Section 64
//enemy2die_152 (source_fla.enemy2die_152)
package source_fla {
import flash.display.*;
public dynamic class enemy2die_152 extends MovieClip {
public function enemy2die_152(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 65
//enemy2headshot_155 (source_fla.enemy2headshot_155)
package source_fla {
import flash.display.*;
public dynamic class enemy2headshot_155 extends MovieClip {
public function enemy2headshot_155(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 66
//enemy2sawed_154 (source_fla.enemy2sawed_154)
package source_fla {
import flash.display.*;
public dynamic class enemy2sawed_154 extends MovieClip {
public function enemy2sawed_154(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 67
//enemy3decap_142 (source_fla.enemy3decap_142)
package source_fla {
import flash.display.*;
public dynamic class enemy3decap_142 extends MovieClip {
public function enemy3decap_142(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package source_fla
Section 68
//enemy3die_138 (source_fla.enemy3die_138)
package source_fla {
import flash.display.*;
public dynamic class enemy3die_138 extends MovieClip {
public function enemy3die_138(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 69
//enemy3headshot_141 (source_fla.enemy3headshot_141)
package source_fla {
import flash.display.*;
public dynamic class enemy3headshot_141 extends MovieClip {
public function enemy3headshot_141(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 70
//enemy3sawed_140 (source_fla.enemy3sawed_140)
package source_fla {
import flash.display.*;
public dynamic class enemy3sawed_140 extends MovieClip {
public function enemy3sawed_140(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 71
//enemy4decap_100 (source_fla.enemy4decap_100)
package source_fla {
import flash.display.*;
public dynamic class enemy4decap_100 extends MovieClip {
public function enemy4decap_100(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package source_fla
Section 72
//enemy4die_96 (source_fla.enemy4die_96)
package source_fla {
import flash.display.*;
public dynamic class enemy4die_96 extends MovieClip {
public function enemy4die_96(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package source_fla
Section 73
//enemy4headshot_99 (source_fla.enemy4headshot_99)
package source_fla {
import flash.display.*;
public dynamic class enemy4headshot_99 extends MovieClip {
public function enemy4headshot_99(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 74
//enemy4sawed_98 (source_fla.enemy4sawed_98)
package source_fla {
import flash.display.*;
public dynamic class enemy4sawed_98 extends MovieClip {
public function enemy4sawed_98(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 75
//enemy5decap_149 (source_fla.enemy5decap_149)
package source_fla {
import flash.display.*;
public dynamic class enemy5decap_149 extends MovieClip {
public function enemy5decap_149(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package source_fla
Section 76
//enemy5die_145 (source_fla.enemy5die_145)
package source_fla {
import flash.display.*;
public dynamic class enemy5die_145 extends MovieClip {
public function enemy5die_145(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 77
//enemy5headshot_148 (source_fla.enemy5headshot_148)
package source_fla {
import flash.display.*;
public dynamic class enemy5headshot_148 extends MovieClip {
public function enemy5headshot_148(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 78
//enemy5sawed_147 (source_fla.enemy5sawed_147)
package source_fla {
import flash.display.*;
public dynamic class enemy5sawed_147 extends MovieClip {
public function enemy5sawed_147(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 79
//enemy6decap_135 (source_fla.enemy6decap_135)
package source_fla {
import flash.display.*;
public dynamic class enemy6decap_135 extends MovieClip {
public function enemy6decap_135(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package source_fla
Section 80
//enemy6die_131 (source_fla.enemy6die_131)
package source_fla {
import flash.display.*;
public dynamic class enemy6die_131 extends MovieClip {
public function enemy6die_131(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 81
//enemy6headshot_134 (source_fla.enemy6headshot_134)
package source_fla {
import flash.display.*;
public dynamic class enemy6headshot_134 extends MovieClip {
public function enemy6headshot_134(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 82
//enemy6sawed_133 (source_fla.enemy6sawed_133)
package source_fla {
import flash.display.*;
public dynamic class enemy6sawed_133 extends MovieClip {
public function enemy6sawed_133(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 83
//enemy7decap_114 (source_fla.enemy7decap_114)
package source_fla {
import flash.display.*;
public dynamic class enemy7decap_114 extends MovieClip {
public function enemy7decap_114(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package source_fla
Section 84
//enemy7die_103 (source_fla.enemy7die_103)
package source_fla {
import flash.display.*;
public dynamic class enemy7die_103 extends MovieClip {
public function enemy7die_103(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 85
//enemy7headshot_106 (source_fla.enemy7headshot_106)
package source_fla {
import flash.display.*;
public dynamic class enemy7headshot_106 extends MovieClip {
public function enemy7headshot_106(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 86
//enemy7sawed_105 (source_fla.enemy7sawed_105)
package source_fla {
import flash.display.*;
public dynamic class enemy7sawed_105 extends MovieClip {
public function enemy7sawed_105(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 87
//enemy8decap_128 (source_fla.enemy8decap_128)
package source_fla {
import flash.display.*;
public dynamic class enemy8decap_128 extends MovieClip {
public function enemy8decap_128(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package source_fla
Section 88
//enemy8die_124 (source_fla.enemy8die_124)
package source_fla {
import flash.display.*;
public dynamic class enemy8die_124 extends MovieClip {
public function enemy8die_124(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 89
//enemy8headshot_127 (source_fla.enemy8headshot_127)
package source_fla {
import flash.display.*;
public dynamic class enemy8headshot_127 extends MovieClip {
public function enemy8headshot_127(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 90
//enemy8sawed_126 (source_fla.enemy8sawed_126)
package source_fla {
import flash.display.*;
public dynamic class enemy8sawed_126 extends MovieClip {
public function enemy8sawed_126(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 91
//enemy9decap_107 (source_fla.enemy9decap_107)
package source_fla {
import flash.display.*;
public dynamic class enemy9decap_107 extends MovieClip {
public function enemy9decap_107(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package source_fla
Section 92
//enemy9die_110 (source_fla.enemy9die_110)
package source_fla {
import flash.display.*;
public dynamic class enemy9die_110 extends MovieClip {
public function enemy9die_110(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 93
//enemy9headshot_113 (source_fla.enemy9headshot_113)
package source_fla {
import flash.display.*;
public dynamic class enemy9headshot_113 extends MovieClip {
public function enemy9headshot_113(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 94
//enemy9sawed_112 (source_fla.enemy9sawed_112)
package source_fla {
import flash.display.*;
public dynamic class enemy9sawed_112 extends MovieClip {
public function enemy9sawed_112(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 95
//enemyburnt_92 (source_fla.enemyburnt_92)
package source_fla {
import flash.display.*;
public dynamic class enemyburnt_92 extends MovieClip {
public function enemyburnt_92(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package source_fla
Section 96
//enemydecap_90 (source_fla.enemydecap_90)
package source_fla {
import flash.display.*;
public dynamic class enemydecap_90 extends MovieClip {
public function enemydecap_90(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package source_fla
Section 97
//enemydie_86 (source_fla.enemydie_86)
package source_fla {
import flash.display.*;
public dynamic class enemydie_86 extends MovieClip {
public function enemydie_86(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 98
//enemydisint_93 (source_fla.enemydisint_93)
package source_fla {
import flash.display.*;
public dynamic class enemydisint_93 extends MovieClip {
public function enemydisint_93(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package source_fla
Section 99
//enemyexplode_159 (source_fla.enemyexplode_159)
package source_fla {
import flash.display.*;
public dynamic class enemyexplode_159 extends MovieClip {
public function enemyexplode_159(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package source_fla
Section 100
//enemyheadshot_89 (source_fla.enemyheadshot_89)
package source_fla {
import flash.display.*;
public dynamic class enemyheadshot_89 extends MovieClip {
public function enemyheadshot_89(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 101
//enemysawed_88 (source_fla.enemysawed_88)
package source_fla {
import flash.display.*;
public dynamic class enemysawed_88 extends MovieClip {
public function enemysawed_88(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 102
//foreground2a_12 (source_fla.foreground2a_12)
package source_fla {
import flash.display.*;
public dynamic class foreground2a_12 extends MovieClip {
public function foreground2a_12(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
}
}//package source_fla
Section 103
//foreground2b_13 (source_fla.foreground2b_13)
package source_fla {
import flash.display.*;
public dynamic class foreground2b_13 extends MovieClip {
public function foreground2b_13(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
}
}//package source_fla
Section 104
//GETMULTI_57 (source_fla.GETMULTI_57)
package source_fla {
import flash.display.*;
public dynamic class GETMULTI_57 extends MovieClip {
public function GETMULTI_57(){
addFrameScript(0, frame1, 34, frame35);
}
function frame1(){
stop();
}
function frame35(){
gotoAndStop(1);
}
}
}//package source_fla
Section 105
//mainexplode_18 (source_fla.mainexplode_18)
package source_fla {
import flash.display.*;
public dynamic class mainexplode_18 extends MovieClip {
public function mainexplode_18(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package source_fla
Section 106
//mainflameattack_34 (source_fla.mainflameattack_34)
package source_fla {
import flash.display.*;
public dynamic class mainflameattack_34 extends MovieClip {
public function mainflameattack_34(){
addFrameScript(8, frame9);
}
function frame9(){
gotoAndPlay(3);
}
}
}//package source_fla
Section 107
//mainrailgunshoot_36 (source_fla.mainrailgunshoot_36)
package source_fla {
import flash.display.*;
public dynamic class mainrailgunshoot_36 extends MovieClip {
public function mainrailgunshoot_36(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package source_fla
Section 108
//mainreload_24 (source_fla.mainreload_24)
package source_fla {
import flash.display.*;
public dynamic class mainreload_24 extends MovieClip {
public function mainreload_24(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 109
//mainshotgun_23 (source_fla.mainshotgun_23)
package source_fla {
import flash.display.*;
public dynamic class mainshotgun_23 extends MovieClip {
public function mainshotgun_23(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package source_fla
Section 110
//MainTimeline (source_fla.MainTimeline)
package source_fla {
import flash.events.*;
import flash.display.*;
import com.newgrounds.components.*;
import flash.utils.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var run_time:Number;
public var background1b:MovieClip;
public var meleeswing:Sound;
public var background1a:MovieClip;
public var mainSpeed:int;
public var sfxSoundChannel:SoundChannel;
public var background2a:MovieClip;
public var background2b:MovieClip;
public var puke:Sound;
public var comboCount:Number;
public var weapon:int;
public var mySnd:Sound;
public var M16Equip:Boolean;
public var progress:Number;
public var rDown:Boolean;
public var background3a:MovieClip;
public var Lock2:MovieClip;
public var Lock3:MovieClip;
public var Lock4:MovieClip;
public var Lock5:MovieClip;
public var Lock6:MovieClip;
public var Lock7:MovieClip;
public var comboTimer:Number;
public var stopchar:Boolean;
public var __setPropDict:Dictionary;
public var currentprog:Number;
public var downDown:Boolean;
public var charhurt:Boolean;
public var __id0_:APIConnector;
public var railgun:Number;
public var mcMain:MovieClip;
public var shootAllow:Boolean;
public var enemyTime:Number;
public var Quit:Boolean;
public var itemLimit:int;
public var laserwarmup:Sound;
public var barrierhit:Sound;
public var splatContainer:MovieClip;
public var itemTime:int;
public var batting:Boolean;
public var score:int;
public var enemyLife:Number;
public var LevelSelect1:SimpleButton;
public var LevelSelect2:SimpleButton;
public var LevelSelect3:SimpleButton;
public var LevelSelect4:SimpleButton;
public var LevelSelect5:SimpleButton;
public var LevelSelect6:SimpleButton;
public var LevelSelect7:SimpleButton;
public var startclip:int;
public var zomfxSoundChannel:SoundChannel;
public var foregroundTime:int;
public var pussound:Sound;
public var chainbloodflag:Boolean;
public var spaceDown:Boolean;
public var blockadeappear:Boolean;
public var laser:Sound;
public var ammo:int;
public var RunBackSign:MovieClip;
public var foreground1a:mcmaintorso;
public var levelComplete:Boolean;
public var newBlockade:MovieClip;
public var rightDown:Boolean;
public var cashregister:Sound;
public var shot:Boolean;
public var life:Number;
public var shelltime:Number;
public var difcurve:Number;
public var item:int;
public var axechop:Sound;
public var instructionsbutton:SimpleButton;
public var cLimit:int;
public var enemyLimit:int;
public var currentscreen:int;
public var exitlevel:Boolean;
public var totalpoints:int;
public var CloseButton:SimpleButton;
public var shotgunreload:Sound;
public var M16:Number;
public var multi:int;
public var bossappear:Boolean;
public var showsplat:Boolean;
public var txtCurrentHighscore:TextField;
public var leftDown:Boolean;
public var totalchildren:Number;
public var Paused:Boolean;
public var clip:int;
public var enemyDestroy:Boolean;
public var bullethit:Sound;
public var pickupammo:Sound;
public var bathit:Sound;
public var splatno:Number;
public var playbutton:SimpleButton;
public var mySndCh:SoundChannel;
public var shield:Number;
public var totalChildren:Number;
public var melee:int;
public var shotshell:Boolean;
public var shotsquelch:Sound;
public var flamethrower:Number;
public var level:Number;
public var chainsawEquip:Boolean;
public var railshot:Sound;
public var chainsaw:Number;
public var rail:Boolean;
public var flamethrow:Sound;
public var machinegun:Sound;
public var enterDown:Boolean;
public var barrierbreak:Sound;
public var sawsquelch:Sound;
public var shotgunblast:Sound;
public var escDown:Boolean;
public var faceRight:Boolean;
public var mySharedObject:SharedObject;
public var upDown:Boolean;
public var cTime:int;
public var hurtchar:Sound;
public var gameOver:Boolean;
public var chainsawattack:Sound;
public var shotsquelch2:Sound;
public var chainsawmotor:Sound;
public var RunBack:Boolean;
public var newFadeIn1;
public var childLimit:Number;
public function MainTimeline(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 63, frame64, 79, frame80, 199, frame200, 0, frame1);
}
public function InstructionFunction(_arg1:MouseEvent):void{
gotoAndPlay(1, "Instructions");
}
function frame4(){
stop();
currentscreen = 3;
if (mySharedObject.data.levelProgress == null){
mySharedObject.data.levelProgress = 0;
};
level = 1;
Lock2.visible = true;
Lock3.visible = true;
Lock4.visible = true;
Lock5.visible = true;
Lock6.visible = true;
Lock7.visible = true;
if (mySharedObject.data.levelProgress >= 2){
Lock2.visible = false;
};
if (mySharedObject.data.levelProgress >= 3){
Lock3.visible = false;
};
if (mySharedObject.data.levelProgress >= 4){
Lock4.visible = false;
};
if (mySharedObject.data.levelProgress >= 5){
Lock5.visible = false;
};
if (mySharedObject.data.levelProgress >= 6){
Lock6.visible = false;
};
if (mySharedObject.data.levelProgress >= 7){
Lock7.visible = false;
};
LevelSelect1.addEventListener(MouseEvent.CLICK, PlayLevel1);
LevelSelect2.addEventListener(MouseEvent.CLICK, PlayLevel2);
LevelSelect3.addEventListener(MouseEvent.CLICK, PlayLevel3);
LevelSelect4.addEventListener(MouseEvent.CLICK, PlayLevel4);
LevelSelect5.addEventListener(MouseEvent.CLICK, PlayLevel5);
LevelSelect6.addEventListener(MouseEvent.CLICK, PlayLevel6);
LevelSelect7.addEventListener(MouseEvent.CLICK, PlayLevel7);
}
function frame6(){
playMusic();
}
function frame2(){
currentscreen = 2;
stop();
mySharedObject = SharedObject.getLocal("deadtown");
if (mySharedObject.data.highScore == null){
mySharedObject.data.highScore = 0;
};
txtCurrentHighscore.text = ("HIGHSCORE: " + mySharedObject.data.highScore);
playMusic();
playbutton.addEventListener(MouseEvent.CLICK, PlayFunction);
instructionsbutton.addEventListener(MouseEvent.CLICK, InstructionFunction);
}
function frame3(){
stop();
CloseButton.addEventListener(MouseEvent.CLICK, CloseFunction);
}
function frame1(){
if ((((__setPropDict[__id0_] == undefined)) || (!((int(__setPropDict[__id0_]) == 1))))){
__setPropDict[__id0_] = 1;
__setProp___id0__Loading_Layer6_0();
};
}
public function moveChar(_arg1:Event):void{
var _local3:*;
var _local4:int;
var _local5:*;
var _local6:*;
var _local7:int;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:int;
var _local12:int;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:int;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
var _local21:*;
var _local22:*;
var _local23:*;
var _local24:*;
var _local25:*;
var _local26:*;
var _local27:*;
var _local28:*;
var _local29:*;
var _local30:*;
var _local31:*;
var _local32:*;
var _local33:*;
var _local34:*;
var _local35:*;
var _local36:*;
var _local37:*;
var _local38:*;
var _local39:*;
var _local40:*;
var _local41:*;
var _local42:*;
var _local43:*;
var _local44:*;
var _local45:*;
var _local46:*;
var _local47:*;
var _local48:*;
var _local49:*;
var _local50:*;
var _local51:*;
var _local52:*;
var _local53:*;
var _local54:*;
var _local55:*;
var _local56:*;
var _local57:*;
totalchildren = numChildren;
if ((((leftDown == true)) && ((RunBack == false)))){
RunBack = true;
currentprog = progress;
};
if (RunBack){
RunBackSign.visible = true;
} else {
RunBackSign.visible = false;
};
if (currentprog < progress){
RunBack = false;
};
if (Quit == true){
Quit = false;
currentscreen = 2;
while (numChildren > 0) {
_local4 = 0;
while (_local4 < numChildren) {
removeChildAt(_local3);
_local4++;
};
};
mcMain.removeEventListener(Event.ENTER_FRAME, moveChar);
gotoAndStop(1, "Menu");
};
if (exitlevel == true){
enemyDestroy = false;
difcurve = 0;
mcMain.x = 0;
mcMain.y = 300;
levelComplete = false;
life = 1;
background1a.x = 0;
faceRight = true;
mcMain.scaleX = 1;
itemTime = 0;
shot = false;
rail = false;
batting = false;
stopchar = false;
bossappear = false;
enemyDestroy = false;
progress = -35;
currentprog = 0;
levelComplete = false;
exitlevel = false;
level++;
_local5 = new FadeIn();
_local5.x = 0;
_local5.y = 0;
addChild(_local5);
if (level == 2){
_local6 = new Chainsaw();
_local6.x = (stage.stageWidth / 2);
_local6.y = int(((stage.stageHeight * 3) / 4));
addChild(_local6);
};
if (level == 8){
while (numChildren > 0) {
_local7 = 0;
while (_local7 < numChildren) {
removeChildAt(_local3);
_local7++;
};
};
gotoAndPlay(1, "GAME COMPLETE");
};
};
if (level == 1){
background1a.gotoAndStop("level1");
background1b.gotoAndStop("level1");
background2a.gotoAndStop("level1");
background2b.gotoAndStop("level1");
background3a.gotoAndStop("level1");
} else {
if (level == 2){
background1a.gotoAndStop("level2");
background1b.gotoAndStop("level2");
background2a.gotoAndStop("level2");
background2b.gotoAndStop("level2");
background3a.gotoAndStop("level2");
} else {
if (level == 3){
background1a.gotoAndStop("level3");
background1b.gotoAndStop("level3");
background2a.gotoAndStop("level3");
background2b.gotoAndStop("level3");
background3a.gotoAndStop("level3");
} else {
if (level == 4){
background1a.gotoAndStop("level4");
background1b.gotoAndStop("level4");
background2a.gotoAndStop("level4");
background2b.gotoAndStop("level4");
background3a.gotoAndStop("level4");
} else {
if (level == 5){
background1a.gotoAndStop("level5");
background1b.gotoAndStop("level5");
background2a.gotoAndStop("level5");
background2b.gotoAndStop("level5");
background3a.gotoAndStop("level5");
} else {
if (level == 6){
background1a.gotoAndStop("level6");
background1b.gotoAndStop("level6");
background2a.gotoAndStop("level6");
background2b.gotoAndStop("level6");
background3a.gotoAndStop("level6");
} else {
if (level == 7){
background1a.gotoAndStop("level7");
background1b.gotoAndStop("level7");
background2a.gotoAndStop("level7");
background2b.gotoAndStop("level7");
background3a.gotoAndStop("level7");
};
};
};
};
};
};
};
if (chainsaw > 0){
weapon = 2;
rail = false;
shot = false;
batting = false;
} else {
if (M16 > 0){
weapon = 3;
rail = false;
shot = false;
batting = false;
} else {
if (flamethrower > 0){
weapon = 4;
rail = false;
shot = false;
batting = false;
} else {
if (railgun > 0){
weapon = 5;
shot = false;
batting = false;
} else {
if ((((clip <= 0)) && ((ammo <= 0)))){
weapon = 0;
rail = false;
shot = false;
} else {
if (rail == false){
weapon = 1;
rail = false;
batting = false;
};
};
};
};
};
};
if (level > mySharedObject.data.levelProgress){
mySharedObject.data.levelProgress = level;
};
if (mcMain.x > stage.stageWidth){
exitlevel = true;
enemyDestroy = true;
} else {
exitlevel = false;
};
background1b.y = background1a.y;
if ((((((((((leftDown == true)) && ((gameOver == false)))) && ((progress > 0)))) && ((levelComplete == false)))) && ((Paused == false)))){
background1a.x = (background1a.x + (mainSpeed - 1));
background2a.x = (background2a.x + mainSpeed);
progress = (progress - 1);
};
if ((((((((((((rightDown == true)) && ((gameOver == false)))) && ((progress > 0)))) && ((levelComplete == false)))) && ((stopchar == false)))) && ((Paused == false)))){
background1a.x = (background1a.x - (mainSpeed - 1));
background2a.x = (background2a.x - mainSpeed);
progress = (progress + 1);
};
if (background1a.x < (0 - stage.stageWidth)){
background1a.x = stage.stageWidth;
} else {
if (background1a.x > stage.stageWidth){
background1a.x = (0 - stage.stageWidth);
};
};
if (background2a.x < (0 - stage.stageWidth)){
background2a.x = stage.stageWidth;
} else {
if (background2a.x > stage.stageWidth){
background2a.x = (0 - stage.stageWidth);
};
};
if (background1a.x >= 0){
background1b.x = (background1a.x - stage.stageWidth);
} else {
if (background1a.x < 0){
background1b.x = (background1a.x + background1a.width);
};
};
if (background2a.x >= 0){
background2b.x = (background2a.x - stage.stageWidth);
} else {
if (background2a.x < 0){
background2b.x = (background2a.x + background2a.width);
};
};
if ((((((((((faceRight == true)) && (leftDown))) && ((rightDown == false)))) && ((gameOver == false)))) && ((Paused == false)))){
mcMain.scaleX = (mcMain.scaleX * -1);
faceRight = false;
} else {
if ((((((((((faceRight == false)) && (rightDown))) && ((leftDown == false)))) && ((gameOver == false)))) && ((Paused == false)))){
mcMain.scaleX = (mcMain.scaleX * -1);
faceRight = true;
};
};
if (((((((((((((upDown) || (downDown))) || (leftDown))) || (rightDown))) && ((gameOver == false)))) && (!((mcMain.currentFrame == 1))))) && ((Paused == false)))){
run_time = 0;
enemyDestroy = false;
mcMain.gotoAndStop("run");
};
if (run_time < 9){
run_time++;
} else {
if (((((((((((!((mcMain.currentFrame == 2))) && ((upDown == false)))) && ((downDown == false)))) && ((leftDown == false)))) && ((rightDown == false)))) && ((gameOver == false)))){
mcMain.gotoAndStop("idle");
};
};
if (mcMain.y <= 0){
mcMain.y = (mcMain.y + mainSpeed);
};
if (mcMain.y >= (stage.stageHeight + 1000)){
mcMain.y = (mcMain.y - mainSpeed);
};
if (comboCount > 0){
comboTimer++;
};
if (comboTimer > 22){
comboTimer = 0;
comboCount = 0;
};
if (cTime < cLimit){
cTime++;
} else {
shootAllow = true;
cTime = 0;
};
if (life <= 0){
gameOver = true;
};
if (shotshell){
_local8 = new Shell();
_local8.x = (mcMain.x - 10);
_local8.y = (mcMain.y + 10);
addChild(_local8);
shotshell = false;
};
if (((spaceDown) && ((weapon == 3)))){
shelltime++;
} else {
shelltime = 0;
};
if (shelltime == 3){
_local9 = new Shell1();
_local9.x = (mcMain.x - 10);
_local9.y = (mcMain.y + 10);
addChild(_local9);
shelltime = 0;
};
if (showsplat == true){
if (numChildren < childLimit){
_local10 = new Splat1();
_local10.x = int((Math.random() * stage.stageWidth));
_local10.y = int((Math.random() * stage.stageHeight));
splatContainer.addChild(_local10);
_local11 = int((Math.random() * 6));
if (_local11 == 1){
_local10.gotoAndStop("1");
} else {
if (_local11 == 2){
_local10.gotoAndStop("2");
} else {
if (_local11 == 3){
_local10.gotoAndStop("3");
} else {
if (_local11 == 4){
_local10.gotoAndStop("4");
} else {
_local10.gotoAndStop("5");
};
};
};
};
};
showsplat = false;
};
if (foregroundTime > 0){
if ((((((((leftDown == true)) || ((rightDown == true)))) && ((stopchar == false)))) && ((Paused == false)))){
foregroundTime = (foregroundTime - 1);
};
} else {
if ((((((numChildren < childLimit)) && ((levelComplete == false)))) && ((gameOver == false)))){
_local12 = int((Math.random() * 3));
if (_local12 == 0){
_local13 = new telepole();
_local13.x = (stage.stageWidth + _local13.width);
_local13.y = 400;
addChild(_local13);
} else {
if (_local12 == 1){
_local14 = new burntcar();
_local14.x = (stage.stageWidth + 200);
_local14.y = 400;
addChild(_local14);
} else {
if (_local12 == 2){
_local15 = new mailbox();
_local15.x = (stage.stageWidth + 200);
_local15.y = 400;
addChild(_local15);
};
};
};
foregroundTime = (150 + int((Math.random() * 100)));
};
};
if ((((enemyTime > 0)) && ((level < 8)))){
if (((((leftDown) || (rightDown))) && ((Paused == false)))){
enemyTime = (enemyTime - 3);
} else {
enemyTime = (enemyTime - 0.3);
};
} else {
if ((((((((RunBack == false)) && ((numChildren < childLimit)))) && ((levelComplete == false)))) && ((level < 8)))){
_local16 = int((Math.random() * 32));
_local17 = int((Math.random() * 5));
if (_local16 == 0){
_local18 = new Mascot();
if ((((((_local17 == 0)) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local18.x = (stage.stageWidth + _local18.width);
} else {
_local18.x = -55;
};
_local18.y = (250 + int((Math.random() * 145)));
addChild(_local18);
} else {
if ((((((_local16 == 1)) || ((_local16 == 2)))) || ((_local16 == 3)))){
_local19 = new Cop();
if ((((((((((((_local17 == 0)) || ((_local17 == 1)))) || ((_local17 == 2)))) || ((_local17 == 3)))) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local19.x = (stage.stageWidth + _local19.width);
} else {
_local19.x = -55;
};
_local19.y = (250 + int((Math.random() * 145)));
addChild(_local19);
} else {
if ((((((_local16 == 4)) || ((_local16 == 5)))) && ((level > 2)))){
_local20 = new Runner();
if ((((((((_local17 == 0)) || ((_local17 == 1)))) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local20.x = (stage.stageWidth + _local20.width);
} else {
_local20.x = -55;
};
_local20.y = (250 + int((Math.random() * 145)));
addChild(_local20);
} else {
if ((((((_local16 == 6)) || ((_local16 == 7)))) || ((_local16 == 8)))){
_local21 = new Enemy();
if ((((((((((((_local17 == 0)) || ((_local17 == 1)))) || ((_local17 == 2)))) || ((_local17 == 3)))) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local21.x = (stage.stageWidth + _local21.width);
} else {
_local21.x = -55;
};
_local21.y = (250 + int((Math.random() * 145)));
addChild(_local21);
} else {
if ((((((_local16 == 9)) || ((_local16 == 10)))) || ((_local16 == 11)))){
_local22 = new Enemy2();
if ((((((((((((_local17 == 0)) || ((_local17 == 1)))) || ((_local17 == 2)))) || ((_local17 == 3)))) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local22.x = (stage.stageWidth + _local22.width);
} else {
_local22.x = -55;
};
_local22.y = (250 + int((Math.random() * 145)));
addChild(_local22);
} else {
if ((((((_local16 == 12)) || ((_local16 == 13)))) || ((_local16 == 14)))){
_local23 = new Enemy3();
if ((((((((((((_local17 == 0)) || ((_local17 == 1)))) || ((_local17 == 2)))) || ((_local17 == 3)))) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local23.x = (stage.stageWidth + _local23.width);
} else {
_local23.x = -55;
};
_local23.y = (250 + int((Math.random() * 145)));
addChild(_local23);
} else {
if (_local16 == 15){
_local24 = new Enemy4();
if ((((((((((((_local17 == 0)) || ((_local17 == 1)))) || ((_local17 == 2)))) || ((_local17 == 3)))) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local24.x = (stage.stageWidth + _local24.width);
} else {
_local24.x = -55;
};
_local24.y = (250 + int((Math.random() * 145)));
addChild(_local24);
} else {
if ((((((_local16 == 16)) || ((_local16 == 17)))) || ((_local16 == 18)))){
_local25 = new Enemy5();
if ((((((((((((_local17 == 0)) || ((_local17 == 1)))) || ((_local17 == 2)))) || ((_local17 == 3)))) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local25.x = (stage.stageWidth + _local25.width);
} else {
_local25.x = -55;
};
_local25.y = (250 + int((Math.random() * 145)));
addChild(_local25);
} else {
if (_local16 == 19){
_local26 = new Enemy6();
if ((((((((((((_local17 == 0)) || ((_local17 == 1)))) || ((_local17 == 2)))) || ((_local17 == 3)))) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local26.x = (stage.stageWidth + _local26.width);
} else {
_local26.x = -55;
};
_local26.y = (250 + int((Math.random() * 145)));
addChild(_local26);
} else {
if ((((((_local16 == 20)) || ((_local16 == 21)))) || ((_local16 == 22)))){
_local27 = new Enemy7();
if ((((((((((((_local17 == 0)) || ((_local17 == 1)))) || ((_local17 == 2)))) || ((_local17 == 3)))) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local27.x = (stage.stageWidth + _local27.width);
} else {
_local27.x = -55;
};
_local27.y = (250 + int((Math.random() * 145)));
addChild(_local27);
} else {
if (_local16 == 23){
_local28 = new Enemy8();
if ((((((((((((_local17 == 0)) || ((_local17 == 1)))) || ((_local17 == 2)))) || ((_local17 == 3)))) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local28.x = (stage.stageWidth + _local28.width);
} else {
_local28.x = -55;
};
_local28.y = (250 + int((Math.random() * 145)));
addChild(_local28);
} else {
if ((((((_local16 == 24)) || ((_local16 == 25)))) || ((_local16 == 26)))){
_local29 = new Enemy9();
if ((((((((((((_local17 == 0)) || ((_local17 == 1)))) || ((_local17 == 2)))) || ((_local17 == 3)))) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local29.x = (stage.stageWidth + _local29.width);
} else {
_local29.x = -55;
};
_local29.y = (250 + int((Math.random() * 145)));
addChild(_local29);
} else {
if ((((((_local16 == 27)) || ((_local16 == 28)))) || ((_local16 == 29)))){
_local30 = new Enemy10();
if ((((((((((((_local17 == 0)) || ((_local17 == 1)))) || ((_local17 == 2)))) || ((_local17 == 3)))) && ((leftDown == false)))) && ((blockadeappear == false)))){
_local30.x = (stage.stageWidth + _local30.width);
} else {
_local30.x = -55;
};
_local30.y = (250 + int((Math.random() * 145)));
addChild(_local30);
} else {
if ((((((_local16 == 30)) && ((blockadeappear == false)))) && ((level == 2)))){
_local31 = new Zomtrolley();
_local31.x = (stage.stageWidth + _local31.width);
_local31.y = mcMain.y;
addChild(_local31);
} else {
if ((((((_local16 == 31)) && ((blockadeappear == false)))) && ((level > 3)))){
_local32 = new Fatcop();
_local32.x = (stage.stageWidth + _local32.width);
_local32.y = mcMain.y;
addChild(_local32);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
enemyTime = (int((enemyLimit / 2)) + int(((Math.random() * enemyLimit) / 2)));
};
};
if (itemTime < itemLimit){
if (((rightDown) && ((Paused == false)))){
itemTime++;
};
} else {
item = int((Math.random() * 8));
if ((((((item == 1)) || ((((item == 2)) && ((life < 0.5)))))) && ((life < 0.8)))){
_local33 = new Health();
_local33.x = (stage.stageWidth + _local33.width);
_local33.y = 300;
addChild(_local33);
itemTime = 0;
} else {
if ((((((((item == 3)) && ((score > 25)))) && ((((weapon == 0)) || ((weapon == 1)))))) && ((level > 1)))){
_local34 = new Chainsaw();
_local34.x = (stage.stageWidth + _local34.width);
_local34.y = 300;
addChild(_local34);
itemTime = 0;
} else {
if ((((((item == 4)) && ((((weapon == 0)) || ((weapon == 1)))))) && ((level > 1)))){
_local35 = new M16drop();
_local35.x = (stage.stageWidth + _local35.width);
_local35.y = 300;
addChild(_local35);
itemTime = 0;
} else {
if ((((item == 5)) && ((shield == 0)))){
_local36 = new Helmetpickup();
_local36.x = (stage.stageWidth + _local36.width);
_local36.y = 300;
addChild(_local36);
itemTime = 0;
} else {
if ((((((item == 6)) && ((((weapon == 0)) || ((weapon == 1)))))) && ((level > 2)))){
_local37 = new Flamethrower();
_local37.x = (stage.stageWidth + _local37.width);
_local37.y = 300;
addChild(_local37);
itemTime = 0;
} else {
if ((((((((item == 7)) && ((progress > 1000)))) && ((((weapon == 0)) || ((weapon == 1)))))) && ((level > 4)))){
_local38 = new Railgun();
_local38.x = (stage.stageWidth + _local38.width);
_local38.y = (250 + int((Math.random() * 100)));
addChild(_local38);
itemTime = 0;
} else {
_local39 = new Ammodrop();
_local39.x = (stage.stageWidth + _local39.width);
_local39.y = 300;
addChild(_local39);
itemTime = 0;
};
};
};
};
};
};
};
if (level == 1){
enemyLife = 1;
} else {
if (level == 2){
enemyLife = 1.055;
} else {
if (level == 3){
enemyLife = 1.11;
} else {
if (level == 4){
enemyLife = 1.165;
} else {
if (level == 5){
enemyLife = 1.25;
} else {
if (level == 6){
enemyLife = 1.33;
};
};
};
};
};
};
if (level == 1){
if ((((difcurve == 0)) && ((progress > 200)))){
difcurve++;
enemyLimit = 30;
} else {
if ((((difcurve == 1)) && ((progress > 400)))){
difcurve++;
enemyLimit = 23;
} else {
if ((((difcurve == 2)) && ((progress > 600)))){
difcurve++;
enemyLimit = 16;
} else {
if ((((difcurve == 3)) && ((progress > 800)))){
difcurve++;
enemyLimit = 10;
} else {
if ((((difcurve == 4)) && ((progress > 1000)))){
difcurve++;
_local40 = new Health();
_local40.x = (stage.stageWidth + _local40.width);
_local40.y = 320;
addChild(_local40);
_local41 = new Ammodrop();
_local41.x = (stage.stageWidth + _local41.width);
_local41.y = 250;
addChild(_local41);
} else {
if ((((difcurve == 5)) && ((progress > 1010)))){
difcurve++;
enemyLimit = 80;
bossappear = true;
_local42 = new Boss1();
_local42.x = (0 - _local42.width);
_local42.y = 315;
addChild(_local42);
};
};
};
};
};
};
} else {
if (level == 2){
if ((((difcurve == 0)) && ((progress > 210)))){
difcurve++;
enemyLimit = 30;
} else {
if ((((difcurve == 1)) && ((progress > 420)))){
difcurve++;
enemyLimit = 23;
} else {
if ((((difcurve == 2)) && ((progress > 630)))){
difcurve++;
enemyLimit = 16;
} else {
if ((((difcurve == 3)) && ((progress > 840)))){
difcurve++;
enemyLimit = 10;
_local43 = new Blockade();
_local43.x = 900;
_local43.y = 400;
newBlockade.addChild(_local43);
blockadeappear = true;
} else {
if ((((difcurve == 4)) && ((progress > 1050)))){
difcurve++;
addChild(_local40);
addChild(_local41);
} else {
if ((((difcurve == 5)) && ((progress > 1060)))){
difcurve++;
enemyLimit = 80;
bossappear = true;
_local44 = new Boss2();
_local44.x = (0 - _local44.width);
_local44.y = 315;
addChild(_local44);
};
};
};
};
};
};
} else {
if (level == 3){
if ((((difcurve == 0)) && ((progress > 250)))){
difcurve++;
enemyLimit = 28;
} else {
if ((((difcurve == 1)) && ((progress > 500)))){
difcurve++;
enemyLimit = 23;
} else {
if ((((difcurve == 2)) && ((progress > 750)))){
difcurve++;
enemyLimit = 14;
} else {
if ((((difcurve == 3)) && ((progress > 1000)))){
difcurve++;
enemyLimit = 8;
_local45 = new Blockade();
_local45.x = 900;
_local45.y = 400;
newBlockade.addChild(_local45);
blockadeappear = true;
} else {
if ((((difcurve == 4)) && ((progress > 1250)))){
difcurve++;
addChild(_local40);
addChild(_local41);
} else {
if ((((difcurve == 5)) && ((progress > 1260)))){
difcurve++;
enemyLimit = 75;
bossappear = true;
_local46 = new Boss3();
_local46.x = (0 - _local46.width);
_local46.y = 315;
addChild(_local46);
};
};
};
};
};
};
} else {
if (level == 4){
if ((((difcurve == 0)) && ((progress > 300)))){
difcurve++;
enemyLimit = 28;
_local47 = new Axe();
_local47.x = (stage.stageWidth + _local47.width);
_local47.y = 300;
addChild(_local47);
} else {
if ((((difcurve == 1)) && ((progress > 600)))){
difcurve++;
enemyLimit = 23;
} else {
if ((((difcurve == 2)) && ((progress > 900)))){
difcurve++;
enemyLimit = 14;
} else {
if ((((difcurve == 3)) && ((progress > 1200)))){
difcurve++;
enemyLimit = 8;
_local48 = new Blockade();
_local48.x = 900;
_local48.y = 400;
newBlockade.addChild(_local48);
blockadeappear = true;
} else {
if ((((difcurve == 4)) && ((progress > 1500)))){
difcurve++;
addChild(_local40);
addChild(_local41);
} else {
if ((((difcurve == 5)) && ((progress > 1510)))){
difcurve++;
enemyLimit = 75;
bossappear = true;
_local49 = new Boss4();
_local49.x = (0 - _local49.width);
_local49.y = 315;
addChild(_local49);
};
};
};
};
};
};
} else {
if (level == 5){
if ((((difcurve == 0)) && ((progress > 350)))){
difcurve++;
enemyLimit = 26;
} else {
if ((((difcurve == 1)) && ((progress > 700)))){
difcurve++;
enemyLimit = 21;
} else {
if ((((difcurve == 2)) && ((progress > 1050)))){
difcurve++;
enemyLimit = 12;
} else {
if ((((difcurve == 3)) && ((progress > 1300)))){
difcurve++;
enemyLimit = 6;
_local50 = new Blockade();
_local50.x = 900;
_local50.y = 400;
newBlockade.addChild(_local50);
blockadeappear = true;
} else {
if ((((difcurve == 4)) && ((progress > 1650)))){
difcurve++;
addChild(_local40);
addChild(_local41);
} else {
if ((((difcurve == 5)) && ((progress > 1660)))){
difcurve++;
enemyLimit = 60;
bossappear = true;
_local51 = new Boss5();
_local51.x = (0 - _local51.width);
_local51.y = 315;
addChild(_local51);
};
};
};
};
};
};
} else {
if (level == 6){
if ((((difcurve == 0)) && ((progress > 400)))){
difcurve++;
enemyLimit = 26;
} else {
if ((((difcurve == 1)) && ((progress > 800)))){
difcurve++;
enemyLimit = 21;
} else {
if ((((difcurve == 2)) && ((progress > 1200)))){
difcurve++;
enemyLimit = 12;
} else {
if ((((difcurve == 3)) && ((progress > 1600)))){
difcurve++;
enemyLimit = 5;
_local52 = new Blockade();
_local52.x = 900;
_local52.y = 400;
newBlockade.addChild(_local52);
blockadeappear = true;
} else {
if ((((difcurve == 4)) && ((progress > 2000)))){
difcurve++;
addChild(_local40);
addChild(_local41);
} else {
if ((((difcurve == 5)) && ((progress > 2010)))){
difcurve++;
enemyLimit = 60;
bossappear = true;
_local53 = new Boss6();
_local53.x = (0 - _local53.width);
_local53.y = 315;
addChild(_local53);
};
};
};
};
};
};
} else {
if (level == 7){
if ((((difcurve == 0)) && ((progress > 100)))){
difcurve++;
enemyLimit = 80;
_local54 = new Health();
_local54.x = (stage.stageWidth + _local54.width);
_local54.y = 320;
addChild(_local54);
_local55 = new Ammodrop();
_local55.x = (stage.stageWidth + _local55.width);
_local55.y = 250;
addChild(_local55);
} else {
if ((((difcurve == 1)) && ((progress > 200)))){
difcurve++;
bossappear = true;
_local56 = new Boss7();
_local56.x = (0 - _local56.width);
_local56.y = 315;
addChild(_local56);
};
};
};
};
};
};
};
};
};
if ((((gameOver == true)) && (!((mcMain.currentFrame == 3))))){
shotsquelch = new ShotSquelch();
zomfxSoundChannel = shotsquelch.play();
mcMain.gotoAndStop("gameover");
};
setChildIndex(splatContainer, (numChildren - 1));
var _local2:uint = (numChildren - 1);
_local3 = 0;
while (_local3 < (_local2 - 1)) {
_local57 = (_local3 + 1);
while (_local57 < _local2) {
if (getChildAt(_local3).y > getChildAt(_local57).y){
swapChildrenAt(_local3, _local57);
};
_local57++;
};
_local3++;
};
}
public function checkKeysUp(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == 37)) || ((Paused == true)))){
leftDown = false;
};
if ((((_arg1.keyCode == 38)) || ((Paused == true)))){
upDown = false;
};
if ((((_arg1.keyCode == 39)) || ((Paused == true)))){
rightDown = false;
};
if ((((_arg1.keyCode == 40)) || ((Paused == true)))){
downDown = false;
};
if ((((_arg1.keyCode == 83)) || ((Paused == true)))){
rDown = false;
};
if ((((_arg1.keyCode == 65)) || ((Paused == true)))){
spaceDown = false;
};
if (_arg1.keyCode == 27){
escDown = false;
};
if (_arg1.keyCode == 13){
enterDown = false;
};
}
function frame64(){
shotsquelch2 = new ShotSquelch2();
sfxSoundChannel = shotsquelch2.play();
}
function frame5(){
stop();
upDown = false;
downDown = false;
leftDown = false;
rightDown = false;
rDown = false;
spaceDown = false;
escDown = false;
enterDown = false;
RunBack = false;
enemyLife = 1;
shotshell = false;
chainbloodflag = false;
splatContainer = new MovieClip();
addChild(splatContainer);
showsplat = false;
progress = 0;
currentprog = 0;
splatno = 0;
totalChildren = 0;
difcurve = 0;
comboCount = 0;
comboTimer = 0;
run_time = 0;
chainsawEquip = false;
M16Equip = false;
weapon = 0;
melee = 0;
shot = false;
batting = false;
rail = false;
exitlevel = false;
faceRight = true;
stopchar = false;
blockadeappear = false;
item = 0;
mainSpeed = 10;
cTime = 0;
cLimit = 15;
shootAllow = true;
enemyTime = 0;
itemTime = 0;
itemLimit = 180;
foregroundTime = 0;
charhurt = false;
shelltime = 0;
childLimit = 30;
levelComplete = false;
gameOver = false;
enemyDestroy = false;
life = 1;
shield = 0;
score = 0;
totalpoints = 0;
multi = 1;
startclip = 8;
clip = 0;
ammo = 30;
chainsaw = 0;
flamethrower = 0;
M16 = 0;
railgun = 0;
totalchildren = numChildren;
Quit = false;
Paused = false;
bossappear = false;
newBlockade = new MovieClip();
addChild(newBlockade);
clip = startclip;
currentscreen = 4;
mcMain.y = 300;
mcMain.x = (stage.stageWidth / 2);
mcMain.gotoAndPlay("idle");
newFadeIn1 = new FadeIn();
newFadeIn1.x = 0;
newFadeIn1.y = 0;
addChild(newFadeIn1);
enemyLimit = 40;
mcMain.addEventListener(Event.ENTER_FRAME, moveChar);
stage.addEventListener(KeyboardEvent.KEY_DOWN, checkKeysDown);
stage.addEventListener(KeyboardEvent.KEY_UP, checkKeysUp);
}
function frame80(){
shotsquelch = new ShotSquelch();
sfxSoundChannel = shotsquelch.play();
}
function frame200(){
stop();
}
public function stopMusic():void{
mySndCh.stop();
mySndCh.removeEventListener(Event.SOUND_COMPLETE, loopMusic);
}
public function PlayFunction(_arg1:MouseEvent):void{
gotoAndPlay(1, "LevelSelect");
}
public function playMusic():void{
mySnd = new Theme();
mySndCh = mySnd.play();
mySndCh.addEventListener(Event.SOUND_COMPLETE, loopMusic);
}
function __setProp___id0__Loading_Layer6_0(){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.debugMode = true;
__id0_.encryptionKey = "R4Xj1oD0LPgDtGq1uEE8ixY2BStVqR9G ";
__id0_.movieId = "14265:Az7eNhgw";
__id0_.movieVersion = "";
__id0_.showConnectingPopup = true;
__id0_.useErrorPopup = true;
__id0_.useMedalPopup = true;
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function PlayLevel1(_arg1:MouseEvent):void{
stopMusic();
level = 1;
gotoAndPlay(1, "Level1");
}
public function PlayLevel2(_arg1:MouseEvent):void{
if (mySharedObject.data.levelProgress >= 2){
stopMusic();
level = 2;
gotoAndPlay(1, "Level1");
};
}
public function PlayLevel3(_arg1:MouseEvent):void{
if (mySharedObject.data.levelProgress >= 3){
stopMusic();
level = 3;
gotoAndPlay(1, "Level1");
};
}
public function PlayLevel4(_arg1:MouseEvent):void{
if (mySharedObject.data.levelProgress >= 4){
stopMusic();
level = 4;
gotoAndPlay(1, "Level1");
};
}
public function PlayLevel5(_arg1:MouseEvent):void{
if (mySharedObject.data.levelProgress >= 5){
stopMusic();
level = 5;
gotoAndPlay(1, "Level1");
};
}
public function PlayLevel7(_arg1:MouseEvent):void{
if (mySharedObject.data.levelProgress >= 7){
stopMusic();
level = 7;
gotoAndPlay(1, "Level1");
};
}
public function PlayLevel6(_arg1:MouseEvent):void{
if (mySharedObject.data.levelProgress >= 6){
stopMusic();
level = 6;
gotoAndPlay(1, "Level1");
};
}
public function CloseFunction(_arg1:MouseEvent):void{
stopMusic();
gotoAndPlay(1, "Menu");
}
public function checkKeysDown(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == 37)) && ((Paused == false)))){
leftDown = true;
};
if ((((_arg1.keyCode == 38)) && ((Paused == false)))){
upDown = true;
};
if ((((_arg1.keyCode == 39)) && ((Paused == false)))){
rightDown = true;
};
if ((((_arg1.keyCode == 40)) && ((Paused == false)))){
downDown = true;
};
if ((((_arg1.keyCode == 83)) && ((Paused == false)))){
rDown = true;
};
if ((((_arg1.keyCode == 65)) && ((Paused == false)))){
spaceDown = true;
};
if (_arg1.keyCode == 27){
escDown = true;
};
if (_arg1.keyCode == 13){
enterDown = true;
};
}
public function loopMusic(_arg1:Event):void{
if (mySndCh != null){
mySndCh.removeEventListener(Event.SOUND_COMPLETE, loopMusic);
playMusic();
};
}
}
}//package source_fla
Section 111
//mascotdecap_177 (source_fla.mascotdecap_177)
package source_fla {
import flash.display.*;
public dynamic class mascotdecap_177 extends MovieClip {
public function mascotdecap_177(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package source_fla
Section 112
//mascotdie_173 (source_fla.mascotdie_173)
package source_fla {
import flash.display.*;
public dynamic class mascotdie_173 extends MovieClip {
public function mascotdie_173(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 113
//mascotheadshot_176 (source_fla.mascotheadshot_176)
package source_fla {
import flash.display.*;
public dynamic class mascotheadshot_176 extends MovieClip {
public function mascotheadshot_176(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package source_fla
Section 114
//mascotsawed_175 (source_fla.mascotsawed_175)
package source_fla {
import flash.display.*;
public dynamic class mascotsawed_175 extends MovieClip {
public function mascotsawed_175(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package source_fla
Section 115
//mcMain_14 (source_fla.mcMain_14)
package source_fla {
import flash.display.*;
public dynamic class mcMain_14 extends MovieClip {
public var mainhitblock:MovieClip;
public function mcMain_14(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
stop();
mainhitblock.visible = false;
}
function frame2(){
stop();
mainhitblock.visible = false;
}
function frame3(){
stop();
mainhitblock.visible = false;
}
}
}//package source_fla
Section 116
//Ammodrop (Ammodrop)
package {
import flash.events.*;
import flash.display.*;
public class Ammodrop extends MovieClip {
private var _root:Object;
public function Ammodrop(){
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - _root.mainSpeed);
};
};
if (this.x < 0){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (_root.gameOver){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
if (((hitTestObject(_root.mcMain)) && ((_root.gameOver == false)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
if (_root.ammo < 79){
_root.ammo = (_root.ammo + 10);
} else {
_root.ammo = 99;
};
_root.pickupammo = new PickUpAmmo();
_root.sfxSoundChannel = _root.pickupammo.play();
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 117
//Axe (Axe)
package {
import flash.events.*;
import flash.display.*;
public class Axe extends MovieClip {
private var _root:Object;
public function Axe(){
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - _root.mainSpeed);
};
};
if (this.x < 0){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (_root.gameOver){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
if (((hitTestObject(_root.mcMain)) && ((_root.gameOver == false)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
_root.melee = 1;
_root.pickupammo = new PickUpAmmo();
_root.sfxSoundChannel = _root.pickupammo.play();
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 118
//AxeChop (AxeChop)
package {
import flash.media.*;
public dynamic class AxeChop extends Sound {
}
}//package
Section 119
//BarrierBreak (BarrierBreak)
package {
import flash.media.*;
public dynamic class BarrierBreak extends Sound {
}
}//package
Section 120
//BarrierHit (BarrierHit)
package {
import flash.media.*;
public dynamic class BarrierHit extends Sound {
}
}//package
Section 121
//BatHit (BatHit)
package {
import flash.media.*;
public dynamic class BatHit extends Sound {
}
}//package
Section 122
//Blackfade (Blackfade)
package {
import flash.display.*;
public dynamic class Blackfade extends MovieClip {
}
}//package
Section 123
//Blockade (Blockade)
package {
import flash.events.*;
import flash.display.*;
public class Blockade extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 20
private var batpower:int;// = 50
private var xlim:Number;
private var chainpower:int;// = 30
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:int;// = 1500
private var ylim:Number;
public function Blockade(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame1(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x - (2 * stage.stageWidth));
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((((_root.weapon == 1)) && ((_root.shot == true)))) || ((((_root.weapon == 5)) && ((_root.rail == true)))))) && ((_root.clip > 0)))){
if (_root.faceRight == true){
if ((((life > 0)) && ((killcount > 10)))){
life = (life - shotpower);
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((life > 0)))){
this.gotoAndPlay("hurt");
_root.barrierhit = new BarrierHit();
_root.zomfxSoundChannel = _root.barrierhit.play();
} else {
if (life > 0){
this.gotoAndStop("idle");
};
};
if (((((((((_root.faceRight) && (hitTestObject(_root.mcMain)))) && (_root.spaceDown))) && ((_root.weapon == 0)))) && (_root.batting))){
life = (life - batpower);
killcount = 0;
};
};
if (this.x < -200){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.newBlockade.removeChild(this);
};
if ((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((_root.faceRight == true)) && (hitTestObject(_root.mcMain)))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))){
life = (life - chainpower);
killcount = 0;
};
if ((((((((_root.faceRight == true)) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((((_root.weapon == 3)) || ((_root.weapon == 4)))))){
life = (life - minipower);
killcount = 0;
};
if (life <= 0){
if (this.currentFrame != 3){
gotoAndStop("smashed");
_root.blockadeappear = false;
_root.barrierbreak = new BarrierBreak();
_root.zomfxSoundChannel = _root.barrierbreak.play();
};
};
if ((((((_root.gameOver == false)) && (!((this.currentFrame == 3))))) && (hitTestObject(_root.mcMain)))){
_root.stopchar = true;
} else {
_root.stopchar = false;
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
}
}//package
Section 124
//Boss1 (Boss1)
package {
import flash.events.*;
import flash.display.*;
public class Boss1 extends MovieClip {
private var _root:Object;
private var speed:int;// = 4
private var shotpower:int;// = 300
private var minipower:int;// = 40
public var boss1_levelback:MovieClip;
private var total_life:int;// = 2000
private var batpower:int;// = 50
public var boss1level:MovieClip;
private var chainpower:int;// = 40
private var killcount:int;// = 10
private var life:int;
public function Boss1(){
life = total_life;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (((_root.exitlevel) || (_root.enemyDestroy))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (_root.melee == 1){
batpower = 100;
};
if ((((this.x > (_root.mcMain.x + 250))) || ((this.x < (_root.mcMain.x - 250))))){
speed = (_root.mainSpeed + 2);
} else {
speed = (_root.mainSpeed - 2);
};
boss1level.width = (94 * (life / total_life));
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))){
if ((this.x + 20) <= _root.mcMain.x){
this.scaleX = -1;
x = (x + speed);
} else {
if ((this.x - 20) > _root.mcMain.x){
this.scaleX = 1;
x = (x - speed);
};
};
if ((this.y + 20) <= _root.mcMain.y){
y = (y + 2);
} else {
if ((this.y - 20) > _root.mcMain.y){
y = (y - 2);
};
};
};
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((_root.chainsawEquip == false)))) && ((_root.M16Equip == false)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (20 * this.scaleX));
if (((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))){
killcount = 0;
};
};
if (_root.spaceDown == false){
};
if ((((((((_root.weapon == 1)) && (_root.shot))) || ((((_root.weapon == 5)) && (_root.rail))))) && (_root.spaceDown))){
if ((((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
_root.shotsquelch2 = new ShotSquelch2();
_root.sfxSoundChannel = _root.shotsquelch2.play();
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 30)) / 450))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x + 30) - this.x)) / 450))));
};
this.x = (this.x + (20 * this.scaleX));
killcount = 0;
_root.shot = false;
_root.showsplat = true;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 110))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 110))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - chainpower);
this.x = (this.x + (4 * this.scaleX));
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
killcount = 0;
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((((_root.weapon == 4)) || ((_root.weapon == 3)))))) && (((_root.mcMain.y + 65) > this.y)))) && (((_root.mcMain.y - 35) < this.y)))){
life = (life - minipower);
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
killcount = 0;
};
} else {
if (_root.M16Equip){
killcount = 4;
};
};
if ((((life <= 0)) && (!((this.currentFrame == 3))))){
this.gotoAndStop("dead");
_root.score = (_root.score + 1);
_root.levelComplete = true;
boss1level.visible = false;
boss1_levelback.visible = false;
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.totalpoints = (_root.totalpoints + (10 * _root.multi));
};
if ((((((((((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) && (((_root.mcMain.y + 25) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 200) > this.x)))) && (((_root.mcMain.x - 200) < this.x)))) && ((((_root.chainsawEquip == false)) || ((((_root.chainsawEquip == true)) && ((_root.spaceDown == false)))))))){
if (this.currentFrame != 4){
this.gotoAndPlay("attack");
};
if (hitTestObject(_root.mcMain)){
if (_root.shield <= 0){
_root.life = (_root.life - 0.01);
} else {
_root.shield = (_root.shield - 0.02);
};
_root.charhurt = true;
};
} else {
if (this.currentFrame == 4){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 125
//Boss1Theme (Boss1Theme)
package {
import flash.media.*;
public dynamic class Boss1Theme extends Sound {
}
}//package
Section 126
//Boss2 (Boss2)
package {
import flash.events.*;
import flash.display.*;
public class Boss2 extends MovieClip {
private var _root:Object;
private var speed:int;// = 4
private var shotpower:int;// = 300
private var minipower:int;// = 40
public var boss1_levelback:MovieClip;
private var total_life:int;// = 2100
private var batpower:int;// = 50
public var boss1level:MovieClip;
private var chainpower:int;// = 40
private var killcount:int;// = 10
private var life:int;
public function Boss2(){
life = total_life;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (((_root.exitlevel) || (_root.enemyDestroy))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((this.x > (_root.mcMain.x + 250))) || ((this.x < (_root.mcMain.x - 250))))){
speed = (_root.mainSpeed + 2);
} else {
speed = (_root.mainSpeed - 2);
};
boss1level.width = (94 * (life / total_life));
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))){
if ((this.x + 20) <= _root.mcMain.x){
this.scaleX = -1;
x = (x + speed);
} else {
if ((this.x - 20) > _root.mcMain.x){
this.scaleX = 1;
x = (x - speed);
};
};
if ((this.y + 20) <= _root.mcMain.y){
y = (y + 2);
} else {
if ((this.y - 20) > _root.mcMain.y){
y = (y - 2);
};
};
};
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((_root.chainsawEquip == false)))) && ((_root.M16Equip == false)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (20 * this.scaleX));
if (((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))){
killcount = 0;
};
};
if (_root.spaceDown == false){
};
if ((((((((_root.weapon == 1)) && (_root.shot))) || ((((_root.weapon == 5)) && (_root.rail))))) && (_root.spaceDown))){
if ((((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
_root.shotsquelch2 = new ShotSquelch2();
_root.sfxSoundChannel = _root.shotsquelch2.play();
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 30)) / 450))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x + 30) - this.x)) / 450))));
};
this.x = (this.x + (20 * this.scaleX));
killcount = 0;
_root.shot = false;
_root.showsplat = true;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 110))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 110))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - chainpower);
this.x = (this.x + (4 * this.scaleX));
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
killcount = 0;
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((((_root.weapon == 4)) || ((_root.weapon == 3)))))) && (((_root.mcMain.y + 65) > this.y)))) && (((_root.mcMain.y - 35) < this.y)))){
life = (life - minipower);
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
killcount = 0;
};
} else {
if (_root.M16Equip){
killcount = 4;
};
};
if ((((life <= 0)) && (!((this.currentFrame == 3))))){
this.gotoAndStop("dead");
_root.score = (_root.score + 1);
_root.levelComplete = true;
boss1level.visible = false;
boss1_levelback.visible = false;
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.totalpoints = (_root.totalpoints + (20 * _root.multi));
};
if ((((((((((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) && (((_root.mcMain.y + 25) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 200) > this.x)))) && (((_root.mcMain.x - 200) < this.x)))) && ((((_root.chainsawEquip == false)) || ((((_root.chainsawEquip == true)) && ((_root.spaceDown == false)))))))){
if (this.currentFrame != 4){
this.gotoAndPlay("attack");
};
if (hitTestObject(_root.mcMain)){
if (_root.shield <= 0){
_root.life = (_root.life - 0.01);
} else {
_root.shield = (_root.shield - 0.02);
};
_root.charhurt = true;
};
} else {
if (this.currentFrame == 4){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 127
//Boss3 (Boss3)
package {
import flash.events.*;
import flash.display.*;
public class Boss3 extends MovieClip {
private var _root:Object;
private var puketimer:int;// = 0
private var speed:int;// = 4
private var shotpower:int;// = 300
private var minipower:int;// = 40
public var boss1_levelback:MovieClip;
private var total_life:int;// = 2100
private var batpower:int;// = 50
public var boss1level:MovieClip;
private var chainpower:int;// = 40
private var killcount:int;// = 10
private var life:int;
public function Boss3(){
life = total_life;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (((_root.exitlevel) || (_root.enemyDestroy))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((this.x > (_root.mcMain.x + 250))) || ((this.x < (_root.mcMain.x - 250))))){
speed = (_root.mainSpeed + 2);
} else {
speed = (_root.mainSpeed - 2);
};
boss1level.width = (94 * (life / total_life));
if (this.currentFrame != 3){
if ((this.x + 20) <= _root.mcMain.x){
this.scaleX = -1;
x = (x + speed);
} else {
if ((this.x - 20) > _root.mcMain.x){
this.scaleX = 1;
x = (x - speed);
};
};
if (((((((this.y + 20) <= _root.mcMain.y)) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 5))))){
y = (y + 2);
} else {
if (((((((this.y - 20) > _root.mcMain.y)) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 5))))){
y = (y - 2);
};
};
};
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((_root.chainsawEquip == false)))) && ((_root.M16Equip == false)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (20 * this.scaleX));
if (((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))){
killcount = 0;
};
};
if (_root.spaceDown == false){
};
if ((((((((_root.weapon == 1)) && (_root.shot))) || ((((_root.weapon == 5)) && (_root.rail))))) && (_root.spaceDown))){
if ((((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
_root.shotsquelch2 = new ShotSquelch2();
_root.sfxSoundChannel = _root.shotsquelch2.play();
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 30)) / 450))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x + 30) - this.x)) / 450))));
};
this.x = (this.x + (20 * this.scaleX));
killcount = 0;
_root.shot = false;
_root.showsplat = true;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((puketimer < 200)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && ((puketimer < 200)))){
this.gotoAndStop("idle");
};
};
if (puketimer < 300){
puketimer++;
} else {
puketimer = 0;
};
if ((((puketimer > 250)) && ((life > 0)))){
if (this.currentFrame != 6){
this.gotoAndStop("puke");
_root.puke = new Puke();
_root.zomfxSoundChannel = _root.puke.play();
};
} else {
if ((((((puketimer > 199)) && (!((this.currentFrame == 5))))) && ((life > 0)))){
this.gotoAndStop("abouttopuke");
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 110))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 110))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - chainpower);
this.x = (this.x + (4 * this.scaleX));
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
killcount = 0;
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((((_root.weapon == 4)) || ((_root.weapon == 3)))))) && (((_root.mcMain.y + 65) > this.y)))) && (((_root.mcMain.y - 35) < this.y)))){
life = (life - minipower);
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
killcount = 0;
};
} else {
if (_root.M16Equip){
killcount = 4;
};
};
if ((((life <= 0)) && (!((this.currentFrame == 3))))){
this.gotoAndStop("dead");
_root.score = (_root.score + 1);
_root.levelComplete = true;
boss1level.visible = false;
boss1_levelback.visible = false;
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.totalpoints = (_root.totalpoints + (20 * _root.multi));
};
if ((((((((((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) && (((_root.mcMain.y + 30) > this.y)))) && (((_root.mcMain.y - 23) < this.y)))) && (((_root.mcMain.x + 200) > this.x)))) && (((_root.mcMain.x - 200) < this.x)))) && ((((_root.chainsawEquip == false)) || ((((_root.chainsawEquip == true)) && ((_root.spaceDown == false)))))))){
if (this.currentFrame != 4){
this.gotoAndPlay("attack");
};
if (hitTestObject(_root.mcMain)){
if (_root.shield <= 0){
_root.life = (_root.life - 0.01);
} else {
_root.shield = (_root.shield - 0.02);
};
_root.charhurt = true;
};
} else {
if (this.currentFrame == 4){
this.gotoAndPlay("idle");
};
};
if ((((((((((this.currentFrame == 6)) && (((_root.mcMain.y + 20) > this.y)))) && (((_root.mcMain.y - 20) < this.y)))) && (((_root.mcMain.x + 250) > this.x)))) && (((_root.mcMain.x - 250) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.005);
} else {
_root.shield = (_root.shield - 0.01);
};
_root.charhurt = true;
};
};
}
function frame1(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 128
//Boss4 (Boss4)
package {
import flash.events.*;
import flash.display.*;
public class Boss4 extends MovieClip {
private var _root:Object;
private var puketimer:int;// = 0
private var speed:int;// = 4
private var shotpower:int;// = 300
private var minipower:int;// = 40
public var boss1_levelback:MovieClip;
private var total_life:int;// = 2400
private var batpower:int;// = 50
public var boss1level:MovieClip;
private var chainpower:int;// = 40
private var killcount:int;// = 10
private var life:int;
public function Boss4(){
life = total_life;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (((_root.exitlevel) || (_root.enemyDestroy))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((this.x > (_root.mcMain.x + 250))) || ((this.x < (_root.mcMain.x - 250))))){
speed = (_root.mainSpeed + 2);
} else {
if (puketimer > 250){
speed = (_root.mainSpeed + 3);
} else {
speed = (_root.mainSpeed - 2);
};
};
boss1level.width = (94 * (life / total_life));
if (this.currentFrame != 3){
if ((this.x + 20) <= _root.mcMain.x){
this.scaleX = -1;
x = (x + speed);
} else {
if ((this.x - 20) > _root.mcMain.x){
this.scaleX = 1;
x = (x - speed);
};
};
if (((((this.y + 20) <= _root.mcMain.y)) && (!((this.currentFrame == 6))))){
y = (y + 2);
} else {
if (((((this.y - 20) > _root.mcMain.y)) && (!((this.currentFrame == 6))))){
y = (y - 2);
};
};
};
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((_root.chainsawEquip == false)))) && ((_root.M16Equip == false)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (20 * this.scaleX));
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))){
killcount = 0;
};
};
if (_root.spaceDown == false){
};
if ((((((((_root.weapon == 1)) && (_root.shot))) || ((((_root.weapon == 5)) && (_root.rail))))) && (_root.spaceDown))){
if ((((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
_root.shotsquelch2 = new ShotSquelch2();
_root.sfxSoundChannel = _root.shotsquelch2.play();
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 30)) / 450))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x + 30) - this.x)) / 450))));
};
this.x = (this.x + (20 * this.scaleX));
killcount = 0;
_root.shot = false;
_root.showsplat = true;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && ((puketimer < 200)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && ((puketimer < 200)))){
this.gotoAndStop("idle");
};
};
if (puketimer < 280){
puketimer++;
} else {
puketimer = 0;
};
if ((((puketimer > 250)) && ((life > 0)))){
if (this.currentFrame != 6){
this.gotoAndStop("puke");
};
} else {
if ((((((puketimer > 199)) && (!((this.currentFrame == 5))))) && ((life > 0)))){
this.gotoAndStop("abouttopuke");
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 110))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 110))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - chainpower);
this.x = (this.x + (4 * this.scaleX));
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
killcount = 0;
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > (_root.mcMain.x - 10))))) || ((((_root.faceRight == false)) && ((this.x < (_root.mcMain.x + 10))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 5)))))) && ((((_root.weapon == 4)) || ((_root.weapon == 3)))))) && (((_root.mcMain.y + 65) > this.y)))) && (((_root.mcMain.y - 35) < this.y)))){
life = (life - minipower);
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
killcount = 0;
};
} else {
if (_root.M16Equip){
killcount = 4;
};
};
if ((((life <= 0)) && (!((this.currentFrame == 3))))){
this.gotoAndStop("dead");
_root.score = (_root.score + 1);
_root.levelComplete = true;
boss1level.visible = false;
boss1_levelback.visible = false;
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.totalpoints = (_root.totalpoints + (20 * _root.multi));
};
if ((((((((((((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 6)))) && (((_root.mcMain.y + 30) > this.y)))) && (((_root.mcMain.y - 23) < this.y)))) && (((_root.mcMain.x + 200) > this.x)))) && (((_root.mcMain.x - 200) < this.x)))) && ((((_root.chainsawEquip == false)) || ((((_root.chainsawEquip == true)) && ((_root.spaceDown == false)))))))){
if (((((!((this.currentFrame == 4))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))){
this.gotoAndPlay("attack");
};
if (hitTestObject(_root.mcMain)){
if (_root.shield <= 0){
_root.life = (_root.life - 0.01);
} else {
_root.shield = (_root.shield - 0.02);
};
_root.charhurt = true;
};
} else {
if (this.currentFrame == 4){
this.gotoAndPlay("idle");
};
};
};
}
function frame1(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 129
//Boss5 (Boss5)
package {
import flash.events.*;
import flash.display.*;
public class Boss5 extends MovieClip {
private var _root:Object;
private var speed:int;// = 4
private var shotpower:int;// = 300
private var minipower:int;// = 40
public var boss1_levelback:MovieClip;
private var total_life:int;// = 2500
private var batpower:int;// = 50
public var boss1level:MovieClip;
private var chainpower:int;// = 40
private var killcount:int;// = 10
private var pustimer:int;// = 0
private var life:int;
public function Boss5(){
life = total_life;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
private function eFrame(_arg1:Event):void{
var _local2:*;
if (_root.Paused == false){
if (((_root.exitlevel) || (_root.enemyDestroy))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (pustimer > 130){
pustimer = 0;
} else {
pustimer++;
};
if ((((pustimer == 110)) && ((life > 0)))){
_local2 = new Pus();
_local2.x = (this.x - 17);
_local2.y = (this.y - 153);
_root.addChild(_local2);
};
if ((((this.x > (_root.mcMain.x + 250))) || ((this.x < (_root.mcMain.x - 250))))){
speed = (_root.mainSpeed + 2);
} else {
speed = (_root.mainSpeed - 2);
};
boss1level.width = (94 * (life / total_life));
if (this.currentFrame != 3){
if ((this.x + 20) <= _root.mcMain.x){
this.scaleX = -1;
x = (x + speed);
} else {
if ((this.x - 20) > _root.mcMain.x){
this.scaleX = 1;
x = (x - speed);
};
};
if ((this.y + 20) <= _root.mcMain.y){
y = (y + 2);
} else {
if ((this.y - 20) > _root.mcMain.y){
y = (y - 2);
};
};
};
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && ((_root.chainsawEquip == false)))) && ((_root.M16Equip == false)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (20 * this.scaleX));
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))){
killcount = 0;
};
};
if (_root.spaceDown == false){
};
if ((((((((_root.weapon == 1)) && (_root.shot))) || ((((_root.weapon == 5)) && (_root.rail))))) && (_root.spaceDown))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (!((this.currentFrame == 3))))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
_root.shotsquelch2 = new ShotSquelch2();
_root.sfxSoundChannel = _root.shotsquelch2.play();
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 30)) / 450))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x + 30) - this.x)) / 450))));
};
this.x = (this.x + (20 * this.scaleX));
killcount = 0;
_root.shot = false;
_root.showsplat = true;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((pustimer < 130)) && ((pustimer >= 110)))) && ((life > 0)))){
if (this.currentFrame != 5){
gotoAndStop("pusfire");
_root.pussound = new PusSound();
_root.zomfxSoundChannel = _root.pussound.play();
};
} else {
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && (!((this.currentFrame == 3))))) && ((life > 0)))){
this.gotoAndStop("hurt");
} else {
if (life > 0){
if ((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))){
this.gotoAndStop("idle");
};
};
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 110))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 110))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - chainpower);
this.x = (this.x + (4 * this.scaleX));
if (((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))){
killcount = 0;
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && ((((_root.weapon == 4)) || ((_root.weapon == 3)))))) && (((_root.mcMain.y + 65) > this.y)))) && (((_root.mcMain.y - 35) < this.y)))){
life = (life - minipower);
if (((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))){
killcount = 0;
};
} else {
if (_root.M16Equip){
killcount = 4;
};
};
if ((((life <= 0)) && (!((this.currentFrame == 3))))){
this.gotoAndStop("dead");
_root.score = (_root.score + 1);
_root.levelComplete = true;
boss1level.visible = false;
boss1_levelback.visible = false;
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.totalpoints = (_root.totalpoints + (20 * _root.multi));
};
if ((((((((((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) && (((_root.mcMain.y + 25) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 200) > this.x)))) && (((_root.mcMain.x - 200) < this.x)))) && ((((_root.chainsawEquip == false)) || ((((_root.chainsawEquip == true)) && ((_root.spaceDown == false)))))))){
if (((!((this.currentFrame == 4))) && ((life > 0)))){
this.gotoAndStop("attack");
};
if (hitTestObject(_root.mcMain)){
if (_root.shield <= 0){
_root.life = (_root.life - 0.01);
} else {
_root.shield = (_root.shield - 0.02);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((life > 0)))){
this.gotoAndStop("idle");
};
};
};
}
function frame1(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 130
//Boss6 (Boss6)
package {
import flash.events.*;
import flash.display.*;
public class Boss6 extends MovieClip {
private var _root:Object;
private var puketimer:int;// = 0
private var speed:int;// = 4
private var shotpower:int;// = 300
private var minipower:int;// = 40
public var boss1_levelback:MovieClip;
private var total_life:int;// = 2600
private var batpower:int;// = 50
public var boss1level:MovieClip;
private var chainpower:int;// = 40
private var killcount:int;// = 10
private var life:int;
public function Boss6(){
life = total_life;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (((_root.exitlevel) || (_root.enemyDestroy))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((this.x > (_root.mcMain.x + 250))) || ((this.x < (_root.mcMain.x - 250))))){
speed = (_root.mainSpeed + 2);
} else {
speed = (_root.mainSpeed - 2);
};
boss1level.width = (94 * (life / total_life));
if (this.currentFrame != 3){
if ((this.x + 20) <= _root.mcMain.x){
this.scaleX = -1;
x = (x + speed);
} else {
if ((this.x - 20) > _root.mcMain.x){
this.scaleX = 1;
x = (x - speed);
};
};
if (((((((this.y + 20) <= _root.mcMain.y)) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 5))))){
y = (y + 2);
} else {
if (((((((this.y - 20) > _root.mcMain.y)) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 5))))){
y = (y - 2);
};
};
};
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((_root.chainsawEquip == false)))) && ((_root.M16Equip == false)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (20 * this.scaleX));
if (((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))){
killcount = 0;
};
};
if (_root.spaceDown == false){
};
if ((((((((_root.weapon == 1)) && (_root.shot))) || ((((_root.weapon == 5)) && (_root.rail))))) && (_root.spaceDown))){
if ((((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
_root.shotsquelch2 = new ShotSquelch2();
_root.sfxSoundChannel = _root.shotsquelch2.play();
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 30)) / 450))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x + 30) - this.x)) / 450))));
};
this.x = (this.x + (20 * this.scaleX));
killcount = 0;
_root.shot = false;
_root.showsplat = true;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((puketimer < 200)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && ((puketimer < 200)))){
this.gotoAndStop("idle");
};
};
if (puketimer < 300){
puketimer++;
} else {
puketimer = 0;
};
if ((((puketimer > 250)) && ((life > 0)))){
if (this.currentFrame != 6){
this.gotoAndStop("puke");
_root.laser = new Laser();
_root.zomfxSoundChannel = _root.laser.play();
};
} else {
if ((((((puketimer > 199)) && (!((this.currentFrame == 5))))) && ((life > 0)))){
this.gotoAndStop("abouttopuke");
_root.laserwarmup = new LaserWarmUp();
_root.zomfxSoundChannel = _root.laserwarmup.play();
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 110))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 110))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - chainpower);
this.x = (this.x + (4 * this.scaleX));
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
killcount = 0;
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((((_root.weapon == 4)) || ((_root.weapon == 3)))))) && (((_root.mcMain.y + 65) > this.y)))) && (((_root.mcMain.y - 35) < this.y)))){
life = (life - minipower);
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
killcount = 0;
};
} else {
if (_root.M16Equip){
killcount = 4;
};
};
if ((((life <= 0)) && (!((this.currentFrame == 3))))){
this.gotoAndStop("dead");
_root.score = (_root.score + 1);
_root.levelComplete = true;
boss1level.visible = false;
boss1_levelback.visible = false;
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.totalpoints = (_root.totalpoints + (20 * _root.multi));
};
if ((((((((((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) && (((_root.mcMain.y + 30) > this.y)))) && (((_root.mcMain.y - 23) < this.y)))) && (((_root.mcMain.x + 200) > this.x)))) && (((_root.mcMain.x - 200) < this.x)))) && ((((_root.chainsawEquip == false)) || ((((_root.chainsawEquip == true)) && ((_root.spaceDown == false)))))))){
if (this.currentFrame != 4){
this.gotoAndPlay("attack");
};
if (hitTestObject(_root.mcMain)){
if (_root.shield <= 0){
_root.life = (_root.life - 0.01);
} else {
_root.shield = (_root.shield - 0.02);
};
_root.charhurt = true;
};
} else {
if (this.currentFrame == 4){
this.gotoAndPlay("idle");
};
};
if ((((((((((this.currentFrame == 6)) && (((_root.mcMain.y + 20) > this.y)))) && (((_root.mcMain.y - 20) < this.y)))) && (((_root.mcMain.x + 300) > this.x)))) && (((_root.mcMain.x - 300) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.005);
} else {
_root.shield = (_root.shield - 0.01);
};
_root.charhurt = true;
};
};
}
function frame1(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 131
//Boss7 (Boss7)
package {
import flash.events.*;
import flash.display.*;
public class Boss7 extends MovieClip {
private var _root:Object;
public var BossHead1:boss7head;
public var BossHead2:boss7head;
public var BossHead3:boss7head;
private var speed:int;// = 4
private var shotpower:int;// = 300
private var puketimer:int;// = 0
public var boss1_levelback:MovieClip;
private var minipower:int;// = 40
private var total_life:int;// = 10000
private var batpower:int;// = 50
private var chainpower:int;// = 40
public var boss1level:MovieClip;
private var killcount:int;// = 10
private var life:int;
public function Boss7(){
life = total_life;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (((_root.exitlevel) || (_root.enemyDestroy))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((life < 7500)) && (!((BossHead1.currentFrame == 2))))){
BossHead1.gotoAndPlay("Dead");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
} else {
if (life <= 0){
BossHead1.visible = false;
};
};
if ((((life < 5000)) && (!((BossHead2.currentFrame == 2))))){
BossHead2.gotoAndPlay("Dead");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
} else {
if (life <= 0){
BossHead2.visible = false;
};
};
if ((((life < 2500)) && (!((BossHead3.currentFrame == 2))))){
BossHead3.gotoAndPlay("Dead");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
} else {
if (life <= 0){
BossHead3.visible = false;
};
};
if ((((this.x > (_root.mcMain.x + 250))) || ((this.x < (_root.mcMain.x - 250))))){
speed = (_root.mainSpeed + 2);
} else {
speed = (_root.mainSpeed - 2);
};
boss1level.width = (94 * (life / total_life));
if (this.currentFrame != 3){
if ((this.x + 20) <= _root.mcMain.x){
this.scaleX = -1;
x = (x + speed);
} else {
if ((this.x - 20) > _root.mcMain.x){
this.scaleX = 1;
x = (x - speed);
};
};
if (((((((this.y + 20) <= _root.mcMain.y)) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 5))))){
y = (y + 2);
} else {
if (((((((this.y - 20) > _root.mcMain.y)) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 5))))){
y = (y - 2);
};
};
};
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((_root.chainsawEquip == false)))) && ((_root.M16Equip == false)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (20 * this.scaleX));
if (((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))){
killcount = 0;
};
};
if (_root.spaceDown == false){
};
if ((((((((_root.weapon == 1)) && (_root.shot))) || ((((_root.weapon == 5)) && (_root.rail))))) && (_root.spaceDown))){
if ((((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
_root.shotsquelch2 = new ShotSquelch2();
_root.sfxSoundChannel = _root.shotsquelch2.play();
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 30)) / 450))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x + 30) - this.x)) / 450))));
};
this.x = (this.x + (20 * this.scaleX));
killcount = 0;
_root.shot = false;
_root.showsplat = true;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && ((puketimer < 200)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && ((puketimer < 200)))){
this.gotoAndStop("idle");
};
};
if (puketimer < 300){
puketimer++;
} else {
puketimer = 0;
};
if ((((puketimer > 250)) && ((life > 0)))){
if (this.currentFrame != 6){
this.gotoAndStop("puke");
_root.laser = new Laser();
_root.zomfxSoundChannel = _root.laser.play();
};
} else {
if ((((((puketimer > 199)) && (!((this.currentFrame == 5))))) && ((life > 0)))){
this.gotoAndStop("abouttopuke");
_root.laserwarmup = new LaserWarmUp();
_root.zomfxSoundChannel = _root.laserwarmup.play();
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 110))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 110))))))) && (_root.spaceDown))) && (!((this.currentFrame == 3))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - chainpower);
this.x = (this.x + (4 * this.scaleX));
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
killcount = 0;
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((((_root.weapon == 4)) || ((_root.weapon == 3)))))) && (((_root.mcMain.y + 65) > this.y)))) && (((_root.mcMain.y - 35) < this.y)))){
life = (life - minipower);
if (((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))){
killcount = 0;
};
} else {
if (_root.M16Equip){
killcount = 4;
};
};
if ((((life <= 0)) && (!((this.currentFrame == 3))))){
this.gotoAndStop("dead");
_root.score = (_root.score + 1);
_root.levelComplete = true;
boss1level.visible = false;
boss1_levelback.visible = false;
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.totalpoints = (_root.totalpoints + (20 * _root.multi));
};
if ((((((((((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) && (((_root.mcMain.y + 30) > this.y)))) && (((_root.mcMain.y - 23) < this.y)))) && (((_root.mcMain.x + 200) > this.x)))) && (((_root.mcMain.x - 200) < this.x)))) && ((((_root.chainsawEquip == false)) || ((((_root.chainsawEquip == true)) && ((_root.spaceDown == false)))))))){
if (this.currentFrame != 4){
this.gotoAndPlay("attack");
};
if (hitTestObject(_root.mcMain)){
if (_root.shield <= 0){
_root.life = (_root.life - 0.01);
} else {
_root.shield = (_root.shield - 0.02);
};
_root.charhurt = true;
};
} else {
if (this.currentFrame == 4){
this.gotoAndPlay("idle");
};
};
if ((((((((((this.currentFrame == 6)) && (((_root.mcMain.y + 20) > this.y)))) && (((_root.mcMain.y - 20) < this.y)))) && (((_root.mcMain.x + 300) > this.x)))) && (((_root.mcMain.x - 300) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.005);
} else {
_root.shield = (_root.shield - 0.01);
};
_root.charhurt = true;
};
};
}
function frame1(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 132
//boss7head (boss7head)
package {
import flash.display.*;
public dynamic class boss7head extends MovieClip {
public function boss7head(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 133
//burntcar (burntcar)
package {
import flash.events.*;
import flash.display.*;
public class burntcar extends MovieClip {
private var _root:Object;
public function burntcar(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((((((_root.level == 1)) || ((_root.level == 3)))) || ((_root.level == 4)))) || ((_root.level == 7)))){
this.gotoAndStop("level1");
} else {
if ((((_root.level == 2)) || ((_root.level == 5)))){
this.gotoAndStop("level2");
} else {
if (_root.level == 6){
this.gotoAndStop("level6");
};
};
};
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + (_root.mainSpeed + 1));
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - (_root.mainSpeed + 1));
};
};
if ((((this.x < (-(stage.stageWidth) / 2))) || ((this.x > (stage.stageWidth + (stage.stageWidth / 2)))))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (((_root.gameOver) || (_root.enemyDestroy))){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 134
//CashRegister (CashRegister)
package {
import flash.media.*;
public dynamic class CashRegister extends Sound {
}
}//package
Section 135
//Chainsaw (Chainsaw)
package {
import flash.events.*;
import flash.display.*;
public class Chainsaw extends MovieClip {
private var _root:Object;
public function Chainsaw(){
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - _root.mainSpeed);
};
};
if (this.x < 0){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (_root.gameOver){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
if (((hitTestObject(_root.mcMain)) && ((_root.gameOver == false)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
_root.chainsaw = 200;
_root.flamethrower = 0;
_root.minigun = 0;
_root.pickupammo = new PickUpAmmo();
_root.sfxSoundChannel = _root.pickupammo.play();
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 136
//ChainsawAttack (ChainsawAttack)
package {
import flash.media.*;
public dynamic class ChainsawAttack extends Sound {
}
}//package
Section 137
//ChainsawMotor (ChainsawMotor)
package {
import flash.media.*;
public dynamic class ChainsawMotor extends Sound {
}
}//package
Section 138
//Cop (Cop)
package {
import flash.events.*;
import flash.display.*;
public class Cop extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 20
private var batpower:int;// = 50
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 250
private var ylim:Number;
public function Cop(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 70;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 60))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
} else {
this.gotoAndStop("chainsaw");
_root.sawsquelch = new SawSquelch();
_root.zomfxSoundChannel = _root.sawsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 139
//Enemy (Enemy)
package {
import flash.events.*;
import flash.display.*;
public class Enemy extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 35
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 100
private var ylim:Number;
public function Enemy(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 200;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 60))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
} else {
this.gotoAndStop("chainsaw");
_root.sawsquelch = new SawSquelch();
_root.zomfxSoundChannel = _root.sawsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 140
//Enemy10 (Enemy10)
package {
import flash.events.*;
import flash.display.*;
public class Enemy10 extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 35
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 115
private var ylim:Number;
public function Enemy10(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 200;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 60))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
} else {
this.gotoAndStop("chainsaw");
_root.sawsquelch = new SawSquelch();
_root.zomfxSoundChannel = _root.sawsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 141
//Enemy2 (Enemy2)
package {
import flash.events.*;
import flash.display.*;
public class Enemy2 extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 35
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 100
private var ylim:Number;
public function Enemy2(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 200;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 60))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
} else {
this.gotoAndStop("chainsaw");
_root.sawsquelch = new SawSquelch();
_root.zomfxSoundChannel = _root.sawsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 142
//Enemy3 (Enemy3)
package {
import flash.events.*;
import flash.display.*;
public class Enemy3 extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 35
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 105
private var ylim:Number;
public function Enemy3(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 200;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 60))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
} else {
this.gotoAndStop("chainsaw");
_root.sawsquelch = new SawSquelch();
_root.zomfxSoundChannel = _root.sawsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 143
//Enemy4 (Enemy4)
package {
import flash.events.*;
import flash.display.*;
public class Enemy4 extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 35
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 105
private var ylim:Number;
public function Enemy4(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 200;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 60))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
} else {
this.gotoAndStop("chainsaw");
_root.sawsquelch = new SawSquelch();
_root.zomfxSoundChannel = _root.sawsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 144
//Enemy5 (Enemy5)
package {
import flash.events.*;
import flash.display.*;
public class Enemy5 extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 35
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 110
private var ylim:Number;
public function Enemy5(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 200;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 60))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
} else {
this.gotoAndStop("chainsaw");
_root.sawsquelch = new SawSquelch();
_root.zomfxSoundChannel = _root.sawsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 145
//Enemy6 (Enemy6)
package {
import flash.events.*;
import flash.display.*;
public class Enemy6 extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 35
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 110
private var ylim:Number;
public function Enemy6(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 200;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 60))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
} else {
this.gotoAndStop("chainsaw");
_root.sawsquelch = new SawSquelch();
_root.zomfxSoundChannel = _root.sawsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 146
//Enemy7 (Enemy7)
package {
import flash.events.*;
import flash.display.*;
public class Enemy7 extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 35
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 115
private var ylim:Number;
public function Enemy7(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 200;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 60))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
} else {
this.gotoAndStop("chainsaw");
_root.sawsquelch = new SawSquelch();
_root.zomfxSoundChannel = _root.sawsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 147
//Enemy8 (Enemy8)
package {
import flash.events.*;
import flash.display.*;
public class Enemy8 extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 35
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 115
private var ylim:Number;
public function Enemy8(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 200;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 60))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
} else {
this.gotoAndStop("chainsaw");
_root.sawsquelch = new SawSquelch();
_root.zomfxSoundChannel = _root.sawsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 148
//Enemy9 (Enemy9)
package {
import flash.events.*;
import flash.display.*;
public class Enemy9 extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 35
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 115
private var ylim:Number;
public function Enemy9(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 200;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 60))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
} else {
this.gotoAndStop("chainsaw");
_root.sawsquelch = new SawSquelch();
_root.zomfxSoundChannel = _root.sawsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 149
//FadeIn (FadeIn)
package {
import flash.events.*;
import flash.display.*;
public class FadeIn extends MovieClip {
private var _root:Object;
public function FadeIn(){
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function eFrame(_arg1:Event):void{
this.alpha = (this.alpha * 0.9);
if (this.alpha < 0.1){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 150
//Fatcop (Fatcop)
package {
import flash.events.*;
import flash.display.*;
public class Fatcop extends MovieClip {
private var _root:Object;
private var speed:int;// = 2
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 100
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 400
private var ylim:Number;
public function Fatcop(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 200;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 120))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 120))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
} else {
this.gotoAndStop("chainsaw");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 151
//FlameThrow (FlameThrow)
package {
import flash.media.*;
public dynamic class FlameThrow extends Sound {
}
}//package
Section 152
//Flamethrower (Flamethrower)
package {
import flash.events.*;
import flash.display.*;
public class Flamethrower extends MovieClip {
private var _root:Object;
public function Flamethrower(){
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - _root.mainSpeed);
};
};
if (this.x < 0){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (_root.gameOver){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
if (((hitTestObject(_root.mcMain)) && ((_root.gameOver == false)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
_root.flamethrower = 200;
_root.chainsaw = 0;
_root.minigun = 0;
_root.pickupammo = new PickUpAmmo();
_root.sfxSoundChannel = _root.pickupammo.play();
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 153
//Health (Health)
package {
import flash.events.*;
import flash.display.*;
public class Health extends MovieClip {
private var _root:Object;
public function Health(){
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - _root.mainSpeed);
};
};
if (this.x < 0){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (_root.gameOver){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
if (((hitTestObject(_root.mcMain)) && ((_root.gameOver == false)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
if (_root.life < 0.7){
_root.life = (_root.life + 0.3);
} else {
_root.life = 1;
};
_root.pickupammo = new PickUpAmmo();
_root.sfxSoundChannel = _root.pickupammo.play();
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 154
//Helmetpickup (Helmetpickup)
package {
import flash.events.*;
import flash.display.*;
public class Helmetpickup extends MovieClip {
private var _root:Object;
public function Helmetpickup(){
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - _root.mainSpeed);
};
};
if (this.x < 0){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (_root.gameOver){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
if (((hitTestObject(_root.mcMain)) && ((_root.gameOver == false)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
_root.shield = 1;
_root.pickupammo = new PickUpAmmo();
_root.sfxSoundChannel = _root.pickupammo.play();
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 155
//HurtChar (HurtChar)
package {
import flash.media.*;
public dynamic class HurtChar extends Sound {
}
}//package
Section 156
//Laser (Laser)
package {
import flash.media.*;
public dynamic class Laser extends Sound {
}
}//package
Section 157
//LaserWarmUp (LaserWarmUp)
package {
import flash.media.*;
public dynamic class LaserWarmUp extends Sound {
}
}//package
Section 158
//M16drop (M16drop)
package {
import flash.events.*;
import flash.display.*;
public class M16drop extends MovieClip {
private var _root:Object;
public function M16drop(){
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - _root.mainSpeed);
};
};
if (this.x < 0){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (_root.gameOver){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
if (((hitTestObject(_root.mcMain)) && ((_root.gameOver == false)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
_root.M16 = 200;
_root.flamethrower = 0;
_root.chainsaw = 0;
_root.pickupammo = new PickUpAmmo();
_root.sfxSoundChannel = _root.pickupammo.play();
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 159
//MachineGun (MachineGun)
package {
import flash.media.*;
public dynamic class MachineGun extends Sound {
}
}//package
Section 160
//mailbox (mailbox)
package {
import flash.events.*;
import flash.display.*;
public class mailbox extends MovieClip {
private var _root:Object;
public function mailbox(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame5(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.level == 1){
this.gotoAndStop("level1");
} else {
if ((((_root.level == 2)) || ((_root.level == 7)))){
this.gotoAndStop("level2");
} else {
if (_root.level == 3){
this.gotoAndStop("level3");
} else {
if (_root.level == 4){
this.gotoAndStop("level4");
} else {
if (_root.level == 5){
this.gotoAndStop("level5");
} else {
if (_root.level == 6){
this.gotoAndStop("level6");
};
};
};
};
};
};
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + (_root.mainSpeed + 3));
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - (_root.mainSpeed + 3));
};
};
if ((((this.x < (-(stage.stageWidth) / 2))) || ((this.x > (stage.stageWidth + (stage.stageWidth / 2)))))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (((_root.gameOver) || (_root.enemyDestroy))){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
};
}
function frame6(){
stop();
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 161
//Mascot (Mascot)
package {
import flash.events.*;
import flash.display.*;
public class Mascot extends MovieClip {
private var _root:Object;
private var speed:int;// = 1
private var shotpower:int;// = 85
private var minipower:int;// = 20
private var batpower:int;// = 50
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 250
private var ylim:Number;
public function Mascot(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 70;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 60))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.axechop = new AxeChop();
_root.zomfxSoundChannel = _root.axechop.play();
} else {
this.gotoAndStop("chainsaw");
_root.sawsquelch = new SawSquelch();
_root.zomfxSoundChannel = _root.sawsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 162
//mcmaintorso (mcmaintorso)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
public class mcmaintorso extends MovieClip {
var chainsawcount:Number;// = 0
var batswing:Boolean;// = false
var machineguncount:Number;// = 0
var reloadcount:int;// = 0
public var mainshotgun:MovieClip;
var railcount:int;// = 0
private var _root:Object;
var shottime:Boolean;// = false
var meleetime:Number;// = 10
var shotcount:int;// = 0
var chainblood:Number;// = 0
var flamethrowcount:Number;// = 0
var railtime:Boolean;// = false
var battime:Number;// = 0
var reloadtime:Boolean;
public var helmet:MovieClip;
public var mcchainblood:MovieClip;
public function mcmaintorso(){
addFrameScript(0, frame1, 2, frame3, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
this.gotoAndStop("idle");
}
function frame17(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.currentscreen != 4){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
if (_root.chainbloodflag){
chainblood = 6;
_root.chainbloodflag = false;
};
if (chainblood > 0){
chainblood--;
if (this.currentFrame == 8){
mcchainblood.visible = true;
} else {
_root.chainbloodflag = false;
mcchainblood.visible = false;
};
} else {
_root.chainbloodflag = false;
mcchainblood.visible = false;
};
if (_root.gameOver == true){
this.scaleX = 1;
shotcount = 0;
shottime = false;
batswing = false;
battime = 0;
reloadcount = 0;
reloadtime = false;
};
if (_root.weapon != 1){
_root.shot = false;
shottime = false;
shotcount = 0;
reloadtime = false;
reloadcount = 0;
};
if (_root.weapon != 0){
_root.batting = false;
batswing = false;
battime = 0;
};
if (shotcount > 2){
_root.shot = false;
};
if (battime < 1){
_root.batting = false;
} else {
if (battime > 4){
_root.batting = false;
} else {
_root.batting = true;
};
};
if ((((((((((((((batswing == false)) && ((_root.weapon == 1)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 2))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))){
this.gotoAndStop("idle");
} else {
if ((((_root.weapon == 0)) && ((batswing == false)))){
if (_root.melee == 0){
if (this.currentFrame != 11){
this.gotoAndStop("batidle");
};
} else {
if (_root.melee == 1){
if (this.currentFrame != 13){
this.gotoAndStop("axeidle");
};
};
};
};
};
if (_root.shield > 0){
helmet.visible = true;
} else {
helmet.visible = false;
};
if (((((_root.upDown) && ((_root.mcMain.y > 250)))) && ((_root.gameOver == false)))){
_root.mcMain.y = (_root.mcMain.y - _root.mainSpeed);
};
if (((((_root.downDown) && ((_root.mcMain.y < (stage.stageHeight - 58))))) && ((_root.gameOver == false)))){
_root.mcMain.y = (_root.mcMain.y + _root.mainSpeed);
};
if ((((((((_root.leftDown == true)) && ((_root.gameOver == false)))) && ((_root.progress <= 0)))) && ((_root.mcMain.x > 0)))){
_root.mcMain.x = (_root.mcMain.x - _root.mainSpeed);
_root.progress = (_root.progress - 1);
};
if ((((_root.rightDown == true)) && ((_root.progress <= 0)))){
_root.mcMain.x = (_root.mcMain.x + _root.mainSpeed);
_root.progress = (_root.progress + 1);
};
if ((((((((_root.leftDown == true)) && ((_root.gameOver == false)))) && ((_root.mcMain.x > 0)))) && ((_root.levelComplete == true)))){
_root.mcMain.x = (_root.mcMain.x - _root.mainSpeed);
_root.progress = (_root.progress - 1);
};
if ((((((_root.rightDown == true)) && ((_root.gameOver == false)))) && ((_root.levelComplete == true)))){
_root.mcMain.x = (_root.mcMain.x + _root.mainSpeed);
_root.progress = (_root.progress + 1);
};
if (_root.melee == 1){
meleetime = 8;
};
this.y = (_root.mcMain.y + 2);
this.x = _root.mcMain.x;
if ((((((((((this.currentFrame == 11)) || ((this.currentFrame == 13)))) && ((batswing == false)))) && (_root.spaceDown))) && ((_root.gameOver == false)))){
batswing = true;
};
if ((((batswing == true)) && ((battime < meleetime)))){
battime++;
if (((!((this.currentFrame == 12))) && ((_root.melee == 0)))){
this.gotoAndStop("batswing");
if (_root.weapon == 0){
_root.meleeswing = new MeleeSwing();
_root.sfxSoundChannel = _root.meleeswing.play();
};
} else {
if (((!((this.currentFrame == 14))) && ((_root.melee == 1)))){
this.gotoAndStop("axeswing");
if (_root.weapon == 0){
_root.meleeswing = new MeleeSwing();
_root.sfxSoundChannel = _root.meleeswing.play();
};
};
};
} else {
if (battime == meleetime){
batswing = false;
battime = 0;
};
};
if (((!((_root.weapon == 0))) || (_root.gameOver))){
batswing = false;
battime = 0;
};
if ((((((((_root.weapon == 5)) && (_root.spaceDown))) && ((railtime == false)))) && ((_root.gameOver == false)))){
_root.railgun = (_root.railgun - 1);
railtime = true;
};
if (((railtime) && ((_root.weapon == 5)))){
railcount = (railcount + 1);
};
if ((((((((railcount > 0)) && ((railcount < 8)))) && (railtime))) && ((_root.weapon == 5)))){
_root.rail = true;
if (this.currentFrame != 18){
this.gotoAndStop("railgunattack");
_root.railshot = new RailShot();
_root.sfxSoundChannel = _root.railshot.play();
};
} else {
if ((((railcount == 20)) && ((_root.weapon == 5)))){
if (this.currentFrame != 17){
this.gotoAndStop("railgunidle");
};
railcount = 0;
_root.rail = false;
railtime = false;
} else {
if (_root.weapon == 5){
_root.rail = false;
if (this.currentFrame != 17){
this.gotoAndStop("railgunidle");
};
};
};
};
if (railcount > 6){
_root.rail = false;
};
if (this.currentFrame == 2){
_root.clip = (_root.clip - 1);
};
if ((((((((((((((_root.weapon == 1)) && ((reloadtime == false)))) && (_root.spaceDown))) && ((shottime == false)))) && ((_root.clip > 0)))) && (!((this.currentFrame == 5))))) && ((_root.gameOver == false)))){
_root.shotshell = true;
shottime = true;
_root.shot = true;
_root.shotgunblast = new ShotGunBlast();
_root.sfxSoundChannel = _root.shotgunblast.play();
};
if (((shottime) && (!((this.currentFrame == 5))))){
shotcount = (shotcount + 1);
};
if ((((((((((shotcount > 0)) && ((shotcount < 10)))) && (shottime))) && ((reloadtime == false)))) && ((_root.weapon == 1)))){
if (this.currentFrame == 1){
this.gotoAndPlay("shoot");
};
} else {
if ((((shotcount == 10)) && ((batswing == false)))){
if (_root.weapon == 1){
this.gotoAndStop("idle");
};
shotcount = 0;
shottime = false;
};
};
if (((((((((((((_root.rDown) && ((((shottime == false)) || ((shotcount > 3)))))) && ((reloadtime == false)))) && ((_root.ammo > 0)))) && ((_root.clip < 8)))) && ((_root.gameOver == false)))) && ((_root.weapon == 1)))){
shottime = false;
shotcount = 0;
reloadtime = true;
if (((!((this.currentFrame == 5))) && ((batswing == false)))){
this.gotoAndPlay("reload");
_root.shotgunreload = new ShotGunReload();
_root.sfxSoundChannel = _root.shotgunreload.play();
};
if (((((_root.rDown) && ((_root.ammo >= (_root.startclip - _root.clip))))) && ((_root.gameOver == false)))){
_root.ammo = (_root.ammo - (_root.startclip - _root.clip));
_root.clip = _root.startclip;
_root.rDown = false;
} else {
if (((_root.rDown) && ((_root.ammo < (_root.startclip - _root.clip))))){
_root.clip = (_root.clip + _root.ammo);
_root.ammo = 0;
_root.rDown = false;
};
};
};
if (reloadtime){
reloadcount = (reloadcount + 1);
};
if ((((((_root.weapon == 1)) && ((reloadcount == 11)))) && ((batswing == false)))){
this.gotoAndStop("idle");
reloadcount = 0;
reloadtime = false;
};
if ((((_root.weapon == 2)) && ((_root.gameOver == false)))){
if ((((_root.spaceDown == true)) && ((batswing == false)))){
_root.chainsaw = (_root.chainsaw - 0.7);
if (this.currentFrame != 8){
this.gotoAndStop("chainsawattack");
chainsawcount = 0;
};
if (chainsawcount > 7){
_root.sfxSoundChannel.stop();
chainsawcount = 0;
};
if (chainsawcount == 0){
_root.chainsawattack = new ChainsawAttack();
_root.sfxSoundChannel = _root.chainsawattack.play();
chainsawcount++;
} else {
chainsawcount++;
};
} else {
if (this.currentFrame != 7){
if (_root.sfxSoundChannel != null){
_root.sfxSoundChannel.stop();
};
this.gotoAndStop("chainsawequip");
chainsawcount = 0;
};
if (chainsawcount > 6){
chainsawcount = 0;
};
if ((((chainsawcount == 0)) && ((_root.gameOver == false)))){
_root.chainsawmotor = new ChainsawMotor();
_root.sfxSoundChannel = _root.chainsawmotor.play();
chainsawcount++;
} else {
chainsawcount++;
};
};
};
if ((((_root.weapon == 4)) && ((_root.gameOver == false)))){
if ((((((_root.spaceDown == true)) && ((_root.flamethrower > 0)))) && ((batswing == false)))){
_root.flamethrower = (_root.flamethrower - 2);
if (this.currentFrame != 16){
this.gotoAndStop("flamethrowerattack");
flamethrowcount = 0;
};
if (flamethrowcount > 7){
flamethrowcount = 0;
};
if (flamethrowcount == 0){
_root.flamethrow = new FlameThrow();
_root.sfxSoundChannel = _root.flamethrow.play();
flamethrowcount++;
} else {
flamethrowcount++;
};
} else {
if (this.currentFrame != 15){
this.gotoAndStop("flamethroweridle");
};
};
};
if ((((_root.weapon == 3)) && ((_root.gameOver == false)))){
if (_root.spaceDown == true){
_root.M16 = (_root.M16 - 1);
if (this.currentFrame != 10){
this.gotoAndStop("M16attack");
};
if (machineguncount > 10){
machineguncount = 0;
};
if (machineguncount == 0){
machineguncount++;
_root.machinegun = new MachineGun();
_root.sfxSoundChannel = _root.machinegun.play();
} else {
machineguncount++;
};
} else {
if (this.currentFrame != 9){
this.gotoAndStop("M16equip");
};
if (_root.sfxSoundChannel != null){
_root.sfxSoundChannel.stop();
};
machineguncount = 0;
};
};
if ((((((_root.faceRight == true)) && (_root.leftDown))) && ((_root.rightDown == false)))){
this.scaleX = (this.scaleX * -1);
} else {
if ((((((_root.faceRight == false)) && (_root.rightDown))) && ((_root.leftDown == false)))){
this.scaleX = (this.scaleX * -1);
};
};
if (_root.gameOver){
this.gotoAndStop("gameover");
};
};
}
function frame11(){
stop();
}
function frame12(){
stop();
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame14(){
stop();
}
function frame15(){
stop();
}
function frame16(){
stop();
}
function frame10(){
stop();
}
function frame18(){
stop();
}
function frame13(){
stop();
}
function frame1(){
stop();
}
function frame5(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame8(){
stop();
}
function frame9(){
stop();
}
function frame3(){
stop();
}
}
}//package
Section 163
//MeleeSwing (MeleeSwing)
package {
import flash.media.*;
public dynamic class MeleeSwing extends Sound {
}
}//package
Section 164
//Music2 (Music2)
package {
import flash.media.*;
public dynamic class Music2 extends Sound {
}
}//package
Section 165
//Music3 (Music3)
package {
import flash.media.*;
public dynamic class Music3 extends Sound {
}
}//package
Section 166
//Music4 (Music4)
package {
import flash.media.*;
public dynamic class Music4 extends Sound {
}
}//package
Section 167
//NewgroundsAPIAsset_big_popup_background (NewgroundsAPIAsset_big_popup_background)
package {
import flash.display.*;
public dynamic class NewgroundsAPIAsset_big_popup_background extends MovieClip {
public var tl:MovieClip;
public var br:MovieClip;
public var tr:MovieClip;
public var l:MovieClip;
public var shadow:MovieClip;
public var r:MovieClip;
public var b:MovieClip;
public var bl:MovieClip;
public var t:MovieClip;
public var c:MovieClip;
}
}//package
Section 168
//NGLoader (NGLoader)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.errors.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class NGLoader extends MovieClip {
public const AUTO_PLAY:Boolean = false;
public var playButton:SimpleButton;
public var ngButton:SimpleButton;
public var bar:MovieClip;
public var initialized:Boolean;
public var loadingComplete:Boolean;
public function NGLoader(){
addFrameScript(0, frame1, 1, frame2);
}
public function ngButtonClickHandler(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.newgrounds.com"), "_blank");
}
function frame2(){
stop();
if (((playButton) && (!(playButton.hasEventListener(MouseEvent.CLICK))))){
playButton.addEventListener(MouseEvent.CLICK, playButtonClickHandler, false, 0, true);
};
}
public function startMovie():void{
cleanup();
if (((root) && ((root is MovieClip)))){
MovieClip(root).play();
};
dispatchEvent(new Event(Event.COMPLETE));
}
public function init():void{
if (initialized){
return;
};
initialized = true;
stop();
if (((root) && ((root is MovieClip)))){
MovieClip(root).stop();
};
loadingComplete = false;
ngButton.addEventListener(MouseEvent.CLICK, ngButtonClickHandler, false, 0, true);
addEventListener(Event.ENTER_FRAME, enterFrameHandler, false, 0, true);
if (meetsVersion([9, 0, 28, 0])){
addEventListener(Event.REMOVED_FROM_STAGE, cleanup, false, 0, true);
};
enterFrameHandler();
}
public function cleanup(_arg1:Event=null){
if (initialized){
ngButton.removeEventListener(MouseEvent.CLICK, ngButtonClickHandler);
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
if (meetsVersion([9, 0, 28, 0])){
removeEventListener(Event.REMOVED_FROM_STAGE, cleanup);
};
};
initialized = false;
}
public function playButtonClickHandler(_arg1:Event=null):void{
startMovie();
}
public function meetsVersion(_arg1:Array):Boolean{
var _local2:Array = String(Capabilities.version.split(" ")[1]).split(",");
var _local3:uint;
while (_local3 < _arg1.length) {
if (uint(_local2[_local3]) > _arg1[_local3]){
return (true);
};
if (uint(_local2[_local3]) < _arg1[_local3]){
return (false);
};
_local3++;
};
return (true);
}
public function enterFrameHandler(_arg1:Event=null):void{
var _local2:Number;
if (!loadingComplete){
_local2 = 0;
if (loaderInfo){
_local2 = (loaderInfo.bytesLoaded / loaderInfo.bytesTotal);
};
if (bar){
bar.scaleX = _local2;
};
if (_local2 == 1){
loadingComplete = true;
if (AUTO_PLAY){
startMovie();
} else {
gotoAndPlay("loaded");
};
};
};
}
function frame1(){
initialized = false;
init();
}
}
}//package
Section 169
//PickUpAmmo (PickUpAmmo)
package {
import flash.media.*;
public dynamic class PickUpAmmo extends Sound {
}
}//package
Section 170
//Puke (Puke)
package {
import flash.media.*;
public dynamic class Puke extends Sound {
}
}//package
Section 171
//Pus (Pus)
package {
import flash.events.*;
import flash.display.*;
public class Pus extends MovieClip {
private var _root:Object;
private var speed:Number;// = 0
public function Pus(){
addFrameScript(14, frame15);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame15(){
gotoAndPlay(9);
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - _root.mainSpeed);
};
};
speed = (speed + 0.1);
this.y = (this.y + speed);
this.x = (this.x + (_root.mainSpeed + 10));
if ((((this.x < (-(stage.stageWidth) / 2))) || ((this.x > (stage.stageWidth + (stage.stageWidth / 2)))))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (hitTestObject(_root.mcMain)){
_root.life = (_root.life - 0.2);
_root.charhurt = true;
};
if (((((_root.gameOver) || (_root.enemyDestroy))) || (hitTestObject(_root.mcMain)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 172
//PusSound (PusSound)
package {
import flash.media.*;
public dynamic class PusSound extends Sound {
}
}//package
Section 173
//Railgun (Railgun)
package {
import flash.events.*;
import flash.display.*;
public class Railgun extends MovieClip {
private var _root:Object;
public function Railgun(){
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - _root.mainSpeed);
};
};
if (this.x < 0){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (_root.gameOver){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
if (((hitTestObject(_root.mcMain)) && ((_root.gameOver == false)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
_root.railgun = 12;
_root.M16 = 0;
_root.flamethrower = 0;
_root.chainsaw = 0;
_root.pickupammo = new PickUpAmmo();
_root.sfxSoundChannel = _root.pickupammo.play();
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 174
//RailShot (RailShot)
package {
import flash.media.*;
public dynamic class RailShot extends Sound {
}
}//package
Section 175
//Runner (Runner)
package {
import flash.events.*;
import flash.display.*;
public class Runner extends MovieClip {
private var _root:Object;
private var speed:int;// = 4
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 100
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:Number;// = 200
private var ylim:Number;
public function Runner(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame8(){
stop();
}
function frame1(){
stop();
}
function frame10(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if (_root.melee == 1){
batpower = 200;
};
if (dead == false){
if (_root.spaceDown == false){
};
if ((((((_root.shot == true)) && ((_root.weapon == 1)))) && ((_root.clip > 0)))){
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x <= _root.mcMain.x)))))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && ((dead == false)))) && ((this.x > 0)))) && ((this.x < stage.stageWidth)))){
if ((((life > 0)) && ((killcount > 10)))){
if (_root.faceRight){
life = (life - (shotpower * (1 - (Number(((this.x - _root.mcMain.x) - 175)) / 180))));
} else {
life = (life - (shotpower * (1 - (Number(((_root.mcMain.x - 175) - this.x)) / 180))));
};
this.x = (this.x + (9 * this.scaleX));
killcount = 0;
};
};
};
if (killcount < 11){
killcount = (killcount + 1);
};
if ((((((((killcount <= 4)) && (!((this.currentFrame == 2))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndPlay("hurt");
} else {
if ((((((((((((((((((((life > 0)) && ((killcount > 4)))) && (!((this.currentFrame == 1))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 4))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))) && ((flaming == 0)))){
this.gotoAndStop("idle");
};
};
if ((((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 100))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 100))))))) && (_root.spaceDown))) && ((dead == false)))) && ((_root.weapon == 0)))) && (((_root.mcMain.y + 75) > this.y)))) && (((_root.mcMain.y - 75) < this.y)))) && (_root.batting))){
life = (life - batpower);
this.x = (this.x + (5 * this.scaleX));
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((this.currentFrame == 1)) || ((this.currentFrame == 4)))) || ((this.currentFrame == 8)))){
if ((((((this.y <= (_root.mcMain.y - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y + speed);
} else {
if ((((((this.y > (_root.mcMain.y + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
y = (y - speed);
};
};
if ((((((this.x <= (_root.mcMain.x - 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = -1;
x = (x + speed);
} else {
if ((((((this.x > (_root.mcMain.x + 15))) && ((_root.gameOver == false)))) && ((hitTestObject(_root.newBlockade) == false)))){
this.scaleX = 1;
x = (x - speed);
} else {
if ((((_root.gameOver == true)) && ((hitTestObject(_root.newBlockade) == false)))){
x = (x - (speed * this.scaleX));
};
};
};
};
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 120))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 120))))))) && (_root.spaceDown))) && ((((this.currentFrame == 1)) || ((this.currentFrame == 2)))))) && ((_root.weapon == 2)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
_root.chainbloodflag = true;
life = (life - chainpower);
if (((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))){
killcount = 0;
};
};
if ((((((((((((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 180))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && ((this.x > (_root.mcMain.x - 180))))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 4)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - flamepower);
flaming = 72;
};
if ((((flaming > 0)) && ((life > 0)))){
flaming = (flaming - 1);
life = (life - 5);
if (this.currentFrame != 8){
this.gotoAndStop("flaming");
};
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 5)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))) && (_root.rail))){
_root.showsplat = true;
life = 0;
};
if ((((((((((((((((_root.faceRight == true)) && ((this.x > _root.mcMain.x)))) || ((((_root.faceRight == false)) && ((this.x < _root.mcMain.x)))))) && (_root.spaceDown))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))) && ((_root.weapon == 3)))) && (((_root.mcMain.y + 55) > this.y)))) && (((_root.mcMain.y - 25) < this.y)))){
life = (life - minipower);
this.x = (this.x + (1 * this.scaleX));
if (((((((((((!((this.currentFrame == 2))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 10))))) && ((dead == false)))){
killcount = 0;
};
} else {
if (_root.weapon == 3){
killcount = 4;
};
};
if ((((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && (!((_root.weapon == 2))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if (((((_root.mcMain.y + 5) < this.y)) && ((_root.clip > 0)))){
this.gotoAndStop("headshot");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 0)))) && ((_root.M16 == false)))){
this.gotoAndStop("headshot");
_root.bathit = new BatHit();
_root.zomfxSoundChannel = _root.bathit.play();
_root.splatno++;
_root.showsplat = true;
} else {
if ((((((((_root.ammo <= 0)) && ((_root.clip <= 0)))) && ((_root.melee == 1)))) && ((_root.M16 == false)))){
this.gotoAndStop("decap");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
_root.splatno++;
_root.showsplat = true;
} else {
this.gotoAndStop("dead");
_root.shotsquelch2 = new ShotSquelch2();
_root.zomfxSoundChannel = _root.shotsquelch2.play();
if ((((((((_root.faceRight == true)) && ((_root.mcMain.x < this.x)))) && ((this.x < (_root.mcMain.x + 60))))) || ((((((_root.faceRight == false)) && ((_root.mcMain.x > this.x)))) && (((this.x + 60) > _root.mcMain.x)))))){
_root.splatno++;
_root.showsplat = true;
};
};
};
};
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((((((((((((((life <= 0)) && (!((this.currentFrame == 5))))) && (!((this.currentFrame == 3))))) && (!((this.currentFrame == 6))))) && (!((this.currentFrame == 7))))) && (!((this.currentFrame == 10))))) && ((flaming == 0)))) && (!((_root.weapon == 5))))){
if ((_root.mcMain.y + 5) < this.y){
this.gotoAndStop("decap");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
} else {
this.gotoAndStop("chainsaw");
_root.shotsquelch = new ShotSquelch();
_root.zomfxSoundChannel = _root.shotsquelch.play();
};
_root.splatno++;
_root.showsplat = true;
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
dead = true;
} else {
if ((((life <= 0)) && ((flaming > 0)))){
dead = true;
if (this.currentFrame != 9){
this.gotoAndStop("flamed");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
} else {
if ((((((life <= 0)) && ((_root.weapon == 5)))) && ((((((this.currentFrame == 1)) || ((this.currentFrame == 2)))) || ((this.currentFrame == 4)))))){
dead = true;
if (this.currentFrame != 10){
this.gotoAndStop("explode");
_root.score = (_root.score + 1);
_root.comboCount++;
_root.comboTimer = 0;
_root.totalpoints = (_root.totalpoints + (1 * _root.multi));
};
};
};
};
};
if ((((((((((((((_root.gameOver == false)) && ((((this.currentFrame == 1)) || ((this.currentFrame == 4)))))) && (((_root.mcMain.y + 50) > this.y)))) && (((_root.mcMain.y - 50) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))) && (((((!((_root.weapon == 2))) || ((((_root.weapon == 2)) && ((_root.spaceDown == false)))))) || ((((((_root.weapon == 2)) && ((_root.spaceDown == true)))) && ((((((this.x > _root.mcMain.x)) && ((_root.faceRight == false)))) || ((((this.x < _root.mcMain.x)) && ((_root.faceRight == true)))))))))))){
if (((!((this.currentFrame == 4))) && ((flaming == 0)))){
this.gotoAndPlay("attack");
};
if (((((((((_root.mcMain.y + 25) > this.y)) && (((_root.mcMain.y - 25) < this.y)))) && (((_root.mcMain.x + 60) > this.x)))) && (((_root.mcMain.x - 60) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.007);
} else {
_root.shield = (_root.shield - 0.014);
};
_root.charhurt = true;
};
} else {
if ((((this.currentFrame == 4)) && ((flaming == 0)))){
this.gotoAndPlay("idle");
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame5(){
stop();
}
function frame7(){
stop();
}
function frame9(){
stop();
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 176
//SawSquelch (SawSquelch)
package {
import flash.media.*;
public dynamic class SawSquelch extends Sound {
}
}//package
Section 177
//Scores (Scores)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
public class Scores extends MovieClip {
public var bigcomb:MovieClip;
public var txtScore:TextField;
public var fueltankback:MovieClip;
public var txtHighScore:TextField;
public var shieldbar:MovieClip;
public var lifebar:MovieClip;
public var comboword:MovieClip;
public var reload:MovieClip;
public var fuelbar:MovieClip;
public var fueltank:MovieClip;
public var fuelmask:MovieClip;
private var mySnd:Sound;
var music:Boolean;// = true
public var txtMulti:TextField;
private var mySnd2:Sound;
public var txtTotalPoints:TextField;
public var flamefueloutline:MovieClip;
public var hurtscreen:MovieClip;
private var mySnd3:Sound;
public var gameover:MovieClip;
private var _root:Object;
public var flamefuelback:MovieClip;
public var shieldback:MovieClip;
public var replaybutton:SimpleButton;
public var exitsign:MovieClip;
public var txtAmmo:TextField;
public var txtClip:TextField;
public var PauseScreen:MovieClip;
public var txtRailgun:TextField;
public var combostar:MovieClip;
public var flamefuel:MovieClip;
private var combotoll:int;// = 0
public var grimefilter:MovieClip;
private var hurtcount:Number;// = 0
private var mySndCh:SoundChannel;
private var ZSndCh:SoundChannel;
private var bossthemeflag:Boolean;// = false
public var txtMinigun:TextField;
public var multiget:MovieClip;
public var txtCombo:TextField;
public function Scores(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
addEventListener(Event.ADDED, beginClass);
hurtscreen.visible = false;
addEventListener(Event.ENTER_FRAME, eFrame);
replaybutton.addEventListener(MouseEvent.CLICK, replaylevel);
PauseScreen.visible = false;
gameover.visible = false;
playMusic();
playZombieSound();
}
private function playMusic4():void{
mySnd = new Music4();
mySndCh = mySnd.play();
mySndCh.addEventListener(Event.SOUND_COMPLETE, loopMusic);
}
private function playMusic3():void{
mySnd = new Music3();
mySndCh = mySnd.play();
mySndCh.addEventListener(Event.SOUND_COMPLETE, loopMusic);
}
private function playMusic2():void{
mySnd2 = new Boss1Theme();
mySndCh = mySnd2.play();
mySndCh.addEventListener(Event.SOUND_COMPLETE, loopMusic);
}
function replaylevel(_arg1:MouseEvent):void{
if ((((_root.level == 1)) || ((_root.level == 4)))){
playMusic();
} else {
if ((((_root.level == 2)) || ((_root.level == 5)))){
playMusic4();
} else {
if ((((_root.level == 3)) || ((_root.level == 6)))){
playMusic3();
};
};
};
_root.gameOver = false;
_root.score = 0;
_root.progress = 0;
_root.currentprog = 0;
_root.levelComplete = false;
_root.life = 1;
_root.background1a.x = 0;
_root.chainsaw = 0;
_root.M16 = 0;
_root.clip = 8;
_root.ammo = 30;
_root.enemyDestroy = true;
_root.faceRight = true;
_root.mcMain.scaleX = 1;
_root.mcMain.y = 300;
_root.mcMain.x = (stage.stageWidth / 2);
_root.mcMain.gotoAndPlay("idle");
_root.difcurve = 0;
_root.enemyLimit = 60;
_root.copLimit = 300;
_root.mascotLimit = 1000;
_root.bossappear = false;
_root.blockadeappear = false;
_root.enemyTime = 60;
_root.copTime = 300;
_root.mascotTime = 1000;
_root.itemTime = 0;
_root.shot = false;
_root.rail = false;
_root.batting = false;
_root.chainsaw = 0;
_root.flamethrower = 0;
_root.railgun = 0;
_root.chainsawEquip = false;
_root.weapon = 1;
_root.shield = 0;
_root.M16 = 0;
_root.minigunEquip = false;
_root.cTime = 0;
_root.cLimit = 15;
_root.melee = 0;
_root.stopchar = false;
_root.totalpoints = 0;
_root.multi = 1;
}
function frame2(){
stop();
}
function frame5(){
stop();
}
private function eFrame(_arg1:Event):void{
if ((((_root.Paused == false)) && (_root.escDown))){
_root.escDown = false;
PauseScreen.visible = true;
_root.Paused = true;
} else {
if ((((_root.Paused == true)) && (_root.escDown))){
_root.escDown = false;
PauseScreen.visible = false;
_root.Paused = false;
};
};
if ((((_root.Paused == true)) && (_root.enterDown))){
stopMusic();
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
_root.Quit = true;
};
txtHighScore.text = ("" + _root.mySharedObject.data.highScore);
if (_root.totalpoints > _root.mySharedObject.data.highScore){
_root.mySharedObject.data.highScore = _root.totalpoints;
};
if (_root.charhurt == true){
if (hurtcount < 12){
hurtcount++;
} else {
hurtcount = 0;
hurtscreen.visible = false;
_root.charhurt = false;
};
};
if ((((hurtcount == 1)) && ((_root.gameOver == false)))){
_root.hurtchar = new HurtChar();
_root.sfxSoundChannel = _root.hurtchar.play();
};
if ((((_root.charhurt == true)) && ((_root.gameOver == false)))){
hurtscreen.visible = true;
} else {
hurtscreen.visible = false;
};
if (_root.comboCount == 0){
combotoll = 0;
} else {
if ((((_root.comboCount >= 10)) && ((combotoll == 0)))){
combotoll = 1;
_root.totalpoints = (_root.totalpoints + (50 * _root.multi));
bigcomb.play();
_root.cashregister = new CashRegister();
_root.sfxSoundChannel = _root.cashregister.play();
} else {
if ((((_root.comboCount >= 10)) && ((combotoll == 1)))){
combotoll = 2;
_root.totalpoints = (_root.totalpoints + (100 * _root.multi));
bigcomb.play();
_root.cashregister = new CashRegister();
_root.sfxSoundChannel = _root.cashregister.play();
} else {
if ((((_root.comboCount >= 30)) && ((combotoll == 2)))){
combotoll = 3;
_root.totalpoints = (_root.totalpoints + (150 * _root.multi));
bigcomb.play();
_root.cashregister = new CashRegister();
_root.sfxSoundChannel = _root.cashregister.play();
} else {
if ((((_root.comboCount >= 40)) && ((combotoll == 3)))){
combotoll = 4;
_root.totalpoints = (_root.totalpoints + (200 * _root.multi));
bigcomb.play();
_root.cashregister = new CashRegister();
_root.sfxSoundChannel = _root.cashregister.play();
};
};
};
};
};
if ((((_root.score >= 100)) && ((_root.multi == 1)))){
_root.multi = 2;
multiget.play();
_root.cashregister = new CashRegister();
_root.sfxSoundChannel = _root.cashregister.play();
} else {
if ((((_root.score >= 200)) && ((_root.multi == 2)))){
_root.multi = 3;
multiget.play();
_root.cashregister = new CashRegister();
_root.sfxSoundChannel = _root.cashregister.play();
} else {
if ((((_root.score >= 300)) && ((_root.multi == 3)))){
_root.multi = 4;
multiget.play();
_root.cashregister = new CashRegister();
_root.sfxSoundChannel = _root.cashregister.play();
} else {
if ((((_root.score >= 400)) && ((_root.multi == 4)))){
_root.multi = 5;
multiget.play();
_root.cashregister = new CashRegister();
_root.sfxSoundChannel = _root.cashregister.play();
} else {
if ((((_root.score >= 500)) && ((_root.multi == 5)))){
_root.multi = 6;
multiget.play();
_root.cashregister = new CashRegister();
_root.sfxSoundChannel = _root.cashregister.play();
};
};
};
};
};
if (_root.bossappear){
stopMusic();
playMusic2();
bossthemeflag = true;
_root.bossappear = false;
};
if (_root.levelComplete == true){
bossthemeflag = false;
stopMusic();
};
if (_root.exitlevel){
if (_root.level == 3){
playMusic();
} else {
if ((((_root.level == 1)) || ((_root.level == 4)))){
playMusic4();
} else {
if ((((_root.level == 2)) || ((_root.level == 5)))){
playMusic3();
};
};
};
_root.bossappear = false;
};
txtScore.text = ("X " + _root.score);
txtClip.text = ("" + _root.clip);
txtAmmo.text = ("" + _root.ammo);
txtMinigun.text = ("" + _root.M16);
txtRailgun.text = ("" + _root.railgun);
txtCombo.text = ("" + _root.comboCount);
txtTotalPoints.text = ("" + _root.totalpoints);
txtMulti.text = ("X" + _root.multi);
if (_root.gameOver == true){
stopMusic();
};
if (_root.comboCount > 1){
comboword.visible = true;
combostar.visible = true;
txtCombo.visible = true;
} else {
comboword.visible = false;
combostar.visible = false;
txtCombo.visible = false;
};
if ((((((((_root.ammo > 0)) || ((_root.clip > 0)))) && ((_root.weapon == 1)))) && (!((this.currentFrame == 1))))){
this.gotoAndStop("shotgun");
} else {
if ((((_root.weapon == 3)) && (!((this.currentFrame == 2))))){
this.gotoAndStop("minigun");
} else {
if ((((_root.weapon == 2)) && (!((this.currentFrame == 3))))){
this.gotoAndStop("chainsaw");
} else {
if ((((((((_root.ammo == 0)) && ((_root.clip == 0)))) && ((_root.weapon == 0)))) && (!((this.currentFrame == 4))))){
this.gotoAndStop("melee");
} else {
if ((((_root.weapon == 4)) && (!((this.currentFrame == 5))))){
this.gotoAndStop("flamethrower");
} else {
if ((((_root.weapon == 5)) && (!((this.currentFrame == 6))))){
this.gotoAndStop("railgun");
};
};
};
};
};
};
if (_root.levelComplete == true){
exitsign.visible = true;
} else {
exitsign.visible = false;
};
if (_root.gameOver == true){
replaybutton.y = -160;
} else {
replaybutton.y = 0;
};
if ((((((((_root.clip == 0)) && ((_root.ammo > 0)))) && ((_root.weapon == 1)))) && ((_root.Paused == false)))){
reload.y = -340;
} else {
reload.y = -500;
};
if (_root.life > 0){
lifebar.height = (110 * _root.life);
};
if (_root.shield > 0){
shieldbar.visible = true;
shieldback.visible = true;
shieldbar.height = (85 * _root.shield);
} else {
shieldbar.visible = false;
shieldback.visible = false;
};
if (_root.chainsaw > 0){
fuelbar.height = (60 * (_root.chainsaw / 200));
fueltank.visible = true;
fuelmask.visible = true;
fuelbar.visible = true;
fueltankback.visible = true;
} else {
fueltank.visible = false;
fuelmask.visible = false;
fuelbar.visible = false;
fueltankback.visible = false;
};
if (_root.weapon == 4){
flamefuel.visible = true;
flamefueloutline.visible = true;
flamefuelback.visible = true;
} else {
flamefuel.visible = false;
flamefueloutline.visible = false;
flamefuelback.visible = false;
};
if ((((_root.weapon == 4)) && ((_root.flamethrower > 0)))){
flamefuel.height = (70 * (_root.flamethrower / 200));
};
if (((_root.gameOver) && ((gameover.currentFrame == 1)))){
gameover.gotoAndPlay("start");
gameover.visible = true;
} else {
gameover.visible = false;
};
_root.setChildIndex(this, (_root.numChildren - 1));
}
private function loopZombieSound(_arg1:Event):void{
if (((!((ZSndCh == null))) && ((_root.levelComplete == false)))){
ZSndCh.removeEventListener(Event.SOUND_COMPLETE, loopMusic);
playZombieSound();
};
}
private function playZombieSound():void{
mySnd3 = new ZombieSound();
ZSndCh = mySnd3.play();
ZSndCh.addEventListener(Event.SOUND_COMPLETE, loopZombieSound);
}
private function playMusic():void{
mySnd = new Music2();
mySndCh = mySnd.play();
mySndCh.addEventListener(Event.SOUND_COMPLETE, loopMusic);
}
private function loopMusic(_arg1:Event):void{
if (mySndCh != null){
mySndCh.removeEventListener(Event.SOUND_COMPLETE, loopMusic);
if ((((((_root.level == 1)) || ((_root.level == 4)))) && ((bossthemeflag == false)))){
playMusic();
} else {
if ((((((_root.level == 2)) || ((_root.level == 5)))) && ((bossthemeflag == false)))){
playMusic4();
} else {
if ((((((_root.level == 3)) || ((_root.level == 6)))) && ((bossthemeflag == false)))){
playMusic3();
} else {
playMusic2();
};
};
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
private function stopMusic():void{
mySndCh.stop();
mySndCh.removeEventListener(Event.SOUND_COMPLETE, loopMusic);
}
function frame6(){
stop();
}
function frame4(){
stop();
}
}
}//package
Section 178
//Shell (Shell)
package {
import flash.events.*;
import flash.display.*;
import fl.transitions.*;
import fl.transitions.easing.*;
public class Shell extends MovieClip {
private var _root:Object;
var i:Number;// = 0
public function Shell(){
addFrameScript(18, frame19);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame19(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - _root.mainSpeed);
};
};
if (this.x < 0){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (_root.gameOver){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
if (i < 23){
i++;
} else {
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 179
//Shell1 (Shell1)
package {
import flash.events.*;
import flash.display.*;
import fl.transitions.*;
import fl.transitions.easing.*;
public class Shell1 extends MovieClip {
private var _root:Object;
var i:Number;// = 0
public function Shell1(){
addFrameScript(18, frame19);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame19(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - _root.mainSpeed);
};
};
if (this.x < 0){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (_root.gameOver){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
if (i < 23){
i++;
} else {
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 180
//ShotGunBlast (ShotGunBlast)
package {
import flash.media.*;
public dynamic class ShotGunBlast extends Sound {
}
}//package
Section 181
//ShotGunReload (ShotGunReload)
package {
import flash.media.*;
public dynamic class ShotGunReload extends Sound {
}
}//package
Section 182
//ShotSquelch (ShotSquelch)
package {
import flash.media.*;
public dynamic class ShotSquelch extends Sound {
}
}//package
Section 183
//ShotSquelch2 (ShotSquelch2)
package {
import flash.media.*;
public dynamic class ShotSquelch2 extends Sound {
}
}//package
Section 184
//Splat1 (Splat1)
package {
import flash.events.*;
import flash.display.*;
public class Splat1 extends MovieClip {
private var _root:Object;
private var i:Number;// = 0
public function Splat1(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame5(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
private function eFrame(_arg1:Event):void{
i++;
if (i > 35){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.splatContainer.removeChild(this);
_root.splatno--;
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 185
//telepole (telepole)
package {
import flash.events.*;
import flash.display.*;
public class telepole extends MovieClip {
private var _root:Object;
public function telepole(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if ((((_root.level == 1)) || ((_root.level == 7)))){
this.gotoAndStop("level1");
} else {
if ((((_root.level == 2)) || ((_root.level == 5)))){
this.gotoAndStop("level2");
} else {
if ((((((_root.level == 3)) || ((_root.level == 4)))) || ((_root.level == 6)))){
this.gotoAndStop("level3");
};
};
};
if ((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + (_root.mainSpeed + 4));
} else {
if ((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x - (_root.mainSpeed + 4));
};
};
if ((((this.x < (-(stage.stageWidth) / 2))) || ((this.x > (stage.stageWidth + (stage.stageWidth / 2)))))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
if (((_root.gameOver) || (_root.enemyDestroy))){
removeEventListener(Event.ENTER_FRAME, eFrame);
this.parent.removeChild(this);
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package
Section 186
//Theme (Theme)
package {
import flash.media.*;
public dynamic class Theme extends Sound {
}
}//package
Section 187
//UndeadTechno (UndeadTechno)
package {
import flash.media.*;
public dynamic class UndeadTechno extends Sound {
}
}//package
Section 188
//ZombieSound (ZombieSound)
package {
import flash.media.*;
public dynamic class ZombieSound extends Sound {
}
}//package
Section 189
//Zomtrolley (Zomtrolley)
package {
import flash.events.*;
import flash.display.*;
public class Zomtrolley extends MovieClip {
private var _root:Object;
private var speed:int;// = 10
private var shotpower:int;// = 85
private var minipower:int;// = 10
private var batpower:int;// = 100
private var xlim:Number;
private var chainpower:int;// = 40
private var i:Number;// = 0
private var dead:Boolean;// = false
private var flaming:Number;// = 0
private var killcount:int;// = 10
private var flamepower:int;// = 1
private var life:int;// = 100
private var ylim:Number;
public function Zomtrolley(){
addEventListener(Event.ADDED, beginClass);
addEventListener(Event.ENTER_FRAME, eFrame);
}
private function eFrame(_arg1:Event):void{
if (_root.Paused == false){
if (_root.enemyDestroy == true){
this.x = (this.x + (2 * stage.stageWidth));
};
if ((((((this.x > (stage.stageWidth + (stage.stageWidth / 2)))) || ((this.x < (-(stage.stageWidth) / 2))))) || ((i >= 150)))){
removeEventListener(Event.ENTER_FRAME, eFrame);
_root.removeChild(this);
};
this.x = (this.x - speed);
if ((((((((((((((_root.leftDown == false)) && ((_root.rightDown == true)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))) && ((((hitTestObject(_root.newBlockade) == false)) || (((hitTestObject(_root.newBlockade)) && (dead))))))){
x = (x - _root.mainSpeed);
} else {
if ((((((((((((_root.leftDown == true)) && ((_root.rightDown == false)))) && ((_root.gameOver == false)))) && ((_root.progress > 0)))) && ((_root.levelComplete == false)))) && ((_root.stopchar == false)))){
x = (x + _root.mainSpeed);
};
};
if ((((((((((_root.gameOver == false)) && (((_root.mcMain.y + 30) > this.y)))) && (((_root.mcMain.y - 30) < this.y)))) && (((_root.mcMain.x + 150) > this.x)))) && (((_root.mcMain.x - 150) < this.x)))){
if (_root.shield <= 0){
_root.life = (_root.life - 0.01);
} else {
_root.shield = (_root.shield - 0.02);
};
_root.charhurt = true;
_root.charhurt = true;
};
};
}
private function beginClass(_arg1:Event):void{
_root = MovieClip(root);
}
}
}//package