Section 1
//Define (common.Define)
package common {
import flash.display.*;
import flash.geom.*;
public class Define {
public static const AIR_RESISTANCE_HEAD:Number = 0.99;
public static const GRAVITY:Number = 0.5;
public static const TOTAL_NUMBER_LEVELS:int = 20;
public static const POSITION_BOSS_LEVELS:int = 10;
public static const AIR_RESISTANCE:Number = 0.96;
public static const INITIAL_UNLOCKS:int = 0;
public static const INITIAL_LEVEL:int = 0;
public static const SHOW_INTRO:Boolean = true;
public static const INITIAL_SCORE:int = 0;
public static const ENABLE_ALL_STICKS:Boolean = false;
public static const SHOW_STICKS_INIT:Boolean = false;
public static const DEBUG_GENERAL:Boolean = false;
public static const INITIAL_PLAYER_LEVEL:int = 0;
public static const PRECISION_STEPS:int = 12;
public static const TIME_SHOW_COMBO_INFO:Number = 3000;
public static var SCREEN_WIDTH:Number = 700;
public static var LIST_EXCLUDE_MOCHIADS:Array = ["newgrounds.com"];
public static var DIRECTION_NONE:Number = -1;
public static var DIRECTION_RIGHT:Number = 2;
public static var PI_DIV_2:Number = 1.5707963267949;
public static var URL_DISPLAY_HIGHSCORE_ZOMBIEBALL:String = "http://www.freecreationgames.net/?q=node/60";
public static var STICK_3:Number = 2;
public static var STICK_4:Number = 3;
public static var STICK_5:Number = 4;
public static var STICK_6:Number = 5;
public static var STICK_2:Number = 1;
public static var DIRECTION_UP_RIGHT:Number = (DIRECTION_UP + DIRECTION_RIGHT);
public static var STICK_1:Number = 0;
public static var ENABLE_INTEGRATED_XML:Boolean = true;
public static var DIRECTION_UP_LEFT:Number = (DIRECTION_UP + DIRECTION_LEFT);
public static var SCREEN_HALF_WIDTH:Number = 350;
public static var SCREEN_HEIGHT:Number = 500;
public static var KEYPRESSED_ENTER:Number = 8;
public static var SCREEN_HALF_HEIGHT:Number = 250;
public static var ORIGINAL_FLA_BACKGROUND_HEIGHT:Number = 600;
public static var ORIGINAL_FLA_PLANET_WIDTH:Number = 400;
public static var DIRECTION_UP:Number = 100;
public static var ORIGINAL_FLA_BACKGROUND_WIDTH:Number = 600;
public static var PI_MUL_2:Number = 6.28318530717959;
public static var KEYPRESSED_SPACE:Number = 9;
public static var URL_HIGHSCORE_ZOMBIEBALL:String = "http://www.freecreationgames.net/ZombieBall_Insert.php?";
public static var DIRECTION_DOWN_LEFT:Number = (DIRECTION_DOWN + DIRECTION_LEFT);
public static var DIRECTION_DOWN:Number = 200;
public static var ORIGINAL_FLA_PLANET_HEIGHT:Number = 400;
public static var ENABLE_LOCK_BY_DOMAIN:Boolean = false;
public static var ZOMBIES_WAVES_XML:String = "files/wave";
public static var ENABLE_MOCHIADS:Boolean = false;
public static var DIRECTION_LEFT:Number = 1;
public static var LIST_EXCLUDE_LOCKED:Array = ["armorgames.com"];
public static var DIRECTION_DOWN_RIGHT:Number = (DIRECTION_DOWN + DIRECTION_RIGHT);
public static function getScaledValue(_arg1:Number, _arg2:Number, _arg3:Number):Number{
return (((_arg1 * _arg3) / _arg2));
}
public static function getDirectionPlus(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
var _local4:Number;
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
if (_local3 == 0){
if (_local4 > 0){
return (DIRECTION_UP);
};
return (DIRECTION_DOWN);
};
if (_local4 == 0){
if (_local3 > 0){
return (DIRECTION_LEFT);
};
return (DIRECTION_RIGHT);
};
if (_local3 > 0){
if (_local4 > 0){
return (DIRECTION_UP_LEFT);
};
return (DIRECTION_DOWN_LEFT);
//unresolved jump
};
if (_local4 > 0){
return (DIRECTION_UP_RIGHT);
};
return (DIRECTION_DOWN_RIGHT);
}
public static function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public static function randRangeFloat(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = ((Math.random() * ((_arg2 - _arg1) + 1)) + _arg1);
return (_local3);
}
public static function isInsideBox(_arg1:Point, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Boolean{
return ((((((((_arg1.x > _arg2)) && ((_arg1.y > _arg3)))) && ((_arg1.x < _arg4)))) && ((_arg1.y < _arg5))));
}
public static function askDirectionPoint(_arg1:Point, _arg2:Number, _arg3:Point):Number{
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
_local4 = new Array(_arg1.x, 0, _arg1.y);
_local5 = new Array((_arg1.x + Math.cos(_arg2)), 0, (_arg1.y + Math.sin(_arg2)));
_local6 = new Array(_arg1.x, 1, _arg1.y);
_local7 = new Array(0, 0, 0);
_local8 = new Array(0, 0, 0);
_local9 = new Array(0, 0, 0);
_local7[0] = (_local5[0] - _local4[0]);
_local7[1] = (_local5[1] - _local4[1]);
_local7[2] = (_local5[2] - _local4[2]);
_local8[0] = (_local6[0] - _local4[0]);
_local8[1] = (_local6[1] - _local4[1]);
_local8[2] = (_local6[2] - _local4[2]);
_local9[0] = ((_local7[1] * _local8[2]) - (_local7[2] * _local8[1]));
_local9[1] = ((_local7[2] * _local8[0]) - (_local7[0] * _local8[2]));
_local9[2] = ((_local7[0] * _local8[1]) - (_local7[1] * _local8[0]));
_local10 = Math.sqrt((((_local9[0] * _local9[0]) + (_local9[1] * _local9[1])) + (_local9[2] * _local9[2])));
if (_local10 == 0){
_local9[0] = 0;
_local9[1] = 0;
_local9[2] = 0;
} else {
_local9[0] = (_local9[0] / _local10);
_local9[1] = (_local9[1] / _local10);
_local9[2] = (_local9[2] / _local10);
};
_local11 = -((((_local9[0] * _local4[0]) + (_local9[1] * _local4[1])) + (_local9[2] * _local4[2])));
return ((((_arg3.x * _local9[0]) + (_arg3.y * _local9[2])) + _local11));
}
public static function getRadians(_arg1:Number):Number{
return (((_arg1 * Math.PI) / 180));
}
public static function getChecksumTimestamp():String{
var _local1:*;
var _local2:*;
var _local3:String;
var _local4:Number;
var _local5:*;
var _local6:Number;
_local1 = new Date();
_local2 = _local1.getTime();
_local3 = ("" + Math.floor((_local2 / 1000)));
_local4 = 0;
_local5 = 0;
while (_local5 < _local3.length) {
_local6 = new Number(_local3.substr(_local5, 1));
if ((_local5 % 2) == 0){
_local4 = (_local4 + Math.sqrt(((_local6 * _local5) * 25)));
} else {
_local4 = (_local4 + _local6);
};
_local5++;
};
_local4 = Math.floor((_local4 % 100));
return (((("a" + _local4) + _local3) + "0"));
}
public static function getDistancePlanePoint(_arg1:Point, _arg2:Number, _arg3:Point):Number{
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
_local4 = new Array(_arg1.x, 0, _arg1.y);
_local5 = new Array((_arg1.x + Math.cos((_arg2 + (Math.PI / 2)))), 0, (_arg1.y + Math.sin((_arg2 + (Math.PI / 2)))));
_local6 = new Array(_arg1.x, 1, _arg1.y);
_local7 = new Array(0, 0, 0);
_local8 = new Array(0, 0, 0);
_local9 = new Array(0, 0, 0);
_local7[0] = (_local5[0] - _local4[0]);
_local7[1] = (_local5[1] - _local4[1]);
_local7[2] = (_local5[2] - _local4[2]);
_local8[0] = (_local6[0] - _local4[0]);
_local8[1] = (_local6[1] - _local4[1]);
_local8[2] = (_local6[2] - _local4[2]);
_local9[0] = ((_local7[1] * _local8[2]) - (_local7[2] * _local8[1]));
_local9[1] = ((_local7[2] * _local8[0]) - (_local7[0] * _local8[2]));
_local9[2] = ((_local7[0] * _local8[1]) - (_local7[1] * _local8[0]));
_local10 = Math.sqrt((((_local9[0] * _local9[0]) + (_local9[1] * _local9[1])) + (_local9[2] * _local9[2])));
if (_local10 == 0){
_local9[0] = 0;
_local9[1] = 0;
_local9[2] = 0;
} else {
_local9[0] = (_local9[0] / _local10);
_local9[1] = (_local9[1] / _local10);
_local9[2] = (_local9[2] / _local10);
};
_local11 = -((((_local9[0] * _local4[0]) + (_local9[1] * _local4[1])) + (_local9[2] * _local4[2])));
return (Math.abs((((_arg3.x * _local9[0]) + (_arg3.y * _local9[2])) + _local11)));
}
public static function moveDirectionPlus(_arg1:Point, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Point{
var _local6:*;
_local6 = new Point(_arg1.x, _arg1.y);
switch (_arg2){
case Define.DIRECTION_LEFT:
if (_arg4 > _arg3){
_local6.x = (_local6.x - _arg3);
} else {
_local6.x = (_local6.x - _arg4);
};
break;
case Define.DIRECTION_RIGHT:
if (_arg4 > _arg3){
_local6.x = (_local6.x + _arg3);
} else {
_local6.x = (_local6.x + _arg4);
};
break;
case Define.DIRECTION_UP:
if (_arg5 > _arg3){
_local6.y = (_local6.y - _arg3);
} else {
_local6.y = (_local6.y - _arg5);
};
break;
case Define.DIRECTION_DOWN:
if (_arg5 > _arg3){
_local6.y = (_local6.y + _arg3);
} else {
_local6.y = (_local6.y + _arg5);
};
break;
case Define.DIRECTION_UP_LEFT:
if (_arg4 > _arg3){
_local6.x = (_local6.x - _arg3);
} else {
_local6.x = (_local6.x - _arg4);
};
if (_arg5 > _arg3){
_local6.y = (_local6.y - _arg3);
} else {
_local6.y = (_local6.y - _arg5);
};
break;
case Define.DIRECTION_UP_RIGHT:
if (_arg4 > _arg3){
_local6.x = (_local6.x + _arg3);
} else {
_local6.x = (_local6.x + _arg4);
};
if (_arg5 > _arg3){
_local6.y = (_local6.y - _arg3);
} else {
_local6.y = (_local6.y - _arg5);
};
break;
case Define.DIRECTION_DOWN_LEFT:
if (_arg4 > _arg3){
_local6.x = (_local6.x - _arg3);
} else {
_local6.x = (_local6.x - _arg4);
};
if (_arg5 > _arg3){
_local6.y = (_local6.y + _arg3);
} else {
_local6.y = (_local6.y + _arg5);
};
break;
case Define.DIRECTION_DOWN_RIGHT:
if (_arg4 > _arg3){
_local6.x = (_local6.x + _arg3);
} else {
_local6.x = (_local6.x + _arg4);
};
if (_arg5 > _arg3){
_local6.y = (_local6.y + _arg3);
} else {
_local6.y = (_local6.y + _arg5);
};
break;
};
return (_local6);
}
public static function distancePoint(_arg1:Point, _arg2:Point):Number{
return (Point.distance(_arg1, _arg2));
}
public static function getNumber2Digits(_arg1):String{
var _local2:String;
_local2 = new String("");
if (_arg1 > 9){
_local2 = "";
} else {
_local2 = "0";
};
_local2 = (_local2 + _arg1);
return (_local2);
}
public static function moveDirection(_arg1:Point, _arg2:Number, _arg3:Number):Point{
var _local4:*;
_local4 = new Point(_arg1.x, _arg1.y);
switch (_arg2){
case Define.DIRECTION_LEFT:
_local4.x = (_local4.x - _arg3);
break;
case Define.DIRECTION_RIGHT:
_local4.x = (_local4.x + _arg3);
break;
case Define.DIRECTION_UP:
_local4.y = (_local4.y - _arg3);
break;
case Define.DIRECTION_DOWN:
_local4.y = (_local4.y + _arg3);
break;
case Define.DIRECTION_UP_LEFT:
_local4.x = (_local4.x - _arg3);
_local4.y = (_local4.y - _arg3);
break;
case Define.DIRECTION_UP_RIGHT:
_local4.x = (_local4.x + _arg3);
_local4.y = (_local4.y - _arg3);
break;
case Define.DIRECTION_DOWN_LEFT:
_local4.x = (_local4.x - _arg3);
_local4.y = (_local4.y + _arg3);
break;
case Define.DIRECTION_DOWN_RIGHT:
_local4.x = (_local4.x + _arg3);
_local4.y = (_local4.y + _arg3);
break;
};
return (_local4);
}
public static function movePointYaw(_arg1:Point, _arg2:Number, _arg3:Number):Point{
var _local4:Point;
_local4 = new Point(_arg1.x, _arg1.y);
new Point(_arg1.x, _arg1.y).x = (_local4.x + (_arg3 * Math.cos(_arg2)));
_local4.y = (_local4.y + (_arg3 * Math.sin(_arg2)));
return (_local4);
}
public static function incrementAngle(_arg1:Number, _arg2:Number):Number{
return ((_arg1 + _arg2));
}
public static function getGrados(_arg1:Number):Number{
return (((_arg1 * 180) / Math.PI));
}
public static function setMovieCentered(_arg1:MovieClip, _arg2:Number, _arg3:Number):void{
var _local4:Number;
var _local5:Number;
_local4 = ((_arg1.width * _arg3) / _arg1.height);
_local5 = ((_arg1.height * _arg2) / _arg1.width);
if (_local4 < _local5){
_arg1.width = _local4;
_arg1.height = _arg3;
} else {
_arg1.width = _arg2;
_arg1.height = _local5;
};
_arg1.x = ((_arg2 - _arg1.width) / 2);
_arg1.y = ((_arg3 - _arg1.height) / 2);
}
public static function checkNumberFormat(_arg1:Number, _arg2:String, _arg3:Number=-1, _arg4:Number=-1, _arg5:String=null):Boolean{
if (isNaN(_arg1)){
trace(_arg2);
return (false);
};
if (((!((_arg3 == -1))) && (!((_arg4 == -1))))){
if (!(((_arg3 <= _arg1)) && ((_arg1 <= _arg4)))){
if (_arg5 != null){
trace(_arg5);
} else {
trace((((((_arg2 + ": OUTSIDE THE RANGE(") + _arg3) + ",") + _arg4) + ")"));
};
return (false);
};
};
return (true);
}
public static function getDirection(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
var _local4:Number;
if ((((_arg1.x == _arg2.x)) && ((_arg1.y == _arg2.y)))){
return (DIRECTION_NONE);
};
_local3 = (_arg1.x - _arg2.x);
_local4 = (_arg1.y - _arg2.y);
if (Math.abs(_local3) > Math.abs(_local4)){
if (_local3 > 0){
return (DIRECTION_LEFT);
};
return (DIRECTION_RIGHT);
//unresolved jump
};
if (_local4 > 0){
return (DIRECTION_UP);
};
return (DIRECTION_DOWN);
}
public static function checkNameInsideList(_arg1:String, _arg2:Array, _arg3:String):Boolean{
if (_arg2.indexOf(_arg1) == -1){
trace(_arg3);
return (false);
};
return (true);
}
public static function getDirectionOpposite(_arg1:Number):Number{
switch (_arg1){
case DIRECTION_UP:
return (DIRECTION_DOWN);
case DIRECTION_DOWN:
return (DIRECTION_UP);
case DIRECTION_RIGHT:
return (DIRECTION_LEFT);
case DIRECTION_LEFT:
return (DIRECTION_RIGHT);
case DIRECTION_UP_LEFT:
return (DIRECTION_DOWN_RIGHT);
case DIRECTION_UP_RIGHT:
return (DIRECTION_DOWN_LEFT);
case DIRECTION_DOWN_LEFT:
return (DIRECTION_UP_RIGHT);
case DIRECTION_DOWN_RIGHT:
return (DIRECTION_UP_LEFT);
};
return (DIRECTION_NONE);
}
public static function moveYaw(_arg1:Point, _arg2:Number, _arg3:Number):Point{
return (new Point((_arg1.x + (_arg3 * Math.cos(_arg2))), (_arg1.y + (_arg3 * Math.sin(_arg2)))));
}
public static function sortChildrenByY(_arg1:MovieClip):void{
var _local2:int;
var _local3:Array;
_local3 = new Array();
_local2 = _arg1.numChildren;
while (_local2--) {
_local3[_local2] = _arg1.getChildAt(_local2);
};
_local3.sortOn("y", Array.NUMERIC);
_local2 = _arg1.numChildren;
while (_local2--) {
if (_local3[_local2] != _arg1.getChildAt(_local2)){
_arg1.setChildIndex(_local3[_local2], _local2);
};
};
}
public static function getOrientationToPoint(_arg1:Point, _arg2:Point):Number{
return (Math.atan2((_arg2.y - _arg1.y), (_arg2.x - _arg1.x)));
}
}
}//package common
Section 2
//gameLoader (common.gameLoader)
package common {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import CPMStar.*;
public class gameLoader extends MovieClip {
public var backProgressFondo:MovieClip;
public var instLoadingBarProgress:loadingBarProgress;
public var m_dataCollected:String;
public var m_accessCompleted:Boolean;
public var adBox:MovieClip;
public var btnPlayGame:SimpleButton;
public var m_domain:String;
public var PASS_KEYWORD_WEBSITE:String;// = "variable1=gromenauerl"
public function gameLoader(){
var _local1:String;
var _local2:DisplayObject;
var _local3:String;
var _local4:Number;
var _local5:Number;
var _local6:String;
var _local7:Number;
var _local8:Number;
var _local9:Boolean;
var _local10:*;
PASS_KEYWORD_WEBSITE = "variable1=gromenauerl";
super();
_local1 = "165Q1B0A8CB3";
_local2 = new AdLoader(_local1);
adBox.addChild(_local2);
_local3 = stage.loaderInfo.url;
_local4 = (_local3.indexOf("://") + 3);
_local5 = _local3.indexOf("/", _local4);
_local6 = _local3.substring(_local4, _local5);
_local7 = (_local6.lastIndexOf(".") - 1);
_local8 = (_local6.lastIndexOf(".", _local7) + 1);
m_domain = _local6.substring(_local8, _local6.length);
if (Define.ENABLE_LOCK_BY_DOMAIN){
_local9 = true;
_local10 = 0;
while (_local10 < Define.LIST_EXCLUDE_LOCKED.length) {
if (m_domain == Define.LIST_EXCLUDE_LOCKED[_local10]){
_local9 = false;
};
_local10++;
};
if (_local9){
MovieClip(root).gotoAndStop("not_allowed");
} else {
addEventListener(Event.ENTER_FRAME, logicGameLoader);
};
} else {
addEventListener(Event.ENTER_FRAME, logicGameLoader);
};
}
public function onMouseClick(_arg1:MouseEvent):void{
var _local2:Boolean;
var _local3:*;
if (btnPlayGame.alpha == 1){
removeChild(adBox);
if (Define.ENABLE_MOCHIADS){
_local2 = false;
_local3 = 0;
while (_local3 < Define.LIST_EXCLUDE_MOCHIADS.length) {
if (m_domain == Define.LIST_EXCLUDE_MOCHIADS[_local3]){
_local2 = true;
};
_local3++;
};
if (_local2){
MovieClip(root).gotoAndStop("logo");
} else {
MovieClip(root).gotoAndStop("mochiads");
};
} else {
if (Define.SHOW_INTRO){
MovieClip(root).gotoAndStop("sponsor");
} else {
MovieClip(root).gotoAndStop("main");
};
};
};
}
function errorInform(_arg1:Event):void{
MovieClip(root).gotoAndStop("not_allowed");
}
function completeWebAccess(_arg1:Event):void{
var _local2:URLLoader;
_local2 = URLLoader(_arg1.target);
m_dataCollected = new String(_local2.data);
m_accessCompleted = true;
}
function logicGameLoader(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = (root.loaderInfo.bytesLoaded / 0x0400);
_local3 = (root.loaderInfo.bytesTotal / 0x0400);
_local4 = Math.floor(((_local2 * 100) / _local3));
instLoadingBarProgress.instText.text = (("LOADING " + _local4) + "%");
instLoadingBarProgress.instMaskLoadingBarProgress.width = ((_local4 * 508) / 100);
if (_local2 >= _local3){
removeEventListener(Event.ENTER_FRAME, logicGameLoader);
btnPlayGame.addEventListener(MouseEvent.CLICK, onMouseClick);
btnPlayGame.alpha = 1;
instLoadingBarProgress.instText.text = "";
instLoadingBarProgress.visible = false;
backProgressFondo.visible = false;
};
}
}
}//package common
Section 3
//gameTimer (common.gameTimer)
package common {
public class gameTimer {
public var m_timeLastCycle:Number;
public var m_currentDate:Date;
public var m_timeAcum:Number;
public var m_difTime:Number;
public function gameTimer(){
m_currentDate = new Date();
m_timeLastCycle = m_currentDate.getTime();
m_timeAcum = 0;
}
public function resetTime(){
m_timeAcum = 0;
}
public function updateTime(){
var _local1:Number;
if (m_timeLastCycle == -1){
m_currentDate = new Date();
m_timeLastCycle = m_currentDate.getTime();
m_timeAcum = 0;
} else {
m_currentDate = new Date();
_local1 = m_currentDate.getTime();
m_difTime = Math.abs((_local1 - m_timeLastCycle));
m_timeLastCycle = _local1;
if (m_difTime < 1000){
m_timeAcum = (m_timeAcum + m_difTime);
};
};
}
}
}//package common
Section 4
//LevelsXML (common.LevelsXML)
package common {
public class LevelsXML {
public static var LEVELS_XML:Array = ["<wave><enemy x=\"700\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie1</enemy><enemy x=\"800\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie3</enemy><enemy x=\"1000\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie4</enemy><enemy x=\"1100\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie4</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"1\" life=\"20\" score=\"20\" speed=\"1.7\">Zombie1</enemy><enemy x=\"800\" y=\"400\" type=\"1\" life=\"20\" score=\"20\" speed=\"1.7\">Zombie2</enemy><enemy x=\"900\" y=\"400\" type=\"1\" life=\"20\" score=\"20\" speed=\"1.7\">Zombie3</enemy><enemy x=\"1400\" y=\"400\" type=\"1\" life=\"20\" score=\"20\" speed=\"1.7\">Zombie4</enemy><enemy x=\"1500\" y=\"400\" type=\"1\" life=\"20\" score=\"20\" speed=\"1.7\">Zombie5</enemy><enemy x=\"1600\" y=\"400\" type=\"1\" life=\"20\" score=\"20\" speed=\"1.7\">Zombie6</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie1</enemy><enemy x=\"800\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie2</enemy><enemy x=\"1000\" y=\"400\" type=\"1\" life=\"20\" score=\"20\" speed=\"1.8\">Zombie3</enemy><enemy x=\"1100\" y=\"400\" type=\"1\" life=\"20\" score=\"20\" speed=\"1.8\">Zombie4</enemy><enemy x=\"1200\" y=\"400\" type=\"1\" life=\"20\" score=\"20\" speed=\"1.8\">Zombie5</enemy><enemy x=\"1200\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie6</enemy><enemy x=\"1300\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie7</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.4\">Zombie1</enemy><enemy x=\"800\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.4\">Zombie2</enemy><enemy x=\"900\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.4\">Zombie3</enemy><enemy x=\"1050\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.3\">Zombie4</enemy><enemy x=\"1150\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.3\">Zombie5</enemy><enemy x=\"1250\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.3\">Zombie6</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie1</enemy><enemy x=\"800\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie2</enemy><enemy x=\"1000\" y=\"400\" type=\"1\" life=\"30\" score=\"30\" speed=\"1.9\">Zombie3</enemy><enemy x=\"1200\" y=\"400\" type=\"1\" life=\"30\" score=\"30\" speed=\"1.9\">Zombie4</enemy><enemy x=\"1300\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.4\">Zombie5</enemy><enemy x=\"1400\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.4\">Zombie6</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"1.2\">Zombie1</enemy><enemy x=\"800\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"1.2\">Zombie2</enemy><enemy x=\"900\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"1.2\">Zombie3</enemy><enemy x=\"1000\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"1.2\">Zombie4</enemy><enemy x=\"1100\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"1.2\">Zombie5</enemy><enemy x=\"1200\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"1.2\">Zombie6</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie1</enemy><enemy x=\"800\" y=\"400\" type=\"1\" life=\"30\" score=\"30\" speed=\"2.0\">Zombie2</enemy><enemy x=\"900\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.4\">Zombie3</enemy><enemy x=\"1000\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"1.5\">Zombie4</enemy><enemy x=\"1100\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie5</enemy><enemy x=\"1200\" y=\"400\" type=\"1\" life=\"30\" score=\"30\" speed=\"2.0\">Zombie6</enemy><enemy x=\"1300\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.6\">Zombie6</enemy><enemy x=\"1400\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"1.5\">Zombie6</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie1</enemy><enemy x=\"800\" y=\"400\" type=\"1\" life=\"30\" score=\"30\" speed=\"1.8\">Zombie2</enemy><enemy x=\"900\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.5\">Zombie3</enemy><enemy x=\"1000\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"1.55\">Zombie4</enemy><enemy x=\"1100\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.45\">Zombie5</enemy><enemy x=\"1200\" y=\"400\" type=\"1\" life=\"30\" score=\"30\" speed=\"2.3\">Zombie6</enemy><enemy x=\"1400\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.8\">Zombie6</enemy><enemy x=\"1400\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"1.5\">Zombie6</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"0\" life=\"30\" score=\"25\" speed=\"1.3\">Zombie1</enemy><enemy x=\"800\" y=\"400\" type=\"1\" life=\"35\" score=\"30\" speed=\"1.7\">Zombie2</enemy><enemy x=\"900\" y=\"400\" type=\"2\" life=\"40\" score=\"35\" speed=\"1.5\">Zombie3</enemy><enemy x=\"1000\" y=\"400\" type=\"3\" life=\"45\" score=\"40\" speed=\"1.4\">Zombie4</enemy><enemy x=\"1100\" y=\"400\" type=\"0\" life=\"30\" score=\"25\" speed=\"1.3\">Zombie5</enemy><enemy x=\"1300\" y=\"400\" type=\"1\" life=\"35\" score=\"30\" speed=\"1.9\">Zombie6</enemy><enemy x=\"1300\" y=\"400\" type=\"2\" life=\"40\" score=\"35\" speed=\"1.5\">Zombie6</enemy><enemy x=\"1300\" y=\"400\" type=\"3\" life=\"45\" score=\"40\" speed=\"1.4\">Zombie6</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"1.1\">Zombie2</enemy><enemy x=\"800\" y=\"400\" type=\"1\" life=\"30\" score=\"30\" speed=\"1.7\">Zombie3</enemy><enemy x=\"1000\" y=\"400\" type=\"2\" life=\"35\" score=\"35\" speed=\"1.4\">Zombie4</enemy><enemy x=\"1100\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"1.3\">Zombie5</enemy><enemy x=\"1400\" y=\"400\" type=\"4\" life=\"350\" score=\"150\" speed=\"1.05\">ZombieBoss</enemy><enemy x=\"1600\" y=\"400\" type=\"1\" life=\"35\" score=\"30\" speed=\"1.85\">Zombie3</enemy><enemy x=\"1650\" y=\"400\" type=\"2\" life=\"40\" score=\"35\" speed=\"1.7\">Zombie4</enemy><enemy x=\"1700\" y=\"400\" type=\"3\" life=\"45\" score=\"40\" speed=\"1.6\">Zombie5</enemy><enemy x=\"1750\" y=\"400\" type=\"0\" life=\"30\" score=\"25\" speed=\"1.4\">Zombie2</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"0\" life=\"40\" score=\"35\" speed=\"2.5\">Zombie1</enemy><enemy x=\"850\" y=\"400\" type=\"1\" life=\"40\" score=\"35\" speed=\"2.3\">Zombie2</enemy><enemy x=\"1000\" y=\"400\" type=\"0\" life=\"40\" score=\"35\" speed=\"2.2\">Zombie3</enemy><enemy x=\"1150\" y=\"400\" type=\"1\" life=\"40\" score=\"35\" speed=\"2.3\">Zombie4</enemy><enemy x=\"1600\" y=\"400\" type=\"0\" life=\"40\" score=\"35\" speed=\"2.4\">Zombie5</enemy><enemy x=\"1800\" y=\"400\" type=\"0\" life=\"40\" score=\"35\" speed=\"2.4\">Zombie5</enemy><enemy x=\"1950\" y=\"400\" type=\"1\" life=\"40\" score=\"35\" speed=\"2.4\">Zombie6</enemy><enemy x=\"2100\" y=\"400\" type=\"1\" life=\"40\" score=\"35\" speed=\"2.5\">Zombie6</enemy><enemy x=\"2180\" y=\"400\" type=\"0\" life=\"40\" score=\"35\" speed=\"2.5\">Zombie5</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"2\" life=\"50\" score=\"30\" speed=\"2.4\">Zombie1</enemy><enemy x=\"900\" y=\"400\" type=\"3\" life=\"60\" score=\"30\" speed=\"2.1\">Zombie2</enemy><enemy x=\"1100\" y=\"400\" type=\"2\" life=\"50\" score=\"30\" speed=\"2.1\">Zombie3</enemy><enemy x=\"1300\" y=\"400\" type=\"2\" life=\"60\" score=\"30\" speed=\"2.1\">Zombie4</enemy><enemy x=\"1500\" y=\"400\" type=\"3\" life=\"50\" score=\"30\" speed=\"2.1\">Zombie5</enemy><enemy x=\"1800\" y=\"400\" type=\"7\" life=\"100\" score=\"50\" speed=\"2.0\">Zombie6</enemy><enemy x=\"2000\" y=\"400\" type=\"7\" life=\"100\" score=\"50\" speed=\"2.0\">Zombie6</enemy><enemy x=\"2250\" y=\"400\" type=\"3\" life=\"50\" score=\"30\" speed=\"2.1\">Zombie5</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"7\" life=\"110\" score=\"50\" speed=\"2.0\">Zombie1</enemy><enemy x=\"850\" y=\"400\" type=\"1\" life=\"35\" score=\"30\" speed=\"2.9\">Zombie2</enemy><enemy x=\"1000\" y=\"400\" type=\"7\" life=\"110\" score=\"50\" speed=\"2.0\">Zombie3</enemy><enemy x=\"1150\" y=\"400\" type=\"1\" life=\"35\" score=\"30\" speed=\"2.5\">Zombie4</enemy><enemy x=\"1300\" y=\"400\" type=\"7\" life=\"110\" score=\"50\" speed=\"2.0\">Zombie5</enemy><enemy x=\"1450\" y=\"400\" type=\"1\" life=\"35\" score=\"30\" speed=\"2.5\">Zombie6</enemy><enemy x=\"1600\" y=\"400\" type=\"7\" life=\"110\" score=\"50\" speed=\"2.0\">Zombie5</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"0\" life=\"40\" score=\"30\" speed=\"2.0\">Zombie1</enemy><enemy x=\"800\" y=\"400\" type=\"0\" life=\"40\" score=\"30\" speed=\"2.0\">Zombie2</enemy><enemy x=\"900\" y=\"400\" type=\"0\" life=\"40\" score=\"30\" speed=\"2.0\">Zombie2</enemy><enemy x=\"1000\" y=\"400\" type=\"0\" life=\"40\" score=\"30\" speed=\"2.0\">Zombie2</enemy><enemy x=\"1100\" y=\"400\" type=\"2\" life=\"50\" score=\"30\" speed=\"2.1\">Zombie3</enemy><enemy x=\"1200\" y=\"400\" type=\"2\" life=\"50\" score=\"30\" speed=\"2.1\">Zombie4</enemy><enemy x=\"1300\" y=\"400\" type=\"3\" life=\"60\" score=\"30\" speed=\"2.1\">Zombie5</enemy><enemy x=\"1500\" y=\"400\" type=\"3\" life=\"60\" score=\"30\" speed=\"2.1\">Zombie6</enemy><enemy x=\"1600\" y=\"400\" type=\"8\" life=\"220\" score=\"50\" speed=\"1.95\">Zombie6</enemy><enemy x=\"1800\" y=\"400\" type=\"2\" life=\"45\" score=\"30\" speed=\"2.1\">Zombie4</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"7\" life=\"180\" score=\"40\" speed=\"2.2\">Zombie1</enemy><enemy x=\"850\" y=\"400\" type=\"8\" life=\"220\" score=\"45\" speed=\"2.2\">Zombie2</enemy><enemy x=\"1000\" y=\"400\" type=\"7\" life=\"180\" score=\"40\" speed=\"2.2\">Zombie3</enemy><enemy x=\"1150\" y=\"400\" type=\"8\" life=\"220\" score=\"45\" speed=\"2.2\">Zombie4</enemy><enemy x=\"1300\" y=\"400\" type=\"7\" life=\"180\" score=\"40\" speed=\"2.2\">Zombie5</enemy><enemy x=\"1450\" y=\"400\" type=\"8\" life=\"220\" score=\"45\" speed=\"2.2\">Zombie6</enemy><enemy x=\"1600\" y=\"400\" type=\"7\" life=\"180\" score=\"40\" speed=\"2.2\">Zombie5</enemy><enemy x=\"1750\" y=\"400\" type=\"8\" life=\"220\" score=\"45\" speed=\"2.2\">Zombie5</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"3.0\">Zombie</enemy><enemy x=\"800\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"3.0\">Zombie</enemy><enemy x=\"900\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"3.0\">Zombie</enemy><enemy x=\"1000\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"3.0\">Zombie</enemy><enemy x=\"1100\" y=\"400\" type=\"8\" life=\"250\" score=\"60\" speed=\"2.0\">Zombie9</enemy><enemy x=\"1600\" y=\"400\" type=\"8\" life=\"250\" score=\"60\" speed=\"2.0\">Zombie9</enemy><enemy x=\"1300\" y=\"400\" type=\"1\" life=\"25\" score=\"30\" speed=\"3.0\">Zombie</enemy><enemy x=\"1400\" y=\"400\" type=\"1\" life=\"25\" score=\"30\" speed=\"3.0\">Zombie</enemy><enemy x=\"1500\" y=\"400\" type=\"1\" life=\"25\" score=\"30\" speed=\"3.0\">Zombie</enemy><enemy x=\"1600\" y=\"400\" type=\"1\" life=\"25\" score=\"30\" speed=\"3.0\">Zombie</enemy><enemy x=\"2000\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"3.0\">Zombie</enemy><enemy x=\"2100\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"3.0\">Zombie</enemy><enemy x=\"2200\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"3.0\">Zombie</enemy><enemy x=\"2200\" y=\"400\" type=\"0\" life=\"25\" score=\"25\" speed=\"3.0\">Zombie</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"4\" life=\"180\" score=\"45\" speed=\"2.3\">Zombie1</enemy><enemy x=\"850\" y=\"400\" type=\"4\" life=\"180\" score=\"45\" speed=\"2.3\">Zombie2</enemy><enemy x=\"1000\" y=\"400\" type=\"4\" life=\"180\" score=\"45\" speed=\"2.3\">Zombie3</enemy><enemy x=\"1300\" y=\"400\" type=\"7\" life=\"220\" score=\"50\" speed=\"2.3\">Zombie3</enemy><enemy x=\"1450\" y=\"400\" type=\"7\" life=\"220\" score=\"55\" speed=\"2.3\">Zombie3</enemy><enemy x=\"1600\" y=\"400\" type=\"7\" life=\"220\" score=\"55\" speed=\"2.3\">Zombie3</enemy><enemy x=\"1900\" y=\"400\" type=\"8\" life=\"260\" score=\"60\" speed=\"2.3\">Zombie3</enemy><enemy x=\"2050\" y=\"400\" type=\"8\" life=\"260\" score=\"60\" speed=\"2.3\">Zombie3</enemy><enemy x=\"2200\" y=\"400\" type=\"8\" life=\"260\" score=\"60\" speed=\"2.3\">Zombie3</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"8\" life=\"300\" score=\"70\" speed=\"1.6\">Zombie6</enemy><enemy x=\"1200\" y=\"400\" type=\"8\" life=\"300\" score=\"70\" speed=\"1.6\">Zombie6</enemy><enemy x=\"1700\" y=\"400\" type=\"8\" life=\"300\" score=\"70\" speed=\"1.6\">Zombie6</enemy><enemy x=\"900\" y=\"400\" type=\"2\" life=\"40\" score=\"40\" speed=\"2.8\">Zombie6</enemy><enemy x=\"1000\" y=\"400\" type=\"2\" life=\"40\" score=\"40\" speed=\"2.8\">Zombie6</enemy><enemy x=\"1100\" y=\"400\" type=\"2\" life=\"40\" score=\"40\" speed=\"2.8\">Zombie6</enemy><enemy x=\"1200\" y=\"400\" type=\"2\" life=\"40\" score=\"40\" speed=\"2.8\">Zombie6</enemy><enemy x=\"1900\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"2.8\">Zombie6</enemy><enemy x=\"2000\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"2.8\">Zombie6</enemy><enemy x=\"2100\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"2.8\">Zombie6</enemy><enemy x=\"2200\" y=\"400\" type=\"3\" life=\"40\" score=\"40\" speed=\"2.8\">Zombie6</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"4\" life=\"180\" score=\"60\" speed=\"1.9\">Zombie_4</enemy><enemy x=\"900\" y=\"400\" type=\"4\" life=\"180\" score=\"60\" speed=\"1.9\">Zombie_4</enemy><enemy x=\"800\" y=\"400\" type=\"0\" life=\"30\" score=\"30\" speed=\"2.4\">Zombie</enemy><enemy x=\"1000\" y=\"400\" type=\"1\" life=\"30\" score=\"40\" speed=\"2.7\">Zombie</enemy><enemy x=\"1200\" y=\"400\" type=\"1\" life=\"30\" score=\"40\" speed=\"2.7\">Zombie</enemy><enemy x=\"1400\" y=\"400\" type=\"7\" life=\"220\" score=\"70\" speed=\"1.9\">Zombie_7</enemy><enemy x=\"1650\" y=\"400\" type=\"7\" life=\"220\" score=\"70\" speed=\"1.9\">Zombie_7</enemy><enemy x=\"1900\" y=\"400\" type=\"2\" life=\"40\" score=\"45\" speed=\"2.5\">Zombie</enemy><enemy x=\"2100\" y=\"400\" type=\"2\" life=\"40\" score=\"45\" speed=\"2.5\">Zombie</enemy><enemy x=\"2300\" y=\"400\" type=\"2\" life=\"40\" score=\"45\" speed=\"2.5\">Zombie</enemy><enemy x=\"2500\" y=\"400\" type=\"8\" life=\"260\" score=\"80\" speed=\"2.1\">Zombie_8</enemy><enemy x=\"2750\" y=\"400\" type=\"8\" life=\"260\" score=\"80\" speed=\"2.1\">Zombie_8</enemy><enemy x=\"3000\" y=\"400\" type=\"3\" life=\"50\" score=\"50\" speed=\"2.5\">Zombie</enemy><enemy x=\"3200\" y=\"400\" type=\"3\" life=\"50\" score=\"50\" speed=\"2.5\">Zombie</enemy><enemy x=\"3400\" y=\"400\" type=\"3\" life=\"50\" score=\"50\" speed=\"2.5\">Zombie</enemy></wave>", "<wave><enemy x=\"700\" y=\"400\" type=\"0\" life=\"20\" score=\"30\" speed=\"1.6\">Zombie1</enemy><enemy x=\"850\" y=\"400\" type=\"0\" life=\"20\" score=\"30\" speed=\"1.6\">Zombie2</enemy><enemy x=\"1000\" y=\"400\" type=\"1\" life=\"30\" score=\"40\" speed=\"1.6\">Zombie1</enemy><enemy x=\"1150\" y=\"400\" type=\"1\" life=\"30\" score=\"40\" speed=\"1.6\">Zombie2</enemy><enemy x=\"1300\" y=\"400\" type=\"2\" life=\"40\" score=\"50\" speed=\"1.6\">Zombie1</enemy><enemy x=\"1450\" y=\"400\" type=\"2\" life=\"40\" score=\"50\" speed=\"1.6\">Zombie2</enemy><enemy x=\"1600\" y=\"400\" type=\"3\" life=\"50\" score=\"60\" speed=\"1.6\">Zombie1</enemy><enemy x=\"1750\" y=\"400\" type=\"3\" life=\"50\" score=\"60\" speed=\"1.6\">Zombie2</enemy><enemy x=\"1900\" y=\"400\" type=\"4\" life=\"160\" score=\"70\" speed=\"1.6\">Zombie1</enemy><enemy x=\"2050\" y=\"400\" type=\"4\" life=\"160\" score=\"70\" speed=\"1.6\">Zombie2</enemy><enemy x=\"2200\" y=\"400\" type=\"7\" life=\"220\" score=\"80\" speed=\"1.6\">Zombie1</enemy><enemy x=\"2350\" y=\"400\" type=\"7\" life=\"220\" score=\"80\" speed=\"1.6\">Zombie2</enemy><enemy x=\"2500\" y=\"400\" type=\"8\" life=\"260\" score=\"90\" speed=\"1.6\">Zombie1</enemy><enemy x=\"2650\" y=\"400\" type=\"8\" life=\"260\" score=\"90\" speed=\"1.6\">Zombie2</enemy><enemy x=\"2500\" y=\"400\" type=\"9\" life=\"1100\" score=\"300\" speed=\"1.2\">Zombie1</enemy></wave>"];
}
}//package common
Section 5
//URLRequestMetodo (common.URLRequestMetodo)
package common {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class URLRequestMetodo extends Sprite {
public var m_dataLoaded:XML;
public var m_isDataLoaded:Boolean;
public var m_callback:Function;
public function URLRequestMetodo(_arg1:String, _arg2:Function=null){
var _local3:URLLoader;
var _local4:URLRequest;
super();
m_callback = _arg2;
m_isDataLoaded = false;
_local3 = new URLLoader();
configureListeners(_local3);
_local4 = new URLRequest(_arg1);
_local4.method = URLRequestMethod.GET;
_local3.load(_local4);
}
private function httpStatusHandler(_arg1:HTTPStatusEvent):void{
if (Define.DEBUG_GENERAL){
trace(("httpStatusHandler: " + _arg1));
};
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
if (Define.DEBUG_GENERAL){
trace(("ioErrorHandler: " + _arg1));
};
}
private function progressHandler(_arg1:ProgressEvent):void{
if (Define.DEBUG_GENERAL){
trace(((("progressHandler loaded:" + _arg1.bytesLoaded) + " total: ") + _arg1.bytesTotal));
};
}
private function securityErrorHandler(_arg1:SecurityErrorEvent):void{
if (Define.DEBUG_GENERAL){
trace(("securityErrorHandler: " + _arg1));
};
}
private function openHandler(_arg1:Event):void{
if (Define.DEBUG_GENERAL){
trace(("openHandler: " + _arg1));
};
}
private function completeHandler(_arg1:Event):void{
var _local2:URLLoader;
_local2 = URLLoader(_arg1.target);
if (Define.DEBUG_GENERAL){
trace(("completeHandler: " + _local2.data));
};
m_dataLoaded = new XML(_local2.data);
m_isDataLoaded = true;
if (m_callback != null){
m_callback.call(this);
};
}
private function configureListeners(_arg1:IEventDispatcher):void{
_arg1.addEventListener(Event.COMPLETE, completeHandler);
_arg1.addEventListener(Event.OPEN, openHandler);
_arg1.addEventListener(ProgressEvent.PROGRESS, progressHandler);
_arg1.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
_arg1.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);
_arg1.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
}
}
}//package common
Section 6
//XMLManager (common.XMLManager)
package common {
import flash.events.*;
import flash.net.*;
public class XMLManager {
public var $xmlContent:XML;
public var $xmlListItems:XMLList;
public var $resourceUrl:URLRequest;
public var $callback:Function;
public var $urlLoader:URLLoader;
public function XMLManager(_arg1:String, _arg2:Function=null){
if (_arg2 != null){
$callback = _arg2;
$resourceUrl = new URLRequest(_arg1);
$initXMLManager();
} else {
XML.ignoreWhitespace = true;
$xmlContent = new XML(_arg1);
$xmlListItems = $xmlContent.*;
};
}
public function level3_getItem(_arg1:int, _arg2:int, _arg3:int, _arg4:int):XML{
return ($xmlListItems[_arg1].*[_arg2].*[_arg3].*[_arg4]);
}
public function level2_GetString(_arg1:int, _arg2:int):String{
return ($xmlListItems[_arg1].*[_arg2].*.toString());
}
public function level3_GetString(_arg1:int, _arg2:int, _arg3:int):String{
return ($xmlListItems[_arg1].*[_arg2].*[_arg3].*.toString());
}
public function level2_getProperty(_arg1:int, _arg2:int, _arg3:int, _arg4:int):String{
return ($xmlListItems[_arg1].*[_arg2].*[_arg3].attributes()[_arg4]);
}
public function level0_GetNumber():Number{
return ($xmlListItems.length());
}
public function level1_GetNumber(_arg1:int):Number{
return ($xmlListItems[_arg1].*.length());
}
public function getString():String{
return ($xmlContent.toString());
}
public function level2_getProperty_Name(_arg1:int, _arg2:int, _arg3:int, _arg4:int):String{
return ($xmlListItems[_arg1].*[_arg2].*[_arg3].attributes()[_arg4].name());
}
public function level0_GetString():String{
return ($xmlListItems.toString());
}
public function level1_GetString(_arg1:int):String{
return ($xmlListItems[_arg1].*.toString());
}
public function level0_getProperties_Length(_arg1:int):Number{
return ($xmlListItems[_arg1].attributes().length());
}
public function level1_GetItem(_arg1:int, _arg2:int):XML{
return ($xmlListItems[_arg1].*[_arg2]);
}
public function level0_getProperty_Name(_arg1:int, _arg2:int):String{
return ($xmlListItems[_arg1].attributes()[_arg2].name());
}
private function $onInvalidUrl(_arg1:IOErrorEvent):void{
trace(("XMLManager: Invalid URL=" + $resourceUrl.url));
}
public function level2_getProperties_Length(_arg1:int, _arg2:int, _arg3:int):Number{
return ($xmlListItems[_arg1].*[_arg2].*[_arg3].attributes().length());
}
private function $onLoadComplete(_arg1:Event):void{
XML.ignoreWhitespace = true;
$xmlContent = new XML($urlLoader.data);
$xmlListItems = $xmlContent.*;
$callback.call();
}
public function getHeaderProviderFormat_Properties_Level0():Array{
var _local1:Array;
var _local2:*;
_local1 = new Array();
if (level0_GetNumber() > 0){
_local2 = 0;
while (_local2 < level0_getProperties_Length(0)) {
_local1.push(level0_getProperty_Name(0, _local2));
_local2++;
};
};
return (_local1);
}
public function level2_GetNumber(_arg1:int, _arg2:int):Number{
return ($xmlListItems[_arg1].*[_arg2].*.length());
}
public function level3_GetNumber(_arg1:int, _arg2:int, _arg3:int):Number{
return ($xmlListItems[_arg1].*[_arg2].*[_arg3].*.length());
}
private function $initXMLManager():void{
$urlLoader = new URLLoader();
$urlLoader.addEventListener(Event.COMPLETE, $onLoadComplete);
$urlLoader.addEventListener(IOErrorEvent.IO_ERROR, $onInvalidUrl);
$urlLoader.load($resourceUrl);
}
public function level3_getProperties_Length(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Number{
return ($xmlListItems[_arg1].*[_arg2].*[_arg3].*[_arg4].attributes().length());
}
public function replaceTags(_arg1:String):String{
var _local2:String;
var _local3:Number;
var _local4:Number;
_local2 = new String(_arg1);
_local3 = _local2.length;
_local4 = -1;
while (_local2.indexOf("#") != -1) {
_local3 = _local4;
_local2 = _local2.replace("#", "<");
_local2 = _local2.replace("~", ">");
_local4 = _local2.length;
};
return (_local2);
}
public function level1_getProperties_Length(_arg1:int, _arg2:int):Number{
return ($xmlListItems[_arg1].*[_arg2].attributes().length());
}
public function level3_getProperty_Name(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):String{
return ($xmlListItems[_arg1].*[_arg2].*[_arg3].*[_arg4].attributes()[_arg5].name());
}
public function level1_getProperty_Name(_arg1:int, _arg2:int, _arg3:int):String{
return ($xmlListItems[_arg1].*[_arg2].attributes()[_arg3].name());
}
public function level0_getItem(_arg1:int):XML{
return ($xmlListItems[_arg1]);
}
public function level0_getProperty(_arg1:int, _arg2:int):String{
return ($xmlListItems[_arg1].attributes()[_arg2]);
}
public function level1_getProperty(_arg1:int, _arg2:int, _arg3:int):String{
return ($xmlListItems[_arg1].*[_arg2].attributes()[_arg3]);
}
public function level3_getProperty(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):String{
return ($xmlListItems[_arg1].*[_arg2].*[_arg3].*[_arg4].attributes()[_arg5]);
}
public function level2_getItem(_arg1:int, _arg2:int, _arg3:int):XML{
return ($xmlListItems[_arg1].*[_arg2].*[_arg3]);
}
}
}//package common
Section 7
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.system.*;
public class AdLoader extends Sprite {
private var contentspotid:String;
private var cpmstarLoader:Loader;
public function AdLoader(_arg1:String){
this.contentspotid = _arg1;
addEventListener(Event.ADDED, addedHandler);
}
private function addedHandler(_arg1:Event):void{
var _local2:String;
var _local3:DisplayObjectContainer;
removeEventListener(Event.ADDED, addedHandler);
Security.allowDomain("server.cpmstar.com");
_local2 = "http://server.cpmstar.com/adviewas3.swf";
_local3 = parent;
cpmstarLoader = new Loader();
cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler);
cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchHandler);
cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + contentspotid)));
addChild(cpmstarLoader);
}
private function dispatchHandler(_arg1:Event):void{
dispatchEvent(_arg1);
}
}
}//package CPMStar
Section 8
//cBall (engine.cBall)
package engine {
import flash.display.*;
import flash.geom.*;
import sounds.*;
import common.*;
public class cBall extends MovieClip {
public var m_iterator:Number;
public var m_delay:Number;
public var m_posLast:Point;
public var m_state:Number;
public var m_timeAcum:Number;
public var m_lastState:Number;
public var m_world:cWorld;
public var m_pos:Point;
public var m_isImpacted:Boolean;
public var m_type:Number;
public var m_vel:Point;
public var m_velocityBounce:Number;
public static const TYPE_NUCLEAR:Number = 5;
public static const STATE_COLLISION:Number = 1;
public static const SUBNAME_FIRE:String = "fire";
public static const TYPE_NORMAL:Number = 0;
public static const SUBNAME_DRILLER:String = "driller";
public static const STATE_NULL:Number = -1;
public static const SUBNAME_ICE:String = "ice";
public static const TYPE_FIRE:Number = 3;
public static const STATE_RUN:Number = 0;
public static const NAME_COLLISION:String = "collision_";
public static const SUBNAME_EXPLOSION:String = "explosion";
public static const TYPE_DRILLER:Number = 1;
public static const TYPE_ICE:Number = 2;
public static const TYPE_EXPLOSION:Number = 4;
public static const SUBNAME_NUCLEAR:String = "nuclear";
public static const STATE_DISAPPEAR:Number = 2;
public static const NAME_RUN:String = "run_";
public static const SUBNAME_NORMAL:String = "normal";
public function cBall(_arg1:cWorld){
addFrameScript(0, frame1, 10, frame11, 20, frame21, 30, frame31, 42, frame43, 53, frame54, 66, frame67, 77, frame78, 89, frame90, 103, frame104);
m_world = _arg1;
m_pos = new Point(0, 0);
m_posLast = new Point(0, 0);
m_vel = new Point(0, 0);
m_delay = 0;
m_velocityBounce = 0;
m_isImpacted = false;
changeState(STATE_NULL);
}
function frame78(){
stop();
}
public function init(_arg1:Point, _arg2:Point, _arg3:Number, _arg4:Boolean=false):void{
this.alpha = 1;
m_isImpacted = false;
m_pos.x = _arg1.x;
m_pos.y = _arg1.y;
m_vel.x = _arg2.x;
m_vel.y = _arg2.y;
m_velocityBounce = _arg2.y;
m_type = _arg3;
if (_arg4){
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_NORMALHIT, 1);
switch (_arg3){
case TYPE_NORMAL:
break;
case TYPE_DRILLER:
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_DRILLER, 1);
break;
case TYPE_ICE:
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_ICE, 1);
break;
case TYPE_FIRE:
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_FIRE, 1);
break;
case TYPE_EXPLOSION:
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_EXPLOSION, 1);
break;
case TYPE_NUCLEAR:
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_NUCLEAR, 1);
break;
};
};
changeState(STATE_RUN);
}
function frame90(){
stop();
}
function frame1(){
stop();
}
public function logic():void{
if (m_iterator < 100){
m_iterator++;
};
switch (m_state){
case STATE_RUN:
if (m_iterator == 1){
gotoAndStop((NAME_RUN + getNameType(m_type)));
};
this.rotation = (this.rotation + 2);
m_pos = moveBall();
break;
case STATE_COLLISION:
if (m_iterator == 1){
this.rotation = 0;
switch (m_type){
case TYPE_NORMAL:
m_isImpacted = true;
changeState(STATE_RUN);
return;
case TYPE_DRILLER:
changeState(STATE_RUN);
return;
case TYPE_EXPLOSION:
gotoAndStop((NAME_COLLISION + getNameType(m_type)));
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_FX_EXPLOSION, 1);
break;
case TYPE_NUCLEAR:
gotoAndStop((NAME_COLLISION + getNameType(m_type)));
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_FX_NUCLEAR, 1);
break;
default:
gotoAndStop((NAME_COLLISION + getNameType(m_type)));
break;
};
};
m_timeAcum = (m_timeAcum + m_world.m_gameTimer.m_difTime);
if (m_timeAcum > 2000){
changeState(STATE_DISAPPEAR);
};
break;
case STATE_DISAPPEAR:
changeState(STATE_NULL);
break;
case STATE_NULL:
if (m_iterator == 1){
gotoAndStop("empty");
};
break;
};
if (m_state != STATE_NULL){
this.x = m_pos.x;
this.y = m_pos.y;
};
if (m_isImpacted){
this.alpha = (this.alpha - 0.03);
if (this.alpha < 0.1){
this.alpha = 0;
};
};
}
public function moveBall():Point{
var _local1:Point;
var _local2:Number;
var _local3:Number;
var _local4:int;
m_vel.y = (m_vel.y * Define.AIR_RESISTANCE);
m_vel.y = (m_vel.y + Define.GRAVITY);
if ((((Math.abs(m_vel.y) <= 1)) && (((m_pos.y + 1) > cWorld.DISTANCE_FLOOR)))){
changeState(STATE_DISAPPEAR);
};
_local1 = new Point(m_pos.x, m_pos.y);
_local2 = (m_vel.x / Define.PRECISION_STEPS);
_local3 = (m_vel.y / Define.PRECISION_STEPS);
_local4 = 0;
while (_local4 < Define.PRECISION_STEPS) {
_local1.x = (_local1.x + _local2);
_local1.y = (_local1.y + _local3);
if (_local1.x > Define.SCREEN_WIDTH){
changeState(STATE_NULL);
return (_local1);
};
if (_local1.y > cWorld.DISTANCE_FLOOR){
m_vel.y = -(m_vel.y);
return (m_pos);
};
if (m_vel.x > 0){
if (m_world.collisionZombies(_local1, this)){
if (m_type != TYPE_DRILLER){
m_vel.x = -(m_vel.x);
};
changeState(STATE_COLLISION);
return (_local1);
};
};
_local4++;
};
m_posLast = m_pos;
return (_local1);
}
function frame21(){
stop();
}
function frame104(){
stop();
}
function frame11(){
stop();
}
function frame43(){
stop();
}
function frame31(){
stop();
}
public function changeState(_arg1:Number):void{
m_lastState = m_state;
m_state = _arg1;
m_iterator = 0;
m_timeAcum = 0;
}
function frame54(){
stop();
}
function frame67(){
stop();
}
public static function getNameType(_arg1:Number):String{
switch (_arg1){
case TYPE_NORMAL:
return (SUBNAME_NORMAL);
case TYPE_DRILLER:
return (SUBNAME_DRILLER);
case TYPE_ICE:
return (SUBNAME_ICE);
case TYPE_FIRE:
return (SUBNAME_FIRE);
case TYPE_EXPLOSION:
return (SUBNAME_EXPLOSION);
case TYPE_NUCLEAR:
return (SUBNAME_NUCLEAR);
};
return (SUBNAME_NORMAL);
}
}
}//package engine
Section 9
//cGameTitleDistance (engine.cGameTitleDistance)
package engine {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import sounds.*;
public class cGameTitleDistance extends MovieClip {
public var m_state:int;
public var m_world:cWorld;
public var txtDistance:TextField;
public var m_txtDistance:TextField;
public var m_posGoal:Point;
public static const STATE_STOP:Number = 1;
public static const SPEED_FALL:Number = 40;
public static const STATE_RUN:Number = 0;
public function cGameTitleDistance(_arg1:cWorld, _arg2:Number, _arg3:Number, _arg4:Number){
addFrameScript(0, frame1);
m_world = _arg1;
m_txtDistance = TextField(getChildByName("txtDistance"));
m_txtDistance.text = (("" + Math.floor((_arg2 / cScreenFinishWave.DIVISOR_CALCULATOR_DISTANCE))) + " m");
m_posGoal = new Point(_arg2, _arg3);
this.x = _arg2;
this.y = (-(_arg4) * (4 * SPEED_FALL));
m_state = STATE_RUN;
}
function frame1(){
stop();
}
public function logic():Boolean{
switch (m_state){
case STATE_RUN:
this.y = (this.y + SPEED_FALL);
if (this.y > m_posGoal.y){
this.y = m_posGoal.y;
m_state = STATE_STOP;
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_CARTEL_FALL, 0);
};
return (false);
case STATE_STOP:
return (true);
};
return (false);
}
}
}//package engine
Section 10
//cHead (engine.cHead)
package engine {
import flash.display.*;
import flash.geom.*;
import common.*;
public class cHead extends MovieClip {
public var m_iterator:Number;
public var m_posLast:Point;
public var m_state:Number;
public var m_timeAcum:Number;
public var m_world:cWorld;
public var m_pos:Point;
public var m_type:Number;
public var m_vel:Point;
public static const STATE_COLLISION:Number = 1;
public static const STATE_DISAPPEAR:Number = 2;
public static const STATE_QUIET:Number = 3;
public static const STATE_NULL:Number = -1;
public static const STATE_RUN:Number = 0;
public function cHead(_arg1:cWorld){
m_world = _arg1;
m_pos = new Point(0, 0);
m_posLast = new Point(0, 0);
m_vel = new Point(0, 0);
changeState(STATE_NULL);
gotoAndStop("empty");
}
public function init(_arg1:Point, _arg2:Point, _arg3:Number):void{
this.rotation = 0;
m_pos.x = _arg1.x;
m_pos.y = _arg1.y;
m_vel.x = _arg2.x;
m_vel.y = _arg2.y;
m_type = _arg3;
changeState(STATE_RUN);
}
public function logic():void{
if (m_iterator < 100){
m_iterator++;
};
switch (m_state){
case STATE_RUN:
if (m_iterator == 1){
gotoAndStop(("head_" + (m_type + 1)));
};
m_pos = moveBall();
this.rotation = (this.rotation + 2);
if (((((Math.abs(m_vel.y) + Math.abs(m_vel.x)) <= 2)) && (((m_pos.y + 1) > cWorld.DISTANCE_FLOOR)))){
changeState(STATE_QUIET);
};
break;
case STATE_QUIET:
break;
case STATE_NULL:
if (m_iterator == 1){
gotoAndStop("empty");
};
break;
};
if (m_state != STATE_NULL){
this.x = m_pos.x;
this.y = m_pos.y;
};
}
public function moveBall():Point{
var _local1:Point;
var _local2:Number;
var _local3:Number;
var _local4:int;
m_vel.x = (m_vel.x * Define.AIR_RESISTANCE_HEAD);
m_vel.y = (m_vel.y * Define.AIR_RESISTANCE);
m_vel.y = (m_vel.y + Define.GRAVITY);
_local1 = new Point(m_pos.x, m_pos.y);
_local2 = (m_vel.x / Define.PRECISION_STEPS);
_local3 = (m_vel.y / Define.PRECISION_STEPS);
_local4 = 0;
while (_local4 < Define.PRECISION_STEPS) {
_local1.x = (_local1.x + _local2);
_local1.y = (_local1.y + _local3);
if (_local1.y > cWorld.DISTANCE_FLOOR){
m_vel.y = -(m_vel.y);
return (m_pos);
};
_local4++;
};
m_posLast = m_pos;
return (_local1);
}
public function changeState(_arg1:Number):void{
m_state = _arg1;
m_iterator = 0;
m_timeAcum = 0;
}
}
}//package engine
Section 11
//cHitAngle (engine.cHitAngle)
package engine {
import flash.display.*;
import flash.geom.*;
import common.*;
public class cHitAngle extends MovieClip {
public var m_world:cWorld;
public var m_lines:Array;
public static const LIMIT_INFERIOR:Number = 327;
public static const LIMIT_SUPERIOR:Number = 30;
public static const WITDH:Number = 35;
public static const HEIGHT:Number = 83;
public function cHitAngle(_arg1:cWorld=null){
var _local2:*;
var _local3:gameLineAngle;
super();
m_world = _arg1;
if (_arg1 != null){
m_lines = new Array();
_local2 = 0;
while (_local2 < cWorld.TOTAL_NUMBER_BALLS) {
_local3 = new gameLineAngle();
_local3.visible = false;
addChild(_local3);
m_lines.push(_local3);
_local2++;
};
};
}
public function updateLine(_arg1:int, _arg2:cBall, _arg3:Number, _arg4:Number):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
if (_arg2.m_state == cBall.STATE_NULL){
gameLineAngle(m_lines[_arg1]).visible = false;
} else {
if ((((_arg2.m_vel.x == 0)) && ((_arg2.m_pos.x == cWorld.ORIGIN_X_TRHOW)))){
_local5 = (_arg2.m_pos.y - LIMIT_INFERIOR);
if ((((_local5 > 0)) && ((_local5 < LIMIT_SUPERIOR)))){
gameLineAngle(m_lines[_arg1]).visible = true;
gameLineAngle(m_lines[_arg1]).y = ((_local5 * HEIGHT) / LIMIT_SUPERIOR);
if (((!((_arg3 == -1))) && (!((_arg4 == -1))))){
_local6 = Define.getRadians((((_local5 * 180) / LIMIT_SUPERIOR) - 90));
_local7 = (_arg3 * Math.cos(_local6));
_local8 = (_arg3 * Math.sin(_local6));
_arg2.init(_arg2.m_pos, new Point(_local7, _local8), _arg4, true);
};
} else {
gameLineAngle(m_lines[_arg1]).visible = false;
};
} else {
gameLineAngle(m_lines[_arg1]).visible = false;
};
};
}
}
}//package engine
Section 12
//cScreenEndGame (engine.cScreenEndGame)
package engine {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import common.*;
import flash.net.*;
public class cScreenEndGame extends MovieClip {
public var instTextDay:TextField;
public var m_urlHighscore:URLRequestMetodo;
public var m_instTextBalls:TextField;
public var btnScreenSubmit:MovieClip;
public var m_instTextDay:TextField;
public var m_instTextName:TextField;
public var m_btnScreenSubmit:MovieClip;
public var btnScreenNext:MovieClip;
public var instTextBalls:TextField;
public var m_instTextDistanceHeads:TextField;
public var m_instTextScore:TextField;
public var m_btnScreenNext:MovieClip;
public var m_world:cWorld;
public var instTextName:TextField;
public var m_instTextHeads:TextField;
public var instTextScore:TextField;
public var instTextHeads:TextField;
public var instTextDistanceHeads:TextField;
public function cScreenEndGame(_arg1:cWorld){
m_world = _arg1;
m_instTextName = TextField(getChildByName("instTextName"));
m_instTextDay = TextField(getChildByName("instTextDay"));
m_instTextScore = TextField(getChildByName("instTextScore"));
m_instTextHeads = TextField(getChildByName("instTextHeads"));
m_instTextBalls = TextField(getChildByName("instTextBalls"));
m_instTextDistanceHeads = TextField(getChildByName("instTextDistanceHeads"));
m_instTextDay.text = ("" + m_world.m_level);
m_instTextScore.text = ("" + m_world.m_zombieBall.m_score);
m_instTextHeads.text = ("" + m_world.m_zombieBall.m_headsCut);
m_instTextBalls.text = ("" + m_world.m_zombieBall.m_maxComboHeads);
m_instTextDistanceHeads.text = ("" + m_world.m_zombieBall.m_maximumDistanceHead);
m_btnScreenNext = MovieClip(getChildByName("btnScreenNext"));
m_btnScreenNext.addEventListener(MouseEvent.CLICK, $onMouseClick);
m_btnScreenNext.buttonMode = true;
m_btnScreenSubmit = MovieClip(getChildByName("btnScreenSubmit"));
m_btnScreenSubmit.addEventListener(MouseEvent.CLICK, $onMouseClick);
m_btnScreenSubmit.buttonMode = true;
}
public function $onMouseClick(_arg1:MouseEvent):void{
if (_arg1.currentTarget == m_btnScreenNext){
m_world.m_zombieBall.changeState(ZombieBall.STATE_MENU_CREDITS);
};
if (_arg1.currentTarget == m_btnScreenSubmit){
submitHighscore();
m_btnScreenSubmit.visible = false;
};
}
public function displayHighscoreTable():void{
navigateToURL(new URLRequest(Define.URL_DISPLAY_HIGHSCORE_ZOMBIEBALL), "_blank");
}
public function submitHighscore():void{
var _local1:String;
_local1 = (("type_zombie=" + Define.getChecksumTimestamp()) + "&");
_local1 = (_local1 + (("name=" + m_instTextName.text) + "&"));
_local1 = (_local1 + (("level=" + m_instTextDay.text) + "&"));
_local1 = (_local1 + (("score=" + m_instTextScore.text) + "&"));
_local1 = (_local1 + (("heads=" + m_instTextHeads.text) + "&"));
_local1 = (_local1 + (("balls=" + m_instTextBalls.text) + "&"));
_local1 = (_local1 + ("distance=" + m_instTextDistanceHeads.text));
m_urlHighscore = new URLRequestMetodo((Define.URL_HIGHSCORE_ZOMBIEBALL + _local1), displayHighscoreTable);
}
}
}//package engine
Section 13
//cScreenFinishWave (engine.cScreenFinishWave)
package engine {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.text.*;
import sounds.*;
import common.*;
public class cScreenFinishWave extends MovieClip {
public var m_iterator:Number;
public var m_listCarteles:Array;
public var m_levelMaximumDistanceHead:Number;
public var m_state:Number;
public var m_timeAcum:Number;
public var m_lastState:Number;
public var m_world:cWorld;
public var btnScreenNext:MovieClip;
public var m_farestHead:cHead;
public var m_btnScreenNext:MovieClip;
public var txtDistanceMaximum:TextField;
public var m_goalShift:Number;
public var m_txtDistanceMaximum:TextField;
public static const DIVISOR_CALCULATOR_DISTANCE:Number = 10;
public static const STATE_HEAD_STOP:Number = 2;
public static const STATE_CONGRATULATIONS:Number = 0;
public static const STATE_HEAD_SCROLL:Number = 1;
public function cScreenFinishWave(_arg1:cWorld){
addFrameScript(0, frame1, 19, frame20);
m_world = _arg1;
m_goalShift = 0;
m_btnScreenNext = MovieClip(getChildByName("btnScreenNext"));
m_btnScreenNext.addEventListener(MouseEvent.CLICK, $onMouseClick);
m_btnScreenNext.buttonMode = true;
changeState(STATE_CONGRATULATIONS);
}
function frame1(){
stop();
}
public function logic():void{
var _local1:int;
var _local2:Number;
var _local3:Boolean;
var _local4:cGameTitleDistance;
_local1 = 0;
if (m_iterator < 100){
m_iterator++;
};
switch (m_state){
case STATE_CONGRATULATIONS:
switch (m_iterator){
case 1:
break;
};
break;
case STATE_HEAD_SCROLL:
switch (m_iterator){
case 1:
if (m_txtDistanceMaximum == null){
m_txtDistanceMaximum = TextField(getChildByName("txtDistanceMaximum"));
};
m_iterator = 0;
m_farestHead = m_world.getFarestHead();
m_goalShift = (m_goalShift + ((m_farestHead.x - m_goalShift) / 10));
_local2 = (-(m_goalShift) + (Define.SCREEN_WIDTH / 2));
if (_local2 < 0){
m_world.m_clip.x = _local2;
};
if (Math.abs((m_farestHead.x - m_goalShift)) < 1){
if (!m_world.isAnyHeadRunning()){
m_iterator = 1;
};
};
break;
case 2:
addCartelesDistance();
break;
case 3:
m_iterator = 2;
_local3 = true;
if (m_listCarteles != null){
_local1 = 0;
while (_local1 < m_listCarteles.length) {
_local4 = cGameTitleDistance(m_listCarteles[_local1]);
if (!_local4.logic()){
_local3 = false;
};
_local1++;
};
};
if (_local3){
m_iterator = 3;
};
break;
default:
m_levelMaximumDistanceHead = Math.floor((m_farestHead.x / DIVISOR_CALCULATOR_DISTANCE));
if (m_levelMaximumDistanceHead > m_world.m_zombieBall.m_maximumDistanceHead){
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_ALLELUYA, 0);
m_world.m_zombieBall.m_maximumDistanceHead = m_levelMaximumDistanceHead;
m_txtDistanceMaximum.text = (("NEW MAXIMUM DISTANCE " + m_levelMaximumDistanceHead) + " m");
};
changeState(STATE_HEAD_STOP);
m_btnScreenNext.visible = true;
break;
};
break;
case STATE_HEAD_STOP:
switch (m_iterator){
case 1:
break;
};
break;
};
}
function frame20(){
stop();
}
public function addCartelesDistance():void{
var _local1:cHead;
var _local2:Number;
var _local3:Array;
var _local4:int;
var _local5:*;
var _local6:Point;
var _local7:cGameTitleDistance;
_local2 = 100000000;
_local3 = new Array();
do {
_local1 = m_world.getFarestHead(_local2);
if (_local1 != null){
_local2 = _local1.x;
_local3.push(new Point(_local2, _local1.y));
};
} while (_local1 != null);
m_listCarteles = new Array();
_local4 = 0;
_local5 = (_local3.length - 1);
while (_local5 >= 0) {
_local6 = Point(_local3[_local5]);
_local7 = new cGameTitleDistance(m_world, _local6.x, _local6.y, _local4);
m_world.m_gameBackground.addChild(_local7);
m_listCarteles.push(_local7);
_local4++;
_local5--;
};
}
public function $onMouseClick(_arg1:MouseEvent):void{
if (_arg1.currentTarget == m_btnScreenNext){
switch (m_state){
case STATE_CONGRATULATIONS:
m_farestHead = m_world.getFarestHead();
if (m_farestHead == null){
if (m_world.m_level < Define.TOTAL_NUMBER_LEVELS){
m_world.m_zombieBall.changeState(ZombieBall.STATE_GAME_SHOP);
} else {
m_world.changeState(cWorld.STATE_GAME_COMPLETED);
};
} else {
changeState(STATE_HEAD_SCROLL);
gotoAndStop("heads");
m_btnScreenNext.visible = false;
};
break;
case STATE_HEAD_SCROLL:
break;
case STATE_HEAD_STOP:
if (m_world.m_level < Define.TOTAL_NUMBER_LEVELS){
m_world.m_zombieBall.changeState(ZombieBall.STATE_GAME_SHOP);
} else {
m_world.changeState(cWorld.STATE_GAME_COMPLETED);
};
break;
};
};
}
public function changeState(_arg1:Number):void{
m_lastState = m_state;
m_state = _arg1;
m_iterator = 0;
m_timeAcum = 0;
}
}
}//package engine
Section 14
//cScreenGameOver (engine.cScreenGameOver)
package engine {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import common.*;
import flash.net.*;
public class cScreenGameOver extends MovieClip {
public var instTextDay:TextField;
public var m_urlHighscore:URLRequestMetodo;
public var btnScreenExit:MovieClip;
public var m_instTextBalls:TextField;
public var btnScreenSubmit:MovieClip;
public var m_instTextDay:TextField;
public var m_instTextName:TextField;
public var m_btnScreenSubmit:MovieClip;
public var instTextBalls:TextField;
public var m_instTextDistanceHeads:TextField;
public var m_instTextScore:TextField;
public var m_world:cWorld;
public var instTextName:TextField;
public var m_instTextHeads:TextField;
public var instTextScore:TextField;
public var instTextHeads:TextField;
public var instTextDistanceHeads:TextField;
public var m_btnScreenExit:MovieClip;
public function cScreenGameOver(_arg1:cWorld){
m_world = _arg1;
m_instTextName = TextField(getChildByName("instTextName"));
m_instTextDay = TextField(getChildByName("instTextDay"));
m_instTextScore = TextField(getChildByName("instTextScore"));
m_instTextHeads = TextField(getChildByName("instTextHeads"));
m_instTextBalls = TextField(getChildByName("instTextBalls"));
m_instTextDistanceHeads = TextField(getChildByName("instTextDistanceHeads"));
m_instTextDay.text = ("" + m_world.m_level);
m_instTextScore.text = ("" + m_world.m_zombieBall.m_score);
m_instTextHeads.text = ("" + m_world.m_zombieBall.m_headsCut);
m_instTextBalls.text = ("" + m_world.m_zombieBall.m_maxComboHeads);
m_instTextDistanceHeads.text = ("" + m_world.m_zombieBall.m_maximumDistanceHead);
m_btnScreenExit = MovieClip(getChildByName("btnScreenExit"));
m_btnScreenExit.addEventListener(MouseEvent.CLICK, $onMouseClick);
m_btnScreenExit.buttonMode = true;
m_btnScreenSubmit = MovieClip(getChildByName("btnScreenSubmit"));
m_btnScreenSubmit.addEventListener(MouseEvent.CLICK, $onMouseClick);
m_btnScreenSubmit.buttonMode = true;
}
public function $onMouseClick(_arg1:MouseEvent):void{
if (_arg1.currentTarget == m_btnScreenExit){
m_world.m_zombieBall.changeState(ZombieBall.STATE_MENU_MAIN);
};
if (_arg1.currentTarget == m_btnScreenSubmit){
submitHighscore();
m_btnScreenSubmit.visible = false;
};
}
public function displayHighscoreTable():void{
navigateToURL(new URLRequest(Define.URL_DISPLAY_HIGHSCORE_ZOMBIEBALL), "_blank");
}
public function submitHighscore():void{
var _local1:String;
_local1 = (("type_zombie=" + Define.getChecksumTimestamp()) + "&");
_local1 = (_local1 + (("name=" + m_instTextName.text) + "&"));
_local1 = (_local1 + (("level=" + m_instTextDay.text) + "&"));
_local1 = (_local1 + (("score=" + m_instTextScore.text) + "&"));
_local1 = (_local1 + (("heads=" + m_instTextHeads.text) + "&"));
_local1 = (_local1 + (("balls=" + m_instTextBalls.text) + "&"));
_local1 = (_local1 + ("distance=" + m_instTextDistanceHeads.text));
m_urlHighscore = new URLRequestMetodo((Define.URL_HIGHSCORE_ZOMBIEBALL + _local1), displayHighscoreTable);
}
}
}//package engine
Section 15
//cScreenIntroduction (engine.cScreenIntroduction)
package engine {
import flash.display.*;
import flash.events.*;
public class cScreenIntroduction extends MovieClip {
public var m_gamePlayerA:MovieClip;
public var m_world:cWorld;
public var m_gamePlayerS:MovieClip;
public var btnPlay:SimpleButton;
public var m_btnPlay:SimpleButton;
public function cScreenIntroduction(_arg1:cWorld){
addFrameScript(0, frame1);
m_world = _arg1;
m_btnPlay = SimpleButton(getChildByName("btnPlay"));
m_btnPlay.addEventListener(MouseEvent.CLICK, $onMouseClick);
m_btnPlay.addEventListener(MouseEvent.MOUSE_DOWN, $onMouseClick);
addChild(new cTutorial(m_world.m_zombieBall));
}
function frame1(){
stop();
}
public function $onMouseClick(_arg1:MouseEvent):void{
m_world.m_askToAdvanceIntroduction = true;
}
}
}//package engine
Section 16
//cScreenPause (engine.cScreenPause)
package engine {
import flash.display.*;
import flash.events.*;
public class cScreenPause extends MovieClip {
public var btnScreenExit:MovieClip;
public var m_btnScreenContinue:MovieClip;
public var btnScreenContinue:MovieClip;
public var m_world:cWorld;
public var m_btnScreenExit:MovieClip;
public function cScreenPause(_arg1:cWorld){
m_world = _arg1;
m_btnScreenExit = MovieClip(getChildByName("btnScreenExit"));
m_btnScreenExit.addEventListener(MouseEvent.CLICK, $onMouseClick);
m_btnScreenExit.buttonMode = true;
m_btnScreenContinue = MovieClip(getChildByName("btnScreenContinue"));
m_btnScreenContinue.addEventListener(MouseEvent.CLICK, $onMouseClick);
m_btnScreenContinue.buttonMode = true;
}
public function $onMouseClick(_arg1:MouseEvent):void{
if (_arg1.currentTarget == m_btnScreenExit){
m_world.m_zombieBall.changeState(ZombieBall.STATE_MENU_MAIN);
};
if (_arg1.currentTarget == m_btnScreenContinue){
m_world.m_iterator = 97;
};
}
}
}//package engine
Section 17
//cScreenPresentation (engine.cScreenPresentation)
package engine {
import flash.display.*;
import flash.text.*;
import common.*;
public class cScreenPresentation extends MovieClip {
public var m_world:cWorld;
public var instText:TextField;
public function cScreenPresentation(_arg1:cWorld, _arg2:Number){
m_world = _arg1;
if ((((_arg2 == 0)) || (!((Math.floor((_arg2 % Define.POSITION_BOSS_LEVELS)) == 0))))){
instText.text = ("DAY " + _arg2);
} else {
instText.text = ("BOSS: DAY " + _arg2);
};
}
}
}//package engine
Section 18
//cSignalLife (engine.cSignalLife)
package engine {
import flash.display.*;
public class cSignalLife extends MovieClip {
public var mcSubRedLife:MovieClip;
public static const WITDH:Number = 25;
public function cSignalLife(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
public function updateLife(_arg1:int, _arg2:Number):void{
if (_arg1 <= 0){
mcSubRedLife.width = 0;
} else {
mcSubRedLife.width = ((_arg1 * WITDH) / _arg2);
};
}
}
}//package engine
Section 19
//cSignalScore (engine.cSignalScore)
package engine {
import flash.display.*;
import flash.text.*;
public class cSignalScore extends MovieClip {
public var m_posY:Number;
public var m_posInitialY:Number;
public var m_goalY:Number;
public var instText:TextField;
public function cSignalScore(){
addFrameScript(0, frame1, 9, frame10);
}
public function init(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number){
gotoAndStop(_arg1);
instText.text = ("+" + _arg2);
m_goalY = _arg4;
m_posY = 0;
m_posInitialY = _arg3;
}
function frame10(){
stop();
}
function frame1(){
stop();
}
public function logic(){
if (Math.abs((m_posY - m_goalY)) < 1){
this.visible = false;
} else {
m_posY = (m_posY + ((m_goalY - m_posY) / 7));
this.y = (m_posInitialY - m_posY);
};
}
}
}//package engine
Section 20
//cTutorial (engine.cTutorial)
package engine {
import flash.display.*;
import flash.events.*;
import sounds.*;
public class cTutorial extends MovieClip {
public var m_btn_Skip:SimpleButton;
public var m_zombieBall:ZombieBall;
public var btnSkip:SimpleButton;
public var tutorialLevel:MovieClip;
public function cTutorial(_arg1:ZombieBall=null){
addFrameScript(1, frame2, 2, frame3, 18, frame19, 29, frame30, 49, frame50, 59, frame60, 69, frame70, 89, frame90, 101, frame102, 114, frame115);
m_zombieBall = _arg1;
m_zombieBall.playGameSound(SoundsGame.SOUNDS_MELODY_MENU, 0);
m_btn_Skip = SimpleButton(getChildByName("btnSkip"));
m_btn_Skip.addEventListener(MouseEvent.CLICK, onMouseClick);
}
function frame70(){
stop();
}
public function onMouseClick(_arg1:MouseEvent):void{
if (_arg1.currentTarget == m_btn_Skip){
this.stop();
this.visible = false;
};
}
function frame90(){
MovieClip(getChildByName("tutorialLevel")).gotoAndPlay("ball_animation_2");
stop();
}
function frame3(){
MovieClip(MovieClip(MovieClip(getChildByName("tutorialLevel")).getChildByName("gameLevel")).getChildByName("instGamePlayer")).gotoAndStop("taunt");
}
function frame19(){
stop();
}
function frame102(){
MovieClip(MovieClip(MovieClip(getChildByName("tutorialLevel")).getChildByName("gameLevel")).getChildByName("instGamePlayer")).gotoAndStop("standby");
stop();
}
function frame2(){
m_zombieBall.playGameSound(SoundsGame.SOUNDS_PRESENTATION, 0);
MovieClip(MovieClip(MovieClip(getChildByName("tutorialLevel")).getChildByName("gameLevel")).getChildByName("instGamePlayer")).gotoAndStop("taunt");
MovieClip(MovieClip(MovieClip(getChildByName("tutorialLevel")).getChildByName("gameLevel")).getChildByName("gameBackground")).gotoAndStop(1);
}
function frame30(){
stop();
}
function frame115(){
this.visible = false;
stop();
}
function frame50(){
stop();
}
function frame60(){
MovieClip(MovieClip(MovieClip(getChildByName("tutorialLevel")).getChildByName("gameLevel")).getChildByName("instGamePlayer")).gotoAndStop("standby");
MovieClip(getChildByName("tutorialLevel")).gotoAndPlay("ball_animation");
stop();
}
}
}//package engine
Section 21
//cWorld (engine.cWorld)
package engine {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import fl.managers.*;
import flash.text.*;
import sounds.*;
import common.*;
public class cWorld extends MovieClip {
public var m_iterator:Number;
public var m_xmlZombies:XMLManager;
public var m_balls:Array;
public var m_zombiesHeads:Array;
public var m_typeHit:Number;
public var m_state:Number;
public var m_screenPause:cScreenPause;
public var m_timeAcum:Number;
public var m_lastState:Number;
public var m_zombieBall:ZombieBall;
public var m_screenGameOver:cScreenGameOver;
public var m_gamePlayer:MovieClip;
public var m_recoveryTime:Number;
public var m_btnPause:SimpleButton;
public var m_hitAngle:cHitAngle;
public var m_introduction:cScreenIntroduction;
public var m_screenPresentation:cScreenPresentation;
public var m_strengthHit:Number;
public var m_gameBackground:MovieClip;
public var m_gameThrower:MovieClip;
public var m_timerToNewBallInitial:Number;
public var m_screenEndGame:cScreenEndGame;
public var m_timerToNewBall:Number;
public var m_gameTimer:gameTimer;
public var m_level:Number;
public var m_delayComboInfo:Number;
public var m_zombies:Array;
public var m_timeAnimationThrower:Number;
public var m_screenFinishWave:cScreenFinishWave;
public var m_txtHeadCombo:TextField;
public var m_typeKeyHit:int;
public var m_btnSound:MovieClip;
public var m_timeGameSecond:Number;
public var m_askToAdvanceIntroduction:Boolean;
public var m_clip:MovieClip;
public var m_timeGame:Number;
public var m_mcBarMeter:MovieClip;
public static const TOTAL_NUMBER_BALLS:Number = 10;
public static const STATE_GAME_OVER:Number = 5;
public static const STATE_PAUSE:Number = 6;
public static const POSITION_PLAYER_X:Number = 50;
public static const TOTAL_DAY_FRAMES:Number = 200;
public static const DIVISOR_FREQUENCE_THROWER:Number = 14;
public static const STATE_FINISH_WAVE:Number = 4;
public static const KEY_HITTED_A:Number = 0;
public static const STATE_RUN_WAVE:Number = 3;
public static const TOTAL_DAY_TIME:Number = 120000;
public static const STATE_GAME_COMPLETED:Number = 7;
public static const STATE_INTRODUCTION:Number = 1;
public static const STATE_PRESENTATION_WAVE:Number = 2;
public static const DISTANCE_FLOOR:Number = 391.1;
public static const ORIGIN_X_TRHOW:Number = 60;
public static const ORIGIN_Y_TRHOW:Number = 150;
public static const KEY_HITTED_PAUSE:Number = 2;
public static const STATE_INIT_WAVE:Number = 0;
public static const KEY_HITTED_S:Number = 1;
public function cWorld(_arg1:ZombieBall, _arg2:Number, _arg3:Number){
var _local4:Number;
var _local5:cBall;
super();
_local4 = 0;
m_zombieBall = _arg1;
m_timerToNewBallInitial = (_arg2 - ((_arg2 * m_zombieBall.m_playerFrequence) / DIVISOR_FREQUENCE_THROWER));
if (m_timerToNewBallInitial < 1000){
m_timerToNewBallInitial = 1000;
};
m_timerToNewBall = 1000;
m_level = _arg3;
m_clip = new cGameLevel();
m_txtHeadCombo = TextField(m_clip.getChildByName("txtHeadCombo"));
m_mcBarMeter = MovieClip(m_clip.getChildByName("mcBarMeter"));
m_gameThrower = MovieClip(m_clip.getChildByName("gameThrower"));
m_gamePlayer = MovieClip(m_clip.getChildByName("instGamePlayer"));
m_btnSound = MovieClip(m_clip.getChildByName("btnSound"));
m_btnPause = SimpleButton(m_clip.getChildByName("btnPause"));
m_btnSound.addEventListener(MouseEvent.CLICK, $onMouseClickInterface);
m_btnSound.buttonMode = true;
m_btnPause.addEventListener(MouseEvent.CLICK, $onMouseClickInterface);
if (m_zombieBall.m_soundManager.m_soundEnabled){
m_btnSound.gotoAndStop("on");
} else {
m_btnSound.gotoAndStop("off");
};
m_mcBarMeter.x = ORIGIN_X_TRHOW;
m_mcBarMeter.y = cHitAngle.LIMIT_INFERIOR;
m_balls = new Array();
_local4 = 0;
while (_local4 < TOTAL_NUMBER_BALLS) {
_local5 = new cBall(this);
m_balls.push(_local5);
m_clip.addChild(_local5);
_local5.x = -100;
_local5.y = -100;
_local4++;
};
m_hitAngle = new cHitAngle(this);
m_hitAngle.x = 90;
m_hitAngle.y = 400;
m_clip.addChild(m_hitAngle);
m_recoveryTime = 0;
m_typeKeyHit = -1;
m_delayComboInfo = -1;
changeState(STATE_INIT_WAVE);
m_gameTimer = new gameTimer();
addChild(m_clip);
m_gameBackground = MovieClip(m_clip.getChildByName("gameBackground"));
m_gameBackground.stop();
m_timeGame = 0;
m_timeGameSecond = 0;
m_clip.instTextDay.text = ("" + m_level);
m_clip.instDistanceHeads.text = (("" + m_zombieBall.m_maximumDistanceHead) + " m");
updateScore(0);
m_askToAdvanceIntroduction = false;
if (m_zombieBall.m_level == 1){
m_introduction = new cScreenIntroduction(this);
addChild(m_introduction);
};
}
public function unlockLoad():void{
m_iterator = 97;
}
public function $onMouseClickInterface(_arg1:MouseEvent):void{
if (_arg1.currentTarget == m_btnSound){
m_zombieBall.m_soundManager.m_soundEnabled = !(m_zombieBall.m_soundManager.m_soundEnabled);
if (m_zombieBall.m_soundManager.m_soundEnabled){
m_zombieBall.playGameSound(SoundsGame.SOUNDS_BACKGROUND_ZOMBIES, 1000);
m_btnSound.gotoAndStop("on");
} else {
m_zombieBall.stopGameSounds();
m_btnSound.gotoAndStop("off");
};
};
if (_arg1.currentTarget == m_btnPause){
changeState(STATE_PAUSE);
};
}
public function damageZombies(_arg1:Point, _arg2:cBall):Boolean{
var _local3:*;
var _local4:cZombie;
switch (_arg2.m_type){
case cBall.TYPE_DRILLER:
_local3 = 0;
while (_local3 < m_zombies.length) {
_local4 = cZombie(m_zombies[_local3]);
if (_local4.m_life > 0){
if (_local4.m_clip.hitTestObject(_arg2)){
_local4.m_impact = _arg2.m_vel.x;
_local4.m_impactType = _arg2.m_type;
_local4.m_ball_pos_impact = _arg2.m_pos;
_local4.m_ball_vel_impact = _arg2.m_vel;
_arg2.m_vel.x = (_arg2.m_vel.x - _local4.m_life);
if (_arg2.m_vel.x < 0){
_arg2.m_vel.x = 0;
};
};
};
_local3++;
};
break;
case cBall.TYPE_EXPLOSION:
_local3 = 0;
while (_local3 < m_zombies.length) {
_local4 = cZombie(m_zombies[_local3]);
if (_local4.m_life > 0){
if (Math.abs((_local4.m_pos.x - _arg2.m_pos.x)) < 150){
_local4.m_impact = _arg2.m_vel.x;
_local4.m_impactType = _arg2.m_type;
};
};
_local3++;
};
break;
case cBall.TYPE_NUCLEAR:
_local3 = 0;
while (_local3 < m_zombies.length) {
_local4 = cZombie(m_zombies[_local3]);
if (_local4.m_life > 0){
if (Math.abs((_local4.m_pos.x - _arg2.m_pos.x)) < 300){
_local4.m_impact = (2 * _arg2.m_vel.x);
_local4.m_impactType = _arg2.m_type;
};
};
_local3++;
};
break;
default:
_local3 = 0;
while (_local3 < m_zombies.length) {
_local4 = cZombie(m_zombies[_local3]);
if (_local4.m_life > 0){
if (_local4.m_clip.hitTestObject(_arg2)){
_local4.m_impact = _arg2.m_vel.x;
_local4.m_impactType = _arg2.m_type;
_local4.m_ball_pos_impact = _arg2.m_pos;
_local4.m_ball_vel_impact = _arg2.m_vel;
return (true);
};
};
_local3++;
};
break;
};
return (false);
}
public function insertNewHead(_arg1:int, _arg2:Point, _arg3:Point):void{
var _local4:*;
var _local5:cHead;
_local4 = 0;
while (_local4 < m_zombiesHeads.length) {
_local5 = cHead(m_zombiesHeads[_local4]);
if (_local5.m_state == cHead.STATE_NULL){
_local5.init(_arg2, _arg3, _arg1);
return;
};
_local4++;
};
}
public function changeState(_arg1:Number):void{
m_lastState = m_state;
m_state = _arg1;
m_iterator = 0;
m_timeAcum = 0;
}
public function insertNewBall():void{
var _local1:int;
var _local2:cBall;
_local1 = 0;
while (_local1 < m_balls.length) {
_local2 = cBall(m_balls[_local1]);
if (_local2.m_state == cBall.STATE_NULL){
_local2.init(new Point(ORIGIN_X_TRHOW, ORIGIN_Y_TRHOW), new Point(0, 0), cBall.TYPE_NORMAL);
m_gameThrower.gotoAndPlay("throw");
m_timeAnimationThrower = 1000;
break;
};
_local1++;
};
m_timerToNewBall = m_timerToNewBallInitial;
}
public function getTypeStick(_arg1:int):Number{
switch (_arg1){
case Define.STICK_1:
return (cBall.TYPE_NORMAL);
case Define.STICK_2:
return (cBall.TYPE_DRILLER);
case Define.STICK_3:
return (cBall.TYPE_ICE);
case Define.STICK_4:
return (cBall.TYPE_FIRE);
case Define.STICK_5:
return (cBall.TYPE_EXPLOSION);
case Define.STICK_6:
return (cBall.TYPE_NUCLEAR);
default:
return (cBall.TYPE_NORMAL);
};
}
public function getTimeRecoveyStick(_arg1:int):Number{
switch (_arg1){
case Define.STICK_1:
return (1500);
case Define.STICK_2:
return (3000);
case Define.STICK_3:
return (4000);
case Define.STICK_4:
return (5000);
case Define.STICK_5:
return (6000);
case Define.STICK_6:
return (7000);
default:
return (1000);
};
}
public function insertHitKey_NoCondition(_arg1:int):void{
m_typeKeyHit = _arg1;
}
public function freeResources():void{
}
public function updateScore(_arg1:Number, _arg2:Number=-1):void{
var _local3:int;
_local3 = Math.floor(_arg1);
if (m_zombieBall.increaseScore(_local3)){
};
m_clip.instTextScore.text = ((m_zombieBall.m_score + "/") + ZombieBall.ARRAY_SCORE[m_zombieBall.m_playerLevel]);
m_clip.instTextHeads.text = m_zombieBall.m_headsCut;
m_clip.instTextBalls.text = ((m_zombieBall.m_currentComboHeads + "/") + m_zombieBall.m_maxComboHeads);
m_clip.instTextPlayerLevel.text = m_zombieBall.m_playerLevel;
m_delayComboInfo = _arg2;
}
public function getStrengthStick(_arg1:int):Number{
switch (_arg1){
case Define.STICK_1:
return (20);
case Define.STICK_2:
return (25);
case Define.STICK_3:
return (20);
case Define.STICK_4:
return (30);
case Define.STICK_5:
return (30);
case Define.STICK_6:
return (35);
default:
return (20);
};
}
public function logic():void{
var i:int;
var zombiesAlive:Number;
var newZombie:cZombie;
var newZombieHead:cHead;
var fm:FocusManager;
var sBall:cBall;
var sZombie:cZombie;
var sZombieHead:cHead;
i = 0;
m_gameTimer.updateTime();
if (m_iterator < 100){
m_iterator++;
};
switch (m_state){
case STATE_INIT_WAVE:
switch (m_iterator){
case 1:
m_gameThrower.gotoAndStop("quiet");
m_gamePlayer.gotoAndStop("taunt");
if (!Define.ENABLE_INTEGRATED_XML){
m_xmlZombies = new XMLManager(((Define.ZOMBIES_WAVES_XML + m_level) + ".xml"), unlockLoad);
} else {
m_xmlZombies = new XMLManager(LevelsXML.LEVELS_XML[(m_level - 1)]);
m_iterator = 2;
};
break;
case 2:
m_iterator = 1;
break;
default:
m_zombies = new Array();
m_zombiesHeads = new Array();
i = 0;
while (i < m_xmlZombies.$xmlListItems.length()) {
newZombie = new cZombie(this, new Number(m_xmlZombies.$xmlListItems[i].@type), new Number(m_xmlZombies.$xmlListItems[i].@x), new Number(m_xmlZombies.$xmlListItems[i].@y), new Number(m_xmlZombies.$xmlListItems[i].@speed), new Number(m_xmlZombies.$xmlListItems[i].@life), new Number(m_xmlZombies.$xmlListItems[i].@score), new String(m_xmlZombies.$xmlListItems[i]));
m_clip.addChild(newZombie);
m_zombies.push(newZombie);
newZombieHead = new cHead(this);
m_clip.addChild(newZombieHead);
m_zombiesHeads.push(newZombieHead);
i = (i + 1);
};
if (m_zombieBall.m_level == 1){
changeState(STATE_INTRODUCTION);
} else {
changeState(STATE_PRESENTATION_WAVE);
fm = new FocusManager(this);
fm.setFocus(stage);
};
break;
};
break;
case STATE_INTRODUCTION:
switch (m_iterator){
default:
if (m_askToAdvanceIntroduction){
m_askToAdvanceIntroduction = false;
try {
removeChild(m_introduction);
m_introduction = null;
} catch(err:Error) {
};
changeState(STATE_PRESENTATION_WAVE);
fm = new FocusManager(this);
fm.setFocus(stage);
};
break;
};
break;
case STATE_PRESENTATION_WAVE:
if (m_iterator == 1){
m_screenPresentation = new cScreenPresentation(this, m_level);
addChild(m_screenPresentation);
m_screenPresentation.x = 107.4;
m_screenPresentation.y = 146.3;
m_zombieBall.playGameSound(SoundsGame.SOUNDS_PRESENTATION, 1);
m_gameThrower.gotoAndStop("quiet");
m_gamePlayer.gotoAndStop("taunt");
};
m_timeAcum = (m_timeAcum + m_gameTimer.m_difTime);
if (m_timeAcum > 2000){
m_screenPresentation.y = (m_screenPresentation.y + ((0 - m_screenPresentation.y) / 3));
if (m_screenPresentation.y < 1){
removeChild(m_screenPresentation);
m_gamePlayer.gotoAndStop("standby");
changeState(STATE_RUN_WAVE);
if (((((m_level % 10) == 0)) && (!((m_level == 0))))){
m_zombieBall.playGameSound(SoundsGame.SOUNDS_MELODY_MENU, 1000);
m_zombieBall.playGameSound(SoundsGame.SOUNDS_BACKGROUND_ZOMBIES, 1000);
} else {
m_zombieBall.playGameSound(SoundsGame.SOUNDS_BACKGROUND_ZOMBIES, 1000);
};
};
};
break;
case STATE_RUN_WAVE:
m_timeGame = (m_timeGame + m_gameTimer.m_difTime);
m_timeGameSecond = (m_timeGameSecond + m_gameTimer.m_difTime);
if (m_timeGameSecond > 1000){
m_timeGameSecond = 0;
updateSky();
};
if (m_typeKeyHit == KEY_HITTED_PAUSE){
m_typeKeyHit = -1;
changeState(STATE_PAUSE);
return;
};
m_timerToNewBall = (m_timerToNewBall - m_gameTimer.m_difTime);
if (m_timerToNewBall < 0){
insertNewBall();
};
if (m_recoveryTime > 0){
m_recoveryTime = (m_recoveryTime - m_gameTimer.m_difTime);
if (m_recoveryTime <= 0){
m_gamePlayer.gotoAndStop("standby");
};
};
if (m_recoveryTime <= 0){
if (m_typeKeyHit != -1){
switch (m_typeKeyHit){
case KEY_HITTED_A:
m_strengthHit = getStrengthStick(m_zombieBall.m_typeStickA);
m_typeHit = getTypeStick(m_zombieBall.m_typeStickA);
m_recoveryTime = getTimeRecoveyStick(m_zombieBall.m_typeStickA);
break;
case KEY_HITTED_S:
if (m_zombieBall.m_typeStickB != -1){
m_strengthHit = getStrengthStick(m_zombieBall.m_typeStickB);
m_typeHit = getTypeStick(m_zombieBall.m_typeStickB);
m_recoveryTime = getTimeRecoveyStick(m_zombieBall.m_typeStickB);
};
break;
};
if (m_strengthHit != -1){
m_gamePlayer.gotoAndStop(("throw_" + cBall.getNameType(m_typeHit)));
m_strengthHit = (m_strengthHit + ((m_strengthHit * m_zombieBall.m_playerStrength) / 10));
m_recoveryTime = (m_recoveryTime - (((m_recoveryTime / 1.3) * m_zombieBall.m_playerRecovery) / 10));
};
m_typeKeyHit = -1;
};
};
if (m_timeAnimationThrower > 0){
m_timeAnimationThrower = (m_timeAnimationThrower - m_gameTimer.m_difTime);
if (m_timeAnimationThrower <= 0){
m_gameThrower.gotoAndStop("quiet");
};
};
i = 0;
while (i < m_balls.length) {
sBall = cBall(m_balls[i]);
sBall.logic();
m_hitAngle.updateLine(i, sBall, m_strengthHit, m_typeHit);
i = (i + 1);
};
m_strengthHit = -1;
m_typeHit = -1;
zombiesAlive = 0;
i = 0;
while (i < m_zombies.length) {
sZombie = cZombie(m_zombies[i]);
sZombie.logic();
if (sZombie.m_state != cZombie.STATE_NULL){
zombiesAlive = (zombiesAlive + 1);
};
if (sZombie.m_state == cZombie.STATE_EAT_PLAYER){
changeState(STATE_GAME_OVER);
return;
};
i = (i + 1);
};
i = 0;
while (i < m_zombiesHeads.length) {
sZombieHead = cHead(m_zombiesHeads[i]);
sZombieHead.logic();
i = (i + 1);
};
if (m_delayComboInfo > 0){
if (m_delayComboInfo == Define.TIME_SHOW_COMBO_INFO){
if (m_zombieBall.m_currentComboHeads > m_zombieBall.m_maxComboHeads){
m_zombieBall.playGameSound(SoundsGame.SOUNDS_NEW_COMBO, 1);
m_zombieBall.m_maxComboHeads = m_zombieBall.m_currentComboHeads;
m_txtHeadCombo.text = (("NEW COMBO HEADS x " + m_zombieBall.m_maxComboHeads) + " !!!");
} else {
m_txtHeadCombo.text = ("COMBO HEADS x " + m_zombieBall.m_currentComboHeads);
};
m_clip.instTextBalls.text = ((m_zombieBall.m_currentComboHeads + "/") + m_zombieBall.m_maxComboHeads);
};
m_delayComboInfo = (m_delayComboInfo - m_gameTimer.m_difTime);
if (m_delayComboInfo <= 0){
m_txtHeadCombo.text = "";
};
};
if (zombiesAlive == 0){
changeState(STATE_FINISH_WAVE);
};
break;
case STATE_FINISH_WAVE:
if (m_iterator == 1){
m_zombieBall.stopGameSounds();
m_zombieBall.playGameSound(SoundsGame.SOUNDS_END, 1);
m_screenFinishWave = new cScreenFinishWave(this);
addChild(m_screenFinishWave);
m_gamePlayer.gotoAndStop("victory");
i = 0;
while (i < m_balls.length) {
sBall = cBall(m_balls[i]);
sBall.visible = false;
i = (i + 1);
};
};
m_screenFinishWave.logic();
i = 0;
while (i < m_zombiesHeads.length) {
sZombieHead = cHead(m_zombiesHeads[i]);
sZombieHead.logic();
i = (i + 1);
};
break;
case STATE_GAME_OVER:
if (m_iterator == 1){
m_zombieBall.stopGameSounds();
m_zombieBall.playGameSound(SoundsGame.SOUNDS_GAME_OVER, 1);
m_screenGameOver = new cScreenGameOver(this);
addChild(m_screenGameOver);
m_gamePlayer.gotoAndStop("death");
i = 0;
while (i < m_balls.length) {
sBall = cBall(m_balls[i]);
sBall.visible = false;
i = (i + 1);
};
i = 0;
while (i < m_zombiesHeads.length) {
sZombieHead = cHead(m_zombiesHeads[i]);
sZombieHead.logic();
i = (i + 1);
};
};
break;
case STATE_PAUSE:
switch (m_iterator){
case 1:
if (m_screenPause == null){
m_screenPause = new cScreenPause(this);
};
addChild(m_screenPause);
break;
case 2:
m_iterator = 1;
break;
default:
removeChild(m_screenPause);
changeState(STATE_RUN_WAVE);
break;
};
break;
case STATE_GAME_COMPLETED:
if (m_iterator == 1){
m_screenEndGame = new cScreenEndGame(this);
addChild(m_screenEndGame);
};
break;
};
}
public function collisionZombies(_arg1:Point, _arg2:cBall):Boolean{
var _local3:*;
var _local4:cZombie;
_local3 = 0;
while (_local3 < m_zombies.length) {
_local4 = cZombie(m_zombies[_local3]);
if (_local4.m_life > 0){
if (_arg2.m_type == cBall.TYPE_DRILLER){
if ((((_local4.m_state == cZombie.STATE_WALK)) || ((_local4.m_state == cZombie.STATE_RUN)))){
if (_local4.m_clip.hitTestObject(_arg2)){
damageZombies(_arg1, _arg2);
return (true);
};
};
} else {
if (_local4.m_clip.hitTestObject(_arg2)){
damageZombies(_arg1, _arg2);
return (true);
};
};
};
_local3++;
};
return (false);
}
public function getFarestHead(_arg1:Number=100000000):cHead{
var _local2:Number;
var _local3:cHead;
var _local4:*;
var _local5:cHead;
_local2 = -1;
_local3 = null;
_local4 = 0;
while (_local4 < m_zombiesHeads.length) {
_local5 = cHead(m_zombiesHeads[_local4]);
if (_local5.m_state != cHead.STATE_NULL){
if (_local5.x < _arg1){
if (_local5.x > _local2){
_local2 = _local5.x;
_local3 = _local5;
};
};
};
_local4++;
};
return (_local3);
}
public function updateSky():void{
var _local1:int;
_local1 = ((m_timeGame * TOTAL_DAY_FRAMES) / TOTAL_DAY_TIME);
if (_local1 <= 0){
_local1 = 1;
};
if (_local1 >= TOTAL_DAY_FRAMES){
_local1 = 1;
};
m_gameBackground.gotoAndStop(_local1);
}
public function insertHitKey(_arg1:int):void{
if (m_recoveryTime <= 0){
m_typeKeyHit = _arg1;
};
}
public function isAnyHeadRunning():Boolean{
var _local1:*;
var _local2:cHead;
_local1 = 0;
while (_local1 < m_zombiesHeads.length) {
_local2 = cHead(m_zombiesHeads[_local1]);
if (_local2.m_state == cHead.STATE_RUN){
return (true);
};
_local1++;
};
return (false);
}
}
}//package engine
Section 22
//cZombie (engine.cZombie)
package engine {
import flash.display.*;
import flash.geom.*;
import sounds.*;
import common.*;
public class cZombie extends MovieClip {
public var m_iterator:Number;
public var m_speed:Number;
public var m_signalScore:cSignalScore;
public var m_name:String;
public var m_state:Number;
public var m_timeAcum:Number;
public var m_lastState:Number;
public var m_impact:Number;
public var m_world:cWorld;
public var m_pos:Point;
public var m_life:Number;
public var m_score:Number;
public var m_impactType:Number;
public var m_ball_vel_impact:Point;
public var m_type:int;
public var m_heightHead:Point;
public var m_signalLife_InitialWidth:Number;
public var m_lifeInitial:Number;
public var m_signalLife:MovieClip;
public var m_typeDelayNormal:Number;
public var m_clip:MovieClip;
public var m_ball_pos_impact:Point;
public static const STATE_IMPACT_ICE:Number = 4;
public static const STATE_DEATH_NUCLEAR:Number = 13;
public static const STATE_NULL:Number = -1;
public static const STATE_RUN:Number = 1;
public static const STATE_DEATH_WITHOUT_HEAD:Number = 9;
public static const TYPE_ZOMBIE10:Number = 10;
public static const STATE_IMPACT_NORMAL:Number = 3;
public static const STATE_DEATH_ICE:Number = 10;
public static const STATE_DEATH_NORMAL:Number = 8;
public static const STATE_IMPACT_FIRE:Number = 5;
public static const TYPE_ZOMBIE0:Number = 0;
public static const TYPE_ZOMBIE1:Number = 1;
public static const TYPE_ZOMBIE2:Number = 2;
public static const TYPE_ZOMBIE3:Number = 3;
public static const TYPE_ZOMBIE4:Number = 4;
public static const STATE_IMPACT_EXPLOSION:Number = 6;
public static const TYPE_ZOMBIE6:Number = 6;
public static const TYPE_ZOMBIE7:Number = 7;
public static const TYPE_ZOMBIE8:Number = 8;
public static const TYPE_ZOMBIE9:Number = 9;
public static const STATE_DEATH_FIRE:Number = 11;
public static const TYPE_ZOMBIE5:Number = 5;
public static const STATE_EAT_PLAYER:Number = 2;
public static const STATE_WALK:Number = 0;
public static const STATE_IMPACT_NUCLEAR:Number = 7;
public static const STATE_DEATH_EXPLOSION:Number = 12;
public function cZombie(_arg1:cWorld, _arg2:int, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:String){
m_world = _arg1;
m_name = new String(_arg8);
m_type = _arg2;
m_typeDelayNormal = 2000;
switch (m_type){
case 0:
m_clip = new cZombie1();
break;
case 1:
m_clip = new cZombie2();
break;
case 2:
m_clip = new cZombie3();
break;
case 3:
m_clip = new cZombie4();
break;
case 4:
m_clip = new cZombie5();
break;
case 5:
m_clip = new cZombie6();
break;
case 6:
m_clip = new cZombie7();
break;
case 7:
m_typeDelayNormal = 1500;
m_clip = new cZombie8();
break;
case 8:
m_typeDelayNormal = 1500;
m_clip = new cZombie9();
break;
case 9:
m_typeDelayNormal = 1000;
m_clip = new cZombie10();
break;
default:
m_clip = new cZombie1();
break;
};
m_pos = new Point(_arg3, _arg4);
m_speed = _arg5;
m_life = _arg6;
m_lifeInitial = m_life;
m_impact = 0;
m_score = _arg7;
m_heightHead = getHeigthHead();
m_ball_pos_impact = new Point(0, 0);
m_ball_vel_impact = new Point(0, 0);
addChild(m_clip);
m_signalLife = new cSignalLife();
addChild(m_signalLife);
changeState(STATE_WALK);
this.visible = false;
}
public function getHeigthHead():Point{
switch (m_type){
case TYPE_ZOMBIE0:
return (new Point(82, 23));
case TYPE_ZOMBIE1:
return (new Point(82, 23));
case TYPE_ZOMBIE2:
return (new Point(88, 25));
case TYPE_ZOMBIE3:
return (new Point(100, 30));
case TYPE_ZOMBIE4:
return (new Point(110, 35));
case TYPE_ZOMBIE5:
return (new Point(64, 12));
case TYPE_ZOMBIE6:
return (new Point(80, 25));
case TYPE_ZOMBIE7:
return (new Point(115, 38));
case TYPE_ZOMBIE8:
return (new Point(125, 45));
case TYPE_ZOMBIE9:
return (new Point(155, 55));
default:
return (new Point(75, 25));
};
}
public function logic():void{
if (m_impact > 0){
m_life = (m_life - m_impact);
m_signalLife.updateLife(m_life, m_lifeInitial);
m_impact = 0;
switch (m_impactType){
case cBall.TYPE_NORMAL:
if (m_life <= 0){
if (handleCollisionHead(m_ball_pos_impact, m_ball_vel_impact)){
changeState(STATE_DEATH_WITHOUT_HEAD);
} else {
changeState(STATE_DEATH_NORMAL);
};
} else {
changeState(STATE_IMPACT_NORMAL);
};
break;
case cBall.TYPE_DRILLER:
if (m_life <= 0){
changeState(STATE_DEATH_NORMAL);
} else {
changeState(STATE_IMPACT_NORMAL);
};
break;
case cBall.TYPE_ICE:
if (m_life <= 0){
changeState(STATE_DEATH_ICE);
} else {
changeState(STATE_IMPACT_ICE);
};
break;
case cBall.TYPE_FIRE:
if (m_life <= 0){
changeState(STATE_DEATH_FIRE);
} else {
changeState(STATE_IMPACT_FIRE);
};
break;
case cBall.TYPE_EXPLOSION:
if (m_life <= 0){
changeState(STATE_DEATH_EXPLOSION);
} else {
changeState(STATE_IMPACT_EXPLOSION);
};
break;
case cBall.TYPE_NUCLEAR:
if (m_life <= 0){
changeState(STATE_DEATH_NUCLEAR);
} else {
changeState(STATE_IMPACT_NUCLEAR);
};
break;
};
};
if (m_iterator < 100){
m_iterator++;
};
switch (m_state){
case STATE_WALK:
if (m_iterator == 1){
m_clip.gotoAndStop("walk");
this.visible = true;
};
m_pos.x = (m_pos.x - m_speed);
if (Math.abs((m_pos.x - cWorld.POSITION_PLAYER_X)) <= m_speed){
m_clip.gotoAndStop("eat");
changeState(STATE_EAT_PLAYER);
};
break;
case STATE_RUN:
if (m_iterator == 1){
m_clip.gotoAndStop("run");
this.visible = true;
};
m_pos.x = (m_pos.x - m_speed);
if (Math.abs((m_pos.x - cWorld.POSITION_PLAYER_X)) <= m_speed){
m_clip.gotoAndStop("eat");
changeState(STATE_EAT_PLAYER);
};
break;
case STATE_EAT_PLAYER:
if (m_iterator == 1){
m_clip.gotoAndStop("eat");
};
break;
case STATE_IMPACT_NORMAL:
if (m_iterator == 1){
m_clip.gotoAndStop("impact_normal");
};
m_timeAcum = (m_timeAcum + m_world.m_gameTimer.m_difTime);
if (m_timeAcum > m_typeDelayNormal){
changeState(STATE_WALK);
};
break;
case STATE_IMPACT_ICE:
if (m_iterator == 1){
m_clip.gotoAndStop("impact_ice");
};
m_timeAcum = (m_timeAcum + m_world.m_gameTimer.m_difTime);
if (m_timeAcum > 5000){
changeState(STATE_WALK);
};
break;
case STATE_IMPACT_FIRE:
if (m_iterator == 1){
m_clip.gotoAndStop("impact_fire");
};
m_timeAcum = (m_timeAcum + m_world.m_gameTimer.m_difTime);
if (m_timeAcum > 2000){
changeState(STATE_WALK);
};
break;
case STATE_IMPACT_EXPLOSION:
if (m_iterator == 1){
m_clip.gotoAndStop("impact_explosion");
};
m_pos.x = (m_pos.x + (m_speed / 2));
m_timeAcum = (m_timeAcum + m_world.m_gameTimer.m_difTime);
if (m_timeAcum > 2000){
changeState(STATE_WALK);
};
break;
case STATE_IMPACT_NUCLEAR:
if (m_iterator == 1){
m_clip.gotoAndStop("impact_nuclear");
};
m_pos.x = (m_pos.x + (m_speed / 2));
m_timeAcum = (m_timeAcum + m_world.m_gameTimer.m_difTime);
if (m_timeAcum > 2000){
changeState(STATE_WALK);
};
break;
case STATE_DEATH_NORMAL:
if (m_iterator == 1){
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_ZOMBIE_SCREAM, 1);
m_clip.gotoAndStop("death_normal");
m_world.m_zombieBall.m_currentComboHeads = 0;
m_world.updateScore(Math.floor((m_score / 4)));
m_signalScore = new cSignalScore();
m_signalScore.init("good", Math.floor((m_lifeInitial / 4)), -((m_heightHead.x + (m_heightHead.y * 2))), (m_heightHead.y * 2));
m_signalScore.x = -((m_signalScore.width / 2));
m_signalScore.y = -((m_heightHead.x + (m_heightHead.y * 2)));
addChild(m_signalScore);
};
m_signalScore.logic();
m_timeAcum = (m_timeAcum + m_world.m_gameTimer.m_difTime);
if (m_timeAcum > 4000){
changeState(STATE_NULL);
};
break;
case STATE_DEATH_WITHOUT_HEAD:
if (m_iterator == 1){
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_ZOMBIE_SCREAM, 1);
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_WITHOUT_HEAD, 1);
m_clip.gotoAndStop("death_without_head");
m_world.m_zombieBall.m_headsCut++;
m_world.m_zombieBall.m_currentComboHeads++;
m_world.updateScore(Math.floor((m_score / 2)), Define.TIME_SHOW_COMBO_INFO);
m_signalScore = new cSignalScore();
m_signalScore.init("great", Math.floor((m_lifeInitial / 2)), -((m_heightHead.x + (m_heightHead.y * 2))), (m_heightHead.y * 2));
m_signalScore.x = -((m_signalScore.width / 2));
m_signalScore.y = -((m_heightHead.x + (m_heightHead.y * 2)));
addChild(m_signalScore);
};
m_signalScore.logic();
m_timeAcum = (m_timeAcum + m_world.m_gameTimer.m_difTime);
if (m_timeAcum > 4000){
changeState(STATE_NULL);
};
break;
case STATE_DEATH_ICE:
if (m_iterator == 1){
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_ZOMBIE_SCREAM, 1);
m_clip.gotoAndStop("death_ice");
m_world.m_zombieBall.m_currentComboHeads = 0;
m_world.updateScore(Math.floor((m_score / 4)));
m_signalScore = new cSignalScore();
m_signalScore.init("good", Math.floor((m_lifeInitial / 4)), -((m_heightHead.x + (m_heightHead.y * 2))), (m_heightHead.y * 2));
m_signalScore.x = -((m_signalScore.width / 2));
m_signalScore.y = -((m_heightHead.x + (m_heightHead.y * 2)));
addChild(m_signalScore);
};
m_signalScore.logic();
m_timeAcum = (m_timeAcum + m_world.m_gameTimer.m_difTime);
if (m_timeAcum > 4000){
changeState(STATE_NULL);
};
break;
case STATE_DEATH_FIRE:
if (m_iterator == 1){
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_ZOMBIE_SCREAM, 1);
m_clip.gotoAndStop("death_fire");
m_world.m_zombieBall.m_currentComboHeads = 0;
m_world.updateScore(Math.floor((m_score / 4)));
m_signalScore = new cSignalScore();
m_signalScore.init("good", Math.floor((m_lifeInitial / 4)), -((m_heightHead.x + (m_heightHead.y * 2))), (m_heightHead.y * 2));
m_signalScore.x = -((m_signalScore.width / 2));
m_signalScore.y = -((m_heightHead.x + (m_heightHead.y * 2)));
addChild(m_signalScore);
};
m_signalScore.logic();
m_timeAcum = (m_timeAcum + m_world.m_gameTimer.m_difTime);
if (m_timeAcum > 4000){
changeState(STATE_NULL);
};
break;
case STATE_DEATH_EXPLOSION:
if (m_iterator == 1){
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_ZOMBIE_SCREAM, 1);
m_clip.gotoAndStop("death_explosion");
m_world.m_zombieBall.m_currentComboHeads = 0;
m_world.updateScore(Math.floor((m_score / 4)));
m_signalScore = new cSignalScore();
m_signalScore.init("good", Math.floor((m_lifeInitial / 4)), -((m_heightHead.x + (m_heightHead.y * 2))), (m_heightHead.y * 2));
m_signalScore.x = -((m_signalScore.width / 2));
m_signalScore.y = -((m_heightHead.x + (m_heightHead.y * 2)));
addChild(m_signalScore);
};
m_signalScore.logic();
m_timeAcum = (m_timeAcum + m_world.m_gameTimer.m_difTime);
if (m_timeAcum > 4000){
changeState(STATE_NULL);
};
break;
case STATE_DEATH_NUCLEAR:
if (m_iterator == 1){
m_world.m_zombieBall.playGameSound(SoundsGame.SOUNDS_ZOMBIE_SCREAM, 1);
m_clip.gotoAndStop("death_nuclear");
m_world.m_zombieBall.m_currentComboHeads = 0;
m_world.updateScore(Math.floor((m_score / 4)));
m_signalScore = new cSignalScore();
m_signalScore.init("good", Math.floor((m_lifeInitial / 4)), -((m_heightHead.x + (m_heightHead.y * 2))), (m_heightHead.y * 2));
m_signalScore.x = -((m_signalScore.width / 2));
m_signalScore.y = -((m_heightHead.x + (m_heightHead.y * 2)));
addChild(m_signalScore);
};
m_signalScore.logic();
m_timeAcum = (m_timeAcum + m_world.m_gameTimer.m_difTime);
if (m_timeAcum > 4000){
changeState(STATE_NULL);
};
break;
case STATE_NULL:
if (m_iterator == 1){
removeChild(m_signalScore);
m_clip.gotoAndStop("empty");
m_signalLife.visible = false;
};
break;
};
this.x = m_pos.x;
this.y = m_pos.y;
}
public function recoverLastState():void{
m_state = m_lastState;
m_iterator = 0;
m_timeAcum = 0;
}
public function changeState(_arg1:Number):void{
m_lastState = m_state;
m_state = _arg1;
m_iterator = 0;
m_timeAcum = 0;
}
public function handleCollisionHead(_arg1:Point, _arg2:Point):Boolean{
var _local3:Point;
var _local4:Point;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
if (_arg1.y > (m_pos.y - m_heightHead.x)){
return (false);
};
_local3 = new Point(m_pos.x, (m_pos.y - (m_heightHead.x + m_heightHead.y)));
_local4 = new Point(0, 0);
_local5 = (m_heightHead.y * 2);
_local6 = _arg1.x;
_local7 = _arg1.y;
_local8 = (_local3.x - _local6);
_local9 = (_local3.y - _local7);
_local10 = Math.sqrt(((_local8 * _local8) + (_local9 * _local9)));
_local11 = Math.atan2(_local9, _local8);
_local12 = Math.cos(_local11);
_local13 = Math.sin(_local11);
_local3.x = (_arg1.x + (_local12 * _local5));
_local3.y = (_arg1.y + (_local13 * _local5));
_local14 = ((_local12 * _arg2.x) + (_local13 * _arg2.y));
_local15 = ((_local12 * _arg2.y) - (_local13 * _arg2.x));
_local16 = 0;
_local17 = 0;
_local4.x = (-(((_local12 * _local14) - (_local13 * _local17))) / 2);
_local4.y = ((_local12 * _local17) + (_local13 * _local14));
m_world.insertNewHead(m_type, _local3, _local4);
return (true);
}
}
}//package engine
Section 23
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import fl.events.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 24
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 25
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 26
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import flash.text.*;
import fl.events.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 27
//TextInput (fl.controls.TextInput)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import flash.text.*;
import fl.events.*;
import flash.ui.*;
public class TextInput extends UIComponent implements IFocusManagerComponent {
protected var _html:Boolean;// = false
protected var _savedHTML:String;
protected var background:DisplayObject;
protected var _editable:Boolean;// = true
public var textField:TextField;
private static var defaultStyles:Object = {upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:0, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function TextInput(){
_editable = true;
_html = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
if (focusTarget != null){
focusTarget.drawFocus(_arg1);
return;
};
super.drawFocus(_arg1);
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
override protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((((_arg1 == textField)) || (super.isOurFocus(_arg1))));
}
protected function handleKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true));
};
}
public function set text(_arg1:String):void{
textField.text = _arg1;
_html = false;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
protected function updateTextFieldType():void{
textField.type = (((enabled) && (editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC;
textField.selectable = enabled;
}
public function get selectionEndIndex():int{
return (textField.selectionEndIndex);
}
public function get editable():Boolean{
return (_editable);
}
override protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (_arg1.target == this){
stage.focus = textField;
};
_local2 = focusManager;
if (((editable) && (_local2))){
_local2.showFocusIndicator = true;
if (((textField.selectable) && ((textField.selectionBeginIndex == textField.selectionBeginIndex)))){
setSelection(0, textField.length);
};
};
super.focusInHandler(_arg1);
if (editable){
setIMEMode(true);
};
}
public function get selectionBeginIndex():int{
return (textField.selectionBeginIndex);
}
public function set alwaysShowSelection(_arg1:Boolean):void{
textField.alwaysShowSelection = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
updateTextFieldType();
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
public function get horizontalScrollPosition():int{
return (textField.scrollH);
}
public function set condenseWhite(_arg1:Boolean):void{
textField.condenseWhite = _arg1;
}
public function set displayAsPassword(_arg1:Boolean):void{
textField.displayAsPassword = _arg1;
}
public function set horizontalScrollPosition(_arg1:int):void{
textField.scrollH = _arg1;
}
public function get restrict():String{
return (textField.restrict);
}
public function get textWidth():Number{
return (textField.textWidth);
}
public function get textHeight():Number{
return (textField.textHeight);
}
public function set editable(_arg1:Boolean):void{
_editable = _arg1;
updateTextFieldType();
}
public function get maxChars():int{
return (textField.maxChars);
}
public function get length():int{
return (textField.length);
}
public function getLineMetrics(_arg1:int):TextLineMetrics{
return (textField.getLineMetrics(_arg1));
}
public function get imeMode():String{
return (_imeMode);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
super.focusOutHandler(_arg1);
if (editable){
setIMEMode(false);
};
}
public function set htmlText(_arg1:String):void{
if (_arg1 == ""){
text = "";
return;
};
_html = true;
_savedHTML = _arg1;
textField.htmlText = _arg1;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
public function get text():String{
return (textField.text);
}
override public function get enabled():Boolean{
return (super.enabled);
}
public function get condenseWhite():Boolean{
return (textField.condenseWhite);
}
public function get alwaysShowSelection():Boolean{
return (textField.alwaysShowSelection);
}
override protected function draw():void{
var _local1:Object;
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawTextFormat();
drawBackground();
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function handleTextInput(_arg1:TextEvent):void{
_arg1.stopPropagation();
dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text));
}
override protected function configUI():void{
super.configUI();
tabChildren = true;
textField = new TextField();
addChild(textField);
updateTextFieldType();
textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true);
textField.addEventListener(Event.CHANGE, handleChange, false, 0, true);
textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true);
}
public function setSelection(_arg1:int, _arg2:int):void{
textField.setSelection(_arg1, _arg2);
}
public function get displayAsPassword():Boolean{
return (textField.displayAsPassword);
}
public function appendText(_arg1:String):void{
textField.appendText(_arg1);
}
public function set restrict(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
_arg1 = null;
};
textField.restrict = _arg1;
}
public function get htmlText():String{
return (textField.htmlText);
}
protected function drawBackground():void{
var _local1:DisplayObject;
var _local2:String;
_local1 = background;
_local2 = (enabled) ? "upSkin" : "disabledSkin";
background = getDisplayObjectInstance(getStyleValue(_local2));
if (background == null){
return;
};
addChildAt(background, 0);
if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){
removeChild(_local1);
};
}
override public function setFocus():void{
stage.focus = textField;
}
protected function drawLayout():void{
var _local1:Number;
_local1 = Number(getStyleValue("textPadding"));
if (background != null){
background.width = width;
background.height = height;
};
textField.width = (width - (2 * _local1));
textField.height = (height - (2 * _local1));
textField.x = (textField.y = _local1);
}
public function set maxChars(_arg1:int):void{
textField.maxChars = _arg1;
}
public function get maxHorizontalScrollPosition():int{
return (textField.maxScrollH);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
if (_html){
textField.htmlText = _savedHTML;
};
}
protected function handleChange(_arg1:Event):void{
_arg1.stopPropagation();
dispatchEvent(new Event(Event.CHANGE, true));
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 28
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 29
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 30
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.text.*;
import flash.utils.*;
import fl.events.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 31
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 32
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 33
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 34
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 35
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 36
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.text.*;
import flash.utils.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 37
//cMC_Main (menu._00_main.cMC_Main)
package menu._00_main {
import flash.display.*;
import flash.events.*;
import sounds.*;
import common.*;
import flash.net.*;
public class cMC_Main extends MovieClip implements IScreenItem {
public var m_btn_GameBlog:SimpleButton;
public var btnStaff:SimpleButton;
public var m_btn_Sound:MovieClip;
public var btnGameBlog:SimpleButton;
public var m_zombieBall:ZombieBall;
public var btnMoreGames:SimpleButton;
public var btnSoundActivation:MovieClip;
public var btnPlay:SimpleButton;
public var btnHelp:SimpleButton;
public var m_btn_Credits:SimpleButton;
public var m_btn_MoreGames:SimpleButton;
public var m_btn_Play:SimpleButton;
public var m_btn_Help:SimpleButton;
public function cMC_Main(_arg1:ZombieBall){
addFrameScript(0, frame1);
m_zombieBall = _arg1;
m_btn_Play = SimpleButton(getChildByName("btnPlay"));
m_btn_Help = SimpleButton(getChildByName("btnHelp"));
m_btn_Credits = SimpleButton(getChildByName("btnStaff"));
m_btn_GameBlog = SimpleButton(getChildByName("btnGameBlog"));
m_btn_MoreGames = SimpleButton(getChildByName("btnMoreGames"));
m_btn_Sound = MovieClip(getChildByName("btnSoundActivation"));
m_btn_Sound.buttonMode = true;
if (m_zombieBall.m_soundManager.m_soundEnabled){
m_btn_Sound.gotoAndStop("quiet_on");
} else {
m_btn_Sound.gotoAndStop("quiet_off");
};
m_btn_Play.addEventListener(MouseEvent.CLICK, onMouseClick);
m_btn_Help.addEventListener(MouseEvent.CLICK, onMouseClick);
m_btn_Credits.addEventListener(MouseEvent.CLICK, onMouseClick);
m_btn_GameBlog.addEventListener(MouseEvent.CLICK, onMouseClick);
m_btn_MoreGames.addEventListener(MouseEvent.CLICK, onMouseClick);
m_btn_Sound.addEventListener(MouseEvent.CLICK, onMouseClick);
m_btn_Sound.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
m_btn_Sound.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
}
public function onMouseOver(_arg1:MouseEvent):void{
if (m_zombieBall.m_soundManager.m_soundEnabled){
m_btn_Sound.gotoAndStop("on_over_on");
} else {
m_btn_Sound.gotoAndStop("on_over_off");
};
}
public function onMouseClick(_arg1:MouseEvent):void{
if (_arg1.currentTarget == m_btn_Play){
if (((Define.ENABLE_ALL_STICKS) || (Define.SHOW_STICKS_INIT))){
m_zombieBall.changeState(ZombieBall.STATE_GAME_SHOP);
} else {
m_zombieBall.changeState(ZombieBall.STATE_GAME_RUN);
};
};
if (_arg1.currentTarget == m_btn_Help){
navigateToURL(new URLRequest(Define.URL_DISPLAY_HIGHSCORE_ZOMBIEBALL), "_blank");
};
if (_arg1.currentTarget == m_btn_Credits){
m_zombieBall.changeState(ZombieBall.STATE_MENU_CREDITS);
};
if (_arg1.currentTarget == m_btn_Sound){
m_zombieBall.m_soundManager.m_soundEnabled = !(m_zombieBall.m_soundManager.m_soundEnabled);
if (m_zombieBall.m_soundManager.m_soundEnabled){
m_btn_Sound.gotoAndStop("on_over_on");
m_zombieBall.playGameSound(SoundsGame.SOUNDS_MELODY_MENU, 1);
} else {
m_btn_Sound.gotoAndStop("on_over_off");
m_zombieBall.m_soundManager.stopAllGameSounds();
};
};
if (_arg1.currentTarget == m_btn_GameBlog){
navigateToURL(new URLRequest("http://armorblog.com"), "_blank");
};
if (_arg1.currentTarget == m_btn_MoreGames){
navigateToURL(new URLRequest("http://armorgames.com"), "_blank");
};
}
public function freeResources():void{
try {
m_btn_Play.removeEventListener(MouseEvent.CLICK, onMouseClick);
} catch(err:Error) {
};
try {
m_btn_Help.removeEventListener(MouseEvent.CLICK, onMouseClick);
} catch(err:Error) {
};
try {
m_btn_Credits.removeEventListener(MouseEvent.CLICK, onMouseClick);
} catch(err:Error) {
};
}
function frame1(){
stop();
}
public function onMouseOut(_arg1:MouseEvent):void{
if (m_zombieBall.m_soundManager.m_soundEnabled){
m_btn_Sound.gotoAndStop("quiet_on");
} else {
m_btn_Sound.gotoAndStop("quiet_off");
};
}
public function initScreen(_arg1:Array):void{
}
}
}//package menu._00_main
Section 38
//cMC_Help (menu._01_help.cMC_Help)
package menu._01_help {
import flash.display.*;
import flash.events.*;
public class cMC_Help extends MovieClip implements IScreenItem {
public var m_page:Number;
public var m_zombieBall:ZombieBall;
public var btnBack:cBtn_Back;
public var btnNext:btn_Next;
public var m_btn_Next:SimpleButton;
public var m_btn_Back:SimpleButton;
public static var TOTAL_NUMBER_OF_PAGES:Number = 4;
public function cMC_Help(_arg1:ZombieBall){
addFrameScript(0, frame1, 4, frame5, 9, frame10, 14, frame15);
m_zombieBall = _arg1;
m_page = 1;
m_btn_Back = SimpleButton(getChildByName("btnBack"));
m_btn_Next = SimpleButton(getChildByName("btnNext"));
m_btn_Back.addEventListener(MouseEvent.CLICK, onMouseClick);
m_btn_Next.addEventListener(MouseEvent.CLICK, onMouseClick);
}
public function onMouseClick(_arg1:MouseEvent):void{
if (_arg1.target == m_btn_Back){
m_page--;
if (m_page < 1){
m_zombieBall.recoverLastState();
} else {
this.gotoAndStop(("pg" + m_page));
};
};
if (_arg1.target == m_btn_Next){
m_page++;
if (m_page > TOTAL_NUMBER_OF_PAGES){
m_zombieBall.recoverLastState();
} else {
this.gotoAndStop(("pg" + m_page));
};
};
}
public function freeResources():void{
try {
m_btn_Back.removeEventListener(MouseEvent.CLICK, onMouseClick);
} catch(err:Error) {
};
try {
m_btn_Next.removeEventListener(MouseEvent.CLICK, onMouseClick);
} catch(err:Error) {
};
}
function frame10(){
stop();
}
function frame15(){
stop();
}
function frame1(){
stop();
}
function frame5(){
stop();
}
public function initScreen(_arg1:Array):void{
}
}
}//package menu._01_help
Section 39
//cMC_Credits (menu._02_credits.cMC_Credits)
package menu._02_credits {
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class cMC_Credits extends MovieClip implements IScreenItem {
public var m_page:Number;
public var m_zombieBall:ZombieBall;
public var btnNext:btn_Next;
public var logoDavid:MovieClip;
public var faceFreecreationgames:MovieClip;
public var m_btn_Next:SimpleButton;
public var logoDaniMusic:MovieClip;
public var mcFreeCreator:MovieClip;
public static var TOTAL_NUMBER_OF_PAGES:Number = 3;
public function cMC_Credits(_arg1:ZombieBall){
addFrameScript(0, frame1, 6, frame7, 12, frame13);
m_zombieBall = _arg1;
m_page = 1;
m_btn_Next = SimpleButton(getChildByName("btnNext"));
m_btn_Next.addEventListener(MouseEvent.CLICK, onMouseClick);
}
public function onMouseClick(_arg1:MouseEvent):void{
if (_arg1.target == m_btn_Next){
m_page++;
if (m_page > TOTAL_NUMBER_OF_PAGES){
m_zombieBall.changeState(ZombieBall.STATE_MENU_MAIN);
} else {
this.gotoAndStop(("pg" + m_page));
};
};
}
public function freeResources():void{
try {
m_btn_Next.removeEventListener(MouseEvent.CLICK, onMouseClick);
} catch(err:Error) {
};
}
function frame7(){
logoDaniMusic.addEventListener(MouseEvent.CLICK, onMouseClickPage2);
logoDaniMusic.buttonMode = true;
stop();
}
function frame1(){
mcFreeCreator.addEventListener(MouseEvent.CLICK, onMouseClickPage1);
mcFreeCreator.buttonMode = true;
logoDavid.addEventListener(MouseEvent.CLICK, onMouseClickPage1);
logoDavid.buttonMode = true;
stop();
}
function frame13(){
faceFreecreationgames.addEventListener(MouseEvent.CLICK, onMouseClickPage3);
faceFreecreationgames.buttonMode = true;
stop();
}
public function onMouseClickPage1(_arg1:MouseEvent):void{
if (_arg1.currentTarget == mcFreeCreator){
navigateToURL(new URLRequest("http://www.freecreationgames.net"), "_blank");
};
if (_arg1.currentTarget == logoDavid){
navigateToURL(new URLRequest("http://www.davidferriz.com"), "_blank");
};
}
public function onMouseClickPage2(_arg1:MouseEvent):void{
if (_arg1.currentTarget == logoDaniMusic){
navigateToURL(new URLRequest("http://www.myspace.com/elhombresinremedio"), "_blank");
};
}
public function onMouseClickPage3(_arg1:MouseEvent):void{
if (_arg1.currentTarget == faceFreecreationgames){
navigateToURL(new URLRequest("http://www.freecreationgames.net"), "_blank");
};
}
public function initScreen(_arg1:Array):void{
}
}
}//package menu._02_credits
Section 40
//cMC_Shop (menu._03_shop.cMC_Shop)
package menu._03_shop {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import common.*;
public class cMC_Shop extends MovieClip implements IScreenItem {
public var m_beisbolStickSelected:MovieClip;
public var m_beisbolSticks:Array;
public var slotStickEquipped0:MovieClip;
public var beisbolStick0:MovieClip;
public var beisbolStick1:MovieClip;
public var beisbolStick3:MovieClip;
public var beisbolStick4:MovieClip;
public var slotStickEquipped1:MovieClip;
public var beisbolStick2:MovieClip;
public var mcBarRecoveryTime:MovieClip;
public var slotStick5:MovieClip;
public var slotStick0:MovieClip;
public var slotStick3:MovieClip;
public var slotStick1:MovieClip;
public var m_beisbolStickIndex:Number;
public var instTextType:TextField;
public var beisbolStick5:MovieClip;
public var btnNext:btn_Next;
public var slotStick4:MovieClip;
public var m_zombieBall:ZombieBall;
public var m_slotsSticks:Array;
public var m_btn_Next:SimpleButton;
public var mcBarSpeed:MovieClip;
public var m_mcBarSpeed:MovieClip;
public var textExplanationBat:TextField;
public var slotStick2:MovieClip;
public var m_textExplanationBat:TextField;
public var m_slotsEquipped:Array;
public var m_mcBarRecoveryTime:MovieClip;
public var m_instTextType:TextField;
public static var EXPLANATION_BATS:Array = ["This is the less powerful bat, but it's the only one to CUT THE ZOMBIE'S HEAD and get more score", "This bat will go through the zombies' body. The recovery time for the next hit is bigger than normal bat, but not too much", "This bat will freeze for a long time the zombies. The recovery time for the next hit grows", "This bat will burn in the hell the zombies. Again the recovery time is not good so be precise in the hit", "With this bat you will make a beautiful explosion that can damage several zombies", "The ultimate human invention, all the nuclear power in your hands"];
public function cMC_Shop(_arg1:ZombieBall){
var _local2:int;
var _local3:MovieClip;
var _local4:MovieClip;
var _local5:MovieClip;
var _local6:MovieClip;
var _local7:MovieClip;
super();
addFrameScript(0, frame1);
m_zombieBall = _arg1;
m_textExplanationBat = TextField(getChildByName("textExplanationBat"));
m_textExplanationBat.text = "";
m_slotsSticks = new Array();
m_slotsSticks.push(MovieClip(getChildByName("slotStick0")));
m_slotsSticks.push(MovieClip(getChildByName("slotStick1")));
m_slotsSticks.push(MovieClip(getChildByName("slotStick2")));
m_slotsSticks.push(MovieClip(getChildByName("slotStick3")));
m_slotsSticks.push(MovieClip(getChildByName("slotStick4")));
m_slotsSticks.push(MovieClip(getChildByName("slotStick5")));
m_slotsEquipped = new Array();
m_slotsEquipped.push(MovieClip(getChildByName("slotStickEquipped0")));
m_slotsEquipped.push(MovieClip(getChildByName("slotStickEquipped1")));
m_beisbolSticks = new Array();
_local2 = 0;
while (_local2 < 6) {
_local3 = MovieClip(getChildByName(("beisbolStick" + _local2)));
m_beisbolSticks.push(_local3);
m_beisbolSticks[_local2].addEventListener(MouseEvent.MOUSE_DOWN, $onMouseDown);
m_beisbolSticks[_local2].addEventListener(MouseEvent.MOUSE_UP, $onMouseUp);
m_beisbolSticks[_local2].addEventListener(MouseEvent.MOUSE_OVER, $onMouseOver);
m_beisbolSticks[_local2].addEventListener(MouseEvent.MOUSE_OUT, $onMouseOut);
switch (_local2){
case Define.STICK_1:
_local3.gotoAndStop("enabled");
_local3.buttonMode = true;
break;
case Define.STICK_2:
if ((((m_zombieBall.m_level > 0)) || (Define.ENABLE_ALL_STICKS))){
_local3.gotoAndStop("enabled");
_local3.buttonMode = true;
} else {
_local3.gotoAndStop("disabled");
_local3.buttonMode = false;
};
break;
case Define.STICK_3:
if ((((m_zombieBall.m_level > 3)) || (Define.ENABLE_ALL_STICKS))){
_local3.gotoAndStop("enabled");
_local3.buttonMode = true;
} else {
_local3.gotoAndStop("disabled");
_local3.buttonMode = false;
};
break;
case Define.STICK_4:
if ((((m_zombieBall.m_level > 6)) || (Define.ENABLE_ALL_STICKS))){
_local3.gotoAndStop("enabled");
_local3.buttonMode = true;
} else {
_local3.gotoAndStop("disabled");
_local3.buttonMode = false;
};
break;
case Define.STICK_5:
if ((((m_zombieBall.m_level > 10)) || (Define.ENABLE_ALL_STICKS))){
_local3.gotoAndStop("enabled");
_local3.buttonMode = true;
} else {
_local3.gotoAndStop("disabled");
_local3.buttonMode = false;
};
break;
case Define.STICK_6:
if ((((m_zombieBall.m_level > 12)) || (Define.ENABLE_ALL_STICKS))){
_local3.gotoAndStop("enabled");
_local3.buttonMode = true;
} else {
_local3.gotoAndStop("disabled");
_local3.buttonMode = false;
};
break;
};
_local2++;
};
if (m_zombieBall.m_typeStickA != -1){
_local4 = MovieClip(m_slotsEquipped[0]);
_local5 = MovieClip(m_beisbolSticks[m_zombieBall.m_typeStickA]);
_local5.x = ((_local4.x + (_local4.width / 2)) - (_local5.width / 2));
_local5.y = ((_local4.y + (_local4.height / 2)) - (_local5.height / 2));
};
if (m_zombieBall.m_typeStickB != -1){
_local6 = MovieClip(m_slotsEquipped[1]);
_local7 = MovieClip(m_beisbolSticks[m_zombieBall.m_typeStickB]);
_local7.x = ((_local6.x + (_local6.width / 2)) - (_local7.width / 2));
_local7.y = ((_local6.y + (_local6.height / 2)) - (_local7.height / 2));
};
m_instTextType = TextField(getChildByName("instTextType"));
m_mcBarSpeed = MovieClip(getChildByName("mcBarSpeed"));
m_mcBarRecoveryTime = MovieClip(getChildByName("mcBarRecoveryTime"));
m_instTextType.text = "NONE";
m_mcBarSpeed.gotoAndStop(1);
m_mcBarRecoveryTime.gotoAndStop(1);
m_btn_Next = SimpleButton(getChildByName("btnNext"));
m_btn_Next.addEventListener(MouseEvent.CLICK, onMouseClick);
}
public function onMouseClick(_arg1:MouseEvent):void{
if (_arg1.target == m_btn_Next){
m_zombieBall.changeState(ZombieBall.STATE_GAME_UPGRADE);
};
}
public function $onMouseDown(_arg1:MouseEvent):void{
var _local2:*;
var _local3:MovieClip;
var _local4:MovieClip;
var _local5:MovieClip;
_local2 = 0;
while (_local2 < m_beisbolSticks.length) {
_local3 = MovieClip(m_beisbolSticks[_local2]);
if (_local3.buttonMode == true){
if (_arg1.currentTarget == _local3){
m_beisbolStickSelected = _local3;
m_beisbolStickIndex = _local2;
m_beisbolStickSelected.startDrag();
_local4 = MovieClip(m_slotsEquipped[0]);
if (_local4.hitTestObject(m_beisbolStickSelected)){
m_zombieBall.m_typeStickA = -1;
};
_local5 = MovieClip(m_slotsEquipped[1]);
if (_local5.hitTestObject(m_beisbolStickSelected)){
m_zombieBall.m_typeStickB = -1;
};
};
};
_local2++;
};
}
public function showStickCharacteristics(_arg1:int):void{
m_textExplanationBat.text = EXPLANATION_BATS[_arg1];
switch (_arg1){
case Define.STICK_1:
m_instTextType.text = "BAT NORMAL";
m_mcBarSpeed.gotoAndStop(5);
m_mcBarRecoveryTime.gotoAndStop(2);
break;
case Define.STICK_2:
m_instTextType.text = "BAT DRILLER";
m_mcBarSpeed.gotoAndStop(7);
m_mcBarRecoveryTime.gotoAndStop(5);
break;
case Define.STICK_3:
m_instTextType.text = "BAT ICE";
m_mcBarSpeed.gotoAndStop(5);
m_mcBarRecoveryTime.gotoAndStop(5);
break;
case Define.STICK_4:
m_instTextType.text = "BAT FIRE";
m_mcBarSpeed.gotoAndStop(9);
m_mcBarRecoveryTime.gotoAndStop(8);
break;
case Define.STICK_5:
m_instTextType.text = "BAT EXPLOSION";
m_mcBarSpeed.gotoAndStop(12);
m_mcBarRecoveryTime.gotoAndStop(10);
break;
case Define.STICK_6:
m_instTextType.text = "BAT NUCLEAR";
m_mcBarSpeed.gotoAndStop(16);
m_mcBarRecoveryTime.gotoAndStop(16);
break;
};
}
public function freeResources():void{
try {
m_btn_Next.removeEventListener(MouseEvent.CLICK, onMouseClick);
} catch(err:Error) {
};
}
public function $onMouseOver(_arg1:MouseEvent):void{
var _local2:*;
var _local3:MovieClip;
if (m_beisbolStickSelected != null){
showStickCharacteristics(m_beisbolStickIndex);
} else {
_local2 = 0;
while (_local2 < m_beisbolSticks.length) {
_local3 = MovieClip(m_beisbolSticks[_local2]);
if (_local3.buttonMode == true){
if (_arg1.currentTarget == _local3){
showStickCharacteristics(_local2);
};
};
_local2++;
};
};
}
public function $onMouseUp(_arg1:MouseEvent):void{
var _local2:Boolean;
var _local3:MovieClip;
var _local4:MovieClip;
var _local5:MovieClip;
if (m_beisbolStickSelected != null){
_local2 = true;
m_beisbolStickSelected.stopDrag();
_local3 = MovieClip(m_slotsEquipped[0]);
if (_local3.hitTestObject(m_beisbolStickSelected)){
if (m_zombieBall.m_typeStickA == -1){
m_zombieBall.m_typeStickA = m_beisbolStickIndex;
m_beisbolStickSelected.x = ((_local3.x + (_local3.width / 2)) - (m_beisbolStickSelected.width / 2));
m_beisbolStickSelected.y = ((_local3.y + (_local3.height / 2)) - (m_beisbolStickSelected.height / 2));
_local2 = false;
};
};
_local4 = MovieClip(m_slotsEquipped[1]);
if (_local4.hitTestObject(m_beisbolStickSelected)){
if (m_zombieBall.m_typeStickB == -1){
m_zombieBall.m_typeStickB = m_beisbolStickIndex;
m_beisbolStickSelected.x = ((_local4.x + (_local4.width / 2)) - (m_beisbolStickSelected.width / 2));
m_beisbolStickSelected.y = ((_local4.y + (_local4.height / 2)) - (m_beisbolStickSelected.height / 2));
_local2 = false;
};
};
if (_local2){
_local5 = MovieClip(m_slotsSticks[m_beisbolStickIndex]);
m_beisbolStickSelected.x = ((_local5.x + (_local5.width / 2)) - (m_beisbolStickSelected.width / 2));
m_beisbolStickSelected.y = ((_local5.y + (_local5.height / 2)) - (m_beisbolStickSelected.height / 2));
};
};
m_beisbolStickSelected = null;
m_beisbolStickIndex = -1;
}
public function $onMouseOut(_arg1:MouseEvent):void{
if (m_beisbolStickSelected != null){
showStickCharacteristics(m_beisbolStickIndex);
} else {
m_instTextType.text = "NONE";
m_mcBarSpeed.gotoAndStop(1);
m_mcBarRecoveryTime.gotoAndStop(1);
};
}
public function initScreen(_arg1:Array):void{
}
function frame1(){
stop();
}
}
}//package menu._03_shop
Section 41
//cMC_Upgrade (menu._03_shop.cMC_Upgrade)
package menu._03_shop {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import sounds.*;
import upgrade.*;
public class cMC_Upgrade extends MovieClip implements IScreenItem {
public var frequenceBarEnergy:MovieClip;
public var m_recoveryBarEnergy:MovieClip;
public var m_frequenceBarEnergy:MovieClip;
public var strengthBtnUpgrade:gameClip_Upgrade_Add;
public var m_zombieBall:ZombieBall;
public var recoveryBarEnergy:MovieClip;
public var m_strengthBtnUpgrade:SimpleButton;
public var recoveryBtnUpgrade:gameClip_Upgrade_Add;
public var frequenceBtnUpgrade:gameClip_Upgrade_Add;
public var strengthBarEnergy:MovieClip;
public var m_recoveryBtnUpgrade:SimpleButton;
public var gamePlayer:MovieClip;
public var btnPlay:SimpleButton;
public var m_frequenceBtnUpgrade:SimpleButton;
public var instTextUnlocks:TextField;
public var m_instTextUnlocks:TextField;
public var m_strengthBarEnergy:MovieClip;
public var m_btn_Play:SimpleButton;
public function cMC_Upgrade(_arg1:ZombieBall){
addFrameScript(0, frame1);
m_zombieBall = _arg1;
m_instTextUnlocks = TextField(getChildByName("instTextUnlocks"));
gamePlayer.gotoAndStop("taunt");
m_strengthBarEnergy = MovieClip(getChildByName("strengthBarEnergy"));
m_recoveryBarEnergy = MovieClip(getChildByName("recoveryBarEnergy"));
m_frequenceBarEnergy = MovieClip(getChildByName("frequenceBarEnergy"));
m_strengthBarEnergy.gotoAndStop((m_zombieBall.m_playerStrength + 1));
m_recoveryBarEnergy.gotoAndStop((m_zombieBall.m_playerRecovery + 1));
m_frequenceBarEnergy.gotoAndStop((m_zombieBall.m_playerFrequence + 1));
m_strengthBtnUpgrade = SimpleButton(getChildByName("strengthBtnUpgrade"));
m_recoveryBtnUpgrade = SimpleButton(getChildByName("recoveryBtnUpgrade"));
m_frequenceBtnUpgrade = SimpleButton(getChildByName("frequenceBtnUpgrade"));
m_strengthBtnUpgrade.addEventListener(MouseEvent.CLICK, onMouseClick);
m_recoveryBtnUpgrade.addEventListener(MouseEvent.CLICK, onMouseClick);
m_frequenceBtnUpgrade.addEventListener(MouseEvent.CLICK, onMouseClick);
m_instTextUnlocks.text = ("" + m_zombieBall.m_unlocksAvailableScore);
m_btn_Play = SimpleButton(getChildByName("btnPlay"));
m_btn_Play.addEventListener(MouseEvent.CLICK, onMouseClick);
}
public function onMouseClick(_arg1:MouseEvent):void{
if (m_zombieBall.m_unlocksAvailableScore > 0){
if ((((_arg1.currentTarget == m_strengthBtnUpgrade)) && ((m_zombieBall.m_playerStrength < 9)))){
m_zombieBall.m_unlocksAvailableScore--;
m_zombieBall.playGameSound(SoundsGame.SOUNDS_FX_POWERUP, 1);
m_zombieBall.m_playerStrength++;
m_strengthBarEnergy.gotoAndStop((m_zombieBall.m_playerStrength + 1));
};
if ((((_arg1.currentTarget == m_recoveryBtnUpgrade)) && ((m_zombieBall.m_playerRecovery < 9)))){
m_zombieBall.m_unlocksAvailableScore--;
m_zombieBall.playGameSound(SoundsGame.SOUNDS_FX_POWERUP, 1);
m_zombieBall.m_playerRecovery++;
m_recoveryBarEnergy.gotoAndStop((m_zombieBall.m_playerRecovery + 1));
};
if ((((_arg1.currentTarget == m_frequenceBtnUpgrade)) && ((m_zombieBall.m_playerFrequence < 9)))){
m_zombieBall.m_unlocksAvailableScore--;
m_zombieBall.playGameSound(SoundsGame.SOUNDS_FX_POWERUP, 1);
m_zombieBall.m_playerFrequence++;
m_frequenceBarEnergy.gotoAndStop((m_zombieBall.m_playerFrequence + 1));
};
m_instTextUnlocks.text = ("" + m_zombieBall.m_unlocksAvailableScore);
};
if (_arg1.currentTarget == m_btn_Play){
m_zombieBall.changeState(ZombieBall.STATE_GAME_RUN);
};
}
public function freeResources():void{
try {
m_btn_Play.removeEventListener(MouseEvent.CLICK, onMouseClick);
} catch(err:Error) {
};
}
public function initScreen(_arg1:Array):void{
m_zombieBall.playGameSound(SoundsGame.SOUNDS_UPGRADE, 1);
}
function frame1(){
stop();
}
}
}//package menu._03_shop
Section 42
//clipLogo (miscelanea.clipLogo)
package miscelanea {
import flash.display.*;
public dynamic class clipLogo extends MovieClip {
public function clipLogo(){
addFrameScript(242, frame243);
}
function frame243(){
MovieClip(root).gotoAndStop("main");
stop();
}
}
}//package miscelanea
Section 43
//Sound_BackgroundZombies (sounds.Sound_BackgroundZombies)
package sounds {
import flash.media.*;
public class Sound_BackgroundZombies extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 44
//Sound_CartelFall (sounds.Sound_CartelFall)
package sounds {
import flash.media.*;
public class Sound_CartelFall extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 45
//Sound_Driller (sounds.Sound_Driller)
package sounds {
import flash.media.*;
public class Sound_Driller extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 46
//Sound_End (sounds.Sound_End)
package sounds {
import flash.media.*;
public class Sound_End extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 47
//Sound_Explosion (sounds.Sound_Explosion)
package sounds {
import flash.media.*;
public class Sound_Explosion extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 48
//Sound_Fire (sounds.Sound_Fire)
package sounds {
import flash.media.*;
public class Sound_Fire extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 49
//Sound_FX_Alleluya (sounds.Sound_FX_Alleluya)
package sounds {
import flash.media.*;
public class Sound_FX_Alleluya extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 50
//Sound_FX_Explosion (sounds.Sound_FX_Explosion)
package sounds {
import flash.media.*;
public class Sound_FX_Explosion extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 51
//Sound_FX_Nuclear (sounds.Sound_FX_Nuclear)
package sounds {
import flash.media.*;
public class Sound_FX_Nuclear extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 52
//Sound_FX_PowerUp (sounds.Sound_FX_PowerUp)
package sounds {
import flash.media.*;
public class Sound_FX_PowerUp extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 53
//Sound_FxSelection (sounds.Sound_FxSelection)
package sounds {
import flash.media.*;
public class Sound_FxSelection extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 54
//Sound_GameOver (sounds.Sound_GameOver)
package sounds {
import flash.media.*;
public class Sound_GameOver extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 55
//Sound_Ice (sounds.Sound_Ice)
package sounds {
import flash.media.*;
public class Sound_Ice extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 56
//Sound_MelodyMenu (sounds.Sound_MelodyMenu)
package sounds {
import flash.media.*;
public class Sound_MelodyMenu extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 57
//Sound_NewCombo (sounds.Sound_NewCombo)
package sounds {
import flash.media.*;
public class Sound_NewCombo extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 58
//Sound_NormalHit (sounds.Sound_NormalHit)
package sounds {
import flash.media.*;
public class Sound_NormalHit extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 59
//Sound_Nuclear (sounds.Sound_Nuclear)
package sounds {
import flash.media.*;
public class Sound_Nuclear extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 60
//Sound_Presentation (sounds.Sound_Presentation)
package sounds {
import flash.media.*;
public class Sound_Presentation extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 61
//Sound_Upgrade (sounds.Sound_Upgrade)
package sounds {
import flash.media.*;
public class Sound_Upgrade extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 62
//Sound_WithoutHead (sounds.Sound_WithoutHead)
package sounds {
import flash.media.*;
public class Sound_WithoutHead extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 63
//Sound_ZombieScream (sounds.Sound_ZombieScream)
package sounds {
import flash.media.*;
public class Sound_ZombieScream extends Sound {
public var sound:SoundChannel;
public function playSound(_arg1:Number){
sound = play(0, _arg1);
}
public function stopSound(){
sound.stop();
}
}
}//package sounds
Section 64
//SoundsGame (sounds.SoundsGame)
package sounds {
import common.*;
public class SoundsGame {
public var m_soundEnabled:Boolean;
public var m_indexCurrentSound:Number;
public var m_sounds:Array;
public static var SOUNDS_EXPLOSION:Number = 4;
public static var SOUNDS_FX_NUCLEAR:Number = 18;
public static var SOUNDS_GAME_OVER:Number = 14;
public static var SOUNDS_END:Number = 11;
public static var SOUNDS_UPGRADE:Number = 13;
public static var SOUNDS_SELECTION:Number = 1;
public static var SOUNDS_NUCLEAR:Number = 7;
public static var SOUNDS_ALLELUYA:Number = 16;
public static var SOUNDS_FIRE:Number = 6;
public static var SOUNDS_MELODY_MENU:Number = 0;
public static var SOUNDS_NEW_COMBO:Number = 20;
public static var SOUNDS_FX_EXPLOSION:Number = 17;
public static var SOUNDS_ZOMBIE_SCREAM:Number = 10;
public static var SOUNDS_ICE:Number = 5;
public static var SOUNDS_WITHOUT_HEAD:Number = 8;
public static var SOUNDS_DRILLER:Number = 3;
public static var SOUNDS_PRESENTATION:Number = 12;
public static var SOUNDS_BACKGROUND_ZOMBIES:Number = 9;
public static var SOUNDS_NORMALHIT:Number = 2;
public static var SOUNDS_FX_POWERUP:Number = 19;
public static var SOUNDS_CARTEL_FALL:Number = 15;
public function SoundsGame(){
m_sounds = new Array();
m_indexCurrentSound = -1;
m_soundEnabled = true;
loadGameSound(SOUNDS_MELODY_MENU);
loadGameSound(SOUNDS_SELECTION);
loadGameSound(SOUNDS_NORMALHIT);
loadGameSound(SOUNDS_DRILLER);
loadGameSound(SOUNDS_EXPLOSION);
loadGameSound(SOUNDS_ICE);
loadGameSound(SOUNDS_FIRE);
loadGameSound(SOUNDS_NUCLEAR);
loadGameSound(SOUNDS_WITHOUT_HEAD);
loadGameSound(SOUNDS_BACKGROUND_ZOMBIES);
loadGameSound(SOUNDS_ZOMBIE_SCREAM);
loadGameSound(SOUNDS_END);
loadGameSound(SOUNDS_PRESENTATION);
loadGameSound(SOUNDS_UPGRADE);
loadGameSound(SOUNDS_GAME_OVER);
loadGameSound(SOUNDS_CARTEL_FALL);
loadGameSound(SOUNDS_ALLELUYA);
loadGameSound(SOUNDS_FX_EXPLOSION);
loadGameSound(SOUNDS_FX_NUCLEAR);
loadGameSound(SOUNDS_FX_POWERUP);
loadGameSound(SOUNDS_NEW_COMBO);
}
public function stopGameSound(_arg1:Number){
var p_index = _arg1;
try {
switch (p_index){
case SOUNDS_MELODY_MENU:
Sound_MelodyMenu(m_sounds[SOUNDS_MELODY_MENU]).stopSound();
break;
case SOUNDS_SELECTION:
Sound_FxSelection(m_sounds[SOUNDS_SELECTION]).stopSound();
break;
case SOUNDS_NORMALHIT:
Sound_NormalHit(m_sounds[SOUNDS_NORMALHIT]).stopSound();
break;
case SOUNDS_DRILLER:
Sound_Driller(m_sounds[SOUNDS_DRILLER]).stopSound();
break;
case SOUNDS_EXPLOSION:
Sound_Explosion(m_sounds[SOUNDS_EXPLOSION]).stopSound();
break;
case SOUNDS_ICE:
Sound_Ice(m_sounds[SOUNDS_ICE]).stopSound();
break;
case SOUNDS_FIRE:
Sound_Fire(m_sounds[SOUNDS_FIRE]).stopSound();
break;
case SOUNDS_NUCLEAR:
Sound_Nuclear(m_sounds[SOUNDS_NUCLEAR]).stopSound();
break;
case SOUNDS_WITHOUT_HEAD:
Sound_WithoutHead(m_sounds[SOUNDS_WITHOUT_HEAD]).stopSound();
break;
case SOUNDS_BACKGROUND_ZOMBIES:
Sound_BackgroundZombies(m_sounds[SOUNDS_BACKGROUND_ZOMBIES]).stopSound();
break;
case SOUNDS_ZOMBIE_SCREAM:
Sound_ZombieScream(m_sounds[SOUNDS_ZOMBIE_SCREAM]).stopSound();
break;
case SOUNDS_END:
Sound_End(m_sounds[SOUNDS_END]).stopSound();
break;
case SOUNDS_PRESENTATION:
Sound_Presentation(m_sounds[SOUNDS_PRESENTATION]).stopSound();
break;
case SOUNDS_UPGRADE:
Sound_Upgrade(m_sounds[SOUNDS_UPGRADE]).stopSound();
break;
case SOUNDS_GAME_OVER:
Sound_GameOver(m_sounds[SOUNDS_GAME_OVER]).stopSound();
break;
case SOUNDS_CARTEL_FALL:
Sound_CartelFall(m_sounds[SOUNDS_CARTEL_FALL]).stopSound();
break;
case SOUNDS_ALLELUYA:
Sound_FX_Alleluya(m_sounds[SOUNDS_ALLELUYA]).stopSound();
break;
case SOUNDS_FX_EXPLOSION:
Sound_FX_Explosion(m_sounds[SOUNDS_FX_EXPLOSION]).stopSound();
break;
case SOUNDS_FX_NUCLEAR:
Sound_FX_Nuclear(m_sounds[SOUNDS_FX_NUCLEAR]).stopSound();
break;
case SOUNDS_FX_POWERUP:
Sound_FX_PowerUp(m_sounds[SOUNDS_FX_POWERUP]).stopSound();
break;
case SOUNDS_NEW_COMBO:
Sound_NewCombo(m_sounds[SOUNDS_NEW_COMBO]).stopSound();
break;
};
} catch(err:Error) {
if (Define.DEBUG_GENERAL){
trace(((("SoundsGame. Error en sound(" + p_index) + ")=") + err.toString()));
};
};
}
public function playGameSound(_arg1:Number, _arg2:Number){
m_indexCurrentSound = _arg1;
if (m_soundEnabled){
switch (_arg1){
case SOUNDS_MELODY_MENU:
Sound_MelodyMenu(m_sounds[SOUNDS_MELODY_MENU]).playSound(_arg2);
break;
case SOUNDS_SELECTION:
Sound_FxSelection(m_sounds[SOUNDS_SELECTION]).playSound(_arg2);
break;
case SOUNDS_NORMALHIT:
Sound_NormalHit(m_sounds[SOUNDS_NORMALHIT]).playSound(_arg2);
break;
case SOUNDS_DRILLER:
Sound_Driller(m_sounds[SOUNDS_DRILLER]).playSound(_arg2);
break;
case SOUNDS_EXPLOSION:
Sound_Explosion(m_sounds[SOUNDS_EXPLOSION]).playSound(_arg2);
break;
case SOUNDS_ICE:
Sound_Ice(m_sounds[SOUNDS_ICE]).playSound(_arg2);
break;
case SOUNDS_FIRE:
Sound_Fire(m_sounds[SOUNDS_FIRE]).playSound(_arg2);
break;
case SOUNDS_NUCLEAR:
Sound_Nuclear(m_sounds[SOUNDS_NUCLEAR]).playSound(_arg2);
break;
case SOUNDS_WITHOUT_HEAD:
Sound_WithoutHead(m_sounds[SOUNDS_WITHOUT_HEAD]).playSound(_arg2);
break;
case SOUNDS_BACKGROUND_ZOMBIES:
Sound_BackgroundZombies(m_sounds[SOUNDS_BACKGROUND_ZOMBIES]).playSound(_arg2);
break;
case SOUNDS_ZOMBIE_SCREAM:
Sound_ZombieScream(m_sounds[SOUNDS_ZOMBIE_SCREAM]).playSound(_arg2);
break;
case SOUNDS_END:
Sound_End(m_sounds[SOUNDS_END]).playSound(_arg2);
break;
case SOUNDS_PRESENTATION:
Sound_Presentation(m_sounds[SOUNDS_PRESENTATION]).playSound(_arg2);
break;
case SOUNDS_UPGRADE:
Sound_Upgrade(m_sounds[SOUNDS_UPGRADE]).playSound(_arg2);
break;
case SOUNDS_GAME_OVER:
Sound_GameOver(m_sounds[SOUNDS_GAME_OVER]).playSound(_arg2);
break;
case SOUNDS_CARTEL_FALL:
Sound_CartelFall(m_sounds[SOUNDS_CARTEL_FALL]).playSound(_arg2);
break;
case SOUNDS_ALLELUYA:
Sound_FX_Alleluya(m_sounds[SOUNDS_ALLELUYA]).playSound(_arg2);
break;
case SOUNDS_FX_EXPLOSION:
Sound_FX_Explosion(m_sounds[SOUNDS_FX_EXPLOSION]).playSound(_arg2);
break;
case SOUNDS_FX_NUCLEAR:
Sound_FX_Nuclear(m_sounds[SOUNDS_FX_NUCLEAR]).playSound(_arg2);
break;
case SOUNDS_FX_POWERUP:
Sound_FX_PowerUp(m_sounds[SOUNDS_FX_POWERUP]).playSound(_arg2);
break;
case SOUNDS_NEW_COMBO:
Sound_NewCombo(m_sounds[SOUNDS_NEW_COMBO]).playSound(_arg2);
break;
};
};
}
public function stopAllGameSounds(){
var _local1:*;
_local1 = 0;
while (_local1 < m_sounds.length) {
stopGameSound(_local1);
_local1++;
};
}
public function loadGameSound(_arg1:Number){
switch (_arg1){
case SOUNDS_MELODY_MENU:
m_sounds.push(new Sound_MelodyMenu());
break;
case SOUNDS_SELECTION:
m_sounds.push(new Sound_FxSelection());
break;
case SOUNDS_NORMALHIT:
m_sounds.push(new Sound_NormalHit());
break;
case SOUNDS_DRILLER:
m_sounds.push(new Sound_Driller());
break;
case SOUNDS_EXPLOSION:
m_sounds.push(new Sound_Explosion());
break;
case SOUNDS_ICE:
m_sounds.push(new Sound_Ice());
break;
case SOUNDS_FIRE:
m_sounds.push(new Sound_Fire());
break;
case SOUNDS_NUCLEAR:
m_sounds.push(new Sound_Nuclear());
break;
case SOUNDS_WITHOUT_HEAD:
m_sounds.push(new Sound_WithoutHead());
break;
case SOUNDS_BACKGROUND_ZOMBIES:
m_sounds.push(new Sound_BackgroundZombies());
break;
case SOUNDS_ZOMBIE_SCREAM:
m_sounds.push(new Sound_ZombieScream());
break;
case SOUNDS_END:
m_sounds.push(new Sound_End());
break;
case SOUNDS_PRESENTATION:
m_sounds.push(new Sound_Presentation());
break;
case SOUNDS_UPGRADE:
m_sounds.push(new Sound_Upgrade());
break;
case SOUNDS_GAME_OVER:
m_sounds.push(new Sound_GameOver());
break;
case SOUNDS_CARTEL_FALL:
m_sounds.push(new Sound_CartelFall());
break;
case SOUNDS_ALLELUYA:
m_sounds.push(new Sound_FX_Alleluya());
break;
case SOUNDS_FX_EXPLOSION:
m_sounds.push(new Sound_FX_Explosion());
break;
case SOUNDS_FX_NUCLEAR:
m_sounds.push(new Sound_FX_Nuclear());
break;
case SOUNDS_FX_POWERUP:
m_sounds.push(new Sound_FX_PowerUp());
break;
case SOUNDS_NEW_COMBO:
m_sounds.push(new Sound_NewCombo());
break;
};
}
}
}//package sounds
Section 65
//gameClip_Upgrade_Add (upgrade.gameClip_Upgrade_Add)
package upgrade {
import flash.display.*;
public dynamic class gameClip_Upgrade_Add extends SimpleButton {
}
}//package upgrade
Section 66
//ag_intro_mc_8 (Zombie_Baseball_fla.ag_intro_mc_8)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class ag_intro_mc_8 extends MovieClip {
public function ag_intro_mc_8(){
addFrameScript(0, frame1, 217, frame218);
}
function frame218(){
MovieClip(root).gotoAndStop("logo");
}
function frame1(){
gotoAndPlay(2);
}
}
}//package Zombie_Baseball_fla
Section 67
//ball_collision_explosion_540 (Zombie_Baseball_fla.ball_collision_explosion_540)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class ball_collision_explosion_540 extends MovieClip {
public function ball_collision_explosion_540(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 68
//ball_collision_fire_535 (Zombie_Baseball_fla.ball_collision_fire_535)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class ball_collision_fire_535 extends MovieClip {
public function ball_collision_fire_535(){
addFrameScript(4, frame5);
}
function frame5(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 69
//ball_collision_nuclear_554 (Zombie_Baseball_fla.ball_collision_nuclear_554)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class ball_collision_nuclear_554 extends MovieClip {
public function ball_collision_nuclear_554(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 70
//btnSound_119 (Zombie_Baseball_fla.btnSound_119)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class btnSound_119 extends MovieClip {
public function btnSound_119(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 71
//gameHeadTutorial_575 (Zombie_Baseball_fla.gameHeadTutorial_575)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameHeadTutorial_575 extends MovieClip {
public function gameHeadTutorial_575(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package Zombie_Baseball_fla
Section 72
//gamePlayer_45 (Zombie_Baseball_fla.gamePlayer_45)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gamePlayer_45 extends MovieClip {
public function gamePlayer_45(){
addFrameScript(0, frame1, 8, frame9, 17, frame18, 29, frame30, 40, frame41, 51, frame52, 61, frame62, 74, frame75, 86, frame87, 96, frame97);
}
function frame75(){
stop();
}
function frame87(){
stop();
}
function frame18(){
stop();
}
function frame97(){
stop();
}
function frame1(){
stop();
}
function frame9(){
stop();
}
function frame30(){
stop();
}
function frame41(){
stop();
}
function frame52(){
stop();
}
function frame62(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 73
//gamePlayer_Death_76 (Zombie_Baseball_fla.gamePlayer_Death_76)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gamePlayer_Death_76 extends MovieClip {
public function gamePlayer_Death_76(){
addFrameScript(11, frame12);
}
function frame12(){
this.gotoAndPlay("repite_muerte");
}
}
}//package Zombie_Baseball_fla
Section 74
//gamePlayer_ThrowDriller_49 (Zombie_Baseball_fla.gamePlayer_ThrowDriller_49)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gamePlayer_ThrowDriller_49 extends MovieClip {
public function gamePlayer_ThrowDriller_49(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 75
//gamePlayer_ThrowExplosion_62 (Zombie_Baseball_fla.gamePlayer_ThrowExplosion_62)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gamePlayer_ThrowExplosion_62 extends MovieClip {
public function gamePlayer_ThrowExplosion_62(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 76
//gamePlayer_ThrowFire_55 (Zombie_Baseball_fla.gamePlayer_ThrowFire_55)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gamePlayer_ThrowFire_55 extends MovieClip {
public function gamePlayer_ThrowFire_55(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 77
//gamePlayer_ThrowIce_54 (Zombie_Baseball_fla.gamePlayer_ThrowIce_54)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gamePlayer_ThrowIce_54 extends MovieClip {
public function gamePlayer_ThrowIce_54(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 78
//gamePlayer_ThrowNormal_48 (Zombie_Baseball_fla.gamePlayer_ThrowNormal_48)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gamePlayer_ThrowNormal_48 extends MovieClip {
public function gamePlayer_ThrowNormal_48(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 79
//gamePlayer_ThrowNuclear_68 (Zombie_Baseball_fla.gamePlayer_ThrowNuclear_68)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gamePlayer_ThrowNuclear_68 extends MovieClip {
public function gamePlayer_ThrowNuclear_68(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 80
//gameThrower_118 (Zombie_Baseball_fla.gameThrower_118)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameThrower_118 extends MovieClip {
public function gameThrower_118(){
addFrameScript(0, frame1, 8, frame9, 35, frame36, 36, frame37);
}
function frame1(){
stop();
}
function frame9(){
stop();
}
function frame36(){
stop();
}
function frame37(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 81
//gameZombie1_Death_Explosion_158 (Zombie_Baseball_fla.gameZombie1_Death_Explosion_158)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie1_Death_Explosion_158 extends MovieClip {
public function gameZombie1_Death_Explosion_158(){
addFrameScript(50, frame51);
}
function frame51(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 82
//gameZombie1_Death_Fire_156 (Zombie_Baseball_fla.gameZombie1_Death_Fire_156)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie1_Death_Fire_156 extends MovieClip {
public function gameZombie1_Death_Fire_156(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 83
//gameZombie1_Death_Ice_154 (Zombie_Baseball_fla.gameZombie1_Death_Ice_154)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie1_Death_Ice_154 extends MovieClip {
public function gameZombie1_Death_Ice_154(){
addFrameScript(34, frame35);
}
function frame35(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 84
//gameZombie1_Death_Normal_149 (Zombie_Baseball_fla.gameZombie1_Death_Normal_149)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie1_Death_Normal_149 extends MovieClip {
public function gameZombie1_Death_Normal_149(){
addFrameScript(51, frame52);
}
function frame52(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 85
//gameZombie1_Death_Nuclear_160 (Zombie_Baseball_fla.gameZombie1_Death_Nuclear_160)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie1_Death_Nuclear_160 extends MovieClip {
public function gameZombie1_Death_Nuclear_160(){
addFrameScript(53, frame54);
}
function frame54(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 86
//gameZombie1_Death_Without_head_152 (Zombie_Baseball_fla.gameZombie1_Death_Without_head_152)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie1_Death_Without_head_152 extends MovieClip {
public function gameZombie1_Death_Without_head_152(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 87
//gameZombie1_Eat_142 (Zombie_Baseball_fla.gameZombie1_Eat_142)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie1_Eat_142 extends MovieClip {
public function gameZombie1_Eat_142(){
addFrameScript(14, frame15);
}
function frame15(){
this.gotoAndPlay("bluce_comer");
}
}
}//package Zombie_Baseball_fla
Section 88
//gameZombie1_Impact_Ice_144 (Zombie_Baseball_fla.gameZombie1_Impact_Ice_144)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie1_Impact_Ice_144 extends MovieClip {
public function gameZombie1_Impact_Ice_144(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 89
//gameZombie1_Impact_Normal_143 (Zombie_Baseball_fla.gameZombie1_Impact_Normal_143)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie1_Impact_Normal_143 extends MovieClip {
public function gameZombie1_Impact_Normal_143(){
addFrameScript(34, frame35);
}
function frame35(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 90
//gameZombie10_Death_Explosion_512 (Zombie_Baseball_fla.gameZombie10_Death_Explosion_512)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie10_Death_Explosion_512 extends MovieClip {
public function gameZombie10_Death_Explosion_512(){
addFrameScript(50, frame51);
}
function frame51(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 91
//gameZombie10_Death_Fire_511 (Zombie_Baseball_fla.gameZombie10_Death_Fire_511)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie10_Death_Fire_511 extends MovieClip {
public function gameZombie10_Death_Fire_511(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 92
//gameZombie10_Death_Ice_509 (Zombie_Baseball_fla.gameZombie10_Death_Ice_509)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie10_Death_Ice_509 extends MovieClip {
public function gameZombie10_Death_Ice_509(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 93
//gameZombie10_Death_Normal_504 (Zombie_Baseball_fla.gameZombie10_Death_Normal_504)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie10_Death_Normal_504 extends MovieClip {
public function gameZombie10_Death_Normal_504(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 94
//gameZombie10_Death_Nuclear_514 (Zombie_Baseball_fla.gameZombie10_Death_Nuclear_514)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie10_Death_Nuclear_514 extends MovieClip {
public function gameZombie10_Death_Nuclear_514(){
addFrameScript(53, frame54);
}
function frame54(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 95
//gameZombie10_Eat_485 (Zombie_Baseball_fla.gameZombie10_Eat_485)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie10_Eat_485 extends MovieClip {
public function gameZombie10_Eat_485(){
addFrameScript(14, frame15);
}
function frame15(){
this.gotoAndPlay("bluce_comer");
}
}
}//package Zombie_Baseball_fla
Section 96
//gameZombie10_Impact_Ice_487 (Zombie_Baseball_fla.gameZombie10_Impact_Ice_487)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie10_Impact_Ice_487 extends MovieClip {
public function gameZombie10_Impact_Ice_487(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 97
//gameZombie10_Impact_Normal_486 (Zombie_Baseball_fla.gameZombie10_Impact_Normal_486)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie10_Impact_Normal_486 extends MovieClip {
public function gameZombie10_Impact_Normal_486(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 98
//gameZombie2_Death_Explosion_205 (Zombie_Baseball_fla.gameZombie2_Death_Explosion_205)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie2_Death_Explosion_205 extends MovieClip {
public function gameZombie2_Death_Explosion_205(){
addFrameScript(46, frame47);
}
function frame47(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 99
//gameZombie2_Death_Fire_203 (Zombie_Baseball_fla.gameZombie2_Death_Fire_203)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie2_Death_Fire_203 extends MovieClip {
public function gameZombie2_Death_Fire_203(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 100
//gameZombie2_Death_Ice_201 (Zombie_Baseball_fla.gameZombie2_Death_Ice_201)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie2_Death_Ice_201 extends MovieClip {
public function gameZombie2_Death_Ice_201(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 101
//gameZombie2_Death_Normal_196 (Zombie_Baseball_fla.gameZombie2_Death_Normal_196)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie2_Death_Normal_196 extends MovieClip {
public function gameZombie2_Death_Normal_196(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 102
//gameZombie2_Death_Nuclear_207 (Zombie_Baseball_fla.gameZombie2_Death_Nuclear_207)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie2_Death_Nuclear_207 extends MovieClip {
public function gameZombie2_Death_Nuclear_207(){
addFrameScript(48, frame49);
}
function frame49(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 103
//gameZombie2_Death_Without_head_199 (Zombie_Baseball_fla.gameZombie2_Death_Without_head_199)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie2_Death_Without_head_199 extends MovieClip {
public function gameZombie2_Death_Without_head_199(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 104
//gameZombie2_Eat_177 (Zombie_Baseball_fla.gameZombie2_Eat_177)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie2_Eat_177 extends MovieClip {
public function gameZombie2_Eat_177(){
addFrameScript(14, frame15);
}
function frame15(){
this.gotoAndPlay("bluce_comer");
}
}
}//package Zombie_Baseball_fla
Section 105
//gameZombie2_Impact_Ice_179 (Zombie_Baseball_fla.gameZombie2_Impact_Ice_179)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie2_Impact_Ice_179 extends MovieClip {
public function gameZombie2_Impact_Ice_179(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 106
//gameZombie2_Impact_Normal_178 (Zombie_Baseball_fla.gameZombie2_Impact_Normal_178)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie2_Impact_Normal_178 extends MovieClip {
public function gameZombie2_Impact_Normal_178(){
addFrameScript(34, frame35);
}
function frame35(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 107
//gameZombie3_Death_Explosion_252 (Zombie_Baseball_fla.gameZombie3_Death_Explosion_252)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie3_Death_Explosion_252 extends MovieClip {
public function gameZombie3_Death_Explosion_252(){
addFrameScript(50, frame51);
}
function frame51(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 108
//gameZombie3_Death_Fire_250 (Zombie_Baseball_fla.gameZombie3_Death_Fire_250)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie3_Death_Fire_250 extends MovieClip {
public function gameZombie3_Death_Fire_250(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 109
//gameZombie3_Death_Ice_248 (Zombie_Baseball_fla.gameZombie3_Death_Ice_248)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie3_Death_Ice_248 extends MovieClip {
public function gameZombie3_Death_Ice_248(){
addFrameScript(32, frame33);
}
function frame33(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 110
//gameZombie3_Death_Normal_243 (Zombie_Baseball_fla.gameZombie3_Death_Normal_243)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie3_Death_Normal_243 extends MovieClip {
public function gameZombie3_Death_Normal_243(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 111
//gameZombie3_Death_Nuclear_254 (Zombie_Baseball_fla.gameZombie3_Death_Nuclear_254)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie3_Death_Nuclear_254 extends MovieClip {
public function gameZombie3_Death_Nuclear_254(){
addFrameScript(53, frame54);
}
function frame54(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 112
//gameZombie3_Death_Without_head_246 (Zombie_Baseball_fla.gameZombie3_Death_Without_head_246)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie3_Death_Without_head_246 extends MovieClip {
public function gameZombie3_Death_Without_head_246(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 113
//gameZombie3_Eat_224 (Zombie_Baseball_fla.gameZombie3_Eat_224)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie3_Eat_224 extends MovieClip {
public function gameZombie3_Eat_224(){
addFrameScript(14, frame15);
}
function frame15(){
this.gotoAndPlay("bluce_comer");
}
}
}//package Zombie_Baseball_fla
Section 114
//gameZombie3_Impact_Ice_226 (Zombie_Baseball_fla.gameZombie3_Impact_Ice_226)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie3_Impact_Ice_226 extends MovieClip {
public function gameZombie3_Impact_Ice_226(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 115
//gameZombie3_Impact_Normal_225 (Zombie_Baseball_fla.gameZombie3_Impact_Normal_225)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie3_Impact_Normal_225 extends MovieClip {
public function gameZombie3_Impact_Normal_225(){
addFrameScript(34, frame35);
}
function frame35(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 116
//gameZombie4_Death_Explosion_298 (Zombie_Baseball_fla.gameZombie4_Death_Explosion_298)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie4_Death_Explosion_298 extends MovieClip {
public function gameZombie4_Death_Explosion_298(){
addFrameScript(50, frame51);
}
function frame51(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 117
//gameZombie4_Death_Fire_297 (Zombie_Baseball_fla.gameZombie4_Death_Fire_297)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie4_Death_Fire_297 extends MovieClip {
public function gameZombie4_Death_Fire_297(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 118
//gameZombie4_Death_Ice_295 (Zombie_Baseball_fla.gameZombie4_Death_Ice_295)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie4_Death_Ice_295 extends MovieClip {
public function gameZombie4_Death_Ice_295(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 119
//gameZombie4_Death_Normal_290 (Zombie_Baseball_fla.gameZombie4_Death_Normal_290)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie4_Death_Normal_290 extends MovieClip {
public function gameZombie4_Death_Normal_290(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 120
//gameZombie4_Death_Nuclear_300 (Zombie_Baseball_fla.gameZombie4_Death_Nuclear_300)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie4_Death_Nuclear_300 extends MovieClip {
public function gameZombie4_Death_Nuclear_300(){
addFrameScript(53, frame54);
}
function frame54(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 121
//gameZombie4_Death_Without_head_293 (Zombie_Baseball_fla.gameZombie4_Death_Without_head_293)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie4_Death_Without_head_293 extends MovieClip {
public function gameZombie4_Death_Without_head_293(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 122
//gameZombie4_Eat_271 (Zombie_Baseball_fla.gameZombie4_Eat_271)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie4_Eat_271 extends MovieClip {
public function gameZombie4_Eat_271(){
addFrameScript(14, frame15);
}
function frame15(){
this.gotoAndPlay("bluce_comer");
}
}
}//package Zombie_Baseball_fla
Section 123
//gameZombie4_Impact_Ice_273 (Zombie_Baseball_fla.gameZombie4_Impact_Ice_273)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie4_Impact_Ice_273 extends MovieClip {
public function gameZombie4_Impact_Ice_273(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 124
//gameZombie4_Impact_Normal_272 (Zombie_Baseball_fla.gameZombie4_Impact_Normal_272)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie4_Impact_Normal_272 extends MovieClip {
public function gameZombie4_Impact_Normal_272(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 125
//gameZombie5_Deat10_Without_head_507 (Zombie_Baseball_fla.gameZombie5_Deat10_Without_head_507)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie5_Deat10_Without_head_507 extends MovieClip {
public function gameZombie5_Deat10_Without_head_507(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 126
//gameZombie5_Death_Explosion_344 (Zombie_Baseball_fla.gameZombie5_Death_Explosion_344)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie5_Death_Explosion_344 extends MovieClip {
public function gameZombie5_Death_Explosion_344(){
addFrameScript(50, frame51);
}
function frame51(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 127
//gameZombie5_Death_Fire_343 (Zombie_Baseball_fla.gameZombie5_Death_Fire_343)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie5_Death_Fire_343 extends MovieClip {
public function gameZombie5_Death_Fire_343(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 128
//gameZombie5_Death_Ice_341 (Zombie_Baseball_fla.gameZombie5_Death_Ice_341)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie5_Death_Ice_341 extends MovieClip {
public function gameZombie5_Death_Ice_341(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 129
//gameZombie5_Death_Normal_336 (Zombie_Baseball_fla.gameZombie5_Death_Normal_336)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie5_Death_Normal_336 extends MovieClip {
public function gameZombie5_Death_Normal_336(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 130
//gameZombie5_Death_Nuclear_346 (Zombie_Baseball_fla.gameZombie5_Death_Nuclear_346)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie5_Death_Nuclear_346 extends MovieClip {
public function gameZombie5_Death_Nuclear_346(){
addFrameScript(53, frame54);
}
function frame54(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 131
//gameZombie5_Death_Without_head_339 (Zombie_Baseball_fla.gameZombie5_Death_Without_head_339)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie5_Death_Without_head_339 extends MovieClip {
public function gameZombie5_Death_Without_head_339(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 132
//gameZombie5_Eat_317 (Zombie_Baseball_fla.gameZombie5_Eat_317)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie5_Eat_317 extends MovieClip {
public function gameZombie5_Eat_317(){
addFrameScript(14, frame15);
}
function frame15(){
this.gotoAndPlay("bluce_comer");
}
}
}//package Zombie_Baseball_fla
Section 133
//gameZombie5_Impact_Ice_319 (Zombie_Baseball_fla.gameZombie5_Impact_Ice_319)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie5_Impact_Ice_319 extends MovieClip {
public function gameZombie5_Impact_Ice_319(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 134
//gameZombie5_Impact_Normal_318 (Zombie_Baseball_fla.gameZombie5_Impact_Normal_318)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie5_Impact_Normal_318 extends MovieClip {
public function gameZombie5_Impact_Normal_318(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 135
//gameZombie6_Death_Explosion_360 (Zombie_Baseball_fla.gameZombie6_Death_Explosion_360)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie6_Death_Explosion_360 extends MovieClip {
public function gameZombie6_Death_Explosion_360(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 136
//gameZombie6_Death_Fire_359 (Zombie_Baseball_fla.gameZombie6_Death_Fire_359)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie6_Death_Fire_359 extends MovieClip {
public function gameZombie6_Death_Fire_359(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 137
//gameZombie6_Death_Ice_358 (Zombie_Baseball_fla.gameZombie6_Death_Ice_358)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie6_Death_Ice_358 extends MovieClip {
public function gameZombie6_Death_Ice_358(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 138
//gameZombie6_Death_Normal_356 (Zombie_Baseball_fla.gameZombie6_Death_Normal_356)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie6_Death_Normal_356 extends MovieClip {
public function gameZombie6_Death_Normal_356(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 139
//gameZombie6_Death_Nuclear_361 (Zombie_Baseball_fla.gameZombie6_Death_Nuclear_361)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie6_Death_Nuclear_361 extends MovieClip {
public function gameZombie6_Death_Nuclear_361(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 140
//gameZombie6_Death_Without_head_357 (Zombie_Baseball_fla.gameZombie6_Death_Without_head_357)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie6_Death_Without_head_357 extends MovieClip {
public function gameZombie6_Death_Without_head_357(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 141
//gameZombie6_Impact_Ice_352 (Zombie_Baseball_fla.gameZombie6_Impact_Ice_352)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie6_Impact_Ice_352 extends MovieClip {
public function gameZombie6_Impact_Ice_352(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 142
//gameZombie6_Impact_Normal_351 (Zombie_Baseball_fla.gameZombie6_Impact_Normal_351)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie6_Impact_Normal_351 extends MovieClip {
public function gameZombie6_Impact_Normal_351(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 143
//gameZombie7_Death_Explosion_375 (Zombie_Baseball_fla.gameZombie7_Death_Explosion_375)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie7_Death_Explosion_375 extends MovieClip {
public function gameZombie7_Death_Explosion_375(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 144
//gameZombie7_Death_Fire_374 (Zombie_Baseball_fla.gameZombie7_Death_Fire_374)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie7_Death_Fire_374 extends MovieClip {
public function gameZombie7_Death_Fire_374(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 145
//gameZombie7_Death_Ice_373 (Zombie_Baseball_fla.gameZombie7_Death_Ice_373)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie7_Death_Ice_373 extends MovieClip {
public function gameZombie7_Death_Ice_373(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 146
//gameZombie7_Death_Normal_371 (Zombie_Baseball_fla.gameZombie7_Death_Normal_371)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie7_Death_Normal_371 extends MovieClip {
public function gameZombie7_Death_Normal_371(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 147
//gameZombie7_Death_Nuclear_376 (Zombie_Baseball_fla.gameZombie7_Death_Nuclear_376)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie7_Death_Nuclear_376 extends MovieClip {
public function gameZombie7_Death_Nuclear_376(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 148
//gameZombie7_Death_Without_head_372 (Zombie_Baseball_fla.gameZombie7_Death_Without_head_372)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie7_Death_Without_head_372 extends MovieClip {
public function gameZombie7_Death_Without_head_372(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 149
//gameZombie7_Impact_Ice_367 (Zombie_Baseball_fla.gameZombie7_Impact_Ice_367)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie7_Impact_Ice_367 extends MovieClip {
public function gameZombie7_Impact_Ice_367(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 150
//gameZombie7_Impact_Normal_366 (Zombie_Baseball_fla.gameZombie7_Impact_Normal_366)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie7_Impact_Normal_366 extends MovieClip {
public function gameZombie7_Impact_Normal_366(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 151
//gameZombie8_Death_Explosion_420 (Zombie_Baseball_fla.gameZombie8_Death_Explosion_420)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie8_Death_Explosion_420 extends MovieClip {
public function gameZombie8_Death_Explosion_420(){
addFrameScript(50, frame51);
}
function frame51(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 152
//gameZombie8_Death_Fire_419 (Zombie_Baseball_fla.gameZombie8_Death_Fire_419)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie8_Death_Fire_419 extends MovieClip {
public function gameZombie8_Death_Fire_419(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 153
//gameZombie8_Death_Ice_417 (Zombie_Baseball_fla.gameZombie8_Death_Ice_417)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie8_Death_Ice_417 extends MovieClip {
public function gameZombie8_Death_Ice_417(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 154
//gameZombie8_Death_Normal_412 (Zombie_Baseball_fla.gameZombie8_Death_Normal_412)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie8_Death_Normal_412 extends MovieClip {
public function gameZombie8_Death_Normal_412(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 155
//gameZombie8_Death_Nuclear_422 (Zombie_Baseball_fla.gameZombie8_Death_Nuclear_422)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie8_Death_Nuclear_422 extends MovieClip {
public function gameZombie8_Death_Nuclear_422(){
addFrameScript(53, frame54);
}
function frame54(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 156
//gameZombie8_Death_Without_head_415 (Zombie_Baseball_fla.gameZombie8_Death_Without_head_415)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie8_Death_Without_head_415 extends MovieClip {
public function gameZombie8_Death_Without_head_415(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 157
//gameZombie8_Eat_393 (Zombie_Baseball_fla.gameZombie8_Eat_393)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie8_Eat_393 extends MovieClip {
public function gameZombie8_Eat_393(){
addFrameScript(14, frame15);
}
function frame15(){
this.gotoAndPlay("bluce_comer");
}
}
}//package Zombie_Baseball_fla
Section 158
//gameZombie8_Impact_Ice_395 (Zombie_Baseball_fla.gameZombie8_Impact_Ice_395)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie8_Impact_Ice_395 extends MovieClip {
public function gameZombie8_Impact_Ice_395(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 159
//gameZombie8_Impact_Normal_394 (Zombie_Baseball_fla.gameZombie8_Impact_Normal_394)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie8_Impact_Normal_394 extends MovieClip {
public function gameZombie8_Impact_Normal_394(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 160
//gameZombie9_Death_Explosion_466 (Zombie_Baseball_fla.gameZombie9_Death_Explosion_466)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie9_Death_Explosion_466 extends MovieClip {
public function gameZombie9_Death_Explosion_466(){
addFrameScript(50, frame51);
}
function frame51(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 161
//gameZombie9_Death_Fire_465 (Zombie_Baseball_fla.gameZombie9_Death_Fire_465)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie9_Death_Fire_465 extends MovieClip {
public function gameZombie9_Death_Fire_465(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 162
//gameZombie9_Death_Ice_463 (Zombie_Baseball_fla.gameZombie9_Death_Ice_463)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie9_Death_Ice_463 extends MovieClip {
public function gameZombie9_Death_Ice_463(){
addFrameScript(30, frame31);
}
function frame31(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 163
//gameZombie9_Death_Normal_458 (Zombie_Baseball_fla.gameZombie9_Death_Normal_458)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie9_Death_Normal_458 extends MovieClip {
public function gameZombie9_Death_Normal_458(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 164
//gameZombie9_Death_Nuclear_468 (Zombie_Baseball_fla.gameZombie9_Death_Nuclear_468)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie9_Death_Nuclear_468 extends MovieClip {
public function gameZombie9_Death_Nuclear_468(){
addFrameScript(53, frame54);
}
function frame54(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 165
//gameZombie9_Death_Without_head_461 (Zombie_Baseball_fla.gameZombie9_Death_Without_head_461)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie9_Death_Without_head_461 extends MovieClip {
public function gameZombie9_Death_Without_head_461(){
addFrameScript(52, frame53);
}
function frame53(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 166
//gameZombie9_Eat_439 (Zombie_Baseball_fla.gameZombie9_Eat_439)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie9_Eat_439 extends MovieClip {
public function gameZombie9_Eat_439(){
addFrameScript(14, frame15);
}
function frame15(){
this.gotoAndPlay("bluce_comer");
}
}
}//package Zombie_Baseball_fla
Section 167
//gameZombie9_Impact_Ice_441 (Zombie_Baseball_fla.gameZombie9_Impact_Ice_441)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie9_Impact_Ice_441 extends MovieClip {
public function gameZombie9_Impact_Ice_441(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 168
//gameZombie9_Impact_Normal_440 (Zombie_Baseball_fla.gameZombie9_Impact_Normal_440)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gameZombie9_Impact_Normal_440 extends MovieClip {
public function gameZombie9_Impact_Normal_440(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 169
//gotas1_16 (Zombie_Baseball_fla.gotas1_16)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class gotas1_16 extends MovieClip {
public function gotas1_16(){
addFrameScript(384, frame385);
}
function frame385(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 170
//logo_menu2_30 (Zombie_Baseball_fla.logo_menu2_30)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class logo_menu2_30 extends MovieClip {
public function logo_menu2_30(){
addFrameScript(99, frame100);
}
function frame100(){
this.gotoAndPlay("bucle_logo");
}
}
}//package Zombie_Baseball_fla
Section 171
//MainTimeline (Zombie_Baseball_fla.MainTimeline)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class MainTimeline extends MovieClip {
public var zombieBall:ZombieBall;
public function MainTimeline(){
addFrameScript(0, frame1, 9, frame10, 19, frame20, 29, frame30, 39, frame40, 46, frame47, 54, frame55);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame20(){
stop();
}
function frame30(){
stop();
}
function frame40(){
stop();
}
function frame47(){
stop();
}
function frame55(){
zombieBall = new ZombieBall();
addChild(zombieBall);
stop();
}
}
}//package Zombie_Baseball_fla
Section 172
//mc_BarEnergy_80 (Zombie_Baseball_fla.mc_BarEnergy_80)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class mc_BarEnergy_80 extends MovieClip {
public function mc_BarEnergy_80(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 173
//mc_BarEnergyHundred_43 (Zombie_Baseball_fla.mc_BarEnergyHundred_43)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class mc_BarEnergyHundred_43 extends MovieClip {
public function mc_BarEnergyHundred_43(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 174
//mc_beisbolStick0_81 (Zombie_Baseball_fla.mc_beisbolStick0_81)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class mc_beisbolStick0_81 extends MovieClip {
public function mc_beisbolStick0_81(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 175
//mc_beisbolStick1_82 (Zombie_Baseball_fla.mc_beisbolStick1_82)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class mc_beisbolStick1_82 extends MovieClip {
public function mc_beisbolStick1_82(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 176
//mc_beisbolStick2_85 (Zombie_Baseball_fla.mc_beisbolStick2_85)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class mc_beisbolStick2_85 extends MovieClip {
public function mc_beisbolStick2_85(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 177
//mc_beisbolStick3_89 (Zombie_Baseball_fla.mc_beisbolStick3_89)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class mc_beisbolStick3_89 extends MovieClip {
public function mc_beisbolStick3_89(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 178
//mc_beisbolStick4_92 (Zombie_Baseball_fla.mc_beisbolStick4_92)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class mc_beisbolStick4_92 extends MovieClip {
public function mc_beisbolStick4_92(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 179
//mc_beisbolStick5_96 (Zombie_Baseball_fla.mc_beisbolStick5_96)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class mc_beisbolStick5_96 extends MovieClip {
public function mc_beisbolStick5_96(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 180
//mc_LoaderGame_99 (Zombie_Baseball_fla.mc_LoaderGame_99)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class mc_LoaderGame_99 extends MovieClip {
public function mc_LoaderGame_99(){
addFrameScript(0, frame1, 19, frame20, 39, frame40);
}
function frame1(){
stop();
}
function frame20(){
stop();
}
function frame40(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 181
//SOUND_23 (Zombie_Baseball_fla.SOUND_23)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class SOUND_23 extends MovieClip {
public function SOUND_23(){
addFrameScript(0, frame1, 9, frame10, 19, frame20, 28, frame29);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
function frame29(){
stop();
}
function frame20(){
stop();
}
}
}//package Zombie_Baseball_fla
Section 182
//tutorial_titleGoForBroke_588 (Zombie_Baseball_fla.tutorial_titleGoForBroke_588)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class tutorial_titleGoForBroke_588 extends MovieClip {
public function tutorial_titleGoForBroke_588(){
addFrameScript(58, frame59);
}
function frame59(){
MovieClip(parent).gotoAndPlay("dissapear");
}
}
}//package Zombie_Baseball_fla
Section 183
//tutorial_titlePlayer_576 (Zombie_Baseball_fla.tutorial_titlePlayer_576)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class tutorial_titlePlayer_576 extends MovieClip {
public function tutorial_titlePlayer_576(){
addFrameScript(58, frame59);
}
function frame59(){
MovieClip(parent).gotoAndPlay("zombie");
}
}
}//package Zombie_Baseball_fla
Section 184
//tutorial_titleThrower_582 (Zombie_Baseball_fla.tutorial_titleThrower_582)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class tutorial_titleThrower_582 extends MovieClip {
public function tutorial_titleThrower_582(){
addFrameScript(58, frame59);
}
function frame59(){
MovieClip(parent).gotoAndPlay("ball");
}
}
}//package Zombie_Baseball_fla
Section 185
//tutorial_titleWaitAndHit_584 (Zombie_Baseball_fla.tutorial_titleWaitAndHit_584)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class tutorial_titleWaitAndHit_584 extends MovieClip {
public function tutorial_titleWaitAndHit_584(){
addFrameScript(172, frame173);
}
function frame173(){
MovieClip(parent).gotoAndPlay("ball_hit");
}
}
}//package Zombie_Baseball_fla
Section 186
//tutorial_titleZombie_580 (Zombie_Baseball_fla.tutorial_titleZombie_580)
package Zombie_Baseball_fla {
import flash.display.*;
public dynamic class tutorial_titleZombie_580 extends MovieClip {
public function tutorial_titleZombie_580(){
addFrameScript(58, frame59);
}
function frame59(){
MovieClip(parent).gotoAndPlay("thrower");
}
}
}//package Zombie_Baseball_fla
Section 187
//tutorialBackground_574 (Zombie_Baseball_fla.tutorialBackground_574)
package Zombie_Baseball_fla {
import flash.display.*;
import engine.*;
import sounds.*;
public dynamic class tutorialBackground_574 extends MovieClip {
public var gameZombie1:cZombie1;
public var gameLevel:cGameLevel;
public function tutorialBackground_574(){
addFrameScript(0, frame1, 18, frame19, 117, frame118, 118, frame119, 138, frame139, 222, frame223);
}
function frame223(){
MovieClip(parent).gotoAndPlay("goForBroke");
stop();
}
function frame19(){
stop();
}
function frame1(){
stop();
stop();
}
function frame118(){
MovieClip(parent).gotoAndStop("info_ball_wait_and_hit");
stop();
}
function frame119(){
MovieClip(MovieClip(getChildByName("gameLevel")).getChildByName("instGamePlayer")).gotoAndStop("throw_normal");
cTutorial(parent).m_zombieBall.playGameSound(SoundsGame.SOUNDS_NORMALHIT, 0);
}
function frame139(){
MovieClip(getChildByName("gameZombie1")).gotoAndStop("death_without_head");
cTutorial(parent).m_zombieBall.playGameSound(SoundsGame.SOUNDS_ZOMBIE_SCREAM, 0);
}
}
}//package Zombie_Baseball_fla
Section 188
//btn_Next (btn_Next)
package {
import flash.display.*;
public dynamic class btn_Next extends SimpleButton {
}
}//package
Section 189
//cBtn_Back (cBtn_Back)
package {
import flash.display.*;
public dynamic class cBtn_Back extends SimpleButton {
}
}//package
Section 190
//cGameLevel (cGameLevel)
package {
import flash.display.*;
import flash.text.*;
public dynamic class cGameLevel extends MovieClip {
public var btnPause:SimpleButton;
public var mcBarMeter:MovieClip;
public var txtHeadCombo:TextField;
public var instTextDay:TextField;
public var btnSound:MovieClip;
public var instGamePlayer:MovieClip;
public var instTextBalls:TextField;
public var instTextPlayerLevel:TextField;
public var gameThrower:MovieClip;
public var instTextScore:TextField;
public var gameBackground:MovieClip;
public var instTextHeads:TextField;
public var instDistanceHeads:TextField;
public function cGameLevel(){
addFrameScript(0, frame1);
}
function frame1(){
instGamePlayer.gotoAndStop("standby");
gameThrower.gotoAndStop("presentation");
stop();
}
}
}//package
Section 191
//cZombie1 (cZombie1)
package {
import flash.display.*;
public dynamic class cZombie1 extends MovieClip {
public function cZombie1(){
addFrameScript(0, frame1, 7, frame8, 13, frame14, 19, frame20, 31, frame32, 41, frame42, 51, frame52, 64, frame65, 76, frame77, 87, frame88, 102, frame103, 111, frame112, 120, frame121, 133, frame134, 145, frame146);
}
function frame65(){
stop();
}
function frame77(){
stop();
}
function frame88(){
stop();
}
function frame14(){
stop();
}
function frame1(){
stop();
}
function frame103(){
stop();
}
function frame8(){
stop();
}
function frame20(){
stop();
}
function frame112(){
stop();
}
function frame32(){
stop();
}
function frame42(){
stop();
}
function frame121(){
stop();
}
function frame134(){
stop();
}
function frame52(){
stop();
}
function frame146(){
stop();
}
}
}//package
Section 192
//cZombie10 (cZombie10)
package {
import flash.display.*;
public dynamic class cZombie10 extends MovieClip {
public function cZombie10(){
addFrameScript(0, frame1, 7, frame8, 13, frame14, 19, frame20, 31, frame32, 41, frame42, 51, frame52, 64, frame65, 76, frame77, 87, frame88, 102, frame103, 111, frame112, 120, frame121, 133, frame134, 145, frame146);
}
function frame65(){
stop();
}
function frame77(){
stop();
}
function frame88(){
stop();
}
function frame14(){
stop();
}
function frame1(){
stop();
}
function frame103(){
stop();
}
function frame8(){
stop();
}
function frame20(){
stop();
}
function frame112(){
stop();
}
function frame32(){
stop();
}
function frame42(){
stop();
}
function frame121(){
stop();
}
function frame134(){
stop();
}
function frame52(){
stop();
}
function frame146(){
stop();
}
}
}//package
Section 193
//cZombie2 (cZombie2)
package {
import flash.display.*;
public dynamic class cZombie2 extends MovieClip {
public function cZombie2(){
addFrameScript(0, frame1, 7, frame8, 13, frame14, 19, frame20, 31, frame32, 41, frame42, 51, frame52, 64, frame65, 76, frame77, 87, frame88, 102, frame103, 111, frame112, 120, frame121, 133, frame134, 145, frame146);
}
function frame65(){
stop();
}
function frame77(){
stop();
}
function frame88(){
stop();
}
function frame14(){
stop();
}
function frame1(){
stop();
}
function frame103(){
stop();
}
function frame8(){
stop();
}
function frame20(){
stop();
}
function frame112(){
stop();
}
function frame32(){
stop();
}
function frame42(){
stop();
}
function frame121(){
stop();
}
function frame134(){
stop();
}
function frame52(){
stop();
}
function frame146(){
stop();
}
}
}//package
Section 194
//cZombie3 (cZombie3)
package {
import flash.display.*;
public dynamic class cZombie3 extends MovieClip {
public function cZombie3(){
addFrameScript(0, frame1, 7, frame8, 13, frame14, 19, frame20, 31, frame32, 41, frame42, 51, frame52, 64, frame65, 76, frame77, 87, frame88, 102, frame103, 111, frame112, 120, frame121, 133, frame134, 145, frame146);
}
function frame65(){
stop();
}
function frame77(){
stop();
}
function frame88(){
stop();
}
function frame14(){
stop();
}
function frame1(){
stop();
}
function frame103(){
stop();
}
function frame8(){
stop();
}
function frame20(){
stop();
}
function frame112(){
stop();
}
function frame32(){
stop();
}
function frame42(){
stop();
}
function frame121(){
stop();
}
function frame134(){
stop();
}
function frame52(){
stop();
}
function frame146(){
stop();
}
}
}//package
Section 195
//cZombie4 (cZombie4)
package {
import flash.display.*;
public dynamic class cZombie4 extends MovieClip {
public function cZombie4(){
addFrameScript(0, frame1, 7, frame8, 13, frame14, 19, frame20, 31, frame32, 41, frame42, 51, frame52, 64, frame65, 76, frame77, 87, frame88, 102, frame103, 111, frame112, 120, frame121, 133, frame134, 145, frame146);
}
function frame65(){
stop();
}
function frame77(){
stop();
}
function frame88(){
stop();
}
function frame14(){
stop();
}
function frame1(){
stop();
}
function frame103(){
stop();
}
function frame8(){
stop();
}
function frame20(){
stop();
}
function frame112(){
stop();
}
function frame32(){
stop();
}
function frame42(){
stop();
}
function frame121(){
stop();
}
function frame134(){
stop();
}
function frame52(){
stop();
}
function frame146(){
stop();
}
}
}//package
Section 196
//cZombie5 (cZombie5)
package {
import flash.display.*;
public dynamic class cZombie5 extends MovieClip {
public function cZombie5(){
addFrameScript(0, frame1, 7, frame8, 13, frame14, 19, frame20, 31, frame32, 41, frame42, 51, frame52, 64, frame65, 76, frame77, 87, frame88, 102, frame103, 111, frame112, 120, frame121, 133, frame134, 145, frame146);
}
function frame65(){
stop();
}
function frame77(){
stop();
}
function frame88(){
stop();
}
function frame14(){
stop();
}
function frame1(){
stop();
}
function frame103(){
stop();
}
function frame8(){
stop();
}
function frame20(){
stop();
}
function frame112(){
stop();
}
function frame32(){
stop();
}
function frame42(){
stop();
}
function frame121(){
stop();
}
function frame134(){
stop();
}
function frame52(){
stop();
}
function frame146(){
stop();
}
}
}//package
Section 197
//cZombie6 (cZombie6)
package {
import flash.display.*;
public dynamic class cZombie6 extends MovieClip {
public function cZombie6(){
addFrameScript(0, frame1, 7, frame8, 13, frame14, 19, frame20, 31, frame32, 41, frame42, 51, frame52, 64, frame65, 76, frame77, 87, frame88, 102, frame103, 111, frame112, 120, frame121, 133, frame134, 145, frame146);
}
function frame65(){
stop();
}
function frame77(){
stop();
}
function frame88(){
stop();
}
function frame14(){
stop();
}
function frame1(){
stop();
}
function frame103(){
stop();
}
function frame8(){
stop();
}
function frame20(){
stop();
}
function frame112(){
stop();
}
function frame32(){
stop();
}
function frame42(){
stop();
}
function frame121(){
stop();
}
function frame134(){
stop();
}
function frame52(){
stop();
}
function frame146(){
stop();
}
}
}//package
Section 198
//cZombie7 (cZombie7)
package {
import flash.display.*;
public dynamic class cZombie7 extends MovieClip {
public function cZombie7(){
addFrameScript(0, frame1, 7, frame8, 13, frame14, 19, frame20, 31, frame32, 41, frame42, 51, frame52, 64, frame65, 76, frame77, 87, frame88, 102, frame103, 111, frame112, 120, frame121, 133, frame134, 145, frame146);
}
function frame65(){
stop();
}
function frame77(){
stop();
}
function frame88(){
stop();
}
function frame14(){
stop();
}
function frame1(){
stop();
}
function frame103(){
stop();
}
function frame8(){
stop();
}
function frame20(){
stop();
}
function frame112(){
stop();
}
function frame32(){
stop();
}
function frame42(){
stop();
}
function frame121(){
stop();
}
function frame134(){
stop();
}
function frame52(){
stop();
}
function frame146(){
stop();
}
}
}//package
Section 199
//cZombie8 (cZombie8)
package {
import flash.display.*;
public dynamic class cZombie8 extends MovieClip {
public function cZombie8(){
addFrameScript(0, frame1, 7, frame8, 13, frame14, 19, frame20, 31, frame32, 41, frame42, 51, frame52, 64, frame65, 76, frame77, 87, frame88, 102, frame103, 111, frame112, 120, frame121, 133, frame134, 145, frame146);
}
function frame65(){
stop();
}
function frame77(){
stop();
}
function frame88(){
stop();
}
function frame14(){
stop();
}
function frame1(){
stop();
}
function frame103(){
stop();
}
function frame8(){
stop();
}
function frame20(){
stop();
}
function frame112(){
stop();
}
function frame32(){
stop();
}
function frame42(){
stop();
}
function frame121(){
stop();
}
function frame134(){
stop();
}
function frame52(){
stop();
}
function frame146(){
stop();
}
}
}//package
Section 200
//cZombie9 (cZombie9)
package {
import flash.display.*;
public dynamic class cZombie9 extends MovieClip {
public function cZombie9(){
addFrameScript(0, frame1, 7, frame8, 13, frame14, 19, frame20, 31, frame32, 41, frame42, 51, frame52, 64, frame65, 76, frame77, 87, frame88, 102, frame103, 111, frame112, 120, frame121, 133, frame134, 145, frame146);
}
function frame65(){
stop();
}
function frame77(){
stop();
}
function frame88(){
stop();
}
function frame14(){
stop();
}
function frame1(){
stop();
}
function frame103(){
stop();
}
function frame8(){
stop();
}
function frame20(){
stop();
}
function frame112(){
stop();
}
function frame32(){
stop();
}
function frame42(){
stop();
}
function frame121(){
stop();
}
function frame134(){
stop();
}
function frame52(){
stop();
}
function frame146(){
stop();
}
}
}//package
Section 201
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 202
//gameLineAngle (gameLineAngle)
package {
import flash.display.*;
public dynamic class gameLineAngle extends MovieClip {
}
}//package
Section 203
//IScreenItem (IScreenItem)
package {
public interface IScreenItem {
function freeResources():void;
function initScreen(_arg1:Array):void;
}
}//package
Section 204
//loadingBarProgress (loadingBarProgress)
package {
import flash.display.*;
import flash.text.*;
public dynamic class loadingBarProgress extends MovieClip {
public var instMaskLoadingBarProgress:maskLoadingBarProgress;
public var instText:TextField;
}
}//package
Section 205
//maskLoadingBarProgress (maskLoadingBarProgress)
package {
import flash.display.*;
public dynamic class maskLoadingBarProgress extends MovieClip {
}
}//package
Section 206
//TextInput_disabledSkin (TextInput_disabledSkin)
package {
import flash.display.*;
public dynamic class TextInput_disabledSkin extends MovieClip {
}
}//package
Section 207
//TextInput_upSkin (TextInput_upSkin)
package {
import flash.display.*;
public dynamic class TextInput_upSkin extends MovieClip {
}
}//package
Section 208
//ZombieBall (ZombieBall)
package {
import flash.display.*;
import flash.events.*;
import engine.*;
import flash.utils.*;
import sounds.*;
import common.*;
import menu._00_main.*;
import menu._01_help.*;
import menu._02_credits.*;
import menu._03_shop.*;
import flash.ui.*;
public class ZombieBall extends MovieClip {
public var m_iterator:Number;
public var m_maximumDistanceHead:Number;
public var m_timer:Timer;
public var m_timerToNewBallInitial:Number;
public var m_counterToContinue:Number;
public var m_soundManager:SoundsGame;
public var m_level:int;
public var m_state:Number;
public var m_headsCut:int;
public var m_lastState:Number;
public var m_playerStrength:Number;
public var m_playerLevel:int;
public var m_buffer:Array;
public var m_world:cWorld;
public var m_unlocksAvailableScoreTOTAL:int;
public var m_stateList:Array;
public var m_unlocksAvailableScore:int;
public var m_typeStickA:int;
public var m_timeAcumulated:Number;
public var m_currentComboHeads:int;
public var m_playerRecovery:Number;
public var m_playerFrequence:Number;
public var m_score:Number;
public var m_typeStickB:int;
public var m_maxComboHeads:int;
public static var STATE_GAME_UPGRADE:Number = 7;
public static var STATE_GAME_LOAD:Number = 4;
public static var STATE_MENU_CREDITS:Number = 3;
public static var STATE_MENU_MAIN:Number = 1;
public static var STATE_GAME_RUN:Number = 5;
public static var ARRAY_SCORE:Array = [20, 40, 60, 80, 100, 130, 160, 190, 220, 260, 300, 340, 380, 420, 470, 520, 570, 620, 670, 800, 900, 1000, 1100, 1200, 1400, 1600, 1900, 3000, 3200, 3400, 4000, 5000];
public static var STATE_MENU_HELP:Number = 2;
public static var STATE_GAME_SHOP:Number = 6;
public static var STATE_INTRO_LOADING:Number = 0;
public function ZombieBall(){
m_stateList = new Array();
m_state = -1;
m_level = 0;
m_timerToNewBallInitial = 6000;
m_typeStickA = Define.STICK_1;
m_typeStickB = -1;
m_score = 0;
m_unlocksAvailableScore = 0;
m_unlocksAvailableScoreTOTAL = m_unlocksAvailableScore;
m_playerLevel = 0;
m_currentComboHeads = 0;
m_maxComboHeads = 0;
m_headsCut = 0;
m_playerFrequence = 0;
m_playerStrength = 0;
m_playerRecovery = 0;
m_maximumDistanceHead = 0;
changeState(STATE_INTRO_LOADING);
m_timer = new Timer(50, 0);
m_timer.addEventListener(TimerEvent.TIMER, mainGameLogic);
m_timer.start();
}
public function showCurrentState(){
if (Define.DEBUG_GENERAL){
switch (m_state){
case STATE_INTRO_LOADING:
trace("ZombieBall.m_state=STATE_INTRO_LOADING");
break;
case STATE_MENU_MAIN:
trace("ZombieBall.m_state=STATE_MENU_MAIN");
break;
case STATE_MENU_HELP:
trace("ZombieBall.m_state=STATE_MENU_HELP");
break;
case STATE_MENU_CREDITS:
trace("ZombieBall.m_state=STATE_MENU_CREDITS");
break;
case STATE_GAME_LOAD:
trace("ZombieBall.m_state=STATE_GAME_LOAD");
break;
case STATE_GAME_RUN:
trace("ZombieBall.m_state=STATE_GAME_RUN");
break;
case STATE_GAME_SHOP:
trace("ZombieBall.m_state=STATE_GAME_SHOP");
break;
};
};
}
public function getKeysPressedInGame(_arg1:KeyboardEvent):void{
if (m_state == STATE_GAME_RUN){
if (m_world != null){
if (m_world.m_state == cWorld.STATE_RUN_WAVE){
switch (_arg1.keyCode){
case 65:
m_world.insertHitKey(cWorld.KEY_HITTED_A);
break;
case 83:
m_world.insertHitKey(cWorld.KEY_HITTED_S);
break;
case Keyboard.ENTER:
case Keyboard.SPACE:
m_world.insertHitKey_NoCondition(cWorld.KEY_HITTED_PAUSE);
break;
};
};
};
};
}
public function emptyFunction():void{
m_counterToContinue--;
if (m_counterToContinue <= 0){
m_iterator = 98;
};
}
public function increaseScore(_arg1:Number):Boolean{
m_score = (m_score + _arg1);
if (m_score > ARRAY_SCORE[m_playerLevel]){
m_unlocksAvailableScore++;
m_unlocksAvailableScoreTOTAL++;
m_playerLevel++;
return (true);
};
return (false);
}
public function deleteContentScreen(){
var totalToLook:Number;
var indexToLook:Number;
var refMenuItem:IScreenItem;
try {
totalToLook = this.numChildren;
indexToLook = 0;
while (totalToLook > 0) {
try {
refMenuItem = IScreenItem(this.getChildAt(indexToLook));
try {
refMenuItem.freeResources();
} catch(error:Error) {
trace(("deleteContentScreen: (B) Trying to free a non-IScreenItem" + error));
};
try {
this.removeChild(this.getChildAt(indexToLook));
} catch(error:Error) {
trace(("deleteContentScreen: Trying to removeChild error=" + error));
};
try {
refMenuItem = null;
} catch(error:Error) {
trace(("deleteContentScreen: Trying to set to NULL error=" + error));
};
} catch(error:Error) {
indexToLook = (indexToLook + 1);
};
totalToLook = (totalToLook - 1);
};
} catch(error:Error) {
};
}
public function stopGameSounds(){
if (m_soundManager != null){
m_soundManager.stopAllGameSounds();
};
}
public function initScreenContent(){
var mainMenu:cMC_Main;
var helpPages:cMC_Help;
var creditsPages:cMC_Credits;
var shopPage:cMC_Shop;
var upgradePage:cMC_Upgrade;
switch (m_state){
case STATE_MENU_MAIN:
stopGameSounds();
mainMenu = new cMC_Main(this);
mainMenu.initScreen(null);
this.addChild(mainMenu);
break;
case STATE_MENU_HELP:
helpPages = new cMC_Help(this);
helpPages.initScreen(null);
this.addChild(helpPages);
break;
case STATE_MENU_CREDITS:
creditsPages = new cMC_Credits(this);
creditsPages.initScreen(null);
this.addChild(creditsPages);
break;
case STATE_GAME_RUN:
stopGameSounds();
m_level++;
m_world = new cWorld(this, m_timerToNewBallInitial, m_level);
this.addChild(m_world);
break;
case STATE_GAME_SHOP:
try {
if (m_world != null){
this.removeChild(m_world);
m_world = null;
};
} catch(err:Error) {
};
shopPage = new cMC_Shop(this);
shopPage.initScreen(null);
this.addChild(shopPage);
break;
case STATE_GAME_UPGRADE:
upgradePage = new cMC_Upgrade(this);
upgradePage.initScreen(null);
this.addChild(upgradePage);
break;
};
}
public function getKeysReleasedInGame(_arg1:KeyboardEvent):void{
}
public function recoverLastState(){
m_iterator = 0;
m_state = m_stateList[(m_stateList.length - 1)];
m_stateList.splice((m_stateList.length - 1), 1);
deleteContentScreen();
showCurrentState();
initScreenContent();
}
public function playGameSound(_arg1:Number, _arg2:Number){
if (m_soundManager != null){
m_soundManager.playGameSound(_arg1, _arg2);
};
}
public function changeState(_arg1:Number){
m_iterator = 0;
if (m_state != -1){
m_lastState = m_state;
m_stateList.push(new Number(m_state));
};
if (m_stateList.length > 10){
m_stateList.splice(0, 1);
};
m_state = _arg1;
deleteContentScreen();
showCurrentState();
initScreenContent();
}
public function mainGameLogic(_arg1:TimerEvent):void{
if (m_iterator < 100){
m_iterator++;
};
switch (m_state){
case STATE_INTRO_LOADING:
switch (m_iterator){
case 1:
m_soundManager = new SoundsGame();
stage.addEventListener(KeyboardEvent.KEY_DOWN, getKeysPressedInGame);
stage.addEventListener(KeyboardEvent.KEY_UP, getKeysReleasedInGame);
break;
default:
changeState(STATE_MENU_MAIN);
break;
};
break;
case STATE_MENU_MAIN:
switch (m_iterator){
case 1:
m_level = Define.INITIAL_LEVEL;
m_timerToNewBallInitial = 5000;
m_typeStickA = Define.STICK_1;
m_typeStickB = -1;
m_score = Define.INITIAL_SCORE;
m_unlocksAvailableScore = Define.INITIAL_UNLOCKS;
m_unlocksAvailableScoreTOTAL = m_unlocksAvailableScore;
m_playerLevel = Define.INITIAL_PLAYER_LEVEL;
m_currentComboHeads = 0;
m_maxComboHeads = 0;
m_headsCut = 0;
m_playerFrequence = 0;
m_playerStrength = 0;
m_playerRecovery = 0;
m_maximumDistanceHead = 0;
stopGameSounds();
playGameSound(SoundsGame.SOUNDS_MELODY_MENU, 0);
break;
};
break;
case STATE_MENU_HELP:
switch (m_iterator){
default:
break;
};
break;
case STATE_MENU_CREDITS:
switch (m_iterator){
default:
break;
};
break;
case STATE_GAME_LOAD:
switch (m_iterator){
default:
break;
};
break;
case STATE_GAME_RUN:
switch (m_iterator){
default:
m_world.logic();
break;
};
break;
case STATE_GAME_SHOP:
switch (m_iterator){
case 1:
break;
default:
break;
};
break;
case STATE_GAME_UPGRADE:
switch (m_iterator){
default:
break;
};
break;
};
}
public function getLastState():Number{
return (m_stateList[(m_stateList.length - 1)]);
}
}
}//package