Section 1
//explosionxx_49 (breakable_objects_fla.explosionxx_49)
package breakable_objects_fla {
import flash.display.*;
public dynamic class explosionxx_49 extends MovieClip {
public function explosionxx_49(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package breakable_objects_fla
Section 2
//mc_burst_28 (breakable_objects_fla.mc_burst_28)
package breakable_objects_fla {
import flash.display.*;
public dynamic class mc_burst_28 extends MovieClip {
public function mc_burst_28(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package breakable_objects_fla
Section 3
//Symbol3_41 (breakable_objects_fla.Symbol3_41)
package breakable_objects_fla {
import flash.display.*;
public dynamic class Symbol3_41 extends MovieClip {
public function Symbol3_41(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package breakable_objects_fla
Section 4
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import com.adobe.utils.*;
public class MD5 {
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function createBlocks(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:int = (_arg1.length * 8);
var _local4 = 0xFF;
var _local5:int;
while (_local5 < _local3) {
_local2[(_local5 >> 5)] = (_local2[(_local5 >> 5)] | ((_arg1.charCodeAt((_local5 / 8)) & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | (128 << (_local3 % 32)));
_local2[((((_local3 + 64) >>> 9) << 4) + 14)] = _local3;
return (_local2);
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local2 = 1732584193;
var _local3 = -271733879;
var _local4 = -1732584194;
var _local5 = 271733878;
var _local10:Array = createBlocks(_arg1);
var _local11:int = _local10.length;
var _local12:int;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 1)], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 3)], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 5)], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 7)], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 9)], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 11)], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[(_local12 + 13)], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[(_local12 + 15)], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 6)], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 0)], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 10)], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 4)], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 14)], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 8)], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[(_local12 + 2)], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[(_local12 + 12)], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 5)], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 8)], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 11)], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 14)], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 1)], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 4)], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 7)], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 10)], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 13)], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 0)], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 3)], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 6)], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[(_local12 + 9)], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[(_local12 + 12)], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[(_local12 + 15)], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[(_local12 + 2)], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 0)], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 7)], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 14)], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 5)], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 12)], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 3)], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 10)], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 1)], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 8)], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 15)], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 6)], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 13)], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[(_local12 + 4)], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[(_local12 + 11)], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[(_local12 + 2)], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[(_local12 + 9)], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
}
}//package com.adobe.crypto
Section 5
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local4:int;
var _local5:int;
var _local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package com.adobe.utils
Section 6
//IValidData (com.liquable.data.IValidData)
package com.liquable.data {
public interface IValidData {
function isValid():Boolean;
}
}//package com.liquable.data
Section 7
//AStar (com.liquable.game.astar.AStar)
package com.liquable.game.astar {
import com.liquable.game.geom.*;
public class AStar {
private var pMoveObject;
private var pOutPath:Array;
private var pDstLoc:PointInt;
private var pMap:IAStarMap;
private var pSrcLoc:PointInt;
private var pSearchCounts:int;
private var pBestNode:AStarNode;
private var pSearchSteps:int;
private var pOpenList:Object;
private var pDirections:Array;
private var pCurrNode:AStarNode;
private var pSearchCompleted:Boolean;
private var pFoundPath:Boolean;
private var pClosedList:Object;
private var pOpenSize:int;
private static const sOrthogonalDirections:Array = [new PointInt(1, 0), new PointInt(-1, 0), new PointInt(0, 1), new PointInt(0, -1)];
private static const sDiagonalDirections:Array = [new PointInt(1, 1), new PointInt(1, -1), new PointInt(-1, 1), new PointInt(-1, -1)];
public static const IMPASSABLE_COST:Number = 1.79769313486232E308;
public function AStar(_arg1:IAStarMap, _arg2:Boolean){
pMap = _arg1;
pSearchCompleted = false;
if (_arg2){
pDirections = sDiagonalDirections.concat(sOrthogonalDirections);
} else {
pDirections = sOrthogonalDirections;
};
}
public function destroy():void{
pOpenList = null;
pClosedList = null;
pOutPath = null;
pBestNode = null;
pMap = null;
pMoveObject = null;
}
public function getResultPath():Array{
return (pOutPath);
}
public function getSearchCounts():int{
return (pSearchCounts);
}
public function get dstLoc():PointInt{
return (pDstLoc);
}
public function isPathFound():Boolean{
return (pFoundPath);
}
public function initPathFinding(_arg1, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{
if (pSearchCompleted){
if ((((((((((pMoveObject == _arg1)) && ((pSrcLoc.x == _arg2)))) && ((pSrcLoc.y == _arg3)))) && ((pDstLoc.x == _arg4)))) && ((pDstLoc.y == _arg5)))){
return;
};
};
pMoveObject = _arg1;
pSrcLoc = new PointInt(_arg2, _arg3);
pDstLoc = new PointInt(_arg4, _arg5);
pOutPath = new Array();
pOpenList = new Object();
pOpenSize = 0;
pClosedList = new Object();
pCurrNode = new AStarNode(null, _arg2, _arg3);
pBestNode = null;
pFoundPath = false;
pSearchCompleted = false;
pSearchCounts = 0;
pSearchSteps = 0;
pClosedList[pCurrNode.id] = pCurrNode;
var _local6:int = pMap.getPassCost(_arg1, _arg2, _arg3, _arg4, _arg5);
if (_local6 == IMPASSABLE_COST){
pSearchCompleted = true;
};
}
public function getSearchSteps():int{
return (pSearchSteps);
}
public function getMap():IAStarMap{
return (pMap);
}
public function isSearchCompleted():Boolean{
return (pSearchCompleted);
}
public function get srcLoc():PointInt{
return (pSrcLoc);
}
public function findPath(_arg1:int):void{
var _local2:AStarNode;
var _local3:Number;
var _local4:int;
var _local5:int;
var _local6:PointInt;
var _local7:Number;
var _local8:PointInt;
if (pSearchCompleted){
return;
};
pSearchCounts++;
pSearchSteps = (pSearchSteps + _arg1);
while (((!(pFoundPath)) && ((_arg1 > 0)))) {
if (pOpenSize > 0){
if (pBestNode){
if (pOpenList.hasOwnProperty(pBestNode.id)){
pCurrNode = pOpenList[pBestNode.id];
};
};
if (pCurrNode == null){
_local7 = IMPASSABLE_COST;
for each (_local2 in pOpenList) {
if (_local2.fCost < _local7){
_local7 = _local2.fCost;
pCurrNode = _local2;
};
};
};
pBestNode = pCurrNode;
pClosedList[pCurrNode.id] = pCurrNode;
delete pOpenList[pCurrNode.id];
pOpenSize--;
};
if (pCurrNode == null){
pSearchCompleted = true;
break;
};
for each (_local6 in pDirections) {
_local4 = (pCurrNode.x + _local6.x);
_local5 = (pCurrNode.y + _local6.y);
_local3 = pMap.getPassCost(pMoveObject, pCurrNode.x, pCurrNode.y, _local4, _local5);
if (_local3 == IMPASSABLE_COST){
} else {
if (((!((_local6.x == 0))) && (!((_local6.y == 0))))){
//unresolved if
} else {
_local2 = new AStarNode(pCurrNode, _local4, _local5);
if (pMap.getReachedDestination(pMoveObject, _local2.x, _local2.y, pDstLoc.x, pDstLoc.y)){
pCurrNode = _local2;
pFoundPath = true;
break;
};
if (pClosedList.hasOwnProperty(_local2.id)){
} else {
_local2.gCost = (pCurrNode.gCost + _local3);
_local2.fCost = (_local2.gCost + pMap.getFCost(pMoveObject, _local2.gCost, _local4, _local5, pDstLoc.x, pDstLoc.y));
if (!pOpenList.hasOwnProperty(_local2.id)){
pOpenList[_local2.id] = _local2;
pOpenSize++;
} else {
if (_local2.gCost < pOpenList[_local2.id].gCost){
pOpenList[_local2.id] = _local2;
} else {
_local2 = null;
};
};
if (_local2){
if ((((pBestNode == null)) || ((_local2.fCost < pBestNode.fCost)))){
pBestNode = _local2;
};
};
};
};
};
};
if (!pFoundPath){
pCurrNode = null;
};
};
if (pFoundPath){
_local2 = pCurrNode;
while (_local2.parent) {
_local8 = new PointInt(_local2.x, _local2.y);
pOutPath.unshift(_local8);
_local2 = _local2.parent;
};
pSearchCompleted = true;
};
}
public function get moveObject(){
return (pMoveObject);
}
}
}//package com.liquable.game.astar
Section 8
//AStarNode (com.liquable.game.astar.AStarNode)
package com.liquable.game.astar {
import com.liquable.game.geom.*;
class AStarNode extends PointInt {
public var fCost:Number;
public var gCost:Number;
private var pParent:AStarNode;
private var pID:String;
function AStarNode(_arg1:AStarNode, _arg2:int, _arg3:int){
super(_arg2, _arg3);
pID = toString();
pParent = _arg1;
gCost = (fCost = 0);
}
public function get id():String{
return (pID);
}
public function get parent():AStarNode{
return (pParent);
}
}
}//package com.liquable.game.astar
Section 9
//IAStarMap (com.liquable.game.astar.IAStarMap)
package com.liquable.game.astar {
public interface IAStarMap {
function getReachedDestination(_arg1, _arg2:int, _arg3:int, _arg4:int, _arg5:int):Boolean;
function getPassCost(_arg1, _arg2:int, _arg3:int, _arg4:int, _arg5:int):Number;
function getFCost(_arg1, _arg2:Number, _arg3:int, _arg4:int, _arg5:int, _arg6:int):Number;
}
}//package com.liquable.game.astar
Section 10
//GameCamera (com.liquable.game.camera.GameCamera)
package com.liquable.game.camera {
import flash.display.*;
import com.liquable.utils.*;
import flash.geom.*;
public class GameCamera implements ICameraObject {
private var pGameRoot:Sprite;
private var pFollowSpeed:Number;// = 0.5
private var pWidthHalf:Number;
private var pHeightHalf:Number;
private var pRectNeedUpdate:Boolean;
private var pFocusShift:Point;
private var pFocusObject:ICameraObject;
private var pGameArea:Rectangle;
private var pWidth:Number;
private var pHeight:Number;
private var pPosition:Point;
private var pZoomScale:Number;// = 1
private var pCameraArea:Rectangle;
private var pRect:Rectangle;
private var pFollowSpeedMax:Number;// = 1.79769313486232E308
public function GameCamera(_arg1:Number, _arg2:Number){
pPosition = new Point();
pFocusShift = new Point();
pWidth = _arg1;
pHeight = _arg2;
pWidthHalf = (_arg1 / 2);
pHeightHalf = (_arg2 / 2);
pRect = new Rectangle(0, 0, pWidth, pHeight);
pRectNeedUpdate = true;
}
public function set y(_arg1:Number):void{
pPosition.y = _arg1;
}
public function get left():Number{
return (rect.left);
}
public function getGameArea():Rectangle{
return (pGameArea);
}
public function setFocus(_arg1:ICameraObject, _arg2:Number=0, _arg3:Number=0):void{
pFocusObject = _arg1;
pFocusShift.x = _arg2;
pFocusShift.y = _arg3;
}
public function get right():Number{
return (rect.right);
}
public function setGameArea(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
pGameArea = new Rectangle(_arg1, _arg2, _arg3, _arg4);
updateCameraArea();
}
public function getFocus():ICameraObject{
return (pFocusObject);
}
public function get height():Number{
return (pHeight);
}
public function getScreenPosition(_arg1:Number, _arg2:Number):Point{
return (new Point((_arg1 + pGameRoot.x), (_arg2 + pGameRoot.y)));
}
public function set zoom(_arg1:Number):void{
pZoomScale = _arg1;
updateCameraArea();
setGameRoot(pGameRoot);
}
public function getGamePosition(_arg1:Number, _arg2:Number):Point{
return (new Point((_arg1 - pGameRoot.x), (_arg2 - pGameRoot.y)));
}
public function get bottom():Number{
return (rect.bottom);
}
public function get width():Number{
return (pWidth);
}
public function getCameraArea():Rectangle{
return (pCameraArea);
}
public function update():void{
if (pFocusObject){
pPosition.x = MathUtil.numberFollowTarget(pPosition.x, (pFocusObject.x + pFocusShift.x), pFollowSpeed, 1, pFollowSpeedMax);
pPosition.y = MathUtil.numberFollowTarget(pPosition.y, (pFocusObject.y + pFocusShift.y), pFollowSpeed, 1, pFollowSpeedMax);
};
pPosition.x = Math.max(pCameraArea.left, Math.min(pCameraArea.right, pPosition.x));
pPosition.y = Math.max(pCameraArea.top, Math.min(pCameraArea.bottom, pPosition.y));
pGameRoot.x = Math.round((pWidthHalf - (pPosition.x * pZoomScale)));
pGameRoot.y = Math.round((pHeightHalf - (pPosition.y * pZoomScale)));
pRectNeedUpdate = true;
}
public function get zoom():Number{
return (pZoomScale);
}
public function setFollowSpeed(_arg1:Number):void{
pFollowSpeed = _arg1;
}
public function get top():Number{
return (rect.top);
}
public function getFollowSpeed():Number{
return (pFollowSpeed);
}
public function get rect():Rectangle{
if (pRectNeedUpdate){
pRect.x = (pPosition.x - pWidthHalf);
pRect.y = (pPosition.y - pHeightHalf);
pRectNeedUpdate = false;
};
return (pRect);
}
public function getGameRoot():Sprite{
return (pGameRoot);
}
public function getFollowSpeedMax():Number{
return (pFollowSpeedMax);
}
public function setFollowSpeedMax(_arg1:Number):void{
pFollowSpeedMax = _arg1;
}
public function setGameRoot(_arg1:Sprite):void{
pGameRoot = _arg1;
if (pGameRoot){
pGameRoot.scaleX = (pGameRoot.scaleY = pZoomScale);
};
}
public function set x(_arg1:Number):void{
pPosition.x = _arg1;
}
public function get x():Number{
return (pPosition.x);
}
public function get y():Number{
return (pPosition.y);
}
private function updateCameraArea():void{
pCameraArea = new Rectangle((pGameArea.x + (pWidthHalf / pZoomScale)), (pGameArea.y + (pHeightHalf / pZoomScale)), (pGameArea.width - (pWidth / pZoomScale)), (pGameArea.height - (pHeight / pZoomScale)));
}
}
}//package com.liquable.game.camera
Section 11
//ICameraObject (com.liquable.game.camera.ICameraObject)
package com.liquable.game.camera {
public interface ICameraObject {
function get x():Number;
function get y():Number;
}
}//package com.liquable.game.camera
Section 12
//DebugConsole (com.liquable.game.debug.DebugConsole)
package com.liquable.game.debug {
import flash.display.*;
import flash.text.*;
public class DebugConsole extends Sprite {
private var consoleField:TextField;
public function DebugConsole(_arg1:Number, _arg2:Number){
setDimension(_arg1, _arg2);
}
public function setDimension(_arg1:Number, _arg2:Number):void{
this.graphics.clear();
this.graphics.beginFill(0, 0.5);
this.graphics.drawRect(0, 0, _arg1, _arg2);
if (consoleField == null){
consoleField = new TextField();
consoleField.textColor = 0xFFFFFF;
consoleField.selectable = false;
consoleField.wordWrap = true;
consoleField.multiline = true;
this.addChild(consoleField);
};
consoleField.width = this.width;
consoleField.height = this.height;
}
public function println(_arg1:String):void{
consoleField.text = ((_arg1 + "\n") + consoleField.text).substr(0, 1000);
}
}
}//package com.liquable.game.debug
Section 13
//DebugFpsMeter (com.liquable.game.debug.DebugFpsMeter)
package com.liquable.game.debug {
import com.liquable.game.*;
import flash.events.*;
import flash.utils.*;
public class DebugFpsMeter implements DebugItem {
private var pApplication:GameApplication;
private var pTimer:int;
private var pFrames:int;
private var pFps:Number;
private var pFramesToCount:int;// = 15
public function DebugFpsMeter(_arg1:GameApplication){
pApplication = _arg1;
start();
}
public function start():DebugFpsMeter{
pTimer = getTimer();
pFrames = 0;
pApplication.addUpdateFunction(update);
return (this);
}
public function stop():DebugFpsMeter{
pApplication.removeUpdateFunction(update);
return (this);
}
public function setFramesToCount(_arg1:int):void{
pFramesToCount = _arg1;
}
private function update(_arg1:Event):void{
var _local2:int;
if (++pFrames == pFramesToCount){
_local2 = getTimer();
pFps = ((pFrames / (_local2 - pTimer)) * 1000);
pTimer = _local2;
pFrames = 0;
};
}
public function toDebugString():String{
var _local1 = "invalid";
if (pApplication.getStage()){
_local1 = ("" + pApplication.getStage().frameRate);
};
return (((("" + Math.round(pFps)) + "/") + _local1));
}
}
}//package com.liquable.game.debug
Section 14
//DebugItem (com.liquable.game.debug.DebugItem)
package com.liquable.game.debug {
public interface DebugItem {
function toDebugString():String;
}
}//package com.liquable.game.debug
Section 15
//DebugItemRenderer (com.liquable.game.debug.DebugItemRenderer)
package com.liquable.game.debug {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public class DebugItemRenderer extends Sprite {
private var debugItem:DebugItem;
private var _title:String;
private var textField:TextField;
public function DebugItemRenderer(_arg1:String, _arg2:DebugItem){
_title = _arg1;
this.debugItem = _arg2;
textField = new TextField();
textField.background = true;
textField.backgroundColor = 0;
textField.textColor = 0xFFFFFF;
textField.autoSize = TextFieldAutoSize.LEFT;
textField.selectable = false;
this.addChild(textField);
}
public function update(_arg1:Event):void{
textField.text = (_title + getDebugString(debugItem));
}
public function terminate():void{
debugItem = null;
}
public function get title():String{
return (_title);
}
private static function getDebugString(_arg1:DebugItem):String{
var str:String;
var debugItem = _arg1;
try {
str = (": " + debugItem.toDebugString());
} catch(e:Error) {
str = ": invalid";
};
return (str);
}
}
}//package com.liquable.game.debug
Section 16
//DebugPanel (com.liquable.game.debug.DebugPanel)
package com.liquable.game.debug {
import com.liquable.game.*;
import flash.events.*;
import flash.display.*;
public class DebugPanel extends Sprite {
private var pApplication:GameApplication;
private var debugItemRenderers:Array;
private var debugConsole:DebugConsole;
public function DebugPanel(_arg1:GameApplication){
pApplication = _arg1;
this.mouseEnabled = false;
this.mouseChildren = false;
debugItemRenderers = new Array();
this.visible = true;
}
public function getDebugConsole():DebugConsole{
var _local1:DebugItemRenderer;
if (debugConsole == null){
debugConsole = new DebugConsole(300, 200);
this.addChild(debugConsole);
for each (_local1 in debugItemRenderers) {
_local1.x = (debugConsole.x + debugConsole.width);
};
};
return (debugConsole);
}
public function addDebugItem(_arg1:String, _arg2:DebugItem):void{
var _local4:DebugItemRenderer;
var _local3 = -1;
var _local5:int;
while (_local5 < debugItemRenderers.length) {
_local4 = debugItemRenderers[_local5];
if (_local4 == null){
if (_local3 == -1){
_local3 = _local5;
};
} else {
if (_local4.title == _arg1){
return;
};
};
_local5++;
};
_local4 = new DebugItemRenderer(_arg1, _arg2);
_local4.y = (_local5 * 18);
if (debugConsole){
_local4.x = (debugConsole.x + debugConsole.width);
};
this.addChild(_local4);
debugItemRenderers[((_local3 == -1)) ? debugItemRenderers.length : _local3] = _local4;
}
public function update(_arg1:Event):void{
var _local2:DebugItemRenderer;
for each (_local2 in this.debugItemRenderers) {
if (_local2){
_local2.update(_arg1);
};
};
}
override public function set visible(_arg1:Boolean):void{
super.visible = _arg1;
if (this.visible){
pApplication.addUpdateFunction(update);
} else {
pApplication.removeUpdateFunction(update);
};
}
}
}//package com.liquable.game.debug
Section 17
//DebugTagValueWatcher (com.liquable.game.debug.DebugTagValueWatcher)
package com.liquable.game.debug {
import com.liquable.utils.*;
public class DebugTagValueWatcher implements DebugItem {
private var pValue:Object;
private static var _sConstructorLock:Boolean = true;
private static var _sWatcherPool:Object;
public function DebugTagValueWatcher(){
DesignContract.preCondition((_sConstructorLock == false), "Please use the static function getById() to get an instance.");
}
public function toDebugString():String{
return (pValue.toString());
}
public function setValue(_arg1:Object):DebugTagValueWatcher{
pValue = _arg1;
return (this);
}
public static function getById(_arg1:String):DebugTagValueWatcher{
if (_sWatcherPool == null){
_sWatcherPool = new Object();
};
if (!_sWatcherPool.hasOwnProperty(_arg1)){
_sConstructorLock = false;
_sWatcherPool[_arg1] = new (DebugTagValueWatcher);
_sConstructorLock = true;
};
return (_sWatcherPool[_arg1]);
}
}
}//package com.liquable.game.debug
Section 18
//GameApplicationUpdateErrorEvent (com.liquable.game.events.GameApplicationUpdateErrorEvent)
package com.liquable.game.events {
import flash.events.*;
public class GameApplicationUpdateErrorEvent extends ErrorEvent {
private var pStackTrace:String;
public static const GAME_APPLICATION_UPDATE_ERROR:String = "gameApplicationUpdateError";
public function GameApplicationUpdateErrorEvent(_arg1:String, _arg2:String, _arg3:String, _arg4:Boolean=false, _arg5:Boolean=false){
super(_arg1, _arg4, _arg5, _arg2);
pStackTrace = _arg3;
}
public function get stackTrace():String{
return (pStackTrace);
}
override public function clone():Event{
return (new GameApplicationUpdateErrorEvent(type, text, pStackTrace, bubbles, cancelable));
}
}
}//package com.liquable.game.events
Section 19
//GameApplicationUpdateEvent (com.liquable.game.events.GameApplicationUpdateEvent)
package com.liquable.game.events {
import flash.events.*;
public class GameApplicationUpdateEvent extends Event {
private var pNeedUpdate:Boolean;
private var pTime:int;
public static const GAME_APPLICATION_UPDATE:String = "gameApplicationUpdate";
public function GameApplicationUpdateEvent(_arg1:String, _arg2:int, _arg3:Boolean, _arg4:Boolean=false, _arg5:Boolean=false){
super(_arg1, _arg4, _arg5);
pNeedUpdate = _arg3;
}
public function get time():int{
return (pTime);
}
public function reset(_arg1:int, _arg2:Boolean):void{
pTime = _arg1;
pNeedUpdate = _arg2;
}
override public function clone():Event{
return (new GameApplicationUpdateEvent(type, time, needUpdate, bubbles, cancelable));
}
public function get needUpdate():Boolean{
return (pNeedUpdate);
}
}
}//package com.liquable.game.events
Section 20
//ColorAdapter (com.liquable.game.geom.ColorAdapter)
package com.liquable.game.geom {
public class ColorAdapter {
private var pColorValue:uint;
private var pAlpha:Number;
public function ColorAdapter(_arg1:uint=0, _arg2:Number=1){
setColor(_arg1);
this.alpha = _arg2;
}
private function saveGetByte(_arg1:int):int{
return (Math.min(0xFF, Math.max(0, _arg1)));
}
public function set red(_arg1:int):void{
pColorValue = ((pColorValue & 0xFFFF) | (getByte(_arg1) << 16));
}
public function set green(_arg1:int):void{
pColorValue = ((pColorValue & 0xFF00FF) | (getByte(_arg1) << 8));
}
public function mixColor(_arg1:ColorAdapter, _arg2:Number):void{
mix(_arg1.red, _arg1.green, _arg1.blue, _arg2);
}
public function setColor(_arg1:uint):void{
pColorValue = _arg1;
}
public function addColor(_arg1:ColorAdapter):void{
add(_arg1.red, _arg1.green, _arg1.blue);
}
public function get color():uint{
return (pColorValue);
}
public function setRGB(_arg1:int, _arg2:int, _arg3:int):void{
pColorValue = (((getByte(_arg1) << 16) | (getByte(_arg2) << 8)) | getByte(_arg3));
}
public function toMatrixForFilter(_arg1:Number):Array{
_arg1 = Math.max(0, Math.min(1, _arg1));
var _local2:Number = (1 - _arg1);
var _local3:Array = new Array();
_local3 = _local3.concat([_local2, 0, 0, 0, Math.round((red * _arg1))]);
_local3 = _local3.concat([0, _local2, 0, 0, Math.round((green * _arg1))]);
_local3 = _local3.concat([0, 0, _local2, 0, Math.round((blue * _arg1))]);
_local3 = _local3.concat([0, 0, 0, pAlpha, 0]);
return (_local3);
}
public function get alpha():Number{
return (pAlpha);
}
public function add(_arg1:int, _arg2:int, _arg3:int):void{
setRGB(saveGetByte((this.red + _arg1)), saveGetByte((this.green + _arg2)), saveGetByte((this.blue + _arg3)));
}
public function get red():int{
return (getByte((pColorValue >> 16)));
}
public function duplicate():ColorAdapter{
return (new ColorAdapter(pColorValue));
}
private function saveScaleByte(_arg1:int, _arg2:Number):int{
return (saveGetByte(Math.round((_arg1 * _arg2))));
}
public function scale(_arg1:Number, _arg2:Number, _arg3:Number):void{
setRGB(saveScaleByte(red, _arg1), saveScaleByte(green, _arg2), saveScaleByte(blue, _arg3));
}
public function get blue():int{
return (getByte(pColorValue));
}
public function get green():int{
return (getByte((pColorValue >> 8)));
}
public function set alpha(_arg1:Number):void{
pAlpha = Math.max(0, Math.min(1, _arg1));
}
private function getByte(_arg1:int):int{
return ((_arg1 & 0xFF));
}
public function mix(_arg1:int, _arg2:int, _arg3:int, _arg4:Number):void{
var _local5:Number = (1 - _arg4);
setRGB((saveScaleByte(this.red, _local5) + saveScaleByte(_arg1, _arg4)), (saveScaleByte(this.green, _local5) + saveScaleByte(_arg2, _arg4)), (saveScaleByte(this.blue, _local5) + saveScaleByte(_arg3, _arg4)));
}
}
}//package com.liquable.game.geom
Section 21
//PointInt (com.liquable.game.geom.PointInt)
package com.liquable.game.geom {
public class PointInt {
public var x:int;
public var y:int;
public function PointInt(_arg1:int=0, _arg2:int=0){
x = _arg1;
y = _arg2;
}
public function getPerpendicularDistance(_arg1:PointInt):int{
return ((Math.abs((_arg1.x - x)) + Math.abs((_arg1.y - y))));
}
public function clonePointInt():PointInt{
return (new PointInt(x, y));
}
public function toString():String{
return (makeString(x, y));
}
public function equals(_arg1:PointInt):Boolean{
if ((((((_arg1 == null)) || (!((_arg1.x == x))))) || (!((_arg1.y == y))))){
return (false);
};
return (true);
}
public static function fromString(_arg1:String):PointInt{
var _local2:Array = _arg1.split(",");
if (_local2.length == 2){
return (new PointInt(parseInt(_local2[0]), parseInt(_local2[1])));
};
return (null);
}
public static function makeString(_arg1:int, _arg2:int):String{
return (((("" + _arg1) + ",") + _arg2));
}
}
}//package com.liquable.game.geom
Section 22
//IPostData (com.liquable.game.postoffice.IPostData)
package com.liquable.game.postoffice {
public interface IPostData {
function get data_type():String;
}
}//package com.liquable.game.postoffice
Section 23
//PostClient (com.liquable.game.postoffice.PostClient)
package com.liquable.game.postoffice {
import com.liquable.game.*;
public class PostClient {
private var pReceivePostFunction:Function;
private var pPostOffice:PostOffice;
private var pPostId:String;
public function PostClient(_arg1){
if ((_arg1 is PostOffice)){
pPostOffice = PostOffice(_arg1);
} else {
if ((_arg1 is GameApplication)){
pPostOffice = GameApplication(_arg1).getPostOffice();
} else {
throw (new Error("new PostClient(manager:Object): manager has to be either PostOffice or GameApplication"));
};
};
}
public function unsubscribe(_arg1:String):void{
pPostOffice.removeClient(_arg1, this);
}
public function destroy():void{
pPostOffice.removeClient(null, this);
pPostOffice = null;
pReceivePostFunction = null;
}
function receivePost(_arg1:PostPackage):void{
if (((_arg1.isValid()) && (!((pReceivePostFunction == null))))){
pReceivePostFunction(_arg1);
};
}
public function subscribe(_arg1:String):void{
pPostOffice.addClient(_arg1, this);
}
public function getPostId():String{
return (pPostId);
}
public function getPostOffice():PostOffice{
return (pPostOffice);
}
public function setReceivePostFunction(_arg1:Function):void{
pReceivePostFunction = _arg1;
}
public function setPostId(_arg1:String):void{
pPostId = _arg1;
subscribe(pPostId);
}
public function sendMessage(_arg1:String, _arg2:IPostData, _arg3:int=0, _arg4:Array=null):void{
pPostOffice.sendMessage(pPostId, _arg1, _arg2, _arg3, _arg4);
}
}
}//package com.liquable.game.postoffice
Section 24
//PostOffice (com.liquable.game.postoffice.PostOffice)
package com.liquable.game.postoffice {
import com.liquable.game.*;
import flash.events.*;
import com.liquable.utils.*;
import flash.utils.*;
public final class PostOffice {
private var pApplication:GameApplication;
private var pTopicClients:Object;
private var pTimer:int;
private var pActive:Boolean;
private var pTimeUnitType:int;
private var pDelayedPackages:Array;
public static const TIME_UNIT_FRAME:int = TIME_UNIT_TYPE.nextIndex();
public static const TIME_UNIT_MILLISECONDS:int = TIME_UNIT_TYPE.nextIndex();
private static var TIME_UNIT_TYPE:Enum = new Enum();
public function PostOffice(_arg1:GameApplication, _arg2:int){
pApplication = _arg1;
pTimeUnitType = _arg2;
reset();
}
public function terminate():void{
var _local1:Array;
var _local2:PostClient;
stop();
for each (_local1 in pTopicClients) {
for each (_local2 in _local1) {
_local2.destroy();
};
};
pDelayedPackages = null;
pTopicClients = null;
}
public function start():void{
if (!pActive){
pActive = true;
pApplication.addUpdateFunction(update);
};
}
private function sendPostPackageToClients(_arg1:PostPackage, _arg2:Array):void{
var _local3:int;
while (_local3 < _arg2.length) {
_arg2[_local3].receivePost(_arg1);
_local3++;
};
}
public function addClient(_arg1:String, _arg2:PostClient):void{
DesignContract.preCondition(!((_arg2 == null)), "Bad Parameter Receiver is either invalid or does not exist");
var _local3:Array = getTopicClients(_arg1);
DesignContract.preCondition(!((_local3 == null)), ("Tried to Add a receiver to a topic that does not exist!" + _arg1));
ArrayUtil.addArrayUniqueElement(_local3, _arg2);
}
private function sendPostPackage(_arg1:PostPackage):void{
DesignContract.preCondition(!((_arg1 == null)), "Tried to send a null PostPackage!");
var _local2:Array = getTopicClients(_arg1.mTopic);
if (_local2 == null){
_local2 = new Array();
} else {
_local2 = _local2.concat();
};
if (_arg1.mReceiverList){
_local2 = ArrayUtil.arrayMerge(_local2, _arg1.mReceiverList);
};
sendPostPackageToClients(_arg1, _local2);
}
public function sendMessage(_arg1:String, _arg2:String, _arg3:IPostData, _arg4:int=0, _arg5:Array=null):void{
if (!pActive){
return;
};
var _local6:PostPackage = new PostPackage(_arg1, _arg2, _arg3, _arg5);
if (_arg4 > 0){
_local6.mTimeToSend = (pTimer + _arg4);
pDelayedPackages.push(_local6);
pDelayedPackages.sortOn("timeToSend", Array.NUMERIC);
} else {
sendPostPackage(_local6);
};
}
public function removeClient(_arg1:String, _arg2:PostClient):void{
var _local3:String;
var _local4:Array;
DesignContract.preCondition(!((_arg2 == null)), "Bad Parameter Receiver is either invalid or does not exist");
if (_arg1 == null){
for (_local3 in pTopicClients) {
removeClient(_local3, _arg2);
};
} else {
_local4 = getTopicClients(_arg1);
DesignContract.preCondition(!((_local4 == null)), ("Tried to Remove a receiver from a topic that does not exist!" + _arg1));
ArrayUtil.removeArrayElement(_local4, _arg2);
if (_local4.length == 0){
delete pTopicClients[_arg1];
};
};
}
public function reset():void{
pTopicClients = new Object();
pDelayedPackages = new Array();
pTimer = ((pTimeUnitType == TIME_UNIT_FRAME)) ? 0 : getTimer();
}
public function removeDelayedMessage(_arg1:String, _arg2:String):void{
var _local4:PostPackage;
var _local3:int;
while (_local3 < pDelayedPackages.length) {
_local4 = pDelayedPackages[_local3];
if ((((_local4.mSenderId == _arg1)) && ((_local4.mTopic == _arg2)))){
_local4.setInvalid();
};
_local3++;
};
}
public function stop():void{
if (pActive){
pActive = false;
pApplication.removeUpdateFunction(update);
};
}
private function update(_arg1:Event):void{
var _local2:PostPackage;
if (pActive){
if (pTimeUnitType == TIME_UNIT_FRAME){
pTimer++;
} else {
pTimer = getTimer();
};
while (pDelayedPackages.length > 0) {
_local2 = pDelayedPackages[0];
if (_local2.mTimeToSend > pTimer){
break;
};
pDelayedPackages.shift();
sendPostPackage(_local2);
};
};
}
private function getTopicClients(_arg1:String):Array{
DesignContract.preCondition(!((_arg1 == null)), "Tried to get a null/undefined topic!");
var _local2:Array = pTopicClients[_arg1];
if (_local2 == null){
_local2 = new Array();
pTopicClients[_arg1] = _local2;
};
return (_local2);
}
}
}//package com.liquable.game.postoffice
Section 25
//PostPackage (com.liquable.game.postoffice.PostPackage)
package com.liquable.game.postoffice {
import com.liquable.data.*;
public class PostPackage implements IValidData {
var mTopic:String;
var mSenderId:String;
var mData:IPostData;
var mReceiverList:Array;
var mTimeToSend:int;// = 0
public function PostPackage(_arg1:String, _arg2:String, _arg3:IPostData, _arg4:Array){
mSenderId = _arg1;
mTopic = _arg2;
mData = _arg3;
mReceiverList = _arg4;
}
public function get data():IPostData{
return (mData);
}
public function get topic():String{
return (mTopic);
}
public function get timeToSend():int{
return (mTimeToSend);
}
public function isValid():Boolean{
return (!((mTimeToSend == -1)));
}
public function setInvalid():void{
mTimeToSend = -1;
}
public function set data(_arg1:IPostData):void{
mData = _arg1;
}
public function get senderId():String{
return (mSenderId);
}
}
}//package com.liquable.game.postoffice
Section 26
//PostStateClient (com.liquable.game.postoffice.PostStateClient)
package com.liquable.game.postoffice {
import com.liquable.statemachine.*;
public class PostStateClient extends StateMachine {
private var pPostClient:PostClient;
public function PostStateClient(_arg1){
pPostClient = new PostClient(_arg1);
pPostClient.setReceivePostFunction(this.process);
}
public function getPostId():String{
return (pPostClient.getPostId());
}
public function unsubscribe(_arg1:String):void{
pPostClient.unsubscribe(_arg1);
}
public function subscribe(_arg1:String):void{
pPostClient.subscribe(_arg1);
}
override public function destroy():void{
super.destroy();
pPostClient.destroy();
pPostClient = null;
}
public function setPostId(_arg1:String):void{
pPostClient.setPostId(_arg1);
}
public function sendMessage(_arg1:String, _arg2:IPostData, _arg3:int=0, _arg4:Array=null):void{
pPostClient.sendMessage(_arg1, _arg2, _arg3, _arg4);
}
}
}//package com.liquable.game.postoffice
Section 27
//MapTileEvent (com.liquable.game.tiledmap.events.MapTileEvent)
package com.liquable.game.tiledmap.events {
import flash.events.*;
import com.liquable.game.tiledmap.*;
public class MapTileEvent extends Event {
private var pIsOnGround:Boolean;
private var pTileRenderer:IMapTileRenderer;
private var pMapRenderer:MapRenderer;
public static const TILE_MOUSE_OUT:String = "tileMouseOut";
public static const TILE_MOUSE_UP:String = "tileMouseUp";
public static const TILE_MOUSE_DOWN:String = "tileMouseDown";
public static const TILE_MOUSE_OVER:String = "tileMouseOver";
public function MapTileEvent(_arg1:String, _arg2:MapRenderer, _arg3:IMapTileRenderer, _arg4:Boolean, _arg5:Boolean=false, _arg6:Boolean=false){
super(_arg1, _arg5, _arg6);
pMapRenderer = _arg2;
pTileRenderer = _arg3;
pIsOnGround = _arg4;
}
public function isTileOnGround():Boolean{
return (pIsOnGround);
}
public function get mapRenderer():MapRenderer{
return (pMapRenderer);
}
public function get tileRenderer():IMapTileRenderer{
return (pTileRenderer);
}
override public function clone():Event{
return (new MapTileEvent(type, mapRenderer, tileRenderer, isTileOnGround(), bubbles, cancelable));
}
}
}//package com.liquable.game.tiledmap.events
Section 28
//MapResourceEvent (com.liquable.game.tiledmap.resources.events.MapResourceEvent)
package com.liquable.game.tiledmap.resources.events {
import flash.events.*;
import com.liquable.game.tiledmap.resources.*;
public class MapResourceEvent extends Event {
public static const LOAD_COMPLETE:String = "loadComplete";
public function MapResourceEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get mapResource():MapResource{
return ((target as MapResource));
}
override public function clone():Event{
return (new MapResourceEvent(type, bubbles, cancelable));
}
}
}//package com.liquable.game.tiledmap.resources.events
Section 29
//MapResourceTileChangedEvent (com.liquable.game.tiledmap.resources.events.MapResourceTileChangedEvent)
package com.liquable.game.tiledmap.resources.events {
import flash.events.*;
public class MapResourceTileChangedEvent extends MapResourceEvent {
private var pCoordY:int;
private var pCoordX:int;
public static const TILE_CHANGED:String = "tileChanged";
public function MapResourceTileChangedEvent(_arg1:String, _arg2:int, _arg3:int, _arg4:Boolean=false, _arg5:Boolean=false){
super(_arg1, _arg4, _arg5);
pCoordX = _arg2;
pCoordY = _arg3;
}
public function get coordX():int{
return (pCoordX);
}
public function get coordY():int{
return (pCoordY);
}
override public function clone():Event{
return (new MapResourceTileChangedEvent(type, coordX, coordY, bubbles, cancelable));
}
}
}//package com.liquable.game.tiledmap.resources.events
Section 30
//LayerResource (com.liquable.game.tiledmap.resources.LayerResource)
package com.liquable.game.tiledmap.resources {
import com.liquable.utils.*;
import com.liquable.game.geom.*;
public class LayerResource {
private var pMapResource:MapResource;
private var pType:int;
private var pTileResourceMap:Object;
public static const TYPE_STATIC:int = TYPES.nextIndex();
public static const TYPE_GAME_STAGE:int = TYPES.nextIndex();
private static var TYPES:Enum = new Enum();
public function LayerResource(_arg1:MapResource){
pMapResource = _arg1;
}
public function isEmpty():Boolean{
var _local1:*;
for each (_local1 in pTileResourceMap) {
return (false);
};
return (true);
}
public function getTileResource(_arg1:int, _arg2:int):TileResource{
var _local3:String = PointInt.makeString(_arg1, _arg2);
return (pTileResourceMap[_local3]);
}
public function exportZipData():Object{
var _local3:String;
var _local4:TileResource;
var _local1:Object = new Object();
_local1.type = pType;
var _local2:Object = new Object();
for (_local3 in pTileResourceMap) {
_local4 = pTileResourceMap[_local3];
_local2[_local3] = _local4.exportZipData();
};
_local1.tiles = _local2;
return (_local1);
}
public function get type():int{
return (pType);
}
public function loadFromZipData(_arg1:Object):void{
var _local3:String;
var _local4:PointInt;
var _local5:TileResource;
var _local2:Object = new Object();
for (_local3 in _arg1.tiles) {
_local4 = PointInt.fromString(_local3);
_local5 = new TileResource(pMapResource, _local4.x, _local4.y);
_local5.loadFromZipData(_arg1.tiles[_local3]);
_local2[_local3] = _local5;
};
initialize(_arg1.type, _local2);
}
function setTileResource(_arg1:int, _arg2:int, _arg3:TileResource):void{
var _local4:String = PointInt.makeString(_arg1, _arg2);
pTileResourceMap[_local4] = _arg3;
}
public function initialize(_arg1:int, _arg2:Object):void{
pType = _arg1;
pTileResourceMap = _arg2;
}
}
}//package com.liquable.game.tiledmap.resources
Section 31
//MapResource (com.liquable.game.tiledmap.resources.MapResource)
package com.liquable.game.tiledmap.resources {
import flash.events.*;
import com.liquable.utils.*;
import com.liquable.game.tiledmap.resources.events.*;
import com.liquable.game.geom.*;
import flash.geom.*;
import flash.xml.*;
import flash.net.*;
public class MapResource extends EventDispatcher {
protected var pTileHeight:int;
protected var pTilePropertiesMap:Object;
private var pMapHeight:Number;
protected var pTileWidth:int;
protected var pRowCounts:int;
protected var pColumnCounts:int;
protected var pImageResourceFilenames:Object;
private var pAssetsRootPath:String;
private var pZipData:Object;
private var pMapWidth:Number;
protected var pLayerResources:Array;
public function MapResource(_arg1:String){
pAssetsRootPath = _arg1;
}
public function loadFromXMLDocument(_arg1:XMLDocument):void{
_arg1.ignoreWhite = true;
analyzeXmlDoc(_arg1);
pZipData = exportZipData();
tiledImageLoadComplete(null);
}
public function setTileProperties(_arg1:int, _arg2:int, _arg3:Object):void{
var _local5:String;
var _local4:Object = getOrCreateTileProperties(_arg1, _arg2);
if (_local4){
for (_local5 in _arg3) {
_local4[_local5] = _arg3[_local5];
};
};
}
private function analyzeLayerNode(_arg1:XMLNode):void{
var _local6:XMLNode;
var _local7:PointInt;
var _local8:TileResource;
var _local2:Object = new Object();
var _local3:Array = _arg1.childNodes;
var _local4:int;
while (_local4 < _local3.length) {
_local6 = _local3[_local4];
_local7 = new PointInt(int(_local6.attributes.hIndex), int(_local6.attributes.vIndex));
_local8 = new TileResource(this, _local7.x, _local7.y);
_local8.setImage(_local6.attributes.resource, int(_local6.attributes.imageId));
_local2[_local7.toString()] = _local8;
_local4++;
};
var _local5:LayerResource = new LayerResource(this);
_local5.initialize(_arg1.attributes.type, _local2);
pLayerResources.push(_local5);
}
protected function analyzeXmlDoc(_arg1:XMLDocument):void{
var _local2:XMLNode = _arg1.firstChild;
pTileWidth = int(_local2.attributes.tileWidth);
pTileHeight = int(_local2.attributes.tileHeight);
analyzeResourceNodes(_local2.childNodes, pTileWidth, pTileHeight);
analyzeLevelNodes(_local2.childNodes);
}
public function getTileIndex(_arg1:int, _arg2:int):int{
if (isValidLoc(_arg1, _arg2)){
return ((_arg1 + (_arg2 * columnCounts)));
};
return (-1);
}
public function getTileLocFromPosition(_arg1:Number, _arg2:Number):PointInt{
return (new PointInt(Math.floor((_arg1 / pTileWidth)), Math.floor((_arg2 / pTileHeight))));
}
protected function loadTiledImage(_arg1:String, _arg2:String, _arg3:int, _arg4:int):void{
var _local5:TiledImageResource;
if (TiledImageResource.getResource(_arg2) == null){
_local5 = new TiledImageResource(pAssetsRootPath, _arg2, _arg3, _arg4);
_local5.addEventListener(TiledImageResource.LOAD_COMPLETE, tiledImageLoadComplete);
_local5.addEventListener(TiledImageResource.LOAD_IOERROR, tiledImageLoadIOError);
};
pImageResourceFilenames[_arg1] = _arg2;
}
public function set assetsRootPath(_arg1:String):void{
pAssetsRootPath = _arg1;
}
public function exportZipData():Object{
var _local3:String;
var _local4:Array;
var _local5:LayerResource;
var _local6:Object;
var _local7:String;
var _local8:Object;
var _local9:Object;
var _local10:String;
var _local1:Object = new Object();
_local1.tileW = pTileWidth;
_local1.tileH = pTileHeight;
_local1.cols = pColumnCounts;
_local1.rows = pRowCounts;
var _local2:Object = new Object();
for (_local3 in pImageResourceFilenames) {
_local2[_local3] = pImageResourceFilenames[_local3];
};
_local1.rsrcs = _local2;
_local4 = new Array();
for each (_local5 in pLayerResources) {
_local4.push(_local5.exportZipData());
};
_local1.layers = _local4;
_local6 = new Object();
for (_local7 in pTilePropertiesMap) {
_local8 = pTilePropertiesMap[_local7];
_local9 = new Object();
for (_local10 in _local8) {
_local9[_local10] = _local8[_local10];
};
_local6[_local7] = _local9;
};
_local1.tiles = _local6;
return (_local1);
}
public function getTileProperty(_arg1:int, _arg2:int, _arg3:String):Object{
var _local4:Object = getTileProperties(_arg1, _arg2);
return ((_local4) ? _local4[_arg3] : null);
}
public function setTileImage(_arg1:int, _arg2:int, _arg3:int, _arg4:String, _arg5:int):void{
var _local6:LayerResource;
var _local7:TileResource;
if ((((_arg1 >= 0)) && ((_arg1 < pLayerResources.length)))){
_local6 = pLayerResources[_arg1];
_local7 = _local6.getTileResource(_arg2, _arg3);
if ((((_local7 == null)) && (isValidLoc(_arg2, _arg3)))){
_local7 = new TileResource(this, _arg2, _arg3);
_local6.setTileResource(_arg2, _arg3, _local7);
};
if (_local7){
_local7.setImage(_arg4, _arg5);
dispatchEvent(new MapResourceTileChangedEvent(MapResourceTileChangedEvent.TILE_CHANGED, _arg2, _arg3));
};
};
}
private function getOrCreateTileProperties(_arg1:int, _arg2:int):Object{
var _local3:Object;
var _local4:String;
if (pTilePropertiesMap){
_local4 = PointInt.makeString(_arg1, _arg2);
_local3 = pTilePropertiesMap[_local4];
if ((((_local3 == null)) && (isValidLoc(_arg1, _arg2)))){
_local3 = new Object();
pTilePropertiesMap[_local4] = _local3;
};
};
return (_local3);
}
private function tiledImageLoadIOError(_arg1:Event):void{
throw (new Error("MapResource.tiledImageLoadIOError() : file does not exist!!"));
}
public function getTileLocByIndex(_arg1:int):PointInt{
var _local2:PointInt = new PointInt();
_local2.x = (_arg1 % columnCounts);
_local2.y = Math.floor((_arg1 / columnCounts));
return (_local2);
}
public function loadFromZipData(_arg1:Object):void{
var _local2:String;
var _local3:Object;
var _local4:String;
var _local5:LayerResource;
var _local6:Object;
var _local7:Object;
var _local8:String;
pZipData = _arg1;
pTileWidth = _arg1.tileW;
pTileHeight = _arg1.tileH;
pColumnCounts = _arg1.cols;
pRowCounts = _arg1.rows;
pImageResourceFilenames = new Object();
for (_local2 in _arg1.rsrcs) {
pImageResourceFilenames[_local2] = _arg1.rsrcs[_local2];
loadTiledImage(_local2, pImageResourceFilenames[_local2], pTileWidth, pTileHeight);
};
pLayerResources = new Array();
for each (_local3 in _arg1.layers) {
_local5 = new LayerResource(this);
_local5.loadFromZipData(_local3);
pLayerResources.push(_local5);
};
pTilePropertiesMap = new Object();
for (_local4 in _arg1.tiles) {
_local6 = _arg1.tiles[_local4];
_local7 = new Object();
for (_local8 in _local6) {
_local7[_local8] = _local6[_local8];
};
pTilePropertiesMap[_local4] = _local7;
};
tiledImageLoadComplete(null);
}
public function getResourceIds():Array{
return (ArrayUtil.convertMapKeysToArray(pImageResourceFilenames));
}
public function setTileProperty(_arg1:int, _arg2:int, _arg3:String, _arg4:Object):void{
var _local5:Object = getOrCreateTileProperties(_arg1, _arg2);
if (_local5){
_local5[_arg3] = _arg4;
};
}
public function get height():Number{
return (pMapHeight);
}
public function getLayer(_arg1:int):LayerResource{
return (pLayerResources[_arg1]);
}
public function getResourceFilename(_arg1:String):String{
return (pImageResourceFilenames[_arg1]);
}
public function getTileLocsByProperty(_arg1:String, _arg2:Object):Array{
var _local3:Array;
var _local4:String;
var _local5:Object;
if (pTilePropertiesMap){
_local3 = new Array();
for (_local4 in pTilePropertiesMap) {
_local5 = pTilePropertiesMap[_local4];
if (((_local5.hasOwnProperty(_arg1)) && ((((_local5[_arg1] == _arg2)) || ((_arg2 == null)))))){
_local3.push(PointInt.fromString(_local4));
};
};
};
return (_local3);
}
public function get tileWidth():int{
return (pTileWidth);
}
public function get columnCounts():int{
return (pColumnCounts);
}
private function analyzeTilesNode(_arg1:XMLNode):void{
var _local3:XMLNode;
var _local4:Array;
var _local5:Object;
var _local6:XMLNode;
pTilePropertiesMap = new Object();
var _local2:Array = _arg1.childNodes;
for each (_local3 in _local2) {
_local4 = _local3.childNodes;
_local5 = new Object();
for each (_local6 in _local4) {
_local5[_local6.attributes.name] = _local6.attributes.value;
};
pTilePropertiesMap[PointInt.makeString(_local3.attributes.hIndex, _local3.attributes.vIndex)] = _local5;
};
}
public function get rowCounts():int{
return (pRowCounts);
}
private function analyzeLevelNode(_arg1:XMLNode):void{
var _local3:XMLNode;
var _local4:XMLNode;
var _local2:Array = _arg1.childNodes;
for each (_local3 in _local2) {
if (_local3.nodeName == "layer"){
analyzeLayerNode(_local3);
};
};
for each (_local4 in _local2) {
if (_local4.nodeName == "tiles"){
analyzeTilesNode(_local4);
};
};
}
public function get layers():Array{
return (pLayerResources);
}
private function onLoadComplete(_arg1:Event):void{
loadFromXML(new XML(_arg1.target.data));
}
public function get width():Number{
return (pMapWidth);
}
public function loadFromXML(_arg1:XML):void{
var _local2:XMLDocument = new XMLDocument();
_local2.ignoreWhite = true;
_local2.parseXML(_arg1);
loadFromXMLDocument(_local2);
}
public function loadFromFile(_arg1:String):void{
var _local2:URLLoader = new URLLoader();
_local2.addEventListener(Event.COMPLETE, onLoadComplete);
_local2.load(new URLRequest(_arg1));
}
public function reset():void{
if (pZipData){
loadFromZipData(pZipData);
};
}
public function get assetsRootPath():String{
return (pAssetsRootPath);
}
private function analyzeResourceNodes(_arg1:Array, _arg2:int, _arg3:int):void{
var _local5:XMLNode;
if (pImageResourceFilenames == null){
pImageResourceFilenames = new Object();
};
var _local4:int;
while (_local4 < _arg1.length) {
_local5 = _arg1[_local4];
if (_local5.nodeName == "resource"){
loadTiledImage(_local5.attributes.id, _local5.attributes.filename, _arg2, _arg3);
};
_local4++;
};
}
public function getTileCenterPosition(_arg1:int, _arg2:int):Point{
if (isValidLoc(_arg1, _arg2)){
return (new Point((pTileWidth * (_arg1 + 0.5)), (pTileHeight * (_arg2 + 0.5))));
};
return (null);
}
protected function tiledImageLoadComplete(_arg1:Event):void{
if (TiledImageResource.isAllLoaded()){
pMapWidth = (pTileWidth * pColumnCounts);
pMapHeight = (pTileHeight * pRowCounts);
dispatchEvent(new MapResourceEvent(MapResourceEvent.LOAD_COMPLETE));
};
}
public function getTilePosition(_arg1:int, _arg2:int):Point{
if (isValidLoc(_arg1, _arg2)){
return (new Point((pTileWidth * _arg1), (pTileHeight * _arg2)));
};
return (null);
}
public function isValidLoc(_arg1:int, _arg2:int):Boolean{
return ((((((((_arg1 >= 0)) && ((_arg1 < pColumnCounts)))) && ((_arg2 >= 0)))) && ((_arg2 < pRowCounts))));
}
public function get tileHeight():int{
return (pTileHeight);
}
public function getTileProperties(_arg1:int, _arg2:int):Object{
return ((pTilePropertiesMap) ? pTilePropertiesMap[PointInt.makeString(_arg1, _arg2)] : null);
}
private function analyzeLevelNodes(_arg1:Array):void{
var _local3:XMLNode;
if (pLayerResources == null){
pLayerResources = new Array();
};
var _local2:int;
while (_local2 < _arg1.length) {
_local3 = _arg1[_local2];
if (_local3.nodeName == "level"){
pColumnCounts = int(_local3.attributes.hTiles);
pRowCounts = int(_local3.attributes.vTiles);
analyzeLevelNode(_local3);
return;
};
_local2++;
};
}
}
}//package com.liquable.game.tiledmap.resources
Section 32
//TiledImageResource (com.liquable.game.tiledmap.resources.TiledImageResource)
package com.liquable.game.tiledmap.resources {
import flash.events.*;
import flash.display.*;
import com.liquable.utils.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
public class TiledImageResource extends EventDispatcher {
private var pTileHeight:int;
private var pTileWidth:int;
private var pBitmapDatas:Array;
private var pLoaded:Boolean;
public static var LOAD_COMPLETE:String = "loadComplete";
private static var sTiledImageMap:Object = new Object();
public static var LOAD_IOERROR:String = "loadIOError";
public function TiledImageResource(_arg1:String, _arg2:String, _arg3:int, _arg4:int){
pBitmapDatas = new Array();
super();
DesignContract.preCondition((getResource(_arg2) == null), "");
sTiledImageMap[_arg2] = this;
pTileWidth = _arg3;
pTileHeight = _arg4;
pLoaded = false;
var _local5:Loader = new Loader();
_local5.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
_local5.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
if (EmbedManager.singleton.available){
loadBitmap(EmbedManager.singleton.getTileset(_arg2));
} else {
_local5.load(new URLRequest((_arg1 + _arg2)), new LoaderContext(true));
};
}
private function analyzeBitmap(_arg1:Bitmap):void{
var _local5:int;
var _local6:BitmapData;
var _local2:int = Math.floor((_arg1.width / pTileWidth));
var _local3:int = Math.floor((_arg1.height / pTileHeight));
var _local4:int;
while (_local4 < _local3) {
_local5 = 0;
while (_local5 < _local2) {
_local6 = new BitmapData(pTileWidth, pTileHeight, true, 0);
_local6.copyPixels(_arg1.bitmapData, new Rectangle((_local5 * pTileWidth), (_local4 * pTileHeight), pTileWidth, pTileHeight), new Point(0, 0));
pBitmapDatas.push(_local6);
_local5++;
};
_local4++;
};
}
private function onIOError(_arg1:IOErrorEvent):void{
dispatchEvent(new Event(LOAD_IOERROR));
}
public function isLoaded():Boolean{
return (pLoaded);
}
public function getTiledImage(_arg1:int):BitmapData{
return (pBitmapDatas[_arg1]);
}
private function loadBitmap(_arg1:Bitmap):void{
analyzeBitmap(_arg1);
pLoaded = true;
dispatchEvent(new Event(LOAD_COMPLETE));
}
private function onLoadComplete(_arg1:Event):void{
loadBitmap(Bitmap(Loader(_arg1.target.loader).content));
}
public static function getResource(_arg1:String):TiledImageResource{
return (sTiledImageMap[_arg1]);
}
public static function isAllLoaded():Boolean{
var _local1:TiledImageResource;
for each (_local1 in sTiledImageMap) {
if (!_local1.isLoaded()){
return (false);
};
};
return (true);
}
}
}//package com.liquable.game.tiledmap.resources
Section 33
//TileResource (com.liquable.game.tiledmap.resources.TileResource)
package com.liquable.game.tiledmap.resources {
import flash.display.*;
import com.liquable.utils.*;
import com.liquable.game.geom.*;
public class TileResource extends PointInt {
private var pImageId:int;
private var pResourceId:String;
private var pBitmapData:BitmapData;
private var pMapResource:MapResource;
public function TileResource(_arg1:MapResource, _arg2:int, _arg3:int){
super(_arg2, _arg3);
pMapResource = _arg1;
}
public function setImage(_arg1:String, _arg2:int):void{
pResourceId = _arg1;
pImageId = _arg2;
pBitmapData = null;
var _local3:String = (pMapResource as ZHNMapResource).getSet();
if (GameConfig.instance.getIceSettings(_local3).indexOf(pImageId) != -1){
pMapResource.setTileProperty(x, y, "ice", "1");
};
if (GameConfig.instance.getSnowSettings(_local3).indexOf(pImageId) != -1){
pMapResource.setTileProperty(x, y, "snow", "1");
trace(("snow tile = " + PointInt.makeString(x, y)));
};
}
public function get id():String{
return (toString());
}
public function get bitmapData():BitmapData{
if ((((pBitmapData == null)) && (!((pImageId == -1))))){
pBitmapData = TiledImageResource.getResource(pMapResource.getResourceFilename(pResourceId)).getTiledImage(pImageId);
DesignContract.preCondition(!((pBitmapData == null)), ("bitmapData is null , id = " + pImageId));
};
return (pBitmapData);
}
public function exportZipData():Object{
var _local1:Object = new Object();
_local1.r = pResourceId;
_local1.i = pImageId;
return (_local1);
}
public function loadFromZipData(_arg1:Object):void{
setImage(_arg1.r, _arg1.i);
}
}
}//package com.liquable.game.tiledmap.resources
Section 34
//IMapTileRenderer (com.liquable.game.tiledmap.IMapTileRenderer)
package com.liquable.game.tiledmap {
import flash.display.*;
public interface IMapTileRenderer {
function get displayObject():DisplayObject;
function getMapTile():MapTile;
function beginBitmapDataFill():void;
function endBitmapDataFill():void;
function setMapTile(_arg1:MapTile):void;
function destroy():void;
function drawBitmapData(_arg1:int, _arg2:BitmapData):void;
}
}//package com.liquable.game.tiledmap
Section 35
//MapLayerRenderer (com.liquable.game.tiledmap.MapLayerRenderer)
package com.liquable.game.tiledmap {
import flash.events.*;
import flash.display.*;
import com.liquable.game.camera.*;
import flash.geom.*;
import com.liquable.game.tiledmap.resources.*;
import com.liquable.game.tiledmap.*;
import com.liquable.game.tiledmap.events.*;
class MapLayerRenderer extends Sprite {
private var pBitmapArray:Array;
private var pIsOnGround:Boolean;
private var pLayerResources:Array;
private var pMapRenderer:MapRenderer;
private var pTileRenderers:Array;
function MapLayerRenderer(_arg1:MapRenderer, _arg2:Boolean){
pMapRenderer = _arg1;
pLayerResources = new Array();
pIsOnGround = _arg2;
}
public function setBitmapVisible(_arg1:int, _arg2:int, _arg3:Boolean):void{
var _local4:Bitmap = pBitmapArray[_arg1][_arg2];
if (_arg3){
if (_local4.parent == null){
addChild(_local4);
};
} else {
if (_local4.parent){
_local4.parent.removeChild(_local4);
};
};
}
public function buildTileRenderers(_arg1:int, _arg2:int, _arg3:Class):void{
var _local4:TiledMap;
var _local5:MapResource;
var _local6:int;
var _local7:Array;
var _local8:int;
var _local9:IMapTileRenderer;
var _local10:DisplayObject;
if (pLayerResources.length){
pTileRenderers = new Array();
_local4 = pMapRenderer.getMap();
_local5 = pMapRenderer.getMap().getMapResource();
_local6 = 0;
while (_local6 < _arg1) {
_local7 = new Array();
pTileRenderers.push(_local7);
_local8 = 0;
while (_local8 < _arg2) {
_local9 = new (_arg3);
_local10 = _local9.displayObject;
_local10.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
_local10.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
_local10.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
_local10.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
addChild(_local9.displayObject);
_local7.push(_local9);
setupTileRenderer(_local4, _local5, _local6, _local8, _local6, _local8);
_local8++;
};
_local6++;
};
};
}
public function containsResources():Boolean{
return (!((pLayerResources.length == 0)));
}
public function destroy():void{
var _local1:Array;
var _local2:Bitmap;
var _local3:Array;
var _local4:IMapTileRenderer;
if (pBitmapArray){
for each (_local1 in pBitmapArray) {
for each (_local2 in _local1) {
_local2.bitmapData.dispose();
_local2.bitmapData = null;
};
};
pBitmapArray = null;
};
if (pTileRenderers){
for each (_local3 in pTileRenderers) {
for each (_local4 in _local3) {
_local4.destroy();
};
};
pTileRenderers = null;
};
pMapRenderer = null;
pLayerResources = null;
while (numChildren) {
removeChildAt(0);
};
}
public function getTileRenderers():Array{
return (pTileRenderers);
}
private function onMouseDown(_arg1:MouseEvent):void{
dispatchMapTileEvent(MapTileEvent.TILE_MOUSE_DOWN, _arg1);
}
private function onMouseUp(_arg1:MouseEvent):void{
dispatchMapTileEvent(MapTileEvent.TILE_MOUSE_UP, _arg1);
}
public function updateTileResourceOnBitmap(_arg1:MapResource, _arg2:int, _arg3:int):void{
var _local4:Bitmap;
var _local17:LayerResource;
var _local18:TileResource;
var _local19:BitmapData;
if (pBitmapArray == null){
return;
};
var _local5:Number = (_arg2 * _arg1.tileWidth);
var _local6:Number = (_arg3 * _arg1.tileHeight);
var _local7:int;
var _local8:int;
var _local9:int;
while (_local9 < pBitmapArray.length) {
_local4 = pBitmapArray[_local9][0];
if ((_local4.x + _local4.width) > _local5){
_local7 = _local9;
break;
};
_local9++;
};
var _local10:int;
while (_local10 < pBitmapArray[0].length) {
_local4 = pBitmapArray[0][_local10];
if ((_local4.y + _local4.height) > _local6){
_local8 = _local10;
break;
};
_local10++;
};
_local4 = pBitmapArray[_local7][_local8];
var _local11:int = Math.round((_local4.x / _arg1.tileWidth));
var _local12:int = Math.round((_local4.y / _arg1.tileHeight));
var _local13:Rectangle = new Rectangle(0, 0, _arg1.tileWidth, _arg1.tileHeight);
var _local14:Rectangle = new Rectangle(((_arg2 - _local11) * _arg1.tileWidth), ((_arg3 - _local12) * _arg1.tileHeight), _local13.width, _local13.height);
var _local15:Point = new Point(_local14.x, _local14.y);
var _local16:BitmapData = _local4.bitmapData;
_local16.lock();
_local16.fillRect(_local14, 0);
for each (_local17 in pLayerResources) {
_local18 = _local17.getTileResource(_arg2, _arg3);
if (_local18){
_local19 = _local18.bitmapData;
if (_local19){
_local16.copyPixels(_local19, _local13, _local15, null, null, true);
};
};
};
_local16.unlock(_local14);
}
public function buildBitmaps(_arg1:GameCamera):void{
var _local3:MapResource;
var _local8:Array;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:Number;
var _local13:Number;
var _local14:BitmapData;
var _local15:Bitmap;
var _local16:int;
var _local2:TiledMap = pMapRenderer.getMap();
_local3 = pMapRenderer.getMap().getMapResource();
var _local4:int = Math.ceil(((_arg1.width / _local3.tileWidth) * 0.5));
var _local5:int = Math.ceil(((_arg1.height / _local3.tileHeight) * 0.5));
pBitmapArray = new Array();
var _local6:int;
while (_local6 < _local3.columnCounts) {
_local8 = new Array();
pBitmapArray.push(_local8);
_local9 = Math.min(_local3.columnCounts, (_local6 + _local4));
_local10 = 0;
while (_local10 < _local3.rowCounts) {
_local11 = Math.min(_local3.rowCounts, (_local10 + _local5));
_local12 = ((_local9 - _local6) * _local3.tileWidth);
_local13 = ((_local11 - _local10) * _local3.tileHeight);
_local14 = new BitmapData(_local12, _local13);
_local15 = new Bitmap(_local14);
_local15.x = (_local6 * _local3.tileWidth);
_local15.y = (_local10 * _local3.tileHeight);
_local8.push(_local15);
if (_local11 == _local3.rowCounts){
break;
};
_local10 = (_local10 + _local5);
};
if (_local9 == _local3.columnCounts){
break;
};
_local6 = (_local6 + _local4);
};
var _local7:int;
while (_local7 < _local3.columnCounts) {
_local16 = 0;
while (_local16 < _local3.rowCounts) {
updateTileResourceOnBitmap(_local3, _local7, _local16);
_local16++;
};
_local7++;
};
}
public function addLayerResource(_arg1:LayerResource):void{
pLayerResources.push(_arg1);
}
private function onMouseOut(_arg1:MouseEvent):void{
dispatchMapTileEvent(MapTileEvent.TILE_MOUSE_OUT, _arg1);
}
private function dispatchMapTileEvent(_arg1:String, _arg2:MouseEvent):void{
if (pMapRenderer){
pMapRenderer.dispatchEvent(new MapTileEvent(_arg1, pMapRenderer, (_arg2.currentTarget as IMapTileRenderer), pIsOnGround));
};
}
function setupTileRenderer(_arg1:TiledMap, _arg2:MapResource, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean=false):void{
var _local8:IMapTileRenderer;
var _local9:MapTile;
var _local10:int;
var _local11:LayerResource;
var _local12:BitmapData;
var _local13:TileResource;
_local8 = pTileRenderers[_arg3][_arg4];
if (_local8){
_local9 = _arg1.getTile(_arg5, _arg6);
_local8.displayObject.x = (_arg3 * _arg2.tileWidth);
_local8.displayObject.y = (_arg4 * _arg2.tileHeight);
_local8.displayObject.visible = true;
if (((_arg7) || (!((_local9 == _local8.getMapTile()))))){
_local8.setMapTile(_local9);
_local8.beginBitmapDataFill();
_local10 = 0;
for each (_local11 in pLayerResources) {
_local12 = null;
_local13 = _local11.getTileResource(_arg5, _arg6);
if (_local13){
_local12 = _local13.bitmapData;
};
_local8.drawBitmapData(_local10, _local12);
_local10++;
};
_local8.endBitmapDataFill();
};
};
}
function hideTileRenderer(_arg1:int, _arg2:int):void{
var _local3:IMapTileRenderer = pTileRenderers[_arg1][_arg2];
if (_local3){
_local3.displayObject.visible = false;
};
}
public function getBitmapArray():Array{
return (pBitmapArray);
}
private function onMouseOver(_arg1:MouseEvent):void{
dispatchMapTileEvent(MapTileEvent.TILE_MOUSE_OVER, _arg1);
}
}
}//package com.liquable.game.tiledmap
Section 36
//MapRenderer (com.liquable.game.tiledmap.MapRenderer)
package com.liquable.game.tiledmap {
import flash.display.*;
import com.liquable.utils.*;
import com.liquable.game.tiledmap.resources.events.*;
import com.liquable.game.camera.*;
import flash.geom.*;
import com.liquable.game.tiledmap.resources.*;
public class MapRenderer extends Sprite {
protected var pScreenColumns:int;
protected var pMap:TiledMap;
protected var pCurrentLeftLoc:int;
private var pTileRendererClass:Class;
private var pGameStage:Sprite;
protected var pGroundLayerRenderer:MapLayerRenderer;
protected var pSkyLayerRenderer:MapLayerRenderer;
protected var pCurrentTopLoc:int;
protected var pScreenRows:int;
public function MapRenderer(_arg1:TiledMap, _arg2:Class=null){
pMap = _arg1;
pTileRendererClass = _arg2;
if (pTileRendererClass == null){
pTileRendererClass = MapTileRenderer;
};
}
private function getTileRenderer(_arg1:Array, _arg2:int, _arg3:int):IMapTileRenderer{
var _local4:Point;
if (_arg1){
_local4 = getRendererInternalCoords(_arg2, _arg3);
if (_local4){
return (_arg1[_local4.x][_local4.y]);
};
};
return (null);
}
private function getRendererInternalCoords(_arg1:int, _arg2:int):Point{
var _local4:int;
var _local3:int = (_arg1 - pCurrentLeftLoc);
if ((((_local3 >= 0)) && ((_local3 < pScreenColumns)))){
_local4 = (_arg2 - pCurrentTopLoc);
if ((((_local4 >= 0)) && ((_local4 < pScreenRows)))){
return (new Point(_local3, _local4));
};
};
return (null);
}
private function onTileResourceChanged(_arg1:MapResourceTileChangedEvent):void{
var _local2:Point;
var _local3:Boolean;
if (pGroundLayerRenderer.getTileRenderers()){
_local2 = getRendererInternalCoords(_arg1.coordX, _arg1.coordY);
if (_local2){
pGroundLayerRenderer.setupTileRenderer(pMap, pMap.getMapResource(), _local2.x, _local2.y, _arg1.coordX, _arg1.coordY, true);
} else {
_local3 = false;
};
} else {
pGroundLayerRenderer.updateTileResourceOnBitmap(pMap.getMapResource(), _arg1.coordX, _arg1.coordY);
};
if (pSkyLayerRenderer.getTileRenderers()){
if ((((_local2 == null)) && (_local3))){
_local2 = getRendererInternalCoords(_arg1.coordX, _arg1.coordY);
};
if (_local2){
pSkyLayerRenderer.setupTileRenderer(pMap, pMap.getMapResource(), _local2.x, _local2.y, _arg1.coordX, _arg1.coordY, true);
};
} else {
pSkyLayerRenderer.updateTileResourceOnBitmap(pMap.getMapResource(), _arg1.coordX, _arg1.coordY);
};
}
public function getGroundTileRenderer(_arg1:int, _arg2:int):IMapTileRenderer{
return (getTileRenderer(pGroundLayerRenderer.getTileRenderers(), _arg1, _arg2));
}
public function update(_arg1:GameCamera, _arg2:Boolean=false):void{
updateTileRenderers(_arg1, _arg2);
updateLayerBitmaps(_arg1, _arg2);
}
public function getMap():TiledMap{
return (pMap);
}
public function getSkyTileRenderer(_arg1:int, _arg2:int):IMapTileRenderer{
return (getTileRenderer(pSkyLayerRenderer.getTileRenderers(), _arg1, _arg2));
}
public function getGameStage():Sprite{
return (pGameStage);
}
private function updateTileRenderers(_arg1:GameCamera, _arg2:Boolean):void{
var _local5:MapResource;
var _local6:Array;
var _local7:Number;
var _local8:Number;
var _local9:IMapTileRenderer;
var _local10:MapTile;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:int;
var _local18:int;
var _local19:int;
var _local20:int;
var _local21:int;
var _local22:int;
var _local3:Array = pGroundLayerRenderer.getTileRenderers();
var _local4:Array = pSkyLayerRenderer.getTileRenderers();
if (((_local3) || (_local4))){
_local5 = pMap.getMapResource();
_local6 = (_local3) ? _local3 : _local4;
pCurrentLeftLoc = Math.floor((_arg1.left / _local5.tileWidth));
pCurrentTopLoc = Math.floor((_arg1.top / _local5.tileHeight));
_local7 = Math.round(((pCurrentLeftLoc * _local5.tileWidth) - _arg1.left));
_local8 = Math.round(((pCurrentTopLoc * _local5.tileHeight) - _arg1.top));
if (_local3){
pGroundLayerRenderer.x = _local7;
pGroundLayerRenderer.y = _local8;
};
if (_local4){
pSkyLayerRenderer.x = _local7;
pSkyLayerRenderer.y = _local8;
};
_local9 = _local6[0][0];
_local10 = _local9.getMapTile();
_local11 = (pCurrentLeftLoc - _local10.x);
_local12 = (pCurrentTopLoc - _local10.y);
if (((_local11) || (_local12))){
_local13 = _local11;
_local14 = (_local13 + pScreenColumns);
_local15 = _local12;
_local16 = (_local15 + pScreenRows);
_local17 = _local13;
while (_local17 < _local14) {
if ((((_local17 >= 0)) && ((_local17 < pScreenColumns)))){
_local18 = (_local17 - _local11);
if ((((_local18 >= 0)) && ((_local18 < pScreenColumns)))){
if (_local11){
if (_local3){
ArrayUtil.swapElements(_local3, _local17, _local18);
};
if (_local4){
ArrayUtil.swapElements(_local4, _local17, _local18);
};
};
if (_local12){
_local19 = _local15;
while (_local19 < _local16) {
_local20 = (_local19 - _local12);
if ((((((((_local19 >= 0)) && ((_local19 < pScreenRows)))) && ((_local20 >= 0)))) && ((_local20 < pScreenRows)))){
if (_local3){
ArrayUtil.swapElements(_local3[_local18], _local19, _local20);
};
if (_local4){
ArrayUtil.swapElements(_local4[_local18], _local19, _local20);
};
};
_local19++;
};
};
};
};
_local17++;
};
_local17 = 0;
for (;_local17 < pScreenColumns;_local17++) {
_local21 = (_local17 + pCurrentLeftLoc);
if (_arg2){
while (_local21 < 0) {
_local21 = (_local21 + _local5.columnCounts);
};
while (_local21 >= _local5.columnCounts) {
_local21 = (_local21 - _local5.columnCounts);
};
} else {
if ((((_local21 < 0)) || ((_local21 >= _local5.columnCounts)))){
_local19 = 0;
while (_local19 < pScreenRows) {
if (_local3){
pGroundLayerRenderer.hideTileRenderer(_local17, _local19);
};
if (_local4){
pSkyLayerRenderer.hideTileRenderer(_local17, _local19);
};
_local19++;
};
continue;
};
};
_local19 = 0;
for (;_local19 < pScreenRows;_local19++) {
_local22 = (_local19 + pCurrentTopLoc);
if (_arg2){
while (_local22 < 0) {
_local22 = (_local22 + _local5.rowCounts);
};
while (_local22 >= _local5.rowCounts) {
_local22 = (_local22 - _local5.rowCounts);
};
} else {
if ((((_local22 < 0)) || ((_local22 >= _local5.rowCounts)))){
if (_local3){
pGroundLayerRenderer.hideTileRenderer(_local17, _local19);
};
if (_local4){
pSkyLayerRenderer.hideTileRenderer(_local17, _local19);
};
continue;
};
};
if (_local3){
pGroundLayerRenderer.setupTileRenderer(pMap, _local5, _local17, _local19, _local21, _local22);
};
if (_local4){
pSkyLayerRenderer.setupTileRenderer(pMap, _local5, _local17, _local19, _local21, _local22);
};
};
};
};
};
}
public function destroy():void{
pMap.getMapResource().removeEventListener(MapResourceTileChangedEvent.TILE_CHANGED, onTileResourceChanged);
pGroundLayerRenderer.destroy();
pGroundLayerRenderer = null;
pSkyLayerRenderer.destroy();
pSkyLayerRenderer = null;
pGameStage = null;
pMap = null;
pTileRendererClass = null;
while (numChildren) {
removeChildAt(0);
};
if (parent){
parent.removeChild(this);
};
}
private function updateLayerBitmaps(_arg1:GameCamera, _arg2:Boolean):void{
var _local3:Bitmap;
var _local6:MapResource;
var _local7:Array;
var _local8:Bitmap;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:Array;
var _local15:Boolean;
var _local16:int;
var _local17:Boolean;
var _local4:Array = pGroundLayerRenderer.getBitmapArray();
var _local5:Array = pSkyLayerRenderer.getBitmapArray();
if (((_local4) || (_local5))){
_local6 = pMap.getMapResource();
_local7 = (_local4) ? _local4 : _local5;
if (_local4){
pGroundLayerRenderer.x = -(_arg1.left);
pGroundLayerRenderer.y = -(_arg1.top);
};
if (_local5){
pSkyLayerRenderer.x = -(_arg1.left);
pSkyLayerRenderer.y = -(_arg1.top);
};
if (_arg2){
} else {
_local8 = _local7[0][0];
_local9 = Math.floor((_arg1.left / _local8.width));
_local10 = Math.floor((_arg1.right / _local8.width));
_local11 = Math.floor((_arg1.top / _local8.height));
_local12 = Math.floor((_arg1.bottom / _local8.height));
_local13 = 0;
while (_local13 < _local7.length) {
_local14 = _local7[_local13];
_local15 = (((_local13 >= _local9)) && ((_local13 <= _local10)));
_local16 = 0;
while (_local16 < _local14.length) {
_local8 = _local14[_local16];
_local17 = _local15;
if (_local17){
if ((((_local16 < _local11)) || ((_local16 > _local12)))){
_local17 = false;
};
};
if (_local4){
pGroundLayerRenderer.setBitmapVisible(_local13, _local16, _local17);
};
if (_local5){
pSkyLayerRenderer.setBitmapVisible(_local13, _local16, _local17);
};
_local16++;
};
_local13++;
};
};
};
}
public function build(_arg1:GameCamera, _arg2:Boolean, _arg3:Boolean):void{
var _local6:LayerResource;
var _local7:MapLayerRenderer;
var _local4:Boolean;
var _local5:MapResource = pMap.getMapResource();
pCurrentLeftLoc = (pCurrentTopLoc = 0);
pScreenColumns = (Math.floor((_arg1.width / _local5.tileWidth)) + 2);
pScreenRows = (Math.floor((_arg1.height / _local5.tileHeight)) + 2);
pGroundLayerRenderer = new MapLayerRenderer(this, true);
pSkyLayerRenderer = new MapLayerRenderer(this, false);
pGameStage = new Sprite();
for each (_local6 in pMap.getMapResource().layers) {
if (_local6.type == LayerResource.TYPE_STATIC){
_local7 = (_local4) ? pGroundLayerRenderer : pSkyLayerRenderer;
_local7.addLayerResource(_local6);
} else {
_local4 = false;
};
};
if (_arg2){
pGroundLayerRenderer.buildTileRenderers(pScreenColumns, pScreenRows, pTileRendererClass);
} else {
pGroundLayerRenderer.buildBitmaps(_arg1);
};
if (_arg3){
pSkyLayerRenderer.buildTileRenderers(pScreenColumns, pScreenRows, pTileRendererClass);
} else {
pSkyLayerRenderer.buildBitmaps(_arg1);
};
addChild(pGroundLayerRenderer);
addChild(pGameStage);
if (pSkyLayerRenderer.containsResources()){
addChild(pSkyLayerRenderer);
};
pMap.getMapResource().addEventListener(MapResourceTileChangedEvent.TILE_CHANGED, onTileResourceChanged);
}
}
}//package com.liquable.game.tiledmap
Section 37
//MapTile (com.liquable.game.tiledmap.MapTile)
package com.liquable.game.tiledmap {
import com.liquable.game.geom.*;
public class MapTile extends PointInt {
private var pId:String;
public function MapTile(_arg1:int, _arg2:int){
super(_arg1, _arg2);
pId = toString();
}
public function getId():String{
return (pId);
}
}
}//package com.liquable.game.tiledmap
Section 38
//MapTileRenderer (com.liquable.game.tiledmap.MapTileRenderer)
package com.liquable.game.tiledmap {
import flash.display.*;
public class MapTileRenderer extends Sprite implements IMapTileRenderer {
private var pHighestLayerIndex:int;// = 0
private var pTile:MapTile;
public function beginBitmapDataFill():void{
pHighestLayerIndex = -1;
}
public function destroy():void{
pTile = null;
while (numChildren) {
removeChildAt(0);
};
}
public function setMapTile(_arg1:MapTile):void{
pTile = _arg1;
}
public function get displayObject():DisplayObject{
return (this);
}
public function getMapTile():MapTile{
return (pTile);
}
public function endBitmapDataFill():void{
var _local1:int;
if (pHighestLayerIndex == -1){
visible = false;
} else {
_local1 = (pHighestLayerIndex + 1);
while (_local1 < numChildren) {
getChildAt(_local1).visible = false;
_local1++;
};
visible = true;
};
}
public function drawBitmapData(_arg1:int, _arg2:BitmapData):void{
var _local3:Bitmap;
if (_arg1 < numChildren){
_local3 = (getChildAt(_arg1) as Bitmap);
if (_arg2){
if (_local3.bitmapData != _arg2){
_local3.bitmapData = _arg2;
};
_local3.visible = true;
} else {
_local3.visible = false;
};
} else {
if (_arg2){
_local3 = new Bitmap(_arg2);
addChild(_local3);
};
};
if (_arg2){
pHighestLayerIndex = Math.max(_arg1, pHighestLayerIndex);
};
}
}
}//package com.liquable.game.tiledmap
Section 39
//TiledMap (com.liquable.game.tiledmap.TiledMap)
package com.liquable.game.tiledmap {
import com.liquable.game.tiledmap.resources.*;
import com.liquable.game.astar.*;
public class TiledMap implements IAStarMap {
private var pTiles:Array;
private var pMapResource:MapResource;
public function TiledMap(_arg1:MapResource){
var _local3:int;
var _local4:MapTile;
super();
pMapResource = _arg1;
pTiles = new Array();
var _local2:int;
while (_local2 < pMapResource.rowCounts) {
_local3 = 0;
while (_local3 < pMapResource.columnCounts) {
_local4 = new MapTile(_local3, _local2);
pTiles.push(_local4);
_local3++;
};
_local2++;
};
}
public function getMapResource():MapResource{
return (pMapResource);
}
public function getTile(_arg1:int, _arg2:int):MapTile{
var _local3:int = pMapResource.getTileIndex(_arg1, _arg2);
if (_local3 == -1){
return (null);
};
return (pTiles[_local3]);
}
public function getPassCost(_arg1, _arg2:int, _arg3:int, _arg4:int, _arg5:int):Number{
if ((((_arg2 == _arg4)) || ((_arg3 == _arg5)))){
return (1);
};
return (Math.SQRT2);
}
public function getTiles():Array{
return (pTiles);
}
public function getReachedDestination(_arg1, _arg2:int, _arg3:int, _arg4:int, _arg5:int):Boolean{
return ((((_arg2 == _arg4)) && ((_arg3 == _arg5))));
}
public function getFCost(_arg1, _arg2:Number, _arg3:int, _arg4:int, _arg5:int, _arg6:int):Number{
return (((Math.abs((_arg3 - _arg5)) + Math.abs((_arg4 - _arg6))) * 10));
}
}
}//package com.liquable.game.tiledmap
Section 40
//UIController (com.liquable.game.ui.UIController)
package com.liquable.game.ui {
import com.liquable.game.*;
import flash.events.*;
import flash.display.*;
import com.liquable.game.postoffice.*;
public class UIController {
private var pApplication:GameApplication;
private var pControls:Object;
private var pDelayFrames:int;
private var pKeyMap:Object;
private var pPostOffice:PostOffice;
protected var pReceiverID:String;
private var pMessageQueue:Array;// = null
private var pDelayFrame:int;
public static const KEY_DOWN:String = "keyDown";
public static const MOUSE_MOVE:String = "mouseMove";
public static const POST_NAME:String = "CONTROLLER";
public static const MOUSE_UP:String = "mouseUp";
public static const KEY_UP:String = "keyUp";
public static const MOUSE_DOWN:String = "mouseDown";
public function UIController(_arg1:String, _arg2:GameApplication, _arg3:PostOffice=null){
pControls = new Object();
super();
pApplication = _arg2;
pReceiverID = _arg1;
pPostOffice = ((_arg3)!=null) ? _arg3 : pApplication.getPostOffice();
pControls[MOUSE_MOVE] = {stage:null, func:mouse_move};
pControls[MOUSE_DOWN] = {stage:null, func:mouse_down};
pControls[MOUSE_UP] = {stage:null, func:mouse_up};
pControls[KEY_DOWN] = {stage:null, func:key_down};
pControls[KEY_UP] = {stage:null, func:key_up};
pKeyMap = new Object();
}
public function stop():void{
pApplication.removeUpdateFunction(update);
pMessageQueue = null;
}
protected function update(_arg1:Event):void{
var _local2:int;
var _local3:UIData;
if (pDelayFrame < pDelayFrames){
pDelayFrame++;
} else {
_local2 = 0;
if (pMessageQueue){
for each (_local3 in pMessageQueue) {
if (_local3 != null){
pPostOffice.sendMessage(null, pReceiverID, _local3, _local2);
_local2 = Math.min(pDelayFrames, (_local2 + 1));
};
};
pMessageQueue = new Array();
};
pDelayFrame = 0;
};
}
protected function key_up(_arg1:KeyboardEvent):void{
var _local2:UIData;
if (pMessageQueue){
_local2 = new UIData(UIController.KEY_UP);
_local2.keyCode = _arg1.keyCode;
key_updn_insert(_local2, _arg1.keyCode);
};
pKeyMap[_arg1.keyCode] = false;
}
protected function mouse_down(_arg1:MouseEvent):void{
var _local2:UIData;
if (pMessageQueue){
_local2 = new UIData(UIController.MOUSE_DOWN);
_local2.localX = _arg1.localX;
_local2.localY = _arg1.localY;
_local2.stageX = _arg1.stageX;
_local2.stageY = _arg1.stageY;
mouse_updn_insert(_local2);
};
}
public function resetKey(_arg1:int):void{
pKeyMap[_arg1] = false;
}
private function mouse_updn_insert(_arg1:UIData):void{
var _local3:UIData;
var _local4:int;
var _local2:int;
while (_local2 < pMessageQueue.length) {
_local3 = pMessageQueue[_local2];
if (((!((_local3 == null))) && ((_local3.type == _arg1.type)))){
pMessageQueue[_local2] = null;
_local4 = (_local2 + 1);
while (_local4 < pMessageQueue.length) {
if (((!((_local3 == null))) && ((((_local3.type == UIController.MOUSE_DOWN)) || ((_local3.type == UIController.MOUSE_UP)))))){
pMessageQueue[_local4] = null;
};
_local4++;
};
break;
};
_local2++;
};
pMessageQueue.push(_arg1);
}
private function key_updn_insert(_arg1:UIData, _arg2:uint):void{
var _local4:UIData;
var _local5:int;
var _local3:int;
while (_local3 < pMessageQueue.length) {
_local4 = pMessageQueue[_local3];
if (((((!((_local4 == null))) && ((_local4.type == _arg1.type)))) && ((_local4.keyCode == _arg2)))){
pMessageQueue[_local3] = null;
_local5 = (_local3 + 1);
while (_local5 < pMessageQueue.length) {
_local4 = pMessageQueue[_local5];
if (((((!((_local4 == null))) && ((((_local4.type == UIController.KEY_DOWN)) || ((_local4.type == UIController.KEY_UP)))))) && ((_local4.keyCode == _arg2)))){
pMessageQueue[_local5] = null;
};
_local5++;
};
break;
};
_local3++;
};
pMessageQueue.push(_arg1);
}
public function getControlStage(_arg1:String):DisplayObjectContainer{
var _local2:Object = pControls[_arg1];
if (_local2 != null){
return (_local2.stage);
};
return (null);
}
public function isKeyDown(_arg1:uint):Boolean{
return (pKeyMap[_arg1]);
}
public function terminate():void{
var _local1:String;
stop();
for (_local1 in pControls) {
removeControl(_local1);
};
}
public function start(_arg1:int):void{
var _local3:MouseEvent;
pDelayFrames = _arg1;
pDelayFrame = 0;
pApplication.addUpdateFunction(update);
pMessageQueue = new Array();
var _local2:DisplayObjectContainer = getControlStage(UIController.MOUSE_MOVE);
if (_local2 != null){
_local3 = new MouseEvent(MouseEvent.MOUSE_MOVE);
_local3.localX = _local2.mouseX;
_local3.localY = _local2.mouseY;
mouse_move(_local3);
};
pKeyMap = new Object();
}
protected function key_down(_arg1:KeyboardEvent):void{
var _local2:UIData;
if (!pKeyMap[_arg1.keyCode]){
if (pMessageQueue){
_local2 = new UIData(UIController.KEY_DOWN);
_local2.keyCode = _arg1.keyCode;
key_updn_insert(_local2, _arg1.keyCode);
};
pKeyMap[_arg1.keyCode] = true;
};
}
protected function mouse_move(_arg1:MouseEvent):void{
var _local2:UIData;
var _local3:int;
var _local4:UIData;
if (pMessageQueue){
_local2 = new UIData(UIController.MOUSE_MOVE);
_local2.localX = _arg1.localX;
_local2.localY = _arg1.localY;
_local2.stageX = _arg1.stageX;
_local2.stageY = _arg1.stageY;
_local3 = 0;
while (_local3 < pMessageQueue.length) {
_local4 = pMessageQueue[_local3];
if (((!((_local4 == null))) && ((_local4.type == _local2.type)))){
pMessageQueue[_local3] = null;
};
_local3++;
};
pMessageQueue.push(_local2);
};
}
protected function mouse_up(_arg1:MouseEvent):void{
var _local2:UIData;
if (pMessageQueue){
_local2 = new UIData(UIController.MOUSE_UP);
_local2.localX = _arg1.localX;
_local2.localY = _arg1.localY;
_local2.stageX = _arg1.stageX;
_local2.stageY = _arg1.stageY;
mouse_updn_insert(_local2);
};
}
public function removeControl(_arg1:String):void{
var _local2:Object = pControls[_arg1];
if (_local2 != null){
if (_local2.stage != null){
_local2.stage.removeEventListener(_arg1, _local2.func);
_local2.stage = null;
};
};
}
public function addControl(_arg1:DisplayObject, _arg2:String):void{
var _local3:Object = pControls[_arg2];
if (_local3 != null){
_arg1.addEventListener(_arg2, _local3.func);
_local3.stage = _arg1;
};
}
}
}//package com.liquable.game.ui
Section 41
//UIData (com.liquable.game.ui.UIData)
package com.liquable.game.ui {
import com.liquable.game.postoffice.*;
public class UIData implements IPostData {
public var stageY:Number;
private var pType:String;
public var keyCode:uint;
public var localX:Number;
public var localY:Number;
public var stageX:Number;
public static const DATA_TYPE:String = "UIData";
public function UIData(_arg1:String){
pType = _arg1;
}
public function get type():String{
return (pType);
}
public function get data_type():String{
return (DATA_TYPE);
}
}
}//package com.liquable.game.ui
Section 42
//GameApplication (com.liquable.game.GameApplication)
package com.liquable.game {
import flash.events.*;
import com.liquable.media.*;
import com.liquable.game.debug.*;
import com.liquable.game.events.*;
import flash.display.*;
import com.liquable.game.postoffice.*;
import com.liquable.utils.*;
import flash.utils.*;
public class GameApplication extends EventDispatcher {
private var pDebugPanel:DebugPanel;
private var pPostOffice:PostOffice;
private var pTargetFps:int;
private var pNextUpdateTime:int;// = 0
private var pPostClient:PostClient;
private var pIsRunning:Boolean;
private var pMilliSpf:int;
private var pSoundManager:SoundManager;
private var pAutoAdjustFramerate:Boolean;
private var pUpdateEvent:GameApplicationUpdateEvent;
private var pUpdateFunctions:Array;
private var pFramesToCount:int;// = 30
private var pGameHeight:Number;
private var pTempUpdateFunctions:Array;
private var pOriginFps:int;
private var pCurrentTime:int;
private var pRealFps:int;
private var pFrameCounter:int;
private var pGameWidth:Number;
private var pAutoAdjustQuality:Boolean;
private var pRoot:Sprite;
public function GameApplication(_arg1:Sprite, _arg2:int, _arg3:int, _arg4:Boolean){
pOriginFps = -1;
pIsRunning = false;
pRoot = _arg1;
pGameWidth = _arg2;
pGameHeight = _arg3;
pPostOffice = new PostOffice(this, PostOffice.TIME_UNIT_FRAME);
pPostClient = new PostClient(pPostOffice);
pPostClient.setReceivePostFunction(onReceivedPost);
pSoundManager = new SoundManager(this);
pUpdateFunctions = new Array();
pTempUpdateFunctions = new Array();
if (_arg4){
pDebugPanel = new DebugPanel(this);
};
}
public function getStageFps():Number{
return (pRoot.stage.frameRate);
}
public function stop():void{
pPostOffice.stop();
if (pIsRunning){
pRoot.removeEventListener(Event.ENTER_FRAME, onGltEnterFrame);
pIsRunning = false;
};
if (pRoot.stage){
pRoot.stage.frameRate = pOriginFps;
};
}
public function setBackgroundColor(_arg1:uint):void{
pRoot.graphics.clear();
pRoot.graphics.beginFill(_arg1);
pRoot.graphics.drawRect(0, 0, pGameWidth, pGameHeight);
pRoot.graphics.endFill();
}
public function getSoundManager():SoundManager{
return (pSoundManager);
}
public function stopAutoAdjustQuality(_arg1:String):void{
pAutoAdjustQuality = false;
if (_arg1){
if (pRoot){
pRoot.stage.quality = _arg1;
};
};
}
private function onReceivedPost(_arg1:PostPackage):void{
var _local2:DelayFunctionPostData;
if (_arg1.data.data_type == DelayFunctionPostData.DATA_TYPE){
_local2 = DelayFunctionPostData(_arg1.data);
_local2.process();
};
}
public function debugPrintln(_arg1:String):void{
if (pDebugPanel != null){
pDebugPanel.getDebugConsole().println(_arg1);
};
}
public function debugConsoleSize(_arg1:Number, _arg2:Number):void{
if (pDebugPanel != null){
pDebugPanel.getDebugConsole().setDimension(_arg1, _arg2);
};
}
public function getRealFps():int{
return (pRealFps);
}
public function get gameHeight():Number{
return (pGameHeight);
}
public function startAutoAdjustQuality():void{
pAutoAdjustQuality = true;
}
public function getStage():Stage{
return (pRoot.stage);
}
public function addUpdateFunction(_arg1:Function):void{
ArrayUtil.addArrayUniqueElement(pUpdateFunctions, _arg1);
}
public function addDelayFunction(_arg1:Function, _arg2:Object, _arg3:int):void{
var _local4:DelayFunctionPostData = new DelayFunctionPostData(_arg1, _arg2);
pPostClient.sendMessage(pPostClient.getPostId(), _local4, _arg3);
}
public function terminate():void{
stop();
pPostOffice.terminate();
pPostOffice = null;
pSoundManager = null;
pRoot = null;
pUpdateFunctions = null;
pTempUpdateFunctions = null;
}
public function removeUpdateFunction(_arg1:Function):void{
ArrayUtil.removeArrayElement(pUpdateFunctions, _arg1);
ArrayUtil.removeArrayElement(pTempUpdateFunctions, _arg1);
}
public function getRoot():Sprite{
return (pRoot);
}
public function getTargetFps():int{
return (pTargetFps);
}
private function onGltEnterFrame(_arg1:Event):void{
var _local3:int;
var _local4:int;
var _local5:Function;
var _local2:int = getTimer();
if (pRoot.stage){
if (pOriginFps < 0){
pOriginFps = pRoot.stage.frameRate;
pRoot.stage.frameRate = pTargetFps;
} else {
if (++pFrameCounter == pFramesToCount){
if (pCurrentTime != -1){
pRealFps = Math.round(((pFramesToCount / (_local2 - pCurrentTime)) * 1000));
_local3 = (pTargetFps - pRealFps);
if (pAutoAdjustFramerate){
if (_local3 > 0){
pRoot.stage.frameRate = Math.min(39, (pRoot.stage.frameRate + Math.min(30, Math.ceil((_local3 * 0.7)))));
} else {
if (_local3 < -10){
pRoot.stage.frameRate = Math.max(pTargetFps, (pRoot.stage.frameRate + Math.max(-50, Math.floor((_local3 * 0.8)))));
} else {
if (_local3 < -1){
pRoot.stage.frameRate = Math.max(pTargetFps, (pRoot.stage.frameRate - 1));
};
};
};
};
if (pAutoAdjustQuality){
if (pAutoAdjustFramerate){
_local4 = (pRoot.stage.frameRate - pTargetFps);
switch (pRoot.stage.quality){
case StageQuality.MEDIUM:
if (_local4 > 30){
if (_local3 > 0){
pRoot.stage.quality = StageQuality.LOW;
};
} else {
if (_local4 < 8){
if (_local3 < 0){
pRoot.stage.quality = StageQuality.HIGH;
};
};
};
break;
case StageQuality.LOW:
if (_local4 < 12){
if (_local3 < 0){
pRoot.stage.quality = StageQuality.MEDIUM;
};
};
break;
case StageQuality.HIGH:
if ((((_local4 > 22)) && ((_local3 > 0)))){
pRoot.stage.quality = StageQuality.MEDIUM;
};
break;
default:
pRoot.stage.quality = StageQuality.HIGH;
break;
};
} else {
switch (pRoot.stage.quality){
case StageQuality.MEDIUM:
if (_local3 > 7){
pRoot.stage.quality = StageQuality.LOW;
} else {
if (_local3 < 3){
pRoot.stage.quality = StageQuality.HIGH;
};
};
break;
case StageQuality.LOW:
if (_local3 < 3){
pRoot.stage.quality = StageQuality.MEDIUM;
};
break;
case StageQuality.HIGH:
if (_local3 > 7){
pRoot.stage.quality = StageQuality.MEDIUM;
};
break;
default:
pRoot.stage.quality = StageQuality.HIGH;
break;
};
};
};
};
pCurrentTime = _local2;
pFrameCounter = 0;
};
};
};
if (pUpdateEvent == null){
pUpdateEvent = new GameApplicationUpdateEvent(GameApplicationUpdateEvent.GAME_APPLICATION_UPDATE, _local2, (_local2 > pNextUpdateTime));
} else {
pUpdateEvent.reset(_local2, (_local2 > pNextUpdateTime));
};
pTempUpdateFunctions = pUpdateFunctions.slice(0);
if (hasEventListener(GameApplicationUpdateErrorEvent.GAME_APPLICATION_UPDATE_ERROR)){
appUpdater(this, pUpdateEvent, pTempUpdateFunctions);
} else {
while (pTempUpdateFunctions.length) {
_local5 = pTempUpdateFunctions.shift();
_local5(pUpdateEvent);
};
};
pNextUpdateTime = (pNextUpdateTime + pMilliSpf);
}
public function debugWatchItem(_arg1:String, _arg2:DebugItem):void{
if (pDebugPanel != null){
pDebugPanel.addDebugItem(_arg1, _arg2);
};
}
public function get gameWidth():Number{
return (pGameWidth);
}
public function setDebugPanelRoot(_arg1:DisplayObjectContainer):void{
if (pDebugPanel){
if (pDebugPanel.parent){
pDebugPanel.parent.removeChild(pDebugPanel);
};
_arg1.addChild(pDebugPanel);
};
}
public function getPostOffice():PostOffice{
return (pPostOffice);
}
public function start(_arg1:int, _arg2:Boolean=true, _arg3:Boolean=false):void{
DesignContract.preCondition(!((pRoot == null)), "GameApplication is not initialized yet.");
pPostClient.setPostId("GameApplication");
pFramesToCount = (Math.max(12, _arg1) * 5);
pNextUpdateTime = (pCurrentTime = -1);
pRealFps = (pTargetFps = _arg1);
pRoot.stage.frameRate = _arg1;
pMilliSpf = Math.floor((1000 / pTargetFps));
pFrameCounter = 0;
pAutoAdjustFramerate = _arg2;
pAutoAdjustQuality = _arg3;
if (!pIsRunning){
pRoot.addEventListener(Event.ENTER_FRAME, onGltEnterFrame, false, 10);
pIsRunning = true;
};
pPostOffice.start();
}
public function hasUpdateFunction(_arg1:Function):Boolean{
return (!((pUpdateFunctions.indexOf(_arg1) == -1)));
}
private static function appUpdater(_arg1:GameApplication, _arg2:GameApplicationUpdateEvent, _arg3:Array):void{
var func:Function;
var errorEvent:GameApplicationUpdateErrorEvent;
var app = _arg1;
var e = _arg2;
var updateFunctions = _arg3;
while (updateFunctions.length) {
try {
while (updateFunctions.length) {
func = updateFunctions.shift();
func(e);
};
} catch(e:Error) {
errorEvent = new GameApplicationUpdateErrorEvent(GameApplicationUpdateErrorEvent.GAME_APPLICATION_UPDATE_ERROR, e.message, e.getStackTrace(), false, false);
app.dispatchEvent(errorEvent);
};
};
}
}
}//package com.liquable.game
import com.liquable.game.postoffice.*;
class DelayFunctionPostData implements IPostData {
private var pFunction:Function;
private var pParameter:Object;
public static const DATA_TYPE:String = "DelayFunctionPostData";
private function DelayFunctionPostData(_arg1:Function, _arg2:Object){
pFunction = _arg1;
pParameter = _arg2;
}
public function get data_type():String{
return (DATA_TYPE);
}
public function process():void{
pFunction(pParameter);
}
}
Section 43
//SoundController (com.liquable.media.SoundController)
package com.liquable.media {
import flash.events.*;
import flash.media.*;
public class SoundController {
private var pChannel:SoundChannel;
private var pPan:Number;
private var pFadingFromVolume:Number;
private var pManager:SoundManager;
private var pPlaying:Boolean;
private var pFadingTotalframes:int;
private var pOnFadeComplete:Function;
private var pFadingToVolume:Number;
private var pVolume:Number;
private var pFadingCurrentframe:int;
public function SoundController(_arg1:SoundManager, _arg2:SoundChannel){
pManager = _arg1;
pChannel = _arg2;
pVolume = 1;
pPan = 0;
if (pChannel){
pPlaying = true;
pChannel.addEventListener(Event.SOUND_COMPLETE, onComplete);
} else {
pPlaying = false;
};
}
public function stop():void{
if (pChannel){
stopFading();
pChannel.removeEventListener(Event.SOUND_COMPLETE, onComplete);
pChannel.stop();
pChannel = null;
};
pPlaying = false;
}
public function getVolume():Number{
return (pVolume);
}
public function fadeInAndOut(_arg1:Number, _arg2:int, _arg3:int, _arg4:int):void{
var toVolume = _arg1;
var inDuration = _arg2;
var stayDuration = _arg3;
var outDuration = _arg4;
fade(0, toVolume, inDuration, function (_arg1:SoundController):void{
pManager.getApplication().addDelayFunction(fadeOut, outDuration, stayDuration);
});
}
public function fadeIn(_arg1:Number, _arg2:int):void{
fade(0, _arg1, _arg2, null);
}
public function stopFading():void{
pManager.getApplication().removeUpdateFunction(fade_update);
pOnFadeComplete = null;
}
public function setPan(_arg1:Number):void{
var _local2:SoundTransform;
pPan = _arg1;
if (pChannel){
_local2 = pChannel.soundTransform;
_local2.pan = pPan;
pChannel.soundTransform = _local2;
};
}
public function setVolume(_arg1:Number):void{
var _local2:SoundTransform;
pVolume = _arg1;
if (pChannel){
_local2 = pChannel.soundTransform;
_local2.volume = pVolume;
pChannel.soundTransform = _local2;
};
}
public function getPan():Number{
return (pPan);
}
public function isPlaying():Boolean{
return (pPlaying);
}
private function fade_update(_arg1:Event):void{
var _local2:Number;
var _local3:Function;
pFadingCurrentframe++;
if (pFadingCurrentframe < pFadingTotalframes){
_local2 = (pFadingCurrentframe / pFadingTotalframes);
setVolume((pFadingFromVolume + ((pFadingToVolume - pFadingFromVolume) * _local2)));
} else {
setVolume(pFadingToVolume);
_local3 = pOnFadeComplete;
stopFading();
if (_local3 != null){
_local3(this);
};
};
}
public function getSoundChannel():SoundChannel{
return (pChannel);
}
public function fadeOut(_arg1:int):void{
var duration = _arg1;
fade(getVolume(), 0, duration, function (_arg1:SoundController):void{
stop();
});
}
public function fade(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Function=null):void{
pFadingFromVolume = _arg1;
pFadingToVolume = _arg2;
pFadingCurrentframe = 0;
pFadingTotalframes = _arg3;
pOnFadeComplete = _arg4;
setVolume(pFadingFromVolume);
pManager.getApplication().addUpdateFunction(fade_update);
}
private function onComplete(_arg1:Event):void{
stop();
}
}
}//package com.liquable.media
Section 44
//SoundManager (com.liquable.media.SoundManager)
package com.liquable.media {
import com.liquable.game.*;
import flash.media.*;
import com.liquable.utils.*;
import flash.utils.*;
public class SoundManager {
private var pApplication:GameApplication;
private var pSoundLib:Dictionary;
public function SoundManager(_arg1:GameApplication){
pApplication = _arg1;
pSoundLib = new Dictionary();
}
public function getGlobalVolume():Number{
return (SoundMixer.soundTransform.volume);
}
public function getGlobalPan():Number{
return (SoundMixer.soundTransform.pan);
}
public function setGlobalPan(_arg1:Number):void{
SoundMixer.soundTransform = new SoundTransform(getGlobalVolume(), _arg1);
}
private function getSound(_arg1:Class):Sound{
var _local2:Sound = pSoundLib[_arg1];
if (_local2 == null){
_local2 = new (_arg1);
pSoundLib[_arg1] = _local2;
};
return (_local2);
}
public function getApplication():GameApplication{
return (pApplication);
}
public function playSound(_arg1:Class, _arg2:Boolean, _arg3:Number=0):SoundController{
var _local4:Sound = getSound(_arg1);
DesignContract.preCondition((_arg3 < _local4.length), (((("startTime is greater than the sound length: play(" + _arg3) + " / ") + _local4.length) + ")"));
var _local5:SoundChannel = _local4.play(_arg3, (_arg2) ? int.MAX_VALUE : 0);
var _local6:SoundController = new SoundController(this, _local5);
return (_local6);
}
public function setGlobalVolume(_arg1:Number):void{
SoundMixer.soundTransform = new SoundTransform(_arg1, getGlobalPan());
}
}
}//package com.liquable.media
Section 45
//State (com.liquable.statemachine.State)
package com.liquable.statemachine {
class State {
var mProcessFunc:Function;
var mEnterFunc:Function;
var mExitFunc:Function;
function State(_arg1:Function, _arg2:Function, _arg3:Function){
mEnterFunc = _arg1;
mProcessFunc = _arg2;
mExitFunc = _arg3;
}
}
}//package com.liquable.statemachine
Section 46
//StateMachine (com.liquable.statemachine.StateMachine)
package com.liquable.statemachine {
import com.liquable.utils.*;
import com.liquable.data.*;
public class StateMachine {
private var pDebug:Boolean;// = false
private var pPreProcessFunction:Function;
private var pPostProcessFunction:Function;
private var pStateName:String;
protected var pStateHash:Object;
private var pCurrState:State;
private var pData:MapData;
private static const INVALID_STATE_NAME:String = "-invalid+";
public function StateMachine(){
pStateHash = new Object();
}
public function destroy():void{
setState(null);
pData = null;
pStateHash = null;
pPostProcessFunction = (pPreProcessFunction = null);
}
public function setPreProcessFunction(_arg1:Function):void{
pPreProcessFunction = _arg1;
}
public function setState(_arg1:String):void{
if (pDebug){
trace(("set state: " + _arg1));
};
var _local2:State = pCurrState;
var _local3:String = pStateName;
pCurrState = null;
pStateName = INVALID_STATE_NAME;
if (((!((_local2 == null))) && (!((_local2.mExitFunc == null))))){
_local2.mExitFunc(_arg1);
};
if (pStateName == INVALID_STATE_NAME){
pStateName = _arg1;
if (_arg1 != null){
pCurrState = pStateHash[_arg1];
DesignContract.preCondition(!((pCurrState == null)), (("StateMachine : " + _arg1) + " has not been inited as a state"));
};
if (((pCurrState) && (!((pCurrState.mEnterFunc == null))))){
pCurrState.mEnterFunc(_local3);
};
};
}
public function setDebug(_arg1:Boolean):void{
pDebug = _arg1;
}
public function getStateName():String{
return (pStateName);
}
protected function getState():State{
return (pCurrState);
}
public function initState(_arg1:String, _arg2:Function, _arg3:Function, _arg4:Function):void{
pStateHash[_arg1] = new State(_arg2, _arg3, _arg4);
}
public function isInState(_arg1:String):Boolean{
return ((pStateName == _arg1));
}
public function setPostProcessFunction(_arg1:Function):void{
pPostProcessFunction = _arg1;
}
public function get data():MapData{
if (pData == null){
pData = new MapData();
};
return (pData);
}
public function process(_arg1:IValidData):void{
if (_arg1.isValid()){
if (pPreProcessFunction != null){
pPreProcessFunction(_arg1);
};
if (((((_arg1.isValid()) && (!((pCurrState == null))))) && (!((pCurrState.mProcessFunc == null))))){
pCurrState.mProcessFunc(_arg1);
};
if (((!((pPostProcessFunction == null))) && (_arg1.isValid()))){
pPostProcessFunction(_arg1);
};
};
}
}
}//package com.liquable.statemachine
Section 47
//ArrayUtil (com.liquable.utils.ArrayUtil)
package com.liquable.utils {
public class ArrayUtil {
public static function createUniformArray(_arg1, _arg2:uint):Array{
var _local3:Array = new Array(_arg2);
var _local4:int;
while (_local4 < _local3.length) {
_local3[_local4] = _arg1;
_local4++;
};
return (_local3);
}
public static function arrayIntersect(_arg1:Array, _arg2:Array):Array{
var _local4:Object;
var _local3:Array = _arg1.slice();
for each (_local4 in _arg2) {
if (_local3.indexOf(_local4) == -1){
ArrayUtil.removeArrayElement(_local3, _local4);
};
};
return (_local3);
}
public static function removeArrayElement(_arg1:Array, _arg2:Object):Boolean{
var _local3:int = _arg1.indexOf(_arg2);
if (_local3 < 0){
return (false);
};
_arg1.splice(_local3, 1);
return (true);
}
public static function convertMapValuesByKeyToArray(_arg1:Object, _arg2:Object):Array{
var _local4:Object;
var _local3:Array = new Array();
for each (_local4 in _arg1) {
_local3.push(_local4[_arg2]);
};
return (_local3);
}
public static function swapElements(_arg1:Array, _arg2:int, _arg3:int):void{
var _local4:* = _arg1[_arg2];
_arg1[_arg2] = _arg1[_arg3];
_arg1[_arg3] = _local4;
}
public static function convertMapValuesToArray(_arg1:Object):Array{
var _local3:Object;
var _local2:Array = new Array();
for each (_local3 in _arg1) {
_local2.push(_local3);
};
return (_local2);
}
public static function randomizeArray(_arg1:Array):void{
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
swapElements(_arg1, _local3, IntUtil.random((_local2 - 1)));
_local3++;
};
}
public static function convertMapKeysToArray(_arg1:Object):Array{
var _local3:Object;
var _local2:Array = new Array();
for (_local3 in _arg1) {
_local2.push(_local3);
};
return (_local2);
}
public static function addArrayUniqueElement(_arg1:Array, _arg2:Object):Boolean{
if (_arg1.indexOf(_arg2) < 0){
_arg1.push(_arg2);
return (true);
};
return (false);
}
public static function getArrayRandomElement(_arg1:Array, _arg2:Boolean){
var _local3:int;
var _local4:*;
if (((_arg1) && (_arg1.length))){
_local3 = IntUtil.random((_arg1.length - 1));
_local4 = _arg1[_local3];
if (_arg2){
_arg1.splice(_local3, 1);
};
return (_local4);
};
return (null);
}
public static function findIndexOfFirstMatchedProperty(_arg1:Array, _arg2:String, _arg3:Object, _arg4:int=0):int{
var _local6:Object;
var _local5:int = _arg4;
while (_local5 < _arg1.length) {
_local6 = _arg1[_local5];
if (((_local6.hasOwnProperty(_arg2)) && ((_local6[_arg2] == _arg3)))){
return (_local5);
};
_local5++;
};
return (-1);
}
public static function makeUniqueArray(_arg1:Array):Array{
var _local2:Array = new Array();
return (arrayMerge(_local2, _arg1));
}
public static function arrayMerge(_arg1:Array, _arg2:Array):Array{
var _local4:Object;
var _local3:Array = _arg1.slice();
for each (_local4 in _arg2) {
if (_local3.indexOf(_local4) == -1){
_local3.push(_local4);
};
};
return (_local3);
}
}
}//package com.liquable.utils
Section 48
//DesignContract (com.liquable.utils.DesignContract)
package com.liquable.utils {
public final class DesignContract {
public static function invariant(_arg1:Boolean, _arg2:String=null):Boolean{
return (postCondition(_arg1, _arg2));
}
public static function postCondition(_arg1:Boolean, _arg2:String=null):Boolean{
if (!_arg1){
throw (new ArgumentError(_arg2));
};
return (true);
}
public static function preCondition(_arg1:Boolean, _arg2:String=null):void{
if (!_arg1){
throw (new ArgumentError(_arg2));
};
}
}
}//package com.liquable.utils
Section 49
//Enum (com.liquable.utils.Enum)
package com.liquable.utils {
public class Enum {
private var pNumEnums:int;
public function Enum(_arg1:int=0){
pNumEnums = _arg1;
}
public function get NUM_ENUMS():int{
return (pNumEnums);
}
public function nextIndex():int{
return (pNumEnums++);
}
}
}//package com.liquable.utils
Section 50
//IntUtil (com.liquable.utils.IntUtil)
package com.liquable.utils {
public class IntUtil {
public static function formatAddComma(_arg1:int):String{
var _local3:String;
if (_arg1 == 0){
return ("0");
};
var _local2 = "";
while (_arg1 > 0) {
_local3 = String((_arg1 % 1000));
_arg1 = Math.floor((_arg1 / 1000));
if (_arg1 > 0){
while (_local3.length < 3) {
_local3 = ("0" + _local3);
};
_local3 = ("," + _local3);
};
_local2 = (_local3 + _local2);
};
return (_local2);
}
public static function random(_arg1:int):int{
return (Math.floor((Math.random() * (_arg1 + 1))));
}
public static function randomBetween(_arg1:int, _arg2:int):int{
if (_arg1 < _arg2){
return ((_arg1 + Math.floor((Math.random() * ((_arg2 - _arg1) + 1)))));
};
if (_arg1 > _arg2){
return (randomBetween(_arg2, _arg1));
};
return (_arg1);
}
}
}//package com.liquable.utils
Section 51
//MapData (com.liquable.utils.MapData)
package com.liquable.utils {
public class MapData {
private var pData:Object;
public function MapData(_arg1:Object=null){
pData = new Object();
super();
importData(_arg1);
}
public function removeKey(_arg1:String):void{
delete pData[_arg1];
}
public function getString(_arg1:String):String{
var _local2:Object = getValue(_arg1);
if (_local2 != null){
return (String(_local2));
};
return (null);
}
public function clear():void{
pData = new Object();
}
public function setValue(_arg1:String, _arg2):void{
pData[_arg1] = _arg2;
}
public function getBoolean(_arg1:String):Boolean{
return (Boolean(getValue(_arg1)));
}
public function importData(_arg1:Object):void{
var _local2:String;
if (_arg1 != null){
if ((_arg1 is MapData)){
_arg1 = MapData(_arg1).exportData();
};
for (_local2 in _arg1) {
pData[_local2] = _arg1[_local2];
};
};
}
public function getInt(_arg1:String):int{
return (int(getValue(_arg1)));
}
public function getValue(_arg1:String){
if (pData.hasOwnProperty(_arg1)){
return (pData[_arg1]);
};
return (null);
}
public function exportData():Object{
var _local2:String;
var _local3:Object;
var _local1:Object = new Object();
for (_local2 in pData) {
_local3 = pData[_local2];
if ((_local3 is MapData)){
_local3 = (_local3 as MapData).exportData();
};
_local1[_local2] = _local3;
};
return (_local1);
}
public function getNumber(_arg1:String):Number{
return (Number(getValue(_arg1)));
}
}
}//package com.liquable.utils
Section 52
//MathUtil (com.liquable.utils.MathUtil)
package com.liquable.utils {
import flash.geom.*;
public class MathUtil {
public static const HALF_PI:Number = 1.5707963267949;
public static const TWO_PI:Number = 6.28318530717959;
private static const _PI_DIVIDED_BY_180:Number = 0.0174532925199433;
private static const _180_DIVIDED_BY_PI:Number = 57.2957795130823;
public static function degrees2radians(_arg1:Number):Number{
return ((_arg1 * _PI_DIVIDED_BY_180));
}
public static function degreesFollowTarget(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=1, _arg5:Number=1.79769313486232E308):Number{
var _local6:Number = (_arg2 - _arg1);
while (_local6 > 180) {
_local6 = (_local6 - 360);
};
while (_local6 < -180) {
_local6 = (_local6 + 360);
};
return (numberFollowTarget((_arg2 - _local6), _arg2, _arg3, _arg4, _arg5));
}
public static function numberFollowTarget(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.79769313486232E308):Number{
var _local7:Number;
var _local8:Number;
var _local6:Number = (_arg2 - _arg1);
if (Math.abs(_local6) > _arg4){
_local7 = (_local6 * _arg3);
_local8 = Math.abs(_local7);
if (_local8 < _arg4){
_local7 = ((_local7 > 0)) ? _arg4 : -(_arg4);
} else {
if (_local8 > _arg5){
_local7 = ((_local7 > 0)) ? _arg5 : -(_arg5);
};
};
return ((_arg1 + _local7));
};
return (_arg2);
}
public static function radians2degrees(_arg1:Number):Number{
return ((_arg1 * _180_DIVIDED_BY_PI));
}
public static function makePreciseFloat(_arg1:Number, _arg2:int=3):Number{
var _local3:Number = 1;
var _local4:int;
while (_local4 < _arg2) {
_local3 = (_local3 * 10);
_local4++;
};
return ((Math.floor((_arg1 * _local3)) / _local3));
}
public static function pointFollowTarget(_arg1:Point, _arg2:Point, _arg3:Number, _arg4:Number, _arg5:Number=1.79769313486232E308):Point{
var _local6:Point;
var _local7:Number;
var _local8:Number;
if (((!((_arg1.x == _arg2.x))) || (!((_arg1.y == _arg2.y))))){
_local6 = _arg2.subtract(_arg1);
_local7 = _local6.length;
if (_local7 > _arg4){
_local8 = (_local7 * _arg3);
if (_local8 < _arg4){
_local8 = _arg4;
} else {
if (_local8 > _arg5){
_local8 = _arg5;
};
};
_local6.normalize(_local8);
_arg1.x = (_arg1.x + _local6.x);
_arg1.y = (_arg1.y + _local6.y);
} else {
_arg1.x = _arg2.x;
_arg1.y = _arg2.y;
};
};
return (_arg1);
}
public static function radiansFollowTarget(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0.01, _arg5:Number=1.79769313486232E308):Number{
var _local6:Number = (_arg2 - _arg1);
while (_local6 > Math.PI) {
_local6 = (_local6 - TWO_PI);
};
while (_local6 < -(Math.PI)) {
_local6 = (_local6 + TWO_PI);
};
return (numberFollowTarget((_arg2 - _local6), _arg2, _arg3, _arg4, _arg5));
}
public static function formatTimer(_arg1:int):String{
var _local2:int = Math.floor(((_arg1 / 1000) / 60));
var _local3:int = Math.floor(((_arg1 - ((_local2 * 60) * 1000)) / 1000));
var _local4:int = Math.floor(((_arg1 % 1000) / 10));
var _local5:String = ("" + _local2);
while (_local5.length < 2) {
_local5 = ("0" + _local5);
};
var _local6:String = ("" + _local3);
while (_local6.length < 2) {
_local6 = ("0" + _local6);
};
var _local7:String = ("" + _local4);
while (_local7.length < 2) {
_local7 = ("0" + _local7);
};
return (((((_local5 + ":") + _local6) + ":") + _local7));
}
}
}//package com.liquable.utils
Section 53
//VisualSprite (com.liquable.visualstack.VisualSprite)
package com.liquable.visualstack {
import flash.display.*;
import com.liquable.utils.*;
public class VisualSprite extends Sprite {
private var pData:MapData;
public function VisualSprite(){
pData = new MapData();
super();
}
public function onHide():void{
}
protected function get data():MapData{
return (pData);
}
public function setBackgroundColor(_arg1:uint):void{
graphics.clear();
graphics.beginFill(_arg1);
graphics.drawRect(0, 0, getStack().stageWidth, getStack().stageHeight);
graphics.endFill();
}
protected function processDone():void{
var _local1:VisualStack = getStack();
if (_local1){
_local1.childProcessDone(this);
};
}
public function onPush():void{
}
public function getStack():VisualStack{
return (VisualStack(this.parent));
}
public function onReveal(_arg1:MapData):void{
}
public function onPop():MapData{
return (pData);
}
}
}//package com.liquable.visualstack
Section 54
//VisualStack (com.liquable.visualstack.VisualStack)
package com.liquable.visualstack {
import flash.display.*;
import com.liquable.utils.*;
public class VisualStack extends Sprite {
private var pEmptyCallback:Function;// = null
private var pWidth:Number;
private var pHeight:Number;
public function VisualStack(_arg1:Number, _arg2:Number){
pWidth = _arg1;
pHeight = _arg2;
}
public function push(_arg1:VisualSprite):int{
if (this.numChildren){
getTopItem().onHide();
};
this.addChild(_arg1);
_arg1.onPush();
return (this.numChildren);
}
public function get stageHeight():Number{
return (pHeight);
}
public function get stageWidth():Number{
return (pWidth);
}
public function setEmptyCallback(_arg1:Function):void{
pEmptyCallback = _arg1;
}
public function pop():VisualSprite{
DesignContract.preCondition((this.numChildren > 0), "there must always be at least one item in the stack to use pop");
this.stage.focus = this.stage;
var _local1:VisualSprite = VisualSprite(this.removeChildAt((this.numChildren - 1)));
var _local2:MapData = _local1.onPop();
if (this.numChildren){
getTopItem().onReveal(_local2);
} else {
if (pEmptyCallback != null){
pEmptyCallback(_local2);
};
};
return (_local1);
}
public function getTopItem():VisualSprite{
if (this.numChildren){
return (VisualSprite(this.getChildAt((this.numChildren - 1))));
};
return (null);
}
public function childProcessDone(_arg1:VisualSprite):void{
if (DesignContract.postCondition((_arg1 == getTopItem()), "child Done not on the top of the stack.")){
pop();
};
}
public function setBackgroundColor(_arg1:uint):void{
this.graphics.clear();
this.graphics.beginFill(_arg1);
this.graphics.drawRect(0, 0, pWidth, pHeight);
this.graphics.endFill();
}
}
}//package com.liquable.visualstack
Section 55
//messaging_combo_mc_3 (combos_fla.messaging_combo_mc_3)
package combos_fla {
import flash.display.*;
import flash.text.*;
public dynamic class messaging_combo_mc_3 extends MovieClip {
public var combosText:TextField;
}
}//package combos_fla
Section 56
//Symbol1_2 (combos_fla.Symbol1_2)
package combos_fla {
import flash.display.*;
public dynamic class Symbol1_2 extends MovieClip {
public var combosText:MovieClip;
}
}//package combos_fla
Section 57
//MC_ButtonSoundWiggleOver_12 (HUD01_fla.MC_ButtonSoundWiggleOver_12)
package HUD01_fla {
import flash.display.*;
public dynamic class MC_ButtonSoundWiggleOver_12 extends MovieClip {
public function MC_ButtonSoundWiggleOver_12(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package HUD01_fla
Section 58
//MC_HealthBarExample_5 (HUD01_fla.MC_HealthBarExample_5)
package HUD01_fla {
import flash.display.*;
public dynamic class MC_HealthBarExample_5 extends MovieClip {
public var bar:MovieClip;
}
}//package HUD01_fla
Section 59
//MC_HelpWiggleOver_10 (HUD01_fla.MC_HelpWiggleOver_10)
package HUD01_fla {
import flash.display.*;
public dynamic class MC_HelpWiggleOver_10 extends MovieClip {
public function MC_HelpWiggleOver_10(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package HUD01_fla
Section 60
//mc_msg_dayx_16 (HUD01_fla.mc_msg_dayx_16)
package HUD01_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class mc_msg_dayx_16 extends MovieClip {
public var labelText:TextField;
public var rootClip:MovieClip;
public function mc_msg_dayx_16(){
addFrameScript(0, frame1);
}
function frame1(){
rootClip = (parent as MovieClip);
if (((rootClip) && (rootClip.nights))){
this.labelText.text = (("" + rootClip.nights) + ":");
};
}
}
}//package HUD01_fla
Section 61
//MC_SoundToggleWiggleOver_14 (HUD01_fla.MC_SoundToggleWiggleOver_14)
package HUD01_fla {
import flash.display.*;
public dynamic class MC_SoundToggleWiggleOver_14 extends MovieClip {
public function MC_SoundToggleWiggleOver_14(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package HUD01_fla
Section 62
//messaging_combo_mc_20 (HUD01_fla.messaging_combo_mc_20)
package HUD01_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class messaging_combo_mc_20 extends MovieClip {
public var labelText:TextField;
public var rootClip:MovieClip;
public function messaging_combo_mc_20(){
addFrameScript(0, frame1);
}
function frame1(){
rootClip = (parent as MovieClip);
if (rootClip){
this.labelText.text = rootClip.money;
};
}
}
}//package HUD01_fla
Section 63
//messaging_top_mc_17 (HUD01_fla.messaging_top_mc_17)
package HUD01_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class messaging_top_mc_17 extends MovieClip {
public var moneyText:TextField;
public var rootClip:MovieClip;
public var tricksText:TextField;
public function messaging_top_mc_17(){
addFrameScript(0, frame1);
}
function frame1(){
rootClip = (parent as MovieClip);
this.tricksText.text = ("" + rootClip.tricks);
this.moneyText.text = ("" + rootClip.money);
if (rootClip.tricks > 1){
gotoAndStop(1);
} else {
gotoAndStop(2);
};
}
}
}//package HUD01_fla
Section 64
//no_weapon_3 (HUD01_fla.no_weapon_3)
package HUD01_fla {
import flash.display.*;
public dynamic class no_weapon_3 extends MovieClip {
public function no_weapon_3(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package HUD01_fla
Section 65
//aniicedbreakdeergn_27 (lib_ankle_biter_zombie_fla.aniicedbreakdeergn_27)
package lib_ankle_biter_zombie_fla {
import flash.display.*;
public dynamic class aniicedbreakdeergn_27 extends MovieClip {
public function aniicedbreakdeergn_27(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package lib_ankle_biter_zombie_fla
Section 66
//aniiceddeergn_25 (lib_ankle_biter_zombie_fla.aniiceddeergn_25)
package lib_ankle_biter_zombie_fla {
import flash.display.*;
public dynamic class aniiceddeergn_25 extends MovieClip {
public function aniiceddeergn_25(){
addFrameScript(3, frame4, 18, frame19);
}
function frame19(){
stop();
}
function frame4(){
stop();
}
}
}//package lib_ankle_biter_zombie_fla
Section 67
//icebreakanideergn_28 (lib_ankle_biter_zombie_fla.icebreakanideergn_28)
package lib_ankle_biter_zombie_fla {
import flash.display.*;
public dynamic class icebreakanideergn_28 extends MovieClip {
public function icebreakanideergn_28(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package lib_ankle_biter_zombie_fla
Section 68
//lola_frozengn_24 (lib_ankle_biter_zombie_fla.lola_frozengn_24)
package lib_ankle_biter_zombie_fla {
import flash.display.*;
public dynamic class lola_frozengn_24 extends MovieClip {
public var mc:MovieClip;
}
}//package lib_ankle_biter_zombie_fla
Section 69
//blood1_15 (lib_decomposedZombie_fla.blood1_15)
package lib_decomposedZombie_fla {
import flash.display.*;
public dynamic class blood1_15 extends MovieClip {
public function blood1_15(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package lib_decomposedZombie_fla
Section 70
//blood2_16 (lib_decomposedZombie_fla.blood2_16)
package lib_decomposedZombie_fla {
import flash.display.*;
public dynamic class blood2_16 extends MovieClip {
public function blood2_16(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package lib_decomposedZombie_fla
Section 71
//MC_FireDecompDie_26 (lib_decomposedZombie_fla.MC_FireDecompDie_26)
package lib_decomposedZombie_fla {
import flash.display.*;
public dynamic class MC_FireDecompDie_26 extends MovieClip {
public function MC_FireDecompDie_26(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package lib_decomposedZombie_fla
Section 72
//partanimated2_13 (lib_decomposedZombie_fla.partanimated2_13)
package lib_decomposedZombie_fla {
import flash.display.*;
public dynamic class partanimated2_13 extends MovieClip {
public function partanimated2_13(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package lib_decomposedZombie_fla
Section 73
//partanimated3_14 (lib_decomposedZombie_fla.partanimated3_14)
package lib_decomposedZombie_fla {
import flash.display.*;
public dynamic class partanimated3_14 extends MovieClip {
public function partanimated3_14(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package lib_decomposedZombie_fla
Section 74
//partanimated5_12 (lib_decomposedZombie_fla.partanimated5_12)
package lib_decomposedZombie_fla {
import flash.display.*;
public dynamic class partanimated5_12 extends MovieClip {
public function partanimated5_12(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package lib_decomposedZombie_fla
Section 75
//aniicedbreakdeergn_32 (lib_decomposedZombie2_fla.aniicedbreakdeergn_32)
package lib_decomposedZombie2_fla {
import flash.display.*;
public dynamic class aniicedbreakdeergn_32 extends MovieClip {
public function aniicedbreakdeergn_32(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package lib_decomposedZombie2_fla
Section 76
//aniiceddeergn_30 (lib_decomposedZombie2_fla.aniiceddeergn_30)
package lib_decomposedZombie2_fla {
import flash.display.*;
public dynamic class aniiceddeergn_30 extends MovieClip {
public function aniiceddeergn_30(){
addFrameScript(3, frame4, 18, frame19);
}
function frame19(){
stop();
}
function frame4(){
stop();
}
}
}//package lib_decomposedZombie2_fla
Section 77
//blood1_16 (lib_decomposedZombie2_fla.blood1_16)
package lib_decomposedZombie2_fla {
import flash.display.*;
public dynamic class blood1_16 extends MovieClip {
public function blood1_16(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package lib_decomposedZombie2_fla
Section 78
//blood2_17 (lib_decomposedZombie2_fla.blood2_17)
package lib_decomposedZombie2_fla {
import flash.display.*;
public dynamic class blood2_17 extends MovieClip {
public function blood2_17(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package lib_decomposedZombie2_fla
Section 79
//icebreakanideergn_33 (lib_decomposedZombie2_fla.icebreakanideergn_33)
package lib_decomposedZombie2_fla {
import flash.display.*;
public dynamic class icebreakanideergn_33 extends MovieClip {
public function icebreakanideergn_33(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package lib_decomposedZombie2_fla
Section 80
//lola_frozengn_29 (lib_decomposedZombie2_fla.lola_frozengn_29)
package lib_decomposedZombie2_fla {
import flash.display.*;
public dynamic class lola_frozengn_29 extends MovieClip {
public var mc:MovieClip;
}
}//package lib_decomposedZombie2_fla
Section 81
//MC_FireDecompDie_27 (lib_decomposedZombie2_fla.MC_FireDecompDie_27)
package lib_decomposedZombie2_fla {
import flash.display.*;
public dynamic class MC_FireDecompDie_27 extends MovieClip {
public function MC_FireDecompDie_27(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package lib_decomposedZombie2_fla
Section 82
//partanimated2_14 (lib_decomposedZombie2_fla.partanimated2_14)
package lib_decomposedZombie2_fla {
import flash.display.*;
public dynamic class partanimated2_14 extends MovieClip {
public function partanimated2_14(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package lib_decomposedZombie2_fla
Section 83
//partanimated3_15 (lib_decomposedZombie2_fla.partanimated3_15)
package lib_decomposedZombie2_fla {
import flash.display.*;
public dynamic class partanimated3_15 extends MovieClip {
public function partanimated3_15(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package lib_decomposedZombie2_fla
Section 84
//partanimated5_13 (lib_decomposedZombie2_fla.partanimated5_13)
package lib_decomposedZombie2_fla {
import flash.display.*;
public dynamic class partanimated5_13 extends MovieClip {
public function partanimated5_13(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package lib_decomposedZombie2_fla
Section 85
//aniicedbreakdeergn_30 (lib_fatZombie_fla.aniicedbreakdeergn_30)
package lib_fatZombie_fla {
import flash.display.*;
public dynamic class aniicedbreakdeergn_30 extends MovieClip {
public function aniicedbreakdeergn_30(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package lib_fatZombie_fla
Section 86
//aniiceddeergn_28 (lib_fatZombie_fla.aniiceddeergn_28)
package lib_fatZombie_fla {
import flash.display.*;
public dynamic class aniiceddeergn_28 extends MovieClip {
public function aniiceddeergn_28(){
addFrameScript(3, frame4, 18, frame19);
}
function frame19(){
stop();
}
function frame4(){
stop();
}
}
}//package lib_fatZombie_fla
Section 87
//icebreakanideergn_31 (lib_fatZombie_fla.icebreakanideergn_31)
package lib_fatZombie_fla {
import flash.display.*;
public dynamic class icebreakanideergn_31 extends MovieClip {
public function icebreakanideergn_31(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package lib_fatZombie_fla
Section 88
//lola_frozengn_27 (lib_fatZombie_fla.lola_frozengn_27)
package lib_fatZombie_fla {
import flash.display.*;
public dynamic class lola_frozengn_27 extends MovieClip {
public var mc:MovieClip;
}
}//package lib_fatZombie_fla
Section 89
//aniicedbreakdeergn_29 (lib_genericZombie_fla.aniicedbreakdeergn_29)
package lib_genericZombie_fla {
import flash.display.*;
public dynamic class aniicedbreakdeergn_29 extends MovieClip {
public function aniicedbreakdeergn_29(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package lib_genericZombie_fla
Section 90
//aniiceddeergn_27 (lib_genericZombie_fla.aniiceddeergn_27)
package lib_genericZombie_fla {
import flash.display.*;
public dynamic class aniiceddeergn_27 extends MovieClip {
public function aniiceddeergn_27(){
addFrameScript(3, frame4, 18, frame19);
}
function frame19(){
stop();
}
function frame4(){
stop();
}
}
}//package lib_genericZombie_fla
Section 91
//blood1_19 (lib_genericZombie_fla.blood1_19)
package lib_genericZombie_fla {
import flash.display.*;
public dynamic class blood1_19 extends MovieClip {
public function blood1_19(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package lib_genericZombie_fla
Section 92
//blood2_20 (lib_genericZombie_fla.blood2_20)
package lib_genericZombie_fla {
import flash.display.*;
public dynamic class blood2_20 extends MovieClip {
public function blood2_20(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package lib_genericZombie_fla
Section 93
//blood4_35 (lib_genericZombie_fla.blood4_35)
package lib_genericZombie_fla {
import flash.display.*;
public dynamic class blood4_35 extends MovieClip {
public function blood4_35(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package lib_genericZombie_fla
Section 94
//icebreakanideergn_30 (lib_genericZombie_fla.icebreakanideergn_30)
package lib_genericZombie_fla {
import flash.display.*;
public dynamic class icebreakanideergn_30 extends MovieClip {
public function icebreakanideergn_30(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package lib_genericZombie_fla
Section 95
//lola_frozengn_26 (lib_genericZombie_fla.lola_frozengn_26)
package lib_genericZombie_fla {
import flash.display.*;
public dynamic class lola_frozengn_26 extends MovieClip {
public var mc:MovieClip;
}
}//package lib_genericZombie_fla
Section 96
//MC_FlattenedBigBlood_37 (lib_genericZombie_fla.MC_FlattenedBigBlood_37)
package lib_genericZombie_fla {
import flash.display.*;
public dynamic class MC_FlattenedBigBlood_37 extends MovieClip {
public function MC_FlattenedBigBlood_37(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package lib_genericZombie_fla
Section 97
//aniicedbreakdeergn_28 (lib_gnomeZombie_fla.aniicedbreakdeergn_28)
package lib_gnomeZombie_fla {
import flash.display.*;
public dynamic class aniicedbreakdeergn_28 extends MovieClip {
public function aniicedbreakdeergn_28(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package lib_gnomeZombie_fla
Section 98
//aniiceddeergn_26 (lib_gnomeZombie_fla.aniiceddeergn_26)
package lib_gnomeZombie_fla {
import flash.display.*;
public dynamic class aniiceddeergn_26 extends MovieClip {
public function aniiceddeergn_26(){
addFrameScript(3, frame4, 18, frame19);
}
function frame19(){
stop();
}
function frame4(){
stop();
}
}
}//package lib_gnomeZombie_fla
Section 99
//ground_smoke_5 (lib_gnomeZombie_fla.ground_smoke_5)
package lib_gnomeZombie_fla {
import flash.display.*;
public dynamic class ground_smoke_5 extends MovieClip {
public function ground_smoke_5(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package lib_gnomeZombie_fla
Section 100
//gz_ani_rise_3 (lib_gnomeZombie_fla.gz_ani_rise_3)
package lib_gnomeZombie_fla {
import flash.display.*;
public dynamic class gz_ani_rise_3 extends MovieClip {
public var shadowClip:MovieClip;
public function gz_ani_rise_3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package lib_gnomeZombie_fla
Section 101
//icebreakanideergn_29 (lib_gnomeZombie_fla.icebreakanideergn_29)
package lib_gnomeZombie_fla {
import flash.display.*;
public dynamic class icebreakanideergn_29 extends MovieClip {
public function icebreakanideergn_29(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package lib_gnomeZombie_fla
Section 102
//aniicedbreakdeergn_27 (lib_iceQueen_fla.aniicedbreakdeergn_27)
package lib_iceQueen_fla {
import flash.display.*;
public dynamic class aniicedbreakdeergn_27 extends MovieClip {
public function aniicedbreakdeergn_27(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package lib_iceQueen_fla
Section 103
//aniiceddeergn_25 (lib_iceQueen_fla.aniiceddeergn_25)
package lib_iceQueen_fla {
import flash.display.*;
public dynamic class aniiceddeergn_25 extends MovieClip {
public function aniiceddeergn_25(){
addFrameScript(3, frame4, 18, frame19);
}
function frame19(){
stop();
}
function frame4(){
stop();
}
}
}//package lib_iceQueen_fla
Section 104
//icebreakanideergn_28 (lib_iceQueen_fla.icebreakanideergn_28)
package lib_iceQueen_fla {
import flash.display.*;
public dynamic class icebreakanideergn_28 extends MovieClip {
public function icebreakanideergn_28(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package lib_iceQueen_fla
Section 105
//anidefeated_50 (lib_lola_fla.anidefeated_50)
package lib_lola_fla {
import flash.display.*;
public dynamic class anidefeated_50 extends MovieClip {
public function anidefeated_50(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package lib_lola_fla
Section 106
//aniloraiced_5 (lib_lola_fla.aniloraiced_5)
package lib_lola_fla {
import flash.display.*;
public dynamic class aniloraiced_5 extends MovieClip {
public function aniloraiced_5(){
addFrameScript(3, frame4, 18, frame19);
}
function frame19(){
stop();
}
function frame4(){
stop();
}
}
}//package lib_lola_fla
Section 107
//aniloraicedbreak_7 (lib_lola_fla.aniloraicedbreak_7)
package lib_lola_fla {
import flash.display.*;
public dynamic class aniloraicedbreak_7 extends MovieClip {
public function aniloraicedbreak_7(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package lib_lola_fla
Section 108
//icebreakani_8 (lib_lola_fla.icebreakani_8)
package lib_lola_fla {
import flash.display.*;
public dynamic class icebreakani_8 extends MovieClip {
public function icebreakani_8(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package lib_lola_fla
Section 109
//ircerayshoot_71 (lib_lola_fla.ircerayshoot_71)
package lib_lola_fla {
import flash.display.*;
public dynamic class ircerayshoot_71 extends MovieClip {
public var fire:MovieClip;
}
}//package lib_lola_fla
Section 110
//lola_frozen_4 (lib_lola_fla.lola_frozen_4)
package lib_lola_fla {
import flash.display.*;
public dynamic class lola_frozen_4 extends MovieClip {
public var mc:MovieClip;
}
}//package lib_lola_fla
Section 111
//MC_BlunderBussFire_85 (lib_lola_fla.MC_BlunderBussFire_85)
package lib_lola_fla {
import flash.display.*;
public dynamic class MC_BlunderBussFire_85 extends MovieClip {
public var fire:MovieClip;
}
}//package lib_lola_fla
Section 112
//MC_FireTrail_15 (lib_lola_fla.MC_FireTrail_15)
package lib_lola_fla {
import flash.display.*;
public dynamic class MC_FireTrail_15 extends MovieClip {
public var hitTestRect:MovieClip;
}
}//package lib_lola_fla
Section 113
//MC_GlaunhcerFire_91 (lib_lola_fla.MC_GlaunhcerFire_91)
package lib_lola_fla {
import flash.display.*;
public dynamic class MC_GlaunhcerFire_91 extends MovieClip {
public var fire:MovieClip;
}
}//package lib_lola_fla
Section 114
//MC_LolaBlunderBussFireWalk_84 (lib_lola_fla.MC_LolaBlunderBussFireWalk_84)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_LolaBlunderBussFireWalk_84 extends MovieClip {
public var gun:MovieClip;
public function MC_LolaBlunderBussFireWalk_84(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
gun.gotoAndPlay(1);
gun.fire.gotoAndPlay(1);
}
}
}//package lib_lola_fla
Section 115
//MC_LolaBlunderBussStand_88 (lib_lola_fla.MC_LolaBlunderBussStand_88)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_LolaBlunderBussStand_88 extends MovieClip {
public var gun:MovieClip;
public function MC_LolaBlunderBussStand_88(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
gun.gotoAndPlay(1);
gun.fire.gotoAndPlay(1);
}
}
}//package lib_lola_fla
Section 116
//MC_LolaCane_44 (lib_lola_fla.MC_LolaCane_44)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_LolaCane_44 extends MovieClip {
public function MC_LolaCane_44(){
addFrameScript(6, frame7);
}
function frame7(){
(parent as MovieClip).isSwing = true;
}
}
}//package lib_lola_fla
Section 117
//MC_LolaFkameThrowerFireWalk_13 (lib_lola_fla.MC_LolaFkameThrowerFireWalk_13)
package lib_lola_fla {
import flash.display.*;
public dynamic class MC_LolaFkameThrowerFireWalk_13 extends MovieClip {
public var weapon:MovieClip;
public function MC_LolaFkameThrowerFireWalk_13(){
addFrameScript(0, frame1);
}
function frame1(){
weapon.stop();
}
}
}//package lib_lola_fla
Section 118
//MC_LolaFlameThrowerFireStatic_11 (lib_lola_fla.MC_LolaFlameThrowerFireStatic_11)
package lib_lola_fla {
import flash.display.*;
public dynamic class MC_LolaFlameThrowerFireStatic_11 extends MovieClip {
public var weapon:MovieClip;
public function MC_LolaFlameThrowerFireStatic_11(){
addFrameScript(0, frame1);
}
function frame1(){
weapon.stop();
}
}
}//package lib_lola_fla
Section 119
//MC_LolaFryingPan_41 (lib_lola_fla.MC_LolaFryingPan_41)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_LolaFryingPan_41 extends MovieClip {
public function MC_LolaFryingPan_41(){
addFrameScript(6, frame7);
}
function frame7(){
(parent as MovieClip).isSwing = true;
}
}
}//package lib_lola_fla
Section 120
//MC_LolaGlauncherFireWalkcopy_90 (lib_lola_fla.MC_LolaGlauncherFireWalkcopy_90)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_LolaGlauncherFireWalkcopy_90 extends MovieClip {
public var gun:MovieClip;
public function MC_LolaGlauncherFireWalkcopy_90(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
this.gun.gotoAndStop(1);
this.gun.fire.gotoAndStop(1);
}
function frame2(){
this.gun.gotoAndPlay(2);
this.gun.fire.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 121
//MC_LolaGlauncherStandcopy_94 (lib_lola_fla.MC_LolaGlauncherStandcopy_94)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_LolaGlauncherStandcopy_94 extends MovieClip {
public var gun:MovieClip;
public function MC_LolaGlauncherStandcopy_94(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
gun.gotoAndStop(1);
gun.fire.gotoAndStop(1);
}
function frame2(){
gun.gotoAndPlay(2);
gun.fire.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 122
//MC_LolaGolfClub_43 (lib_lola_fla.MC_LolaGolfClub_43)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_LolaGolfClub_43 extends MovieClip {
public function MC_LolaGolfClub_43(){
addFrameScript(6, frame7);
}
function frame7(){
(parent as MovieClip).isSwing = true;
}
}
}//package lib_lola_fla
Section 123
//MC_LolaIceRayFireWalk_73 (lib_lola_fla.MC_LolaIceRayFireWalk_73)
package lib_lola_fla {
import flash.display.*;
public dynamic class MC_LolaIceRayFireWalk_73 extends MovieClip {
public var gun:MovieClip;
}
}//package lib_lola_fla
Section 124
//MC_LolaIceRayStand_70 (lib_lola_fla.MC_LolaIceRayStand_70)
package lib_lola_fla {
import flash.display.*;
public dynamic class MC_LolaIceRayStand_70 extends MovieClip {
public var gun:MovieClip;
public function MC_LolaIceRayStand_70(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
gun.gotoAndStop(1);
}
function frame2(){
gun.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 125
//MC_LolaLegWeapon_42 (lib_lola_fla.MC_LolaLegWeapon_42)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_LolaLegWeapon_42 extends MovieClip {
public function MC_LolaLegWeapon_42(){
addFrameScript(6, frame7);
}
function frame7(){
(parent as MovieClip).isSwing = true;
}
}
}//package lib_lola_fla
Section 126
//MC_LolaShotgunFireStand_58 (lib_lola_fla.MC_LolaShotgunFireStand_58)
package lib_lola_fla {
import flash.display.*;
public dynamic class MC_LolaShotgunFireStand_58 extends MovieClip {
public var gun:MovieClip;
public function MC_LolaShotgunFireStand_58(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
gun.gotoAndStop(1);
}
function frame2(){
gun.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 127
//MC_LolaShovel_40 (lib_lola_fla.MC_LolaShovel_40)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_LolaShovel_40 extends MovieClip {
public function MC_LolaShovel_40(){
addFrameScript(6, frame7);
}
function frame7(){
(parent as MovieClip).isSwing = true;
}
}
}//package lib_lola_fla
Section 128
//MC_LolaSword_30 (lib_lola_fla.MC_LolaSword_30)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_LolaSword_30 extends MovieClip {
public function MC_LolaSword_30(){
addFrameScript(6, frame7);
}
function frame7(){
(parent as MovieClip).isSwing = true;
}
}
}//package lib_lola_fla
Section 129
//MC_LolaTireIron_45 (lib_lola_fla.MC_LolaTireIron_45)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_LolaTireIron_45 extends MovieClip {
public function MC_LolaTireIron_45(){
addFrameScript(6, frame7);
}
function frame7(){
(parent as MovieClip).isSwing = true;
}
}
}//package lib_lola_fla
Section 130
//MC_LolaWalkAttackMelee_101 (lib_lola_fla.MC_LolaWalkAttackMelee_101)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_LolaWalkAttackMelee_101 extends MovieClip {
public var body:MovieClip;
public function MC_LolaWalkAttackMelee_101(){
addFrameScript(0, frame1, 1, frame2, 4, frame5);
}
function frame1(){
body.gotoAndStop(1);
}
function frame5(){
(parent as MovieClip).isSwing = true;
}
function frame2(){
body.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 131
//MC_ShotgunBlast_61 (lib_lola_fla.MC_ShotgunBlast_61)
package lib_lola_fla {
import flash.display.*;
public dynamic class MC_ShotgunBlast_61 extends MovieClip {
public function MC_ShotgunBlast_61(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package lib_lola_fla
Section 132
//MC_Swipe_31 (lib_lola_fla.MC_Swipe_31)
package lib_lola_fla {
import flash.display.*;
public dynamic class MC_Swipe_31 extends MovieClip {
public function MC_Swipe_31(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package lib_lola_fla
Section 133
//MC_WalkCane_105 (lib_lola_fla.MC_WalkCane_105)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_WalkCane_105 extends MovieClip {
public var body:MovieClip;
public function MC_WalkCane_105(){
addFrameScript(0, frame1, 1, frame2, 4, frame5);
}
function frame1(){
body.gotoAndStop(1);
}
function frame5(){
(parent as MovieClip).isSwing = true;
}
function frame2(){
body.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 134
//MC_WalkFryingPan_99 (lib_lola_fla.MC_WalkFryingPan_99)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_WalkFryingPan_99 extends MovieClip {
public var body:MovieClip;
public function MC_WalkFryingPan_99(){
addFrameScript(0, frame1, 1, frame2, 4, frame5);
}
function frame1(){
body.gotoAndStop(1);
}
function frame5(){
(parent as MovieClip).isSwing = true;
}
function frame2(){
body.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 135
//MC_WalkGolfClub_103 (lib_lola_fla.MC_WalkGolfClub_103)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_WalkGolfClub_103 extends MovieClip {
public var body:MovieClip;
public function MC_WalkGolfClub_103(){
addFrameScript(0, frame1, 1, frame2, 4, frame5);
}
function frame1(){
body.gotoAndStop(1);
}
function frame5(){
(parent as MovieClip).isSwing = true;
}
function frame2(){
body.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 136
//MC_WalkShovel_107 (lib_lola_fla.MC_WalkShovel_107)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_WalkShovel_107 extends MovieClip {
public var body:MovieClip;
public function MC_WalkShovel_107(){
addFrameScript(0, frame1, 1, frame2, 5, frame6);
}
function frame6(){
(parent as MovieClip).isSwing = true;
}
function frame1(){
body.gotoAndStop(1);
}
function frame2(){
body.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 137
//MC_WalkSword_113 (lib_lola_fla.MC_WalkSword_113)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_WalkSword_113 extends MovieClip {
public var body:MovieClip;
public function MC_WalkSword_113(){
addFrameScript(0, frame1, 1, frame2, 6, frame7);
}
function frame7(){
(parent as MovieClip).isSwing = true;
}
function frame1(){
body.gotoAndStop(1);
}
function frame2(){
body.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 138
//MC_WalkTireIron_109 (lib_lola_fla.MC_WalkTireIron_109)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_WalkTireIron_109 extends MovieClip {
public var body:MovieClip;
public function MC_WalkTireIron_109(){
addFrameScript(0, frame1, 1, frame2, 5, frame6);
}
function frame6(){
(parent as MovieClip).isSwing = true;
}
function frame1(){
body.gotoAndStop(1);
}
function frame2(){
body.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 139
//MC_WalkWhip_35 (lib_lola_fla.MC_WalkWhip_35)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_WalkWhip_35 extends MovieClip {
public var body:MovieClip;
public function MC_WalkWhip_35(){
addFrameScript(0, frame1, 1, frame2, 4, frame5);
}
function frame1(){
body.gotoAndStop(1);
}
function frame5(){
(parent as MovieClip).isSwing = true;
}
function frame2(){
body.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 140
//MC_WalkXmasCane_32 (lib_lola_fla.MC_WalkXmasCane_32)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_WalkXmasCane_32 extends MovieClip {
public var body:MovieClip;
public function MC_WalkXmasCane_32(){
addFrameScript(0, frame1, 1, frame2, 4, frame5);
}
function frame1(){
body.gotoAndStop(1);
}
function frame5(){
(parent as MovieClip).isSwing = true;
}
function frame2(){
body.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 141
//MC_WalkZombieLeg_111 (lib_lola_fla.MC_WalkZombieLeg_111)
package lib_lola_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_WalkZombieLeg_111 extends MovieClip {
public var body:MovieClip;
public function MC_WalkZombieLeg_111(){
addFrameScript(0, frame1, 1, frame2, 6, frame7);
}
function frame7(){
(parent as MovieClip).isSwing = true;
}
function frame1(){
body.gotoAndStop(1);
}
function frame2(){
body.gotoAndPlay(2);
}
}
}//package lib_lola_fla
Section 142
//static_21 (lib_lola_fla.static_21)
package lib_lola_fla {
import flash.display.*;
public dynamic class static_21 extends MovieClip {
public var mc:MovieClip;
}
}//package lib_lola_fla
Section 143
//staticWidthFlameThrowershoot_14 (lib_lola_fla.staticWidthFlameThrowershoot_14)
package lib_lola_fla {
import flash.display.*;
public dynamic class staticWidthFlameThrowershoot_14 extends MovieClip {
public var fire:MovieClip;
public var mc:MovieClip;
}
}//package lib_lola_fla
Section 144
//walk_17 (lib_lola_fla.walk_17)
package lib_lola_fla {
import flash.display.*;
public dynamic class walk_17 extends MovieClip {
public var mc:MovieClip;
}
}//package lib_lola_fla
Section 145
//walkWidthFlameThrowershoot_16 (lib_lola_fla.walkWidthFlameThrowershoot_16)
package lib_lola_fla {
import flash.display.*;
public dynamic class walkWidthFlameThrowershoot_16 extends MovieClip {
public var fire:MovieClip;
public var mc:MovieClip;
}
}//package lib_lola_fla
Section 146
//blood1_17 (lib_purple_decomposedZombie_fla.blood1_17)
package lib_purple_decomposedZombie_fla {
import flash.display.*;
public dynamic class blood1_17 extends MovieClip {
public function blood1_17(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package lib_purple_decomposedZombie_fla
Section 147
//blood2_18 (lib_purple_decomposedZombie_fla.blood2_18)
package lib_purple_decomposedZombie_fla {
import flash.display.*;
public dynamic class blood2_18 extends MovieClip {
public function blood2_18(){
addFrameScript(7, frame8);
}
function frame8(){
stop();
}
}
}//package lib_purple_decomposedZombie_fla
Section 148
//dismember_test2_12 (lib_purple_decomposedZombie_fla.dismember_test2_12)
package lib_purple_decomposedZombie_fla {
import flash.display.*;
public dynamic class dismember_test2_12 extends MovieClip {
public function dismember_test2_12(){
addFrameScript(27, frame28);
}
function frame28(){
stop();
}
}
}//package lib_purple_decomposedZombie_fla
Section 149
//dismemberextremexx_13 (lib_purple_decomposedZombie_fla.dismemberextremexx_13)
package lib_purple_decomposedZombie_fla {
import flash.display.*;
public dynamic class dismemberextremexx_13 extends MovieClip {
public function dismemberextremexx_13(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package lib_purple_decomposedZombie_fla
Section 150
//MC_FireDecompDie_28 (lib_purple_decomposedZombie_fla.MC_FireDecompDie_28)
package lib_purple_decomposedZombie_fla {
import flash.display.*;
public dynamic class MC_FireDecompDie_28 extends MovieClip {
public function MC_FireDecompDie_28(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
stop();
}
}
}//package lib_purple_decomposedZombie_fla
Section 151
//MC_FlamingDecompThrow_25 (lib_purple_decomposedZombie_fla.MC_FlamingDecompThrow_25)
package lib_purple_decomposedZombie_fla {
import flash.display.*;
public dynamic class MC_FlamingDecompThrow_25 extends MovieClip {
public var cHitArea:MovieClip;
}
}//package lib_purple_decomposedZombie_fla
Section 152
//partanimated2_15 (lib_purple_decomposedZombie_fla.partanimated2_15)
package lib_purple_decomposedZombie_fla {
import flash.display.*;
public dynamic class partanimated2_15 extends MovieClip {
public function partanimated2_15(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package lib_purple_decomposedZombie_fla
Section 153
//partanimated3_16 (lib_purple_decomposedZombie_fla.partanimated3_16)
package lib_purple_decomposedZombie_fla {
import flash.display.*;
public dynamic class partanimated3_16 extends MovieClip {
public function partanimated3_16(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package lib_purple_decomposedZombie_fla
Section 154
//partanimated5_14 (lib_purple_decomposedZombie_fla.partanimated5_14)
package lib_purple_decomposedZombie_fla {
import flash.display.*;
public dynamic class partanimated5_14 extends MovieClip {
public function partanimated5_14(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package lib_purple_decomposedZombie_fla
Section 155
//zom2_throw_6 (lib_purple_decomposedZombie_fla.zom2_throw_6)
package lib_purple_decomposedZombie_fla {
import flash.display.*;
public dynamic class zom2_throw_6 extends MovieClip {
public var cHitArea:MovieClip;
}
}//package lib_purple_decomposedZombie_fla
Section 156
//aniicedbreakdeer_30 (lib_reindeer_fla.aniicedbreakdeer_30)
package lib_reindeer_fla {
import flash.display.*;
public dynamic class aniicedbreakdeer_30 extends MovieClip {
public var mc:MovieClip;
public function aniicedbreakdeer_30(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package lib_reindeer_fla
Section 157
//aniiceddeer_28 (lib_reindeer_fla.aniiceddeer_28)
package lib_reindeer_fla {
import flash.display.*;
public dynamic class aniiceddeer_28 extends MovieClip {
public function aniiceddeer_28(){
addFrameScript(3, frame4, 18, frame19);
}
function frame19(){
stop();
}
function frame4(){
stop();
}
}
}//package lib_reindeer_fla
Section 158
//icebreakanideer_31 (lib_reindeer_fla.icebreakanideer_31)
package lib_reindeer_fla {
import flash.display.*;
public dynamic class icebreakanideer_31 extends MovieClip {
public function icebreakanideer_31(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package lib_reindeer_fla
Section 159
//aniicedbreakdeer_28 (lib_reindeer_noLaser_fla.aniicedbreakdeer_28)
package lib_reindeer_noLaser_fla {
import flash.display.*;
public dynamic class aniicedbreakdeer_28 extends MovieClip {
public var mc:MovieClip;
public function aniicedbreakdeer_28(){
addFrameScript(13, frame14);
}
function frame14(){
stop();
}
}
}//package lib_reindeer_noLaser_fla
Section 160
//aniiceddeer_26 (lib_reindeer_noLaser_fla.aniiceddeer_26)
package lib_reindeer_noLaser_fla {
import flash.display.*;
public dynamic class aniiceddeer_26 extends MovieClip {
public function aniiceddeer_26(){
addFrameScript(3, frame4, 18, frame19);
}
function frame19(){
stop();
}
function frame4(){
stop();
}
}
}//package lib_reindeer_noLaser_fla
Section 161
//icebreakanideer_29 (lib_reindeer_noLaser_fla.icebreakanideer_29)
package lib_reindeer_noLaser_fla {
import flash.display.*;
public dynamic class icebreakanideer_29 extends MovieClip {
public function icebreakanideer_29(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package lib_reindeer_noLaser_fla
Section 162
//ani_grenade_28 (lib_thrownWeapon_fla.ani_grenade_28)
package lib_thrownWeapon_fla {
import flash.display.*;
public dynamic class ani_grenade_28 extends MovieClip {
public function ani_grenade_28(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
}
}
}//package lib_thrownWeapon_fla
Section 163
//biggift_explode_39 (lib_thrownWeapon_fla.biggift_explode_39)
package lib_thrownWeapon_fla {
import flash.display.*;
public dynamic class biggift_explode_39 extends MovieClip {
public function biggift_explode_39(){
addFrameScript(119, frame120);
}
function frame120(){
stop();
}
}
}//package lib_thrownWeapon_fla
Section 164
//explode1_40 (lib_thrownWeapon_fla.explode1_40)
package lib_thrownWeapon_fla {
import flash.display.*;
public dynamic class explode1_40 extends MovieClip {
public function explode1_40(){
addFrameScript(18, frame19);
}
function frame19(){
stop();
}
}
}//package lib_thrownWeapon_fla
Section 165
//I3_7 (lib_thrownWeapon_fla.I3_7)
package lib_thrownWeapon_fla {
import flash.display.*;
public dynamic class I3_7 extends MovieClip {
public var I3:MovieClip;
}
}//package lib_thrownWeapon_fla
Section 166
//smoke_21 (lib_thrownWeapon_fla.smoke_21)
package lib_thrownWeapon_fla {
import flash.display.*;
public dynamic class smoke_21 extends MovieClip {
public function smoke_21(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package lib_thrownWeapon_fla
Section 167
//messaging_fetch_11 (lib_trailer_fla.messaging_fetch_11)
package lib_trailer_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class messaging_fetch_11 extends MovieClip {
public var textField:TextField;
public function messaging_fetch_11(){
addFrameScript(1, frame2);
}
function frame2(){
textField.text = (parent.parent as MovieClip).fetchMoreJohns;
}
}
}//package lib_trailer_fla
Section 168
//trailerClip_2 (lib_trailer_fla.trailerClip_2)
package lib_trailer_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class trailerClip_2 extends MovieClip {
public var libtrailer:MovieClip;
public var r:MovieClip;
public var mc:MovieClip;
public function trailerClip_2(){
addFrameScript(45, frame46, 48, frame49, 80, frame81, 93, frame94, 160, frame161, 185, frame186, 186, frame187);
}
function frame81(){
gotoAndStop("static");
}
function frame161(){
libtrailer = (parent as MovieClip);
if (libtrailer.levelComplete == "yes"){
gotoAndPlay((currentFrame - 30));
};
}
function frame94(){
stop();
}
function frame187(){
stop();
}
function frame186(){
stop();
}
function frame46(){
gotoAndStop("static");
}
function frame49(){
r = (parent as MovieClip);
mc.gotoAndStop(((r.fetchMoreJohns == 1)) ? 1 : 2);
}
}
}//package lib_trailer_fla
Section 169
//heartacquire_64 (lib_weapon_fla.heartacquire_64)
package lib_weapon_fla {
import flash.display.*;
public dynamic class heartacquire_64 extends MovieClip {
public var shadowClip:MovieClip;
}
}//package lib_weapon_fla
Section 170
//heartbounce_35 (lib_weapon_fla.heartbounce_35)
package lib_weapon_fla {
import flash.display.*;
public dynamic class heartbounce_35 extends MovieClip {
public var shadowClip:MovieClip;
}
}//package lib_weapon_fla
Section 171
//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 172
//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 173
//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 174
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 175
//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 176
//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 177
//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 178
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.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 179
//button_moregmes_cvr_mc_12 (screens_fla.button_moregmes_cvr_mc_12)
package screens_fla {
import flash.display.*;
public dynamic class button_moregmes_cvr_mc_12 extends MovieClip {
public function button_moregmes_cvr_mc_12(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package screens_fla
Section 180
//highscores_mc_22 (screens_fla.highscores_mc_22)
package screens_fla {
import flash.display.*;
public dynamic class highscores_mc_22 extends MovieClip {
public function highscores_mc_22(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package screens_fla
Section 181
//MC_ButtonSoundWiggleOver_7 (screens_fla.MC_ButtonSoundWiggleOver_7)
package screens_fla {
import flash.display.*;
public dynamic class MC_ButtonSoundWiggleOver_7 extends MovieClip {
public function MC_ButtonSoundWiggleOver_7(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package screens_fla
Section 182
//MC_ControlsEp1_28 (screens_fla.MC_ControlsEp1_28)
package screens_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_ControlsEp1_28 extends MovieClip {
public var buttonMoreGames:SimpleButton;
public var myroot:MovieClip;
public var buttonClose:SimpleButton;
public function MC_ControlsEp1_28(){
addFrameScript(0, frame1);
}
function frame1(){
myroot = (this.parent as MovieClip);
gotoAndStop(myroot.episodeFrame);
}
}
}//package screens_fla
Section 183
//MC_Ep1ButtonWiggleOver_10 (screens_fla.MC_Ep1ButtonWiggleOver_10)
package screens_fla {
import flash.display.*;
public dynamic class MC_Ep1ButtonWiggleOver_10 extends MovieClip {
public function MC_Ep1ButtonWiggleOver_10(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package screens_fla
Section 184
//MC_Ep2ButtonWiggleOver_11 (screens_fla.MC_Ep2ButtonWiggleOver_11)
package screens_fla {
import flash.display.*;
public dynamic class MC_Ep2ButtonWiggleOver_11 extends MovieClip {
public function MC_Ep2ButtonWiggleOver_11(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package screens_fla
Section 185
//MC_OverWiggle_15 (screens_fla.MC_OverWiggle_15)
package screens_fla {
import flash.display.*;
public dynamic class MC_OverWiggle_15 extends MovieClip {
public function MC_OverWiggle_15(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package screens_fla
Section 186
//MC_OverWigglePA_16 (screens_fla.MC_OverWigglePA_16)
package screens_fla {
import flash.display.*;
public dynamic class MC_OverWigglePA_16 extends MovieClip {
public function MC_OverWigglePA_16(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package screens_fla
Section 187
//MC_OverWigglePlay_32 (screens_fla.MC_OverWigglePlay_32)
package screens_fla {
import flash.display.*;
public dynamic class MC_OverWigglePlay_32 extends MovieClip {
public function MC_OverWigglePlay_32(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package screens_fla
Section 188
//MC_ScreenGameOver_14 (screens_fla.MC_ScreenGameOver_14)
package screens_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class MC_ScreenGameOver_14 extends MovieClip {
public var buttonHighscores:SimpleButton;
public var cliproot:MovieClip;
public var buttonMoreGames:SimpleButton;
public var scoreField:TextField;
public var buttonPlayAgain:SimpleButton;
public var mHeartClip:MovieClip;
public var buttonSubmitScore:SimpleButton;
public function MC_ScreenGameOver_14(){
addFrameScript(0, frame1);
}
function frame1(){
cliproot = (this.parent as MovieClip);
scoreField.text = cliproot.scoreText;
}
}
}//package screens_fla
Section 189
//MC_SoundToggleWiggleOver_5 (screens_fla.MC_SoundToggleWiggleOver_5)
package screens_fla {
import flash.display.*;
public dynamic class MC_SoundToggleWiggleOver_5 extends MovieClip {
public function MC_SoundToggleWiggleOver_5(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package screens_fla
Section 190
//MC_StoryEp1_26 (screens_fla.MC_StoryEp1_26)
package screens_fla {
import flash.display.*;
public dynamic class MC_StoryEp1_26 extends MovieClip {
public var mButton:SimpleButton;
}
}//package screens_fla
Section 191
//moregames_mc_30 (screens_fla.moregames_mc_30)
package screens_fla {
import flash.display.*;
public dynamic class moregames_mc_30 extends MovieClip {
public function moregames_mc_30(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package screens_fla
Section 192
//moregames2_mc_21 (screens_fla.moregames2_mc_21)
package screens_fla {
import flash.display.*;
public dynamic class moregames2_mc_21 extends MovieClip {
public function moregames2_mc_21(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package screens_fla
Section 193
//rank_textclip_18 (screens_fla.rank_textclip_18)
package screens_fla {
import flash.display.*;
public dynamic class rank_textclip_18 extends MovieClip {
public function rank_textclip_18(){
addFrameScript(0, frame1, 17, frame18, 46, frame47, 81, frame82, 121, frame122, 166, frame167);
}
function frame167(){
stop();
}
function frame82(){
stop();
}
function frame18(){
stop();
}
function frame1(){
stop();
}
function frame47(){
stop();
}
function frame122(){
stop();
}
}
}//package screens_fla
Section 194
//AbstractAiRole (AbstractAiRole)
package {
import flash.events.*;
import com.liquable.game.postoffice.*;
import com.liquable.utils.*;
import com.liquable.game.geom.*;
public class AbstractAiRole extends AbstractRole {
private var pRange:int;
protected var pAIStateMachine:PostStateClient;
protected var pMoney:int;
protected var pReactionDelayTime:int;
public static const STATUS_AI_STATIC:String = "ai_static";
public static const STATUS_AI_THINK:String = "ai_think";
public function AbstractAiRole(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:Number, _arg6:int, _arg7:int, _arg8:int){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
pReactionDelayTime = _arg7;
pRange = _arg6;
pMoney = _arg8;
}
protected function ai_think_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(ai_think_update);
}
override protected function static_enter(_arg1:String):void{
super.static_enter(_arg1);
setAIState(STATUS_AI_STATIC);
}
override protected function setFrameLabel(_arg1:String):void{
if (isInFlaming()){
_arg1 = (_arg1 + "Flaming");
};
super.setFrameLabel(_arg1);
}
override public function goHit(_arg1:Boolean, _arg2:int, _arg3:String, _arg4:AbstractRole):void{
super.goHit(_arg1, _arg2, _arg3, _arg4);
var _local5:Blood = new Blood(this, ((((_arg3 == PropertyLoader.ITEM_BULLET)) || ((_arg3 == PropertyLoader.ITEM_BUSS_BULLET)))) ? 3 : -1);
}
protected function getRoleInRange():AbstractRole{
var _local4:Number;
var _local5:Number;
var _local6:AbstractAiRole;
var _local7:John;
var _local8:Number;
var _local1:AbstractRole;
var _local2:Number = Number.MAX_VALUE;
var _local3:Lola = Game.instance.getLola();
if (((isInRange(_local3)) && (_local3.isAlive()))){
_local1 = _local3;
_local2 = (getColRange(_local1) + getRowRange(_local1));
};
for each (_local6 in Game.instance.getZombies()) {
if (_local6.isJohn(false)){
_local7 = (_local6 as John);
if ((((((((((_local7.pursuedRole == null)) && (isInRange(_local7)))) && (_local7.isAlive()))) && (!(_local7.isInState(STATUS_HIT))))) && (Game.instance.isInCamera(_local7)))){
_local8 = (getColRange(_local7) + getRowRange(_local7));
if (_local8 < _local2){
_local2 = _local8;
_local1 = _local7;
};
};
};
};
return (_local1);
}
protected function getRandomLoc(_arg1:int):PointInt{
var _local4:int;
var _local5:int;
var _local6:PointInt;
var _local2:PointInt;
var _local3:int;
while (_local3 < 5) {
_local4 = IntUtil.randomBetween(Math.max(0, (currentTileLoc.x - _arg1)), Math.min((Game.instance.mapColumnCounts - 1), (currentTileLoc.x + _arg1)));
_local5 = IntUtil.randomBetween(Math.max(0, (currentTileLoc.y - _arg1)), Math.min((Game.instance.mapRowCounts - 1), (currentTileLoc.y + _arg1)));
_local6 = new PointInt(_local4, _local5);
if (((Game.instance.canWalk(_local6.x, _local6.y)) && (!(_local6.equals(currentTileLoc))))){
_local2 = _local6;
break;
};
_local3++;
};
return (_local2);
}
override public function initialize():void{
pAIStateMachine = new PostStateClient(zhn_xxxmas.application);
pAIStateMachine.initState(STATUS_AI_STATIC, ai_static_enter, null, ai_static_exit);
pAIStateMachine.initState(STATUS_AI_THINK, ai_think_enter, null, ai_think_exit);
setAIState(STATUS_AI_STATIC);
super.initialize();
}
protected function getColRange(_arg1:AbstractRole):int{
var _local2:Number = (Game.instance.mapColumnCounts / 2);
var _local3:int = Math.abs((_arg1.currentTileLoc.x - currentTileLoc.x));
if (_local3 > _local2){
_local3 = (Game.instance.mapColumnCounts - _local3);
};
return (_local3);
}
public function idle():void{
if (!isFrozen()){
pStateMachine.setState(STATUS_STATIC);
};
}
protected function isInRange(_arg1:AbstractRole):Boolean{
if (_arg1.isAlive()){
return ((((getColRange(_arg1) <= getRange())) && ((getRowRange(_arg1) <= getRange()))));
};
return (false);
}
protected function isStateAllowedToThink():Boolean{
return (((((((((!(pStateMachine.isInState(STATUS_HIT))) && (!(pStateMachine.isInState(STATUS_DIE))))) && (!(pStateMachine.isInState(STATUS_ATTACK))))) && (!(pFlamingMachine.isInState(STATUS_ICERAY_FROZEN))))) && (!(Game.instance.isPausing()))));
}
public function isInWalk():Boolean{
return (((pStateMachine.isInState(STATUS_GO_TO_LOC)) || (pStateMachine.isInState(STATUS_PURSUE_ROLE))));
}
protected function getRange():int{
return (pRange);
}
override public function terminate():void{
pAIStateMachine.destroy();
pAIStateMachine = null;
super.terminate();
}
protected function ai_static_update(_arg1:Event):void{
var _local2:int = (pAIStateMachine.data.getInt("timer") + 1);
pAIStateMachine.data.setValue("timer", _local2);
if (_local2 > pAIStateMachine.data.getInt("thinkDelayTime")){
setAIState(STATUS_AI_THINK);
};
}
protected function setAIState(_arg1:String):void{
if (!pAIStateMachine.isInState(_arg1)){
pAIStateMachine.setState(_arg1);
};
}
override protected function hit_enter(_arg1:String):void{
super.hit_enter(_arg1);
setAIState(STATUS_AI_STATIC);
}
protected function ai_think_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(ai_think_update);
}
protected function ai_static_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(ai_static_update);
}
protected function getRowRange(_arg1:AbstractRole):int{
var _local2:Number = (Game.instance.mapRowCounts / 2);
var _local3:int = Math.abs((_arg1.currentTileLoc.y - currentTileLoc.y));
if (_local3 > _local2){
_local3 = (Game.instance.mapRowCounts - _local3);
};
return (_local3);
}
protected function ai_think_update(_arg1:Event):void{
throw (new Error("AbstractAiRole.ai_think_update : invocation error!"));
}
protected function ai_static_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(ai_static_update);
pAIStateMachine.data.setValue("thinkDelayTime", (pReactionDelayTime + IntUtil.random((pReactionDelayTime * 0.5))));
pAIStateMachine.data.setValue("timer", 0);
}
}
}//package
Section 195
//AbstractCombo (AbstractCombo)
package {
import flash.events.*;
import flash.display.*;
public class AbstractCombo extends Sprite {
protected var pMovieClip:MovieClip;
protected var pMessage:String;
protected var pInited:Boolean;
public function AbstractCombo(_arg1:Number, _arg2:Number, _arg3:Class){
pMovieClip = new (_arg3);
addChild(pMovieClip);
this.x = _arg1;
this.y = _arg2;
pInited = false;
zhn_xxxmas.application.addUpdateFunction(update);
}
public function terminate():void{
zhn_xxxmas.application.removeUpdateFunction(update);
if (parent){
parent.removeChild(this);
};
}
public function update(_arg1:Event):void{
if (!pInited){
if (((((pMovieClip.combosText) && (pMovieClip.combosText.combosText))) && (pMovieClip.combosText.combosText.combosText))){
pMovieClip.combosText.combosText.combosText.text = pMessage;
pInited = true;
};
};
if (((pInited) && ((pMovieClip.combosText.currentFrame == pMovieClip.combosText.totalFrames)))){
terminate();
};
}
}
}//package
Section 196
//AbstractEffect (AbstractEffect)
package {
import flash.events.*;
import flash.display.*;
public class AbstractEffect extends Sprite {
protected var pMovieClip:MovieClip;
public function AbstractEffect(_arg1:Number, _arg2:Number, _arg3:Class){
pMovieClip = new (_arg3);
addChild(pMovieClip);
this.x = _arg1;
this.y = _arg2;
zhn_xxxmas.application.addUpdateFunction(update);
}
public function terminate():void{
zhn_xxxmas.application.removeUpdateFunction(update);
pMovieClip = null;
if (parent){
parent.removeChild(this);
};
}
public function update(_arg1:Event):void{
if (pMovieClip.currentFrame == pMovieClip.totalFrames){
terminate();
};
}
}
}//package
Section 197
//AbstractRole (AbstractRole)
package {
import flash.events.*;
import com.liquable.game.events.*;
import flash.display.*;
import com.liquable.game.postoffice.*;
import com.liquable.utils.*;
import com.liquable.game.geom.*;
import flash.geom.*;
import com.liquable.game.astar.*;
import com.liquable.statemachine.*;
public class AbstractRole extends MovableObject {
protected var pFlamingMachine:StateMachine;
private var pLocToGo:PointInt;
private var pPursuedRole:AbstractRole;
private var pHp:int;
private var pFoundPathTarget:PointInt;
protected var pAstar:AStar;
private var pFoundPath:Array;
protected var pFindPathLimit:int;
private var pNextPursuedPosition:Point;
private var pCounts:int;// = 0
protected static const STATUS_GO_TO_LOC:String = "go_to_loc";
public static const STATUS_IN_TRAILER:String = "inTrailer";
protected static const STATUS_ICERAY_FROZEN:String = "icerayFrozen";
protected static const STATUS_HIT:String = "hit";
protected static const STATUS_FLAMING_TRUE:String = "flamingTrue";
protected static const STATUS_PURSUE_ROLE:String = "pursue_role";
protected static const STATUS_FLAMING_NONE:String = "flamingNone";
protected static const STATUS_ATTACK:String = "attack";
protected static const STATUS_DIE:String = "die";
protected static const STATUS_STATIC:String = "static";
public static const STATUS_SERVICED:String = "serviced";
protected static const STATUS_WALK:String = "walk";
public function AbstractRole(_arg1:String, _arg2:int, _arg3:int, _arg4:int, _arg5:Number){
super(_arg1, _arg2, _arg3, _arg5);
pFindPathLimit = 20;
setHp(_arg4);
}
protected function updateFacing(_arg1:Point):void{
pMovieClip.scaleX = ((_arg1.x > 0)) ? DIR_RIGHT : DIR_LEFT;
}
protected function findPath(_arg1:int, _arg2:int):void{
if ((((((pAstar == null)) || (!((pAstar.dstLoc.x == _arg1))))) || (!((pAstar.dstLoc.y == _arg2))))){
if (pAstar){
pAstar.destroy();
};
pAstar = new AStar(Game.instance.getMap(), true);
pAstar.initPathFinding(this, currentTileLoc.x, currentTileLoc.y, _arg1, _arg2);
};
pAstar.findPath(2);
}
public function setHp(_arg1:int):void{
pHp = Math.max(_arg1, 0);
}
public function goHit(_arg1:Boolean, _arg2:int, _arg3:String, _arg4:AbstractRole):void{
if (_arg1){
setOnFire();
};
setState(STATUS_HIT);
setHp((getHp() - _arg2));
}
override public function initialize():void{
super.initialize();
pStateMachine.initState(STATUS_STATIC, static_enter, static_process, static_exit);
pStateMachine.initState(STATUS_GO_TO_LOC, goToLoc_enter, null, goToLoc_exit);
pStateMachine.initState(STATUS_HIT, hit_enter, null, hit_exit);
pStateMachine.initState(STATUS_DIE, die_enter, null, die_exit);
setState(STATUS_STATIC);
pFlamingMachine = new StateMachine();
pFlamingMachine.initState(STATUS_FLAMING_NONE, flamingNone_enter, null, null);
pFlamingMachine.initState(STATUS_FLAMING_TRUE, flamingTrue_enter, null, flamingTrue_exit);
pFlamingMachine.initState(STATUS_ICERAY_FROZEN, icerayFrozen_enter, null, icerayFrozen_exit);
pFlamingMachine.setState(STATUS_FLAMING_NONE);
}
protected function goToLoc_update(_arg1:Event):void{
var _local2:Boolean;
var _local3:Point;
if (currentTileLoc.equals(targetLoc)){
nextPursuedPosition = getNextTargetPosition(targetLoc.x, targetLoc.y);
_local2 = false;
if (nextPursuedPosition){
_local3 = pStateMachine.data.getValue("finalShift");
if (_local3){
nextPursuedPosition = nextPursuedPosition.add(_local3);
};
if ((((Math.abs((nextPursuedPosition.x - position.x)) < 1)) && ((Math.abs((nextPursuedPosition.y - position.y)) < 1)))){
_local2 = true;
pursueTarget(nextPursuedPosition.x, nextPursuedPosition.y);
};
};
if (!_local2){
endOfGotoLoc();
};
} else {
if ((((nextPursuedPosition == null)) || (nextPursuedPosition.equals(position)))){
nextPursuedPosition = getNextTargetPosition(targetLoc.x, targetLoc.y);
};
if (nextPursuedPosition){
pursueTarget(nextPursuedPosition.x, nextPursuedPosition.y);
} else {
endOfGotoLoc();
};
};
}
private function startFrozenBreakAnimation():void{
pMovieClip.mc.gotoAndPlay("frozen_break");
}
public function isRunningTo(_arg1:Number):Boolean{
return (false);
}
private function icerayFrozen_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(icerayFrozen_update);
}
public function get pursuedRole():AbstractRole{
return (pPursuedRole);
}
protected function static_process(_arg1:PostPackage):void{
}
public function goFrozen():void{
if (pFlamingMachine){
if (!pFlamingMachine.isInState(STATUS_ICERAY_FROZEN)){
pFlamingMachine.setState(STATUS_ICERAY_FROZEN);
};
};
}
protected function getNextTargetPosition(_arg1:int, _arg2:int):Point{
var _local4:PointInt;
var _local5:Array;
var _local6:PointInt;
var _local7:PointInt;
if (((((pFoundPathTarget) && ((pFoundPathTarget.x == _arg1)))) && ((pFoundPathTarget.y == _arg2)))){
while (pFoundPath.length) {
_local4 = pFoundPath[0];
_local4 = Game.instance.convertToLegalLoc(_local4.x, _local4.y);
if (_local4.equals(currentTileLoc)){
pFoundPath.shift();
} else {
return (Game.instance.getTileCenterPosition(_local4.x, _local4.y));
};
};
};
findPath(_arg1, _arg2);
var _local3:Point;
if (pAstar.isPathFound()){
_local5 = pAstar.getResultPath();
if (((_local5) && (_local5.length))){
pFoundPath = _local5;
pFoundPathTarget = new PointInt(_arg1, _arg2);
_local6 = Game.instance.convertToLegalLoc(_local5[0].x, _local5[0].y);
_local3 = Game.instance.getTileCenterPosition(_local6.x, _local6.y);
} else {
pAstar = null;
pFoundPath = null;
pFoundPathTarget = null;
};
} else {
if (pAstar.getSearchCounts() < pFindPathLimit){
pFoundPathTarget = new PointInt(currentTileLoc.x, currentTileLoc.y);
pFoundPath = [pFoundPathTarget];
_local7 = Game.instance.convertToLegalLoc(pFoundPathTarget.x, pFoundPathTarget.y);
_local3 = Game.instance.getTileCenterPosition(_local7.x, _local7.y);
} else {
pFoundPath = null;
pFoundPathTarget = null;
};
};
return (_local3);
}
protected function hit_enter(_arg1:String):void{
var _local3:Number;
targetLoc = null;
pursuedRole = null;
nextPursuedPosition = null;
var _local2:Lola = Game.instance.getLola();
if (_local2.knockback > 0){
pStateMachine.data.setValue("slideSpeed", (Game.instance.tileWidth / 2));
pStateMachine.data.setValue("knockbackFrames", _local2.knockback);
_local3 = getFinalSlideXByDirection(_local2.getFaceDirection());
pStateMachine.data.setValue("finalSlidePosition", _local3);
trace(((((_local2.getFaceDirection() + " : ") + x) + ", ") + _local3));
} else {
pStateMachine.data.setValue("knockbackFrames", 0);
};
setFrameLabel(STATUS_HIT);
zhn_xxxmas.application.addUpdateFunction(hit_update);
}
protected function static_update(_arg1:Event):void{
}
private function flamingTrue_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(flamingTrue_update);
pFlamingMachine.data.setValue("timer", 0);
pFlamingMachine.data.setValue("framesPerHit", Game.instance.getWeaponConfigure("fire").framesPerHit);
pFlamingMachine.data.setValue("damage", Game.instance.getWeaponConfigure("fire").damage);
Game.instance.playFlamingSound();
pStateMachine.setState(STATUS_STATIC);
}
public function isInFlaming():Boolean{
return (((pFlamingMachine) && (pFlamingMachine.isInState(STATUS_FLAMING_TRUE))));
}
public function isSanta():Boolean{
return (false);
}
private function checkFrozenAnimationDone():Boolean{
var _local1:MovieClip = pMovieClip.mc;
return ((_local1.currentFrame == _local1.totalFrames));
}
protected function pursueTarget(_arg1:Number, _arg2:Number):void{
var _local3:Point = moveToTarget(_arg1, _arg2, getSpeed());
if (position.x != _arg1){
updateFacing(_local3);
};
}
public function set pursuedRole(_arg1:AbstractRole):void{
pPursuedRole = _arg1;
}
private function icerayFrozen_update(_arg1:GameApplicationUpdateEvent):void{
var _local2:int = pFlamingMachine.data.getInt("frozenTimer");
if (_local2 < 60){
if (Game.instance.isPausing()){
return;
};
} else {
if (_local2 == 60){
startFrozenBreakAnimation();
} else {
if (checkFrozenAnimationDone()){
pFlamingMachine.setState(STATUS_FLAMING_NONE);
};
};
};
pFlamingMachine.data.setValue("frozenTimer", (_local2 + 1));
}
protected function flamingTrue_update(_arg1:Event):void{
var _local4:int;
var _local2:int = pFlamingMachine.data.getInt("timer");
var _local3:int = pFlamingMachine.data.getInt("framesPerHit");
if (_local2 > _local3){
_local4 = pFlamingMachine.data.getInt("damage");
setHp((getHp() - _local4));
if (getHp() <= 0){
setState(STATUS_DIE);
} else {
setState(STATUS_HIT);
pStateMachine.data.setValue("slideSpeed", 0);
pStateMachine.data.setValue("knockbackFrames", 3);
};
_local2 = 0;
};
pFlamingMachine.data.setValue("timer", (_local2 + 1));
}
protected function static_enter(_arg1:String):void{
setFrameLabel(STATUS_STATIC);
zhn_xxxmas.application.addUpdateFunction(static_update);
}
protected function set nextPursuedPosition(_arg1:Point):void{
pNextPursuedPosition = _arg1;
}
protected function hit_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(hit_update);
}
public function isAlive():Boolean{
return ((getHp() > 0));
}
public function isJohn(_arg1:Boolean):Boolean{
return (false);
}
private function static_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(static_update);
}
protected function icerayFrozen_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(icerayFrozen_update);
pFlamingMachine.data.setValue("frozenTimer", 0);
pStateMachine.setState(STATUS_STATIC);
setFrameLabel("frozen");
}
public function setOnFire():void{
}
private function moveToTarget(_arg1:Number, _arg2:Number, _arg3:Number):Point{
var _local4:Point = new Point((_arg1 - position.x), (_arg2 - position.y));
if (_local4.x > (Game.instance.getMap().getMapResource().width / 2)){
_local4.x = (_local4.x - Game.instance.getMap().getMapResource().width);
} else {
if (_local4.x < (-(Game.instance.getMap().getMapResource().width) / 2)){
_local4.x = (_local4.x + Game.instance.getMap().getMapResource().width);
};
};
if (_local4.y > (Game.instance.getMap().getMapResource().height / 2)){
_local4.y = (_local4.y - Game.instance.getMap().getMapResource().height);
} else {
if (_local4.y < (-(Game.instance.getMap().getMapResource().height) / 2)){
_local4.y = (_local4.y + Game.instance.getMap().getMapResource().height);
};
};
if (_local4.length < 1){
setPosition(_arg1, _arg2);
} else {
_arg3 = Math.min(_local4.length, _arg3);
_local4.normalize(_arg3);
setPosition((position.x + _local4.x), (position.y + _local4.y));
};
return (_local4);
}
public function set targetLoc(_arg1:PointInt):void{
pLocToGo = _arg1;
}
private function flamingTrue_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(flamingTrue_update);
}
protected function goToLoc_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(goToLoc_update);
targetLoc = null;
nextPursuedPosition = null;
}
override public function terminate():void{
pFlamingMachine.destroy();
pFlamingMachine = null;
pLocToGo = null;
pPursuedRole = null;
pNextPursuedPosition = null;
super.terminate();
}
private function getFinalSlideXByDirection(_arg1:int):Number{
DesignContract.preCondition((((_arg1 == 1)) || ((_arg1 == -1))));
var _local2:int;
var _local3:int = currentTileLoc.x;
var _local4:int = (zhn_xxxmas.application.gameWidth / Game.instance.tileWidth);
while (_local2 < 5) {
_local3 = (_local3 + _arg1);
if (((!(Game.instance.canWalk(_local3, currentTileLoc.y))) || ((_local2 >= _local4)))){
break;
} else {
_local2++;
};
};
return ((x + ((_local2 * Game.instance.tileWidth) * _arg1)));
}
protected function get nextPursuedPosition():Point{
return (pNextPursuedPosition);
}
protected function goToLoc_enter(_arg1:String):void{
setFrameLabel(STATUS_WALK);
zhn_xxxmas.application.addUpdateFunction(goToLoc_update);
var _local2:Point = new Point(((Math.random() - 0.5) * 20), ((Math.random() - 0.5) * 20));
pStateMachine.data.setValue("finalShift", _local2);
}
private function flamingNone_enter(_arg1:String):void{
Game.instance.stopFlamingSound(true);
}
public function isFrozen():Boolean{
return (((pFlamingMachine) && (pFlamingMachine.isInState(STATUS_ICERAY_FROZEN))));
}
protected function endOfGotoLoc():void{
setState(STATUS_STATIC);
}
public function getFaceDirection():int{
return (pMovieClip.scaleX);
}
public function get targetLoc():PointInt{
return (pLocToGo);
}
protected function die_enter(_arg1:String):void{
pFlamingMachine.setState(STATUS_FLAMING_NONE);
targetLoc = null;
pursuedRole = null;
nextPursuedPosition = null;
setFrameLabel(STATUS_DIE);
zhn_xxxmas.application.addUpdateFunction(die_update);
}
protected function hit_update(_arg1:Event):Boolean{
var _local3:Number;
var _local2:int = pStateMachine.data.getInt("knockbackFrames");
if (_local2 > 0){
_local3 = pStateMachine.data.getNumber("slideSpeed");
moveToTarget(pStateMachine.data.getNumber("finalSlidePosition"), position.y, _local3);
pStateMachine.data.setValue("slideSpeed", (_local3 * 0.6));
pStateMachine.data.setValue("knockbackFrames", (_local2 - 1));
return (false);
};
return (true);
}
protected function die_update(_arg1:Event):void{
var _local2:MovieClip = pMovieClip.shadowClip;
if (((_local2) && (_local2.visible))){
_local2.alpha = (_local2.alpha - 0.15);
if (_local2.alpha <= 0){
_local2.visible = false;
};
};
}
protected function die_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(die_update);
}
public function getHp():int{
return (pHp);
}
}
}//package
Section 198
//AnkleBiterZombie (AnkleBiterZombie)
package {
import flash.events.*;
import flash.display.*;
public class AnkleBiterZombie extends GenericHookerZombie {
public function AnkleBiterZombie(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
pTryKeepDistance = 0;
}
override protected function attack_update(_arg1:Event):void{
var _local2:Number;
var _local3:AbstractRole;
if (pMovieClip){
if (pMovieClip.mc){
if (pMovieClip.mc.currentFrame == pMovieClip.mc.totalFrames){
Game.instance.removeRole(this);
} else {
if (pMovieClip.mc.currentFrame == 7){
if (pMovieClip.shadowClip){
pMovieClip.shadowClip.visible = false;
};
_local2 = (Game.instance.tileWidth * 2);
for each (_local3 in Game.instance.getRoles()) {
if (((_local3.isAlive()) && (isTouched(_local3, _local2, 42)))){
_local3.goHit(false, pDamage, null, this);
};
};
};
};
};
} else {
terminate();
};
}
override protected function attack_enter(_arg1:String):void{
setFrameLabel(STATUS_ATTACK);
zhn_xxxmas.application.addUpdateFunction(attack_update);
setHp(0);
playSound(zombie_explode);
}
override public function goHit(_arg1:Boolean, _arg2:int, _arg3:String, _arg4:AbstractRole):void{
setState(STATUS_ATTACK);
}
override protected function createMovieClip():MovieClip{
return (new lib_ankle_biter_zombie());
}
}
}//package
Section 199
//BlackMask (BlackMask)
package {
import flash.events.*;
import flash.display.*;
public class BlackMask extends Shape {
private var pDuration:int;
private var pStartAlpha:Number;
private var pTimer:int;
private var pEndAlpha:Number;
private var pCallback:Function;
public static var INSTANCE:BlackMask = new (BlackMask);
;
public function BlackMask(){
graphics.beginFill(0, 1);
graphics.drawRect(0, 0, zhn_xxxmas.application.gameWidth, zhn_xxxmas.application.gameHeight);
graphics.endFill();
}
public function start(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Function):void{
zhn_xxxmas.application.addUpdateFunction(update);
alpha = _arg1;
pTimer = 0;
pDuration = _arg3;
pStartAlpha = alpha;
pEndAlpha = _arg2;
pCallback = _arg4;
attachOnParent();
}
public function stop(_arg1:Number):void{
zhn_xxxmas.application.removeUpdateFunction(update);
if (_arg1 > 0){
attachOnParent();
alpha = _arg1;
} else {
if (parent){
parent.removeChild(this);
};
};
if (pCallback != null){
pCallback();
pCallback = null;
};
}
private function attachOnParent():void{
if (parent == null){
zhn_xxxmas.instance.addChild(this);
};
}
private function update(_arg1:Event):void{
var _local2:Number;
pTimer++;
if (pTimer < pDuration){
_local2 = (pTimer / pDuration);
alpha = (pStartAlpha + ((pEndAlpha - pStartAlpha) * _local2));
} else {
stop(pEndAlpha);
};
}
}
}//package
Section 200
//Blood (Blood)
package {
import flash.events.*;
import flash.display.*;
import com.liquable.utils.*;
public class Blood extends Sprite {
private var pMovieClip:MovieClip;
private var pTimer:int;
public function Blood(_arg1:AbstractRole, _arg2:int=-1){
if (_arg2 == -1){
_arg2 = IntUtil.random(2);
};
switch (_arg2){
case 1:
pMovieClip = new lib_blood_1();
break;
case 2:
pMovieClip = new lib_blood_2();
break;
case 3:
pMovieClip = new lib_blood_3();
break;
default:
pMovieClip = new lib_blood_0();
break;
};
addChild(pMovieClip);
pMovieClip.y = -30;
pMovieClip.scaleX = _arg1.getFaceDirection();
_arg1.addChild(pMovieClip);
zhn_xxxmas.application.addUpdateFunction(update);
pTimer = 0;
}
private function update(_arg1:Event):void{
if (++pTimer > 10){
destroy();
};
}
public function destroy():void{
zhn_xxxmas.application.removeUpdateFunction(update);
pMovieClip = null;
if (parent){
parent.removeChild(this);
};
while (numChildren) {
removeChildAt(0);
};
}
}
}//package
Section 201
//blood2 (blood2)
package {
import flash.media.*;
public dynamic class blood2 extends Sound {
}
}//package
Section 202
//blood3 (blood3)
package {
import flash.media.*;
public dynamic class blood3 extends Sound {
}
}//package
Section 203
//Brain (Brain)
package {
import com.liquable.visualstack.*;
import com.liquable.utils.*;
public final class Brain extends VisualSprite {
private static var sInstance:Brain;
override public function onPush():void{
super.onPush();
cover_screen();
}
private function cover_screen():void{
getStack().push(new ScreenCover());
}
override public function onReveal(_arg1:MapData):void{
switch (_arg1.getInt("msg")){
case Message.TYPE_SCREEN_COVER:
cover_screen();
break;
case Message.TYPE_SCREEN_GAME:
getStack().push(new Game(_arg1.getString("level"), _arg1.getInt("nights")));
break;
};
}
public static function get instance():Brain{
if (sInstance == null){
sInstance = new (Brain);
};
return (sInstance);
}
}
}//package
Section 204
//BreakableObject (BreakableObject)
package {
import flash.events.*;
import flash.display.*;
import com.liquable.game.geom.*;
import flash.geom.*;
public class BreakableObject extends MapObject {
private var pContents:String;
private var pIsBroken:Boolean;
private var pOccupiedTiles:Array;
private static var sObjectClips:Object;
private static var sDecorationTypes:Array = ["mc_icesparkle"];
public function BreakableObject(_arg1:String, _arg2:int, _arg3:int, _arg4:String){
super(_arg1, _arg2, _arg3);
pContents = _arg4;
if (sObjectClips == null){
sObjectClips = new Object();
sObjectClips["mc_forest_propanetank"] = mc_forest_propanetank;
sObjectClips["mc_forest_grave1"] = mc_forest_grave1;
sObjectClips["mc_forest_rock1"] = mc_forest_rock1;
sObjectClips["mc_forest_rock2"] = mc_forest_rock2;
sObjectClips["mc_forest_stump1"] = mc_forest_stump1;
sObjectClips["mc_forest_tree1"] = mc_forest_tree1;
sObjectClips["mc_forest_tree2"] = mc_forest_tree2;
sObjectClips["mc_gy_coffin"] = mc_gy_coffin;
sObjectClips["mc_gy_coffin2"] = mc_gy_coffin2;
sObjectClips["mc_gy_grave1"] = mc_gy_grave1;
sObjectClips["mc_gy_grave2"] = mc_gy_grave2;
sObjectClips["mc_gy_grave3"] = mc_gy_grave3;
sObjectClips["mc_gy_grave4"] = mc_gy_grave4;
sObjectClips["mc_gy_grave5"] = mc_gy_grave5;
sObjectClips["mc_gy_grave6"] = mc_gy_grave6;
sObjectClips["mc_gy_grave7"] = mc_gy_grave7;
sObjectClips["mc_gy_grave8"] = mc_gy_grave8;
sObjectClips["mc_gy_grave9"] = mc_gy_grave9;
sObjectClips["mc_gy_pillar1"] = mc_gy_pillar1;
sObjectClips["mc_gy_pillar2"] = mc_gy_pillar2;
sObjectClips["mc_gy_pillar3"] = mc_gy_pillar3;
sObjectClips["mc_gy_rock1"] = mc_gy_rock1;
sObjectClips["mc_gy_rock2"] = mc_gy_rock2;
sObjectClips["mc_gy_stump1"] = mc_gy_stump1;
sObjectClips["mc_gy_stump2"] = mc_gy_stump2;
sObjectClips["mc_gy_tree1"] = mc_gy_tree1;
sObjectClips["mc_snowman0"] = mc_snowman0;
sObjectClips["mc_snowman1"] = mc_snowman1;
sObjectClips["mc_snowman2"] = mc_snowman2;
sObjectClips["mc_snowman3"] = mc_snowman3;
sObjectClips["mc_snowman4"] = mc_snowman4;
sObjectClips["mc_snowman5"] = mc_snowman5;
sObjectClips["mc_snowman6"] = mc_snowman6;
sObjectClips["mc_snowman7"] = mc_snowman7;
sObjectClips["mc_snowman8"] = mc_snowman8;
sObjectClips["mc_snowman9"] = mc_snowman9;
sObjectClips["mc_icesparkle"] = lib_ice_sparkle;
sObjectClips["mc_statue1"] = mc_statue1;
sObjectClips["mc_statue2"] = mc_statue2;
sObjectClips["mc_pole1"] = mc_pole1;
sObjectClips["mc_pole2"] = mc_pole2;
sObjectClips["mc_pole3"] = mc_pole3;
sObjectClips["mc_candycane1"] = mc_candycane1;
sObjectClips["mc_candycane2"] = mc_candycane2;
sObjectClips["mc_candycane3"] = mc_candycane3;
sObjectClips["mc_candycane4"] = mc_candycane4;
};
}
override public function terminate():void{
zhn_xxxmas.application.removeUpdateFunction(checkGenerateItemTiming);
pOccupiedTiles = null;
pMovieClip = null;
while (numChildren) {
removeChildAt(0);
};
if (parent){
parent.removeChild(this);
};
super.terminate();
}
override protected function createMovieClip():MovieClip{
return (new (sObjectClips[type]));
}
public function setBroken():void{
var _local4:PointInt;
var _local5:Weapon;
pIsBroken = true;
if (parent){
parent.setChildIndex(this, (parent.numChildren - 1));
};
var _local1:Boolean;
var _local2:Boolean;
if (type.indexOf("candycane") != -1){
_local5 = Game.instance.getLola().currentWeapon;
if (((_local5) && ((_local5.type == PropertyLoader.ITEM_LIGHTWHIP)))){
_local1 = true;
} else {
_local2 = false;
};
};
if (_local1){
pMovieClip.gotoAndPlay("pullout");
} else {
pMovieClip.gotoAndPlay("explode");
};
var _local3:Array = Game.instance.getCanWalkLocsArray();
for each (_local4 in pOccupiedTiles) {
_local3.push(_local4);
Game.instance.getMap().setCanWalk(_local4.x, _local4.y, true);
};
if (((!((pContents == PropertyLoader.ITEM_NONE))) && (_local2))){
zhn_xxxmas.application.addUpdateFunction(checkGenerateItemTiming);
};
if (type == "mc_forest_propanetank"){
playSound(zombie_explode);
zhn_xxxmas.application.addDelayFunction(damageRoles, Game.instance, 5);
} else {
if (type.indexOf("snowman") != -1){
playSound(snowman_break);
} else {
if (type.indexOf("candycane") != -1){
if (_local1){
playSound(lola_throw_heavy);
} else {
playSound(snd_breakCandycane);
};
} else {
playSound(object_break);
};
};
};
}
private function generateItem():void{
var _local1:PointInt;
var _local2:Weapon;
if (pOccupiedTiles){
_local1 = ((pOccupiedTiles.length > 1)) ? pOccupiedTiles[1] : pOccupiedTiles[0];
if (_local1){
trace(("tset000 : " + pContents));
_local2 = new Weapon(pContents, _local1.x, _local1.y);
Game.instance.addWeapon(_local2);
};
};
}
private function checkGenerateItemTiming(_arg1:Event):void{
if ((((pMovieClip.currentFrame == pMovieClip.totalFrames)) || ((pMovieClip.currentLabel == "exploded")))){
generateItem();
zhn_xxxmas.application.removeUpdateFunction(checkGenerateItemTiming);
};
}
override public function initialize():void{
var _local1:Point;
var _local2:int;
var _local3:int;
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:PointInt;
var _local8:int;
var _local9:PointInt;
super.initialize();
pIsBroken = false;
pOccupiedTiles = new Array();
if (isDecoration()){
pMovieClip.play();
pIsBroken = true;
} else {
_local1 = Game.instance.getTilePosition(currentTileLoc.x, currentTileLoc.y);
_local2 = Math.round((pMovieClip.width / Game.instance.tileWidth));
_local3 = Math.round((pMovieClip.height / Game.instance.tileHeight));
_local4 = Game.instance.getCanWalkLocsArray();
_local5 = 0;
while (_local5 < _local2) {
_local6 = 0;
while (_local6 < _local3) {
_local7 = new PointInt((currentTileLoc.x + _local5), (currentTileLoc.y + _local6));
if (!Game.instance.canWalk(_local7.x, _local7.y)){
Game.instance.getMap().setCanWalk(_local7.x, _local7.y, true);
};
if (Game.instance.canWalk(_local7.x, _local7.y)){
pOccupiedTiles.push(_local7);
_local8 = 0;
while (_local8 < _local4.length) {
_local9 = _local4[_local8];
if (_local9.equals(_local7)){
_local4.splice(_local8, 1);
break;
};
_local8++;
};
Game.instance.getMap().setCanWalk(_local7.x, _local7.y, false);
};
_local6++;
};
_local5++;
};
pMovieClip.x = ((pMovieClip.width / 2) - (Game.instance.tileWidth / 2));
pMovieClip.y = (pMovieClip.height - (Game.instance.tileHeight / 2));
};
}
private function damageRoles(_arg1:Game):void{
var _local2:AbstractRole;
if (_arg1 == Game.instance){
for each (_local2 in _arg1.getRoles()) {
if (((((_local2.isAlive()) && ((Math.abs((currentTileLoc.x - _local2.currentTileLoc.x)) < 2)))) && ((Math.abs((currentTileLoc.y - _local2.currentTileLoc.y)) < 2)))){
_local2.goHit(true, 5, type, null);
};
};
};
}
public function isDecoration():Boolean{
return (!((sDecorationTypes.indexOf(type) == -1)));
}
public function isBroken():Boolean{
return (pIsBroken);
}
}
}//package
Section 205
//cash_pickup (cash_pickup)
package {
import flash.media.*;
public dynamic class cash_pickup extends Sound {
}
}//package
Section 206
//CheatController (CheatController)
package {
import flash.events.*;
import flash.display.*;
public class CheatController {
private var pCheatCodes:Array;
private var pTypeCodes:Array;
private var pStage:Stage;
private var pLolaWeaponTypes:Array;
private var pActive:Boolean;
public function CheatController(_arg1:Stage){
pStage = _arg1;
pLolaWeaponTypes = new Array();
pLolaWeaponTypes.push(PropertyLoader.ITEM_RIFLE);
pLolaWeaponTypes.push(PropertyLoader.ITEM_BUSS);
pLolaWeaponTypes.push(PropertyLoader.ITEM_GIFTBOMB);
pLolaWeaponTypes.push(PropertyLoader.ITEM_BIGGIFTBOMB);
pLolaWeaponTypes.push(PropertyLoader.ITEM_LIGHTWHIP);
pLolaWeaponTypes.push(PropertyLoader.ITEM_LASER_BEAM);
pLolaWeaponTypes.push(PropertyLoader.ITEM_BONE);
pLolaWeaponTypes.push(PropertyLoader.ITEM_CHAINSAW);
pLolaWeaponTypes.push(PropertyLoader.ITEM_FLAME_THROWER);
pLolaWeaponTypes.push(PropertyLoader.ITEM_UZI);
pLolaWeaponTypes.push(PropertyLoader.ITEM_SHOOTGUN);
pLolaWeaponTypes.push(PropertyLoader.ITEM_CANE);
pLolaWeaponTypes.push(PropertyLoader.ITEM_SHOVEL);
pLolaWeaponTypes.push(PropertyLoader.ITEM_ZOMBIE_LEG);
pLolaWeaponTypes.push(PropertyLoader.ITEM_SWORD);
pLolaWeaponTypes.push(PropertyLoader.ITEM_GOLF_CLUB);
pLolaWeaponTypes.push(PropertyLoader.ITEM_PAN);
pLolaWeaponTypes.push(PropertyLoader.ITEM_TIRE_IRON);
pLolaWeaponTypes.push(PropertyLoader.ITEM_STILLETTO);
pLolaWeaponTypes.push(PropertyLoader.ITEM_SKULL);
pLolaWeaponTypes.push(PropertyLoader.ITEM_HORNED_SKULL);
pLolaWeaponTypes.push(PropertyLoader.ITEM_MOLOTOV);
pLolaWeaponTypes.push(PropertyLoader.ITEM_FLAMING_SKULL);
pCheatCodes = generateCheatCodes();
}
private function equipGift():void{
var _local1:Lola = Game.instance.getLola();
_local1.cheatEquipWeapon(PropertyLoader.ITEM_BIGGIFTBOMB);
Game.instance.dashboard.showGiftMessage();
}
private function equipNextWeapon():void{
var _local1:Lola = Game.instance.getLola();
var _local2:int = (_local1.currentWeapon) ? pLolaWeaponTypes.indexOf(_local1.currentWeapon.type) : -1;
var _local3:int = ((_local2 == -1)) ? 0 : ((_local2 + 1) % pLolaWeaponTypes.length);
_local1.cheatEquipWeapon(pLolaWeaponTypes[_local3]);
}
public function start():void{
pStage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
pActive = false;
}
private function generateCheatCodes():Array{
var _local1:Array = new Array();
var _local2:String = GameConfig.instance.cheatCode.toUpperCase();
var _local3:int;
while (_local3 < _local2.length) {
_local1.push(_local2.charCodeAt(_local3));
_local3++;
};
return (_local1);
}
public function stop():void{
pStage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp);
pActive = false;
}
private function checkCheatKeys(_arg1:uint):void{
switch (_arg1){
case 97:
case 49:
Game.instance.getLola().invincible = ((Game.instance.getLola().invincible == 0)) ? -1 : 0;
break;
case 98:
case 50:
Game.instance.levelComplete();
break;
case 99:
case 51:
equipNextWeapon();
break;
};
}
private function onKeyUp(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case 56:
case 106:
if (GameConfig.instance.cheats){
pActive = true;
};
break;
default:
if (pActive){
checkCheatKeys(_arg1.keyCode);
pActive = false;
};
checkCheatCode(_arg1.keyCode);
break;
};
}
private function checkCheatCode(_arg1:uint):void{
if (pCheatCodes.length){
if (pCheatCodes[0] == _arg1){
pCheatCodes.shift();
if (pCheatCodes.length == 0){
pCheatCodes = generateCheatCodes();
equipGift();
};
} else {
pCheatCodes = generateCheatCodes();
};
};
}
}
}//package
Section 207
//ComboSmall (ComboSmall)
package {
public class ComboSmall extends AbstractCombo {
public function ComboSmall(_arg1:Number, _arg2:Number, _arg3:String){
super(_arg1, _arg2, lib_comboTextSmall);
pMessage = _arg3;
}
}
}//package
Section 208
//Configure (Configure)
package {
import com.liquable.utils.*;
public class Configure {
private var pProperties:Object;
public function Configure(_arg1:Object){
pProperties = _arg1;
}
public function get money():int{
return (parseInt(pProperties.money));
}
public function get screenShake():Boolean{
return ((pProperties.screenShake == "true"));
}
public function get comboTime():Number{
return (parseFloat(pProperties.comboTime));
}
public function getZombieHp(_arg1:String):int{
var _local2 = (_arg1 + "Hp");
DesignContract.preCondition(pProperties.hasOwnProperty(_local2), ((("the property xml doesnt describe the HP for " + _arg1) + " at rank ") + Game.instance.getRankScoreManager().getRank()));
return (parseInt(pProperties[_local2]));
}
public function get deleteDelayTime():int{
return (parseInt(pProperties.deleteDelayTime));
}
public function get speed():Number{
return (parseFloat(pProperties.speed));
}
public function get hp():int{
return (parseInt(pProperties.hp));
}
public function get hitMultiple():Boolean{
return ((pProperties.hitMultiple == "true"));
}
public function get levelXml():String{
return (pProperties.levelXml);
}
public function get pickWeaponFactor():int{
return (parseInt(pProperties.pickWeaponFactor));
}
public function get killFactor():int{
return (parseInt(pProperties.killFactor));
}
public function get combo():int{
return (parseInt(pProperties.combo));
}
public function get count():int{
return (parseInt(pProperties.count));
}
public function get nextLevel():String{
return (pProperties.nextLevel);
}
public function get score():int{
return (parseInt(pProperties.score));
}
public function get low():int{
return (parseInt(pProperties.low));
}
public function get punchDamage():int{
return (parseInt(pProperties.punchDamage));
}
public function get amount():int{
return (parseInt(pProperties.amount));
}
public function get respawnInterval():int{
if (pProperties.respawnInterval){
return (parseInt(pProperties.respawnInterval));
};
return (3);
}
public function get framesPerHit():int{
return (parseInt(pProperties.framesPerHit));
}
public function get tricks():int{
return (parseInt(pProperties.tricks));
}
public function get heal():int{
return (parseInt(pProperties.heal));
}
public function get totalZombies():int{
return (parseInt(pProperties.totalZombies));
}
public function get threshold():int{
return (parseInt(pProperties.threshold));
}
public function get punchKnockback():int{
return (parseInt(pProperties.punchKnockback));
}
public function get damage():int{
return (parseInt(pProperties.damage));
}
public function get flaming():Boolean{
return ((pProperties.flaming == "true"));
}
public function getZombieWeight(_arg1:String):int{
var _local2 = (_arg1 + "Weight");
if (pProperties.hasOwnProperty(_local2)){
return (parseInt(pProperties[_local2]));
};
return (0);
}
public function get distance():Number{
return (parseFloat(pProperties.distance));
}
public function get moneyFactor():int{
return (parseInt(pProperties.moneyFactor));
}
public function get hitDistance():int{
return (parseInt(pProperties.hitDistance));
}
public function get johnFactor():int{
return (parseInt(pProperties.johnFactor));
}
public function get knockback():int{
return (parseInt(pProperties.knockback));
}
public function get timeFactor():int{
return (parseInt(pProperties.timeFactor));
}
public function get range():int{
return (parseInt(pProperties.range));
}
}
}//package
Section 209
//Dashboard (Dashboard)
package {
import flash.events.*;
import com.liquable.media.*;
import com.liquable.game.events.*;
import flash.display.*;
import com.liquable.utils.*;
import com.liquable.game.geom.*;
import flash.geom.*;
import flash.filters.*;
public class Dashboard extends Sprite {
private var pCurrentHidePercent:Number;
private var pGoalTricks:int;
private var pHiding:Boolean;
private var pMovieClip:MovieClip;
private var pBottomClip:MovieClip;
private var pMoney:int;
private var pTrickColorTimer:Number;
private var pBottomButtons:Object;
private var pCurrentTricks:int;
private var pHpbarPercent:Number;
private var pTrickColor:ColorAdapter;
private var pNights:int;
private var pHudHeight:Number;// = 90
private var pShowStartMessage:Boolean;
private var pMessageClip:MovieClip;
public function Dashboard(_arg1:int, _arg2:int){
pMoney = 0;
pHpbarPercent = 1;
pMovieClip = new MC_HUDBaseWithStuff();
addChild(pMovieClip);
pBottomClip = new GR_HUDButtonsTogether();
pBottomClip.initButtons = onInitBottomClipButtons;
addChild(pBottomClip);
pMessageClip = new lib_hud_messages();
pMessageClip.nights = _arg1;
addChild(pMessageClip);
pMessageClip.y = 250;
pMessageClip.x = (728 / 2);
updateMoney(0);
pCurrentHidePercent = 0;
pShowStartMessage = true;
pNights = _arg1;
pGoalTricks = _arg2;
pCurrentTricks = 0;
addEventListener(Event.ENTER_FRAME, initUpdate);
addEventListener(Event.ENTER_FRAME, hpbarUpdate);
}
public function showEndMessage():void{
pMessageClip.gotoAndPlay("end");
}
private function removeRedColorFilter():void{
var _local1:Array;
if (pMovieClip.itemText.filters.length > 1){
_local1 = pMovieClip.itemText.filters;
_local1.pop();
pMovieClip.itemText.filters = _local1;
};
}
public function getMoney():int{
return (pMoney);
}
private function onInitBottomClipButtons():void{
pBottomClip.buttonHelp.addEventListener(MouseEvent.CLICK, onButtonHelp, false, 0, true);
pBottomClip.buttonSoundOn.addEventListener(MouseEvent.CLICK, onButtonSound, false, 0, true);
pBottomClip.buttonSoundOff.addEventListener(MouseEvent.CLICK, onButtonSound, false, 0, true);
pBottomClip.buttonHelp.addEventListener(MouseEvent.ROLL_OVER, zhn_xxxmas.mouse_over, false, 0, true);
pBottomClip.buttonSoundOn.addEventListener(MouseEvent.ROLL_OVER, zhn_xxxmas.mouse_over, false, 0, true);
pBottomClip.buttonSoundOff.addEventListener(MouseEvent.ROLL_OVER, zhn_xxxmas.mouse_over, false, 0, true);
pBottomButtons = new Object();
pBottomButtons["buttonHelp"] = pBottomClip.buttonHelp;
pBottomButtons["buttonSoundOn"] = pBottomClip.buttonSoundOn;
pBottomButtons["buttonSoundOff"] = pBottomClip.buttonSoundOff;
updateMuteButtonState();
}
private function updateMuteButtonState():void{
var _local1:SoundManager = zhn_xxxmas.application.getSoundManager();
var _local2:Number = _local1.getGlobalVolume();
pBottomButtons.buttonSoundOn.visible = (_local2 == 1);
pBottomButtons.buttonSoundOff.visible = (_local2 == 0);
}
public function updateHpBar(_arg1:Number):void{
pHpbarPercent = _arg1;
}
private function onButtonSound(_arg1:MouseEvent):void{
zhn_xxxmas.mouse_down();
var _local2:SoundManager = zhn_xxxmas.application.getSoundManager();
var _local3:Number = ((_local2.getGlobalVolume() == 0)) ? 1 : 0;
_local2.setGlobalVolume(_local3);
updateMuteButtonState();
}
private function getRedFilters():ColorMatrixFilter{
var _local1:Array = new Array();
_local1 = _local1.concat([1, 0, 0, 0, 0]);
_local1 = _local1.concat([0, 0, 0, 0, 0]);
_local1 = _local1.concat([0, 0, 0, 0, 0]);
_local1 = _local1.concat([0, 0, 0, 1, 0]);
var _local2:ColorMatrixFilter = new ColorMatrixFilter(_local1);
return (_local2);
}
private function updateTricks():void{
pMovieClip.tricksText.text = (((pCurrentTricks + "/") + pGoalTricks) + " tricks");
if (pCurrentTricks >= pGoalTricks){
zhn_xxxmas.application.addUpdateFunction(updateTricksAnimation);
};
}
public function set currentTricks(_arg1:int):void{
pCurrentTricks = _arg1;
updateTricks();
}
private function hpbarUpdate(_arg1:Event):void{
var _local2:MovieClip = pMovieClip.hpBar;
var _local3:MovieClip = _local2.bar;
if (_local3.scaleX != pHpbarPercent){
_local3.scaleX = MathUtil.numberFollowTarget(_local3.scaleX, pHpbarPercent, 0.1, 0.015);
if (_local2.filters.length == 0){
_local2.filters = [new ColorMatrixFilter(new ColorAdapter(0xFFFFFF).toMatrixForFilter(0.18))];
};
} else {
if (_local2.filters.length > 0){
_local2.filters = null;
};
};
}
private function displayUpdate(_arg1:Event):void{
var _local2:Number = 0.1;
if (pHiding){
pCurrentHidePercent = (pCurrentHidePercent + _local2);
if (pCurrentHidePercent > 1){
pCurrentHidePercent = 1;
zhn_xxxmas.application.removeUpdateFunction(displayUpdate);
};
} else {
if (pBottomButtons){
pCurrentHidePercent = (pCurrentHidePercent - _local2);
if (pCurrentHidePercent < 0){
pCurrentHidePercent = 0;
zhn_xxxmas.application.removeUpdateFunction(displayUpdate);
if (pShowStartMessage){
pMessageClip.gotoAndPlay("start");
pShowStartMessage = false;
};
};
};
};
setVisiblePercent(pCurrentHidePercent);
}
public function hide(_arg1:Boolean=false):void{
var _local2:SimpleButton;
var _local3:Point;
if (_arg1){
visible = false;
} else {
for each (_local2 in pBottomButtons) {
if (_local2.parent == pBottomClip){
_local3 = _local2.localToGlobal(new Point());
_local2.x = _local3.x;
_local2.y = _local3.y;
_local2.parent.removeChild(_local2);
zhn_xxxmas.instance.addChild(_local2);
} else {
if (_local2.parent){
_local2.parent.setChildIndex(_local2, (_local2.parent.numChildren - 1));
};
};
};
};
pHiding = true;
zhn_xxxmas.application.addUpdateFunction(displayUpdate);
}
public function showMoneyMessage(_arg1:int, _arg2:int):void{
pMessageClip.tricks = _arg1;
pMessageClip.money = ("$" + IntUtil.formatAddComma(_arg2));
pMessageClip.gotoAndPlay("money");
}
public function getHelpButton():SimpleButton{
if (pBottomButtons){
return (pBottomButtons.buttonHelp);
};
return (pBottomClip.buttonHelp);
}
private function onButtonHelp(_arg1:MouseEvent):void{
zhn_xxxmas.mouse_down();
if (Game.instance.isPausing()){
Game.instance.hideHelp();
} else {
Game.instance.showHelp(true);
hide();
};
}
public function get currentTricks():int{
return (pCurrentTricks);
}
private function updateTricksAnimation(_arg1:GameApplicationUpdateEvent):void{
if (pTrickColor == null){
pTrickColorTimer = (Math.PI * 1.5);
pTrickColor = new ColorAdapter(0xFFFFFF);
pMovieClip.mcFullMsg.play();
} else {
pTrickColorTimer = (pTrickColorTimer + 0.5);
};
var _local2:Number = ((Math.sin(pTrickColorTimer) + 1) / 2);
var _local3:ColorMatrixFilter = new ColorMatrixFilter(pTrickColor.toMatrixForFilter(_local2));
pMovieClip.tricksText.filters = [_local3];
pMovieClip.nightsText.filters = [_local3];
}
public function terminate():void{
var _local1:SimpleButton;
removeEventListener(Event.ENTER_FRAME, hpbarUpdate);
removeEventListener(Event.ENTER_FRAME, initUpdate);
zhn_xxxmas.application.removeUpdateFunction(updateTricksAnimation);
if (pBottomButtons){
for each (_local1 in pBottomButtons) {
if (_local1.parent){
_local1.parent.removeChild(_local1);
};
};
pBottomButtons = null;
};
if (parent){
parent.removeChild(this);
};
pMovieClip = null;
pTrickColor = null;
while (numChildren) {
removeChildAt(0);
};
}
public function get goalTricks():int{
return (pGoalTricks);
}
private function setVisiblePercent(_arg1:Number):void{
pMovieClip.y = (-(pHudHeight) * _arg1);
pBottomClip.y = (440 + (pHudHeight * _arg1));
}
public function updateMoney(_arg1:int):void{
pMoney = (pMoney + _arg1);
pMovieClip.moneyText.text = IntUtil.formatAddComma(pMoney);
Game.instance.getRankScoreManager().addMoneyScore(_arg1);
}
public function attachHelpButton():void{
var _local1:SimpleButton;
var _local2:Point;
if (pBottomButtons){
_local1 = pBottomButtons.buttonHelp;
if (_local1){
delete pBottomButtons.buttonHelp;
_local2 = pBottomClip.globalToLocal(new Point(_local1.x, _local1.y));
if (_local1.parent){
_local1.parent.removeChild(_local1);
};
pBottomClip.addChild(_local1);
_local1.x = (_local2.x + pBottomClip.x);
_local1.y = (_local2.y + pBottomClip.y);
};
};
}
private function initUpdate(_arg1:Event):void{
var _local2:Lola;
var _local3:Weapon;
if (((pMovieClip.nightsText) && (pMovieClip.tricksText))){
_local2 = Game.instance.getLola();
_local3 = _local2.currentWeapon;
if (_local3){
updateItem(_local3.type, _local3.amount);
updateItemAmount(_local3.type, _local3.amount);
} else {
updateItem(null, 0);
};
pMovieClip.nightsText.text = (("night " + pNights) + " goal");
updateTricks();
removeEventListener(Event.ENTER_FRAME, initUpdate);
pMovieClip.mcFullMsg.gotoAndStop(1);
};
}
public function showGiftMessage():void{
pMessageClip.gotoAndPlay("gift");
}
public function updateItemAmount(_arg1:String, _arg2:int):void{
var _local3:Array;
if (_arg1){
pMovieClip.itemText.text = ((_arg2.toString() + "/") + Game.instance.getWeaponConfigure(_arg1).amount.toString());
if (_arg2 <= Game.instance.getWeaponConfigure(_arg1).low){
if (pMovieClip.itemText.filters.length == 1){
_local3 = pMovieClip.itemText.filters;
_local3.push(getRedFilters());
pMovieClip.itemText.filters = _local3;
};
};
} else {
pMovieClip.itemText.text = "0/0";
removeRedColorFilter();
};
}
public function updateItem(_arg1:String, _arg2:int):void{
if (_arg1){
pMovieClip.items.gotoAndStop(_arg1);
pMovieClip.itemText.visible = true;
pMovieClip.itemText.text = ((_arg2.toString() + "/") + Game.instance.getWeaponConfigure(_arg1).amount.toString());
} else {
pMovieClip.items.gotoAndStop("hand");
pMovieClip.itemText.visible = false;
};
removeRedColorFilter();
}
public function show():void{
visible = true;
pHiding = false;
zhn_xxxmas.application.addUpdateFunction(displayUpdate);
}
}
}//package
Section 210
//DecomposedZombie (DecomposedZombie)
package {
import flash.display.*;
public class DecomposedZombie extends GenericHookerZombie {
protected static const STATUS_DISMEMBER:String = "dismember";
protected static const STATUS_REBUILD:String = "rebuild";
public function DecomposedZombie(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
}
override protected function die_enter(_arg1:String):void{
targetLoc = null;
pursuedRole = null;
nextPursuedPosition = null;
setFrameLabel(STATUS_DISMEMBER);
zhn_xxxmas.application.addUpdateFunction(die_update);
checkKilledCombos();
}
override protected function attack_enter(_arg1:String):void{
super.attack_enter(_arg1);
playSound(zombie_throw);
}
override protected function createMovieClip():MovieClip{
return (new lib_decomposed_zombie());
}
}
}//package
Section 211
//DecomposedZombie2 (DecomposedZombie2)
package {
import flash.display.*;
public class DecomposedZombie2 extends DecomposedZombie {
public function DecomposedZombie2(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
}
override protected function createMovieClip():MovieClip{
return (new lib_decomposed_zombie2());
}
}
}//package
Section 212
//door (door)
package {
import flash.media.*;
public dynamic class door extends Sound {
}
}//package
Section 213
//EmbedManager (EmbedManager)
package {
import flash.display.*;
import flash.xml.*;
import flash.utils.*;
public class EmbedManager {
private var snow:Class;
private var property_1_10:Class;
private var property_1_12:Class;
private var property_1_13:Class;
private var property_1_11:Class;
private var property_1_1:Class;
private var property_1_2:Class;
private var property_1_3:Class;
private var property_1_4:Class;
private var property_1_5:Class;
private var property_1_6:Class;
private var property_1_7:Class;
private var property_1_8:Class;
private var property_1_9:Class;
private var ZHN_1_1:Class;
private var ZHN_1_2:Class;
private var ZHN_1_3:Class;
private var ZHN_1_4:Class;
private var ZHN_1_5:Class;
private var ZHN_1_6:Class;
private var ZHN_1_7:Class;
private var ZHN_1_8:Class;
private var ZHN_1_9:Class;
private var winter:Class;
private var ZHN_1_11:Class;
private var ZHN_1_12:Class;
private var ZHN_1_10:Class;
private var _configXML:Class;
private static var _singleton:EmbedManager;
public function EmbedManager(){
_configXML = EmbedManager__configXML;
ZHN_1_1 = EmbedManager_ZHN_1_1;
ZHN_1_2 = EmbedManager_ZHN_1_2;
ZHN_1_3 = EmbedManager_ZHN_1_3;
ZHN_1_4 = EmbedManager_ZHN_1_4;
ZHN_1_5 = EmbedManager_ZHN_1_5;
ZHN_1_6 = EmbedManager_ZHN_1_6;
ZHN_1_7 = EmbedManager_ZHN_1_7;
ZHN_1_8 = EmbedManager_ZHN_1_8;
ZHN_1_9 = EmbedManager_ZHN_1_9;
ZHN_1_10 = EmbedManager_ZHN_1_10;
ZHN_1_11 = EmbedManager_ZHN_1_11;
ZHN_1_12 = EmbedManager_ZHN_1_12;
property_1_1 = EmbedManager_property_1_1;
property_1_2 = EmbedManager_property_1_2;
property_1_3 = EmbedManager_property_1_3;
property_1_4 = EmbedManager_property_1_4;
property_1_5 = EmbedManager_property_1_5;
property_1_6 = EmbedManager_property_1_6;
property_1_7 = EmbedManager_property_1_7;
property_1_8 = EmbedManager_property_1_8;
property_1_9 = EmbedManager_property_1_9;
property_1_10 = EmbedManager_property_1_10;
property_1_11 = EmbedManager_property_1_11;
property_1_12 = EmbedManager_property_1_12;
property_1_13 = EmbedManager_property_1_13;
snow = EmbedManager_snow;
winter = EmbedManager_winter;
super();
}
private function getXMLDocument(_arg1:Class):XMLDocument{
var _local2:ByteArray = (new (_arg1) as ByteArray);
var _local3:XMLDocument = new XMLDocument();
_local3.ignoreWhite = true;
_local3.parseXML(_local2.readUTFBytes(_local2.length));
return (_local3);
}
public function getConfig():XMLDocument{
return (getXMLDocument(_configXML));
}
public function getTileset(_arg1:String):Bitmap{
if (_arg1 == "snow.png"){
return (new snow());
};
return (new winter());
}
public function get available():Boolean{
return (true);
}
public function getPropertyXml(_arg1:String, _arg2:int):XMLDocument{
var _local3:Class = this[((("property_" + _arg1) + "_") + _arg2)];
return (getXMLDocument(_local3));
}
public function getLevelXml(_arg1:String, _arg2:int):XMLDocument{
var _local3:Class = this[((("ZHN_" + _arg1) + "_") + _arg2)];
return (getXMLDocument(_local3));
}
public static function get singleton():EmbedManager{
if (_singleton == null){
_singleton = new (EmbedManager);
};
return (_singleton);
}
}
}//package
Section 214
//EmbedManager__configXML (EmbedManager__configXML)
package {
import mx.core.*;
public class EmbedManager__configXML extends ByteArrayAsset {
}
}//package
Section 215
//EmbedManager_property_1_1 (EmbedManager_property_1_1)
package {
import mx.core.*;
public class EmbedManager_property_1_1 extends ByteArrayAsset {
}
}//package
Section 216
//EmbedManager_property_1_10 (EmbedManager_property_1_10)
package {
import mx.core.*;
public class EmbedManager_property_1_10 extends ByteArrayAsset {
}
}//package
Section 217
//EmbedManager_property_1_11 (EmbedManager_property_1_11)
package {
import mx.core.*;
public class EmbedManager_property_1_11 extends ByteArrayAsset {
}
}//package
Section 218
//EmbedManager_property_1_12 (EmbedManager_property_1_12)
package {
import mx.core.*;
public class EmbedManager_property_1_12 extends ByteArrayAsset {
}
}//package
Section 219
//EmbedManager_property_1_13 (EmbedManager_property_1_13)
package {
import mx.core.*;
public class EmbedManager_property_1_13 extends ByteArrayAsset {
}
}//package
Section 220
//EmbedManager_property_1_2 (EmbedManager_property_1_2)
package {
import mx.core.*;
public class EmbedManager_property_1_2 extends ByteArrayAsset {
}
}//package
Section 221
//EmbedManager_property_1_3 (EmbedManager_property_1_3)
package {
import mx.core.*;
public class EmbedManager_property_1_3 extends ByteArrayAsset {
}
}//package
Section 222
//EmbedManager_property_1_4 (EmbedManager_property_1_4)
package {
import mx.core.*;
public class EmbedManager_property_1_4 extends ByteArrayAsset {
}
}//package
Section 223
//EmbedManager_property_1_5 (EmbedManager_property_1_5)
package {
import mx.core.*;
public class EmbedManager_property_1_5 extends ByteArrayAsset {
}
}//package
Section 224
//EmbedManager_property_1_6 (EmbedManager_property_1_6)
package {
import mx.core.*;
public class EmbedManager_property_1_6 extends ByteArrayAsset {
}
}//package
Section 225
//EmbedManager_property_1_7 (EmbedManager_property_1_7)
package {
import mx.core.*;
public class EmbedManager_property_1_7 extends ByteArrayAsset {
}
}//package
Section 226
//EmbedManager_property_1_8 (EmbedManager_property_1_8)
package {
import mx.core.*;
public class EmbedManager_property_1_8 extends ByteArrayAsset {
}
}//package
Section 227
//EmbedManager_property_1_9 (EmbedManager_property_1_9)
package {
import mx.core.*;
public class EmbedManager_property_1_9 extends ByteArrayAsset {
}
}//package
Section 228
//EmbedManager_snow (EmbedManager_snow)
package {
import mx.core.*;
public class EmbedManager_snow extends BitmapAsset {
}
}//package
Section 229
//EmbedManager_winter (EmbedManager_winter)
package {
import mx.core.*;
public class EmbedManager_winter extends BitmapAsset {
}
}//package
Section 230
//EmbedManager_ZHN_1_1 (EmbedManager_ZHN_1_1)
package {
import mx.core.*;
public class EmbedManager_ZHN_1_1 extends ByteArrayAsset {
}
}//package
Section 231
//EmbedManager_ZHN_1_10 (EmbedManager_ZHN_1_10)
package {
import mx.core.*;
public class EmbedManager_ZHN_1_10 extends ByteArrayAsset {
}
}//package
Section 232
//EmbedManager_ZHN_1_11 (EmbedManager_ZHN_1_11)
package {
import mx.core.*;
public class EmbedManager_ZHN_1_11 extends ByteArrayAsset {
}
}//package
Section 233
//EmbedManager_ZHN_1_12 (EmbedManager_ZHN_1_12)
package {
import mx.core.*;
public class EmbedManager_ZHN_1_12 extends ByteArrayAsset {
}
}//package
Section 234
//EmbedManager_ZHN_1_2 (EmbedManager_ZHN_1_2)
package {
import mx.core.*;
public class EmbedManager_ZHN_1_2 extends ByteArrayAsset {
}
}//package
Section 235
//EmbedManager_ZHN_1_3 (EmbedManager_ZHN_1_3)
package {
import mx.core.*;
public class EmbedManager_ZHN_1_3 extends ByteArrayAsset {
}
}//package
Section 236
//EmbedManager_ZHN_1_4 (EmbedManager_ZHN_1_4)
package {
import mx.core.*;
public class EmbedManager_ZHN_1_4 extends ByteArrayAsset {
}
}//package
Section 237
//EmbedManager_ZHN_1_5 (EmbedManager_ZHN_1_5)
package {
import mx.core.*;
public class EmbedManager_ZHN_1_5 extends ByteArrayAsset {
}
}//package
Section 238
//EmbedManager_ZHN_1_6 (EmbedManager_ZHN_1_6)
package {
import mx.core.*;
public class EmbedManager_ZHN_1_6 extends ByteArrayAsset {
}
}//package
Section 239
//EmbedManager_ZHN_1_7 (EmbedManager_ZHN_1_7)
package {
import mx.core.*;
public class EmbedManager_ZHN_1_7 extends ByteArrayAsset {
}
}//package
Section 240
//EmbedManager_ZHN_1_8 (EmbedManager_ZHN_1_8)
package {
import mx.core.*;
public class EmbedManager_ZHN_1_8 extends ByteArrayAsset {
}
}//package
Section 241
//EmbedManager_ZHN_1_9 (EmbedManager_ZHN_1_9)
package {
import mx.core.*;
public class EmbedManager_ZHN_1_9 extends ByteArrayAsset {
}
}//package
Section 242
//ExplodeEffect (ExplodeEffect)
package {
public class ExplodeEffect extends AbstractEffect {
public function ExplodeEffect(_arg1:Number, _arg2:Number, _arg3:Class){
super(_arg1, _arg2, _arg3);
}
}
}//package
Section 243
//FatZombie (FatZombie)
package {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class FatZombie extends GenericHookerZombie {
protected var pFrameToMakeSound:int;// = 8
protected var pFrameToThrowWeapon:int;// = 10
public function FatZombie(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
}
override protected function attack_update(_arg1:Event):void{
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
setState(STATUS_STATIC);
} else {
if (pMovieClip.mc.currentFrame == pFrameToThrowWeapon){
createThrowWeapon();
} else {
if (pMovieClip.mc.currentFrame == pFrameToMakeSound){
playSound(zombie_throw);
};
};
};
}
override protected function attack_enter(_arg1:String):void{
pMovieClip.scaleX = ((x < pursuedRole.x)) ? DIR_RIGHT : DIR_LEFT;
setFrameLabel(STATUS_ATTACK);
zhn_xxxmas.application.addUpdateFunction(attack_update);
}
protected function createThrowWeapon():void{
Game.instance.addWeapon(new ThrownWeapon(PropertyLoader.ITEM_FAT_ZOMBIE_HEAD, this, null, (x + (pMovieClip.throwPoint.x * pMovieClip.scaleX)), (y + pMovieClip.throwPoint.y), y, new Point(((x < pursuedRole.x)) ? DIR_RIGHT : DIR_LEFT, 0)));
}
override protected function createMovieClip():MovieClip{
return (new lib_fat_zombie());
}
override protected function ai_think_update(_arg1:Event):void{
if (isStateAllowedToThink()){
if (((((pursuedRole) && (isTouched(pursuedRole, 200)))) && (pursuedRole.isAlive()))){
setState(STATUS_ATTACK);
} else {
super.ai_think_update(_arg1);
};
};
}
}
}//package
Section 244
//fire (fire)
package {
import flash.media.*;
public dynamic class fire extends Sound {
}
}//package
Section 245
//FireSpitterZombie (FireSpitterZombie)
package {
import flash.display.*;
import flash.geom.*;
public class FireSpitterZombie extends FatZombie {
public function FireSpitterZombie(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
}
override protected function createMovieClip():MovieClip{
return (new lib_fireSpitter_zombie());
}
override protected function createThrowWeapon():void{
Game.instance.addWeapon(new ThrownWeapon(PropertyLoader.ITEM_FIREBALL, this, null, (x + (pMovieClip.throwPoint.x * pMovieClip.scaleX)), (y + pMovieClip.throwPoint.y), y, new Point(((x < pursuedRole.x)) ? DIR_RIGHT : DIR_LEFT, 0)));
}
}
}//package
Section 246
//flamethrower3 (flamethrower3)
package {
import flash.media.*;
public dynamic class flamethrower3 extends Sound {
}
}//package
Section 247
//Game (Game)
package {
import flash.events.*;
import com.liquable.media.*;
import flash.display.*;
import com.liquable.visualstack.*;
import com.liquable.utils.*;
import com.liquable.game.tiledmap.resources.events.*;
import com.liquable.game.geom.*;
import com.liquable.game.camera.*;
import flash.geom.*;
import com.liquable.game.tiledmap.*;
public class Game extends VisualSprite {
private var pMapResource:ZHNMapResource;
private var pDashboard:Dashboard;
private var pThrownWeaponRoot:Sprite;
private var pIsPausing:Boolean;
private var pSnowManager:SnowManager;
private var pLoadingClip:MovieClip;
private var pScuttleSoundController:SoundController;
private var pRebornTimer:int;
private var pSpecialEffectRoot:Sprite;
private var pGameSoundController:SoundController;
private var pRoles:Object;
private var pTimePassed:int;
private var pWeapons:Object;
private var pFlamingSoundController:SoundController;
private var pCheatController:CheatController;
private var pCheckJohnTimer:int;
private var pEpisode:String;
private var pJohnLocs:Array;
private var pGameOver:Boolean;
private var pGameMap:GameMap;
private var pRespawnInterval:int;
private var pGameRoot:Sprite;
private var pCheckJohnInterval:int;
private var pBreakableObjects:Array;
private var pRankScoreManager:RankScoreManager;
private var pGameStage:Sprite;
private var pTrailer:Trailer;
private var pMapObjects:Object;
private var pMapRenderer:MapRenderer;
private var pTimeCount:int;
private var pCamera:ZhnGameCamera;
private var pZombies:Object;
private var pDebug:Boolean;
private var pControlPanelInited:Boolean;// = false
private var pLola:Lola;
private var pSantaAppeared:Boolean;// = false
private var pPropertyLoader:PropertyLoader;
private var pBreakableObjectRoot:Sprite;
private var pNights:int;
private var pCanWalkLocs:Array;
private static var sFirstPlay:Boolean = true;
private static var sNeedPlayIntroSound:Boolean = true;
private static var sInstance:Game;
private static var pLastNightMoney:int = 0;
public function Game(_arg1:String, _arg2:int){
pDebug = false;
if (pDebug){
_arg1 = "2";
_arg2 = 2;
};
sInstance = this;
pEpisode = _arg1;
pNights = _arg2;
pIsPausing = false;
pRoles = new Object();
pZombies = new Object();
pWeapons = new Object();
pMapObjects = new Object();
pJohnLocs = new Array();
BlackMask.INSTANCE.stop(1);
pTimeCount = 0;
pTimePassed = 0;
pRebornTimer = 0;
pGameOver = false;
pRespawnInterval = 3;
pCheckJohnInterval = 30;
pCheckJohnTimer = 0;
if (_arg2 <= 1){
Lola.LAST_WEAPON_TYPE = null;
};
}
public function addExplode(_arg1:AbstractEffect):void{
if (!pSpecialEffectRoot.contains(_arg1)){
pSpecialEffectRoot.addChild(_arg1);
};
}
public function getWeaponConfigure(_arg1:String):Configure{
return (pPropertyLoader.getWeaponProperty(_arg1));
}
public function generateRoleOutOfScreen(_arg1:String, _arg2:int):AbstractRole{
var _local4:PointInt;
var _local5:AbstractRole;
var _local3:Array = getCanWalkLocsCopy();
while ((((_local3.length > 0)) && ((_arg2 - 1)))) {
_local4 = ArrayUtil.getArrayRandomElement(_local3, true);
if (((!(getRolesOnLoc(_local4.x, _local4.y))) && (!(isTileInCamera(_local4.x, _local4.y))))){
if (((!(getTrailer().isOnInvitingLoc(_local4.x, _local4.y))) && (!(_local4.equals(getTrailer().currentTileLoc))))){
if (canWalk(_local4.x, _local4.y)){
_local5 = RoleFactory.createRole(_arg1, _local4.x, _local4.y);
addRole(_local5);
return (_local5);
};
};
};
};
return (null);
}
public function getRoles():Object{
return (pRoles);
}
private function addJohns(_arg1:int):void{
var _local4:PointInt;
var _local2:Array = getCanWalkLocsCopy();
var _local3:int;
while (_local3 < _arg1) {
if (_local2.length == 0){
return;
};
_local4 = ArrayUtil.getArrayRandomElement(_local2, true);
if (canWalk(_local4.x, _local4.y)){
addRole(RoleFactory.createRole(PropertyLoader.ROLE_JOHN, _local4.x, _local4.y));
} else {
_local3--;
};
_local3++;
};
}
public function isInCamera(_arg1:MapObject):Boolean{
var _local2:Point = getScreenPosition(_arg1.position.x, _arg1.position.y);
return (((isScreenHLineInCamera((_local2.x - (_arg1.width / 2)), _arg1.width)) && (isScreenVLineInCamera((_local2.y - _arg1.height), _arg1.height))));
}
public function getCanWalkLocsCopy():Array{
return (pCanWalkLocs.slice());
}
public function getMapObjects():Object{
return (pMapObjects);
}
public function playFlamingSound():void{
if (((!(pFlamingSoundController)) && (!(pGameOver)))){
pFlamingSoundController = zhn_xxxmas.application.getSoundManager().playSound(fire, true);
};
}
public function getCamera():ZhnGameCamera{
return (pCamera);
}
public function removeRole(_arg1:AbstractRole):void{
delete pMapObjects[_arg1.id];
delete pRoles[_arg1.id];
delete pZombies[_arg1.id];
if (_arg1.type == PropertyLoader.ROLE_LOLA){
pLola = null;
};
if (_arg1.parent){
_arg1.parent.removeChild(_arg1);
};
_arg1.terminate();
}
public function addWeapon(_arg1:MovableObject):void{
DesignContract.preCondition((((_arg1 is Weapon)) || ((_arg1 is ThrownWeapon))));
if (!pWeapons.hasOwnProperty(_arg1.id)){
pGameRoot.addChild(_arg1);
pMapObjects[_arg1.id] = _arg1;
pWeapons[_arg1.id] = _arg1;
_arg1.initialize();
};
}
public function getMap():GameMap{
return (pGameMap);
}
public function readdRole(_arg1:GenericHookerZombie):void{
pRoles[_arg1.id] = _arg1;
pMapObjects[_arg1.id] = _arg1;
pZombies[_arg1.id] = _arg1;
}
public function isGameOver():Boolean{
return (pGameOver);
}
public function getRolesOnLoc(_arg1:int, _arg2:int):Object{
var _local3:Object;
var _local4:AbstractRole;
for each (_local4 in pRoles) {
if ((((_local4.currentTileLoc.x == _arg1)) && ((_local4.currentTileLoc.y == _arg2)))){
if (_local3 == null){
_local3 = new Object();
_local3[_local4.id] = _local4;
};
};
};
return (_local3);
}
private function onPropertyLoadComplete(_arg1:Event):void{
pPropertyLoader.removeEventListener(PropertyLoader.LOAD_COMPLETE, onPropertyLoadComplete);
var _local2:int = GameConfig.instance.getMapMaxNight(pEpisode);
var _local3 = 1;
if (_local2 > 1){
_local3 = (((pNights - 1) % _local2) + 1);
};
var _local4 = (((("ZHN_" + pEpisode) + "-") + _local3) + ".xml");
pMapResource = new ZHNMapResource(zhn_xxxmas.getStrBase());
pMapResource.addEventListener(MapResourceEvent.LOAD_COMPLETE, onMapLoadComplete);
if (EmbedManager.singleton.available){
pMapResource.loadFromXMLDocument(EmbedManager.singleton.getLevelXml(pEpisode, _local3));
} else {
pMapResource.loadFromFile((zhn_xxxmas.getStrBase() + _local4));
};
}
public function stopMusic():void{
if (pGameSoundController){
pGameSoundController.fadeOut(30);
pGameSoundController = null;
};
}
public function endStoryPanel(_arg1:MouseEvent):void{
var _local2:DisplayObject;
if (!pControlPanelInited){
_local2 = zhn_xxxmas.instance.getChildByName("helpPanel");
if (_local2){
zhn_xxxmas.mouse_down();
(_local2 as MovieClip).play();
};
};
}
private function onLevelCompleteBlackout():void{
data.setValue("level", pEpisode);
data.setValue("nights", (pNights + 1));
data.setValue("msg", Message.TYPE_SCREEN_GAME);
processDone();
}
public function playMusic():void{
var _local1:Class;
if ((((pGameSoundController == null)) || (!(pGameSoundController.isPlaying())))){
_local1 = (((Math.floor(((pNights - 1) / 3)) % 2) == 0)) ? ZHN1_song2_loop : zhn_music;
pGameSoundController = zhn_xxxmas.application.getSoundManager().playSound(_local1, true);
pGameSoundController.fadeIn(0.8, 10);
};
}
public function stopScuttleSound(_arg1:Boolean):void{
var _local2:AbstractAiRole;
if (pScuttleSoundController){
if (_arg1){
for each (_local2 in getZombies()) {
if (_local2.type == PropertyLoader.ROLE_ANKLE_BITER_ZOMBIE){
if (_local2.isInWalk()){
return;
};
};
};
};
pScuttleSoundController.stop();
pScuttleSoundController = null;
};
}
public function getRandomLocOutOfScreen():PointInt{
var _local2:PointInt;
var _local1:Array = getCanWalkLocsCopy();
while (_local1.length > 0) {
_local2 = ArrayUtil.getArrayRandomElement(_local1, true);
if (((canWalk(_local2.x, _local2.y)) && (!(isTileInCamera(_local2.x, _local2.y))))){
return (_local2);
};
};
return (null);
}
public function updateCamera():void{
var _local1:AbstractRole;
var _local2:MovableObject;
var _local3:BreakableObject;
pLola.updateRealPosition();
pCamera.update();
for each (_local1 in pRoles) {
if (_local1.type != PropertyLoader.ROLE_LOLA){
_local1.updateRealPosition();
};
};
for each (_local2 in pWeapons) {
_local2.updateRealPosition();
};
for each (_local3 in pBreakableObjects) {
_local3.updateRealPosition();
};
pTrailer.updateRealPosition();
pMapRenderer.update(pCamera, true);
}
public function getRoleConfigure(_arg1:String):Configure{
return (pPropertyLoader.getRoleProperty(_arg1));
}
public function playScuttleSound():void{
if (((!(pScuttleSoundController)) && (!(pGameOver)))){
pScuttleSoundController = zhn_xxxmas.application.getSoundManager().playSound(zombie_scuttle, true);
};
}
public function addCombo(_arg1:AbstractCombo):void{
if (!pSpecialEffectRoot.contains(_arg1)){
pSpecialEffectRoot.addChild(_arg1);
};
}
private function onInitGameOverPanel(_arg1:MovieClip, _arg2:SimpleButton, _arg3:SimpleButton, _arg4:SimpleButton, _arg5:SimpleButton):void{
var _local6:int = Math.min(5, Math.max(0, GameConfig.instance.getRank(pDashboard.getMoney())));
if (_local6 > 0){
_arg1.mHeartClip.gotoAndPlay(("rank" + _local6));
};
_arg2.addEventListener(MouseEvent.CLICK, onButtonSubmitScore, false, 0, true);
_arg3.addEventListener(MouseEvent.CLICK, onButtonPlayAgain, false, 0, true);
_arg4.addEventListener(MouseEvent.CLICK, zhn_xxxmas.linkLeaderboard, false, 0, true);
_arg5.addEventListener(MouseEvent.CLICK, zhn_xxxmas.linkMoreGames, false, 0, true);
_arg2.addEventListener(MouseEvent.MOUSE_OVER, zhn_xxxmas.mouse_over, false, 0, true);
_arg3.addEventListener(MouseEvent.MOUSE_OVER, zhn_xxxmas.mouse_over, false, 0, true);
_arg4.addEventListener(MouseEvent.MOUSE_OVER, zhn_xxxmas.mouse_over, false, 0, true);
_arg5.addEventListener(MouseEvent.MOUSE_OVER, zhn_xxxmas.mouse_over, false, 0, true);
}
public function setPausing(_arg1:Boolean):void{
var _local2:AbstractAiRole;
pIsPausing = _arg1;
if (pIsPausing){
for each (_local2 in pZombies) {
if (_local2.isAlive()){
_local2.idle();
};
};
if (pLola){
pLola.goStatic(pLola.position.x, pLola.position.y);
};
};
}
public function getRankConfigure():Configure{
return (getRankConfigureByRank(getRankScoreManager().getRank()));
}
public function getTilePosition(_arg1:int, _arg2:int):Point{
return (pMapResource.getTilePosition(_arg1, _arg2));
}
public function addSnowEffect(_arg1:Number, _arg2:Number):void{
var _local3:SnowEffect = new SnowEffect(_arg1, _arg2);
pSpecialEffectRoot.addChild(_local3);
}
public function getBreakableObjects():Array{
return (pBreakableObjects);
}
public function convertToLegalLoc(_arg1:int, _arg2:int):PointInt{
if (_arg1 < 0){
_arg1 = (_arg1 + mapColumnCounts);
} else {
if (_arg1 >= mapColumnCounts){
_arg1 = (_arg1 - mapColumnCounts);
};
};
if (_arg2 < 0){
_arg2 = (_arg2 + mapRowCounts);
} else {
if (_arg2 >= mapRowCounts){
_arg2 = (_arg2 - mapRowCounts);
};
};
return (new PointInt(_arg1, _arg2));
}
public function getZombieCounts():int{
var _local2:AbstractAiRole;
var _local1:int;
for each (_local2 in pZombies) {
_local1++;
};
return (_local1);
}
public function getMaxRank():int{
return (pPropertyLoader.getMaxRank());
}
public function setSnowManagerRun(_arg1:Boolean, _arg2:int):void{
if (pSnowManager){
if (_arg1){
pSnowManager.start(_arg2);
} else {
pSnowManager.stop();
};
};
}
public function onButtonCloseOfControlPanel(_arg1:MouseEvent):void{
var _local2:MovieClip;
if (pControlPanelInited){
zhn_xxxmas.mouse_down();
_local2 = (zhn_xxxmas.instance.getChildByName("helpPanel") as MovieClip);
if (_local2){
_local2.mouseChildren = (_local2.mouseEnabled = false);
_local2.play();
};
if (pDashboard){
BlackMask.INSTANCE.start(0.5, 0, 12, null);
pDashboard.show();
};
pControlPanelInited = false;
};
}
public function setCamerFocus(_arg1:ICameraObject):void{
pCamera.setFocus(_arg1);
}
public function getTileLocFromPosition(_arg1:Number, _arg2:Number):PointInt{
return (pMapResource.getTileLocFromPosition(_arg1, _arg2));
}
private function onGameOverPanelOver(_arg1:MovieClip):void{
_arg1.stop();
if (_arg1.parent){
_arg1.parent.removeChild(_arg1);
};
data.setValue("level", pEpisode);
data.setValue("nights", 1);
data.setValue("msg", Message.TYPE_SCREEN_GAME);
processDone();
}
public function get dashboard():Dashboard{
return (pDashboard);
}
public function getRankScoreManager():RankScoreManager{
return (pRankScoreManager);
}
override public function onPush():void{
pLoadingClip = new lib_loader_loop();
pLoadingClip.x = (728 / 2);
pLoadingClip.y = (500 / 2);
zhn_xxxmas.instance.addChild(pLoadingClip);
pCheatController = new CheatController(stage);
zhn_xxxmas.instance.setAdultswimVisible(true);
pPropertyLoader = new PropertyLoader();
pPropertyLoader.addEventListener(PropertyLoader.LOAD_COMPLETE, onPropertyLoadComplete);
var _local1:int = Math.min(pNights, GameConfig.instance.getPropertyMaxNight(pEpisode));
if (EmbedManager.singleton.available){
pPropertyLoader.loadFromXml(EmbedManager.singleton.getPropertyXml(pEpisode, _local1));
} else {
pPropertyLoader.loadFromFile((((((zhn_xxxmas.getStrBase() + "property_") + pEpisode) + "-") + _local1) + ".xml"));
};
}
private function onButtonPlayAgain(_arg1:MouseEvent):void{
zhn_xxxmas.mouse_down();
var _local2:SimpleButton = (_arg1.target as SimpleButton);
var _local3:MovieClip = (_local2.parent.parent as MovieClip);
if (_local3){
_local3.mouseChildren = (_local3.mouseEnabled = false);
_local3.play();
};
BlackMask.INSTANCE.start(0.5, 1, 6, null);
}
public function getObjectIndex(_arg1:MapObject):int{
return (pGameRoot.getChildIndex(_arg1));
}
private function initialize():void{
var _local3:Object;
var _local4:int;
var _local5:BreakableObject;
pRankScoreManager = new RankScoreManager();
pCamera = new ZhnGameCamera();
pCamera.setGameArea(((-(pCamera.width) / 2) - 100), ((-(pCamera.height) / 2) - 100), ((mapWidth + pCamera.width) + 200), ((mapHeight + pCamera.height) + 200));
pCamera.setFollowSpeed(1);
pGameMap = new GameMap(pMapResource);
pMapRenderer = new MapRenderer(pGameMap);
pMapRenderer.build(pCamera, true, true);
pCamera.setGameRoot(pMapRenderer.getGameStage());
addChild(pMapRenderer);
pSnowManager = new SnowManager(pMapResource);
addChild(pSnowManager);
pGameStage = pMapRenderer.getGameStage();
pBreakableObjectRoot = new Sprite();
pGameStage.addChild(pBreakableObjectRoot);
pGameRoot = new Sprite();
pGameStage.addChild(pGameRoot);
pSpecialEffectRoot = new Sprite();
pGameStage.addChild(pSpecialEffectRoot);
pThrownWeaponRoot = new Sprite();
pGameStage.addChild(pThrownWeaponRoot);
pDashboard = new Dashboard(pNights, pPropertyLoader.getGoalProperties().tricks);
pDashboard.x = -1;
pDashboard.y = -1;
addChild(pDashboard);
if (pNights > 1){
pDashboard.updateMoney(pLastNightMoney);
};
pCanWalkLocs = new Array();
var _local1:int;
while (_local1 < mapColumnCounts) {
_local4 = 0;
while (_local4 < mapRowCounts) {
if (canWalk(_local1, _local4)){
pCanWalkLocs.push(new PointInt(_local1, _local4));
};
_local4++;
};
_local1++;
};
pBreakableObjects = new Array();
var _local2:Array = pMapResource.getObjectLocs();
for each (_local3 in _local2) {
_local5 = new BreakableObject(_local3.oType, _local3.x, _local3.y, _local3.contents);
_local5.initialize();
pBreakableObjectRoot.addChild(_local5);
pBreakableObjects.push(_local5);
};
pDashboard.hide(true);
if ((((pNights == 1)) && (sFirstPlay))){
sFirstPlay = false;
BlackMask.INSTANCE.start(1, 0, 5, showIntrpHelp);
} else {
pDashboard.show();
BlackMask.INSTANCE.start(1, 0, 30, null);
zhn_xxxmas.instance.stopBackgroundSound();
playMusic();
};
initializeGameElements();
pCheatController.start();
setSnowManagerRun(true, GameConfig.instance.snowNormalInterval);
}
public function getWeapons():Object{
return (pWeapons);
}
public function getRankConfigureByRank(_arg1:int):Configure{
return (pPropertyLoader.getRankProperty(_arg1));
}
public function isPausing():Boolean{
return (pIsPausing);
}
public function hideHelp():void{
pControlPanelInited = false;
zhn_xxxmas.instance.stopBackgroundSound();
playMusic();
var _local1:DisplayObject = zhn_xxxmas.instance.getChildByName("helpPanel");
if (_local1){
if (_local1.parent){
_local1.parent.removeChild(_local1);
};
BlackMask.INSTANCE.start(BlackMask.INSTANCE.alpha, 0, 12, null);
};
pDashboard.show();
stage.focus = stage;
setPausing(false);
if (pGameSoundController){
pGameSoundController.setVolume(0.8);
};
}
public function getScreenPosition(_arg1:Number, _arg2:Number):Point{
return (pCamera.getScreenPosition(_arg1, _arg2));
}
public function getLola():Lola{
return (pLola);
}
public function getGamePosition(_arg1:Number, _arg2:Number):Point{
return (pCamera.getGamePosition(_arg1, _arg2));
}
public function addRole(_arg1:AbstractRole):void{
if (_arg1.parent != pGameRoot){
if (_arg1.parent){
_arg1.parent.removeChild(_arg1);
};
pGameRoot.addChild(_arg1);
};
pRoles[_arg1.id] = _arg1;
pMapObjects[_arg1.id] = _arg1;
_arg1.initialize();
if (_arg1.type == PropertyLoader.ROLE_LOLA){
pLola = (_arg1 as Lola);
} else {
pZombies[_arg1.id] = _arg1;
};
if (_arg1.type == PropertyLoader.ROLE_SANTA){
pSantaAppeared = true;
};
}
public function get tileWidth():int{
return (pMapResource.tileWidth);
}
private function initializeGameElements():void{
var _local3:String;
var _local4:Array;
var _local5:Object;
var _local1:Object = pMapResource.getTrailerLoc();
pTrailer = new Trailer(PropertyLoader.OBJ_TRAILER, _local1.x, _local1.y);
pTrailer.initialize();
pGameRoot.addChild(pTrailer);
pMapObjects[pTrailer.id] = pTrailer;
var _local2:Object = pMapResource.getLolaLoc();
addRole(RoleFactory.createRole(PropertyLoader.ROLE_LOLA, _local2.x, _local2.y));
if (pDebug){
} else {
_local2 = pMapResource.getRoleLocs();
for (_local3 in _local2) {
_local4 = _local2[_local3];
if ((((_local3 == PropertyLoader.ROLE_JOHN)) && (GameConfig.instance.oneJohnOnStage))){
pJohnLocs = _local4;
ArrayUtil.randomizeArray(pJohnLocs);
} else {
for each (_local5 in _local4) {
addRole(RoleFactory.createRole(_local3, _local5.x, _local5.y));
};
};
};
};
_local2 = pMapResource.getWeaponLocs();
for (_local3 in _local2) {
_local4 = _local2[_local3];
for each (_local5 in _local4) {
addWeapon(new Weapon(_local3, _local5.x, _local5.y));
};
};
addEventListener(Event.ENTER_FRAME, update);
}
public function getCanWalkLocsArray():Array{
return (pCanWalkLocs);
}
public function get mapColumnCounts():int{
return (pMapResource.columnCounts);
}
private function isScreenVLineInCamera(_arg1:Number, _arg2:Number):Boolean{
if (((((_arg1 + _arg2) > 0)) && ((_arg1 < zhn_xxxmas.application.gameHeight)))){
return (true);
};
var _local3:Number = (_arg1 - mapHeight);
if (((((_local3 + _arg2) > 0)) && ((_local3 < zhn_xxxmas.application.gameHeight)))){
return (true);
};
_local3 = (_arg1 + mapHeight);
if (((((_local3 + _arg2) > 0)) && ((_local3 < zhn_xxxmas.application.gameHeight)))){
return (true);
};
return (false);
}
private function isScreenHLineInCamera(_arg1:Number, _arg2:Number):Boolean{
if (((((_arg1 + _arg2) > 0)) && ((_arg1 < zhn_xxxmas.application.gameWidth)))){
return (true);
};
var _local3:Number = (_arg1 - mapWidth);
if (((((_local3 + _arg2) > 0)) && ((_local3 < zhn_xxxmas.application.gameWidth)))){
return (true);
};
_local3 = (_arg1 + mapWidth);
if (((((_local3 + _arg2) > 0)) && ((_local3 < zhn_xxxmas.application.gameWidth)))){
return (true);
};
return (false);
}
public function removeWeapon(_arg1:MovableObject):void{
DesignContract.preCondition((((_arg1 is Weapon)) || ((_arg1 is ThrownWeapon))));
if (pWeapons.hasOwnProperty(_arg1.id)){
pGameRoot.removeChild(_arg1);
delete pMapObjects[_arg1.id];
delete pWeapons[_arg1.id];
_arg1.terminate();
};
}
private function onButtonSubmitScore(_arg1:MouseEvent):void{
zhn_xxxmas.mouse_down();
var _local2:SimpleButton = (_arg1.target as SimpleButton);
var _local3:MovieClip = (_local2.parent.parent as MovieClip);
if (_local3){
_local3.mouseChildren = (_local3.mouseEnabled = false);
};
hi_score.submit(zhn_xxxmas.sGameId, pDashboard.getMoney());
}
public function isTileInCamera(_arg1:int, _arg2:int):Boolean{
var _local3:PointInt = convertToLegalLoc(_arg1, _arg2);
var _local4:Point = getTilePosition(_local3.x, _local3.y);
var _local5:Point = getScreenPosition(_local4.x, _local4.y);
return (((isScreenHLineInCamera((_local5.x - tileWidth), (tileWidth * 3))) && (isScreenVLineInCamera((_local5.y - (tileHeight * 2)), (tileHeight * 3)))));
}
public function get mapHeight():int{
return (pMapResource.height);
}
public function get tileHeight():int{
return (pMapResource.tileHeight);
}
public function get mapWidth():int{
return (pMapResource.width);
}
private function update(_arg1:Event):void{
var _local2:int;
var _local3:AbstractAiRole;
var _local4:Object;
var _local5:AbstractRole;
updateCamera();
if (((((!(isPausing())) && (pLola))) && ((pLola.getHp() > 0)))){
pTimePassed++;
pTimeCount++;
if (pTimeCount == 1000){
getRankScoreManager().addTimeScore();
pTimeCount = 0;
};
pRebornTimer++;
if (pRebornTimer > pRespawnInterval){
if (generateRandomZombie()){
pRebornTimer = 0;
pRespawnInterval = getRankConfigure().respawnInterval;
};
};
pCheckJohnTimer++;
if (pCheckJohnTimer > pCheckJohnInterval){
_local2 = 0;
for each (_local3 in pZombies) {
if (_local3.isJohn(false)){
_local2++;
};
};
if (pDashboard.goalTricks > (pDashboard.currentTricks + _local2)){
if (GameConfig.instance.oneJohnOnStage){
if (_local2 == 0){
_local4 = pJohnLocs.shift();
pJohnLocs.push(_local4);
_local5 = RoleFactory.createRole(PropertyLoader.ROLE_JOHN, _local4.x, _local4.y);
addRole(_local5);
};
} else {
generateRoleOutOfScreen(PropertyLoader.ROLE_JOHN, 50);
};
};
pCheckJohnTimer = 0;
};
};
}
public function swapObjects(_arg1:MapObject, _arg2:MapObject):void{
pGameRoot.swapChildren(_arg1, _arg2);
}
private function onInitControlPanel(_arg1:SimpleButton, _arg2:SimpleButton):void{
pControlPanelInited = true;
_arg1.addEventListener(MouseEvent.CLICK, onButtonCloseOfControlPanel, false, 0, true);
_arg1.addEventListener(MouseEvent.ROLL_OVER, zhn_xxxmas.mouse_over, false, 0, true);
_arg2.addEventListener(MouseEvent.CLICK, zhn_xxxmas.linkMoreGames, false, 0, true);
_arg2.addEventListener(MouseEvent.ROLL_OVER, zhn_xxxmas.mouse_over, false, 0, true);
}
public function getZombies():Object{
return (pZombies);
}
private function onPanelOver(_arg1:MovieClip):void{
hideHelp();
if (sNeedPlayIntroSound){
sNeedPlayIntroSound = false;
zhn_xxxmas.application.getSoundManager().playSound(zhn_bonnie_2_faster, false);
};
}
public function get mapRowCounts():int{
return (pMapResource.rowCounts);
}
public function canWalk(_arg1:int, _arg2:int):Boolean{
var _local3:PointInt = convertToLegalLoc(_arg1, _arg2);
return (pGameMap.canWalk(_local3.x, _local3.y));
}
private function onMapLoadComplete(_arg1:MapResourceEvent):void{
if (pLoadingClip){
if (pLoadingClip.parent){
pLoadingClip.parent.removeChild(pLoadingClip);
};
pLoadingClip = null;
};
pMapResource.removeEventListener(MapResourceEvent.LOAD_COMPLETE, onMapLoadComplete);
initialize();
}
public function showHelp(_arg1:Boolean):void{
pControlPanelInited = false;
setPausing(true);
BlackMask.INSTANCE.start(0, 0.5, 12, null);
var _local2:MovieClip = new lib_control_panel();
_local2.name = "helpPanel";
_local2.initPanel = onInitControlPanel;
_local2.initStoryPanel = onInitStoryPanel;
_local2.panelOver = onPanelOver;
_local2.episodeFrame = pEpisode;
_local2.x = (728 / 2);
_local2.y = (500 / 2);
zhn_xxxmas.instance.addChild(_local2);
if (_arg1){
_local2.gotoAndPlay("control");
};
if (pGameSoundController){
pGameSoundController.setVolume(0.2);
};
}
private function showIntrpHelp():void{
showHelp(false);
}
public function stopFlamingSound(_arg1:Boolean):void{
var _local2:AbstractAiRole;
if (pFlamingSoundController){
if (_arg1){
for each (_local2 in getZombies()) {
if (_local2.isInFlaming()){
return;
};
};
};
pFlamingSoundController.stop();
pFlamingSoundController = null;
};
}
public function getTileCenterPosition(_arg1:int, _arg2:int):Point{
return (pMapResource.getTileCenterPosition(_arg1, _arg2));
}
public function levelComplete():void{
BlackMask.INSTANCE.start(0, 1, 30, onLevelCompleteBlackout);
stopMusic();
}
public function gameOver():void{
pGameOver = true;
stopFlamingSound(false);
stopScuttleSound(false);
BlackMask.INSTANCE.start(0, 0.5, 6, null);
var _local1:lib_gameover_panel = new lib_gameover_panel();
_local1.initPanel = onInitGameOverPanel;
_local1.panelOver = onGameOverPanelOver;
_local1.scoreText = ("$" + IntUtil.formatAddComma(pDashboard.getMoney()));
_local1.x = (728 / 2);
_local1.y = (500 / 2);
zhn_xxxmas.instance.addChild(_local1);
pDashboard.attachHelpButton();
pDashboard.hide();
stopMusic();
zhn_xxxmas.instance.playBackgroundSound();
}
public function getFactorConfig():Configure{
return (pPropertyLoader.getFactorProperty());
}
private function generateRandomZombie():Boolean{
var _local4:AbstractAiRole;
var _local5:Array;
var _local6:String;
var _local7:int;
var _local8:Array;
var _local9:int;
var _local1:int = getRankConfigure().totalZombies;
var _local2:int;
var _local3:Object = new Object();
for each (_local4 in pZombies) {
if (!_local3.hasOwnProperty(_local4.type)){
_local3[_local4.type] = 0;
};
var _local12 = _local3;
var _local13 = _local4.type;
var _local14 = (_local12[_local13] + 1);
_local12[_local13] = _local14;
_local2++;
};
_local5 = [PropertyLoader.ROLE_GENERIC_HOOKER_ZOMBIE, PropertyLoader.ROLE_ANKLE_BITER_ZOMBIE, PropertyLoader.ROLE_DECOMPOSED_ZOMBIE, PropertyLoader.ROLE_DECOMPOSED_ZOMBIE2, PropertyLoader.ROLE_FAT_ZOMBIE, PropertyLoader.ROLE_FIRE_SPITTER_ZOMBIE, PropertyLoader.ROLE_PURPLE_DECOMPOSED_ZOMBIE, PropertyLoader.ROLE_ICE_QUEEN, PropertyLoader.ROLE_GNOMES_ZOMBIE, PropertyLoader.ROLE_REINDEER, PropertyLoader.ROLE_REINDEER2];
if (!pSantaAppeared){
_local5.push(PropertyLoader.ROLE_SANTA);
};
if ((((pTimePassed > 600)) && (!(_local3.hasOwnProperty(PropertyLoader.ROLE_OLDMAN_WINTER))))){
_local5.push(PropertyLoader.ROLE_OLDMAN_WINTER);
};
if (_local2 < (_local1 + _local5.length)){
_local7 = 0;
for each (_local6 in _local5) {
_local7 = (_local7 + getRankConfigure().getZombieWeight(_local6));
if (!_local3.hasOwnProperty(_local6)){
_local3[_local6] = 0;
};
};
_local8 = new Array();
for each (_local6 in _local5) {
_local9 = (Math.round(((getRankConfigure().getZombieWeight(_local6) / _local7) * _local1)) - _local3[_local6]);
if (_local9 > 0){
_local8.push(_local6);
};
};
if (_local8.length){
if (generateRoleOutOfScreen(ArrayUtil.getArrayRandomElement(_local8, false), 50)){
return (true);
};
};
};
return (false);
}
public function generateWeaponOutOfScreen(_arg1:String):Weapon{
var _local3:PointInt;
var _local4:Boolean;
var _local5:MovableObject;
var _local6:Weapon;
var _local7:Weapon;
var _local2:Array = getCanWalkLocsCopy();
while (_local2.length > 0) {
_local3 = ArrayUtil.getArrayRandomElement(_local2, true);
if (((((canWalk(_local3.x, _local3.y)) && (!(getRolesOnLoc(_local3.x, _local3.y))))) && (!(isTileInCamera(_local3.x, _local3.y))))){
if (((!(getTrailer().isOnInvitingLoc(_local3.x, _local3.y))) && (!(getTrailer().currentTileLoc.equals(_local3))))){
_local4 = false;
for each (_local5 in pWeapons) {
if ((_local5 is Weapon)){
_local6 = (_local5 as Weapon);
if (((_local6.isInState(Weapon.STATUS_BOB)) && (_local6.currentTileLoc.equals(_local3)))){
_local4 = true;
break;
};
};
};
if (!_local4){
_local7 = new Weapon(_arg1, _local3.x, _local3.y);
addWeapon(_local7);
return (_local7);
};
};
};
};
return (null);
}
override public function onPop():MapData{
var _local1:AbstractRole;
var _local2:MovableObject;
var _local3:MapObject;
var _local4:BreakableObject;
zhn_xxxmas.instance.setAdultswimVisible(false);
removeEventListener(Event.ENTER_FRAME, update);
while (numChildren) {
removeChildAt(0);
};
if (pMapRenderer){
pMapRenderer.destroy();
pMapRenderer = null;
};
if (pSnowManager){
pSnowManager.terminate();
pSnowManager = null;
};
pTrailer.terminate();
pTrailer = null;
pRankScoreManager.terminate();
pPropertyLoader.terminate();
stopFlamingSound(false);
stopScuttleSound(false);
if (pCheatController){
pCheatController.stop();
pCheatController = null;
};
if (pBreakableObjects){
for each (_local4 in pBreakableObjects) {
_local4.terminate();
};
pBreakableObjects = null;
};
for each (_local1 in pRoles) {
removeRole(_local1);
};
pRoles = null;
pLola = null;
pZombies = null;
for each (_local2 in pWeapons) {
removeWeapon(_local2);
};
pWeapons = null;
for each (_local3 in pMapObjects) {
_local3.terminate();
};
pMapObjects = null;
while (pGameRoot.numChildren) {
pGameRoot.removeChildAt(0);
};
pGameRoot = null;
while (pSpecialEffectRoot.numChildren) {
pSpecialEffectRoot.removeChildAt(0);
};
pSpecialEffectRoot = null;
while (pThrownWeaponRoot.numChildren) {
pThrownWeaponRoot.removeChildAt(0);
};
pThrownWeaponRoot = null;
while (pGameStage.numChildren) {
pGameStage.removeChildAt(0);
};
pGameStage = null;
if (pDashboard){
pLastNightMoney = pDashboard.getMoney();
pDashboard.terminate();
pDashboard = null;
};
pGameMap = null;
pMapResource = null;
pCamera = null;
sInstance = null;
stopMusic();
return (super.onPop());
}
public function getTrailer():Trailer{
return (pTrailer);
}
private function onInitStoryPanel(_arg1:MovieClip):void{
pControlPanelInited = false;
var _local2:SimpleButton = _arg1.mButton;
_local2.addEventListener(MouseEvent.CLICK, endStoryPanel, false, 0, true);
_local2.addEventListener(MouseEvent.ROLL_OVER, zhn_xxxmas.mouse_over, false, 0, true);
}
public static function get instance():Game{
return (sInstance);
}
}
}//package
Section 248
//GameConfig (GameConfig)
package {
import flash.events.*;
import flash.xml.*;
import flash.net.*;
public class GameConfig extends URLLoader {
private var pEp2PropertyMaxNight:int;
private var pDebugPanel:Boolean;
private var pEp1PropertyMaxNight:int;
private var pCheats:Boolean;
private var pOneJohnOnStage:Boolean;
private var pHitJohnByTouch:Boolean;
private var pEp2MapMaxNight:int;
private var pLolaInvincibleDuration:int;
private var pIceSettings:Object;
private var pSnowNormalInterval:int;
private var pHitLolaByTouch:Boolean;
private var pCheatCode:String;
private var pCallback:Function;
private var pSnowSettings:Object;
private var pEp1MapMaxNight:int;
private var pSnowOldmanwinterInterval:int;
private var pEpisode2Lock:Boolean;
private var pRankScores:Array;
public static var instance:GameConfig;
public function GameConfig(_arg1:String, _arg2:Function){
var _local3:URLRequest;
instance = this;
pEpisode2Lock = true;
pCallback = _arg2;
pIceSettings = new Object();
pSnowSettings = new Object();
if (_arg1){
addEventListener(Event.COMPLETE, onLoaded);
_local3 = new URLRequest(_arg1);
};
super(_local3);
}
public function get hitJohnByTouch():Boolean{
return (pHitJohnByTouch);
}
public function get oneJohnOnStage():Boolean{
return (pOneJohnOnStage);
}
public function get cheats():Boolean{
return (pCheats);
}
public function getIceSettings(_arg1:String):Array{
if (pIceSettings.hasOwnProperty(_arg1)){
return (pIceSettings[_arg1]);
};
return ([]);
}
public function getRank(_arg1:int):int{
var _local2:int;
while (_local2 < pRankScores.length) {
if (_arg1 < pRankScores[_local2]){
return (_local2);
};
_local2++;
};
return (_local2);
}
public function get lolaInvincibleDuration():int{
return (pLolaInvincibleDuration);
}
public function get snowNormalInterval():int{
return (pSnowNormalInterval);
}
public function importXml(_arg1:XMLDocument):void{
var _local2:XMLNode;
var _local3:XMLNode;
_arg1.ignoreWhite = true;
for each (_local2 in _arg1.childNodes) {
if (_local2.nodeName == "config"){
for each (_local3 in _local2.childNodes) {
switch (_local3.nodeName){
case "game":
analyticsGameNode(_local3);
break;
case "iceSetting":
analyticsIceSetting(_local3);
break;
case "snowSetting":
analyticsSnowSetting(_local3);
break;
case "ranking":
analyticsRanking(_local3);
break;
};
};
};
};
pCallback();
}
private function analyseSnowNode(_arg1:XMLNode):void{
var _local5:String;
var _local2:String = _arg1.attributes.tileset;
var _local3:Array = _arg1.attributes.images.split(",");
var _local4:Array = new Array();
for each (_local5 in _local3) {
_local4.push(parseInt(_local5));
};
pSnowSettings[_local2] = _local4;
}
private function analyseIceNode(_arg1:XMLNode):void{
var _local5:String;
var _local2:String = _arg1.attributes.tileset;
var _local3:Array = _arg1.attributes.images.split(",");
var _local4:Array = new Array();
for each (_local5 in _local3) {
_local4.push(parseInt(_local5));
};
pIceSettings[_local2] = _local4;
}
public function get hitLolaByTouch():Boolean{
return (pHitLolaByTouch);
}
private function analyticsGameNode(_arg1:XMLNode):void{
pEpisode2Lock = (_arg1.attributes.episode2Lock == "true");
pCheats = (_arg1.attributes.cheats == "true");
pHitJohnByTouch = (_arg1.attributes.hitJohnByTouch == "true");
pHitLolaByTouch = (_arg1.attributes.hitLolaByTouch == "true");
pDebugPanel = (_arg1.attributes.debugPanel == "true");
pLolaInvincibleDuration = parseInt(_arg1.attributes.lolaInvincibleDuration);
pOneJohnOnStage = (_arg1.attributes.oneJohnOnStage == "true");
pCheatCode = _arg1.attributes.cheatCode;
pEp1PropertyMaxNight = parseInt(_arg1.attributes.ep1PropertyMaxNight);
pEp1MapMaxNight = parseInt(_arg1.attributes.ep1MapMaxNight);
pEp2PropertyMaxNight = parseInt(_arg1.attributes.ep2PropertyMaxNight);
pEp2MapMaxNight = parseInt(_arg1.attributes.ep2MapMaxNight);
}
public function getSnowSettings(_arg1:String):Array{
if (pSnowSettings.hasOwnProperty(_arg1)){
return (pSnowSettings[_arg1]);
};
return ([]);
}
private function onLoaded(_arg1:Event):void{
importXml(new XMLDocument(this.data));
}
private function analyticsRanking(_arg1:XMLNode):void{
var _local2:XMLNode = _arg1.firstChild;
pRankScores = new Array();
while (_local2) {
switch (_local2.nodeName){
case "rank":
pRankScores.push(parseInt(_local2.attributes.score));
break;
};
_local2 = _local2.nextSibling;
};
}
public function getMapMaxNight(_arg1:String):int{
if (_arg1 == "1"){
return (pEp1MapMaxNight);
};
return (pEp2MapMaxNight);
}
public function get episode2Lock():Boolean{
return (pEpisode2Lock);
}
private function analyticsSnowSetting(_arg1:XMLNode):void{
pSnowNormalInterval = parseInt(_arg1.attributes.normalInterval);
pSnowOldmanwinterInterval = parseInt(_arg1.attributes.oldmanwinterInterval);
var _local2:XMLNode = _arg1.firstChild;
while (_local2) {
switch (_local2.nodeName){
case "set":
analyseSnowNode(_local2);
break;
};
_local2 = _local2.nextSibling;
};
}
private function analyticsIceSetting(_arg1:XMLNode):void{
var _local2:XMLNode = _arg1.firstChild;
while (_local2) {
switch (_local2.nodeName){
case "set":
analyseIceNode(_local2);
break;
};
_local2 = _local2.nextSibling;
};
}
public function get snowOldmanwinterInterval():int{
return (pSnowOldmanwinterInterval);
}
public function get debugPanel():Boolean{
return (pDebugPanel);
}
public function get cheatCode():String{
return (pCheatCode);
}
public function getPropertyMaxNight(_arg1:String):int{
if (_arg1 == "1"){
return (pEp1PropertyMaxNight);
};
return (pEp2PropertyMaxNight);
}
}
}//package
Section 249
//GameMap (GameMap)
package {
import com.liquable.game.tiledmap.resources.*;
import com.liquable.game.tiledmap.*;
import com.liquable.game.astar.*;
public class GameMap extends TiledMap {
public function GameMap(_arg1:MapResource){
super(_arg1);
}
public function canWalk(_arg1:int, _arg2:int):Boolean{
if (_arg1 < 0){
_arg1 = (_arg1 + getMapResource().columnCounts);
} else {
if (_arg1 >= getMapResource().columnCounts){
_arg1 = (_arg1 - getMapResource().columnCounts);
};
};
if (_arg2 < 0){
_arg2 = (_arg2 + getMapResource().rowCounts);
} else {
if (_arg2 >= getMapResource().rowCounts){
_arg2 = (_arg2 - getMapResource().rowCounts);
};
};
var _local3:Object = getMapResource().getTileProperties(_arg1, _arg2);
return ((((!((_local3 == null))) && ((_local3.canWalk == "1")))) ? true : false);
}
override public function getPassCost(_arg1, _arg2:int, _arg3:int, _arg4:int, _arg5:int):Number{
if ((((_arg1 is OldmanWinter)) || (canWalk(_arg4, _arg5)))){
return (super.getPassCost(_arg1, _arg2, _arg3, _arg4, _arg5));
};
return (AStar.IMPASSABLE_COST);
}
public function setCanWalk(_arg1:int, _arg2:int, _arg3:Boolean):void{
var _local4:Object = getMapResource().getTileProperties(_arg1, _arg2);
if (_local4){
_local4.canWalk = (_arg3) ? "1" : "0";
};
}
override public function getReachedDestination(_arg1, _arg2:int, _arg3:int, _arg4:int, _arg5:int):Boolean{
if (_arg2 >= Game.instance.mapColumnCounts){
_arg2 = (_arg2 - Game.instance.mapColumnCounts);
} else {
if (_arg2 < 0){
_arg2 = (_arg2 + Game.instance.mapColumnCounts);
};
};
if (_arg3 >= Game.instance.mapRowCounts){
_arg3 = (_arg3 - Game.instance.mapRowCounts);
} else {
if (_arg3 < 0){
_arg3 = (_arg3 + Game.instance.mapRowCounts);
};
};
return (super.getReachedDestination(_arg1, _arg2, _arg3, _arg4, _arg5));
}
public function getSnowSlowLevel(_arg1:int, _arg2:int):Number{
var _local4:*;
if (_arg1 < 0){
_arg1 = (_arg1 + getMapResource().columnCounts);
} else {
if (_arg1 >= getMapResource().columnCounts){
_arg1 = (_arg1 - getMapResource().columnCounts);
};
};
if (_arg2 < 0){
_arg2 = (_arg2 + getMapResource().rowCounts);
} else {
if (_arg2 >= getMapResource().rowCounts){
_arg2 = (_arg2 - getMapResource().rowCounts);
};
};
var _local3:Object = getMapResource().getTileProperties(_arg1, _arg2);
if (((_local3) && (_local3.hasOwnProperty("snow")))){
_local4 = _local3.snow;
return (((_local4 is String)) ? 0 : _local4);
};
return (0);
}
override public function getFCost(_arg1, _arg2:Number, _arg3:int, _arg4:int, _arg5:int, _arg6:int):Number{
var _local7:Number = (Game.instance.mapColumnCounts / 2);
var _local8:Number = (Game.instance.mapRowCounts / 2);
var _local9:Number = Math.abs((_arg3 - _arg5));
var _local10:Number = Math.abs((_arg4 - _arg6));
while (_local9 >= Game.instance.mapColumnCounts) {
_local9 = (_local9 - Game.instance.mapColumnCounts);
};
while (_local10 >= Game.instance.mapRowCounts) {
_local10 = (_local10 - Game.instance.mapRowCounts);
};
if (_local9 > _local7){
_local9 = (Game.instance.mapColumnCounts - _local9);
};
if (_local10 > _local8){
_local10 = (Game.instance.mapRowCounts - _local10);
};
return (super.getFCost(_arg1, _arg2, 0, 0, _local9, _local10));
}
public function setSnowSlowLevel(_arg1:int, _arg2:int, _arg3:Number):void{
if (_arg1 < 0){
_arg1 = (_arg1 + getMapResource().columnCounts);
} else {
if (_arg1 >= getMapResource().columnCounts){
_arg1 = (_arg1 - getMapResource().columnCounts);
};
};
if (_arg2 < 0){
_arg2 = (_arg2 + getMapResource().rowCounts);
} else {
if (_arg2 >= getMapResource().rowCounts){
_arg2 = (_arg2 - getMapResource().rowCounts);
};
};
getMapResource().setTileProperty(_arg1, _arg2, "snow", _arg3);
}
public function isIceTile(_arg1:int, _arg2:int):Boolean{
if (_arg1 < 0){
_arg1 = (_arg1 + getMapResource().columnCounts);
} else {
if (_arg1 >= getMapResource().columnCounts){
_arg1 = (_arg1 - getMapResource().columnCounts);
};
};
if (_arg2 < 0){
_arg2 = (_arg2 + getMapResource().rowCounts);
} else {
if (_arg2 >= getMapResource().rowCounts){
_arg2 = (_arg2 - getMapResource().rowCounts);
};
};
var _local3:Object = getMapResource().getTileProperties(_arg1, _arg2);
return ((((!((_local3 == null))) && ((_local3.ice == "1")))) ? true : false);
}
}
}//package
Section 250
//GamePreloader (GamePreloader)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.utils.*;
public class GamePreloader extends MovieClip {
private var pButtonAdultswim:SimpleButton;
private var pLoaderScreen:lib_preloader;
public function GamePreloader(){
stop();
addEventListener(Event.ENTER_FRAME, onEnterFrame);
pLoaderScreen = new lib_preloader();
pLoaderScreen.stop();
pLoaderScreen.x = (728 / 2);
pLoaderScreen.y = (500 / 2);
addChild(pLoaderScreen);
}
private function onButtonAdultswim(_arg1:MouseEvent):void{
navigateToURL(new URLRequest((("http://games.adultswim.com?cid=GAME_Ext_ZHNxxxMas_" + getStrDomain()) + "_game_more")), "_blank");
}
public function getRootParameters():Object{
if (((((root) && (root.loaderInfo))) && (root.loaderInfo.parameters))){
return (root.loaderInfo.parameters);
};
return ({});
}
private function onEnterFrame(_arg1:Event):void{
var _local4:int;
if (pButtonAdultswim == null){
if (pLoaderScreen.buttonAdultswim){
pButtonAdultswim = pLoaderScreen.buttonAdultswim;
pButtonAdultswim.addEventListener(MouseEvent.CLICK, onButtonAdultswim, false, 0, true);
};
};
var _local2:Number = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal);
var _local3 = 10;
if (_local2 == 1){
if (pLoaderScreen.currentFrame == pLoaderScreen.totalFrames){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
removeChild(pLoaderScreen);
pLoaderScreen = null;
nextFrame();
init();
} else {
if (pLoaderScreen.currentFrame <= _local3){
pLoaderScreen.gotoAndPlay((_local3 + 1));
};
};
} else {
_local4 = Math.min(_local3, (Math.floor((_local3 * _local2)) + 1));
pLoaderScreen.gotoAndStop(_local4);
};
}
public function getStrDomain():String{
return (new LocalConnection().domain);
}
private function init():void{
var _local2:Object;
var _local1:Class = Class(getDefinitionByName("zhn_xxxmas"));
if (_local1){
_local2 = new (_local1);
addChild((_local2 as DisplayObject));
};
}
}
}//package
Section 251
//GenericHookerZombie (GenericHookerZombie)
package {
import flash.events.*;
import flash.display.*;
import com.liquable.utils.*;
import com.liquable.game.geom.*;
import flash.geom.*;
import flash.utils.*;
public class GenericHookerZombie extends AbstractAiRole {
private var pTimeToDelete:int;
protected var pAttackHitFrame:int;// = 6
private var pWalkableLocs:Array;
protected var pHitDistance:Number;// = 50
protected var pTryKeepDistance:Number;// = 25
protected var pDamage:int;
public function GenericHookerZombie(_arg1:String, _arg2:int, _arg3:int){
var _local4:Configure = Game.instance.getRoleConfigure(_arg1);
var _local5:Configure = Game.instance.getRankConfigure();
super(_arg1, _arg2, _arg3, _local5.getZombieHp(_arg1), _local4.speed, _local4.range, 20, _local4.money);
pDamage = _local4.damage;
pHitDistance = Game.instance.getRoleConfigure(type).hitDistance;
}
protected function deleteDelayUpdate(_arg1:Event):void{
var _local3:int;
var _local4:Lola;
var _local5:int;
var _local6:int;
var _local7:PointInt;
var _local8:int;
var _local9:int;
var _local10:Point;
var _local2:int = getTimer();
if (_local2 > pTimeToDelete){
_local3 = 30;
if (!Game.instance.isInCamera(this)){
if ((((pWalkableLocs == null)) || ((pWalkableLocs.length == 0)))){
pWalkableLocs = Game.instance.getCanWalkLocsCopy();
};
_local4 = Game.instance.getLola();
_local5 = (((zhn_xxxmas.application.gameWidth / Game.instance.tileWidth) / 2) + 1);
_local6 = (((zhn_xxxmas.application.gameHeight / Game.instance.tileHeight) / 2) + 1);
while ((((pWalkableLocs.length > 0)) && ((_local3 - 1)))) {
_local7 = ArrayUtil.getArrayRandomElement(pWalkableLocs, true);
_local8 = Math.abs((_local7.x - _local4.currentTileLoc.x));
_local9 = Math.abs((_local7.y - _local4.currentTileLoc.y));
if ((((((((_local8 > _local5)) && ((_local8 <= (_local5 + 2))))) && ((_local9 > _local6)))) && ((_local9 <= (_local6 + 2))))){
if (Game.instance.canWalk(_local7.x, _local7.y)){
_local10 = Game.instance.getTileCenterPosition(_local7.x, _local7.y);
setPosition(_local10.x, _local10.y);
updateRealPosition();
doDeleteReset();
pWalkableLocs = null;
break;
};
};
};
};
if (_local3){
pTimeToDelete = (_local2 + (Game.instance.getRoleConfigure(type).deleteDelayTime * 1000));
};
};
}
override protected function createMovieClip():MovieClip{
return (new lib_generic_hooker_zombie());
}
protected function pursueRole_enter(_arg1:String):void{
setFrameLabel(STATUS_WALK);
zhn_xxxmas.application.addUpdateFunction(pursueRole_update);
}
override protected function static_enter(_arg1:String):void{
targetLoc = null;
pursuedRole = null;
nextPursuedPosition = null;
super.static_enter(_arg1);
}
protected function attack_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(attack_update);
}
override protected function isInRange(_arg1:AbstractRole):Boolean{
var _local2:Lola;
if ((_arg1 is Lola)){
_local2 = (_arg1 as Lola);
if (_local2.isInTrailer()){
return (false);
};
};
return (super.isInRange(_arg1));
}
protected function needKeepDistance(_arg1:Number):Boolean{
return ((((Math.abs(_arg1) < pTryKeepDistance)) && ((Math.random() < 0.2))));
}
protected function pursueRole_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(pursueRole_update);
}
private function setRandomLocOutOfScreen():Boolean{
var _local1:PointInt = Game.instance.getRandomLocOutOfScreen();
if (_local1){
targetLoc = _local1;
return (true);
};
return (false);
}
override public function initialize():void{
super.initialize();
pStateMachine.initState(STATUS_PURSUE_ROLE, pursueRole_enter, null, pursueRole_exit);
pStateMachine.initState(STATUS_ATTACK, attack_enter, null, attack_exit);
pTimeToDelete = (getTimer() + (Game.instance.getRoleConfigure(type).deleteDelayTime * 1000));
zhn_xxxmas.application.addUpdateFunction(deleteDelayUpdate);
}
override protected function die_enter(_arg1:String):void{
super.die_enter(_arg1);
checkKilledCombos();
}
protected function attack_update(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
if (((pursuedRole) && (!(pursuedRole.isAlive())))){
setState(STATUS_STATIC);
return;
};
if (pMovieClip.mc){
if (pMovieClip.mc.currentFrame == pMovieClip.mc.totalFrames){
setState(STATUS_STATIC);
} else {
if (!pStateMachine.data.getBoolean("didHit")){
if (pMovieClip.mc.currentFrame >= pAttackHitFrame){
_local2 = (pursuedRole.y - y);
_local3 = (pursuedRole.x - x);
if ((((((Math.abs(_local2) < 10)) && (((pMovieClip.scaleX * _local3) >= 0)))) && ((Math.abs(_local3) < Math.max(20, pHitDistance))))){
pursuedRole.goHit(false, pDamage, null, this);
pStateMachine.data.setValue("didHit", true);
};
};
};
};
};
}
override public function terminate():void{
zhn_xxxmas.application.removeUpdateFunction(deleteDelayUpdate);
super.terminate();
}
override protected function die_update(_arg1:Event):void{
var _local2:Lola;
var _local3:int;
var _local4:int;
var _local5:Number;
var _local6:Weapon;
super.die_update(_arg1);
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
_local2 = Game.instance.getLola();
_local3 = _local2.getKilledCombos();
_local4 = 5;
if (_local3 >= _local4){
_local5 = Math.min(0.75, ((_local3 - _local4) / 10));
if (Math.random() < _local5){
_local6 = new Weapon(PropertyLoader.ITEM_CASH, currentTileLoc.x, currentTileLoc.y);
Game.instance.addWeapon(_local6);
};
};
Game.instance.dashboard.updateMoney(pMoney);
Game.instance.removeRole(this);
};
}
protected function checkKilledCombos():void{
var _local1:Lola = Game.instance.getLola();
_local1.doKilledComboTest();
var _local2:int = _local1.getKilledCombos();
if (((((_local2 % Game.instance.getFactorConfig().combo) == 0)) && (!((_local2 == 0))))){
Game.instance.addCombo(new ComboSmall(x, ((y - height) - 5), _local2.toString()));
};
}
override public function canHitLolaByTouch():Boolean{
return (!(isFrozen()));
}
protected function doDeleteReset():void{
setState(STATUS_STATIC);
}
override protected function ai_think_update(_arg1:Event):void{
var _local2:AbstractRole;
var _local3:Number;
var _local4:Boolean;
var _local5:PointInt;
var _local6:int;
var _local7:PointInt;
extendFlaming();
if (isStateAllowedToThink()){
Game.instance.readdRole(this);
if (getHp() <= 0){
setHp(1);
};
_local2 = getRoleInRange();
if (_local2){
_local3 = (x - _local2.x);
if ((((Math.abs((_local2.y - y)) < 10)) && ((Math.abs(_local3) < (_local2.isRunningTo(x)) ? (pHitDistance + 80) : pHitDistance)))){
_local4 = false;
if (!needKeepDistance(_local3)){
_local4 = true;
} else {
_local5 = null;
if (_local3 > 0){
_local6 = 2;
while (_local6 > 0) {
_local5 = new PointInt((_local2.currentTileLoc.x + _local6), _local2.currentTileLoc.y);
if (Game.instance.canWalk(_local5.x, _local5.y)){
break;
} else {
_local5 = null;
};
_local6--;
};
};
if (_local5 == null){
_local6 = 2;
while (_local6 > 0) {
_local5 = new PointInt((_local2.currentTileLoc.x - _local6), _local2.currentTileLoc.y);
if (Game.instance.canWalk(_local5.x, _local5.y)){
break;
} else {
_local5 = null;
};
_local6--;
};
};
if (_local5 == null){
_local5 = getRandomLoc(3);
};
if (_local5){
targetLoc = _local5;
pursuedRole = null;
nextPursuedPosition = null;
setState(STATUS_GO_TO_LOC);
} else {
_local4 = true;
};
};
if (_local4){
targetLoc = null;
pursuedRole = _local2;
nextPursuedPosition = null;
pMovieClip.scaleX = ((_local3 > 0)) ? -1 : 1;
setState(STATUS_ATTACK);
};
} else {
if (!pursuedRole){
targetLoc = null;
pursuedRole = _local2;
nextPursuedPosition = null;
setState(STATUS_PURSUE_ROLE);
};
};
} else {
if (pStateMachine.isInState(STATUS_STATIC)){
if (!targetLoc){
_local7 = getRandomLoc(7);
if (_local7){
targetLoc = _local7;
pursuedRole = null;
nextPursuedPosition = null;
setState(STATUS_GO_TO_LOC);
} else {
setAIState(STATUS_AI_STATIC);
};
};
};
};
};
}
override protected function hit_update(_arg1:Event):Boolean{
if (((super.hit_update(_arg1)) && ((pMovieClip.mc.currentFrame == pMovieClip.mc.totalFrames)))){
if (isAlive()){
setState(STATUS_STATIC);
pAIStateMachine.data.setValue("timer", ((pReactionDelayTime - 5) - IntUtil.random(10)));
} else {
Game.instance.getRankScoreManager().addZombieScore(type);
setState(STATUS_DIE);
};
return (true);
//unresolved jump
};
return (false);
}
private function extendFlaming():void{
var _local1:AbstractAiRole;
if (((isInFlaming()) && (Game.instance.isInCamera(this)))){
for each (_local1 in Game.instance.getZombies()) {
if (((_local1.isAlive()) && (!(_local1.isInFlaming())))){
if (((_local1.hitTestRect.hitTestObject(hitTestRect)) && ((Math.abs((_local1.y - y)) < Game.instance.tileHeight)))){
_local1.setOnFire();
};
};
};
};
}
override public function setOnFire():void{
if (((!(pStateMachine.isInState(STATUS_DIE))) && (!(isInFlaming())))){
pFlamingMachine.setState(STATUS_FLAMING_TRUE);
};
}
protected function attack_enter(_arg1:String):void{
setFrameLabel(STATUS_ATTACK);
zhn_xxxmas.application.addUpdateFunction(attack_update);
pStateMachine.data.setValue("didHit", false);
}
protected function pursueRole_update(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Point;
var _local5:PointInt;
if ((((((((pursuedRole == null)) || (!(pursuedRole.isAlive())))) || (!(Game.instance.isInCamera(pursuedRole))))) || (Game.instance.isPausing()))){
setState(STATUS_STATIC);
return;
};
if (pursuedRole.type == PropertyLoader.ROLE_LOLA){
if (Lola(pursuedRole).isInTrailer()){
if (setRandomLocOutOfScreen()){
setState(STATUS_GO_TO_LOC);
return;
};
};
} else {
if (pursuedRole.type == PropertyLoader.ROLE_JOHN){
if (John(pursuedRole).isInTrailer()){
if (setRandomLocOutOfScreen()){
setState(STATUS_GO_TO_LOC);
return;
};
};
};
};
if (!isInRange(pursuedRole)){
setState(STATUS_STATIC);
} else {
if (isTouched(pursuedRole, (pursuedRole.isRunningTo(x)) ? (pHitDistance + 80) : pHitDistance)){
setState(STATUS_ATTACK);
} else {
_local2 = (x - pursuedRole.x);
_local3 = (y - pursuedRole.y);
if ((((Math.abs((y - pursuedRole.y)) < 40)) && ((Math.abs((x - pursuedRole.x)) < Math.max(16, pHitDistance))))){
_local4 = new Point(position.x, pursuedRole.position.y);
_local5 = Game.instance.getTileLocFromPosition(_local4.x, _local4.y);
if (Game.instance.getMap().canWalk(_local5.x, _local5.y)){
nextPursuedPosition = _local4;
};
};
if ((((nextPursuedPosition == null)) || (nextPursuedPosition.equals(position)))){
nextPursuedPosition = getNextTargetPosition(pursuedRole.currentTileLoc.x, pursuedRole.currentTileLoc.y);
};
if (nextPursuedPosition){
pursueTarget(nextPursuedPosition.x, nextPursuedPosition.y);
} else {
setState(STATUS_STATIC);
};
};
};
}
}
}//package
Section 252
//GnomeZombie (GnomeZombie)
package {
import flash.events.*;
import com.liquable.game.events.*;
import flash.display.*;
public class GnomeZombie extends GenericHookerZombie {
private static const STATUS_IDLE:String = "idle";
public function GnomeZombie(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
}
override public function initialize():void{
super.initialize();
pStateMachine.initState(STATUS_IDLE, idle_enter, null, idle_exit);
pStateMachine.setState(STATUS_IDLE);
}
override protected function createMovieClip():MovieClip{
return (new lib_gnome_zombie());
}
override protected function ai_think_update(_arg1:Event):void{
if (pStateMachine.isInState(STATUS_IDLE)){
} else {
super.ai_think_update(_arg1);
};
}
override protected function getRange():int{
var _local1:int = super.getRange();
if (pStateMachine.isInState(STATUS_IDLE)){
_local1 = (_local1 * 0.5);
};
return (_local1);
}
private function idle_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(idle_update);
}
override protected function doDeleteReset():void{
setState(STATUS_IDLE);
}
override protected function die_update(_arg1:Event):void{
if (((pMovieClip) && ((pMovieClip.mc.currentFrame == 18)))){
if (Game.instance.getLola().x > x){
pVelocity.x = 1;
} else {
pVelocity.x = -1;
};
};
super.die_update(_arg1);
}
override public function idle():void{
if (pStateMachine.isInState(STATUS_IDLE)){
return;
};
pStateMachine.setState(STATUS_STATIC);
}
private function idle_update(_arg1:GameApplicationUpdateEvent):void{
var _local2:MovieClip = pMovieClip.mc;
if (_local2){
if (_local2.currentFrame == _local2.totalFrames){
pStateMachine.setState(STATUS_STATIC);
} else {
if (_local2.currentFrame == 1){
if (isInRange(Game.instance.getLola())){
_local2.gotoAndPlay(2);
};
};
};
};
}
private function idle_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(idle_update);
setFrameLabel("rise");
}
override protected function icerayFrozen_enter(_arg1:String):void{
super.icerayFrozen_enter(_arg1);
}
}
}//package
Section 253
//GR_HUDButtonsTogether (GR_HUDButtonsTogether)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class GR_HUDButtonsTogether extends MovieClip {
public var buttonSoundOff:SimpleButton;
public var buttonHelp:SimpleButton;
public var buttonSoundOn:SimpleButton;
public function GR_HUDButtonsTogether(){
addFrameScript(0, frame1);
}
function frame1(){
this.initButtons();
}
}
}//package
Section 254
//grenade_fire (grenade_fire)
package {
import flash.media.*;
public dynamic class grenade_fire extends Sound {
}
}//package
Section 255
//hi_score (hi_score)
package {
import flash.net.*;
import com.adobe.crypto.*;
import flash.external.*;
public class hi_score {
public static function submit(_arg1:String, _arg2:Number):String{
var strURI:String;
var nGameId:String;
var nScore:Number;
var nTime:Number;
var strTime:String;
var strN1:String;
var strN2:String;
var n1:Number;
var n2:Number;
var nAlgo:Number;
var strToPass:String;
var encrypted_data:String;
var submission_data:String;
var variables:URLVariables;
var request:URLRequest;
var gameID = _arg1;
var score = _arg2;
try {
strURI = ExternalInterface.call("getLittleServer");
nGameId = gameID;
nScore = score;
nTime = ExternalInterface.call("getSrvrTime");
strTime = nTime.toString();
strN1 = strTime.substr(-3, 3);
strN2 = strTime.substr(-4, 3);
n1 = parseInt(strN1);
n2 = parseInt(strN2);
nAlgo = (((n1 * n2) * nScore) + nScore);
strToPass = ((((((nGameId + ",") + nScore) + ",") + nTime) + ",") + nAlgo);
encrypted_data = MD5.hash(strToPass);
submission_data = ((((((("score=" + nScore) + "|gameId=") + nGameId) + "|timestamp=") + nTime) + "|key=") + encrypted_data);
variables = new URLVariables();
variables.attr1 = submission_data;
request = new URLRequest(strURI);
request.data = variables;
navigateToURL(request, "_self");
return (submission_data);
} catch(e:Error) {
};
return (null);
}
}
}//package
Section 256
//IceQueen (IceQueen)
package {
import flash.display.*;
import flash.geom.*;
public class IceQueen extends FatZombie {
public function IceQueen(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
pFrameToThrowWeapon = 45;
pFrameToMakeSound = 43;
}
override protected function createMovieClip():MovieClip{
return (new lib_iceQueen());
}
override protected function createThrowWeapon():void{
Game.instance.addWeapon(new ThrownWeapon(PropertyLoader.ITEM_ICEBALL, this, null, (x + (pMovieClip.throwPoint.x * pMovieClip.scaleX)), (y + pMovieClip.throwPoint.y), y, new Point(((x < pursuedRole.x)) ? DIR_RIGHT : DIR_LEFT, 0)));
}
}
}//package
Section 257
//interface_button_press (interface_button_press)
package {
import flash.media.*;
public dynamic class interface_button_press extends Sound {
}
}//package
Section 258
//interface_button_rollover (interface_button_rollover)
package {
import flash.media.*;
public dynamic class interface_button_rollover extends Sound {
}
}//package
Section 259
//John (John)
package {
import flash.events.*;
import flash.display.*;
import com.liquable.utils.*;
import com.liquable.game.geom.*;
import flash.geom.*;
public class John extends AbstractAiRole {
private var pLocId:int;
private static const STATUS_WALK_TRICKED:String = "walkTricked";
private static const STATUS_DIE_TRICKED:String = "dieTricked";
private static const STATUS_HIT_TRICKED:String = "hitTricked";
private static const STATUS_STATIC_TRICKED:String = "staticTricked";
public function John(_arg1:String, _arg2:int, _arg3:int){
var _local4:Configure = Game.instance.getRoleConfigure(_arg1);
super(_arg1, _arg2, _arg3, _local4.hp, _local4.speed, _local4.range, 5, _local4.money);
pLocId = -1;
pFindPathLimit = 5000;
}
override protected function createMovieClip():MovieClip{
return (new lib_john());
}
public function getLocId():int{
return (pLocId);
}
public function goInTrailer():void{
setState(STATUS_IN_TRAILER);
}
override protected function static_enter(_arg1:String):void{
if (isTricked){
setFrameLabel(STATUS_STATIC_TRICKED);
} else {
setFrameLabel(STATUS_STATIC);
};
zhn_xxxmas.application.addUpdateFunction(static_update);
setAIState(STATUS_AI_STATIC);
pStateMachine.data.setValue("timer", 0);
pStateMachine.data.setValue("duration", 0);
}
public function isInTrailer():Boolean{
return (pStateMachine.isInState(STATUS_IN_TRAILER));
}
override public function initialize():void{
super.initialize();
pStateMachine.initState(STATUS_IN_TRAILER, inTrailer_enter, null, inTrailer_exit);
}
override protected function goToLoc_update(_arg1:Event):void{
if (((pursuedRole) && ((getLocId() == -1)))){
setLocId((pursuedRole as Lola).getAvailable9GridsLocId());
};
if (getLocId() == -1){
if (pursuedRole){
Lola(pursuedRole).lostJohn(this);
pursuedRole = null;
};
if (((isSanta()) && (targetLoc))){
super.goToLoc_update(_arg1);
} else {
setState(STATUS_STATIC);
};
} else {
targetLoc = Lola(pursuedRole).getAvailable9GridsLocAt(getLocId());
if (!Game.instance.canWalk(targetLoc.x, targetLoc.y)){
setLocId(Lola(pursuedRole).getAvailable9GridsLocId());
targetLoc = Lola(pursuedRole).getAvailable9GridsLocAt(getLocId());
};
super.goToLoc_update(_arg1);
};
}
override public function isJohn(_arg1:Boolean):Boolean{
return (true);
}
override protected function goToLoc_enter(_arg1:String):void{
if (isTricked){
setFrameLabel(STATUS_WALK_TRICKED);
} else {
setFrameLabel(STATUS_WALK);
};
zhn_xxxmas.application.addUpdateFunction(goToLoc_update);
}
override protected function die_enter(_arg1:String):void{
pFlamingMachine.setState(STATUS_FLAMING_NONE);
targetLoc = null;
pursuedRole = null;
nextPursuedPosition = null;
if (isTricked){
setFrameLabel(STATUS_DIE_TRICKED);
} else {
setFrameLabel(STATUS_DIE);
};
zhn_xxxmas.application.addUpdateFunction(die_update);
if (Math.random() < 0.5){
playSound(john_hit0);
} else {
playSound(john_hit1);
};
}
override public function goHit(_arg1:Boolean, _arg2:int, _arg3:String, _arg4:AbstractRole):void{
if ((((pursuedRole == null)) || (GameConfig.instance.hitJohnByTouch))){
super.goHit(_arg1, _arg2, _arg3, _arg4);
};
}
override protected function goToLoc_exit(_arg1:String):void{
super.goToLoc_exit(_arg1);
pStateMachine.data.setValue("SoundController", null);
}
private function inTrailer_update(_arg1:Event):void{
var _local2:Trailer;
if (currentTileLoc.equals(targetLoc)){
_local2 = Game.instance.getTrailer();
_local2.addJohn(this);
Lola(pursuedRole).lostJohn(this);
Game.instance.removeRole(this);
} else {
if ((((nextPursuedPosition == null)) || (nextPursuedPosition.equals(position)))){
nextPursuedPosition = getNextTargetPosition(targetLoc.x, targetLoc.y);
};
if (nextPursuedPosition){
pursueTarget(nextPursuedPosition.x, nextPursuedPosition.y);
} else {
Lola(pursuedRole).lostJohn(this);
setState(STATUS_STATIC);
};
};
}
override protected function getNextTargetPosition(_arg1:int, _arg2:int):Point{
var _local3:Point = super.getNextTargetPosition(_arg1, _arg2);
if ((((_local3 == null)) && (((!((currentTileLoc.x == _arg1))) || (!((currentTileLoc.y == _arg2))))))){
if (pursuedRole != null){
Lola(pursuedRole).lostJohn(this);
};
};
return (_local3);
}
override protected function isStateAllowedToThink():Boolean{
return (((!(pStateMachine.isInState(STATUS_IN_TRAILER))) && (super.isStateAllowedToThink())));
}
private function inTrailer_enter(_arg1:String):void{
targetLoc = null;
nextPursuedPosition = null;
DesignContract.preCondition((pursuedRole == Game.instance.getLola()), "John is not following lola and is entering the trailer");
setHp(0);
var _local2:Trailer = Game.instance.getTrailer();
targetLoc = _local2.currentTileLoc;
setFrameLabel(STATUS_WALK_TRICKED);
zhn_xxxmas.application.addUpdateFunction(inTrailer_update);
}
override protected function die_update(_arg1:Event):void{
super.die_update(_arg1);
if (pMovieClip.mc.currentFrame == pMovieClip.mc.totalFrames){
Game.instance.removeRole(this);
};
}
override protected function hit_enter(_arg1:String):void{
targetLoc = null;
nextPursuedPosition = null;
if (pursuedRole){
Lola(pursuedRole).lostJohn(this);
};
setHp(0);
if (isTricked){
setFrameLabel(STATUS_HIT_TRICKED);
} else {
setFrameLabel(STATUS_HIT);
};
zhn_xxxmas.application.addUpdateFunction(hit_update);
if (Math.random() < 0.5){
playSound(john_hit0);
} else {
playSound(john_hit1);
};
}
override protected function ai_think_update(_arg1:Event):void{
var _local2:AbstractAiRole;
var _local3:Lola;
var _local4:PointInt;
if (((((!(isSanta())) && (GameConfig.instance.hitJohnByTouch))) && (isStateAllowedToThink()))){
if (Game.instance.isInCamera(this)){
for each (_local2 in Game.instance.getZombies()) {
if (((!(_local2.isJohn(true))) && (Game.instance.isInCamera(_local2)))){
if (_local2.isTouched(this)){
goHit(false, Game.instance.getRoleConfigure(_local2.type).damage, null, _local2);
return;
};
};
};
};
};
if (isStateAllowedToThink()){
if (pursuedRole){
_local3 = (pursuedRole as Lola);
if (_local3.isInTrailer()){
goInTrailer();
} else {
if (getLocId() == -1){
setLocId(_local3.getAvailable9GridsLocId());
};
_local4 = _local3.getAvailable9GridsLocAt(getLocId());
if (!_local4.equals(currentTileLoc)){
setState(STATUS_GO_TO_LOC);
};
};
};
};
}
public function get isTricked():Boolean{
return (!((pursuedRole == null)));
}
override protected function hit_update(_arg1:Event):Boolean{
if (((super.hit_update(_arg1)) && ((pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames)))){
setState(STATUS_DIE);
return (true);
};
return (false);
}
private function inTrailer_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(inTrailer_update);
}
public function setLocId(_arg1:int):void{
pLocId = _arg1;
}
override protected function static_update(_arg1:Event):void{
var _local2:int = (pStateMachine.data.getInt("timer") + 1);
var _local3:int = pStateMachine.data.getInt("duration");
if (_local2 > _local3){
_local2 = 0;
pStateMachine.data.setValue("duration", IntUtil.randomBetween(20, 150));
pMovieClip.scaleX = ((Math.random() > 0.5)) ? 1 : -1;
};
pStateMachine.data.setValue("timer", _local2);
}
public function touchTestWithLola(_arg1:Lola):Boolean{
return ((((Math.abs((_arg1.x - x)) < 40)) && ((Math.abs((_arg1.y - y)) < 20))));
}
}
}//package
Section 260
//john_hit0 (john_hit0)
package {
import flash.media.*;
public dynamic class john_hit0 extends Sound {
}
}//package
Section 261
//john_hit1 (john_hit1)
package {
import flash.media.*;
public dynamic class john_hit1 extends Sound {
}
}//package
Section 262
//john_pickup (john_pickup)
package {
import flash.media.*;
public dynamic class john_pickup extends Sound {
}
}//package
Section 263
//lib_ankle_biter_zombie (lib_ankle_biter_zombie)
package {
import flash.display.*;
public dynamic class lib_ankle_biter_zombie extends MovieClip {
public var hitTestRect:MovieClip;
public var shadowClip:MovieClip;
public var mc:MovieClip;
public function lib_ankle_biter_zombie(){
addFrameScript(0, frame1);
}
function frame1(){
hitTestRect.visible = false;
}
}
}//package
Section 264
//lib_biggift_explode (lib_biggift_explode)
package {
import flash.display.*;
public dynamic class lib_biggift_explode extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 265
//lib_blood_0 (lib_blood_0)
package {
import flash.display.*;
public dynamic class lib_blood_0 extends MovieClip {
}
}//package
Section 266
//lib_blood_1 (lib_blood_1)
package {
import flash.display.*;
public dynamic class lib_blood_1 extends MovieClip {
}
}//package
Section 267
//lib_blood_2 (lib_blood_2)
package {
import flash.display.*;
public dynamic class lib_blood_2 extends MovieClip {
}
}//package
Section 268
//lib_blood_3 (lib_blood_3)
package {
import flash.display.*;
public dynamic class lib_blood_3 extends MovieClip {
}
}//package
Section 269
//lib_button_adultswim (lib_button_adultswim)
package {
import flash.display.*;
public dynamic class lib_button_adultswim extends SimpleButton {
}
}//package
Section 270
//lib_comboTextSmall (lib_comboTextSmall)
package {
import flash.display.*;
public dynamic class lib_comboTextSmall extends MovieClip {
public var combosText:MovieClip;
}
}//package
Section 271
//lib_control_panel (lib_control_panel)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class lib_control_panel extends MovieClip {
public var thePanel:MovieClip;
public var mStoryClip:MovieClip;
public function lib_control_panel(){
addFrameScript(7, frame8, 8, frame9, 22, frame23, 29, frame30);
}
function frame8(){
stop();
this.initStoryPanel(this.mStoryClip);
}
function frame23(){
stop();
this.initPanel(this.thePanel.buttonClose, this.thePanel.buttonMoreGames);
}
function frame9(){
this.mStoryClip.mouseChildren = false;
}
function frame30(){
this.panelOver(this);
}
}
}//package
Section 272
//lib_deathKiss (lib_deathKiss)
package {
import flash.display.*;
public dynamic class lib_deathKiss extends MovieClip {
public var hitTestRect:MovieClip;
public function lib_deathKiss(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package
Section 273
//lib_decomposed_zombie (lib_decomposed_zombie)
package {
import flash.display.*;
public dynamic class lib_decomposed_zombie extends MovieClip {
public var attackTestRect:MovieClip;
public var hitTestRect:MovieClip;
public var shadowClip:MovieClip;
public var mc:MovieClip;
public function lib_decomposed_zombie(){
addFrameScript(0, frame1);
}
function frame1(){
attackTestRect.visible = false;
hitTestRect.visible = false;
}
}
}//package
Section 274
//lib_decomposed_zombie2 (lib_decomposed_zombie2)
package {
import flash.display.*;
public dynamic class lib_decomposed_zombie2 extends MovieClip {
public var attackTestRect:MovieClip;
public var hitTestRect:MovieClip;
public var shadowClip:MovieClip;
public var mc:MovieClip;
public function lib_decomposed_zombie2(){
addFrameScript(0, frame1);
}
function frame1(){
attackTestRect.visible = false;
hitTestRect.visible = false;
}
}
}//package
Section 275
//lib_explode (lib_explode)
package {
import flash.display.*;
public dynamic class lib_explode extends MovieClip {
public function lib_explode(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package
Section 276
//lib_fat_zombie (lib_fat_zombie)
package {
import flash.display.*;
public dynamic class lib_fat_zombie extends MovieClip {
public var hitTestRect:MovieClip;
public var throwPoint:MovieClip;
public var shadowClip:MovieClip;
public var mc:MovieClip;
public function lib_fat_zombie(){
addFrameScript(0, frame1);
}
function frame1(){
hitTestRect.visible = false;
throwPoint.visible = false;
}
}
}//package
Section 277
//lib_fireSpitter_zombie (lib_fireSpitter_zombie)
package {
import flash.display.*;
public dynamic class lib_fireSpitter_zombie extends MovieClip {
public var hitTestRect:MovieClip;
public var throwPoint:MovieClip;
public var shadowClip:MovieClip;
public var mc:MovieClip;
public function lib_fireSpitter_zombie(){
addFrameScript(0, frame1);
}
function frame1(){
hitTestRect.visible = false;
throwPoint.visible = false;
}
}
}//package
Section 278
//lib_gameover_panel (lib_gameover_panel)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class lib_gameover_panel extends MovieClip {
public var thePanel:MovieClip;
public function lib_gameover_panel(){
addFrameScript(7, frame8, 14, frame15);
}
function frame15(){
this.panelOver(this);
}
function frame8(){
stop();
this.initPanel(thePanel, thePanel.buttonSubmitScore, thePanel.buttonPlayAgain, thePanel.buttonHighscores, thePanel.buttonMoreGames);
}
}
}//package
Section 279
//lib_generic_hooker_zombie (lib_generic_hooker_zombie)
package {
import flash.display.*;
public dynamic class lib_generic_hooker_zombie extends MovieClip {
public var attackTestRect:MovieClip;
public var hitTestRect:MovieClip;
public var shadowClip:MovieClip;
public var mc:MovieClip;
public function lib_generic_hooker_zombie(){
addFrameScript(0, frame1);
}
function frame1(){
hitTestRect.visible = false;
attackTestRect.visible = false;
}
}
}//package
Section 280
//lib_gnome_zombie (lib_gnome_zombie)
package {
import flash.display.*;
public dynamic class lib_gnome_zombie extends MovieClip {
public var attackTestRect:MovieClip;
public var hitTestRect:MovieClip;
public var shadowClip:MovieClip;
public var mc:MovieClip;
public function lib_gnome_zombie(){
addFrameScript(0, frame1);
}
function frame1(){
hitTestRect.visible = false;
attackTestRect.visible = false;
}
}
}//package
Section 281
//lib_hud_messages (lib_hud_messages)
package {
import flash.display.*;
public dynamic class lib_hud_messages extends MovieClip {
public var aa:MovieClip;
public function lib_hud_messages(){
addFrameScript(0, frame1, 5, frame6, 52, frame53, 99, frame100, 146, frame147);
}
function frame6(){
stop();
}
function frame1(){
stop();
}
function frame100(){
stop();
}
function frame53(){
stop();
}
function frame147(){
stop();
}
}
}//package
Section 282
//lib_ice_sparkle (lib_ice_sparkle)
package {
import flash.display.*;
public dynamic class lib_ice_sparkle extends MovieClip {
}
}//package
Section 283
//lib_iceQueen (lib_iceQueen)
package {
import flash.display.*;
public dynamic class lib_iceQueen extends MovieClip {
public var hitTestRect:MovieClip;
public var throwPoint:MovieClip;
public var mc:MovieClip;
public function lib_iceQueen(){
addFrameScript(0, frame1);
}
function frame1(){
hitTestRect.visible = false;
throwPoint.visible = false;
}
}
}//package
Section 284
//lib_john (lib_john)
package {
import flash.display.*;
public dynamic class lib_john extends MovieClip {
public var hitTestRect:MovieClip;
public var shadowClip:MovieClip;
public var mc:MovieClip;
public function lib_john(){
addFrameScript(0, frame1);
}
function frame1(){
hitTestRect.visible = false;
}
}
}//package
Section 285
//lib_loader_loop (lib_loader_loop)
package {
import flash.display.*;
public dynamic class lib_loader_loop extends MovieClip {
}
}//package
Section 286
//lib_lola (lib_lola)
package {
import flash.display.*;
public dynamic class lib_lola extends MovieClip {
public var mc_caneSwing:MovieClip;
public var mc_walkWithShootgunShoot:MovieClip;
public var mc_zombieLegSwingWalk:MovieClip;
public var mc_walkWithBussShoot:MovieClip;
public var mc_golfClubSwingWalk:MovieClip;
public var mc_staticWithRifle:MovieClip;
public var mc_staticWithBuss:MovieClip;
public var mc_swordSwingWalk:MovieClip;
public var mc_walkWithFlameThrower:MovieClip;
public var mc_staticWithShootgunShoot:MovieClip;
public var hitTestRect:MovieClip;
public var throwPoint:MovieClip;
public var mc_die:MovieClip;
public var mc_xmasCaneSwing:MovieClip;
public var mc_butthitting:MovieClip;
public var mc_staticWithShootgun:MovieClip;
public var mc_walkWithLauncher:MovieClip;
public var mc_tease:MovieClip;
public var mc_staticWithUzi:MovieClip;
public var mc_walkWithUzi:MovieClip;
public var mc_walkWithLauncherShoot:MovieClip;
public var mc_walkWithIceray:MovieClip;
public var mc_boneSwingWalk:MovieClip;
public var mc_staticWithFlameThrower:MovieClip;
public var mc_staticWithRifleShoot:MovieClip;
public var mc_golfClubSwing:MovieClip;
public var mc_staticWithLauncherShoot:MovieClip;
public var mc_staticWithIceray:MovieClip;
public var mc_walkWithFlameThrowerShoot:MovieClip;
public var mc_walkWithBuss:MovieClip;
public var swingTestRect:MovieClip;
public var mc_walk:MovieClip;
public var mc_staticWithIcerayShoot:MovieClip;
public var mc_lightWhipSwingWalk:MovieClip;
public var mc_panSwing:MovieClip;
public var mc_walkWithRifle:MovieClip;
public var mc_shovelSwing:MovieClip;
public var punchTestRect:MovieClip;
public var mc_throw:MovieClip;
public var mc_service:MovieClip;
public var mc_walkWithRifleShoot:MovieClip;
public var mc_walkWithUziShoot:MovieClip;
public var mc_tireIronSwingWalk:MovieClip;
public var mc_boneSwing:MovieClip;
public var mc_static:MovieClip;
public var mc_punch:MovieClip;
public var shootgunPoint:MovieClip;
public var mc_kick:MovieClip;
public var mc_staticWithLauncher:MovieClip;
public var mc_frozen:MovieClip;
public var mc_hit:MovieClip;
public var whipTestRect:MovieClip;
public var mc_swordSwing:MovieClip;
public var mc_lightWhipSwing:MovieClip;
public var mc_staticWithFlameThrowerShoot:MovieClip;
public var mc_walkWithShootgun:MovieClip;
public var uziPoint:MovieClip;
public var mc_zombieLegSwing:MovieClip;
public var mc_tireIronSwing:MovieClip;
public var mc_xmasCaneSwingWalk:MovieClip;
public var mc_walkWithIcerayShoot:MovieClip;
public var mc_staticWithBussShoot:MovieClip;
public var mc_panSwingWalk:MovieClip;
public var mc_shovelSwingWalk:MovieClip;
public var mc_staticWithUziShoot:MovieClip;
public var mc_caneSwingWalk:MovieClip;
public var isSwing:Boolean;
public function lib_lola(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
punchTestRect.visible = false;
hitTestRect.visible = false;
swingTestRect.visible = false;
throwPoint.visible = false;
shootgunPoint.visible = false;
uziPoint.visible = false;
whipTestRect.visible = false;
isSwing = false;
}
function frame2(){
stop();
}
}
}//package
Section 287
//lib_money_popup (lib_money_popup)
package {
import flash.display.*;
public dynamic class lib_money_popup extends MovieClip {
public function lib_money_popup(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
if (parent){
parent.removeChild(this);
};
}
}
}//package
Section 288
//lib_oldmanwinter (lib_oldmanwinter)
package {
import flash.display.*;
public dynamic class lib_oldmanwinter extends MovieClip {
public var attackTestRect:MovieClip;
public var hitTestRect:MovieClip;
public var mc:MovieClip;
public function lib_oldmanwinter(){
addFrameScript(0, frame1);
}
function frame1(){
hitTestRect.visible = false;
attackTestRect.visible = false;
}
}
}//package
Section 289
//lib_preloader (lib_preloader)
package {
import flash.display.*;
public dynamic class lib_preloader extends MovieClip {
public var buttonAdultswim:SimpleButton;
}
}//package
Section 290
//lib_purple_decomposed_zombie (lib_purple_decomposed_zombie)
package {
import flash.display.*;
public dynamic class lib_purple_decomposed_zombie extends MovieClip {
public var attackTestRect:MovieClip;
public var hitTestRect:MovieClip;
public var shadowClip:MovieClip;
public var mc:MovieClip;
public function lib_purple_decomposed_zombie(){
addFrameScript(0, frame1);
}
function frame1(){
attackTestRect.visible = false;
hitTestRect.visible = false;
}
}
}//package
Section 291
//lib_reindeer (lib_reindeer)
package {
import flash.display.*;
public dynamic class lib_reindeer extends MovieClip {
public var hitTestRect:MovieClip;
public var throwPoint:MovieClip;
public var shadowClip:MovieClip;
public var mc:MovieClip;
public function lib_reindeer(){
addFrameScript(0, frame1);
}
function frame1(){
hitTestRect.visible = false;
}
}
}//package
Section 292
//lib_reindeer2 (lib_reindeer2)
package {
import flash.display.*;
public dynamic class lib_reindeer2 extends MovieClip {
public var attackTestRect:MovieClip;
public var hitTestRect:MovieClip;
public var shadowClip:MovieClip;
public var mc:MovieClip;
public function lib_reindeer2(){
addFrameScript(0, frame1);
}
function frame1(){
hitTestRect.visible = false;
}
}
}//package
Section 293
//lib_santa (lib_santa)
package {
import flash.display.*;
public dynamic class lib_santa extends MovieClip {
public var hitTestRect:MovieClip;
public var shadowClip:MovieClip;
public var mc:MovieClip;
public function lib_santa(){
addFrameScript(0, frame1);
}
function frame1(){
hitTestRect.visible = false;
}
}
}//package
Section 294
//lib_screen_cover (lib_screen_cover)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.geom.*;
import flash.xml.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.net.*;
import flash.utils.*;
import flash.text.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.system.*;
import flash.ui.*;
public dynamic class lib_screen_cover extends MovieClip {
public var buttonAdultswim:SimpleButton;
public var buttonSoundOff:SimpleButton;
public var clipButtonOver:MovieClip;
public var buttonMoregames:SimpleButton;
public var buttonSoundOn:SimpleButton;
public var buttonEpisode1:SimpleButton;
public function lib_screen_cover(){
addFrameScript(1, frame2, 10, frame11, 19, frame20, 20, frame21);
}
function frame21(){
stop();
}
function frame20(){
this.screenOver();
}
function frame2(){
this.initScreen(this.buttonEpisode1);
}
function frame11(){
stop();
this.onScreenReady(this.buttonEpisode1);
}
}
}//package
Section 295
//lib_snow_effect (lib_snow_effect)
package {
import flash.display.*;
public dynamic class lib_snow_effect extends Sprite {
}
}//package
Section 296
//lib_thrownWeapon (lib_thrownWeapon)
package {
import flash.display.*;
public dynamic class lib_thrownWeapon extends MovieClip {
public var hitTestRect:MovieClip;
public var mc:MovieClip;
}
}//package
Section 297
//lib_trailer (lib_trailer)
package {
import flash.display.*;
public dynamic class lib_trailer extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 298
//lib_weaponBob (lib_weaponBob)
package {
import flash.display.*;
public dynamic class lib_weaponBob extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 299
//lib_weaponPop (lib_weaponPop)
package {
import flash.display.*;
public dynamic class lib_weaponPop extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 300
//Lola (Lola)
package {
import flash.events.*;
import com.liquable.media.*;
import com.liquable.game.debug.*;
import com.liquable.game.events.*;
import flash.display.*;
import com.liquable.game.postoffice.*;
import com.liquable.utils.*;
import com.liquable.game.geom.*;
import flash.geom.*;
import com.liquable.game.ui.*;
import flash.utils.*;
import flash.ui.*;
public class Lola extends AbstractRole {
private var pFlameThrowerSound:SoundController;
private var pMaxHp:int;
private var pAvailableLocs:Array;
private var pKilledCombos:int;
private var pController:UIController;
private var pTrickRange:int;
private var pFrisbee:ThrownWeapon;
private var pTrickedJohns:Array;
private var pDelaySnowEffect:int;// = 0
private var pCurrentWeapon:Weapon;
private var pUziSound:SoundController;
private var pPunchDamage:int;
private var pInvincible:int;
private var pPunchDistance:int;
private var pPunchKnockback:int;
private var pPrevVelocity:Point;
private var pPreviousKilledTime:int;
private var pFeetStateMachine:PostStateClient;
public static const STATUS_STATIC_WITH_BUSS_SHOOT:String = "staticWithBussShoot";
public static const STATUS_PUNCH:String = "punch";
public static const STATUS_WALK_WITH_BUSS_SHOOT:String = "walkWithBussShoot";
public static const STATUS_STATIC_WITH_ICERAY_SHOOT:String = "staticWithIcerayShoot";
public static const STATUS_FROZEN:String = "frozen";
public static const STATUS_WALK_WITH_ICERAY:String = "walkWithIceray";
public static const STATUS_WALK_WITH_SHOOTGUN:String = "walkWithShootgun";
public static const STATUS_STATIC_WITH_RIFLE_SHOOT:String = "staticWithRifleShoot";
public static const STATUS_STATIC_WITH_BUSS:String = "staticWithBuss";
public static const STATUS_STATIC_WITH_ICERAY:String = "staticWithIceray";
public static const STATUS_STATIC_WITH_LAUNCHER:String = "staticWithLauncher";
public static const STATUS_EXIT_TRAILER:String = "exitTrailer";
public static const STATUS_BUTTHITTING:String = "butthitting";
public static const STATUS_HIT:String = "hit";
public static const STATUS_STATIC_WITH_UZI:String = "staticWithUzi";
public static const STATUS_STATIC_WITH_SHOOTGUN_SHOOT:String = "staticWithShootgunShoot";
public static const STATUS_WALK_WITH_FLAME_THROWER_SHOOT:String = "walkWithFlameThrowerShoot";
public static const STATUS_THROW:String = "throw";
public static const STATUS_TEASE:String = "tease";
public static const STATUS_STATIC_WITH_SHOOTGUN:String = "staticWithShootgun";
public static const STATUS_WALK_WITH_BUSS:String = "walkWithBuss";
public static const STATUS_DEFEATED:String = "defeated";
public static const STATUS_SERVICE:String = "service";
public static const STATUS_WALK_WITH_ICERAY_SHOOT:String = "walkWithIcerayShoot";
public static const STATUS_SWING:String = "swing";
public static const STATUS_STATIC_WITH_RIFLE:String = "staticWithRifle";
public static const STATUS_STATIC_WITH_LAUNCHER_SHOOT:String = "staticWithLauncherShoot";
public static const STATUS_WALK_WITH_RIFLE_SHOOT:String = "walkWithRifleShoot";
public static const STATUS_WALK_WITH_RIFLE:String = "walkWithRifle";
public static const STATUS_WALK_WITH_SHOOTGUN_SHOOT:String = "walkWithShootgunShoot";
public static const STATUS_WALK_WITH_LAUNCHER_SHOOT:String = "walkWithLauncherShoot";
public static const STATUS_STATIC_WITH_FLAME_THROWER_SHOOT:String = "staticWithFlameThrowerShoot";
public static const STATUS_WALK_WITH_UZI_SHOOT:String = "walkWithUziShoot";
public static const STATUS_STATIC_WITH_UZI_SHOOT:String = "staticWithUziShoot";
public static const STATUS_WALK_WITH_FLAME_THROWER:String = "walkWithFlameThrower";
public static const STATUS_STATIC_WITH_FLAME_THROWER:String = "staticWithFlameThrower";
private static const KEY_X:int = 88;
public static const STATUS_WALK_WITH_UZI:String = "walkWithUzi";
public static const STATUS_SWING_WALK:String = "swingWalk";
public static const STATUS_WALK_WITH_LAUNCHER:String = "walkWithLauncher";
public static var LAST_WEAPON_AMOUNT:int;
public static var LAST_WEAPON_TYPE:String;
public function Lola(_arg1:String, _arg2:int, _arg3:int){
var _local4:Configure = Game.instance.getRoleConfigure(_arg1);
pMaxHp = _local4.hp;
pPunchDistance = _local4.hitDistance;
super(_arg1, _arg2, _arg3, _local4.hp, _local4.speed);
pPunchDamage = _local4.punchDamage;
pPunchKnockback = _local4.punchKnockback;
pTrickRange = 6;
pKilledCombos = 0;
pPreviousKilledTime = int.MAX_VALUE;
pInvincible = 0;
}
override protected function adjustLayer(_arg1:Event):void{
var _local2:MapObject;
var _local3:GenericHookerZombie;
for each (_local2 in Game.instance.getMapObjects()) {
if (Game.instance.isInCamera(_local2)){
if (Game.instance.getObjectIndex(_local2) > Game.instance.getObjectIndex(this)){
if (_local2.depth < depth){
Game.instance.swapObjects(this, _local2);
};
};
if (((((((isAlive()) && (GameConfig.instance.hitLolaByTouch))) && (!(pStateMachine.isInState(STATUS_HIT))))) && (_local2.canHitLolaByTouch()))){
_local3 = (_local2 as GenericHookerZombie);
if (((_local3.isAlive()) && (_local3.isTouched(this)))){
goHit(false, Game.instance.getRoleConfigure(_local3.type).damage, null, _local3);
};
};
};
};
if (invincible > 0){
visible = !(visible);
invincible--;
} else {
visible = true;
};
}
private function killedTimeCount_update(_arg1:Event):void{
var _local3:int;
var _local4:int;
var _local5:int;
var _local2:int = getTimer();
if ((_local2 - pPreviousKilledTime) > (Game.instance.getRoleConfigure(type).comboTime * 1000)){
_local3 = Game.instance.getFactorConfig().combo;
_local4 = (int((pKilledCombos / _local3)) * _local3);
if (_local4 >= _local3){
_local5 = (_local4 * 1000);
};
pKilledCombos = 0;
pPreviousKilledTime = int.MAX_VALUE;
zhn_xxxmas.application.removeUpdateFunction(killedTimeCount_update);
};
}
override protected function createMovieClip():MovieClip{
return (new lib_lola());
}
private function staticWithBussShoot_exit(_arg1:String):void{
updateKeyboardState();
pMovieClip.mc.gotoAndStop(1);
zhn_xxxmas.application.removeUpdateFunction(staticWithBussShoot_update);
}
private function roleMoveProcess(_arg1:Number, _arg2:Number):void{
var _local7:Object;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Trailer;
var _local3:Game = Game.instance;
if (pDelaySnowEffect > 0){
pDelaySnowEffect--;
};
var _local4:int = _local3.getMap().getSnowSlowLevel(currentTileLoc.x, currentTileLoc.y);
if (_local4 > 0){
if (((_arg1) || (_arg2))){
_local9 = (1 - (_local4 / 7));
_arg1 = (_arg1 * _local9);
_arg2 = (_arg2 * _local9);
pPrevVelocity = null;
if (pDelaySnowEffect <= 0){
pDelaySnowEffect = 5;
Game.instance.addSnowEffect(x, y);
};
};
} else {
if (_local3.getMap().isIceTile(currentTileLoc.x, currentTileLoc.y)){
if (pPrevVelocity){
if (_arg1 == 0){
if (Math.abs(pPrevVelocity.x) < 1){
pPrevVelocity.x = 0;
};
};
if (_arg2 == 0){
if (Math.abs(pPrevVelocity.y) < 1){
pPrevVelocity.y = 0;
};
};
_local10 = 0.025;
_local11 = (1 - _local10);
pPrevVelocity.x = ((_arg1 * _local10) + (pPrevVelocity.x * _local11));
_arg1 = pPrevVelocity.x;
pPrevVelocity.y = ((_arg2 * _local10) + (pPrevVelocity.y * _local11));
_arg2 = pPrevVelocity.y;
} else {
pPrevVelocity = new Point(_arg1, _arg2);
};
} else {
pPrevVelocity = null;
};
};
if ((((_arg1 == 0)) && ((_arg2 == 0)))){
return;
};
setPosition((position.x + _arg1), (position.y + _arg2));
var _local5:Point = _local3.getTileCenterPosition(currentTileLoc.x, currentTileLoc.y);
if ((((_arg2 > 0)) && (!(_local3.canWalk(currentTileLoc.x, currentTileLoc.y))))){
setPosition(position.x, (_local3.getTilePosition(currentTileLoc.x, currentTileLoc.y).y - 1));
_local5 = _local3.getTileCenterPosition(currentTileLoc.x, currentTileLoc.y);
};
var _local6:Boolean;
var _local8:Number = (_local3.tileHeight - 3);
if (_arg1 > 0){
if (position.x > _local5.x){
if (_local3.canWalk((currentTileLoc.x + 1), currentTileLoc.y)){
if (position.y > _local5.y){
} else {
if (position.y < _local5.y){
if (!_local3.canWalk((currentTileLoc.x + 1), (currentTileLoc.y - 1))){
_local7 = position.x;
position.x = _local5.x;
_local6 = true;
};
};
};
} else {
position.x = _local5.x;
_local6 = true;
};
};
} else {
if (_arg1 < 0){
if (position.x < _local5.x){
if (_local3.canWalk((currentTileLoc.x - 1), currentTileLoc.y)){
if (position.y > _local5.y){
} else {
if (position.y < _local5.y){
if (!_local3.canWalk((currentTileLoc.x - 1), (currentTileLoc.y - 1))){
_local7 = position.x;
position.x = _local5.x;
_local6 = true;
};
};
};
} else {
position.x = _local5.x;
_local6 = true;
};
};
};
};
if (_arg2 > 0){
} else {
if (_arg2 < 0){
if (position.y < _local5.y){
if (_local3.canWalk(currentTileLoc.x, (currentTileLoc.y - 1))){
if (position.x > _local5.x){
if (!_local3.canWalk((currentTileLoc.x + 1), (currentTileLoc.y - 1))){
_local12 = Game.instance.getTrailer();
if ((((_local12.currentTileLoc.x == currentTileLoc.x)) && ((_local12.currentTileLoc.y == (currentTileLoc.y - 1))))){
position.x = MathUtil.numberFollowTarget(position.x, _local5.x, 0.5, 1);
} else {
position.y = _local5.y;
};
_local6 = true;
};
} else {
if (position.x < _local5.x){
if (!_local3.canWalk((currentTileLoc.x - 1), (currentTileLoc.y - 1))){
_local12 = Game.instance.getTrailer();
if ((((_local12.currentTileLoc.x == currentTileLoc.x)) && ((_local12.currentTileLoc.y == (currentTileLoc.y - 1))))){
position.x = MathUtil.numberFollowTarget(position.x, _local5.x, 0.5, 1);
} else {
position.y = _local5.y;
};
_local6 = true;
};
};
};
} else {
position.y = _local5.y;
_local6 = true;
if (_local7){
position.x = (_local7 as Number);
};
};
};
};
};
if (_local6){
setPosition(position.x, position.y);
};
updateRealPosition();
}
private function walkWithFlameThrowerShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_WALK_WITH_FLAME_THROWER_SHOOT);
pMovieClip.mc_walkWithFlameThrowerShoot.fire.gotoAndPlay(1);
zhn_xxxmas.application.addUpdateFunction(walkWithFlameThrowerShoot_update);
playFlameThrowerSound();
}
override public function setHp(_arg1:int):void{
super.setHp(_arg1);
Game.instance.dashboard.updateHpBar((_arg1 / pMaxHp));
}
private function checkWeaponAmount():Boolean{
currentWeapon.decreaseAmount();
if (currentWeapon.amount == 0){
delayGenerateWeapon(currentWeapon.type);
Game.instance.removeWeapon(currentWeapon);
currentWeapon = null;
LAST_WEAPON_TYPE = null;
return (false);
};
LAST_WEAPON_AMOUNT = currentWeapon.amount;
return (true);
}
private function walkWithIcerayShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_WALK_WITH_ICERAY_SHOOT);
pMovieClip.mc_walkWithIcerayShoot.gun.fire.gotoAndPlay(2);
zhn_xxxmas.application.addUpdateFunction(walkWithIcerayShoot_update);
playIceraySound();
pStateMachine.data.setValue("icerayTimer", 0);
}
private function exitTrailer_update(_arg1:Event):void{
var _local2:int = (pStateMachine.data.getInt("timer") + 1);
pStateMachine.data.setValue("timer", _local2);
pMovieClip.y = MathUtil.numberFollowTarget(pMovieClip.y, 0, 0.1, 1, 2);
if (pMovieClip.y == 0){
setState(STATUS_STATIC);
setFeetState(STATUS_STATIC);
};
}
private function doIcerayShoot():void{
if (currentWeapon.amount > 0){
if (pFeetStateMachine.isInState(STATUS_WALK)){
setState(STATUS_WALK_WITH_ICERAY_SHOOT);
} else {
setState(STATUS_STATIC_WITH_ICERAY_SHOOT);
};
};
}
private function feetRun_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(feetRun_update);
}
private function staticWithIcerayShoot_exit(_arg1:String):void{
if (((currentWeapon) && ((currentWeapon.type == PropertyLoader.ITEM_ICERAY)))){
checkWeaponAmount();
};
pMovieClip.mc_staticWithIcerayShoot.gun.fire.gotoAndStop(1);
updateKeyboardState();
zhn_xxxmas.application.removeUpdateFunction(staticWithIcerayShoot_update);
stopIceraySound();
}
private function pickingWeaponProcess():void{
var _local1:MovableObject;
var _local2:int;
var _local3:int;
for each (_local1 in Game.instance.getWeapons()) {
if ((((Math.abs((currentTileLoc.x - _local1.currentTileLoc.x)) < 2)) && ((Math.abs((currentTileLoc.y - _local1.currentTileLoc.y)) < 2)))){
_local2 = ((_local1.type == PropertyLoader.ITEM_CASH)) ? 50 : 35;
_local3 = ((_local1.type == PropertyLoader.ITEM_CASH)) ? 20 : 15;
if ((((((_local1 is Weapon)) && (_local1.isTouched(this, _local2, _local3)))) && (_local1.isInState(Weapon.STATUS_BOB)))){
if (_local1.type == PropertyLoader.ITEM_CASH){
Game.instance.dashboard.updateMoney(Game.instance.getWeaponConfigure(_local1.type).money);
} else {
if (_local1.type == PropertyLoader.ITEM_HEART){
setHp((getHp() + Game.instance.getWeaponConfigure(_local1.type).heal));
} else {
if (currentWeapon){
delayGenerateWeapon(currentWeapon.type);
currentWeapon = null;
};
currentWeapon = (_local1 as Weapon);
Game.instance.getRankScoreManager().addWeaponScore();
LAST_WEAPON_TYPE = currentWeapon.type;
LAST_WEAPON_AMOUNT = currentWeapon.amount;
pController.resetKey(Keyboard.SPACE);
};
};
(_local1 as Weapon).goPop();
break;
};
};
};
}
private function doShootgunShoot():void{
var _local1:int;
while (_local1 < 5) {
Game.instance.addWeapon(new ThrownWeapon(PropertyLoader.ITEM_BULLET, this, currentWeapon, (x + (pMovieClip.shootgunPoint.x * pMovieClip.scaleX)), (y + pMovieClip.shootgunPoint.y), y, new Point(pMovieClip.scaleX, (-0.07 + (0.035 * _local1)))));
_local1++;
};
}
private function calculateKnockbackX():Number{
var _local2:Point;
var _local1:Number = Game.instance.getWeaponConfigure(PropertyLoader.ITEM_SHOOTGUN).knockback;
if (!Game.instance.canWalk((currentTileLoc.x - pMovieClip.scaleX), currentTileLoc.y)){
_local2 = Game.instance.getTileCenterPosition(currentTileLoc.x, currentTileLoc.y);
if (pMovieClip.scaleX == DIR_RIGHT){
if (position.x <= _local2.x){
_local1 = 0;
} else {
_local1 = Math.min(_local1, (position.x - _local2.x));
};
} else {
if (position.x >= _local2.x){
_local1 = 0;
} else {
_local1 = Math.min(_local1, (_local2.x - position.x));
};
};
};
return ((-(pMovieClip.scaleX) * _local1));
}
private function staticWithLauncherShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_STATIC_WITH_LAUNCHER_SHOOT);
setFeetState(STATUS_STATIC_WITH_SHOOTGUN_SHOOT);
pMovieClip.mc.gotoAndPlay(1);
zhn_xxxmas.application.addUpdateFunction(staticWithLauncherShoot_update);
}
private function staticWithBussShoot_update(_arg1:Event):void{
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
setState(STATUS_STATIC);
} else {
if (pMovieClip.mc.currentFrame == 2){
roleMoveProcess(calculateKnockbackX(), 0);
updateRealPosition();
doBussShoot();
Game.instance.getCamera().shakeCamera();
currentWeapon.playSoundOfUsing();
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
}
private function walkWithRifleShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_WALK_WITH_RIFLE_SHOOT);
pStateMachine.data.setValue("fireDelayTime", int.MIN_VALUE);
zhn_xxxmas.application.addUpdateFunction(walkWithRifleShoot_update);
playUziSound();
}
private function walkWithShootgunShoot_update(_arg1:Event):void{
if (!pFeetStateMachine.isInState(STATUS_WALK)){
setState(STATUS_STATIC);
} else {
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
setState(STATUS_STATIC);
} else {
if (pMovieClip.mc.currentFrame == 1){
roleMoveProcess(calculateKnockbackX(), 0);
updateRealPosition();
doShootgunShoot();
Game.instance.getCamera().shakeCamera();
currentWeapon.playSoundOfUsing();
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
};
}
private function swingWalk_update(_arg1:Event):void{
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
checkWeaponAmount();
setState(STATUS_STATIC);
} else {
if (pMovieClip.isSwing){
if (weaponPunchTest()){
currentWeapon.playSoundOfImpact();
if (Game.instance.getWeaponConfigure(currentWeapon.type).screenShake){
Game.instance.getCamera().shakeCamera();
};
} else {
currentWeapon.playSoundOfUsing();
};
pMovieClip.isSwing = false;
};
};
}
private function doRifleShoot():void{
if (currentWeapon.amount > 0){
if (pFeetStateMachine.isInState(STATUS_WALK)){
setState(STATUS_WALK_WITH_RIFLE_SHOOT);
} else {
setState(STATUS_STATIC_WITH_RIFLE_SHOOT);
};
};
}
private function touchJohnProcess():void{
var _local1:AbstractAiRole;
var _local2:John;
for each (_local1 in Game.instance.getZombies()) {
if (_local1.isJohn(true)){
_local2 = (_local1 as John);
if (((Game.instance.isInCamera(_local2)) && (_local2.isAlive()))){
if (((!((_local2.pursuedRole == this))) && (_local2.touchTestWithLola(this)))){
_local2.pursuedRole = this;
takeJohn(_local2);
};
};
};
};
}
public function get invincible():int{
return (pInvincible);
}
private function feetRun_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(feetRun_update);
pFeetStateMachine.data.setValue("SoundController", null);
}
private function defaultFeet_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(defaultFeet_update);
}
private function swing_update(_arg1:Event):void{
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
checkWeaponAmount();
setState(STATUS_STATIC);
} else {
if (pMovieClip.isSwing){
if (weaponPunchTest()){
currentWeapon.playSoundOfImpact();
if (Game.instance.getWeaponConfigure(currentWeapon.type).screenShake){
Game.instance.getCamera().shakeCamera();
};
} else {
currentWeapon.playSoundOfUsing();
};
pMovieClip.isSwing = false;
};
};
}
private function weaponPunchTest():Boolean{
var _local7:AbstractRole;
var _local9:Number;
var _local10:Number;
var _local1:Boolean;
var _local2:Configure = Game.instance.getWeaponConfigure(currentWeapon.type);
var _local3:Boolean = _local2.hitMultiple;
var _local4:int = _local2.hitDistance;
var _local5:Number = Number.MAX_VALUE;
var _local6:AbstractRole;
for each (_local7 in Game.instance.getRoles()) {
if ((((_local7.type == PropertyLoader.ROLE_JOHN)) && (John(_local7).isTricked))){
} else {
if (((((_local7.isAlive()) && ((Math.abs((_local7.y - y)) < 40)))) && (!((_local7.type == PropertyLoader.ROLE_LOLA))))){
_local9 = (_local7.x - x);
_local10 = Math.abs(_local9);
if (((((_local9 * pMovieClip.scaleX) >= 0)) && ((_local10 < _local4)))){
if (_local3){
_local6 = _local7;
_local6.goHit(false, damage, currentWeapon.type, this);
_local1 = true;
} else {
if (_local10 < _local5){
_local5 = _local10;
_local6 = _local7;
};
};
};
};
};
};
if (((!(_local3)) && (_local6))){
_local6.goHit(false, damage, currentWeapon.type, this);
_local1 = true;
};
var _local8:DisplayObject = ((currentWeapon.type == PropertyLoader.ITEM_LIGHTWHIP)) ? pMovieClip.whipTestRect : pMovieClip.swingTestRect;
if (_local8){
_local1 = ((hitBreakableObjectTest(_local8)) || (_local1));
};
return (_local1);
}
private function stopUziSound():void{
if (pUziSound){
pUziSound.fadeOut(6);
pUziSound = null;
};
}
private function stopIceraySound():void{
if (pFlameThrowerSound){
pFlameThrowerSound.fadeOut(6);
pFlameThrowerSound = null;
};
}
private function butthitting_exit(_arg1:String):void{
updateKeyboardState();
zhn_xxxmas.application.removeUpdateFunction(butthitting_update);
}
private function takeJohn(_arg1:John):void{
if (pTrickedJohns.indexOf(_arg1) == -1){
playSound(john_pickup);
pTrickedJohns.push(_arg1);
if (!_arg1.isSanta()){
Game.instance.getRankScoreManager().addJohnScore();
};
};
}
public function goExitTrailer(_arg1:int, _arg2:int):void{
var _local3:Point;
if (!pStateMachine.isInState(STATUS_EXIT_TRAILER)){
_local3 = Game.instance.getTileCenterPosition(_arg1, _arg2);
setPosition(_local3.x, _local3.y);
updateRealPosition();
setState(STATUS_EXIT_TRAILER);
};
}
private function staticWithLauncherShoot_update(_arg1:Event):void{
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
setState(STATUS_STATIC);
} else {
if (pMovieClip.mc.currentFrame == 2){
roleMoveProcess(calculateKnockbackX(), 0);
updateRealPosition();
doLauncherShoot();
Game.instance.getCamera().shakeCamera();
currentWeapon.playSoundOfUsing();
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
}
private function staticWithUziShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_STATIC_WITH_UZI_SHOOT);
pStateMachine.data.setValue("fireDelayTime", int.MIN_VALUE);
zhn_xxxmas.application.addUpdateFunction(staticWithUziShoot_update);
playUziSound();
}
public function doKilledComboTest():void{
pKilledCombos++;
pPreviousKilledTime = getTimer();
zhn_xxxmas.application.addUpdateFunction(killedTimeCount_update);
}
private function staticWithRifleShoot_exit(_arg1:String):void{
stopUziSound();
updateKeyboardState();
zhn_xxxmas.application.removeUpdateFunction(staticWithRifleShoot_update);
}
override protected function hit_enter(_arg1:String):void{
setFrameLabel(STATUS_HIT);
setFeetState(STATUS_HIT);
zhn_xxxmas.application.addUpdateFunction(hit_update);
playSound(lola_hit);
}
private function walkWithUziShoot_update(_arg1:Event):void{
var _local2:int;
var _local3:ThrownWeapon;
if (((!(pFeetStateMachine.isInState(STATUS_WALK))) || (!(pController.isKeyDown(Keyboard.SPACE))))){
setState(STATUS_STATIC);
} else {
_local2 = getTimer();
if (_local2 >= pStateMachine.data.getInt("fireDelayTime")){
_local3 = new ThrownWeapon(PropertyLoader.ITEM_BULLET, this, currentWeapon, (x + (pMovieClip.uziPoint.x * pMovieClip.scaleX)), (y + pMovieClip.uziPoint.y), y, new Point(pMovieClip.scaleX, 0));
Game.instance.addWeapon(_local3);
pStateMachine.data.setValue("fireDelayTime", (_local2 + 200));
currentWeapon.playSoundOfUsing();
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
}
private function throw_enter(_arg1:String):void{
setFrameLabel(STATUS_THROW);
setFeetState(STATUS_THROW);
zhn_xxxmas.application.addUpdateFunction(throw_update);
}
private function feetInTrailer(_arg1:String):void{
pPrevVelocity = null;
}
public function setFeetState(_arg1:String):void{
if (!pFeetStateMachine.isInState(_arg1)){
pFeetStateMachine.setState(_arg1);
};
}
private function throw_update(_arg1:Event):void{
var _local2:ThrownWeapon;
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
setState(STATUS_STATIC);
} else {
if (pMovieClip.mc.currentFrame == 7){
_local2 = new ThrownWeapon(currentWeapon.type, this, currentWeapon, (x + (pMovieClip.throwPoint.x * pMovieClip.scaleX)), (y + pMovieClip.throwPoint.y), y, new Point(pMovieClip.scaleX, 0));
if (currentWeapon.type == PropertyLoader.ITEM_CHAINSAW){
pFrisbee = _local2;
};
currentWeapon.playSoundOfUsing();
Game.instance.addWeapon(_local2);
if (((!(checkWeaponAmount())) || (((currentWeapon) && ((currentWeapon.type == PropertyLoader.ITEM_CHAINSAW)))))){
setState(STATUS_STATIC);
};
};
};
}
private function staticWithShootgunShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_STATIC_WITH_SHOOTGUN_SHOOT);
setFeetState(STATUS_STATIC_WITH_SHOOTGUN_SHOOT);
zhn_xxxmas.application.addUpdateFunction(staticWithShootgunShoot_update);
}
public function isInTrailer():Boolean{
return (pStateMachine.isInState(STATUS_IN_TRAILER));
}
private function flameThrowerHitTest():Boolean{
var _local8:AbstractRole;
var _local9:Number;
var _local10:Number;
var _local11:DisplayObject;
var _local1:Boolean;
var _local2:Configure = Game.instance.getWeaponConfigure(currentWeapon.type);
var _local3:Boolean = _local2.flaming;
var _local4:Boolean = _local2.hitMultiple;
var _local5:int = _local2.hitDistance;
var _local6:Number = Number.MAX_VALUE;
var _local7:AbstractRole;
for each (_local8 in Game.instance.getRoles()) {
if ((((_local8.type == PropertyLoader.ROLE_JOHN)) && (John(_local8).isTricked))){
} else {
if (((((((_local8.isAlive()) && (!(_local8.isInFlaming())))) && ((Math.abs((_local8.y - y)) < 40)))) && (!((_local8.type == PropertyLoader.ROLE_LOLA))))){
_local9 = (_local8.x - x);
_local10 = Math.abs(_local9);
if (((((_local9 * pMovieClip.scaleX) >= 0)) && ((_local10 < _local5)))){
if (_local4){
_local7 = _local8;
if (!_local7.isInFlaming()){
Game.instance.addExplode(new ExplodeEffect(_local7.x, (_local7.y - 60), lib_explode));
};
_local7.goHit(_local3, damage, currentWeapon.type, this);
_local1 = true;
} else {
if (_local10 < _local6){
_local6 = _local10;
_local7 = _local8;
};
};
};
};
};
};
if (((!(_local4)) && (_local7))){
_local7.goHit(_local3, damage, currentWeapon.type, this);
_local1 = true;
};
if (_local4){
_local11 = pMovieClip.punchTestRect;
if (_local11){
_local1 = ((hitBreakableObjectTest(pMovieClip.mc.fire.hitTestRect)) || (_local1));
};
};
return (_local1);
}
private function frozen_update(_arg1:GameApplicationUpdateEvent):void{
var _local3:MovieClip;
var _local2:int = pFeetStateMachine.data.getInt("breakCount");
if (_local2 > 0){
pFeetStateMachine.data.setValue("breakCount", (_local2 - 1));
} else {
_local3 = pMovieClip.mc_frozen.mc;
if (_local3.currentFrame < 5){
_local3.gotoAndPlay(5);
} else {
if (_local3.currentFrame == _local3.totalFrames){
pFeetStateMachine.setState(STATUS_STATIC);
setState(STATUS_STATIC);
};
};
};
}
private function walkWithLauncherShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_WALK_WITH_LAUNCHER_SHOOT);
pMovieClip.mc.gotoAndPlay(1);
zhn_xxxmas.application.addUpdateFunction(walkWithLauncherShoot_update);
}
override protected function hit_exit(_arg1:String):void{
invincible = GameConfig.instance.lolaInvincibleDuration;
updateKeyboardState();
super.hit_exit(_arg1);
}
private function staticWithRifleShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_STATIC_WITH_RIFLE_SHOOT);
pStateMachine.data.setValue("fireDelayTime", int.MIN_VALUE);
zhn_xxxmas.application.addUpdateFunction(staticWithRifleShoot_update);
playUziSound();
}
public function goInTrailer():void{
setState(STATUS_IN_TRAILER);
}
private function exitTrailer_enter(_arg1:String):void{
setFeetState(STATUS_IN_TRAILER);
Game.instance.getCamera().setFollowSpeed(0);
setWalkAnimFrame();
pStateMachine.data.setValue("timer", 0);
zhn_xxxmas.application.addUpdateFunction(exitTrailer_update);
pMovieClip.y = -(Game.instance.tileHeight);
}
public function lostJohn(_arg1:John):void{
if (pTrickedJohns.indexOf(_arg1) != -1){
_arg1.pursuedRole = null;
pTrickedJohns.splice(pTrickedJohns.indexOf(_arg1), 1);
};
}
override public function updateRealPosition():void{
x = position.x;
y = position.y;
}
private function feetRun_update(_arg1:Event):void{
roleMoveProcess(pVelocity.x, pVelocity.y);
pickingWeaponProcess();
touchJohnProcess();
}
private function staticWithFlameThrowerShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_STATIC_WITH_FLAME_THROWER_SHOOT);
zhn_xxxmas.application.addUpdateFunction(staticWithFlameThrowerShoot_update);
pMovieClip.mc_staticWithFlameThrowerShoot.fire.gotoAndPlay(1);
playFlameThrowerSound();
}
private function doFlameThrowerShoot():void{
if (currentWeapon.amount > 0){
if (pFeetStateMachine.isInState(STATUS_WALK)){
setState(STATUS_WALK_WITH_FLAME_THROWER_SHOOT);
} else {
setState(STATUS_STATIC_WITH_FLAME_THROWER_SHOOT);
};
};
}
private function staticWithBussShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_STATIC_WITH_BUSS_SHOOT);
setFeetState(STATUS_STATIC_WITH_SHOOTGUN_SHOOT);
pMovieClip.mc.gotoAndPlay(1);
zhn_xxxmas.application.addUpdateFunction(staticWithBussShoot_update);
}
public function set invincible(_arg1:int):void{
pInvincible = _arg1;
}
private function swing_enter(_arg1:String):void{
pMovieClip.isSwing = false;
setFrameLabel((currentWeapon.type + "Swing"));
setFeetState(STATUS_SWING);
zhn_xxxmas.application.addUpdateFunction(swing_update);
}
override protected function die_enter(_arg1:String):void{
pFlamingMachine.setState(STATUS_FLAMING_NONE);
setFrameLabel(STATUS_DIE);
setFeetState(STATUS_DIE);
zhn_xxxmas.application.addUpdateFunction(die_update);
playSound(lola_dead);
}
private function delayGenerateWeapon(_arg1:String):void{
zhn_xxxmas.application.addDelayFunction(generateWeapon, {weaponType:_arg1, game:Game.instance}, 600);
}
private function frozen_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(frozen_update);
}
private function playUziSound():void{
if (pUziSound == null){
pUziSound = zhn_xxxmas.application.getSoundManager().playSound(uzi4, true);
};
}
override public function terminate():void{
zhn_xxxmas.application.removeUpdateFunction(killedTimeCount_update);
pController.terminate();
pController = null;
pFeetStateMachine.destroy();
pFeetStateMachine = null;
if (currentWeapon){
currentWeapon = null;
};
pTrickedJohns = null;
super.terminate();
}
private function walkWithRifleShoot_update(_arg1:Event):void{
var _local2:int;
var _local3:ThrownWeapon;
if (((!(pFeetStateMachine.isInState(STATUS_WALK))) || (!(pController.isKeyDown(Keyboard.SPACE))))){
setState(STATUS_STATIC);
} else {
_local2 = getTimer();
if (_local2 >= pStateMachine.data.getInt("fireDelayTime")){
_local3 = new ThrownWeapon(PropertyLoader.ITEM_BULLET, this, currentWeapon, (x + (pMovieClip.uziPoint.x * pMovieClip.scaleX)), ((y + pMovieClip.uziPoint.y) - 3), y, new Point(pMovieClip.scaleX, 0));
Game.instance.addWeapon(_local3);
pStateMachine.data.setValue("fireDelayTime", (_local2 + 200));
currentWeapon.playSoundOfUsing();
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
}
private function isAbleToAttack():Boolean{
return (((pStateMachine.isInState(STATUS_STATIC)) && (!(pFeetStateMachine.isInState(STATUS_FROZEN)))));
}
override protected function die_update(_arg1:Event):void{
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
if (currentWeapon){
currentWeapon = null;
};
setFeetState(null);
if (!Game.instance.isPausing()){
setState(null);
Game.instance.gameOver();
};
};
}
private function staticWithFlameThrowerShoot_exit(_arg1:String):void{
if (((currentWeapon) && ((currentWeapon.type == PropertyLoader.ITEM_FLAME_THROWER)))){
checkWeaponAmount();
};
pMovieClip.mc_staticWithFlameThrowerShoot.fire.gotoAndStop(1);
updateKeyboardState();
zhn_xxxmas.application.removeUpdateFunction(staticWithFlameThrowerShoot_update);
stopFlameThrowerSound();
}
private function walkWithShootgunShoot_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(walkWithShootgunShoot_update);
}
public function get damage():int{
return ((currentWeapon) ? currentWeapon.damage : pPunchDamage);
}
private function staticWithLauncherShoot_exit(_arg1:String):void{
updateKeyboardState();
pMovieClip.mc.gotoAndStop(1);
zhn_xxxmas.application.removeUpdateFunction(staticWithLauncherShoot_update);
}
private function feetRun_process(_arg1:PostPackage):void{
processUIData((_arg1.data as UIData));
}
private function staticWithShootgunShoot_exit(_arg1:String):void{
updateKeyboardState();
zhn_xxxmas.application.removeUpdateFunction(staticWithShootgunShoot_update);
}
public function goStatic(_arg1:Number, _arg2:Number):void{
setPosition(_arg1, _arg2);
setFeetState(STATUS_STATIC);
}
private function defaultFeet_update(_arg1:GameApplicationUpdateEvent):void{
roleMoveProcess(0, 0);
}
private function swingWalk_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(swingWalk_update);
}
private function inTrailer_exit(_arg1:String):void{
visible = true;
updateKeyboardState();
zhn_xxxmas.application.removeUpdateFunction(inTrailer_update);
}
private function walkWithLauncherShoot_update(_arg1:Event):void{
if (!pFeetStateMachine.isInState(STATUS_WALK)){
setState(STATUS_STATIC);
} else {
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
setState(STATUS_STATIC);
} else {
if (pMovieClip.mc.currentFrame == 1){
roleMoveProcess(calculateKnockbackX(), 0);
updateRealPosition();
doLauncherShoot();
Game.instance.getCamera().shakeCamera();
currentWeapon.playSoundOfUsing();
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
};
}
override protected function setMovieClipFrameLabel(_arg1:MovieClip, _arg2:String):void{
var _local4:int;
var _local5:DisplayObject;
var _local6:MovieClip;
var _local7:int;
var _local3:MovieClip = _arg1[("mc_" + _arg2)];
if (_arg1.mc != _local3){
_arg1.mc = _local3;
_local4 = 0;
while (_local4 < _arg1.numChildren) {
_local5 = _arg1.getChildAt(_local4);
if ((_local5 is MovieClip)){
if (_local5 == _local3){
if (_local5.name != "mc_walkWithUziShoot"){
_local3.gotoAndPlay(1);
};
_local5.visible = true;
} else {
if (_local5.name != "mc_walkWithUziShoot"){
(_local5 as MovieClip).gotoAndStop(1);
};
_local5.visible = false;
};
};
_local4++;
};
} else {
if (_arg2 == STATUS_WALK){
if (Game.instance.getMap().isIceTile(currentTileLoc.x, currentTileLoc.y)){
_local6 = _local3.mc;
_local7 = (_local6.currentFrame + 2);
if (_local7 > _local6.totalFrames){
_local7 = 1;
};
_local6.gotoAndPlay(_local7);
};
};
};
}
private function isJohnInLoc(_arg1:int):Boolean{
var _local2:John;
for each (_local2 in pTrickedJohns) {
if (_local2.getLocId() == _arg1){
return (true);
};
};
return (false);
}
private function punch_enter(_arg1:String):void{
var _local2:String = ((Math.random() < 0.7)) ? STATUS_PUNCH : "kick";
if (_local2 == "kick"){
pStateMachine.data.setValue("skill", "kick");
} else {
pStateMachine.data.setValue("skill", "fist");
};
setFrameLabel(_local2);
setFeetState(STATUS_PUNCH);
zhn_xxxmas.application.addUpdateFunction(punch_update);
}
private function staticWithUziShoot_update(_arg1:Event):void{
var _local2:int;
var _local3:ThrownWeapon;
if (((!(pFeetStateMachine.isInState(STATUS_STATIC))) || (!(pController.isKeyDown(Keyboard.SPACE))))){
setState(STATUS_STATIC);
} else {
_local2 = getTimer();
if (_local2 >= pStateMachine.data.getInt("fireDelayTime")){
_local3 = new ThrownWeapon(PropertyLoader.ITEM_BULLET, this, currentWeapon, (x + (pMovieClip.uziPoint.x * pMovieClip.scaleX)), (y + pMovieClip.uziPoint.y), y, new Point(pMovieClip.scaleX, 0));
Game.instance.addWeapon(_local3);
pStateMachine.data.setValue("fireDelayTime", (_local2 + 200));
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
}
override public function goHit(_arg1:Boolean, _arg2:int, _arg3:String, _arg4:AbstractRole):void{
if (Game.instance.isPausing()){
return;
};
if (((((pStateMachine.isInState(STATUS_IN_TRAILER)) || (pStateMachine.isInState(STATUS_EXIT_TRAILER)))) || (pStateMachine.isInState(STATUS_HIT)))){
return;
};
if (pInvincible){
return;
};
var _local5 = (_arg4 is OldmanWinter);
if (((!(_local5)) && (pFeetStateMachine.isInState(STATUS_FROZEN)))){
breakFrozen();
return;
};
super.goHit(_arg1, _arg2, _arg3, _arg4);
if (_local5){
setFrozen();
};
}
private function processUIData(_arg1:UIData):void{
switch (_arg1.type){
case UIController.KEY_DOWN:
case UIController.KEY_UP:
if (!Game.instance.isPausing()){
updateKeyboardState();
};
break;
};
}
private function punch_exit(_arg1:String):void{
updateKeyboardState();
zhn_xxxmas.application.removeUpdateFunction(punch_update);
}
override public function initialize():void{
var _local1:Weapon;
super.initialize();
Game.instance.setCamerFocus(this);
pTrickedJohns = new Array();
pAvailableLocs = new Array();
pAvailableLocs.push(new PointInt(-1, -1));
pAvailableLocs.push(new PointInt(0, -1));
pAvailableLocs.push(new PointInt(1, -1));
pAvailableLocs.push(new PointInt(1, 0));
pAvailableLocs.push(new PointInt(1, 1));
pAvailableLocs.push(new PointInt(0, 1));
pAvailableLocs.push(new PointInt(-1, 1));
pAvailableLocs.push(new PointInt(-1, 0));
pAvailableLocs.push(new PointInt(-1, -2));
pAvailableLocs.push(new PointInt(0, -2));
pAvailableLocs.push(new PointInt(1, -2));
pAvailableLocs.push(new PointInt(2, -2));
pAvailableLocs.push(new PointInt(2, -1));
pAvailableLocs.push(new PointInt(2, 0));
pAvailableLocs.push(new PointInt(2, 1));
pAvailableLocs.push(new PointInt(2, 2));
pAvailableLocs.push(new PointInt(1, 2));
pAvailableLocs.push(new PointInt(0, 2));
pAvailableLocs.push(new PointInt(-1, 2));
pAvailableLocs.push(new PointInt(-2, 2));
pAvailableLocs.push(new PointInt(-2, 1));
pAvailableLocs.push(new PointInt(-2, 0));
pAvailableLocs.push(new PointInt(-2, -1));
pAvailableLocs.push(new PointInt(-2, -2));
pAvailableLocs.push(new PointInt(-2, -3));
pAvailableLocs.push(new PointInt(-1, -3));
pAvailableLocs.push(new PointInt(0, -3));
pAvailableLocs.push(new PointInt(1, -3));
pAvailableLocs.push(new PointInt(2, -3));
pAvailableLocs.push(new PointInt(3, -3));
pAvailableLocs.push(new PointInt(3, -2));
pAvailableLocs.push(new PointInt(3, -1));
pAvailableLocs.push(new PointInt(3, 0));
pAvailableLocs.push(new PointInt(3, 1));
pAvailableLocs.push(new PointInt(3, 2));
pAvailableLocs.push(new PointInt(3, 3));
pAvailableLocs.push(new PointInt(2, 3));
pAvailableLocs.push(new PointInt(1, 3));
pAvailableLocs.push(new PointInt(0, 3));
pAvailableLocs.push(new PointInt(-1, 3));
pAvailableLocs.push(new PointInt(-2, 3));
pAvailableLocs.push(new PointInt(-3, 3));
pAvailableLocs.push(new PointInt(-3, 2));
pAvailableLocs.push(new PointInt(-3, 1));
pAvailableLocs.push(new PointInt(-3, 0));
pAvailableLocs.push(new PointInt(-3, -1));
pAvailableLocs.push(new PointInt(-3, -2));
pAvailableLocs.push(new PointInt(-3, -3));
pController = new UIController(id.toString(), zhn_xxxmas.application);
pController.addControl(Game.instance.stage, UIController.KEY_DOWN);
pController.addControl(Game.instance.stage, UIController.KEY_UP);
pController.addControl(Game.instance, UIController.MOUSE_MOVE);
pController.addControl(Game.instance, UIController.MOUSE_DOWN);
pController.start(0);
pStateMachine.initState("init", init_enter, null, init_exit);
pStateMachine.initState(STATUS_PUNCH, punch_enter, null, punch_exit);
pStateMachine.initState(STATUS_SWING, swing_enter, null, swing_exit);
pStateMachine.initState(STATUS_SWING_WALK, swingWalk_enter, null, swingWalk_exit);
pStateMachine.initState(STATUS_THROW, throw_enter, null, throw_exit);
pStateMachine.initState(STATUS_BUTTHITTING, butthitting_enter, null, butthitting_exit);
pStateMachine.initState(STATUS_IN_TRAILER, inTrailer_enter, null, inTrailer_exit);
pStateMachine.initState(STATUS_STATIC_WITH_UZI_SHOOT, staticWithUziShoot_enter, null, staticWithUziShoot_exit);
pStateMachine.initState(STATUS_WALK_WITH_UZI_SHOOT, walkWithUziShoot_enter, null, walkWithUziShoot_exit);
pStateMachine.initState(STATUS_STATIC_WITH_RIFLE_SHOOT, staticWithRifleShoot_enter, null, staticWithRifleShoot_exit);
pStateMachine.initState(STATUS_WALK_WITH_RIFLE_SHOOT, walkWithRifleShoot_enter, null, walkWithRifleShoot_exit);
pStateMachine.initState(STATUS_STATIC_WITH_FLAME_THROWER_SHOOT, staticWithFlameThrowerShoot_enter, null, staticWithFlameThrowerShoot_exit);
pStateMachine.initState(STATUS_WALK_WITH_FLAME_THROWER_SHOOT, walkWithFlameThrowerShoot_enter, null, walkWithFlameThrowerShoot_exit);
pStateMachine.initState(STATUS_STATIC_WITH_ICERAY_SHOOT, staticWithIcerayShoot_enter, null, staticWithIcerayShoot_exit);
pStateMachine.initState(STATUS_WALK_WITH_ICERAY_SHOOT, walkWithIcerayShoot_enter, null, walkWithIcerayShoot_exit);
pStateMachine.initState(STATUS_STATIC_WITH_SHOOTGUN_SHOOT, staticWithShootgunShoot_enter, null, staticWithShootgunShoot_exit);
pStateMachine.initState(STATUS_WALK_WITH_SHOOTGUN_SHOOT, walkWithShootgunShoot_enter, null, walkWithShootgunShoot_exit);
pStateMachine.initState(STATUS_STATIC_WITH_LAUNCHER_SHOOT, staticWithLauncherShoot_enter, null, staticWithLauncherShoot_exit);
pStateMachine.initState(STATUS_WALK_WITH_LAUNCHER_SHOOT, walkWithLauncherShoot_enter, null, walkWithLauncherShoot_exit);
pStateMachine.initState(STATUS_STATIC_WITH_BUSS_SHOOT, staticWithBussShoot_enter, null, staticWithBussShoot_exit);
pStateMachine.initState(STATUS_WALK_WITH_BUSS_SHOOT, walkWithBussShoot_enter, null, walkWithBussShoot_exit);
pStateMachine.initState(STATUS_EXIT_TRAILER, exitTrailer_enter, null, exitTrailer_exit);
setState("init");
pFeetStateMachine = new PostStateClient(zhn_xxxmas.application);
pFeetStateMachine.setPostId(id.toString());
pFeetStateMachine.initState(STATUS_STATIC, feetStatic_enter, feetStatic_process, feetStatic_exit);
pFeetStateMachine.initState(STATUS_WALK, feetRun_enter, feetRun_process, feetRun_exit);
pFeetStateMachine.initState(STATUS_PUNCH, defaultFeet_enter, null, defaultFeet_exit);
pFeetStateMachine.initState(STATUS_SWING, defaultFeet_enter, null, defaultFeet_exit);
pFeetStateMachine.initState(STATUS_THROW, defaultFeet_enter, null, defaultFeet_exit);
pFeetStateMachine.initState(STATUS_FROZEN, frozen_enter, null, frozen_exit);
pFeetStateMachine.initState(STATUS_BUTTHITTING, defaultFeet_enter, null, defaultFeet_exit);
pFeetStateMachine.initState(STATUS_IN_TRAILER, feetInTrailer, null, null);
pFeetStateMachine.initState(STATUS_DIE, null, null, null);
pFeetStateMachine.initState(STATUS_HIT, defaultFeet_enter, null, defaultFeet_exit);
pFeetStateMachine.initState(STATUS_STATIC_WITH_SHOOTGUN_SHOOT, null, null, null);
setFeetState(STATUS_STATIC);
if (LAST_WEAPON_TYPE){
_local1 = new Weapon(LAST_WEAPON_TYPE, currentTileLoc.x, currentTileLoc.y);
Game.instance.addWeapon(_local1);
_local1.goPop();
currentWeapon = _local1;
};
}
private function frozen_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(frozen_update);
setFrameLabel(STATUS_FROZEN);
var _local2:MovieClip = pMovieClip.mc_frozen.mc;
_local2.gotoAndPlay(1);
}
private function staticWithIcerayShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_STATIC_WITH_ICERAY_SHOOT);
zhn_xxxmas.application.addUpdateFunction(staticWithIcerayShoot_update);
pMovieClip.mc_staticWithIcerayShoot.gun.fire.gotoAndPlay(2);
playIceraySound();
pStateMachine.data.setValue("icerayTimer", 0);
}
private function feetStatic_enter(_arg1:String):void{
updateRealPosition();
zhn_xxxmas.application.addUpdateFunction(feetStatic_update);
}
private function walkWithBussShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_WALK_WITH_BUSS_SHOOT);
pMovieClip.mc.gotoAndPlay(1);
zhn_xxxmas.application.addUpdateFunction(walkWithBussShoot_update);
}
override public function isRunningTo(_arg1:Number):Boolean{
if (pFeetStateMachine.isInState(STATUS_WALK)){
return (((getFaceDirection() * (_arg1 - x)) >= 0));
};
return (false);
}
private function swingWalk_enter(_arg1:String):void{
pMovieClip.isSwing = false;
setFrameLabel((currentWeapon.type + "SwingWalk"));
zhn_xxxmas.application.addUpdateFunction(swingWalk_update);
}
public function cheatEquipWeapon(_arg1:String):void{
var _local2:Weapon = new Weapon(_arg1, currentTileLoc.x, currentTileLoc.y);
Game.instance.addWeapon(_local2);
_local2.goPop();
_local2.visible = false;
currentWeapon = _local2;
}
private function butthitting_update(_arg1:Event):void{
var _local2:AbstractAiRole;
var _local3:John;
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
for each (_local2 in Game.instance.getZombies()) {
if (_local2.isJohn(false)){
_local3 = (_local2 as John);
if (((((_local3.isAlive()) && (Game.instance.isInCamera(_local3)))) && (isInTrickDistance(_local3)))){
_local3.pursuedRole = this;
takeJohn(_local3);
};
};
};
setState(STATUS_STATIC);
};
}
private function walkWithLauncherShoot_exit(_arg1:String):void{
pMovieClip.mc.gotoAndStop(1);
zhn_xxxmas.application.removeUpdateFunction(walkWithLauncherShoot_update);
}
override protected function static_process(_arg1:PostPackage):void{
var _local2:UIData = (_arg1.data as UIData);
if (Game.instance.isPausing()){
if (_local2.type == UIController.KEY_DOWN){
switch (_local2.keyCode){
case Keyboard.SPACE:
case 191:
Game.instance.endStoryPanel(null);
Game.instance.onButtonCloseOfControlPanel(null);
break;
};
};
return;
};
if (_local2.type == UIController.KEY_DOWN){
switch (_local2.keyCode){
case Keyboard.SPACE:
if (isAbleToAttack()){
if (currentWeapon){
if (currentWeapon.type == PropertyLoader.ITEM_UZI){
doUziShoot();
} else {
if (currentWeapon.type == PropertyLoader.ITEM_RIFLE){
doRifleShoot();
} else {
if (currentWeapon.type == PropertyLoader.ITEM_SHOOTGUN){
if (pFeetStateMachine.isInState(STATUS_WALK)){
setState(STATUS_WALK_WITH_SHOOTGUN_SHOOT);
} else {
setState(STATUS_STATIC_WITH_SHOOTGUN_SHOOT);
};
} else {
if (currentWeapon.type == PropertyLoader.ITEM_BUSS){
if (pFeetStateMachine.isInState(STATUS_WALK)){
setState(STATUS_WALK_WITH_BUSS_SHOOT);
} else {
setState(STATUS_STATIC_WITH_BUSS_SHOOT);
};
} else {
if (currentWeapon.type == PropertyLoader.ITEM_LAUNCHER){
if (pFeetStateMachine.isInState(STATUS_WALK)){
setState(STATUS_WALK_WITH_LAUNCHER_SHOOT);
} else {
setState(STATUS_STATIC_WITH_LAUNCHER_SHOOT);
};
} else {
if (currentWeapon.type == PropertyLoader.ITEM_FLAME_THROWER){
doFlameThrowerShoot();
} else {
if (currentWeapon.type == PropertyLoader.ITEM_ICERAY){
doIcerayShoot();
} else {
if (currentWeapon.isThrowable){
if (((((!((currentWeapon.type == PropertyLoader.ITEM_CHAINSAW))) || ((pFrisbee == null)))) || (!(pFrisbee.isInState(ThrownWeapon.STATUS_FRISBEE))))){
setState(STATUS_THROW);
};
} else {
if (pFeetStateMachine.isInState(STATUS_WALK)){
setState(STATUS_SWING_WALK);
} else {
setState(STATUS_SWING);
};
};
};
};
};
};
};
};
};
} else {
setState(STATUS_PUNCH);
};
};
break;
case KEY_X:
setState(STATUS_BUTTHITTING);
break;
case 191:
Game.instance.showHelp(true);
break;
};
};
}
private function walkWithShootgunShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_WALK_WITH_SHOOTGUN_SHOOT);
zhn_xxxmas.application.addUpdateFunction(walkWithShootgunShoot_update);
}
private function updateKeyboardState():void{
var _local1:int;
var _local2:int;
if (pController){
_local1 = 0;
_local2 = 0;
if (pController.isKeyDown(Keyboard.RIGHT)){
_local1++;
};
if (pController.isKeyDown(Keyboard.LEFT)){
_local1--;
};
if (pController.isKeyDown(Keyboard.UP)){
_local2--;
};
if (pController.isKeyDown(Keyboard.DOWN)){
_local2++;
};
if (((_local1) || (_local2))){
if (_local1){
pMovieClip.scaleX = ((_local1 > 0)) ? DIR_RIGHT : DIR_LEFT;
};
goWalk(Math.round(position.x), Math.round(position.y), _local1, _local2);
} else {
goStatic(Math.round(position.x), Math.round(position.y));
};
};
}
private function doLauncherShoot():void{
Game.instance.addWeapon(new ThrownWeapon(PropertyLoader.ITEM_GRENADE, this, currentWeapon, (x + (pMovieClip.shootgunPoint.x * pMovieClip.scaleX)), ((y + pMovieClip.shootgunPoint.y) - 5), y, new Point(pMovieClip.scaleX, 0)));
}
private function hitBreakableObjectTest(_arg1:DisplayObject):Boolean{
var _local3:BreakableObject;
var _local4:BreakableObject;
var _local5:Number;
var _local2:Number = Number.MAX_VALUE;
for each (_local4 in Game.instance.getBreakableObjects()) {
if (((!(_local4.isBroken())) && (_local4.hitTestObject(_arg1)))){
_local5 = Math.abs((_local4.x - x));
if (_local5 < _local2){
_local2 = _local5;
_local3 = _local4;
};
};
};
if (_local3){
_local3.setBroken();
return (true);
};
return (false);
}
private function inTrailer_enter(_arg1:String):void{
setFeetState(STATUS_IN_TRAILER);
zhn_xxxmas.application.addUpdateFunction(inTrailer_update);
}
public function setFrozen():void{
var _local1:int;
if (isAlive()){
_local1 = pFeetStateMachine.data.getInt("breakCount");
if (_local1 <= 0){
_local1 = 90;
};
pFeetStateMachine.data.setValue("breakCount", _local1);
if (pFeetStateMachine.isInState(STATUS_FROZEN)){
} else {
setState(STATUS_STATIC);
pFeetStateMachine.setState(STATUS_FROZEN);
};
};
}
override public function setPosition(_arg1:Number, _arg2:Number):void{
super.setPosition(_arg1, _arg2);
zhn_xxxmas.application.debugWatchItem("loc", DebugTagValueWatcher.getById("lolaloc").setValue((("(" + currentTileLoc) + ")")));
}
private function walkWithIcerayShoot_exit(_arg1:String):void{
if (((currentWeapon) && ((currentWeapon.type == PropertyLoader.ITEM_ICERAY)))){
checkWeaponAmount();
};
pMovieClip.mc_walkWithIcerayShoot.gun.fire.gotoAndStop(1);
zhn_xxxmas.application.removeUpdateFunction(walkWithIcerayShoot_update);
stopIceraySound();
}
private function doBussShoot():void{
Game.instance.addWeapon(new ThrownWeapon(PropertyLoader.ITEM_BUSS_BULLET, this, currentWeapon, (x + (pMovieClip.shootgunPoint.x * pMovieClip.scaleX)), ((y + pMovieClip.shootgunPoint.y) - 5), y, new Point(pMovieClip.scaleX, 0)));
}
public function getAvailable9GridsLocId():int{
var _local3:PointInt;
var _local1:int;
var _local2:int;
while (_local2 < pAvailableLocs.length) {
_local3 = pAvailableLocs[_local2];
if (Game.instance.canWalk((currentTileLoc.x + _local3.x), (currentTileLoc.y + _local3.y))){
if (!isJohnInLoc(_local2)){
return (_local2);
};
_local1 = _local2;
};
_local2++;
};
return (_local1);
}
public function get trickedJohns():Array{
return (pTrickedJohns);
}
private function walkWithFlameThrowerShoot_update(_arg1:Event):void{
if (((!(pFeetStateMachine.isInState(STATUS_WALK))) || (!(pController.isKeyDown(Keyboard.SPACE))))){
setState(STATUS_STATIC);
} else {
flameThrowerHitTest();
if (pMovieClip.mc.fire.currentFrame == pMovieClip.mc.fire.totalFrames){
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
}
private function isInTrickDistance(_arg1:John):Boolean{
var _local2:Number = (Game.instance.mapColumnCounts / 2);
var _local3:Number = (Game.instance.mapRowCounts / 2);
var _local4:int = Math.abs((_arg1.currentTileLoc.x - currentTileLoc.x));
var _local5:int = Math.abs((_arg1.currentTileLoc.y - currentTileLoc.y));
if (_local4 > _local2){
_local4 = (Game.instance.mapColumnCounts - _local4);
};
if (_local5 > _local3){
_local5 = (Game.instance.mapRowCounts - _local5);
};
return ((((_local4 <= pTrickRange)) && ((_local5 <= pTrickRange))));
}
override protected function static_update(_arg1:Event):void{
if (pFeetStateMachine.isInState(STATUS_WALK)){
setWalkAnimFrame();
} else {
if (pFeetStateMachine.isInState(STATUS_FROZEN)){
return;
};
if (currentWeapon){
if (currentWeapon.type == PropertyLoader.ITEM_SHOOTGUN){
setFrameLabel(STATUS_STATIC_WITH_SHOOTGUN);
} else {
if (currentWeapon.type == PropertyLoader.ITEM_BUSS){
setFrameLabel(STATUS_STATIC_WITH_BUSS);
} else {
if (currentWeapon.type == PropertyLoader.ITEM_LAUNCHER){
setFrameLabel(STATUS_STATIC_WITH_LAUNCHER);
} else {
if (currentWeapon.type == PropertyLoader.ITEM_UZI){
setFrameLabel(STATUS_STATIC_WITH_UZI);
} else {
if (currentWeapon.type == PropertyLoader.ITEM_RIFLE){
setFrameLabel(STATUS_STATIC_WITH_RIFLE);
} else {
if (currentWeapon.type == PropertyLoader.ITEM_FLAME_THROWER){
setFrameLabel(STATUS_STATIC_WITH_FLAME_THROWER);
} else {
if (currentWeapon.type == PropertyLoader.ITEM_ICERAY){
setFrameLabel(STATUS_STATIC_WITH_ICERAY);
} else {
setFrameLabel(STATUS_STATIC);
};
};
};
};
};
};
};
} else {
setFrameLabel(STATUS_STATIC);
};
};
if (currentWeapon){
if (pController.isKeyDown(Keyboard.SPACE)){
if (currentWeapon.type == PropertyLoader.ITEM_UZI){
doUziShoot();
} else {
if (currentWeapon.type == PropertyLoader.ITEM_RIFLE){
doRifleShoot();
} else {
if (currentWeapon.type == PropertyLoader.ITEM_FLAME_THROWER){
doFlameThrowerShoot();
} else {
if (currentWeapon.type == PropertyLoader.ITEM_ICERAY){
doIcerayShoot();
};
};
};
};
};
};
}
public function get knockback():int{
return ((currentWeapon) ? currentWeapon.knockback : pPunchKnockback);
}
private function stopFlameThrowerSound():void{
if (pFlameThrowerSound){
pFlameThrowerSound.fadeOut(6);
pFlameThrowerSound = null;
};
}
private function staticWithShootgunShoot_update(_arg1:Event):void{
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
setState(STATUS_STATIC);
} else {
if (pMovieClip.mc.currentFrame == 2){
roleMoveProcess(calculateKnockbackX(), 0);
updateRealPosition();
doShootgunShoot();
Game.instance.getCamera().shakeCamera();
currentWeapon.playSoundOfUsing();
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
}
private function swing_exit(_arg1:String):void{
updateKeyboardState();
zhn_xxxmas.application.removeUpdateFunction(swing_update);
}
private function feetStatic_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(feetStatic_update);
}
private function playFlameThrowerSound():void{
if (pFlameThrowerSound == null){
pFlameThrowerSound = zhn_xxxmas.application.getSoundManager().playSound(flamethrower3, true);
};
}
private function playIceraySound():void{
if (pFlameThrowerSound == null){
pFlameThrowerSound = zhn_xxxmas.application.getSoundManager().playSound(flamethrower3, true);
};
}
private function feetStatic_update(_arg1:Event):void{
roleMoveProcess(0, 0);
pickingWeaponProcess();
touchJohnProcess();
}
public function breakFrozen():void{
if (pFeetStateMachine.isInState(STATUS_FROZEN)){
pFeetStateMachine.data.setValue("breakCount", 0);
};
}
private function doUziShoot():void{
if (currentWeapon.amount > 0){
if (pFeetStateMachine.isInState(STATUS_WALK)){
setState(STATUS_WALK_WITH_UZI_SHOOT);
} else {
setState(STATUS_STATIC_WITH_UZI_SHOOT);
};
};
}
override protected function static_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(static_update);
}
private function staticWithIcerayShoot_update(_arg1:Event):void{
var _local2:int;
if (((!(pFeetStateMachine.isInState(STATUS_STATIC))) || (!(pController.isKeyDown(Keyboard.SPACE))))){
setState(STATUS_STATIC);
} else {
_local2 = (pStateMachine.data.getInt("icerayTimer") + 1);
pStateMachine.data.setValue("icerayTimer", _local2);
IcerayHitTest(_local2);
if (pMovieClip.mc.gun.fire.currentFrame == pMovieClip.mc.gun.fire.totalFrames){
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
}
public function getAvailable9GridsLocAt(_arg1:int):PointInt{
return (Game.instance.convertToLegalLoc((currentTileLoc.x + pAvailableLocs[_arg1].x), (currentTileLoc.y + pAvailableLocs[_arg1].y)));
}
private function walkWithFlameThrowerShoot_exit(_arg1:String):void{
if (((currentWeapon) && ((currentWeapon.type == PropertyLoader.ITEM_FLAME_THROWER)))){
checkWeaponAmount();
};
pMovieClip.mc_walkWithFlameThrowerShoot.fire.gotoAndStop(1);
zhn_xxxmas.application.removeUpdateFunction(walkWithFlameThrowerShoot_update);
stopFlameThrowerSound();
}
private function defaultFeet_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(defaultFeet_update);
}
private function walkWithUziShoot_enter(_arg1:String):void{
setFrameLabel(STATUS_WALK_WITH_UZI_SHOOT);
pStateMachine.data.setValue("fireDelayTime", int.MIN_VALUE);
zhn_xxxmas.application.addUpdateFunction(walkWithUziShoot_update);
playUziSound();
}
private function walkWithUziShoot_exit(_arg1:String):void{
stopUziSound();
zhn_xxxmas.application.removeUpdateFunction(walkWithUziShoot_update);
}
private function staticWithUziShoot_exit(_arg1:String):void{
stopUziSound();
updateKeyboardState();
zhn_xxxmas.application.removeUpdateFunction(staticWithUziShoot_update);
}
private function throw_exit(_arg1:String):void{
updateKeyboardState();
zhn_xxxmas.application.removeUpdateFunction(throw_update);
}
private function init_update(_arg1:Event):void{
setState(STATUS_STATIC);
}
private function walkWithBussShoot_exit(_arg1:String):void{
pMovieClip.mc.gotoAndStop(1);
zhn_xxxmas.application.removeUpdateFunction(walkWithBussShoot_update);
}
private function inTrailer_update(_arg1:Event):void{
visible = false;
}
private function staticWithRifleShoot_update(_arg1:Event):void{
var _local2:int;
var _local3:ThrownWeapon;
if (((!(pFeetStateMachine.isInState(STATUS_STATIC))) || (!(pController.isKeyDown(Keyboard.SPACE))))){
setState(STATUS_STATIC);
} else {
_local2 = getTimer();
if (_local2 >= pStateMachine.data.getInt("fireDelayTime")){
_local3 = new ThrownWeapon(PropertyLoader.ITEM_BULLET, this, currentWeapon, (x + (pMovieClip.uziPoint.x * pMovieClip.scaleX)), ((y + pMovieClip.uziPoint.y) - 3), y, new Point(pMovieClip.scaleX, 0));
Game.instance.addWeapon(_local3);
pStateMachine.data.setValue("fireDelayTime", (_local2 + 100));
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
}
private function walkWithIcerayShoot_update(_arg1:Event):void{
var _local2:int;
if (((!(pFeetStateMachine.isInState(STATUS_WALK))) || (!(pController.isKeyDown(Keyboard.SPACE))))){
setState(STATUS_STATIC);
} else {
_local2 = (pStateMachine.data.getInt("icerayTimer") + 1);
pStateMachine.data.setValue("icerayTimer", _local2);
IcerayHitTest(_local2);
if (pMovieClip.mc.gun.fire.currentFrame == pMovieClip.mc.gun.fire.totalFrames){
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
}
private function punchTest():Boolean{
var _local4:AbstractRole;
var _local6:Number;
var _local7:Number;
var _local1:Boolean;
var _local2:Number = Number.MAX_VALUE;
var _local3:AbstractRole;
for each (_local4 in Game.instance.getRoles()) {
if ((((_local4.type == PropertyLoader.ROLE_JOHN)) && (John(_local4).isTricked))){
} else {
if (((((((_local4.isAlive()) && ((Math.abs((_local4.y - y)) < 40)))) && (Game.instance.isInCamera(_local4)))) && (!((_local4.type == PropertyLoader.ROLE_LOLA))))){
_local6 = (_local4.x - x);
_local7 = Math.abs(_local6);
if (((((_local6 * pMovieClip.scaleX) >= 0)) && ((_local7 < pPunchDistance)))){
if (_local7 < _local2){
_local2 = _local7;
_local3 = _local4;
};
};
};
};
};
if (_local3){
_local3.goHit(false, damage, null, this);
_local1 = true;
};
var _local5:DisplayObject = pMovieClip.punchTestRect;
if (_local5){
_local1 = ((hitBreakableObjectTest(_local5)) || (_local1));
};
return (_local1);
}
private function walkWithBussShoot_update(_arg1:Event):void{
if (!pFeetStateMachine.isInState(STATUS_WALK)){
setState(STATUS_STATIC);
} else {
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
setState(STATUS_STATIC);
} else {
if (pMovieClip.mc.currentFrame == 1){
roleMoveProcess(calculateKnockbackX(), 0);
updateRealPosition();
doBussShoot();
Game.instance.getCamera().shakeCamera();
currentWeapon.playSoundOfUsing();
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
};
}
private function staticWithFlameThrowerShoot_update(_arg1:Event):void{
if (((!(pFeetStateMachine.isInState(STATUS_STATIC))) || (!(pController.isKeyDown(Keyboard.SPACE))))){
setState(STATUS_STATIC);
} else {
flameThrowerHitTest();
if (pMovieClip.mc.fire.currentFrame == pMovieClip.mc.fire.totalFrames){
if (!checkWeaponAmount()){
setState(STATUS_STATIC);
};
};
};
}
private function IcerayHitTest(_arg1:int):Boolean{
var _local8:AbstractRole;
var _local9:Number;
var _local10:Number;
var _local2:Boolean;
var _local3:Configure = Game.instance.getWeaponConfigure(currentWeapon.type);
var _local4:Boolean = _local3.hitMultiple;
var _local5:int = _local3.hitDistance;
if (_arg1 < 10){
_local5 = (_local5 * (_arg1 / 10));
};
var _local6:Number = Number.MAX_VALUE;
var _local7:AbstractRole;
for each (_local8 in Game.instance.getRoles()) {
if ((((_local8.type == PropertyLoader.ROLE_JOHN)) && (John(_local8).isTricked))){
} else {
if (((((((_local8.isAlive()) && (!(_local8.isInFlaming())))) && ((Math.abs((_local8.y - y)) < 40)))) && (!((_local8.type == PropertyLoader.ROLE_LOLA))))){
_local9 = (_local8.x - x);
_local10 = Math.abs(_local9);
if (((((_local9 * pMovieClip.scaleX) >= 0)) && ((_local10 < _local5)))){
if (_local4){
_local7 = _local8;
_local7.goFrozen();
_local2 = true;
} else {
if (_local10 < _local6){
_local6 = _local10;
_local7 = _local8;
};
};
};
};
};
};
if (((!(_local4)) && (_local7))){
_local7.goFrozen();
_local2 = true;
};
return (_local2);
}
private function butthitting_enter(_arg1:String):void{
setFeetState(STATUS_BUTTHITTING);
setFrameLabel(STATUS_BUTTHITTING);
zhn_xxxmas.application.addUpdateFunction(butthitting_update);
updateRealPosition();
playSound(lola_seduce);
}
private function exitTrailer_exit(_arg1:String):void{
pMovieClip.y = 0;
zhn_xxxmas.application.removeUpdateFunction(exitTrailer_update);
}
private function setWalkAnimFrame():void{
if (currentWeapon){
if (currentWeapon.type == PropertyLoader.ITEM_SHOOTGUN){
setFrameLabel(STATUS_WALK_WITH_SHOOTGUN);
} else {
if (currentWeapon.type == PropertyLoader.ITEM_BUSS){
setFrameLabel(STATUS_WALK_WITH_BUSS);
} else {
if (currentWeapon.type == PropertyLoader.ITEM_LAUNCHER){
setFrameLabel(STATUS_WALK_WITH_LAUNCHER);
} else {
if (currentWeapon.type == PropertyLoader.ITEM_UZI){
setFrameLabel(STATUS_WALK_WITH_UZI);
} else {
if (currentWeapon.type == PropertyLoader.ITEM_RIFLE){
setFrameLabel(STATUS_WALK_WITH_RIFLE);
} else {
if (currentWeapon.type == PropertyLoader.ITEM_FLAME_THROWER){
setFrameLabel(STATUS_WALK_WITH_FLAME_THROWER);
} else {
if (currentWeapon.type == PropertyLoader.ITEM_ICERAY){
setFrameLabel(STATUS_WALK_WITH_ICERAY);
} else {
setFrameLabel(STATUS_WALK);
};
};
};
};
};
};
};
} else {
setFrameLabel(STATUS_WALK);
};
}
public function set currentWeapon(_arg1:Weapon):void{
if (_arg1){
Game.instance.dashboard.updateItem(_arg1.type, _arg1.amount);
} else {
Game.instance.dashboard.updateItem(null, 0);
Game.instance.removeWeapon(pCurrentWeapon);
};
pCurrentWeapon = _arg1;
}
private function feetStatic_process(_arg1:PostPackage):void{
processUIData((_arg1.data as UIData));
}
private function init_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(init_update);
}
private function init_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(init_update);
}
private function generateWeapon(_arg1:Object):void{
var _local2:Game = _arg1.game;
if (_local2 == Game.instance){
_local2.generateWeaponOutOfScreen(_arg1.weaponType);
};
}
private function goWalk(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
setPosition(_arg1, _arg2);
setFeetState(STATUS_WALK);
pVelocity = new Point(_arg3, _arg4);
pVelocity.normalize(getSpeed());
}
override protected function hit_update(_arg1:Event):Boolean{
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
if (isAlive()){
setState(STATUS_STATIC);
} else {
setState(STATUS_DIE);
};
return (true);
//unresolved jump
};
return (false);
}
private function walkWithRifleShoot_exit(_arg1:String):void{
stopUziSound();
zhn_xxxmas.application.removeUpdateFunction(walkWithRifleShoot_update);
}
public function getKilledCombos():int{
return (pKilledCombos);
}
private function punch_update(_arg1:Event):void{
if (pMovieClip.mc.currentFrame >= pMovieClip.mc.totalFrames){
setState(STATUS_STATIC);
} else {
if (pMovieClip.mc.currentFrame == 5){
if (punchTest()){
if (pStateMachine.data.getString("skill") == "kick"){
playSound(weapon_kick);
} else {
playSound(weapon_slap);
};
};
} else {
if (pMovieClip.mc.currentFrame == 4){
if (pStateMachine.data.getString("skill") == "kick"){
playSound(lola_throw_heavy);
} else {
playSound(lola_throw_light);
};
};
};
};
}
public function get currentWeapon():Weapon{
return (pCurrentWeapon);
}
}
}//package
Section 301
//lola_dead (lola_dead)
package {
import flash.media.*;
public dynamic class lola_dead extends Sound {
}
}//package
Section 302
//lola_hit (lola_hit)
package {
import flash.media.*;
public dynamic class lola_hit extends Sound {
}
}//package
Section 303
//lola_seduce (lola_seduce)
package {
import flash.media.*;
public dynamic class lola_seduce extends Sound {
}
}//package
Section 304
//lola_throw_heavy (lola_throw_heavy)
package {
import flash.media.*;
public dynamic class lola_throw_heavy extends Sound {
}
}//package
Section 305
//lola_throw_light (lola_throw_light)
package {
import flash.media.*;
public dynamic class lola_throw_light extends Sound {
}
}//package
Section 306
//MapObject (MapObject)
package {
import com.liquable.media.*;
import flash.display.*;
import com.liquable.utils.*;
import com.liquable.game.geom.*;
import com.liquable.game.camera.*;
import flash.geom.*;
public class MapObject extends Sprite implements ICameraObject {
private var pPosition:Point;
protected var pCurrentTileLoc:PointInt;
private var pType:String;
protected var pMovieClip:MovieClip;
private var pId:int;
protected static const DIR_LEFT:int = -1;
protected static const DIR_RIGHT:int = 1;
private static var idEnum:Enum = new Enum();
public function MapObject(_arg1:String, _arg2:int, _arg3:int){
pPosition = new Point();
super();
pType = _arg1;
var _local4:Point = Game.instance.getTileCenterPosition(_arg2, _arg3);
setPosition(_local4.x, _local4.y);
pId = idEnum.nextIndex();
}
public function get currentTileLoc():PointInt{
return (pCurrentTileLoc);
}
public function get depth():Number{
return (y);
}
protected function createMovieClip():MovieClip{
throw (new Error("MapObject.createMovieClip : invocation error!"));
}
protected function setMovieClipFrameLabel(_arg1:MovieClip, _arg2:String):void{
DesignContract.preCondition(!((_arg1 == null)));
if (_arg2 != _arg1.currentLabel){
_arg1.gotoAndStop(_arg2);
};
}
public function get hitTestRect():MovieClip{
return ((pMovieClip.hitTestRect) ? pMovieClip.hitTestRect : pMovieClip);
}
public function isTouched(_arg1:MapObject, _arg2:int=20, _arg3:Number=10):Boolean{
return ((((Math.abs((_arg1.x - x)) < Math.max(16, _arg2))) && ((Math.abs((_arg1.y - y)) < _arg3))));
}
protected function setFrameLabel(_arg1:String):void{
setMovieClipFrameLabel(pMovieClip, _arg1);
}
public function initialize():void{
pMovieClip = createMovieClip();
pMovieClip.stop();
addChild(pMovieClip);
updateRealPosition();
}
public function terminate():void{
while (numChildren > 0) {
removeChildAt(0);
};
if (parent){
parent.removeChild(this);
};
pPosition = null;
pMovieClip = null;
pCurrentTileLoc = null;
}
public function get id():int{
return (pId);
}
public function updateRealPosition():void{
var _local1:GameCamera = Game.instance.getCamera();
var _local2:Number = (zhn_xxxmas.application.gameWidth / 2);
if ((((_local1.x < _local2)) && (((pPosition.x + width) > (Game.instance.mapWidth - (_local2 - _local1.x)))))){
x = (pPosition.x - Game.instance.mapWidth);
} else {
if ((((_local1.x > (Game.instance.mapWidth - _local2))) && (((pPosition.x - width) < (_local1.x - (Game.instance.mapWidth - _local2)))))){
x = (pPosition.x + Game.instance.mapWidth);
} else {
x = pPosition.x;
};
};
var _local3:Number = (zhn_xxxmas.application.gameHeight / 2);
if ((((_local1.y < _local3)) && (((pPosition.y + height) > (Game.instance.mapHeight - (_local3 - _local1.y)))))){
y = (pPosition.y - Game.instance.mapHeight);
} else {
if ((((_local1.y > (Game.instance.mapHeight - _local3))) && (((pPosition.y - height) < (_local1.y - (Game.instance.mapHeight - _local3)))))){
y = (pPosition.y + Game.instance.mapHeight);
} else {
y = pPosition.y;
};
};
}
public function get position():Point{
return (pPosition);
}
public function setPosition(_arg1:Number, _arg2:Number):void{
if (_arg1 >= Game.instance.mapWidth){
_arg1 = (_arg1 - Game.instance.mapWidth);
} else {
if (_arg1 < 0){
_arg1 = (_arg1 + Game.instance.mapWidth);
};
};
if (_arg2 >= Game.instance.mapHeight){
_arg2 = (_arg2 - Game.instance.mapHeight);
} else {
if (_arg2 < 0){
_arg2 = (_arg2 + Game.instance.mapHeight);
};
};
pPosition.x = _arg1;
pPosition.y = _arg2;
pCurrentTileLoc = Game.instance.getTileLocFromPosition(pPosition.x, pPosition.y);
}
public function canHitLolaByTouch():Boolean{
return (false);
}
public function get type():String{
return (pType);
}
protected function playSound(_arg1:Class, _arg2:Boolean=false, _arg3:Number=1):SoundController{
var _local4:SoundController = zhn_xxxmas.application.getSoundManager().playSound(_arg1, _arg2);
if (Game.instance.isGameOver()){
_arg3 = 0;
};
_local4.setVolume(_arg3);
return (_local4);
}
}
}//package
Section 307
//mc_candycane1 (mc_candycane1)
package {
import flash.display.*;
public dynamic class mc_candycane1 extends MovieClip {
public function mc_candycane1(){
addFrameScript(0, frame1, 35, frame36, 51, frame52);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
function frame52(){
stop();
}
}
}//package
Section 308
//mc_candycane2 (mc_candycane2)
package {
import flash.display.*;
public dynamic class mc_candycane2 extends MovieClip {
public function mc_candycane2(){
addFrameScript(0, frame1, 35, frame36, 51, frame52);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
function frame52(){
stop();
}
}
}//package
Section 309
//mc_candycane3 (mc_candycane3)
package {
import flash.display.*;
public dynamic class mc_candycane3 extends MovieClip {
public function mc_candycane3(){
addFrameScript(0, frame1, 35, frame36, 51, frame52);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
function frame52(){
stop();
}
}
}//package
Section 310
//mc_candycane4 (mc_candycane4)
package {
import flash.display.*;
public dynamic class mc_candycane4 extends MovieClip {
public function mc_candycane4(){
addFrameScript(0, frame1, 35, frame36, 51, frame52);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
function frame52(){
stop();
}
}
}//package
Section 311
//mc_forest_grave1 (mc_forest_grave1)
package {
import flash.display.*;
public dynamic class mc_forest_grave1 extends MovieClip {
public function mc_forest_grave1(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 312
//mc_forest_propanetank (mc_forest_propanetank)
package {
import flash.display.*;
public dynamic class mc_forest_propanetank extends MovieClip {
public function mc_forest_propanetank(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package
Section 313
//mc_forest_rock1 (mc_forest_rock1)
package {
import flash.display.*;
public dynamic class mc_forest_rock1 extends MovieClip {
public function mc_forest_rock1(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 314
//mc_forest_rock2 (mc_forest_rock2)
package {
import flash.display.*;
public dynamic class mc_forest_rock2 extends MovieClip {
public function mc_forest_rock2(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 315
//mc_forest_stump1 (mc_forest_stump1)
package {
import flash.display.*;
public dynamic class mc_forest_stump1 extends MovieClip {
public function mc_forest_stump1(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 316
//mc_forest_tree1 (mc_forest_tree1)
package {
import flash.display.*;
public dynamic class mc_forest_tree1 extends MovieClip {
public function mc_forest_tree1(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 317
//mc_forest_tree2 (mc_forest_tree2)
package {
import flash.display.*;
public dynamic class mc_forest_tree2 extends MovieClip {
public function mc_forest_tree2(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 318
//mc_gy_coffin (mc_gy_coffin)
package {
import flash.display.*;
public dynamic class mc_gy_coffin extends MovieClip {
public function mc_gy_coffin(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 319
//mc_gy_coffin2 (mc_gy_coffin2)
package {
import flash.display.*;
public dynamic class mc_gy_coffin2 extends MovieClip {
public function mc_gy_coffin2(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 320
//mc_gy_grave1 (mc_gy_grave1)
package {
import flash.display.*;
public dynamic class mc_gy_grave1 extends MovieClip {
public function mc_gy_grave1(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package
Section 321
//mc_gy_grave2 (mc_gy_grave2)
package {
import flash.display.*;
public dynamic class mc_gy_grave2 extends MovieClip {
public function mc_gy_grave2(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package
Section 322
//mc_gy_grave3 (mc_gy_grave3)
package {
import flash.display.*;
public dynamic class mc_gy_grave3 extends MovieClip {
public function mc_gy_grave3(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package
Section 323
//mc_gy_grave4 (mc_gy_grave4)
package {
import flash.display.*;
public dynamic class mc_gy_grave4 extends MovieClip {
public function mc_gy_grave4(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 324
//mc_gy_grave5 (mc_gy_grave5)
package {
import flash.display.*;
public dynamic class mc_gy_grave5 extends MovieClip {
public function mc_gy_grave5(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package
Section 325
//mc_gy_grave6 (mc_gy_grave6)
package {
import flash.display.*;
public dynamic class mc_gy_grave6 extends MovieClip {
public function mc_gy_grave6(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package
Section 326
//mc_gy_grave7 (mc_gy_grave7)
package {
import flash.display.*;
public dynamic class mc_gy_grave7 extends MovieClip {
public function mc_gy_grave7(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 327
//mc_gy_grave8 (mc_gy_grave8)
package {
import flash.display.*;
public dynamic class mc_gy_grave8 extends MovieClip {
public function mc_gy_grave8(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 328
//mc_gy_grave9 (mc_gy_grave9)
package {
import flash.display.*;
public dynamic class mc_gy_grave9 extends MovieClip {
public function mc_gy_grave9(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package
Section 329
//mc_gy_pillar1 (mc_gy_pillar1)
package {
import flash.display.*;
public dynamic class mc_gy_pillar1 extends MovieClip {
public function mc_gy_pillar1(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 330
//mc_gy_pillar2 (mc_gy_pillar2)
package {
import flash.display.*;
public dynamic class mc_gy_pillar2 extends MovieClip {
public function mc_gy_pillar2(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 331
//mc_gy_pillar3 (mc_gy_pillar3)
package {
import flash.display.*;
public dynamic class mc_gy_pillar3 extends MovieClip {
public function mc_gy_pillar3(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 332
//mc_gy_rock1 (mc_gy_rock1)
package {
import flash.display.*;
public dynamic class mc_gy_rock1 extends MovieClip {
public function mc_gy_rock1(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 333
//mc_gy_rock2 (mc_gy_rock2)
package {
import flash.display.*;
public dynamic class mc_gy_rock2 extends MovieClip {
public function mc_gy_rock2(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 334
//mc_gy_stump1 (mc_gy_stump1)
package {
import flash.display.*;
public dynamic class mc_gy_stump1 extends MovieClip {
public function mc_gy_stump1(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 335
//mc_gy_stump2 (mc_gy_stump2)
package {
import flash.display.*;
public dynamic class mc_gy_stump2 extends MovieClip {
public function mc_gy_stump2(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 336
//mc_gy_tree1 (mc_gy_tree1)
package {
import flash.display.*;
public dynamic class mc_gy_tree1 extends MovieClip {
public function mc_gy_tree1(){
addFrameScript(0, frame1, 10, frame11);
}
function frame1(){
stop();
}
function frame11(){
stop();
}
}
}//package
Section 337
//MC_HUDBaseWithStuff (MC_HUDBaseWithStuff)
package {
import flash.display.*;
import flash.text.*;
public dynamic class MC_HUDBaseWithStuff extends MovieClip {
public var mcFullMsg:MovieClip;
public var moneyText:TextField;
public var hpBar:MovieClip;
public var nightsText:TextField;
public var tricksText:TextField;
public var items:MovieClip;
public var itemText:TextField;
}
}//package
Section 338
//mc_pole1 (mc_pole1)
package {
import flash.display.*;
public dynamic class mc_pole1 extends MovieClip {
public function mc_pole1(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package
Section 339
//mc_pole2 (mc_pole2)
package {
import flash.display.*;
public dynamic class mc_pole2 extends MovieClip {
public function mc_pole2(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package
Section 340
//mc_pole3 (mc_pole3)
package {
import flash.display.*;
public dynamic class mc_pole3 extends MovieClip {
public function mc_pole3(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package
Section 341
//mc_snowman0 (mc_snowman0)
package {
import flash.display.*;
public dynamic class mc_snowman0 extends MovieClip {
public function mc_snowman0(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 342
//mc_snowman1 (mc_snowman1)
package {
import flash.display.*;
public dynamic class mc_snowman1 extends MovieClip {
public function mc_snowman1(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 343
//mc_snowman2 (mc_snowman2)
package {
import flash.display.*;
public dynamic class mc_snowman2 extends MovieClip {
public function mc_snowman2(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 344
//mc_snowman3 (mc_snowman3)
package {
import flash.display.*;
public dynamic class mc_snowman3 extends MovieClip {
public function mc_snowman3(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 345
//mc_snowman4 (mc_snowman4)
package {
import flash.display.*;
public dynamic class mc_snowman4 extends MovieClip {
public function mc_snowman4(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 346
//mc_snowman5 (mc_snowman5)
package {
import flash.display.*;
public dynamic class mc_snowman5 extends MovieClip {
public function mc_snowman5(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 347
//mc_snowman6 (mc_snowman6)
package {
import flash.display.*;
public dynamic class mc_snowman6 extends MovieClip {
public function mc_snowman6(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 348
//mc_snowman7 (mc_snowman7)
package {
import flash.display.*;
public dynamic class mc_snowman7 extends MovieClip {
public function mc_snowman7(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 349
//mc_snowman8 (mc_snowman8)
package {
import flash.display.*;
public dynamic class mc_snowman8 extends MovieClip {
public function mc_snowman8(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 350
//mc_snowman9 (mc_snowman9)
package {
import flash.display.*;
public dynamic class mc_snowman9 extends MovieClip {
public function mc_snowman9(){
addFrameScript(0, frame1, 11, frame12);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 351
//mc_statue1 (mc_statue1)
package {
import flash.display.*;
public dynamic class mc_statue1 extends MovieClip {
public function mc_statue1(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package
Section 352
//mc_statue2 (mc_statue2)
package {
import flash.display.*;
public dynamic class mc_statue2 extends MovieClip {
public function mc_statue2(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package
Section 353
//Message (Message)
package {
import com.liquable.game.postoffice.*;
import com.liquable.utils.*;
public class Message implements IPostData {
private var pType:int;
private var pData:MapData;
public static const TYPE_SCREEN_GAME:int = TYPES.nextIndex();
public static const PLAYER_IDLE:int = TYPES.nextIndex();
public static const WEAPON_PICKED:int = TYPES.nextIndex();
public static const WEAPON_STILL:int = TYPES.nextIndex();
public static const TYPE_SCREEN_COVER:int = TYPES.nextIndex();
public static const WEAPON_THROWN:int = TYPES.nextIndex();
public static const PLAYER_MOVE:int = TYPES.nextIndex();
public static const DATA_TYPE:String = "Message";
private static var TYPES:Enum = new Enum();
public function Message(_arg1:int){
pType = _arg1;
pData = new MapData();
}
public function get data():MapData{
return (pData);
}
public function get type():int{
return (pType);
}
public function set data(_arg1:MapData):void{
pData = _arg1;
}
public function get data_type():String{
return (DATA_TYPE);
}
}
}//package
Section 354
//metal_hit_2 (metal_hit_2)
package {
import flash.media.*;
public dynamic class metal_hit_2 extends Sound {
}
}//package
Section 355
//molotov_smash (molotov_smash)
package {
import flash.media.*;
public dynamic class molotov_smash extends Sound {
}
}//package
Section 356
//MovableObject (MovableObject)
package {
import flash.events.*;
import com.liquable.game.postoffice.*;
import flash.geom.*;
public class MovableObject extends MapObject {
protected var pStateMachine:PostStateClient;
protected var pVelocity:Point;
private var pSpeed:Number;
public function MovableObject(_arg1:String, _arg2:int, _arg3:int, _arg4:Number){
super(_arg1, _arg2, _arg3);
pSpeed = _arg4;
}
override public function terminate():void{
zhn_xxxmas.application.removeUpdateFunction(adjustLayer);
if (pStateMachine){
pStateMachine.destroy();
pStateMachine = null;
};
pVelocity = null;
super.terminate();
}
public function isInState(_arg1:String):Boolean{
return (((pStateMachine) && (pStateMachine.isInState(_arg1))));
}
protected function adjustLayer(_arg1:Event):void{
var _local2:MapObject;
if (Game.instance.isInCamera(this)){
for each (_local2 in Game.instance.getMapObjects()) {
if (((Game.instance.isInCamera(_local2)) && ((Game.instance.getObjectIndex(_local2) > Game.instance.getObjectIndex(this))))){
if (_local2.depth < depth){
Game.instance.swapObjects(this, _local2);
};
};
};
};
}
protected function setState(_arg1:String):void{
if (!pStateMachine.isInState(_arg1)){
pStateMachine.setState(_arg1);
};
}
override public function initialize():void{
super.initialize();
if (pVelocity == null){
pVelocity = new Point();
};
pStateMachine = new PostStateClient(zhn_xxxmas.application);
pStateMachine.setPostId(id.toString());
zhn_xxxmas.application.addUpdateFunction(adjustLayer);
}
public function getSpeed():Number{
return (pSpeed);
}
}
}//package
Section 357
//object_break (object_break)
package {
import flash.media.*;
public dynamic class object_break extends Sound {
}
}//package
Section 358
//OldmanWinter (OldmanWinter)
package {
import flash.events.*;
import com.liquable.game.events.*;
import flash.display.*;
import com.liquable.game.geom.*;
import flash.geom.*;
public class OldmanWinter extends GenericHookerZombie {
private var pAttackCooldown:int;// = 0
private static const BLOW_DURATION:int = 150;
private static const STATUS_BLOW:String = "blow";
public function OldmanWinter(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
pAttackHitFrame = 14;
pTryKeepDistance = 100;
}
override protected function attack_enter(_arg1:String):void{
super.attack_enter(_arg1);
Game.instance.setSnowManagerRun(true, GameConfig.instance.snowOldmanwinterInterval);
}
override protected function updateFacing(_arg1:Point):void{
if (pStateMachine.isInState(STATUS_BLOW)){
pMovieClip.scaleX = ((x)<Game.instance.getLola().x) ? DIR_RIGHT : DIR_LEFT;
} else {
pMovieClip.scaleX = ((_arg1.x > 0)) ? DIR_RIGHT : DIR_LEFT;
};
}
override protected function createMovieClip():MovieClip{
return (new lib_oldmanwinter());
}
private function blow_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(blow_update);
setFrameLabel("attack");
}
override public function canHitLolaByTouch():Boolean{
return (false);
}
override protected function needKeepDistance(_arg1:Number):Boolean{
return ((Math.abs(_arg1) < pTryKeepDistance));
}
override public function getSpeed():Number{
if (pStateMachine.isInState(STATUS_BLOW)){
return ((Game.instance.getLola().getSpeed() + 2));
};
return (super.getSpeed());
}
override protected function endOfGotoLoc():void{
var _local1:int = pStateMachine.data.getInt("blowTimer");
if (_local1 > BLOW_DURATION){
setState(STATUS_STATIC);
} else {
setState(STATUS_BLOW);
};
}
override public function idle():void{
if (pStateMachine.isInState(STATUS_BLOW)){
return;
};
pStateMachine.setState(STATUS_STATIC);
}
override protected function attack_exit(_arg1:String):void{
super.attack_exit(_arg1);
pAttackCooldown = 30;
}
override protected function isStateAllowedToThink():Boolean{
return (((!(pStateMachine.isInState(STATUS_BLOW))) && (super.isStateAllowedToThink())));
}
override public function initialize():void{
super.initialize();
pStateMachine.initState(STATUS_BLOW, blow_enter, null, blow_exit);
pStateMachine.data.setValue("blowTimer", 0);
pStateMachine.setState(STATUS_BLOW);
}
override protected function die_enter(_arg1:String):void{
super.die_enter(_arg1);
Game.instance.setSnowManagerRun(true, GameConfig.instance.snowNormalInterval);
}
private function blow_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(blow_update);
}
override protected function ai_think_update(_arg1:Event):void{
var _local2:Lola;
if (isStateAllowedToThink()){
if (pAttackCooldown > 0){
pAttackCooldown--;
_local2 = Game.instance.getLola();
if (x > _local2.x){
targetLoc = new PointInt((_local2.currentTileLoc.x + 10), (_local2.currentTileLoc.y - 2));
} else {
targetLoc = new PointInt((_local2.currentTileLoc.x - 10), (_local2.currentTileLoc.y - 2));
};
setState(STATUS_GO_TO_LOC);
} else {
super.ai_think_update(_arg1);
};
};
}
private function blow_update(_arg1:GameApplicationUpdateEvent):void{
var _local3:Boolean;
var _local4:PointInt;
if (Game.instance.isPausing()){
return;
};
var _local2:int = pStateMachine.data.getInt("blowTimer");
_local3 = Game.instance.isInCamera(this);
if (_local3){
++_local2;
pStateMachine.data.setValue("blowTimer", _local2);
Game.instance.setSnowManagerRun(true, GameConfig.instance.snowOldmanwinterInterval);
};
if (_local2 > BLOW_DURATION){
setState(STATUS_STATIC);
} else {
_local4 = Game.instance.getLola().currentTileLoc;
targetLoc = new PointInt(_local4.x, (_local4.y - 1));
if (_local3){
if (x < Game.instance.getLola().x){
targetLoc.x = (targetLoc.x - 8);
} else {
targetLoc.x = (targetLoc.x + 8);
};
};
goToLoc_update(_arg1);
};
}
}
}//package
Section 359
//PropertyLoader (PropertyLoader)
package {
import flash.events.*;
import flash.xml.*;
import flash.net.*;
public class PropertyLoader extends EventDispatcher {
private var pProperties:Object;
private var pFactors:Object;
private var pGoalProperties:Object;
public static const ITEM_ZOMBIE_LEG:String = "zombieLeg";
public static const ITEM_GRENADE:String = "grenade";
public static const ITEM_SKULL:String = "skull";
public static const ITEM_TIRE_IRON:String = "tireIron";
public static const ITEM_UZI:String = "uzi";
public static const ROLE_SANTA:String = "santa";
private static const sTags:Array = ["role", "weapon", "rank"];
public static const ROLE_REINDEER:String = "reindeer";
public static const ITEM_FLAMING_SKULL:String = "flamingSkull";
public static const ROLE_JOHN:String = "john";
public static const ROLE_PURPLE_DECOMPOSED_ZOMBIE:String = "purpleDecomposedZombie";
public static const ITEM_CHAINSAW:String = "chainsaw";
public static const ITEM_CANE:String = "cane";
public static const ITEM_GOLF_CLUB:String = "golfClub";
public static const ITEM_LAUNCHER:String = "launcher";
public static const ITEM_PAN:String = "pan";
public static const ROLE_FIRE_SPITTER_ZOMBIE:String = "fireSpitterZombie";
public static const ITEM_MOLOTOV:String = "molotov";
public static const ROLE_LOLA:String = "lola";
public static const ITEM_SHOVEL:String = "shovel";
public static const ROLE_GNOMES_ZOMBIE:String = "gnomeZombie";
public static const ITEM_ICERAY:String = "iceray";
public static const ITEM_SHOOTGUN:String = "shootgun";
public static const ITEM_BONE:String = "bone";
public static const LOAD_COMPLETE:String = "loadComplete";
public static const ITEM_LASER_BEAM:String = "laserBeam";
public static const ROLE_SIAMESE_ZOMBIE:String = "siameseZombie";
public static const ITEM_GIFTBOMB:String = "giftBomb";
public static const ITEM_RIFLE:String = "rifle";
public static const ITEM_BIGGIFTBOMB:String = "bigGiftBomb";
public static const ROLE_DECOMPOSED_ZOMBIE2:String = "decomposedZombie2";
public static const ROLE_GENERIC_HOOKER_MOMMY_ZOMBIE:String = "genericHookerMommyZombie";
public static const ROLE_GNOME_ZOMBIE:String = "gnomeZombie";
public static const ITEM_LIGHTWHIP:String = "lightWhip";
public static const ROLE_FAT_ZOMBIE:String = "fatZombie";
public static const ITEM_FLAME_THROWER:String = "flameThrower";
public static const ROLE_ANKLE_BITER_ZOMBIE:String = "ankleBiterZombie";
public static const ITEM_ANY:String = "any";
public static const ROLE_GENERIC_HOOKER_ZOMBIE:String = "genericHookerZombie";
public static const ROLE_OLDMAN_WINTER:String = "oldmanWinter";
public static const ITEM_BUSS_BULLET:String = "bussBullet";
public static const OBJ_TRAILER:String = "trailer";
public static const ROLE_ICE_QUEEN:String = "iceQueen";
public static const ITEM_BUSS:String = "buss";
public static const ITEM_XMASCANE:String = "xmasCane";
public static const ITEM_SWORD:String = "sword";
public static const ITEM_BULLET:String = "bullet";
public static const ROLE_GENERIC_HOOKER_FLOATER_ZOMBIE:String = "genericHookerFloaterZombie";
public static const ITEM_ICEBALL:String = "iceball";
public static const ITEM_HEART_BOMB:String = "heartBomb";
public static const ROLE_DECOMPOSED_ZOMBIE:String = "decomposedZombie";
public static const ITEM_HORNED_SKULL:String = "hornedSkull";
public static const ITEM_STILLETTO:String = "stiletto";
public static const ITEM_CASH:String = "cash";
public static const ITEM_FIREBALL:String = "fireBall";
public static const ROLE_REINDEER2:String = "reindeer2";
public static const ITEM_FAT_ZOMBIE_HEAD:String = "fatZombieHead";
public static const ITEM_NONE:String = "none";
public static const ITEM_DEATH_KISS:String = "deathKiss";
public static const ITEM_HEART:String = "heart";
private static var sWeaponTypes:Array;
public function PropertyLoader(){
var _local1:String;
super();
pProperties = new Object();
for each (_local1 in sTags) {
pProperties[_local1] = new Object();
};
pFactors = new Object();
sWeaponTypes = new Array();
sWeaponTypes.push(PropertyLoader.ITEM_BONE);
sWeaponTypes.push(PropertyLoader.ITEM_CANE);
sWeaponTypes.push(PropertyLoader.ITEM_CHAINSAW);
sWeaponTypes.push(PropertyLoader.ITEM_FLAMING_SKULL);
sWeaponTypes.push(PropertyLoader.ITEM_GOLF_CLUB);
sWeaponTypes.push(PropertyLoader.ITEM_HORNED_SKULL);
sWeaponTypes.push(PropertyLoader.ITEM_MOLOTOV);
sWeaponTypes.push(PropertyLoader.ITEM_PAN);
sWeaponTypes.push(PropertyLoader.ITEM_SHOOTGUN);
sWeaponTypes.push(PropertyLoader.ITEM_SHOVEL);
sWeaponTypes.push(PropertyLoader.ITEM_SKULL);
sWeaponTypes.push(PropertyLoader.ITEM_STILLETTO);
sWeaponTypes.push(PropertyLoader.ITEM_SWORD);
sWeaponTypes.push(PropertyLoader.ITEM_TIRE_IRON);
sWeaponTypes.push(PropertyLoader.ITEM_UZI);
sWeaponTypes.push(PropertyLoader.ITEM_FLAME_THROWER);
sWeaponTypes.push(PropertyLoader.ITEM_ZOMBIE_LEG);
sWeaponTypes.push(PropertyLoader.ITEM_CASH);
sWeaponTypes.push(PropertyLoader.ITEM_HEART);
sWeaponTypes.push(PropertyLoader.ITEM_XMASCANE);
sWeaponTypes.push(PropertyLoader.ITEM_RIFLE);
sWeaponTypes.push(PropertyLoader.ITEM_LAUNCHER);
sWeaponTypes.push(PropertyLoader.ITEM_ICERAY);
sWeaponTypes.push(PropertyLoader.ITEM_GIFTBOMB);
sWeaponTypes.push(PropertyLoader.ITEM_BIGGIFTBOMB);
sWeaponTypes.push(PropertyLoader.ITEM_LIGHTWHIP);
sWeaponTypes.push(PropertyLoader.ITEM_BUSS);
}
public function getRoleProperty(_arg1:String):Configure{
return (new Configure(pProperties["role"][_arg1]));
}
public function loadFromXml(_arg1:XMLDocument):void{
analyzeXmlDoc(_arg1);
dispatchEvent(new Event(LOAD_COMPLETE));
}
public function terminate():void{
sWeaponTypes = null;
pProperties = null;
pFactors = null;
}
public function getMaxRank():int{
var _local2:Object;
var _local1:int;
for each (_local2 in pProperties["rank"]) {
_local1 = Math.max(_local1, parseInt(_local2.name));
};
return (_local1);
}
public function loadFromFile(_arg1:String):void{
var _local2:URLLoader = new URLLoader();
_local2.addEventListener(Event.COMPLETE, onLoadComplete);
_local2.load(new URLRequest(_arg1));
}
private function analyzeXmlDoc(_arg1:XMLDocument):void{
var _local3:XMLNode;
var _local4:String;
var _local5:String;
var _local2:XMLNode = _arg1.firstChild;
for each (_local3 in _local2.childNodes) {
switch (_local3.nodeName){
case "rankCategory":
pFactors = _local3.attributes;
break;
case "goalCategory":
pGoalProperties = _local3.attributes;
break;
};
_local4 = "Category";
_local5 = _local3.nodeName.substr(0, (_local3.nodeName.length - _local4.length));
analyzeCategoryNodes(_local3.childNodes, _local5);
};
}
public function getWeaponProperty(_arg1:String):Configure{
return (new Configure(pProperties["weapon"][_arg1]));
}
public function getRankProperty(_arg1:int):Configure{
_arg1 = Math.min(_arg1, objectMemberCount(pProperties["rank"]));
return (new Configure(pProperties["rank"][_arg1.toString()]));
}
public function getFactorProperty():Configure{
return (new Configure(pFactors));
}
public function getGoalProperties():Configure{
return (new Configure(pGoalProperties));
}
private function objectMemberCount(_arg1:Object):int{
var _local3:Object;
var _local2:int;
for each (_local3 in _arg1) {
_local2++;
};
return (_local2);
}
private function onLoadComplete(_arg1:Event):void{
var _local2:XMLDocument = new XMLDocument();
_local2.ignoreWhite = true;
_local2.parseXML(new XML(_arg1.target.data));
loadFromXml(_local2);
}
private function analyzeCategoryNodes(_arg1:Array, _arg2:String):void{
var _local3:XMLNode;
for each (_local3 in _arg1) {
if (_local3.nodeName == _arg2){
pProperties[_arg2][_local3.attributes.name] = _local3.attributes;
};
};
}
public static function get types():Array{
return (sWeaponTypes);
}
}
}//package
Section 360
//PurpleDecomposedZombie (PurpleDecomposedZombie)
package {
import flash.events.*;
import flash.display.*;
public class PurpleDecomposedZombie extends DecomposedZombie {
public function PurpleDecomposedZombie(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
}
override public function initialize():void{
super.initialize();
pStateMachine.initState(STATUS_REBUILD, rebuild_enter, null, rebuild_exit);
}
private function rebuild_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(rebuild_update);
}
override protected function createMovieClip():MovieClip{
return (new lib_purple_decomposed_zombie());
}
override protected function isStateAllowedToThink():Boolean{
return (((super.isStateAllowedToThink()) && (!(pStateMachine.isInState(STATUS_REBUILD)))));
}
override protected function die_update(_arg1:Event):void{
if (Game.instance.isPausing()){
return;
};
var _local2:int = (pStateMachine.data.getInt("endTimer") - 1);
pStateMachine.data.setValue("endTimer", _local2);
if (_local2 < 0){
if (isInFlaming()){
Game.instance.removeRole(this);
} else {
setState(STATUS_REBUILD);
};
};
}
override protected function die_enter(_arg1:String):void{
targetLoc = null;
pursuedRole = null;
nextPursuedPosition = null;
setFrameLabel(STATUS_DISMEMBER);
pStateMachine.data.setValue("endTimer", 160);
zhn_xxxmas.application.addUpdateFunction(die_update);
if (isInFlaming()){
checkKilledCombos();
};
}
private function rebuild_enter(_arg1:String):void{
setFrameLabel(STATUS_REBUILD);
zhn_xxxmas.application.addUpdateFunction(rebuild_update);
playSound(skeleton_bone_rattles);
}
private function rebuild_update(_arg1:Event):void{
if (pMovieClip.mc.currentFrame == pMovieClip.mc.totalFrames){
setHp(Game.instance.getRankConfigure().getZombieHp(this.type));
setState(STATUS_STATIC);
};
}
}
}//package
Section 361
//RankScoreManager (RankScoreManager)
package {
import com.liquable.game.debug.*;
public class RankScoreManager {
private var pRankScore:int;
private var pRank:int;
public function RankScoreManager(){
pRank = 0;
pRankScore = 0;
}
public function terminate():void{
}
public function getRank():int{
return (pRank);
}
public function addTimeScore():void{
addRankScore(Game.instance.getFactorConfig().timeFactor);
}
private function addRankScore(_arg1:int):void{
pRankScore = (pRankScore + _arg1);
var _local2:int = Game.instance.getMaxRank();
while (_local2 > pRank) {
if (pRankScore > Game.instance.getRankConfigureByRank(_local2).threshold){
pRank = _local2;
break;
};
_local2--;
};
zhn_xxxmas.application.debugWatchItem("rank", DebugTagValueWatcher.getById("rank").setValue(((pRank.toString() + ", score : ") + pRankScore)));
}
public function addJohnScore():void{
addRankScore(Game.instance.getFactorConfig().johnFactor);
}
public function addZombieScore(_arg1:String):void{
addRankScore((Game.instance.getRoleConfigure(_arg1).score * Game.instance.getFactorConfig().killFactor));
}
public function getRankScore():int{
return (pRankScore);
}
public function addWeaponScore():void{
addRankScore(Game.instance.getFactorConfig().pickWeaponFactor);
}
public function addMoneyScore(_arg1:int):void{
addRankScore((Math.ceil((_arg1 / 100)) * Game.instance.getFactorConfig().moneyFactor));
}
}
}//package
Section 362
//ReinDeer (ReinDeer)
package {
import flash.display.*;
import flash.geom.*;
public class ReinDeer extends FatZombie {
public function ReinDeer(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
pTryKeepDistance = 60;
pFrameToThrowWeapon = 45;
}
override protected function createMovieClip():MovieClip{
return (new lib_reindeer());
}
override protected function createThrowWeapon():void{
var _local1:Point = new Point((pursuedRole.x - x), (pursuedRole.y - y));
Game.instance.addWeapon(new ThrownWeapon(PropertyLoader.ITEM_LASER_BEAM, this, null, (x + (pMovieClip.throwPoint.x * pMovieClip.scaleX)), (y + pMovieClip.throwPoint.y), y, _local1));
playSound(reindeer_laser);
}
override public function isTouched(_arg1:MapObject, _arg2:int=20, _arg3:Number=10):Boolean{
return (super.isTouched(_arg1, _arg2, 100));
}
}
}//package
Section 363
//reindeer_laser (reindeer_laser)
package {
import flash.media.*;
public dynamic class reindeer_laser extends Sound {
}
}//package
Section 364
//Reindeer2 (Reindeer2)
package {
import flash.display.*;
public class Reindeer2 extends GenericHookerZombie {
public function Reindeer2(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
pAttackHitFrame = 9;
}
override protected function createMovieClip():MovieClip{
return (new lib_reindeer2());
}
}
}//package
Section 365
//RoleFactory (RoleFactory)
package {
public final class RoleFactory {
public static function createRole(_arg1:String, _arg2:int, _arg3:int):AbstractRole{
switch (_arg1){
case PropertyLoader.ROLE_LOLA:
return (new Lola(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_JOHN:
return (new John(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_GENERIC_HOOKER_ZOMBIE:
return (new GenericHookerZombie(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_ANKLE_BITER_ZOMBIE:
return (new AnkleBiterZombie(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_FAT_ZOMBIE:
return (new FatZombie(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_DECOMPOSED_ZOMBIE:
return (new DecomposedZombie(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_DECOMPOSED_ZOMBIE2:
return (new DecomposedZombie2(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_PURPLE_DECOMPOSED_ZOMBIE:
return (new PurpleDecomposedZombie(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_FIRE_SPITTER_ZOMBIE:
return (new FireSpitterZombie(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_ICE_QUEEN:
return (new IceQueen(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_GNOMES_ZOMBIE:
return (new GnomeZombie(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_REINDEER:
return (new ReinDeer(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_REINDEER2:
return (new Reindeer2(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_SANTA:
return (new Santa(_arg1, _arg2, _arg3));
case PropertyLoader.ROLE_OLDMAN_WINTER:
return (new OldmanWinter(_arg1, _arg2, _arg3));
default:
throw (new Error("RoleFactory.createRole : roleType error!"));
};
}
}
}//package
Section 366
//Santa (Santa)
package {
import flash.events.*;
import flash.display.*;
import com.liquable.utils.*;
import com.liquable.game.geom.*;
public class Santa extends John {
public function Santa(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3);
}
override public function isSanta():Boolean{
return (true);
}
override protected function createMovieClip():MovieClip{
return (new lib_santa());
}
override public function isJohn(_arg1:Boolean):Boolean{
return (_arg1);
}
override public function set pursuedRole(_arg1:AbstractRole):void{
super.pursuedRole = _arg1;
}
override public function goHit(_arg1:Boolean, _arg2:int, _arg3:String, _arg4:AbstractRole):void{
}
override protected function ai_think_update(_arg1:Event):void{
var _local2:PointInt;
var _local3:int;
var _local4:int;
var _local5:PointInt;
var _local6:int;
if (isStateAllowedToThink()){
if (pursuedRole){
super.ai_think_update(_arg1);
} else {
if (isInRange(Game.instance.getLola())){
_local2 = Game.instance.getLola().currentTileLoc;
_local3 = (((currentTileLoc.x - _local2.x) > 0)) ? 1 : -1;
_local4 = (((currentTileLoc.y - _local2.y) > 0)) ? 1 : -1;
_local6 = 10;
while ((((_local5 == null)) || (!(Game.instance.getMap().canWalk(_local5.x, _local5.y))))) {
--_local6;
if (_local6 < 0){
break;
};
if (_local5 == null){
_local5 = new PointInt();
};
_local5.x = (currentTileLoc.x + (_local3 * IntUtil.randomBetween(1, 5)));
_local5.y = (currentTileLoc.y + (_local4 * IntUtil.randomBetween(0, 5)));
};
if ((((_local6 >= 0)) && (_local5))){
targetLoc = _local5;
setAIState(STATUS_AI_STATIC);
setState(STATUS_GO_TO_LOC);
};
} else {
targetLoc = null;
};
};
};
}
}
}//package
Section 367
//ScreenCover (ScreenCover)
package {
import flash.events.*;
import com.liquable.media.*;
import flash.display.*;
import com.liquable.visualstack.*;
import com.liquable.utils.*;
public class ScreenCover extends VisualSprite {
private var pMovieClip:lib_screen_cover;
private function onInitScreen(_arg1:SimpleButton):void{
updateMuteButtonState();
}
private function onConfigLoaded():void{
pMovieClip.play();
if (GameConfig.instance.debugPanel){
zhn_xxxmas.application.setDebugPanelRoot(zhn_xxxmas.instance);
};
}
private function onButtonEpisode1(_arg1:MouseEvent):void{
selecteLevel(1);
}
private function onButtonEpisode2(_arg1:MouseEvent):void{
selecteLevel(2);
}
override public function onPop():MapData{
removeChild(pMovieClip);
pMovieClip = null;
return (super.onPop());
}
private function onScreenReady(_arg1:SimpleButton):void{
if (_arg1){
_arg1.addEventListener(MouseEvent.CLICK, onButtonEpisode1, false, 0, true);
_arg1.addEventListener(MouseEvent.MOUSE_OVER, zhn_xxxmas.mouse_over, false, 0, true);
};
pMovieClip.buttonMoregames.addEventListener(MouseEvent.CLICK, zhn_xxxmas.linkMoreGames, false, 0, true);
pMovieClip.buttonMoregames.addEventListener(MouseEvent.MOUSE_OVER, zhn_xxxmas.mouse_over, false, 0, true);
pMovieClip.buttonSoundOn.addEventListener(MouseEvent.CLICK, onButtonSound, false, 0, true);
pMovieClip.buttonSoundOff.addEventListener(MouseEvent.CLICK, onButtonSound, false, 0, true);
pMovieClip.buttonSoundOn.addEventListener(MouseEvent.ROLL_OVER, zhn_xxxmas.mouse_over, false, 0, true);
pMovieClip.buttonSoundOff.addEventListener(MouseEvent.ROLL_OVER, zhn_xxxmas.mouse_over, false, 0, true);
pMovieClip.buttonAdultswim.addEventListener(MouseEvent.MOUSE_OVER, zhn_xxxmas.mouse_over, false, 0, true);
pMovieClip.buttonAdultswim.addEventListener(MouseEvent.CLICK, zhn_xxxmas.linkMoreGames, false, 0, true);
updateMuteButtonState();
}
override public function onPush():void{
var _local1:GameConfig;
super.onPush();
pMovieClip = new lib_screen_cover();
pMovieClip.stop();
pMovieClip.initScreen = onInitScreen;
pMovieClip.screenOver = onScreenOver;
pMovieClip.onScreenReady = onScreenReady;
pMovieClip.x = (728 / 2);
pMovieClip.y = (500 / 2);
addChild(pMovieClip);
if (GameConfig.instance == null){
if (EmbedManager.singleton.available){
_local1 = new GameConfig(null, onConfigLoaded);
_local1.importXml(EmbedManager.singleton.getConfig());
} else {
new GameConfig((zhn_xxxmas.getStrBase() + "config.xml"), onConfigLoaded);
};
} else {
onConfigLoaded();
};
}
private function selecteLevel(_arg1:int):void{
zhn_xxxmas.mouse_down();
data.setValue("level", _arg1.toString());
data.setValue("nights", 1);
data.setValue("msg", Message.TYPE_SCREEN_GAME);
pMovieClip.play();
pMovieClip.mouseChildren = (pMovieClip.mouseEnabled = false);
}
private function updateMuteButtonState():void{
var _local2:Number;
var _local1:SoundManager = zhn_xxxmas.application.getSoundManager();
_local2 = _local1.getGlobalVolume();
pMovieClip.buttonSoundOn.visible = (_local2 == 1);
pMovieClip.buttonSoundOff.visible = (_local2 == 0);
}
private function onButtonSound(_arg1:MouseEvent):void{
zhn_xxxmas.mouse_down();
var _local2:SoundManager = zhn_xxxmas.application.getSoundManager();
var _local3:Number = ((_local2.getGlobalVolume() == 0)) ? 1 : 0;
_local2.setGlobalVolume(_local3);
updateMuteButtonState();
}
private function onScreenOver():void{
processDone();
}
}
}//package
Section 368
//shotgun_fire (shotgun_fire)
package {
import flash.media.*;
public dynamic class shotgun_fire extends Sound {
}
}//package
Section 369
//skeleton_bone_rattles (skeleton_bone_rattles)
package {
import flash.media.*;
public dynamic class skeleton_bone_rattles extends Sound {
}
}//package
Section 370
//snd_breakCandycane (snd_breakCandycane)
package {
import flash.media.*;
public dynamic class snd_breakCandycane extends Sound {
}
}//package
Section 371
//snow_01 (snow_01)
package {
import flash.display.*;
public dynamic class snow_01 extends BitmapData {
public function snow_01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 372
//snow_02 (snow_02)
package {
import flash.display.*;
public dynamic class snow_02 extends BitmapData {
public function snow_02(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 373
//snow_03 (snow_03)
package {
import flash.display.*;
public dynamic class snow_03 extends BitmapData {
public function snow_03(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 374
//snow_04 (snow_04)
package {
import flash.display.*;
public dynamic class snow_04 extends BitmapData {
public function snow_04(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 375
//SnowEffect (SnowEffect)
package {
public class SnowEffect extends lib_snow_effect {
public function SnowEffect(_arg1:Number, _arg2:Number){
x = _arg1;
y = _arg2;
zhn_xxxmas.application.addDelayFunction(destroy, null, 15);
}
private function destroy(_arg1):void{
if (parent){
parent.removeChild(this);
};
}
}
}//package
Section 376
//snowman_break (snowman_break)
package {
import flash.media.*;
public dynamic class snowman_break extends Sound {
}
}//package
Section 377
//SnowManager (SnowManager)
package {
import com.liquable.game.events.*;
import flash.display.*;
import com.liquable.utils.*;
import com.liquable.game.geom.*;
import flash.geom.*;
import com.liquable.game.tiledmap.resources.*;
public class SnowManager extends Sprite {
private var pParticleSpeed:Number;
private var pSnowLocs:Array;
private var pParticleTimer:int;
private var pSnowSlowTimer:int;
private var pSnowInterval:int;
private var pSnowParticles:Array;
private var pParticleInterval:int;
public static const MAX_LEVEL:int = 5;
public function SnowManager(_arg1:MapResource){
var _local3:int;
super();
pSnowParticles = new Array();
pSnowLocs = new Array();
var _local2:int;
while (_local2 < _arg1.columnCounts) {
_local3 = 0;
while (_local3 < _arg1.rowCounts) {
if (_arg1.getTileProperty(_local2, _local3, "snow") == "1"){
pSnowLocs.push(new PointInt(_local2, _local3));
};
_local3++;
};
_local2++;
};
pParticleInterval = 3;
pParticleSpeed = 1;
}
public function terminate():void{
stop();
if (parent){
parent.removeChild(this);
};
}
public function start(_arg1:Number):void{
var _local5:SnowParticle;
var _local6:Point;
var _local7:SnowParticle;
pSnowInterval = _arg1;
var _local2 = (_arg1 == GameConfig.instance.snowNormalInterval);
if (_local2){
pParticleInterval = 8;
pParticleSpeed = 1;
trace("snow Normal");
} else {
pParticleInterval = 0;
pParticleSpeed = 2;
trace("snow OldmanWinter");
};
if (zhn_xxxmas.application.hasUpdateFunction(update)){
for each (_local5 in pSnowParticles) {
_local5.setBaseSpeed(pParticleSpeed);
};
return;
};
zhn_xxxmas.application.addUpdateFunction(update);
pParticleTimer = 0;
pSnowSlowTimer = 0;
var _local3:int = (_local2) ? 30 : 70;
var _local4:int;
while (_local4 < _local3) {
_local6 = new Point((Math.random() * zhn_xxxmas.application.gameWidth), (Math.random() * zhn_xxxmas.application.gameHeight));
_local7 = new SnowParticle(this);
_local7.initialize(_local6, 0, pParticleSpeed);
pSnowParticles.push(_local7);
_local4++;
};
}
public function stop():void{
var _local1:SnowParticle;
for each (_local1 in pSnowParticles) {
_local1.terminate(false);
};
pSnowParticles = new Array();
zhn_xxxmas.application.removeUpdateFunction(update);
}
private function update(_arg1:GameApplicationUpdateEvent):void{
var _local2:PointInt;
var _local3:int;
if (++pParticleTimer > pParticleInterval){
pParticleTimer = 0;
makeSnowParticle(((pParticleInterval == 0)) ? 2 : 1);
};
if (++pSnowSlowTimer > pSnowInterval){
pSnowSlowTimer = 0;
_local2 = ArrayUtil.getArrayRandomElement(pSnowLocs, false);
if (_local2){
_local3 = Game.instance.getMap().getSnowSlowLevel(_local2.x, _local2.y);
if (_local3 < MAX_LEVEL){
if (pSnowInterval < GameConfig.instance.snowOldmanwinterInterval){
if (!Game.instance.isTileInCamera(_local2.x, _local2.y)){
return;
};
};
Game.instance.getMap().setSnowSlowLevel(_local2.x, _local2.y, (_local3 + 1));
Game.instance.getMap().getMapResource().setTileImage(1, _local2.x, _local2.y, "1", (_local3 + 5));
};
};
};
}
public function onParticleTerminated(_arg1:SnowParticle):void{
ArrayUtil.removeArrayElement(pSnowParticles, _arg1);
}
private function makeSnowParticle(_arg1:int):void{
var _local3:SnowParticle;
var _local2:int;
while (_local2 < _arg1) {
_local3 = new SnowParticle(this);
_local3.initialize(null, 1, pParticleSpeed);
pSnowParticles.push(_local3);
_local2++;
};
}
}
}//package
Section 378
//SnowParticle (SnowParticle)
package {
import flash.events.*;
import flash.display.*;
import com.liquable.utils.*;
import flash.geom.*;
public class SnowParticle extends Bitmap {
private var pVelocity:Point;
private var pBaseSpeed:Number;
private var pManager:SnowManager;
private static var BITMAPDATA_LIB:Array = [new snow_01(8, 6), new snow_02(8, 8), new snow_03(5, 8), new snow_04(15, 14)];
public function SnowParticle(_arg1:SnowManager){
var _local2:BitmapData = ArrayUtil.getArrayRandomElement(BITMAPDATA_LIB, false);
super(_local2);
pManager = _arg1;
}
public function initialize(_arg1:Point, _arg2:Number, _arg3:Number):void{
pManager.addChild(this);
pVelocity = new Point((((Math.random() - 0.5) * 6) * _arg3), ((1 + (Math.random() * 4)) * _arg3));
pBaseSpeed = _arg3;
if (_arg1){
x = _arg1.x;
y = _arg1.y;
} else {
x = (Math.random() * zhn_xxxmas.application.gameWidth);
y = -10;
};
alpha = _arg2;
addEventListener(Event.ENTER_FRAME, update);
}
public function terminate(_arg1:Boolean):void{
removeEventListener(Event.ENTER_FRAME, update);
if (parent){
parent.removeChild(this);
};
if (_arg1){
pManager.onParticleTerminated(this);
};
pManager = null;
}
public function update(_arg1:Event):void{
x = (x + pVelocity.x);
y = (y + pVelocity.y);
if (alpha < 1){
alpha = Math.min(1, (alpha + 0.1));
};
if ((((((x < 10)) || ((x > (zhn_xxxmas.application.gameWidth + 10))))) || ((y > (zhn_xxxmas.application.gameHeight + 10))))){
terminate(true);
};
}
public function setBaseSpeed(_arg1:Number):void{
var _local2:Number;
if (pVelocity){
_local2 = (_arg1 / pBaseSpeed);
pVelocity.x = (pVelocity.x * _local2);
pVelocity.y = (pVelocity.y * _local2);
pBaseSpeed = _arg1;
};
}
}
}//package
Section 379
//thrown_weapon (thrown_weapon)
package {
import flash.media.*;
public dynamic class thrown_weapon extends Sound {
}
}//package
Section 380
//ThrownWeapon (ThrownWeapon)
package {
import flash.events.*;
import com.liquable.media.*;
import com.liquable.game.events.*;
import flash.display.*;
import com.liquable.utils.*;
import com.liquable.game.geom.*;
import flash.geom.*;
public class ThrownWeapon extends MovableObject {
private var pDistance:Number;
private var pDepthY:Number;
private var pChainsawSound:SoundController;
private var pHitable:Boolean;
private var pBreakObjectWeaponTypes:Array;
private var pOwnerWeapon:Weapon;
private var pFlaming:Boolean;
private var pGroundY:Number;
private var pOwner:AbstractRole;
private var pKnockback:int;
private var pHitMultiple:Boolean;
private var pTimer:int;
private var pDamage:int;
public static var STATUS_ARC:String = "arc";
public static var STATUS_ANIM:String = "anim";
public static var STATUS_MOVE:String = "move";
public static var STATUS_FRISBEE:String = "frisbee";
public function ThrownWeapon(_arg1:String, _arg2:AbstractRole, _arg3:Weapon, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Point){
var _local9:Configure;
pBreakObjectWeaponTypes = [PropertyLoader.ITEM_BULLET, PropertyLoader.ITEM_BUSS_BULLET, PropertyLoader.ITEM_CHAINSAW, PropertyLoader.ITEM_GIFTBOMB, PropertyLoader.ITEM_BIGGIFTBOMB, PropertyLoader.ITEM_FLAME_THROWER];
pHitable = true;
pDepthY = 100;
pGroundY = _arg6;
var _local8:PointInt = Game.instance.getTileLocFromPosition(_arg4, _arg5);
if (_local8.x >= Game.instance.mapColumnCounts){
_local8.x = (_local8.x - Game.instance.mapColumnCounts);
} else {
if (_local8.x < 0){
_local8.x = (_local8.x + Game.instance.mapColumnCounts);
};
};
if (_local8.y >= Game.instance.mapRowCounts){
_local8.y = (_local8.y - Game.instance.mapRowCounts);
} else {
if (_local8.y < 0){
_local8.y = (_local8.y + Game.instance.mapRowCounts);
};
};
if ((((((_arg1 == PropertyLoader.ITEM_BULLET)) || ((_arg1 == PropertyLoader.ITEM_BUSS_BULLET)))) || ((_arg1 == PropertyLoader.ITEM_GRENADE)))){
_local9 = Game.instance.getWeaponConfigure(Lola(_arg2).currentWeapon.type);
} else {
_local9 = Game.instance.getWeaponConfigure(_arg1);
};
var _local10:Number = _local9.speed;
if (((_arg3) && ((_arg3.type == PropertyLoader.ITEM_SHOOTGUN)))){
_local10 = (_local10 + ((Math.random() - 0.5) * 5));
};
super(_arg1, _local8.x, _local8.y, _local10);
setPosition(_arg4, _arg5);
updateRealPosition();
pOwner = _arg2;
pOwnerWeapon = _arg3;
pDamage = _local9.damage;
pKnockback = _local9.knockback;
pFlaming = _local9.flaming;
pHitMultiple = _local9.hitMultiple;
pDistance = _local9.distance;
pVelocity = new Point(_arg7.x, _arg7.y);
pVelocity.normalize(getSpeed());
scaleX = ((_arg7.x)>=0) ? 1 : -1;
}
private function move_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(move_update);
pTimer = 0;
pStateMachine.data.setValue("startX", x);
if (pVelocity.y != 0){
pMovieClip.rotation = MathUtil.radians2degrees(Math.atan2(pVelocity.y, Math.abs(pVelocity.x)));
};
}
override public function get depth():Number{
return ((y + pDepthY));
}
override protected function createMovieClip():MovieClip{
return (new lib_thrownWeapon());
}
private function anim_update(_arg1:GameApplicationUpdateEvent):void{
var _local3:AbstractRole;
var _local4:BreakableObject;
var _local2:MovieClip = pMovieClip.mc;
if (_local2.currentFrame == _local2.totalFrames){
Game.instance.removeWeapon(this);
} else {
if (pMovieClip.mc.currentFrame == pStateMachine.data.getInt("explodeFrame")){
if (Game.instance.isInCamera(this)){
if ((((type == PropertyLoader.ITEM_HEART_BOMB)) || ((type == PropertyLoader.ITEM_GRENADE)))){
playSound(zombie_explode);
};
for each (_local3 in Game.instance.getRoles()) {
if (((((!((_local3 == pOwner))) && (_local3.isAlive()))) && (_local3.hitTestRect.hitTestObject(pMovieClip.mc)))){
if (Game.instance.isInCamera(_local3)){
if ((((_local3.type == PropertyLoader.ROLE_JOHN)) && (John(_local3).isTricked))){
continue;
} else {
_local3.goHit(pFlaming, pDamage, type, pOwner);
};
};
};
};
if (((pStateMachine) && ((pOwner.type == PropertyLoader.ROLE_LOLA)))){
for each (_local4 in Game.instance.getBreakableObjects()) {
if (((!(_local4.isBroken())) && (_local4.hitTestObject(pMovieClip.mc)))){
_local4.setBroken();
};
};
};
};
};
};
}
override public function initialize():void{
super.initialize();
pStateMachine.initState(STATUS_MOVE, move_enter, null, move_exit);
pStateMachine.initState(STATUS_ARC, arc_enter, null, arc_exit);
pStateMachine.initState(STATUS_FRISBEE, frisbee_enter, null, frisbee_exit);
pStateMachine.initState(STATUS_ANIM, anim_enter, null, anim_exit);
if (type == PropertyLoader.ITEM_FAT_ZOMBIE_HEAD){
setFrameLabel(PropertyLoader.ITEM_FLAMING_SKULL);
} else {
setFrameLabel(type);
};
if (type == PropertyLoader.ITEM_STILLETTO){
setState(STATUS_MOVE);
} else {
if (type == PropertyLoader.ITEM_CHAINSAW){
setState(STATUS_FRISBEE);
} else {
if ((((type == PropertyLoader.ITEM_GRENADE)) || ((type == PropertyLoader.ITEM_HEART_BOMB)))){
setState(STATUS_ANIM);
} else {
if (pDistance > 0){
pStateMachine.data.setValue("distance", pDistance);
setState(STATUS_ARC);
} else {
setState(STATUS_MOVE);
};
};
};
};
}
private function playChainsawSound():void{
if (pChainsawSound == null){
pChainsawSound = zhn_xxxmas.application.getSoundManager().playSound(weapon_chainsaw1, true);
};
}
private function stopChainsawSound():void{
if (pChainsawSound){
pChainsawSound.fadeOut(6);
pChainsawSound = null;
};
}
private function arc_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(arc_update);
}
private function move_update(_arg1:Event):void{
if (Game.instance.isPausing()){
return;
};
setPosition((position.x + pVelocity.x), (position.y + pVelocity.y));
updateRealPosition();
pTimer++;
if (hitCheck()){
if (pOwnerWeapon){
pOwnerWeapon.playSoundOfImpact();
};
} else {
if (pStateMachine){
if ((((((type == PropertyLoader.ITEM_FIREBALL)) || ((type == PropertyLoader.ITEM_ICEBALL)))) || ((type == PropertyLoader.ITEM_LASER_BEAM)))){
if (pTimer > 140){
alpha = (alpha - 0.1);
if (alpha <= 0){
Game.instance.removeWeapon(this);
};
};
} else {
if (pOwnerWeapon.type == PropertyLoader.ITEM_SHOOTGUN){
if (Math.abs((pStateMachine.data.getNumber("startX") - x)) > 200){
alpha = (alpha - 0.5);
trace(("alpha = " + alpha));
if (alpha <= 0){
Game.instance.removeWeapon(this);
};
};
};
};
};
};
}
private function anim_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(anim_update);
}
private function frisbee_update(_arg1:Event):void{
var _local2:int = (pStateMachine.data.getInt("timer") + 1);
pStateMachine.data.setValue("timer", _local2);
var _local3:Point = pStateMachine.data.getValue("tracker");
var _local4:Point = pStateMachine.data.getValue("trackerVelocity");
var _local5:Point = pStateMachine.data.getValue("trackerAcc");
var _local6:Boolean = pStateMachine.data.getBoolean("backing");
var _local7:Point = pStateMachine.data.getValue("pos");
_local3.x = (_local3.x + _local4.x);
_local3.y = (_local3.y + _local4.y);
var _local8:Point = _local3.subtract(_local7);
_local8.normalize(3.3);
var _local9:Number = pVelocity.x;
pVelocity = pVelocity.add(_local8);
if ((_local9 * pVelocity.x) <= 0){
pStateMachine.data.setValue("backing", true);
};
_local7.x = (_local7.x + pVelocity.x);
_local7.y = (_local7.y + pVelocity.y);
var _local10 = 30;
var _local11:Number = (_local2 / _local10);
var _temp1 = (Math.max(0, (_local11 - 0.5)) * 2);
_local11 = (Math.max(0, (_local11 - 0.5)) * 2);
_local11 = (_temp1 * _local11);
var _local12:Number = (1 - _local11);
var _local13:Number = Game.instance.getMap().getMapResource().width;
var _local14:Number = Game.instance.getMap().getMapResource().height;
var _local15:Point = new Point(pOwner.x, pOwner.y);
if (_local15.x > (_local7.x + (_local13 / 2))){
_local15.x = (_local15.x - _local13);
} else {
if (_local15.x < (_local7.x - (_local13 / 2))){
_local15.x = (_local15.x + _local13);
};
};
if (_local15.y > (_local7.y + (_local14 / 2))){
_local15.y = (_local15.y - _local14);
} else {
if (_local15.y < (_local7.y - (_local14 / 2))){
_local15.y = (_local15.y + _local14);
};
};
_local7.x = ((_local7.x * _local12) + (_local15.x * _local11));
_local7.y = ((_local7.y * _local12) + ((_local15.y - 75) * _local11));
setPosition(_local7.x, _local7.y);
updateRealPosition();
if (_local2 > (_local10 - 3)){
alpha = (alpha * 0.5);
if (_local2 > (_local10 - 1)){
Game.instance.removeWeapon(this);
};
} else {
_local4.x = (_local4.x + _local5.x);
_local4.y = (_local4.y + _local5.y);
_local5.y = (_local5.y - 0.08);
if (((hitCheck(false)) && (pOwnerWeapon))){
pOwnerWeapon.playSoundOfImpact();
};
};
}
override public function terminate():void{
super.terminate();
pOwner = null;
}
private function move_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(move_update);
}
private function frisbee_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(frisbee_update);
pDepthY = 300;
pVelocity.x = (((pVelocity.x > 0)) ? getSpeed() : -(getSpeed()) * 1.6);
pVelocity.y = (-(getSpeed()) * 1.2);
var _local2:Number = Game.instance.getMap().getMapResource().width;
var _local3:Number = Game.instance.getMap().getMapResource().height;
var _local4:Point = pOwner.position.clone();
var _local5:Point = position.clone();
if ((_local5.x - _local4.x) > (_local2 / 2)){
_local5.x = (_local5.x - _local2);
} else {
if ((_local5.x - _local4.x) < (-(_local2) / 2)){
_local5.x = (_local5.x + _local2);
};
};
if ((_local5.y - _local4.y) > (_local3 / 2)){
_local5.y = (_local5.y - _local3);
} else {
if ((_local5.y - _local4.y) < (-(_local3) / 2)){
_local5.y = (_local5.y + _local3);
};
};
pStateMachine.data.setValue("timer", 0);
pStateMachine.data.setValue("tracker", _local4);
pStateMachine.data.setValue("trackerVelocity", new Point(pVelocity.x, 0.5));
pStateMachine.data.setValue("trackerAcc", new Point((-(pVelocity.x) * 0.07), 0));
pStateMachine.data.setValue("backing", false);
pStateMachine.data.setValue("pos", _local5);
if (type == PropertyLoader.ITEM_CHAINSAW){
playChainsawSound();
};
}
private function frisbee_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(frisbee_update);
stopChainsawSound();
}
private function arc_enter(_arg1:String):void{
pDepthY = 200;
var _local2:Number = 75;
var _local3:Number = 1;
var _local4:Number = ((pVelocity.x > 0)) ? 1 : -1;
var _local5:Number = pStateMachine.data.getNumber("distance");
var _local6:Point = new Point((position.x + (_local4 * _local5)), (position.y + _local2));
var _local7:Number = (_local5 / getSpeed());
var _local8:Number = ((_local2 - ((_local3 * _local7) * _local7)) / _local7);
pStateMachine.data.setValue("timer", 0);
pStateMachine.data.setValue("groundY", (position.y + _local2));
pStateMachine.data.setValue("timeNeeded", _local7);
pStateMachine.data.setValue("startVelocity", new Point((_local4 * getSpeed()), _local8));
pStateMachine.data.setValue("startPosition", position.clone());
pStateMachine.data.setValue("gravity", _local3);
zhn_xxxmas.application.addUpdateFunction(arc_update);
}
private function arc_update(_arg1:Event):void{
var _local9:int;
var _local10:ExplodeEffect;
var _local2:int = pStateMachine.data.getInt("timer");
pStateMachine.data.setValue("timer", (_local2 + 1));
var _local3:int = pStateMachine.data.getInt("timeNeeded");
var _local4:Point = pStateMachine.data.getValue("startPosition");
var _local5:Point = pStateMachine.data.getValue("startVelocity");
var _local6:Number = pStateMachine.data.getInt("gravity");
var _local7 = (type == PropertyLoader.ITEM_GIFTBOMB);
var _local8 = (type == PropertyLoader.ITEM_BIGGIFTBOMB);
if (_local2 > _local3){
if (((_local7) || (_local8))){
_local9 = (_local8) ? 20 : 45;
if (_local2 > (_local3 + _local9)){
hitCheck();
if (_local8){
_local10 = new ExplodeEffect(x, y, lib_biggift_explode);
_local10.scaleX = scaleX;
} else {
_local10 = new ExplodeEffect(x, y, lib_explode);
new ExplodeEffect(x, y, lib_explode).scaleX = (_local10.scaleY = 1.5);
};
playSound(zombie_explode);
Game.instance.addExplode(_local10);
Game.instance.removeWeapon(this);
} else {
if (_local7){
pMovieClip.mc.gotoAndStop(1);
};
};
} else {
if (type == PropertyLoader.ITEM_MOLOTOV){
Game.instance.removeWeapon(this);
if (pOwnerWeapon){
pOwnerWeapon.playSoundOfImpact();
};
Game.instance.addExplode(new ExplodeEffect(x, y, lib_explode));
} else {
if (_local2 > (_local3 + 5)){
Game.instance.removeWeapon(this);
} else {
alpha = (alpha * 0.7);
_local5.x = (_local5.x * 0.7);
_local5.y = (_local5.y + _local6);
setPosition((position.x + _local5.x), (position.y + _local5.y));
};
};
};
} else {
setPosition((_local4.x + (_local5.x * _local2)), ((_local4.y + (_local5.y * _local2)) + ((_local6 * _local2) * _local2)));
updateRealPosition();
if (((((((!(_local7)) && (!(_local8)))) && (hitCheck()))) && (pOwnerWeapon))){
pOwnerWeapon.playSoundOfImpact();
};
};
}
private function anim_enter(_arg1:String):void{
zhn_xxxmas.application.addUpdateFunction(anim_update);
var _local2:int = ((type == PropertyLoader.ITEM_GRENADE)) ? 15 : 55;
pStateMachine.data.setValue("explodeFrame", _local2);
}
private function hitCheck(_arg1:Boolean=true):Boolean{
var _local3:AbstractRole;
var _local4:Number;
var _local5:Class;
var _local6:SoundController;
var _local7:Lola;
var _local8:BreakableObject;
var _local2:Boolean;
if (Game.instance.isInCamera(this)){
for each (_local3 in Game.instance.getRoles()) {
if (pMovieClip == null){
break;
};
if (((((!((_local3 == pOwner))) && (_local3.isAlive()))) && (_local3.hitTestRect.hitTestObject(pMovieClip.hitTestRect)))){
if (pOwner.type == PropertyLoader.ROLE_LOLA){
if (Game.instance.isInCamera(_local3)){
if ((((_local3.type == PropertyLoader.ROLE_JOHN)) && (John(_local3).isTricked))){
continue;
} else {
if ((((this.type == PropertyLoader.ITEM_BULLET)) || ((this.type == PropertyLoader.ITEM_BUSS_BULLET)))){
_local4 = Math.random();
_local5 = blood3;
if (_local4 < 0.5){
_local5 = blood2;
};
_local6 = playSound(_local5);
if (pOwnerWeapon.type == PropertyLoader.ITEM_SHOOTGUN){
_local6.setVolume((_local6.getVolume() * 0.3));
};
};
_local3.goHit(pFlaming, pDamage, type, pOwner);
_local2 = true;
if (!pHitMultiple){
Game.instance.removeWeapon(this);
};
if (((pFlaming) && (!((type == PropertyLoader.ITEM_BIGGIFTBOMB))))){
Game.instance.addExplode(new ExplodeEffect(x, y, lib_explode));
};
};
};
} else {
if (pHitable){
if (type == PropertyLoader.ITEM_ICEBALL){
if ((((_local3.type == PropertyLoader.ROLE_LOLA)) && (!((_local3 as Lola).isInTrailer())))){
_local7 = (_local3 as Lola);
if (Math.abs((_local7.y - pGroundY)) < 35){
_local7.setFrozen();
Game.instance.removeWeapon(this);
};
};
} else {
if ((((((_local3.type == PropertyLoader.ROLE_LOLA)) && (!((_local3 as Lola).isInTrailer())))) || ((((_local3.type == PropertyLoader.ROLE_JOHN)) && (!((_local3 as John).isTricked)))))){
_local3.goHit(pFlaming, pDamage, type, pOwner);
_local2 = true;
if (!pHitMultiple){
pHitable = false;
if (type != PropertyLoader.ITEM_FIREBALL){
Game.instance.removeWeapon(this);
};
};
if (pFlaming){
Game.instance.addExplode(new ExplodeEffect(x, y, lib_explode));
};
};
};
};
};
};
};
if (((((pStateMachine) && ((pOwner.type == PropertyLoader.ROLE_LOLA)))) && (!((pBreakObjectWeaponTypes.indexOf(type) == -1))))){
for each (_local8 in Game.instance.getBreakableObjects()) {
if (((!(_local8.isBroken())) && (_local8.hitTestObject(this)))){
_local8.setBroken();
if (!pHitMultiple){
Game.instance.removeWeapon(this);
};
};
};
};
} else {
if (_arg1){
Game.instance.removeWeapon(this);
};
};
return (_local2);
}
}
}//package
Section 381
//Trailer (Trailer)
package {
import flash.events.*;
import flash.display.*;
import com.liquable.game.geom.*;
public class Trailer extends MovableObject {
private var sUnWalkableLocs:Array;
private var pJohnComboTimer:int;
private var pJohnCombo:int;
private var pJohnCounts:int;
private static const STATUS_ALL_IN_PARTY:String = "all in party";
private static const STATUS_PARTY_OVER:String = "party over";
private static const STATUS_STATIC:String = "static";
public function Trailer(_arg1:String, _arg2:int, _arg3:int){
super(_arg1, _arg2, _arg3, 0);
pJohnCombo = 0;
pJohnComboTimer = 0;
}
override public function terminate():void{
zhn_xxxmas.application.removeUpdateFunction(update);
sUnWalkableLocs = null;
super.terminate();
}
private function partyOver_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(partyOver_update);
}
private function static_enter(_arg1:String):void{
pMovieClip.mc.gotoAndStop(1);
pJohnCombo = 0;
pJohnComboTimer = 0;
}
private function allInParty_update(_arg1:Event):void{
var _local5:SimpleButton;
var _local6:Number;
var _local2:int = (pStateMachine.data.getInt("timer") + 1);
pStateMachine.data.setValue("timer", _local2);
var _local3:Boolean;
var _local4:int = pJohnCounts;
if (_local2 < 0){
_local5 = Game.instance.dashboard.getHelpButton();
if (_local5){
_local5.enabled = false;
_local5.y = (_local5.y + 3);
};
if (_local2 == -16){
zhn_xxxmas.application.getSoundManager().playSound(trailer_sexy, false);
};
} else {
if (_local2 == 0){
pMovieClip.mc.gotoAndPlay("all in party");
} else {
if (_local2 < 19){
if ((_local2 % 9) == 1){
zhn_xxxmas.application.getSoundManager().playSound(trailer_bounce, false);
};
} else {
if (_local2 < 38){
if ((_local2 % 6) == 1){
zhn_xxxmas.application.getSoundManager().playSound(trailer_bounce, false);
};
} else {
_local6 = (1 - ((_local2 - 38) / (140 - 38)));
if (_local6 > 0){
if ((_local2 % 4) == 1){
zhn_xxxmas.application.getSoundManager().playSound(trailer_bounce, false).setVolume(_local6);
};
};
};
};
};
};
if (pMovieClip.levelComplete == "yes"){
if (_local2 == 20){
_local3 = true;
} else {
if (_local2 == 80){
Game.instance.dashboard.showEndMessage();
} else {
if (_local2 == 140){
Game.instance.levelComplete();
pMovieClip.mc.gotoAndPlay("partyEnd");
};
};
};
} else {
if (pMovieClip.mc.currentFrame == pMovieClip.mc.totalFrames){
_local3 = true;
setState(STATUS_PARTY_OVER);
};
};
if (_local3){
};
}
override protected function setFrameLabel(_arg1:String):void{
setMovieClipFrameLabel(pMovieClip.mc, _arg1);
}
public function addJohn(_arg1:John):void{
if (!_arg1.isSanta()){
pJohnCounts++;
};
if (pJohnComboTimer < 30){
pJohnCombo++;
} else {
pJohnCombo = 1;
};
pJohnComboTimer = 0;
Game.instance.dashboard.currentTricks = pJohnCounts;
var _local2:int = Game.instance.getRoleConfigure(PropertyLoader.ROLE_JOHN).money;
var _local3:int = (pJohnCombo * _local2);
Game.instance.dashboard.updateMoney(_local3);
playSound(cash_pickup);
var _local4:MovieClip = new lib_money_popup();
_local4.money = ("$" + _local3);
addChild(_local4);
}
private function partyOver_update(_arg1:Event):void{
var _local2:Lola = Game.instance.getLola();
_local2.goExitTrailer(currentTileLoc.x, (currentTileLoc.y + 1));
setState(STATUS_STATIC);
}
private function static_exit(_arg1:String):void{
}
override public function initialize():void{
var _local1:int;
var _local4:int;
var _local5:int;
var _local6:PointInt;
super.initialize();
var _local2:PointInt = new PointInt();
var _local3:Array = Game.instance.getCanWalkLocsArray();
sUnWalkableLocs = new Array();
_local1 = -2;
while (_local1 <= 2) {
_local2.x = (currentTileLoc.x + _local1);
_local4 = 0;
while (_local4 <= 3) {
if (((!((_local1 == 0))) || (!((_local4 == 0))))){
_local2.y = (currentTileLoc.y - _local4);
Game.instance.getMap().setCanWalk(_local2.x, _local2.y, false);
sUnWalkableLocs.push(new PointInt(_local2.x, _local2.y));
_local5 = 0;
while (_local5 < _local3.length) {
_local6 = _local3[_local5];
if (_local6.equals(_local2)){
_local3.splice(_local5, 1);
break;
};
_local5++;
};
};
_local4++;
};
_local1++;
};
pJohnCounts = 0;
pStateMachine.initState(STATUS_STATIC, static_enter, null, static_exit);
pStateMachine.initState(STATUS_ALL_IN_PARTY, allInParty_enter, null, allInParty_exit);
pStateMachine.initState(STATUS_PARTY_OVER, partyOver_enter, null, partyOver_exit);
setState(STATUS_STATIC);
zhn_xxxmas.application.addUpdateFunction(update);
}
public function isOnInvitingLoc(_arg1:int, _arg2:int):Boolean{
var _local4:int;
var _local3:int = (_arg1 - currentTileLoc.x);
if (Math.abs(_local3) < 3){
_local4 = (_arg2 - currentTileLoc.y);
if ((((_local4 > 0)) && ((_local4 < 3)))){
return (true);
};
};
return (false);
}
private function partyOver_enter(_arg1:String):void{
setFrameLabel(STATUS_PARTY_OVER);
pJohnCounts = 0;
zhn_xxxmas.application.addUpdateFunction(partyOver_update);
}
private function update(_arg1:Event):void{
var _local3:John;
var _local4:int;
var _local2:Lola = Game.instance.getLola();
pJohnComboTimer++;
if (((Game.instance.isInCamera(this)) && (!(pStateMachine.isInState(STATUS_ALL_IN_PARTY))))){
if (_local2.isInTrailer()){
if ((((_local2.trickedJohns.length == 0)) && ((pJohnCounts > 0)))){
setState(STATUS_ALL_IN_PARTY);
};
} else {
if (_local2.currentTileLoc.equals(currentTileLoc)){
if ((((pJohnCounts > 0)) || ((_local2.trickedJohns.length > 0)))){
_local4 = ((Game.instance.dashboard.goalTricks - pJohnCounts) - _local2.trickedJohns.length);
pMovieClip.fetchMoreJohns = _local4;
if (_local4 > 0){
pMovieClip.mc.gotoAndPlay("fetchMoreJohns");
_local2.goExitTrailer(currentTileLoc.x, (currentTileLoc.y + 1));
for each (_local3 in _local2.trickedJohns) {
_local3.goInTrailer();
};
} else {
_local2.goInTrailer();
};
} else {
if (pMovieClip.mc.currentLabel != "closed"){
pMovieClip.mc.gotoAndPlay("closed");
_local2.goExitTrailer(currentTileLoc.x, (currentTileLoc.y + 1));
playSound(door);
};
};
} else {
for each (_local3 in _local2.trickedJohns) {
if (((!(_local3.isInTrailer())) && (isOnInvitingLoc(_local3.currentTileLoc.x, _local3.currentTileLoc.y)))){
_local3.goInTrailer();
};
};
};
};
};
}
private function allInParty_enter(_arg1:String):void{
pMovieClip.mc.gotoAndPlay("entering trailer");
playSound(door);
zhn_xxxmas.application.addUpdateFunction(allInParty_update);
pStateMachine.data.setValue("timer", 0);
Game.instance.hideHelp();
if (Game.instance.dashboard.currentTricks >= Game.instance.dashboard.goalTricks){
pMovieClip.levelComplete = "yes";
pStateMachine.data.setValue("timer", -20);
} else {
pMovieClip.levelComplete = null;
};
}
override protected function createMovieClip():MovieClip{
return (new lib_trailer());
}
private function allInParty_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(allInParty_update);
}
}
}//package
Section 382
//trailer_bounce (trailer_bounce)
package {
import flash.media.*;
public dynamic class trailer_bounce extends Sound {
}
}//package
Section 383
//trailer_sexy (trailer_sexy)
package {
import flash.media.*;
public dynamic class trailer_sexy extends Sound {
}
}//package
Section 384
//uzi4 (uzi4)
package {
import flash.media.*;
public dynamic class uzi4 extends Sound {
}
}//package
Section 385
//Weapon (Weapon)
package {
import flash.events.*;
import com.liquable.game.events.*;
import flash.display.*;
import com.liquable.utils.*;
public class Weapon extends MovableObject {
private var pWeaponBobClip:MovieClip;
private var pSoundOfImpact:Class;
private var pIsThrowable:Boolean;
private var pAmount:int;// = -1
private var pKnockback:int;
private var pSoundOfUsing:Class;
private var pWeaponPopClip:MovieClip;
private var pDamage:int;
public static const STATUS_BOB:String = "bob";
public static const STATUS_POP:String = "pop";
public function Weapon(_arg1:String, _arg2:int=0, _arg3:int=0, _arg4:Number=0){
var _local5:String = ((_arg1)==PropertyLoader.ITEM_ANY) ? ArrayUtil.getArrayRandomElement(PropertyLoader.types, false) : _arg1;
var _local6:Configure = Game.instance.getWeaponConfigure(_local5);
super(_local5, _arg2, _arg3, _arg4);
pDamage = _local6.damage;
pKnockback = _local6.knockback;
pIsThrowable = true;
pAmount = _local6.amount;
}
override protected function createMovieClip():MovieClip{
var _local1:MovieClip = new MovieClip();
pWeaponBobClip = new lib_weaponBob();
pWeaponPopClip = new lib_weaponPop();
_local1.addChild(pWeaponBobClip);
_local1.addChild(pWeaponPopClip);
switch (type){
case PropertyLoader.ITEM_CASH:
case PropertyLoader.ITEM_HEART:
pSoundOfUsing = null;
pSoundOfImpact = null;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_BONE:
pSoundOfUsing = lola_throw_light;
pSoundOfImpact = weapon_bone;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_ZOMBIE_LEG:
pSoundOfUsing = lola_throw_heavy;
pSoundOfImpact = zombie_part_hit;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_SWORD:
pSoundOfUsing = lola_throw_light;
pSoundOfImpact = weapon_sharp;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_GOLF_CLUB:
pSoundOfUsing = lola_throw_heavy;
pSoundOfImpact = weapon_golfclub;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_SHOVEL:
pSoundOfUsing = lola_throw_heavy;
pSoundOfImpact = weapon_sharp;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_PAN:
pSoundOfUsing = lola_throw_light;
pSoundOfImpact = metal_hit_2;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_TIRE_IRON:
pSoundOfUsing = lola_throw_heavy;
pSoundOfImpact = weapon_shovel;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_CANE:
pSoundOfUsing = lola_throw_heavy;
pSoundOfImpact = weapon_kick;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_FLAME_THROWER:
pSoundOfUsing = null;
pSoundOfImpact = null;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_UZI:
pSoundOfUsing = null;
pSoundOfImpact = null;
pIsThrowable = true;
break;
case PropertyLoader.ITEM_SHOOTGUN:
pSoundOfUsing = shotgun_fire;
pSoundOfImpact = null;
pIsThrowable = true;
break;
case PropertyLoader.ITEM_STILLETTO:
pSoundOfUsing = lola_throw_light;
pSoundOfImpact = weapon_sharp;
pIsThrowable = true;
break;
case PropertyLoader.ITEM_FLAMING_SKULL:
pSoundOfUsing = lola_throw_light;
pSoundOfImpact = thrown_weapon;
pIsThrowable = true;
break;
case PropertyLoader.ITEM_HORNED_SKULL:
pSoundOfUsing = lola_throw_heavy;
pSoundOfImpact = thrown_weapon;
pIsThrowable = true;
break;
case PropertyLoader.ITEM_SKULL:
pSoundOfUsing = thrown_weapon;
pSoundOfImpact = thrown_weapon;
pIsThrowable = true;
break;
case PropertyLoader.ITEM_MOLOTOV:
pSoundOfUsing = lola_throw_light;
pSoundOfImpact = molotov_smash;
pIsThrowable = true;
break;
case PropertyLoader.ITEM_CHAINSAW:
pSoundOfUsing = null;
pSoundOfImpact = null;
pIsThrowable = true;
break;
case PropertyLoader.ITEM_XMASCANE:
pSoundOfUsing = lola_throw_heavy;
pSoundOfImpact = weapon_kick;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_LIGHTWHIP:
pSoundOfUsing = whip_swing;
pSoundOfImpact = whip_impact;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_RIFLE:
pSoundOfUsing = null;
pSoundOfImpact = null;
pIsThrowable = true;
break;
case PropertyLoader.ITEM_ICERAY:
pSoundOfUsing = null;
pSoundOfImpact = null;
pIsThrowable = false;
break;
case PropertyLoader.ITEM_LAUNCHER:
pSoundOfUsing = grenade_fire;
pSoundOfImpact = null;
pIsThrowable = true;
break;
case PropertyLoader.ITEM_BUSS:
pSoundOfUsing = shotgun_fire;
pSoundOfImpact = null;
pIsThrowable = true;
break;
case PropertyLoader.ITEM_GIFTBOMB:
pSoundOfUsing = null;
pSoundOfImpact = null;
pIsThrowable = true;
break;
case PropertyLoader.ITEM_BIGGIFTBOMB:
pSoundOfUsing = null;
pSoundOfImpact = null;
pIsThrowable = true;
break;
default:
throw (new Error("AbstractWeapon.createMovieClip : type error!!"));
};
return (_local1);
}
private function pop_update(_arg1:Event):void{
if (((((pWeaponPopClip) && (pWeaponPopClip.mc))) && ((pWeaponPopClip.mc.currentFrame >= pWeaponPopClip.mc.totalFrames)))){
Game.instance.removeWeapon(this);
};
}
public function goPop():void{
setState(STATUS_POP);
}
private function bob_enter(_arg1:String):void{
pWeaponBobClip.gotoAndStop(type);
pWeaponBobClip.visible = true;
pWeaponPopClip.visible = false;
if ((((type == PropertyLoader.ITEM_HEART)) || ((type == PropertyLoader.ITEM_CASH)))){
pStateMachine.data.setValue("timer", 0);
zhn_xxxmas.application.addUpdateFunction(bob_update);
};
}
private function bob_update(_arg1:GameApplicationUpdateEvent):void{
var _local2:int = pStateMachine.data.getInt("timer");
if (Game.instance.isInCamera(this)){
if (_local2 > 0){
pStateMachine.data.setValue("timer", 0);
};
} else {
++_local2;
pStateMachine.data.setValue("timer", _local2);
if (_local2 > 60){
Game.instance.removeWeapon(this);
};
};
}
override public function initialize():void{
super.initialize();
pStateMachine.initState(STATUS_BOB, bob_enter, null, bob_exit);
pStateMachine.initState(STATUS_POP, pop_enter, null, pop_exit);
setState(STATUS_BOB);
}
public function get amount():int{
return (pAmount);
}
public function setAmount(_arg1:int):void{
pAmount = _arg1;
}
private function pop_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(pop_update);
}
public function decreaseAmount():void{
pAmount = Math.max(--pAmount, 0);
Game.instance.dashboard.updateItemAmount(type, pAmount);
}
public function playSoundOfImpact():void{
if (pSoundOfImpact){
playSound(pSoundOfImpact);
};
}
override public function terminate():void{
pWeaponBobClip = null;
pWeaponPopClip = null;
super.terminate();
}
public function get damage():int{
return (pDamage);
}
private function pop_enter(_arg1:String):void{
pWeaponPopClip.gotoAndStop(type);
pWeaponBobClip.visible = false;
pWeaponPopClip.visible = true;
zhn_xxxmas.application.addUpdateFunction(pop_update);
if (type == PropertyLoader.ITEM_CASH){
playSound(cash_pickup).setVolume(0.5);
} else {
if (type == PropertyLoader.ITEM_HEART){
playSound(snowman_break);
} else {
playSound(interface_button_press);
};
};
}
public function get isThrowable():Boolean{
return (pIsThrowable);
}
private function bob_exit(_arg1:String):void{
zhn_xxxmas.application.removeUpdateFunction(bob_update);
}
public function playSoundOfUsing():void{
if (pSoundOfUsing){
playSound(pSoundOfUsing);
};
}
public function get knockback():int{
return (pKnockback);
}
}
}//package
Section 386
//weapon_bone (weapon_bone)
package {
import flash.media.*;
public dynamic class weapon_bone extends Sound {
}
}//package
Section 387
//weapon_chainsaw1 (weapon_chainsaw1)
package {
import flash.media.*;
public dynamic class weapon_chainsaw1 extends Sound {
}
}//package
Section 388
//weapon_golfclub (weapon_golfclub)
package {
import flash.media.*;
public dynamic class weapon_golfclub extends Sound {
}
}//package
Section 389
//weapon_kick (weapon_kick)
package {
import flash.media.*;
public dynamic class weapon_kick extends Sound {
}
}//package
Section 390
//weapon_sharp (weapon_sharp)
package {
import flash.media.*;
public dynamic class weapon_sharp extends Sound {
}
}//package
Section 391
//weapon_shovel (weapon_shovel)
package {
import flash.media.*;
public dynamic class weapon_shovel extends Sound {
}
}//package
Section 392
//weapon_slap (weapon_slap)
package {
import flash.media.*;
public dynamic class weapon_slap extends Sound {
}
}//package
Section 393
//whip_impact (whip_impact)
package {
import flash.media.*;
public dynamic class whip_impact extends Sound {
}
}//package
Section 394
//whip_swing (whip_swing)
package {
import flash.media.*;
public dynamic class whip_swing extends Sound {
}
}//package
Section 395
//zhn_bonnie_2_faster (zhn_bonnie_2_faster)
package {
import flash.media.*;
public dynamic class zhn_bonnie_2_faster extends Sound {
}
}//package
Section 396
//ZHN_intro_808_looped (ZHN_intro_808_looped)
package {
import flash.media.*;
public dynamic class ZHN_intro_808_looped extends Sound {
}
}//package
Section 397
//zhn_music (zhn_music)
package {
import flash.media.*;
public dynamic class zhn_music extends Sound {
}
}//package
Section 398
//zhn_xxxmas (zhn_xxxmas)
package {
import com.liquable.game.*;
import flash.events.*;
import com.liquable.media.*;
import com.liquable.game.debug.*;
import flash.display.*;
import com.liquable.visualstack.*;
import flash.net.*;
public class zhn_xxxmas extends Sprite {
private var pButtonAdultswim:SimpleButton;
private var pBackgroundSound:SoundController;
private var pLocalConnection:LocalConnection;
public static const sGameId:String = "2492";
public static const sGameName:String = "ZHNxxxMas";
private static var sInstance:zhn_xxxmas;
private static var sApplication:GameApplication;
public function zhn_xxxmas(){
sInstance = this;
addEventListener(Event.ENTER_FRAME, init_update);
tabChildren = (tabEnabled = false);
pLocalConnection = new LocalConnection();
initialize();
}
public function setAdultswimVisible(_arg1:Boolean):void{
pButtonAdultswim.visible = _arg1;
}
public function stopBackgroundSound():void{
if (pBackgroundSound){
pBackgroundSound.stop();
pBackgroundSound = null;
};
}
private function init_update(_arg1:Event):void{
if (stage){
removeEventListener(Event.ENTER_FRAME, init_update);
stage.stageFocusRect = false;
sApplication.start(30, true, false);
};
}
public function playBackgroundSound():void{
if (pBackgroundSound == null){
pBackgroundSound = application.getSoundManager().playSound(ZHN_intro_808_looped, true);
};
}
private function initialize():void{
sApplication = new GameApplication(this, 728, 500, true);
application.debugWatchItem("update fps", new DebugFpsMeter(application));
application.debugWatchItem("ver", DebugTagValueWatcher.getById("ver").setValue("2.1.0"));
application.debugWatchItem("rank", DebugTagValueWatcher.getById("rank").setValue("1"));
var _local1:VisualStack = new VisualStack(sApplication.gameWidth, sApplication.gameHeight);
_local1.setBackgroundColor(0);
addChildAt(_local1, 0);
_local1.push(Brain.instance);
playBackgroundSound();
pButtonAdultswim = new lib_button_adultswim();
pButtonAdultswim.visible = false;
pButtonAdultswim.x = 10;
pButtonAdultswim.y = 460;
addChild(pButtonAdultswim);
pButtonAdultswim.addEventListener(MouseEvent.MOUSE_OVER, mouse_over);
pButtonAdultswim.addEventListener(MouseEvent.CLICK, linkMoreGames);
}
public static function linkLeaderboard(_arg1:Event=null):void{
mouse_down();
navigateToURL(new URLRequest((((((("http://highscores.adultswim.com/highscores/index.jsp?game=" + sGameId) + "&cid=GAME_Ext_") + sGameName) + "_") + getStrDomain()) + "_endScreen_hs")), "_blank");
}
public static function getStrDomain():String{
return (instance.pLocalConnection.domain);
}
public static function getRootParameters():Object{
if (((((instance.root) && (instance.root.loaderInfo))) && (instance.root.loaderInfo.parameters))){
return (instance.root.loaderInfo.parameters);
};
return ({});
}
public static function getStrBase():String{
var _local1:String = getRootParameters()["strBase"];
return ((_local1) ? _local1 : "");
}
public static function mouse_over(_arg1:MouseEvent=null):void{
sApplication.getSoundManager().playSound(interface_button_rollover, false);
}
public static function linkMoreGames(_arg1:Event=null):void{
mouse_down();
navigateToURL(new URLRequest((((("http://games.adultswim.com?cid=GAME_Ext_" + sGameName) + "_") + getStrDomain()) + "_game_more")), "_blank");
}
public static function get instance():zhn_xxxmas{
return (sInstance);
}
public static function get application():GameApplication{
return (sApplication);
}
public static function mouse_down(_arg1:MouseEvent=null):void{
sApplication.getSoundManager().playSound(interface_button_press, false);
}
}
}//package
Section 399
//ZHN1_song2_loop (ZHN1_song2_loop)
package {
import flash.media.*;
public dynamic class ZHN1_song2_loop extends Sound {
}
}//package
Section 400
//ZhnGameCamera (ZhnGameCamera)
package {
import com.liquable.game.camera.*;
import flash.geom.*;
public class ZhnGameCamera extends GameCamera {
private var pShakeFrames:int;
private static const sShakePoint:Array = [new Point(0, 0), new Point(1, -1), new Point(-1, 1), new Point(1, 1), new Point(-1, -1)];
public function ZhnGameCamera(){
super(zhn_xxxmas.application.gameWidth, zhn_xxxmas.application.gameHeight);
pShakeFrames = 0;
}
override public function update():void{
if (pShakeFrames){
pShakeFrames--;
setFocus(getFocus(), sShakePoint[pShakeFrames].x, sShakePoint[pShakeFrames].y);
};
if (getFollowSpeed() < 1){
setFollowSpeed(Math.min(1, (getFollowSpeed() + 0.05)));
};
super.update();
}
public function shakeCamera():void{
pShakeFrames = sShakePoint.length;
}
override public function setFocus(_arg1:ICameraObject, _arg2:Number=0, _arg3:Number=0):void{
super.setFocus(_arg1, _arg2, (_arg3 - 30));
}
}
}//package
Section 401
//ZHNMapResource (ZHNMapResource)
package {
import com.liquable.game.geom.*;
import flash.xml.*;
import com.liquable.game.tiledmap.resources.*;
public class ZHNMapResource extends MapResource {
private var pWeaponLocs:Object;
private var pObjects:Array;
private var pSet:String;
private var pLolaLoc:Object;
private var pRoleLocs:Object;
private var pTrailerLoc:Object;
private var pObjectLocs:Array;
private static const TILE_HEIGHT:int = 40;
private static const TILE_WIDTH:int = 40;
public function ZHNMapResource(_arg1:String){
super(_arg1);
pTileWidth = TILE_WIDTH;
pTileHeight = TILE_HEIGHT;
}
private function analyzeLevelNode(_arg1:XMLNode):void{
pColumnCounts = parseInt(_arg1.attributes.width);
pRowCounts = parseInt(_arg1.attributes.height);
pSet = _arg1.attributes.set;
}
public function getTrailerLoc():Object{
return (pTrailerLoc);
}
public function getTileset():String{
return (pSet);
}
override protected function analyzeXmlDoc(_arg1:XMLDocument):void{
var _local3:XMLNode;
if (pImageResourceFilenames == null){
pImageResourceFilenames = new Object();
};
pTilePropertiesMap = new Object();
var _local2:Array = _arg1.firstChild.childNodes;
for each (_local3 in _local2) {
analyzeNode(_local3);
};
loadTiledImage("0", pSet, TILE_WIDTH, TILE_HEIGHT);
loadTiledImage("1", "snow.png", TILE_WIDTH, TILE_HEIGHT);
}
public function getObjectLocs():Array{
return (pObjectLocs);
}
public function getRoleLocsByType(_arg1:String):Array{
return (pRoleLocs[_arg1]);
}
private function analyzeRoleNode(_arg1:XMLNode):void{
var _local3:XMLNode;
var _local2:Array = _arg1.childNodes;
if (!pRoleLocs){
pRoleLocs = new Object();
};
for each (_local3 in _local2) {
if (!pRoleLocs.hasOwnProperty(_local3.nodeName)){
pRoleLocs[_local3.nodeName] = new Array();
};
pRoleLocs[_local3.nodeName].push(_local3.attributes);
};
}
private function analyzeObjectNode(_arg1:XMLNode):void{
if (!pObjectLocs){
pObjectLocs = new Array();
};
pObjectLocs.push(_arg1.attributes);
}
private function analyzeGroundNode(_arg1:XMLNode):void{
var _local6:PointInt;
var _local7:TileResource;
if (pLayerResources == null){
pLayerResources = new Array();
};
var _local2:Array = convertStringToArray(_arg1.attributes.tiles, ",");
var _local3:Object = new Object();
var _local4:int;
while (_local4 < _local2.length) {
_local6 = new PointInt((_local4 % pColumnCounts), (_local4 / pColumnCounts));
_local7 = new TileResource(this, _local6.x, _local6.y);
_local7.setImage("0", parseInt(_local2[_local4]));
_local3[_local6.toString()] = _local7;
_local4++;
};
var _local5:LayerResource = new LayerResource(this);
_local5.initialize(0, _local3);
pLayerResources.push(_local5);
_local5 = new LayerResource(this);
_local5.initialize(0, new Object());
pLayerResources.push(_local5);
}
private function convertStringToArray(_arg1:String, _arg2:String):Array{
var _local5:String;
var _local3:Array = new Array();
var _local4:String = _arg1.substring(0, (_arg1.length - 2));
while (((_local4) && ((_local4.length > 0)))) {
_local5 = _local4.substring(0, _local4.indexOf(_arg2));
_local3.push(_local5);
_local4 = _local4.substring((_local5.length + 1), _local4.length);
};
return (_local3);
}
public function getObjectLocsByType(_arg1:String):Array{
var _local3:Object;
var _local2:Array = new Array();
for each (_local3 in pObjectLocs) {
if (_local3.oType == _arg1){
_local2.push(_local3);
};
};
return (_local2);
}
public function getWeaponLocs():Object{
return (pWeaponLocs);
}
private function analyzeWeaponNode(_arg1:XMLNode):void{
var _local3:XMLNode;
var _local2:Array = _arg1.childNodes;
if (!pWeaponLocs){
pWeaponLocs = new Object();
};
for each (_local3 in _local2) {
if (!pWeaponLocs.hasOwnProperty(_local3.nodeName)){
pWeaponLocs[_local3.nodeName] = new Array();
};
pWeaponLocs[_local3.nodeName].push(_local3.attributes);
};
}
public function getSet():String{
return (pSet);
}
private function analyzeNode(_arg1:XMLNode):void{
switch (_arg1.nodeName){
case "level":
analyzeLevelNode(_arg1);
break;
case "ground":
analyzeGroundNode(_arg1);
break;
case "canWalk":
analyzeCanWalkNode(_arg1);
break;
case "object":
analyzeObjectNode(_arg1);
break;
case "trailer":
pTrailerLoc = _arg1.attributes;
break;
case "lola":
pLolaLoc = _arg1.attributes;
break;
case "weapon":
analyzeWeaponNode(_arg1);
break;
case "role":
analyzeRoleNode(_arg1);
break;
};
}
private function analyzeCanWalkNode(_arg1:XMLNode):void{
var _local2:Array = convertStringToArray(_arg1.attributes.tiles, ",");
var _local3:int;
while (_local3 < _local2.length) {
setTileProperty((_local3 % pColumnCounts), (_local3 / pColumnCounts), "canWalk", _local2[_local3]);
_local3++;
};
}
public function getLolaLoc():Object{
return (pLolaLoc);
}
public function getWeaponLocsByType(_arg1:String):Array{
return (pWeaponLocs[_arg1]);
}
public function getRoleLocs():Object{
return (pRoleLocs);
}
}
}//package
Section 402
//zombie_explode (zombie_explode)
package {
import flash.media.*;
public dynamic class zombie_explode extends Sound {
}
}//package
Section 403
//zombie_part_hit (zombie_part_hit)
package {
import flash.media.*;
public dynamic class zombie_part_hit extends Sound {
}
}//package
Section 404
//zombie_scuttle (zombie_scuttle)
package {
import flash.media.*;
public dynamic class zombie_scuttle extends Sound {
}
}//package
Section 405
//zombie_throw (zombie_throw)
package {
import flash.media.*;
public dynamic class zombie_throw extends Sound {
}
}//package