Section 1
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.events.*;
import flash.display.*;
import flash.system.*;
import flash.net.*;
public class AdLoader extends Sprite {
private var cpmstarLoader:Loader;
private var contentspotid:String;
public function AdLoader(_arg1:String){
this.contentspotid = _arg1;
addEventListener(Event.ADDED, addedHandler);
}
private function dispatchHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
private function errorCatch(_arg1:Event):void{
}
private function addedHandler(_arg1:Event):void{
removeEventListener(Event.ADDED, addedHandler);
Security.allowDomain("server.cpmstar.com");
var _local2 = "http://server.cpmstar.com/adviewas3.swf";
var _local3:DisplayObjectContainer = parent;
cpmstarLoader = new Loader();
cpmstarLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorCatch);
cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + contentspotid)));
addChild(cpmstarLoader);
}
}
}//package CPMStar
Section 2
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "3.2.0.3958";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 3
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.core
Section 4
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 5
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 6
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.2.0.3958";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 7
//FontAsset (mx.core.FontAsset)
package mx.core {
import flash.text.*;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.core
Section 8
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 9
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 10
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 11
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 12
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public function MovieClipAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 13
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject {
protected var initialHeight:Number;// = 0
private var loader:Loader;// = null
private var initialized:Boolean;// = false
protected var initialWidth:Number;// = 0
private var requestedHeight:Number;
private var requestedWidth:Number;
mx_internal static const VERSION:String = "3.2.0.3958";
public function MovieClipLoaderAsset(){
var _local1:LoaderContext = new LoaderContext();
_local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local1)){
_local1["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.loadBytes(movieClipData, _local1);
addChild(loader);
}
override public function get width():Number{
if (!initialized){
return (initialWidth);
};
return (super.width);
}
override public function set width(_arg1:Number):void{
if (!initialized){
requestedWidth = _arg1;
} else {
loader.width = _arg1;
};
}
override public function get measuredHeight():Number{
return (initialHeight);
}
private function completeHandler(_arg1:Event):void{
initialized = true;
initialWidth = loader.width;
initialHeight = loader.height;
if (!isNaN(requestedWidth)){
loader.width = requestedWidth;
};
if (!isNaN(requestedHeight)){
loader.height = requestedHeight;
};
dispatchEvent(_arg1);
}
override public function set height(_arg1:Number):void{
if (!initialized){
requestedHeight = _arg1;
} else {
loader.height = _arg1;
};
}
override public function get measuredWidth():Number{
return (initialWidth);
}
override public function get height():Number{
if (!initialized){
return (initialHeight);
};
return (super.height);
}
public function get movieClipData():ByteArray{
return (null);
}
}
}//package mx.core
Section 14
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 15
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.2.0.3958";
}
}//package mx.core
Section 16
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import flash.utils.*;
import mx.core.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.2.0.3958";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var result:String;
var o:DisplayObject;
var s:String;
var indices:Array;
var displayObject = _arg1;
try {
o = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
} catch(e:SecurityError) {
};
return (result);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 17
//Debug (org.hoah.debug.Debug)
package org.hoah.debug {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
import flash.system.*;
import flash.ui.*;
public class Debug extends Sprite {
private var _maxFPS:int;// = -10000
private var _logBox:TextField;
private var _memoryBox:TextField;
private var _maxMemory:Number;
private var _consoleBox:TextField;
private var _actualAverageFps:int;// = 0
private var _averageFps:int;// = 0
private var _fps:int;// = 0
private var _logBoxLines:Array;
private var _fpsBox:TextField;
private var _floatingFPS:TextField;
private var _hidden:Boolean;// = false
private var _averageStep:int;// = 0
private var _logHistory:String;// = ""
private var _lastTimer:int;// = 0
private var _history:Array;
private var _minFPS:int;// = 10000
private var _commands:Array;
private var _minMemory:Number;// = INF
public var disabled:Boolean;// = true
private static var _instance:Debug;
public function Debug(){
var _local1:Error;
_fpsBox = new TextField();
_memoryBox = new TextField();
_consoleBox = new TextField();
_logBox = new TextField();
_floatingFPS = new TextField();
_commands = [];
_maxMemory = -(Infinity);
_logBoxLines = [];
_history = [""];
super();
if (_instance != null){
_local1 = new Error("Debug: This class is a singleton, therefore you should use 'Debug.instance' to access it. Don't use 'new Debug()'. Example: stage.addChild(Debug.instance);", 0);
throw (_local1);
};
_instance = this;
addEventListener(Event.ADDED_TO_STAGE, _bindStageEvents);
addEventListener(Event.ENTER_FRAME, _update);
registerCommand("cls", clearLog);
registerCommand("hide", _hideDebug);
registerCommand("help", _outputHelp);
registerCommand("peak", _outputPeaks);
registerCommand("fps", _toggleFloatingFps);
registerCommand("quality", _setQuality);
registerCommand("savelog", _saveLog);
registerCommand("gc", _garbageCollect);
}
private function _outputHelp(_arg1:Array=null):void{
var _local3:String;
if (_arg1[0] == "?"){
log("help - Shows the help. Duh.");
return;
};
log("{44FF44}----- HoahDebug Version 1.0 -----{/}");
log("Available Commands: (Use '[command] ?' for more info)");
var _local2 = "";
for (_local3 in _commands) {
if (_local3 == "help"){
} else {
_local2 = (_local2 + (_local3 + ", "));
if (_local2.length > 100){
log(_local2);
_local2 = "";
};
};
};
_local2 = (_local2 + "help");
log(_local2);
}
public function handleCommand(_arg1:String):void{
if (disabled){
return;
};
_history.push(_arg1);
if (_history.length > 100){
_history.shift();
};
var _local2:Array = _arg1.split(" ");
var _local3:String = _local2.shift().toString().toLowerCase();
if (_commands[_local3] == null){
log(("Unknown Command: " + _local3));
return;
};
var _local4 = _commands;
_local4[_local3](_local2);
}
private function _toggleFloatingFps(_arg1:Array=null):void{
if (disabled){
return;
};
if (_floatingFPS.parent != null){
stage.removeChild(_floatingFPS);
} else {
stage.addChild(_floatingFPS);
};
}
private function _handleKeyPress(_arg1:KeyboardEvent):void{
if (disabled){
return;
};
if (_arg1.keyCode == Keyboard.HOME){
if (_hidden){
show();
} else {
hide();
};
};
}
private function _consoleKeyUp(_arg1:KeyboardEvent):void{
if (disabled){
return;
};
if (_arg1.keyCode != Keyboard.HOME){
_arg1.stopImmediatePropagation();
};
}
public function registerCommand(_arg1:String, _arg2:Function):void{
if (disabled){
return;
};
_arg1 = _arg1.toLowerCase();
_commands[_arg1] = _arg2;
}
private function _hideDebug(_arg1:Array=null):void{
if (_arg1[0] == "?"){
log("hide - Hide the debug panel");
return;
};
hide();
}
private function _outputPeaks(_arg1:Array=null):void{
if (_arg1[0] == "?"){
log("peak - Shows lowest/highest memory usage and FPS");
return;
};
log((((("Lowest FPS: {FFCCCC}" + _minFPS) + "{/} - Highest FPS: {CCFFCC}") + _maxFPS) + "{/}"));
log((((("Lowest Memory Usage: {CCFFCC}" + _minMemory) + " MB{/} - Highest Memory Usage: {FFCCCC}") + _maxMemory) + " MB{/}"));
}
public function clearLog(_arg1:Array=null):void{
if (_arg1[0] == "?"){
log("cls - Clear the debug panel");
return;
};
_logBoxLines = new Array();
_logBox.htmlText = _logBoxLines.join("<br />\n");
}
public function hide(_arg1:Event=null):void{
if (disabled){
return;
};
_hidden = true;
visible = false;
}
private function _saveLog(_arg1:Array=null):void{
if (_arg1[0] == "?"){
log("saveLog - saves the current sessions debug log to the clipboard");
return;
};
log("Saved debug log to clipboard.");
var _local2 = "<style>body{background-color: #333333;color:#FFFFFF;font-family:'courier new',courier,monospace;}</style>\r\n";
var _local3:Date = new Date();
var _local4:String = ((_local3.toDateString() + " at ") + _local3.toTimeString());
_local2 = (_local2 + (("-- Debug log - Saved at " + _local4) + " --\r\n"));
System.setClipboard((_local2 + _logHistory));
}
public function log(_arg1:String):void{
if (disabled){
return;
};
if (_arg1 == null){
return;
};
var _local2:Date = new Date();
var _local3:String = _local2.toTimeString();
var _local4:RegExp = new RegExp("{/}", "g");
_arg1 = _arg1.replace(_local4, "</b></font>");
_local4 = new RegExp("{", "g");
_arg1 = _arg1.replace(_local4, "<font color='#");
_local4 = new RegExp("}", "g");
_arg1 = _arg1.replace(_local4, "'><b>");
_logHistory = (_logHistory + ((("<br />\r\n<font color='#DEDEDE'>[" + _local3) + "]</font> ") + _arg1));
_logBoxLines.push(_arg1);
if (_logBoxLines.length > 7){
_logBoxLines.shift();
};
_logBox.htmlText = _logBoxLines.join("<br />\n");
trace("[Debug Log]:", _arg1);
}
private function _garbageCollect(_arg1:Array=null):void{
if (_arg1[0] == "?"){
log("GC - Tries to force garbage collection");
return;
};
System.gc();
log("GC: Calling garbage truck...");
}
private function _setQuality(_arg1:Array=null):void{
if ((((_arg1[0] == null)) || ((_arg1[0] == "?")))){
log("{FFCCCC}[USAGE]{/}: quality [high|medium|low] - Sets the flash quality");
return;
};
if (_arg1[0] == "high"){
stage.quality = StageQuality.HIGH;
} else {
if (_arg1[0] == "medium"){
stage.quality = StageQuality.MEDIUM;
} else {
if (_arg1[0] == "low"){
stage.quality = StageQuality.LOW;
} else {
log("{FFCCCC}[USAGE]: quality [high|medium|low] - Sets the flash quality{/}");
};
};
};
}
private function _consoleKeyDown(_arg1:KeyboardEvent):void{
if (disabled){
return;
};
if (_arg1.keyCode == 13){
log(("> " + _consoleBox.text));
handleCommand(_consoleBox.text);
_consoleBox.text = "";
} else {
if (_arg1.keyCode == 38){
_history.unshift(_history.pop());
_consoleBox.text = _history[0];
} else {
if (_arg1.keyCode == 40){
_history.push(_history.shift());
_consoleBox.text = _history[0];
};
};
};
}
private function _update(_arg1:Event):void{
if (disabled){
return;
};
if (_lastTimer == 0){
_lastTimer = getTimer();
return;
};
_fps = (1000 / (getTimer() - _lastTimer));
_averageFps = (_averageFps + _fps);
_averageStep++;
if (_averageStep > 30){
_averageFps = (_averageFps / 30);
_actualAverageFps = _averageFps;
_averageStep = 0;
if (_averageFps < 10){
log((("{FFBB00}WARNING: Low frame rate - " + _averageFps.toString()) + "{/}"));
};
_minFPS = Math.min(_minFPS, _averageFps);
_maxFPS = Math.max(_maxFPS, _averageFps);
_floatingFPS.text = _actualAverageFps.toString();
};
_lastTimer = getTimer();
_fpsBox.text = ((("FPS: " + _fps.toString()) + " Average: ") + _actualAverageFps.toString());
var _local2:Number = (Math.round((((System.totalMemory / 0x0400) / 0x0400) * 100)) / 100);
_memoryBox.text = (("Memory usage: " + _local2.toString()) + "MB");
_maxMemory = Math.max(_local2, _maxMemory);
_minMemory = Math.min(_local2, _minMemory);
}
private function _bindStageEvents(_arg1:Event):void{
if (disabled){
return;
};
graphics.clear();
graphics.beginFill(0, 0.6);
graphics.drawRect(0, 0, stage.stageWidth, 150);
graphics.beginFill(0, 0.6);
graphics.drawRect(0, (150 - 24), stage.stageWidth, 20);
stage.addEventListener(KeyboardEvent.KEY_UP, _handleKeyPress);
_fpsBox.selectable = false;
_fpsBox.defaultTextFormat = new TextFormat("Arial", 12, 0xFFFFFF);
_fpsBox.text = "FPS: 0";
_fpsBox.x = 10;
_fpsBox.y = 5;
_fpsBox.width = 200;
_memoryBox.selectable = false;
_memoryBox.defaultTextFormat = new TextFormat("Arial", 12, 0xFFFFFF);
_memoryBox.text = "Memory: 0 MB";
_memoryBox.x = 200;
_memoryBox.y = 5;
_memoryBox.width = 300;
_logBox.x = 10;
_logBox.y = 24;
_logBox.width = (stage.stageWidth - 20);
_logBox.height = 110;
_logBox.defaultTextFormat = new TextFormat("Courier New", 11, 0xFFFFFF);
log("Ready");
_consoleBox.x = 10;
_consoleBox.y = (150 - 24);
_consoleBox.width = (stage.stageWidth - 20);
_consoleBox.height = 24;
_consoleBox.type = TextFieldType.INPUT;
_consoleBox.addEventListener(KeyboardEvent.KEY_DOWN, _consoleKeyDown);
_consoleBox.addEventListener(KeyboardEvent.KEY_UP, _consoleKeyUp);
_consoleBox.defaultTextFormat = new TextFormat("Courier New", 12, 0xFFFFFF);
_floatingFPS.x = (stage.stageWidth - 100);
_floatingFPS.y = 0;
_floatingFPS.width = 100;
_floatingFPS.height = 30;
_floatingFPS.type = TextFieldType.DYNAMIC;
_floatingFPS.defaultTextFormat = new TextFormat("Arial", 25, 0xFFDD00, true, null, null, null, null, TextFormatAlign.RIGHT);
_floatingFPS.filters = [new GlowFilter(0, 1, 3, 3, 8)];
_floatingFPS.text = "00";
addChild(_fpsBox);
addChild(_logBox);
addChild(_memoryBox);
addChild(_consoleBox);
hide();
}
public function show(_arg1:Event=null):void{
if (disabled){
return;
};
_hidden = false;
visible = true;
x = 0;
y = 0;
stage.focus = _consoleBox;
parent.setChildIndex(this, (parent.numChildren - 1));
}
public static function log(_arg1:String):void{
instance.log(_arg1);
}
public static function get instance():Debug{
if (_instance == null){
new (Debug);
};
return (_instance);
}
public static function registerCommand(_arg1:String, _arg2:Function):void{
instance.registerCommand(_arg1, _arg2);
}
}
}//package org.hoah.debug
Section 18
//Tracer (org.hoah.debug.Tracer)
package org.hoah.debug {
import flash.events.*;
import flash.net.*;
public class Tracer {
public static const VAR_VERSION:String = "0.9";
public static const VAR_GAME:String = "notc";
public static var active:Boolean = false;
public static function log(_arg1:String):void{
submit("log", ("t=" + _arg1));
}
public static function error(_arg1:String):void{
submit("error", ("t=" + _arg1));
}
public static function info(_arg1:String):void{
submit("info", ("t=" + _arg1));
}
private static function disposeLoader(_arg1:Event):void{
var _local2:URLLoader = (_arg1.target as URLLoader);
_local2.addEventListener(HTTPStatusEvent.HTTP_STATUS, disposeLoader);
_local2.addEventListener(IOErrorEvent.IO_ERROR, disposeLoader);
_local2.addEventListener(SecurityErrorEvent.SECURITY_ERROR, disposeLoader);
_local2.addEventListener(Event.COMPLETE, disposeLoader);
}
private static function submit(_arg1:String, _arg2:String):void{
if (!active){
return;
};
var _local3:URLLoader = new URLLoader();
_local3.addEventListener(HTTPStatusEvent.HTTP_STATUS, disposeLoader);
_local3.addEventListener(IOErrorEvent.IO_ERROR, disposeLoader);
_local3.addEventListener(SecurityErrorEvent.SECURITY_ERROR, disposeLoader);
_local3.addEventListener(Event.COMPLETE, disposeLoader);
_local3.load(new URLRequest(((((((("http://hoah.org/tracker/?g=" + VAR_GAME) + "&v=") + VAR_VERSION) + "&m=") + _arg1) + "&") + _arg2)));
}
public static function alert(_arg1:String):void{
submit("alert", ("t=" + _arg1));
}
}
}//package org.hoah.debug
Section 19
//ProtectedMemory (org.hoah.memory.ProtectedMemory)
package org.hoah.memory {
import flash.utils.*;
public class ProtectedMemory {
private static var _table:Object = {};
private static function _h(_arg1):uint{
var _local2:ByteArray = new ByteArray();
_local2.writeObject(_arg1);
_local2.compress();
while (_local2.length < 4) {
_local2.writeByte(_local2.length);
};
_local2.position = 0;
return (_local2.readUnsignedInt());
}
public static function readInt(_arg1:String):int{
if (_table[_arg1] == null){
return (0);
};
var _local2:MemoryObject = _table[_arg1];
if (_h(_local2.value) != _local2.hash){
writeVariable(_arg1, 0);
return (0);
};
return (_local2.value);
}
public static function writeVariable(_arg1:String, _arg2):void{
if (_table[_arg1] == null){
_table[_arg1] = new MemoryObject();
};
var _local3:MemoryObject = _table[_arg1];
_local3.value = _arg2;
_local3.hash = _h(_arg2);
}
}
}//package org.hoah.memory
class MemoryObject {
public var value;
public var hash:uint;// = 0
private function MemoryObject(){
}
}
Section 20
//BloodParticle (org.hoah.particles.BloodParticle)
package org.hoah.particles {
import flash.display.*;
import flash.geom.*;
public class BloodParticle extends Particle {
private static var decreaseTf:ColorTransform = new ColorTransform(1, 1, 1, 0.6, 0, 0, 0, 0);
private static var _bloodParticle:Class = BloodParticle__bloodParticle;
private static var _bloodParticleBmp:BitmapData = new _bloodParticle().bitmapData;
public function BloodParticle(_arg1:Point, _arg2:ParticleRenderer, _arg3:Point=null){
var _local4:Number;
var _local5:Number;
var _local6:int;
var _local7:Number;
if (_arg3 != null){
_local7 = (6 + (Math.random() * 15));
_local4 = (_arg3.x * _local7);
_local5 = (_arg3.y * _local7);
_local6 = 20;
} else {
_local4 = ((Math.random() * 4) - 2);
_local5 = ((Math.random() * 4) - 2);
_local6 = (10 + (Math.random() * 5));
};
super(_arg1, new Point(_local4, _local5), _bloodParticleBmp.clone(), _local6);
this.renderer = _arg2;
}
override public function update(_arg1:BitmapData):void{
bmd.colorTransform(bmd.rect, decreaseTf);
super.update(_arg1);
}
}
}//package org.hoah.particles
Section 21
//BloodParticle__bloodParticle (org.hoah.particles.BloodParticle__bloodParticle)
package org.hoah.particles {
import mx.core.*;
public class BloodParticle__bloodParticle extends BitmapAsset {
}
}//package org.hoah.particles
Section 22
//ExplodeParticle (org.hoah.particles.ExplodeParticle)
package org.hoah.particles {
import flash.display.*;
import flash.geom.*;
public class ExplodeParticle extends Particle {
private static var decreaseTf:ColorTransform = new ColorTransform(1, 1, 1, 0.9, 0, 0, 0, 0);
private static var _explodeParticle:Class = ExplodeParticle__explodeParticle;
private static var _explodeParticleBmp:BitmapData = new _explodeParticle().bitmapData;
public function ExplodeParticle(_arg1:Point, _arg2:ParticleRenderer){
var _local3:Number = (-2 + (Math.random() * 4));
var _local4:Number = (-2 + (Math.random() * 4));
var _local5 = 10;
super(_arg1, new Point(_local3, _local4), _explodeParticleBmp.clone(), _local5);
this.renderer = _arg2;
}
override public function update(_arg1:BitmapData):void{
bmd.colorTransform(bmd.rect, decreaseTf);
super.update(_arg1);
}
}
}//package org.hoah.particles
Section 23
//ExplodeParticle__explodeParticle (org.hoah.particles.ExplodeParticle__explodeParticle)
package org.hoah.particles {
import mx.core.*;
public class ExplodeParticle__explodeParticle extends BitmapAsset {
}
}//package org.hoah.particles
Section 24
//MuzzleParticle (org.hoah.particles.MuzzleParticle)
package org.hoah.particles {
import flash.display.*;
import flash.geom.*;
public class MuzzleParticle extends Particle {
private static var decreaseTf:ColorTransform = new ColorTransform(1, 1, 1, 0.5, 0, 0, 0, 0);
private static var _muzzleParticle:Class = MuzzleParticle__muzzleParticle;
private static var _muzzleParticleBmp:BitmapData = new _muzzleParticle().bitmapData;
public function MuzzleParticle(_arg1:Point, _arg2:ParticleRenderer, _arg3:Point=null){
var _local4:Number;
var _local5:Number;
var _local6:int;
var _local7:Number = (1 + (Math.random() * 10));
_local4 = ((_arg3.x * _local7) + Math.random());
_local5 = ((_arg3.y * _local7) + Math.random());
_local6 = 10;
super(_arg1, new Point(_local4, _local5), _muzzleParticleBmp.clone(), _local6);
this.renderer = _arg2;
}
override public function update(_arg1:BitmapData):void{
bmd.colorTransform(bmd.rect, decreaseTf);
super.update(_arg1);
}
}
}//package org.hoah.particles
Section 25
//MuzzleParticle__muzzleParticle (org.hoah.particles.MuzzleParticle__muzzleParticle)
package org.hoah.particles {
import mx.core.*;
public class MuzzleParticle__muzzleParticle extends BitmapAsset {
}
}//package org.hoah.particles
Section 26
//Particle (org.hoah.particles.Particle)
package org.hoah.particles {
import flash.display.*;
import org.hoah.zombies.*;
import flash.geom.*;
public class Particle {
public var bmd:BitmapData;// = null
public var vX:Number;
public var renderer:ParticleRenderer;
public var vY:Number;
public var ttl:int;// = 0
public var y:Number;
public var x:Number;
public function Particle(_arg1:Point, _arg2:Point, _arg3:BitmapData, _arg4:int=10){
bmd = _arg3;
vX = _arg2.x;
vY = _arg2.y;
x = _arg1.x;
y = _arg1.y;
ttl = _arg4;
}
public function update(_arg1:BitmapData):void{
if (bmd == null){
return;
};
x = (x + vX);
y = (y + vY);
ttl--;
if (ttl <= 0){
dispose();
return;
};
var _local2:Point = new Point((Map.instance.offsetX + x), (Map.instance.offsetY + y));
_arg1.copyPixels(bmd, bmd.rect, _local2, null, null, true);
}
public function dispose():void{
renderer.particles.splice(renderer.particles.indexOf(this), 1);
bmd.dispose();
bmd = null;
}
}
}//package org.hoah.particles
Section 27
//ParticleRenderer (org.hoah.particles.ParticleRenderer)
package org.hoah.particles {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class ParticleRenderer {
private var lastRender:int;// = 0
private var parent:EventDispatcher;
public var screen:BitmapData;
public var particles:Array;
private var particleCap:int;// = 550
private static var instances:Array = [];
public function ParticleRenderer(_arg1:BitmapData, _arg2:EventDispatcher){
particles = [];
super();
instances.push(this);
screen = _arg1;
parent = _arg2;
parent.addEventListener(Event.ENTER_FRAME, renderGroups);
lastRender = getTimer();
}
public function newBulletExplode(_arg1:int, _arg2:int):void{
if (particles.length > particleCap){
return;
};
var _local3:Point = new Point(_arg1, _arg2);
var _local4:int;
while (_local4 < 10) {
particles.push(new ExplodeParticle(_local3, this));
_local4++;
};
}
public function newBloodSplat(_arg1:int, _arg2:int, _arg3:Number):void{
if (particles.length > particleCap){
return;
};
var _local4:Point = new Point(_arg1, _arg2);
var _local5:Point = new Point(Math.cos(_arg3), Math.sin(_arg3));
var _local6:int;
while (_local6 < 10) {
particles.push(new BloodParticle(_local4, this));
particles.push(new BloodParticle(_local4, this, _local5));
_local6++;
};
}
public function newBloodExplode(_arg1:int, _arg2:int):void{
var _local5:Number;
var _local6:Point;
var _local7:int;
if (particles.length > particleCap){
return;
};
var _local3:Point = new Point(_arg1, _arg2);
var _local4:int;
while (_local4 < 5) {
_local5 = ((Math.random() * Math.PI) * 2);
_local6 = new Point(Math.cos(_local5), Math.sin(_local5));
_local7 = 0;
while (_local7 < 5) {
particles.push(new BloodParticle(_local3, this, _local6));
_local7++;
};
_local4++;
};
}
public function newMuzzleFlash(_arg1:int, _arg2:int, _arg3:Number, _arg4:Number):void{
if (particles.length > particleCap){
return;
};
_arg4 = (_arg4 + (Math.PI / 2));
var _local5:Point = new Point(_arg1, _arg2);
var _local6:Point = new Point(Math.cos(_arg4), Math.sin(_arg4));
var _local7:int;
while (_local7 < _arg3) {
particles.push(new MuzzleParticle(_local5, this, _local6));
particles.push(new SmokeParticle(_local5, this));
_local7++;
};
}
public function renderGroups(_arg1:Event):void{
var _local3:Particle;
var _local2:Array = [];
for each (_local3 in particles) {
_local2.push(_local3);
};
for each (_local3 in _local2) {
_local3.vX = (_local3.vX * 0.9);
_local3.vY = (_local3.vY * 0.9);
_local3.update(screen);
};
}
public function dispose():void{
var p:Particle;
try {
screen.dispose();
} catch(e:Error) {
};
screen = null;
parent.removeEventListener(Event.ENTER_FRAME, renderGroups);
lastRender = 0;
var tmpParticles:Array = [];
for each (p in particles) {
tmpParticles.push(p);
};
for each (p in tmpParticles) {
p.dispose();
};
tmpParticles = null;
particles = null;
}
public static function dispose():void{
var _local1:ParticleRenderer;
for each (_local1 in instances) {
_local1.dispose();
_local1 = null;
};
instances = [];
trace("Disposed particle renderer");
}
}
}//package org.hoah.particles
Section 28
//SmokeParticle (org.hoah.particles.SmokeParticle)
package org.hoah.particles {
import flash.display.*;
import flash.geom.*;
public class SmokeParticle extends Particle {
private static var decreaseTf:ColorTransform = new ColorTransform(1, 1, 1, 0.95, 0, 0, 0, 0);
private static var _smokeParticle:Class = SmokeParticle__smokeParticle;
private static var _smokeParticleBmp:BitmapData = new _smokeParticle().bitmapData;
public function SmokeParticle(_arg1:Point, _arg2:ParticleRenderer){
var _local3:Number = (0.5 + (Math.random() * 1.5));
var _local4:Number = (0.5 + (Math.random() * 1.5));
var _local5 = 50;
super(_arg1, new Point(_local3, _local4), _smokeParticleBmp.clone(), _local5);
this.renderer = _arg2;
}
override public function update(_arg1:BitmapData):void{
bmd.colorTransform(bmd.rect, decreaseTf);
super.update(_arg1);
}
}
}//package org.hoah.particles
Section 29
//SmokeParticle__smokeParticle (org.hoah.particles.SmokeParticle__smokeParticle)
package org.hoah.particles {
import mx.core.*;
public class SmokeParticle__smokeParticle extends BitmapAsset {
}
}//package org.hoah.particles
Section 30
//Light (org.hoah.shadows.Light)
package org.hoah.shadows {
public class Light {
private var _prevFaces:Array;
private var _shadowLength:Number;// = 1000
private var _colour:uint;// = 0xFFFFFF
public var layer:ShadowLayer;
private var _position:ShadowCasterPoint;
private var _x:int;// = 100
private var _y:int;// = 100
private var _intensity:Number;// = 0.5
public function Light(_arg1:Number, _arg2:Number, _arg3:uint){
layer = new ShadowLayer();
_position = new ShadowCasterPoint(0, 0);
super();
_x = _arg1;
_y = _arg2;
_position.x = _x;
_position.y = _y;
_colour = _arg3;
layer.cacheAsBitmap = true;
}
public function get y():int{
return (_y);
}
public function set y(_arg1:int):void{
if (_y == _arg1){
return;
};
_y = _arg1;
_position.y = _y;
render(_prevFaces);
}
public function setPosition(_arg1:int, _arg2:int):void{
if ((((_x == _arg1)) && ((_y == _arg2)))){
return;
};
_position.x = _arg1;
_position.y = _arg2;
_x = _arg1;
_y = _arg2;
}
public function set intensity(_arg1:Number):void{
_intensity = _arg1;
}
public function get colour():uint{
return (_colour);
}
public function get x():int{
return (_x);
}
public function render(_arg1:Array):void{
var f:*;
var angleToLight:*;
var lineAngle:*;
var angle:*;
var fX:*;
var fY:*;
var faces = _arg1;
_prevFaces = faces;
var _local3 = layer.graphics;
with (_local3) {
clear();
for each (f in faces) {
if (f.centerPoint.distanceFrom(_position) > 400){
} else {
angleToLight = f.centerPoint.rotationTo(_position);
lineAngle = (f.direction - angleToLight);
if (lineAngle < 0){
lineAngle = (lineAngle + (Math.PI * 2));
};
if (lineAngle > (Math.PI * 2)){
lineAngle = (lineAngle - (Math.PI * 2));
};
if (lineAngle >= Math.PI){
} else {
beginFill(0x111111);
moveTo(f.p1.x, f.p1.y);
lineTo(f.p2.x, f.p2.y);
angle = Math.atan2((_y - f.p2.y), (_x - f.p2.x));
fX = (f.p2.x - (Math.cos(angle) * _shadowLength));
fY = (f.p2.y - (Math.sin(angle) * _shadowLength));
lineTo(fX, fY);
angle = Math.atan2((_y - f.p1.y), (_x - f.p1.x));
fX = (f.p1.x - (Math.cos(angle) * _shadowLength));
fY = (f.p1.y - (Math.sin(angle) * _shadowLength));
lineTo(fX, fY);
lineTo(f.p1.x, f.p1.y);
endFill();
};
};
};
};
}
public function set x(_arg1:int):void{
if (_x == _arg1){
return;
};
_x = _arg1;
_position.x = _x;
render(_prevFaces);
}
}
}//package org.hoah.shadows
Section 31
//ShadowCasterFace (org.hoah.shadows.ShadowCasterFace)
package org.hoah.shadows {
import flash.geom.*;
public class ShadowCasterFace {
public var p1:ShadowCasterPoint;
public var p2:ShadowCasterPoint;
public var centerPoint:ShadowCasterPoint;
public var length:Number;
public var direction:Number;
public static var instances:Array = [];
public function ShadowCasterFace(_arg1:ShadowCasterPoint, _arg2:ShadowCasterPoint){
instances.push(this);
centerPoint = new ShadowCasterPoint(((_arg1.x + _arg2.x) / 2), ((_arg1.y + _arg2.y) / 2));
direction = _arg1.rotationTo(_arg2);
length = _arg1.distanceFrom(_arg2);
p1 = _arg1;
p2 = _arg2;
}
public function intersects(_arg1:Point, _arg2:Point):Point{
var _local3:Point;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local4 = (p2.y - p1.y);
_local6 = (p1.x - p2.x);
_local8 = ((p2.x * p1.y) - (p1.x * p2.y));
_local5 = (_arg2.y - _arg1.y);
_local7 = (_arg1.x - _arg2.x);
_local9 = ((_arg2.x * _arg1.y) - (_arg1.x * _arg2.y));
var _local10:Number = ((_local4 * _local7) - (_local5 * _local6));
if (_local10 == 0){
return (null);
};
_local3 = new Point();
_local3.x = (((_local6 * _local9) - (_local7 * _local8)) / _local10);
_local3.y = (((_local5 * _local8) - (_local4 * _local9)) / _local10);
if (Point.distance(_local3, p2.toPoint()) > Point.distance(p1.toPoint(), p2.toPoint())){
return (null);
};
if (Point.distance(_local3, p1.toPoint()) > Point.distance(p1.toPoint(), p2.toPoint())){
return (null);
};
if (Point.distance(_local3, _arg2) > Point.distance(_arg1, _arg2)){
return (null);
};
if (Point.distance(_local3, _arg1) > Point.distance(_arg1, _arg2)){
return (null);
};
return (_local3);
}
}
}//package org.hoah.shadows
Section 32
//ShadowCasterPoint (org.hoah.shadows.ShadowCasterPoint)
package org.hoah.shadows {
import flash.geom.*;
public class ShadowCasterPoint {
public var userdata:String;// = ""
private var _x:Number;
private var _y:Number;
public var userdata2:String;// = ""
public function ShadowCasterPoint(_arg1:Number=0, _arg2:Number=0){
_x = _arg1;
_y = _arg2;
}
public function get y():Number{
return (_y);
}
public function get angle():Number{
return (Math.atan2(_y, _x));
}
public function distanceFrom(_arg1:ShadowCasterPoint):Number{
return (Math.sqrt((Math.pow((_x - _arg1.x), 2) + Math.pow((_y - _arg1.y), 2))));
}
public function rotationTo(_arg1:ShadowCasterPoint):Number{
return (Math.atan2((_arg1.y - _y), (_arg1.x - _x)));
}
public function set x(_arg1:Number):void{
_x = _arg1;
}
public function get magnitude():Number{
return (Math.sqrt((Math.pow(_x, 2) + Math.pow(_y, 2))));
}
public function get x():Number{
return (_x);
}
public function toPoint():Point{
return (new Point(_x, _y));
}
public function set y(_arg1:Number):void{
_y = _arg1;
}
}
}//package org.hoah.shadows
Section 33
//ShadowCastingObject (org.hoah.shadows.ShadowCastingObject)
package org.hoah.shadows {
public class ShadowCastingObject {
private var _points:Array;
private var _faces:Array;
public function ShadowCastingObject(){
_points = [];
super();
}
public function clearPoints():void{
_points = [];
}
public function get faces():Array{
return (_faces);
}
public function get points():Array{
return (_points);
}
public function addPoint(_arg1:ShadowCasterPoint):void{
var _local2:int;
var _local3:ShadowCasterPoint;
var _local4:ShadowCasterPoint;
_points.push(_arg1);
if (_points.length > 1){
_local2 = 0;
_faces = [];
while (_local2 < (_points.length - 1)) {
_local3 = _points[_local2];
_local4 = _points[(_local2 + 1)];
_faces.push(new ShadowCasterFace(_local3, _local4));
_local2++;
};
_local3 = _points[_local2];
_local4 = _points[0];
_faces.push(new ShadowCasterFace(_local3, _local4));
};
}
}
}//package org.hoah.shadows
Section 34
//ShadowLayer (org.hoah.shadows.ShadowLayer)
package org.hoah.shadows {
import flash.display.*;
public class ShadowLayer extends Sprite {
public function ShadowLayer(){
blendMode = BlendMode.MULTIPLY;
}
}
}//package org.hoah.shadows
Section 35
//ShadowWorld (org.hoah.shadows.ShadowWorld)
package org.hoah.shadows {
import flash.display.*;
public class ShadowWorld extends Sprite {
private var _overlayLayer:Sprite;
private var _inverter:Sprite;
private var _faceCache:Array;
private var _objects:Array;
private var _lightLayer:Sprite;
private var _lights:Array;
public static var instances:Array = [];
public function ShadowWorld(){
_lights = [];
_objects = [];
_lightLayer = new Sprite();
_overlayLayer = new Sprite();
_inverter = new Sprite();
_faceCache = [];
super();
instances.push(this);
addChild(_lightLayer);
}
public function addLight(_arg1:Light):void{
_lightLayer.addChild(_arg1.layer);
_lights.push(_arg1);
}
public function moveLights():void{
var _local1:Light;
var _local2:ShadowCastingObject;
var _local3:ShadowCasterPoint;
_overlayLayer.graphics.clear();
for each (_local1 in _lights) {
_overlayLayer.graphics.beginFill(_local1.colour);
_overlayLayer.graphics.drawCircle(_local1.x, _local1.y, 5);
_overlayLayer.graphics.endFill();
};
for each (_local2 in _objects) {
_overlayLayer.graphics.beginFill(0xBB0000);
_overlayLayer.graphics.moveTo(_local2.points[0].x, _local2.points[0].y);
for each (_local3 in _local2.points) {
_overlayLayer.graphics.lineTo(_local3.x, _local3.y);
};
_overlayLayer.graphics.lineTo(_local2.points[0].x, _local2.points[0].y);
_overlayLayer.graphics.endFill();
};
}
public function addObject(_arg1:ShadowCastingObject):void{
var _local2:ShadowCasterFace;
_objects.push(_arg1);
for each (_local2 in _arg1.faces) {
_faceCache.push(_local2);
};
}
public function render():void{
var _local1:Light;
for each (_local1 in _lights) {
_local1.render(_faceCache);
};
}
public function dispose():void{
_lights = null;
_objects = null;
_lightLayer = null;
_overlayLayer = null;
_inverter = null;
_faceCache = null;
}
public static function dispose():void{
var _local1:ShadowWorld;
for each (_local1 in instances) {
_local1.dispose();
};
}
}
}//package org.hoah.shadows
Section 36
//HoahSplashScreen (org.hoah.splash.HoahSplashScreen)
package org.hoah.splash {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
public class HoahSplashScreen extends MovieClip {
private var sponsorSplash:MovieClip;
private var _sponsorSplashCls:Class;
private var hoahSplash:MovieClip;
private var _hoahSplashCls:Class;
private var init:Function;
private var hitAreaMc:MovieClip;
public function HoahSplashScreen(_arg1:Function=null){
_hoahSplashCls = HoahSplashScreen__hoahSplashCls;
hoahSplash = new _hoahSplashCls();
_sponsorSplashCls = HoahSplashScreen__sponsorSplashCls;
hitAreaMc = new MovieClip();
init = _arg1;
hitAreaMc.graphics.beginFill(0, 0);
hitAreaMc.graphics.drawRect(0, 0, 640, 480);
hitAreaMc.graphics.endFill();
hitAreaMc.buttonMode = true;
hitAreaMc.addEventListener(MouseEvent.CLICK, gotoLink);
addChild(hoahSplash);
addChild(hitAreaMc);
hoahSplash.x = (320 - (550 / 2));
hoahSplash.y = (240 - (400 / 2));
setTimeout(finished, 3000);
super();
}
private function gotoLink(_arg1:Event):void{
navigateToURL(new URLRequest("http://hoah.org"), "_blank");
}
private function finished2():void{
sponsorSplash.stop();
removeChild(sponsorSplash);
sponsorSplash = null;
if (init != null){
init();
};
init = null;
parent.removeChild(this);
}
private function gotoSponsorLink(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.arcadebomb.com"), "_blank");
}
private function finished():void{
sponsorSplash = new _sponsorSplashCls();
hoahSplash.stop();
removeChild(hoahSplash);
addChild(sponsorSplash);
hoahSplash = null;
setTimeout(finished2, 4000);
setChildIndex(hitAreaMc, (numChildren - 1));
hitAreaMc.removeEventListener(MouseEvent.CLICK, gotoLink);
hitAreaMc.addEventListener(MouseEvent.CLICK, gotoSponsorLink);
}
}
}//package org.hoah.splash
Section 37
//HoahSplashScreen__hoahSplashCls (org.hoah.splash.HoahSplashScreen__hoahSplashCls)
package org.hoah.splash {
import flash.utils.*;
import mx.core.*;
public class HoahSplashScreen__hoahSplashCls extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function HoahSplashScreen__hoahSplashCls(){
dataClass = HoahSplashScreen__hoahSplashCls_dataClass;
super();
initialWidth = (11000 / 20);
initialHeight = (8000 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package org.hoah.splash
Section 38
//HoahSplashScreen__hoahSplashCls_dataClass (org.hoah.splash.HoahSplashScreen__hoahSplashCls_dataClass)
package org.hoah.splash {
import mx.core.*;
public class HoahSplashScreen__hoahSplashCls_dataClass extends ByteArrayAsset {
}
}//package org.hoah.splash
Section 39
//HoahSplashScreen__sponsorSplashCls (org.hoah.splash.HoahSplashScreen__sponsorSplashCls)
package org.hoah.splash {
import flash.utils.*;
import mx.core.*;
public class HoahSplashScreen__sponsorSplashCls extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function HoahSplashScreen__sponsorSplashCls(){
dataClass = HoahSplashScreen__sponsorSplashCls_dataClass;
super();
initialWidth = (0x3200 / 20);
initialHeight = (9600 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package org.hoah.splash
Section 40
//HoahSplashScreen__sponsorSplashCls_dataClass (org.hoah.splash.HoahSplashScreen__sponsorSplashCls_dataClass)
package org.hoah.splash {
import mx.core.*;
public class HoahSplashScreen__sponsorSplashCls_dataClass extends ByteArrayAsset {
}
}//package org.hoah.splash
Section 41
//AuxFunctions (org.hoah.Tweener.AuxFunctions)
package org.hoah.Tweener {
public class AuxFunctions {
public static function concatObjects(... _args):Object{
var _local3:Object;
var _local5:String;
var _local2:Object = {};
var _local4:int;
while (_local4 < _args.length) {
_local3 = _args[_local4];
for (_local5 in _local3) {
if (_local3[_local5] == null){
delete _local2[_local5];
} else {
_local2[_local5] = _local3[_local5];
};
};
_local4++;
};
return (_local2);
}
public static function numberToG(_arg1:Number):Number{
return (((_arg1 & 0xFF00) >> 8));
}
public static function numberToR(_arg1:Number):Number{
return (((_arg1 & 0xFF0000) >> 16));
}
public static function isInArray(_arg1:String, _arg2:Array):Boolean{
var _local3:uint = _arg2.length;
var _local4:uint;
while (_local4 < _local3) {
if (_arg2[_local4] == _arg1){
return (true);
};
_local4++;
};
return (false);
}
public static function getObjectLength(_arg1:Object):uint{
var _local3:String;
var _local2:uint;
for (_local3 in _arg1) {
_local2++;
};
return (_local2);
}
public static function numberToB(_arg1:Number):Number{
return ((_arg1 & 0xFF));
}
}
}//package org.hoah.Tweener
Section 42
//Equations (org.hoah.Tweener.Equations)
package org.hoah.Tweener {
public class Equations {
public function Equations(){
trace("Equations is a static class and should not be instantiated.");
}
public static function easeOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeInOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2));
}
public static function easeInOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
public static function easeInOutBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeInBounce((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOutBounce(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
public static function easeInOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
public static function easeOutInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCubic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInCubic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOutBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeInOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2));
}
public static function easeInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOutInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuint((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInQuint(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBounce((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInBounce(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function init():void{
Tweener.registerTransition("easenone", easeNone);
Tweener.registerTransition("linear", easeNone);
Tweener.registerTransition("easeinquad", easeInQuad);
Tweener.registerTransition("easeoutquad", easeOutQuad);
Tweener.registerTransition("easeinoutquad", easeInOutQuad);
Tweener.registerTransition("easeoutinquad", easeOutInQuad);
Tweener.registerTransition("easeincubic", easeInCubic);
Tweener.registerTransition("easeoutcubic", easeOutCubic);
Tweener.registerTransition("easeinoutcubic", easeInOutCubic);
Tweener.registerTransition("easeoutincubic", easeOutInCubic);
Tweener.registerTransition("easeinquart", easeInQuart);
Tweener.registerTransition("easeoutquart", easeOutQuart);
Tweener.registerTransition("easeinoutquart", easeInOutQuart);
Tweener.registerTransition("easeoutinquart", easeOutInQuart);
Tweener.registerTransition("easeinquint", easeInQuint);
Tweener.registerTransition("easeoutquint", easeOutQuint);
Tweener.registerTransition("easeinoutquint", easeInOutQuint);
Tweener.registerTransition("easeoutinquint", easeOutInQuint);
Tweener.registerTransition("easeinsine", easeInSine);
Tweener.registerTransition("easeoutsine", easeOutSine);
Tweener.registerTransition("easeinoutsine", easeInOutSine);
Tweener.registerTransition("easeoutinsine", easeOutInSine);
Tweener.registerTransition("easeincirc", easeInCirc);
Tweener.registerTransition("easeoutcirc", easeOutCirc);
Tweener.registerTransition("easeinoutcirc", easeInOutCirc);
Tweener.registerTransition("easeoutincirc", easeOutInCirc);
Tweener.registerTransition("easeinexpo", easeInExpo);
Tweener.registerTransition("easeoutexpo", easeOutExpo);
Tweener.registerTransition("easeinoutexpo", easeInOutExpo);
Tweener.registerTransition("easeoutinexpo", easeOutInExpo);
Tweener.registerTransition("easeinelastic", easeInElastic);
Tweener.registerTransition("easeoutelastic", easeOutElastic);
Tweener.registerTransition("easeinoutelastic", easeInOutElastic);
Tweener.registerTransition("easeoutinelastic", easeOutInElastic);
Tweener.registerTransition("easeinback", easeInBack);
Tweener.registerTransition("easeoutback", easeOutBack);
Tweener.registerTransition("easeinoutback", easeInOutBack);
Tweener.registerTransition("easeoutinback", easeOutInBack);
Tweener.registerTransition("easeinbounce", easeInBounce);
Tweener.registerTransition("easeoutbounce", easeOutBounce);
Tweener.registerTransition("easeinoutbounce", easeInOutBounce);
Tweener.registerTransition("easeoutinbounce", easeOutInBounce);
}
public static function easeOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)==_arg4) ? (_arg2 + _arg3) : (((_arg3 * 1.001) * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2));
}
public static function easeOutInBack(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutBack((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5));
};
return (easeInBack(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5));
}
public static function easeInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001)));
}
public static function easeInCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((-(_arg3) / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (Math.sqrt((1 - (_arg1 * _arg1))) + 1)) + _arg2));
}
public static function easeInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeInBounce(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOutBounce((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeOutInExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutExpo((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInExpo(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2));
}
public static function easeInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2));
}
public static function easeInOutQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2));
}
public static function easeOutQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeOutInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutElastic((_arg1 * 2), _arg2, (_arg3 / 2), _arg4, _arg5, _arg6));
};
return (easeInElastic(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4, _arg5, _arg6));
}
public static function easeInElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
}
public static function easeOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeOutInQuad(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuad((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInQuad(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2));
}
public static function easeInOutCubic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInOutQuint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
public static function easeInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((-(_arg3) * (Math.sqrt((1 - (_arg1 * _arg1))) - 1)) + _arg2));
}
public static function easeOutInSine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutSine((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInSine(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeInOutExpo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 == 0){
return (_arg2);
};
if (_arg1 == _arg4){
return ((_arg2 + _arg3));
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2) - (_arg3 * 0.0005)));
};
--_arg1;
return (((((_arg3 / 2) * 1.0005) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2));
}
public static function easeOutElastic(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=NaN, _arg6:Number=NaN):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2));
}
public static function easeOutCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * Math.sqrt((1 - (_arg1 * _arg1)))) + _arg2));
}
public static function easeOutInQuart(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutQuart((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInQuart(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
public static function easeOutInCirc(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (easeOutCirc((_arg1 * 2), _arg2, (_arg3 / 2), _arg4));
};
return (easeInCirc(((_arg1 * 2) - _arg4), (_arg2 + (_arg3 / 2)), (_arg3 / 2), _arg4));
}
}
}//package org.hoah.Tweener
Section 43
//PropertyInfoObj (org.hoah.Tweener.PropertyInfoObj)
package org.hoah.Tweener {
public class PropertyInfoObj {
public var modifierParameters:Array;
public var valueComplete:Number;
public var modifierFunction:Function;
public var hasModifier:Boolean;
public var valueStart:Number;
public function PropertyInfoObj(_arg1:Number, _arg2:Number, _arg3:Function, _arg4:Array){
valueStart = _arg1;
valueComplete = _arg2;
hasModifier = Boolean(_arg3);
modifierFunction = _arg3;
modifierParameters = _arg4;
}
public function toString():String{
var _local1 = "\n[PropertyInfoObj ";
_local1 = (_local1 + ("valueStart:" + String(valueStart)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("valueComplete:" + String(valueComplete)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierFunction:" + String(modifierFunction)));
_local1 = (_local1 + ", ");
_local1 = (_local1 + ("modifierParameters:" + String(modifierParameters)));
_local1 = (_local1 + "]\n");
return (_local1);
}
public function clone():PropertyInfoObj{
var _local1:PropertyInfoObj = new PropertyInfoObj(valueStart, valueComplete, modifierFunction, modifierParameters);
return (_local1);
}
}
}//package org.hoah.Tweener
Section 44
//Tweener (org.hoah.Tweener.Tweener)
package org.hoah.Tweener {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public class Tweener {
private static var _timeScale:Number = 1;
private static var _specialPropertySplitterList:Object;
private static var _engineExists:Boolean = false;
private static var _specialPropertyModifierList:Object;
private static var _currentTime:Number;
private static var _tweenList:Array;
private static var _specialPropertyList:Object;
private static var _transitionList:Object;
private static var _inited:Boolean = false;
private static var __tweener_controller__:MovieClip;
public function Tweener(){
trace("Tweener is a static class and should not be instantiated.");
}
public static function registerSpecialPropertyModifier(_arg1:String, _arg2:Function, _arg3:Function):void{
if (!_inited){
init();
};
}
public static function registerSpecialProperty(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Array=null):void{
if (!_inited){
init();
};
}
public static function addCaller(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local5:Number;
var _local6:Number;
var _local10:Function;
var _local11:TweenListObj;
var _local12:Number;
var _local13:String;
if ((((arguments.length < 2)) || ((arguments[0] == undefined)))){
return (false);
};
var _local4:Array = new Array();
if ((arguments[0] is Array)){
_local5 = 0;
while (_local5 < arguments[0].length) {
_local4.push(arguments[0][_local5]);
_local5++;
};
} else {
_local5 = 0;
while (_local5 < (arguments.length - 1)) {
_local4.push(arguments[_local5]);
_local5++;
};
};
var _local7:Object = arguments[(arguments.length - 1)];
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
var _local8:Number = (isNaN(_local7.time)) ? 0 : _local7.time;
var _local9:Number = (isNaN(_local7.delay)) ? 0 : _local7.delay;
if (typeof(_local7.transition) == "string"){
_local13 = _local7.transition.toLowerCase();
_local10 = _transitionList[_local13];
} else {
_local10 = _local7.transition;
};
if (!Boolean(_local10)){
_local10 = _transitionList["easeoutexpo"];
};
_local5 = 0;
while (_local5 < _local4.length) {
_local11 = new TweenListObj(_local4[_local5], (_currentTime + ((_local9 * 1000) / _timeScale)), (_currentTime + (((_local9 * 1000) + (_local8 * 1000)) / _timeScale)), (_local7.useFrames == true), _local10);
_local11.properties = null;
_local11.onStart = _local7.onStart;
_local11.onUpdate = _local7.onUpdate;
_local11.onComplete = _local7.onComplete;
_local11.onOverwrite = _local7.onOverwrite;
_local11.onStartParams = _local7.onStartParams;
_local11.onUpdateParams = _local7.onUpdateParams;
_local11.onCompleteParams = _local7.onCompleteParams;
_local11.onOverwriteParams = _local7.onOverwriteParams;
_local11.isCaller = true;
_local11.count = _local7.count;
_local11.waitFrames = _local7.waitFrames;
_tweenList.push(_local11);
if ((((_local8 == 0)) && ((_local9 == 0)))){
_local12 = (_tweenList.length - 1);
updateTweenByIndex(_local12);
removeTweenByIndex(_local12);
};
_local5++;
};
return (true);
}
public static function init(_arg1=null):void{
_inited = true;
_transitionList = new Object();
Equations.init();
_specialPropertyList = new Object();
_specialPropertyModifierList = new Object();
_specialPropertySplitterList = new Object();
}
private static function updateTweens():Boolean{
var _local1:int;
if (_tweenList.length == 0){
return (false);
};
_local1 = 0;
while (_local1 < _tweenList.length) {
if ((((_tweenList[_local1] == undefined)) || (!(_tweenList[_local1].isPaused)))){
if (!updateTweenByIndex(_local1)){
removeTweenByIndex(_local1);
};
if (_tweenList[_local1] == null){
removeTweenByIndex(_local1, true);
_local1--;
};
};
_local1++;
};
return (true);
}
public static function removeTweens(_arg1:Object, ... _args):Boolean{
var _local4:uint;
var _local3:Array = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(removeTweenByIndex, _arg1, _local3));
}
public static function pauseAllTweens():Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
var _local1:Boolean;
_local2 = 0;
while (_local2 < _tweenList.length) {
pauseTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function splitTweens(_arg1:Number, _arg2:Array):uint{
var _local5:uint;
var _local6:String;
var _local7:Boolean;
var _local3:TweenListObj = _tweenList[_arg1];
var _local4:TweenListObj = _local3.clone(false);
_local5 = 0;
while (_local5 < _arg2.length) {
_local6 = _arg2[_local5];
if (Boolean(_local3.properties[_local6])){
_local3.properties[_local6] = undefined;
delete _local3.properties[_local6];
};
_local5++;
};
for (_local6 in _local4.properties) {
_local7 = false;
_local5 = 0;
while (_local5 < _arg2.length) {
if (_arg2[_local5] == _local6){
_local7 = true;
break;
};
_local5++;
};
if (!_local7){
_local4.properties[_local6] = undefined;
delete _local4.properties[_local6];
};
};
_tweenList.push(_local4);
return ((_tweenList.length - 1));
}
public static function resumeTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj = _tweenList[_arg1];
if ((((_local2 == null)) || (!(_local2.isPaused)))){
return (false);
};
_local2.timeStart = (_local2.timeStart + (_currentTime - _local2.timePaused));
_local2.timeComplete = (_local2.timeComplete + (_currentTime - _local2.timePaused));
_local2.timePaused = undefined;
_local2.isPaused = false;
return (true);
}
public static function debug_getList():String{
var _local2:uint;
var _local3:uint;
var _local1 = "";
_local2 = 0;
while (_local2 < _tweenList.length) {
_local1 = (_local1 + (("[" + _local2) + "] ::\n"));
_local3 = 0;
while (_local3 < _tweenList[_local2].properties.length) {
_local1 = (_local1 + ((((" " + _tweenList[_local2].properties[_local3].name) + " -> ") + _tweenList[_local2].properties[_local3].valueComplete) + "\n"));
_local3++;
};
_local2++;
};
return (_local1);
}
public static function getVersion():String{
return ("AS3 1.26.62");
}
public static function onEnterFrame(_arg1:Event):void{
updateTime();
var _local2:Boolean;
_local2 = updateTweens();
if (!_local2){
stopEngine();
};
}
public static function updateTime():void{
_currentTime = getTimer();
}
private static function updateTweenByIndex(_arg1:Number):Boolean{
var tTweening:TweenListObj;
var mustUpdate:Boolean;
var nv:Number;
var t:Number;
var b:Number;
var c:Number;
var d:Number;
var pName:String;
var tScope:Object;
var tProperty:Object;
var pv:Number;
var i = _arg1;
tTweening = _tweenList[i];
if ((((tTweening == null)) || (!(Boolean(tTweening.scope))))){
return (false);
};
var isOver:Boolean;
if (_currentTime >= tTweening.timeStart){
tScope = tTweening.scope;
if (tTweening.isCaller){
do {
t = (((tTweening.timeComplete - tTweening.timeStart) / tTweening.count) * (tTweening.timesCalled + 1));
b = tTweening.timeStart;
c = (tTweening.timeComplete - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d);
} while (!(_currentTime >= nv));
} else {
mustUpdate = (((((tTweening.skipUpdates < 1)) || (!(tTweening.skipUpdates)))) || ((tTweening.updatesSkipped >= tTweening.skipUpdates)));
if (_currentTime >= tTweening.timeComplete){
isOver = true;
mustUpdate = true;
};
if (!tTweening.hasStarted){
if (Boolean(tTweening.onStart)){
try {
tTweening.onStart.apply(tScope, tTweening.onStartParams);
} catch(e:Error) {
handleError(tTweening, e, "onStart");
};
};
for (pName in tTweening.properties) {
pv = getPropertyValue(tScope, pName);
tTweening.properties[pName].valueStart = (isNaN(pv)) ? tTweening.properties[pName].valueComplete : pv;
};
mustUpdate = true;
tTweening.hasStarted = true;
};
if (mustUpdate){
for (pName in tTweening.properties) {
tProperty = tTweening.properties[pName];
if (isOver){
nv = tProperty.valueComplete;
} else {
if (tProperty.hasModifier){
t = (_currentTime - tTweening.timeStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, 0, 1, d);
nv = tProperty.modifierFunction(tProperty.valueStart, tProperty.valueComplete, nv, tProperty.modifierParameters);
} else {
t = (_currentTime - tTweening.timeStart);
b = tProperty.valueStart;
c = (tProperty.valueComplete - tProperty.valueStart);
d = (tTweening.timeComplete - tTweening.timeStart);
nv = tTweening.transition(t, b, c, d);
};
};
if (tTweening.rounded){
nv = Math.round(nv);
};
setPropertyValue(tScope, pName, nv);
};
tTweening.updatesSkipped = 0;
if (Boolean(tTweening.onUpdate)){
try {
tTweening.onUpdate.apply(tScope, tTweening.onUpdateParams);
} catch(e:Error) {
handleError(tTweening, e, "onUpdate");
};
};
} else {
tTweening.updatesSkipped++;
};
};
if (((isOver) && (Boolean(tTweening.onComplete)))){
try {
tTweening.onComplete.apply(tScope, tTweening.onCompleteParams);
} catch(e:Error) {
handleError(tTweening, e, "onComplete");
};
};
return (!(isOver));
};
return (true);
}
public static function setTimeScale(_arg1:Number):void{
var _local2:Number;
if (isNaN(_arg1)){
_arg1 = 1;
};
if (_arg1 < 1E-5){
_arg1 = 1E-5;
};
if (_arg1 != _timeScale){
if (_tweenList != null){
_local2 = 0;
while (_local2 < _tweenList.length) {
_tweenList[_local2].timeStart = (_currentTime - (((_currentTime - _tweenList[_local2].timeStart) * _timeScale) / _arg1));
_tweenList[_local2].timeComplete = (_currentTime - (((_currentTime - _tweenList[_local2].timeComplete) * _timeScale) / _arg1));
if (_tweenList[_local2].timePaused != undefined){
_tweenList[_local2].timePaused = (_currentTime - (((_currentTime - _tweenList[_local2].timePaused) * _timeScale) / _arg1));
};
_local2++;
};
};
_timeScale = _arg1;
};
}
public static function resumeAllTweens():Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
var _local1:Boolean;
_local2 = 0;
while (_local2 < _tweenList.length) {
resumeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
private static function handleError(_arg1, _arg2:Error, _arg3:String):void{
var pTweening = _arg1;
var pError = _arg2;
var pCallBackName = _arg3;
if (((Boolean(pTweening.onError)) && ((pTweening.onError is Function)))){
try {
pTweening.onError.apply(pTweening.scope, [pTweening.scope, pError]);
} catch(metaError:Error) {
trace("## [Tweener] Error:", pTweening.scope, "raised an error while executing the 'onError' handler. Original error:\n", pError.getStackTrace(), "\nonError error:", metaError.getStackTrace());
};
} else {
if (!Boolean(pTweening.onError)){
trace("## [Tweener] Error: :", pTweening.scope, (("raised an error while executing the'" + pCallBackName) + "'handler. \n"), pError.getStackTrace());
};
};
}
private static function startEngine():void{
_engineExists = true;
_tweenList = new Array();
__tweener_controller__ = new MovieClip();
__tweener_controller__.addEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
updateTime();
}
public static function removeAllTweens():Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
var _local1:Boolean;
_local2 = 0;
while (_local2 < _tweenList.length) {
removeTweenByIndex(_local2);
_local1 = true;
_local2++;
};
return (_local1);
}
public static function addTween(_arg1:Object=null, _arg2:Object=null):Boolean{
var _local5:Number;
var _local6:Number;
var _local7:String;
var _local8:String;
var _local15:Function;
var _local16:Object;
var _local17:TweenListObj;
var _local18:Number;
var _local19:Array;
var _local20:Array;
var _local21:String;
if ((((arguments.length < 2)) || ((arguments[0] == undefined)))){
return (false);
};
var _local4:Array = new Array();
if ((arguments[0] is Array)){
_local5 = 0;
while (_local5 < arguments[0].length) {
_local4.push(arguments[0][_local5]);
_local5++;
};
} else {
_local5 = 0;
while (_local5 < (arguments.length - 1)) {
_local4.push(arguments[_local5]);
_local5++;
};
};
var _local9:Object = TweenListObj.makePropertiesChain(arguments[(arguments.length - 1)]);
if (!_inited){
init();
};
if (((!(_engineExists)) || (!(Boolean(__tweener_controller__))))){
startEngine();
};
var _local10:Number = (isNaN(_local9.time)) ? 0 : _local9.time;
var _local11:Number = (isNaN(_local9.delay)) ? 0 : _local9.delay;
var _local12:Array = new Array();
var _local13:Object = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true};
var _local14:Object = new Object();
for (_local7 in _local9) {
if (!_local13[_local7]){
if (_specialPropertySplitterList[_local7]){
_local19 = _specialPropertySplitterList[_local7].splitValues(_local9[_local7], _specialPropertySplitterList[_local7].parameters);
_local5 = 0;
while (_local5 < _local19.length) {
_local12[_local19[_local5].name] = {valueStart:undefined, valueComplete:_local19[_local5].value};
_local5++;
};
} else {
if (_specialPropertyModifierList[_local7] != undefined){
_local20 = _specialPropertyModifierList[_local7].modifyValues(_local9[_local7]);
_local5 = 0;
while (_local5 < _local20.length) {
_local14[_local20[_local5].name] = {modifierParameters:_local20[_local5].parameters, modifierFunction:_specialPropertyModifierList[_local7].getValue};
_local5++;
};
} else {
_local12[_local7] = {valueStart:undefined, valueComplete:_local9[_local7]};
};
};
};
};
for (_local7 in _local14) {
if (_local12[_local7] != undefined){
_local12[_local7].modifierParameters = _local14[_local7].modifierParameters;
_local12[_local7].modifierFunction = _local14[_local7].modifierFunction;
};
};
if (typeof(_local9.transition) == "string"){
_local21 = _local9.transition.toLowerCase();
_local15 = _transitionList[_local21];
} else {
_local15 = _local9.transition;
};
if (!Boolean(_local15)){
_local15 = _transitionList["easeoutexpo"];
};
_local5 = 0;
while (_local5 < _local4.length) {
_local16 = new Object();
for (_local7 in _local12) {
_local16[_local7] = new PropertyInfoObj(_local12[_local7].valueStart, _local12[_local7].valueComplete, _local12[_local7].modifierFunction, _local12[_local7].modifierParameters);
};
_local17 = new TweenListObj(_local4[_local5], (_currentTime + ((_local11 * 1000) / _timeScale)), (_currentTime + (((_local11 * 1000) + (_local10 * 1000)) / _timeScale)), (_local9.useFrames == true), _local15);
_local17.properties = _local16;
_local17.onStart = _local9.onStart;
_local17.onUpdate = _local9.onUpdate;
_local17.onComplete = _local9.onComplete;
_local17.onOverwrite = _local9.onOverwrite;
_local17.onError = _local9.onError;
_local17.onStartParams = _local9.onStartParams;
_local17.onUpdateParams = _local9.onUpdateParams;
_local17.onCompleteParams = _local9.onCompleteParams;
_local17.onOverwriteParams = _local9.onOverwriteParams;
_local17.rounded = _local9.rounded;
_local17.skipUpdates = _local9.skipUpdates;
removeTweensByTime(_local17.scope, _local17.properties, _local17.timeStart, _local17.timeComplete);
_tweenList.push(_local17);
if ((((_local10 == 0)) && ((_local11 == 0)))){
_local18 = (_tweenList.length - 1);
updateTweenByIndex(_local18);
removeTweenByIndex(_local18);
};
_local5++;
};
return (true);
}
public static function registerTransition(_arg1:String, _arg2:Function):void{
if (!_inited){
init();
};
_transitionList[_arg1] = _arg2;
}
private static function affectTweens(_arg1:Function, _arg2:Object, _arg3:Array):Boolean{
var _local5:uint;
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local4:Boolean;
if (!Boolean(_tweenList)){
return (false);
};
_local5 = 0;
while (_local5 < _tweenList.length) {
if (((_tweenList[_local5]) && ((_tweenList[_local5].scope == _arg2)))){
if (_arg3.length == 0){
_arg1(_local5);
_local4 = true;
} else {
_local6 = new Array();
_local7 = 0;
while (_local7 < _arg3.length) {
if (Boolean(_tweenList[_local5].properties[_arg3[_local7]])){
_local6.push(_arg3[_local7]);
};
_local7++;
};
if (_local6.length > 0){
_local8 = AuxFunctions.getObjectLength(_tweenList[_local5].properties);
if (_local8 == _local6.length){
_arg1(_local5);
_local4 = true;
} else {
_local9 = splitTweens(_local5, _local6);
_arg1(_local9);
_local4 = true;
};
};
};
};
_local5++;
};
return (_local4);
}
public static function getTweens(_arg1:Object):Array{
var _local2:uint;
var _local3:String;
if (!Boolean(_tweenList)){
return ([]);
};
var _local4:Array = new Array();
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == _arg1){
for (_local3 in _tweenList[_local2].properties) {
_local4.push(_local3);
};
};
_local2++;
};
return (_local4);
}
private static function setPropertyValue(_arg1:Object, _arg2:String, _arg3:Number):void{
if (_specialPropertyList[_arg2] != undefined){
if (Boolean(_specialPropertyList[_arg2].parameters)){
_specialPropertyList[_arg2].setValue(_arg1, _arg3, _specialPropertyList[_arg2].parameters);
} else {
_specialPropertyList[_arg2].setValue(_arg1, _arg3);
};
} else {
_arg1[_arg2] = _arg3;
};
}
private static function getPropertyValue(_arg1:Object, _arg2:String):Number{
if (_specialPropertyList[_arg2] != undefined){
if (Boolean(_specialPropertyList[_arg2].parameters)){
return (_specialPropertyList[_arg2].getValue(_arg1, _specialPropertyList[_arg2].parameters));
};
return (_specialPropertyList[_arg2].getValue(_arg1));
//unresolved jump
};
return (_arg1[_arg2]);
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:uint;
if (!Boolean(_tweenList)){
return (false);
};
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == _arg1){
return (true);
};
_local2++;
};
return (false);
}
public static function getTweenCount(_arg1:Object):Number{
var _local2:uint;
if (!Boolean(_tweenList)){
return (0);
};
var _local3:Number = 0;
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2] == null){
break;
};
if (_tweenList[_local2].scope == _arg1){
_local3 = (_local3 + AuxFunctions.getObjectLength(_tweenList[_local2].properties));
};
_local2++;
};
return (_local3);
}
private static function stopEngine():void{
_engineExists = false;
_tweenList = null;
_currentTime = 0;
__tweener_controller__.removeEventListener(Event.ENTER_FRAME, Tweener.onEnterFrame);
__tweener_controller__ = null;
}
public static function pauseTweenByIndex(_arg1:Number):Boolean{
var _local2:TweenListObj = _tweenList[_arg1];
if ((((_local2 == null)) || (_local2.isPaused))){
return (false);
};
_local2.timePaused = _currentTime;
_local2.isPaused = true;
return (true);
}
public static function removeTweensByTime(_arg1:Object, _arg2:Object, _arg3:Number, _arg4:Number):Boolean{
var removedLocally:Boolean;
var i:uint;
var pName:String;
var p_scope = _arg1;
var p_properties = _arg2;
var p_timeStart = _arg3;
var p_timeComplete = _arg4;
var removed:Boolean;
var tl:uint = _tweenList.length;
i = 0;
while (i < tl) {
if (((Boolean(_tweenList[i])) && ((p_scope == _tweenList[i].scope)))){
if ((((p_timeComplete > _tweenList[i].timeStart)) && ((p_timeStart < _tweenList[i].timeComplete)))){
removedLocally = false;
for (pName in _tweenList[i].properties) {
if (Boolean(p_properties[pName])){
if (Boolean(_tweenList[i].onOverwrite)){
try {
_tweenList[i].onOverwrite.apply(_tweenList[i].scope, _tweenList[i].onOverwriteParams);
} catch(e:Error) {
handleError(_tweenList[i], e, "onOverwrite");
};
};
_tweenList[i].properties[pName] = undefined;
delete _tweenList[i].properties[pName];
removedLocally = true;
removed = true;
};
};
if (removedLocally){
if (AuxFunctions.getObjectLength(_tweenList[i].properties) == 0){
removeTweenByIndex(i);
};
};
};
};
i = (i + 1);
};
return (removed);
}
public static function registerSpecialPropertySplitter(_arg1:String, _arg2:Function, _arg3:Array=null):void{
if (!_inited){
init();
};
}
public static function removeTweenByIndex(_arg1:Number, _arg2:Boolean=false):Boolean{
_tweenList[_arg1] = null;
if (_arg2){
_tweenList.splice(_arg1, 1);
};
return (true);
}
public static function resumeTweens(_arg1:Object, ... _args):Boolean{
var _local4:uint;
var _local3:Array = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(resumeTweenByIndex, _arg1, _local3));
}
public static function pauseTweens(_arg1:Object, ... _args):Boolean{
var _local4:uint;
var _local3:Array = new Array();
_local4 = 0;
while (_local4 < _args.length) {
if ((((typeof(_args[_local4]) == "string")) && (!(AuxFunctions.isInArray(_args[_local4], _local3))))){
_local3.push(_args[_local4]);
};
_local4++;
};
return (affectTweens(pauseTweenByIndex, _arg1, _local3));
}
}
}//package org.hoah.Tweener
Section 45
//TweenListObj (org.hoah.Tweener.TweenListObj)
package org.hoah.Tweener {
public class TweenListObj {
public var hasStarted:Boolean;
public var onUpdate:Function;
public var useFrames:Boolean;
public var count:Number;
public var onOverwriteParams:Array;
public var timeStart:Number;
public var auxProperties:Object;
public var timeComplete:Number;
public var onStartParams:Array;
public var rounded:Boolean;
public var updatesSkipped:Number;
public var onUpdateParams:Array;
public var onComplete:Function;
public var properties:Object;
public var onStart:Function;
public var skipUpdates:Number;
public var scope:Object;
public var isCaller:Boolean;
public var timePaused:Number;
public var transition:Function;
public var onCompleteParams:Array;
public var onError:Function;
public var timesCalled:Number;
public var onOverwrite:Function;
public var isPaused:Boolean;
public var waitFrames:Boolean;
public function TweenListObj(_arg1:Object, _arg2:Number, _arg3:Number, _arg4:Boolean, _arg5:Function){
scope = _arg1;
timeStart = _arg2;
timeComplete = _arg3;
useFrames = _arg4;
transition = _arg5;
auxProperties = new Object();
properties = new Object();
isPaused = false;
timePaused = undefined;
isCaller = false;
updatesSkipped = 0;
timesCalled = 0;
skipUpdates = 0;
hasStarted = false;
}
public function clone(_arg1:Boolean):TweenListObj{
var _local3:String;
var _local2:TweenListObj = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition);
_local2.properties = new Array();
for (_local3 in properties) {
_local2.properties[_local3] = properties[_local3].clone();
};
_local2.skipUpdates = skipUpdates;
_local2.updatesSkipped = updatesSkipped;
if (!_arg1){
_local2.onStart = onStart;
_local2.onUpdate = onUpdate;
_local2.onComplete = onComplete;
_local2.onOverwrite = onOverwrite;
_local2.onError = onError;
_local2.onStartParams = onStartParams;
_local2.onUpdateParams = onUpdateParams;
_local2.onCompleteParams = onCompleteParams;
_local2.onOverwriteParams = onOverwriteParams;
};
_local2.rounded = rounded;
_local2.isPaused = isPaused;
_local2.timePaused = timePaused;
_local2.isCaller = isCaller;
_local2.count = count;
_local2.timesCalled = timesCalled;
_local2.waitFrames = waitFrames;
_local2.hasStarted = hasStarted;
return (_local2);
}
public function toString():String{
var _local1 = "\n[TweenListObj ";
_local1 = (_local1 + ("scope:" + String(scope)));
_local1 = (_local1 + ", properties:");
var _local2:uint;
while (_local2 < properties.length) {
if (_local2 > 0){
_local1 = (_local1 + ",");
};
_local1 = (_local1 + ("[name:" + properties[_local2].name));
_local1 = (_local1 + (",valueStart:" + properties[_local2].valueStart));
_local1 = (_local1 + (",valueComplete:" + properties[_local2].valueComplete));
_local1 = (_local1 + "]");
_local2++;
};
_local1 = (_local1 + (", timeStart:" + String(timeStart)));
_local1 = (_local1 + (", timeComplete:" + String(timeComplete)));
_local1 = (_local1 + (", useFrames:" + String(useFrames)));
_local1 = (_local1 + (", transition:" + String(transition)));
if (skipUpdates){
_local1 = (_local1 + (", skipUpdates:" + String(skipUpdates)));
};
if (updatesSkipped){
_local1 = (_local1 + (", updatesSkipped:" + String(updatesSkipped)));
};
if (Boolean(onStart)){
_local1 = (_local1 + (", onStart:" + String(onStart)));
};
if (Boolean(onUpdate)){
_local1 = (_local1 + (", onUpdate:" + String(onUpdate)));
};
if (Boolean(onComplete)){
_local1 = (_local1 + (", onComplete:" + String(onComplete)));
};
if (Boolean(onOverwrite)){
_local1 = (_local1 + (", onOverwrite:" + String(onOverwrite)));
};
if (Boolean(onError)){
_local1 = (_local1 + (", onError:" + String(onError)));
};
if (onStartParams){
_local1 = (_local1 + (", onStartParams:" + String(onStartParams)));
};
if (onUpdateParams){
_local1 = (_local1 + (", onUpdateParams:" + String(onUpdateParams)));
};
if (onCompleteParams){
_local1 = (_local1 + (", onCompleteParams:" + String(onCompleteParams)));
};
if (onOverwriteParams){
_local1 = (_local1 + (", onOverwriteParams:" + String(onOverwriteParams)));
};
if (rounded){
_local1 = (_local1 + (", rounded:" + String(rounded)));
};
if (isPaused){
_local1 = (_local1 + (", isPaused:" + String(isPaused)));
};
if (timePaused){
_local1 = (_local1 + (", timePaused:" + String(timePaused)));
};
if (isCaller){
_local1 = (_local1 + (", isCaller:" + String(isCaller)));
};
if (count){
_local1 = (_local1 + (", count:" + String(count)));
};
if (timesCalled){
_local1 = (_local1 + (", timesCalled:" + String(timesCalled)));
};
if (waitFrames){
_local1 = (_local1 + (", waitFrames:" + String(waitFrames)));
};
if (hasStarted){
_local1 = (_local1 + (", hasStarted:" + String(hasStarted)));
};
_local1 = (_local1 + "]\n");
return (_local1);
}
public static function makePropertiesChain(_arg1:Object):Object{
var _local3:Object;
var _local4:Object;
var _local5:Object;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local2:Object = _arg1.base;
if (_local2){
_local3 = {};
if ((_local2 is Array)){
_local4 = [];
_local8 = 0;
while (_local8 < _local2.length) {
_local4.push(_local2[_local8]);
_local8++;
};
} else {
_local4 = [_local2];
};
_local4.push(_arg1);
_local6 = _local4.length;
_local7 = 0;
while (_local7 < _local6) {
if (_local4[_local7]["base"]){
} else {
_local5 = _local4[_local7];
};
_local7++;
};
if (_local3["base"]){
delete _local3["base"];
};
return (_local3);
//unresolved jump
};
return (_arg1);
}
}
}//package org.hoah.Tweener
Section 46
//Friend (org.hoah.zombies.ai.Friend)
package org.hoah.zombies.ai {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.zombies.*;
import flash.geom.*;
import org.hoah.zombies.map.*;
import org.hoah.Tweener.*;
import org.hoah.zombies.ui.*;
import org.hoah.zombies.weapons.*;
import org.hoah.zombies.soundeffects.*;
public class Friend extends BitmapSprite {
private var _aiMode:String;// = "Waiting"
private var _closeDistance:Number;// = 100
private var _lastShot:int;// = 0
private var _aiAttackTimer:Timer;
private var lastScream:int;// = 0
private var _lastRotate:int;// = 0
private var _seenPause:int;// = 0
private var _aiTimer:Timer;
private var _currentRouteSteps:Array;
private var _curSpeed:Number;// = 0
public var speed:Number;// = 5
private var _healthPanel:HealthPanel;
private var _nextRotate:int;// = 1000
public var currentRoute:MapRoute;
private var _currentRouteNode:Point;
public var weaponId:int;// = 0
public var health:int;// = 10
public var char:String;// = "ella"
public var maxHealth:int;// = 10
private var _targettingMode:String;// = "Waiting"
public var dead:Boolean;// = false
private var _currentTarget:Zombie;// = null
private var _entryPoint:MapEntryPoint;
private var _weaponSwitchPause:int;// = 0
public var currentRoom:String;// = ""
private var _curWeapon:Weapon;// = null
public static var instances:Array = [];
public function Friend(_arg1:int, _arg2:int){
var _local4:MapSpawnPoint;
_aiTimer = new Timer(1000);
_aiAttackTimer = new Timer(50);
_currentRouteSteps = [];
var _local3:BitmapData = Assets.ellaModel.bitmapData;
if ((((_arg1 == 50)) && ((_arg2 == 50)))){
_local3 = Assets.mimiModel.bitmapData;
};
super(_local3);
if (instances.length >= 2){
trace("CANNOT CREATE CHAR, Hardcoded limit reached.");
return;
};
instances.push(this);
x = _arg1;
y = _arg2;
_aiTimer.addEventListener(TimerEvent.TIMER, updateAi);
_aiAttackTimer.addEventListener(TimerEvent.TIMER, updateTargetting);
_aiAttackTimer.start();
rotation = 0;
_curWeapon = new Weapon(Map.instance.stage, 0, false, this);
_curWeapon.playVocals = true;
if ((((x < 120)) || ((y < 120)))){
_local4 = Pather.spawnPoints[Math.floor((Math.random() * Pather.spawnPoints.length))];
_entryPoint = _local4.getRandomEntryPoint();
_aiMode = "Starting";
char = "mimi";
speed = (speed + 0.5);
_curWeapon = new Weapon(Map.instance.stage, 20, false, this);
Subtitles.showVocal(char, "Haha!");
} else {
char = "ella";
followPlayer();
Player.eventObject.addEventListener("change_room", updateRoom);
_aiTimer.start();
};
_healthPanel = new HealthPanel(this);
UserInterface.instance.addChild(_healthPanel);
}
private function aiFollowing():void{
randomRotate();
var _local1:Number = Math.atan2((y - Player.instance.y), (x - Player.instance.x));
var _local2:Number = Math.sqrt((Math.pow((x - Player.instance.x), 2) + Math.pow((y - Player.instance.y), 2)));
if (_local2 < _closeDistance){
_curSpeed = (_curSpeed - 1);
if (_curSpeed <= 0){
_aiMode = "Waiting";
_curSpeed = 0;
return;
};
x = (x - (Math.cos(_local1) * _curSpeed));
y = (y - (Math.sin(_local1) * _curSpeed));
} else {
if (_curSpeed < speed){
_curSpeed = (_curSpeed + 1);
} else {
if (_curSpeed > speed){
_curSpeed = speed;
};
};
x = (x - (Math.cos(_local1) * _curSpeed));
y = (y - (Math.sin(_local1) * _curSpeed));
};
}
private function targetWaiting():void{
var _local4:Zombie;
if (Zombie.livingInstances.length == 0){
return;
};
var _local1:Number = Infinity;
var _local2:Zombie;
var _local3:Number = 0;
for each (_local4 in Zombie.livingInstances) {
if (_local4.special){
} else {
_local3 = Math.sqrt((Math.pow((x - _local4.x), 2) + Math.pow((y - _local4.y), 2)));
if (_local3 < _local1){
_local1 = _local3;
_local2 = _local4;
};
};
};
if (_local2 != null){
if (checkLoS(_local2)){
_targettingMode = "Aiming";
_currentTarget = _local2;
_seenPause = getTimer();
};
};
}
private function aiWaiting():void{
randomRotate();
}
private function calculatePathToPlayer():void{
if (currentRoom == Player.instance.currentRoom){
_aiMode = "Following";
return;
};
if (Pather.routes[currentRoom] == null){
return;
};
if (Pather.routes[currentRoom][Player.instance.currentRoom] == null){
return;
};
var _local1:Array = Pather.routes[currentRoom][Player.instance.currentRoom];
if (_local1.length == 0){
return;
};
currentRoute = _local1[0];
_currentRouteSteps = currentRoute.getSteps();
_currentRouteNode = null;
}
private function checkLoS(_arg1:Zombie):Boolean{
var _local6:MapWall;
var _local7:Point;
var _local2:Point = new Point(x, y);
var _local3:Point = new Point(_arg1.x, _arg1.y);
var _local4:Number = 0;
var _local5:Number = Point.distance(_local2, _local3);
for each (_local6 in Map.walls) {
_local7 = _local6.intersects(_local2, _local3);
if (_local7 != null){
_local4 = Point.distance(_local7, _local2);
if (_local4 < _local5){
return (false);
};
};
};
return (true);
}
private function aiStarting():void{
var _local1:Number = Math.atan2((y - _entryPoint.y), (x - _entryPoint.x));
rotation = ((_local1 * 57.29) + 90);
var _local2:Number = Math.sqrt((Math.pow((x - _entryPoint.x), 2) + Math.pow((y - _entryPoint.y), 2)));
if (_local2 < 20){
_aiMode = "Entering";
} else {
x = (x - (Math.cos(_local1) * speed));
y = (y - (Math.sin(_local1) * speed));
};
}
public function dispose():void{
UserInterface.instance.removeChild(_healthPanel);
instances.splice(instances.indexOf(this), 1);
_aiTimer.stop();
_aiAttackTimer.stop();
_aiTimer.removeEventListener(TimerEvent.TIMER, updateAi);
_aiAttackTimer.removeEventListener(TimerEvent.TIMER, updateTargetting);
Player.eventObject.removeEventListener("change_room", updateRoom);
speed = 5;
_curSpeed = 0;
char = "";
weaponId = 0;
_aiTimer = null;
_aiAttackTimer = null;
_aiMode = "";
_targettingMode = "";
_currentTarget = null;
_closeDistance = 0;
_lastShot = 0;
_seenPause = 0;
_weaponSwitchPause = 0;
currentRoom = "";
_lastRotate = 0;
_nextRotate = 0;
currentRoute = null;
_currentRouteSteps = null;
_currentRouteNode = null;
_curWeapon = null;
health = 0;
maxHealth = 0;
dead = true;
lastScream = 0;
_entryPoint = null;
_healthPanel = null;
}
private function updateTargetting(_arg1:Event=null):void{
var _local2 = this;
_local2[("target" + _targettingMode)]();
}
public function updateRoom(_arg1:Event=null):void{
currentRoom = getRoom(new Point(x, y));
if (currentRoom == Player.instance.currentRoom){
_closeDistance = (40 + (Math.random() * 60));
_aiMode = "Following";
} else {
calculatePathToPlayer();
_aiMode = "Pathing";
};
}
private function aiEntering():void{
var _local1:Number = 0;
if (_entryPoint.dir == "R"){
_local1 = ((Math.PI / 2) * 2);
} else {
if (_entryPoint.dir == "D"){
_local1 = ((Math.PI / 2) * 3);
};
};
rotation = ((_local1 * 57.29) + 90);
var _local2:Number = Math.sqrt((Math.pow((x - _entryPoint.x), 2) + Math.pow((y - _entryPoint.y), 2)));
if (_local2 > 50){
_aiMode = "Waiting";
updateRoom();
followPlayer();
Player.eventObject.addEventListener("change_room", updateRoom);
_aiTimer.start();
} else {
x = (x - (Math.cos(_local1) * speed));
y = (y - (Math.sin(_local1) * speed));
};
}
private function aiPathing():void{
if (_currentRouteNode == null){
if ((((_currentRouteSteps == null)) || ((_currentRouteSteps.length == 0)))){
_aiMode = "Following";
_closeDistance = (60 + (Math.random() * 45));
return;
};
_currentRouteNode = _currentRouteSteps.shift();
};
var _local1:Number = Math.atan2((y - _currentRouteNode.y), (x - _currentRouteNode.x));
if (Tweener.getTweenCount(this) == 0){
Tweener.addTween(this, {rotation:((_local1 * 57.29) + 90), time:0.5});
};
var _local2:Number = Math.sqrt((Math.pow((x - _currentRouteNode.x), 2) + Math.pow((y - _currentRouteNode.y), 2)));
if (_local2 < 20){
_currentRouteNode = null;
} else {
if (_curSpeed < speed){
_curSpeed = (_curSpeed + 0.2);
} else {
if (_curSpeed > speed){
_curSpeed = speed;
};
};
x = (x - (Math.cos(_local1) * _curSpeed));
y = (y - (Math.sin(_local1) * _curSpeed));
};
}
private function updateAi(_arg1:TimerEvent):void{
followPlayer();
switchWeapon();
}
private function getRoom(_arg1:Point):String{
var _local2:XML;
for each (_local2 in Map.instance.rooms) {
if ((((_arg1.x > _local2.@left)) && ((_arg1.x < _local2.@right)))){
if ((((_arg1.y > _local2.@top)) && ((_arg1.y < _local2.@bottom)))){
return (_local2.@name);
};
};
};
return ("none");
}
public function followPlayer():void{
updateRoom();
calculatePathToPlayer();
}
private function targetAiming():void{
if (_currentTarget.health <= 0){
_currentTarget = null;
_targettingMode = "Waiting";
return;
};
if (checkLoS(_currentTarget) == false){
_currentTarget = null;
_targettingMode = "Waiting";
return;
};
if ((getTimer() - _seenPause) < 200){
return;
};
if ((getTimer() - _lastShot) < 250){
return;
};
var _local1 = (Math.abs(((rotation - (Math.atan2((y - _currentTarget.y), (x - _currentTarget.x)) * 57.29)) - 90)) > 2);
if (((_local1) && ((Tweener.getTweenCount(this) == 0)))){
Tweener.addTween(this, {rotation:((Math.atan2((y - _currentTarget.y), (x - _currentTarget.x)) * 57.29) + 90), time:0.5});
};
if (_local1 == false){
_curWeapon.startShooting(false);
};
}
public function update(_arg1:Event=null):void{
if (dead){
return;
};
var _local2 = this;
_local2[("ai" + _aiMode)]();
_curWeapon.renderLaser();
_curWeapon.render();
}
private function switchWeapon(_arg1:Event=null):void{
var _local2:int;
if (char == "mimi"){
return;
};
if (_currentTarget == null){
if ((getTimer() - _weaponSwitchPause) > 15000){
_local2 = Weapon.ownedWeapons[Math.floor((Math.random() * Weapon.ownedWeapons.length))];
if (_local2 != _curWeapon.id){
_curWeapon = new Weapon(Map.instance.stage, _local2, false, this);
_curWeapon.playVocals = true;
};
Weapon.friendWeaponBitmap = _curWeapon.weaponBitmap;
_weaponSwitchPause = getTimer();
};
};
}
private function randomRotate():void{
if (_currentTarget != null){
return;
};
if (_lastRotate < (getTimer() - _nextRotate)){
_nextRotate = (1000 + (Math.random() * 3600));
_lastRotate = getTimer();
if (Tweener.getTweenCount(this) == 0){
Tweener.addTween(this, {rotation:(Math.random() * 360), time:(0.3 + (Math.random() * 0.5)), transition:"linear"});
};
};
}
public function bite():void{
var _local1:Number;
if ((getTimer() - lastScream) > 1000){
lastScream = getTimer();
_local1 = (Math.random() * 0.9);
if (_local1 < 0.25){
Subtitles.showVocal(char, "Argh!");
Sounds.playEffect((("vocal_" + char) + "_argh"));
} else {
if (_local1 < 0.5){
Subtitles.showVocal(char, "Ouch!");
Sounds.playEffect((("vocal_" + char) + "_ouch"));
} else {
if (_local1 < 0.75){
Subtitles.showVocal(char, "Ouch!!");
Sounds.playEffect((("vocal_" + char) + "_ouch2"));
} else {
if (char == "mimi"){
Subtitles.showVocal(char, "Argh!");
Sounds.playEffect((("vocal_" + char) + "_argh"));
} else {
Subtitles.showVocal(char, "Help!");
Sounds.playEffect((("vocal_" + char) + "_help"));
};
};
};
};
};
health--;
if (health <= 0){
Sounds.playEffect((("vocal_" + char) + "_argh"));
dead = true;
_aiTimer.stop();
_aiAttackTimer.stop();
dispose();
};
}
public static function dispose():void{
var _local1:Friend;
for each (_local1 in instances) {
_local1.dispose();
};
instances = [];
}
}
}//package org.hoah.zombies.ai
Section 47
//MapEntryPoint (org.hoah.zombies.map.MapEntryPoint)
package org.hoah.zombies.map {
public class MapEntryPoint {
public var x:int;// = 0
public var y:int;// = 0
public var id:int;// = 0
public var dir:String;// = "D"
private static var instances:Array = [];
public function MapEntryPoint(_arg1:XML){
id = int(_arg1.@id);
dir = _arg1.@dir;
x = int(_arg1.@x);
y = int(_arg1.@y);
MapEntryPoint[id] = this;
}
}
}//package org.hoah.zombies.map
Section 48
//MapPath (org.hoah.zombies.map.MapPath)
package org.hoah.zombies.map {
import flash.geom.*;
public class MapPath {
public var rect1:Rectangle;
public var rect2:Rectangle;
public var room1:MapRoom;
public var room2:MapRoom;
public var center1:Point;
public var center2:Point;
public function MapPath(_arg1:XML){
room1 = MapRoom[_arg1.@room1];
room1.paths[_arg1.@room2] = this;
room2 = MapRoom[_arg1.@room2];
room2.paths[_arg1.@room1] = this;
var _local2:Array = _arg1.@rect1.split(",");
var _local3:Array = _arg1.@rect2.split(",");
rect1 = new Rectangle(_local2[0], _local2[1], _local2[2], _local2[3]);
rect2 = new Rectangle(_local3[0], _local3[1], _local3[2], _local3[3]);
center1 = new Point((rect1.x + (rect1.width / 2)), (rect1.y + (rect1.height / 2)));
center2 = new Point((rect2.x + (rect2.width / 2)), (rect2.y + (rect2.height / 2)));
}
}
}//package org.hoah.zombies.map
Section 49
//MapRoom (org.hoah.zombies.map.MapRoom)
package org.hoah.zombies.map {
import flash.geom.*;
public class MapRoom {
public var width:int;// = 0
public var height:int;// = 0
public var name:String;
public var center:Point;
public var x:int;// = 0
public var y:int;// = 0
public var paths:Array;
public function MapRoom(_arg1:XML){
center = new Point();
paths = [];
super();
name = _arg1.@name;
x = int(_arg1.@x);
y = int(_arg1.@y);
width = int(_arg1.@width);
height = int(_arg1.@height);
center.x = (x + (width / 2));
center.y = (y + (height / 2));
MapRoom[name] = this;
}
public function toString():String{
var _local2:String;
var _local1 = ((((((((((("[Room: " + name) + ":\n\tx=") + x) + ", y=") + y) + ", width=") + width) + ", height=") + height) + "\n") + "\tPaths:");
for (_local2 in paths) {
_local1 = (_local1 + ("\n\t\t" + _local2));
};
_local1 = (_local1 + "\n]");
return (_local1);
}
}
}//package org.hoah.zombies.map
Section 50
//MapRoute (org.hoah.zombies.map.MapRoute)
package org.hoah.zombies.map {
import flash.geom.*;
public class MapRoute {
public var fromRoom:MapRoom;
public var toRoom:MapRoom;
public var steps:Array;
public var length:Number;// = 0
public function MapRoute(_arg1:MapRoom, _arg2:MapRoom, _arg3:Array){
var _local5:MapPath;
steps = [];
super();
fromRoom = _arg1;
toRoom = _arg2;
steps = _arg3;
var _local4:MapRoom = fromRoom;
for each (_local5 in steps) {
if (_local4 == _local5.room1){
length = (length + dist(_local4.center, _local5.center1));
length = (length + dist(_local5.center1, _local5.center2));
_local4 = _local5.room2;
length = (length + dist(_local5.center2, _local4.center));
} else {
length = (length + dist(_local4.center, _local5.center2));
length = (length + dist(_local5.center2, _local5.center1));
_local4 = _local5.room1;
length = (length + dist(_local5.center1, _local4.center));
};
};
}
public function getSteps():Array{
var _local3:MapPath;
var _local1:Array = [];
var _local2:MapRoom = fromRoom;
for each (_local3 in steps) {
if (_local2 == _local3.room1){
_local1.push(_local3.center1.clone());
_local1.push(_local3.center2.clone());
_local2 = _local3.room2;
} else {
_local1.push(_local3.center2.clone());
_local1.push(_local3.center1.clone());
_local2 = _local3.room1;
};
};
return (_local1);
}
public function dist(_arg1:Point, _arg2:Point):Number{
return (Math.sqrt((Math.pow((_arg1.x - _arg2.x), 2) + Math.pow((_arg1.y - _arg2.y), 2))));
}
}
}//package org.hoah.zombies.map
Section 51
//MapSpawnPoint (org.hoah.zombies.map.MapSpawnPoint)
package org.hoah.zombies.map {
public class MapSpawnPoint {
public var entryPoints:Array;
public var x:int;
public var y:int;
public function MapSpawnPoint(_arg1:XML){
var _local3:String;
entryPoints = [];
super();
x = int(_arg1.@x);
y = int(_arg1.@y);
var _local2:Array = _arg1.@entryPoints.split(",");
for each (_local3 in _local2) {
entryPoints.push(MapEntryPoint[int(_local3)]);
};
}
public function getRandomEntryPoint():MapEntryPoint{
var _local1:int = Math.floor((Math.random() * entryPoints.length));
return (entryPoints[_local1]);
}
}
}//package org.hoah.zombies.map
Section 52
//MapWall (org.hoah.zombies.map.MapWall)
package org.hoah.zombies.map {
import flash.geom.*;
public class MapWall {
public var p1:Point;
public var p2:Point;
public function MapWall(_arg1:Point, _arg2:Point){
p1 = _arg1;
p2 = _arg2;
}
public function intersects(_arg1:Point, _arg2:Point):Point{
var _local3:Point;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local4 = (p2.y - p1.y);
_local6 = (p1.x - p2.x);
_local8 = ((p2.x * p1.y) - (p1.x * p2.y));
_local5 = (_arg2.y - _arg1.y);
_local7 = (_arg1.x - _arg2.x);
_local9 = ((_arg2.x * _arg1.y) - (_arg1.x * _arg2.y));
var _local10:Number = ((_local4 * _local7) - (_local5 * _local6));
if (_local10 == 0){
return (null);
};
_local3 = new Point();
_local3.x = (((_local6 * _local9) - (_local7 * _local8)) / _local10);
_local3.y = (((_local5 * _local8) - (_local4 * _local9)) / _local10);
if (Point.distance(_local3, p2) > Point.distance(p1, p2)){
return (null);
};
if (Point.distance(_local3, p1) > Point.distance(p1, p2)){
return (null);
};
if (Point.distance(_local3, _arg2) > Point.distance(_arg1, _arg2)){
return (null);
};
if (Point.distance(_local3, _arg1) > Point.distance(_arg1, _arg2)){
return (null);
};
return (_local3);
}
}
}//package org.hoah.zombies.map
Section 53
//MenuZombie (org.hoah.zombies.menu.MenuZombie)
package org.hoah.zombies.menu {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.zombies.*;
import flash.geom.*;
import org.hoah.zombies.ui.*;
public class MenuZombie {
public var y:Number;// = 0
private var _curAnimation:String;
private var target:Point;
public var ANIM_EXPLODE:String;// = "zombie_explode"
private var _speedChange:Number;// = -0.1
public var disposeAfterCurrentAnimation:Boolean;// = false
public var ANIM_WALK:String;// = "zombie_walk"
private var _animSpeed:int;// = 50
private var _framesUntilDispose:int;// = 0
public var speed:Number;// = 0.5
public var ANIM_WALK_DISMEMBER_L:String;// = "zombie_walk_dismember_L"
private var dismembered:Boolean;// = false
private var _curAnimationStatic:Boolean;// = true
public var ANIM_WALK_DISMEMBER_R:String;// = "zombie_walk_dismember_R"
private var _curBitmapList:Array;
public var health:Number;// = 1
public var ANIM_DIE_1:String;// = "zombie_die1"
private var _lastFrameAdvance:int;// = 0
private var _normSpeed:Number;// = 0.5
private var _curFrame:int;// = 0
public var x:Number;// = 0
public var rotation:Number;// = 0
public static var livingInstances:Array = [];
public static var baseSpeed:Number = 0.5;
public static var baseHealth:Number = 4;
public static var instances:Array = [];
public function MenuZombie(){
_curBitmapList = [];
_curAnimation = ANIM_WALK;
target = new Point();
super();
livingInstances.push(this);
instances.push(this);
var _local1:Array = Zombie.SKIN[Math.floor((Math.random() * 1.999))];
ANIM_WALK = _local1[0];
ANIM_WALK_DISMEMBER_L = _local1[1];
ANIM_WALK_DISMEMBER_R = _local1[2];
ANIM_EXPLODE = _local1[3];
ANIM_DIE_1 = _local1[4];
setAnim(ANIM_WALK);
x = -20;
y = (140 + (Math.random() * 45));
target.x = 660;
target.y = (108 + (Math.random() * 50));
rotation = 0;
speed = Math.max(1, (baseSpeed + ((Math.random() * (baseSpeed / 2)) - (baseSpeed / 4))));
_normSpeed = (speed * 2);
health = Math.min((baseHealth + ((Math.random() * (baseHealth / 2)) - (baseHealth / 4))), 25);
}
public function testKill(_arg1:Number=0.2):void{
if (health <= 0){
kill();
setAnim(ANIM_DIE_1);
disposeAfterCurrentAnimation = true;
};
}
public function hit(_arg1:int=1):void{
var _local2:Number = ((rotation - 90) * 0.0174);
x = (x + (Math.cos(_local2) * 4));
y = (y + (Math.sin(_local2) * 4));
if (speed > 0){
speed = (speed * 0.95);
};
randomDismember(0.025);
health = (health - _arg1);
testKill();
}
public function dispose():void{
Menu.instance.removeEventListener(Event.ENTER_FRAME, update);
instances.splice(instances.indexOf(this), 1);
}
public function randomDismember(_arg1:Number=0.05):void{
if (dismembered){
return;
};
if (Math.random() < _arg1){
dismembered = true;
Menu.instance.spewBlood(this);
if ((Math.random() * 10) < 0.5){
Menu.instance.spawnGib(this);
};
speed = (speed * 0.75);
if ((Math.random() * 10) < 5){
setAnim(ANIM_WALK_DISMEMBER_L);
} else {
setAnim(ANIM_WALK_DISMEMBER_R);
};
};
}
public function setAnim(_arg1:String):void{
if (disposeAfterCurrentAnimation){
return;
};
_curAnimation = _arg1;
_curFrame = 0;
if ((((((_arg1 == ANIM_WALK)) || ((_arg1 == ANIM_WALK_DISMEMBER_L)))) || ((_arg1 == ANIM_WALK_DISMEMBER_R)))){
_curAnimationStatic = true;
_curBitmapList = [Zombie.staticSprites[_arg1]];
} else {
_curAnimationStatic = false;
_curBitmapList = SpriteBitmap.clips[_arg1];
};
}
private function disposeAfterAnim():void{
disposeAfterCurrentAnimation = true;
}
public function update(_arg1:Event):void{
speed = (speed + _speedChange);
if (speed <= 0){
_speedChange = (_normSpeed / 20);
} else {
if (speed >= _normSpeed){
_speedChange = -((_normSpeed / 10));
};
};
var _local2:Number = x;
var _local3:Number = y;
var _local4:Number = Math.atan2((y - target.y), (x - target.x));
rotation = ((_local4 * 57.29) + 90);
var _local5:Number = Math.sqrt((Math.pow((x - target.x), 2) + Math.pow((y - target.y), 2)));
if (_local5 < 20){
dispose();
} else {
x = (x - (Math.cos(_local4) * speed));
y = (y - (Math.sin(_local4) * speed));
};
}
public function kill():void{
livingInstances.splice(livingInstances.indexOf(this), 1);
Menu.instance.removeEventListener(Event.ENTER_FRAME, update);
Menu.instance.spewBlood(this);
}
public function nuke():void{
kill();
if ((Math.random() * 2) < 1){
setAnim(ANIM_EXPLODE);
} else {
setAnim(ANIM_DIE_1);
};
disposeAfterCurrentAnimation = true;
}
public function get bmd():BitmapData{
if (_curAnimationStatic == false){
if ((getTimer() - _lastFrameAdvance) > _animSpeed){
_lastFrameAdvance = getTimer();
_curFrame++;
if (_curFrame >= _curBitmapList.length){
_curFrame = 0;
if (disposeAfterCurrentAnimation){
dispose();
return (new BitmapData(1, 1, true, 0));
};
};
};
};
var _local1:BitmapSprite = _curBitmapList[_curFrame];
_local1.rotation = rotation;
return (_local1.bmd);
}
public static function dispose():void{
var _local2:MenuZombie;
baseHealth = 4;
baseSpeed = 1;
var _local1:Array = [];
for each (_local2 in instances) {
_local1.push(_local2);
};
for each (_local2 in _local1) {
_local2.dispose();
};
_local1 = null;
livingInstances = [];
instances = [];
}
}
}//package org.hoah.zombies.menu
Section 54
//TextButton (org.hoah.zombies.menu.TextButton)
package org.hoah.zombies.menu {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import org.hoah.zombies.soundeffects.*;
import flash.filters.*;
public class TextButton extends MovieClip {
private var _size:int;// = 25
private var _enabled:Boolean;// = true
public var tf:TextField;
private var hoverFormat:TextFormat;
private var _lastClick:int;// = 0
private var normalFormat:TextFormat;
public function TextButton(_arg1:String, _arg2:Number=0, _arg3:Number=0, _arg4:int=25){
tf = new TextField();
super();
addChild(tf);
_size = _arg4;
x = _arg2;
y = _arg3;
tf.width = 200;
tf.height = 30;
tf.embedFonts = true;
tf.selectable = false;
tf.antiAliasType = AntiAliasType.NORMAL;
tf.mouseEnabled = false;
mouseChildren = false;
hoverFormat = new TextFormat("Viper Nora", _arg4, 0xFFFF00, true, null, null, null, null, TextFormatAlign.LEFT);
normalFormat = new TextFormat("Viper Nora", _arg4, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.LEFT);
tf.defaultTextFormat = normalFormat;
tf.text = _arg1;
if (_arg4 < 25){
tf.width = (tf.textWidth + 10);
};
if (tf.textWidth > tf.width){
tf.width = (tf.textWidth + 10);
};
buttonMode = true;
filters = [new DropShadowFilter(2, 25, 0, 1, 2, 2, 1, 1)];
addEventListener(MouseEvent.MOUSE_OVER, highlight);
addEventListener(MouseEvent.MOUSE_OUT, unhighlight);
addEventListener(MouseEvent.CLICK, checkClick);
}
public function get disabled():Boolean{
return (!(_enabled));
}
private function checkClick(_arg1:Event):void{
var _local2:int = getTimer();
if (_lastClick > (_local2 - 250)){
_arg1.stopImmediatePropagation();
_arg1.stopPropagation();
};
_lastClick = _local2;
}
private function highlight(_arg1:MouseEvent):void{
Sounds.playEffect("menuClick1");
tf.setTextFormat(hoverFormat);
}
public function set disabled(_arg1:Boolean):void{
if (_arg1){
hoverFormat = new TextFormat("Viper Nora", _size, 0xFF0000, true, null, null, null, null, TextFormatAlign.LEFT);
} else {
hoverFormat = new TextFormat("Viper Nora", _size, 0xFFFF00, true, null, null, null, null, TextFormatAlign.LEFT);
};
_enabled = !(_arg1);
}
private function unhighlight(_arg1:MouseEvent):void{
tf.setTextFormat(normalFormat);
}
public function dispose():void{
removeEventListener(MouseEvent.MOUSE_OVER, highlight);
removeEventListener(MouseEvent.MOUSE_OUT, unhighlight);
tf.text = "";
removeChild(tf);
tf = null;
}
}
}//package org.hoah.zombies.menu
Section 55
//Round (org.hoah.zombies.rounds.Round)
package org.hoah.zombies.rounds {
import flash.events.*;
import flash.utils.*;
import org.hoah.debug.*;
import org.hoah.zombies.*;
import org.hoah.zombies.ai.*;
import org.hoah.zombies.ui.*;
public class Round {
private static const specialRounds:Object = {0:{kills:1, noSpawn:true, pointBonus:2000}};
public static var survivalMode:Boolean = false;
public static var spawnRate:int = 1200;
public static var currentRoundKills:int = 0;
public static var spawnTimer:Timer = new Timer(1200);
private static var mimiIntroCurrent:Boolean = false;
public static var currentRound:int = 0;
public static var spawnQueue:int = 0;
private static var specialConditions:Object = null;
public static var currentRoundPointBonus:int = 0;
private static var survivalLevel:int = 1;
public static var survivalSpawnTimer:Timer = new Timer(1200);
public static var isSpecial:Boolean = true;
public static var intermission:Boolean = false;
public static var survivalStartTime:int = 0;
private static var mimiRound:int = 3;
private static var survivalNextWave:int = 5;
private static var mimiIntroDone:Boolean = false;
public static function gotoIntermission():void{
if (survivalMode){
intermission = true;
UserInterface.showIntermission();
return;
};
if (isSpecial){
if (specialConditions.pointBonus > 0){
UserInterface.addPoints(specialConditions.pointBonus);
};
} else {
UserInterface.addPoints(currentRoundPointBonus);
};
intermission = true;
spawnTimer.stop();
spawnQueue = 0;
Map.instance.removeEventListener(Event.ENTER_FRAME, checkRound);
UserInterface.showIntermission();
Tracer.log(((((("Game->Intermission; Round " + currentRound) + ". Points: ") + NumberTools.format(Player.totalPoints, 0)) + "/") + NumberTools.format(Player.points, 0)));
}
public static function startSurvival():void{
survivalSpawnTimer.delay = 1000;
survivalSpawnTimer.start();
UserInterface.instance.survivalMode = true;
UserInterface.instance.startSurvivalNow();
}
private static function setRound(_arg1:Array):void{
currentRound = int(_arg1[0]);
}
public static function init():void{
Map.instance.addEventListener(Event.ENTER_FRAME, checkRound);
spawnTimer.addEventListener(TimerEvent.TIMER, spawn);
Debug.instance.registerCommand("setround", setRound);
}
private static function checkRound(_arg1:Event):void{
var _local2:int;
if (isSpecial){
if (specialConditions == null){
specialConditions = specialRounds[currentRound];
};
if (specialConditions.kills != 0){
if (currentRoundKills >= specialConditions.kills){
gotoIntermission();
};
} else {
if ((((Zombie.livingInstances.length == 0)) && ((spawnQueue == 0)))){
gotoIntermission();
};
};
return;
};
if (currentRound == mimiRound){
if (mimiIntroCurrent){
if ((((Zombie.livingInstances.length == 0)) && ((spawnQueue == 0)))){
playMimiIntro();
return;
};
} else {
if (mimiIntroDone == false){
if ((((Zombie.livingInstances.length == 0)) && ((spawnQueue == 0)))){
setTimeout(spawnMimi, 12000);
mimiIntroCurrent = true;
_local2 = 0;
while (_local2 < 30) {
Map.instance.spawnZombie(new Event("mimi"));
_local2++;
};
spawnTimer.stop();
spawnQueue = 0;
};
};
};
return;
};
if ((((Zombie.livingInstances.length == 0)) && ((spawnQueue == 0)))){
gotoIntermission();
};
}
private static function spawnMimi():void{
Tracer.info((((("Spawning Mimi; " + "Points: ") + NumberTools.format(Player.totalPoints, 0)) + "/") + NumberTools.format(Player.points, 0)));
new Friend(50, 50);
}
public static function generateRoundSettings(_arg1:int):void{
var _local2:Friend;
Player.instance.health = Player.instance.maxHealth;
for each (_local2 in Friend.instances) {
if (GamerSafe.api.hasItem(371)){
_local2.maxHealth = 12;
} else {
_local2.maxHealth = 8;
};
_local2.health = _local2.maxHealth;
};
trace("-------------------------------");
trace(("Round #" + _arg1.toString()));
spawnRate = Math.max(100, (1000 - (_arg1 * 25)));
spawnTimer.delay = spawnRate;
trace("Spawn Rate:", spawnRate);
spawnQueue = (10 * currentRound);
trace("Number Zombies:", spawnQueue);
trace("Point Bonus:", (((_arg1 + 1) * 1200) - (_arg1 * 100)));
currentRoundPointBonus = (((_arg1 + 1) * 1200) - (_arg1 * 100));
trace("Zombie Health:", Math.floor(((_arg1 + 1) * 1.25)));
Zombie.baseHealth = Math.floor(((_arg1 + 1) * 1.25));
trace("Zombie Speed:", Math.min(4, ((_arg1 + 1) * 0.6)));
Zombie.baseSpeed = Math.min(4, Math.ceil(((_arg1 + 1) * 0.1)));
}
private static function survivalSpawn(_arg1:Event):void{
Map.instance.spawnZombie(_arg1);
survivalNextWave--;
if (survivalNextWave == 0){
survivalNextWave = (++survivalLevel * 5);
Zombie.baseSpeed = (Zombie.baseSpeed + 0.2);
Zombie.baseHealth = (Zombie.baseHealth + 0.5);
if (survivalSpawnTimer.delay > 100){
survivalSpawnTimer.delay = (survivalSpawnTimer.delay - 50);
};
};
}
public static function dispose():void{
Map.instance.removeEventListener(Event.ENTER_FRAME, checkRound);
survivalSpawnTimer.removeEventListener(TimerEvent.TIMER, survivalSpawn);
spawnTimer.removeEventListener(TimerEvent.TIMER, spawn);
intermission = false;
currentRound = 0;
currentRoundKills = 0;
currentRoundPointBonus = 0;
spawnQueue = 0;
spawnRate = 1200;
isSpecial = true;
mimiIntroDone = false;
mimiIntroCurrent = false;
specialConditions = null;
survivalMode = false;
survivalStartTime = 0;
survivalNextWave = 5;
survivalLevel = 1;
}
public static function playMimiIntro():void{
UserInterface.addPoints(2500);
intermission = true;
Map.instance.removeEventListener(Event.ENTER_FRAME, checkRound);
UserInterface.showMimiPurchase();
}
public static function initSurvival():void{
survivalMode = true;
survivalSpawnTimer.addEventListener(TimerEvent.TIMER, survivalSpawn);
}
public static function beginNextRound():void{
if (survivalMode){
Tracer.log(((("Intermission->Survival; Points: " + NumberTools.format(Player.totalPoints, 0)) + "/") + NumberTools.format(Player.points, 0)));
intermission = false;
startSurvival();
return;
};
Tracer.log(((((("Intermission->Game; Round " + currentRound) + ". Points: ") + NumberTools.format(Player.totalPoints, 0)) + "/") + NumberTools.format(Player.points, 0)));
intermission = false;
currentRound++;
generateRoundSettings(currentRound);
(currentRoundKills == 0);
Map.instance.addEventListener(Event.ENTER_FRAME, checkRound);
if (specialRounds[currentRound] != null){
isSpecial = true;
specialConditions = specialRounds[currentRound];
if (specialConditions.noSpawn == false){
spawnTimer.start();
};
} else {
isSpecial = false;
generateRoundSettings(currentRound);
spawnTimer.start();
};
}
private static function spawn(_arg1:Event):void{
if (spawnQueue <= 0){
spawnTimer.stop();
return;
};
spawnQueue--;
Map.instance.spawnZombie(_arg1);
}
public static function mimiIntroFinished():void{
UserInterface.showIntermission();
}
}
}//package org.hoah.zombies.rounds
Section 56
//AmbientSound (org.hoah.zombies.soundeffects.AmbientSound)
package org.hoah.zombies.soundeffects {
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import org.hoah.zombies.*;
public class AmbientSound {
private var channel:SoundChannel;
private var loopLength:int;// = 0
private var maxVol:Number;// = 0
private var tfUpdateTimer:Timer;
private var tf:SoundTransform;
private var sound:Sound;
private var x:int;
private var y:int;
private var falloff:Number;// = 0
private static var instances:Array = [];
public function AmbientSound(_arg1:Sound, _arg2:int, _arg3:int, _arg4:Number=0.5, _arg5:Number=400){
tf = new SoundTransform();
tfUpdateTimer = new Timer(100);
super();
instances.push(this);
sound = _arg1;
tf.volume = (_arg4 * Settings.soundVolume);
tf.pan = 0;
maxVol = _arg4;
falloff = _arg5;
x = _arg2;
y = _arg3;
loopLength = sound.length;
channel = sound.play(0, 0, tf);
Map.instance.addEventListener(Event.ENTER_FRAME, updateSound);
tfUpdateTimer.addEventListener(TimerEvent.TIMER, updateTf);
tfUpdateTimer.start();
}
private function updateTf(_arg1:Event):void{
var _local2:Number = ((x - Player.instance.x) / falloff);
var _local3:Number = Math.sqrt((Math.pow((x - Player.instance.x), 2) + Math.pow((y - Player.instance.y), 2)));
_local3 = (_local3 / falloff);
var _local4:Number = (Math.max(0, (1 - _local3)) * Settings.soundVolume);
_local4 = (_local4 * maxVol);
tf = new SoundTransform(_local4, _local2);
channel.soundTransform = tf;
}
private function updateSound(_arg1:Event):void{
if (channel.position >= (loopLength - 500)){
channel.stop();
channel = sound.play(500, 0, tf);
};
}
public static function dispose():void{
var i:AmbientSound;
for each (i in instances) {
var _local4 = i;
with (_local4) {
channel.stop();
channel = null;
sound = null;
tf = null;
Map.instance.removeEventListener(Event.ENTER_FRAME, updateSound);
tfUpdateTimer.removeEventListener(TimerEvent.TIMER, updateTf);
tfUpdateTimer.stop();
tfUpdateTimer = null;
};
};
instances = [];
}
}
}//package org.hoah.zombies.soundeffects
Section 57
//SoundAssets (org.hoah.zombies.soundeffects.SoundAssets)
package org.hoah.zombies.soundeffects {
import flash.media.*;
public class SoundAssets {
private static var _vocal_ella_hey_im_freeCls:Class = SoundAssets__vocal_ella_hey_im_freeCls;
private static var _vocal_mimi_ouch2Cls:Class = SoundAssets__vocal_mimi_ouch2Cls;
private static var _smgreloadCls:Class = SoundAssets__smgreloadCls;
public static var shotgun:Sound = (new _shotgun1Cls() as Sound);
public static var introSound:Sound = (new _introSoundCls() as Sound);
public static var vocal_mimi_ouch2:Sound = (new _vocal_mimi_ouch2Cls() as Sound);
private static var _vocal_ella_covermeCls:Class = SoundAssets__vocal_ella_covermeCls;
private static var _music_deadCls:Class = SoundAssets__music_deadCls;
public static var deagle:Sound = (new _deagle1Cls() as Sound);
private static var _vocal_mimi_arghCls:Class = SoundAssets__vocal_mimi_arghCls;
private static var _step3Cls:Class = SoundAssets__step3Cls;
private static var _menuClick1Cls:Class = SoundAssets__menuClick1Cls;
private static var _vocal_zombie_hit1Cls:Class = SoundAssets__vocal_zombie_hit1Cls;
private static var _introSoundCls:Class = SoundAssets__introSoundCls;
public static var vocal_ella_coverme:Sound = (new _vocal_ella_covermeCls() as Sound);
public static var trap_chomp:Sound = (new _trap_chompCls() as Sound);
private static var _sniperCls:Class = SoundAssets__sniperCls;
public static var music_dead:Sound = (new _music_deadCls() as Sound);
private static var _vocal_zombie_moan1Cls:Class = SoundAssets__vocal_zombie_moan1Cls;
public static var vocal_ella_dont_need_her:Sound = (new _vocal_ella_dont_need_herCls() as Sound);
public static var vocal_ella_hey_gross:Sound = (new _vocal_ella_hey_grossCls() as Sound);
public static var vocal_ella_poscon_good_choice:Sound = (new _vocal_ella_poscon_good_choiceCls() as Sound);
public static var vocal_mimi_reloading2:Sound = (new _vocal_mimi_reloading2Cls() as Sound);
private static var _vocal_ella_ouch2Cls:Class = SoundAssets__vocal_ella_ouch2Cls;
private static var _vocal_mimi_reloading2Cls:Class = SoundAssets__vocal_mimi_reloading2Cls;
private static var _reloadRevolverCls:Class = SoundAssets__reloadRevolverCls;
private static var _music_mainloopCls:Class = SoundAssets__music_mainloopCls;
private static var _vocal_ella_arghCls:Class = SoundAssets__vocal_ella_arghCls;
private static var _vocal_zombie_hit2Cls:Class = SoundAssets__vocal_zombie_hit2Cls;
private static var _vocal_mimi_i_could_helpCls:Class = SoundAssets__vocal_mimi_i_could_helpCls;
private static var _shotgun1Cls:Class = SoundAssets__shotgun1Cls;
private static var _menuClick2Cls:Class = SoundAssets__menuClick2Cls;
public static var vocal_ella_like_you_me:Sound = (new _vocal_ella_like_you_meCls() as Sound);
private static var _revolverCls:Class = SoundAssets__revolverCls;
private static var _vocal_ella_hey_grossCls:Class = SoundAssets__vocal_ella_hey_grossCls;
public static var reload1400:Sound = (new _reload1400Cls() as Sound);
public static var vocal_ella_reloading:Sound = (new _vocal_ella_reloadingCls() as Sound);
private static var _reload1000Cls:Class = SoundAssets__reload1000Cls;
public static var reloadRevolver:Sound = (new _reloadRevolverCls() as Sound);
private static var _vocal_ella_negcon_innuendoCls:Class = SoundAssets__vocal_ella_negcon_innuendoCls;
public static var vocal_ella_zombie:Sound = (new _vocal_ella_zombieCls() as Sound);
public static var vocal_ella_manage_on_own:Sound = (new _vocal_ella_manage_on_ownCls() as Sound);
public static var reloadChain:Sound = (new _reloadChainCls() as Sound);
public static var vocal_zombie_hit1:Sound = (new _vocal_zombie_hit1Cls() as Sound);
public static var vocal_zombie_hit2:Sound = (new _vocal_zombie_hit2Cls() as Sound);
private static var _vocal_zombie_moan2Cls:Class = SoundAssets__vocal_zombie_moan2Cls;
private static var _vocal_ella_wow_classyCls:Class = SoundAssets__vocal_ella_wow_classyCls;
public static var music_mainloop:Sound = (new _music_mainloopCls() as Sound);
public static var vocal_ella_poscon_innuendo:Sound = (new _vocal_ella_poscon_innuendoCls() as Sound);
private static var _smg1Cls:Class = SoundAssets__smg1Cls;
private static var _pistol1Cls:Class = SoundAssets__pistol1Cls;
public static var vocal_ella_negcon_hey_mimi:Sound = (new _vocal_ella_negcon_hey_mimiCls() as Sound);
private static var _vocal_ella_charge_usCls:Class = SoundAssets__vocal_ella_charge_usCls;
private static var _vocal_mimi_reloadingCls:Class = SoundAssets__vocal_mimi_reloadingCls;
public static var vocal_mimi_could_use_help:Sound = (new _vocal_mimi_could_use_helpCls() as Sound);
public static var step1:Sound = (new _step1Cls() as Sound);
public static var step2:Sound = (new _step2Cls() as Sound);
public static var step3:Sound = (new _step3Cls() as Sound);
private static var _vocal_ella_zombieCls:Class = SoundAssets__vocal_ella_zombieCls;
public static var sniper:Sound = (new _sniperCls() as Sound);
public static var vocal_ella_charge_us:Sound = (new _vocal_ella_charge_usCls() as Sound);
public static var vocal_mimi_i_could_help:Sound = (new _vocal_mimi_i_could_helpCls() as Sound);
public static var vocal_zombie_moan1:Sound = (new _vocal_zombie_moan1Cls() as Sound);
public static var vocal_zombie_moan2:Sound = (new _vocal_zombie_moan2Cls() as Sound);
private static var _vocal_mimi_all_nightCls:Class = SoundAssets__vocal_mimi_all_nightCls;
private static var _trap_chompCls:Class = SoundAssets__trap_chompCls;
public static var vocal_ella_dont_trust_her:Sound = (new _vocal_ella_dont_trust_herCls() as Sound);
public static var vocal_zombie_moan3:Sound = (new _vocal_zombie_moan3Cls() as Sound);
private static var _vocal_zombie_moan3Cls:Class = SoundAssets__vocal_zombie_moan3Cls;
private static var _deagle1Cls:Class = SoundAssets__deagle1Cls;
private static var _reload1400Cls:Class = SoundAssets__reload1400Cls;
private static var _vocal_mimi_heyCls:Class = SoundAssets__vocal_mimi_heyCls;
public static var assault1:Sound = (new _assault1Cls() as Sound);
public static var explosion:Sound = (new _explosionCls() as Sound);
public static var vocal_zombie_moan4:Sound = (new _vocal_zombie_moan4Cls() as Sound);
private static var _reloadSnipeCls:Class = SoundAssets__reloadSnipeCls;
private static var _vocal_ella_prostituteCls:Class = SoundAssets__vocal_ella_prostituteCls;
private static var _lightswitchCls:Class = SoundAssets__lightswitchCls;
public static var vocal_mimi_ouch:Sound = (new _vocal_mimi_ouchCls() as Sound);
public static var shotgunreload:Sound = (new _shotgunreloadCls() as Sound);
public static var vocal_mimi_argh:Sound = (new _vocal_mimi_arghCls() as Sound);
private static var _music_menuCls:Class = SoundAssets__music_menuCls;
public static var smgreload:Sound = (new _smgreloadCls() as Sound);
public static var vocal_mimi_hey:Sound = (new _vocal_mimi_heyCls() as Sound);
public static var music_menu:Sound = (new _music_menuCls() as Sound);
private static var _vocal_ella_reloadingCls:Class = SoundAssets__vocal_ella_reloadingCls;
public static var vocal_ella_ouch2:Sound = (new _vocal_ella_ouch2Cls() as Sound);
public static var ambient_fuseboard:Sound = (new _ambient_fuseboardCls() as Sound);
public static var achievementUnlocked:Sound = (new _achievementUnlockedCls() as Sound);
private static var _vocal_ella_manage_on_ownCls:Class = SoundAssets__vocal_ella_manage_on_ownCls;
public static var smg:Sound = (new _smg1Cls() as Sound);
private static var _vocal_ella_poscon_innuendoCls:Class = SoundAssets__vocal_ella_poscon_innuendoCls;
private static var _vocal_zombie_moan4Cls:Class = SoundAssets__vocal_zombie_moan4Cls;
private static var _vocal_ella_dont_trust_herCls:Class = SoundAssets__vocal_ella_dont_trust_herCls;
private static var _vocal_ella_poscon_good_choiceCls:Class = SoundAssets__vocal_ella_poscon_good_choiceCls;
private static var _step1Cls:Class = SoundAssets__step1Cls;
private static var _vocal_ella_dont_need_herCls:Class = SoundAssets__vocal_ella_dont_need_herCls;
public static var vocal_mimi_reloading:Sound = (new _vocal_mimi_reloadingCls() as Sound);
private static var _vocal_ella_helpCls:Class = SoundAssets__vocal_ella_helpCls;
public static var pistol:Sound = (new _pistol1Cls() as Sound);
public static var reload1000:Sound = (new _reload1000Cls() as Sound);
private static var _reloadChainCls:Class = SoundAssets__reloadChainCls;
public static var vocal_ella_ouch:Sound = (new _vocal_ella_ouchCls() as Sound);
private static var _vocal_ella_reloading2Cls:Class = SoundAssets__vocal_ella_reloading2Cls;
private static var _vocal_mimi_ouchCls:Class = SoundAssets__vocal_mimi_ouchCls;
public static var vocal_ella_argh:Sound = (new _vocal_ella_arghCls() as Sound);
public static var vocal_ella_prostitute:Sound = (new _vocal_ella_prostituteCls() as Sound);
private static var _vocal_mimi_could_use_helpCls:Class = SoundAssets__vocal_mimi_could_use_helpCls;
public static var vocal_ella_wow_classy:Sound = (new _vocal_ella_wow_classyCls() as Sound);
public static var vocal_ella_reloading2:Sound = (new _vocal_ella_reloading2Cls() as Sound);
private static var _vocal_ella_like_you_meCls:Class = SoundAssets__vocal_ella_like_you_meCls;
private static var _vocal_ella_ouchCls:Class = SoundAssets__vocal_ella_ouchCls;
public static var vocal_ella_hey_im_free:Sound = (new _vocal_ella_hey_im_freeCls() as Sound);
public static var vocal_mimi_help:Sound = (new _vocal_mimi_arghCls() as Sound);
private static var _explosionCls:Class = SoundAssets__explosionCls;
private static var _assault1Cls:Class = SoundAssets__assault1Cls;
public static var vocal_mimi_all_night:Sound = (new _vocal_mimi_all_nightCls() as Sound);
private static var _step2Cls:Class = SoundAssets__step2Cls;
public static var lightswitch:Sound = (new _lightswitchCls() as Sound);
private static var _achievementUnlockedCls:Class = SoundAssets__achievementUnlockedCls;
public static var reloadSnipe:Sound = (new _reloadSnipeCls() as Sound);
private static var _reload2000Cls:Class = SoundAssets__reload2000Cls;
public static var reload2000:Sound = (new _reload2000Cls() as Sound);
private static var _vocal_ella_negcon_hey_mimiCls:Class = SoundAssets__vocal_ella_negcon_hey_mimiCls;
public static var revolver:Sound = (new _revolverCls() as Sound);
public static var menuClick1:Sound = (new _menuClick1Cls() as Sound);
public static var menuClick2:Sound = (new _menuClick2Cls() as Sound);
private static var _shotgunreloadCls:Class = SoundAssets__shotgunreloadCls;
private static var _ambient_fuseboardCls:Class = SoundAssets__ambient_fuseboardCls;
public static var vocal_ella_help:Sound = (new _vocal_ella_helpCls() as Sound);
public static var vocal_ella_negcon_innuendo:Sound = (new _vocal_ella_negcon_innuendoCls() as Sound);
}
}//package org.hoah.zombies.soundeffects
Section 58
//SoundAssets__achievementUnlockedCls (org.hoah.zombies.soundeffects.SoundAssets__achievementUnlockedCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__achievementUnlockedCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 59
//SoundAssets__ambient_fuseboardCls (org.hoah.zombies.soundeffects.SoundAssets__ambient_fuseboardCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__ambient_fuseboardCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 60
//SoundAssets__assault1Cls (org.hoah.zombies.soundeffects.SoundAssets__assault1Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__assault1Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 61
//SoundAssets__deagle1Cls (org.hoah.zombies.soundeffects.SoundAssets__deagle1Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__deagle1Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 62
//SoundAssets__explosionCls (org.hoah.zombies.soundeffects.SoundAssets__explosionCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__explosionCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 63
//SoundAssets__introSoundCls (org.hoah.zombies.soundeffects.SoundAssets__introSoundCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__introSoundCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 64
//SoundAssets__lightswitchCls (org.hoah.zombies.soundeffects.SoundAssets__lightswitchCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__lightswitchCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 65
//SoundAssets__menuClick1Cls (org.hoah.zombies.soundeffects.SoundAssets__menuClick1Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__menuClick1Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 66
//SoundAssets__menuClick2Cls (org.hoah.zombies.soundeffects.SoundAssets__menuClick2Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__menuClick2Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 67
//SoundAssets__music_deadCls (org.hoah.zombies.soundeffects.SoundAssets__music_deadCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__music_deadCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 68
//SoundAssets__music_mainloopCls (org.hoah.zombies.soundeffects.SoundAssets__music_mainloopCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__music_mainloopCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 69
//SoundAssets__music_menuCls (org.hoah.zombies.soundeffects.SoundAssets__music_menuCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__music_menuCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 70
//SoundAssets__pistol1Cls (org.hoah.zombies.soundeffects.SoundAssets__pistol1Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__pistol1Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 71
//SoundAssets__reload1000Cls (org.hoah.zombies.soundeffects.SoundAssets__reload1000Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__reload1000Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 72
//SoundAssets__reload1400Cls (org.hoah.zombies.soundeffects.SoundAssets__reload1400Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__reload1400Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 73
//SoundAssets__reload2000Cls (org.hoah.zombies.soundeffects.SoundAssets__reload2000Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__reload2000Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 74
//SoundAssets__reloadChainCls (org.hoah.zombies.soundeffects.SoundAssets__reloadChainCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__reloadChainCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 75
//SoundAssets__reloadRevolverCls (org.hoah.zombies.soundeffects.SoundAssets__reloadRevolverCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__reloadRevolverCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 76
//SoundAssets__reloadSnipeCls (org.hoah.zombies.soundeffects.SoundAssets__reloadSnipeCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__reloadSnipeCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 77
//SoundAssets__revolverCls (org.hoah.zombies.soundeffects.SoundAssets__revolverCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__revolverCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 78
//SoundAssets__shotgun1Cls (org.hoah.zombies.soundeffects.SoundAssets__shotgun1Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__shotgun1Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 79
//SoundAssets__shotgunreloadCls (org.hoah.zombies.soundeffects.SoundAssets__shotgunreloadCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__shotgunreloadCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 80
//SoundAssets__smg1Cls (org.hoah.zombies.soundeffects.SoundAssets__smg1Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__smg1Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 81
//SoundAssets__smgreloadCls (org.hoah.zombies.soundeffects.SoundAssets__smgreloadCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__smgreloadCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 82
//SoundAssets__sniperCls (org.hoah.zombies.soundeffects.SoundAssets__sniperCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__sniperCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 83
//SoundAssets__step1Cls (org.hoah.zombies.soundeffects.SoundAssets__step1Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__step1Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 84
//SoundAssets__step2Cls (org.hoah.zombies.soundeffects.SoundAssets__step2Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__step2Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 85
//SoundAssets__step3Cls (org.hoah.zombies.soundeffects.SoundAssets__step3Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__step3Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 86
//SoundAssets__trap_chompCls (org.hoah.zombies.soundeffects.SoundAssets__trap_chompCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__trap_chompCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 87
//SoundAssets__vocal_ella_arghCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_arghCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_arghCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 88
//SoundAssets__vocal_ella_charge_usCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_charge_usCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_charge_usCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 89
//SoundAssets__vocal_ella_covermeCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_covermeCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_covermeCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 90
//SoundAssets__vocal_ella_dont_need_herCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_dont_need_herCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_dont_need_herCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 91
//SoundAssets__vocal_ella_dont_trust_herCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_dont_trust_herCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_dont_trust_herCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 92
//SoundAssets__vocal_ella_helpCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_helpCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_helpCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 93
//SoundAssets__vocal_ella_hey_grossCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_hey_grossCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_hey_grossCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 94
//SoundAssets__vocal_ella_hey_im_freeCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_hey_im_freeCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_hey_im_freeCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 95
//SoundAssets__vocal_ella_like_you_meCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_like_you_meCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_like_you_meCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 96
//SoundAssets__vocal_ella_manage_on_ownCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_manage_on_ownCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_manage_on_ownCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 97
//SoundAssets__vocal_ella_negcon_hey_mimiCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_negcon_hey_mimiCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_negcon_hey_mimiCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 98
//SoundAssets__vocal_ella_negcon_innuendoCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_negcon_innuendoCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_negcon_innuendoCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 99
//SoundAssets__vocal_ella_ouch2Cls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_ouch2Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_ouch2Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 100
//SoundAssets__vocal_ella_ouchCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_ouchCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_ouchCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 101
//SoundAssets__vocal_ella_poscon_good_choiceCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_poscon_good_choiceCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_poscon_good_choiceCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 102
//SoundAssets__vocal_ella_poscon_innuendoCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_poscon_innuendoCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_poscon_innuendoCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 103
//SoundAssets__vocal_ella_prostituteCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_prostituteCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_prostituteCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 104
//SoundAssets__vocal_ella_reloading2Cls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_reloading2Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_reloading2Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 105
//SoundAssets__vocal_ella_reloadingCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_reloadingCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_reloadingCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 106
//SoundAssets__vocal_ella_wow_classyCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_wow_classyCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_wow_classyCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 107
//SoundAssets__vocal_ella_zombieCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_ella_zombieCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_ella_zombieCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 108
//SoundAssets__vocal_mimi_all_nightCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_mimi_all_nightCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_mimi_all_nightCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 109
//SoundAssets__vocal_mimi_arghCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_mimi_arghCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_mimi_arghCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 110
//SoundAssets__vocal_mimi_could_use_helpCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_mimi_could_use_helpCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_mimi_could_use_helpCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 111
//SoundAssets__vocal_mimi_heyCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_mimi_heyCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_mimi_heyCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 112
//SoundAssets__vocal_mimi_i_could_helpCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_mimi_i_could_helpCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_mimi_i_could_helpCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 113
//SoundAssets__vocal_mimi_ouch2Cls (org.hoah.zombies.soundeffects.SoundAssets__vocal_mimi_ouch2Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_mimi_ouch2Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 114
//SoundAssets__vocal_mimi_ouchCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_mimi_ouchCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_mimi_ouchCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 115
//SoundAssets__vocal_mimi_reloading2Cls (org.hoah.zombies.soundeffects.SoundAssets__vocal_mimi_reloading2Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_mimi_reloading2Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 116
//SoundAssets__vocal_mimi_reloadingCls (org.hoah.zombies.soundeffects.SoundAssets__vocal_mimi_reloadingCls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_mimi_reloadingCls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 117
//SoundAssets__vocal_zombie_hit1Cls (org.hoah.zombies.soundeffects.SoundAssets__vocal_zombie_hit1Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_zombie_hit1Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 118
//SoundAssets__vocal_zombie_hit2Cls (org.hoah.zombies.soundeffects.SoundAssets__vocal_zombie_hit2Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_zombie_hit2Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 119
//SoundAssets__vocal_zombie_moan1Cls (org.hoah.zombies.soundeffects.SoundAssets__vocal_zombie_moan1Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_zombie_moan1Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 120
//SoundAssets__vocal_zombie_moan2Cls (org.hoah.zombies.soundeffects.SoundAssets__vocal_zombie_moan2Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_zombie_moan2Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 121
//SoundAssets__vocal_zombie_moan3Cls (org.hoah.zombies.soundeffects.SoundAssets__vocal_zombie_moan3Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_zombie_moan3Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 122
//SoundAssets__vocal_zombie_moan4Cls (org.hoah.zombies.soundeffects.SoundAssets__vocal_zombie_moan4Cls)
package org.hoah.zombies.soundeffects {
import mx.core.*;
public class SoundAssets__vocal_zombie_moan4Cls extends SoundAsset {
}
}//package org.hoah.zombies.soundeffects
Section 123
//Sounds (org.hoah.zombies.soundeffects.Sounds)
package org.hoah.zombies.soundeffects {
import flash.events.*;
import flash.media.*;
import org.hoah.zombies.*;
import org.hoah.Tweener.*;
public class Sounds {
private static var musicSoundTransform:SoundTransform = new SoundTransform(0.75, 0);
private static var musicQueue:Array = [];
private static var first:Boolean = true;
private static var currentTrackLooped:Boolean = false;
private static var ambiences:Array = [];
private static var currentTrackName:String = "";
private static var currentMusicTrack:SoundChannel;
public static function stopMusic():void{
Tweener.addTween(Sounds, {musicVolume:0, time:2, transition:"linear", onComplete:stopMusicInstant});
}
private static function niceMusicLoop(_arg1:Event):void{
if (currentMusicTrack.position >= ((SoundAssets[currentTrackName] as Sound).length - 200)){
currentMusicTrack.stop();
currentMusicTrack = (SoundAssets[currentTrackName] as Sound).play(50, 10, musicSoundTransform);
};
}
public static function playMusic(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:Boolean=false):void{
var _local5:int;
trace("PLAY MUSIC:", _arg1);
_arg1 = ("music_" + _arg1);
if (SoundAssets[_arg1] == null){
return;
};
if (_arg3){
_local5 = 0;
if (_arg2){
_local5 = 5000;
};
currentMusicTrack = (SoundAssets[_arg1] as Sound).play(0, _local5, musicSoundTransform);
currentTrackLooped = _arg2;
currentTrackName = _arg1;
if (_arg4){
Zombies.instance.stage.addEventListener(Event.ENTER_FRAME, niceMusicLoop);
};
musicQueue = [];
} else {
musicQueue.push([_arg1, _arg2]);
};
if (first){
currentMusicTrack.addEventListener(Event.SOUND_COMPLETE, nextMusic);
first = false;
};
}
public static function playDirectional(_arg1:String, _arg2:Number=0, _arg3:Number=1):void{
if (SoundAssets[_arg1] == null){
return;
};
_arg3 = (_arg3 * Settings.soundVolume);
var _local4:SoundTransform = new SoundTransform(_arg3, _arg2);
(SoundAssets[_arg1] as Sound).play(0, 0, _local4);
}
public static function spawnAmbience(_arg1:String, _arg2:int, _arg3:int, _arg4:Number=0.5, _arg5:Number=100):int{
if (SoundAssets[_arg1] == null){
return (-1);
};
var _local6:Sound = SoundAssets[_arg1];
var _local7:AmbientSound = new AmbientSound(_local6, _arg2, _arg3, _arg4, _arg5);
return ((ambiences.length - 1));
}
public static function stopMusicInstant():void{
currentMusicTrack.stop();
}
public static function getSoundLength(_arg1:String):Number{
if (SoundAssets[_arg1] == null){
return (0);
};
return ((SoundAssets[_arg1] as Sound).length);
}
public static function playVocal(_arg1:String, _arg2:Number=1):SoundChannel{
if (SoundAssets[_arg1] == null){
return (null);
};
_arg2 = (_arg2 * Settings.vocalVolume);
var _local3:SoundTransform = new SoundTransform(_arg2);
return ((SoundAssets[_arg1] as Sound).play(0, 0, _local3));
}
public static function playEffect(_arg1:String, _arg2:Number=1):SoundChannel{
if (_arg1.substr(0, 5) == "vocal"){
return (playVocal(_arg1, _arg2));
};
if (SoundAssets[_arg1] == null){
return (null);
};
_arg2 = (_arg2 * Settings.soundVolume);
var _local3:SoundTransform = new SoundTransform(_arg2);
return ((SoundAssets[_arg1] as Sound).play(0, 0, _local3));
}
public static function get musicVolume():Number{
return (currentMusicTrack.soundTransform.volume);
}
public static function dispose():void{
try {
stopMusicInstant();
} catch(e:Error) {
};
Zombies.instance.stage.removeEventListener(Event.ENTER_FRAME, niceMusicLoop);
try {
currentMusicTrack.removeEventListener(Event.SOUND_COMPLETE, nextMusic);
} catch(e:Error) {
};
first = true;
}
private static function nextMusic(_arg1:Event):void{
if (currentTrackLooped){
return;
};
}
public static function play3D(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Number=600):void{
if (SoundAssets[_arg1] == null){
return;
};
var _local6:Number = ((_arg2 - Player.instance.x) / _arg5);
var _local7:Number = Math.sqrt((Math.pow((_arg2 - Player.instance.x), 2) + Math.pow((_arg3 - Player.instance.y), 2)));
_local7 = (_local7 / _arg5);
var _local8:Number = Math.max(0, (1 - _local7));
_local8 = (_local8 * _arg4);
_local8 = (_local8 * Settings.soundVolume);
if (_local8 <= 0){
return;
};
var _local9:SoundTransform = new SoundTransform(_local8, _local6);
(SoundAssets[_arg1] as Sound).play(0, 0, _local9);
}
public static function set musicVolume(_arg1:Number):void{
var _local2:SoundTransform = new SoundTransform(_arg1);
currentMusicTrack.soundTransform = _local2;
}
}
}//package org.hoah.zombies.soundeffects
Section 124
//Trap (org.hoah.zombies.traps.Trap)
package org.hoah.zombies.traps {
import flash.display.*;
import org.hoah.zombies.*;
public class Trap {
public var sprite:BitmapSprite;// = null
public var x:int;// = 0
public var y:int;// = 0
public var rotation:Number;// = 0
public static var traps:Array = [];
public function Trap(){
traps.push(this);
}
public function get bmd():BitmapData{
return (new BitmapData(10, 10, false, 0xFF0000));
}
public function placed():void{
}
public function dispose():void{
}
public static function dispose():void{
var _local1:Trap;
for each (_local1 in traps) {
_local1.dispose();
};
traps = [];
}
}
}//package org.hoah.zombies.traps
Section 125
//TrapBarrier (org.hoah.zombies.traps.TrapBarrier)
package org.hoah.zombies.traps {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.*;
import flash.geom.*;
public class TrapBarrier extends Trap {
private var _zombiesInLove:Array;
private var _curFrame:int;// = 1
private var _currentRoom:String;// = "none"
private var _health:int;// = 100000
public function TrapBarrier(_arg1:int, _arg2:int, _arg3:Number){
_zombiesInLove = [];
super();
x = _arg1;
y = _arg2;
rotation = _arg3;
sprite = SpriteBitmap.clips["trap_barrier"][0];
Map.instance.addEventListener(Event.ENTER_FRAME, lookForZombie);
_currentRoom = getRoom(new Point(x, y));
}
override public function get bmd():BitmapData{
if (sprite == null){
return (new BitmapData(1, 1, false, 0));
};
sprite.rotation = rotation;
return (sprite.bmd);
}
private function lookForZombie(_arg1:Event):void{
var _local2:Zombie;
if (Zombies.paused){
return;
};
for each (_local2 in _zombiesInLove) {
_health--;
};
if (_health <= 0){
for each (_local2 in _zombiesInLove) {
_local2.loves();
};
dispose();
return;
};
for each (_local2 in Zombie.livingInstances) {
if (Math.sqrt((Math.pow((x - _local2.x), 2) + Math.pow((y - _local2.y), 2))) < 25){
_local2.loves(this);
_zombiesInLove.push(_local2);
};
};
}
private function getRoom(_arg1:Point):String{
var _local2:XML;
for each (_local2 in Map.instance.rooms) {
if ((((_arg1.x > _local2.@left)) && ((_arg1.x < _local2.@right)))){
if ((((_arg1.y > _local2.@top)) && ((_arg1.y < _local2.@bottom)))){
return (_local2.@name);
};
};
};
return ("none");
}
override public function placed():void{
_currentRoom = getRoom(new Point(x, y));
}
override public function dispose():void{
x = 0;
y = 0;
rotation = 0;
sprite = null;
Map.instance.removeEventListener(Event.ENTER_FRAME, lookForZombie);
_currentRoom = null;
_health = 0;
_curFrame = 0;
_zombiesInLove = null;
}
}
}//package org.hoah.zombies.traps
Section 126
//TrapBear (org.hoah.zombies.traps.TrapBear)
package org.hoah.zombies.traps {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.zombies.*;
import flash.geom.*;
import org.hoah.zombies.soundeffects.*;
public class TrapBear extends Trap {
private var _fuse:int;// = 200
private var _ready:Boolean;// = true
private var _active:Boolean;// = false
private var _lastFire:int;// = 0
private var _curFrame:int;// = 1
private var _playing:Boolean;// = false
public var zombiesInLove:Array;
private var _currentRoom:String;// = "none"
public function TrapBear(_arg1:int, _arg2:int, _arg3:Number){
zombiesInLove = [];
super();
x = _arg1;
y = _arg2;
rotation = _arg3;
sprite = SpriteBitmap.clips["trap_bear"][0];
Map.instance.addEventListener(Event.ENTER_FRAME, lookForZombie);
_currentRoom = getRoom(new Point(x, y));
}
private function getRoom(_arg1:Point):String{
var _local2:XML;
for each (_local2 in Map.instance.rooms) {
if ((((_arg1.x > _local2.@left)) && ((_arg1.x < _local2.@right)))){
if ((((_arg1.y > _local2.@top)) && ((_arg1.y < _local2.@bottom)))){
return (_local2.@name);
};
};
};
return ("none");
}
private function lookForZombie(_arg1:Event):void{
var _local2:Zombie;
if (Zombies.paused){
return;
};
if (_playing){
_curFrame++;
if (_curFrame >= SpriteBitmap.clips["trap_bear"].length){
_curFrame = 0;
};
sprite = SpriteBitmap.clips["trap_bear"][_curFrame];
if (_curFrame == 0){
_playing = false;
_ready = true;
};
};
if (_ready == false){
return;
};
if ((getTimer() - _lastFire) < 20000){
return;
};
if (!_active){
for each (_local2 in Zombie.livingInstances) {
if (_local2.currentRoom != _currentRoom){
} else {
_active = true;
break;
};
};
if (!_active){
return;
};
};
if (_fuse > 0){
_fuse--;
_curFrame++;
if (_curFrame >= 14){
_curFrame = 2;
};
sprite = SpriteBitmap.clips["trap_bear"][_curFrame];
for each (_local2 in Zombie.livingInstances) {
if (zombiesInLove.indexOf(_local2) > -1){
} else {
if (Math.sqrt((Math.pow((x - _local2.x), 2) + Math.pow((y - _local2.y), 2))) < 100){
_local2.loves(this);
zombiesInLove.push(_local2);
};
};
};
return;
};
_fuse = 200;
_curFrame = 14;
_active = false;
var _local3:Array = [];
for each (_local2 in zombiesInLove) {
_local2.loves();
};
for each (_local2 in Zombie.livingInstances) {
if (Math.sqrt((Math.pow((x - _local2.x), 2) + Math.pow((y - _local2.y), 2))) < 60){
_local3.push(_local2);
};
};
Sounds.play3D("explosion", x, y, 0.3);
if (_local3.length > 0){
_ready = false;
_playing = true;
for each (_local2 in _local3) {
_local2.nade();
_local2.loves();
};
_lastFire = getTimer();
};
}
override public function get bmd():BitmapData{
sprite.rotation = rotation;
return (sprite.bmd);
}
override public function placed():void{
_currentRoom = getRoom(new Point(x, y));
}
override public function dispose():void{
x = 0;
y = 0;
rotation = 0;
sprite = null;
Map.instance.removeEventListener(Event.ENTER_FRAME, lookForZombie);
_currentRoom = null;
_curFrame = 0;
zombiesInLove = null;
}
}
}//package org.hoah.zombies.traps
Section 127
//TrapChomper (org.hoah.zombies.traps.TrapChomper)
package org.hoah.zombies.traps {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.zombies.*;
import org.hoah.zombies.soundeffects.*;
public class TrapChomper extends Trap {
private var _ready:Boolean;// = true
private var _lastFire:int;// = 0
private var _curFrame:int;// = 1
private var _playing:Boolean;// = false
public function TrapChomper(_arg1:int, _arg2:int, _arg3:Number){
x = _arg1;
y = _arg2;
rotation = _arg3;
sprite = SpriteBitmap.clips["trap_chomper"][0];
Map.instance.addEventListener(Event.ENTER_FRAME, lookForZombie);
}
private function lookForZombie(_arg1:Event):void{
var _local2:Zombie;
if (Zombies.paused){
return;
};
if (_playing){
_curFrame++;
if (_curFrame >= SpriteBitmap.clips["trap_chomper"].length){
_curFrame = 0;
};
sprite = SpriteBitmap.clips["trap_chomper"][_curFrame];
if (_curFrame == 0){
_playing = false;
_ready = true;
};
};
if (_ready == false){
return;
};
if ((getTimer() - _lastFire) < 1500){
return;
};
for each (_local2 in Zombie.livingInstances) {
if (Math.sqrt((Math.pow((x - _local2.x), 2) + Math.pow((y - _local2.y), 2))) < 25){
_ready = false;
_playing = true;
_local2.hit(3);
_local2.randomDismember(0.2);
_lastFire = getTimer();
};
};
if (_ready == false){
Sounds.play3D("trap_chomp", x, y, 0.8);
};
}
override public function dispose():void{
x = 0;
y = 0;
rotation = 0;
sprite = null;
Map.instance.removeEventListener(Event.ENTER_FRAME, lookForZombie);
_ready = false;
_curFrame = 0;
}
override public function get bmd():BitmapData{
sprite.rotation = rotation;
return (sprite.bmd);
}
}
}//package org.hoah.zombies.traps
Section 128
//TrapFragMine (org.hoah.zombies.traps.TrapFragMine)
package org.hoah.zombies.traps {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.zombies.*;
import org.hoah.zombies.soundeffects.*;
public class TrapFragMine extends Trap {
private var _ready:Boolean;// = true
private var _lastFire:int;// = 0
private var _curFrame:int;// = 1
private var _playing:Boolean;// = false
public function TrapFragMine(_arg1:int, _arg2:int, _arg3:Number){
x = _arg1;
y = _arg2;
rotation = _arg3;
sprite = SpriteBitmap.clips["trap_frag_mine"][0];
Map.instance.addEventListener(Event.ENTER_FRAME, lookForZombie);
}
private function lookForZombie(_arg1:Event):void{
var _local3:Zombie;
if (Zombies.paused){
return;
};
if (_playing){
_curFrame++;
if (_curFrame >= SpriteBitmap.clips["trap_frag_mine"].length){
_curFrame = 0;
};
sprite = SpriteBitmap.clips["trap_frag_mine"][_curFrame];
if (_curFrame == 0){
_playing = false;
_ready = true;
};
};
if (_ready == false){
return;
};
if ((getTimer() - _lastFire) < 5000){
return;
};
var _local2:Boolean;
for each (_local3 in Zombie.livingInstances) {
if (Math.sqrt((Math.pow((x - _local3.x), 2) + Math.pow((y - _local3.y), 2))) < 25){
_local2 = true;
};
};
if (_local2 == false){
return;
};
Sounds.play3D("explosion", x, y, 0.3);
for each (_local3 in Zombie.livingInstances) {
if (Math.sqrt((Math.pow((x - _local3.x), 2) + Math.pow((y - _local3.y), 2))) < 60){
_ready = false;
_playing = true;
_local3.nade();
_lastFire = getTimer();
};
};
}
override public function dispose():void{
x = 0;
y = 0;
rotation = 0;
sprite = null;
Map.instance.removeEventListener(Event.ENTER_FRAME, lookForZombie);
_ready = false;
_playing = false;
_curFrame = 0;
}
override public function get bmd():BitmapData{
sprite.rotation = rotation;
return (sprite.bmd);
}
}
}//package org.hoah.zombies.traps
Section 129
//TrapMine (org.hoah.zombies.traps.TrapMine)
package org.hoah.zombies.traps {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.zombies.*;
import org.hoah.zombies.soundeffects.*;
public class TrapMine extends Trap {
private var _ready:Boolean;// = true
private var _lastFire:int;// = 0
private var _curFrame:int;// = 1
private var _playing:Boolean;// = false
public function TrapMine(_arg1:int, _arg2:int, _arg3:Number){
x = _arg1;
y = _arg2;
rotation = _arg3;
sprite = SpriteBitmap.clips["trap_small_mine"][0];
Map.instance.addEventListener(Event.ENTER_FRAME, lookForZombie);
}
private function lookForZombie(_arg1:Event):void{
var _local3:Zombie;
if (Zombies.paused){
return;
};
if (_playing){
_curFrame++;
if (_curFrame >= SpriteBitmap.clips["trap_small_mine"].length){
_curFrame = 0;
};
sprite = SpriteBitmap.clips["trap_small_mine"][_curFrame];
if (_curFrame == 0){
_playing = false;
_ready = true;
};
};
if (_ready == false){
return;
};
if ((getTimer() - _lastFire) < 5000){
return;
};
var _local2:Boolean;
for each (_local3 in Zombie.livingInstances) {
if (Math.sqrt((Math.pow((x - _local3.x), 2) + Math.pow((y - _local3.y), 2))) < 25){
_local2 = true;
};
};
if (_local2 == false){
return;
};
Sounds.play3D("explosion", x, y, 0.3);
for each (_local3 in Zombie.livingInstances) {
if (Math.sqrt((Math.pow((x - _local3.x), 2) + Math.pow((y - _local3.y), 2))) < 60){
_ready = false;
_playing = true;
_local3.nade();
_lastFire = getTimer();
};
};
}
override public function dispose():void{
x = 0;
y = 0;
rotation = 0;
sprite = null;
Map.instance.removeEventListener(Event.ENTER_FRAME, lookForZombie);
_ready = false;
_playing = false;
_curFrame = 0;
}
override public function get bmd():BitmapData{
sprite.rotation = rotation;
return (sprite.bmd);
}
}
}//package org.hoah.zombies.traps
Section 130
//TrapOil (org.hoah.zombies.traps.TrapOil)
package org.hoah.zombies.traps {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.*;
import flash.geom.*;
public class TrapOil extends Trap {
private var _curFrame:int;// = 1
private var _spriteClip:Array;
private var _currentRoom:String;// = "none"
private var _life:int;// = 1000
public function TrapOil(_arg1:int, _arg2:int, _arg3:Number){
x = _arg1;
y = _arg2;
rotation = _arg3;
_spriteClip = SpriteBitmap.clips["trap_oil"];
sprite = _spriteClip[0];
sprite.rotation = rotation;
Map.instance.addEventListener(Event.ENTER_FRAME, lookForZombie);
_currentRoom = getRoom(new Point(x, y));
}
private function lookForZombie(_arg1:Event):void{
var _local2:Zombie;
if (Zombies.paused){
return;
};
if (_life <= 0){
Map.instance.removeEventListener(Event.ENTER_FRAME, lookForZombie);
Trap.traps.splice(Trap.traps.indexOf(this), 1);
return;
};
for each (_local2 in Zombie.livingInstances) {
if (Math.sqrt((Math.pow((x - _local2.x), 2) + Math.pow((y - _local2.y), 2))) < 25){
_local2.speed = 0.5;
_local2._normSpeed = 0.25;
_life--;
};
};
}
private function getRoom(_arg1:Point):String{
var _local2:XML;
for each (_local2 in Map.instance.rooms) {
if ((((_arg1.x > _local2.@left)) && ((_arg1.x < _local2.@right)))){
if ((((_arg1.y > _local2.@top)) && ((_arg1.y < _local2.@bottom)))){
return (_local2.@name);
};
};
};
return ("none");
}
override public function get bmd():BitmapData{
var _local1:int = Math.floor((Math.abs(((((x - Map.instance.offsetX) + y) - Map.instance.offsetY) % 320)) / 8));
if (_local1 > 20){
_local1 = (20 - (_local1 - 20));
};
while (_local1 >= 20) {
_local1--;
};
while (_local1 < 0) {
_local1++;
};
sprite = _spriteClip[_local1];
sprite.rotation = rotation;
return (sprite.bmd);
}
override public function placed():void{
_currentRoom = getRoom(new Point(x, y));
}
override public function dispose():void{
x = 0;
y = 0;
rotation = 0;
sprite = null;
_life = 0;
Map.instance.removeEventListener(Event.ENTER_FRAME, lookForZombie);
_curFrame = 0;
}
}
}//package org.hoah.zombies.traps
Section 131
//TrapSentry (org.hoah.zombies.traps.TrapSentry)
package org.hoah.zombies.traps {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.zombies.*;
import flash.geom.*;
import org.hoah.zombies.map.*;
import org.hoah.Tweener.*;
import org.hoah.zombies.weapons.*;
public class TrapSentry extends Trap {
private var _curWeapon:Weapon;
private var _stopFireTimer:Timer;
private var _life:int;// = 20
private var _targettingMode:String;// = "Waiting"
private var _currentTarget:Zombie;
private var _fireTimer:Timer;
private var _seenPause:int;// = 0
private var _searchTimer:Timer;
public static var instances:Array = [];
public function TrapSentry(_arg1:int, _arg2:int, _arg3:Number){
_searchTimer = new Timer(50);
_stopFireTimer = new Timer(200);
_fireTimer = new Timer(10);
super();
instances.push(this);
x = _arg1;
y = _arg2;
rotation = _arg3;
sprite = SpriteBitmap.clips["trap_sentry"][0];
_fireTimer.addEventListener(TimerEvent.TIMER, fire);
_stopFireTimer.addEventListener(TimerEvent.TIMER, stopFire);
_curWeapon = new Weapon(Map.instance.stage, 21, false, null, this);
}
private function targetWaiting():void{
var _local4:Zombie;
if (Zombie.livingInstances.length == 0){
return;
};
var _local1:Number = Infinity;
var _local2:Zombie;
var _local3:Number = 0;
for each (_local4 in Zombie.livingInstances) {
if (_local4.special){
} else {
_local3 = Math.sqrt((Math.pow((x - _local4.x), 2) + Math.pow((y - _local4.y), 2)));
if (_local3 < _local1){
_local1 = _local3;
_local2 = _local4;
};
};
};
if (_local2 != null){
if (checkLoS(_local2)){
_targettingMode = "Aiming";
_currentTarget = _local2;
_seenPause = getTimer();
};
};
}
private function checkLoS(_arg1:Zombie):Boolean{
var _local6:MapWall;
var _local7:Point;
var _local2:Point = new Point(x, y);
var _local3:Point = new Point(_arg1.x, _arg1.y);
var _local4:Number = 0;
var _local5:Number = Point.distance(_local2, _local3);
for each (_local6 in Map.walls) {
_local7 = _local6.intersects(_local2, _local3);
if (_local7 != null){
_local4 = Point.distance(_local7, _local2);
if (_local4 < _local5){
return (false);
};
};
};
return (true);
}
public function update():void{
var _local1:Zombie;
if (Zombies.paused){
return;
};
if (_life <= 0){
Trap.traps.splice(Trap.traps.indexOf(this), 1);
instances.splice(instances.indexOf(this), 1);
return;
};
updateTargetting();
_curWeapon.renderLaser();
_curWeapon.render();
}
private function stopFire(_arg1:Event):void{
_fireTimer.stop();
}
override public function dispose():void{
instances.splice(instances.indexOf(this), 1);
x = 0;
y = 0;
rotation = 0;
_life = 0;
_curWeapon = null;
}
private function updateTargetting(_arg1:Event=null):void{
var _local2 = this;
_local2[("target" + _targettingMode)]();
}
private function targetAiming():void{
if (_currentTarget.health <= 0){
_currentTarget = null;
_targettingMode = "Waiting";
return;
};
if (checkLoS(_currentTarget) == false){
_currentTarget = null;
_targettingMode = "Waiting";
return;
};
var _local1 = (Math.abs(((rotation - (Math.atan2((y - _currentTarget.y), (x - _currentTarget.x)) * 57.29)) - 90)) > 2);
if (((_local1) && ((Tweener.getTweenCount(this) == 0)))){
Tweener.addTween(this, {rotation:((Math.atan2((y - _currentTarget.y), (x - _currentTarget.x)) * 57.29) + 90), time:0.5});
};
_local1 = (Math.abs(((rotation - (Math.atan2((y - _currentTarget.y), (x - _currentTarget.x)) * 57.29)) - 90)) > 5);
if (_local1 == false){
_fireTimer.start();
_stopFireTimer.stop();
_stopFireTimer.start();
};
}
override public function get bmd():BitmapData{
sprite.rotation = rotation;
return (sprite.bmd);
}
private function fire(_arg1:Event):void{
_curWeapon.startShooting(false);
}
}
}//package org.hoah.zombies.traps
Section 132
//TrapWall (org.hoah.zombies.traps.TrapWall)
package org.hoah.zombies.traps {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.*;
import flash.geom.*;
public class TrapWall extends Trap {
private var _zombiesInLove:Array;
private var _curFrame:int;// = 1
private var _currentRoom:String;// = "none"
private var _health:int;// = 0x3D0900
public function TrapWall(_arg1:int, _arg2:int, _arg3:Number){
_zombiesInLove = [];
super();
x = _arg1;
y = _arg2;
rotation = _arg3;
sprite = SpriteBitmap.clips["trap_wall"][0];
Map.instance.addEventListener(Event.ENTER_FRAME, lookForZombie);
_currentRoom = getRoom(new Point(x, y));
}
override public function get bmd():BitmapData{
sprite.rotation = rotation;
return (sprite.bmd);
}
private function lookForZombie(_arg1:Event):void{
var _local2:Zombie;
if (Zombies.paused){
return;
};
for each (_local2 in _zombiesInLove) {
_health--;
};
if (_health <= 0){
for each (_local2 in _zombiesInLove) {
_local2.loves();
};
Map.instance.removeEventListener(Event.ENTER_FRAME, lookForZombie);
Trap.traps.splice(Trap.traps.indexOf(this), 1);
return;
};
for each (_local2 in Zombie.livingInstances) {
if (Math.sqrt((Math.pow((x - _local2.x), 2) + Math.pow((y - _local2.y), 2))) < 25){
_local2.loves(this);
_zombiesInLove.push(_local2);
};
};
}
private function getRoom(_arg1:Point):String{
var _local2:XML;
for each (_local2 in Map.instance.rooms) {
if ((((_arg1.x > _local2.@left)) && ((_arg1.x < _local2.@right)))){
if ((((_arg1.y > _local2.@top)) && ((_arg1.y < _local2.@bottom)))){
return (_local2.@name);
};
};
};
return ("none");
}
override public function placed():void{
_currentRoom = getRoom(new Point(x, y));
}
override public function dispose():void{
x = 0;
y = 0;
rotation = 0;
sprite = null;
Map.instance.removeEventListener(Event.ENTER_FRAME, lookForZombie);
_health = 0;
_curFrame = 0;
_zombiesInLove = null;
}
}
}//package org.hoah.zombies.traps
Section 133
//BuyButtonCover (org.hoah.zombies.ui.intermission.upgradeScreen.BuyButtonCover)
package org.hoah.zombies.ui.intermission.upgradeScreen {
import flash.events.*;
import flash.display.*;
public class BuyButtonCover extends MovieClip {
private var _enabled:Boolean;// = false
private var _totalCover:MovieClip;
private var _hidden:Boolean;// = false
public static const EVENT_PURCHASE:String = "purc";
public function BuyButtonCover(){
_totalCover = new MovieClip();
super();
graphics.beginFill(0xFF0000, 0.5);
graphics.moveTo(401, 251);
graphics.lineTo(539, 246);
graphics.lineTo(540, 298);
graphics.lineTo(403, 304);
graphics.lineTo(401, 251);
graphics.endFill();
_totalCover.graphics.beginFill(0x333333, 1);
_totalCover.graphics.drawRect(400, 243, 151, 72);
_totalCover.graphics.endFill();
alpha = 0;
buttonMode = true;
addEventListener(MouseEvent.CLICK, clicked);
}
private function clicked(_arg1:MouseEvent):void{
if (_enabled){
dispatchEvent(new Event(EVENT_PURCHASE));
};
}
override public function set enabled(_arg1:Boolean):void{
if (_arg1){
alpha = 0;
} else {
alpha = 1;
};
_enabled = _arg1;
}
public function show():void{
if (_hidden == false){
return;
};
_hidden = false;
removeChild(_totalCover);
buttonMode = true;
alpha = 1;
}
public function hide():void{
if (_hidden){
return;
};
_hidden = true;
addChild(_totalCover);
buttonMode = false;
alpha = 1;
}
}
}//package org.hoah.zombies.ui.intermission.upgradeScreen
Section 134
//PanelButton (org.hoah.zombies.ui.intermission.upgradeScreen.PanelButton)
package org.hoah.zombies.ui.intermission.upgradeScreen {
import flash.events.*;
import flash.display.*;
public class PanelButton extends MovieClip {
public var bmd:WeaponPanel;
public static var eventDispatcher:EventDispatcher = new EventDispatcher();
public function PanelButton(_arg1:int=0){
buttonMode = true;
bmd = new WeaponPanel(_arg1);
addChild(bmd.bitmap);
addEventListener(MouseEvent.MOUSE_OVER, highlight);
addEventListener(MouseEvent.CLICK, dispatch);
}
private function highlight(_arg1:Event):void{
bmd.highlighted = true;
addEventListener(MouseEvent.MOUSE_OUT, unhighlight);
}
private function dispatch(_arg1:MouseEvent):void{
eventDispatcher.dispatchEvent(new PanelClickEvent(this));
bmd.select();
}
private function unhighlight(_arg1:Event):void{
bmd.highlighted = false;
removeEventListener(MouseEvent.MOUSE_OUT, unhighlight);
}
public function dispose():void{
bmd.dispose();
}
}
}//package org.hoah.zombies.ui.intermission.upgradeScreen
Section 135
//PanelClickEvent (org.hoah.zombies.ui.intermission.upgradeScreen.PanelClickEvent)
package org.hoah.zombies.ui.intermission.upgradeScreen {
import flash.events.*;
public class PanelClickEvent extends Event {
public var button:PanelButton;
public static const CLICK:String = "click";
public function PanelClickEvent(_arg1:PanelButton){
super(CLICK, bubbles, cancelable);
button = _arg1;
}
}
}//package org.hoah.zombies.ui.intermission.upgradeScreen
Section 136
//Scroller (org.hoah.zombies.ui.intermission.upgradeScreen.Scroller)
package org.hoah.zombies.ui.intermission.upgradeScreen {
import flash.events.*;
import flash.display.*;
import org.hoah.Tweener.*;
public class Scroller extends MovieClip {
public var contentHeight:Number;// = 100
private var _value:Number;// = 0
private var startScrollOffset:Number;// = 0
public var componentHeight:Number;// = 500
public var componentWidth:Number;// = 18
public var backgroundColor:uint;// = 0x666666
public var foregroundColor:uint;// = 0xFFFFFF
private var startScrollValue:Number;// = 0
private var _max:Number;// = 1
public var middlegroundColor:uint;// = 16777147
public var buttonHeight:Number;// = 100
private var _scrollerLight:Boolean;// = false
public function Scroller(){
addEventListener(MouseEvent.ROLL_OVER, scrollerLight);
addEventListener(MouseEvent.ROLL_OUT, scrollerDark);
addEventListener(MouseEvent.MOUSE_DOWN, startScroll);
buttonMode = true;
}
public function set max(_arg1:Number):void{
_max = _arg1;
render();
}
public function get rawvalue():Number{
return (_value);
}
private function startScroll(_arg1:MouseEvent):void{
var _local3:Number;
var _local4:Number;
if (buttonHeight == (componentHeight - 4)){
return;
};
var _local2:Number = (_value * (componentHeight - (buttonHeight + 4)));
if ((((_arg1.localY > _local2)) && ((_arg1.localY < (_local2 + buttonHeight))))){
stage.addEventListener(MouseEvent.MOUSE_UP, endScroll);
stage.addEventListener(MouseEvent.MOUSE_MOVE, scrollUpdate);
startScrollValue = _value;
startScrollOffset = mouseY;
} else {
_local3 = (mouseY / (componentHeight - (buttonHeight + 4)));
_local4 = (buttonHeight / componentHeight);
_local3 = (_local3 - (_local4 / 2));
if (_local3 < 0){
_local3 = 0;
};
if (_local3 > 1){
_local3 = 1;
};
Tweener.addTween(this, {rawvalue:_local3, time:0.5});
};
}
private function endScroll(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_UP, endScroll);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, scrollUpdate);
}
public function set rawvalue(_arg1:Number):void{
_value = _arg1;
dispatchEvent(new Event(Event.CHANGE));
render();
}
public function render():void{
var _local2:Number;
graphics.clear();
if (componentHeight > contentHeight){
buttonHeight = (componentHeight - 4);
} else {
_local2 = (contentHeight / componentHeight);
buttonHeight = (componentHeight / _local2);
};
graphics.beginFill(backgroundColor);
graphics.drawRect(0, 0, componentWidth, componentHeight);
graphics.endFill();
graphics.lineStyle();
if (_scrollerLight){
graphics.beginFill(foregroundColor);
} else {
graphics.beginFill(middlegroundColor);
};
var _local1:Number = (_value * (componentHeight - (buttonHeight + 4)));
graphics.drawRect(1, (2 + _local1), (componentWidth - 2), buttonHeight);
graphics.endFill();
}
private function scrollerDark(_arg1:MouseEvent):void{
_scrollerLight = false;
render();
}
public function set value(_arg1:Number):void{
_value = (_arg1 / _max);
if (_value > 1){
_value = 1;
};
if (_value < 0){
_value = 0;
};
dispatchEvent(new Event(Event.CHANGE));
render();
}
public function get value():Number{
return ((_value * _max));
}
private function scrollUpdate(_arg1:MouseEvent):void{
var _local2:Number = ((mouseY - startScrollOffset) / (componentHeight - (buttonHeight + 4)));
_value = (startScrollValue + _local2);
if (_value < 0){
_value = 0;
};
if (_value > 1){
_value = 1;
};
dispatchEvent(new Event(Event.CHANGE));
render();
}
private function scrollerLight(_arg1:MouseEvent):void{
_scrollerLight = true;
render();
}
}
}//package org.hoah.zombies.ui.intermission.upgradeScreen
Section 137
//UpgradeIconButton (org.hoah.zombies.ui.intermission.upgradeScreen.UpgradeIconButton)
package org.hoah.zombies.ui.intermission.upgradeScreen {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.weapons.*;
import flash.filters.*;
public class UpgradeIconButton extends MovieClip {
public var owned:Boolean;// = false
public var index:int;// = 0
public var selected:Boolean;// = false
private static var selectedFilters:Array = [new GlowFilter(0xBB00, 0.5, 40, 40, 10, 1, true, true)];
public static var buttons:Array = [];
private static var highlightedFilters:Array = [new GlowFilter(0xFFFFFF, 1, 7, 7, 2, 1, true, true)];
public static var selectedButton:UpgradeIconButton;
private static var _weapon:Weapon = null;
public static var clickedFunction:Function = null;
public function UpgradeIconButton(_arg1:int){
buttons[_arg1] = this;
this.index = _arg1;
graphics.beginFill(0xFF00, 1);
alpha = 0;
graphics.drawRect(0, 0, 40, 40);
var _local2:Number = (((_arg1 % 5) * 43) + 369);
var _local3:Number = ((Math.floor((_arg1 / 5)) * 43) + 35);
x = _local2;
y = _local3;
buttonMode = true;
addEventListener(MouseEvent.MOUSE_OVER, highlight);
addEventListener(MouseEvent.CLICK, click);
}
private function unhighlight(_arg1:Event):void{
removeEventListener(MouseEvent.MOUSE_OUT, unhighlight);
if (selected){
return;
};
reset();
}
public function dispose():void{
removeEventListener(MouseEvent.MOUSE_OVER, highlight);
removeEventListener(MouseEvent.CLICK, click);
graphics.clear();
filters = [];
}
private function click(_arg1:MouseEvent):void{
if (_weapon == null){
return;
};
alpha = 1;
filters = selectedFilters;
if (selectedButton != null){
selectedButton.reset();
};
selectedButton = this;
selected = true;
clickedFunction(index);
}
public function reset():void{
if (selected){
selectedButton = null;
selected = false;
};
filters = [];
if (owned){
alpha = 0.1;
} else {
alpha = 0;
};
}
private function highlight(_arg1:MouseEvent):void{
if (owned){
return;
};
if (_weapon == null){
return;
};
if (selected){
return;
};
alpha = 1;
filters = highlightedFilters;
addEventListener(MouseEvent.MOUSE_OUT, unhighlight);
}
private function weaponUpdated():void{
if (_weapon == null){
owned = false;
} else {
owned = _weapon.currentUpgrades[index];
};
reset();
}
public static function dispose():void{
var _local1:UpgradeIconButton;
_weapon = null;
for each (_local1 in buttons) {
_local1.dispose();
};
buttons = [];
selectedButton = null;
clickedFunction = null;
}
public static function set weapon(_arg1:Weapon):void{
var _local2:UpgradeIconButton;
_weapon = _arg1;
for each (_local2 in buttons) {
_local2.weaponUpdated();
};
}
}
}//package org.hoah.zombies.ui.intermission.upgradeScreen
Section 138
//WeaponPanel (org.hoah.zombies.ui.intermission.upgradeScreen.WeaponPanel)
package org.hoah.zombies.ui.intermission.upgradeScreen {
import flash.display.*;
import org.hoah.zombies.*;
import flash.geom.*;
import org.hoah.zombies.weapons.*;
import flash.text.*;
public class WeaponPanel extends BitmapData {
public var image:String;// = ""
public var wepId:int;// = 0
public var name:String;// = "Weapon"
public var bitmap:Bitmap;
private var _highlighted:Boolean;// = false
public var selected:Boolean;// = false
private static var selectedPanel:WeaponPanel = null;
public function WeaponPanel(_arg1:int=0){
wepId = _arg1;
var _local2:Array = Weapons.builtInArray[_arg1];
name = _local2[0];
image = _local2[9];
super(285, 68, false, 0);
render();
bitmap = new Bitmap(this);
}
public function set highlighted(_arg1:Boolean):void{
_highlighted = _arg1;
render();
}
public function deselect():void{
selectedPanel = null;
selected = false;
render();
}
public function render():void{
var _local5:Boolean;
var _local6:String;
if (selected){
fillRect(new Rectangle(1, 1, (width - 2), (height - 2)), 16773205);
} else {
if (_highlighted){
fillRect(new Rectangle(1, 1, (width - 2), (height - 2)), 16777147);
} else {
fillRect(new Rectangle(1, 1, (width - 2), (height - 2)), 0xFFFFFF);
};
};
var _local1:Matrix = new Matrix(1, 0, 0, 1, 4, 4);
_local1.scale(0.6, 0.6);
draw(Assets[("wep_" + image)], _local1, null, null, null, true);
var _local2:TextField = new TextField();
_local1 = new Matrix(1, 0, 0, 1, 71, 5);
_local2.width = (width - 71);
_local2.embedFonts = true;
_local2.antiAliasType = AntiAliasType.NORMAL;
_local2.defaultTextFormat = new TextFormat("Viper Nora", 22, 0, null, null, null, null, null, TextFormatAlign.LEFT);
_local2.text = name;
draw(_local2, _local1, null, null, null, true);
var _local3:Weapon = Weapon.playersWeapons[wepId];
var _local4:int;
for each (_local5 in _local3.currentUpgrades) {
if (_local5){
_local4++;
};
};
_local1 = new Matrix(1, 0, 0, 1, 71, 35);
_local2.defaultTextFormat = new TextFormat("Viper Nora", 18, 0x333333, null, null, null, null, null, TextFormatAlign.LEFT);
_local6 = "s";
if (_local4 == 1){
_local6 = "";
};
_local2.text = (((_local4 + " Upgrade") + _local6) + " Fitted");
draw(_local2, _local1, null, null, null, true);
}
public function select():void{
if (selectedPanel != null){
selectedPanel.deselect();
};
selectedPanel = this;
selected = true;
render();
}
override public function dispose():void{
if (selected){
deselect();
};
super.dispose();
}
public static function dispose():void{
selectedPanel = null;
}
}
}//package org.hoah.zombies.ui.intermission.upgradeScreen
Section 139
//BuyWeaponsPanel (org.hoah.zombies.ui.intermission.BuyWeaponsPanel)
package org.hoah.zombies.ui.intermission {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.*;
import org.hoah.Tweener.*;
import org.hoah.zombies.ui.*;
import org.hoah.zombies.weapons.*;
import flash.text.*;
import flash.filters.*;
public class BuyWeaponsPanel extends Sprite {
private var weaponDescTextField:TextField;
private var curIm:Bitmap;// = null
private var _tabButton:MovieClip;
private var weaponTitleTextField:TextField;
private var buyNowSprite:Sprite;
private var costTextFormat:TextFormat;
private var curWeapon:int;// = 0
private static var _instance:BuyWeaponsPanel;
public function BuyWeaponsPanel(){
buyNowSprite = new Sprite();
weaponTitleTextField = new TextField();
weaponDescTextField = new TextField();
_tabButton = new MovieClip();
super();
_instance = this;
addChild(Assets.buyWeaponsScreenBitmap);
addChild(Assets.armourySelectorBitmap);
Assets.buyWeaponsScreenBitmap.smoothing = true;
Assets.armourySelectorBitmap.smoothing = true;
addEventListener(MouseEvent.CLICK, chooseWeapon);
Assets.armourySelectorBitmap.x = (285 - 10);
Assets.armourySelectorBitmap.y = (19 - 10);
weaponTitleTextField.x = 112;
weaponTitleTextField.y = 10;
weaponTitleTextField.width = 170;
weaponTitleTextField.height = 100;
weaponTitleTextField.embedFonts = true;
weaponTitleTextField.selectable = false;
weaponTitleTextField.filters = [new GlowFilter(0, 1, 12, 12, 2, 2)];
weaponTitleTextField.antiAliasType = AntiAliasType.NORMAL;
weaponTitleTextField.defaultTextFormat = new TextFormat("Viper Nora", 18, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.LEFT);
costTextFormat = new TextFormat("Viper Nora", 16, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.LEFT);
addChild(weaponTitleTextField);
weaponDescTextField.x = 12;
weaponDescTextField.y = 120;
weaponDescTextField.width = 270;
weaponDescTextField.height = 200;
weaponDescTextField.embedFonts = true;
weaponDescTextField.selectable = false;
weaponDescTextField.wordWrap = true;
weaponDescTextField.filters = [new GlowFilter(0, 1, 12, 12, 2, 2)];
weaponDescTextField.antiAliasType = AntiAliasType.NORMAL;
weaponDescTextField.defaultTextFormat = new TextFormat("Viper Nora", 18, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.LEFT);
costTextFormat = new TextFormat("Viper Nora", 16, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.LEFT);
addChild(weaponDescTextField);
buyNowSprite.addChild(Assets.buyNowButtonBitmap);
buyNowSprite.x = 120;
buyNowSprite.y = 65;
buyNowSprite.buttonMode = true;
buyNowSprite.addEventListener(MouseEvent.CLICK, buyCurrentWeapon);
addChild(buyNowSprite);
buyNowSprite.visible = false;
curIm = Assets[("wep_" + Weapons.builtInArray[0][9])];
weaponTitleTextField.text = Weapons.builtInArray[0][0];
weaponDescTextField.text = Weapons.descriptions[0];
weaponTitleTextField.appendText((("\nCost: " + NumberTools.format(Weapons.builtInArray[0][11])) + " pts"));
weaponTitleTextField.appendText("\n\n Purchased");
weaponTitleTextField.setTextFormat(costTextFormat, Weapons.builtInArray[0][0].length);
curIm.x = 9;
curIm.y = 9;
addChild(curIm);
Assets.closeButton.x = 600;
Assets.closeButton.y = -1;
addChild(Assets.closeButton);
_tabButton.buttonMode = true;
_tabButton.graphics.beginFill(0, 0);
_tabButton.graphics.drawRect(207, 309, 139, 33);
_tabButton.graphics.endFill();
_tabButton.addEventListener(MouseEvent.CLICK, hide);
addChild(_tabButton);
}
public function remove():void{
if (parent == null){
return;
};
parent.removeChild(this);
alpha = 1;
}
private function buyCurrentWeapon(_arg1:Event):void{
if (Player.points < Weapons.builtInArray[curWeapon][11]){
buyNowSprite.visible = false;
weaponTitleTextField.appendText("\n\n Cannot afford");
return;
};
if (Weapons.builtInArray[curWeapon][13] == true){
if (GamerSafe.hasWeapons == false){
GamerSafe.api.purchaseItemInterface(GamerSafeConstants.ITEM_PRO_WEAPONS_PACK);
return;
};
};
UserInterface.spendPoints(Weapons.builtInArray[curWeapon][11]);
buyNowSprite.visible = false;
new Weapon(Map.instance.stage, curWeapon);
Weapon.ownedWeapons.push(curWeapon);
Player.setWeapon(curWeapon);
weaponTitleTextField.appendText("\n\n Purchased");
}
private function chooseWeapon(_arg1:MouseEvent):void{
if ((((mouseX > 600)) && ((mouseX < (600 + 25))))){
if (mouseY < 25){
hide();
return;
};
};
if ((((mouseX < 285)) || ((mouseY < 19)))){
return;
};
if ((((mouseX > 630)) || ((mouseY > 295)))){
return;
};
var _local2:int = (mouseX - 285);
var _local3:int = (mouseY - 19);
_local2 = Math.floor((_local2 / 69));
_local3 = Math.floor((_local3 / 69));
Assets.armourySelectorBitmap.x = ((285 + (_local2 * 69)) - 10);
Assets.armourySelectorBitmap.y = ((19 + (_local3 * 69)) - 10);
var _local4:int = ((_local2 * 4) + _local3);
removeChild(curIm);
curIm = Assets[("wep_" + Weapons.builtInArray[_local4][9])];
weaponTitleTextField.text = Weapons.builtInArray[_local4][0];
weaponDescTextField.text = Weapons.descriptions[_local4];
weaponTitleTextField.appendText((("\nCost: " + NumberTools.format(Weapons.builtInArray[_local4][11])) + " pts"));
weaponTitleTextField.setTextFormat(costTextFormat, Weapons.builtInArray[_local4][0].length, weaponTitleTextField.text.length);
curIm.x = 9;
curIm.y = 9;
addChild(curIm);
curWeapon = _local4;
if ((((Player.points < Weapons.builtInArray[_local4][11])) && ((Weapon.ownedWeapons.indexOf(_local4) == -1)))){
buyNowSprite.visible = false;
weaponTitleTextField.appendText("\n\n Cannot afford");
} else {
if (Weapon.ownedWeapons.indexOf(_local4) == -1){
buyNowSprite.visible = true;
} else {
buyNowSprite.visible = false;
weaponTitleTextField.appendText("\n\n Purchased");
};
};
}
public function hide(_arg1:Event=null):void{
TopMenu.instance.showBackground();
Tweener.removeTweens(this);
Tweener.addTween(this, {y:(-(Assets.buyWeaponsScreenBitmap.height) + 40), time:0.4});
Tweener.addTween(this, {alpha:0.1, time:0.2, delay:0.4, transition:"linear", onComplete:remove});
}
public function show():void{
alpha = 1;
if (parent == null){
UserInterface.instance.addChild(this);
};
x = 0;
y = (-(Assets.buyWeaponsScreenBitmap.height) + 45);
Tweener.addTween(this, {y:0, time:1});
}
public static function get instance():BuyWeaponsPanel{
if (_instance == null){
new (BuyWeaponsPanel);
};
return (_instance);
}
public static function dispose():void{
if (_instance == null){
return;
};
var _local2 = _instance;
with (_local2) {
while (numChildren > 0) {
removeChildAt(0);
};
removeEventListener(MouseEvent.CLICK, chooseWeapon);
buyNowSprite.removeEventListener(MouseEvent.CLICK, buyCurrentWeapon);
};
_instance = null;
}
}
}//package org.hoah.zombies.ui.intermission
Section 140
//TopMenu (org.hoah.zombies.ui.intermission.TopMenu)
package org.hoah.zombies.ui.intermission {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.*;
import org.hoah.Tweener.*;
import flash.net.*;
public class TopMenu extends MovieClip {
private var sponsorButton:MovieClip;
private var weaponButton:MovieClip;
private var upgradeButton:MovieClip;
private var trapButton:MovieClip;
private static const intermissionLogo:BitmapData = new _intermissionCls().bitmapData;
private static const _intermissionCls:Class = TopMenu__intermissionCls;
private static var _instance:TopMenu;
public function TopMenu(){
trapButton = new MovieClip();
weaponButton = new MovieClip();
upgradeButton = new MovieClip();
sponsorButton = new MovieClip();
super();
_instance = this;
addChild(Assets.buyButtons);
trapButton.buttonMode = true;
weaponButton.buttonMode = true;
upgradeButton.buttonMode = true;
sponsorButton.buttonMode = true;
trapButton.graphics.beginFill(0, 0);
weaponButton.graphics.beginFill(0, 0);
upgradeButton.graphics.beginFill(0, 0);
sponsorButton.graphics.beginBitmapFill(intermissionLogo);
trapButton.graphics.drawRect(10, 0, 132, 34);
weaponButton.graphics.drawRect(201, 0, 171, 34);
upgradeButton.graphics.drawRect(414, 0, 223, 34);
sponsorButton.graphics.drawRect(0, 0, intermissionLogo.width, intermissionLogo.height);
trapButton.graphics.endFill();
weaponButton.graphics.endFill();
upgradeButton.graphics.endFill();
sponsorButton.graphics.endFill();
trapButton.addEventListener(MouseEvent.CLICK, showTraps);
weaponButton.addEventListener(MouseEvent.CLICK, showWeapons);
upgradeButton.addEventListener(MouseEvent.CLICK, showUpgrades);
sponsorButton.addEventListener(MouseEvent.CLICK, gotoSponsor);
addChild(trapButton);
addChild(weaponButton);
addChild(upgradeButton);
sponsorButton.x = (640 - 270);
sponsorButton.y = 50;
}
public function hide():void{
Tweener.removeTweens(this);
Tweener.addTween(this, {y:-(Assets.buyButtons.height), time:1, onComplete:remove});
}
public function remove():void{
if (parent == null){
return;
};
parent.removeChild(this);
}
private function showTraps(_arg1:Event):void{
GamerSafe.api.showStatusBar();
TrapsPanel.instance.show();
}
public function showBackground():void{
GamerSafe.api.hideStatusBar();
}
private function hideBackground():void{
}
private function showUpgrades(_arg1:Event):void{
GamerSafe.api.showStatusBar();
WeaponsUpgradePanel.instance.show();
hideBackground();
Tweener.addTween(sponsorButton, {y:350, time:1});
}
private function gotoSponsor(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.arcadebomb.com/"));
}
private function showWeapons(_arg1:Event):void{
GamerSafe.api.showStatusBar();
BuyWeaponsPanel.instance.show();
hideBackground();
Tweener.addTween(sponsorButton, {y:350, time:1});
}
public function show():void{
if (parent == null){
UserInterface.instance.addChild(this);
};
x = 0;
y = -(Assets.buyButtons.height);
Tweener.addTween(this, {y:0, time:1});
GamerSafe.api.hideStatusBar();
}
public static function get instance():TopMenu{
if (_instance == null){
new (TopMenu);
};
return (_instance);
}
public static function dispose():void{
if (_instance == null){
return;
};
var _local2 = _instance;
with (_local2) {
while (numChildren > 0) {
removeChildAt(0);
};
trapButton.removeEventListener(MouseEvent.CLICK, showTraps);
weaponButton.removeEventListener(MouseEvent.CLICK, showWeapons);
upgradeButton.removeEventListener(MouseEvent.CLICK, showUpgrades);
};
_instance = null;
}
}
}//package org.hoah.zombies.ui.intermission
Section 141
//TopMenu__intermissionCls (org.hoah.zombies.ui.intermission.TopMenu__intermissionCls)
package org.hoah.zombies.ui.intermission {
import mx.core.*;
public class TopMenu__intermissionCls extends BitmapAsset {
}
}//package org.hoah.zombies.ui.intermission
Section 142
//TrapsPanel (org.hoah.zombies.ui.intermission.TrapsPanel)
package org.hoah.zombies.ui.intermission {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.*;
import org.hoah.zombies.traps.*;
import org.hoah.Tweener.*;
import org.hoah.zombies.ui.*;
import flash.text.*;
public class TrapsPanel extends MovieClip {
public var buttons:Array;
private var titleField:TextField;
private var closeButton:MovieClip;
public var placingTrap:Boolean;// = false
private var cancelCover:MovieClip;
private var descriptionField:TextField;
private var cancelField:TextField;
private var traps:Array;
private var _tabButton:MovieClip;
private static var _instance:TrapsPanel;
public function TrapsPanel(){
var _local2:MovieClip;
traps = [["Chomper", "This trap will chomp any zombie who steps on it! It will do a moderate amount of damage, and it will severely slow the zombie down. They're so cute with no feet.", 10000, false, "trap_chomper", TrapChomper], ["Barricade", "A cheap wooden barricade, complete with razer wire! Delays zombies whilst they try to break through it. Dumb zombies.", 1000, false, "trap_barrier", TrapBarrier], ["Mine Placer", "This device will magically drop a mine every 30 seconds. The mine will explode when a zombie steps on it, causing a blast loud enough to wake the dead. Hey, wait..", 15000, false, "trap_small_mine", TrapMine], ["Teddy Bear", "Zombies love watching this funny teddy bear dance, Until it explodes! This bear will lure zombies to it, then explode! Isn't he cute, I could jus*BOOM*.", 40000, false, "trap_bear", TrapBear], ["Oil Slick", "A cheap and effective way of slowing zombies down. The oil eventually dries up. May contain nuts.", 2000, true, "trap_oil", TrapOil], ["Frag Mine", "This arcane relic will drop a fragmentation mine every thirty seconds. To your surprise, it will explode when stepped on, spitting deadly shrapnel in all directions.", 35000, true, "trap_frag_mine", TrapFragMine], ["Metal Wall", "If the living dead can be summed up in one word, you might call them 'persistent'. With many zombies and enough time, even this metal barrier will fall.", 40000, true, "trap_wall", TrapWall], ["Sentry Gun", "Developed by our friends at Skynet, this friendly home defense option will not turn on you and murder your family, we guarantee.", 150000, true, "trap_sentry", TrapSentry]];
titleField = new TextField();
descriptionField = new TextField();
cancelCover = new MovieClip();
cancelField = new TextField();
buttons = [];
_tabButton = new MovieClip();
super();
_instance = this;
closeButton = new MovieClip();
closeButton.graphics.beginFill(0, 0);
closeButton.graphics.drawRect(0, 0, 25, 25);
closeButton.graphics.endFill();
closeButton.x = 600;
closeButton.y = 1;
closeButton.buttonMode = true;
closeButton.addEventListener(MouseEvent.CLICK, closePanel);
addChild(Assets.trapsPanel);
addChild(closeButton);
titleField.x = 354;
titleField.y = 6;
titleField.width = 200;
titleField.height = 30;
titleField.embedFonts = true;
titleField.selectable = false;
titleField.antiAliasType = AntiAliasType.NORMAL;
titleField.defaultTextFormat = new TextFormat("Viper Nora", 18, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.LEFT);
addChild(titleField);
descriptionField.x = 354;
descriptionField.y = 30;
descriptionField.width = 270;
descriptionField.height = 130;
descriptionField.embedFonts = true;
descriptionField.selectable = false;
descriptionField.wordWrap = true;
descriptionField.antiAliasType = AntiAliasType.NORMAL;
descriptionField.defaultTextFormat = new TextFormat("Viper Nora", 14, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.LEFT);
addChild(descriptionField);
cancelField.x = 6;
cancelField.y = 100;
cancelField.width = 329;
cancelField.height = 80;
cancelField.embedFonts = true;
cancelField.selectable = false;
cancelField.wordWrap = true;
cancelField.antiAliasType = AntiAliasType.NORMAL;
cancelField.defaultTextFormat = new TextFormat("Viper Nora", 18, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.CENTER);
cancelCover.addChild(cancelField);
cancelField.text = "Placing Chomper.\nClick here to cancel.";
cancelCover.graphics.beginFill(0, 0.75);
cancelCover.graphics.drawRect(20, 6, 329, 148);
cancelCover.graphics.endFill();
cancelCover.visible = false;
var _local1:int;
while (_local1 < 8) {
_local2 = new MovieClip();
_local2.buttonMode = true;
_local2.x = (37 + (83 * (_local1 % 4)));
_local2.y = (12 + (75 * Math.floor((_local1 / 4))));
_local2.graphics.beginFill(0, 0);
_local2.graphics.drawRect(0, 0, 60, 60);
_local2.graphics.endFill();
_local2.name = _local1.toString();
_local2.addEventListener(MouseEvent.MOUSE_OVER, highlightTrap);
_local2.addEventListener(MouseEvent.CLICK, clickTrap);
buttons.push(_local2);
addChild(_local2);
_local1++;
};
_tabButton.buttonMode = true;
_tabButton.graphics.beginFill(0, 0);
_tabButton.graphics.drawRect(8, 162, 139, 33);
_tabButton.graphics.endFill();
_tabButton.addEventListener(MouseEvent.CLICK, closePanel);
addChild(_tabButton);
addChild(cancelCover);
}
private function highlightTrap(_arg1:MouseEvent):void{
if (placingTrap){
return;
};
titleField.text = traps[_arg1.currentTarget.name][0];
var _local2 = (((traps[_arg1.currentTarget.name][1] + "\n\nCost ") + NumberTools.format(traps[_arg1.currentTarget.name][2], 0)) + " points. (Click to place)");
descriptionField.text = _local2;
}
public function remove():void{
if (parent == null){
return;
};
parent.removeChild(this);
alpha = 1;
}
private function clickTrap(_arg1:MouseEvent):void{
var _local2:int = traps[_arg1.currentTarget.name][2];
var _local3:Boolean = traps[_arg1.currentTarget.name][3];
if (((_local3) && ((GamerSafe.hasTraps == false)))){
GamerSafe.api.purchaseItemInterface(GamerSafeConstants.ITEM_TRAPS_PACK);
return;
};
if (Player.points >= _local2){
cancelField.text = (("Placing " + traps[_arg1.currentTarget.name][0]) + ".\nClick here to cancel.");
cancelCover.visible = true;
Map.instance.placeTrap(SpriteBitmap.clips[traps[_arg1.currentTarget.name][4]][0], traps[_arg1.currentTarget.name][5], _local2);
placingTrap = true;
_arg1.stopImmediatePropagation();
_arg1.stopPropagation();
addEventListener(MouseEvent.CLICK, cancelPlace);
Map.instance.addEventListener("placed", placeEnded);
contract();
};
}
public function contract():void{
Tweener.removeTweens(this);
Tweener.addTween(this, {y:(-(Assets.trapsPanel.height) + 100), time:0.5});
}
public function expand():void{
Tweener.removeTweens(this);
Tweener.addTween(this, {y:0, time:0.5});
}
public function hide():void{
Tweener.removeTweens(this);
Tweener.addTween(this, {y:(-(Assets.trapsPanel.height) + 40), time:0.4});
Tweener.addTween(this, {alpha:0.1, time:0.2, delay:0.4, transition:"linear", onComplete:remove});
}
private function closePanel(_arg1:Event):void{
hide();
}
private function cancelPlace(_arg1:Event):void{
placingTrap = false;
cancelCover.visible = false;
Map.instance.cancelPlaceTrap();
expand();
}
private function placeEnded(_arg1:Event):void{
removeEventListener(MouseEvent.CLICK, cancelPlace);
removeEventListener("placed", placeEnded);
placingTrap = false;
cancelCover.visible = false;
expand();
}
public function show():void{
alpha = 1;
if (parent == null){
UserInterface.instance.addChild(this);
};
x = 0;
y = (-(Assets.trapsPanel.height) + 45);
Tweener.addTween(this, {y:0, time:1});
}
public static function get instance():TrapsPanel{
if (_instance == null){
new (TrapsPanel);
};
return (_instance);
}
public static function dispose():void{
var b:*;
if (_instance == null){
return;
};
var _local2 = _instance;
with (_local2) {
while (numChildren > 0) {
removeChildAt(0);
};
closeButton.removeEventListener(MouseEvent.CLICK, closePanel);
removeEventListener(MouseEvent.CLICK, cancelPlace);
for each (b in buttons) {
b.addEventListener(MouseEvent.MOUSE_OVER, highlightTrap);
b.addEventListener(MouseEvent.CLICK, clickTrap);
};
buttons = [];
};
_instance = null;
}
}
}//package org.hoah.zombies.ui.intermission
Section 143
//WeaponsUpgradePanel (org.hoah.zombies.ui.intermission.WeaponsUpgradePanel)
package org.hoah.zombies.ui.intermission {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.*;
import org.hoah.Tweener.*;
import org.hoah.zombies.ui.intermission.upgradeScreen.*;
import org.hoah.zombies.ui.*;
import org.hoah.zombies.weapons.*;
import flash.text.*;
public class WeaponsUpgradePanel extends Sprite {
private var _tabButton:MovieClip;
private var buttons:Array;
private var scrollBar:Scroller;
private var selectedUpgrade:int;// = -1
private var closeButton:MovieClip;
private var selectedWeapon:Weapon;// = null
private var buyButton:BuyButtonCover;
private var scrollMask:Sprite;
private var selectedButton:MovieClip;
private var panels:Array;
private var descPanel:TextField;
private var panelClip:MovieClip;
private var costPanel:TextField;
private var namePanel:TextField;
private static var _instance:WeaponsUpgradePanel;
public function WeaponsUpgradePanel(){
var _local3:String;
var _local4:UpgradeIconButton;
panelClip = new MovieClip();
panels = [];
scrollBar = new Scroller();
scrollMask = new Sprite();
buttons = [];
buyButton = new BuyButtonCover();
_tabButton = new MovieClip();
super();
_instance = this;
closeButton = new MovieClip();
closeButton.graphics.beginFill(0, 0);
closeButton.graphics.drawRect(0, 0, 25, 25);
closeButton.graphics.endFill();
closeButton.x = 611;
closeButton.y = 1;
closeButton.buttonMode = true;
closeButton.addEventListener(MouseEvent.CLICK, closePanel);
addChild(Assets.upgradeWeapons);
addChild(closeButton);
var _local1:Array = ["Grip", "Laser", "Reload", "FastShots", "Tracers", "Mame", "Explosive", "Penetration", "DoubleShot", "SilverBullets"];
var _local2:int;
for each (_local3 in _local1) {
_local4 = new UpgradeIconButton(_local2);
buttons.push(_local4);
addChild(_local4);
_local2++;
};
PanelButton.eventDispatcher.addEventListener(PanelClickEvent.CLICK, panelClicked);
addChild(panelClip);
panelClip.x = 8;
panelClip.y = 9;
scrollBar.componentWidth = 14;
scrollBar.componentHeight = 273;
scrollBar.x = 293;
scrollBar.y = 10;
scrollBar.render();
scrollMask.graphics.beginFill(0, 1);
scrollMask.graphics.drawRect(8, 9, 300, 275);
scrollMask.graphics.endFill();
scrollBar.addEventListener(Event.CHANGE, updateScroll);
addChild(scrollBar);
addChild(scrollMask);
panelClip.mask = scrollMask;
namePanel = new TextField();
namePanel.width = 300;
namePanel.height = 25;
namePanel.x = 310;
namePanel.y = 6;
namePanel.embedFonts = true;
namePanel.antiAliasType = AntiAliasType.NORMAL;
namePanel.defaultTextFormat = new TextFormat("Viper Nora", 22, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER);
namePanel.text = "";
namePanel.selectable = false;
addChild(namePanel);
descPanel = new TextField();
descPanel.width = 300;
descPanel.height = 100;
descPanel.x = 310;
descPanel.y = 122;
descPanel.embedFonts = true;
descPanel.wordWrap = true;
descPanel.antiAliasType = AntiAliasType.NORMAL;
descPanel.selectable = false;
descPanel.defaultTextFormat = new TextFormat("Viper Nora", 15, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT);
descPanel.text = "";
addChild(descPanel);
costPanel = new TextField();
costPanel.width = 300;
costPanel.height = 25;
costPanel.x = 310;
costPanel.y = 219;
costPanel.embedFonts = true;
costPanel.wordWrap = true;
costPanel.antiAliasType = AntiAliasType.NORMAL;
costPanel.selectable = false;
costPanel.defaultTextFormat = new TextFormat("Viper Nora", 15, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT);
costPanel.text = "";
addChild(costPanel);
addChild(buyButton);
buyButton.hide();
buyButton.addEventListener(BuyButtonCover.EVENT_PURCHASE, doPurchase);
UpgradeIconButton.clickedFunction = upgradeIconClicked;
updateWeaponPanels();
_tabButton.buttonMode = true;
_tabButton.graphics.beginFill(0, 0);
_tabButton.graphics.drawRect(422, 315, 139, 33);
_tabButton.graphics.endFill();
_tabButton.addEventListener(MouseEvent.CLICK, hide);
addChild(_tabButton);
}
private function panelClicked(_arg1:PanelClickEvent):void{
selectedWeapon = Weapon.playersWeapons[_arg1.button.bmd.wepId];
UpgradeIconButton.weapon = selectedWeapon;
namePanel.text = Weapons.builtInArray[selectedWeapon.id][0];
descPanel.text = "";
costPanel.text = "";
selectedUpgrade = -1;
buyButton.hide();
}
public function remove():void{
if (parent == null){
return;
};
parent.removeChild(this);
alpha = 1;
}
public function hide(_arg1:Event=null):void{
TopMenu.instance.showBackground();
Tweener.removeTweens(this);
Tweener.addTween(this, {y:(-(Assets.upgradeWeapons.height) + 35), time:0.4});
Tweener.addTween(this, {alpha:0.1, time:0.2, delay:0.4, transition:"linear", onComplete:remove});
}
private function updateWeaponPanels():void{
var _local2:Weapon;
var _local3:PanelButton;
var _local4:PanelButton;
UpgradeIconButton.weapon = null;
while (panelClip.numChildren > 0) {
_local3 = (panelClip.getChildAt(0) as PanelButton);
_local3.dispose();
panelClip.removeChildAt(0);
};
panels = [];
var _local1:int;
for each (_local2 in Weapon.playersWeapons) {
_local4 = new PanelButton(_local2.id);
_local4.y = _local1;
_local1 = (_local1 + _local4.bmd.height);
panelClip.addChild(_local4);
};
scrollBar.contentHeight = _local1;
scrollBar.render();
}
private function renderWeaponPanels():void{
var _local2:PanelButton;
var _local1:int;
while (_local1 < panelClip.numChildren) {
_local2 = (panelClip.getChildAt(_local1) as PanelButton);
_local2.bmd.render();
_local1++;
};
}
private function upgradeIconClicked(_arg1:int):void{
descPanel.text = ((Weapon.upgrades[_arg1].name + ": ") + Weapon.upgrades[_arg1].description);
buyButton.show();
selectedUpgrade = _arg1;
if (((Weapon.upgrades[_arg1].pack) && ((GamerSafe.hasUpgrades == false)))){
costPanel.text = "Requires traps pack";
buyButton.enabled = true;
} else {
costPanel.text = (("Cost: " + NumberTools.format(Weapon.upgrades[_arg1].cost, 0)) + " points");
buyButton.enabled = true;
if (Player.points < Weapon.upgrades[_arg1].cost){
buyButton.enabled = false;
};
};
if (selectedWeapon.currentUpgrades[_arg1]){
buyButton.hide();
return;
};
}
private function doPurchase(_arg1:Event):void{
if (((Weapon.upgrades[selectedUpgrade].pack) && ((GamerSafe.hasUpgrades == false)))){
GamerSafe.api.purchaseItemInterface(GamerSafeConstants.ITEM_WEAPON_UPGRADES);
} else {
if (Player.points < Weapon.upgrades[selectedUpgrade].cost){
buyButton.enabled = false;
} else {
UserInterface.spendPoints(Weapon.upgrades[selectedUpgrade].cost);
selectedWeapon.setUpgrade(Weapon.upgrades[selectedUpgrade].variable, true);
buyButton.hide();
UpgradeIconButton.weapon = selectedWeapon;
renderWeaponPanels();
};
};
}
private function updateScroll(_arg1:Event):void{
panelClip.y = (9 - (scrollBar.value * (scrollBar.contentHeight - 275)));
}
private function closePanel(_arg1:Event):void{
hide();
}
public function show():void{
alpha = 1;
if (parent == null){
UserInterface.instance.addChild(this);
};
x = 0;
y = (-(Assets.upgradeWeapons.height) + 45);
Tweener.addTween(this, {y:0, time:1});
updateWeaponPanels();
}
public static function get instance():WeaponsUpgradePanel{
if (_instance == null){
new (WeaponsUpgradePanel);
};
return (_instance);
}
public static function dispose():void{
if (_instance == null){
return;
};
var _local2 = _instance;
with (_local2) {
closeButton.removeEventListener(MouseEvent.CLICK, closePanel);
PanelButton.eventDispatcher.removeEventListener(PanelClickEvent.CLICK, panelClicked);
scrollBar.removeEventListener(Event.CHANGE, updateScroll);
buyButton.removeEventListener(BuyButtonCover.EVENT_PURCHASE, doPurchase);
while (numChildren > 0) {
removeChildAt(0);
};
};
_instance = null;
}
}
}//package org.hoah.zombies.ui.intermission
Section 144
//HSlider (org.hoah.zombies.ui.options.HSlider)
package org.hoah.zombies.ui.options {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.*;
public class HSlider extends MovieClip {
private var max:int;// = 10
private var cur:int;// = 10
public function HSlider(_arg1:int=10){
this.max = _arg1;
this.value = _arg1;
render();
addEventListener(MouseEvent.MOUSE_DOWN, startSlide);
}
public function get value():int{
return (cur);
}
public function set value(_arg1:int):void{
if (_arg1 > max){
_arg1 = max;
};
if (_arg1 < 0){
_arg1 = 0;
};
cur = _arg1;
render();
}
private function endSlide(_arg1:Event):void{
stage.removeEventListener(MouseEvent.MOUSE_UP, endSlide);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, updateSlide);
}
private function updateSlide(_arg1:Event):void{
var _local2:int = Math.round(((mouseX / 180) * max));
if (_local2 != cur){
value = _local2;
dispatchEvent(new Event(Event.CHANGE));
};
}
private function render():void{
graphics.clear();
graphics.beginFill(0xCCCCCC);
graphics.lineStyle(1, 0x666666);
graphics.drawRect(0, 0, 180, 19);
graphics.endFill();
graphics.lineStyle();
graphics.beginBitmapFill(Assets["healthBar"].bitmapData);
graphics.drawRect(1, 1, ((178 / max) * cur), 17);
graphics.endFill();
}
private function startSlide(_arg1:Event):void{
stage.addEventListener(MouseEvent.MOUSE_UP, endSlide);
stage.addEventListener(MouseEvent.MOUSE_MOVE, updateSlide);
}
}
}//package org.hoah.zombies.ui.options
Section 145
//AddedPointsText (org.hoah.zombies.ui.AddedPointsText)
package org.hoah.zombies.ui {
import org.hoah.Tweener.*;
import flash.text.*;
public class AddedPointsText extends TextField {
public function AddedPointsText(_arg1:int=0){
width = 100;
height = 30;
embedFonts = true;
selectable = false;
antiAliasType = AntiAliasType.ADVANCED;
var _local2:uint = 0xFFFF00;
if (_arg1 < 0){
_local2 = 0xFF0000;
};
defaultTextFormat = new TextFormat("Viper Nora", 11, _local2, true, null, null, null, null, TextFormatAlign.LEFT);
x = 610;
y = 420;
Tweener.addTween(this, {x:(x - (Math.random() * 50)), y:(y - (Math.random() * 50)), time:0.7});
Tweener.addTween(this, {alpha:0, time:0.2, delay:0.5, onComplete:dispose});
if (_arg1 > 0){
text = "+";
};
appendText(_arg1.toString());
}
private function dispose():void{
parent.removeChild(this);
text = "";
}
}
}//package org.hoah.zombies.ui
Section 146
//Credits (org.hoah.zombies.ui.Credits)
package org.hoah.zombies.ui {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.menu.*;
import org.hoah.zombies.*;
import org.hoah.Tweener.*;
import flash.text.*;
import flash.filters.*;
public class Credits extends Sprite {
private var scrollArea:MovieClip;
public var sponsorLogo:SponsorLogo;
private var scrollAreaMask:MovieClip;
private var returnLink:TextButton;
private var tf:TextField;
private var credits:Array;
public function Credits(){
scrollArea = new MovieClip();
scrollAreaMask = new MovieClip();
tf = new TextField();
returnLink = new TextButton("Return to Menu", 400, 450);
credits = ["<font size='32'>Sponsorship</font>", "<img src='org.hoah.zombies.ui.SponsorLogo' id='sponsorLogo' />", "", "", "", "", "", "", "", "<font size='32'>Concept, Design and Development</font>", "Luke Mitchell", "Hoah Gaming : <font color='#FFFF00'><a href='http://www.hoah.org' target='_blank'>Hoah.org</a></font>", "", "", "", "<font size='32'>Art</font>", "<font color='#FFFF00'><a href='http://vga-dragonfly.deviantart.com' target='_blank'>Veronica Godoy</a></font>", "<font color='#FFFF00'><a href='http://www.hoah.org' target='_blank'>Luke Mitchell</a></font>", "", "", "", "<font size='32'>Music</font>", "<font size='18'>A Gun's A Girl's Best Friend (Game Over Theme): <font color='#FFFF00'><a href='http://www.gelflingproductions.com' target='_blank'>Will Vaughan</a></font></font>", "<font size='18'>Brain Stain (Menu Theme): <font color='#FFFF00'><a href='http://www.gelflingproductions.com' target='_blank'>Will Vaughan</a></font></font>", "<font size='18'>Eating David Cameron (Ambience): <font color='#FFFF00'><a href='http://www.gelflingproductions.com' target='_blank'>Will Vaughan</a></font></font>", "<font size='14'>Special Thanks: <font color='#FFFF00'><a href='http://www.gelflingproductions.com' target='_blank'>GelflingProductions.com</a></font></font>", "", "", "", "<font size='32'>Voice Acting</font>", "Ella: <font color='#FFFF00'><a href='http://www.sarahelmaleh.com' target='_blank'>Sarah Elmaleh</a></font>", "Mimi: <font color='#FFFF00'><a href='http://voice123.com/kerrikane' target='_blank'>Kerri Kane</a></font>", "Zombies: Luke Mitchell", "<font size='14' color='#FFFF00'><a href='http://voice123.com/' target='_blank'>Voice123.com</a></font>", "", "", "", "<font size='32'>Special Thanks</font>", "All of the team", "<font size='15' color='#FFFF00'><a href='http://www.flashgamelicense.com' target='_blank'>From FlashGameLicense.com</a></font>", "", "<font size='32'>GamerSafe</font>", "<font size='15' color='#FFFF00'><a href='http://www.gamersafe.com' target='_blank'>Your gaming life centralised</a></font>", "", ""];
addChild(Assets.creditsBackground);
super();
scrollArea.mask = scrollAreaMask;
scrollAreaMask.graphics.beginFill(0, 1);
scrollAreaMask.graphics.moveTo(0, 135);
scrollAreaMask.graphics.lineTo(640, 101);
scrollAreaMask.graphics.lineTo(640, 381);
scrollAreaMask.graphics.lineTo(0, 416);
scrollAreaMask.graphics.lineTo(0, 135);
addChild(scrollArea);
scrollArea.addChild(tf);
tf.width = 640;
tf.height = 1000;
tf.embedFonts = true;
tf.selectable = false;
tf.antiAliasType = AntiAliasType.NORMAL;
tf.defaultTextFormat = new TextFormat("Viper Nora", 22, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.CENTER);
tf.filters = [new GlowFilter(0, 0.5, 25, 25, 4, 1)];
tf.htmlText = credits.join("\n");
tf.height = tf.textHeight;
tf.y = 200;
Tweener.addTween(tf, {y:-(tf.height), time:40, transition:"linear", delay:2, onComplete:reset});
addChild(returnLink);
returnLink.addEventListener(MouseEvent.CLICK, returnToMenu);
}
public function reset():void{
tf.y = 640;
Tweener.addTween(tf, {y:-(tf.height), time:40, transition:"linear", onComplete:reset});
}
private function returnToMenu(_arg1:Event):void{
dispatchEvent(new Event(Event.CLOSE));
}
public function dispose():void{
removeChild(Assets.creditsBackground);
removeChild(scrollArea);
scrollArea.graphics.clear();
scrollAreaMask.graphics.clear();
scrollArea.removeChild(tf);
tf.text = "";
tf.filters = [];
tf.htmlText = "";
tf.width = 0;
tf.height = 0;
tf = null;
removeChild(returnLink);
returnLink.removeEventListener(MouseEvent.CLICK, returnToMenu);
returnLink.dispose();
returnLink = null;
}
}
}//package org.hoah.zombies.ui
Section 147
//ExtrasHoahScript (org.hoah.zombies.ui.ExtrasHoahScript)
package org.hoah.zombies.ui {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class ExtrasHoahScript {
private var _loader:URLLoader;
public var loaded:Boolean;// = false
public var images:Array;
private var _data:ByteArray;
public var onLoadComplete:Function;// = null
public function ExtrasHoahScript(_arg1:String){
images = [];
_loader = new URLLoader();
super();
_loader.dataFormat = URLLoaderDataFormat.BINARY;
_loader.addEventListener(Event.COMPLETE, fileLoaded);
_loader.load(new URLRequest((_arg1 + "?cacheBuster")));
}
private function fileLoaded(_arg1:Event):void{
var e = _arg1;
_data = _loader.data;
try {
_data.uncompress();
_data.position = 0;
while (_data.bytesAvailable) {
images.push(new ExtrasImage(_data));
};
} catch(e:Event) {
trace("HoahScript parse error.");
};
if (onLoadComplete != null){
onLoadComplete();
};
}
}
}//package org.hoah.zombies.ui
Section 148
//ExtrasImage (org.hoah.zombies.ui.ExtrasImage)
package org.hoah.zombies.ui {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.Tweener.*;
import flash.net.*;
import flash.filters.*;
public class ExtrasImage extends MovieClip {
private var _loader:Loader;
public var imageWidth:Number;// = 400
private var url:String;// = "http://hoah.org/remote/notc/missing.jpg"
public function ExtrasImage(_arg1:ByteArray=null){
var ba = _arg1;
_loader = new Loader();
super();
if (ba != null){
try {
url = ba.readUTF();
imageWidth = ba.readShort();
} catch(e:Event) {
};
};
addChild(_loader);
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, smoothImage);
_loader.load(new URLRequest(url));
graphics.beginFill(0, 0.5);
graphics.drawRect(0, 0, imageWidth, 460);
graphics.endFill();
filters = [new GlowFilter(0, 1, 6, 6, 2, 1, false, false)];
fadeOut();
}
public function fadeIn():void{
Tweener.addTween(_loader, {alpha:1, time:1});
}
public function fadeOut():void{
Tweener.addTween(_loader, {alpha:0.2, time:1});
}
private function smoothImage(_arg1:Event):void{
var bmp:Bitmap;
var e = _arg1;
try {
bmp = (_loader.content as Bitmap);
bmp.smoothing = true;
} catch(e:Error) {
};
}
}
}//package org.hoah.zombies.ui
Section 149
//ExtrasScreen (org.hoah.zombies.ui.ExtrasScreen)
package org.hoah.zombies.ui {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.menu.*;
import org.hoah.zombies.*;
import org.hoah.Tweener.*;
public class ExtrasScreen extends MovieClip {
private var _bitmapArea:MovieClip;
private var returnLink:TextButton;
private var _rightButton:MovieClip;
private var _imagePos:Array;
private var _curImage:int;// = 0
private var _leftButton:MovieClip;
private static var scriptLocation:String = "http://hoah.org/remote/notc/extras.hscr";
private static var extrasScript:ExtrasHoahScript = new ExtrasHoahScript(scriptLocation);
public function ExtrasScreen(){
returnLink = new TextButton("Return to Menu", 410, 450);
_bitmapArea = new MovieClip();
_leftButton = new MovieClip();
_rightButton = new MovieClip();
_imagePos = [];
super();
addChild(Assets.extrasBackground);
Assets.extrasButtonLeft.x = 3;
Assets.extrasButtonLeft.y = 232;
Assets.extrasButtonRight.x = 605;
Assets.extrasButtonRight.y = 200;
_leftButton.addChild(Assets.extrasButtonLeft);
_rightButton.addChild(Assets.extrasButtonRight);
_leftButton.alpha = 0.5;
_rightButton.alpha = 0.5;
_leftButton.buttonMode = true;
_rightButton.buttonMode = true;
_leftButton.addEventListener(MouseEvent.CLICK, prevImage);
_rightButton.addEventListener(MouseEvent.CLICK, nextImage);
_leftButton.mouseChildren = false;
_rightButton.mouseChildren = false;
_leftButton.addEventListener(MouseEvent.MOUSE_OVER, highlight);
_rightButton.addEventListener(MouseEvent.MOUSE_OVER, highlight);
addChild(_bitmapArea);
addChild(_leftButton);
addChild(_rightButton);
addChild(returnLink);
returnLink.addEventListener(MouseEvent.CLICK, returnToMenu);
if (extrasScript.loaded){
setupImages();
} else {
extrasScript.onLoadComplete = setupImages;
};
}
private function prevImage(_arg1:MouseEvent):void{
var _local2:ExtrasImage = extrasScript.images[_curImage];
_local2.fadeOut();
_curImage--;
if (_curImage < 0){
_curImage = (_imagePos.length - 1);
};
var _local3:Number = -(_imagePos[_curImage]);
_local2 = extrasScript.images[_curImage];
_local2.fadeIn();
_local3 = (_local3 + ((640 - _local2.imageWidth) / 2));
var _local4:Number = calculateMcYpos(_local3);
Tweener.addTween(_bitmapArea, {x:_local3, y:_local4, time:1});
}
private function highlight(_arg1:MouseEvent):void{
_arg1.target.alpha = 1;
_arg1.target.addEventListener(MouseEvent.MOUSE_OUT, unhighlight);
}
private function calculateMcYpos(_arg1:int=0):Number{
return ((55 + ((-(_arg1) / 640) * 34)));
}
private function nextImage(_arg1:MouseEvent):void{
var _local2:ExtrasImage = extrasScript.images[_curImage];
_local2.fadeOut();
_curImage++;
if (_curImage >= _imagePos.length){
_curImage = 0;
};
var _local3:Number = -(_imagePos[_curImage]);
_local2 = extrasScript.images[_curImage];
_local2.fadeIn();
_local3 = (_local3 + ((640 - _local2.imageWidth) / 2));
var _local4:Number = calculateMcYpos(_local3);
Tweener.addTween(_bitmapArea, {x:_local3, y:_local4, time:1});
}
public function dispose():void{
removeChild(_leftButton);
removeChild(_rightButton);
removeChild(_bitmapArea);
removeChild(returnLink);
}
private function returnToMenu(_arg1:Event):void{
dispatchEvent(new Event(Event.CLOSE));
}
private function setupImages():void{
var _local2:ExtrasImage;
_bitmapArea.y = 55;
_bitmapArea.rotation = -3;
var _local1 = 10;
for each (_local2 in extrasScript.images) {
_bitmapArea.addChild(_local2);
_local2.x = _local1;
_imagePos.push(_local1);
_local1 = (_local1 + (_local2.imageWidth + 20));
};
extrasScript.images[0].fadeIn();
}
private function unhighlight(_arg1:MouseEvent):void{
_arg1.target.alpha = 0.5;
_arg1.target.removeEventListener(MouseEvent.MOUSE_OUT, unhighlight);
}
}
}//package org.hoah.zombies.ui
Section 150
//GameOverScreen (org.hoah.zombies.ui.GameOverScreen)
package org.hoah.zombies.ui {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.menu.*;
import org.hoah.zombies.*;
import flash.text.*;
import org.hoah.zombies.soundeffects.*;
import org.hoah.zombies.rounds.*;
import flash.filters.*;
public class GameOverScreen extends Sprite {
public var submitButton:TextButton;
public var mainMenuButton:TextButton;
private var mainTextField:TextField;
public static var _instance:GameOverScreen;
public function GameOverScreen(){
var _local2:Array;
var _local3:Number;
mainTextField = new TextField();
super();
_instance = this;
mainTextField.x = 10;
mainTextField.y = 98;
mainTextField.width = 620;
mainTextField.height = 400;
mainTextField.embedFonts = true;
mainTextField.selectable = false;
mainTextField.filters = [new GlowFilter(0, 1, 22, 22, 2, 2)];
mainTextField.antiAliasType = AntiAliasType.NORMAL;
mainTextField.defaultTextFormat = new TextFormat("Viper Nora", 32, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.CENTER);
var _local1:TextFormat = new TextFormat("Viper Nora", 66, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.CENTER);
if (Round.survivalMode){
_local3 = (Math.round(((UserInterface.instance.endTime - UserInterface.instance.startTime) / 10)) / 100);
_local2 = ["GAME OVER", ("You survived for " + UserInterface.formatTime(_local3)), ("Zombies killed: " + NumberTools.format(Player.zombiesKilled))];
} else {
_local2 = ["GAME OVER", (("You scored " + NumberTools.format(Player.totalPoints)) + " points"), ("Zombies killed: " + NumberTools.format(Player.zombiesKilled)), ("Rounds survived: " + NumberTools.format(Round.currentRound))];
};
Sounds.playMusic("dead", true, true, true);
mainTextField.text = _local2.join("\n");
mainTextField.setTextFormat(_local1, 0, 9);
submitButton = new TextButton("Submit Score", 114, 345);
submitButton.addEventListener(MouseEvent.CLICK, submitScore);
addChild(mainTextField);
addChild(submitButton);
mainMenuButton = new TextButton("Main Menu", 394, 345);
mainMenuButton.addEventListener(MouseEvent.CLICK, resetGame);
addChild(mainMenuButton);
}
private function resetGame(_arg1:Event):void{
Zombies.instance.doReset(null);
}
public function submitScore(_arg1:Event):void{
if (Round.survivalMode){
GamerSafe.api.showScoreSubmit((UserInterface.instance.endTime - UserInterface.instance.startTime), "", true, GamerSafeConstants.SCOREBOARD_SURVIVAL);
} else {
GamerSafe.api.showScoreSubmit(Player.totalPoints, ("Wave " + Round.currentRound), false, GamerSafeConstants.SCOREBOARD_HIGHSCORES);
};
}
public static function dispose():void{
if (_instance == null){
return;
};
var _local2 = _instance;
with (_local2) {
submitButton.removeEventListener(MouseEvent.CLICK, submitScore);
while (numChildren > 0) {
removeChildAt(0);
};
};
_instance = null;
}
}
}//package org.hoah.zombies.ui
Section 151
//HealthPanel (org.hoah.zombies.ui.HealthPanel)
package org.hoah.zombies.ui {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.zombies.*;
import flash.geom.*;
import org.hoah.zombies.ai.*;
import flash.text.*;
public class HealthPanel extends Sprite {
private var maxHealth:int;// = 10
private var player:Player;
private var lastHealth:int;// = 10
private var refreshTimer:Timer;
private var namePanel:TextField;
private var type:String;// = "Friend"
private var friend:Friend;
private static var _bar:BitmapData = new _barCls().bitmapData;
private static var _youBmp:Bitmap = new _youCls();
private static var instances:Array = [];
private static var _mimiBmp:Bitmap = new _mimiCls();
private static var _ellaCls:Class = HealthPanel__ellaCls;
private static var _ellaBmp:Bitmap = new _ellaCls();
private static var _mimiCls:Class = HealthPanel__mimiCls;
private static var _barCls:Class = HealthPanel__barCls;
private static var curX:int = 10;
private static var _youCls:Class = HealthPanel__youCls;
public function HealthPanel(_arg1){
namePanel = new TextField();
refreshTimer = new Timer(250);
super();
instances.push(this);
x = curX;
curX = (curX + 162);
y = 10;
namePanel.x = 50;
namePanel.y = 10;
namePanel.embedFonts = true;
namePanel.selectable = false;
namePanel.antiAliasType = AntiAliasType.ADVANCED;
namePanel.defaultTextFormat = new TextFormat("Viper Nora", 11, 0xFFFF00, true, null, null, null, null, TextFormatAlign.LEFT);
addChild(namePanel);
if ((_arg1 is Friend)){
namePanel.text = (_arg1 as Friend).char;
type = "Friend";
friend = _arg1;
addChild(HealthPanel[(("_" + friend.char) + "Bmp")]);
} else {
if ((_arg1 is Player)){
namePanel.text = "You";
type = "Player";
player = _arg1;
addChild(_youBmp);
} else {
throw (new Error("Not friend or player."));
};
};
render();
refreshTimer.addEventListener(TimerEvent.TIMER, update);
refreshTimer.start();
}
private function update(_arg1:Event=null):void{
if (type == "Player"){
if (((!((player.health == lastHealth))) || (!((player.maxHealth == maxHealth))))){
render();
};
} else {
if (type == "Friend"){
if (((!((friend.health == lastHealth))) || (!((friend.maxHealth == maxHealth))))){
if (friend.maxHealth > 0){
render();
};
};
};
};
}
private function render():void{
if (type == "Player"){
lastHealth = player.health;
maxHealth = player.maxHealth;
} else {
if (type == "Friend"){
lastHealth = friend.health;
maxHealth = friend.maxHealth;
};
};
graphics.clear();
graphics.beginFill(0, 0.5);
graphics.drawRect(49, 30, 102, 17);
graphics.endFill();
graphics.beginBitmapFill(_bar, new Matrix(1, 0, 0, 1, 50, 31));
graphics.drawRect(50, 31, (100 * (lastHealth / maxHealth)), 15);
graphics.endFill();
}
public static function dispose():void{
var _local1:HealthPanel;
curX = 10;
for each (_local1 in instances) {
_local1.refreshTimer.removeEventListener(TimerEvent.TIMER, _local1.update);
_local1.refreshTimer.stop();
_local1.refreshTimer = null;
if (_local1.parent != null){
_local1.parent.removeChild(_local1);
};
};
instances = [];
}
}
}//package org.hoah.zombies.ui
Section 152
//HealthPanel__barCls (org.hoah.zombies.ui.HealthPanel__barCls)
package org.hoah.zombies.ui {
import mx.core.*;
public class HealthPanel__barCls extends BitmapAsset {
}
}//package org.hoah.zombies.ui
Section 153
//HealthPanel__ellaCls (org.hoah.zombies.ui.HealthPanel__ellaCls)
package org.hoah.zombies.ui {
import mx.core.*;
public class HealthPanel__ellaCls extends BitmapAsset {
}
}//package org.hoah.zombies.ui
Section 154
//HealthPanel__mimiCls (org.hoah.zombies.ui.HealthPanel__mimiCls)
package org.hoah.zombies.ui {
import mx.core.*;
public class HealthPanel__mimiCls extends BitmapAsset {
}
}//package org.hoah.zombies.ui
Section 155
//HealthPanel__youCls (org.hoah.zombies.ui.HealthPanel__youCls)
package org.hoah.zombies.ui {
import mx.core.*;
public class HealthPanel__youCls extends BitmapAsset {
}
}//package org.hoah.zombies.ui
Section 156
//Menu (org.hoah.zombies.ui.Menu)
package org.hoah.zombies.ui {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.debug.*;
import org.hoah.zombies.menu.*;
import org.hoah.zombies.*;
import flash.geom.*;
import org.hoah.Tweener.*;
import flash.text.*;
import org.hoah.zombies.soundeffects.*;
import flash.net.*;
import flash.filters.*;
public class Menu extends Sprite {
public var bgBmp:Bitmap;
private var ngButton:TextButton;
private var _lastSpawn:int;// = 0
private var hoverTf:TextField;
private var survivalButton:TextButton;
private var credits:Credits;
private var sponsorLogoMc:MovieClip;
private var shotSprite:Sprite;
private var extras:ExtrasScreen;
private var startMode:int;// = 0
private var _sponsorLogo:Class;
private var disposing:Boolean;// = false
private var bgBmd:BitmapData;
public var extrasButton:TextButton;
private static const STARTMODE_NORMAL:int = 0;
private static const storyText:String = "Story Mode: Fight off waves of zombies alongside Ella. Killing zombies earns you points which you can use to buy weapons, upgrades and traps.";
private static const survivalText:String = "Survival Mode: See how long you can survive on your own against the onslaught of zombies. You are given 200,000 points to buy weapons, upgrades and traps. when you're ready, the timer begins and the hoardes of zombies start to invade.";
private static const STARTMODE_SURVIVAL:int = 1;
public static var displayed:Boolean = false;
public static var instance:Menu;
public function Menu(){
bgBmp = new Bitmap(new BitmapData(640, 480, false, 0));
shotSprite = new Sprite();
hoverTf = new TextField();
_sponsorLogo = Menu__sponsorLogo;
sponsorLogoMc = new _sponsorLogo();
super();
displayed = true;
var _local1:Number = 230;
instance = this;
Sounds.playMusic("menu", true, true);
bgBmd = Assets.mainMenuBgBmd.clone();
addEventListener(Event.ENTER_FRAME, render);
addChild(bgBmp);
addChild(shotSprite);
ngButton = new TextButton("Start Game", 18, _local1);
ngButton.addEventListener(MouseEvent.CLICK, startNewGame);
addChild(ngButton);
ngButton.addEventListener(MouseEvent.MOUSE_OVER, showStoryText);
_local1 = (_local1 + 38);
survivalButton = new TextButton("Survival Mode", 18, _local1);
survivalButton.addEventListener(MouseEvent.CLICK, startSurvival);
addChild(survivalButton);
survivalButton.addEventListener(MouseEvent.MOUSE_OVER, showSurvivalText);
_local1 = (_local1 + 38);
var _local2:TextButton = new TextButton("High Scores", 18, _local1);
_local2.addEventListener(MouseEvent.CLICK, showHighScores);
addChild(_local2);
_local1 = (_local1 + 38);
extrasButton = new TextButton("Extras", 18, _local1);
extrasButton.addEventListener(MouseEvent.CLICK, clickedExtras);
extrasButton.disabled = !(GamerSafe.api.loggedIn);
if (GamerSafe.api.loggedIn == false){
GamerSafe.api.addEventListener(GamerSafe.EVT_LOGIN, onLogin);
};
addChild(extrasButton);
_local1 = (_local1 + 38);
var _local3:TextButton = new TextButton("Options", 18, _local1);
_local3.addEventListener(MouseEvent.CLICK, showOptions);
addChild(_local3);
_local1 = (_local1 + 38);
var _local4:TextButton = new TextButton("Credits", 18, _local1);
_local4.addEventListener(MouseEvent.CLICK, showCredits);
addChild(_local4);
hoverTf.width = 385;
hoverTf.embedFonts = true;
hoverTf.selectable = false;
hoverTf.antiAliasType = AntiAliasType.NORMAL;
hoverTf.defaultTextFormat = new TextFormat("Viper Nora", 16, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.LEFT);
hoverTf.filters = [new DropShadowFilter(2, 45, 0, 1, 3, 3, 1)];
hoverTf.text = storyText;
hoverTf.height = 140;
hoverTf.wordWrap = true;
hoverTf.x = 245;
hoverTf.y = 229;
hoverTf.alpha = 0;
addChild(hoverTf);
addChild(Assets.hoahGamingLogo);
Assets.hoahGamingLogo.x = (630 - Assets.hoahGamingLogo.width);
Assets.hoahGamingLogo.y = 10;
var _local5:MovieClip = new MovieClip();
_local5.buttonMode = true;
_local5.graphics.beginFill(0, 0);
_local5.graphics.drawRect(Assets.hoahGamingLogo.x, Assets.hoahGamingLogo.y, Assets.hoahGamingLogo.width, Assets.hoahGamingLogo.height);
_local5.graphics.endFill();
addChild(_local5);
_local5.addEventListener(MouseEvent.CLICK, gotoHoah);
sponsorLogoMc.x = (600 - Assets.sponsorBrandingPlaceholder.width);
sponsorLogoMc.y = (480 - 60);
sponsorLogoMc.buttonMode = true;
sponsorLogoMc.addEventListener(MouseEvent.CLICK, gotoSponsor);
addChild(sponsorLogoMc);
GamerSafe.api.showStatusBar();
}
private function closeCredits(_arg1:Event):void{
credits.removeEventListener(Event.CLOSE, closeCredits);
credits.dispose();
parent.removeChild(credits);
credits = null;
addEventListener(Event.ENTER_FRAME, render);
}
private function blitBitmap(_arg1:Number, _arg2:Number, _arg3:BitmapData, _arg4:Number=0):void{
var _local5:BitmapData = new BitmapData(_arg3.width, _arg3.height, true, 0);
var _local6:Matrix = new Matrix();
_local6.translate((-(_arg3.width) / 2), (-(_arg3.height) / 2));
_local6.rotate(_arg4);
_local6.translate((_arg3.width / 2), (_arg3.height / 2));
_local5.draw(_arg3, _local6, null, null, null, true);
bgBmd.copyPixels(_local5, _local5.rect, new Point(_arg1, _arg2), null, null, true);
}
private function showStoryText(_arg1:Event):void{
ngButton.addEventListener(MouseEvent.MOUSE_OUT, hideText);
Tweener.removeTweens(hoverTf);
hoverTf.alpha = 0;
Tweener.addTween(hoverTf, {alpha:1, time:2});
hoverTf.text = storyText;
}
public function unInit(_arg1:int=0):void{
var _local2:Array;
var _local3:MenuZombie;
displayed = false;
if (_arg1 == 0){
disposing = true;
_local2 = [];
for each (_local3 in MenuZombie.instances) {
_local2.push(_local3);
};
for each (_local3 in _local2) {
if (Math.random() < 0.5){
_local3.nuke();
} else {
_local3.kill();
};
};
_local2 = null;
setTimeout(unInit, 1000, 2);
Tweener.addTween(this, {alpha:0, time:1});
} else {
if (_arg1 == 2){
Sounds.stopMusic();
removeEventListener(Event.ENTER_FRAME, render);
if (parent != null){
parent.removeChild(this);
};
if (startMode == STARTMODE_NORMAL){
Zombies.instance.initGame(false);
} else {
if (startMode == STARTMODE_SURVIVAL){
Zombies.instance.initGame(true);
};
};
};
};
}
private function hideText(_arg1:Event):void{
Tweener.removeTweens(hoverTf);
ngButton.removeEventListener(MouseEvent.MOUSE_OUT, hideText);
survivalButton.removeEventListener(MouseEvent.MOUSE_OUT, hideText);
Tweener.addTween(hoverTf, {alpha:0, time:2});
}
private function onLogin(_arg1:Event):void{
if (GamerSafe.api.loggedIn){
Tracer.info("Main Menu - User Logged In (GamerSafe)");
GamerSafe.api.removeEventListener(GamerSafe.EVT_LOGIN, onLogin);
extrasButton.disabled = false;
};
}
private function closeExtras(_arg1:Event):void{
extras.removeEventListener(Event.CLOSE, closeCredits);
extras.dispose();
parent.removeChild(extras);
extras = null;
addEventListener(Event.ENTER_FRAME, render);
}
public function spawnGib(_arg1:MenuZombie):void{
var _local2:BitmapData = Assets.gib1.bitmapData;
blitBitmap((_arg1.x - 25), (_arg1.y - 25), _local2, ((Math.random() * Math.PI) * 2));
}
private function showReg():void{
Tracer.info("Main Menu - Showing GamerSafe Register");
GamerSafe.api.onConfirmYes = null;
GamerSafe.api.showRegistrationForm();
}
private function showHighScores(_arg1:Event):void{
GamerSafe.api.showScoreboard(GamerSafeConstants.SCOREBOARD_HIGHSCORES);
}
private function showCredits(_arg1:Event):void{
Tracer.info("Main Menu - User clicked Credits");
removeEventListener(Event.ENTER_FRAME, render);
credits = new Credits();
credits.addEventListener(Event.CLOSE, closeCredits);
parent.addChild(credits);
}
private function showOptions(_arg1:Event):void{
Tracer.info("Main Menu - User clicked Options");
OptionsScreen.show();
}
private function startSurvival(_arg1:MouseEvent):void{
Sounds.stopMusic();
Sounds.playEffect("menuClick2");
GamerSafe.api.hideStatusBar();
startMode = STARTMODE_SURVIVAL;
unInit();
}
private function showExtras():void{
removeEventListener(Event.ENTER_FRAME, render);
extras = new ExtrasScreen();
extras.addEventListener(Event.CLOSE, closeExtras);
parent.addChild(extras);
}
private function render(_arg1:Event):void{
var _local4:Number;
var _local5:MenuZombie;
bgBmp.bitmapData.copyPixels(bgBmd, bgBmd.rect, new Point());
var _local2:Number = Infinity;
var _local3:MenuZombie;
for each (_local5 in MenuZombie.instances) {
_local5.update(_arg1);
bgBmp.bitmapData.copyPixels(_local5.bmd, _local5.bmd.rect, new Point((_local5.x - 20), (_local5.y - 20)), null, null, true);
};
if (disposing){
return;
};
if ((Math.random() * 60) < 1){
if ((getTimer() - _lastSpawn) > 1000){
new MenuZombie();
_lastSpawn = getTimer();
};
};
}
private function showSurvivalText(_arg1:Event):void{
survivalButton.addEventListener(MouseEvent.MOUSE_OUT, hideText);
Tweener.removeTweens(hoverTf);
hoverTf.alpha = 0;
Tweener.addTween(hoverTf, {alpha:1, time:2});
hoverTf.text = survivalText;
}
private function startNewGame(_arg1:MouseEvent):void{
Sounds.stopMusic();
Sounds.playEffect("menuClick2");
GamerSafe.api.hideStatusBar();
startMode = STARTMODE_NORMAL;
unInit();
}
private function gotoHoah(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.hoah.org/"));
}
public function spewBlood(_arg1:MenuZombie):void{
var _local2:int = Math.floor((Math.random() * 3));
var _local3:BitmapData = Assets[("blood" + (_local2 + 1))].bitmapData;
var _local4:Number = 0;
if (_local2 == 1){
_local4 = ((_arg1.rotation - 90) * 0.0174);
} else {
_local4 = ((Math.random() * Math.PI) * 2);
};
blitBitmap((_arg1.x - 25), (_arg1.y - 25), _local3, _local4);
}
private function gotoSponsor(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.arcadebomb.com/"));
}
private function clickedExtras(_arg1:Event):void{
var _local2 = "no";
if (GamerSafe.api.loggedIn){
_local2 = "yes";
};
Tracer.info("Main Menu - User clicked Extras");
if (GamerSafe.api.loggedIn){
showExtras();
} else {
Sounds.playEffect("disllowed", 1);
GamerSafe.api.showMessageBox("GamerSafe", "\nYou must be logged in to access the extras.\n\nDo you want to register now? (It's really quick!)", true);
GamerSafe.api.onConfirmYes = showReg;
};
}
}
}//package org.hoah.zombies.ui
Section 157
//Menu__sponsorLogo (org.hoah.zombies.ui.Menu__sponsorLogo)
package org.hoah.zombies.ui {
import flash.utils.*;
import mx.core.*;
public class Menu__sponsorLogo extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function Menu__sponsorLogo(){
dataClass = Menu__sponsorLogo_dataClass;
super();
initialWidth = (11000 / 20);
initialHeight = (8000 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package org.hoah.zombies.ui
Section 158
//Menu__sponsorLogo_dataClass (org.hoah.zombies.ui.Menu__sponsorLogo_dataClass)
package org.hoah.zombies.ui {
import mx.core.*;
public class Menu__sponsorLogo_dataClass extends ByteArrayAsset {
}
}//package org.hoah.zombies.ui
Section 159
//MimiPurchaseSubtitle (org.hoah.zombies.ui.MimiPurchaseSubtitle)
package org.hoah.zombies.ui {
import flash.display.*;
import org.hoah.zombies.*;
import flash.text.*;
public class MimiPurchaseSubtitle extends Sprite {
private var subtitlesBox:TextField;
private var subs:Object;
private var curChar:String;// = ""
public function MimiPurchaseSubtitle(){
subs = {hey:"Mimi: Hey, I'm Mimi!", i_could_help:"Mimi: I'll help you fight these zombies.. But it's gunna cost ya!", could_use_help:"Mimi: You look like you could do with some help", all_night:"Mimi: You could last all night with my help", charge_us:"Ella: She's going to charge us?", dont_need_her:"Ella: C'mon, We don't need help from her!", hey_im_free:"Ella: Hey, you got me for free!", dont_trust_her:"Ella: I don't trust her", like_you_me:"Ella: I like how it's just me and you", manage_on_own:"Ella: We can manage on our own!", hey_gross:"Ella: Hey.. Gross!", wow_classy:"Ella: Wow - Classy.", prostitute:"Ella: She's going to make you pay, so you can last 'all night'? You're a gentleman, you know what to do."};
super();
subtitlesBox = new TextField();
subtitlesBox.x = 70;
subtitlesBox.y = 0;
subtitlesBox.width = 270;
subtitlesBox.height = 80;
subtitlesBox.embedFonts = true;
subtitlesBox.selectable = false;
subtitlesBox.antiAliasType = AntiAliasType.NORMAL;
subtitlesBox.wordWrap = true;
subtitlesBox.defaultTextFormat = new TextFormat("Viper Nora", 14, 0, true, null, null, null, null, TextFormatAlign.LEFT);
addChild(subtitlesBox);
Assets.mimiPortrait.x = 0;
Assets.mimiPortrait.y = 0;
Assets.ellaPortrait.x = 0;
Assets.ellaPortrait.y = 0;
}
public function setChar(_arg1:String):void{
if (curChar == "mimi"){
removeChild(Assets.mimiPortrait);
};
if (curChar == "ella"){
removeChild(Assets.ellaPortrait);
};
if (_arg1 == "mimi"){
addChild(Assets.mimiPortrait);
};
if (_arg1 == "ella"){
addChild(Assets.ellaPortrait);
};
}
public function setText(_arg1:String):void{
subtitlesBox.text = subs[_arg1];
}
}
}//package org.hoah.zombies.ui
Section 160
//MimiPurchaseWindow (org.hoah.zombies.ui.MimiPurchaseWindow)
package org.hoah.zombies.ui {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.media.*;
import org.hoah.zombies.*;
import org.hoah.Tweener.*;
import org.hoah.zombies.ai.*;
import org.hoah.zombies.soundeffects.*;
import org.hoah.zombies.rounds.*;
public class MimiPurchaseWindow extends Sprite {
private var _mimiScript:Array;
private var _currentSoundLength:Number;// = 0
private var _mimiTimes:Array;
private var mimiPurchaseSubtitle:MimiPurchaseSubtitle;
private var _purchaseButton:MovieClip;
private var _vocalStopped:Boolean;// = false
private var _cancelButton:MovieClip;
private var _currentVocal:SoundChannel;
private static var _instance:MimiPurchaseWindow;
public function MimiPurchaseWindow(){
_mimiScript = [];
_mimiTimes = [];
mimiPurchaseSubtitle = new MimiPurchaseSubtitle();
_purchaseButton = new MovieClip();
_cancelButton = new MovieClip();
super();
_instance = this;
Zombies.paused = true;
GamerSafe.api.showStatusBar();
addChild(Assets.mimiIntroBitmap);
mimiPurchaseSubtitle.x = 76;
mimiPurchaseSubtitle.y = 175;
addChild(mimiPurchaseSubtitle);
alpha = 0;
Tweener.addTween(this, {alpha:1, time:1});
setTimeout(beginMimiConvo, 1000);
if (GamerSafe.api.hasItem(362)){
Assets.useMimiButtonBitmap.x = 72;
Assets.useMimiButtonBitmap.y = 275;
addChild(Assets.useMimiButtonBitmap);
} else {
GamerSafe.api.onItemPurchase = updateMimi;
GamerSafe.api.onLogin = updateMimi;
GamerSafe.api.onAccountChange = updateMimi;
};
_purchaseButton.x = 72;
_purchaseButton.y = 275;
_purchaseButton.graphics.beginFill(0, 0);
_purchaseButton.graphics.drawRect(0, 0, 130, 30);
_purchaseButton.graphics.endFill();
_purchaseButton.buttonMode = true;
addChild(_purchaseButton);
_purchaseButton.addEventListener(MouseEvent.CLICK, showMimiPurchase);
_cancelButton.x = 226;
_cancelButton.y = 275;
_cancelButton.graphics.beginFill(0, 0);
_cancelButton.graphics.drawRect(0, 0, 130, 30);
_cancelButton.graphics.endFill();
_cancelButton.buttonMode = true;
addChild(_cancelButton);
_cancelButton.addEventListener(MouseEvent.CLICK, close);
}
private function updateMimi():void{
if (GamerSafe.api.hasItem(362)){
Assets.useMimiButtonBitmap.x = 72;
Assets.useMimiButtonBitmap.y = 275;
addChildAt(Assets.useMimiButtonBitmap, 1);
GamerSafe.api.onItemPurchase = null;
GamerSafe.api.onLogin = null;
GamerSafe.api.onAccountChange = null;
};
}
private function showMimiPurchase(_arg1:Event):void{
if (GamerSafe.api.hasItem(362)){
GamerSafe.api.onItemPurchase = null;
GamerSafe.api.onLogin = null;
GamerSafe.api.onAccountChange = null;
parent.removeChild(this);
Round.mimiIntroFinished();
Zombies.paused = false;
_vocalStopped = true;
} else {
GamerSafe.api.purchaseItemInterface(362);
};
}
private function checkCurrentVocal(_arg1:Event):void{
if (_vocalStopped){
if (_currentVocal != null){
_currentVocal.stop();
};
_currentVocal = null;
removeEventListener(Event.ENTER_FRAME, checkCurrentVocal);
return;
};
if (_currentVocal == null){
if (_mimiTimes.length > 0){
setTimeout(nextVocal, _mimiTimes.shift());
};
removeEventListener(Event.ENTER_FRAME, checkCurrentVocal);
return;
};
if (_currentVocal.position >= (_currentSoundLength - 500)){
if (_mimiTimes.length > 0){
setTimeout(nextVocal, _mimiTimes.shift());
};
removeEventListener(Event.ENTER_FRAME, checkCurrentVocal);
};
}
private function nextVocal():void{
if (_vocalStopped){
return;
};
var _local1:String = _mimiScript.shift();
var _local2:String = _local1.substr(0, 4);
mimiPurchaseSubtitle.setChar(_local2);
mimiPurchaseSubtitle.setText(_local1.substr(5));
_currentVocal = Sounds.playEffect(("vocal_" + _local1));
_currentSoundLength = Sounds.getSoundLength(("vocal_" + _local1));
addEventListener(Event.ENTER_FRAME, checkCurrentVocal);
}
private function close(_arg1:Event):void{
GamerSafe.api.onItemPurchase = null;
GamerSafe.api.onLogin = null;
GamerSafe.api.onAccountChange = null;
parent.removeChild(this);
Round.mimiIntroFinished();
(Friend.instances[1] as Friend).dispose();
Zombies.paused = false;
_vocalStopped = true;
dispose();
}
public function beginMimiConvo():void{
var _local6:Number;
var _local7:Array;
var _local8:String;
var _local1:Array = ["i_could_help", "could_use_help", "all_night"];
var _local2:Array = [["charge_us", "dont_need_her", "hey_im_free"], ["dont_trust_her", "like_you_me", "manage_on_own"], ["hey_gross", "wow_classy", "prostitute"]];
var _local3:Array = ["dont_need_her", "hey_im_free", "dont_trust_her", "like_you_me", "manage_on_own", "prostitute"];
var _local4:Array = [];
var _local5:Array = [];
_local4.push("mimi_hey");
var _local9:int;
_local9 = 550;
_local6 = Math.floor((Math.random() * 2.99999));
_local4.push(("mimi_" + _local1.splice(_local6, 1)[0]));
_local5.push(_local9);
_local7 = _local2.splice(_local6, 1)[0];
_local8 = _local7[Math.floor((Math.random() * 2.9999))];
_local4.push(("ella_" + _local8));
_local9 = (500 + (Math.random() * 500));
_local5.push(_local9);
if (_local3.indexOf(_local8) > -1){
_local3.splice(_local3.indexOf(_local8), 1);
};
_local9 = (1000 + (Math.random() * 1500));
_local6 = Math.floor((Math.random() * 1.99999));
_local4.push(("mimi_" + _local1.splice(_local6, 1)[0]));
_local5.push(_local9);
_local7 = _local2.splice(_local6, 1)[0];
_local8 = _local7[Math.floor((Math.random() * 2.9999))];
_local4.push(("ella_" + _local8));
_local9 = (500 + (Math.random() * 500));
_local5.push(_local9);
if (_local3.indexOf(_local8) > -1){
_local3.splice(_local3.indexOf(_local8), 1);
};
_local9 = (1000 + (Math.random() * 1500));
_local6 = Math.floor((Math.random() * 0.99999));
_local4.push(("mimi_" + _local1.splice(_local6, 1)[0]));
_local5.push(_local9);
_local7 = _local2.splice(_local6, 1)[0];
_local8 = _local7[Math.floor((Math.random() * 2.9999))];
_local4.push(("ella_" + _local8));
_local9 = (500 + (Math.random() * 500));
_local5.push(_local9);
if (_local3.indexOf(_local8) > -1){
_local3.splice(_local3.indexOf(_local8), 1);
};
while (_local3.length > 0) {
_local4.push(("ella_" + _local3.splice(Math.floor((Math.random() * _local3.length)), 1)[0]));
_local9 = (2000 + (Math.random() * 5000));
_local5.push(_local9);
};
_mimiScript = _local4;
_mimiTimes = _local5;
nextVocal();
}
public static function get instance():MimiPurchaseWindow{
if (_instance == null){
new (MimiPurchaseWindow);
};
return (_instance);
}
public static function dispose():void{
var _local2 = _instance;
with (_local2) {
while (numChildren > 0) {
removeChildAt(0);
};
};
_instance = null;
}
}
}//package org.hoah.zombies.ui
Section 161
//NumberTools (org.hoah.zombies.ui.NumberTools)
package org.hoah.zombies.ui {
public class NumberTools {
public static function format(_arg1, _arg2:int=2, _arg3:Boolean=false, _arg4:Boolean=false):String{
var _local11:int;
var _local5:int;
var _local6:Number = Math.pow(10, _arg2);
var _local7:String = String((Math.round((_local6 * Number(_arg1))) / _local6));
var _local8 = (_local7.indexOf(".") == -1);
var _local9:int = (_local8) ? _local7.length : _local7.indexOf(".");
var _local10:String = ((((_local8) && (!(_arg3)))) ? "" : (_arg4) ? "," : "." + _local7.substr((_local9 + 1)));
if (_arg3){
_local11 = 0;
while (_local11 <= (_arg2 - (_local7.length - (_local8) ? (_local9 - 1) : _local9))) {
_local10 = (_local10 + "0");
_local11++;
};
};
while ((_local5 + 3) < ((_local7.substr(0, 1) == "-")) ? (_local9 - 1) : _local9) {
_local5 = (_local5 + 3);
_local10 = (((_arg4) ? "." : "," + _local7.substr((_local9 - _local5), 3)) + _local10);
};
return ((_local7.substr(0, (_local9 - _local5)) + _local10));
}
}
}//package org.hoah.zombies.ui
Section 162
//OptionsScreen (org.hoah.zombies.ui.OptionsScreen)
package org.hoah.zombies.ui {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.menu.*;
import org.hoah.zombies.*;
import org.hoah.zombies.soundeffects.*;
import org.hoah.zombies.ui.options.*;
public class OptionsScreen extends MovieClip {
private var qualitySlider:HSlider;
private var soundSlider:HSlider;
private var menuButton:TextButton;
private var voiceSlider:HSlider;
private var doneButton:TextButton;
private static var _optionsMenuCls:Class = OptionsScreen__optionsMenuCls;
private static var _instance:OptionsScreen = null;
private static var _callOnClose:Function;
private static var _optionsMenu:Bitmap = (new _optionsMenuCls() as Bitmap);
public function OptionsScreen(){
graphics.beginFill(0, 0.7);
graphics.drawRect(0, 0, 640, 480);
graphics.endFill();
_optionsMenu.x = (320 - (_optionsMenu.width / 2));
_optionsMenu.y = (240 - (_optionsMenu.height / 2));
addChild(_optionsMenu);
soundSlider = new HSlider(100);
voiceSlider = new HSlider(100);
qualitySlider = new HSlider(2);
soundSlider.x = (_optionsMenu.x + 45);
soundSlider.y = (_optionsMenu.y + 90);
addChild(soundSlider);
voiceSlider.x = (_optionsMenu.x + 45);
voiceSlider.y = (_optionsMenu.y + 144);
addChild(voiceSlider);
qualitySlider.x = (_optionsMenu.x + 45);
qualitySlider.y = (_optionsMenu.y + 198);
addChild(qualitySlider);
doneButton = new TextButton("Done", (_optionsMenu.x + 196), (_optionsMenu.y + 246), 18);
menuButton = new TextButton("Main Menu", (_optionsMenu.x + 25), (_optionsMenu.y + 246), 18);
soundSlider.addEventListener(Event.CHANGE, changeSound);
voiceSlider.addEventListener(Event.CHANGE, changeVoice);
qualitySlider.addEventListener(Event.CHANGE, changeQuality);
doneButton.addEventListener(MouseEvent.CLICK, doneClick);
menuButton.addEventListener(MouseEvent.CLICK, menuClick);
addChild(doneButton);
addChild(menuButton);
addEventListener(Event.ADDED, checkMenu);
}
private function changeVoice(_arg1:Event):void{
Settings.vocalVolume = (voiceSlider.value / 100);
}
private function doneClick(_arg1:Event):void{
if (_callOnClose != null){
_callOnClose();
_callOnClose = null;
};
dispatchEvent(new Event(Event.CLOSE));
parent.removeChild(this);
}
private function checkMenu(_arg1:Event):void{
if (Menu.displayed){
menuButton.visible = false;
} else {
menuButton.visible = true;
};
}
private function changeQuality(_arg1:Event):void{
Settings.quality = qualitySlider.value;
if (Settings.quality == 0){
stage.quality = StageQuality.LOW;
} else {
if (Settings.quality == 1){
stage.quality = StageQuality.MEDIUM;
} else {
if (Settings.quality == 2){
stage.quality = StageQuality.HIGH;
};
};
};
}
private function menuClick(_arg1:Event):void{
if (_callOnClose != null){
_callOnClose();
_callOnClose = null;
};
dispatchEvent(new Event(Event.CLOSE));
Zombies.instance.doReset(null);
parent.removeChild(this);
}
private function changeSound(_arg1:Event):void{
Settings.soundVolume = (soundSlider.value / 100);
Sounds.musicVolume = Settings.soundVolume;
}
public static function show(_arg1:Function=null):void{
_callOnClose = _arg1;
if (_instance == null){
_instance = new (OptionsScreen);
};
Zombies.instance.stage.addChild(_instance);
}
}
}//package org.hoah.zombies.ui
Section 163
//OptionsScreen__optionsMenuCls (org.hoah.zombies.ui.OptionsScreen__optionsMenuCls)
package org.hoah.zombies.ui {
import mx.core.*;
public class OptionsScreen__optionsMenuCls extends BitmapAsset {
}
}//package org.hoah.zombies.ui
Section 164
//SponsorLogo (org.hoah.zombies.ui.SponsorLogo)
package org.hoah.zombies.ui {
import flash.events.*;
import flash.display.*;
import org.hoah.zombies.*;
import flash.net.*;
public class SponsorLogo extends Sprite {
private var highlightClip:MovieClip;
public function SponsorLogo(){
highlightClip = new MovieClip();
super();
addChild(Assets.sponsorLogo);
Assets.sponsorLogo.x = ((620 / 2) - (Assets.sponsorLogo.width / 2));
highlightClip.graphics.beginFill(0xFFFFFF, 0.5);
highlightClip.graphics.drawRect(Assets.sponsorLogo.x, Assets.sponsorLogo.y, Assets.sponsorLogo.width, Assets.sponsorLogo.height);
highlightClip.graphics.endFill();
highlightClip.alpha = 0;
highlightClip.buttonMode = true;
highlightClip.addEventListener(MouseEvent.MOUSE_OVER, highlight);
highlightClip.addEventListener(MouseEvent.MOUSE_OUT, unhighlight);
highlightClip.addEventListener(MouseEvent.CLICK, gotoSponsor);
addChild(highlightClip);
}
private function unhighlight(_arg1:Event):void{
highlightClip.alpha = 0;
}
private function highlight(_arg1:Event):void{
highlightClip.alpha = 1;
}
private function gotoSponsor(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.arcadebomb.com/"));
}
}
}//package org.hoah.zombies.ui
Section 165
//Subtitles (org.hoah.zombies.ui.Subtitles)
package org.hoah.zombies.ui {
import flash.display.*;
import flash.utils.*;
import org.hoah.zombies.*;
import org.hoah.Tweener.*;
import flash.text.*;
public class Subtitles extends Sprite {
private var subtitlesBox:TextField;
private var portraitBmp:Bitmap;
private var subtitleBitmapCache:Bitmap;
public static var instance:Subtitles;
private static var chars:Object = {mimi:{name:"Mimi", image:new Bitmap(Assets.mimiPortrait.bitmapData.clone()), color:"#FFBBBB"}, ella:{name:"Ella", image:new Bitmap(Assets.ellaPortrait.bitmapData.clone()), color:"#BBBBFF"}};
public function Subtitles(){
subtitlesBox = new TextField();
subtitleBitmapCache = new Bitmap(new BitmapData(440, 100, true, 0));
instance = this;
addChild(subtitleBitmapCache);
subtitleBitmapCache.x = 100;
subtitlesBox.width = 440;
subtitleBitmapCache.y = 300;
subtitlesBox.height = 50;
subtitlesBox.mouseEnabled = false;
subtitlesBox.defaultTextFormat = new TextFormat("Arial", 16, 16772846);
super();
}
private function hide():void{
Tweener.addTween(this, {alpha:0, time:1});
}
public static function show(_arg1:String, _arg2:Boolean=false, _arg3:String="#FFBBBB"):void{
var boxHeight:*;
var text = _arg1;
var isVocal = _arg2;
var vocalColor = _arg3;
if (isVocal == false){
if (instance.portraitBmp != null){
instance.removeChild(instance.portraitBmp);
instance.portraitBmp = null;
};
};
if ((((isVocal == false)) && ((Settings.enableSubtitles == false)))){
return;
};
if (isVocal == false){
text = (("<i>" + text) + "</i>");
} else {
text = (((("<font color=\"" + vocalColor) + "\">") + text) + "</font>");
};
var _local5 = instance;
with (_local5) {
Tweener.removeTweens(instance);
alpha = 1;
subtitlesBox.htmlText = text;
graphics.clear();
graphics.beginFill(0, 0.5);
boxHeight = (subtitlesBox.textHeight + 20);
graphics.drawRoundRect((subtitleBitmapCache.x - 10), (subtitleBitmapCache.y - 10), 460, boxHeight, 15);
graphics.endFill();
subtitleBitmapCache.bitmapData.fillRect(subtitleBitmapCache.bitmapData.rect, 0);
subtitleBitmapCache.bitmapData.draw(subtitlesBox);
setTimeout(hide, 5000);
};
}
public static function showVocal(_arg1:String, _arg2:String):void{
if (instance.portraitBmp != null){
instance.removeChild(instance.portraitBmp);
instance.portraitBmp = null;
};
instance.portraitBmp = chars[_arg1].image;
instance.addChild(instance.portraitBmp);
instance.portraitBmp.x = ((instance.subtitleBitmapCache.x - instance.portraitBmp.width) - 10);
instance.portraitBmp.y = (instance.subtitleBitmapCache.y - 20);
show(((chars[_arg1].name + ": ") + _arg2), true, chars[_arg1].color);
}
public static function dispose():void{
var _local2 = instance;
with (_local2) {
while (numChildren > 0) {
removeChildAt(0);
};
};
instance = null;
}
}
}//package org.hoah.zombies.ui
Section 166
//WeaponDisplay (org.hoah.zombies.ui.WeaponDisplay)
package org.hoah.zombies.ui {
import flash.display.*;
import org.hoah.zombies.*;
import flash.geom.*;
import org.hoah.zombies.weapons.*;
public class WeaponDisplay extends Sprite {
private var wepCt:ColorTransform;
private var bmp:Bitmap;
private var ammoBmp:Bitmap;
private var invertCt:ColorTransform;
private static var _instance:WeaponDisplay;
public function WeaponDisplay(){
bmp = new Bitmap(new BitmapData(60, 60, true, 0));
ammoBmp = new Bitmap(new BitmapData(90, 34, true, 0));
wepCt = new ColorTransform(0, 0, 0, 1, 0, 0, 0, 0);
invertCt = new ColorTransform(1, 1, 1, 1, 0xFF, 0xFF, 0xFF, 0);
super();
_instance = this;
addChild(bmp);
addChild(ammoBmp);
ammoBmp.x = 5;
ammoBmp.y = 30;
bmp.x = 100;
bmp.y = 10;
y = 410;
render();
renderAmmo();
}
public function renderAmmo():void{
var _local1:int = Player.instance.curWeapon.currentMagazine;
var _local2:int = Player.instance.curWeapon.magazine;
var _local3 = 2;
var _local4 = 10;
var _local5 = 2;
ammoBmp.bitmapData.fillRect(ammoBmp.bitmapData.rect, 0);
var _local6:int = 4281545523;
var _local7:int = 4294967295;
if (_local1 < (_local2 / 8)){
_local7 = 4294901760;
};
var _local8:int;
var _local9:BitmapData = ammoBmp.bitmapData;
var _local10:Rectangle = new Rectangle(0, 0, 2, 10);
if (_local2 <= 12){
_local5 = 2;
_local3 = 3;
_local10.width = 3;
_local8 = 0;
while (_local8 < _local2) {
if (_local8 < _local1){
_local9.fillRect(_local10, _local7);
} else {
_local9.fillRect(_local10, _local6);
};
_local10.x = (_local10.x + (_local5 + _local3));
_local8++;
};
} else {
if (_local2 < 30){
_local5 = 1;
_local8 = 0;
while (_local8 < _local2) {
if (_local8 < _local1){
_local9.fillRect(_local10, _local7);
} else {
_local9.fillRect(_local10, _local6);
};
_local10.x = (_local10.x + (_local5 + _local3));
_local8++;
};
} else {
_local5 = 1;
_local3 = 1;
_local10.width = 1;
_local10.height = 6;
_local4 = 6;
_local8 = 0;
while (_local8 < _local2) {
if (_local8 < _local1){
_local9.fillRect(_local10, _local7);
} else {
_local9.fillRect(_local10, _local6);
};
_local10.x = (_local10.x + (_local5 + _local3));
if (_local10.x >= 80){
_local10.x = 0;
_local10.y = (_local10.y + (_local4 + 2));
};
_local8++;
};
};
};
}
public function render():void{
if (Player.instance.curWeapon == null){
return;
};
bmp.bitmapData.fillRect(bmp.bitmapData.rect, 0);
var _local1:Matrix = new Matrix();
_local1.scale(0.6, 0.6);
bmp.bitmapData.draw(Assets[("wep_" + Weapons.builtInArray[Player.instance.curWeapon.id][9])], _local1, wepCt, null, null, true);
bmp.bitmapData.colorTransform(bmp.bitmapData.rect, invertCt);
}
public static function get instance():WeaponDisplay{
if (_instance == null){
new (WeaponDisplay);
};
return (_instance);
}
public static function dispose():void{
var _local2 = _instance;
with (_local2) {
while (numChildren > 0) {
removeChildAt(0);
};
};
_instance = null;
}
}
}//package org.hoah.zombies.ui
Section 167
//WeaponSelector (org.hoah.zombies.ui.WeaponSelector)
package org.hoah.zombies.ui {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.zombies.*;
import flash.geom.*;
import org.hoah.zombies.weapons.*;
import org.hoah.zombies.soundeffects.*;
public class WeaponSelector extends MovieClip {
private var hideTimer:Timer;
private var menuBmp:Bitmap;
private var menuBmd:BitmapData;
private var selected:Array;
private var categories:Array;
private var selectedId:int;// = 0
private static var _instance:WeaponSelector;
public function WeaponSelector(){
hideTimer = new Timer(2000);
categories = [[], [], [], [], []];
selected = [0, 0];
menuBmd = new BitmapData(100, 300, true, 0);
menuBmp = new Bitmap(menuBmd);
super();
_instance = this;
addChild(Assets.weaponSelectorBitmap);
x = 65;
hideTimer.addEventListener(TimerEvent.TIMER, hide);
addEventListener(Event.ADDED, startTimer);
addChild(menuBmp);
menuBmp.y = 56;
}
private function rebuildMenu():void{
var _local1:int;
var _local2:Array;
categories = [[], [], [], [], []];
for each (_local1 in Weapon.ownedWeapons) {
_local2 = Weapons.builtInArray[_local1];
categories[_local2[12]].push([_local1, _local2[0], _local2[9]]);
};
}
private function render():void{
var _local4:Array;
var _local5:BitmapData;
var _local6:Matrix;
if (menuBmp.parent == this){
removeChild(menuBmp);
};
if (categories[selected[0]].length == 0){
return;
};
addChild(menuBmp);
menuBmd.fillRect(menuBmd.rect, 0);
var _local1:int = ((categories[selected[0]].length * 50) + 50);
menuBmd.fillRect(new Rectangle(0, 0, 100, _local1), 4294967295);
menuBmd.fillRect(new Rectangle(0, 0, 1, _local1), 4278190080);
menuBmd.fillRect(new Rectangle(99, 0, 1, _local1), 4278190080);
menuBmd.fillRect(new Rectangle(0, _local1, 100, 1), 4278190080);
menuBmp.x = (selected[0] * 100);
var _local2:int;
var _local3:int;
for each (_local4 in categories[selected[0]]) {
_local5 = Assets[("wep_" + _local4[2])].bitmapData;
_local6 = new Matrix();
if (_local4[0] == selectedId){
_local6.scale(0.9, 0.9);
_local2 = 5;
_local6.translate(_local2, _local3);
menuBmd.draw(_local5, _local6, null, null, null, true);
_local3 = (_local3 + 90);
} else {
_local6.scale(0.5, 0.5);
_local2 = 25;
_local6.translate(_local2, _local3);
menuBmd.draw(_local5, _local6, new ColorTransform(0, 0, 0, 1), null, null, true);
_local3 = (_local3 + 50);
};
};
}
private function hide(_arg1:Event):void{
if (parent != null){
parent.removeChild(this);
};
hideTimer.stop();
Map.instance.stage.removeEventListener(MouseEvent.CLICK, hide);
}
private function startTimer(_arg1:Event):void{
rebuildMenu();
hideTimer.stop();
hideTimer.start();
Map.instance.stage.addEventListener(MouseEvent.CLICK, hide);
}
public function nextWeapon():void{
var _local1 = selected;
var _local2 = 1;
var _local3 = (_local1[_local2] + 1);
_local1[_local2] = _local3;
if (selected[1] >= categories[selected[0]].length){
selected[1] = 0;
_local1 = selected;
_local2 = 0;
_local3 = (_local1[_local2] + 1);
_local1[_local2] = _local3;
if (selected[0] >= 5){
selected[0] = 0;
};
while (categories[selected[0]].length == 0) {
_local1 = selected;
_local2 = 0;
_local3 = (_local1[_local2] + 1);
_local1[_local2] = _local3;
if (selected[0] >= 5){
selected[0] = 0;
};
};
};
selectedId = categories[selected[0]][selected[1]][0];
Player.setWeapon(selectedId);
render();
Sounds.playEffect("menuClick1");
}
public function switchCategory(_arg1:int):void{
if (selected[0] != _arg1){
selected[0] = _arg1;
selected[1] = 0;
if (categories[_arg1].length > 0){
selectedId = categories[_arg1][selected[1]][0];
};
} else {
var _local2 = selected;
var _local3 = 1;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
if (selected[1] >= categories[_arg1].length){
selected[1] = 0;
};
if (categories[_arg1].length > 0){
selectedId = categories[_arg1][selected[1]][0];
};
};
if (categories[_arg1].length > 0){
Player.setWeapon(categories[_arg1][selected[1]][0]);
};
render();
Sounds.playEffect("menuClick1");
}
public function prevWeapon():void{
var _local1 = selected;
var _local2 = 1;
var _local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
if (selected[1] < 0){
_local1 = selected;
_local2 = 0;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
if (selected[0] < 0){
selected[0] = 4;
};
while (categories[selected[0]].length == 0) {
_local1 = selected;
_local2 = 0;
_local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
if (selected[0] < 0){
selected[0] = 4;
};
};
selected[1] = (categories[selected[0]].length - 1);
};
selectedId = categories[selected[0]][selected[1]][0];
Player.setWeapon(selectedId);
render();
Sounds.playEffect("menuClick1");
}
public static function get instance():WeaponSelector{
if (_instance == null){
new (WeaponSelector);
};
return (_instance);
}
public static function dispose():void{
if (_instance == null){
return;
};
var _local2 = _instance;
with (_local2) {
hide(null);
while (numChildren > 0) {
removeChildAt(0);
};
hideTimer.removeEventListener(TimerEvent.TIMER, hide);
removeEventListener(Event.ADDED, startTimer);
hideTimer.stop();
hideTimer = null;
};
_instance = null;
}
}
}//package org.hoah.zombies.ui
Section 168
//Weapon (org.hoah.zombies.weapons.Weapon)
package org.hoah.zombies.weapons {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.zombies.*;
import flash.geom.*;
import org.hoah.zombies.map.*;
import org.hoah.zombies.traps.*;
import org.hoah.zombies.ai.*;
import org.hoah.zombies.ui.*;
import org.hoah.zombies.soundeffects.*;
public class Weapon {
private var _shootTimer:Timer;
private var _lastShot:int;// = 0
private var _upgradeFasterShots:Boolean;// = false
public var magazine:int;// = 100
private var linkedFriend:Friend;// = null
private var _upgradeExplosiveShots:Boolean;// = false
public var id:int;// = 0
private var _upgradeTracers:Boolean;// = false
private var _reloading:uint;// = 0
public var automatic:Boolean;// = true
public var inaccuracy:Number;// = 0.05
private var _upgradePenetration:Boolean;// = false
private var _upgradeDoubleShot:Boolean;// = false
private var _upgradeMame:Boolean;// = false
public var currentMagazine:int;// = 100
private var isSentry:Boolean;// = false
private var isPlayer:Boolean;// = true
private var clearDelay:int;// = 1
public var perks:Array;
public var bulletsPerShot:int;// = 1
private var renderQueue:Array;
private var _upgradeSuperLaser:Boolean;// = false
private var _upgradeGrip:Boolean;// = false
private var _upgradeFastReload:Boolean;// = false
private var _shot:Boolean;// = false
public var has_laser:Boolean;// = false
public var lastShotDistance:int;// = 0
private var _upgradeMoreDamage:Boolean;// = false
public var reloadDelay:int;// = 250
public var soundBank:String;// = "pistol"
public var fireDelay:int;// = 50
public var damage:int;// = 1
public var currentUpgrades:Array;
public var weaponBitmap:BitmapSprite;
private var linkedTrap:Trap;// = null
public var playVocals:Boolean;// = false
private var stage:Stage;
public static var upgradeIndexes:Array = ["Grip", "SuperLaser", "FastReload", "FasterShots", "Tracers", "Mame", "ExplosiveShots", "Penetration", "DoubleShot", "MoreDamage"];
public static var playersWeapons:Array = [];
public static var friendWeaponBitmap:BitmapSprite;
public static var currentWeaponBitmap:BitmapSprite;
public static var upgrades:Array = [{variable:"Grip", name:"Grip", description:"You won't hit anything if you can't even hold your gun steady. With this, you might actually hit something.", cost:500, pack:false}, {variable:"SuperLaser", name:"Lazer Sight", description:"This laser sight shows where you're aiming, and the beam will turn green when there's a zombie in your sights! I hope you don't.", cost:1000, pack:false}, {variable:"FastReload", name:"Reload 'o matic", description:"This handy gadget will speed up your reload time, you'll barely need to take your finger off the trigger. Advice: Don't.", cost:3500, pack:false}, {variable:"FasterShots", name:"Supercharger", description:"Crank your weapon up a gear with a custom firing pin - you'll double your fire-rate, but watch your ammo!", cost:5000, pack:false}, {variable:"Tracers", name:"Tracers", description:"The tracer upgrade will make your bullets glow like a hive of irradiated hornets - now you can see just how badly you missed.", cost:1000, pack:false}, {variable:"Mame", name:"Expanding bullets", description:"Ouch! These bullets pack a punch and fragment on impact. One of these babies'll take off a zombie's arm like an angry bear! Fire angry bears today!", cost:5000, pack:false}, {variable:"ExplosiveShots", name:"Explosive Shots", description:"BOOM! This upgrade will increase your weapons stopping power, making each bullet pack a small explosion. Works great for crowd control! Also pretty.", cost:6000, pack:true}, {variable:"Penetration", name:"Supersonic bullets", description:"These supersonic rounds will penetrate straight through zombies, allowing you to mow down lines of zombies in seconds.", cost:6000, pack:true}, {variable:"DoubleShot", name:"Double Shots", description:"Double your payload! Think of it like a poorly mounted bayonet - split every bullet for twice the shots! Tip: Try this with a shotgun, enjoy!", cost:8000, pack:true}, {variable:"MoreDamage", name:"Silver bullets", description:"What's that? 'They're not werewolves!'? NEWSFLASH: IT SEEMS TO BE WORKING! Look, that one just exploded! Stop thinking, keep shooting!", cost:10000, pack:true}];
public static var ownedWeapons:Array = [0];
public static var curWeapon:String = "Pistol";
private static var _instances:Array = [];
public function Weapon(_arg1:Stage, _arg2:int=0, _arg3:Boolean=true, _arg4:Friend=null, _arg5:Trap=null){
perks = [];
_shootTimer = new Timer(1000);
currentUpgrades = [false, false, false, false, false, false, false, false, false, false];
renderQueue = [];
super();
_instances.push(this);
isPlayer = _arg3;
if (isPlayer){
playersWeapons[_arg2] = this;
} else {
if (_arg4 == null){
isSentry = true;
linkedTrap = _arg5;
} else {
linkedFriend = _arg4;
};
};
id = _arg2;
_shootTimer.delay = (fireDelay + 10);
_shootTimer.addEventListener(TimerEvent.TIMER, fire);
stage = _arg1;
setWeapon(_arg2);
}
public function render():void{
var _local1:Array;
if (renderQueue.length == 0){
return;
};
while (true) {
_local1 = renderQueue.pop();
Map.shotLayer.graphics.lineStyle(1, _local1[4], _local1[5]);
Map.shotLayer.graphics.moveTo(_local1[0], _local1[1]);
Map.shotLayer.graphics.lineTo(_local1[2], _local1[3]);
Map.shotLayer.graphics.lineStyle();
if (renderQueue.length == 0){
return;
};
};
}
private function stopShooting(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_UP, stopShooting);
_shootTimer.stop();
}
private function reload():void{
if (Zombies.paused){
return;
};
_reloading = 0;
currentMagazine = magazine;
WeaponDisplay.instance.renderAmmo();
}
private function setWeapon(_arg1:int):void{
var _local2:Array = Weapons.builtInArray[_arg1];
curWeapon = _local2[0];
magazine = _local2[1];
currentMagazine = magazine;
fireDelay = _local2[2];
reloadDelay = _local2[3];
inaccuracy = _local2[4];
automatic = _local2[5];
damage = _local2[6];
bulletsPerShot = _local2[7];
soundBank = _local2[8];
weaponBitmap = Weapons.cachedAssets[_local2[9]];
if (isPlayer){
currentWeaponBitmap = weaponBitmap;
} else {
friendWeaponBitmap = weaponBitmap;
};
has_laser = _local2[10];
}
public function renderLaser():void{
var _local8:Number;
var _local9:MapWall;
var _local10:Zombie;
var _local11:Point;
var _local12:Number;
var _local13:Number;
if ((((has_laser == false)) && ((_upgradeSuperLaser == false)))){
return;
};
if (Zombies.paused){
return;
};
var _local1:Number = (Player.instance.rotation * 0.0174532925);
var _local2:Point = new Point((Player.instance.x + (Math.cos((_local1 + (Math.PI * 0.75))) * 17)), (Player.instance.y + (Math.sin((_local1 + (Math.PI * 0.75))) * 17)));
if (isSentry){
_local1 = (linkedTrap.rotation * 0.017);
_local2 = new Point((linkedTrap.x + (Math.cos((_local1 + (Math.PI / 2))) * 20)), (linkedTrap.y + (Math.sin((_local1 + (Math.PI / 2))) * 20)));
} else {
if (isPlayer == false){
_local1 = (linkedFriend.rotation * 0.017);
_local2 = new Point((linkedFriend.x + (Math.cos((_local1 + (Math.PI * 0.75))) * 17)), (linkedFriend.y + (Math.sin((_local1 + (Math.PI * 0.75))) * 17)));
};
};
_local2.x = Math.round(_local2.x);
_local2.y = Math.round(_local2.y);
var _local3:Number = ((Player.instance.rotation * 0.0174) + (Math.PI / 2));
if (isSentry){
_local3 = ((linkedTrap.rotation * 0.0174) + (Math.PI / 2));
} else {
if (isPlayer == false){
_local3 = ((linkedFriend.rotation * 0.0174) + (Math.PI / 2));
};
};
while (_local3 < 0) {
_local3 = (_local3 + (Math.PI * 2));
};
while (_local3 > (Math.PI * 2)) {
_local3 = (_local3 - (Math.PI * 2));
};
var _local4:Number = Infinity;
var _local5:Zombie;
var _local6:Point = new Point(_local2.x, _local2.y);
var _local7:Point = new Point((_local2.x + (Math.cos(_local3) * 600)), (_local2.y + (Math.sin(_local3) * 600)));
for each (_local9 in Map.walls) {
_local11 = _local9.intersects(_local6, _local7);
if (_local11 != null){
_local8 = Point.distance(_local11, _local6);
if (_local8 < _local4){
_local4 = _local8;
};
};
};
for each (_local10 in Zombie.livingInstances) {
_local12 = Math.atan2((_local10.y - _local2.y), (_local10.x - _local2.x));
while (_local12 < 0) {
_local12 = (_local12 + (Math.PI * 2));
};
while (_local12 > (Math.PI * 2)) {
_local12 = (_local12 - (Math.PI * 2));
};
_local8 = Math.sqrt((Math.pow((_local2.x - _local10.x), 2) + Math.pow((_local2.y - _local10.y), 2)));
_local13 = 0;
if (_local8 < 100){
_local13 = ((100 - _local8) / 100);
};
if (Math.abs((_local3 - _local12)) < (0.03 + _local13)){
if (_local8 < _local4){
_local5 = _local10;
_local4 = _local8;
};
};
};
lastShotDistance = _local4;
if (lastShotDistance == 0){
lastShotDistance = 1000;
};
if (((!((_local5 == null))) && ((_upgradeSuperLaser == true)))){
Map.laserLayer.graphics.lineStyle(1, 0xFF00, 0.5);
} else {
Map.laserLayer.graphics.lineStyle(1, 0xFF0000, 0.25);
};
Map.laserLayer.graphics.moveTo(_local2.x, _local2.y);
Map.laserLayer.graphics.lineTo((_local2.x + (Math.cos(_local3) * lastShotDistance)), (_local2.y + (Math.sin(_local3) * lastShotDistance)));
Map.laserLayer.graphics.lineStyle();
}
private function fire(_arg1:Event):void{
var _local5:int;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Zombie;
var _local10:Point;
var _local11:Point;
var _local12:Number;
var _local13:Point;
var _local14:MapWall;
var _local15:int;
var _local16:Array;
var _local17:Zombie;
var _local18:int;
var _local19:int;
var _local20:Point;
var _local21:Number;
var _local22:Point;
var _local23:Number;
if (Zombies.paused){
return;
};
if (_reloading > 0){
return;
};
if (_upgradeFasterShots){
if ((getTimer() - _lastShot) < (fireDelay / 2)){
return;
};
} else {
if ((getTimer() - _lastShot) < fireDelay){
return;
};
};
currentMagazine--;
if (isPlayer){
WeaponDisplay.instance.renderAmmo();
};
if (currentMagazine == 0){
if (playVocals){
if (((((Math.random() * 10) < 3.3)) || ((magazine > 10)))){
_local6 = Math.random();
if (_local6 < 0.33){
Sounds.play3D((("vocal_" + linkedFriend.char) + "_reloading"), linkedFriend.x, linkedFriend.y, 1);
Subtitles.showVocal(linkedFriend.char, "Reloading!");
} else {
if ((((_local6 < 0.66)) || ((linkedFriend.char == "mimi")))){
Sounds.play3D((("vocal_" + linkedFriend.char) + "_reloading2"), linkedFriend.x, linkedFriend.y, 1);
Subtitles.showVocal(linkedFriend.char, "Reloading...");
} else {
Sounds.play3D((("vocal_" + linkedFriend.char) + "_coverme"), linkedFriend.x, linkedFriend.y, 1);
Subtitles.showVocal(linkedFriend.char, "Cover Me!");
};
};
};
};
forceReload();
};
_lastShot = getTimer();
_shot = true;
clearDelay = 1;
var _local2:Number = (Player.instance.rotation * 0.0174);
var _local3:Point = new Point((Player.instance.x + (Math.cos((_local2 + (Math.PI * 0.75))) * 17)), (Player.instance.y + (Math.sin((_local2 + (Math.PI * 0.75))) * 17)));
if (isSentry){
_local2 = (linkedTrap.rotation * 0.017);
_local3 = new Point((linkedTrap.x + (Math.cos((_local2 + (Math.PI / 2))) * 20)), (linkedTrap.y + (Math.sin((_local2 + (Math.PI / 2))) * 20)));
} else {
if (isPlayer == false){
_local2 = (linkedFriend.rotation * 0.0174);
_local3 = new Point((linkedFriend.x + (Math.cos((_local2 + (Math.PI * 0.75))) * 17)), (linkedFriend.y + (Math.sin((_local2 + (Math.PI * 0.75))) * 17)));
};
};
Sounds.play3D(Weapons.soundBanks[soundBank][0], _local3.x, _local3.y, 0.5);
var _local4:int = bulletsPerShot;
if (_upgradeDoubleShot){
_local4 = (_local4 * 2);
};
Map.particles.newMuzzleFlash((_local3.x + (Math.cos((_local2 + (Math.PI / 2))) * 3)), (_local3.y + (Math.sin((_local2 + (Math.PI / 2))) * 3)), _local4, _local2);
while (_local5 < _local4) {
lastShotDistance = 600;
_local7 = ((Player.instance.rotation * 0.0174) + (Math.PI / 2));
if (isSentry){
_local7 = ((linkedTrap.rotation * 0.0174) + (Math.PI / 2));
} else {
if (isPlayer == false){
_local7 = ((linkedFriend.rotation * 0.0174) + (Math.PI / 2));
};
};
if (_upgradeGrip){
_local7 = (_local7 + ((Math.random() * (inaccuracy / 2)) - (inaccuracy / 4)));
} else {
_local7 = (_local7 + ((Math.random() * inaccuracy) - (inaccuracy / 2)));
};
while (_local7 < 0) {
_local7 = (_local7 + (Math.PI * 2));
};
while (_local7 > (Math.PI * 2)) {
_local7 = (_local7 - (Math.PI * 2));
};
_local8 = Infinity;
_local9 = null;
_local10 = new Point(_local3.x, _local3.y);
_local11 = new Point((_local3.x + (Math.cos(_local7) * 600)), (_local3.y + (Math.sin(_local7) * 600)));
for each (_local14 in Map.walls) {
_local20 = _local14.intersects(_local10, _local11);
if (_local20 != null){
_local12 = Point.distance(_local20, _local10);
if (_local12 < _local8){
_local13 = _local20;
_local8 = _local12;
};
};
};
_local15 = _local8;
if (_local15 == 0){
_local15 = 1000;
};
_local16 = [];
for each (_local17 in Zombie.livingInstances) {
_local21 = Math.atan2((_local17.y - _local3.y), (_local17.x - _local3.x));
while (_local21 < 0) {
_local21 = (_local21 + (Math.PI * 2));
};
while (_local21 > (Math.PI * 2)) {
_local21 = (_local21 - (Math.PI * 2));
};
_local12 = Math.sqrt((Math.pow((_local3.x - _local17.x), 2) + Math.pow((_local3.y - _local17.y), 2)));
if ((((_local12 > _local8)) && ((_upgradePenetration == false)))){
} else {
if (((_upgradePenetration) && ((_local12 > _local15)))){
} else {
_local22 = new Point((_local3.x + (Math.cos(_local7) * _local12)), (_local3.y + (Math.sin(_local7) * _local12)));
if (Point.distance(_local22, new Point(_local17.x, _local17.y)) < 10){
_local16.push(_local17);
_local9 = _local17;
_local8 = _local12;
};
};
};
};
if (((_upgradePenetration) && ((_local16.length > 0)))){
for each (_local9 in _local16) {
_local23 = Math.atan2((_local9.y - _local3.y), (_local9.x - _local3.x));
Map.particles.newBloodSplat(_local9.x, _local9.y, _local23);
_local9.hit(damage);
if (_upgradeExplosiveShots){
Map.particles.newBulletExplode(_local9.x, _local9.y);
};
if (_upgradeMame){
_local9.randomDismember(0.3);
};
if (_upgradeMoreDamage){
_local9.hit(damage);
};
if (_upgradeExplosiveShots){
_local9.hit(5);
};
};
_local8 = _local15;
} else {
if (_local9 != null){
_local23 = Math.atan2((_local9.y - _local3.y), (_local9.x - _local3.x));
Map.particles.newBloodSplat(_local9.x, _local9.y, _local23);
_local9.hit(damage);
if (_upgradeExplosiveShots){
Map.particles.newBulletExplode(_local9.x, _local9.y);
};
if (_upgradeMame){
_local9.randomDismember(0.3);
};
if (_upgradeMoreDamage){
_local9.hit(damage);
};
if (_upgradeExplosiveShots){
_local9.hit(5);
};
} else {
if (_local13 != null){
_local23 = Math.atan2((_local13.y - _local3.y), (_local13.x - _local3.x));
Map.particles.newMuzzleFlash(_local13.x, _local13.y, 1, _local23);
if (_upgradeExplosiveShots){
Map.particles.newBulletExplode(_local13.x, _local13.y);
};
};
};
};
lastShotDistance = _local8;
if (lastShotDistance == 0){
lastShotDistance = 1000;
};
_local18 = (Math.random() * (lastShotDistance / 4));
_local19 = lastShotDistance;
if (_upgradeTracers){
renderQueue.push([(_local3.x + (Math.cos(_local7) * 10)), (_local3.y + (Math.sin(_local7) * 10)), (_local3.x + (Math.cos(_local7) * _local19)), (_local3.y + (Math.sin(_local7) * _local19)), 0xFFBB00, 1]);
} else {
renderQueue.push([(_local3.x + (Math.cos(_local7) * _local18)), (_local3.y + (Math.sin(_local7) * _local18)), (_local3.x + (Math.cos(_local7) * _local19)), (_local3.y + (Math.sin(_local7) * _local19)), 0, (0.2 + (Math.random() * 0.2))]);
};
_local5++;
};
}
public function setUpgrade(_arg1:String, _arg2:Boolean):void{
currentUpgrades[getUpgradeIndex(_arg1)] = _arg2;
this[("_upgrade" + _arg1)] = _arg2;
}
public function forceReload():void{
if (currentMagazine == magazine){
return;
};
if (_upgradeFastReload){
_reloading = setTimeout(reload, (reloadDelay / 2));
} else {
_reloading = setTimeout(reload, reloadDelay);
};
Sounds.playEffect(Weapons.soundBanks[soundBank][1]);
}
public function get shot():Boolean{
if (_shot){
_shot = false;
return (true);
};
return (false);
}
public function startShooting(_arg1:Boolean=true):void{
if (Zombies.paused){
return;
};
fire(null);
if (((automatic) && (_arg1))){
stage.addEventListener(MouseEvent.MOUSE_UP, stopShooting);
if (_upgradeFasterShots){
_shootTimer.delay = ((fireDelay + 10) / 2);
};
_shootTimer.start();
};
}
public static function dispose():void{
var w:Weapon;
for each (w in _instances) {
var _local4 = w;
with (_local4) {
_shootTimer.removeEventListener(TimerEvent.TIMER, fire);
Zombies.instance.stage.removeEventListener(MouseEvent.MOUSE_UP, stopShooting);
};
};
_instances = [];
playersWeapons = [];
ownedWeapons = [0];
currentWeaponBitmap = null;
friendWeaponBitmap = null;
}
public static function getUpgradeIndex(_arg1:String):int{
return (upgradeIndexes.indexOf(_arg1));
}
}
}//package org.hoah.zombies.weapons
Section 169
//Weapons (org.hoah.zombies.weapons.Weapons)
package org.hoah.zombies.weapons {
import org.hoah.zombies.*;
public class Weapons {
public static const builtInArray:Array = [["Glock 29SF", 12, 200, 1200, 0.05, false, 2, 1, "pistol", "pistol", false, 1000, 0, false], [".357 Magnum", 8, 160, 1400, 0.15, false, 18, 1, "revolver", "pistol_revolver", false, 5000, 0, false], ["92SB Silenced", 12, 180, 1000, 0.01, true, 7, 1, "smg", "pistol_upgraded", true, 8000, 0, false], ["Desert Eagle", 15, 200, 1000, 0.1, false, 20, 1, "deagle", "pistol_deagle", false, 10000, 0, true], ["MP5", 32, 60, 1200, 0.1, true, 4, 1, "smg", "smg_mp5", false, 7000, 1, false], ["Uzi", 30, 50, 1200, 0.12, true, 3, 1, "smg", "smg_uzi", false, 8000, 1, false], ["P90", 50, 40, 1300, 0.17, true, 4, 1, "smg", "smg_p90", false, 12000, 1, false], ["HK 51 +Laser", 32, 50, 1000, 0.15, true, 5, 1, "smg", "smg_laser", true, 16000, 1, true], ["FN Herstal SLP", 6, 250, 1500, 0.25, false, 4, 7, "shotgun", "shotgun_police", false, 10000, 2, false], ["Sawnoff Shotgun", 2, 100, 1200, 0.4, false, 6, 7, "shotgun", "shotgun_old", false, 8000, 2, false], ["Tactical Shotgun", 4, 250, 1000, 0.25, false, 4, 12, "shotgun", "shotgun_tactical", true, 14000, 2, false], ["12AA Auto-Shotgun", 20, 100, 2500, 0.3, true, 5, 7, "shotgun", "shotgun_aa12", false, 20000, 2, true], ["M16", 32, 60, 2200, 0.06, true, 5, 1, "assault", "assault_medium", false, 10000, 3, false], ["M54A1", 32, 60, 2000, 0.05, true, 6, 1, "assault", "assault_basic", false, 21000, 3, false], ["AK47", 30, 100, 2000, 0.12, true, 10, 1, "assault", "assault_ak47", false, 15000, 3, false], ["Vector MA4", 64, 40, 1400, 0.06, true, 8, 1, "assault", "assault_vector", false, 24500, 3, true], ["M2 +Magazine", 70, 50, 2000, 0.2, true, 8, 1, "heavy_mag", "heavy_magazine", false, 22000, 4, false], ["M2 Chainfeed", 160, 60, 3500, 0.25, true, 12, 1, "heavy_chain", "heavy_chainfeed", false, 25000, 4, false], ["Neveg A5", 90, 55, 3000, 0.2, true, 10, 1, "heavy_mag", "heavy_canisterfed", false, 25000, 4, true], ["UTG L96 Sniper", 8, 500, 1500, 0.01, false, 20, 1, "sniper", "sniper", true, 0x7D00, 4, false], ["Miminator", 22, 150, 1000, 0.04, false, 50, 2, "deagle", "none", false, int.MAX_VALUE, 5, false], ["Sentry", int.MAX_VALUE, 50, 0, 0.2, false, 10, 1, "heavy_mag", "none", true, int.MAX_VALUE, 5, false]];
private static var assets:Array = ["pistol", "pistol_deagle", "pistol_upgraded", "pistol_revolver", "smg_mp5", "smg_p90", "smg_uzi", "smg_laser", "shotgun_aa12", "shotgun_old", "shotgun_police", "shotgun_tactical", "assault_ak47", "assault_basic", "assault_medium", "assault_vector", "sniper", "heavy_canisterfed", "heavy_chainfeed", "heavy_magazine"];
public static var cachedAssets:Array = [];
public static var descriptions:Array = ["Standard pistol. This is the choice of pistol by the police force. It's lightweight and fast to reload. 12 bullet magazines.", "8-bullet Chamber. This .375 weapon will kill zombies fast, but it's difficult to reload and is less accurate.", "Silenced pistol. The 92SB comes complete with silencer, laser sight and automatic firing mode. Deadly accuracy makes this an all-round great pistol.", "This gold tiger-pattern Desert Eagle will kill anything in it's path. It holds 15 bullets per magazine and has a quick reload feature!", "The MP5 is the most popular SMG on the market. It's cheap to buy, boasts a 32 round magazine and fires up to 16 bullets per second.", "The UZI is a super lightweight and small SMG. It fires a massive 20 rounds per second and is guaranteed to make you look cool.", "The Herstal P90 is a modern SMG designed for high firepower with a compact design. Uses huge magazines capable of holding 50 bullets each.", "The HK 51 is the ultimate SMG. 32 round magazine, 20 rounds per second, and laser sight included.", "A.k.a. Police shotgun. This underloading shotgun can hold 6 cartridges. It's long barrel improves accuracy.", "This weapon is only intended for close-range use. Double barrels allow 2 cartridges to be loaded at once, but allows for fast reloading.", "This shotgun is the pros version of the sawnoff. Fires high-capacity cartriges, comes with a laser sight and has a 4-cartridge capacity.", "Usually reffered to as a Stryker, this shotgun is fully automatic, capable of firing up to 10 cartridges per second! Uses 20-cartridge drums.", "Possibly the most famous assault rifle ever. This fully automatic M16 can fire 16 rounds per second, with a magazine of 32.", "The M54A1 is a variation of the M16, providing faster reload times and improved accuracy.", "The AK47 is a powerful but inaccurate assault rifle. It fires 10 rounds per second, and is cheap to buy!", "The Vector MA4 is a top-loading assault rifle, capable of loading magazines with a 60-round capacity. Fires an incredible 25 rounds per second with deadly accuracy, however, it is expensive.", "This modern version of the M2 accepts a 70-round magazine. It fires 20 super powerful rounds per second, but due to it's weight is fairly inaccurate.", "This is the classic M2. With 160 rounds per chain, this is the ultimate crowd-control weapon. Due to it's design, reloading takes a long time.", "The Negev A5 is the russian alternative to the M2, Uses a 90-round canister based magazine system which allows slightly faster fire rate, and slightly faster reloading.", "This sniper rifle comes complete with a laser sight. Amazing accuracy makes this weapon perfect for both close and long-range shots. 8 round capacity."];
public static var soundBanks:Object = {pistol:["pistol", "reload1000"], revolver:["revolver", "reloadRevolver"], deagle:["deagle", "reload1000"], spistol:["smg", "reload1000"], smg:["smg", "reload1400"], shotgun:["shotgun", "reload2000"], sniper:["sniper", "reloadSnipe"], assault:["assault1", "reload2000"], heavy_mag:["assault1", "reload2000"], heavy_chain:["assault1", "reloadChain"]};
public static function cacheAssets():void{
var _local1:String;
for each (_local1 in assets) {
cachedAssets[_local1] = new BitmapSprite(Assets[("top_" + _local1)].bitmapData);
trace("Cached", ("top_" + _local1));
};
}
}
}//package org.hoah.zombies.weapons
Section 170
//Assets (org.hoah.zombies.Assets)
package org.hoah.zombies {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class Assets {
private static const _top_pistol_revolver:Class = Assets__top_pistol_revolver;
private static const _top_assault_medium:Class = Assets__top_assault_medium;
private static const _wep_sniper:Class = Assets__wep_sniper;
private static const _top_shotgun_tactical:Class = Assets__top_shotgun_tactical;
private static const _wep_pistol_revolver:Class = Assets__wep_pistol_revolver;
private static const _wep_assault_vector:Class = Assets__wep_assault_vector;
private static const _top_shotgun_police:Class = Assets__top_shotgun_police;
private static const _top_assault_basic:Class = Assets__top_assault_basic;
private static const _top_shotgun_old:Class = Assets__top_shotgun_old;
private static const _sponsorBrandingPlaceholderCls:Class = Assets__sponsorBrandingPlaceholderCls;
private static const _wep_assault_medium:Class = Assets__wep_assault_medium;
private static const _top_heavy_canisterfed:Class = Assets__top_heavy_canisterfed;
private static const _buyWeaponsButtonCls:Class = Assets__buyWeaponsButtonCls;
private static const _top_smg_mp5:Class = Assets__top_smg_mp5;
private static const _assetsSWFCls:Class = Assets__assetsSWFCls;
private static const _wep_assault_ak47:Class = Assets__wep_assault_ak47;
private static const _weaponSelectorCls:Class = Assets__weaponSelectorCls;
private static const _wep_pistol:Class = Assets__wep_pistol;
private static const _upgradeWeaponsCls:Class = Assets__upgradeWeaponsCls;
private static const _smoke_bmp_cls:Class = Assets__smoke_bmp_cls;
private static const _armourySelectorCls:Class = Assets__armourySelectorCls;
private static const _wep_shotgun_police:Class = Assets__wep_shotgun_police;
private static const _flashlightMask2Bmd:Class = Assets__flashlightMask2Bmd;
private static const _extrasBackgroundCls:Class = Assets__extrasBackgroundCls;
private static const _wep_smg_laser:Class = Assets__wep_smg_laser;
private static const _embNormal:Class = Assets__embNormal;
private static const _top_sniper:Class = Assets__top_sniper;
private static const _wep_heavy_chainfeed:Class = Assets__wep_heavy_chainfeed;
private static const _mainMenuBgCls:Class = Assets__mainMenuBgCls;
private static const _wep_shotgun_old:Class = Assets__wep_shotgun_old;
private static const _wep_smg_uzi:Class = Assets__wep_smg_uzi;
private static const _assets1hoahFile:Class = Assets__assets1hoahFile;
private static const _top_heavy_magazine:Class = Assets__top_heavy_magazine;
private static const _assets1Class:Class = Assets__assets1Class;
private static const _top_heavy_chainfeed:Class = Assets__top_heavy_chainfeed;
private static const _top_smg_p90:Class = Assets__top_smg_p90;
private static const _buyWeaponsScreenCls:Class = Assets__buyWeaponsScreenCls;
private static const _wep_shotgun_aa12:Class = Assets__wep_shotgun_aa12;
private static const _top_smg_laser:Class = Assets__top_smg_laser;
private static const _hoahGamingLogoCls:Class = Assets__hoahGamingLogoCls;
private static const _buyButtonsCls:Class = Assets__buyButtonsCls;
private static const _wep_heavy_magazine:Class = Assets__wep_heavy_magazine;
private static const _wep_heavy_canisterfed:Class = Assets__wep_heavy_canisterfed;
private static const _top_pistol:Class = Assets__top_pistol;
private static const _sponsorLogocls:Class = Assets__sponsorLogocls;
private static const _wep_pistol_deagle:Class = Assets__wep_pistol_deagle;
private static const _wep_smg_mp5:Class = Assets__wep_smg_mp5;
private static const _creditsBackgroundCls:Class = Assets__creditsBackgroundCls;
private static const _trapsPanelCls:Class = Assets__trapsPanelCls;
private static const _wep_assault_basic:Class = Assets__wep_assault_basic;
private static const _top_assault_ak47:Class = Assets__top_assault_ak47;
private static const _wep_shotgun_tactical:Class = Assets__wep_shotgun_tactical;
private static const _mimiIntroBmd:Class = Assets__mimiIntroBmd;
private static const _map1Bmd:Class = Assets__map1Bmd;
private static const _useMimiButtonBmd:Class = Assets__useMimiButtonBmd;
private static const _buyNowButtonCls:Class = Assets__buyNowButtonCls;
private static const _top_assault_vector:Class = Assets__top_assault_vector;
private static const _top_smg_uzi:Class = Assets__top_smg_uzi;
private static const _map1LightBmd:Class = Assets__map1LightBmd;
private static const _top_shotgun_aa12:Class = Assets__top_shotgun_aa12;
private static const _top_pistol_upgraded:Class = Assets__top_pistol_upgraded;
private static const _wep_pistol_upgraded:Class = Assets__wep_pistol_upgraded;
private static const _wep_smg_p90:Class = Assets__wep_smg_p90;
private static const _top_pistol_deagle:Class = Assets__top_pistol_deagle;
public static var sponsorBrandingPlaceholder:Bitmap = new _sponsorBrandingPlaceholderCls();
public static var wep_shotgun_police:Bitmap = new _wep_shotgun_police();
public static var wep_assault_basic:Bitmap = new _wep_assault_basic();
public static var buyWeaponsButtonBitmap:Bitmap = new _buyWeaponsButtonCls();
public static var ellaPortrait:Bitmap;
public static var upgradeWeapons:Bitmap = new _upgradeWeaponsCls();
public static var buyButtons:Bitmap = new _buyButtonsCls();
public static var wep_heavy_canisterfed:Bitmap = new _wep_heavy_canisterfed();
public static var wep_assault_ak47:Bitmap = new _wep_assault_ak47();
public static var ellaModel:Bitmap;
public static var zombie3_walk_dismember_L:Bitmap;
public static var zombie3_walk_dismember_R:Bitmap;
public static var top_heavy_magazine:Bitmap = new _top_heavy_magazine();
public static var zombie_walk:Bitmap;
public static var upgradeIconPenetrationBmp:Bitmap;
public static var map1LightBitmap:Bitmap = new _map1LightBmd();
public static var nextRound:Bitmap;
public static var top_smg_mp5:Bitmap = new _top_smg_mp5();
public static var upgradeIconGripBmp:Bitmap;
public static var goreChunk1:Bitmap;
public static var goreChunk2:Bitmap;
public static var goreChunk3:Bitmap;
public static var upgradeIconDoubleShotBmp:Bitmap;
public static var goreChunk4:Bitmap;
public static var goreChunk5:Bitmap;
public static var explodeDecal1:Bitmap;
public static var explodeDecal2:Bitmap;
public static var gib1:Bitmap;
public static var gib2:Bitmap;
public static var wep_sniper:Bitmap = new _wep_sniper();
public static var top_pistol_deagle:Bitmap = new _top_pistol_deagle();
public static var uiBottomLeft:Bitmap;
public static var wep_heavy_magazine:Bitmap = new _wep_heavy_magazine();
public static var hoahGamingLogo:Bitmap = new _hoahGamingLogoCls();
public static var wep_smg_uzi:Bitmap = new _wep_smg_uzi();
public static var upgradeIconLaserBmp:Bitmap;
private static var _readyFunction:Function;
public static var achievementProgressBarForeground:Bitmap;
public static var top_pistol_upgraded:Bitmap = new _top_pistol_upgraded();
public static var wep_shotgun_aa12:Bitmap = new _wep_shotgun_aa12();
public static var top_shotgun_old:Bitmap = new _top_shotgun_old();
public static var top_smg_p90:Bitmap = new _top_smg_p90();
public static var wep_pistol_upgraded:Bitmap = new _wep_pistol_upgraded();
public static var upgradeIconExplosiveBmp:Bitmap;
public static var wep_shotgun_tactical:Bitmap = new _wep_shotgun_tactical();
public static var trapsPanel:Bitmap = new _trapsPanelCls();
public static var wep_smg_laser:Bitmap = new _wep_smg_laser();
public static var playerModel:Bitmap;
public static var wep_pistol_revolver:Bitmap = new _wep_pistol_revolver();
public static var top_assault_basic:Bitmap = new _top_assault_basic();
public static var top_pistol_revolver:Bitmap = new _top_pistol_revolver();
public static var zombieArtSmallerBitmap:Bitmap;
public static var wep_pistol:Bitmap = new _wep_pistol();
public static var top_smg_laser:Bitmap = new _top_smg_laser();
public static var useMimiButtonBitmap:Bitmap = new _useMimiButtonBmd();
public static var wep_shotgun_old:Bitmap = new _wep_shotgun_old();
public static var top_assault_ak47:Bitmap = new _top_assault_ak47();
public static var mainMenuBgBmd:BitmapData = new _mainMenuBgCls().bitmapData;
public static var extrasButtonLeft:Bitmap;
public static var weaponSelectorBitmap:Bitmap = new _weaponSelectorCls();
public static var achievementUnlocked:Bitmap;
public static var upgradeIconElectricBmp:Bitmap;
public static var top_shotgun_tactical:Bitmap = new _top_shotgun_tactical();
public static var top_assault_vector:Bitmap = new _top_assault_vector();
public static var wep_smg_mp5:Bitmap = new _wep_smg_mp5();
public static var map1Original:BitmapData;
public static var closeButton:Bitmap;
public static var upgradeIconMameBmp:Bitmap;
public static var top_sniper:Bitmap = new _top_sniper();
public static var armourySelectorBitmap:Bitmap = new _armourySelectorCls();
public static var flashlightMaskBitmap2:Bitmap = new _flashlightMask2Bmd();
public static var top_heavy_canisterfed:Bitmap = new _top_heavy_canisterfed();
public static var top_assault_medium:Bitmap = new _top_assault_medium();
public static var mimiIntroBitmap:Bitmap = new _mimiIntroBmd();
private static var _assetLoader:Loader = new Loader();
public static var creditsBackground:Bitmap = new _creditsBackgroundCls();
public static var blood1:Bitmap;
public static var blood2:Bitmap;
public static var blood3:Bitmap;
public static var uiBottomRight:Bitmap;
public static var wep_assault_vector:Bitmap = new _wep_assault_vector();
private static var _assetsBmp:Bitmap = new _assets1Class();
public static var top_smg_uzi:Bitmap = new _top_smg_uzi();
public static var smokeBmd:BitmapData = new _smoke_bmp_cls().bitmapData;
public static var top_heavy_chainfeed:Bitmap = new _top_heavy_chainfeed();
public static var buyNowButtonBitmap:Bitmap = new _buyNowButtonCls();
public static var top_shotgun_aa12:Bitmap = new _top_shotgun_aa12();
public static var wep_heavy_chainfeed:Bitmap = new _wep_heavy_chainfeed();
public static var achievementProgressBack:Bitmap;
public static var top_pistol:Bitmap = new _top_pistol();
public static var top_shotgun_police:Bitmap = new _top_shotgun_police();
public static var inited:Boolean = false;
public static var wep_assault_medium:Bitmap = new _wep_assault_medium();
public static var extrasButtonRight:Bitmap;
public static var wep_smg_p90:Bitmap = new _wep_smg_p90();
public static var wep_pistol_deagle:Bitmap = new _wep_pistol_deagle();
public static var buyWeaponsScreenBitmap:Bitmap = new _buyWeaponsScreenCls();
public static var mimiModel:Bitmap;
public static var upgradeIconSilverBulletsBmp:Bitmap;
public static var upgradeIconFastShotsBmp:Bitmap;
public static var map1Bitmap:Bitmap = new _map1Bmd();
public static var sponsorLogo:Bitmap = new _sponsorLogocls();
public static var extrasBackground:Bitmap = new _extrasBackgroundCls();
public static var mimiPortrait:Bitmap;
public static var upgradeIconReloadBmp:Bitmap;
public static var zombie_walk_dismember_L:Bitmap;
public static var zombie3_walk:Bitmap;
public static var zombie_walk_dismember_R:Bitmap;
public static function getInstance(_arg1:String):MovieClip{
return (new ((_assetLoader.contentLoaderInfo.applicationDomain.getDefinition(_arg1) as Class)));
}
public static function init(_arg1:Function):void{
inited = true;
_assetLoader.loadBytes(new _assetsSWFCls());
_assetLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchReady);
_readyFunction = _arg1;
map1Original = map1Bitmap.bitmapData.clone();
loadHoahFile((new _assets1hoahFile() as ByteArray));
}
public static function dispatchReady(_arg1:Event):void{
_readyFunction();
}
private static function loadHoahFile(_arg1:ByteArray):void{
var _local2:String;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:BitmapData;
_arg1.uncompress();
while (_arg1.bytesAvailable > 0) {
_local2 = _arg1.readUTF();
_local3 = _arg1.readShort();
_local4 = _arg1.readShort();
_local5 = _arg1.readShort();
_local6 = _arg1.readShort();
_local7 = new BitmapData(_local5, _local6, true, 0);
_local7.copyPixels(_assetsBmp.bitmapData, new Rectangle(_local3, _local4, _local5, _local6), new Point(), null, null, true);
Assets[_local2] = new Bitmap(_local7);
trace("HoahEmbedFileEntry:", _local2);
};
}
}
}//package org.hoah.zombies
Section 171
//Assets__armourySelectorCls (org.hoah.zombies.Assets__armourySelectorCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__armourySelectorCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 172
//Assets__assets1Class (org.hoah.zombies.Assets__assets1Class)
package org.hoah.zombies {
import mx.core.*;
public class Assets__assets1Class extends BitmapAsset {
}
}//package org.hoah.zombies
Section 173
//Assets__assets1hoahFile (org.hoah.zombies.Assets__assets1hoahFile)
package org.hoah.zombies {
import mx.core.*;
public class Assets__assets1hoahFile extends ByteArrayAsset {
}
}//package org.hoah.zombies
Section 174
//Assets__assetsSWFCls (org.hoah.zombies.Assets__assetsSWFCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__assetsSWFCls extends ByteArrayAsset {
}
}//package org.hoah.zombies
Section 175
//Assets__buyButtonsCls (org.hoah.zombies.Assets__buyButtonsCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__buyButtonsCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 176
//Assets__buyNowButtonCls (org.hoah.zombies.Assets__buyNowButtonCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__buyNowButtonCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 177
//Assets__buyWeaponsButtonCls (org.hoah.zombies.Assets__buyWeaponsButtonCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__buyWeaponsButtonCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 178
//Assets__buyWeaponsScreenCls (org.hoah.zombies.Assets__buyWeaponsScreenCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__buyWeaponsScreenCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 179
//Assets__creditsBackgroundCls (org.hoah.zombies.Assets__creditsBackgroundCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__creditsBackgroundCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 180
//Assets__embNormal (org.hoah.zombies.Assets__embNormal)
package org.hoah.zombies {
import mx.core.*;
public class Assets__embNormal extends FontAsset {
}
}//package org.hoah.zombies
Section 181
//Assets__extrasBackgroundCls (org.hoah.zombies.Assets__extrasBackgroundCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__extrasBackgroundCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 182
//Assets__flashlightMask2Bmd (org.hoah.zombies.Assets__flashlightMask2Bmd)
package org.hoah.zombies {
import mx.core.*;
public class Assets__flashlightMask2Bmd extends BitmapAsset {
}
}//package org.hoah.zombies
Section 183
//Assets__hoahGamingLogoCls (org.hoah.zombies.Assets__hoahGamingLogoCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__hoahGamingLogoCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 184
//Assets__mainMenuBgCls (org.hoah.zombies.Assets__mainMenuBgCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__mainMenuBgCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 185
//Assets__map1Bmd (org.hoah.zombies.Assets__map1Bmd)
package org.hoah.zombies {
import mx.core.*;
public class Assets__map1Bmd extends BitmapAsset {
}
}//package org.hoah.zombies
Section 186
//Assets__map1LightBmd (org.hoah.zombies.Assets__map1LightBmd)
package org.hoah.zombies {
import mx.core.*;
public class Assets__map1LightBmd extends BitmapAsset {
}
}//package org.hoah.zombies
Section 187
//Assets__mimiIntroBmd (org.hoah.zombies.Assets__mimiIntroBmd)
package org.hoah.zombies {
import mx.core.*;
public class Assets__mimiIntroBmd extends BitmapAsset {
}
}//package org.hoah.zombies
Section 188
//Assets__smoke_bmp_cls (org.hoah.zombies.Assets__smoke_bmp_cls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__smoke_bmp_cls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 189
//Assets__sponsorBrandingPlaceholderCls (org.hoah.zombies.Assets__sponsorBrandingPlaceholderCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__sponsorBrandingPlaceholderCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 190
//Assets__sponsorLogocls (org.hoah.zombies.Assets__sponsorLogocls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__sponsorLogocls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 191
//Assets__top_assault_ak47 (org.hoah.zombies.Assets__top_assault_ak47)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_assault_ak47 extends BitmapAsset {
}
}//package org.hoah.zombies
Section 192
//Assets__top_assault_basic (org.hoah.zombies.Assets__top_assault_basic)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_assault_basic extends BitmapAsset {
}
}//package org.hoah.zombies
Section 193
//Assets__top_assault_medium (org.hoah.zombies.Assets__top_assault_medium)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_assault_medium extends BitmapAsset {
}
}//package org.hoah.zombies
Section 194
//Assets__top_assault_vector (org.hoah.zombies.Assets__top_assault_vector)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_assault_vector extends BitmapAsset {
}
}//package org.hoah.zombies
Section 195
//Assets__top_heavy_canisterfed (org.hoah.zombies.Assets__top_heavy_canisterfed)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_heavy_canisterfed extends BitmapAsset {
}
}//package org.hoah.zombies
Section 196
//Assets__top_heavy_chainfeed (org.hoah.zombies.Assets__top_heavy_chainfeed)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_heavy_chainfeed extends BitmapAsset {
}
}//package org.hoah.zombies
Section 197
//Assets__top_heavy_magazine (org.hoah.zombies.Assets__top_heavy_magazine)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_heavy_magazine extends BitmapAsset {
}
}//package org.hoah.zombies
Section 198
//Assets__top_pistol (org.hoah.zombies.Assets__top_pistol)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_pistol extends BitmapAsset {
}
}//package org.hoah.zombies
Section 199
//Assets__top_pistol_deagle (org.hoah.zombies.Assets__top_pistol_deagle)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_pistol_deagle extends BitmapAsset {
}
}//package org.hoah.zombies
Section 200
//Assets__top_pistol_revolver (org.hoah.zombies.Assets__top_pistol_revolver)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_pistol_revolver extends BitmapAsset {
}
}//package org.hoah.zombies
Section 201
//Assets__top_pistol_upgraded (org.hoah.zombies.Assets__top_pistol_upgraded)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_pistol_upgraded extends BitmapAsset {
}
}//package org.hoah.zombies
Section 202
//Assets__top_shotgun_aa12 (org.hoah.zombies.Assets__top_shotgun_aa12)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_shotgun_aa12 extends BitmapAsset {
}
}//package org.hoah.zombies
Section 203
//Assets__top_shotgun_old (org.hoah.zombies.Assets__top_shotgun_old)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_shotgun_old extends BitmapAsset {
}
}//package org.hoah.zombies
Section 204
//Assets__top_shotgun_police (org.hoah.zombies.Assets__top_shotgun_police)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_shotgun_police extends BitmapAsset {
}
}//package org.hoah.zombies
Section 205
//Assets__top_shotgun_tactical (org.hoah.zombies.Assets__top_shotgun_tactical)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_shotgun_tactical extends BitmapAsset {
}
}//package org.hoah.zombies
Section 206
//Assets__top_smg_laser (org.hoah.zombies.Assets__top_smg_laser)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_smg_laser extends BitmapAsset {
}
}//package org.hoah.zombies
Section 207
//Assets__top_smg_mp5 (org.hoah.zombies.Assets__top_smg_mp5)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_smg_mp5 extends BitmapAsset {
}
}//package org.hoah.zombies
Section 208
//Assets__top_smg_p90 (org.hoah.zombies.Assets__top_smg_p90)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_smg_p90 extends BitmapAsset {
}
}//package org.hoah.zombies
Section 209
//Assets__top_smg_uzi (org.hoah.zombies.Assets__top_smg_uzi)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_smg_uzi extends BitmapAsset {
}
}//package org.hoah.zombies
Section 210
//Assets__top_sniper (org.hoah.zombies.Assets__top_sniper)
package org.hoah.zombies {
import mx.core.*;
public class Assets__top_sniper extends BitmapAsset {
}
}//package org.hoah.zombies
Section 211
//Assets__trapsPanelCls (org.hoah.zombies.Assets__trapsPanelCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__trapsPanelCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 212
//Assets__upgradeWeaponsCls (org.hoah.zombies.Assets__upgradeWeaponsCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__upgradeWeaponsCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 213
//Assets__useMimiButtonBmd (org.hoah.zombies.Assets__useMimiButtonBmd)
package org.hoah.zombies {
import mx.core.*;
public class Assets__useMimiButtonBmd extends BitmapAsset {
}
}//package org.hoah.zombies
Section 214
//Assets__weaponSelectorCls (org.hoah.zombies.Assets__weaponSelectorCls)
package org.hoah.zombies {
import mx.core.*;
public class Assets__weaponSelectorCls extends BitmapAsset {
}
}//package org.hoah.zombies
Section 215
//Assets__wep_assault_ak47 (org.hoah.zombies.Assets__wep_assault_ak47)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_assault_ak47 extends BitmapAsset {
}
}//package org.hoah.zombies
Section 216
//Assets__wep_assault_basic (org.hoah.zombies.Assets__wep_assault_basic)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_assault_basic extends BitmapAsset {
}
}//package org.hoah.zombies
Section 217
//Assets__wep_assault_medium (org.hoah.zombies.Assets__wep_assault_medium)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_assault_medium extends BitmapAsset {
}
}//package org.hoah.zombies
Section 218
//Assets__wep_assault_vector (org.hoah.zombies.Assets__wep_assault_vector)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_assault_vector extends BitmapAsset {
}
}//package org.hoah.zombies
Section 219
//Assets__wep_heavy_canisterfed (org.hoah.zombies.Assets__wep_heavy_canisterfed)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_heavy_canisterfed extends BitmapAsset {
}
}//package org.hoah.zombies
Section 220
//Assets__wep_heavy_chainfeed (org.hoah.zombies.Assets__wep_heavy_chainfeed)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_heavy_chainfeed extends BitmapAsset {
}
}//package org.hoah.zombies
Section 221
//Assets__wep_heavy_magazine (org.hoah.zombies.Assets__wep_heavy_magazine)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_heavy_magazine extends BitmapAsset {
}
}//package org.hoah.zombies
Section 222
//Assets__wep_pistol (org.hoah.zombies.Assets__wep_pistol)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_pistol extends BitmapAsset {
}
}//package org.hoah.zombies
Section 223
//Assets__wep_pistol_deagle (org.hoah.zombies.Assets__wep_pistol_deagle)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_pistol_deagle extends BitmapAsset {
}
}//package org.hoah.zombies
Section 224
//Assets__wep_pistol_revolver (org.hoah.zombies.Assets__wep_pistol_revolver)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_pistol_revolver extends BitmapAsset {
}
}//package org.hoah.zombies
Section 225
//Assets__wep_pistol_upgraded (org.hoah.zombies.Assets__wep_pistol_upgraded)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_pistol_upgraded extends BitmapAsset {
}
}//package org.hoah.zombies
Section 226
//Assets__wep_shotgun_aa12 (org.hoah.zombies.Assets__wep_shotgun_aa12)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_shotgun_aa12 extends BitmapAsset {
}
}//package org.hoah.zombies
Section 227
//Assets__wep_shotgun_old (org.hoah.zombies.Assets__wep_shotgun_old)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_shotgun_old extends BitmapAsset {
}
}//package org.hoah.zombies
Section 228
//Assets__wep_shotgun_police (org.hoah.zombies.Assets__wep_shotgun_police)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_shotgun_police extends BitmapAsset {
}
}//package org.hoah.zombies
Section 229
//Assets__wep_shotgun_tactical (org.hoah.zombies.Assets__wep_shotgun_tactical)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_shotgun_tactical extends BitmapAsset {
}
}//package org.hoah.zombies
Section 230
//Assets__wep_smg_laser (org.hoah.zombies.Assets__wep_smg_laser)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_smg_laser extends BitmapAsset {
}
}//package org.hoah.zombies
Section 231
//Assets__wep_smg_mp5 (org.hoah.zombies.Assets__wep_smg_mp5)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_smg_mp5 extends BitmapAsset {
}
}//package org.hoah.zombies
Section 232
//Assets__wep_smg_p90 (org.hoah.zombies.Assets__wep_smg_p90)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_smg_p90 extends BitmapAsset {
}
}//package org.hoah.zombies
Section 233
//Assets__wep_smg_uzi (org.hoah.zombies.Assets__wep_smg_uzi)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_smg_uzi extends BitmapAsset {
}
}//package org.hoah.zombies
Section 234
//Assets__wep_sniper (org.hoah.zombies.Assets__wep_sniper)
package org.hoah.zombies {
import mx.core.*;
public class Assets__wep_sniper extends BitmapAsset {
}
}//package org.hoah.zombies
Section 235
//BitmapSprite (org.hoah.zombies.BitmapSprite)
package org.hoah.zombies {
import flash.display.*;
import flash.geom.*;
public class BitmapSprite {
public var y:Number;
private var _bmd:BitmapData;
public var x:Number;
private var _bmdCache:Array;
private var _clip:Boolean;// = false
private var _spinPos:int;// = 0
private var _accuracy:int;
public var bmd:BitmapData;
private var _clipSprite:Sprite;
private var _rotation:Number;// = 1
private static var cache:Array = [];
private static var cacheIds:Array = [];
public function BitmapSprite(_arg1:BitmapData, _arg2:Boolean=false, _arg3:int=64){
var _local4:String;
var _local5:Number;
_bmdCache = [];
super();
_accuracy = _arg3;
_clip = _arg2;
if (_arg2){
_clipSprite = new Sprite();
_clipSprite.graphics.beginFill(0);
_clipSprite.graphics.drawRect(0, 0, _arg1.width, _arg1.height);
_clipSprite.graphics.drawEllipse(2, 2, (_arg1.width - 4), (_arg1.height - 4));
_clipSprite.graphics.endFill();
};
for (_local4 in cacheIds) {
if (_arg1 == cacheIds[_local4]){
_bmdCache = cache[_local4];
return;
};
};
_bmd = _arg1;
_local5 = 0;
while (_local5 < 360) {
addFrame(_local5);
_local5 = (_local5 + (360 / _accuracy));
};
rotation = 0;
cacheIds.push(_bmd);
cache.push(_bmdCache);
_bmd = null;
}
public function get rotation():Number{
return (_rotation);
}
private function addFrame(_arg1:Number):void{
var _local2:BitmapData = new BitmapData(_bmd.width, _bmd.height, true, 0);
var _local3:Matrix = new Matrix();
_local3.translate((-(_bmd.width) / 2), (-(_bmd.height) / 2));
_local3.rotate((_arg1 * 0.017453));
_local3.translate((_bmd.width / 2), (_bmd.height / 2));
_local2.draw(_bmd, _local3, null, null, null, true);
if (_clip){
_local2.draw(_clipSprite);
};
_bmdCache.push(_local2);
}
public function render(_arg1:BitmapData, _arg2:Boolean=true):void{
_arg1.copyPixels(bmd, bmd.rect, new Point(x, y), null, null, _arg2);
}
public function set rotation(_arg1:Number):void{
_arg1 = Math.floor(_arg1);
if (_arg1 == _rotation){
return;
};
while (_arg1 < 0) {
_arg1 = (_arg1 + 360);
};
while (_arg1 > 360) {
_arg1 = (_arg1 - 360);
};
_spinPos = Math.floor((_arg1 / (360 / _accuracy)));
_rotation = _arg1;
if (_spinPos >= _bmdCache.length){
_spinPos = 0;
};
bmd = _bmdCache[_spinPos];
}
}
}//package org.hoah.zombies
Section 236
//LightSwitch (org.hoah.zombies.LightSwitch)
package org.hoah.zombies {
import flash.events.*;
import flash.utils.*;
import org.hoah.debug.*;
import org.hoah.Tweener.*;
import org.hoah.zombies.ui.*;
import org.hoah.zombies.soundeffects.*;
public class LightSwitch {
public var x:Number;// = 0
public var y:Number;// = 0
private static var _created:Boolean = false;
public static var instance:LightSwitch = null;
public function LightSwitch(){
if (_created){
return;
};
instance = this;
_created = true;
x = 959;
y = 305;
}
private function playVocal():void{
Sounds.playEffect("vocal_ella_zombie");
Subtitles.showVocal("ella", "ZOMBIE!");
}
private function checkSwitch(_arg1:Event):void{
var _local2:Number = Math.sqrt((Math.pow((x - Player.instance.x), 2) + Math.pow((y - Player.instance.y), 2)));
if (_local2 < 20){
Map.instance.removeEventListener(Event.ENTER_FRAME, checkSwitch);
Map.instance.switchLights(true);
Tweener.addTween(Map.instance, {alpha:0.2, time:0.1, delay:0.2});
Tweener.addTween(Map.instance, {alpha:1, time:0.3, delay:0.5});
Tweener.addTween(Map.instance, {alpha:0.2, time:0.1, delay:1});
Tweener.addTween(Map.instance, {alpha:0.8, time:0.6, delay:1.5});
Tweener.addTween(Map.instance, {alpha:1, time:0.1, delay:2.4});
Map.instance.spawnZombie(null, 546, 360);
Sounds.playEffect("lightswitch");
Sounds.spawnAmbience("ambient_fuseboard", x, y, 0.2, 400);
setTimeout(playVocal, 500);
Tracer.info("Player found lightswitch.");
};
}
public function reset():void{
Map.instance.addEventListener(Event.ENTER_FRAME, checkSwitch);
}
public static function dispose():void{
if (instance == null){
return;
};
Map.instance.removeEventListener(Event.ENTER_FRAME, instance.checkSwitch);
instance = null;
_created = false;
}
}
}//package org.hoah.zombies
Section 237
//Map (org.hoah.zombies.Map)
package org.hoah.zombies {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import org.hoah.zombies.map.*;
import org.hoah.zombies.traps.*;
import org.hoah.zombies.ai.*;
import org.hoah.shadows.*;
import org.hoah.zombies.weapons.*;
import org.hoah.particles.*;
import flash.filters.*;
import flash.ui.*;
public class Map extends Sprite {
private var tmpTrapBmp:Bitmap;
private var flashLightLayer:BitmapData;
private var noiseBmd:BitmapData;
private var tmpTrapRotation:int;// = 0
public var flashlightSprite:BitmapSprite;
public var spriteLayer:Sprite;
public var zombies:Array;
public var spawnTimer:Timer;
public var lightsOff:Boolean;// = true
private var mapXML:XML;
public var mapHeight:Number;// = 1000
public var disposed:Boolean;// = false
public var offsetY:Number;// = 0
private var tmpTrapCls:Class;
public var offsetX:Number;// = 0
public var zombieSpawnPoints:Array;
private var _mapXML:Class;
private var tmpTrapPrice:int;// = 0
public var mapWidth:Number;// = 1000
public var shadowWorld:ShadowWorld;
private var rotating:int;// = 0
private var smokeLoopPosX:int;// = 0
private var smokeLoopPosY:int;// = 0
private var placingTrap:Boolean;// = false
public var player:Player;
private var tmpTrap:BitmapSprite;
private var laserCleared:Boolean;// = false
private var canPlaceTrap:Boolean;// = false
public var paths:Array;
private var canPlaceFilters:Array;
public var debugSprite:Sprite;
public var rooms:Array;
public static var laserLayer:Sprite = new Sprite();
public static var walls:Array = [];
public static var screen:BitmapData;
public static var particles:ParticleRenderer;
public static var currentMapXML:XML;
public static var instance:Map;
public static var shotLayer:Sprite = new Sprite();
public function Map(){
var _local1:XML;
var _local2:int;
var _local3:XML;
var _local4:XML;
var _local5:ShadowCastingObject;
var _local6:XML;
var _local7:Array;
var _local8:Array;
var _local9:Array;
var _local10:Point;
var _local11:Point;
zombies = [];
zombieSpawnPoints = [];
spawnTimer = new Timer(50);
_mapXML = Map__mapXML;
debugSprite = new Sprite();
shadowWorld = new ShadowWorld();
rooms = [];
paths = [];
spriteLayer = new Sprite();
tmpTrapBmp = new Bitmap(new BitmapData(50, 50, true));
canPlaceFilters = [new GlowFilter(4521847, 1, 6, 6, 2)];
flashLightLayer = new BitmapData(640, 480, true);
noiseBmd = new BitmapData(640, 480, true, 4294967295);
super();
if (instance != null){
return;
};
disposed = false;
focusRect = new Rectangle(0, 0, 0, 0);
instance = this;
mapXML = _mapXML.data;
currentMapXML = mapXML;
new Pather();
player = new Player();
screen = new BitmapData(640, 480, false);
addChild(new Bitmap(screen));
addChild(shadowWorld);
addEventListener(Event.ENTER_FRAME, render);
particles = new ParticleRenderer(screen, this);
for each (_local1 in mapXML.room) {
rooms[_local1.@name] = _local1;
_local1.@left = int(_local1.@x);
_local1.@top = int(_local1.@y);
_local1.@right = (int(_local1.@x) + int(_local1.@width));
_local1.@bottom = (int(_local1.@y) + int(_local1.@height));
};
_local2 = 0;
for each (_local3 in mapXML.path) {
var _temp1 = _local2;
_local2 = (_local2 + 1);
_local3.@id = _temp1;
paths.push(_local3);
};
for each (_local4 in mapXML.shadowWall) {
_local5 = new ShadowCastingObject();
for each (_local6 in _local4.point) {
_local7 = _local6.valueOf().toString().split(",");
_local5.addPoint(new ShadowCasterPoint(_local7[0], _local7[1]));
};
shadowWorld.addObject(_local5);
};
addEventListener(Event.ADDED_TO_STAGE, setQuality);
addChild(spriteLayer);
spriteLayer.addChild(shotLayer);
spriteLayer.addChild(laserLayer);
addChild(debugSprite);
for each (_local4 in mapXML.wall) {
_local8 = _local4.@p1.split(",");
_local9 = _local4.@p2.split(",");
_local10 = new Point(_local8[0], _local8[1]);
_local11 = new Point(_local9[0], _local9[1]);
walls.push(new MapWall(_local10, _local11));
};
spawnTimer.addEventListener(TimerEvent.TIMER, spawnZombie);
flashlightSprite = new BitmapSprite(Assets.flashlightMaskBitmap2.bitmapData, true);
}
private function placeTrapFinish(_arg1:MouseEvent):void{
if (canPlaceTrap == false){
return;
};
dispatchEvent(new Event("placed"));
placingTrap = false;
removeEventListener(Event.ENTER_FRAME, updateTrapPlacing);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, startRotate);
stage.removeEventListener(MouseEvent.CLICK, placeTrapFinish);
stage.removeEventListener(KeyboardEvent.KEY_UP, stopRotate);
stage.removeEventListener(MouseEvent.MOUSE_WHEEL, rotateWheel);
if (UserInterface.spendPoints(tmpTrapPrice) == false){
UserInterface.instance.showTip("You can't afford that!");
return;
};
var _local2:Trap = new tmpTrapCls((-(offsetX) + mouseX), (-(offsetY) + mouseY), tmpTrapRotation);
_local2.placed();
if (tmpTrapBmp.parent == spriteLayer){
spriteLayer.removeChild(tmpTrapBmp);
};
}
private function updateTrapPlacing(_arg1:Event):void{
if (rotating != 0){
tmpTrapRotation = (tmpTrapRotation + rotating);
};
canPlaceTrap = checkTrapPlaceable();
tmpTrap.rotation = tmpTrapRotation;
tmpTrapBmp.bitmapData.copyPixels(tmpTrap.bmd, tmpTrap.bmd.rect, new Point(), null, null, false);
if (canPlaceTrap == false){
tmpTrapBmp.filters = [];
tmpTrapBmp.bitmapData.colorTransform(tmpTrapBmp.bitmapData.rect, new ColorTransform(1, 0, 0, 0.7));
} else {
tmpTrapBmp.filters = canPlaceFilters;
tmpTrapBmp.bitmapData.colorTransform(tmpTrapBmp.bitmapData.rect, new ColorTransform(1, 1, 1, 0.7));
};
tmpTrapBmp.x = ((-(offsetX) + mouseX) - 25);
tmpTrapBmp.y = ((-(offsetY) + mouseY) - 25);
}
public function spawnChunks(_arg1:Zombie):void{
var _local2:int = ((_arg1.x + (Math.random() * 20)) - 10);
var _local3:int = ((_arg1.y + (Math.random() * 20)) - 10);
var _local4:int = Math.floor((Math.random() * 4.9999));
var _local5:BitmapData = Assets[("goreChunk" + (_local4 + 1))].bitmapData;
_local2 = (_local2 - (_local5.width / 2));
_local3 = (_local3 - (_local5.height / 2));
var _local6:Number = ((Math.random() * Math.PI) * 2);
blitBitmap(_local2, _local3, _local5, _local6);
}
private function checkTrapPlaceable():Boolean{
var _local3:Trap;
var _local4:int;
var _local5:Number;
var _local6:int;
var _local1:Number = (-(offsetX) + mouseX);
var _local2:Number = (-(offsetY) + mouseY);
for each (_local3 in Trap.traps) {
_local5 = Math.sqrt((Math.pow((_local3.x - _local1), 2) + Math.pow((_local3.y - _local2), 2)));
if (_local5 < 25){
return (false);
};
};
_local1 = (_local1 - 20);
_local2 = (_local2 - 20);
_local4 = _local1;
while (_local4 <= (_local1 + 40)) {
_local6 = _local2;
while (_local6 <= (_local2 + 40)) {
if (getRoom(new Point(_local4, _local6)) == "none"){
return (false);
};
_local6 = (_local6 + 10);
};
_local4 = (_local4 + 10);
};
return (true);
}
public function spawnExplosionDecal(_arg1:Number, _arg2:Number):void{
var _local3:int = Math.floor((Math.random() * 2));
var _local4:BitmapData = Assets[("explodeDecal" + (_local3 + 1))].bitmapData;
blitBitmap((_arg1 - 30), (_arg2 - 30), _local4, ((Math.random() * Math.PI) * 2));
}
public function spawnZombie(_arg1:Event=null, _arg2:Number=0, _arg3:Number=0):void{
var _local5:Zombie;
var _local6:MapSpawnPoint;
if (Zombies.paused){
return;
};
var _local4:int;
while (_local4 < 2) {
if (_arg1 == null){
_local5 = new Zombie(null);
_local5.setPosition(_arg2, _arg3);
break;
} else {
if (_arg1.type == "mimi"){
_local5 = new Zombie(Pather.spawnPoints[1], true);
_local5.speed++;
_local5.health = 25;
_local5.x = (_local5.x - (Math.random() * 120));
_local5.y = (_local5.y - (Math.random() * 120));
break;
} else {
_local6 = Pather.spawnPoints[Math.floor((Math.random() * Pather.spawnPoints.length))];
new Zombie(_local6);
};
};
_local4++;
};
}
private function blitBitmap(_arg1:Number, _arg2:Number, _arg3:BitmapData, _arg4:Number=0):void{
var _local5:BitmapData = new BitmapData(_arg3.width, _arg3.height, true, 0);
var _local6:Matrix = new Matrix();
_local6.translate((-(_arg3.width) / 2), (-(_arg3.height) / 2));
_local6.rotate(_arg4);
_local6.translate((_arg3.width / 2), (_arg3.height / 2));
_local5.draw(_arg3, _local6, null, null, null, true);
Assets.map1Bitmap.bitmapData.copyPixels(_local5, _local5.rect, new Point(_arg1, _arg2), null, null, true);
}
public function render(_arg1:Event):void{
var _local2:Trap;
var _local3:TrapSentry;
var _local4:Zombie;
var _local5:Friend;
var _local7:Number;
if (disposed){
return;
};
if (lightsOff){
screen.fillRect(screen.rect, 0);
};
screen.copyPixels(Assets.map1Bitmap.bitmapData, Assets.map1Bitmap.bitmapData.rect, new Point(offsetX, offsetY));
spriteLayer.x = offsetX;
spriteLayer.y = offsetY;
debugSprite.x = offsetX;
debugSprite.y = offsetY;
laserLayer.graphics.clear();
shotLayer.graphics.clear();
for each (_local2 in Trap.traps) {
screen.copyPixels(_local2.bmd, _local2.bmd.rect, new Point(((offsetX + _local2.x) - 25), ((offsetY + _local2.y) - 25)), null, null, true);
};
for each (_local3 in TrapSentry.instances) {
_local3.update();
};
for each (_local4 in Zombie.instances) {
screen.copyPixels(_local4.bmd, _local4.bmd.rect, new Point(((offsetX + _local4.x) - 20), ((offsetY + _local4.y) - 20)), null, null, true);
_local4.update();
};
for each (_local5 in Friend.instances) {
_local5.update();
screen.copyPixels(_local5.bmd, _local5.bmd.rect, new Point(((offsetX + _local5.x) - 20), ((offsetY + _local5.y) - 20)), null, null, true);
};
if (Friend.instances[0] != null){
if (Weapon.friendWeaponBitmap != null){
_local7 = (Friend.instances[0].rotation * 0.0174);
Weapon.friendWeaponBitmap.rotation = (Friend.instances[0].rotation + 180);
screen.copyPixels(Weapon.friendWeaponBitmap.bmd, Weapon.friendWeaponBitmap.bmd.rect, new Point((((offsetX + Friend.instances[0].x) + (Math.cos((_local7 + (Math.PI * 0.75))) * 12)) - 25), (((offsetY + Friend.instances[0].y) + (Math.sin((_local7 + (Math.PI * 0.75))) * 12)) - 25)), null, null, true);
};
};
player.update();
screen.copyPixels(player.bmd, player.bmd.rect, new Point(((offsetX + player.x) - 20), ((offsetY + player.y) - 20)), null, null, true);
if (Weapon.currentWeaponBitmap != null){
_local7 = (player.rotation * 0.0174);
Weapon.currentWeaponBitmap.rotation = (player.rotation + 180);
screen.copyPixels(Weapon.currentWeaponBitmap.bmd, Weapon.currentWeaponBitmap.bmd.rect, new Point((((offsetX + player.x) + (Math.cos((_local7 + (Math.PI * 0.75))) * 15)) - 25), (((offsetY + player.y) + (Math.sin((_local7 + (Math.PI * 0.75))) * 15)) - 25)), null, null, true);
};
smokeLoopPosX = (smokeLoopPosX + 1);
if (smokeLoopPosX > 0){
smokeLoopPosX = -351;
};
var _local6:int;
while (_local6 < 1300) {
screen.copyPixels(Assets.smokeBmd, Assets.smokeBmd.rect, new Point(((offsetX + _local6) + smokeLoopPosX), offsetY), null, null, true);
screen.copyPixels(Assets.smokeBmd, Assets.smokeBmd.rect, new Point(((offsetX + _local6) - (smokeLoopPosX + 351)), (offsetY - 10)), null, null, true);
_local6 = (_local6 + 351);
};
if (lightsOff){
flashLightLayer.fillRect(flashLightLayer.rect, 4278190080);
flashlightSprite.rotation = (player.rotation - 180);
flashlightSprite.x = ((offsetX + player.x) - 240);
flashlightSprite.y = ((offsetY + player.y) - 240);
flashlightSprite.render(flashLightLayer, false);
screen.copyPixels(flashLightLayer, flashLightLayer.rect, new Point(), null, null, true);
if ((320 - (offsetX + player.x)) < 0){
screen.fillRect(new Rectangle(0, 0, -((320 - (offsetX + player.x))), 480), 0);
} else {
screen.fillRect(new Rectangle((640 - (320 - (offsetX + player.x))), 0, (320 - (offsetX + player.x)), 480), 0);
};
shadowWorld.x = offsetX;
shadowWorld.y = offsetY;
} else {
screen.copyPixels(Assets.map1LightBitmap.bitmapData, Assets.map1LightBitmap.bitmapData.rect, new Point(offsetX, offsetY));
};
}
private function setQuality(_arg1:Event):void{
stage.quality = StageQuality.MEDIUM;
removeEventListener(Event.ADDED_TO_STAGE, setQuality);
}
private function rotateWheel(_arg1:MouseEvent):void{
if (_arg1.delta > 0){
tmpTrapRotation = (tmpTrapRotation + 4);
} else {
tmpTrapRotation = (tmpTrapRotation - 4);
};
}
public function placeTrap(_arg1:BitmapSprite, _arg2:Class, _arg3:int):void{
if (_arg3 > Player.points){
UserInterface.instance.showTip("You can't afford that!");
return;
};
tmpTrapPrice = _arg3;
placingTrap = true;
tmpTrap = _arg1;
tmpTrapCls = _arg2;
tmpTrapBmp.bitmapData.fillRect(tmpTrapBmp.bitmapData.rect, 0);
tmpTrapBmp.bitmapData.copyPixels(_arg1.bmd, _arg1.bmd.rect, new Point(), null, null, false);
tmpTrapBmp.bitmapData.colorTransform(tmpTrapBmp.bitmapData.rect, new ColorTransform(1, 0, 0, 1));
spriteLayer.addChild(tmpTrapBmp);
addEventListener(Event.ENTER_FRAME, updateTrapPlacing);
stage.addEventListener(KeyboardEvent.KEY_DOWN, startRotate);
setTimeout(addListener, 100);
stage.addEventListener(KeyboardEvent.KEY_UP, stopRotate);
stage.addEventListener(MouseEvent.MOUSE_WHEEL, rotateWheel);
}
private function startRotate(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.LEFT){
rotating = -4;
} else {
if (_arg1.keyCode == Keyboard.RIGHT){
rotating = 4;
};
};
}
public function gameOver():void{
var _local2:Zombie;
removeEventListener(Event.ENTER_FRAME, render);
spawnTimer.stop();
var _local1:Array = [];
for each (_local2 in Zombie.instances) {
_local1.push(_local2);
};
for each (_local2 in _local1) {
_local2.dispose();
};
}
public function spawnGib(_arg1:Zombie):void{
var _local2:BitmapData = Assets.gib1.bitmapData;
blitBitmap((_arg1.x - 25), (_arg1.y - 25), _local2, ((Math.random() * Math.PI) * 2));
}
private function getRoom(_arg1:Point):String{
var _local2:XML;
for each (_local2 in Map.instance.rooms) {
if ((((_arg1.x > _local2.@left)) && ((_arg1.x < _local2.@right)))){
if ((((_arg1.y > _local2.@top)) && ((_arg1.y < _local2.@bottom)))){
return (_local2.@name);
};
};
};
return ("none");
}
public function switchLights(_arg1:Boolean):void{
if (_arg1){
lightsOff = false;
stage.quality = StageQuality.MEDIUM;
if (shadowWorld.parent == this){
removeChild(shadowWorld);
};
} else {
lightsOff = true;
stage.quality = StageQuality.MEDIUM;
if (shadowWorld.parent != this){
addChild(shadowWorld);
};
};
}
public function spewBlood(_arg1:Zombie):void{
var _local2:int = Math.floor((Math.random() * 3));
var _local3:BitmapData = Assets[("blood" + (_local2 + 1))].bitmapData;
var _local4:Number = 0;
if (_local2 == 0){
_local4 = ((_arg1.rotation - 90) * 0.0174);
} else {
_local4 = ((Math.random() * Math.PI) * 2);
};
blitBitmap((_arg1.x - 25), (_arg1.y - 25), _local3, _local4);
}
private function addListener():void{
stage.addEventListener(MouseEvent.CLICK, placeTrapFinish);
}
public function cancelPlaceTrap():void{
placingTrap = false;
dispatchEvent(new Event("placed"));
removeEventListener(Event.ENTER_FRAME, updateTrapPlacing);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, startRotate);
stage.removeEventListener(MouseEvent.CLICK, placeTrapFinish);
stage.removeEventListener(KeyboardEvent.KEY_UP, stopRotate);
stage.removeEventListener(MouseEvent.MOUSE_WHEEL, rotateWheel);
}
private function stopRotate(_arg1:KeyboardEvent):void{
if ((((_arg1.keyCode == Keyboard.LEFT)) || ((_arg1.keyCode == Keyboard.RIGHT)))){
rotating = 0;
};
}
public static function dispose():void{
var _local2 = instance;
with (_local2) {
particles.particles = [];
particles.screen = null;
Assets.map1Bitmap.bitmapData.dispose();
Assets.map1Bitmap = new Bitmap(Assets.map1Original.clone());
spawnTimer.removeEventListener(TimerEvent.TIMER, spawnZombie);
player = null;
while (numChildren > 0) {
removeChildAt(0);
};
removeEventListener(Event.ENTER_FRAME, render);
disposed = true;
};
instance = null;
}
}
}//package org.hoah.zombies
Section 238
//Map__mapXML (org.hoah.zombies.Map__mapXML)
package org.hoah.zombies {
public class Map__mapXML {
public static var data:XML = <map>
<entryPoint id="1" dir="D" x="280" y="200"/>
<entryPoint id="2" dir="D" x="600" y="200"/>
<entryPoint id="3" dir="D" x="925" y="200"/>
<entryPoint id="4" dir="R" x="205" y="560"/>
<entryPoint id="5" dir="R" x="205" y="890"/>
<spawn x="-20" y="-20" entryPoints="1,2,3,4,5"/>
<spawn x="-20" y="320" entryPoints="4,5"/>
<spawn x="-20" y="620" entryPoints="4,5"/>
<spawn x="320" y="-20" entryPoints="1,2,3"/>
<spawn x="620" y="-20" entryPoints="1,2,3"/>
<room name="redCorridor" x="237" y="228" width="430" height="84"/>
<room name="orangeCorridor" x="237" y="311" width="102" height="298"/>
<room name="blueCorridor" x="237" y="609" width="102" height="360"/>
<room name="beigeCorridor" x="338" y="331" width="349" height="72"/>
<room name="greenCorridor" x="338" y="844" width="313" height="126"/>
<room name="pinkCorridor" x="649" y="844" width="325" height="126"/>
<room name="greyRoom" x="685" y="230" width="290" height="173"/>
<room name="greenRoom" x="358" y="421" width="287" height="405"/>
<room name="brownRoom" x="663" y="421" width="312" height="405"/>
<room name="doorway1" x="360" y="402" width="77" height="20"/>
<room name="doorway2" x="642" y="453" width="22" height="60"/>
<room name="doorway3" x="642" y="724" width="22" height="60"/>
<room name="doorway4" x="898" y="825" width="77" height="20"/>
<path room1="redCorridor" room2="orangeCorridor" rect1="245,295,90,13" rect2="245,313,90,13"/>
<path room1="orangeCorridor" room2="blueCorridor" rect1="245,593,90,13" rect2="245,611,90,13"/>
<path room1="orangeCorridor" room2="beigeCorridor" rect1="323,332,13,70" rect2="341,332,13,70"/>
<path room1="blueCorridor" room2="greenCorridor" rect1="323,853,13,109" rect2="342,853,13,109"/>
<path room1="beigeCorridor" room2="doorway1" rect1="364,390,70,13" rect2="364,404,70,5"/>
<path room1="beigeCorridor" room2="greyRoom" rect1="670,332,13,70" rect2="688,332,13,70"/>
<path room1="greenCorridor" room2="pinkCorridor" rect1="633,853,13,109" rect2="651,853,13,109"/>
<path room1="doorway1" room2="greenRoom" rect1="364,415,70,5" rect2="364,422,70,13"/>
<path room1="pinkCorridor" room2="doorway4" rect1="901,845,70,13" rect2="901,838,70,5"/>
<path room1="greenRoom" room2="doorway2" rect1="632,453,13,60" rect2="646,453,5,60"/>
<path room1="greenRoom" room2="doorway3" rect1="632,724,13,60" rect2="646,724,5,60"/>
<path room1="doorway4" room2="brownRoom" rect1="901,827,70,5" rect2="901,813,70,13"/>
<path room1="doorway2" room2="brownRoom" rect1="657,453,5,60" rect2="664,453,13,60"/>
<path room1="doorway3" room2="brownRoom" rect1="657,724,5,60" rect2="664,724,13,60"/>
<shadowWall>
<point>339,404</point>
<point>339,844</point>
<point>897,844</point>
<point>897,826</point>
<point>663,826</point>
<point>663,785</point>
<point>645,785</point>
<point>645,826</point>
<point>358,826</point>
<point>358,404</point>
</shadowWall>
<shadowWall>
<point>645,514</point>
<point>645,724</point>
<point>663,724</point>
<point>663,514</point>
</shadowWall>
<shadowWall>
<point>439,403</point>
<point>439,421</point>
<point>645,421</point>
<point>645,453</point>
<point>663,453</point>
<point>663,421</point>
<point>976,421</point>
<point>976,403</point>
</shadowWall>
<shadowWall>
<point>339,313</point>
<point>339,331</point>
<point>685,331</point>
<point>685,230</point>
<point>907,230</point>
<point>907,210</point>
<point>656,210</point>
<point>656,230</point>
<point>667,230</point>
<point>667,313</point>
</shadowWall>
<shadowWall>
<point>958,230</point>
<point>1000,230</point>
<point>1000,210</point>
<point>958,210</point>
</shadowWall>
<shadowWall>
<point>306,230</point>
<point>563,230</point>
<point>563,210</point>
<point>306,210</point>
</shadowWall>
<shadowWall>
<point>306,230</point>
<point>563,230</point>
<point>563,210</point>
<point>306,210</point>
</shadowWall>
<shadowWall>
<point>236,230</point>
<point>255,230</point>
<point>255,210</point>
<point>216,210</point>
<point>216,538</point>
<point>236,538</point>
</shadowWall>
<shadowWall>
<point>216,588</point>
<point>216,873</point>
<point>236,873</point>
<point>236,588</point>
</shadowWall>
<shadowWall>
<point>216,923</point>
<point>216,989</point>
<point>236,989</point>
<point>236,923</point>
</shadowWall>
<wall p1="236,230" p2="255,230"/>
<wall p1="236,230" p2="236,537"/>
<wall p1="236,588" p2="236,873"/>
<wall p1="236,923" p2="236,970"/>
<wall p1="236,970" p2="975,970"/>
<wall p1="975,970" p2="975,231"/>
<wall p1="975,230" p2="957,230"/>
<wall p1="907,230" p2="655,230"/>
<wall p1="563,230" p2="305,230"/>
<wall p1="675,230" p2="675,322"/>
<wall p1="675,322" p2="339,322"/>
<wall p1="349,404" p2="349,833"/>
<wall p1="349,833" p2="897,833"/>
<wall p1="655,833" p2="655,785"/>
<wall p1="655,724" p2="655,514"/>
<wall p1="655,453" p2="655,411"/>
<wall p1="439,411" p2="974,411"/>
</map>
;
}
}//package org.hoah.zombies
Section 239
//Pather (org.hoah.zombies.Pather)
package org.hoah.zombies {
import org.hoah.zombies.map.*;
public class Pather {
private var foundPaths:Array;
private var endRoom:MapRoom;
private var startRoom:MapRoom;
public static var routes:Array = [];
public static var entryPoints:Array = [];
public static var rooms:Array = [];
public static var paths:Array = [];
public static var spawnPoints:Array = [];
public function Pather(){
var _local2:XML;
var _local3:XML;
var _local4:XML;
var _local5:XML;
var _local6:MapRoom;
var _local7:MapRoom;
foundPaths = [];
super();
var _local1:XML = Map.currentMapXML;
for each (_local2 in _local1.entryPoint) {
entryPoints.push(new MapEntryPoint(_local2));
};
for each (_local3 in _local1.spawn) {
spawnPoints.push(new MapSpawnPoint(_local3));
};
for each (_local4 in _local1.room) {
rooms.push(new MapRoom(_local4));
};
for each (_local5 in _local1.path) {
paths.push(new MapPath(_local5));
};
for each (_local6 in rooms) {
routes[_local6.name] = [];
for each (_local7 in rooms) {
if (_local6 == _local7){
} else {
routes[_local6.name][_local7.name] = findRoute(_local6, _local7);
};
};
};
}
private function findRoute(_arg1:MapRoom, _arg2:MapRoom):Array{
var _local4:MapRoute;
var _local5:MapRoute;
var _local6:MapRoute;
startRoom = _arg1;
endRoom = _arg2;
foundPaths = [];
findRouteRecurse([], _arg1, _arg2);
var _local3:Number = Infinity;
for each (_local6 in foundPaths) {
if (_local6.length < _local3){
_local5 = _local4;
_local3 = _local6.length;
_local4 = _local6;
};
};
if (_local5 == null){
return ([_local4]);
};
if (_local5.length > (_local4.length * 2)){
if ((((_arg1.name == "greenRoom")) || ((_arg2.name == "greenRoom")))){
if (_local5.length < (_local4.length * 3)){
return ([_local4, _local5]);
};
return ([_local4]);
};
return ([_local4]);
};
return ([_local4, _local5]);
}
private function findRouteRecurse(_arg1:Array, _arg2:MapRoom, _arg3:MapRoom):void{
var _local4:MapPath;
var _local5:Array;
var _local6:MapPath;
var _local7:MapRoom;
for each (_local4 in _arg2.paths) {
if (_arg1.indexOf(_local4) > -1){
} else {
_local5 = [];
for each (_local6 in _arg1) {
_local5.push(_local6);
};
_local5.push(_local4);
if (_local4.room1 == _arg2){
_local7 = _local4.room2;
} else {
_local7 = _local4.room1;
};
if (_local7 == _arg3){
foundPaths.push(new MapRoute(startRoom, endRoom, _local5));
} else {
findRouteRecurse(_local5, _local7, _arg3);
};
};
};
}
}
}//package org.hoah.zombies
Section 240
//Player (org.hoah.zombies.Player)
package org.hoah.zombies {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.shadows.*;
import org.hoah.zombies.ui.*;
import org.hoah.zombies.weapons.*;
import org.hoah.zombies.soundeffects.*;
import org.hoah.zombies.rounds.*;
import org.hoah.memory.*;
public class Player extends BitmapSprite {
public var weaponRange:Number;// = 250
public var speed:Number;// = 5
private var _reset:Boolean;// = true
private var _keysDown:Array;
public var light:Light;
public var stepTimer:Timer;
public var maxHealth:int;// = 10
public var health:int;// = 10
public var dead:Boolean;// = false
private var _shot:Boolean;// = false
private var _moving:Boolean;// = false
private var _shotDistance:Number;// = 0
public var currentRoom:String;// = "none"
public var curWeapon:Weapon;
public static var zombiesKilled:int = 0;
public static var instance:Player;
public static var eventObject:Sprite = new Sprite();
public function Player(){
stepTimer = new Timer(250);
_keysDown = [];
light = new Light(10, 10, 0xFFFFFF);
super(Assets.playerModel.bitmapData);
if (instance != null){
return;
};
light.intensity = 0.8;
instance = this;
x = 609;
y = (480 / 2);
light.x = x;
light.y = y;
Map.instance.shadowWorld.addLight(light);
Map.instance.shadowWorld.moveLights();
Map.instance.addEventListener(Event.ADDED_TO_STAGE, addedToStage);
stepTimer.addEventListener(TimerEvent.TIMER, stepped);
}
private function stepped(_arg1:Event):void{
stepTimer.delay = (200 + (Math.random() * 50));
if (!Zombies.paused){
Sounds.playEffect(("step" + Math.ceil((Math.random() * 3))), 0.5);
};
}
private function onKeyDown(_arg1:KeyboardEvent):void{
if (Zombies.paused){
return;
};
_keysDown[_arg1.keyCode] = true;
}
private function onKeyUp(_arg1:KeyboardEvent):void{
if (Zombies.paused){
return;
};
if (_arg1.keyCode == 82){
curWeapon.forceReload();
};
_keysDown[_arg1.keyCode] = false;
}
public function update():void{
var _local3:XML;
var _local4:Number;
if (Zombies.paused){
return;
};
if (dead){
return;
};
if (curWeapon != null){
curWeapon.renderLaser();
curWeapon.render();
};
rotation = ((Math.atan2((y - (-(Map.instance.offsetY) + Map.instance.mouseY)), (x - (-(Map.instance.offsetX) + Map.instance.mouseX))) * 57.29) + 90);
if (Map.instance.lightsOff){
_local4 = (-(rotation) * 0.0174);
light.setPosition((x + (Math.cos(_local4) * 5)), (y + (Math.sin(_local4) * 5)));
Map.instance.shadowWorld.render();
};
var _local1:Number = x;
var _local2:Number = y;
if (((_keysDown[87]) || (_keysDown[38]))){
y = (y - speed);
};
if (((_keysDown[83]) || (_keysDown[40]))){
y = (y + speed);
};
if (((_keysDown[65]) || (_keysDown[37]))){
x = (x - speed);
};
if (((_keysDown[68]) || (_keysDown[39]))){
x = (x + speed);
};
moving = ((!((_local1 == x))) || (!((_local2 == y))));
for each (_local3 in Map.instance.rooms) {
if ((((x > _local3.@left)) && ((x < _local3.@right)))){
if ((((y > _local3.@top)) && ((y < _local3.@bottom)))){
if (currentRoom != _local3.@name){
currentRoom = _local3.@name;
eventObject.dispatchEvent(new Event("change_room"));
};
return;
};
};
};
x = _local1;
y = _local2;
}
public function bite():void{
if (dead){
return;
};
health--;
if (health == 0){
Map.instance.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
Map.instance.stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);
Map.instance.stage.removeEventListener(MouseEvent.MOUSE_DOWN, startShooting);
dead = true;
UserInterface.instance.endTime = getTimer();
Zombies.instance.dead();
} else {
Zombies.instance.hurt();
};
}
private function startShooting(_arg1:MouseEvent):void{
if (Round.intermission){
return;
};
if (Zombies.paused){
return;
};
if (Menu.displayed){
return;
};
curWeapon.startShooting();
}
public function set moving(_arg1:Boolean):void{
if (_moving == _arg1){
return;
};
_moving = _arg1;
if (_arg1){
stepTimer.start();
} else {
stepTimer.stop();
};
}
private function addedToStage(_arg1:Event):void{
curWeapon = new Weapon(Map.instance.stage);
Weapon.currentWeaponBitmap = instance.curWeapon.weaponBitmap;
Map.instance.removeEventListener(Event.ADDED_TO_STAGE, addedToStage);
Map.instance.stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
Map.instance.stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
Map.instance.stage.addEventListener(MouseEvent.MOUSE_DOWN, startShooting);
}
public static function get points():int{
return (ProtectedMemory.readInt("points"));
}
public static function set points(_arg1:int):void{
ProtectedMemory.writeVariable("points", _arg1);
}
public static function get totalPoints():int{
return (ProtectedMemory.readInt("totalPoints"));
}
public static function set totalPoints(_arg1:int):void{
ProtectedMemory.writeVariable("totalPoints", _arg1);
}
public static function setWeapon(_arg1:int):void{
instance.curWeapon = Weapon.playersWeapons[_arg1];
Weapon.currentWeaponBitmap = instance.curWeapon.weaponBitmap;
WeaponDisplay.instance.render();
WeaponDisplay.instance.renderAmmo();
}
public static function dispose():void{
var _local2 = instance;
with (_local2) {
light.intensity = 0.8;
x = 609;
y = (480 / 2);
light.x = x;
light.y = y;
_keysDown = [];
Zombies.instance.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
Zombies.instance.stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);
Zombies.instance.stage.removeEventListener(MouseEvent.MOUSE_DOWN, startShooting);
curWeapon = null;
};
instance = null;
points = 0;
zombiesKilled = 0;
totalPoints = 0;
}
}
}//package org.hoah.zombies
Section 241
//Powerup (org.hoah.zombies.Powerup)
package org.hoah.zombies {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.filters.*;
public class Powerup extends Sprite {
public var flashTimer:Timer;
public var timeToDie:int;// = 6
public var type:int;// = 0
public static const TYPE_NUKE:int = 2;
public static const TYPE_RAND:int = 0;
public static const TYPE_INSTAKILL:int = 1;
public static var instakillTimer:Timer = new Timer(30000);
private static var instances:Array = [];
private static var _inited:Boolean = false;
public static var spawnChance:Number = 100;
public static var isInstakill:Boolean = false;
public function Powerup(_arg1:Number, _arg2:Number, _arg3:int=0){
flashTimer = new Timer(12000);
if (_inited == false){
init();
};
super();
x = _arg1;
y = _arg2;
if (_arg3 == TYPE_RAND){
_arg3 = Math.ceil((Math.random() * 2));
};
type = _arg3;
flashTimer.addEventListener(TimerEvent.TIMER, startToFlash);
flashTimer.start();
var _local4 = "pickup_";
if (type == TYPE_INSTAKILL){
_local4 = (_local4 + "instakill");
} else {
if (type == TYPE_NUKE){
_local4 = (_local4 + "nuke");
};
};
filters = [new GlowFilter(0xFFFFFF, 1, 2, 2, 4), new GlowFilter(0, 1, 2, 2, 4), new GlowFilter(16772795, 1, 10, 10, 2)];
addChild(Assets.getInstance(_local4));
addEventListener(Event.ENTER_FRAME, update);
instances.push(this);
}
private function startToFlash(_arg1:Event):void{
flashTimer.stop();
flashTimer.removeEventListener(TimerEvent.TIMER, startToFlash);
setTimeout(flash, 500);
}
private function flash():void{
if (timeToDie <= 0){
visible = true;
removeEventListener(Event.ENTER_FRAME, update);
if (parent == null){
return;
};
parent.removeChild(this);
instances.splice(instances.indexOf(this), 1);
} else {
timeToDie--;
visible = !(visible);
setTimeout(flash, 500);
};
}
private function update(_arg1:Event):void{
var _local2:Number = Math.sqrt((Math.pow((x - Player.instance.x), 2) + Math.pow((y - Player.instance.y), 2)));
if (_local2 < 25){
pickup();
};
rotation++;
}
private function pickup():void{
var _local1:Array;
var _local2:Zombie;
parent.removeChild(this);
removeEventListener(Event.ENTER_FRAME, update);
instances.splice(instances.indexOf(this), 1);
if (type == TYPE_INSTAKILL){
isInstakill = true;
instakillTimer.stop();
instakillTimer.start();
} else {
if (type == TYPE_NUKE){
_local1 = [];
for each (_local2 in Zombie.livingInstances) {
_local1.push(_local2);
};
for each (_local2 in _local1) {
_local2.nuke();
};
};
};
}
public static function init():void{
if (_inited){
return;
};
instakillTimer.addEventListener(TimerEvent.TIMER, resetInstakill);
}
private static function resetInstakill(_arg1:Event):void{
instakillTimer.stop();
isInstakill = false;
}
public static function dispose():void{
var _local1:Powerup;
for each (_local1 in instances) {
while (_local1.numChildren > 0) {
_local1.removeChildAt(0);
};
_local1.removeEventListener(Event.ENTER_FRAME, _local1.update);
if (_local1.parent != null){
_local1.parent.removeChild(_local1);
};
};
instances = [];
instakillTimer.stop();
isInstakill = false;
spawnChance = 100;
}
}
}//package org.hoah.zombies
Section 242
//Settings (org.hoah.zombies.Settings)
package org.hoah.zombies {
public class Settings {
public static var quality:int = 1;
public static var enableSubtitles:Boolean = true;
public static var soundVolume:Number = 1;
public static var vocalVolume:Number = 1;
}
}//package org.hoah.zombies
Section 243
//SpriteBitmap (org.hoah.zombies.SpriteBitmap)
package org.hoah.zombies {
import flash.display.*;
import flash.geom.*;
public class SpriteBitmap {
public static var clips:Array = [];
public static function Create(_arg1:String, _arg2:MovieClip):void{
var _local5:int;
var _local6:BitmapData;
var _local3:Array = [];
var _local4 = 1;
while (_local4 <= _arg2.framesLoaded) {
_arg2.gotoAndStop(_local4);
_local5 = 0;
while (_local5 < _arg2.numChildren) {
if ((_arg2.getChildAt(_local5) is MovieClip)){
if ((_arg2.getChildAt(_local5) as MovieClip).currentFrame == (_arg2.getChildAt(_local5) as MovieClip).framesLoaded){
(_arg2.getChildAt(_local5) as MovieClip).gotoAndStop(1);
} else {
(_arg2.getChildAt(_local5) as MovieClip).nextFrame();
};
};
_local5++;
};
_local6 = new BitmapData(50, 50, true, 0);
_local6.draw(_arg2, new Matrix(1, 0, 0, 1, 25, 25), null, null, null, true);
_local3.push(new BitmapSprite(_local6, false, 32));
_local4++;
};
clips[_arg1] = _local3;
}
}
}//package org.hoah.zombies
Section 244
//UserInterface (org.hoah.zombies.UserInterface)
package org.hoah.zombies {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.debug.*;
import flash.geom.*;
import org.hoah.zombies.traps.*;
import org.hoah.Tweener.*;
import org.hoah.zombies.ui.intermission.*;
import org.hoah.zombies.ui.*;
import flash.text.*;
import org.hoah.zombies.rounds.*;
import flash.filters.*;
public class UserInterface extends Sprite {
private var nextRoundSprite:Sprite;
private var _upg2Frame:int;// = 1
private var totPointsBox:TextField;
private var upgradesPopup:Sprite;
private var upgradePanelBitmap:Bitmap;
private var upgrade1BmpSprite:BitmapSprite;
private var introPointer:int;// = 0
private var upgrade2BmpSprite:BitmapSprite;
private var intermissionScreen:Sprite;
private var introTextField:TextField;
public var glowAmount:Number;// = 0
private var _upg4Frame:int;// = 1
private var upgradesPointsArea:TextField;
public var endTime:int;// = 0
private var costs:Array;
public var startTime:int;// = 0
private var upgrade3BmpSprite:BitmapSprite;
private var introTexts:Array;
private var rot:int;// = 0
private var lastChange:int;// = 0
private var pointsBox:TextField;
private var src:int;// = 0
private var upgrade4BmpSprite:BitmapSprite;
private var nextIntroTimeout:uint;// = 0
private var upgradesBuyWeaponsButton:Sprite;
private var hitZones:Array;
private var descriptions:Array;
public static const MINUTES:uint = 1;
public static const HOURS:uint = 2;
public static const SECONDS:uint = 0;
private static var firstTime:Boolean = true;
private static var nextFilter:GlowFilter = new GlowFilter(0xFFFF00, 1, 6, 6, 2, 2);
public static var instance:UserInterface;
public function UserInterface(){
pointsBox = new TextField();
totPointsBox = new TextField();
intermissionScreen = new Sprite();
upgradePanelBitmap = new Bitmap();
upgradesPopup = new Sprite();
upgradesBuyWeaponsButton = new Sprite();
upgradesPointsArea = new TextField();
introTextField = new TextField();
introTexts = ["Use W,A,S,D to walk.\nUse the mouse to look around.", "Left mouse button to fire your weapon.", "Change Weapons with the number keys\nor mouse wheel", "* Find the fuse board and activate the power"];
nextRoundSprite = new Sprite();
hitZones = [new Rectangle(38, 38, 74, 80), new Rectangle(123, 35, 74, 80), new Rectangle(205, 34, 74, 80), new Rectangle(286, 43, 74, 80)];
costs = [1000, 10000, 10000, 50000];
descriptions = ["Delays zombies whilst they try to break through", "Short Range, will chomp any zombies that stand on it", "Medium Range, will detonate when any zombie gets too close", "Zombies love this cute bear, until it explodes!"];
super();
if (instance != null){
return;
};
Debug.instance.registerCommand("addpoints", debugAddPoints);
instance = this;
addChild(Assets.uiBottomLeft);
Assets.uiBottomLeft.y = (480 - Assets.uiBottomLeft.height);
Assets.uiBottomLeft.alpha = 0.75;
addChild(Assets.uiBottomRight);
Assets.uiBottomRight.y = (480 - Assets.uiBottomRight.height);
Assets.uiBottomRight.x = (640 - Assets.uiBottomRight.width);
Assets.uiBottomRight.y = (Assets.uiBottomRight.y + 35);
Assets.uiBottomRight.alpha = 0.75;
addChild(pointsBox);
addChild(totPointsBox);
addChild(WeaponDisplay.instance);
addChild(new HealthPanel(Player.instance));
pointsBox.width = 100;
pointsBox.height = 40;
pointsBox.x = 520;
pointsBox.y = (445 - 8);
pointsBox.embedFonts = true;
pointsBox.antiAliasType = AntiAliasType.NORMAL;
pointsBox.defaultTextFormat = new TextFormat("Viper Nora", 21, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.RIGHT);
pointsBox.text = "0";
totPointsBox.width = 100;
totPointsBox.height = 20;
totPointsBox.x = 520;
totPointsBox.y = (470 - 8);
totPointsBox.embedFonts = true;
totPointsBox.antiAliasType = AntiAliasType.NORMAL;
totPointsBox.defaultTextFormat = new TextFormat("Viper Nora", 11, 0xFFFF00, true, null, null, null, null, TextFormatAlign.RIGHT);
totPointsBox.text = "0";
introTextField.x = 10;
introTextField.y = 200;
introTextField.mouseEnabled = false;
introTextField.width = 620;
introTextField.height = 200;
introTextField.embedFonts = true;
introTextField.selectable = false;
introTextField.antiAliasType = AntiAliasType.NORMAL;
introTextField.defaultTextFormat = new TextFormat("Viper Nora", 22, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.CENTER);
introTextField.filters = [new GlowFilter(0, 1, 12, 12, 2, 1)];
addEventListener(Event.ADDED_TO_STAGE, gotStage);
}
private function checkPopup():void{
var _local2:Rectangle;
var _local1:int;
for each (_local2 in hitZones) {
if (_local2.contains(upgradePanelBitmap.mouseX, upgradePanelBitmap.mouseY)){
if (upgradesPopup.parent != this){
addChild(upgradesPopup);
};
upgradesPopup.x = (this.mouseX - 9);
upgradesPopup.y = (this.mouseY - 104);
upgradesPointsArea.text = ((("Cost: " + NumberTools.format(costs[_local1])) + " pts\n") + descriptions[_local1]);
return;
};
_local1++;
};
if (upgradesPopup.parent == this){
removeChild(upgradesPopup);
};
}
public function set survivalMode(_arg1:Boolean):void{
var _local2:TextFormat;
var _local3:TextFormat;
if (_arg1){
pointsBox.y = 448;
_local2 = new TextFormat("Viper Nora", 21, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.LEFT);
pointsBox.defaultTextFormat = _local2;
pointsBox.setTextFormat(_local2);
totPointsBox.visible = false;
} else {
_local3 = new TextFormat("Viper Nora", 21, 0xFFFFFF, true, null, null, null, null, TextFormatAlign.RIGHT);
pointsBox.defaultTextFormat = _local3;
pointsBox.y = (445 - 8);
totPointsBox.visible = true;
};
}
public function updateFilter():void{
nextFilter.blurX = glowAmount;
nextFilter.blurY = glowAmount;
nextRoundSprite.filters = [nextFilter];
}
public function removeFilter():void{
nextRoundSprite.filters = [];
}
private function handleKey(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == 27){
if (Round.survivalMode){
};
if (!Zombies.paused){
if (Round.survivalMode == false){
Zombies.paused = true;
};
OptionsScreen.show(unPause);
};
};
if ((((_arg1.keyCode == 77)) && (_arg1.ctrlKey))){
showMimi();
};
if ((((_arg1.keyCode >= 49)) && ((_arg1.keyCode <= 53)))){
if (WeaponSelector.instance.parent == this){
removeChild(WeaponSelector.instance);
};
addChild(WeaponSelector.instance);
WeaponSelector.instance.switchCategory((_arg1.keyCode - 49));
};
}
private function updateTime(_arg1:Event):void{
var _local2:int = (getTimer() - startTime);
pointsBox.text = UserInterface.formatTime((Math.round((_local2 / 10)) / 100), 2);
}
private function glowButton():void{
Tweener.addTween(this, {glowAmount:10, time:1, onUpdate:updateFilter});
Tweener.addTween(this, {glowAmount:1, time:0.5, delay:1.5, onUpdate:updateFilter});
Tweener.addTween(this, {glowAmount:10, time:1, delay:2, onUpdate:updateFilter});
Tweener.addTween(this, {glowAmount:1, time:0.5, delay:3.5, onUpdate:updateFilter});
Tweener.addTween(this, {glowAmount:10, time:1, delay:4, onUpdate:updateFilter});
Tweener.addTween(this, {glowAmount:1, time:0.5, delay:5.5, onUpdate:updateFilter});
Tweener.addTween(this, {glowAmount:10, time:1, delay:6, onUpdate:updateFilter});
Tweener.addTween(this, {glowAmount:0, time:0.5, delay:7.5, onUpdate:updateFilter, onComplete:removeFilter});
}
public function nextIntro():void{
if (instance == null){
return;
};
nextIntroTimeout = 0;
if (instance.introTexts[introPointer] == null){
return;
};
showTip(instance.introTexts[introPointer]);
nextIntroTimeout = setTimeout(nextIntro, 5000);
introPointer++;
}
private function showBuyWeapons(_arg1:Event):void{
intermissionScreen.addChild(BuyWeaponsPanel.instance);
BuyWeaponsPanel.instance.show();
}
private function debugAddPoints(_arg1:Array):void{
addPoints(int(_arg1[0]));
}
private function gotStage(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, gotStage);
stage.addEventListener(KeyboardEvent.KEY_UP, handleKey);
stage.addEventListener(MouseEvent.MOUSE_WHEEL, changeWeapon);
}
public function showIntermission():void{
GamerSafe.api.showStatusBar();
TopMenu.instance.show();
nextRoundSprite.x = (320 - (Assets.nextRound.width / 2));
nextRoundSprite.y = (480 - Assets.nextRound.height);
nextRoundSprite.buttonMode = true;
nextRoundSprite.addChild(Assets.nextRound);
nextRoundSprite.addEventListener(MouseEvent.CLICK, nextRound);
if (firstTime){
showTips(["The intermission is shown between each round.", "Use the tabs above to buy Traps and Weapons,\nor Upgrades for your weapons", "When you're done, press the Next Round button."]);
setTimeout(glowButton, 10000);
firstTime = false;
};
addChild(nextRoundSprite);
}
public function showTips(_arg1:Array):void{
if (nextIntroTimeout > 0){
clearTimeout(nextIntroTimeout);
};
introTextField.alpha = 0;
introPointer = 0;
instance.introTexts = _arg1;
nextIntro();
}
private function nextRound(_arg1:Event):void{
GamerSafe.api.hideStatusBar();
BuyWeaponsPanel.instance.hide();
WeaponsUpgradePanel.instance.hide();
TrapsPanel.instance.hide();
TopMenu.instance.hide();
removeEventListener(MouseEvent.CLICK, clickUpgrades);
removeChild(nextRoundSprite);
Round.beginNextRound();
stage.focus = Map.instance;
}
public function showMimi():void{
addChild(MimiPurchaseWindow.instance);
}
private function unPause():void{
stage.focus = Map.instance;
Zombies.paused = false;
}
public function showTip(_arg1:String):void{
instance.introTextField.text = _arg1;
Tweener.addTween(instance.introTextField, {alpha:1, time:1});
Tweener.addTween(instance.introTextField, {alpha:0, time:1, delay:4});
}
private function changeWeapon(_arg1:MouseEvent):void{
if (Round.intermission == true){
return;
};
if ((getTimer() - lastChange) < 100){
return;
};
lastChange = getTimer();
if (_arg1.delta < -0.1){
if (WeaponSelector.instance.parent == this){
removeChild(WeaponSelector.instance);
};
addChild(WeaponSelector.instance);
WeaponSelector.instance.nextWeapon();
} else {
if (_arg1.delta > -0.1){
if (WeaponSelector.instance.parent == this){
removeChild(WeaponSelector.instance);
};
addChild(WeaponSelector.instance);
WeaponSelector.instance.prevWeapon();
};
};
}
public function startSurvivalNow():void{
startTime = getTimer();
addEventListener(Event.ENTER_FRAME, updateTime);
}
private function clickUpgrades(_arg1:Event):void{
var _local3:Rectangle;
var _local4:int;
var _local2:int;
for each (_local3 in hitZones) {
if (_local3.contains(upgradePanelBitmap.mouseX, upgradePanelBitmap.mouseY)){
_local4 = costs[_local2];
if (_local2 == 0){
Map.instance.placeTrap(SpriteBitmap.clips["trap_barrier"][0], TrapBarrier, _local4);
} else {
if (_local2 == 1){
Map.instance.placeTrap(SpriteBitmap.clips["trap_chomper"][0], TrapChomper, _local4);
} else {
if (_local2 == 2){
Map.instance.placeTrap(SpriteBitmap.clips["trap_small_mine"][0], TrapMine, _local4);
} else {
if (_local2 == 3){
Map.instance.placeTrap(SpriteBitmap.clips["trap_bear"][1], TrapBear, _local4);
};
};
};
};
return;
};
_local2++;
};
}
public static function spendPoints(_arg1:int):Boolean{
if (Player.points < _arg1){
return (false);
};
Player.points = (Player.points - _arg1);
instance.pointsBox.text = NumberTools.format(Player.points);
instance.addChild(new AddedPointsText(-(_arg1)));
return (true);
}
public static function formatTime(_arg1:Number, _arg2:uint=2):String{
var _local9:int;
var _local10:String;
var _local3 = "00";
if (_arg1.toString().indexOf(".") > -1){
_local9 = (_arg1 * 100);
_local9 = (_local9 - (Math.floor(_arg1) * 100));
_local10 = _local9.toString();
while (_local10.length < 2) {
_local10 = (_local10 + "0");
};
_local3 = ("." + _local10);
};
var _local4:uint = Math.floor(_arg1);
var _local5:uint = (_local4 / 60);
var _local6:uint = (_local4 - (_local5 * 60));
var _local7:String = ((_arg2 >= MINUTES)) ? ((((((_arg2 == HOURS)) && ((_local5 < 10)))) ? "0" : "" + _local5) + ":") : "";
var _local8:String = (((((_local6 < 10)) && ((_arg2 >= MINUTES)))) ? "0" : "" + _local6);
return (((_local7 + _local8) + _local3));
}
public static function dispose():void{
Zombies.instance.stage.removeEventListener(KeyboardEvent.KEY_UP, instance.handleKey);
Zombies.instance.stage.removeEventListener(MouseEvent.MOUSE_WHEEL, instance.changeWeapon);
if (instance.parent){
instance.parent.removeChild(instance);
};
while (instance.numChildren > 0) {
instance.removeChildAt(0);
};
instance.removeEventListener(MouseEvent.CLICK, instance.clickUpgrades);
instance = null;
}
public static function addPoints(_arg1:int):void{
if (((Round.survivalMode) && ((_arg1 < 10000)))){
return;
};
Player.points = (Player.points + _arg1);
Player.totalPoints = (Player.totalPoints + _arg1);
instance.pointsBox.text = NumberTools.format(Player.points);
instance.totPointsBox.text = NumberTools.format(Player.totalPoints);
instance.addChild(new AddedPointsText(_arg1));
}
public static function intro():void{
instance.addChild(instance.introTextField);
instance.introTextField.alpha = 0;
instance.introPointer = 0;
instance.showTips(instance.introTexts);
}
public static function showIntermission():void{
instance.showIntermission();
}
public static function showMimiPurchase():void{
instance.showMimi();
}
public static function showMyWeapons():void{
instance.addChild(WeaponsUpgradePanel.instance);
WeaponsUpgradePanel.instance.show();
}
}
}//package org.hoah.zombies
Section 245
//Zombie (org.hoah.zombies.Zombie)
package org.hoah.zombies {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
import org.hoah.zombies.map.*;
import org.hoah.zombies.traps.*;
import org.hoah.zombies.ai.*;
import org.hoah.zombies.soundeffects.*;
import org.hoah.zombies.rounds.*;
public class Zombie {
public var y:Number;// = 0
private var _curAnimation:String;
private var _aiMode:String;// = "starting"
private var _lastBite:int;// = 0
private var _homingTimer:int;// = 0
private var _speedChange:Number;// = -0.1
private var yellTimer:Timer;
public var disposeAfterCurrentAnimation:Boolean;// = false
private var _animSpeed:int;// = 50
public var special:Boolean;// = false
private var _inLoveWith:Trap;
public var _curSpeed:Number;// = 1
public var speed:Number;// = 1
private var _framesUntilDispose:int;// = 0
private var _curBitmapList:Array;
public var currentRoute:MapRoute;
private var _currentRouteNode:Point;
private var dismembered:Boolean;// = false
private var _currentRouteSteps:Array;
private var _skin:int;// = 0
private var _entryPoint:MapEntryPoint;// = null
private var _curAnimationStatic:Boolean;// = true
public var health:Number;// = 4
private var _lastFrameAdvance:int;// = 0
public var _normSpeed:Number;// = 1
private var _curFrame:int;// = 0
public var x:Number;// = 0
public var currentRoom:String;// = ""
public var rotation:Number;// = 0
public static const SKIN:Array = [["zombie_walk", "zombie_walk_dismember_L", "zombie_walk_dismember_R", "zombie_explode", "zombie_die1"], ["zombie3_walk", "zombie3_walk_dismember_L", "zombie3_walk_dismember_R", "zombie3_explode", "zombie3_die1"]];
public static var staticSprites:Array = [];
public static var baseHealth:Number = 4;
public static var livingInstances:Array = [];
public static var baseSpeed:Number = 1;
public static var instances:Array = [];
public function Zombie(_arg1:MapSpawnPoint, _arg2:Boolean=false){
_currentRouteSteps = [];
_curBitmapList = [];
_curAnimation = SKIN[_skin][0];
yellTimer = new Timer(10000);
super();
_skin = Math.floor((Math.random() * 1.9999));
if (Math.random() < (Round.spawnRate / 1000)){
yellTimer.delay = (1000 + (Math.random() * 20000));
yellTimer.start();
};
yellTimer.addEventListener(TimerEvent.TIMER, yell);
livingInstances.push(this);
instances.push(this);
setAnim(SKIN[_skin][0]);
if (_arg1 == null){
special = true;
} else {
x = _arg1.x;
y = _arg1.y;
if (_arg2){
_entryPoint = _arg1.entryPoints[0];
} else {
_entryPoint = _arg1.getRandomEntryPoint();
};
};
rotation = 0;
speed = Math.max(1, (baseSpeed + ((Math.random() * (baseSpeed / 2)) - (baseSpeed / 4))));
_normSpeed = (speed / 2);
_curSpeed = (speed / 2);
health = Math.min((baseHealth + ((Math.random() * (baseHealth / 2)) - (baseHealth / 4))), 35);
Player.eventObject.addEventListener("change_room", updateRoom);
}
private function calculatePathToPlayer():void{
if (_aiMode == "loving"){
return;
};
if (currentRoom == Player.instance.currentRoom){
_aiMode = "homing";
return;
};
if (Pather.routes[currentRoom] == null){
trace("CANNOT ROUTE FROM", currentRoom);
return;
};
if (Pather.routes[currentRoom][Player.instance.currentRoom] == null){
trace("CANNOT ROUTE FROM", currentRoom, "TO", Player.instance.currentRoom);
return;
};
var _local1:Array = Pather.routes[currentRoom][Player.instance.currentRoom];
if (_local1.length == 0){
return;
};
currentRoute = _local1[Math.floor((Math.random() * _local1.length))];
_currentRouteSteps = currentRoute.getSteps();
_currentRouteNode = null;
}
public function get bmd():BitmapData{
if (Zombies.paused){
return (_curBitmapList[_curFrame].bmd);
};
if (_curAnimationStatic == false){
if ((getTimer() - _lastFrameAdvance) > _animSpeed){
_lastFrameAdvance = getTimer();
_curFrame++;
if (_curFrame >= _curBitmapList.length){
_curFrame = 0;
if (disposeAfterCurrentAnimation){
dispose();
return (new BitmapData(1, 1, true, 0));
};
};
};
};
var _local1:BitmapSprite = _curBitmapList[_curFrame];
_local1.rotation = rotation;
return (_local1.bmd);
}
public function testKill(_arg1:Number=0.2):void{
if ((((health <= 0)) || (Powerup.isInstakill))){
if ((Math.random() * Powerup.spawnChance) < 1){
Map.instance.spriteLayer.addChild(new Powerup(x, y));
};
kill();
setAnim(SKIN[_skin][4]);
disposeAfterCurrentAnimation = true;
};
}
public function dispose():void{
yellTimer.removeEventListener(TimerEvent.TIMER, yell);
instances.splice(instances.indexOf(this), 1);
}
private function yell(_arg1:Event):void{
var _local2:int = Math.ceil((Math.random() * 4));
Sounds.play3D(("vocal_zombie_moan" + _local2), x, y, 1, 1000);
yellTimer.delay = (1000 + (Math.random() * 20000));
}
public function randomDismember(_arg1:Number=0.05):void{
if (dismembered){
return;
};
if (Math.random() < _arg1){
dismembered = true;
Map.particles.newBloodExplode(x, y);
UserInterface.addPoints(10);
Map.instance.spewBlood(this);
if ((Math.random() * 10) < 0.5){
Map.instance.spawnGib(this);
};
speed = (speed * 0.75);
if ((Math.random() * 10) < 5){
setAnim(SKIN[_skin][1]);
} else {
setAnim(SKIN[_skin][2]);
};
};
}
public function setAnim(_arg1:String):void{
if (disposeAfterCurrentAnimation){
return;
};
_curAnimation = _arg1;
_curFrame = 0;
if ((((((_arg1 == SKIN[_skin][0])) || ((_arg1 == SKIN[_skin][1])))) || ((_arg1 == SKIN[_skin][2])))){
_curAnimationStatic = true;
_curBitmapList = [staticSprites[_arg1]];
} else {
_curAnimationStatic = false;
_curBitmapList = SpriteBitmap.clips[_arg1];
};
}
private function disposeAfterAnim():void{
disposeAfterCurrentAnimation = true;
}
public function hit(_arg1:int=1):void{
var _local3:int;
if (health <= 0){
return;
};
if (Math.random() < 0.5){
_local3 = Math.ceil((Math.random() * 4));
Sounds.play3D(("vocal_zombie_yell" + _local3), x, y, 1, 1000);
};
UserInterface.addPoints(10);
var _local2:Number = ((rotation - 90) * 0.0174);
x = (x + (Math.cos(_local2) * 4));
y = (y + (Math.sin(_local2) * 4));
if (speed > 0){
speed = (speed * 0.95);
};
randomDismember(0.025);
health = (health - _arg1);
testKill();
}
public function loves(_arg1:Trap=null):void{
if (_arg1 == null){
_inLoveWith = null;
_aiMode = "waiting";
updateRoom();
return;
};
_aiMode = "loving";
_inLoveWith = _arg1;
}
public function setPosition(_arg1:Number, _arg2:Number):void{
x = _arg1;
y = _arg2;
_aiMode = "waiting";
updateRoom();
}
public function updateRoom(_arg1:Event=null):void{
if ((((((_aiMode == "starting")) || ((_aiMode == "entering")))) || ((_aiMode == "loving")))){
return;
};
currentRoom = getRoom(new Point(x, y));
if (currentRoom == Player.instance.currentRoom){
_aiMode = "homing";
} else {
calculatePathToPlayer();
_aiMode = "pathing";
};
}
public function update():void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Friend;
var _local8:Friend;
if (Zombies.paused){
return;
};
if (health <= 0){
return;
};
var _local1:Number = x;
var _local2:Number = y;
speed = (_normSpeed + _curSpeed);
_curSpeed = (_curSpeed + _speedChange);
if (_curSpeed <= 0){
_speedChange = (2 / 10);
} else {
if (_curSpeed >= _normSpeed){
_speedChange = -((2 / 5));
};
};
if (_aiMode == "starting"){
_local3 = Math.atan2((y - _entryPoint.y), (x - _entryPoint.x));
rotation = ((_local3 * 57.29) + 90);
_local4 = Math.sqrt((Math.pow((x - _entryPoint.x), 2) + Math.pow((y - _entryPoint.y), 2)));
if (_local4 < 20){
_aiMode = "entering";
} else {
x = (x - (Math.cos(_local3) * speed));
y = (y - (Math.sin(_local3) * speed));
};
return;
} else {
if (_aiMode == "entering"){
_local3 = 0;
if (_entryPoint.dir == "R"){
_local3 = ((Math.PI / 2) * 2);
} else {
if (_entryPoint.dir == "D"){
_local3 = ((Math.PI / 2) * 3);
};
};
rotation = ((_local3 * 57.29) + 90);
_local4 = Math.sqrt((Math.pow((x - _entryPoint.x), 2) + Math.pow((y - _entryPoint.y), 2)));
if (_local4 > 50){
_aiMode = "waiting";
updateRoom();
} else {
x = (x - (Math.cos(_local3) * speed));
y = (y - (Math.sin(_local3) * speed));
};
return;
} else {
if (_aiMode == "homing"){
_local5 = Math.sqrt((Math.pow((x - Player.instance.x), 2) + Math.pow((y - Player.instance.y), 2)));
_local6 = _local5;
for each (_local8 in Friend.instances) {
if (_local8.dead){
} else {
_local4 = Math.sqrt((Math.pow((x - _local8.x), 2) + Math.pow((y - _local8.y), 2)));
if (_local4 < _local6){
_local7 = _local8;
_local6 = _local4;
};
};
};
_local4 = _local6;
if (_local7 == null){
_local3 = Math.atan2((y - Player.instance.y), (x - Player.instance.x));
rotation = ((_local3 * 57.29) + 90);
if (_local4 < 20){
if ((getTimer() - _lastBite) > 1000){
_lastBite = getTimer();
Player.instance.bite();
};
} else {
x = (x - (Math.cos(_local3) * speed));
y = (y - (Math.sin(_local3) * speed));
};
} else {
_local3 = Math.atan2((y - _local7.y), (x - _local7.x));
rotation = ((_local3 * 57.29) + 90);
if (_local4 < 20){
if ((getTimer() - _lastBite) > 1000){
_lastBite = getTimer();
_local7.bite();
};
} else {
x = (x - (Math.cos(_local3) * speed));
y = (y - (Math.sin(_local3) * speed));
};
};
return;
} else {
if (_aiMode == "pathing"){
if (_currentRouteNode == null){
if ((((_currentRouteSteps == null)) || ((_currentRouteSteps.length == 0)))){
_aiMode = "homing";
return;
};
_currentRouteNode = _currentRouteSteps.shift();
};
_local3 = Math.atan2((y - _currentRouteNode.y), (x - _currentRouteNode.x));
rotation = ((_local3 * 57.29) + 90);
_local4 = Math.sqrt((Math.pow((x - _currentRouteNode.x), 2) + Math.pow((y - _currentRouteNode.y), 2)));
if (_local4 < 20){
_currentRouteNode = null;
} else {
x = (x - (Math.cos(_local3) * speed));
y = (y - (Math.sin(_local3) * speed));
};
return;
} else {
if (_aiMode == "loving"){
_local3 = Math.atan2((y - _inLoveWith.y), (x - _inLoveWith.x));
rotation = ((_local3 * 57.29) + 90);
_local4 = Math.sqrt((Math.pow((x - _inLoveWith.x), 2) + Math.pow((y - _inLoveWith.y), 2)));
if (_local4 < 50){
x = (x + ((Math.random() * 2) - 1));
y = (y + ((Math.random() * 2) - 1));
} else {
x = (x - (Math.cos(_local3) * speed));
y = (y - (Math.sin(_local3) * speed));
};
return;
} else {
if (_aiMode == "spinning"){
rotation = (rotation + 5);
return;
};
};
};
};
};
};
}
public function silentKill():void{
yellTimer.stop();
yellTimer.removeEventListener(TimerEvent.TIMER, yell);
health = 0;
livingInstances.splice(livingInstances.indexOf(this), 1);
dispose();
}
public function kill(_arg1:Boolean=true):void{
yellTimer.stop();
yellTimer.removeEventListener(TimerEvent.TIMER, yell);
health = 0;
livingInstances.splice(livingInstances.indexOf(this), 1);
Map.instance.spewBlood(this);
var _local2:int = Math.floor((Math.random() * 2));
var _local3:int;
while (_local3 < _local2) {
Map.instance.spawnChunks(this);
_local3++;
};
Player.zombiesKilled++;
Round.currentRoundKills++;
if (_arg1){
UserInterface.addPoints(100);
};
}
public function nuke():void{
kill(false);
setAnim(SKIN[_skin][3]);
disposeAfterCurrentAnimation = true;
Map.particles.newBloodExplode(x, y);
UserInterface.addPoints(10);
}
private function getRoom(_arg1:Point):String{
var _local2:XML;
for each (_local2 in Map.instance.rooms) {
if ((((_arg1.x > _local2.@left)) && ((_arg1.x < _local2.@right)))){
if ((((_arg1.y > _local2.@top)) && ((_arg1.y < _local2.@bottom)))){
return (_local2.@name);
};
};
};
return ("none");
}
public function nade():void{
Map.particles.newBloodExplode(x, y);
randomDismember(0.75);
UserInterface.addPoints(15);
health = (health - 10);
testKill(0.9);
}
public static function dispose():void{
var _local2:Zombie;
baseHealth = 4;
baseSpeed = 1;
var _local1:Array = [];
for each (_local2 in instances) {
_local1.push(_local2);
};
for each (_local2 in _local1) {
_local2.dispose();
};
_local1 = null;
livingInstances = [];
instances = [];
}
}
}//package org.hoah.zombies
Section 246
//GamerSafe (GamerSafe)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
public class GamerSafe extends Sprite {
private const _storedPasscode:String = "G1b5a661b8b7b2a8a0124cb97514c35b58bfc9e972:1262179770";
private const _storedHashseed:String = "d0370f3dd2c34c97a38922ea3b106181562e240e";
private var _evt_onScoreSubmitted:Function;// = null
private var _stageHeight:Number;// = 400
private var _evt_onLevelVaultLevelRated:Function;// = null
private var _evt_onUnregisteredName:Function;// = null
private var _evt_onLevelVaultLevelEdited:Function;// = null
private var _evt_useEnded:Function;// = null
private var _evt_onLevelVaultGotLevel:Function;// = null
private var _evt_onMetaData:Function;// = null
private var _evt_networkingError:Function;// = null
private var _evt_accountChange:Function;// = null
private var _evt_onRegistrationFormClosed:Function;// = null
private var _evt_apiReady:Function;// = null
private var _evt_onLevelVaultLevelCreated:Function;// = null
private var _evt_itemPurchase:Function;// = null
private var _context:LoaderContext;
private var _evt_loginFailed:Function;// = null
private var _evt_onLevelVaultGotLevels:Function;// = null
private var _evt_onLevelVaultLevelStringsSet:Function;// = null
private var _evt_login:Function;// = null
private var _evt_onScoreboardRecieved:Function;// = null
private var _evt_onScoreboardError:Function;// = null
private var _evt_beginSession:Function;// = null
private var _evt_onConsumptionCompleted:Function;// = null
private var _evt_onLevelVaultLevelNumericsIncremented:Function;// = null
private var _gamerSafe:Object;// = null
private var _evt_useStarted:Function;// = null
private var _stageWidth:Number;// = 550
private var _evt_confYes:Function;// = null
private var _evt_onLevelVaultLevelNumericsSet:Function;// = null
private var _status:String;// = "Loading"
private var _inUse:Boolean;// = false
private var _loaded:Boolean;// = false
private var _evt_useChanged:Function;// = null
private var _loader:Loader;
private var _evt_onMetaDataError:Function;// = null
private var _evt_beginSessionFailed:Function;// = null
private var _request:URLRequest;
private var _evt_onLoginFormClosed:Function;// = null
private var _referrer:String;// = ""
private var _evt_confNo:Function;// = null
private var _evt_itemPurchaseFailed:Function;// = null
private var _evt_onLevelVaultLevelDeleted:Function;// = null
private var _evt_onLevelVaultLevelFlagged:Function;// = null
private var _evt_onLevelVaultLevelAttributesChanged:Function;// = null
private var _tmpSkin:Object;
private var _stage:Stage;
public static const EVT_LEVELVAULT_LEVEL_FLAGGED:String = "level_flagged";
public static const EVT_ITEM_PURCHASE_FAILED:String = "item_purchase_failed";
public static const EVT_LEVELVAULT_GOT_SINGLE_LEVEL:String = "got_level";
public static const EVT_BEGIN_SESSION_FAILED:String = "begin_session_failed";
public static const EVT_ACCOUNT_CHANGE:String = "account_change";
public static const EVT_SCOREBOARD_ENTRIES_RECEIVED:String = "scoreboard_entries_received";
public static const EVT_LEVELVAULT_LEVEL_NUMERICS_INCREMENTED:String = "level_numerics_incremented";
public static const EVT_LEVELVAULT_LEVEL_CREATED:String = "level_created";
public static const EVT_METADATA:String = "metadata";
public static const META_SORT_ASC:int = 1;
public static const EVT_LEVELVAULT_LEVEL_RATED:String = "level_rated";
public static const EVT_LEVELVAULT_LEVEL_STRINGS_SET:String = "level_strings_set";
public static const EVT_ITEM_PURCHASE:String = "item_purchase";
public static const EVT_REGISTRATION_FORM_CLOSED:String = "register_close";
public static const EVT_LEVELVAULT_LEVEL_NUMERICS_SET:String = "level_numerics_set";
public static const EVT_BEGIN_SESSION:String = "begin_session";
public static const EVT_LEVELVAULT_LEVEL_DELETED:String = "level_deleted";
public static const EVT_LOGIN:String = "login";
public static const EVT_LOGIN_FORM_CLOSED:String = "login_close";
public static const EVT_LEVELVAULT_GOT_LEVELS:String = "got_levels";
public static const version:String = "01";
public static const EVT_NETWORKING_ERROR:String = "networking_error";
public static const EVT_METADATA_ERROR:String = "metadata_error";
public static const META_SORT_DESC:int = 2;
public static const EVT_LEVELVAULT_LEVEL_EDITED:String = "level_edited";
public static const EVT_SCOREBOARD_ENTRIES_ERROR:String = "scoreboard_entries_error";
public static const EVT_CONSUMPTION_COMPLETED:String = "consumption_completed";
public static const EVT_LOGIN_FAILED:String = "login_failed";
public static const EVT_UNREGISTERED_NAME:String = "unregistered_name";
public static const EVT_SCOREBOARD_ENTRY_SUBMITTED:String = "scoreboard_entry_submitted";
protected static var _instance:GamerSafe = null;
public function GamerSafe(_arg1){
var parent = _arg1;
_tmpSkin = {};
_loader = new Loader();
_context = new LoaderContext(true);
_request = new URLRequest((("http://components.gamersafe.com/GamerSafe." + version) + ".swf"));
super();
if (_instance == null){
_instance = this;
} else {
trace("GamerSafe: Instance Error: The GamerSafe class is a singleton and should only be constructed once. Use Gamersafe.instance instead.");
return;
};
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_context.applicationDomain = ApplicationDomain.currentDomain;
_status = "Downloading";
try {
_loader.load(_request, _context);
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadingError);
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadingComplete);
} catch(s:SecurityError) {
_status = "Failed";
trace("Security error - GamerSafe library cannot load");
_loader = null;
};
addEventListener(Event.ADDED_TO_STAGE, setupStage);
if ((((((parent is Sprite)) || ((parent is MovieClip)))) || ((parent is Stage)))){
parent.addChild(this);
} else {
trace("Incompatible parent!");
};
}
public function get loaded():Boolean{
return (_loaded);
}
public function flashBar():void{
if (_loaded == false){
return;
};
_gamerSafe.flashBar();
}
public function levelVaultFlagLevel(_arg1):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultFlagLevel(_arg1));
}
public function set achievementPopupPosition(_arg1:Point):void{
if (_loaded == false){
return;
};
_gamerSafe.achievementPopupPosition = _arg1;
}
public function showScoreSubmit(_arg1:Number, _arg2:String, _arg3:Boolean=false, _arg4:int=-1):void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.showScoreSubmitPrompt(_arg1, _arg2, _arg4, _arg3);
}
public function set onUnregisteredName(_arg1:Function):void{
_evt_onUnregisteredName = _arg1;
}
public function hideInterface():void{
if (_loaded == false){
return;
};
_gamerSafe.visible = false;
}
public function get highScore():Number{
if (_loaded == false){
return (0);
};
if (inSession == false){
return (0);
};
return (_gamerSafe.highScore);
}
public function set highScore(_arg1:Number):void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.highScore = _arg1;
}
private function e_onBeginSessionFailed(_arg1:Event):void{
if (_evt_beginSessionFailed != null){
_evt_beginSessionFailed();
};
dispatchEvent(_arg1);
}
public function levelVaultIncrementNumerics(_arg1, _arg2:Array):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultIncrementNumerics(_arg1, _arg2));
}
public function get inUse():Boolean{
return (_inUse);
}
public function levelVaultGetLastSelectedLevel():Object{
if (_loaded == false){
return (null);
};
return (_gamerSafe.levelVaultGetLastSelectedLevel());
}
public function levelVaultEditLevel(_arg1, _arg2:ByteArray):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultEditLevel(_arg1, _arg2));
}
public function get account():Object{
if (_loaded == false){
return (null);
};
return (_gamerSafe.account);
}
public function levelVaultSetNumericAttributes(_arg1, _arg2:Array, _arg3:Array):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultSetNumericAttributes(_arg1, _arg2, _arg3));
}
public function set savedGame(_arg1:String):void{
if (_loaded == false){
return;
};
_gamerSafe.savedGame = _arg1;
}
public function levelVaultGetLevelNumRatings(_arg1:Object=null):int{
if (_loaded == false){
return (0);
};
return (_gamerSafe.levelVaultGetLevelNumRatings(_arg1));
}
public function get gamerTestMode():Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.gamerTestMode);
}
public function get iconUrl():String{
if (_loaded == false){
return ("");
};
return (_gamerSafe.iconUrl);
}
public function showRegistrationForm():void{
if (_loaded == false){
return;
};
_gamerSafe.showRegistrationForm();
}
private function e_onNetworkingError(_arg1:Event):void{
if (_evt_networkingError != null){
_evt_networkingError();
};
dispatchEvent(_arg1);
}
public function hasAchievement(_arg1:int):Boolean{
if (_loaded == false){
return (false);
};
if (inSession == false){
return (false);
};
return (_gamerSafe.hasAchievement(_arg1));
}
public function get failed():Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.failed);
}
public function get onUseStarted():Function{
return (_evt_useStarted);
}
private function e_onRegistrationFormClosed(_arg1:Event):void{
if (_evt_onRegistrationFormClosed != null){
_evt_onRegistrationFormClosed();
};
dispatchEvent(_arg1);
}
public function showStatusBar(_arg1:Object=null):void{
if (_loaded == false){
return;
};
_gamerSafe.showStatusBar(_arg1);
}
public function get loggedIn():Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.loggedIn);
}
private function e_onLevelVaultLevelCreated(_arg1:Event):void{
if (_evt_onLevelVaultLevelCreated != null){
_evt_onLevelVaultLevelCreated();
};
dispatchEvent(_arg1);
}
private function e_onLevelVaultLevelStringsSet(_arg1:Event):void{
if (_evt_onLevelVaultLevelStringsSet != null){
_evt_onLevelVaultLevelStringsSet();
};
dispatchEvent(_arg1);
}
private function e_onBeginSession(_arg1:Event):void{
if (_evt_beginSession != null){
_evt_beginSession();
};
dispatchEvent(_arg1);
}
public function closeItemInterface():void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.closeItemInterface();
}
public function latestItemConsumptionInfo():Object{
if (_loaded == false){
return (null);
};
return (_gamerSafe.getLatestItemConsumptionInfo());
}
private function e_onLevelVaultLevelNumericsIncremented(_arg1:Event):void{
if (_evt_onLevelVaultLevelNumericsIncremented != null){
_evt_onLevelVaultLevelNumericsIncremented();
};
dispatchEvent(_arg1);
}
public function get onMetaData():Function{
return (_evt_onMetaData);
}
public function get onScoreSubmitted():Function{
return (_evt_onScoreSubmitted);
}
public function set onBeginSession(_arg1:Function):void{
_evt_beginSession = _arg1;
}
public function get onMetaDataError():Function{
return (_evt_onMetaDataError);
}
public function set onLevelVaultLevelStringsSet(_arg1:Function):void{
_evt_onLevelVaultLevelStringsSet = _arg1;
}
public function set onLevelVaultLevelFlagged(_arg1:Function):void{
_evt_onLevelVaultLevelFlagged = _arg1;
}
private function e_onLoginFormClosed(_arg1:Event):void{
if (_evt_onLoginFormClosed != null){
_evt_onLoginFormClosed();
};
dispatchEvent(_arg1);
}
private function e_onLevelVaultLevelEdited(_arg1:Event):void{
if (_evt_onLevelVaultLevelEdited != null){
_evt_onLevelVaultLevelEdited();
};
dispatchEvent(_arg1);
}
private function e_onMetaData(_arg1:Event):void{
if (_evt_onMetaData != null){
_evt_onMetaData();
};
dispatchEvent(_arg1);
}
public function levelVaultFetchLevelByID(_arg1:int):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultFetchLevelByID(_arg1));
}
public function get onLevelVaultLevelEdited():Function{
return (_evt_onLevelVaultLevelEdited);
}
public function showScoreboard(_arg1:int=-1):void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.showScoreboard(_arg1);
}
public function get onScoreboardRecieved():Function{
return (_evt_onScoreboardRecieved);
}
public function setStyle(_arg1:String, _arg2):void{
if (_loaded == false){
_tmpSkin[_arg1] = _arg2;
return;
};
var _local3:Object = new Object();
_local3[_arg1] = _arg2;
_gamerSafe.setSkin(_local3);
}
public function levelVaultSetStringAttribute(_arg1, _arg2:String, _arg3:String):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultSetStringAttribute(_arg1, _arg2, _arg3));
}
private function e_onItemPurchaseFailed(_arg1:Event):void{
if (_evt_itemPurchaseFailed != null){
_evt_itemPurchaseFailed();
};
dispatchEvent(_arg1);
}
public function showLogin(_arg1:Object=null):void{
if (_loaded == false){
return;
};
_gamerSafe.showLogin(_arg1);
}
private function e_onMetaDataError(_arg1:Event):void{
if (_evt_onMetaDataError != null){
_evt_onMetaDataError();
};
dispatchEvent(_arg1);
}
public function set onUseStarted(_arg1:Function):void{
_evt_useStarted = _arg1;
}
public function requestMetaDataByValue(_arg1:int, _arg2:Number, _arg3:Number, _arg4:int=-1, _arg5:int=1):void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.requestMetaDataByValue(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function get onUseChanged():Function{
return (_evt_useChanged);
}
public function set onLevelVaultLevelEdited(_arg1:Function):void{
_evt_onLevelVaultLevelEdited = _arg1;
}
private function setupStage(_arg1:Event):void{
if (stage == null){
return;
};
_stage = stage;
_stage.addEventListener(Event.RESIZE, resizeStage);
_stageWidth = stage.stageWidth;
_stageHeight = stage.stageHeight;
if (root != null){
_referrer = root.loaderInfo.loaderURL;
};
if (loaded){
_gamerSafe.componentWidth = _stageWidth;
_gamerSafe.componentHeight = _stageHeight;
_stage.addChild((_gamerSafe as Sprite));
};
}
public function get onBeginSessionFailed():Function{
return (_evt_beginSessionFailed);
}
public function bestowFreeItem(_arg1:int):Boolean{
if (_loaded == false){
return (false);
};
_gamerSafe.bestowFreeItem(_arg1);
return (true);
}
public function saveToScoreboard(_arg1:Number, _arg2:String, _arg3:int=-1, _arg4:String=""):void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.saveToScoreboard(_arg1, _arg2, _arg3, _arg4);
}
public function get onLevelVaultLevelRated():Function{
return (_evt_onLevelVaultLevelRated);
}
public function set onScoreSubmitted(_arg1:Function):void{
_evt_onScoreSubmitted = _arg1;
}
public function set onConfirmYes(_arg1:Function):void{
_evt_confYes = _arg1;
}
public function get onUseEnded():Function{
return (_evt_useEnded);
}
private function e_onConsumptionCompleted(_arg1:Event):void{
if (_evt_onConsumptionCompleted != null){
_evt_onConsumptionCompleted();
};
dispatchEvent(_arg1);
}
public function get FAQUrl():String{
if (_loaded == false){
return ("");
};
return (_gamerSafe.FAQUrl);
}
private function e_onUseEnded(_arg1):void{
if (_inUse == false){
return;
};
_inUse = false;
if (_evt_useChanged != null){
_evt_useChanged();
};
if (_evt_useEnded != null){
_evt_useEnded();
};
dispatchEvent(new Event("inUseEnded"));
dispatchEvent(new Event("inUseChanged"));
}
public function set onMetaData(_arg1:Function):void{
_evt_onMetaData = _arg1;
}
public function get onAccountChange():Function{
return (_evt_accountChange);
}
private function get levelVaultEventObject():EventDispatcher{
if (_loaded == false){
return (null);
};
return (_gamerSafe.levelVaultEventObject);
}
public function get onApiReady():Function{
return (_evt_apiReady);
}
public function levelVaultSetNumericAttribute(_arg1, _arg2:String, _arg3:Number):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultSetNumericAttribute(_arg1, _arg2, _arg3));
}
public function levelVaultDeleteLevel(_arg1):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultDeleteLevel(_arg1));
}
private function e_onConfirmNo(_arg1:Event):void{
if (_evt_confNo != null){
_evt_confNo();
};
dispatchEvent(new Event("confirmedNo"));
}
public function get onLevelVaultLevelNumericsIncremented():Function{
return (_evt_onLevelVaultLevelNumericsIncremented);
}
public function get onItemPurchase():Function{
return (_evt_itemPurchase);
}
public function set onMetaDataError(_arg1:Function):void{
_evt_onMetaDataError = _arg1;
}
private function onLoadingComplete(_arg1:Event):void{
_status = "Ready";
_loaded = true;
_gamerSafe = (_loader.content as Object);
_gamerSafe.componentWidth = _stageWidth;
_gamerSafe.componentHeight = _stageHeight;
_gamerSafe.setSkin(_tmpSkin);
_gamerSafe.addEventListener(EVT_NETWORKING_ERROR, e_onNetworkingError);
_gamerSafe.addEventListener(EVT_ACCOUNT_CHANGE, e_onAccountChange);
_gamerSafe.addEventListener(EVT_LOGIN, e_onLogin);
_gamerSafe.addEventListener(EVT_LOGIN_FAILED, e_onLoginFailed);
_gamerSafe.addEventListener(EVT_BEGIN_SESSION, e_onBeginSession);
_gamerSafe.addEventListener(EVT_BEGIN_SESSION_FAILED, e_onBeginSessionFailed);
_gamerSafe.addEventListener(EVT_ITEM_PURCHASE, e_onItemPurchase);
_gamerSafe.addEventListener(EVT_ITEM_PURCHASE_FAILED, e_onItemPurchaseFailed);
_gamerSafe.addEventListener("yes", e_onConfirmYes);
_gamerSafe.addEventListener("no", e_onConfirmNo);
_gamerSafe.addEventListener("dialog_begin", e_onUseStarted);
_gamerSafe.addEventListener("dialog_end", e_onUseEnded);
_gamerSafe.addEventListener(EVT_SCOREBOARD_ENTRIES_ERROR, e_onScoreboardError);
_gamerSafe.addEventListener(EVT_SCOREBOARD_ENTRIES_RECEIVED, e_onScoreboardRecieved);
_gamerSafe.addEventListener(EVT_SCOREBOARD_ENTRY_SUBMITTED, e_onScoreSubmitted);
_gamerSafe.addEventListener(EVT_METADATA, e_onMetaData);
_gamerSafe.addEventListener(EVT_METADATA_ERROR, e_onMetaDataError);
_gamerSafe.addEventListener(EVT_UNREGISTERED_NAME, e_onUnregisteredName);
_gamerSafe.addEventListener(EVT_CONSUMPTION_COMPLETED, e_onConsumptionCompleted);
_gamerSafe.addEventListener(EVT_REGISTRATION_FORM_CLOSED, e_onRegistrationFormClosed);
_gamerSafe.addEventListener(EVT_LOGIN_FORM_CLOSED, e_onLoginFormClosed);
var _local2:EventDispatcher = levelVaultEventObject;
_local2.addEventListener(EVT_LEVELVAULT_GOT_LEVELS, e_onLevelVaultGotLevels);
_local2.addEventListener(EVT_LEVELVAULT_GOT_SINGLE_LEVEL, e_onLevelVaultGotLevel);
_local2.addEventListener(EVT_LEVELVAULT_LEVEL_CREATED, e_onLevelVaultLevelCreated);
_local2.addEventListener(EVT_LEVELVAULT_LEVEL_DELETED, e_onLevelVaultLevelDeleted);
_local2.addEventListener(EVT_LEVELVAULT_LEVEL_EDITED, e_onLevelVaultLevelEdited);
_local2.addEventListener(EVT_LEVELVAULT_LEVEL_FLAGGED, e_onLevelVaultLevelFlagged);
_local2.addEventListener(EVT_LEVELVAULT_LEVEL_RATED, e_onLevelVaultLevelRated);
_local2.addEventListener(EVT_LEVELVAULT_LEVEL_NUMERICS_SET, e_onLevelVaultLevelNumericsSet);
_local2.addEventListener(EVT_LEVELVAULT_LEVEL_STRINGS_SET, e_onLevelVaultLevelStringsSet);
_local2.addEventListener(EVT_LEVELVAULT_LEVEL_NUMERICS_INCREMENTED, e_onLevelVaultLevelNumericsIncremented);
_local2.addEventListener(EVT_LEVELVAULT_LEVEL_NUMERICS_SET, e_onLevelVaultLevelAttributesChanged);
_local2.addEventListener(EVT_LEVELVAULT_LEVEL_STRINGS_SET, e_onLevelVaultLevelAttributesChanged);
_local2.addEventListener(EVT_LEVELVAULT_LEVEL_NUMERICS_INCREMENTED, e_onLevelVaultLevelAttributesChanged);
if (_stage != null){
_stage.addChild((_gamerSafe as Sprite));
};
if (root != null){
_referrer = root.loaderInfo.loaderURL;
};
if (_storedPasscode != ""){
beginSession(_storedPasscode, _storedHashseed);
};
showStatusBar();
e_onApiReady(new Event("apiReady"));
}
public function set onScoreboardRecieved(_arg1:Function):void{
_evt_onScoreboardRecieved = _arg1;
}
private function resizeStage(_arg1:Event):void{
if (loaded == false){
return;
};
_stageWidth = _stage.stageWidth;
_stageHeight = _stage.stageHeight;
_gamerSafe.componentWidth = _stageWidth;
_gamerSafe.componentHeight = _stageHeight;
}
public function showAchievements(_arg1:Object=null):void{
if (_loaded == false){
return;
};
_gamerSafe.showAchievements(_arg1);
}
public function requestMetaDataForAccount(_arg1:int=-1):void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.requestMetaDataForAccount(_arg1);
}
public function bestowAchievement(_arg1:uint):Boolean{
if (_loaded == false){
return (false);
};
_gamerSafe.bestowAchievement(_arg1);
return (true);
}
private function get sprite():Sprite{
if (_loaded == false){
return (null);
};
return (_gamerSafe.sprite);
}
private function e_onApiReady(_arg1:Event):void{
if (_evt_apiReady != null){
_evt_apiReady();
};
dispatchEvent(_arg1);
}
public function get onLogin():Function{
return (_evt_login);
}
private function e_onAccountChange(_arg1:Event):void{
if (_evt_accountChange != null){
_evt_accountChange();
};
dispatchEvent(_arg1);
}
public function levelVaultGetLevelsByDateCreated(_arg1:String, _arg2:String, _arg3:Boolean=true, _arg4:uint=20, _arg5:uint=0):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultGetLevelsByDateCreated(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public function hasItem(_arg1:int):Boolean{
if (_loaded == false){
return (false);
};
if (inSession == false){
return (false);
};
return (_gamerSafe.hasItem(_arg1));
}
public function requestMetaDataByType(_arg1:int, _arg2:int=1000):void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.requestMetaDataByType(_arg1, _arg2);
}
public function get onItemPurchaseFailed():Function{
return (_evt_itemPurchaseFailed);
}
public function levelVaultGetLevelData(_arg1:Object=null):ByteArray{
if (_loaded == false){
return (null);
};
return (_gamerSafe.levelVaultGetLevelData(_arg1));
}
public function levelVaultSetStringAttributes(_arg1, _arg2:Array, _arg3:Array):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultSetStringAttributes(_arg1, _arg2, _arg3));
}
public function get username():String{
if (_loaded == false){
return ("GamerSafe");
};
return (_gamerSafe.username);
}
public function set onUseChanged(_arg1:Function):void{
_evt_useChanged = _arg1;
}
private function e_onScoreSubmitted(_arg1:Event):void{
if (_evt_onScoreSubmitted != null){
_evt_onScoreSubmitted();
};
dispatchEvent(_arg1);
}
public function set onUseEnded(_arg1:Function):void{
_evt_useEnded = _arg1;
}
public function set onConsumptionCompleted(_arg1:Function):void{
_evt_onConsumptionCompleted = _arg1;
}
private function e_onConfirmYes(_arg1:Event):void{
if (_evt_confYes != null){
_evt_confYes();
};
dispatchEvent(new Event("confirmedYes"));
}
public function get onLevelVaultLevelDeleted():Function{
return (_evt_onLevelVaultLevelDeleted);
}
public function levelVaultGetLevelsByRating(_arg1:Number, _arg2:Number, _arg3:Boolean=true, _arg4:uint=20, _arg5:uint=0):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultGetLevelsByRating(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public function get onLevelVaultLevelAttributesChanged():Function{
return (_evt_onLevelVaultLevelAttributesChanged);
}
public function disable():void{
if (_status == "Ready"){
_status = "Disabled";
_loaded = false;
};
}
private function e_onLogin(_arg1:Event):void{
if (_evt_login != null){
_evt_login();
};
flashBar();
dispatchEvent(_arg1);
}
public function levelVaultSetAttributes(_arg1, _arg2:Object):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultSetAttributes(_arg1, _arg2));
}
private function e_onLevelVaultGotLevels(_arg1:Event):void{
if (_evt_onLevelVaultGotLevels != null){
_evt_onLevelVaultGotLevels();
};
dispatchEvent(_arg1);
}
public function set wantsNewsletter(_arg1:Boolean):void{
if (_loaded == true){
_gamerSafe.wantsNewsletter = _arg1;
};
}
public function get autoLogin():Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.autoLogin);
}
public function getItemById(_arg1:int):Object{
var _local3:Object;
if (_loaded == false){
return (null);
};
if (inSession == false){
return (null);
};
var _local2:Array = items;
for each (_local3 in _local2) {
if (_local3.id == _arg1){
return (_local3);
};
};
return (null);
}
public function set onConfirmNo(_arg1:Function):void{
_evt_confNo = _arg1;
}
public function get onUnregisteredName():Function{
return (_evt_onUnregisteredName);
}
public function get unregisteredName():String{
if (_loaded == false){
return ("");
};
return (_gamerSafe.unregisteredName);
}
public function get achievementPopupPosition():Point{
if (_loaded == false){
return (new Point(0, 0));
};
return (_gamerSafe.achievementPopupPosition);
}
public function set onBeginSessionFailed(_arg1:Function):void{
_evt_beginSessionFailed = _arg1;
}
public function levelVaultGetLevelID(_arg1:Object=null):uint{
if (_loaded == false){
return (null);
};
return (_gamerSafe.levelVaultGetLevelID(_arg1));
}
public function get savedGame():String{
if (_loaded == false){
return ("");
};
if (_gamerSafe.savedGame == null){
return ("");
};
return (_gamerSafe.savedGame);
}
public function set onLevelVaultLevelRated(_arg1:Function):void{
_evt_onLevelVaultLevelRated = _arg1;
}
public function get onLevelVaultLevelStringsSet():Function{
return (_evt_onLevelVaultLevelStringsSet);
}
private function e_onUnregisteredName(_arg1:Event):void{
if (_evt_onUnregisteredName != null){
_evt_onUnregisteredName();
};
dispatchEvent(_arg1);
}
public function set onLevelVaultGotLevels(_arg1:Function):void{
_evt_onLevelVaultGotLevels = _arg1;
}
public function showMessageBox(_arg1:String, _arg2:String, _arg3:Boolean=true):void{
if (_loaded == false){
return;
};
_gamerSafe.messageBox(_arg1, _arg2, _arg3);
}
public function get onScoreboardError():Function{
return (_evt_onScoreboardError);
}
public function levelVaultCreateLevelFromObject(_arg1:Object):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultCreateLevelFromObject(_arg1));
}
public function get achievements():Array{
if (_loaded == false){
return ([]);
};
if (inSession == false){
return ([]);
};
return (_gamerSafe.achievementList);
}
public function get onBeginSession():Function{
return (_evt_beginSession);
}
public function levelVaultGetLevelAsObject(_arg1:Object=null):Object{
if (_loaded == false){
return (null);
};
return (_gamerSafe.levelVaultGetLevelAsObject(_arg1));
}
public function consumeItem(_arg1:int, _arg2:int):void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.consumeItem(_arg1, _arg2);
}
public function set onNetworkingError(_arg1:Function):void{
_evt_networkingError = _arg1;
}
public function get levelVaultReady():Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultReady);
}
public function get signupUrl():String{
if (_loaded == false){
return ("");
};
return (_gamerSafe.signupUrl);
}
private function e_onLevelVaultLevelAttributesChanged(_arg1:Event):void{
if (_evt_onLevelVaultLevelAttributesChanged != null){
_evt_onLevelVaultLevelAttributesChanged();
};
dispatchEvent(_arg1);
}
public function get onLevelVaultLevelFlagged():Function{
return (_evt_onLevelVaultLevelFlagged);
}
public function set onAccountChange(_arg1:Function):void{
_evt_accountChange = _arg1;
}
public function get gamerGold():uint{
if (_loaded == false){
return (0);
};
return (_gamerSafe.gamerGold);
}
public function get onConfirmYes():Function{
return (_evt_confYes);
}
private function e_onLoginFailed(_arg1:Event):void{
if (_evt_loginFailed != null){
_evt_loginFailed();
};
dispatchEvent(_arg1);
}
public function set onLoginFailed(_arg1:Function):void{
_evt_loginFailed = _arg1;
}
public function levelVaultGetLastCreatedLevelID():int{
if (_loaded == false){
return (0);
};
return (_gamerSafe.levelVaultGetLastCreatedLevelID());
}
public function set onApiReady(_arg1:Function):void{
_evt_apiReady = _arg1;
}
public function get onLevelVaultGotLevels():Function{
return (_evt_onLevelVaultGotLevels);
}
public function set onLevelVaultLevelCreated(_arg1:Function):void{
_evt_onLevelVaultLevelCreated = _arg1;
}
public function levelVaultGetLevelsByDateModified(_arg1:String, _arg2:String, _arg3:Boolean=true, _arg4:uint=20, _arg5:uint=0):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultGetLevelsByDateModified(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public function set onItemPurchase(_arg1:Function):void{
_evt_itemPurchase = _arg1;
}
public function set onRegistrationFormClosed(_arg1:Function):void{
_evt_onRegistrationFormClosed = _arg1;
}
public function login(_arg1:String, _arg2:String, _arg3:Boolean=false):void{
if (_loaded == false){
return;
};
_gamerSafe.login(_arg1, _arg2, _arg3);
}
private function e_onLevelVaultGotLevel(_arg1:Event):void{
if (_evt_onLevelVaultGotLevel != null){
_evt_onLevelVaultGotLevel();
};
dispatchEvent(_arg1);
}
public function get onConsumptionCompleted():Function{
return (_evt_onConsumptionCompleted);
}
public function set onLevelVaultLevelNumericsIncremented(_arg1:Function):void{
_evt_onLevelVaultLevelNumericsIncremented = _arg1;
}
public function levelVaultGetLevelAttributes(_arg1:Object=null):Array{
if (_loaded == false){
return ([]);
};
return (_gamerSafe.levelVaultGetLevelAttributes(_arg1));
}
public function set onLoginFormClosed(_arg1:Function):void{
_evt_onLoginFormClosed = _arg1;
}
private function e_onLevelVaultLevelNumericsSet(_arg1:Event):void{
if (_evt_onLevelVaultLevelNumericsSet != null){
_evt_onLevelVaultLevelNumericsSet();
};
dispatchEvent(_arg1);
}
public function get wantsNewsletter():Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.wantsNewsletter);
}
public function tryAutoLogin():void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.tryAutoLogin();
}
public function get onConfirmNo():Function{
return (_evt_confNo);
}
private function e_onLevelVaultLevelDeleted(_arg1:Event):void{
if (_evt_onLevelVaultLevelDeleted != null){
_evt_onLevelVaultLevelDeleted();
};
dispatchEvent(_arg1);
}
public function levelVaultGetLevelAsCustomObject(_arg1:Class, _arg2:Object=null){
if (_loaded == false){
return (null);
};
return (_gamerSafe.levelVaultGetLevelAsCustomObject(_arg1, _arg2));
}
public function get paymentUrl():String{
if (_loaded == false){
return ("");
};
return (_gamerSafe.paymentUrl);
}
public function logout():void{
if (_loaded == false){
return;
};
_gamerSafe.logout();
}
public function requestScoreboardEntries(_arg1:int=-1):void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.requestScoreboardEntries(_arg1);
}
public function set partner(_arg1:String):void{
if (_loaded == false){
return;
};
_gamerSafe.setPartner(_arg1);
}
public function set onLevelVaultGotLevel(_arg1:Function):void{
_evt_onLevelVaultGotLevel = _arg1;
}
public function enable():void{
if (_status == "Disabled"){
_status = "Ready";
_loaded = true;
};
}
public function showShop(_arg1:Object=null):void{
if (_loaded == false){
return;
};
_gamerSafe.showShop(_arg1);
}
public function set onLogin(_arg1:Function):void{
_evt_login = _arg1;
}
public function get latestScoreboardEntries():Object{
if (_loaded == false){
return (null);
};
return (_gamerSafe.getLatestScoreboardEntries());
}
public function set onLevelVaultLevelNumericsSet(_arg1:Function):void{
_evt_onLevelVaultLevelNumericsSet = _arg1;
}
private function e_onScoreboardError(_arg1:Event):void{
if (_evt_onScoreboardError != null){
_evt_onScoreboardError();
};
dispatchEvent(_arg1);
}
public function get onNetworkingError():Function{
return (_evt_networkingError);
}
public function hideStatusBar():void{
if (_loaded == false){
return;
};
_gamerSafe.hideStatusBar();
}
public function set onItemPurchaseFailed(_arg1:Function):void{
_evt_itemPurchaseFailed = _arg1;
}
public function get onLoginFailed():Function{
return (_evt_loginFailed);
}
public function levelVaultGetLastSelectedLevels():Array{
if (_loaded == false){
return ([]);
};
return (_gamerSafe.levelVaultGetLastSelectedLevels());
}
public function get latestItemPurchaseInfo():Object{
if (_loaded == false){
return (null);
};
return (_gamerSafe.getLatestItemPurchaseInfo());
}
private function onLoadingError(_arg1:IOErrorEvent):void{
_loaded = false;
_status = "Failed";
trace("Failed to load GamerSafe");
}
public function closeScoreboard():void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.closeScoreboard();
}
private function beginSession(_arg1:String, _arg2:String):Boolean{
if (_loaded == false){
return (false);
};
_gamerSafe.beginSession(_arg1, _arg2, _referrer);
return (true);
}
private function e_onLevelVaultLevelRated(_arg1:Event):void{
if (_evt_onLevelVaultLevelStringsSet != null){
_evt_onLevelVaultLevelStringsSet();
};
dispatchEvent(_arg1);
}
public function showPopup(_arg1:String, _arg2:Object=null):void{
if (_loaded == false){
return;
};
_gamerSafe.showPopup(_arg1, _arg2);
}
public function levelVaultGetLevelsByStringData(_arg1:String, _arg2:String, _arg3:Boolean=true, _arg4:uint=20, _arg5:uint=0):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultGetLevelsByStringData(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public function get inSession():Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.inSession);
}
public function get latestMetaDataResult():Array{
if (_loaded == false){
return ([]);
};
return (_gamerSafe.metaData);
}
public function purchaseItem(_arg1:int, _arg2:int=0):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.purchaseItem(_arg1, _arg2));
}
public function requestUnregisteredName():void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.requestUnregisteredUserName();
}
public function get onRegistrationFormClosed():Function{
return (_evt_onRegistrationFormClosed);
}
public function get gamerXP():uint{
if (_loaded == false){
return (0);
};
return (_gamerSafe.gamerXP);
}
public function levelVaultGetLevelRating(_arg1:Object=null):Number{
if (_loaded == false){
return (0);
};
return (_gamerSafe.levelVaultGetLevelRating(_arg1));
}
public function get onLoginFormClosed():Function{
return (_evt_onLoginFormClosed);
}
public function getConsumptionsAvailable(_arg1:int):int{
if (_loaded == false){
return (0);
};
if (inSession == false){
return (0);
};
return (_gamerSafe.getConsumptionsAvailable(_arg1));
}
private function e_onLevelVaultLevelFlagged(_arg1:Event):void{
if (_evt_onLevelVaultLevelFlagged != null){
_evt_onLevelVaultLevelFlagged();
};
dispatchEvent(_arg1);
}
public function levelVaultGetLastEditedLevelID():int{
if (_loaded == false){
return (0);
};
return (_gamerSafe.levelVaultGetLastEditedLevelID());
}
public function get items():Array{
if (_loaded == false){
return ([]);
};
if (inSession == false){
return ([]);
};
return (_gamerSafe.itemList);
}
public function get gamerPoints():uint{
if (_loaded == false){
return (0);
};
return (_gamerSafe.gamerPoints);
}
public function set onLevelVaultLevelDeleted(_arg1:Function):void{
_evt_onLevelVaultLevelDeleted = _arg1;
}
public function setRegistrationDefaults(_arg1:Object):void{
if (_loaded == false){
return;
};
_gamerSafe.setRegisterDefaults(_arg1);
}
public function levelVaultGetLevelsByNumericData(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=true, _arg5:uint=20, _arg6:uint=0):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultGetLevelsByNumericData(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6));
}
public function levelVaultIncrementNumeric(_arg1, _arg2:String):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultIncrementNumeric(_arg1, _arg2));
}
private function e_onItemPurchase(_arg1:Event):void{
if (_evt_itemPurchase != null){
_evt_itemPurchase();
};
dispatchEvent(_arg1);
}
public function setMetaData(_arg1:int, _arg2:Number):void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
if (!loggedIn){
return;
};
_gamerSafe.setMetaData(_arg1, _arg2);
}
private function e_onUseStarted(_arg1):void{
if (_inUse == true){
return;
};
_inUse = true;
if (_evt_useChanged != null){
_evt_useChanged();
};
if (_evt_useStarted != null){
_evt_useStarted();
};
dispatchEvent(new Event("inUseStarted"));
dispatchEvent(new Event("inUseChanged"));
}
public function set onLevelVaultLevelAttributesChanged(_arg1:Function):void{
_evt_onLevelVaultLevelAttributesChanged = _arg1;
}
public function get onLevelVaultGotLevel():Function{
return (_evt_onLevelVaultGotLevel);
}
public function purchaseItemInterface(_arg1:int, _arg2:int=0):void{
if (_loaded == false){
return;
};
if (inSession == false){
return;
};
_gamerSafe.purchaseItemInterface(_arg1, _arg2);
}
public function get onLevelVaultLevelNumericsSet():Function{
return (_evt_onLevelVaultLevelNumericsSet);
}
public function get status():String{
return (_status);
}
public function get isGamerGoldPurchaseDisabled():Boolean{
if (_loaded == false){
return (true);
};
return (_gamerSafe.isGamerGoldPurchasingDisabled);
}
public function set autoLogin(_arg1:Boolean):void{
if (_loaded == false){
return;
};
_gamerSafe.autoLogin = _arg1;
}
private function e_onScoreboardRecieved(_arg1:Event):void{
if (_evt_onScoreboardRecieved != null){
_evt_onScoreboardRecieved();
};
dispatchEvent(_arg1);
}
public function get onLevelVaultLevelCreated():Function{
return (_evt_onLevelVaultLevelCreated);
}
public function set onScoreboardError(_arg1:Function):void{
_evt_onScoreboardError = _arg1;
}
public function levelVaultCreateLevel(_arg1:ByteArray):Boolean{
if (_loaded == false){
return (false);
};
return (_gamerSafe.levelVaultCreateLevel(_arg1));
}
public function setShopCategoryVisible(_arg1:int, _arg2:Boolean):void{
if (_loaded == false){
return;
};
_gamerSafe.setShopCategoryVisible(_arg1, _arg2);
}
public static function get hasUpgrades():Boolean{
return (((api.hasItem(GamerSafeConstants.ITEM_SPECIAL_OFFER)) || (api.hasItem(GamerSafeConstants.ITEM_WEAPON_UPGRADES))));
}
public static function get api():GamerSafe{
if (_instance == null){
trace("GamerSafe: Instance Error: Attempted to get instance before initial construction.");
return (null);
};
return (_instance);
}
public static function set api(_arg1:GamerSafe):void{
_instance = _arg1;
}
public static function get apiLoaded():Boolean{
return (!((_instance == null)));
}
public static function get hasWeapons():Boolean{
return (((api.hasItem(GamerSafeConstants.ITEM_SPECIAL_OFFER)) || (api.hasItem(GamerSafeConstants.ITEM_PRO_WEAPONS_PACK))));
}
public static function get hasTraps():Boolean{
return (((api.hasItem(GamerSafeConstants.ITEM_SPECIAL_OFFER)) || (api.hasItem(GamerSafeConstants.ITEM_TRAPS_PACK))));
}
public static function get hasMimi():Boolean{
return (((api.hasItem(GamerSafeConstants.ITEM_SPECIAL_OFFER)) || (api.hasItem(GamerSafeConstants.ITEM_MIMI_KASUMI))));
}
}
}//package
Section 247
//GamerSafeConstants (GamerSafeConstants)
package {
public class GamerSafeConstants {
public static const ACHIEVEMENT_TRAP_MASTER:int = 420;
public static const ACHIEVEMENT_DISMEMBERER:int = 418;
public static const SCOREBOARD_SURVIVAL:int = 140;
public static const ITEM_MIMI_KASUMI:int = 362;
public static const ACHIEVEMENT_PRECISION_MASTER:int = 417;
public static const ACHIEVEMENT_WEAPONS_MASTER:int = 421;
public static const ITEM_TRAPS_PACK:int = 368;
public static const ACHIEVEMENT_SURVIVOR:int = 419;
public static const ACHIEVEMENTGROUP_WEAPONS:int = 146;
public static const ITEMGROUP_EXPANSION_PACK:int = 179;
public static const ACHIEVEMENT_MINEFIELD:int = 422;
public static const ITEM_BAND_AID:int = 371;
public static const ITEM_PRO_WEAPONS_PACK:int = 367;
public static const ACHIEVEMENT_ROUND_10:int = 414;
public static const ACHIEVEMENT_ROUND_50:int = 416;
public static const SCOREBOARDGROUP_SCOREBOARDS:int = 118;
public static const SCOREBOARD_HIGHSCORES:int = 139;
public static const ITEMGROUP__SPECAL_OFFER_:int = 193;
public static const ITEMGROUP_CHARACTERS:int = 176;
public static const ITEMGROUP_BONUSES:int = 180;
public static const ACHIEVEMENT_ROUND_25:int = 415;
public static const ITEM_SPECIAL_OFFER:int = 379;
public static const ACHIEVEMENTGROUP_SURVIVAL:int = 143;
public static const ITEM_TURBO_MODE:int = 370;
public static const ACHIEVEMENTGROUP_TRAPS:int = 147;
public static const ITEM_WEAPON_UPGRADES:int = 369;
}
}//package
Section 248
//Resetter (Resetter)
package {
import org.hoah.debug.*;
import org.hoah.zombies.*;
import org.hoah.zombies.traps.*;
import org.hoah.zombies.ai.*;
import org.hoah.shadows.*;
import org.hoah.zombies.ui.intermission.*;
import org.hoah.zombies.ui.intermission.upgradeScreen.*;
import org.hoah.zombies.ui.*;
import org.hoah.zombies.weapons.*;
import org.hoah.particles.*;
import org.hoah.zombies.soundeffects.*;
import org.hoah.zombies.rounds.*;
public class Resetter {
public static function resetAll():void{
Tracer.info("Restarting Game, Resetting classes.");
ParticleRenderer.dispose();
ShadowWorld.dispose();
Friend.dispose();
Round.dispose();
Sounds.dispose();
AmbientSound.dispose();
Trap.dispose();
Powerup.dispose();
UpgradeIconButton.dispose();
BuyWeaponsPanel.dispose();
TopMenu.dispose();
TrapsPanel.dispose();
WeaponsUpgradePanel.dispose();
GameOverScreen.dispose();
HealthPanel.dispose();
WeaponDisplay.dispose();
WeaponSelector.dispose();
WeaponPanel.dispose();
UserInterface.dispose();
Weapon.dispose();
LightSwitch.dispose();
Player.dispose();
Zombie.dispose();
Map.dispose();
Zombies.dispose();
}
}
}//package
Section 249
//ZombieLoader (ZombieLoader)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import CPMStar.*;
import flash.net.*;
import org.hoah.debug.*;
public class ZombieLoader extends MovieClip {
private var sitelockBmp:Bitmap;
private var startGameButton:MovieClip;
private var progressBar:Bitmap;
private var delayPercent:Number;// = 0
private var locked:Boolean;// = false
private var _gamerSafeBmpInCls:Class;
private var _zombieLoaderCls:Class;
private var gamerSafeBmp:Bitmap;
private var _sitelockCls:Class;
private var sponsorLogoMc:MovieClip;
private var gamerSafeBmpIn:Bitmap;
private var loaderProgress:BitmapData;
private var ad:AdLoader;
private var _sponsorLogo:Class;
private var _loaderProgressCls:Class;
private var zombieLoader:Bitmap;
private var _gamerSafeBmpCls:Class;
private var startButton:Bitmap;
private var _startButtonCls:Class;
private var registerButton:MovieClip;
public function ZombieLoader(){
_sponsorLogo = ZombieLoader__sponsorLogo;
sponsorLogoMc = new _sponsorLogo();
_gamerSafeBmpCls = ZombieLoader__gamerSafeBmpCls;
gamerSafeBmp = (new _gamerSafeBmpCls() as Bitmap);
_gamerSafeBmpInCls = ZombieLoader__gamerSafeBmpInCls;
gamerSafeBmpIn = (new _gamerSafeBmpInCls() as Bitmap);
_loaderProgressCls = ZombieLoader__loaderProgressCls;
loaderProgress = new _loaderProgressCls().bitmapData;
_zombieLoaderCls = ZombieLoader__zombieLoaderCls;
zombieLoader = (new _zombieLoaderCls() as Bitmap);
_startButtonCls = ZombieLoader__startButtonCls;
startButton = (new _startButtonCls() as Bitmap);
_sitelockCls = ZombieLoader__sitelockCls;
sitelockBmp = (new _sitelockCls() as Bitmap);
progressBar = new Bitmap(new BitmapData(622, 30, true, 0));
registerButton = new MovieClip();
startGameButton = new MovieClip();
super();
Tracer.log("New Game; Begin Preload");
addEventListener(Event.ADDED_TO_STAGE, checkSitelock);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(Event.ADDED_TO_STAGE, initGamersafe);
addChild(zombieLoader);
addChild(progressBar);
progressBar.x = 11;
progressBar.y = 351;
gamerSafeBmp.y = (480 - gamerSafeBmp.height);
gamerSafeBmpIn.y = (480 - gamerSafeBmp.height);
registerButton.graphics.beginFill(0, 0);
registerButton.graphics.drawRect(0, (480 - gamerSafeBmp.height), 640, 100);
registerButton.graphics.endFill();
registerButton.buttonMode = true;
registerButton.addEventListener(MouseEvent.CLICK, showGamersafeRegister);
addChild(gamerSafeBmp);
addChild(registerButton);
addChild(sponsorLogoMc);
sponsorLogoMc.x = (640 - 180);
sponsorLogoMc.y = (480 - 60);
sponsorLogoMc.buttonMode = true;
sponsorLogoMc.addEventListener(MouseEvent.CLICK, gotoSponsor);
ad = new AdLoader("1722QCFCF16DB");
addChild(ad);
ad.x = 16;
ad.y = 100;
}
public function startGame(_arg1:Event):void{
var _local3:Object;
if (locked){
return;
};
var _local2:Class = Class(getDefinitionByName("Zombies"));
if (_local2){
_local3 = new (_local2);
if ((parent is Loader)){
addChild((_local3 as DisplayObject));
} else {
stage.addChildAt((_local3 as DisplayObject), 0);
parent.removeChild(this);
};
};
}
private function loggedIn():void{
var _local1:Boolean;
if (locked){
return;
};
if (GamerSafe.api.loggedIn){
removeChild(gamerSafeBmp);
addChild(gamerSafeBmpIn);
_local1 = GamerSafe.api.hasItem(GamerSafeConstants.ITEM_SPECIAL_OFFER);
if (_local1){
GamerSafe.api.setShopCategoryVisible(176, false);
GamerSafe.api.setShopCategoryVisible(179, false);
GamerSafe.api.setShopCategoryVisible(193, true);
} else {
if (GamerSafe.api.hasItem(GamerSafeConstants.ITEM_MIMI_KASUMI)){
GamerSafe.api.setShopCategoryVisible(193, false);
};
};
};
}
public function init(_arg1:Event=null):void{
if (locked){
return;
};
startButton.x = 440;
startButton.y = 310;
addChild(startButton);
addChild(startGameButton);
startGameButton.graphics.beginFill(0, 0);
startGameButton.graphics.drawRect(440, 310, 200, 45);
startGameButton.graphics.endFill();
startGameButton.buttonMode = true;
startGameButton.addEventListener(MouseEvent.CLICK, startGame);
}
private function checkSitelock(_arg1:Event):void{
}
public function showGamersafeRegister(_arg1:MouseEvent):void{
if (locked){
return;
};
if (GamerSafe.api.loggedIn == false){
GamerSafe.api.showRegistrationForm();
};
}
private function organiseItems():void{
if (locked){
return;
};
var _local1:Object = GamerSafe.api.getItemById(GamerSafeConstants.ITEM_SPECIAL_OFFER);
if (_local1.developerCode == "inactive"){
GamerSafe.api.setShopCategoryVisible(193, false);
};
}
public function initGamersafe(_arg1:Event):void{
if (locked){
return;
};
new GamerSafe(stage);
GamerSafe.api.onLogin = loggedIn;
GamerSafe.api.onBeginSession = organiseItems;
}
public function setProgress(_arg1:Number):void{
if (locked){
return;
};
progressBar.bitmapData.fillRect(progressBar.bitmapData.rect, 0);
progressBar.bitmapData.copyPixels(loaderProgress, new Rectangle(0, 0, (622 * _arg1), 30), new Point());
}
private function gotoSponsor(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.arcadebomb.com/"));
}
public function onEnterFrame(_arg1:Event):void{
if (locked){
return;
};
delayPercent = (delayPercent + 1);
if ((((framesLoaded == totalFrames)) && ((delayPercent >= 100)))){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
init();
};
var _local2:Number = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal);
var _local3:Number = (delayPercent / 100);
setProgress(Math.min(_local2, _local3));
}
}
}//package
Section 250
//ZombieLoader__gamerSafeBmpCls (ZombieLoader__gamerSafeBmpCls)
package {
import mx.core.*;
public class ZombieLoader__gamerSafeBmpCls extends BitmapAsset {
}
}//package
Section 251
//ZombieLoader__gamerSafeBmpInCls (ZombieLoader__gamerSafeBmpInCls)
package {
import mx.core.*;
public class ZombieLoader__gamerSafeBmpInCls extends BitmapAsset {
}
}//package
Section 252
//ZombieLoader__loaderProgressCls (ZombieLoader__loaderProgressCls)
package {
import mx.core.*;
public class ZombieLoader__loaderProgressCls extends BitmapAsset {
}
}//package
Section 253
//ZombieLoader__sitelockCls (ZombieLoader__sitelockCls)
package {
import mx.core.*;
public class ZombieLoader__sitelockCls extends BitmapAsset {
}
}//package
Section 254
//ZombieLoader__sponsorLogo (ZombieLoader__sponsorLogo)
package {
import flash.utils.*;
import mx.core.*;
public class ZombieLoader__sponsorLogo extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function ZombieLoader__sponsorLogo(){
dataClass = ZombieLoader__sponsorLogo_dataClass;
super();
initialWidth = (11000 / 20);
initialHeight = (8000 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package
Section 255
//ZombieLoader__sponsorLogo_dataClass (ZombieLoader__sponsorLogo_dataClass)
package {
import mx.core.*;
public class ZombieLoader__sponsorLogo_dataClass extends ByteArrayAsset {
}
}//package
Section 256
//ZombieLoader__startButtonCls (ZombieLoader__startButtonCls)
package {
import mx.core.*;
public class ZombieLoader__startButtonCls extends BitmapAsset {
}
}//package
Section 257
//ZombieLoader__zombieLoaderCls (ZombieLoader__zombieLoaderCls)
package {
import mx.core.*;
public class ZombieLoader__zombieLoaderCls extends BitmapAsset {
}
}//package
Section 258
//Zombies (Zombies)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import org.hoah.debug.*;
import org.hoah.zombies.*;
import flash.geom.*;
import org.hoah.Tweener.*;
import org.hoah.zombies.ai.*;
import org.hoah.zombies.ui.*;
import org.hoah.zombies.weapons.*;
import org.hoah.zombies.soundeffects.*;
import org.hoah.splash.*;
import org.hoah.zombies.rounds.*;
public class Zombies extends MovieClip {
private var assets:Array;
private var deadSprite:Sprite;
private var gameOverTweenSprite:Sprite;
private var gameOverAnimDuration:Number;// = 0
private var staticZombieAssets:Array;
private var map:Map;
private var hurtSprite:Sprite;
public static const TESTING_MODE:Boolean = false;
public static var instance:Zombies;
public static var paused:Boolean = false;
public function Zombies(){
hurtSprite = new Sprite();
deadSprite = new Sprite();
gameOverTweenSprite = new Sprite();
assets = ["zombie_die1", "zombie_explode", "zombie3_die1", "zombie3_explode", "trap_barrier", "trap_bear", "trap_chomper", "trap_small_mine", "trap_sentry", "trap_wall", "trap_oil", "trap_frag_mine"];
staticZombieAssets = ["zombie_walk", "zombie_walk_dismember_L", "zombie_walk_dismember_R", "zombie3_walk", "zombie3_walk_dismember_L", "zombie3_walk_dismember_R"];
super();
Tracer.log("Starting Game");
Debug.registerCommand("reset", doReset);
splashThenInit();
}
public function doReset(_arg1=null):void{
Resetter.resetAll();
}
public function updateCamera(_arg1:Event):void{
map.offsetX = (map.offsetX + Math.round((((-(map.player.x) + 320) - map.offsetX) / 10)));
map.offsetY = (map.offsetY + Math.round((((-(map.player.y) + 240) - map.offsetY) / 10)));
if (map.offsetX > 0){
map.offsetX = 0;
};
if (map.offsetY > 0){
map.offsetY = 0;
};
if (map.offsetX < (-(map.mapWidth) + 640)){
map.offsetX = (-(map.mapWidth) + 640);
};
if (Round.intermission){
if (map.offsetY < (-(map.mapHeight) + 400)){
map.offsetY = (-(map.mapHeight) + 400);
};
} else {
if (map.offsetY < (-(map.mapHeight) + 480)){
map.offsetY = (-(map.mapHeight) + 480);
};
};
}
public function hurt():void{
addChild(hurtSprite);
hurtSprite.alpha = 1;
addEventListener(Event.ENTER_FRAME, tweenHurt);
}
public function init():void{
instance = this;
hurtSprite.graphics.beginFill(0xFF0000, 0.2);
hurtSprite.graphics.drawRect(0, 0, 640, 480);
hurtSprite.graphics.endFill();
deadSprite.graphics.beginFill(0, 1);
deadSprite.graphics.drawRect(0, 0, 640, 480);
deadSprite.graphics.endFill();
GamerSafe.api.onApiReady = gamerSafeReady;
GamerSafe.api.setStyle("backgroundColor", 0);
GamerSafe.api.setStyle("foregroundColor", 0xFFFF00);
if (Assets.inited){
showMenu();
} else {
Assets.init(cacheAssets);
};
}
private function addGameOverAnimStep(_arg1:Number, _arg2:Object):void{
_arg2.transition = "linear";
_arg2.time = _arg1;
_arg2.delay = gameOverAnimDuration;
gameOverAnimDuration = (gameOverAnimDuration + _arg1);
Tweener.addTween(gameOverTweenSprite, _arg2);
}
private function splashThenInit():void{
addChild(new HoahSplashScreen(init));
GamerSafe.api.hideStatusBar();
}
public function tweenHurt(_arg1:Event):void{
hurtSprite.alpha = (hurtSprite.alpha - 0.05);
if (hurtSprite.alpha <= 0){
removeChild(hurtSprite);
removeEventListener(Event.ENTER_FRAME, tweenHurt);
};
}
public function initGame(_arg1:Boolean=false):void{
if (Map.instance == null){
map = new Map();
};
if (_arg1){
Tracer.log("Menu -> Survival. (User started survival mode)");
Round.initSurvival();
beginGame();
} else {
Tracer.log("Menu -> Story. (User started story mode)");
Round.init();
Sounds.playEffect("introSound");
setTimeout(beginGame, 8500);
addChild(new Subtitles());
Subtitles.showVocal("ella", "This building looks safe enough to shelter in for the night.");
setTimeout(Subtitles.show, 3300, "[Breaking down door]");
setTimeout(Subtitles.showVocal, 6500, "ella", "Here, take the flashlight");
};
}
public function dead():void{
Tracer.alert("Game Over");
map.spawnTimer.stop();
addChild(deadSprite);
deadSprite.alpha = 0;
addEventListener(Event.ENTER_FRAME, tweenDead);
}
public function cacheAssets():void{
var _local1:String;
var _local2:String;
trace("Caching assets...");
Weapons.cacheAssets();
stage.addChild(Debug.instance);
for each (_local1 in assets) {
SpriteBitmap.Create(_local1, Assets.getInstance(_local1));
};
for each (_local2 in staticZombieAssets) {
Zombie.staticSprites[_local2] = new BitmapSprite(Assets[_local2].bitmapData, false, 32);
};
showMenu();
}
public function gameOver():void{
var _local1:Zombie;
var _local2:BitmapData;
var _local3:Bitmap;
for each (_local1 in Zombie.instances) {
_local1.silentKill();
};
paused = true;
map.gameOver();
_local2 = Assets.map1Bitmap.bitmapData.clone();
_local2.copyPixels(Assets.map1LightBitmap.bitmapData, Assets.map1LightBitmap.bitmapData.rect, new Point(), null, null, true);
_local3 = new Bitmap(_local2);
_local3.smoothing = true;
gameOverTweenSprite.addChild(_local3);
addChild(gameOverTweenSprite);
addChild(new GameOverScreen());
gameOverTweenSprite.x = -100;
gameOverTweenSprite.y = -100;
gameOverTweenSprite.alpha = 0;
gameOverTweenSprite.x = -200;
gameOverTweenSprite.y = 0;
addGameOverAnimStep(1, {alpha:1});
addGameOverAnimStep(12, {x:-200, y:(-(Assets.map1Bitmap.height) + 480)});
addGameOverAnimStep(1, {alpha:0});
addGameOverAnimStep(0, {y:-200});
addGameOverAnimStep(1, {alpha:1});
addGameOverAnimStep(12, {x:(-(Assets.map1Bitmap.height) + 640)});
addGameOverAnimStep(1, {alpha:0});
addGameOverAnimStep(0, {x:(-(Assets.map1Bitmap.height) + 640), y:(-(Assets.map1Bitmap.height) + 480)});
addGameOverAnimStep(1, {alpha:1});
addGameOverAnimStep(12, {x:-200});
addGameOverAnimStep(1, {alpha:0});
addGameOverAnimStep(0, {x:-340, y:-384});
addGameOverAnimStep(1, {alpha:1});
}
public function tweenDead(_arg1:Event):void{
deadSprite.alpha = (deadSprite.alpha + 0.01);
if (deadSprite.alpha >= 1){
removeEventListener(Event.ENTER_FRAME, tweenDead);
gameOver();
};
}
private function gamerSafeReady():void{
GamerSafe.api.hideStatusBar();
trace("GamerSafe API Ready");
}
private function beginGame():void{
Sounds.playMusic("mainloop", true);
Sounds.playEffect("menuClick1");
map.offsetX = -295;
map.offsetY = -22;
addChildAt(map, 0);
addEventListener(Event.ENTER_FRAME, updateCamera);
if (UserInterface.instance == null){
new UserInterface();
};
addChild(UserInterface.instance);
stage.focus = map;
if (Round.survivalMode){
Map.instance.lightsOff = false;
UserInterface.addPoints(200000);
Round.gotoIntermission();
} else {
Map.instance.lightsOff = true;
new LightSwitch();
LightSwitch.instance.reset();
new Friend(609, (480 / 2));
UserInterface.intro();
};
}
public function showMenu():void{
addChild(new Menu());
}
public static function dispose():void{
var _local2 = instance;
with (_local2) {
hurtSprite = new Sprite();
deadSprite = new Sprite();
gameOverTweenSprite = new Sprite();
gameOverAnimDuration = 0;
map = null;
while (numChildren > 0) {
removeChildAt(0);
};
removeEventListener(Event.ENTER_FRAME, updateCamera);
removeEventListener(Event.ENTER_FRAME, tweenDead);
removeEventListener(Event.ENTER_FRAME, tweenHurt);
};
paused = false;
trace("Disposed zombies main class.");
instance.init();
}
}
}//package