Section 1
//CryptScore (cryptScore.CryptScore)
package cryptScore {
import flash.display.*;
import flash.events.*;
public class CryptScore extends MovieClip implements ICryptScore {
private var bullshit1:int;
private var bullshit4:int;
private var bullshit2:int;
private var bullshit3:int;
private var scoreA:int;
private var scoreB:int;
public function CryptScore():void{
scoreA = Math.round(((Math.random() * 13371337) / 10));
bullshit1 = scoreA;
bullshit2 = -(bullshit1);
bullshit3 = (2 * bullshit2);
bullshit4 = (2 * bullshit3);
scoreB = -(scoreA);
addEventListener(Event.ENTER_FRAME, randomise);
}
private function randomise(_arg1:Event):void{
var _local2:int;
_local2 = (Math.round(((Math.random() * 13371337) / 10)) * ((2 * Math.round(Math.random())) - 1));
if ((((scoreA > (int.MAX_VALUE * 0.9))) || ((scoreB > (int.MAX_VALUE * 0.9))))){
_local2 = (_local2 - Math.round((int.MAX_VALUE * 0.5)));
};
scoreA = (scoreA + _local2);
scoreB = (scoreB - _local2);
}
public function (_arg1:int):void{
scoreB = (scoreB + ((_arg1 - 1) * (scoreA + scoreB)));
}
public function get value():int{
return (((scoreA + scoreB) / 2));
}
public function add(_arg1:int):void{
scoreB = (scoreB + (2 * _arg1));
}
public function
():void{
removeEventListener(Event.ENTER_FRAME, randomise);
}
public function set value(_arg1:int):void{
scoreB = (-(scoreA) + (2 * _arg1));
}
}
}//package cryptScore
Section 2
//ICryptScore (cryptScore.ICryptScore)
package cryptScore {
public interface ICryptScore {
function add(_arg1:int):void;
function set value(_arg1:int):void;
function (_arg1:int):void;
function get value():int;
function
():void;
}
}//package cryptScore
Section 3
//StandardStuff (general.StandardStuff)
package general {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import mochi.*;
import flash.system.*;
public class StandardStuff {
public static const STAGE_WIDTH = 640;
public static const MOCHI_LINK_URL = "http://x.mochiads.com/link/";
public static const PUBLISH_YEAR = "2009";
public static const MOCHI_LEADERBOARD_ID_HARD = "52be9051aa2840a1";
public static const DOMAIN_LOCK_TO:Array = [];
public static const MOCHI_LINK_MENU = "";
public static const STAGE_HEIGHT = 480;
public static const MOCHI_AD_GAME_ID = "e440e9ee77f6c9f6";
public static const TEST_MODE = false;
public static const MOCHI_LINK_SPLASH = "";
public static const GAME_NAME = "SAS: Zombie Assault";
public static const MOCHI_LINK_FALLBACK_URL = "http://www.ninjakiwi.com";
public static const MOCHI_LINK_EXCLUSIVE = "";
public static const DOMAIN_LOCK_EXCLUDE:Array = [];
public static const MOCHI_LEADERBOARD_ID_NIGHTMARE = "e24788e0485350f1";
public static const MOCHI_LINK_ENABLE = true;
public static const MOCHI_LEADERBOARD_ID_NORMAL = "03cd01df827a7b34";
public static const MOCHI_BOT_GAME_ID = "36a64afa";
public static const MOCHI_LINK_INGAME = "";
public static const MOCHI_LINK_ENDGAME = "";
public static const MOCHI_SERVICES_ENABLE = true;
public static var MOCHI_ENABLE = true;
public static var MOCHI_AD_ENABLE = true;
public static var MOCHI_BOT_ENABLE = true;
public static var SHOW_SPLASH = true;
public static function SetContextMenu():ContextMenu{
var _local1:ContextMenu;
var _local2:ContextMenuItem;
var _local3:ContextMenuItem;
_local1 = new ContextMenu();
_local2 = new ContextMenuItem((GAME_NAME + " by Ninjakiwi"));
_local3 = new ContextMenuItem((("© " + PUBLISH_YEAR) + " Kaiparasoft Ltd"));
_local1.hideBuiltInItems();
_local1.customItems.push(_local2, _local3);
return (_local1);
}
public static function DomainLocked(_arg1:String):Boolean{
var _local2:Boolean;
_local2 = !(DomainOk(_arg1));
if (Capabilities.playerType == "External"){
_local2 = false;
} else {
if (((TEST_MODE) && ((Capabilities.playerType == "StandAlone")))){
_local2 = false;
};
};
return (_local2);
}
public static function MochiInit(_arg1:MovieClip){
if (MOCHI_ENABLE){
if (_arg1.hasOwnProperty("_mochiads_game_id")){
_arg1._mochiads_game_id = MOCHI_AD_GAME_ID;
};
if (MOCHI_SERVICES_ENABLE){
MochiServices.connect(MOCHI_AD_GAME_ID, _arg1);
};
};
if (MOCHI_BOT_ENABLE){
MochiBot.track(_arg1, MOCHI_BOT_GAME_ID);
};
}
public static function ShowSplash(_arg1:MovieClip, _arg2:MovieClip, _arg3:String){
var goMenu:*;
var splash = _arg1;
var caller = _arg2;
var onDoneLabel = _arg3;
if (SHOW_SPLASH){
goMenu = function (_arg1:Event){
if (splash.currentFrame == splash.totalFrames){
splash.stop();
splash.removeEventListener(Event.ENTER_FRAME, goMenu);
caller.gotoAndPlay(onDoneLabel);
};
};
caller.stop();
splash.visible = true;
splash.play();
if (MOCHI_LINK_ENABLE){
trace("yeah");
splash.buttonMode = true;
MochiServices.addLinkEvent((MOCHI_LINK_URL + MOCHI_LINK_SPLASH), MOCHI_LINK_FALLBACK_URL, splash);
};
splash.addEventListener(Event.ENTER_FRAME, goMenu);
};
}
public static function ShowMochiAd(_arg1){
if (MOCHI_AD_ENABLE){
MochiAd.showPreGameAd({clip:_arg1, id:MOCHI_AD_GAME_ID, res:"640x480", background:0, color:0xFF0000, outline:0xFF0000, no_bg:true});
};
}
public static function DomainOk(_arg1:String):Boolean{
var _local2:Boolean;
var _local3:String;
var _local4:String;
trace(("DOMAIN_LOCK_TO : " + DOMAIN_LOCK_TO));
if (DOMAIN_LOCK_TO.length > 0){
_local2 = false;
} else {
_local2 = true;
};
for each (_local3 in DOMAIN_LOCK_EXCLUDE) {
if (_arg1.indexOf(_local3) >= 0){
_local2 = false;
break;
};
};
for each (_local4 in DOMAIN_LOCK_TO) {
if (_arg1.indexOf(_local4) >= 0){
_local2 = true;
break;
};
};
return (_local2);
}
if (TEST_MODE){
SHOW_SPLASH = false;
MOCHI_ENABLE = true;
MOCHI_BOT_ENABLE = false;
MOCHI_AD_ENABLE = false;
};
}
}//package general
Section 4
//MochiBot (mochi.MochiBot)
package mochi {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package mochi
Section 5
//MochiDigits (mochi.MochiDigits)
package mochi {
public final class MochiDigits {
private var Sibling:MochiDigits;
private var Fragment:Number;
private var Encoder:Number;
public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{
Encoder = 0;
setValue(_arg1, _arg2);
}
public function set value(_arg1:Number):void{
setValue(_arg1);
}
public function reencode():void{
var _local1:uint;
_local1 = int((2147483647 * Math.random()));
Fragment = (Fragment ^ (_local1 ^ Encoder));
Encoder = _local1;
}
public function toString():String{
var _local1:String;
_local1 = String.fromCharCode((Fragment ^ Encoder));
if (Sibling != null){
_local1 = (_local1 + Sibling.toString());
};
return (_local1);
}
public function get value():Number{
return (Number(this.toString()));
}
public function setValue(_arg1:Number=0, _arg2:uint=0):void{
var _local3:String;
_local3 = _arg1.toString();
var _temp1 = _arg2;
_arg2 = (_arg2 + 1);
Fragment = (_local3.charCodeAt(_temp1) ^ Encoder);
if (_arg2 < _local3.length){
Sibling = new MochiDigits(_arg1, _arg2);
} else {
Sibling = null;
};
reencode();
}
public function (_arg1:Number):void{
value = (value + _arg1);
}
}
}//package mochi
Section 6
//MochiScores (mochi.MochiScores)
package mochi {
import flash.display.*;
import flash.text.*;
public class MochiScores {
private static var boardID:String;
public static var onErrorHandler:Object;
public static var onCloseHandler:Object;
public static function showLeaderboard(_arg1:Object=null):void{
var n:Number;
var options = _arg1;
if (options != null){
if (options.clip != null){
if ((options.clip is Sprite)){
MochiServices.setContainer(options.clip);
};
delete options.clip;
} else {
MochiServices.setContainer();
};
MochiServices.stayOnTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
} else {
if ((options.score is MochiDigits)){
options.score = options.score.value;
};
};
n = Number(options.score);
if (isNaN(n)){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(n) != n){
trace((("WARNING: Submitted score '" + options.score) + "' will be truncated"));
};
options.score = n;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
_local2 = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
_arg1 = Number(_arg1);
if (isNaN(_arg1)){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'"));
} else {
if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){
trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite"));
} else {
if (Math.floor(_arg1) != _arg1){
trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated"));
};
_arg1 = Number(_arg1);
};
};
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (_arg1 != null){
if (_arg1.error != null){
if (_arg1.error == true){
if (onErrorHandler != null){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
};
};
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi
Section 7
//MochiServices (mochi.MochiServices)
package mochi {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
public static var netupAttempted:Boolean = false;
private static var _sendChannel:LocalConnection;
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _listenChannel:LocalConnection;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _startTime:Number;
private static var _connecting:Boolean = false;
public static var onError:Object;
private static var _listenChannelName:String = "__ms_";
private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
public static var netup:Boolean = true;
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
onError("NotConnected");
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
public static function get connected():Boolean{
return (_connected);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (_clip != null){
if (_clip._queue != null){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:MovieClip;
var _local8:LocalConnection;
var _local9:String;
var _local10:ByteArray;
var _local11:ByteArray;
var _local12:uint;
var _local13:uint;
var _local14:Loader;
_local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
_local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
_local6 = [0, 64, 0, 0, 0];
_local7 = new MovieClip();
_local8 = new LocalConnection();
_local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime()));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
_local10 = new ByteArray();
_local11 = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
_local12 = ((_local3.length + _local11.length) + 4);
_local13 = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var vars:Object;
var avm1Click:DisplayObject;
var s:String;
var i:Number;
var x:String;
var req:URLRequest;
var loader:Loader;
var setURL:Function;
var err:Function;
var complete:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
vars = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
s = "?";
i = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
setURL = function (_arg1:String):void{
var _local2:Rectangle;
if (avm1Click){
btn.removeChild(avm1Click);
};
avm1Click = clickMovie(_arg1, onClick);
_local2 = btn.getBounds(btn);
btn.addChild(avm1Click);
avm1Click.x = _local2.x;
avm1Click.y = _local2.y;
avm1Click.scaleX = (0.01 * _local2.width);
avm1Click.scaleY = (0.01 * _local2.height);
};
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
setURL(burl);
};
complete = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
if (netup){
setURL((url + s));
} else {
setURL(burl);
};
if (!((netupAttempted) || (_connected))){
netupAttempted = true;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
};
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_listenChannel.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType != "application"){
Security.allowDomain("*");
Security.allowInsecureDomain("*");
};
};
return (_local2);
}
public static function getVersion():String{
return ("1.43");
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
if (_clip.parent != null){
Sprite(_clip.parent).removeChild(_clip);
};
}
private static function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "error":
_connected = false;
_listenChannel.connect(_listenChannelName);
break;
};
}
public static function get id():String{
return (_id);
}
private static function urlOptions(_arg1:Object):Object{
var _local2:Object;
var _local3:String;
var _local4:Array;
var _local5:Number;
var _local6:Array;
_local2 = {};
_local3 = _arg1.loaderInfo.parameters.mochiad_options;
if (_local3){
_local4 = _local3.split("&");
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5].split("=");
_local2[unescape(_local6[0])] = unescape(_local6[1]);
_local5++;
};
};
return (_local2);
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_arg1 != null){
if ((_arg1 is Sprite)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
private static function initComChannels():void{
if (!_connected){
_sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_listenChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_clip.onReceive = function (_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = this.client._callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
methodName = "";
obj = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete this.client._callbacks[cb];
};
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
trace("connected!");
_connecting = false;
_connected = true;
while (_clip._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function listen():void{
_listenChannel = new LocalConnection();
_listenChannel.client = _clip;
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
_listenChannel.allowDomain("*", "localhost");
_listenChannel.allowInsecureDomain("*", "localhost");
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var clipname:String;
var f:Function;
var req:URLRequest;
var vars:URLVariables;
var id = _arg1;
var clip = _arg2;
clipname = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
if (urlOptions(clip).servicesURL != undefined){
_servicesURL = urlOptions(clip).servicesURL;
};
MochiServices.allowDomains(_servicesURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
_loader = new Loader();
_timer = new Timer(1000, 0);
_startTime = getTimer();
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
f = function (_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999))));
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
req = new URLRequest(_servicesURL);
vars = new URLVariables();
vars.listenLC = _listenChannelName;
vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options;
req.data = vars;
_loader.load(req);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_clip._nextcallbackID = 0;
_clip._callbacks = {};
listen();
return (_clip);
}
public static function get clip():Object{
return (_container);
}
public static function bringToTop(_arg1:Event):void{
var e = _arg1;
if (MochiServices.clip != null){
if (MochiServices.childClip != null){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
};
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{
var mc:MovieClip;
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
mc = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
try {
parent[name] = mc;
} catch(e:Error) {
throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
mc["_name"] = name;
return (mc);
}
public static function connectWait(_arg1:TimerEvent):void{
if ((getTimer() - _startTime) > 10000){
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_timer.stop();
};
}
}
}//package mochi
Section 8
//background_54 (SAS_fla.background_54)
package SAS_fla {
import flash.display.*;
public dynamic class background_54 extends MovieClip {
public var badBulletHolder:MovieClip;
public var powerupHolder:MovieClip;
public var Spawn1:MovieClip;
public var Spawn3:MovieClip;
public var Spawn6:MovieClip;
public var Spawn7:MovieClip;
public var Spawn2:MovieClip;
public var Spawn8:MovieClip;
public var Spawn9:MovieClip;
public var Spawn4:MovieClip;
public var effectsHolder:MovieClip;
public var bulletHolder:MovieClip;
public var spook_mc:Spook;
public var Spawn5:MovieClip;
public var turretHolder:MovieClip;
public var mineHolder:MovieClip;
}
}//package SAS_fla
Section 9
//barricade_brace_inner_70 (SAS_fla.barricade_brace_inner_70)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class barricade_brace_inner_70 extends MovieClip {
public function barricade_brace_inner_70(){
addFrameScript(0, frame1, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
}
}//package SAS_fla
Section 10
//barricade_brick_inner_71 (SAS_fla.barricade_brick_inner_71)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class barricade_brick_inner_71 extends MovieClip {
public function barricade_brick_inner_71(){
addFrameScript(0, frame1, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
}
}//package SAS_fla
Section 11
//barricade_steel_inner_72 (SAS_fla.barricade_steel_inner_72)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class barricade_steel_inner_72 extends MovieClip {
public function barricade_steel_inner_72(){
addFrameScript(0, frame1, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
}
}//package SAS_fla
Section 12
//barricade_wire_inner_73 (SAS_fla.barricade_wire_inner_73)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class barricade_wire_inner_73 extends MovieClip {
public function barricade_wire_inner_73(){
addFrameScript(0, frame1, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
}
}//package SAS_fla
Section 13
//barricade_wood_inner_68 (SAS_fla.barricade_wood_inner_68)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class barricade_wood_inner_68 extends MovieClip {
public function barricade_wood_inner_68(){
addFrameScript(0, frame1, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
}
}//package SAS_fla
Section 14
//bonii_mc_95 (SAS_fla.bonii_mc_95)
package SAS_fla {
import flash.display.*;
import flash.text.*;
public dynamic class bonii_mc_95 extends MovieClip {
public var bmoney_txt:TextField;
public var bdamage_txt:TextField;
}
}//package SAS_fla
Section 15
//btn_awm_39 (SAS_fla.btn_awm_39)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class btn_awm_39 extends MovieClip {
public function btn_awm_39(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 16
//btn_barricade_44 (SAS_fla.btn_barricade_44)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class btn_barricade_44 extends MovieClip {
public function btn_barricade_44(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 17
//btn_l85_38 (SAS_fla.btn_l85_38)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class btn_l85_38 extends MovieClip {
public function btn_l85_38(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 18
//btn_m870_36 (SAS_fla.btn_m870_36)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class btn_m870_36 extends MovieClip {
public function btn_m870_36(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 19
//btn_mag_35 (SAS_fla.btn_mag_35)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class btn_mag_35 extends MovieClip {
public function btn_mag_35(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 20
//btn_mp5_37 (SAS_fla.btn_mp5_37)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class btn_mp5_37 extends MovieClip {
public function btn_mp5_37(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 21
//buyscreen_34 (SAS_fla.buyscreen_34)
package SAS_fla {
import flash.display.*;
import flash.text.*;
public dynamic class buyscreen_34 extends MovieClip {
public var back_btn:MovieClip;
public var btn_l85:MovieClip;
public var barr_mc:MovieClip;
public var btn_heavy:MovieClip;
public var btn_l96:MovieClip;
public var btn_turret:MovieClip;
public var btn_mine:MovieClip;
public var money_txt:TextField;
public var btn_l85a2:MovieClip;
public var btn_m870:MovieClip;
public var btn_mp5:MovieClip;
public var btn_awm:MovieClip;
public var btn_m1014:MovieClip;
public var btn_barricade:MovieClip;
public var btn_mp5n:MovieClip;
public var upgrade_txt:TextField;
public var barrCost_txt:TextField;
public var btn_FNmag:MovieClip;
public var reload_buyscreen_btn:MovieClip;
public var btn_mag:MovieClip;
}
}//package SAS_fla
Section 22
//Crosshairs_104 (SAS_fla.Crosshairs_104)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Crosshairs_104 extends MovieClip {
public function Crosshairs_104(){
addFrameScript(0, frame1, 64, frame65, 65, frame66);
}
function frame65(){
stop();
}
function frame1(){
stop();
}
function frame66(){
stop();
}
}
}//package SAS_fla
Section 23
//currentWeapon_103 (SAS_fla.currentWeapon_103)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class currentWeapon_103 extends MovieClip {
public function currentWeapon_103(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 24
//guninner_chainsaw_84 (SAS_fla.guninner_chainsaw_84)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class guninner_chainsaw_84 extends MovieClip {
public function guninner_chainsaw_84(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 25
//healthbar_93 (SAS_fla.healthbar_93)
package SAS_fla {
import flash.display.*;
public dynamic class healthbar_93 extends MovieClip {
public var healthBar:MovieClip;
}
}//package SAS_fla
Section 26
//hider_mc_108 (SAS_fla.hider_mc_108)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class hider_mc_108 extends MovieClip {
public function hider_mc_108(){
addFrameScript(0, frame1, 84, frame85, 119, frame120);
}
function frame85(){
parent.stopBGM();
}
function frame1(){
stop();
}
function frame120(){
stop();
parent.winGame();
}
}
}//package SAS_fla
Section 27
//Highscore_screen_1 (SAS_fla.Highscore_screen_1)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Highscore_screen_1 extends MovieClip {
public var back_btn:MovieClip;
public var play2_btn:MovieClip;
public var play1_btn:MovieClip;
public var play3_btn:MovieClip;
public function Highscore_screen_1(){
addFrameScript(0, frame1, 5, frame6);
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package SAS_fla
Section 28
//hint1_110 (SAS_fla.hint1_110)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class hint1_110 extends MovieClip {
public function hint1_110(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package SAS_fla
Section 29
//how_btn_22 (SAS_fla.how_btn_22)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class how_btn_22 extends MovieClip {
public function how_btn_22(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 30
//intro_10 (SAS_fla.intro_10)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class intro_10 extends MovieClip {
public function intro_10(){
addFrameScript(198, frame199);
}
function frame199(){
stop();
}
}
}//package SAS_fla
Section 31
//medals_112 (SAS_fla.medals_112)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class medals_112 extends MovieClip {
public function medals_112(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 32
//minimap_89 (SAS_fla.minimap_89)
package SAS_fla {
import flash.display.*;
public dynamic class minimap_89 extends MovieClip {
public var spook:MovieClip;
public var dotHolder:MovieClip;
}
}//package SAS_fla
Section 33
//more_btn_23 (SAS_fla.more_btn_23)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class more_btn_23 extends MovieClip {
public function more_btn_23(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 34
//muzzleFlash_78 (SAS_fla.muzzleFlash_78)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class muzzleFlash_78 extends MovieClip {
public function muzzleFlash_78(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SAS_fla
Section 35
//ownage_mc_33 (SAS_fla.ownage_mc_33)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class ownage_mc_33 extends MovieClip {
public var randomDeath:int;
public function ownage_mc_33(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
randomDeath = (Math.floor((Math.random() * 25)) + 1);
trace(randomDeath);
gotoAndStop(randomDeath);
}
}
}//package SAS_fla
Section 36
//painscreen_109 (SAS_fla.painscreen_109)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class painscreen_109 extends MovieClip {
public function painscreen_109(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SAS_fla
Section 37
//Performance_105 (SAS_fla.Performance_105)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Performance_105 extends MovieClip {
public var prevSecondTime:Number;
public var mBar:MovieClip;
public var secondTime:Number;
public var tf:TextField;
public var frames:Number;
public var time:Number;
public var mem:TextField;
public var frameTime:Number;
public var fps:String;
public var prevFrameTime:Number;
public var iBar:MovieClip;
public function Performance_105(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
prevFrameTime = getTimer();
prevSecondTime = getTimer();
frames = 0;
fps = "...";
}
function frame2(){
stop();
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onEnterFrame(_arg1:Event):void{
time = getTimer();
frameTime = (time - prevFrameTime);
secondTime = (time - prevSecondTime);
if (secondTime >= 1000){
fps = frames.toString();
frames = 0;
prevSecondTime = time;
} else {
frames++;
};
mBar.width = (System.totalMemory / 200000);
mem.text = ((Math.round((System.totalMemory / 100000)) / 10) + " MB");
prevFrameTime = time;
tf.text = (((fps + " FPS / ") + frameTime) + " MS");
iBar.scaleX = (iBar.scaleX - ((iBar.scaleX - (frameTime / 10)) / 5));
}
}
}//package SAS_fla
Section 38
//play_btn_2 (SAS_fla.play_btn_2)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class play_btn_2 extends MovieClip {
public function play_btn_2(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 39
//play2_btn_3 (SAS_fla.play2_btn_3)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class play2_btn_3 extends MovieClip {
public function play2_btn_3(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 40
//play3_btn_4 (SAS_fla.play3_btn_4)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class play3_btn_4 extends MovieClip {
public function play3_btn_4(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 41
//powerup_msg_98 (SAS_fla.powerup_msg_98)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class powerup_msg_98 extends MovieClip {
public function powerup_msg_98(){
addFrameScript(0, frame1, 40, frame41, 80, frame81, 120, frame121, 160, frame161);
}
function frame81(){
stop();
}
function frame161(){
stop();
}
function frame1(){
stop();
}
function frame41(){
stop();
}
function frame121(){
stop();
}
}
}//package SAS_fla
Section 42
//reload_buyscreen_btn_52 (SAS_fla.reload_buyscreen_btn_52)
package SAS_fla {
import flash.display.*;
public dynamic class reload_buyscreen_btn_52 extends MovieClip {
public var reload_mp5n_btn:MovieClip;
public var reload_m1014_btn:MovieClip;
public var reload_awm_btn:MovieClip;
public var reload_mag_btn:MovieClip;
public var reload_l85_btn:MovieClip;
}
}//package SAS_fla
Section 43
//screens_mc_30 (SAS_fla.screens_mc_30)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class screens_mc_30 extends MovieClip {
public var difficulty_txt:TextField;
public var replay_btn:MovieClip;
public var back_btn:MovieClip;
public var wave_txt:TextField;
public var score_txt:TextField;
public var ownage_message:MovieClip;
public var submit_btn:MovieClip;
public function screens_mc_30(){
addFrameScript(0, frame1, 1, frame2, 67, frame68, 180, frame181);
}
function frame181(){
stop();
parent.startWave();
}
function frame1(){
stop();
}
function frame2(){
ownage_message.gotoAndPlay(1);
}
function frame68(){
stop();
SAS(parent).updateDeathInfo();
}
}
}//package SAS_fla
Section 44
//spook_arm_76 (SAS_fla.spook_arm_76)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class spook_arm_76 extends MovieClip {
public var muzzleFlash:MovieClip;
public var inner:MovieClip;
public function spook_arm_76(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 45
//Submit_btn_25 (SAS_fla.Submit_btn_25)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Submit_btn_25 extends MovieClip {
public function Submit_btn_25(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 46
//Tracer_splatter_inner_167 (SAS_fla.Tracer_splatter_inner_167)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Tracer_splatter_inner_167 extends MovieClip {
public var randomSplatter:int;
public function Tracer_splatter_inner_167(){
addFrameScript(0, frame1);
}
function frame1(){
randomSplatter = (Math.floor((Math.random() * 14)) + 1);
gotoAndStop(randomSplatter);
}
}
}//package SAS_fla
Section 47
//Turret_41 (SAS_fla.Turret_41)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Turret_41 extends MovieClip {
public function Turret_41(){
addFrameScript(0, frame1, 1, frame2, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
deleteMe();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 48
//Turret_Heavy_45 (SAS_fla.Turret_Heavy_45)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Turret_Heavy_45 extends MovieClip {
public function Turret_Heavy_45(){
addFrameScript(0, frame1, 1, frame2, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
deleteMe();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 49
//Turret_Heavy_outermostInner_116 (SAS_fla.Turret_Heavy_outermostInner_116)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Turret_Heavy_outermostInner_116 extends MovieClip {
public function Turret_Heavy_outermostInner_116(){
addFrameScript(0, frame1, 1, frame2, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
parent.deleteMe();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 50
//Turret_outermostInner_114 (SAS_fla.Turret_outermostInner_114)
package SAS_fla {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Turret_outermostInner_114 extends MovieClip {
public function Turret_outermostInner_114(){
addFrameScript(0, frame1, 1, frame2, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
parent.deleteMe();
}
function frame2(){
stop();
}
}
}//package SAS_fla
Section 51
//AmbientSnd (AmbientSnd)
package {
import flash.media.*;
public dynamic class AmbientSnd extends Sound {
}
}//package
Section 52
//Baddie (Baddie)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
public class Baddie extends MovieClip {
var prevdestArray:Array;
var points:int;
var inside:Boolean;// = false
var dying:Boolean;// = false
var attackingTurret:Boolean;// = false
var currentHealth:int;// = 1
var yOff:int;// = 0
var beingHit:Boolean;// = false
var attackDistance:uint;
var speed:Number;
var canSeeSpook:Boolean;// = false
var spookSighting:Point;
var damage:uint;
var level:int;
var attackingBarricade:Barricade;
var attacking:Boolean;// = false
var type:int;
var dest:MovieClip;
var pointsMult:Number;// = 1
var totalHealth:int;// = 1
var dest2:MovieClip;
var frameCounter:uint;// = 0
var xOff:int;// = 0
var decisionFrame:Boolean;// = true
var game:SAS;
private static const BANSHEE_DAMAGE = 17;
private static const DECISION_INT = 4;
private static const LICHBOLT_RANGE = 100;
private static const GO_FOR_TURRETS = false;
private static const LICHBOLT_DAMAGE = 4;
private static const BADDIE_OFFSET = 10;
public function Baddie(){
totalHealth = 1;
currentHealth = 1;
pointsMult = 1;
frameCounter = 0;
decisionFrame = true;
xOff = 0;
yOff = 0;
attacking = false;
beingHit = false;
dying = false;
inside = false;
attackingTurret = false;
canSeeSpook = false;
super();
prevdestArray = new Array();
}
private function getNearestWP():MovieClip{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:MovieClip;
var _local6:int;
_local6 = 0;
while (_local6 < game.WPArray.length) {
_local1 = (game.WPArray[_local6].x - x);
_local2 = (game.WPArray[_local6].y - y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
if (_local6 == 0){
_local4 = _local3;
_local5 = game.WPArray[_local6];
};
if ((((prevdestArray[0] == game.WPArray[_local6])) || ((prevdestArray[1] == game.WPArray[_local6])))){
if (_local6 == 0){
_local5 = game.WPArray[1];
_local1 = (game.WPArray[1].x - x);
_local2 = (game.WPArray[1].y - y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
_local4 = _local3;
} else {
if (((((false) && ((game.WPArray[_local6].name == "ohGosh")))) && ((prevdestArray[(prevdestArray.length - 2)].name == "howdy")))){
_local5 = prevdestArray[(prevdestArray.length - 2)];
break;
};
};
} else {
if (((inside) && (game.WPArray[_local6].isWindow))){
} else {
if (_local3 < _local4){
_local4 = _local3;
_local5 = game.WPArray[_local6];
};
};
};
_local6++;
};
return (_local5);
}
private function zombieAttack(){
if (((!(dying)) && (!(game.spookIsDead)))){
if (((this.zombiedetect_mc.hitTestObject(game.spook.spookbody)) || ((((this is Lich)) && (!((this is Banshee))))))){
if (!attacking){
attacking = true;
gotoAndPlay("attack");
};
} else {
if ((this is Banshee)){
damageSpook(BANSHEE_DAMAGE);
killMe();
};
};
};
}
public function init(_arg1, _arg2, _arg3){
var _local4:Number;
game = _arg1;
type = _arg2;
level = _arg3;
_local4 = (Math.random() + 1.5);
switch (type){
case 1:
totalHealth = 270;
points = 10;
speed = _local4;
attackDistance = 45;
damage = 2;
break;
case 2:
totalHealth = 240;
points = 15;
speed = (_local4 + 1.5);
attackDistance = 45;
damage = 2;
break;
case 3:
totalHealth = 2000;
points = 50;
speed = (_local4 - 0.5);
attackDistance = 50;
damage = 8;
break;
case 4:
totalHealth = 100;
points = 50;
speed = _local4;
attackDistance = 50;
damage = 1;
break;
case 5:
totalHealth = 2500;
points = 100;
speed = (_local4 + 2);
attackDistance = 300;
damage = 4;
break;
case 6:
totalHealth = 190;
points = 0;
speed = (_local4 * 1.5);
attackDistance = 45;
damage = 1;
break;
default:
trace("monster type fucknuckle");
};
totalHealth = (totalHealth * game.difficulty);
currentHealth = totalHealth;
if (game.mode == "nightmare"){
speed = (speed * 1.2);
};
xOff = (Math.random() * BADDIE_OFFSET);
yOff = (Math.random() * BADDIE_OFFSET);
}
private function zombieMove(){
var _local1:int;
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (spookSighting){
_local1 = ((spookSighting.x - x) + xOff);
_local2 = ((spookSighting.y - y) + yOff);
} else {
_local1 = ((dest.x - x) + xOff);
_local2 = ((dest.y - y) + yOff);
};
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
if (_local3 == 0){
trace("poo");
_local3 = 0.001;
};
_local4 = (_local1 / _local3);
_local5 = (_local2 / _local3);
x = (x + (_local4 * speed));
y = (y + (_local5 * speed));
if (decisionFrame){
if (spookSighting){
rotation = (((Math.atan2((_local2 - yOff), (_local1 - xOff)) * 180) / Math.PI) + 90);
} else {
rotation = (((Math.atan2(_local2, _local1) * 180) / Math.PI) + 90);
};
};
}
private function detectSpook(){
var _local1:int;
var _local2:Rectangle;
var _local3:Point;
var _local4:Point;
canSeeSpook = true;
_local1 = 0;
while (_local1 < game.obsArray.length) {
_local2 = game.obsArray[_local1].getRect(game.backGround);
_local3 = new Point(x, y);
_local4 = new Point(game.spook.x, game.spook.y);
if (game.LineIntersectsRect(_local3, _local4, _local2)){
canSeeSpook = false;
break;
};
_local1++;
};
if (canSeeSpook){
if (spookSighting == null){
spookSighting = new Point();
};
spookSighting.x = game.spook.x;
spookSighting.y = game.spook.y;
attackingTurret = false;
};
}
private function getNearestSentry():MovieClip{
var _local1:Number;
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:int;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local4 = 0;
while (_local4 < game.backGround.turretHolder.numChildren) {
_local3 = game.backGround.turretHolder.getChildAt(_local4);
_local5 = (_local3.x - x);
_local6 = (_local3.y - y);
_local7 = ((_local5 * _local5) + (_local6 * _local6));
if (_local4 == 0){
_local1 = _local7;
_local2 = _local3;
};
if (_local7 < _local1){
_local1 = _local7;
_local2 = _local3;
};
_local4++;
};
return (_local2);
}
private function lichStrike(){
var _local1:LichBolt;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
var _local8:*;
_local1 = new LichBolt();
_local2 = (game.spook.x - x);
_local3 = (game.spook.y - y);
rotation = (((Math.atan2(_local3, _local2) * 180) / Math.PI) + 90);
_local4 = this.bulletPoint.x;
_local5 = this.bulletPoint.y;
_local6 = ((rotation * Math.PI) / 180);
_local7 = ((_local4 * Math.cos(_local6)) - (_local5 * Math.sin(_local6)));
_local8 = ((_local5 * Math.cos(_local6)) + (_local4 * Math.sin(_local6)));
_local1.init(game, LICHBOLT_DAMAGE, 0, this.rotation, LICHBOLT_RANGE);
_local1.x = (this.x + _local7);
_local1.y = (this.y + _local8);
_local1.rotation = this.rotation;
game.backGround.badBulletHolder.addChild(_local1);
}
private function smashBarricade(){
var _local1:int;
var _local2:Sound;
var _local3:SoundChannel;
if (attackingBarricade){
if (!attacking){
attacking = true;
gotoAndPlay("attack");
};
} else {
if (!inside){
_local1 = 0;
while (_local1 < game.barrArray.length) {
if (((!(game.barrArray[_local1].barricadeDead)) || ((this is Banshee)))){
if (this.zombiedetect_mc.hitTestObject(game.barrArray[_local1].barricade_hitBit)){
if ((this is Banshee)){
game.removeBarricade(game.barrArray[_local1]);
dying = true;
_local2 = new BarrSmashedSnd();
_local3 = _local2.play(0, 1);
gotoAndPlay("death");
game.removeDot(this);
} else {
attacking = true;
attackingBarricade = game.barrArray[_local1];
gotoAndPlay("attack");
};
break;
};
};
_local1++;
};
};
};
}
private function detectSentry():Boolean{
var _local1:Boolean;
var _local2:int;
var _local3:Rectangle;
var _local4:Point;
var _local5:Point;
if (dest2 != null){
_local1 = true;
_local2 = 0;
while (_local2 < game.obsArray.length) {
_local3 = game.obsArray[_local2].getRect(game.backGround);
_local4 = new Point(x, y);
_local5 = new Point(dest2.x, dest2.y);
if (game.LineIntersectsRect(_local4, _local5, _local3)){
_local1 = false;
break;
} else {
_local1 = true;
};
_local2++;
};
if (((!(attacking)) && (_local1))){
attackingTurret = false;
};
return (_local1);
//unresolved jump
};
return (false);
}
private function visitedWP(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:int;
if (spookSighting){
_local1 = ((spookSighting.x - x) + xOff);
_local2 = ((spookSighting.y - y) + yOff);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
if (_local3 <= speed){
spookSighting = null;
};
};
_local4 = 0;
while (_local4 < game.WPArray.length) {
_local1 = ((game.WPArray[_local4].x - x) + xOff);
_local2 = ((game.WPArray[_local4].y - y) + yOff);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
if (_local3 <= ((speed * DECISION_INT) * 2)){
if (game.WPArray[_local4] == prevdestArray[(prevdestArray.length - 1)]){
break;
};
decisionFrame = true;
if (game.WPArray[_local4].isWindow){
inside = true;
};
if (prevdestArray.length < 2){
prevdestArray.push(game.WPArray[_local4]);
} else {
prevdestArray.splice(0, 1);
prevdestArray.push(game.WPArray[_local4]);
};
break;
};
_local4++;
};
}
private function raiseSkellies(){
var _local1:uint;
var _local2:uint;
var _local3:uint;
var _local4:Sound;
var _local5:SoundChannel;
var _local6:uint;
_local1 = 22;
_local2 = (Math.floor((Math.random() * 4)) + 2);
_local3 = (((_local2 - 1) * _local1) / 2);
_local4 = new SkelSnd();
_local5 = _local4.play(0, 1);
_local6 = 0;
while (_local6 < _local2) {
game.spawnBaddie(6, ((x - _local3) + (_local6 * _local1)), ((y - _local3) + (_local6 * _local1)));
_local6++;
};
}
public function doHit(){
var _local1:Sound;
var _local2:SoundChannel;
var _local3:Sound;
var _local4:SoundChannel;
if (attackingBarricade){
if (!attackingBarricade.fuxxored){
attackingBarricade.barricade_inner.gotoAndPlay("hit");
attackingBarricade.currentHealth = (attackingBarricade.currentHealth - damage);
if (Barricade.level == 5){
currentHealth = (currentHealth - Barricade.BARBIE_DAM);
pointsMult = Barricade.POINTS_MULT;
};
if (attackingBarricade.currentHealth <= 0){
attacking = false;
attackingBarricade.barricadeDead = true;
_local3 = new BarrSmashedSnd();
_local4 = _local3.play(0, 1);
attackingBarricade.gotoAndStop("busted");
attackingBarricade = null;
};
} else {
attackingBarricade = null;
};
} else {
if ((this is Lich)){
if (Math.random() < 0.2){
raiseSkellies();
} else {
lichStrike();
};
} else {
if (((!(game.spookIsDead)) && (!(game.menuOut)))){
damageSpook(damage);
};
};
};
}
public function deleteMe(){
stop();
game.removeZombie(this);
game = null;
}
public function killMe(){
dying = true;
game.earnPoints(this);
gotoAndPlay("death");
}
public function update(){
var _local1:Sound;
var _local2:SoundChannel;
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (!dying){
if (currentHealth <= 0){
dying = true;
_local1 = new ZombieDieSnd();
_local2 = _local1.play(0, 1);
game.earnPoints(this);
gotoAndPlay("death");
} else {
if (decisionFrame){
detectSpook();
};
if (canSeeSpook){
_local3 = ((game.spook.x - x) + xOff);
_local4 = ((game.spook.y - y) + yOff);
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
if (_local5 > attackDistance){
dest = game.spook;
if (((!(beingHit)) || ((this is Fester)))){
zombieMove();
};
} else {
zombieAttack();
};
} else {
if (((GO_FOR_TURRETS) && ((game.backGround.turretHolder.numChildren > 0)))){
dest2 = getNearestSentry();
if (detectSentry()){
smashSentry();
if (!attackingTurret){
dest = dest2;
if (((!(beingHit)) || ((this is Fester)))){
zombieMove();
};
};
};
} else {
dest2 = null;
smashBarricade();
if (!attackingBarricade){
if (decisionFrame){
visitedWP();
};
if (((decisionFrame) && (!(spookSighting)))){
dest = getNearestWP();
};
if (((!(beingHit)) || ((this is Fester)))){
zombieMove();
};
};
};
};
checkDecisionFrame();
};
};
}
private function smashSentry(){
var _local1:int;
var _local2:MovieClip;
if (game.backGround.turretHolder.numChildren > 0){
_local1 = 0;
while (_local1 < game.backGround.turretHolder.numChildren) {
_local2 = game.backGround.turretHolder.getChildAt(_local1);
if (this.zombiedetect_mc.hitTestObject(_local2)){
if (!attacking){
attacking = true;
attackingTurret = true;
gotoAndPlay("attack");
_local2.currentHealth = (_local2.currentHealth - damage);
if (_local2.currentHealth <= 0){
attacking = false;
attackingTurret = false;
game.backGround.turretHolder.removeChild(_local2);
_local2 = null;
};
};
break;
};
_local1++;
};
};
}
private function checkDecisionFrame(){
frameCounter++;
decisionFrame = ((frameCounter & (DECISION_INT - 1)) == 0);
}
private function damageSpook(_arg1:Number){
var _local2:Number;
hitSnd = new HitSnd();
hitSndChannel = hitSnd.play(0, 1);
game.painscreen.gotoAndPlay(2);
game.spook.currentHealth = (game.spook.currentHealth - _arg1);
_local2 = (game.spook.currentHealth / game.spook.totalHealth);
game.health_mc.healthBar.scaleX = _local2;
game.checkDeath();
}
}
}//package
Section 53
//Banshee (Banshee)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Banshee extends Baddie {
public function Banshee(){
addFrameScript(0, frame1, 10, frame11, 21, frame22);
}
function frame22(){
stop();
deleteMe();
}
function frame1(){
stop();
}
function frame11(){
gotoAndStop(1);
attacking = false;
beingHit = false;
}
}
}//package
Section 54
//BansheeSnd (BansheeSnd)
package {
import flash.media.*;
public dynamic class BansheeSnd extends Sound {
}
}//package
Section 55
//Barricade (Barricade)
package {
import flash.display.*;
import flash.events.*;
public class Barricade extends MovieClip {
var currentHealth:int;// = 35
var fuxxored:Boolean;// = false
var type:int;
var cost:int;
var totalHealth:int;// = 35
var barricadeDead:Boolean;// = false
var game:SAS;
public static const COST1:uint = 0;
public static const COST2:uint = 250;
public static const COST3:uint = 500;
public static const COST4:uint = 1000;
public static const COST5:uint = 2000;
public static const DESCRIPTION1:String = "Upgrade To Wooden Barricades";
public static const DESCRIPTION2:String = "Upgrade To Braced Barricades";
public static const DESCRIPTION3:String = "Upgrade To Brick Barricades";
public static const DESCRIPTION4:String = "Upgrade To Steel Barricades";
public static const DESCRIPTION5:String = "Upgrade To Razor Wire";
public static const POINTS_MULT = 0.8;
public static const COSTS:Array = [COST1, COST2, COST3, COST4, COST5, " bought"];
public static const DESCRIPTIONS:Array = [DESCRIPTION1, DESCRIPTION2, DESCRIPTION3, DESCRIPTION4, DESCRIPTION5];
public static const BARBIE_DAM = 10;
public static var level:uint = 1;
public function Barricade(){
totalHealth = 35;
currentHealth = 35;
barricadeDead = false;
fuxxored = false;
super();
}
public function updateHealth(_arg1){
switch (_arg1){
case 1:
totalHealth = 35;
currentHealth = 35;
break;
case 2:
totalHealth = 60;
currentHealth = 60;
break;
case 3:
totalHealth = 125;
currentHealth = 125;
break;
case 4:
totalHealth = 210;
currentHealth = 210;
break;
case 5:
totalHealth = 99999999;
currentHealth = 99999999;
break;
};
}
}
}//package
Section 56
//Barricade_wood (Barricade_wood)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Barricade_wood extends Barricade {
public function Barricade_wood(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 57
//Barrier (Barrier)
package {
import flash.display.*;
public dynamic class Barrier extends MovieClip {
}
}//package
Section 58
//BarrSmashedSnd (BarrSmashedSnd)
package {
import flash.media.*;
public dynamic class BarrSmashedSnd extends Sound {
}
}//package
Section 59
//Buckshot (Buckshot)
package {
public dynamic class Buckshot extends Bullet {
}
}//package
Section 60
//Bullet (Bullet)
package {
import flash.display.*;
import flash.events.*;
public class Bullet extends MovieClip {
var speedY:Number;
var :Number;
var :Boolean;// = false
var counter:int;// = 0
var AP:Boolean;// = false
var range:Number;
var speed:int;
var damage:Number;
var pointsMult:Number;
var deleteMarker:Boolean;// = false
var speedX:Number;
var game:SAS;
protected static const HITERATIONS = 4;
public function Bullet(){
counter = 0;
deleteMarker = false;
AP = false;
= false;
super();
}
public function init(_arg1:SAS, _arg2:int, _arg3:int, _arg4:Number, _arg5:Number, _arg6:Number=1){
var _local7:Number;
game = _arg1;
pointsMult = _arg6;
damage = _arg2;
range = _arg5;
if ((this is LichBolt)){
speed = 10;
} else {
speed = game.bulletSpeed;
};
_local7 = ((((_arg4 + _arg3) - 90) * Math.PI) / 180);
speedX = (Math.cos(_local7) * speed);
speedY = (Math.sin(_local7) * speed);
addEventListener(Event.ENTER_FRAME, update, false, 0, true);
}
public function deleteMe(){
stop();
removeEventListener(Event.ENTER_FRAME, update);
game.backGround.bulletHolder.removeChild(this);
game = null;
}
public function update(_arg1:Event){
var _local2:Number;
var _local3:Number;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:Number;
var _local8:Number;
if (x > 3000){
deleteMarker = true;
} else {
if (x < 0){
deleteMarker = true;
} else {
if (y > 3000){
deleteMarker = true;
} else {
if (y < 0){
deleteMarker = true;
} else {
_local2 = x;
_local3 = y;
_local4 = x;
_local5 = y;
_local4 = (_local4 + speedX);
_local5 = (_local5 + speedY);
_local6 = 1;
while (_local6 <= HITERATIONS) {
_local7 = ((_local4 - _local2) / 10);
_local8 = ((_local5 - _local3) / 10);
_local2 = (_local2 + _local7);
_local3 = (_local3 + _local8);
if (game.hitObjects((game.backGround.x + _local2), (game.backGround.y + _local3), this)){
deleteMarker = true;
spark(_local2, _local3);
break;
} else {
if (game.hitBaddies((game.backGround.x + _local2), (game.backGround.y + _local3), damage, null, pointsMult, AP)){
if (!AP){
deleteMarker = true;
};
bloodSplatter(_local2, _local3);
break;
};
};
_local6++;
};
x = _local4;
y = _local5;
if (counter < Math.floor(range)){
counter++;
} else {
if (counter >= Math.floor(range)){
counter = 0;
damage = (damage * 0.65);
};
};
};
};
};
};
if (deleteMarker){
deleteMe();
};
}
protected function bloodSplatter(_arg1, _arg2){
var _local3:MovieClip;
_local3 = new Splatter();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.rotation = this.rotation;
_local3.cacheAsBitmap = true;
game.backGround.effectsHolder.addChild(_local3);
}
protected function spark(_arg1, _arg2){
var _local3:MovieClip;
_local3 = new Spark();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.rotation = (Math.random() * 360);
_local3.cacheAsBitmap = true;
game.backGround.effectsHolder.addChild(_local3);
}
}
}//package
Section 61
//ChainSnd (ChainSnd)
package {
import flash.media.*;
public dynamic class ChainSnd extends Sound {
}
}//package
Section 62
//ClickSnd (ClickSnd)
package {
import flash.media.*;
public dynamic class ClickSnd extends Sound {
}
}//package
Section 63
//ColtSnd (ColtSnd)
package {
import flash.media.*;
public dynamic class ColtSnd extends Sound {
}
}//package
Section 64
//Crate (Crate)
package {
public dynamic class Crate extends Obstacles {
}
}//package
Section 65
//Doorpoint (Doorpoint)
package {
public dynamic class Doorpoint extends DP {
}
}//package
Section 66
//Dot_Baddie (Dot_Baddie)
package {
import flash.display.*;
public class Dot_Baddie extends MovieClip {
public var baddie:Baddie;
}
}//package
Section 67
//Dot_Banshee (Dot_Banshee)
package {
public dynamic class Dot_Banshee extends Dot_Baddie {
}
}//package
Section 68
//doublecashSnd (doublecashSnd)
package {
import flash.media.*;
public dynamic class doublecashSnd extends Sound {
}
}//package
Section 69
//doubledamageSnd (doubledamageSnd)
package {
import flash.media.*;
public dynamic class doubledamageSnd extends Sound {
}
}//package
Section 70
//DP (DP)
package {
import flash.display.*;
public dynamic class DP extends MovieClip {
}
}//package
Section 71
//DrySnd (DrySnd)
package {
import flash.media.*;
public dynamic class DrySnd extends Sound {
}
}//package
Section 72
//ErrSnd (ErrSnd)
package {
import flash.media.*;
public dynamic class ErrSnd extends Sound {
}
}//package
Section 73
//Fester (Fester)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Fester extends Baddie {
public function Fester(){
addFrameScript(9, frame10, 19, frame20, 42, frame43, 57, frame58);
}
function frame10(){
gotoAndStop(1);
attacking = false;
beingHit = false;
}
function frame20(){
doHit();
}
function frame43(){
attacking = false;
gotoAndStop(1);
}
function frame58(){
stop();
deleteMe();
}
}
}//package
Section 74
//FesterSnd (FesterSnd)
package {
import flash.media.*;
public dynamic class FesterSnd extends Sound {
}
}//package
Section 75
//GreyOutBit (GreyOutBit)
package {
import flash.display.*;
public dynamic class GreyOutBit extends MovieClip {
}
}//package
Section 76
//Gun (Gun)
package {
import flash.display.*;
public class Gun {
var recoil:int;
var coolDown:int;
var cost:int;
var maxAmmo:int;
var ammo:int;
var speed:int;
var burst:uint;
var bought:Boolean;// = false
var burstFired:uint;// = 0
var damage:int;
var type:int;
var range:Number;
public static const RELOAD_PRICE = 0.1;
public function Gun(_arg1:uint){
burstFired = 0;
bought = false;
super();
type = _arg1;
switch (type){
case 0:
range = 1.5;
recoil = 4;
speed = 7;
coolDown = 1;
burst = 1;
maxAmmo = 99999999;
ammo = 99999999;
damage = 41;
cost = 5;
break;
case 1:
range = 0.5;
recoil = 16;
speed = 10;
coolDown = 40;
burst = 1;
maxAmmo = 99999999;
ammo = 99999999;
damage = 124;
cost = -99999999;
break;
case 2:
range = 2;
recoil = 12;
speed = 3;
coolDown = 4;
burst = uint.MAX_VALUE;
maxAmmo = 99999999;
ammo = 99999999;
damage = 36;
cost = -99999999;
break;
case 3:
range = 7;
recoil = 1;
speed = 3;
coolDown = 10;
burst = 3;
maxAmmo = 99999999;
ammo = 99999999;
damage = 167;
cost = -99999999;
break;
case 4:
range = 10;
recoil = 0;
speed = 50;
coolDown = 50;
burst = 1;
maxAmmo = 99999999;
ammo = 99999999;
damage = 1250;
cost = -99999999;
break;
case 5:
range = 5;
recoil = 9;
speed = 4;
coolDown = 5;
burst = uint.MAX_VALUE;
maxAmmo = 99999999;
ammo = 99999999;
damage = 119;
cost = -99999999;
break;
case 6:
break;
default:
trace("weapon type fuckup");
};
}
}
}//package
Section 77
//HeartSnd (HeartSnd)
package {
import flash.media.*;
public dynamic class HeartSnd extends Sound {
}
}//package
Section 78
//HeavySnd (HeavySnd)
package {
import flash.media.*;
public dynamic class HeavySnd extends Sound {
}
}//package
Section 79
//HitBarrSnd (HitBarrSnd)
package {
import flash.media.*;
public dynamic class HitBarrSnd extends Sound {
}
}//package
Section 80
//HitSnd (HitSnd)
package {
import flash.media.*;
public dynamic class HitSnd extends Sound {
}
}//package
Section 81
//KnifeSnd (KnifeSnd)
package {
import flash.media.*;
public dynamic class KnifeSnd extends Sound {
}
}//package
Section 82
//L85Snd (L85Snd)
package {
import flash.media.*;
public dynamic class L85Snd extends Sound {
}
}//package
Section 83
//L96Snd (L96Snd)
package {
import flash.media.*;
public dynamic class L96Snd extends Sound {
}
}//package
Section 84
//LayMineSnd (LayMineSnd)
package {
import flash.media.*;
public dynamic class LayMineSnd extends Sound {
}
}//package
Section 85
//Lich (Lich)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Lich extends Baddie {
public function Lich(){
addFrameScript(0, frame1, 6, frame7, 11, frame12, 93, frame94, 108, frame109);
}
function frame94(){
attacking = false;
gotoAndStop(1);
}
function frame109(){
stop();
deleteMe();
}
function frame12(){
doHit();
}
function frame7(){
gotoAndStop(1);
attacking = false;
beingHit = false;
}
function frame1(){
stop();
}
}
}//package
Section 86
//LichBolt (LichBolt)
package {
import flash.display.*;
import flash.events.*;
public class LichBolt extends Bullet {
override public function deleteMe(){
stop();
removeEventListener(Event.ENTER_FRAME, update);
game.backGround.badBulletHolder.removeChild(this);
game = null;
}
override public function update(_arg1:Event){
var _local2:Number;
var _local3:Number;
var _local4:int;
var _local5:int;
var _local6:Number;
var _local7:Number;
if (x > 3000){
deleteMarker = true;
} else {
if (x < 0){
deleteMarker = true;
} else {
if (y > 3000){
deleteMarker = true;
} else {
if (y < 0){
deleteMarker = true;
} else {
_local2 = x;
_local3 = y;
_local4 = x;
_local5 = y;
_local4 = (_local4 + speedX);
_local5 = (_local5 + speedY);
_local6 = ((_local4 - _local2) / 10);
_local7 = ((_local5 - _local3) / 10);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
if (game.hitObjects((game.backGround.x + _local2), (game.backGround.y + _local3), this)){
deleteMarker = true;
spark(_local2, _local3);
} else {
if (game.hitSpook((game.backGround.x + _local2), (game.backGround.y + _local3), damage)){
deleteMarker = true;
bloodSplatter(_local2, _local3);
};
};
x = _local4;
y = _local5;
};
};
};
};
if (deleteMarker){
deleteMe();
};
}
}
}//package
Section 87
//LichSnd (LichSnd)
package {
import flash.media.*;
public dynamic class LichSnd extends Sound {
}
}//package
Section 88
//LoadSnd (LoadSnd)
package {
import flash.media.*;
public dynamic class LoadSnd extends Sound {
}
}//package
Section 89
//MagSnd (MagSnd)
package {
import flash.media.*;
public dynamic class MagSnd extends Sound {
}
}//package
Section 90
//maxammoSnd (maxammoSnd)
package {
import flash.media.*;
public dynamic class maxammoSnd extends Sound {
}
}//package
Section 91
//Mine (Mine)
package {
import flash.display.*;
public class Mine extends MovieClip {
var steppedOnMine:Boolean;// = false
var damage:int;// = 500
var damageRadius:int;// = 150
var game:SAS;
public static const PRICE = 200;
public function Mine(){
steppedOnMine = false;
damage = 500;
damageRadius = 150;
super();
addFrameScript(0, frame1, 10, frame11);
}
public function init(_arg1:SAS){
game = _arg1;
}
function frame1(){
stop();
}
function frame11(){
stop();
deleteMe();
}
public function deleteMe(){
stop();
game.removeMine(this);
game = null;
}
public function explode(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:int;
_local4 = 0;
while (_local4 < game.zombieArray.length) {
_local1 = (x - game.zombieArray[_local4].x);
_local2 = (y - game.zombieArray[_local4].y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
if (_local3 <= damageRadius){
if (((!(game.zombieArray[_local4].beingHit)) && (!(game.zombieArray[_local4].dying)))){
game.zombieArray[_local4].beingHit = true;
game.zombieArray[_local4].currentHealth = (game.zombieArray[_local4].currentHealth - damage);
game.zombieArray[_local4].gotoAndPlay("hit");
};
};
_local4++;
};
gotoAndPlay("explode");
}
}
}//package
Section 92
//MineSnd (MineSnd)
package {
import flash.media.*;
public dynamic class MineSnd extends Sound {
}
}//package
Section 93
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.7");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("dfeada81ac97cde83665f81c12da7def".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 94
//MP5Snd (MP5Snd)
package {
import flash.media.*;
public dynamic class MP5Snd extends Sound {
}
}//package
Section 95
//Obstacles (Obstacles)
package {
import flash.display.*;
public class Obstacles extends MovieClip {
var isBarrier:Boolean;// = false
var isSentry:Boolean;// = false
public function Obstacles(){
isBarrier = false;
isSentry = false;
super();
}
public function setBarrier(_arg1:Boolean){
isBarrier = _arg1;
}
public function setSentry(_arg1:Boolean){
isSentry = _arg1;
}
}
}//package
Section 96
//PlagueBearer (PlagueBearer)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class PlagueBearer extends Baddie {
public var attackNum:int;
public function PlagueBearer(){
addFrameScript(0, frame1, 9, frame10, 10, frame11, 20, frame21, 24, frame25, 34, frame35, 39, frame40, 55, frame56);
}
function frame10(){
gotoAndStop(1);
attacking = false;
beingHit = false;
}
function frame25(){
attacking = false;
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame21(){
doHit();
}
function frame11(){
attackNum = (Math.floor((Math.random() * 2)) + 1);
if (attackNum == 1){
gotoAndPlay("att1");
} else {
gotoAndPlay("att2");
};
}
function frame35(){
doHit();
}
function frame40(){
attacking = false;
gotoAndStop(1);
}
function frame56(){
stop();
deleteMe();
}
}
}//package
Section 97
//PlagueBearerSnd (PlagueBearerSnd)
package {
import flash.media.*;
public dynamic class PlagueBearerSnd extends Sound {
}
}//package
Section 98
//Powerup (Powerup)
package {
import flash.display.*;
import flash.events.*;
public class Powerup extends MovieClip {
var age:int;// = 0
public static const EXPIRY_DATE = 800;
public function Powerup(){
age = 0;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 99
//RepairSnd (RepairSnd)
package {
import flash.media.*;
public dynamic class RepairSnd extends Sound {
}
}//package
Section 100
//SAS (SAS)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import mochi.*;
import flash.geom.*;
import general.*;
import cryptScore.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
public dynamic class SAS extends MovieClip {
var left:Boolean;// = false
var currentWave:int;// = 1
var doublePoints:Boolean;// = false
var pointsFactor:Number;// = 1
public var wave_txt:TextField;
var doubleDamExpires:int;
var
:int;
var
:int;
var spawnPoints:int;// = 9
public var kaipara_btn:MovieClip;
var bulletSpeed:int;// = 50
var roundEnd:Boolean;// = false
var zoomLength:Number;// = 0.5
var down:Boolean;// = false
public var Crosshairs:MovieClip;
var gunRecoil:int;
var money:CryptScore;
var topEdge:int;// = 150
public var hider_mc:MovieClip;
var prevDamTime:int;
var gunDamage:int;
var bgTime:int;// = 0
var bgm:Sound;
var gunArray:Array;
var currentGun:Gun;
public var warning_mc:MovieClip;
var obsArray:Array;
var powerupTime:uint;// = 30000
public var backGround:MovieClip;
public var _mochiads_game_id;
var spookIsDead:Boolean;// = false
public var loadbar:MovieClip;
var menuOut:Boolean;// = false
var muteTransform:SoundTransform;
public var highScore_screen:MovieClip;
public var ammo_txt:TextField;
public var miniMap:MovieClip;
public var play3_btn:MovieClip;
var damageFactor:Number;// = 1
var mode:String;
public var submit_btn:MovieClip;
var detectionRange:int;// = 15
var hairTime:int;// = 0
public var how_btn:MovieClip;
var doublePointExpires:int;
var rightEdge:int;// = 440
var otherTime:int;// = 0
var attackSnd:Sound;
var isMainMenu:Boolean;
var zombieTime:int;// = 0
public var play2_btn:MovieClip;
var right:Boolean;// = false
var mute:Boolean;// = false
var waveData:WaveData;
public var health_mc:MovieClip;
var leftEdge:int;// = 200
public var money_txt:TextField;
public var more_btn:MovieClip;
public var buyscreen:MovieClip;
public var finalscore_txt:TextField;
var bottomEdge:int;// = 330
var score:CryptScore;
public var play1_btn:MovieClip;
var up:Boolean;// = false
public var exclusive:MovieClip;
var doubleDamage:Boolean;// = false
public var greyOutBit:GreyOutBit;
var
:int;
var burstInt:uint;// = 1000
var isShooting:Boolean;// = false
public var painscreen:MovieClip;
var currentWindow:Barricade;
var barrArray:Array;
var decisionFrame:Boolean;
var spookTime:int;// = 0
var WPArray:Array;
public var maxAmmo_txt:TextField;
var spook:MovieClip;
var bgmChannel:SoundChannel;
var finishGame:Boolean;// = false
public var preloader_txt:TextField;
public var score_txt:TextField;
public var screens_mc:MovieClip;
var bgmTransform:SoundTransform;
var gunCycle:int;
var prevPointTime:int;
var coolDown:uint;// = 1000
var spawnWait:uint;// = 0
var shootTime:int;// = 0
var prevTime:int;
public var highScore_btn:MovieClip;
var difficulty:Number;
public var introclip:MovieClip;
public var currentGun_mc:MovieClip;
var frameCounter:uint;// = 0
var zombieArray:Array;
public var powerup_mc:MovieClip;
var turretTime:int;// = 0
public var medal_mc:MovieClip;
public var hints_mc:MovieClip;
public var difficulty_txt:TextField;
public var bonii_mc:MovieClip;
var spookMove:int;// = 5
private static const POWERUP_CHANCE = 0.04;
private static const DECISION_INT = 8;
public function SAS(){
up = false;
left = false;
down = false;
right = false;
spawnWait = 0;
currentWave = 1;
spawnPoints = 9;
leftEdge = 200;
rightEdge = 440;
topEdge = 150;
bottomEdge = 330;
spookMove = 5;
detectionRange = 15;
zoomLength = 0.5;
pointsFactor = 1;
doubleDamage = false;
doublePoints = false;
frameCounter = 0;
powerupTime = 30000;
bulletSpeed = 50;
coolDown = 1000;
burstInt = 1000;
damageFactor = 1;
isShooting = false;
spookIsDead = false;
roundEnd = false;
menuOut = false;
finishGame = false;
shootTime = 0;
spookTime = 0;
hairTime = 0;
bgTime = 0;
zombieTime = 0;
turretTime = 0;
otherTime = 0;
bgm = new AmbientSnd();
bgmTransform = new SoundTransform(0.4);
mute = false;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 144, frame145, 145, frame146, 153, frame154);
muteTransform = new SoundTransform(1);
bgmChannel = bgm.play(0, int.MAX_VALUE, bgmTransform);
StandardStuff.MochiInit(this);
StandardStuff.ShowMochiAd(this);
this.contextMenu = StandardStuff.SetContextMenu();
greyOutBit.visible = false;
score = new CryptScore();
money = new CryptScore();
}
function initPlayBtns(){
isMainMenu = true;
screens_mc.visible = false;
buyscreen.visible = false;
play1_btn.buttonMode = true;
play1_btn.addEventListener(MouseEvent.ROLL_OVER, rollingOver);
play1_btn.addEventListener(MouseEvent.ROLL_OUT, rollingOut);
play1_btn.addEventListener(MouseEvent.CLICK, startGameEasy);
play2_btn.buttonMode = true;
play2_btn.addEventListener(MouseEvent.ROLL_OVER, rollingOver);
play2_btn.addEventListener(MouseEvent.ROLL_OUT, rollingOut);
play2_btn.addEventListener(MouseEvent.CLICK, startGameHard);
play3_btn.buttonMode = true;
play3_btn.addEventListener(MouseEvent.ROLL_OVER, rollingOver);
play3_btn.addEventListener(MouseEvent.ROLL_OUT, rollingOut);
play3_btn.addEventListener(MouseEvent.CLICK, startGameNightmare);
how_btn.buttonMode = true;
how_btn.addEventListener(MouseEvent.ROLL_OVER, rollingOver);
how_btn.addEventListener(MouseEvent.ROLL_OUT, rollingOut);
how_btn.addEventListener(MouseEvent.CLICK, howToPlay);
more_btn.buttonMode = true;
more_btn.addEventListener(MouseEvent.ROLL_OVER, rollingOver);
more_btn.addEventListener(MouseEvent.ROLL_OUT, rollingOut);
more_btn.addEventListener(MouseEvent.CLICK, gotoNinjaKiwi);
screens_mc.back_btn.buttonMode = true;
screens_mc.back_btn.addEventListener(MouseEvent.CLICK, backToGameEvent);
screens_mc.replay_btn.buttonMode = true;
screens_mc.replay_btn.addEventListener(MouseEvent.CLICK, replay);
submit_btn.buttonMode = true;
submit_btn.mouseEnabled = true;
submit_btn.mouseChildren = false;
submit_btn.addEventListener(MouseEvent.CLICK, submitScore);
screens_mc.submit_btn.buttonMode = true;
screens_mc.submit_btn.mouseEnabled = true;
screens_mc.submit_btn.mouseChildren = false;
screens_mc.submit_btn.addEventListener(MouseEvent.CLICK, submitScore);
highScore_btn.buttonMode = true;
highScore_btn.mouseEnabled = true;
highScore_btn.mouseChildren = false;
highScore_btn.addEventListener(MouseEvent.CLICK, showHighScoreMenu);
highScore_screen.play1_btn.buttonMode = true;
highScore_screen.play1_btn.addEventListener(MouseEvent.ROLL_OVER, rollingOver);
highScore_screen.play1_btn.addEventListener(MouseEvent.ROLL_OUT, rollingOut);
highScore_screen.play1_btn.addEventListener(MouseEvent.CLICK, showHighScoreNormal);
highScore_screen.play2_btn.buttonMode = true;
highScore_screen.play2_btn.addEventListener(MouseEvent.ROLL_OVER, rollingOver);
highScore_screen.play2_btn.addEventListener(MouseEvent.ROLL_OUT, rollingOut);
highScore_screen.play2_btn.addEventListener(MouseEvent.CLICK, showHighScoreHard);
highScore_screen.play3_btn.buttonMode = true;
highScore_screen.play3_btn.addEventListener(MouseEvent.ROLL_OVER, rollingOver);
highScore_screen.play3_btn.addEventListener(MouseEvent.ROLL_OUT, rollingOut);
highScore_screen.play3_btn.addEventListener(MouseEvent.CLICK, showHighScoreNightmare);
highScore_screen.back_btn.buttonMode = true;
highScore_screen.back_btn.addEventListener(MouseEvent.CLICK, hideHighScoreMenu);
}
function shoot(){
var _local1:Bullet;
var _local2:int;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:SoundChannel;
var _local11:int;
if (currentGun.ammo > 0){
_local1 = new Tracer();
_local2 = Math.floor(((Math.random() * gunRecoil) - (Math.random() * gunRecoil)));
currentGun.burstFired++;
_local3 = spook.bulletPoint.x;
_local4 = spook.bulletPoint.y;
_local5 = ((spook.rotation * Math.PI) / 180);
_local6 = ((_local3 * Math.cos(_local5)) - (_local4 * Math.sin(_local5)));
_local7 = ((_local4 * Math.cos(_local5)) + (_local3 * Math.sin(_local5)));
_local8 = (spook.x + _local6);
_local9 = (spook.y + _local7);
switch (currentGun.type){
case 0:
attackSnd = new ColtSnd();
_local1.init(this, gunDamage, _local2, spook.rotation, currentGun.range);
_local1.x = _local8;
_local1.y = _local9;
_local1.rotation = (spook.rotation + _local2);
spook.gun.muzzleFlash.gotoAndPlay("fire");
backGround.bulletHolder.addChild(_local1);
break;
case 1:
_local11 = 0;
while (_local11 < 7) {
_local1 = new Buckshot();
_local2 = Math.floor(((Math.random() * gunRecoil) - (Math.random() * gunRecoil)));
_local1.init(this, gunDamage, _local2, spook.rotation, currentGun.range);
_local1.AP = true;
_local1.x = _local8;
_local1.y = _local9;
_local1.rotation = (spook.rotation + _local2);
backGround.bulletHolder.addChild(_local1);
_local11++;
};
attackSnd = new ShotSnd();
spook.gun.muzzleFlash.gotoAndPlay("fire");
break;
case 2:
attackSnd = new MP5Snd();
_local1.init(this, gunDamage, _local2, spook.rotation, currentGun.range);
_local1.x = _local8;
_local1.y = _local9;
_local1.rotation = (spook.rotation + _local2);
spook.gun.muzzleFlash.gotoAndPlay("fire");
backGround.bulletHolder.addChild(_local1);
break;
case 3:
attackSnd = new L85Snd();
_local1.init(this, gunDamage, _local2, spook.rotation, currentGun.range);
_local1.x = _local8;
_local1.y = _local9;
_local1.rotation = (spook.rotation + _local2);
spook.gun.muzzleFlash.gotoAndPlay("fire");
backGround.bulletHolder.addChild(_local1);
break;
case 4:
attackSnd = new L96Snd();
_local1.init(this, gunDamage, _local2, spook.rotation, currentGun.range);
_local1.AP = true;
_local1.x = _local8;
_local1.y = _local9;
_local1.rotation = (spook.rotation + _local2);
spook.gun.muzzleFlash.gotoAndPlay("fire");
backGround.bulletHolder.addChild(_local1);
break;
case 5:
attackSnd = new MagSnd();
_local1.init(this, gunDamage, _local2, spook.rotation, currentGun.range);
_local1.x = _local8;
_local1.y = _local9;
_local1.rotation = (spook.rotation + _local2);
spook.gun.muzzleFlash.gotoAndPlay("fire");
backGround.bulletHolder.addChild(_local1);
break;
case 6:
trace("you have no chainsaw!!!");
break;
default:
trace("fuckup!");
};
currentGun.ammo--;
updateAmmo();
checkAmmo();
_local10 = attackSnd.play(0, 1);
if (currentGun.burstFired >= currentGun.burst){
isShooting = false;
};
coolDown = 0;
} else {
attackSnd = new DrySnd();
_local10 = attackSnd.play(0, 1);
isShooting = false;
};
}
function gotoNinjaKiwi(_arg1:MouseEvent){
var _local2:URLRequest;
_local2 = new URLRequest("http://www.ninjakiwi.com/");
navigateToURL(_local2, "_blank");
}
public function introTimer(_arg1:Event){
if (introclip.currentFrame == 199){
removeEventListener(Event.ENTER_FRAME, introTimer);
introclip.removeEventListener(MouseEvent.CLICK, redirect);
gotoAndStop("menu");
};
}
function initWinScreen(){
var _local1:uint;
difficulty_txt.text = ("difficulty: " + mode);
score.add(money.value);
finalscore_txt.text = ("score: " + score.value);
switch (mode){
case "normal":
_local1 = 1;
break;
case "hard":
_local1 = 2;
break;
default:
_local1 = 3;
};
medal_mc.gotoAndStop(_local1);
}
function resetUpgrades(){
Barricade.level = 1;
buyscreen.btn_m870.gotoAndStop(1);
buyscreen.btn_mp5.gotoAndStop(1);
buyscreen.btn_l85a2.gotoAndStop(1);
buyscreen.btn_l96.gotoAndStop(1);
buyscreen.btn_FNmag.gotoAndStop(1);
}
function frame1(){
}
function frame3(){
if (StandardStuff.SHOW_SPLASH){
stop();
addEventListener(Event.ENTER_FRAME, introTimer);
introclip.buttonMode = true;
introclip.addEventListener(MouseEvent.CLICK, redirect);
} else {
gotoAndStop("menu");
};
}
function frame4(){
stop();
if (StandardStuff.DomainLocked(loaderInfo.url)){
trace("OOOOIIIIIIIIIIIIIIIIIIII!!!!!!!!!!!!");
gotoAndStop("exclusive");
exclusive.buttonMode = true;
exclusive.addEventListener(MouseEvent.CLICK, gotoNinjaKiwi);
} else {
initPlayBtns();
};
}
function frame5(){
stop();
init();
}
function frame6(){
initWinScreen();
}
function LineIntersectsRect(_arg1:Point, _arg2:Point, _arg3:Rectangle):Boolean{
var _local4:Point;
var _local5:Point;
var _local6:Point;
var _local7:Point;
_local4 = new Point(_arg3.x, (_arg3.y + _arg3.height));
_local5 = new Point((_arg3.x + _arg3.width), _arg3.y);
_local6 = new Point(_arg3.x, _arg3.y);
_local7 = new Point((_arg3.x + _arg3.width), (_arg3.y + _arg3.height));
if ((((((((((((((((_arg1.x > _local4.x)) && ((_arg1.x < _local5.x)))) && ((_arg1.y < _local4.y)))) && ((_arg1.y > _local5.y)))) && ((_arg2.x > _local4.x)))) && ((_arg2.x < _local5.x)))) && ((_arg2.y < _local4.y)))) && ((_arg2.y > _local5.y)))){
return (true);
};
if (LineIntersectLine(_arg1, _arg2, _local6, _local4)){
return (true);
};
if (LineIntersectLine(_arg1, _arg2, _local4, _local7)){
return (true);
};
if (LineIntersectLine(_arg1, _arg2, _local6, _local5)){
return (true);
};
if (LineIntersectLine(_arg1, _arg2, _local5, _local7)){
return (true);
};
return (false);
}
public function preloader(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = stage.loaderInfo.bytesLoaded;
_local3 = stage.loaderInfo.bytesTotal;
_local4 = (_local2 / _local3);
_local5 = Math.floor((_local4 * 100));
loadbar.scaleX = _local4;
preloader_txt.text = (_local5 + "%");
if (_local2 >= _local3){
removeEventListener(Event.ENTER_FRAME, preloader);
gotoAndStop("intro");
};
}
function frame2(){
stop();
addEventListener(Event.ENTER_FRAME, preloader);
}
function showHighScoreNightmare(_arg1:MouseEvent){
showHighScores(StandardStuff.MOCHI_LEADERBOARD_ID_NIGHTMARE);
}
function buyUpgrade(_arg1:MouseEvent){
var _local2:String;
var _local3:Sound;
var _local4:Sound;
var _local5:SoundChannel;
var _local6:SoundChannel;
_local2 = _arg1.target.name;
_local3 = new ErrSnd();
_local4 = new LoadSnd();
switch (_local2){
case "btn_barricade":
if (money.value >= Barricade.COSTS[Barricade.level]){
upgradeBarricades();
backToGame();
} else {
_local5 = _local3.play(0, 1);
};
break;
case "btn_turret":
if (money.value >= Sentry.COST_LIGHT){
buySentry(1);
backToGame();
} else {
_local5 = _local3.play(0, 1);
};
break;
case "btn_heavy":
if (money.value >= Sentry.COST_HEAVY){
buySentry(2);
backToGame();
} else {
_local5 = _local3.play(0, 1);
};
break;
case "btn_mine":
if (money.value >= Mine.PRICE){
buyMine();
backToGame();
} else {
_local5 = _local3.play(0, 1);
};
break;
case "btn_m1014":
if (!gunArray[1].bought){
if (money.value >= gunArray[1].cost){
buyscreen.btn_m870.gotoAndStop(2);
buyGun(1);
backToGame();
} else {
_local5 = _local3.play(0, 1);
};
} else {
_local6 = _local4.play(0, 1);
changeGun(1);
backToGame();
};
break;
case "btn_mp5n":
if (!gunArray[2].bought){
if (money.value >= gunArray[2].cost){
buyscreen.btn_mp5.gotoAndStop(2);
buyGun(2);
backToGame();
} else {
_local5 = _local3.play(0, 1);
};
} else {
_local6 = _local4.play(0, 1);
changeGun(2);
backToGame();
};
break;
case "btn_l85":
if (!gunArray[3].bought){
if (money.value >= gunArray[3].cost){
buyscreen.btn_l85a2.gotoAndStop(2);
buyGun(3);
backToGame();
} else {
_local5 = _local3.play(0, 1);
};
} else {
_local6 = _local4.play(0, 1);
changeGun(3);
backToGame();
};
break;
case "btn_awm":
if (!gunArray[4].bought){
if (money.value >= gunArray[4].cost){
buyscreen.btn_l96.gotoAndStop(2);
buyGun(4);
backToGame();
} else {
_local5 = _local3.play(0, 1);
};
} else {
_local6 = _local4.play(0, 1);
changeGun(4);
backToGame();
};
break;
case "btn_mag":
if (!gunArray[5].bought){
if (money.value >= gunArray[5].cost){
buyscreen.btn_FNmag.gotoAndStop(2);
buyGun(5);
backToGame();
} else {
_local5 = _local3.play(0, 1);
};
} else {
_local6 = _local4.play(0, 1);
changeGun(5);
backToGame();
};
break;
case "btn_chain":
if (!gunArray[6].bought){
if (money.value >= gunArray[6].cost){
buyGun(6);
backToGame();
} else {
_local5 = _local3.play(0, 1);
};
} else {
_local6 = _local4.play(0, 1);
changeGun(6);
backToGame();
};
break;
};
}
function howToPlay(_arg1:MouseEvent){
trace("how to play");
helpScreen();
}
function update(_arg1:Event){
var _local2:int;
if (decisionFrame){
updateBonii();
};
if (((!(spookIsDead)) && (!(menuOut)))){
spawn();
if (burstInt < gunCycle){
burstInt++;
};
coolDown++;
if (((isShooting) && ((burstInt >= gunCycle)))){
burstInt = 0;
shoot();
};
updateSpook();
updateCrosshairs();
mouseScrollBG();
_local2 = 0;
while (_local2 < zombieArray.length) {
zombieArray[_local2].update();
_local2++;
};
_local2 = 0;
while (_local2 < backGround.turretHolder.numChildren) {
backGround.turretHolder.getChildAt(_local2).update();
_local2++;
};
updateMap();
mineHit();
if (decisionFrame){
checkPowerups();
};
};
checkDecisionFrame();
}
function rollingOver(_arg1:MouseEvent){
var _local2:Sound;
var _local3:SoundChannel;
_local2 = new ClickSnd();
_local3 = _local2.play(0, 1);
_arg1.target.gotoAndStop(2);
}
function repairBarricade(){
var _local1:Sound;
var _local2:SoundChannel;
if ((((currentWindow.currentHealth < currentWindow.totalHealth)) || (currentWindow.barricadeDead))){
_local1 = new RepairSnd();
_local2 = _local1.play(0, 1);
currentWindow.barricade_inner.gotoAndStop(1);
currentWindow.currentHealth = currentWindow.totalHealth;
currentWindow.gotoAndStop(Barricade.level);
currentWindow.barricadeDead = false;
};
}
function buyGun(_arg1:int){
var _local2:Sound;
var _local3:SoundChannel;
gunArray[_arg1].bought = true;
money.add(-(gunArray[_arg1].cost));
buyscreen.money_txt.text = String(money.value);
money_txt.text = String(money.value);
changeGun(_arg1);
_local2 = new LoadSnd();
_local3 = _local2.play(0, 1);
}
function backToGame(){
menuOut = false;
buyscreen.visible = false;
screens_mc.visible = false;
if (!isMainMenu){
Mouse.hide();
updateAmmo();
};
}
function buymenu(){
if (((!(menuOut)) && (!(spookIsDead)))){
menuOut = true;
buyscreen.visible = true;
buyscreen.money_txt.text = String(money.value);
Mouse.show();
} else {
menuOut = false;
buyscreen.visible = false;
screens_mc.visible = false;
Mouse.hide();
updateAmmo();
};
}
function reloadGun(){
if (money.value >= (currentGun.cost * Gun.RELOAD_PRICE)){
buyAmmo(currentGun.type);
checkAmmo();
};
}
function checkWaveEnd(){
if (waveData.waves[currentWave].length == 0){
endWave();
};
}
function init(){
spookIsDead = false;
isMainMenu = false;
finishGame = false;
menuOut = false;
Mouse.hide();
currentWave = 0;
score.value = 0;
money.value = 5;
buyscreen.back_btn.buttonMode = true;
buyscreen.back_btn.addEventListener(MouseEvent.CLICK, backToGameEvent);
buyscreen.barr_mc.gotoAndStop((Barricade.level + 1));
buyscreen.upgrade_txt.text = Barricade.DESCRIPTIONS[Barricade.level];
spook = backGround.spook_mc;
spook.game = this;
zombieArray = new Array();
loadGuns();
screens_mc.visible = false;
wave_txt.text = String(currentWave);
buyscreen.visible = false;
buyscreen.barrCost_txt.text = ("$" + Barricade.COSTS[Barricade.level]);
score_txt.text = String(score.value);
money_txt.text = String(money.value);
bonii_mc.bdamage_txt.visible = false;
bonii_mc.bmoney_txt.visible = false;
hints_mc.visible = false;
hints_mc.mouseChildren = false;
buyGun(0);
waveData = new WaveData();
startWave();
addEventListener(Event.ENTER_FRAME, update, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_DOWN, checkKeysDown);
stage.addEventListener(KeyboardEvent.KEY_UP, checkKeysUp);
stage.addEventListener(MouseEvent.MOUSE_DOWN, pullTrigger);
stage.addEventListener(MouseEvent.MOUSE_UP, releaseTrigger);
initBtns();
loadObstacles();
loadWayPoints();
loadBarricades();
prevTime = getTimer;
}
function loadBarricades(){
var _local1:int;
var _local2:Barricade;
barrArray = new Array();
_local1 = 0;
while (_local1 < backGround.numChildren) {
_local2 = (backGround.getChildAt(_local1) as Barricade);
if (_local2){
barrArray.push(_local2);
};
_local1++;
};
}
function loadGuns(){
var _local1:Gun;
var _local2:Gun;
var _local3:Gun;
var _local4:Gun;
var _local5:Gun;
var _local6:Gun;
var _local7:Gun;
_local1 = new Gun(0);
_local2 = new Gun(1);
_local3 = new Gun(2);
_local4 = new Gun(3);
_local5 = new Gun(4);
_local6 = new Gun(5);
_local7 = new Gun(6);
gunArray = new Array(_local1, _local2, _local3, _local4, _local5, _local6, _local7);
}
function nextGun(){
var _local1:uint;
var _local2:int;
_local2 = 0;
while (_local2 < gunArray.length) {
if (currentGun == gunArray[_local2]){
if (_local2 < (gunArray.length - 1)){
_local1 = (_local2 + 1);
while (!(gunArray[_local1].bought)) {
_local1++;
if (_local1 == 7){
_local1 = 0;
break;
};
};
} else {
_local1 = 0;
};
changeGun(_local1);
break;
};
_local2++;
};
}
function submitScore(_arg1:MouseEvent){
var leaderBoard:String;
var unGrey:*;
var event = _arg1;
unGrey = function (){
greyOutBit.visible = false;
};
switch (mode){
case "normal":
leaderBoard = StandardStuff.MOCHI_LEADERBOARD_ID_NORMAL;
break;
case "hard":
leaderBoard = StandardStuff.MOCHI_LEADERBOARD_ID_HARD;
break;
case "nightmare":
leaderBoard = StandardStuff.MOCHI_LEADERBOARD_ID_NIGHTMARE;
break;
default:
trace("submit mode fuckup");
};
greyOutBit.visible = true;
MochiScores.showLeaderboard({boardID:leaderBoard, score:score.value, onClose:unGrey});
}
public function stopBGM(){
bgmChannel.stop();
}
function gotoMenu(){
trace("go to menu");
clearGame();
resetUpgrades();
gotoAndStop("menu");
Mouse.show();
}
function hideHighScoreMenu(_arg1:MouseEvent){
highScore_screen.gotoAndStop("Hide");
}
function loadObstacles(){
var _local1:int;
var _local2:Obstacles;
obsArray = new Array();
_local1 = 0;
while (_local1 < backGround.numChildren) {
_local2 = (backGround.getChildAt(_local1) as Obstacles);
if (_local2){
obsArray.push(_local2);
};
_local1++;
};
}
function startGameEasy(_arg1:MouseEvent){
difficulty = 0.85;
mode = "normal";
gotoAndStop("startgame");
}
function (){
trace(("shootTime : " + shootTime));
trace(("spookTime : " + spookTime));
trace(("hairTime : " + hairTime));
trace(("bgTime : " + bgTime));
trace(("zombieTime : " + zombieTime));
trace(("turretTime : " + turretTime));
trace(("otherTime : " + otherTime));
}
function spawnBaddie(_arg1:uint, _arg2:int, _arg3:int){
var _local4:Baddie;
var _local5:Sound;
var _local6:SoundChannel;
var _local7:SoundTransform;
var _local8:Number;
var _local9:Dot_Baddie;
var _local10:int;
_local8 = 1;
switch (_arg1){
case 1:
_local4 = new Zombie();
_local5 = new ZombieSnd();
_local8 = (Math.random() * 0.3);
break;
case 2:
_local4 = new PlagueBearer();
_local5 = new PlagueBearerSnd();
_local8 = (Math.random() * 0.3);
break;
case 3:
_local4 = new Fester();
_local5 = new FesterSnd();
break;
case 4:
_local4 = new Banshee();
_local5 = new BansheeSnd();
break;
case 5:
_local4 = new Lich();
_local5 = new LichSnd();
_local8 = 0.5;
break;
case 6:
_local4 = new Skeleton();
break;
default:
trace("spawn fuckaroo");
};
if (_local5){
_local7 = new SoundTransform(_local8);
_local6 = _local5.play(0, 1, _local7);
};
_local4.init(this, _arg1, 3);
if ((_local4 is Banshee)){
_local9 = new Dot_Banshee();
} else {
_local9 = new Dot_Baddie();
};
_local9.baddie = _local4;
_local9.x = 180;
miniMap.dotHolder.addChild(_local9);
if (_arg1 != 6){
_local10 = Math.floor(((Math.random() * spawnPoints) + 1));
switch (_local10){
case 1:
_local4.x = backGround.Spawn1.x;
_local4.y = backGround.Spawn1.y;
break;
case 2:
_local4.x = backGround.Spawn2.x;
_local4.y = backGround.Spawn2.y;
break;
case 3:
_local4.x = backGround.Spawn3.x;
_local4.y = backGround.Spawn3.y;
break;
case 4:
_local4.x = backGround.Spawn4.x;
_local4.y = backGround.Spawn4.y;
break;
case 5:
_local4.x = backGround.Spawn5.x;
_local4.y = backGround.Spawn5.y;
break;
case 6:
_local4.x = backGround.Spawn6.x;
_local4.y = backGround.Spawn6.y;
break;
case 7:
_local4.x = backGround.Spawn7.x;
_local4.y = backGround.Spawn7.y;
break;
case 8:
_local4.x = backGround.Spawn8.x;
_local4.y = backGround.Spawn8.y;
break;
case 9:
_local4.x = backGround.Spawn9.x;
_local4.y = backGround.Spawn9.y;
break;
};
} else {
_local4.x = _arg2;
_local4.y = _arg3;
};
backGround.addChild(_local4);
zombieArray.push(_local4);
}
function removeBarricade(_arg1:Barricade){
var _local2:int;
_arg1.gotoAndStop("fuxxor");
_local2 = 0;
while (_local2 < barrArray.length) {
if (_arg1 == barrArray[_local2]){
_arg1.fuxxored = true;
barrArray.splice(_local2, 1);
break;
};
_local2++;
};
}
function startGameNightmare(_arg1:MouseEvent){
difficulty = 1.8;
mode = "nightmare";
gotoAndStop("startgame");
}
function createPowerup(_arg1:Baddie){
var _local2:int;
var _local3:int;
var _local4:*;
var _local5:Boolean;
var _local6:uint;
var _local7:Powerup;
if (_arg1.inside){
_local2 = (_arg1.x - spook.x);
_local3 = (_arg1.y - spook.y);
_local4 = ((_local2 * _local2) + (_local3 * _local3));
_local5 = (_local4 < 10000);
if (!_local5){
_local6 = Math.floor(((Math.random() * 4) + 1));
if (!(((_local6 == 1)) && ((currentWave == 20)))){
_local7 = new Powerup();
_local7.gotoAndStop(_local6);
_local7.x = _arg1.x;
_local7.y = _arg1.y;
backGround.powerupHolder.addChild(_local7);
};
};
};
}
function checkKeysDown(_arg1:KeyboardEvent){
if ((((_arg1.keyCode == 87)) || ((_arg1.keyCode == 38)))){
up = true;
};
if ((((_arg1.keyCode == 65)) || ((_arg1.keyCode == 37)))){
left = true;
};
if ((((_arg1.keyCode == 83)) || ((_arg1.keyCode == 40)))){
down = true;
};
if ((((_arg1.keyCode == 68)) || ((_arg1.keyCode == 39)))){
right = true;
};
if ((((_arg1.keyCode == 81)) || ((_arg1.keyCode == 46)))){
prevGun();
};
if ((((_arg1.keyCode == 69)) || ((_arg1.keyCode == 35)))){
nextGun();
};
if ((((_arg1.keyCode == 82)) || ((_arg1.keyCode == 34)))){
reloadGun();
};
if ((((_arg1.keyCode == 70)) || ((_arg1.keyCode == 36)))){
if (currentWindow){
repairBarricade();
};
};
if (_arg1.keyCode == 71){
};
if (_arg1.keyCode == 77){
toggleMute();
};
}
function frame145(){
stop();
}
function frame146(){
stop();
}
public function winGame(){
var _local1:Sound;
var _local2:SoundChannel;
_local1 = new HeartSnd();
_local2 = _local1.play(0, 1);
clearGame();
resetUpgrades();
Mouse.show();
gotoAndPlay("win");
}
function LineIntersectLine(_arg1:Point, _arg2:Point, _arg3:Point, _arg4:Point):Boolean{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local5 = (((_arg4.y - _arg3.y) * (_arg2.x - _arg1.x)) - ((_arg4.x - _arg3.x) * (_arg2.y - _arg1.y)));
_local6 = (((_arg4.x - _arg3.x) * (_arg1.y - _arg3.y)) - ((_arg4.y - _arg3.y) * (_arg1.x - _arg3.x)));
_local7 = (((_arg2.x - _arg1.x) * (_arg1.y - _arg3.y)) - ((_arg2.y - _arg1.y) * (_arg1.x - _arg3.x)));
if (_local5 == 0){
if ((((_local6 == 0)) && ((_local7 == 0)))){
return (false);
};
return (false);
};
_local8 = (_local6 / _local5);
_local9 = (_local7 / _local5);
return ((((((((_local8 >= 0)) && ((_local8 <= 1)))) && ((_local9 >= 0)))) && ((_local9 <= 1))));
}
function frame154(){
stop();
}
function buySentry(_arg1:uint){
var _local2:Sentry;
var _local3:Sound;
var _local4:SoundChannel;
if (_arg1 == 1){
_local2 = new Turret();
money.add(-(Sentry.COST_LIGHT));
buyscreen.money_txt.text = String(money.value);
money_txt.text = String(money.value);
} else {
_local2 = new Turret_Heavy();
money.add(-(Sentry.COST_HEAVY));
buyscreen.money_txt.text = String(money.value);
money_txt.text = String(money.value);
};
_local2.init(_arg1, this);
backGround.turretHolder.addChild(_local2);
_local2.x = spook.x;
_local2.y = spook.y;
_local3 = new TurretSnd();
_local4 = _local3.play(0, 1);
}
function hitObjects(_arg1:int, _arg2:int, _arg3:MovieClip):Boolean{
var _local4:Boolean;
var _local5:int;
var _local6:Obstacles;
_local4 = false;
_local5 = 0;
while (_local5 < backGround.numChildren) {
_local6 = (backGround.getChildAt(_local5) as Obstacles);
if (_local6){
if (!_local6.isBarrier){
if (_local6.hitTestPoint(_arg1, _arg2, true)){
_local4 = true;
};
} else {
if (((_local6.isBarrier) && ((_arg3 == spook)))){
if (_local6.hitTestPoint(_arg1, _arg2, true)){
_local4 = true;
};
};
};
};
_local5++;
};
return (_local4);
}
function prevGun(){
var _local1:uint;
var _local2:int;
_local2 = 0;
while (_local2 < gunArray.length) {
if (currentGun == gunArray[_local2]){
if (_local2 > 0){
_local1 = (_local2 - 1);
} else {
_local1 = (gunArray.length - 1);
};
while (!(gunArray[_local1].bought)) {
_local1--;
};
changeGun(_local1);
break;
};
_local2++;
};
}
function removeDot(_arg1:Baddie){
var _local2:uint;
var _local3:Dot_Baddie;
_local2 = 0;
while (_local2 < miniMap.dotHolder.numChildren) {
_local3 = (miniMap.dotHolder.getChildAt(_local2) as Dot_Baddie);
if (_local3){
if (_local3.baddie == _arg1){
miniMap.dotHolder.removeChild(_local3);
_local3.baddie = null;
_local3 = null;
};
} else {
trace("dot fucky");
};
_local2++;
};
}
function backToGameEvent(_arg1:MouseEvent){
backToGame();
}
function updateCrosshairs(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
if (!spookIsDead){
Crosshairs.x = mouseX;
Crosshairs.y = mouseY;
_local1 = ((backGround.x + spook.x) - Crosshairs.x);
_local2 = ((backGround.y + spook.y) - Crosshairs.y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
switch (currentGun.type){
case 0:
if ((_local3 / 12) <= 64){
Crosshairs.gotoAndStop(Math.floor((_local3 / 12)));
};
break;
case 1:
Crosshairs.gotoAndStop("shotty");
break;
case 2:
if ((_local3 / 8) <= 64){
Crosshairs.gotoAndStop(Math.floor((_local3 / 8)));
};
break;
case 3:
if ((_local3 / 20) <= 64){
Crosshairs.gotoAndStop(Math.floor((_local3 / 20)));
};
break;
case 4:
Crosshairs.gotoAndStop("sniper");
break;
case 5:
if ((_local3 / 20) <= 64){
Crosshairs.gotoAndStop(Math.floor((_local3 / 10)));
};
break;
case 6:
trace("no chainsaw hairs!");
};
};
}
function checkDeath(){
var _local1:Sound;
var _local2:SoundChannel;
if ((((spook.currentHealth <= -99999999)) && (!(spookIsDead)))){
spookIsDead = true;
_local1 = new SASDieSnd();
_local2 = _local1.play(0, 1);
Mouse.show();
screens_mc.visible = true;
screens_mc.gotoAndPlay("death");
};
}
function mineHit(){
var _local1:Mine;
var _local2:int;
var _local3:int;
var _local4:Sound;
var _local5:SoundChannel;
if (backGround.mineHolder.numChildren > 0){
_local2 = 0;
while (_local2 < backGround.mineHolder.numChildren) {
_local1 = backGround.mineHolder.getChildAt(_local2);
if (!_local1.steppedOnMine){
_local3 = 0;
while (_local3 < zombieArray.length) {
if (_local1.hitTestObject(zombieArray[_local3])){
_local1.steppedOnMine = true;
_local4 = new MineSnd();
_local5 = _local4.play(0, 1);
_local1.explode();
break;
};
_local3++;
};
};
_local2++;
};
};
}
function showHighScoreNormal(_arg1:MouseEvent){
showHighScores(StandardStuff.MOCHI_LEADERBOARD_ID_NORMAL);
}
function hitBaddies(_arg1:int, _arg2:int, _arg3:Number, _arg4:MovieClip, _arg5:Number=1, _arg6:Boolean=false):Boolean{
var _local7:Boolean;
var _local8:int;
var _local9:Sound;
var _local10:SoundChannel;
_local7 = false;
_local8 = 0;
while (_local8 < zombieArray.length) {
if (((((zombieArray[_local8].hitTestPoint(_arg1, _arg2, true)) && (!((zombieArray[_local8] == _arg4))))) && (!(zombieArray[_local8].dying)))){
_local7 = true;
zombieArray[_local8].currentHealth = (zombieArray[_local8].currentHealth - (_arg3 * damageFactor));
zombieArray[_local8].pointsMult = _arg5;
if (_arg3 != 0){
_local9 = new HitSnd();
_local10 = _local9.play(0, 1);
zombieArray[_local8].beingHit = true;
zombieArray[_local8].gotoAndPlay("hit");
};
if (!_arg6){
break;
};
};
_local8++;
};
return (_local7);
}
function loadWayPoints(){
var _local1:int;
var _local2:WP;
WPArray = new Array();
_local1 = 0;
while (_local1 < backGround.numChildren) {
_local2 = (backGround.getChildAt(_local1) as WP);
if (_local2){
WPArray.push(_local2);
};
_local1++;
};
}
function endWave(){
var _local1:Sound;
var _local2:SoundChannel;
roundEnd = true;
if (currentWave < WaveData.WAVES){
screens_mc.visible = true;
screens_mc.gotoAndPlay("endwave");
_local1 = new WaveEndSound();
_local2 = _local1.play(0, 1);
} else {
hider_mc.play();
_local1 = new WinSnd();
_local2 = _local1.play(0, 1);
};
}
public function startWave(){
var _local1:Number;
roundEnd = false;
currentWave++;
wave_txt.text = String(currentWave);
spook.currentHealth = spook.totalHealth;
_local1 = (spook.currentHealth / spook.totalHealth);
health_mc.healthBar.scaleX = _local1;
screens_mc.visible = false;
}
function startGameHard(_arg1:MouseEvent){
difficulty = 1.3;
mode = "hard";
gotoAndStop("startgame");
}
public function updateDeathInfo(){
screens_mc.score_txt.text = ("score: " + score.value);
screens_mc.wave_txt.text = ("wave: " + currentWave);
screens_mc.difficulty_txt.text = ("difficulty: " + mode);
}
function buyAmmo(_arg1:int){
var _local2:Sound;
var _local3:SoundChannel;
if (gunArray[_arg1].ammo < gunArray[_arg1].maxAmmo){
gunArray[_arg1].ammo = gunArray[_arg1].maxAmmo;
money.add(-((gunArray[_arg1].cost * Gun.RELOAD_PRICE)));
buyscreen.money_txt.text = String(money.value);
money_txt.text = String(money.value);
updateAmmo();
_local2 = new LoadSnd();
_local3 = _local2.play(0, 1);
};
}
function removeTurret(_arg1){
backGround.turretHolder.removeChild(_arg1);
_arg1 = null;
}
function initBtns(){
buyscreen.btn_barricade.buttonMode = true;
buyscreen.btn_turret.buttonMode = true;
buyscreen.btn_m1014.buttonMode = true;
buyscreen.btn_mp5n.buttonMode = true;
buyscreen.btn_l85.buttonMode = true;
buyscreen.btn_awm.buttonMode = true;
buyscreen.btn_mag.buttonMode = true;
buyscreen.btn_heavy.buttonMode = true;
buyscreen.btn_mine.buttonMode = true;
buyscreen.btn_barricade.addEventListener(MouseEvent.CLICK, buyUpgrade);
buyscreen.btn_turret.addEventListener(MouseEvent.CLICK, buyUpgrade);
buyscreen.btn_m1014.addEventListener(MouseEvent.CLICK, buyUpgrade);
buyscreen.btn_mp5n.addEventListener(MouseEvent.CLICK, buyUpgrade);
buyscreen.btn_l85.addEventListener(MouseEvent.CLICK, buyUpgrade);
buyscreen.btn_awm.addEventListener(MouseEvent.CLICK, buyUpgrade);
buyscreen.btn_mag.addEventListener(MouseEvent.CLICK, buyUpgrade);
buyscreen.btn_heavy.addEventListener(MouseEvent.CLICK, buyUpgrade);
buyscreen.btn_mine.addEventListener(MouseEvent.CLICK, buyUpgrade);
buyscreen.reload_buyscreen_btn.buttonMode = true;
buyscreen.reload_buyscreen_btn.addEventListener(MouseEvent.CLICK, buyReload);
}
function rollingOut(_arg1:MouseEvent){
_arg1.target.gotoAndStop(1);
}
function checkKeysUp(_arg1:KeyboardEvent){
if ((((_arg1.keyCode == 87)) || ((_arg1.keyCode == 38)))){
up = false;
};
if ((((_arg1.keyCode == 65)) || ((_arg1.keyCode == 37)))){
left = false;
};
if ((((_arg1.keyCode == 83)) || ((_arg1.keyCode == 40)))){
down = false;
};
if ((((_arg1.keyCode == 68)) || ((_arg1.keyCode == 39)))){
right = false;
};
if ((((_arg1.keyCode == 32)) || ((_arg1.keyCode == 33)))){
if (!spookIsDead){
buymenu();
};
};
if (_arg1.keyCode == 112){
if (!spookIsDead){
helpScreen();
};
};
if (_arg1.keyCode == 27){
if (!menuOut){
gotoMenu();
};
};
}
function earnPoints(_arg1:Baddie){
score.add(((_arg1.points * _arg1.pointsMult) * pointsFactor));
money.add(((_arg1.points * _arg1.pointsMult) * pointsFactor));
score_txt.text = String(score.value);
money_txt.text = String(money.value);
if (Math.random() < POWERUP_CHANCE){
createPowerup(_arg1);
};
removeDot(_arg1);
}
function upgradeBarricades(){
var _local1:Sound;
var _local2:SoundChannel;
var _local3:int;
if ((((Barricade.level < 5)) && ((money.value >= Barricade.COSTS[Barricade.level])))){
money.add(-(Barricade.COSTS[Barricade.level]));
Barricade.level++;
buyscreen.money_txt.text = String(money.value);
buyscreen.barrCost_txt.text = ("$" + Barricade.COSTS[Barricade.level]);
money_txt.text = String(money.value);
buyscreen.barr_mc.gotoAndStop(Math.min(5, (Barricade.level + 1)));
if (Barricade.level == 5){
buyscreen.upgrade_txt.text = "Fully upgraded";
} else {
buyscreen.upgrade_txt.text = Barricade.DESCRIPTIONS[Barricade.level];
};
_local1 = new RepairSnd();
_local2 = _local1.play(0, 1);
_local3 = 0;
while (_local3 < barrArray.length) {
barrArray[_local3].updateHealth(Barricade.level);
if (!barrArray[_local3].barricadeDead){
barrArray[_local3].gotoAndStop(Barricade.level);
};
_local3++;
};
};
}
private function checkDecisionFrame(){
frameCounter++;
decisionFrame = ((frameCounter & (DECISION_INT - 1)) == 0);
}
function removeMine(_arg1){
backGround.mineHolder.removeChild(_arg1);
_arg1 = null;
}
function helpScreen(){
Mouse.show();
menuOut = true;
screens_mc.visible = true;
screens_mc.gotoAndStop("help");
}
function showHighScoreHard(_arg1:MouseEvent){
showHighScores(StandardStuff.MOCHI_LEADERBOARD_ID_HARD);
}
function updateAmmo(){
ammo_txt.text = String(currentGun.ammo);
maxAmmo_txt.text = String(currentGun.maxAmmo);
}
function checkWindow(){
var _local1:int;
_local1 = 0;
while (_local1 < barrArray.length) {
if (barrArray[_local1].barricade_hit_mc.hitTestPoint((backGround.x + spook.x), (backGround.y + spook.y), true)){
currentWindow = barrArray[_local1];
if ((((currentWindow.currentHealth < currentWindow.totalHealth)) || (currentWindow.barricadeDead))){
hints_mc.visible = true;
hints_mc.play();
};
break;
} else {
currentWindow = null;
};
_local1++;
};
}
function checkPowerups(){
var _local1:MovieClip;
var _local2:int;
var _local3:MovieClip;
var _local4:Sound;
var _local5:SoundChannel;
var _local6:uint;
var _local7:uint;
var _local8:uint;
_local1 = backGround.powerupHolder;
_local2 = (_local1.numChildren - 1);
while (_local2 >= 0) {
_local3 = _local1.getChildAt(_local2);
_local3.age = (_local3.age + DECISION_INT);
if (_local3.hitTestObject(spook)){
_local6 = _local3.currentFrame;
switch (_local6){
case 1:
powerup_mc.gotoAndPlay("smartbomb");
_local4 = new smartbombSnd();
_local7 = 0;
while (_local7 < zombieArray.length) {
zombieArray[_local7].killMe();
_local7++;
};
break;
case 2:
powerup_mc.gotoAndPlay("maxammo");
_local4 = new maxammoSnd();
_local8 = 0;
while (_local8 < gunArray.length) {
gunArray[_local8].ammo = gunArray[_local8].maxAmmo;
_local8++;
};
updateAmmo();
break;
case 3:
powerup_mc.gotoAndPlay("doublecash");
_local4 = new doublecashSnd();
trace("double points");
doublePoints = true;
pointsFactor = 2;
doublePointExpires = powerupTime;
prevPointTime = getTimer();
break;
case 4:
powerup_mc.gotoAndPlay("doubledamage");
_local4 = new doubledamageSnd();
doubleDamage = true;
damageFactor = 2;
doubleDamExpires = powerupTime;
prevDamTime = getTimer();
break;
default:
trace("powerups fuckknuckle");
};
_local5 = _local4.play();
_local1.removeChild(_local3);
_local3 = null;
} else {
if (_local3.age >= Powerup.EXPIRY_DATE){
_local1.removeChild(_local3);
_local3 = null;
};
};
_local2--;
};
}
function hitSpook(_arg1:int, _arg2:int, _arg3:Number):Boolean{
var _local4:Boolean;
var _local5:Sound;
var _local6:SoundChannel;
var _local7:Number;
_local4 = false;
if (((((spook.hitTestPoint(_arg1, _arg2, true)) && (!(spookIsDead)))) && (!(menuOut)))){
_local4 = true;
spook.currentHealth = (spook.currentHealth - _arg3);
_local5 = new HitSnd();
_local6 = _local5.play(0, 1);
painscreen.gotoAndPlay(2);
_local7 = (spook.currentHealth / spook.totalHealth);
health_mc.healthBar.scaleX = _local7;
checkDeath();
};
return (_local4);
}
function showHighScores(_arg1:String){
var unGrey:*;
var boardID = _arg1;
unGrey = function (){
greyOutBit.visible = false;
highScore_screen.gotoAndStop("Hide");
};
greyOutBit.visible = true;
MochiScores.showLeaderboard({boardID:boardID, onClose:unGrey});
}
function updateBonii(){
var _local1:uint;
var _local2:uint;
if (doubleDamage){
if (!menuOut){
doubleDamExpires = (doubleDamExpires - (getTimer() - prevDamTime));
};
prevDamTime = getTimer();
if (doubleDamExpires > 0){
_local1 = (doubleDamExpires / 1000);
bonii_mc.bdamage_txt.visible = true;
bonii_mc.bdamage_txt.text = ("double damage : " + _local1);
} else {
bonii_mc.bdamage_txt.visible = false;
doubleDamage = false;
damageFactor = 1;
};
};
if (doublePoints){
if (!menuOut){
doublePointExpires = (doublePointExpires - (getTimer() - prevPointTime));
};
prevPointTime = getTimer();
if (doublePointExpires > 0){
_local2 = (doublePointExpires / 1000);
bonii_mc.bmoney_txt.visible = true;
bonii_mc.bmoney_txt.text = ("double money : " + _local2);
} else {
bonii_mc.bmoney_txt.visible = false;
doublePoints = false;
pointsFactor = 1;
};
};
}
function changeGun(_arg1:int){
if (gunArray[_arg1].type == _arg1){
currentGun = gunArray[_arg1];
currentGun_mc.gotoAndStop((_arg1 + 1));
spook.gun.gotoAndStop((_arg1 + 1));
gunCycle = gunArray[_arg1].speed;
gunRecoil = gunArray[_arg1].recoil;
zoomLength = gunArray[_arg1].range;
gunDamage = gunArray[_arg1].damage;
} else {
trace("major, major fuckup");
};
updateAmmo();
checkAmmo();
}
function spawn(){
var _local1:*;
if (!roundEnd){
if (spawnWait > 0){
spawnWait--;
} else {
if (waveData.waves[currentWave].length > 0){
_local1 = waveData.waves[currentWave].shift();
spawnWait = Math.ceil((_local1.framesDelay / Math.sqrt(difficulty)));
spawnBaddie(_local1.type, 0, 0);
};
};
};
}
function toggleMute(){
muteTransform.volume = mute;
SoundMixer.soundTransform = muteTransform;
mute = !(mute);
}
function showHighScoreMenu(_arg1:MouseEvent){
highScore_screen.gotoAndStop("Show");
}
function mouseScrollBG(){
if (Crosshairs.x >= 590){
backGround.x = (backGround.x - ((Crosshairs.x - 590) / 2));
};
if (Crosshairs.x <= 50){
backGround.x = (backGround.x - ((Crosshairs.x - 50) / 2));
};
if (Crosshairs.y >= 430){
backGround.y = (backGround.y - ((Crosshairs.y - 430) / 2));
};
if (Crosshairs.y <= 50){
backGround.y = (backGround.y - ((Crosshairs.y - 50) / 2));
};
}
function releaseTrigger(_arg1:MouseEvent){
isShooting = false;
}
function pullTrigger(_arg1:MouseEvent){
if (coolDown >= currentGun.coolDown){
isShooting = true;
currentGun.burstFired = 0;
};
}
function buyReload(_arg1:MouseEvent){
var _local2:String;
var _local3:Sound;
var _local4:SoundChannel;
_local2 = _arg1.target.name;
_local3 = new ErrSnd();
switch (_local2){
case "reload_m1014_btn":
if (((gunArray[1].bought) && ((money.value >= (gunArray[1].cost * Gun.RELOAD_PRICE))))){
buyAmmo(1);
checkAmmo();
backToGame();
} else {
_local4 = _local3.play(0, 1);
};
break;
case "reload_mp5n_btn":
if (((gunArray[2].bought) && ((money.value >= (gunArray[2].cost * Gun.RELOAD_PRICE))))){
buyAmmo(2);
checkAmmo();
backToGame();
} else {
_local4 = _local3.play(0, 1);
};
break;
case "reload_l85_btn":
if (((gunArray[3].bought) && ((money.value >= (gunArray[3].cost * Gun.RELOAD_PRICE))))){
buyAmmo(3);
checkAmmo();
backToGame();
} else {
_local4 = _local3.play(0, 1);
};
break;
case "reload_awm_btn":
if (((gunArray[4].bought) && ((money.value >= (gunArray[4].cost * Gun.RELOAD_PRICE))))){
buyAmmo(4);
checkAmmo();
backToGame();
} else {
_local4 = _local3.play(0, 1);
};
break;
case "reload_mag_btn":
if (((gunArray[5].bought) && ((money.value >= (gunArray[5].cost * Gun.RELOAD_PRICE))))){
buyAmmo(5);
checkAmmo();
backToGame();
} else {
_local4 = _local3.play(0, 1);
};
break;
default:
trace("reload fuckup");
};
}
function updateSpook(){
var _local1:Number;
var _local2:Number;
var _local3:int;
var _local4:int;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local1 = ((backGround.x + spook.x) - Crosshairs.x);
_local2 = ((backGround.y + spook.y) - Crosshairs.y);
spook.rotation = (((Math.atan2(_local2, _local1) * 180) / Math.PI) - 90);
_local3 = spook.x;
_local4 = spook.y;
_local5 = spook.x;
_local6 = spook.y;
_local7 = 0;
_local8 = 0;
if (up){
_local4 = (_local4 - detectionRange);
_local8 = (_local8 - spookMove);
};
if (left){
_local3 = (_local3 - detectionRange);
_local7 = (_local7 - spookMove);
};
if (down){
_local4 = (_local4 + detectionRange);
_local8 = (_local8 + spookMove);
};
if (right){
_local3 = (_local3 + detectionRange);
_local7 = (_local7 + spookMove);
};
_local9 = Math.sqrt(((_local7 * _local7) + (_local8 * _local8)));
if (_local9 != 0){
_local7 = (_local7 / _local9);
};
if (_local9 != 0){
_local8 = (_local8 / _local9);
};
_local7 = (_local7 * spookMove);
_local8 = (_local8 * spookMove);
_local5 = (_local5 + _local7);
_local6 = (_local6 + _local8);
if (((!(hitObjects((_local3 + backGround.x), (_local4 + backGround.y), spook))) && (!(hitBaddies((_local5 + backGround.x), (_local6 + backGround.y), 0, null))))){
spook.x = (spook.x + _local7);
spook.y = (spook.y + _local8);
};
checkWindow();
scrollBG();
}
function removeZombie(_arg1){
var _local2:int;
backGround.removeChild(_arg1);
if (zombieArray.length > 0){
_local2 = 0;
while (_local2 < zombieArray.length) {
if (zombieArray[_local2] == _arg1){
zombieArray[_local2] = null;
zombieArray.splice(_local2, 1);
};
_local2++;
};
};
if ((((zombieArray.length == 0)) && (!(finishGame)))){
checkWaveEnd();
};
_arg1 = null;
}
function scrollBG(){
var _local1:int;
var _local2:int;
_local1 = (backGround.x + spook.x);
_local2 = (backGround.y + spook.y);
if (_local1 >= rightEdge){
backGround.x = (backGround.x - (_local1 - rightEdge));
};
if (_local1 <= leftEdge){
backGround.x = (backGround.x - (_local1 - leftEdge));
};
if (_local2 >= bottomEdge){
backGround.y = (backGround.y - (_local2 - bottomEdge));
};
if (_local2 <= topEdge){
backGround.y = (backGround.y - (_local2 - topEdge));
};
}
public function redirect(_arg1:MouseEvent){
var request:URLRequest;
var event = _arg1;
request = new URLRequest("http://www.ninjakiwi.com");
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
}
function updateMap(){
var _local1:uint;
var _local2:*;
var _local3:Dot_Baddie;
miniMap.spook.x = ((spook.x / 10.8) - 25);
miniMap.spook.y = ((spook.y / 10.8) - 27);
miniMap.spook.rotation = spook.rotation;
_local1 = 0;
while (_local1 < miniMap.dotHolder.numChildren) {
_local2 = miniMap.dotHolder.getChildAt(_local1);
_local3 = (_local2 as Dot_Baddie);
if (_local3){
_local3.x = Math.min(Math.max(0, ((_local3.baddie.x / 10.8) - 25)), 160);
_local3.y = Math.min(Math.max(0, ((_local3.baddie.y / 10.8) - 27)), 120);
} else {
trace("dot fucky");
};
_local1++;
};
}
function clearGame(){
finishGame = true;
removeEventListener(Event.ENTER_FRAME, update);
waveData = null;
gunArray = null;
WPArray = null;
obsArray = null;
barrArray = null;
while (zombieArray.length > 0) {
zombieArray[0].deleteMe();
};
while (backGround.effectsHolder.numChildren > 0) {
backGround.effectsHolder.getChildAt(0).stop();
backGround.effectsHolder.removeChildAt(0);
};
while (backGround.bulletHolder.numChildren > 0) {
backGround.bulletHolder.getChildAt(0).deleteMe();
};
while (backGround.powerupHolder.numChildren > 0) {
backGround.powerupHolder.removeChildAt(0);
};
while (backGround.badBulletHolder.numChildren > 0) {
backGround.badBulletHolder.getChildAt(0).deleteMe();
};
while (backGround.turretHolder.numChildren > 0) {
backGround.turretHolder.getChildAt(0).deleteMe();
};
while (backGround.mineHolder.numChildren > 0) {
backGround.mineHolder.getChildAt(0).deleteMe();
};
}
function replay(_arg1:MouseEvent){
gotoMenu();
}
function checkAmmo(){
var _local1:Number;
_local1 = ((currentGun.ammo / currentGun.maxAmmo) * 100);
if (_local1 < 20){
ammo_txt.textColor = 4294901760;
warning_mc.visible = true;
} else {
ammo_txt.textColor = 4294967295;
warning_mc.visible = false;
};
}
function buyMine(){
var _local1:Mine;
var _local2:Sound;
var _local3:SoundChannel;
money.add(-(Mine.PRICE));
buyscreen.money_txt.text = String(money.value);
money_txt.text = String(money.value);
_local1 = new Mine();
_local1.init(this);
backGround.mineHolder.addChild(_local1);
_local1.x = spook.x;
_local1.y = spook.y;
_local2 = new LayMineSnd();
_local3 = _local2.play(0, 1);
}
}
}//package
Section 101
//SASDieSnd (SASDieSnd)
package {
import flash.media.*;
public dynamic class SASDieSnd extends Sound {
}
}//package
Section 102
//Sentry (Sentry)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.media.*;
public class Sentry extends MovieClip {
var :Boolean;// = false
var currentHealth:int;// = 20
var damage:int;
var gunCycle:int;
var coolDown:int;// = 0
var type:uint;
var :MovieClip;
var gunRecoil:int;
var dest:MovieClip;
var runOut:Boolean;// = false
var ammo:uint;
var totalHealth:int;// = 20
var frameCounter:uint;// = 0
var decisionFrame:Boolean;// = true
var game:SAS;
public static const POINTS_MULT = 0.8;
public static const COST_LIGHT = 400;
public static const COST_HEAVY = 500;
private static const DECISION_INT = 4;
private static const RANGE = 10;
public function Sentry(){
totalHealth = 20;
currentHealth = 20;
coolDown = 0;
frameCounter = 0;
decisionFrame = true;
= false;
runOut = false;
super();
}
public function init(_arg1:uint, _arg2){
game = _arg2;
type = _arg1;
switch (type){
case 1:
damage = 20;
gunRecoil = 6;
gunCycle = 6;
ammo = 400;
break;
case 2:
damage = 60;
gunRecoil = 3;
gunCycle = 12;
ammo = 200;
break;
};
updateAmmo();
this.inner.gotoAndStop(1);
}
public function shoot(_arg1){
var _local2:Bullet;
var _local3:int;
var _local4:Sound;
var _local5:SoundChannel;
_local2 = new Tracer();
_local3 = Math.floor(((Math.random() * gunRecoil) - (Math.random() * gunRecoil)));
if (type == 1){
_local4 = new SentrySnd();
} else {
_local4 = new HeavySnd();
};
this.inner.gotoAndStop("fire");
_local2.init(game, damage, _local3, this.inner.rotation, RANGE, POINTS_MULT);
_local2.x = x;
_local2.y = y;
_local2.rotation = (this.inner.rotation + _local3);
game.backGround.bulletHolder.addChild(_local2);
_local5 = _local4.play(0, 1);
ammo--;
updateAmmo();
}
private function updateAmmo(){
this.counter_txt.text = String(ammo);
}
public function getNearestZombie():MovieClip{
var _local1:Number;
var _local2:MovieClip;
var _local3:int;
var _local4:Baddie;
var _local5:Number;
var _local6:Number;
var _local7:Number;
_local1 = Number.MAX_VALUE;
_local3 = 0;
while (_local3 < game.zombieArray.length) {
_local4 = game.zombieArray[_local3];
if (((_local4.inside) && (!(_local4.attackingBarricade)))){
_local5 = (_local4.x - x);
_local6 = (_local4.y - y);
_local7 = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
if ((((_local3 == 0)) || ((_local7 < _local1)))){
_local1 = _local7;
_local2 = _local4;
};
};
_local3++;
};
return (_local2);
}
public function detectZombie():Boolean{
var _local1:Boolean;
var _local2:int;
var _local3:Rectangle;
var _local4:Point;
var _local5:Point;
_local1 = true;
_local2 = 0;
while (_local2 < game.obsArray.length) {
_local3 = game.obsArray[_local2].getRect(game.backGround);
_local4 = new Point(x, y);
_local5 = new Point(dest.x, dest.y);
if (game.LineIntersectsRect(_local4, _local5, _local3)){
_local1 = false;
break;
} else {
_local1 = true;
};
_local2++;
};
return (_local1);
}
public function deleteMe(){
stop();
game.removeTurret(this);
game = null;
}
public function update(){
var _local1:int;
var _local2:int;
var _local3:Number;
if ((((ammo > 0)) && ((game.zombieArray.length > 0)))){
dest = getNearestZombie();
if (((dest) && (detectZombie()))){
_local1 = (dest.x - x);
_local2 = (dest.y - y);
_local3 = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
this.inner.rotation = (((Math.atan2(_local2, _local1) * 180) / Math.PI) + 90);
if (coolDown < gunCycle){
coolDown++;
};
if (coolDown >= gunCycle){
coolDown = 0;
shoot(dest);
} else {
this.inner.gotoAndStop(1);
};
} else {
this.inner.gotoAndStop(1);
};
} else {
if (ammo < 1){
if (!runOut){
runOut = true;
this.inner.gotoAndPlay("OutOfAmmo");
};
} else {
this.inner.gotoAndStop(1);
};
};
checkDecisionFrame();
}
private function checkDecisionFrame(){
frameCounter++;
decisionFrame = ((frameCounter & (DECISION_INT - 1)) == 0);
}
}
}//package
Section 103
//SentrySnd (SentrySnd)
package {
import flash.media.*;
public dynamic class SentrySnd extends Sound {
}
}//package
Section 104
//ShotSnd (ShotSnd)
package {
import flash.media.*;
public dynamic class ShotSnd extends Sound {
}
}//package
Section 105
//Skeleton (Skeleton)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Skeleton extends Baddie {
public function Skeleton(){
addFrameScript(0, frame1, 6, frame7, 16, frame17, 45, frame46, 60, frame61);
}
function frame7(){
gotoAndStop(1);
attacking = false;
beingHit = false;
}
function frame1(){
stop();
}
function frame17(){
doHit();
}
function frame46(){
attacking = false;
gotoAndStop(1);
}
function frame61(){
stop();
deleteMe();
}
}
}//package
Section 106
//SkelSnd (SkelSnd)
package {
import flash.media.*;
public dynamic class SkelSnd extends Sound {
}
}//package
Section 107
//smartbombSnd (smartbombSnd)
package {
import flash.media.*;
public dynamic class smartbombSnd extends Sound {
}
}//package
Section 108
//Spark (Spark)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Spark extends MovieClip {
public function Spark(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
parent.removeChild(this);
}
}
}//package
Section 109
//Splatter (Splatter)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Splatter extends MovieClip {
public function Splatter(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
parent.removeChild(this);
}
}
}//package
Section 110
//Spook (Spook)
package {
import flash.display.*;
import flash.events.*;
public class Spook extends MovieClip {
var currentHealth:int;// = 25
public var gun:MovieClip;
public var spookbody:MovieClip;
public var bulletPoint:MovieClip;
var totalHealth:int;// = 25
var game:SAS;
public function Spook(){
totalHealth = 99999999;
currentHealth = 99999999;
super();
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 111
//SpookHitSnd (SpookHitSnd)
package {
import flash.media.*;
public dynamic class SpookHitSnd extends Sound {
}
}//package
Section 112
//Tracer (Tracer)
package {
public dynamic class Tracer extends Bullet {
}
}//package
Section 113
//Tracer_Cryo (Tracer_Cryo)
package {
public dynamic class Tracer_Cryo extends Bullet {
}
}//package
Section 114
//Turret (Turret)
package {
public dynamic class Turret extends Sentry {
}
}//package
Section 115
//Turret_Heavy (Turret_Heavy)
package {
public dynamic class Turret_Heavy extends Sentry {
}
}//package
Section 116
//TurretSnd (TurretSnd)
package {
import flash.media.*;
public dynamic class TurretSnd extends Sound {
}
}//package
Section 117
//Wall (Wall)
package {
public dynamic class Wall extends Obstacles {
}
}//package
Section 118
//Wall_Turret (Wall_Turret)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Wall_Turret extends Obstacles {
public function Wall_Turret(){
addFrameScript(0, frame1);
}
function frame1(){
setSentry(true);
}
}
}//package
Section 119
//Wall2 (Wall2)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Wall2 extends Obstacles {
public function Wall2(){
addFrameScript(0, frame1);
}
function frame1(){
setBarrier(true);
}
}
}//package
Section 120
//Wallbarrier (Wallbarrier)
package {
public dynamic class Wallbarrier extends Barrier {
}
}//package
Section 121
//WaveData (WaveData)
package {
public class WaveData {
public var waves:Array;
public static const WAVES = 20;
public function WaveData(){
initWaves();
loadData();
}
private function loadData(){
ABSTL(1, 1, 2, 50);
ABSTL(2, 1, 6, 60);
ABSTL(3, 1, 2, 50);
ABSTL(3, 2, 1, 60);
ABSTL(3, 1, 2, 50);
ABSTL(3, 2, 2, 50);
ABSTL(4, 1, 3, 40);
ABSTL(4, 2, 1, 40);
ABSTL(4, 1, 3, 60);
ABSTL(4, 2, 1, 30);
ABSTL(5, 1, 1, 350);
ABSTL(5, 1, 2, 120);
ABSTL(5, 2, 3, 40);
ABSTL(5, 1, 4, 50);
ABSTL(5, 2, 3, 40);
ABSTL(6, 1, 10, 60);
ABSTL(6, 2, 10, 90);
ABSTL(7, 2, 10, 70);
ABSTL(7, 1, 15, 40);
ABSTL(8, 1, 15, 50);
ABSTL(8, 3, 1, 30);
ABSTL(8, 2, 10, 40);
ABSTL(9, 1, 40, 40);
ABSTL(10, 2, 6, 30);
ABSTL(10, 1, 1, 500);
ABSTL(10, 2, 10, 30);
ABSTL(10, 3, 2, 40);
ABSTL(10, 2, 8, 30);
ABSTL(11, 2, 1, 300);
ABSTL(11, 2, 5, 100);
ABSTL(11, 2, 10, 100);
ABSTL(11, 2, 12, 50);
ABSTL(11, 2, 20, 40);
ABSTL(12, 3, 2, 30);
ABSTL(12, 1, 15, 40);
ABSTL(12, 3, 2, 20);
ABSTL(12, 2, 15, 50);
ABSTL(12, 5, 1, 100);
ABSTL(12, 3, 2, 100);
ABSTL(13, 1, 100, 40);
ABSTL(14, 2, 5, 15);
ABSTL(14, 1, 1, 300);
ABSTL(14, 2, 7, 15);
ABSTL(14, 1, 1, 300);
ABSTL(14, 3, 4, 20);
ABSTL(14, 2, 10, 15);
ABSTL(15, 1, 20, 30);
ABSTL(15, 4, 1, 20);
ABSTL(15, 2, 20, 20);
ABSTL(16, 4, 1, 30);
ABSTL(16, 2, 20, 30);
ABSTL(16, 3, 2, 20);
ABSTL(16, 4, 1, 40);
ABSTL(16, 1, 40, 20);
ABSTL(16, 3, 2, 40);
ABSTL(17, 1, 20, 40);
ABSTL(17, 5, 1, 120);
ABSTL(17, 2, 20, 40);
ABSTL(17, 3, 4, 40);
ABSTL(17, 2, 200, 30);
ABSTL(17, 1, 1, 300);
ABSTL(17, 3, 4, 40);
ABSTL(18, 4, 1, 100);
ABSTL(18, 5, 3, 100);
ABSTL(18, 4, 1, 60);
ABSTL(18, 2, 60, 30);
ABSTL(18, 4, 2, 30);
ABSTL(18, 5, 3, 80);
ABSTL(19, 5, 2, 40);
ABSTL(19, 4, 2, 40);
ABSTL(19, 3, 4, 60);
ABSTL(19, 2, 80, 30);
ABSTL(19, 4, 2, 40);
ABSTL(19, 5, 2, 40);
ABSTL(19, 2, 12, 40);
ABSTL(20, 2, 30, 40);
ABSTL(20, 1, 60, 20);
ABSTL(20, 1, 1, 600);
ABSTL(20, 6, 8, 30);
ABSTL(20, 5, 6, 40);
ABSTL(20, 2, 60, 40);
ABSTL(20, 1, 1, 600);
ABSTL(20, 4, 8, 40);
ABSTL(20, 3, 12, 40);
ABSTL(20, 5, 6, 40);
ABSTL(20, 2, 60, 30);
}
private function ABSTL(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint){
var _local5:*;
var _local6:uint;
_local5 = new Object();
_local5.type = _arg2;
_local5.framesDelay = _arg4;
_local6 = 0;
while (_local6 < _arg3) {
waves[_arg1].push(_local5);
_local6++;
};
}
private function initWaves(){
var _local1:uint;
waves = new Array();
_local1 = 0;
while (_local1 <= WAVES) {
waves[_local1] = new Array();
_local1++;
};
}
}
}//package
Section 122
//WaveEndSound (WaveEndSound)
package {
import flash.media.*;
public dynamic class WaveEndSound extends Sound {
}
}//package
Section 123
//Waypoint (Waypoint)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Waypoint extends WP {
public function Waypoint(){
addFrameScript(0, frame1);
}
function frame1(){
isWindowWP(false);
}
}
}//package
Section 124
//Waypoint_Windows (Waypoint_Windows)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Waypoint_Windows extends WP {
public function Waypoint_Windows(){
addFrameScript(0, frame1);
}
function frame1(){
isWindowWP(true);
}
}
}//package
Section 125
//Window (Window)
package {
import flash.display.*;
public dynamic class Window extends MovieClip {
}
}//package
Section 126
//WinSnd (WinSnd)
package {
import flash.media.*;
public dynamic class WinSnd extends Sound {
}
}//package
Section 127
//WP (WP)
package {
import flash.display.*;
import flash.events.*;
public class WP extends MovieClip {
var :int;
var :int;
var isWindow:Boolean;
var game:SAS;
public function WP(){
if ((this is Waypoint_Windows)){
isWindow = true;
};
}
public function isWindowWP(_arg1){
isWindow = _arg1;
}
}
}//package
Section 128
//Zombie (Zombie)
package {
import flash.display.*;
import flash.events.*;
import flash.ui.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
public dynamic class Zombie extends Baddie {
public var attackNum:int;
public function Zombie(){
addFrameScript(0, frame1, 9, frame10, 10, frame11, 20, frame21, 24, frame25, 34, frame35, 39, frame40, 55, frame56);
}
function frame10(){
gotoAndStop(1);
attacking = false;
beingHit = false;
}
function frame25(){
attacking = false;
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame21(){
doHit();
}
function frame11(){
attackNum = (Math.floor((Math.random() * 2)) + 1);
if (attackNum == 1){
gotoAndPlay("att1");
} else {
gotoAndPlay("att2");
};
}
function frame35(){
doHit();
}
function frame40(){
attacking = false;
gotoAndStop(1);
}
function frame56(){
stop();
deleteMe();
}
}
}//package
Section 129
//ZombieDieSnd (ZombieDieSnd)
package {
import flash.media.*;
public dynamic class ZombieDieSnd extends Sound {
}
}//package
Section 130
//ZombieSnd (ZombieSnd)
package {
import flash.media.*;
public dynamic class ZombieSnd extends Sound {
}
}//package