Section 1
//Base64 (FOG.AS3.Base64)
package FOG.AS3 {
import flash.utils.*;
public class Base64 {
public static const version:String = "1.1.0";
private static const BASE64_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
public function Base64(){
throw (new Error("Base64 class is static container only"));
}
public static function encode(_arg1:String):String{
var _local2:ByteArray = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (encodeByteArray(_local2));
}
public static function encodeByteArray(_arg1:ByteArray):String{
var _local3:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local2 = "";
var _local4:Array = new Array(4);
_arg1.position = 0;
while (_arg1.bytesAvailable > 0) {
_local3 = new Array();
_local5 = 0;
while ((((_local5 < 3)) && ((_arg1.bytesAvailable > 0)))) {
_local3[_local5] = _arg1.readUnsignedByte();
_local5++;
};
_local4[0] = ((_local3[0] & 252) >> 2);
_local4[1] = (((_local3[0] & 3) << 4) | (_local3[1] >> 4));
_local4[2] = (((_local3[1] & 15) << 2) | (_local3[2] >> 6));
_local4[3] = (_local3[2] & 63);
_local6 = _local3.length;
while (_local6 < 3) {
_local4[(_local6 + 1)] = 64;
_local6++;
};
_local7 = 0;
while (_local7 < _local4.length) {
_local2 = (_local2 + BASE64_CHARS.charAt(_local4[_local7]));
_local7++;
};
};
return (_local2);
}
public static function decode(_arg1:String):String{
var _local2:ByteArray = decodeToByteArray(_arg1);
return (_local2.readUTFBytes(_local2.length));
}
public static function decodeToByteArray(_arg1:String):ByteArray{
var _local6:uint;
var _local7:uint;
var _local2:ByteArray = new ByteArray();
var _local3:Array = new Array(4);
var _local4:Array = new Array(3);
var _local5:uint;
while (_local5 < _arg1.length) {
_local6 = 0;
while ((((_local6 < 4)) && (((_local5 + _local6) < _arg1.length)))) {
_local3[_local6] = BASE64_CHARS.indexOf(_arg1.charAt((_local5 + _local6)));
_local6++;
};
_local4[0] = ((_local3[0] << 2) + ((_local3[1] & 48) >> 4));
_local4[1] = (((_local3[1] & 15) << 4) + ((_local3[2] & 60) >> 2));
_local4[2] = (((_local3[2] & 3) << 6) + _local3[3]);
_local7 = 0;
while (_local7 < _local4.length) {
if (_local3[(_local7 + 1)] == 64){
break;
};
_local2.writeByte(_local4[_local7]);
_local7++;
};
_local5 = (_local5 + 4);
};
_local2.position = 0;
return (_local2);
}
}
}//package FOG.AS3
Section 2
//Connect (FOG.AS3.Connect)
package FOG.AS3 {
import flash.utils.*;
import flash.external.*;
public class Connect {
public var LinkAttempts:Number;// = 0
public var User:Object;
public var Linked:Boolean;// = false
public var Core:Object;
public function Connect(_arg1:CoreAPI):void{
User = {ID:0, Name:"Guest", HighScore:0, Thumb:"", Image:""};
super();
this.Core = _arg1;
CreateLink();
}
public function GetUser():Object{
if (Linked){
User = Call("getUserData");
};
if (typeof(User) != "object"){
User = {ID:0, Name:"Guest", HighScore:0, Thumb:"", Image:""};
};
return (User);
}
public function CallDirect(_arg1:String, _arg2=false, _arg3=false){
var _local4:* = ExternalInterface.call(("fog.api." + _arg1), _arg2, _arg3);
return (_local4);
}
public function CreateLink():void{
if (Core.isFogDomain()){
LinkAttempts++;
Core.debug((" Link Attempt " + LinkAttempts));
if (ExternalInterface.available){
Linked = (CallDirect("connect", Core.config)) ? true : false;
if (Linked){
} else {
setTimeout(CreateLink, 1000);
return;
};
} else {
setTimeout(CreateLink, 500);
return;
};
};
GetUser();
}
public function Call(_arg1:String, _arg2=false, _arg3=false){
if (!Linked){
return (false);
};
return (CallDirect(_arg1, _arg2, _arg3));
}
}
}//package FOG.AS3
Section 3
//CoreAPI (FOG.AS3.CoreAPI)
package FOG.AS3 {
import flash.utils.*;
import flash.net.*;
import flash.display.*;
import flash.external.*;
import flash.system.*;
public class CoreAPI extends MovieClip {
public var Scores:Object;
public var config:Object;
private var Classes:Array;
private var Plugins:Array;
public var Root:DisplayObject;
public var Connect:Object;
public var Preloader:Object;
public var Tracking:Object;
public var enterFrameFunc:Function;
public var Storage:Object;
public var options:Object;
public var res:Array;
public var Remote:Object;
private var Token:String;
public var StageDims:Object;
public var localMode:Boolean;
public var urlInfo:Object;
public function CoreAPI(_arg1:Object):void{
var _local3:*;
var _local4:*;
var _local5:int;
var _local6:int;
var _local7:Class;
config = new Object();
options = new Object();
Classes = [Preloader, Tracking, Remote, Connect, Scores, Storage];
Plugins = ["Tracking", "Preloader", "Remote", "Connect", "Scores", "Storage"];
super();
Security.allowDomain("*");
var _local2:Object = {version:"1.2", asversion:3, debug:true, trace:true, sandbox:false, remote:false};
Root = _arg1.root;
StageDims = {w:Root.stage.stageWidth, h:Root.stage.stageHeight};
options = parseOptions(_arg1, _local2);
for (_local3 in options) {
if (((!((_local3 == "root"))) && (!((_local3 == "clip"))))){
config[_local3] = options[_local3];
};
};
urlInfo = getUrlInfo(Root.loaderInfo.url);
debug(("Initalized FOG API Version " + options.version));
for (_local4 in options.game) {
debug(((("> " + _local4) + ": ") + options.game[_local4]));
};
debug(("> sandbox: " + options.sandbox));
debug(((("> stage: " + StageDims.w) + "x") + StageDims.h));
debug(("> domain: " + urlInfo.domain));
debug(("> isfog: " + isFogDomain()));
debug(("> remote: " + options.remote));
debug("Plugins");
_local5 = 0;
_local6 = Plugins.length;
while (_local5 < _local6) {
debug(("> FOG." + Plugins[_local5]));
_local7 = (getDefinitionByName(("FOG.AS3." + Plugins[_local5])) as Class);
this[Plugins[_local5]] = new _local7(this);
if (((options[Plugins[_local5]]) && (this[Plugins[_local5]].Options))){
this[Plugins[_local5]].Options = parseOptions(options[Plugins[_local5]], this[Plugins[_local5]].Options);
};
_local5++;
};
if (this.Connect){
Token = Base64.encode(((((((options.game.id + ":") + options.game.title) + ":") + options.game.fogid) + ":") + options.game.key));
debug("FOG Connect (Javascript)");
debug(("> token: " + Token));
debug(("> linked: " + Connect.Linked));
debug((((("> user: " + Connect.User.Name) + " [") + Connect.User.ID) + "]"));
debug(("> highscore: " + Connect.User.HighScore));
};
}
public function Read(_arg1:String){
return (this[_arg1]);
}
public function getUrlInfo(_arg1:String):Object{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
localMode = new RegExp("file://").test(_arg1);
var _local2 = "";
var _local3 = "";
if (localMode){
_local2 = "local";
_local3 = "";
} else {
_local4 = (_arg1.indexOf("://") + 3);
_local5 = _arg1.indexOf("/", _local4);
_local2 = _arg1.substring(_local4, _local5);
_local6 = (_local2.lastIndexOf(".") - 1);
_local7 = (_local2.lastIndexOf(".", _local6) + 1);
_local3 = _arg1.substr(_local5);
};
return ({domain:_local2, uri:_local3});
}
public function isFogDomain():Boolean{
return (((urlInfo.domain.indexOf("freeonlinegames.com") > -1)) ? true : false);
}
public function debug(_arg1, _arg2:String=""):void{
if (isFogDomain()){
if (ExternalInterface.available){
ExternalInterface.call("fog.api.debug", _arg1, _arg2);
};
};
if (((!(_arg2)) && (options.debug))){
if (_arg1.indexOf(">") === 0){
trace(_arg1);
} else {
trace(" ");
trace(_arg1);
};
};
}
private function getDims(_arg1:Object):Array{
var _local2:int;
var _local3:int;
_local2 = Root.stage.stageWidth;
_local3 = Root.stage.stageHeight;
_arg1.game.dims = {w:_local2, h:_local3};
return ([_local2, _local3]);
}
private function parseOptions(_arg1:Object, _arg2:Object):Object{
var _local4:String;
var _local3:Object = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
return (_local3);
}
}
}//package FOG.AS3
Section 4
//JSON (FOG.AS3.JSON)
package FOG.AS3 {
public class JSON {
public static function encode(_arg1):String{
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local6:*;
var _local7:String;
var _local8:Number;
var _local5 = "";
switch (typeof(_arg1)){
case "object":
if (_arg1){
if ((_arg1 is Array)){
_local4 = _arg1.length;
_local3 = 0;
while (_local3 < _local4) {
_local6 = encode(_arg1[_local3]);
if (_local5){
_local5 = (_local5 + ",");
};
_local5 = (_local5 + _local6);
_local3++;
};
return ((("[" + _local5) + "]"));
} else {
if (typeof(_arg1.toString) != "undefined"){
for (_local7 in _arg1) {
_local6 = _arg1[_local7];
if (((!((typeof(_local6) == "undefined"))) && (!((typeof(_local6) == "function"))))){
_local6 = encode(_local6);
if (_local5){
_local5 = (_local5 + ",");
};
_local5 = (_local5 + ((encode(_local7) + ":") + _local6));
};
};
return ((("{" + _local5) + "}"));
};
};
};
return ("null");
case "number":
return ((isFinite(_arg1)) ? String(_arg1) : "null");
case "string":
_local4 = _arg1.length;
_local5 = "\"";
_local3 = 0;
while (_local3 < _local4) {
_local2 = _arg1.charAt(_local3);
if (_local2 >= " "){
if ((((_local2 == "\\")) || ((_local2 == "\"")))){
_local5 = (_local5 + "\\");
};
_local5 = (_local5 + _local2);
} else {
switch (_local2){
case "\b":
_local5 = (_local5 + "\\b");
break;
case "\f":
_local5 = (_local5 + "\\f");
break;
case "\n":
_local5 = (_local5 + "\\n");
break;
case "\r":
_local5 = (_local5 + "\\r");
break;
case "\t":
_local5 = (_local5 + "\\t");
break;
default:
_local8 = _local2.charCodeAt();
_local5 = (_local5 + (("\\u00" + Math.floor((_local8 / 16)).toString(16)) + (_local8 % 16).toString(16)));
};
};
_local3 = (_local3 + 1);
};
return ((_local5 + "\""));
case "boolean":
return (String(_arg1));
default:
return ("null");
};
}
public static function decode(_arg1:String){
var at:Number;
var ch:String;
var _isDigit:Function;
var _isHexDigit:Function;
var _white:Function;
var _string:Function;
var _next:Function;
var _array:Function;
var _object:Function;
var _number:Function;
var _word:Function;
var _value:Function;
var _error:Function;
var source = _arg1;
source = new String(source);
at = 0;
ch = " ";
_isDigit = function (_arg1:String){
return (((("0" <= _arg1)) && ((_arg1 <= "9"))));
};
_isHexDigit = function (_arg1:String){
return (((((_isDigit(_arg1)) || (((("A" <= _arg1)) && ((_arg1 <= "F")))))) || (((("a" <= _arg1)) && ((_arg1 <= "f"))))));
};
_error = function (_arg1:String):void{
throw (new Error(_arg1, (at - 1)));
};
_next = function (){
ch = source.charAt(at);
at = (at + 1);
return (ch);
};
_white = function ():void{
while (ch) {
if (ch <= " "){
_next();
} else {
if (ch == "/"){
switch (_next()){
case "/":
do {
} while (((((_next()) && (!((ch == "\n"))))) && (!((ch == "\r")))));
break;
case "*":
_next();
while (true) {
if (ch){
if (ch == "*"){
if (_next() == "/"){
_next();
break;
};
} else {
_next();
};
} else {
_error("Unterminated Comment");
};
};
break;
default:
_error("Syntax Error");
};
} else {
break;
};
};
};
};
_string = function (){
var _local3:*;
var _local4:*;
var _local1:* = "";
var _local2:* = "";
var _local5:Boolean;
if (ch == "\""){
while (_next()) {
if (ch == "\""){
_next();
return (_local2);
};
if (ch == "\\"){
switch (_next()){
case "b":
_local2 = (_local2 + "\b");
break;
case "f":
_local2 = (_local2 + "\f");
break;
case "n":
_local2 = (_local2 + "\n");
break;
case "r":
_local2 = (_local2 + "\r");
break;
case "t":
_local2 = (_local2 + "\t");
break;
case "u":
_local4 = 0;
_local1 = 0;
while (_local1 < 4) {
_local3 = parseInt(_next(), 16);
if (!isFinite(_local3)){
_local5 = true;
break;
};
_local4 = ((_local4 * 16) + _local3);
_local1 = (_local1 + 1);
};
if (_local5){
_local5 = false;
break;
};
_local2 = (_local2 + String.fromCharCode(_local4));
break;
default:
_local2 = (_local2 + ch);
};
} else {
_local2 = (_local2 + ch);
};
};
};
_error("Bad String");
return (null);
};
_array = function (){
var _local1:Array = [];
if (ch == "["){
_next();
_white();
if (ch == "]"){
_next();
return (_local1);
};
while (ch) {
_local1.push(_value());
_white();
if (ch == "]"){
_next();
return (_local1);
};
if (ch != ","){
break;
};
_next();
_white();
};
};
_error("Bad Array");
return (null);
};
_object = function (){
var _local1:* = {};
var _local2:* = {};
if (ch == "{"){
_next();
_white();
if (ch == "}"){
_next();
return (_local2);
};
while (ch) {
_local1 = _string();
_white();
if (ch != ":"){
break;
};
_next();
_local2[_local1] = _value();
_white();
if (ch == "}"){
_next();
return (_local2);
};
if (ch != ","){
break;
};
_next();
_white();
};
};
_error("Bad Object");
};
_number = function (){
var _local2:*;
var _local1:* = "";
var _local3 = "";
var _local4 = "";
if (ch == "-"){
_local1 = "-";
_local4 = _local1;
_next();
};
if (ch == "0"){
_next();
if ((((ch == "x")) || ((ch == "X")))){
_next();
while (_isHexDigit(ch)) {
_local3 = (_local3 + ch);
_next();
};
if (_local3 == ""){
_error("mal formed Hexadecimal");
} else {
return (Number(((_local4 + "0x") + _local3)));
};
} else {
_local1 = (_local1 + "0");
};
};
while (_isDigit(ch)) {
_local1 = (_local1 + ch);
_next();
};
if (ch == "."){
_local1 = (_local1 + ".");
while (((((_next()) && ((ch >= "0")))) && ((ch <= "9")))) {
_local1 = (_local1 + ch);
};
};
_local2 = (1 * _local1);
if (!isFinite(_local2)){
_error("Bad Number");
} else {
return (_local2);
};
return (NaN);
};
_word = function (){
switch (ch){
case "t":
if ((((((_next() == "r")) && ((_next() == "u")))) && ((_next() == "e")))){
_next();
return (true);
};
break;
case "f":
if ((((((((_next() == "a")) && ((_next() == "l")))) && ((_next() == "s")))) && ((_next() == "e")))){
_next();
return (false);
};
break;
case "n":
if ((((((_next() == "u")) && ((_next() == "l")))) && ((_next() == "l")))){
_next();
return (null);
};
break;
};
_error("Syntax Error");
return (null);
};
_value = function (){
_white();
switch (ch){
case "{":
return (_object());
case "[":
return (_array());
case "\"":
return (_string());
case "-":
return (_number());
default:
return (((((ch >= "0")) && ((ch <= "9")))) ? _number() : _word());
};
};
return (_value());
}
}
}//package FOG.AS3
Section 5
//Preloader (FOG.AS3.Preloader)
package FOG.AS3 {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.system.*;
public class Preloader {
public var Root:MovieClip;
public var BG:Sprite;
public var onComplete:Function;
public var Prel:PreloaderClip;
public var Logo:LogoSpin;
public var Foggy:MovieClip;
public var FrameInc:Number;// = 0
public var GotoGameOnClick:Boolean;// = false
public var FoggyBG:Sprite;
public var Percent:Number;// = 0
public var TimerEnd:Number;
public var Notice:MovieClip;
public var TimerStart:Number;
public var Options:Object;
public var Core:CoreAPI;
public function Preloader(_arg1):void{
Options = {duration:3000, density:10, clickable:true, locked:false, domains:["freeonlinegames.com"]};
onComplete = function (_arg1:CoreAPI):void{
MovieClip(_arg1.Root).play();
};
super();
Core = _arg1;
Root = _arg1.Root;
}
private function showProgress(_arg1:Event):void{
Prel.percentGame = Math.floor(((Root.loaderInfo.bytesLoaded / Root.loaderInfo.bytesTotal) * 100));
Prel.percentDura = Math.floor((((getTimer() - TimerStart) / Prel.dura) * 100));
Percent = Math.min(Math.min(Prel.percentGame, Prel.percentDura), 100);
Prel.procent.text = Math.round(Percent).toString();
Prel.ProgBar.width = (Math.round(Percent) * 0.98);
if (Percent > 99){
PlayBranding();
};
loadingBar(_arg1);
}
private function loadingBar(_arg1:Event):void{
var _local2:LogoFly;
if ((FrameInc++ % Math.round((Root.stage.frameRate / Options.density))) === 0){
_local2 = new LogoFly();
_local2.cacheAsBitmap = true;
_local2.x = (Core.StageDims.w / 2);
_local2.y = (Core.StageDims.h / 2);
_local2.scaleX = (_local2.scaleY = 0);
_local2.gotoAndStop(((Math.random() * 10) + 1));
_local2.speed = 100;
_local2.alpha = 0;
_local2.grow = (Math.random() / 100);
_local2.fade = false;
_local2.targetX = (Math.random() * 10);
if (_local2.targetX < 5){
_local2.targetX = (Math.random() * 10);
if (_local2.targetX < 5){
_local2.targetX = -100;
} else {
_local2.targetX = (Core.StageDims.w + 100);
};
_local2.targetY = (Math.random() * Core.StageDims.h);
} else {
_local2.targetY = (Math.random() * 10);
if (_local2.targetY < 5){
_local2.targetY = -100;
} else {
_local2.targetY = (Core.StageDims.h + 100);
};
_local2.targetX = (Math.random() * Core.StageDims.w);
};
BG.addChild(_local2);
_local2.addEventListener(Event.ENTER_FRAME, FOGFly);
};
}
public function Start():void{
var tf:TextField;
var ctxMenu:ContextMenu = new ContextMenu();
ctxMenu.hideBuiltInItems();
var ctx3:ContextMenuItem = new ContextMenuItem("Play More Games");
ctx3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function (_arg1:ContextMenuEvent):void{
Core.Tracking.Click();
});
var ctx4:ContextMenuItem = new ContextMenuItem("Free Games For Your Website");
ctx4.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function (_arg1:ContextMenuEvent):void{
Core.Tracking.Click("http://www.freegamesforyourwebsite.com/");
});
var ctx1:ContextMenuItem = new ContextMenuItem("Copyright © Free Online Games");
ctx1.enabled = false;
ctx1.separatorBefore = true;
var ctx2:ContextMenuItem = new ContextMenuItem(("FOG API Version " + Core.options.version));
ctx2.enabled = false;
var ctx5:ContextMenuItem = new ContextMenuItem("Clear Local Flash API Storage");
ctx5.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, function (_arg1:ContextMenuEvent):void{
Core.Storage.Clear();
});
ctx5.separatorBefore = true;
ctxMenu.customItems.push(ctx3, ctx4, ctx1, ctx2, ctx5);
Root.contextMenu = ctxMenu;
BG = new Sprite();
BG.graphics.beginFill(0);
BG.graphics.drawRect(0, 0, Core.StageDims.w, Core.StageDims.h);
BG.graphics.endFill();
BG.addChild(new BackgroundGraphic());
Root.addChild(BG);
Logo = new LogoSpin();
Logo.stop();
Logo.x = (Core.StageDims.w / 2);
Logo.y = ((Core.StageDims.h / 2) - 30);
Root.addChild(Logo);
Prel = new PreloaderClip();
Prel.dura = Options.duration;
Prel.x = (Core.StageDims.w / 2);
Prel.y = ((Core.StageDims.h / 2) + 50);
Root.addChild(Prel);
Foggy = new MovieClip();
FoggyBG = new Sprite();
FoggyBG.graphics.beginFill(0);
FoggyBG.graphics.drawRect(0, 0, Core.StageDims.w, Core.StageDims.h);
FoggyBG.graphics.endFill();
Foggy.addChild(FoggyBG);
Foggy.width = Core.StageDims.w;
Foggy.height = Core.StageDims.h;
Foggy.alpha = 0;
Foggy.addEventListener(MouseEvent.CLICK, LoaderClicked);
Foggy.buttonMode = true;
Root.addChild(Foggy);
Root.stop();
TimerStart = getTimer();
Foggy.addEventListener(Event.ENTER_FRAME, showProgress);
if (Core.options.sandbox){
tf = new TextField();
tf.textColor = 0xFFFFFF;
tf.text = ("Sandbox Type: " + Security.sandboxType);
tf.x = 10;
tf.y = 10;
tf.width = 300;
Root.addChild(tf);
};
}
public function DomainHasAccess():Boolean{
var _local1:Array = Options.domains;
var _local2:Boolean;
Core.debug("Allowed on domains");
var _local3:int;
var _local4:int = _local1.length;
while (_local3 < _local4) {
Core.debug(("> " + _local1[_local3]));
if (Core.urlInfo.domain.indexOf(_local1[_local3]) > -1){
_local2 = true;
};
_local3++;
};
if (((!(_local2)) && (Options.locked))){
if (Core.options.sandbox){
Core.debug("> Sandbox Overide");
return (true);
};
return (false);
//unresolved jump
};
return (true);
}
private function PlayBranding():void{
var _local1:Sound;
Foggy.removeEventListener(Event.ENTER_FRAME, showProgress);
TimerEnd = getTimer();
Core.debug((("Game loaded in " + (Math.round(((TimerEnd - TimerStart) / 10)) / 100)) + " seconds"));
Core.debug(("> Filesize: " + Core.Root.loaderInfo.bytesTotal));
Logo.play();
if (DomainHasAccess()){
_local1 = new VoiceOver();
_local1.play();
setTimeout(End, 4000);
} else {
Prel.visible = false;
Notice = new LockedNotice();
Notice.x = (Core.StageDims.w / 2);
Notice.y = Prel.y;
Root.addChild(Notice);
};
}
public function LoaderClicked(_arg1:MouseEvent):void{
if (GotoGameOnClick){
Core.Tracking.Click(Core.Tracking.GamePlayURL);
} else {
Core.Tracking.Click();
};
}
private function FOGFly(_arg1:Event):void{
var _local2:Object = _arg1.currentTarget;
_local2.x = (_local2.x + (((_local2.targetX - _local2.x) / _local2.speed) * 0.5));
_local2.y = (_local2.y + (((_local2.targetY - _local2.y) / _local2.speed) * 0.5));
_local2.speed = (_local2.speed * 0.99);
_local2.scaleX = (_local2.scaleY = (_local2.scaleY + (_local2.grow * 2)));
if ((((_local2.alpha < 1)) && (!(_local2.fade)))){
_local2.alpha = (_local2.alpha + 0.01);
};
if ((((((((((_local2.x < -50)) || ((_local2.y < -50)))) || ((_local2.x > (Core.StageDims.w + 50))))) || ((_local2.y > (Core.StageDims.h + 50))))) || ((_local2.scaleX > 2)))){
_local2.fade = true;
};
if (_local2.fade){
_local2.alpha = (_local2.alpha - 0.05);
if (_local2.alpha <= 0){
_local2.removeEventListener(Event.ENTER_FRAME, FOGFly);
_local2.parent.removeChild(_local2);
};
};
}
private function End(_arg1:Boolean=false):void{
Foggy.removeEventListener(MouseEvent.CLICK, LoaderClicked);
Root.removeChild(Foggy);
Root.removeChild(BG);
Root.removeChild(Prel);
Root.removeChild(Logo);
onComplete(Core);
if (((Core.Remote) && (Core.options.remote))){
Core.Remote.Connect();
};
}
}
}//package FOG.AS3
Section 6
//Remote (FOG.AS3.Remote)
package FOG.AS3 {
import flash.events.*;
import flash.net.*;
import flash.display.*;
import flash.system.*;
public class Remote {
public var LibFile:String;// = "api/library.swf"
public var Server:String;// = "x.fogdev.com"
public var rLoader:Loader;
public var LibPath:String;// = ""
public var Library:MovieClip;
public var rRequest:URLRequest;
public var Core:Object;
public function Remote(_arg1:CoreAPI):void{
this.Core = _arg1;
}
public function Connect():void{
if (Core.Connect.Linked){
return;
};
Security.allowDomain(Server);
Security.loadPolicyFile((("http://" + Server) + "/crossdomain.xml"));
LibPath = ((((((("http://" + Server) + "/") + LibFile) + "?v=") + Core.options.version) + "&c=") + Math.random());
Core.debug("Remote Tracking");
Core.debug(("> " + LibPath));
rLoader = new Loader();
rRequest = new URLRequest(LibPath);
rLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, function (_arg1:Event):void{
Library = MovieClip(_arg1.target.content);
Library.Connect(Core);
});
rLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
Core.debug(("> " + _arg1.text));
});
rLoader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, function (_arg1:HTTPStatusEvent):void{
Core.debug(("> " + _arg1.status));
});
rLoader.load(rRequest);
}
}
}//package FOG.AS3
Section 7
//Scores (FOG.AS3.Scores)
package FOG.AS3 {
public class Scores {
public var CryptScore:String;// = ""
public var HighScore:Number;// = 0
public var Score:Number;// = 0
public var Debug:Boolean;// = true
public var Options:Object;
public var Core:Object;
public function Scores(_arg1:CoreAPI):void{
Options = {order:"DESC", type:"INT"};
super();
this.Core = _arg1;
if (!Core.Connect){
throw (new Error("You cannot use FogAPI.Scores Plugin without loading FogAPI.Connect Plugin first"));
};
}
public function GetScoreKey(_arg1:Number):String{
return (Base64.encode(((Core.Read("Token") + ":") + _arg1)));
}
public function Update(_arg1:Number, _arg2:Boolean=true):Boolean{
if (_arg1 != Score){
HighScore = Core.Connect.User.HighScore;
Score = _arg1;
if (Debug){
Core.debug((((((((("Score Update: " + Options.order) + " - ") + Score) + " - ") + HighScore) + " (") + _arg2) + ")"));
};
if (((Options.order == "DESC")) ? (Score > HighScore) : (((Score < HighScore)) || ((HighScore === 0)))){
if (_arg2){
Save();
};
HighScore = Score;
Core.Connect.User.HighScore = HighScore;
};
if (Core.Connect.Linked){
Core.Connect.Call("scores.update", Score);
};
};
return (true);
}
public function Publish(_arg1:Boolean=false):void{
CryptScore = GetScoreKey(Score);
if (Core.Connect.Linked){
Core.Connect.Call("scores.publish", CryptScore, _arg1);
} else {
if (Debug){
Core.debug(((("Publishing Score: " + Score) + " - ") + CryptScore));
};
Core.Tracking.Click(Core.Tracking.GamePlayURL);
};
}
public function Scoreboard():void{
if (Core.Connect.Linked){
Core.Connect.Call("scores.scoreboard");
} else {
Core.Tracking.Click(Core.Tracking.ScoreboardURL);
};
}
public function Save():void{
if (Core.Connect.Linked){
Core.Connect.Call("scores.save", GetScoreKey(Score));
};
}
}
}//package FOG.AS3
Section 8
//Storage (FOG.AS3.Storage)
package FOG.AS3 {
import flash.net.*;
public class Storage {
public var CurrentData:String;// = ""
public var DataID:String;// = ""
public var Locals:Array;
public var Connected:Boolean;// = false
public var Data:SharedObject;
public var LastSave:String;// = ""
public var Core:Object;
public function Storage(_arg1:CoreAPI):void{
Locals = new Array();
super();
Core = _arg1;
if (!Core.Connect){
throw (new Error("You cannot use FogAPI.Storage Plugin without loading FogAPI.Connect Plugin first"));
};
DataID = ((Core.options.game.fogid + ".") + Core.Connect.User.ID);
Data = SharedObject.getLocal(DataID);
}
public function Set(_arg1, _arg2=true, _arg3:Boolean=true):Boolean{
var _local4:*;
if (typeof(_arg1) == "object"){
for (_local4 in _arg1) {
_arg1[_local4] = Set(_local4, _arg1[_local4]);
};
return (_arg1);
};
Data.data[_arg1] = _arg2;
if (_arg3){
Save();
};
return (true);
}
public function Decode(_arg1:String):Object{
var _local2:String = _arg1;
var _local3:String = Base64.decode(_local2);
var _local4:Object = JSON.decode(_local3);
return (_local4);
}
public function Load(_arg1=""):Boolean{
var _local2:*;
var _local4:String;
var _local5:SharedObject;
var _local6:*;
Connected = true;
Core.debug("Attempting to load Storage");
if (!Core.Connect.Linked){
_local2 = "";
} else {
_local2 = Core.Connect.Call("storage.load", Core.options.game.fogid);
};
if (!_local2){
Core.debug("> Could not load storage. Reverting to local flash storage");
Core.debug((("> Loaded " + Data.size) + " bytes from local memory"));
return (false);
};
Core.debug((("> Loaded " + _local2.length) + " bytes of data from FogAPI Server"));
Clear(false);
var _local3:Object = Decode(_local2);
for (_local4 in _local3) {
if (_local4.indexOf("_") === 0){
_local5 = GetLocal(_local4.substr(1));
for (_local6 in _local3[_local4]) {
_local5.data[_local6] = _local3[_local4][_local6];
};
} else {
Data.data[_local4] = _local3[_local4];
};
};
if (_arg1){
_arg1(_local2);
};
return (true);
}
public function Encode(_arg1):String{
var _local2:* = _arg1;
_local2 = JSON.encode(_local2);
_local2 = Base64.encode(_local2);
return (_local2);
}
public function GetLocal(_arg1:String=""):SharedObject{
var _local2:SharedObject = SharedObject.getLocal(((DataID + ".") + _arg1));
Locals.push([_arg1, _local2]);
return (_local2);
}
public function Get(_arg1:String){
return (Data.data[_arg1]);
}
public function Sync():void{
var _local1:int;
var _local2:int = Locals.length;
while (_local1 < _local2) {
Set(("_" + Locals[_local1][0]), Locals[_local1][1].data, false);
_local1++;
};
Save();
}
public function Clear(_arg1:Boolean=true):void{
var _local2:int;
var _local3:int = Locals.length;
while (_local2 < _local3) {
Locals[_local2][1].clear();
_local2++;
};
Data.clear();
if (_arg1){
Save();
};
}
public function Save():Boolean{
if (!Connected){
throw (new Error("You can't save data to the server when the game is not synced. Please use FogAPI.Storage.Load() to Initialize Sync"));
};
CurrentData = Encode(Data.data);
Core.debug((("Saving " + CurrentData.length) + " bytes of data"));
if (!Core.Connect.Linked){
Core.debug("> to Flash Local");
return (false);
};
Core.debug("> to FogAPI Server");
if (CurrentData != LastSave){
LastSave = CurrentData;
return ((Core.Connect.Call("storage.save", Core.options.game.fogid, CurrentData)) ? true : false);
//unresolved jump
};
return (true);
}
}
}//package FOG.AS3
Section 9
//Tracking (FOG.AS3.Tracking)
package FOG.AS3 {
import flash.net.*;
public class Tracking {
public var GamePlayURL:String;// = "http://www.freeonlinegames.com/{$game.category}/{$game.name}.html"
public var DefaultURL:String;// = "http://www.freeonlinegames.com/"
public var FreeGamesURL:String;// = "http://www.freegamesforyourwebsite.com/"
public var ScoreboardURL:String;// = "http://www.freeonlinegames.com/scores/{$game.name}.html"
public var Core:Object;
public function Tracking(_arg1:CoreAPI):void{
this.Core = _arg1;
}
public function Click(_arg1:String=""):Boolean{
var _local2:String = (_arg1) ? _arg1 : DefaultURL;
_local2 = _local2.replace("{$game.name}", Core.options.game.name);
_local2 = _local2.replace("{$game.category}", Core.options.game.category);
var _local3:String = ((("?utm_source=" + Core.urlInfo.domain) + "&utm_medium=api-game&utm_campaign=") + Core.options.game.name);
var _local4:String = (_local2 + _local3);
Core.debug("Tracking..");
Core.debug(("> " + _local4));
if (Core.options.sandbox){
return (false);
};
navigateToURL(new URLRequest(_local4), "_blank");
return (true);
}
public function RegisterEvent(_arg1:String):void{
}
}
}//package FOG.AS3
Section 10
//chavs1_102 (high_fla.chavs1_102)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class chavs1_102 extends MovieClip {
public function chavs1_102(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 11
//chavs1_103 (high_fla.chavs1_103)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class chavs1_103 extends MovieClip {
public function chavs1_103(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 12
//chavs1_104 (high_fla.chavs1_104)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class chavs1_104 extends MovieClip {
public function chavs1_104(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 13
//chavs1_105 (high_fla.chavs1_105)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class chavs1_105 extends MovieClip {
public function chavs1_105(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 14
//chavs1_106 (high_fla.chavs1_106)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class chavs1_106 extends MovieClip {
public function chavs1_106(){
addFrameScript(29, frame30);
}
function frame30(){
this.parent.dispatchEvent(new Event("DieOver"));
stop();
}
}
}//package high_fla
Section 15
//chavs1_202 (high_fla.chavs1_202)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class chavs1_202 extends MovieClip {
public function chavs1_202(){
addFrameScript(29, frame30);
}
function frame30(){
this.parent.dispatchEvent(new Event("DieOver"));
stop();
}
}
}//package high_fla
Section 16
//chavs2_200 (high_fla.chavs2_200)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class chavs2_200 extends MovieClip {
public function chavs2_200(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 17
//chavs2_201 (high_fla.chavs2_201)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class chavs2_201 extends MovieClip {
public function chavs2_201(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 18
//chavs3_188 (high_fla.chavs3_188)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class chavs3_188 extends MovieClip {
public function chavs3_188(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 19
//chavs3_189 (high_fla.chavs3_189)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class chavs3_189 extends MovieClip {
public function chavs3_189(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 20
//chavs3_190 (high_fla.chavs3_190)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class chavs3_190 extends MovieClip {
public function chavs3_190(){
addFrameScript(29, frame30);
}
function frame30(){
this.parent.dispatchEvent(new Event("DieOver"));
stop();
}
}
}//package high_fla
Section 21
//emos_134 (high_fla.emos_134)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class emos_134 extends MovieClip {
public function emos_134(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 22
//emos_135 (high_fla.emos_135)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class emos_135 extends MovieClip {
public function emos_135(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 23
//Emos_137 (high_fla.Emos_137)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Emos_137 extends MovieClip {
public function Emos_137(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 24
//Emos_138 (high_fla.Emos_138)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Emos_138 extends MovieClip {
public function Emos_138(){
addFrameScript(29, frame30);
}
function frame30(){
this.parent.dispatchEvent(new Event("DieOver"));
stop();
}
}
}//package high_fla
Section 25
//Emos_142 (high_fla.Emos_142)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Emos_142 extends MovieClip {
public function Emos_142(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 26
//Emos_143 (high_fla.Emos_143)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Emos_143 extends MovieClip {
public function Emos_143(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 27
//emos_144 (high_fla.emos_144)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class emos_144 extends MovieClip {
public function emos_144(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 28
//emos_150 (high_fla.emos_150)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class emos_150 extends MovieClip {
public function emos_150(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 29
//emos_151 (high_fla.emos_151)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class emos_151 extends MovieClip {
public function emos_151(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 30
//Emos_153 (high_fla.Emos_153)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Emos_153 extends MovieClip {
public function Emos_153(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 31
//Emos_154 (high_fla.Emos_154)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Emos_154 extends MovieClip {
public function Emos_154(){
addFrameScript(29, frame30);
}
function frame30(){
this.parent.dispatchEvent(new Event("DieOver"));
stop();
}
}
}//package high_fla
Section 32
//emos1_145 (high_fla.emos1_145)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class emos1_145 extends MovieClip {
public function emos1_145(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 33
//emos1_146 (high_fla.emos1_146)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class emos1_146 extends MovieClip {
public function emos1_146(){
addFrameScript(29, frame30);
}
function frame30(){
this.parent.dispatchEvent(new Event("DieOver"));
stop();
}
}
}//package high_fla
Section 34
//emos2_136 (high_fla.emos2_136)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class emos2_136 extends MovieClip {
public function emos2_136(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 35
//Hoodies_118 (high_fla.Hoodies_118)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Hoodies_118 extends MovieClip {
public function Hoodies_118(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 36
//Hoodies_119 (high_fla.Hoodies_119)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Hoodies_119 extends MovieClip {
public function Hoodies_119(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 37
//Hoodies_126 (high_fla.Hoodies_126)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Hoodies_126 extends MovieClip {
public function Hoodies_126(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 38
//Hoodies_127 (high_fla.Hoodies_127)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Hoodies_127 extends MovieClip {
public function Hoodies_127(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 39
//Hoodies1_110 (high_fla.Hoodies1_110)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Hoodies1_110 extends MovieClip {
public function Hoodies1_110(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 40
//Hoodies1_111 (high_fla.Hoodies1_111)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Hoodies1_111 extends MovieClip {
public function Hoodies1_111(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 41
//hoodies1_112 (high_fla.hoodies1_112)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class hoodies1_112 extends MovieClip {
public function hoodies1_112(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 42
//hoodies1_113 (high_fla.hoodies1_113)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class hoodies1_113 extends MovieClip {
public function hoodies1_113(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 43
//hoodies1_114 (high_fla.hoodies1_114)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class hoodies1_114 extends MovieClip {
public function hoodies1_114(){
addFrameScript(29, frame30);
}
function frame30(){
this.parent.dispatchEvent(new Event("DieOver"));
stop();
}
}
}//package high_fla
Section 44
//hoodies2_120 (high_fla.hoodies2_120)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class hoodies2_120 extends MovieClip {
public function hoodies2_120(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 45
//hoodies2_121 (high_fla.hoodies2_121)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class hoodies2_121 extends MovieClip {
public function hoodies2_121(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 46
//hoodies2_122 (high_fla.hoodies2_122)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class hoodies2_122 extends MovieClip {
public function hoodies2_122(){
addFrameScript(29, frame30);
}
function frame30(){
this.parent.dispatchEvent(new Event("DieOver"));
stop();
}
}
}//package high_fla
Section 47
//hoodies3_128 (high_fla.hoodies3_128)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class hoodies3_128 extends MovieClip {
public function hoodies3_128(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 48
//hoodies3_129 (high_fla.hoodies3_129)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class hoodies3_129 extends MovieClip {
public function hoodies3_129(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 49
//hoodies3_130 (high_fla.hoodies3_130)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class hoodies3_130 extends MovieClip {
public function hoodies3_130(){
addFrameScript(29, frame30);
}
function frame30(){
this.parent.dispatchEvent(new Event("DieOver"));
stop();
}
}
}//package high_fla
Section 50
//joceks1_161 (high_fla.joceks1_161)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class joceks1_161 extends MovieClip {
public function joceks1_161(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 51
//Jockes1_162 (high_fla.Jockes1_162)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Jockes1_162 extends MovieClip {
public function Jockes1_162(){
addFrameScript(29, frame30);
}
function frame30(){
this.parent.dispatchEvent(new Event("DieOver"));
stop();
}
}
}//package high_fla
Section 52
//Jockes2_169 (high_fla.Jockes2_169)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Jockes2_169 extends MovieClip {
public function Jockes2_169(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 53
//jocks_158 (high_fla.jocks_158)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class jocks_158 extends MovieClip {
public function jocks_158(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 54
//jocks_159 (high_fla.jocks_159)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class jocks_159 extends MovieClip {
public function jocks_159(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 55
//Jocks_166 (high_fla.Jocks_166)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Jocks_166 extends MovieClip {
public function Jocks_166(){
addFrameScript(18, frame19);
}
function frame19(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 56
//Jocks_167 (high_fla.Jocks_167)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Jocks_167 extends MovieClip {
public function Jocks_167(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 57
//jocks_174 (high_fla.jocks_174)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class jocks_174 extends MovieClip {
public function jocks_174(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 58
//jocks_175 (high_fla.jocks_175)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class jocks_175 extends MovieClip {
public function jocks_175(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 59
//jocks_176 (high_fla.jocks_176)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class jocks_176 extends MovieClip {
public function jocks_176(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 60
//Jocks1_160 (high_fla.Jocks1_160)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Jocks1_160 extends MovieClip {
public function Jocks1_160(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 61
//jocks1_177 (high_fla.jocks1_177)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class jocks1_177 extends MovieClip {
public function jocks1_177(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 62
//jocks2_168 (high_fla.jocks2_168)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class jocks2_168 extends MovieClip {
public function jocks2_168(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 63
//JOcks2_170 (high_fla.JOcks2_170)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class JOcks2_170 extends MovieClip {
public function JOcks2_170(){
addFrameScript(29, frame30);
}
function frame30(){
this.parent.dispatchEvent(new Event("DieOver"));
stop();
}
}
}//package high_fla
Section 64
//Jocks3_178 (high_fla.Jocks3_178)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Jocks3_178 extends MovieClip {
public function Jocks3_178(){
addFrameScript(29, frame30);
}
function frame30(){
this.parent.dispatchEvent(new Event("DieOver"));
stop();
}
}
}//package high_fla
Section 65
//Timeline_152 (high_fla.Timeline_152)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Timeline_152 extends MovieClip {
public function Timeline_152(){
addFrameScript(11, frame12);
}
function frame12(){
this.parent.dispatchEvent(new Event("HurtOver"));
}
}
}//package high_fla
Section 66
//Timeline_186 (high_fla.Timeline_186)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Timeline_186 extends MovieClip {
public function Timeline_186(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 67
//Timeline_187 (high_fla.Timeline_187)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Timeline_187 extends MovieClip {
public function Timeline_187(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 68
//Timeline_198 (high_fla.Timeline_198)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Timeline_198 extends MovieClip {
public function Timeline_198(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 69
//Timeline_199 (high_fla.Timeline_199)
package high_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Timeline_199 extends MovieClip {
public function Timeline_199(){
addFrameScript(20, frame21);
}
function frame21(){
this.parent.dispatchEvent(new Event("HitOver"));
}
}
}//package high_fla
Section 70
//Timeline_23 (high_fla.Timeline_23)
package high_fla {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
import flash.media.*;
import flash.text.*;
import flash.external.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Timeline_23 extends MovieClip {
public var back:SimpleButton;
public var team1:SimpleButton;
public var team2:SimpleButton;
public var team3:SimpleButton;
public var team4:SimpleButton;
public var ml:MiniLogo;
public function Timeline_23(){
addFrameScript(0, frame1);
}
function frame1(){
ml.addEventListener(MouseEvent.CLICK, mlCLICK);
}
public function mlCLICK(_arg1:MouseEvent):void{
MovieClip(root).FogAPI.Tracking.Click();
}
}
}//package high_fla
Section 71
//Timeline_48 (high_fla.Timeline_48)
package high_fla {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
import flash.media.*;
import flash.text.*;
import flash.external.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Timeline_48 extends MovieClip {
public var playAgain:SimpleButton;
public var ml:MiniLogo;
public var playMore:SimpleButton;
public var addGame:SimpleButton;
public function Timeline_48(){
addFrameScript(0, frame1);
}
function frame1(){
addGame.addEventListener(MouseEvent.CLICK, addGameClick);
playMore.addEventListener(MouseEvent.CLICK, playMoreClick);
ml.addEventListener(MouseEvent.CLICK, mlClick);
}
public function mlClick(_arg1:MouseEvent):void{
MovieClip(root).FogAPI.Tracking.Click();
}
public function addGameClick(_arg1:MouseEvent){
MovieClip(root).FogAPI.Tracking.Click();
}
public function playMoreClick(_arg1:MouseEvent){
MovieClip(root).FogAPI.Tracking.Click("http://www.freegamesforyourwebsite.com/");
}
}
}//package high_fla
Section 72
//Timeline_63 (high_fla.Timeline_63)
package high_fla {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
import flash.media.*;
import flash.text.*;
import flash.external.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.errors.*;
import flash.filters.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Timeline_63 extends MovieClip {
public var playAgain:SimpleButton;
public var ml:MiniLogo;
public var playMore:SimpleButton;
public var addGame:SimpleButton;
public function Timeline_63(){
addFrameScript(0, frame1);
}
function frame1(){
addGame.addEventListener(MouseEvent.CLICK, addGameClick);
playMore.addEventListener(MouseEvent.CLICK, playMoreClick);
ml.addEventListener(MouseEvent.CLICK, mlClick);
}
public function mlClick(_arg1:MouseEvent){
MovieClip(root).FogAPI.Tracking.Click();
}
public function addGameClick(_arg1:MouseEvent){
MovieClip(root).FogAPI.Tracking.Click();
}
public function playMoreClick(_arg1:MouseEvent){
MovieClip(root).FogAPI.Tracking.Click("http://www.freegamesforyourwebsite.com/");
}
}
}//package high_fla
Section 73
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.0.0.0";
}
}//package mx.core
Section 74
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var top:Number;
public var left:Number;
public var bottom:Number;
public var right:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 75
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "3.0.0.0";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 76
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 77
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 78
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get visible():Boolean;
function get rotation():Number;
function localToGlobal(_arg1:Point):Point;
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(_arg1:String):void;
function set scaleX(_arg1:Number):void;
function set scaleY(_arg1:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(_arg1:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(_arg1:Point):Point;
function get height():Number;
function set blendMode(_arg1:String):void;
function get parent():DisplayObjectContainer;
function getBounds(_arg1:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(_arg1:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(_arg1:Number):void;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get scaleX():Number;
function get scaleY():Number;
function get scrollRect():Rectangle;
function get mouseX():Number;
function get mouseY():Number;
function set height(_arg1:Number):void;
function set mask(_arg1:DisplayObject):void;
function getRect(_arg1:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(_arg1:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(_arg1:DisplayObject):Boolean;
function set opaqueBackground(_arg1:Object):void;
function set visible(_arg1:Boolean):void;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function get transform():Transform;
function set filters(_arg1:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(_arg1:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 79
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 80
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipAsset(){
_measuredWidth = width;
_measuredHeight = height;
}
public function get measuredWidth():Number{
return (_measuredWidth);
}
public function get measuredHeight():Number{
return (_measuredHeight);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom))));
}
}
}//package mx.core
Section 81
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset)
package mx.core {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.system.*;
public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject {
protected var initialHeight:Number;// = 0
private var loader:Loader;// = null
private var initialized:Boolean;// = false
protected var initialWidth:Number;// = 0
private var requestedHeight:Number;
private var requestedWidth:Number;
mx_internal static const VERSION:String = "3.0.0.0";
public function MovieClipLoaderAsset(){
var _local1:LoaderContext = new LoaderContext();
_local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local1)){
_local1["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.loadBytes(movieClipData, _local1);
addChild(loader);
}
override public function get width():Number{
if (!initialized){
return (initialWidth);
};
return (super.width);
}
override public function set width(_arg1:Number):void{
if (!initialized){
requestedWidth = _arg1;
} else {
loader.width = _arg1;
};
}
override public function get measuredHeight():Number{
return (initialHeight);
}
private function completeHandler(_arg1:Event):void{
initialized = true;
initialWidth = loader.width;
initialHeight = loader.height;
if (!isNaN(requestedWidth)){
loader.width = requestedWidth;
};
if (!isNaN(requestedHeight)){
loader.height = requestedHeight;
};
dispatchEvent(_arg1);
}
override public function set height(_arg1:Number):void{
if (!initialized){
requestedHeight = _arg1;
} else {
loader.height = _arg1;
};
}
override public function get measuredWidth():Number{
return (initialWidth);
}
override public function get height():Number{
if (!initialized){
return (initialHeight);
};
return (super.height);
}
public function get movieClipData():ByteArray{
return (null);
}
}
}//package mx.core
Section 82
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 83
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import mx.core.*;
import flash.utils.*;
import flash.display.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.0.0.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local4:String;
var _local5:Array;
var _local3:DisplayObject = _arg1;
while (_local3 != null) {
if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){
break;
};
_local4 = _local3.name;
if ((_local3 is IRepeaterClient)){
_local5 = IRepeaterClient(_local3).instanceIndices;
if (_local5){
_local4 = (_local4 + (("[" + _local5.join("][")) + "]"));
};
};
_local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2);
_local3 = _local3.parent;
};
return (_local2);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 84
//GridNode (src.map.GridNode)
package src.map {
import flash.events.*;
import flash.display.*;
import src.uitl.*;
public class GridNode extends MovieClip {
private var _grid:MovieClip;
public var px:uint;
public var py:uint;
public var serStr:String;
public var addRoleStr:String;
public static const ADD_EVENT:String = "add";
public function GridNode(_arg1:String=""){
if (_arg1 != ""){
_grid = ResourceLoader.getClass("grid");
addChild(_grid);
};
}
public function goAndStop(_arg1:String):void{
if (_arg1 == "up"){
_grid.gotoAndStop(4);
} else {
if (_arg1 == "left"){
_grid.gotoAndStop(2);
} else {
if (_arg1 == "right"){
_grid.gotoAndStop(5);
} else {
_grid.gotoAndStop(3);
};
};
};
addRoleStr = _arg1;
dispatchEvent(new Event(ADD_EVENT));
}
public function initAndStop(_arg1:int):void{
_grid.gotoAndStop(_arg1);
}
}
}//package src.map
Section 85
//MapArray (src.map.MapArray)
package src.map {
import src.vo.*;
public class MapArray {
public var _mapArr:Array;
public static const GRID_WIDTH:Number = 24;
public static const GRID_HEIGHT:Number = 12;
public static const VUINT:uint = 42;
public static const WUINT:uint = 55;
public static const mapX:Number = 965;
public static const mapY:Number = 75;
public static var _instance:MapArray = null;
public function MapArray(_arg1:singleChildClass){
_mapArr = new Array();
super();
if (_arg1 == null){
throw (new Error("ResourceLoader Singleton already constructed."));
};
}
private function arrMarkThree():void{
_mapArr[1][20].goFlag = 2;
_mapArr[13][20].goFlag = 2;
_mapArr[15][20].goFlag = 2;
_mapArr[27][20].goFlag = 2;
_mapArr[38][20].goFlag = 2;
_mapArr[34][20].goFlag = 1;
_mapArr[35][20].goFlag = 1;
_mapArr[36][20].goFlag = 1;
_mapArr[37][20].goFlag = 1;
_mapArr[1][21].goFlag = 2;
_mapArr[15][21].goFlag = 2;
_mapArr[13][21].goFlag = 2;
_mapArr[16][21].goFlag = 2;
_mapArr[17][21].goFlag = 2;
_mapArr[18][21].goFlag = 2;
_mapArr[19][21].goFlag = 2;
_mapArr[25][21].goFlag = 2;
_mapArr[26][21].goFlag = 1;
_mapArr[30][21].goFlag = 2;
_mapArr[31][21].goFlag = 2;
_mapArr[32][21].goFlag = 2;
_mapArr[34][21].goFlag = 1;
_mapArr[35][21].goFlag = 1;
_mapArr[36][21].goFlag = 1;
_mapArr[37][21].goFlag = 1;
_mapArr[38][21].goFlag = 2;
_mapArr[39][21].goFlag = 2;
_mapArr[13][22].goFlag = 2;
_mapArr[20][22].goFlag = 2;
_mapArr[26][22].goFlag = 2;
_mapArr[31][22].goFlag = 2;
_mapArr[34][22].goFlag = 1;
_mapArr[35][22].goFlag = 1;
_mapArr[36][22].goFlag = 1;
_mapArr[37][22].goFlag = 1;
_mapArr[38][22].goFlag = 2;
_mapArr[39][22].goFlag = 2;
_mapArr[40][22].goFlag = 2;
_mapArr[2][23].goFlag = 1;
_mapArr[3][23].goFlag = 1;
_mapArr[6][23].goFlag = 1;
_mapArr[7][23].goFlag = 1;
_mapArr[11][23].goFlag = 1;
_mapArr[12][23].goFlag = 1;
_mapArr[19][23].goFlag = 1;
_mapArr[34][23].goFlag = 1;
_mapArr[35][23].goFlag = 1;
_mapArr[36][23].goFlag = 1;
_mapArr[37][23].goFlag = 1;
_mapArr[38][23].goFlag = 2;
_mapArr[39][23].goFlag = 2;
_mapArr[40][23].goFlag = 2;
_mapArr[3][24].goFlag = 2;
_mapArr[4][24].goFlag = 2;
_mapArr[7][24].goFlag = 2;
_mapArr[8][24].goFlag = 2;
_mapArr[12][24].goFlag = 2;
_mapArr[13][24].goFlag = 2;
_mapArr[16][24].goFlag = 2;
_mapArr[19][24].goFlag = 2;
_mapArr[34][24].goFlag = 1;
_mapArr[35][24].goFlag = 1;
_mapArr[36][24].goFlag = 1;
_mapArr[37][24].goFlag = 1;
_mapArr[38][24].goFlag = 2;
_mapArr[39][24].goFlag = 2;
_mapArr[40][24].goFlag = 2;
_mapArr[25][25].goFlag = 1;
_mapArr[26][25].goFlag = 1;
_mapArr[27][25].goFlag = 1;
_mapArr[34][25].goFlag = 1;
_mapArr[35][25].goFlag = 1;
_mapArr[36][25].goFlag = 1;
_mapArr[37][25].goFlag = 1;
_mapArr[38][25].goFlag = 2;
_mapArr[39][25].goFlag = 2;
_mapArr[40][25].goFlag = 2;
_mapArr[1][26].goFlag = 2;
_mapArr[2][26].goFlag = 1;
_mapArr[5][26].goFlag = 1;
_mapArr[10][26].goFlag = 1;
_mapArr[25][26].goFlag = 2;
_mapArr[26][26].goFlag = 2;
_mapArr[27][26].goFlag = 2;
_mapArr[28][26].goFlag = 2;
_mapArr[34][26].goFlag = 1;
_mapArr[35][26].goFlag = 1;
_mapArr[36][26].goFlag = 1;
_mapArr[37][26].goFlag = 1;
_mapArr[38][26].goFlag = 2;
_mapArr[39][26].goFlag = 2;
_mapArr[40][26].goFlag = 2;
_mapArr[1][27].goFlag = 2;
_mapArr[2][27].goFlag = 2;
_mapArr[3][27].goFlag = 2;
_mapArr[4][27].goFlag = 2;
_mapArr[6][27].goFlag = 1;
_mapArr[7][27].goFlag = 2;
_mapArr[8][27].goFlag = 2;
_mapArr[11][27].goFlag = 1;
_mapArr[12][27].goFlag = 2;
_mapArr[13][27].goFlag = 1;
_mapArr[15][27].goFlag = 1;
_mapArr[16][27].goFlag = 2;
_mapArr[26][27].goFlag = 2;
_mapArr[27][27].goFlag = 2;
_mapArr[34][27].goFlag = 1;
_mapArr[36][27].goFlag = 1;
_mapArr[37][27].goFlag = 1;
_mapArr[38][27].goFlag = 2;
_mapArr[39][27].goFlag = 2;
_mapArr[40][27].goFlag = 2;
_mapArr[1][28].goFlag = 2;
_mapArr[2][28].goFlag = 2;
_mapArr[7][28].goFlag = 2;
_mapArr[8][28].goFlag = 2;
_mapArr[12][28].goFlag = 2;
_mapArr[13][28].goFlag = 2;
_mapArr[24][28].goFlag = 2;
_mapArr[25][28].goFlag = 2;
_mapArr[34][28].goFlag = 1;
_mapArr[35][28].goFlag = 1;
_mapArr[37][28].goFlag = 1;
_mapArr[38][28].goFlag = 2;
_mapArr[39][28].goFlag = 2;
_mapArr[40][28].goFlag = 2;
_mapArr[1][29].goFlag = 2;
_mapArr[2][29].goFlag = 2;
_mapArr[4][29].goFlag = 1;
_mapArr[5][29].goFlag = 1;
_mapArr[8][29].goFlag = 2;
_mapArr[22][29].goFlag = 2;
_mapArr[23][29].goFlag = 2;
_mapArr[24][29].goFlag = 2;
_mapArr[25][29].goFlag = 2;
_mapArr[26][29].goFlag = 2;
_mapArr[34][29].goFlag = 1;
_mapArr[35][29].goFlag = 1;
_mapArr[38][29].goFlag = 2;
_mapArr[39][29].goFlag = 2;
_mapArr[40][29].goFlag = 2;
}
private function initMapArr():void{
var _local1:int;
while (_local1 < VUINT) {
_mapArr[_local1][0].goFlag = 2;
_mapArr[_local1][(WUINT - 1)].goFlag = 2;
_local1++;
};
var _local2:int;
while (_local2 < WUINT) {
_mapArr[0][_local2].goFlag = 2;
_mapArr[(VUINT - 1)][_local2].goFlag = 2;
_local2++;
};
_mapArr[1][1].goFlag = 2;
_mapArr[2][1].goFlag = 2;
_mapArr[4][1].goFlag = 2;
_mapArr[6][1].goFlag = 2;
_mapArr[32][1].goFlag = 2;
_mapArr[33][1].goFlag = 2;
_mapArr[34][1].goFlag = 2;
_mapArr[35][1].goFlag = 2;
_mapArr[36][1].goFlag = 2;
_mapArr[39][1].goFlag = 2;
_mapArr[40][1].goFlag = 2;
_mapArr[37][1].goFlag = 1;
_mapArr[38][1].goFlag = 1;
_mapArr[1][1].goFlag = 2;
_mapArr[2][2].goFlag = 2;
_mapArr[35][2].goFlag = 2;
_mapArr[36][2].goFlag = 2;
_mapArr[39][2].goFlag = 2;
_mapArr[40][2].goFlag = 2;
_mapArr[37][2].goFlag = 1;
_mapArr[38][2].goFlag = 1;
_mapArr[2][3].goFlag = 2;
_mapArr[36][3].goFlag = 2;
_mapArr[39][3].goFlag = 2;
_mapArr[40][3].goFlag = 2;
_mapArr[38][3].goFlag = 2;
_mapArr[1][4].goFlag = 2;
_mapArr[2][4].goFlag = 2;
_mapArr[39][4].goFlag = 2;
_mapArr[40][4].goFlag = 2;
_mapArr[38][4].goFlag = 1;
_mapArr[1][5].goFlag = 2;
_mapArr[8][5].goFlag = 2;
_mapArr[9][5].goFlag = 2;
_mapArr[39][5].goFlag = 1;
_mapArr[40][5].goFlag = 2;
_mapArr[1][6].goFlag = 2;
_mapArr[9][6].goFlag = 2;
_mapArr[31][6].goFlag = 2;
_mapArr[32][6].goFlag = 2;
_mapArr[1][7].goFlag = 2;
_mapArr[31][7].goFlag = 1;
_mapArr[32][7].goFlag = 2;
_mapArr[1][8].goFlag = 2;
_mapArr[1][9].goFlag = 2;
arrMarkTwo();
arrMarkThree();
arrMarkFour();
arrMarkFive();
arrMarkSix();
}
private function arrMarkSix():void{
_mapArr[1][50].goFlag = 2;
_mapArr[2][50].goFlag = 2;
_mapArr[3][50].goFlag = 2;
_mapArr[11][50].goFlag = 1;
_mapArr[25][50].goFlag = 1;
_mapArr[26][50].goFlag = 1;
_mapArr[27][50].goFlag = 1;
_mapArr[28][50].goFlag = 2;
_mapArr[29][50].goFlag = 2;
_mapArr[30][50].goFlag = 2;
_mapArr[31][50].goFlag = 2;
_mapArr[38][50].goFlag = 1;
_mapArr[39][50].goFlag = 2;
_mapArr[40][50].goFlag = 2;
_mapArr[1][51].goFlag = 2;
_mapArr[2][51].goFlag = 2;
_mapArr[3][51].goFlag = 2;
_mapArr[23][51].goFlag = 1;
_mapArr[26][51].goFlag = 1;
_mapArr[27][51].goFlag = 1;
_mapArr[28][51].goFlag = 2;
_mapArr[29][51].goFlag = 2;
_mapArr[31][51].goFlag = 2;
_mapArr[30][51].goFlag = 2;
_mapArr[38][51].goFlag = 1;
_mapArr[39][51].goFlag = 2;
_mapArr[40][51].goFlag = 2;
_mapArr[1][52].goFlag = 2;
_mapArr[2][52].goFlag = 2;
_mapArr[3][52].goFlag = 2;
_mapArr[8][52].goFlag = 2;
_mapArr[12][52].goFlag = 2;
_mapArr[21][52].goFlag = 1;
_mapArr[24][52].goFlag = 1;
_mapArr[27][52].goFlag = 1;
_mapArr[28][52].goFlag = 2;
_mapArr[29][52].goFlag = 2;
_mapArr[30][52].goFlag = 2;
_mapArr[31][52].goFlag = 2;
_mapArr[38][52].goFlag = 1;
_mapArr[39][52].goFlag = 2;
_mapArr[40][52].goFlag = 2;
_mapArr[1][53].goFlag = 2;
_mapArr[2][53].goFlag = 2;
_mapArr[21][53].goFlag = 1;
_mapArr[24][53].goFlag = 1;
_mapArr[25][53].goFlag = 1;
_mapArr[28][53].goFlag = 2;
_mapArr[29][53].goFlag = 2;
_mapArr[30][53].goFlag = 2;
_mapArr[31][53].goFlag = 2;
_mapArr[32][53].goFlag = 1;
_mapArr[33][53].goFlag = 1;
_mapArr[34][53].goFlag = 1;
_mapArr[35][53].goFlag = 1;
_mapArr[38][53].goFlag = 1;
_mapArr[39][53].goFlag = 2;
_mapArr[40][53].goFlag = 2;
}
private function arrMarkFive():void{
_mapArr[1][40].goFlag = 2;
_mapArr[2][40].goFlag = 2;
_mapArr[4][40].goFlag = 2;
_mapArr[5][40].goFlag = 2;
_mapArr[6][40].goFlag = 2;
_mapArr[7][40].goFlag = 2;
_mapArr[8][40].goFlag = 2;
_mapArr[12][40].goFlag = 1;
_mapArr[13][40].goFlag = 1;
_mapArr[14][40].goFlag = 1;
_mapArr[15][40].goFlag = 1;
_mapArr[22][40].goFlag = 2;
_mapArr[23][40].goFlag = 2;
_mapArr[24][40].goFlag = 2;
_mapArr[32][40].goFlag = 1;
_mapArr[33][40].goFlag = 1;
_mapArr[34][40].goFlag = 1;
_mapArr[37][40].goFlag = 1;
_mapArr[38][40].goFlag = 2;
_mapArr[39][40].goFlag = 2;
_mapArr[40][40].goFlag = 2;
_mapArr[1][41].goFlag = 2;
_mapArr[2][41].goFlag = 2;
_mapArr[12][41].goFlag = 1;
_mapArr[13][41].goFlag = 1;
_mapArr[14][41].goFlag = 1;
_mapArr[15][41].goFlag = 1;
_mapArr[16][41].goFlag = 1;
_mapArr[22][41].goFlag = 2;
_mapArr[23][41].goFlag = 1;
_mapArr[24][41].goFlag = 1;
_mapArr[25][41].goFlag = 1;
_mapArr[32][41].goFlag = 1;
_mapArr[33][41].goFlag = 2;
_mapArr[34][41].goFlag = 2;
_mapArr[35][41].goFlag = 2;
_mapArr[37][41].goFlag = 1;
_mapArr[38][41].goFlag = 2;
_mapArr[39][41].goFlag = 2;
_mapArr[40][41].goFlag = 2;
_mapArr[1][42].goFlag = 2;
_mapArr[2][42].goFlag = 2;
_mapArr[3][42].goFlag = 2;
_mapArr[4][42].goFlag = 2;
_mapArr[5][42].goFlag = 2;
_mapArr[7][42].goFlag = 1;
_mapArr[12][42].goFlag = 1;
_mapArr[13][42].goFlag = 1;
_mapArr[14][42].goFlag = 2;
_mapArr[15][42].goFlag = 2;
_mapArr[16][42].goFlag = 2;
_mapArr[17][42].goFlag = 2;
_mapArr[23][42].goFlag = 1;
_mapArr[24][42].goFlag = 1;
_mapArr[25][42].goFlag = 1;
_mapArr[26][42].goFlag = 1;
_mapArr[32][42].goFlag = 1;
_mapArr[33][42].goFlag = 2;
_mapArr[34][42].goFlag = 2;
_mapArr[35][42].goFlag = 2;
_mapArr[37][42].goFlag = 1;
_mapArr[38][42].goFlag = 2;
_mapArr[39][42].goFlag = 2;
_mapArr[40][42].goFlag = 2;
_mapArr[1][43].goFlag = 2;
_mapArr[2][43].goFlag = 2;
_mapArr[3][43].goFlag = 2;
_mapArr[4][43].goFlag = 2;
_mapArr[5][43].goFlag = 2;
_mapArr[8][43].goFlag = 1;
_mapArr[11][43].goFlag = 1;
_mapArr[12][43].goFlag = 1;
_mapArr[13][43].goFlag = 1;
_mapArr[14][43].goFlag = 2;
_mapArr[15][43].goFlag = 2;
_mapArr[16][43].goFlag = 2;
_mapArr[17][43].goFlag = 2;
_mapArr[18][43].goFlag = 2;
_mapArr[21][43].goFlag = 1;
_mapArr[23][43].goFlag = 1;
_mapArr[24][43].goFlag = 1;
_mapArr[25][43].goFlag = 1;
_mapArr[26][43].goFlag = 1;
_mapArr[27][43].goFlag = 1;
_mapArr[32][43].goFlag = 1;
_mapArr[33][43].goFlag = 2;
_mapArr[34][43].goFlag = 2;
_mapArr[35][43].goFlag = 2;
_mapArr[37][43].goFlag = 1;
_mapArr[38][43].goFlag = 2;
_mapArr[39][43].goFlag = 2;
_mapArr[40][43].goFlag = 2;
_mapArr[1][44].goFlag = 2;
_mapArr[2][44].goFlag = 2;
_mapArr[3][44].goFlag = 2;
_mapArr[4][44].goFlag = 2;
_mapArr[5][44].goFlag = 1;
_mapArr[12][44].goFlag = 1;
_mapArr[13][44].goFlag = 1;
_mapArr[14][44].goFlag = 2;
_mapArr[15][44].goFlag = 2;
_mapArr[16][44].goFlag = 2;
_mapArr[17][44].goFlag = 2;
_mapArr[18][44].goFlag = 2;
_mapArr[21][44].goFlag = 1;
_mapArr[23][44].goFlag = 1;
_mapArr[24][44].goFlag = 1;
_mapArr[25][44].goFlag = 1;
_mapArr[26][44].goFlag = 1;
_mapArr[27][44].goFlag = 1;
_mapArr[28][44].goFlag = 2;
_mapArr[32][44].goFlag = 1;
_mapArr[33][44].goFlag = 2;
_mapArr[34][44].goFlag = 2;
_mapArr[35][44].goFlag = 2;
_mapArr[38][44].goFlag = 1;
_mapArr[39][44].goFlag = 2;
_mapArr[40][44].goFlag = 2;
_mapArr[1][45].goFlag = 2;
_mapArr[2][45].goFlag = 2;
_mapArr[3][45].goFlag = 2;
_mapArr[13][45].goFlag = 1;
_mapArr[14][45].goFlag = 2;
_mapArr[15][45].goFlag = 2;
_mapArr[16][45].goFlag = 2;
_mapArr[17][45].goFlag = 2;
_mapArr[18][45].goFlag = 2;
_mapArr[21][45].goFlag = 1;
_mapArr[23][45].goFlag = 1;
_mapArr[24][45].goFlag = 1;
_mapArr[25][45].goFlag = 1;
_mapArr[26][45].goFlag = 1;
_mapArr[27][45].goFlag = 1;
_mapArr[28][45].goFlag = 2;
_mapArr[29][45].goFlag = 2;
_mapArr[30][45].goFlag = 2;
_mapArr[32][45].goFlag = 1;
_mapArr[33][45].goFlag = 2;
_mapArr[34][45].goFlag = 2;
_mapArr[35][45].goFlag = 2;
_mapArr[39][45].goFlag = 2;
_mapArr[40][45].goFlag = 2;
_mapArr[1][46].goFlag = 2;
_mapArr[2][46].goFlag = 2;
_mapArr[3][46].goFlag = 2;
_mapArr[4][46].goFlag = 2;
_mapArr[12][46].goFlag = 1;
_mapArr[13][46].goFlag = 1;
_mapArr[14][46].goFlag = 2;
_mapArr[15][46].goFlag = 2;
_mapArr[16][46].goFlag = 2;
_mapArr[17][46].goFlag = 2;
_mapArr[18][46].goFlag = 2;
_mapArr[23][46].goFlag = 1;
_mapArr[24][46].goFlag = 1;
_mapArr[25][46].goFlag = 1;
_mapArr[26][46].goFlag = 1;
_mapArr[27][46].goFlag = 1;
_mapArr[28][46].goFlag = 2;
_mapArr[29][46].goFlag = 2;
_mapArr[30][46].goFlag = 2;
_mapArr[31][46].goFlag = 2;
_mapArr[32][46].goFlag = 1;
_mapArr[33][46].goFlag = 2;
_mapArr[34][46].goFlag = 2;
_mapArr[35][46].goFlag = 2;
_mapArr[1][47].goFlag = 2;
_mapArr[2][47].goFlag = 2;
_mapArr[3][47].goFlag = 2;
_mapArr[4][47].goFlag = 2;
_mapArr[13][47].goFlag = 1;
_mapArr[14][47].goFlag = 2;
_mapArr[15][47].goFlag = 2;
_mapArr[16][47].goFlag = 2;
_mapArr[17][47].goFlag = 2;
_mapArr[18][47].goFlag = 2;
_mapArr[23][47].goFlag = 1;
_mapArr[24][47].goFlag = 1;
_mapArr[25][47].goFlag = 1;
_mapArr[26][47].goFlag = 1;
_mapArr[27][47].goFlag = 1;
_mapArr[28][47].goFlag = 2;
_mapArr[29][47].goFlag = 2;
_mapArr[30][47].goFlag = 2;
_mapArr[31][47].goFlag = 2;
_mapArr[32][47].goFlag = 1;
_mapArr[33][47].goFlag = 2;
_mapArr[34][47].goFlag = 2;
_mapArr[35][47].goFlag = 2;
_mapArr[1][48].goFlag = 2;
_mapArr[2][48].goFlag = 2;
_mapArr[3][48].goFlag = 2;
_mapArr[4][48].goFlag = 2;
_mapArr[8][48].goFlag = 1;
_mapArr[14][48].goFlag = 2;
_mapArr[15][48].goFlag = 2;
_mapArr[16][48].goFlag = 2;
_mapArr[17][48].goFlag = 2;
_mapArr[18][48].goFlag = 2;
_mapArr[21][48].goFlag = 1;
_mapArr[23][48].goFlag = 1;
_mapArr[24][48].goFlag = 1;
_mapArr[25][48].goFlag = 1;
_mapArr[26][48].goFlag = 1;
_mapArr[27][48].goFlag = 1;
_mapArr[28][48].goFlag = 2;
_mapArr[29][48].goFlag = 2;
_mapArr[30][48].goFlag = 2;
_mapArr[32][48].goFlag = 1;
_mapArr[33][48].goFlag = 2;
_mapArr[34][48].goFlag = 2;
_mapArr[35][48].goFlag = 2;
_mapArr[1][49].goFlag = 2;
_mapArr[2][49].goFlag = 2;
_mapArr[3][49].goFlag = 2;
_mapArr[15][49].goFlag = 2;
_mapArr[21][49].goFlag = 1;
_mapArr[24][49].goFlag = 1;
_mapArr[25][49].goFlag = 1;
_mapArr[26][49].goFlag = 1;
_mapArr[27][49].goFlag = 1;
_mapArr[28][49].goFlag = 2;
_mapArr[29][49].goFlag = 2;
_mapArr[30][49].goFlag = 2;
_mapArr[31][49].goFlag = 2;
_mapArr[33][49].goFlag = 2;
_mapArr[34][49].goFlag = 2;
_mapArr[35][49].goFlag = 2;
_mapArr[38][49].goFlag = 1;
}
public function getMapArr():Array{
var _local2:uint;
var _local3:MapNode;
var _local1:uint;
while (_local1 < VUINT) {
_mapArr.push(new Array());
_local2 = 0;
while (_local2 < WUINT) {
_local3 = new MapNode();
_mapArr[_local1].push(_local3);
_mapArr[_local1][_local2].px = _local2;
_mapArr[_local1][_local2].py = _local1;
_mapArr[_local1][_local2].goFlag = 0;
_mapArr[_local1][_local2].cx = ((_local2 - _local1) * GRID_WIDTH);
_mapArr[_local1][_local2].cy = ((_local2 + _local1) * GRID_HEIGHT);
_local2++;
};
_local1++;
};
initMapArr();
return (_mapArr);
}
private function arrMarkFour():void{
_mapArr[1][30].goFlag = 2;
_mapArr[2][30].goFlag = 2;
_mapArr[3][30].goFlag = 2;
_mapArr[5][30].goFlag = 1;
_mapArr[20][30].goFlag = 2;
_mapArr[21][30].goFlag = 2;
_mapArr[22][30].goFlag = 2;
_mapArr[23][30].goFlag = 2;
_mapArr[24][30].goFlag = 2;
_mapArr[25][30].goFlag = 2;
_mapArr[26][30].goFlag = 2;
_mapArr[27][30].goFlag = 2;
_mapArr[28][30].goFlag = 2;
_mapArr[35][30].goFlag = 1;
_mapArr[40][30].goFlag = 2;
_mapArr[1][31].goFlag = 2;
_mapArr[2][31].goFlag = 2;
_mapArr[3][31].goFlag = 2;
_mapArr[8][31].goFlag = 2;
_mapArr[10][31].goFlag = 2;
_mapArr[11][31].goFlag = 2;
_mapArr[20][31].goFlag = 2;
_mapArr[21][31].goFlag = 2;
_mapArr[22][31].goFlag = 2;
_mapArr[23][31].goFlag = 2;
_mapArr[24][31].goFlag = 2;
_mapArr[25][31].goFlag = 2;
_mapArr[26][31].goFlag = 2;
_mapArr[27][31].goFlag = 2;
_mapArr[28][31].goFlag = 2;
_mapArr[29][31].goFlag = 2;
_mapArr[31][31].goFlag = 1;
_mapArr[32][31].goFlag = 2;
_mapArr[36][31].goFlag = 1;
_mapArr[37][31].goFlag = 2;
_mapArr[38][31].goFlag = 2;
_mapArr[40][31].goFlag = 2;
_mapArr[1][32].goFlag = 2;
_mapArr[2][32].goFlag = 2;
_mapArr[3][32].goFlag = 2;
_mapArr[17][32].goFlag = 2;
_mapArr[20][32].goFlag = 2;
_mapArr[21][32].goFlag = 2;
_mapArr[22][32].goFlag = 2;
_mapArr[23][32].goFlag = 2;
_mapArr[24][32].goFlag = 2;
_mapArr[25][32].goFlag = 2;
_mapArr[26][32].goFlag = 2;
_mapArr[27][32].goFlag = 2;
_mapArr[28][32].goFlag = 2;
_mapArr[29][32].goFlag = 2;
_mapArr[31][32].goFlag = 1;
_mapArr[32][32].goFlag = 2;
_mapArr[41][32].goFlag = 0;
_mapArr[1][33].goFlag = 2;
_mapArr[2][33].goFlag = 2;
_mapArr[3][33].goFlag = 2;
_mapArr[8][33].goFlag = 2;
_mapArr[11][33].goFlag = 2;
_mapArr[17][33].goFlag = 2;
_mapArr[18][33].goFlag = 2;
_mapArr[20][33].goFlag = 2;
_mapArr[21][33].goFlag = 2;
_mapArr[22][33].goFlag = 2;
_mapArr[23][33].goFlag = 2;
_mapArr[24][33].goFlag = 2;
_mapArr[25][33].goFlag = 2;
_mapArr[26][33].goFlag = 2;
_mapArr[27][33].goFlag = 2;
_mapArr[28][33].goFlag = 2;
_mapArr[29][33].goFlag = 2;
_mapArr[32][33].goFlag = 2;
_mapArr[41][33].goFlag = 0;
_mapArr[1][34].goFlag = 2;
_mapArr[2][34].goFlag = 2;
_mapArr[3][34].goFlag = 2;
_mapArr[10][34].goFlag = 1;
_mapArr[13][34].goFlag = 1;
_mapArr[17][34].goFlag = 2;
_mapArr[18][34].goFlag = 2;
_mapArr[20][34].goFlag = 2;
_mapArr[21][34].goFlag = 2;
_mapArr[22][34].goFlag = 2;
_mapArr[23][34].goFlag = 2;
_mapArr[24][34].goFlag = 2;
_mapArr[25][34].goFlag = 2;
_mapArr[26][34].goFlag = 2;
_mapArr[27][34].goFlag = 2;
_mapArr[28][34].goFlag = 2;
_mapArr[29][34].goFlag = 2;
_mapArr[32][34].goFlag = 2;
_mapArr[41][34].goFlag = 0;
_mapArr[1][35].goFlag = 2;
_mapArr[2][35].goFlag = 2;
_mapArr[3][35].goFlag = 2;
_mapArr[4][35].goFlag = 1;
_mapArr[6][35].goFlag = 1;
_mapArr[7][35].goFlag = 1;
_mapArr[8][35].goFlag = 1;
_mapArr[11][35].goFlag = 1;
_mapArr[12][35].goFlag = 1;
_mapArr[13][35].goFlag = 1;
_mapArr[14][35].goFlag = 1;
_mapArr[17][35].goFlag = 2;
_mapArr[18][35].goFlag = 2;
_mapArr[21][35].goFlag = 2;
_mapArr[22][35].goFlag = 2;
_mapArr[23][35].goFlag = 2;
_mapArr[24][35].goFlag = 2;
_mapArr[25][35].goFlag = 2;
_mapArr[26][35].goFlag = 2;
_mapArr[27][35].goFlag = 2;
_mapArr[28][35].goFlag = 2;
_mapArr[39][35].goFlag = 2;
_mapArr[41][35].goFlag = 0;
_mapArr[4][36].goFlag = 2;
_mapArr[7][36].goFlag = 2;
_mapArr[8][36].goFlag = 2;
_mapArr[12][36].goFlag = 2;
_mapArr[13][36].goFlag = 2;
_mapArr[17][36].goFlag = 2;
_mapArr[21][36].goFlag = 2;
_mapArr[22][36].goFlag = 2;
_mapArr[23][36].goFlag = 2;
_mapArr[24][36].goFlag = 2;
_mapArr[25][36].goFlag = 2;
_mapArr[26][36].goFlag = 2;
_mapArr[27][36].goFlag = 2;
_mapArr[35][36].goFlag = 1;
_mapArr[36][36].goFlag = 1;
_mapArr[37][36].goFlag = 1;
_mapArr[38][36].goFlag = 2;
_mapArr[39][36].goFlag = 2;
_mapArr[40][36].goFlag = 2;
_mapArr[14][37].goFlag = 1;
_mapArr[23][37].goFlag = 2;
_mapArr[24][37].goFlag = 2;
_mapArr[25][37].goFlag = 2;
_mapArr[26][37].goFlag = 2;
_mapArr[37][37].goFlag = 1;
_mapArr[38][37].goFlag = 2;
_mapArr[39][37].goFlag = 2;
_mapArr[40][37].goFlag = 2;
_mapArr[1][38].goFlag = 1;
_mapArr[2][38].goFlag = 1;
_mapArr[3][38].goFlag = 1;
_mapArr[7][38].goFlag = 1;
_mapArr[11][38].goFlag = 1;
_mapArr[12][38].goFlag = 1;
_mapArr[15][38].goFlag = 1;
_mapArr[22][38].goFlag = 1;
_mapArr[37][38].goFlag = 1;
_mapArr[38][38].goFlag = 2;
_mapArr[39][38].goFlag = 2;
_mapArr[40][38].goFlag = 2;
_mapArr[1][39].goFlag = 1;
_mapArr[3][39].goFlag = 1;
_mapArr[4][39].goFlag = 2;
_mapArr[7][39].goFlag = 2;
_mapArr[8][39].goFlag = 2;
_mapArr[12][39].goFlag = 2;
_mapArr[13][39].goFlag = 2;
_mapArr[22][39].goFlag = 1;
_mapArr[37][39].goFlag = 1;
_mapArr[38][39].goFlag = 2;
_mapArr[39][39].goFlag = 2;
_mapArr[40][39].goFlag = 2;
}
private function arrMarkTwo():void{
_mapArr[1][10].goFlag = 2;
_mapArr[1][11].goFlag = 2;
_mapArr[1][12].goFlag = 2;
_mapArr[35][12].goFlag = 1;
_mapArr[1][13].goFlag = 2;
_mapArr[4][13].goFlag = 2;
_mapArr[5][13].goFlag = 2;
_mapArr[7][13].goFlag = 2;
_mapArr[8][13].goFlag = 2;
_mapArr[10][13].goFlag = 2;
_mapArr[11][13].goFlag = 2;
_mapArr[13][13].goFlag = 2;
_mapArr[15][13].goFlag = 2;
var _local1 = 16;
while (_local1 <= 36) {
_mapArr[_local1][13].goFlag = 2;
_local1++;
};
_mapArr[1][14].goFlag = 2;
_mapArr[13][14].goFlag = 2;
_mapArr[23][14].goFlag = 1;
_mapArr[27][14].goFlag = 2;
_mapArr[15][14].goFlag = 2;
_mapArr[1][15].goFlag = 2;
_mapArr[15][15].goFlag = 2;
_mapArr[23][15].goFlag = 1;
_mapArr[32][15].goFlag = 2;
_mapArr[2][15].goFlag = 2;
_mapArr[13][15].goFlag = 2;
_mapArr[27][15].goFlag = 2;
_mapArr[16][16].goFlag = 1;
_mapArr[24][16].goFlag = 1;
_mapArr[25][16].goFlag = 1;
_mapArr[32][16].goFlag = 2;
_mapArr[27][16].goFlag = 2;
_mapArr[1][17].goFlag = 2;
_mapArr[2][17].goFlag = 2;
_mapArr[17][17].goFlag = 2;
_mapArr[26][17].goFlag = 1;
_mapArr[32][17].goFlag = 2;
_mapArr[27][17].goFlag = 2;
_mapArr[1][18].goFlag = 2;
_mapArr[2][18].goFlag = 2;
_mapArr[13][18].goFlag = 2;
_mapArr[27][18].goFlag = 2;
_mapArr[32][18].goFlag = 2;
_mapArr[34][18].goFlag = 1;
_mapArr[35][18].goFlag = 1;
_mapArr[36][18].goFlag = 1;
_mapArr[2][19].goFlag = 1;
_mapArr[13][19].goFlag = 2;
_mapArr[27][19].goFlag = 2;
_mapArr[34][19].goFlag = 1;
_mapArr[35][19].goFlag = 1;
_mapArr[36][19].goFlag = 1;
_mapArr[37][19].goFlag = 1;
}
public function updateMapArr(_arg1:int, _arg2:int, _arg3:Boolean=false):void{
if (_arg3){
_mapArr[_arg2][_arg1].goFlag = _mapArr[_arg2][_arg1].oldGoFlag;
} else {
if (_mapArr[_arg2][_arg1].goFlag != 2){
_mapArr[_arg2][_arg1].oldGoFlag = _mapArr[_arg2][_arg1].goFlag;
_mapArr[_arg2][_arg1].goFlag = 2;
};
};
}
public static function getInstance():MapArray{
if (_instance == null){
_instance = new MapArray(new singleChildClass());
};
return (_instance);
}
}
}//package src.map
class singleChildClass {
private function singleChildClass(){
}
}
Section 86
//SerizePlace (src.map.SerizePlace)
package src.map {
import src.vo.*;
import src.role.*;
import flash.events.*;
public class SerizePlace {
private var _serizeArr:Array;
public static var _instance:SerizePlace = null;
public function SerizePlace(_arg1:singleChildClass){
if (_arg1 == null){
throw (new Error("ResourceLoader Singleton already constructed."));
};
initSerizeGird();
}
public function MarkSerize(_arg1:PlayerRole, _arg2:String):void{
var _local5:GridNode;
var _local3:int = _serizeArr.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = _serizeArr[_local4];
if ((((_local5.px == _arg1.px)) && ((_local5.py == _arg1.py)))){
if (_local5.serStr == _arg2){
return;
};
_local5.serStr = _arg2;
if (_local4 > 3){
_local5.goAndStop(_arg2);
} else {
_local5.addRoleStr = _arg2;
_local5.dispatchEvent(new Event(GridNode.ADD_EVENT));
};
if (_local5.alpha != 1){
_local5.alpha = 1;
};
break;
};
_local4++;
};
}
public function getInfo():Object{
var _local2:GridNode;
var _local1:Object = {up:0, down:0, left:0, right:0};
for each (_local2 in _serizeArr) {
if (_local2.serStr == "up"){
var _local5 = _local1;
var _local6 = "up";
var _local7 = (_local5[_local6] + 1);
_local5[_local6] = _local7;
};
if (_local2.serStr == "down"){
_local5 = _local1;
_local6 = "down";
_local7 = (_local5[_local6] + 1);
_local5[_local6] = _local7;
};
if (_local2.serStr == "left"){
_local5 = _local1;
_local6 = "left";
_local7 = (_local5[_local6] + 1);
_local5[_local6] = _local7;
};
if (_local2.serStr == "right"){
_local5 = _local1;
_local6 = "right";
_local7 = (_local5[_local6] + 1);
_local5[_local6] = _local7;
};
};
_local1["up"] = int(((_local1["up"] * 100) / _serizeArr.length));
_local1["down"] = int(((_local1["down"] * 100) / _serizeArr.length));
_local1["left"] = int(((_local1["left"] * 100) / _serizeArr.length));
_local1["right"] = int(((_local1["right"] * 100) / _serizeArr.length));
return (_local1);
}
private function initSerizeGird():void{
_serizeArr = new Array();
var _local1:GridNode = new GridNode("grid");
_local1.px = 3;
_local1.py = 4;
_local1.initAndStop(4);
_local1.serStr = "up";
var _local2:GridNode = new GridNode("grid");
_local2.px = 5;
_local2.py = 14;
_local2.alpha = 0.3;
var _local3:GridNode = new GridNode("grid");
_local3.px = 6;
_local3.py = 26;
_local3.alpha = 0.3;
var _local4:GridNode = new GridNode("grid");
_local4.px = 46;
_local4.py = 37;
_local4.initAndStop(3);
_local4.serStr = "down";
var _local5:GridNode = new GridNode("grid");
_local5.px = 5;
_local5.py = 36;
_local5.initAndStop(2);
_local5.serStr = "left";
var _local6:GridNode = new GridNode("grid");
_local6.px = 51;
_local6.py = 5;
_local6.initAndStop(5);
_local6.serStr = "right";
var _local7:GridNode = new GridNode("grid");
_local7.px = 16;
_local7.py = 6;
_local7.alpha = 0.3;
var _local8:GridNode = new GridNode("grid");
_local8.px = 16;
_local8.py = 18;
_local8.alpha = 0.3;
var _local9:GridNode = new GridNode("grid");
_local9.px = 44;
_local9.py = 7;
_local9.alpha = 0.3;
var _local10:GridNode = new GridNode("grid");
_local10.px = 16;
_local10.py = 30;
_local10.alpha = 0.3;
var _local11:GridNode = new GridNode("grid");
_local11.px = 25;
_local11.py = 33;
_local11.alpha = 0.3;
var _local12:GridNode = new GridNode("grid");
_local12.px = 29;
_local12.py = 17;
_local12.alpha = 0.3;
var _local13:GridNode = new GridNode("grid");
_local13.px = 31;
_local13.py = 5;
_local13.alpha = 0.3;
var _local14:GridNode = new GridNode("grid");
_local14.px = 39;
_local14.py = 28;
_local14.alpha = 0.3;
var _local15:GridNode = new GridNode("grid");
_local15.px = 51;
_local15.py = 21;
_local15.alpha = 0.3;
_serizeArr.push(_local1, _local4, _local5, _local6, _local2, _local3, _local7, _local8, _local9, _local10, _local11);
_serizeArr.push(_local12, _local13, _local14, _local15);
}
public function getBaseState(_arg1:String):Boolean{
if ((((_arg1 == "up")) && (!(((_serizeArr[0] as GridNode).serStr == "up"))))){
return (true);
};
if ((((_arg1 == "left")) && (!(((_serizeArr[2] as GridNode).serStr == "left"))))){
return (true);
};
if ((((_arg1 == "right")) && (!(((_serizeArr[3] as GridNode).serStr == "right"))))){
return (true);
};
if ((((_arg1 == "down")) && (!(((_serizeArr[1] as GridNode).serStr == "down"))))){
return (true);
};
return (false);
}
public function getSerizeNode(_arg1:PlayerRole, _arg2:String):GridNode{
var _local6:int;
var _local10:GridNode;
var _local11:GridNode;
var _local3:MapNode = new MapNode();
var _local4:int;
var _local5 = 1000000;
var _local7 = 100;
var _local8 = 100;
var _local9:int = _serizeArr.length;
for each (_local10 in _serizeArr) {
_local6 = (Math.abs((_local10.px - _arg1.px)) + Math.abs((_local10.py - _arg1.py)));
if ((((((_local6 < _local5)) && (!((_local6 == 0))))) && (!((_local10.serStr == _arg2))))){
_local5 = _local6;
_local7 = _local4;
};
_local4++;
};
_local4 = 0;
_local5 = 1000000;
for each (_local11 in _serizeArr) {
_local6 = (Math.abs((_local11.px - _arg1.px)) + Math.abs((_local11.py - _arg1.py)));
if ((((((((_local6 < _local5)) && (!((_local6 == 0))))) && (!((_local11.serStr == _arg2))))) && (!((_local4 == _local7))))){
_local5 = _local6;
_local8 = _local4;
};
_local4++;
};
if (_local7 < _local9){
if ((((_local8 == 100)) || ((Math.random() < 0.5)))){
return (_serizeArr[_local7]);
};
return (_serizeArr[_local8]);
//unresolved jump
};
return (null);
}
public function getSerizeGird():Array{
return (_serizeArr);
}
public static function getInstance():SerizePlace{
if (_instance == null){
_instance = new SerizePlace(new singleChildClass());
};
return (_instance);
}
}
}//package src.map
class singleChildClass {
private function singleChildClass(){
}
}
Section 87
//OtherRole (src.role.OtherRole)
package src.role {
import src.vo.*;
import src.map.*;
import flash.display.*;
public class OtherRole extends PlayerRole {
public var markFalg:Boolean;
private var _mapArr:Array;
private var _serPlace:SerizePlace;
private var _miniMap:MiniMap;
private var _serInt:int;// = 4
private var falgCount:int;// = 0
private var _bigMap:Bitmap;
public function OtherRole(_arg1:Bitmap=null, _arg2:MiniMap=null, _arg3:String=""){
super(_arg1, _arg2, _arg3);
_serPlace = SerizePlace.getInstance();
maxCount = 15;
}
override public function markSerGrid():void{
if (serFlag){
falgCount++;
if ((((this.px == InitRoleSite.getInstance().ownNode.px)) && ((this.py == InitRoleSite.getInstance().ownNode.py)))){
if (this.teamStr != InitRoleSite.getInstance().ownNode.serStr){
if (this.parent.parent != null){
this["parent"]["parent"].attackedText();
};
};
};
if (falgCount >= 5){
serFlag = false;
if ((((this.px == InitRoleSite.getInstance().ownNode.px)) && ((this.py == InitRoleSite.getInstance().ownNode.py)))){
if (this.teamStr != InitRoleSite.getInstance().ownNode.serStr){
if (this.parent.parent != null){
this["parent"]["parent"].takedText();
};
};
};
_serPlace.MarkSerize(this, this.teamStr);
falgCount = 0;
_serInt = 0;
markFalg = true;
};
};
}
public function occupationMove(_arg1:MiniMap, _arg2:Bitmap, _arg3:Array):void{
_miniMap = _arg1;
_bigMap = _arg2;
_mapArr = _arg3;
serFlag = true;
}
override public function occupationHandler():void{
var _local1:GridNode;
var _local2:MapNode;
var _local3:SchoolRoad;
var _local4:MapNode;
var _local5:int;
var _local6:int;
if (state == STOP){
_serInt++;
if (((markFalg) && ((_serInt == 5)))){
markFalg = false;
_local1 = _serPlace.getSerizeNode(this, this.teamStr);
_local2 = new MapNode();
_local2.px = _local1.px;
_local2.py = _local1.py;
if (_local2 != null){
if (this.roadList){
this.roadList = [];
};
_local3 = new SchoolRoad();
_local4 = new MapNode();
_local4.px = this.px;
_local4.py = this.py;
_local5 = new Date().getTime();
this.roadList = _local3.searchRoad(_local4, _local2, _mapArr);
_local6 = (new Date().getTime() - _local5);
if (this.roadList.length > 0){
this.manStartMovie(_miniMap, _bigMap);
} else {
_serInt = 0;
markFalg = true;
};
} else {
trace("You are the winner!");
};
};
};
}
}
}//package src.role
Section 88
//OwnRole (src.role.OwnRole)
package src.role {
import src.vo.*;
import src.map.*;
import flash.display.*;
public class OwnRole extends PlayerRole {
private var falgCount:int;// = 0
public var dieFlag:Boolean;// = false
private var _serPlace:SerizePlace;
private var _select:Boolean;
public function OwnRole(_arg1:Bitmap=null, _arg2:MiniMap=null, _arg3:String=""){
super(_arg1, _arg2, _arg3);
_serPlace = SerizePlace.getInstance();
maxCount = 30;
}
override public function markSerGrid():void{
if (serFlag){
falgCount++;
if (falgCount >= 5){
if ((((this.px == InitRoleSite.getInstance().ownNode.px)) && ((this.py == InitRoleSite.getInstance().ownNode.py)))){
if (this.teamStr != InitRoleSite.getInstance().ownNode.serStr){
if (this.parent.parent != null){
this["parent"]["parent"].removeText();
};
};
};
serFlag = false;
falgCount = 0;
_serPlace.MarkSerize(this, this.teamStr);
};
};
}
public function get select():Boolean{
return (_select);
}
public function set select(_arg1:Boolean):void{
_select = _arg1;
if (_select){
_player.mcSelect.visible = true;
} else {
_player.mcSelect.visible = false;
};
}
}
}//package src.role
Section 89
//PlayerRole (src.role.PlayerRole)
package src.role {
import src.vo.*;
import src.map.*;
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import src.uitl.*;
import flash.media.*;
import src.view.*;
public class PlayerRole extends MovieClip {
private const RIGHT_DOWN:int = 1;
private const HURT:int = 3;
private const HIT_TIME:int = 2000;
private const DIE:int = 4;
private const HIT:int = 2;
private const FIND_TIME:int = 4000;
private const RIGHT_UP:int = 3;
private const MOVE:int = 1;
private const LEFT_UP:int = 2;
private const LEFT_DOWN:int = 0;
private const MOVE_TO_HIT:int = 5;
public var _player:MovieClip;
private var renA:Object;
private var hp:int;
private var isHit:Boolean;// = false
protected var maxCount:int;// = 30
private var findTimer:Timer;
private var _initRole:InitRoleSite;
private var count:int;// = 0
public var id:uint;// = 0
public var lev:int;// = 1
public var px:uint;
public var py:uint;
private var exp:int;// = 0
private var needToHit:Boolean;// = false
public var roadL:Array;
private var hitSound:Sound;
private var hurtSound:Sound;
private var _helpNode:MapNode;
private var _moveFlag:Boolean;// = false
private var _miniMap:MiniMap;
public var attack:int;// = 4
private var hitPlayer:PlayerRole;
private var isHurt:Boolean;// = false
private var hurtID:uint;
private var dieSound:Sound;
private var hitTimer:Timer;
private var _mapArr:Array;
private var direction:int;// = -1
private var isFirt:Boolean;// = true
public var state:int;// = 0
public var teamStr:String;
private var testStepX:Number;
private var testStepY:Number;
private var _step:int;
private var _timer_j:int;
private var _timer_i:int;
private var max_hp:int;// = 20
private var _schoolMap:Bitmap;
private var addX:int;// = 0
private var addY:int;// = 0
public var roadList:Array;
public var serFlag:Boolean;// = false
public static const STOP:int = 0;
public static var ROLEDIE_EVENT:String = "die";
private static var player_id:uint = 0;
public function PlayerRole(_arg1:Bitmap=null, _arg2:MiniMap=null, _arg3:String=""){
hp = max_hp;
hitTimer = new Timer(2000);
findTimer = new Timer(4000);
renA = new Object();
roadL = new Array();
super();
big();
id = player_id++;
_schoolMap = _arg1;
_miniMap = _arg2;
if (_arg3 != ""){
_player = ResourceLoader.getClass(_arg3);
addChild(_player);
_player.gotoAndStop(1);
_player.mcSelect.visible = false;
this.mouseChildren = false;
};
state = STOP;
_mapArr = MapArray.getInstance()._mapArr;
_initRole = InitRoleSite.getInstance();
hitSound = (ResourceLoader.getClass(("hitSound" + (int((Math.random() * 11)) + 1).toString())) as Sound);
hurtSound = (ResourceLoader.getClass(("hitSound" + (int((Math.random() * 3)) + 1).toString())) as Sound);
dieSound = (ResourceLoader.getClass(("dieSound" + (int((Math.random() * 1)) + 1).toString())) as Sound);
}
public function findPlayer():void{
var _local1:PlayerRole;
if (state == STOP){
_local1 = toFindPlayer();
if (_local1 != null){
goToAndHit(_local1);
};
};
}
private function enoughHit():void{
if (((!((hitPlayer == null))) && (((Math.abs((this.x - hitPlayer.x)) + Math.abs((this.y - hitPlayer.y))) > 25)))){
this.x = (hitPlayer.x + (((this.x - hitPlayer.x) * 3) / 4));
this.y = (hitPlayer.y + (((this.y - hitPlayer.y) * 3) / 4));
};
}
private function hitOver(_arg1:Event):void{
_player.removeEventListener("HitOver", hitOver);
pause();
}
public function toHit(_arg1:PlayerRole):void{
var _local2:Array;
if (_arg1.state == DIE){
state = STOP;
pause();
serFlag = true;
return;
};
if (!isNear(this.px, this.py, _arg1.px, _arg1.py)){
return;
};
if ((((state == MOVE)) || ((state == MOVE_TO_HIT)))){
pause();
_mapArr[this.py][this.px].standMan = this;
MapArray.getInstance().updateMapArr(this.px, this.py);
_local2 = ((state)==MOVE) ? roadList : roadL;
if (_local2.length > 0){
};
this.x = (_mapArr[this.py][this.px].cx + (_schoolMap.x + 965));
this.y = (_mapArr[this.py][this.px].cy + (_schoolMap.y + 75));
};
direction = getDirection(_arg1);
_initRole.swapLevel(this);
state = HIT;
hitPlayer = _arg1;
hitAgain();
}
public function stopHit():void{
state = STOP;
isHit = false;
isHurt = false;
hitPlayer = null;
serFlag = true;
}
private function big():void{
var _local1:Number = ((30 * Math.PI) / 180);
testStepX = (2 * Math.cos(_local1));
testStepY = (2 * Math.sin(_local1));
var _local2:Sprite = new Sprite();
_local2.graphics.beginFill(0, 0);
_local2.graphics.drawRect(-20, -65, 45, 65);
_local2.graphics.endFill();
this.addChild(_local2);
}
public function levelUp(_arg1:PlayerRole):void{
var _local3:MovieClip;
exp = (exp + _arg1.lev);
var _local2:int;
while (exp >= lev) {
_local3 = ResourceLoader.getClass("LevelMC");
this.addChild(_local3);
_local3.x = 0;
_local3.y = _local2;
_local2 = (_local2 + 20);
exp = (exp - lev);
lev++;
_player.mcBG.width = (_player.mcBG.width + ((5 * _player.mcBG.width) / max_hp));
max_hp = (max_hp + 5);
hp = max_hp;
attack++;
_player.mcHP.width = ((_player.mcBG.width * hp) / max_hp);
_player.mcBG.x = (_player.mcBG.x - ((2.5 * _player.mcBG.width) / max_hp));
_player.mcHP.x = _player.mcBG.x;
};
}
private function toHurt(_arg1:PlayerRole):void{
var _local2:Array;
if (state == DIE){
return;
};
if ((((state == MOVE)) || ((state == MOVE_TO_HIT)))){
pause();
_mapArr[this.py][this.px].standMan = this;
MapArray.getInstance().updateMapArr(this.px, this.py);
_local2 = ((state)==MOVE) ? roadList : roadL;
if (_local2.length > 0){
};
this.x = (_mapArr[this.py][this.px].cx + (_schoolMap.x + 965));
this.y = (_mapArr[this.py][this.px].cy + (_schoolMap.y + 75));
state = HURT;
hitPlayer = _arg1;
direction = getDirection(_arg1);
};
if (renA[_arg1.id.toString()] == null){
renA[_arg1.id.toString()] = _arg1;
};
if (hitPlayer == null){
hitPlayer = _arg1;
direction = getDirection(_arg1);
};
hp = (hp - _arg1.attack);
if (hp <= 0){
direction = getDirection(_arg1);
_arg1.levelUp(this);
dieTo(direction);
return;
};
_player.mcHP.width = ((_player.mcBG.width * hp) / max_hp);
if (((isHit) || (isHurt))){
return;
};
isHurt = true;
hurtID = setTimeout(hurtTo, 300, direction);
}
public function markSerGrid():void{
}
private function dieTo(_arg1:int):void{
var _local2:PlayerRole;
if (SchoolMap.isSound){
dieSound.play();
};
_player.gotoAndStop((17 + int((_arg1 % 2))));
for each (_local2 in renA) {
_local2.stopHit();
};
state = DIE;
if (hitPlayer != null){
hitPlayer.removeHurt(this);
hitPlayer = null;
};
clearTimeout(hurtID);
_mapArr[this.py][this.px].standMan = null;
MapArray.getInstance().updateMapArr(this.px, this.py, true);
_player.removeEventListener("HitOver", hitOver);
_player.removeEventListener("HurtOver", hurtOver);
_player.addEventListener("DieOver", dieOver);
dispatchEvent(new Event(ROLEDIE_EVENT));
}
private function moveNext(_arg1:MapNode):Boolean{
var _local2:int = (_arg1.cx + (_schoolMap.x + 965));
var _local3:int = (_arg1.cy + (_schoolMap.y + 75));
if (_local2 > this.x){
this.x = (this.x + testStepX);
};
if (_local3 > this.y){
this.y = (this.y + testStepY);
};
if (_local2 < this.x){
this.x = (this.x - testStepX);
};
if (_local3 < this.y){
this.y = (this.y - testStepY);
};
if (((((((((_local3 - testStepY) < this.y)) && (((_local3 + testStepY) > this.y)))) && (((_local2 - testStepX) < this.x)))) && (((_local2 + testStepY) > this.x)))){
this.x = _arg1.cx;
this.y = _arg1.cy;
return (true);
};
return (false);
}
public function moveAndHit():void{
var _local1:MapNode;
var _local2:PlayerRole;
var _local3:MapNode;
var _local4:SchoolRoad;
if (state == MOVE_TO_HIT){
_local1 = roadL[_timer_j];
if (_mapArr[_local1.py][_local1.px].standMan != null){
_local2 = _mapArr[_local1.py][_local1.px].standMan;
if (_step > 5){
_step = 5;
this.x = ((_helpNode.cx + (((_step + 1) * (_local1.cx - _helpNode.cx)) / 12)) + (_schoolMap.x + 965));
this.y = ((_helpNode.cy + (((_step + 1) * (_local1.cy - _helpNode.cy)) / 12)) + (_schoolMap.y + 75));
};
if (_local2.teamStr != this.teamStr){
toHit(_local2);
return;
};
if ((((_local2.state == MOVE)) || ((_local2.state == MOVE_TO_HIT)))){
count++;
if (count >= maxCount){
state = STOP;
stopMove();
serFlag = true;
};
return;
} else {
_local3 = new MapNode();
_local3.px = this.px;
_local3.py = this.py;
_local4 = new SchoolRoad();
roadL = _local4.searchRoad(_local3, roadL[(roadL.length - 1)], _mapArr);
if (roadL.length == 0){
state = STOP;
stopMove();
serFlag = true;
} else {
count = 0;
roadL.reverse();
_timer_j = 0;
};
return;
};
};
if (_step < 12){
if (_step == 0){
changeDirect((_local1.px - _helpNode.px), (_local1.py - _helpNode.py));
};
this.x = ((_helpNode.cx + (((_step + 1) * (_local1.cx - _helpNode.cx)) / 12)) + (_schoolMap.x + 965));
this.y = ((_helpNode.cy + (((_step + 1) * (_local1.cy - _helpNode.cy)) / 12)) + (_schoolMap.y + 75));
_initRole.swapLevel(this);
_step++;
} else {
this.x = (_local1.cx + (_schoolMap.x + 965));
this.y = (_local1.cy + (_schoolMap.y + 75));
if (_local1.goFlag == 1){
this.alpha = 0.5;
} else {
this.alpha = 1;
};
_helpNode = _local1;
_timer_j++;
_step = 0;
_mapArr[this.py][this.px].standMan = null;
this.px = _local1.px;
this.py = _local1.py;
_local1.standMan = this;
if (hitPlayer.state == DIE){
state = STOP;
pause();
direction = -1;
hitPlayer = null;
serFlag = true;
return;
};
if (isNear(this.px, this.py, hitPlayer.px, hitPlayer.py)){
toHit(hitPlayer);
return;
};
if ((_timer_j % 4) == 0){
if (!isNear(hitPlayer.px, hitPlayer.py, roadL[(roadL.length - 1)].px, roadL[(roadL.length - 1)].py)){
goTo(hitPlayer);
return;
};
};
if (_timer_j >= roadL.length){
if (!isNear(hitPlayer.px, hitPlayer.py, roadL[(roadL.length - 1)].px, roadL[(roadL.length - 1)].py)){
goTo(hitPlayer);
return;
};
MapArray.getInstance().updateMapArr(this.px, this.py);
state = STOP;
pause();
direction = -1;
hitPlayer = null;
serFlag = true;
};
};
_miniMap.updateMan(this);
};
}
private function hitTo(_arg1:int):void{
if (_arg1 != -1){
if (SchoolMap.isSound){
hitSound.play();
};
isHit = true;
_player.gotoAndStop((9 + _arg1));
_player.addEventListener("HitOver", hitOver);
} else {
isHurt = false;
isHit = false;
};
}
public function goAndStop(_arg1:int):void{
_player.gotoAndStop(_arg1);
}
private function dieOver(_arg1:Event):void{
_player.removeEventListener("DieOver", dieOver);
this.parent.removeChild(this);
_miniMap.clearMan(this);
}
private function isNear(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):Boolean{
if ((((Math.abs((_arg1 - _arg3)) <= 1)) && ((Math.abs((_arg2 - _arg4)) == 0)))){
return (true);
};
if ((((Math.abs((_arg1 - _arg3)) == 0)) && ((Math.abs((_arg2 - _arg4)) <= 1)))){
return (true);
};
return (false);
}
private function goTo(_arg1:PlayerRole):void{
clearTimeout(hurtID);
state = STOP;
_timer_j = 0;
hitPlayer = _arg1;
var _local2:MapNode = new MapNode();
_local2.px = this.px;
_local2.py = this.py;
var _local3:MapNode = new MapNode();
_local3.px = _arg1.px;
_local3.py = _arg1.py;
var _local4:SchoolRoad = new SchoolRoad();
if (this.roadL){
if (this.roadL.length > 0){
};
this.roadL = [];
state = STOP;
stopMove();
serFlag = true;
};
roadL = _local4.searchRoad(_local2, _local3, _mapArr);
if (this.roadL.length > 0){
roadL.reverse();
MapArray.getInstance().updateMapArr(this.px, this.py, true);
state = MOVE_TO_HIT;
_helpNode = new MapNode();
_helpNode.cx = (this.x - (_schoolMap.x + 965));
_helpNode.cy = (this.y - (_schoolMap.y + 75));
_helpNode.px = this.px;
_helpNode.py = this.py;
direction = -1;
count = 0;
};
}
private function hurtOver(_arg1:Event):void{
_player.removeEventListener("HurtOver", hurtOver);
isHit = false;
isHurt = false;
if (state == HIT){
if (needToHit){
hitAgain();
} else {
pause();
};
} else {
if (hitPlayer != null){
toHit(hitPlayer);
} else {
pause();
};
};
}
public function hitAgain():void{
if (state == HIT){
if (isHurt){
needToHit = true;
return;
};
if (isHit){
return;
};
if (hitPlayer != null){
needToHit = false;
hitTo(direction);
hitPlayer.toHurt(this);
enoughHit();
};
};
}
public function occupationHandler():void{
}
public function test():void{
}
public function goToAndHit(_arg1:PlayerRole):void{
if (isNear(this.px, this.py, _arg1.px, _arg1.py)){
toHit(_arg1);
return;
};
goTo(_arg1);
}
public function removeHurt(_arg1:PlayerRole):void{
delete renA[_arg1.id.toString()];
}
private function changeDirect(_arg1:int, _arg2:int):void{
if ((((_arg2 == 1)) && (!((direction == LEFT_DOWN))))){
_player.gotoAndStop(5);
direction = LEFT_DOWN;
} else {
if ((((_arg1 == 1)) && (!((direction == RIGHT_DOWN))))){
_player.gotoAndStop(6);
direction = RIGHT_DOWN;
} else {
if ((((_arg1 == -1)) && (!((direction == LEFT_UP))))){
_player.gotoAndStop(7);
direction = LEFT_UP;
} else {
if ((((_arg2 == -1)) && (!((direction == RIGHT_UP))))){
_player.gotoAndStop(8);
direction = RIGHT_UP;
};
};
};
};
}
private function getDirection(_arg1:PlayerRole):int{
if (this.px >= _arg1.px){
if (this.py < _arg1.py){
return (LEFT_DOWN);
};
if (this.px == _arg1.px){
return (RIGHT_UP);
};
return (LEFT_UP);
//unresolved jump
};
if (this.py <= _arg1.py){
return (RIGHT_DOWN);
};
return (RIGHT_UP);
}
private function toFindPlayer():PlayerRole{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4 = 1;
while (_local4 < 5) {
_local1 = (this.px - _local4);
if (_local1 >= 0){
_local3 = -(_local4);
while (_local3 < _local4) {
_local2 = (this.py + _local3);
if ((((_local2 >= MapArray.VUINT)) || ((_local2 < 0)))){
} else {
if (((!((_mapArr[_local2][_local1].standMan == null))) && (!((_mapArr[_local2][_local1].standMan.teamStr == this.teamStr))))){
return (_mapArr[_local2][_local1].standMan);
};
};
_local3++;
};
};
_local1 = (this.px + _local4);
if (_local1 < MapArray.WUINT){
_local3 = -(_local4);
while (_local3 < _local4) {
_local2 = (this.py + _local3);
if ((((_local2 >= MapArray.VUINT)) || ((_local2 < 0)))){
} else {
if (((!((_mapArr[_local2][_local1].standMan == null))) && (!((_mapArr[_local2][_local1].standMan.teamStr == this.teamStr))))){
return (_mapArr[_local2][_local1].standMan);
};
};
_local3++;
};
};
_local2 = (this.py - _local4);
if (_local2 >= 0){
_local3 = (-(_local4) + 1);
while (_local3 <= (_local4 - 1)) {
_local1 = (this.px + _local3);
if ((((_local1 >= MapArray.WUINT)) || ((_local1 < 0)))){
} else {
if (((!((_mapArr[_local2][_local1].standMan == null))) && (!((_mapArr[_local2][_local1].standMan.teamStr == this.teamStr))))){
return (_mapArr[_local2][_local1].standMan);
};
};
_local3++;
};
};
_local2 = (this.py + _local4);
if (_local2 < MapArray.VUINT){
_local3 = (-(_local4) + 1);
while (_local3 <= (_local4 - 1)) {
_local1 = (this.px + _local3);
if ((((_local1 >= MapArray.WUINT)) || ((_local1 < 0)))){
} else {
if (((!((_mapArr[_local2][_local1].standMan == null))) && (!((_mapArr[_local2][_local1].standMan.teamStr == this.teamStr))))){
return (_mapArr[_local2][_local1].standMan);
};
};
_local3++;
};
};
_local4++;
};
return (null);
}
public function manStartMovie(_arg1:MiniMap, _arg2:Bitmap):void{
var _local3:PlayerRole;
_helpNode = new MapNode();
_miniMap = _arg1;
_schoolMap = _arg2;
roadList.reverse();
_timer_i = 0;
_step = 0;
_helpNode.cx = (this.x - (_schoolMap.x + 965));
_helpNode.cy = (this.y - (_schoolMap.y + 75));
_helpNode.px = this.px;
_helpNode.py = this.py;
state = MOVE;
direction = -1;
count = 0;
isFirt = true;
MapArray.getInstance().updateMapArr(this.px, this.py, true);
for each (_local3 in renA) {
_local3.stopHit();
};
if (hitPlayer != null){
hitPlayer.removeHurt(this);
hitPlayer = null;
};
isHit = false;
isHurt = false;
clearTimeout(hurtID);
}
private function hurtTo(_arg1:int):void{
if (_arg1 != -1){
if (SchoolMap.isSound){
hurtSound.play();
};
_player.gotoAndStop((13 + _arg1));
_player.addEventListener("HurtOver", hurtOver);
} else {
isHurt = false;
isHit = false;
};
}
public function removeSound():void{
clearTimeout(hurtID);
hitSound = null;
hurtSound = null;
dieSound = null;
}
public function stopMove():void{
_player.gotoAndStop((direction + 1));
}
private function pause():void{
stopMove();
isHit = false;
isHurt = false;
}
public function movieHandler():void{
var _local1:MapNode;
var _local2:PlayerRole;
var _local3:MapNode;
var _local4:SchoolRoad;
if (state == MOVE){
_local1 = roadList[_timer_i];
if (_mapArr[_local1.py][_local1.px].standMan != null){
_local2 = _mapArr[_local1.py][_local1.px].standMan;
if (_step > 5){
_step = 5;
this.x = ((_helpNode.cx + (((_step + 1) * (_local1.cx - _helpNode.cx)) / 12)) + (_schoolMap.x + 965));
this.y = ((_helpNode.cy + (((_step + 1) * (_local1.cy - _helpNode.cy)) / 12)) + (_schoolMap.y + 75));
};
if ((Math.abs((this.x - _local2.x)) + Math.abs((this.y - _local2.y))) < 15){
};
if ((((this is OtherRole)) && (!((_local2.teamStr == this.teamStr))))){
toHit(_local2);
return;
};
if ((((_local2.state == MOVE)) || ((_local2.state == MOVE_TO_HIT)))){
count++;
if (count >= maxCount){
count = 0;
stopMove();
state = STOP;
serFlag = true;
};
return;
} else {
_local3 = new MapNode();
_local3.px = this.px;
_local3.py = this.py;
_local4 = new SchoolRoad();
roadList = _local4.searchRoad(_local3, roadList[(roadList.length - 1)], _mapArr);
if (roadList.length == 0){
state = STOP;
stopMove();
MapArray.getInstance().updateMapArr(this.px, this.py);
serFlag = true;
} else {
_step = 0;
roadList.reverse();
_timer_i = 0;
};
return;
};
};
if (_step < 12){
if (_step == 0){
changeDirect((_local1.px - _helpNode.px), (_local1.py - _helpNode.py));
};
this.x = ((_helpNode.cx + (((_step + 1) * (_local1.cx - _helpNode.cx)) / 12)) + (_schoolMap.x + 965));
this.y = ((_helpNode.cy + (((_step + 1) * (_local1.cy - _helpNode.cy)) / 12)) + (_schoolMap.y + 75));
_initRole.swapLevel(this);
_step++;
} else {
this.x = (_local1.cx + (_schoolMap.x + 965));
this.y = (_local1.cy + (_schoolMap.y + 75));
if (_local1.goFlag == 1){
this.alpha = 0.5;
} else {
this.alpha = 1;
};
_helpNode = _local1;
_timer_i++;
_step = 0;
_mapArr[this.py][this.px].standMan = null;
this.px = _local1.px;
this.py = _local1.py;
_mapArr[this.py][this.px].standMan = this;
if (_timer_i >= roadList.length){
state = STOP;
stopMove();
direction = -1;
serFlag = true;
MapArray.getInstance().updateMapArr(this.px, this.py);
return;
};
};
_miniMap.updateMan(this);
};
}
}
}//package src.role
Section 90
//ResourceLoader (src.uitl.ResourceLoader)
package src.uitl {
import flash.display.*;
public class ResourceLoader extends Sprite {
public static const LOADER_COMPLETE:String = "loaderComplete";
private static var _UIElement:Object = {};
private static var _loader;
private static var _instance:ResourceLoader = null;
private static var Game:Class = ResourceLoader_Game;
public function ResourceLoader(_arg1:singleChildClass){
if (_arg1 == null){
throw (new Error("ResourceLoader Singleton already constructed."));
};
}
public function loaderComplete(_arg1, _arg2:MovieClip):void{
var _local6:*;
_loader = _arg1;
var _local3:* = _arg2;
var _local4:int = _local3.numChildren;
var _local5:int;
while (_local5 < _local4) {
_local6 = _local3.getChildAt(_local5);
_UIElement[_local6.name] = _local6;
_local5++;
};
}
public static function init(_arg1:String):void{
if (_instance == null){
_instance = new ResourceLoader(new singleChildClass());
} else {
throw (new Error("Only one ResourceLoader instance should be instantiated."));
};
}
public static function getClass(_arg1:String){
var _local2:Class = (_loader.loaderInfo.applicationDomain.getDefinition(_arg1) as Class);
return (new (_local2));
}
public static function releaseResource():void{
Game = null;
_loader = null;
}
public static function getInstance():ResourceLoader{
return (_instance);
}
public static function getUIElement(_arg1:String){
return (_UIElement[_arg1]);
}
}
}//package src.uitl
class singleChildClass {
private function singleChildClass(){
}
}
Section 91
//ResourceLoader_Game (src.uitl.ResourceLoader_Game)
package src.uitl {
import mx.core.*;
import flash.utils.*;
public class ResourceLoader_Game extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function ResourceLoader_Game(){
dataClass = ResourceLoader_Game_dataClass;
super();
initialWidth = (40000 / 20);
initialHeight = (40000 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package src.uitl
Section 92
//ResourceLoader_Game_dataClass (src.uitl.ResourceLoader_Game_dataClass)
package src.uitl {
import mx.core.*;
public class ResourceLoader_Game_dataClass extends ByteArrayAsset {
}
}//package src.uitl
Section 93
//SchoolMap (src.view.SchoolMap)
package src.view {
import src.vo.*;
import src.map.*;
import src.role.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import src.uitl.*;
import flash.media.*;
import flash.text.*;
public class SchoolMap extends Sprite {
private var _cancelBtn:SimpleButton;
private var _mapArr:Array;
private var _initRole:InitRoleSite;
private var _pueseBtn:SimpleButton;
private var btnSound:Sound;
private var textContener:Sprite;
private var _shap:Shape;
private var _soundBtn:SimpleButton;
private var _redGrid:RedGrid;
private var _loseView:MovieClip;
public var _team:String;
private var _roadList:Array;
public var statsON:Boolean;// = false
private var _targetPoint:Point;
private var _rect:Rectangle;
private var _miniMap:MiniMap;
private var textF:TextField;
private var _chView:MovieClip;
private var btn1:MovieClip;
private var btn2:MovieClip;
private var btn3:MovieClip;
private var _selectList:Array;
private var _redHand:MovieClip;
private var _bitmapSchool:Bitmap;
private var _winView:MovieClip;
private var beTake:MovieClip;
private var beAttack:MovieClip;
private var _beginView:MovieClip;
private var _replayBtn:SimpleButton;
private var _resumeBtn:SimpleButton;
private var _stage:Stage;
public static const PLAYAGAIN_EVENT:String = "PlayAgain";
public static var isSound:Boolean = true;
public function SchoolMap(_arg1:String, _arg2:Stage){
_mapArr = new Array();
_selectList = new Array();
_shap = new Shape();
textF = new TextField();
textContener = new Sprite();
super();
this._team = _arg1;
this._stage = _arg2;
btnSound = (ResourceLoader.getClass("btnSound") as Sound);
init(_arg1);
}
private function onCheck(_arg1:MouseEvent):void{
var _local2:Object = SerizePlace._instance.getInfo();
var _local3:Array = ["Emos take ", "Hoodies take ", "Jocks take ", "Chavs take "];
if (InitRoleSite._selectStr == "up"){
_local3[0] = "You take ";
};
if (InitRoleSite._selectStr == "down"){
_local3[1] = "You take ";
};
if (InitRoleSite._selectStr == "left"){
_local3[2] = "You take ";
};
if (InitRoleSite._selectStr == "right"){
_local3[3] = "You take ";
};
textF.htmlText = (((((((((((((((("<font color='#ffffff'>" + _local3[0]) + "<font color='#ff0000'> ") + _local2["up"]) + "%</font>, ") + _local3[1]) + "<font color='#ff0000'> ") + _local2["down"]) + "%</font>, ") + _local3[2]) + "<font color='#ff0000'> ") + _local2["left"]) + "%</font>, ") + _local3[3]) + "<font color='#ff0000'> ") + _local2["right"]) + "%</font>.</font>");
if (textContener.numChildren != 0){
textContener.removeChildAt(0);
};
if (statsON == false){
textContener.addChild(textF);
statsON = true;
} else {
trace("visible false");
statsON = false;
};
}
private function gameOverHandler(_arg1:Event):void{
_arg1.target.removeEventListener(InitRoleSite.GAMEOVER_EVENT, gameOverHandler);
_stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
_stage.removeEventListener(MouseEvent.MOUSE_MOVE, redGridMove);
var _local2:int = _initRole.result;
removeChild(_initRole);
while (numChildren > 0) {
removeChildAt(0);
};
if (_local2 == 1){
toWinView(_team);
} else {
toLoseView(_team);
};
}
private function init(_arg1:String):void{
var _local2:MovieClip = ResourceLoader.getUIElement("bigMap");
var _local3:BitmapData = new BitmapData(_local2.width, _local2.height, true, 0);
var _local4:Matrix = new Matrix();
_local4.scale(0.5, 0.5);
_local2.scaleX = 0.5;
_local2.scaleY = 0.5;
_local3.draw(_local2, _local4);
_bitmapSchool = new Bitmap(_local3);
this.addChild(_bitmapSchool);
_redGrid = new RedGrid();
addChild(_redGrid);
_redGrid.visible = false;
_mapArr = MapArray.getInstance().getMapArr();
_miniMap = new MiniMap(_bitmapSchool, 0.1);
_initRole = InitRoleSite.getInstance(_miniMap, _bitmapSchool, _mapArr);
addChild(_initRole);
_initRole.createRoadMans(_arg1);
_initRole.addEventListener(InitRoleSite.GAMEOVER_EVENT, gameOverHandler);
_pueseBtn = (ResourceLoader.getUIElement("pauseBtn") as SimpleButton);
_resumeBtn = (ResourceLoader.getUIElement("resumeBtn") as SimpleButton);
_replayBtn = (ResourceLoader.getUIElement("rePlayBtn") as SimpleButton);
_soundBtn = (ResourceLoader.getUIElement("soundBtn") as SimpleButton);
this.addChild(_pueseBtn);
_pueseBtn.x = 540;
_pueseBtn.y = 20;
_pueseBtn.visible = true;
this.addChild(_resumeBtn);
_resumeBtn.x = 540;
_resumeBtn.y = 20;
_resumeBtn.visible = false;
this.addChild(_replayBtn);
_replayBtn.x = 600;
_replayBtn.y = 20;
this.addChild(_soundBtn);
_soundBtn.x = 490;
_soundBtn.y = 20;
_pueseBtn.addEventListener(MouseEvent.CLICK, puese);
_resumeBtn.addEventListener(MouseEvent.CLICK, resume);
_replayBtn.addEventListener(MouseEvent.CLICK, replay);
_soundBtn.addEventListener(MouseEvent.CLICK, onSoundBtn);
this.addChild(_miniMap);
_miniMap.x = (_stage.stageWidth - _miniMap.width);
_miniMap.y = (_stage.stageHeight - _miniMap.height);
_miniMap.name = "miniMap";
_miniMap.setSite(_arg1);
initGrid();
_redHand = ResourceLoader.getUIElement("hand");
addChild(_redHand);
_redHand.visible = false;
_cancelBtn = ResourceLoader.getUIElement("cancel");
addChild(_cancelBtn);
_cancelBtn.x = 570;
_cancelBtn.y = 320;
_cancelBtn.visible = false;
setChildIndex(_miniMap, (numChildren - 1));
_stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
addBtn();
}
public function takedText():void{
if (textContener.numChildren != 0){
textContener.removeChildAt(0);
};
textContener.addChild(beTake);
}
private function moveRoadMen(_arg1, _arg2:int, _arg3:Array):void{
var _local8:MapNode;
var _local9:int;
var _local10:SchoolRoad;
var _local11:int;
var _local12:MapNode;
var _local13:int;
_arg1.select = false;
var _local4:Number = (((_targetPoint.x - transformSite().x) + (2 * (_targetPoint.y - transformSite().y))) / (2 * MapArray.GRID_WIDTH));
var _local5:Number = (((2 * (_targetPoint.y - transformSite().y)) - (_targetPoint.x - transformSite().x)) / (2 * MapArray.GRID_WIDTH));
var _local6:uint = Math.floor(_local4);
var _local7:uint = Math.floor(_local5);
if ((((_local6 >= MapArray.WUINT)) || ((_local7 >= MapArray.VUINT)))){
} else {
_local8 = _mapArr[_local7][_local6];
if (_arg1.roadList){
_local9 = _arg1.roadList.length;
_arg1.roadList = [];
_arg1.state = PlayerRole.STOP;
_arg1.stopMove();
_arg1.serFlag = true;
};
if (((!((_arg1.px == _local6))) || (!((_arg1.py == _local7))))){
_local10 = new SchoolRoad();
_local11 = new Date().getTime();
_local12 = new MapNode();
_local12.px = _arg1.px;
_local12.py = _arg1.py;
_arg1.roadList = _local10.searchRoad(_local12, _local8, _mapArr);
_local13 = (new Date().getTime() - _local11);
if (_arg1.roadList.length > 0){
_arg1.manStartMovie(_miniMap, _bitmapSchool);
} else {
trace("对不起,无路可走");
};
};
};
}
private function clearArray(_arg1:Array):void{
while (_arg1.length > 0) {
_arg1.shift();
};
}
private function redGridMove(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:uint;
var _local5:uint;
var _local6:MapNode;
if (_selectList.length > 0){
_cancelBtn.visible = true;
if ((_arg1.target is OtherRole)){
_redGrid.visible = false;
_redHand.visible = true;
_redHand.x = _arg1.target.x;
_redHand.y = (_arg1.target.y - 50);
setChildIndex(_redHand, (numChildren - 2));
} else {
_redHand.visible = false;
_local2 = (((_arg1.currentTarget.mouseX - transformSite().x) + (2 * (_arg1.currentTarget.mouseY - transformSite().y))) / (2 * MapArray.GRID_WIDTH));
_local3 = (((2 * (_arg1.currentTarget.mouseY - transformSite().y)) - (_arg1.currentTarget.mouseX - transformSite().x)) / (2 * MapArray.GRID_WIDTH));
_local4 = Math.floor(_local2);
_local5 = Math.floor(_local3);
if ((((_local4 < MapArray.WUINT)) && ((_local5 < MapArray.VUINT)))){
_local6 = _mapArr[_local5][_local4];
_redGrid.x = (_local6.cx + transformSite().x);
_redGrid.y = ((_local6.cy + transformSite().y) - 12);
_redGrid.visible = true;
};
};
};
}
private function mouseUpHandler(_arg1:MouseEvent):void{
_stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
_stage.removeEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
_rect = _shap.getBounds(this);
_shap.graphics.clear();
if ((((_rect.width > 0)) && ((_rect.height > 0)))){
_selectList.forEach(unselect);
clearArray(_selectList);
_selectList = InitRoleSite._roadMenList.filter(selectMen);
_rect.width = 0;
_rect.height = 0;
_stage.addEventListener(MouseEvent.MOUSE_MOVE, redGridMove);
};
}
function btnMLCL(_arg1:MouseEvent):void{
MovieClip(root).FogAPI.Tracking.Click();
}
private function toWinView(_arg1:String):void{
_winView = ResourceLoader.getUIElement("winMC");
this.addChild(_winView);
_winView.x = 320;
_winView.y = 230;
switch (_arg1){
case "right":
_winView.gotoAndStop(1);
break;
case "left":
_winView.gotoAndStop(2);
break;
case "up":
_winView.gotoAndStop(3);
break;
case "down":
_winView.gotoAndStop(4);
break;
};
_winView.addEventListener(MouseEvent.CLICK, onWinView);
}
private function resume(_arg1:MouseEvent):void{
if (isSound){
btnSound.play();
};
_pueseBtn.visible = true;
_resumeBtn.visible = false;
_initRole._control._timer.start();
_stage.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
}
private function selectMen(_arg1, _arg2:int, _arg3:Array):Boolean{
if (_arg1.getBounds(this).intersects(_rect)){
_arg1.select = true;
return (true);
};
return (false);
}
private function isClickOther(_arg1):Boolean{
if ((((((((((((((((mouseX >= _miniMap.x)) && ((mouseY >= _miniMap.y)))) || ((_arg1 == btn1)))) || ((_arg1 == btn2)))) || ((_arg1 == _pueseBtn)))) || ((_arg1 == _resumeBtn)))) || ((_arg1 == _replayBtn)))) || ((_arg1 == _soundBtn)))){
return (true);
};
return (false);
}
private function addRoleEvent(_arg1:Event):void{
var _local2:String = _arg1.target.addRoleStr;
_initRole.addRole(_local2);
}
private function onSoundBtn(_arg1:MouseEvent):void{
isSound = !(isSound);
}
private function onWinView(_arg1:MouseEvent):void{
if (_arg1.target == _winView.playAgain){
if (isSound){
btnSound.play();
};
_arg1.currentTarget.removeEventListener(MouseEvent.CLICK, onWinView);
this.removeChild(_winView);
this.dispatchEvent(new Event(PLAYAGAIN_EVENT));
} else {
if (_arg1.target == _winView.playMore){
if (SchoolMap.isSound){
btnSound.play();
};
MovieClip(root).FogAPI.Tracking.Click();
} else {
if (_arg1.target == _winView.addGame){
if (SchoolMap.isSound){
btnSound.play();
};
MovieClip(root).FogAPI.Tracking.Click("http://www.freegamesforyourwebsite.com/");
};
};
};
}
private function puese(_arg1:MouseEvent):void{
if (isSound){
btnSound.play();
};
_resumeBtn.visible = true;
_pueseBtn.visible = false;
_redGrid.visible = false;
_initRole._control._timer.stop();
_selectList.forEach(unselect);
clearArray(_selectList);
_rect.width = 0;
_rect.height = 0;
_stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
_stage.removeEventListener(MouseEvent.MOUSE_MOVE, redGridMove);
}
private function transformSite():Point{
var _local1:Point = new Point();
_local1.x = (MapArray.mapX + _bitmapSchool.x);
_local1.y = (MapArray.mapY + _bitmapSchool.y);
return (_local1);
}
private function removeDieMen(_arg1, _arg2:int, _arg3:Array):Boolean{
if (_arg1.dieFlag == true){
return (false);
};
return (true);
}
private function mouseMoveHandler(_arg1:MouseEvent):void{
var _local2:Number = (_arg1.currentTarget.mouseX - _targetPoint.x);
var _local3:Number = (_arg1.currentTarget.mouseY - _targetPoint.y);
_shap.graphics.clear();
_shap.graphics.beginFill(10079487, 0.2);
_shap.graphics.lineStyle(1, 0xFF00, 0.8);
_shap.graphics.drawRect(_targetPoint.x, _targetPoint.y, _local2, _local3);
_shap.graphics.endFill();
addChild(_shap);
}
private function unselect(_arg1, _arg2:int, _arg3:Array):void{
_arg1.select = false;
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:OwnRole;
var _local3:OwnRole;
_stage.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
_stage.removeEventListener(MouseEvent.MOUSE_MOVE, redGridMove);
_redGrid.visible = false;
_redHand.visible = false;
_cancelBtn.visible = false;
_targetPoint = new Point(_arg1.currentTarget.mouseX, _arg1.currentTarget.mouseY);
if (isClickOther(_arg1.target)){
_stage.addEventListener(MouseEvent.MOUSE_MOVE, redGridMove);
} else {
if ((_arg1.target is OwnRole)){
_selectList.forEach(unselect);
clearArray(_selectList);
if (_arg1.target.dieFlag == false){
_selectList.push(_arg1.target);
_arg1.target.select = true;
_stage.addEventListener(MouseEvent.MOUSE_MOVE, redGridMove);
};
} else {
if (_selectList.length > 0){
_selectList = _selectList.filter(removeDieMen);
if ((_arg1.target is OtherRole)){
for each (_local2 in _selectList) {
_local2.select = false;
_local2.goToAndHit((_arg1.target as PlayerRole));
};
} else {
if (_arg1.target == _cancelBtn){
if (isSound){
btnSound.play();
};
for each (_local3 in _selectList) {
_local3.select = false;
};
} else {
_selectList.forEach(moveRoadMen);
};
};
clearArray(_selectList);
} else {
_stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
};
};
};
}
private function onSelectAll(_arg1:MouseEvent):void{
var _local2:*;
for each (_local2 in InitRoleSite._roadMenList) {
_local2.select = true;
};
_selectList = InitRoleSite._roadMenList.slice(0);
_rect.width = 0;
_rect.height = 0;
_cancelBtn.visible = true;
_stage.addEventListener(MouseEvent.MOUSE_MOVE, redGridMove);
}
private function replay(_arg1:MouseEvent):void{
if (isSound){
btnSound.play();
};
_initRole.removeResorce();
_stage.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
_stage.removeEventListener(MouseEvent.MOUSE_MOVE, redGridMove);
_pueseBtn.removeEventListener(MouseEvent.CLICK, puese);
_resumeBtn.removeEventListener(MouseEvent.CLICK, resume);
_replayBtn.removeEventListener(MouseEvent.CLICK, replay);
_soundBtn.removeEventListener(MouseEvent.MOUSE_UP, onSoundBtn);
while (numChildren > 0) {
removeChildAt(0);
};
trace(_initRole);
this.dispatchEvent(new Event("PlayAgain"));
}
private function onLoseView(_arg1:MouseEvent):void{
if (_arg1.target == _loseView.playAgain){
if (isSound){
btnSound.play();
};
_arg1.currentTarget.removeEventListener(MouseEvent.CLICK, onLoseView);
this.removeChild(_loseView);
dispatchEvent(new Event(PLAYAGAIN_EVENT));
} else {
if (_arg1.target == _loseView.playMore){
if (SchoolMap.isSound){
btnSound.play();
};
MovieClip(root).FogAPI.Tracking.Click();
} else {
if (_arg1.target == _loseView.addGame){
if (SchoolMap.isSound){
btnSound.play();
};
MovieClip(root).FogAPI.Tracking.Click("http://www.freegamesforyourwebsite.com/");
};
};
};
}
public function attackedText():void{
if (textContener.numChildren != 0){
textContener.removeChildAt(0);
};
textContener.addChild(beAttack);
}
public function removeText():void{
if (textContener.numChildren != 0){
textContener.removeChildAt(0);
};
}
private function toLoseView(_arg1:String):void{
_loseView = ResourceLoader.getUIElement("loseMC");
this.addChild(_loseView);
_loseView.x = 320;
_loseView.y = 240;
switch (_arg1){
case "right":
_loseView.gotoAndStop(1);
break;
case "left":
_loseView.gotoAndStop(3);
break;
case "up":
_loseView.gotoAndStop(2);
break;
case "down":
_loseView.gotoAndStop(4);
break;
};
_loseView.addEventListener(MouseEvent.CLICK, onLoseView);
}
private function addBtn():void{
beAttack = (ResourceLoader.getUIElement("attackText") as MovieClip);
beTake = (ResourceLoader.getUIElement("takenText") as MovieClip);
beAttack.x = 0;
beAttack.y = 0;
beTake.x = 0;
beTake.y = 0;
btn1 = ResourceLoader.getUIElement("selectAll");
var _local1:MiniLogo = new MiniLogo();
_local1.scaleX = 0.1;
_local1.scaleY = 0.1;
_local1.x = 0;
_local1.y = 0;
this.addChild(_local1);
_local1.addEventListener(MouseEvent.CLICK, btnMLCL);
btn1.scaleX = 0.7;
btn1.scaleY = 0.7;
btn2 = ResourceLoader.getUIElement("bi");
btn2.scaleX = 0.7;
btn2.scaleY = 0.7;
btn1.x = 430;
btn1.y = 10;
btn2.x = 390;
btn2.y = 10;
this.addChild(btn1);
this.addChild(btn2);
this.addChild(textContener);
textF.x = (textF.x - 5);
textF.y = (textF.y + 7);
textF.width = 600;
textF.selectable = false;
textF.autoSize = TextFieldAutoSize.LEFT;
textF.wordWrap = true;
textF.multiline = true;
var _local2:TextFormat = new TextFormat();
_local2.size = 12;
_local2.font = "Arial Black";
textF.defaultTextFormat = _local2;
textContener.x = 15;
textContener.y = 450;
btn1.addEventListener(MouseEvent.CLICK, onSelectAll);
btn2.addEventListener(MouseEvent.CLICK, onCheck);
}
private function initGrid():void{
var _local3:GridNode;
var _local1:SerizePlace = SerizePlace.getInstance();
var _local2:Array = _local1.getSerizeGird();
for each (_local3 in _local2) {
_local3.x = (((_local3.px - _local3.py) * MapArray.GRID_WIDTH) + transformSite().x);
_local3.y = (((_local3.px + _local3.py) * MapArray.GRID_HEIGHT) + transformSite().y);
addChild(_local3);
_miniMap.setGrid(_local3);
this.setChildIndex(_local3, 1);
_local3.addEventListener(GridNode.ADD_EVENT, addRoleEvent);
};
}
}
}//package src.view
Section 94
//InitRoleSite (src.vo.InitRoleSite)
package src.vo {
import src.map.*;
import src.role.*;
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class InitRoleSite extends Sprite {
private var _bitmapSchool:Bitmap;
private var _mapArr:Array;
private var _miniMap:MiniMap;
public var ownNode:GridNode;
public var result:int;
public var _control:TimerControl;
public static var GAMEOVER_EVENT:String = "gameOver";
public static var _levelList:Array = new Array();
public static var _leftList:Array = new Array();
private static var _instance:InitRoleSite = null;
public static var _roadMenList:Array;
public static var _selectStr:String;
public static var _upList:Array = new Array();
public static var _rightList:Array = new Array();
public static var _downList:Array = new Array();
public function InitRoleSite(_arg1:singleChildClass, _arg2:MiniMap=null, _arg3:Bitmap=null, _arg4:Array=null){
if (_arg1 == null){
throw (new Error("ResourceLoader Singleton already constructed."));
};
_miniMap = _arg2;
_bitmapSchool = _arg3;
_mapArr = _arg4;
_control = new TimerControl();
}
private function initManList(_arg1:String):void{
if (_arg1 == "up"){
_roadMenList = _upList;
} else {
if (_arg1 == "left"){
_roadMenList = _leftList;
} else {
if (_arg1 == "down"){
_roadMenList = _downList;
} else {
if (_arg1 == "right"){
_roadMenList = _rightList;
};
};
};
};
}
public function removeResorce():void{
var _local1:PlayerRole;
_control.stopTimerEvent();
MapArray._instance = null;
SerizePlace._instance = null;
trace((_levelList.length + "............"));
while (_levelList.length > 0) {
_local1 = _levelList.shift();
_local1.removeEventListener(PlayerRole.ROLEDIE_EVENT, roleDieEvent);
_local1.removeSound();
trace((("是孩子??" + _local1.teamStr) + _local1.id));
_instance.removeChild(_local1);
_miniMap.clearMan(_local1);
};
while (_roadMenList.length > 0) {
_roadMenList.shift();
};
while (_upList.length > 0) {
_upList.shift();
};
while (_leftList.length > 0) {
_leftList.shift();
};
while (_rightList.length > 0) {
_rightList.shift();
};
while (_downList.length > 0) {
_downList.shift();
};
_instance = null;
}
private function findTeam(_arg1:PlayerRole):void{
var _local3:PlayerRole;
if ((_arg1 is OwnRole)){
(_arg1 as OwnRole).dieFlag = true;
};
var _local2:int;
var _local4:int = _levelList.length;
var _local5:int = _roadMenList.length;
_arg1.removeSound();
var _local6:int;
while (_local6 < _local4) {
if (_levelList[_local6].id == _arg1.id){
_levelList.splice(_local6, 1);
break;
};
_local6++;
};
var _local7:int;
while (_local7 < _local5) {
if (_roadMenList[_local7].id == _arg1.id){
_roadMenList.splice(_local7, 1);
break;
};
_local7++;
};
if (_arg1.teamStr == "up"){
for each (_local3 in _upList) {
if (_arg1.id == _local3.id){
_upList.splice(_local2, 1);
break;
};
_local2++;
};
} else {
if (_arg1.teamStr == "left"){
for each (_local3 in _leftList) {
if (_arg1.id == _local3.id){
_leftList.splice(_local2, 1);
break;
};
_local2++;
};
} else {
if (_arg1.teamStr == "right"){
for each (_local3 in _rightList) {
if (_arg1.id == _local3.id){
_rightList.splice(_local2, 1);
break;
};
_local2++;
};
} else {
for each (_local3 in _downList) {
if (_arg1.id == _local3.id){
_downList.splice(_local2, 1);
break;
};
_local2++;
};
};
};
};
trace("死了");
}
private function transformSite():Point{
var _local1:Point = new Point();
_local1.x = (MapArray.mapX + _bitmapSchool.x);
_local1.y = (MapArray.mapY + _bitmapSchool.y);
return (_local1);
}
public function addRole(_arg1:String):void{
var _local2:Number;
var _local3:Number;
if ((((_arg1 == "up")) && (((SerizePlace.getInstance().getBaseState("up")) || ((_upList.length >= 12)))))){
return;
};
if ((((_arg1 == "left")) && (((SerizePlace.getInstance().getBaseState("left")) || ((_leftList.length >= 12)))))){
return;
};
if ((((_arg1 == "right")) && (((SerizePlace.getInstance().getBaseState("right")) || ((_rightList.length >= 12)))))){
return;
};
if ((((_arg1 == "down")) && (((SerizePlace.getInstance().getBaseState("down")) || ((_downList.length >= 12)))))){
return;
};
var _local4:String = ranRole(_arg1);
var _local5 = ((Math.random() * 2) >> 0);
var _local6 = ((Math.random() * 2) >> 0);
if (_arg1 == "up"){
if (_local5 == 0){
_local2 = 3;
if (_local6 == 0){
_local3 = 5;
} else {
_local3 = 6;
};
} else {
_local2 = 4;
_local3 = 5;
};
} else {
if (_arg1 == "left"){
if (_local5 == 0){
_local2 = 5;
if (_local6 == 0){
_local3 = 35;
} else {
_local3 = 36;
};
} else {
_local2 = 6;
_local3 = 36;
};
} else {
if (_arg1 == "right"){
if (_local5 == 0){
_local2 = 51;
if (_local6 == 0){
_local3 = 5;
} else {
_local3 = 6;
};
} else {
_local2 = 50;
_local3 = 6;
};
} else {
if (_local5 == 0){
_local2 = 46;
if (_local6 == 0){
_local3 = 37;
} else {
_local3 = 38;
};
} else {
_local2 = 45;
_local3 = 37;
};
};
};
};
initOtherRole(_local2, _local3, _local4, _arg1, _selectStr);
}
private function ranRole(_arg1:String):String{
var _local2:String;
var _local3 = ((Math.random() * 3) >> 0);
if (_arg1 == "up"){
if (_local3 == 0){
_local2 = "player0";
} else {
if (_local3 == 1){
_local2 = "player1";
} else {
_local2 = "player2";
};
};
} else {
if (_arg1 == "left"){
if (_local3 == 0){
_local2 = "player3";
} else {
if (_local3 == 1){
_local2 = "player4";
} else {
_local2 = "player5";
};
};
} else {
if (_arg1 == "right"){
if (_local3 == 0){
_local2 = "player6";
} else {
if (_local3 == 1){
_local2 = "player7";
} else {
_local2 = "player8";
};
};
} else {
if (_local3 == 0){
_local2 = "player9";
} else {
if (_local3 == 1){
_local2 = "player10";
} else {
_local2 = "player11";
};
};
};
};
};
return (_local2);
}
public function swapLevel(_arg1:PlayerRole):void{
var _local2:int;
_levelList.sortOn("y", Array.NUMERIC);
var _local3:int = _levelList.length;
var _local4:int;
while (_local4 < _local3) {
if (_levelList[_local4].y > _arg1.y){
break;
};
_local4++;
};
if (_local4 < _local3){
_local2 = (getChildIndex(_levelList[_local4]) - 1);
} else {
_local2 = (numChildren - 1);
};
if (_local2 < 0){
_local2 = 0;
};
setChildIndex(_arg1, _local2);
}
public function createRoadMans(_arg1:String):void{
var _local2:Array;
_selectStr = _arg1;
_local2 = SerizePlace.getInstance().getSerizeGird();
if (_selectStr == "up"){
ownNode = _local2[0];
} else {
if (_selectStr == "left"){
ownNode = _local2[2];
} else {
if (_selectStr == "right"){
ownNode = _local2[3];
} else {
if (_selectStr == "down"){
ownNode = _local2[1];
};
};
};
};
initOtherRole(3, 5, "player0", "up", _arg1);
initOtherRole(3, 6, "player2", "up", _arg1);
initOtherRole(4, 5, "player1", "up", _arg1);
initOtherRole(5, 36, "player4", "left", _arg1);
initOtherRole(5, 35, "player5", "left", _arg1);
initOtherRole(6, 36, "player3", "left", _arg1);
initOtherRole(51, 5, "player7", "right", _arg1);
initOtherRole(50, 6, "player6", "right", _arg1);
initOtherRole(51, 6, "player8", "right", _arg1);
initOtherRole(46, 37, "player11", "down", _arg1);
initOtherRole(45, 37, "player9", "down", _arg1);
initOtherRole(46, 38, "player10", "down", _arg1);
initManList(_arg1);
}
private function initOtherRole(_arg1:int, _arg2:int, _arg3:String, _arg4:String, _arg5:String):void{
var _local6:PlayerRole;
if (_arg4 == _arg5){
_local6 = new OwnRole(_bitmapSchool, _miniMap, _arg3);
} else {
_local6 = new OtherRole(_bitmapSchool, _miniMap, _arg3);
};
addChild(_local6);
_local6.px = _arg1;
_local6.py = _arg2;
_mapArr[_local6.py][_local6.px].standMan = _local6;
MapArray.getInstance().updateMapArr(_local6.px, _local6.py);
_local6.x = (((_arg1 - _arg2) * MapArray.GRID_WIDTH) + transformSite().x);
_local6.y = (((_arg1 + _arg2) * MapArray.GRID_HEIGHT) + transformSite().y);
_local6.teamStr = _arg4;
if (_arg4 == "up"){
_upList.push(_local6);
} else {
if (_arg4 == "left"){
_local6.goAndStop(4);
_leftList.push(_local6);
} else {
if (_arg4 == "right"){
_rightList.push(_local6);
} else {
if (_arg4 == "down"){
_local6.goAndStop(3);
_downList.push(_local6);
};
};
};
};
_levelList.push(_local6);
swapLevel(_local6);
_local6.addEventListener(PlayerRole.ROLEDIE_EVENT, roleDieEvent);
_miniMap.setMan(_local6);
if ((_local6 is OtherRole)){
(_local6 as OtherRole).occupationMove(_miniMap, _bitmapSchool, _mapArr);
};
}
private function roleDieEvent(_arg1:Event):void{
_arg1.target.removeEventListener(PlayerRole.ROLEDIE_EVENT, roleDieEvent);
findTeam((_arg1.target as PlayerRole));
if (_roadMenList.length <= 0){
trace("you lose");
result = 0;
cleanResource();
} else {
if (_selectStr == "up"){
if ((((((_leftList.length <= 0)) && ((_downList.length <= 0)))) && ((_rightList.length <= 0)))){
result = 1;
cleanResource();
trace("you win");
};
} else {
if (_selectStr == "left"){
if ((((((_upList.length <= 0)) && ((_downList.length <= 0)))) && ((_rightList.length <= 0)))){
result = 1;
cleanResource();
trace("you win");
};
} else {
if (_selectStr == "right"){
if ((((((_leftList.length <= 0)) && ((_downList.length <= 0)))) && ((_upList.length <= 0)))){
result = 1;
cleanResource();
trace("you win");
};
} else {
if (_selectStr == "down"){
if ((((((_leftList.length <= 0)) && ((_upList.length <= 0)))) && ((_rightList.length <= 0)))){
result = 1;
cleanResource();
trace("you win");
};
};
};
};
};
};
}
private function cleanResource():void{
removeResorce();
dispatchEvent(new Event(GAMEOVER_EVENT));
}
public static function getInstance(_arg1:MiniMap=null, _arg2:Bitmap=null, _arg3:Array=null):InitRoleSite{
if (_instance == null){
_instance = new InitRoleSite(new singleChildClass(), _arg1, _arg2, _arg3);
};
return (_instance);
}
}
}//package src.vo
class singleChildClass {
private function singleChildClass(){
}
}
Section 95
//MapNode (src.vo.MapNode)
package src.vo {
import src.role.*;
public class MapNode {
public var standMan:PlayerRole;// = null
public var F:int;
public var G:int;
public var px:uint;
public var py:uint;
public var H:int;
public var goFlag:int;
public var cx:Number;
public var cy:Number;
public var oldGoFlag:int;// = 0
public var father:MapNode;
}
}//package src.vo
Section 96
//MiniMap (src.vo.MiniMap)
package src.vo {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
public class MiniMap extends Sprite {
private const WINDOW_W:int = 640;
private const ADD_H:int = 5;
private const ADD_W:int = 10;
private const WINDOW_H:int = 480;
private const NORTH:String = "up";
private const SOUTH:String = "down";
private const WEST:String = "left";
private const EAST:String = "right";
private var littleMan:Array;
private var grids:Array;
private var man:Array;
private var rate:Number;
private var background:Sprite;
private var window:Sprite;
private var Map:Bitmap;
public function MiniMap(_arg1:Bitmap, _arg2:Number, _arg3:Sprite=null){
man = new Array();
littleMan = new Array();
grids = new Array();
super();
this.Map = _arg1;
this.rate = _arg2;
init();
}
private function onClick(_arg1:MouseEvent):void{
if (_arg1.target == window){
return;
};
window.x = (mouseX - (window.width / 2));
window.y = (mouseY - (window.height / 2));
if (window.x < 0){
window.x = 0;
} else {
if ((window.x + window.width) > background.width){
window.x = (background.width - window.width);
};
};
if (window.y < 0){
window.y = 0;
} else {
if ((window.y + window.height) > background.height){
window.y = (background.height - window.height);
};
};
updateAll();
}
private function onMoveWindow(_arg1:MouseEvent):void{
updateAll();
}
private function onUp(_arg1:MouseEvent):void{
_arg1.stopImmediatePropagation();
this.removeEventListener(MouseEvent.MOUSE_UP, onUp);
this.removeEventListener(MouseEvent.MOUSE_MOVE, onMoveWindow);
window.stopDrag();
}
public function setSite(_arg1:String):void{
switch (_arg1){
case NORTH:
window.x = (((background.width / 2) - (window.width / 2)) - 10);
window.y = 0;
break;
case EAST:
window.x = (background.width - window.width);
window.y = (((background.height / 2) - (window.height / 2)) + 4);
break;
case SOUTH:
window.x = (((background.width / 2) - (window.width / 2)) + 14);
window.y = (background.height - window.height);
break;
case WEST:
window.x = 0;
window.y = ((background.height / 2) - (window.height / 2));
break;
};
updateAll();
}
public function clearMan(_arg1:MovieClip):void{
var _local2:int;
while (_local2 < man.length) {
if (_arg1 == man[_local2]){
man.splice(_local2, 1);
this.removeChild(littleMan[_local2]);
littleMan.splice(_local2, 1);
};
_local2++;
};
}
private function getLittleMan():Shape{
var _local1:Shape = new Shape();
_local1.graphics.beginFill(0xFF0000);
_local1.graphics.drawCircle(0, 0, 2);
_local1.graphics.endFill();
return (_local1);
}
private function init():void{
background = new Sprite();
background.graphics.beginFill(0);
background.graphics.drawRect(0, 0, ((Map.width * rate) + (ADD_W * 2)), ((Map.height * rate) + (ADD_H * 2)));
background.graphics.endFill();
background.alpha = 0.5;
this.addChild(background);
var _local1:Bitmap = new Bitmap(Map.bitmapData);
_local1.scaleX = (_local1.scaleX * rate);
_local1.scaleY = (_local1.scaleY * rate);
_local1.x = ADD_W;
_local1.y = ADD_H;
this.addChild(_local1);
Map.x = (ADD_W / rate);
Map.y = (ADD_H / rate);
window = new Sprite();
window.graphics.lineStyle(1, 0xFFFFFF);
window.graphics.beginFill(0, 0.5);
window.graphics.drawRect(0, 0, (WINDOW_W * rate), (WINDOW_H * rate));
window.graphics.endFill();
this.addChild(window);
this.addEventListener(MouseEvent.CLICK, onClick);
window.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
}
public function setMan(_arg1:MovieClip):void{
man.push(_arg1);
var _local2:Shape = getLittleMan();
littleMan.push(_local2);
_local2.x = (((_arg1.x - Map.x) * rate) + ADD_W);
_local2.y = (((_arg1.y - Map.y) * rate) + ADD_H);
this.addChild(_local2);
}
public function updateAll():void{
var _local3:MovieClip;
var _local4:MovieClip;
var _local1:int = ((-((window.x - ADD_W)) / rate) - Map.x);
var _local2:int = ((-((window.y - ADD_H)) / rate) - Map.y);
Map.x = (Map.x + _local1);
Map.y = (Map.y + _local2);
for each (_local3 in grids) {
_local3.x = (_local3.x + _local1);
_local3.y = (_local3.y + _local2);
};
for each (_local4 in man) {
_local4.x = (_local4.x + _local1);
_local4.y = (_local4.y + _local2);
};
}
private function onDown(_arg1:MouseEvent):void{
window.startDrag(false, new Rectangle(0, 0, (background.width - window.width), (background.height - window.height)));
this.addEventListener(MouseEvent.MOUSE_MOVE, onMoveWindow);
this.addEventListener(MouseEvent.MOUSE_UP, onUp);
}
public function setGrid(_arg1:MovieClip):void{
grids.push(_arg1);
}
public function updateMan(_arg1:MovieClip):void{
var _local2:int;
while (_local2 < man.length) {
if (_arg1 == man[_local2]){
littleMan[_local2].x = (((_arg1.x - Map.x) * rate) + ADD_W);
littleMan[_local2].y = (((_arg1.y - Map.y) * rate) + ADD_H);
};
_local2++;
};
}
}
}//package src.vo
Section 97
//RedGrid (src.vo.RedGrid)
package src.vo {
import src.map.*;
import flash.display.*;
public class RedGrid extends Sprite {
public function RedGrid(){
graphics.lineStyle(1.5, 0xFF0000);
graphics.moveTo(0, 0);
graphics.lineTo(MapArray.GRID_WIDTH, MapArray.GRID_HEIGHT);
graphics.lineTo(0, (MapArray.GRID_HEIGHT * 2));
graphics.lineTo(-(MapArray.GRID_WIDTH), MapArray.GRID_HEIGHT);
graphics.lineTo(0, 0);
graphics.endFill();
}
public static function redPlace():Shape{
var _local1:Shape = new Shape();
_local1.graphics.beginFill(0xFF00, 0.8);
_local1.graphics.moveTo(0, 0);
_local1.graphics.lineTo((MapArray.GRID_WIDTH * 4), (MapArray.GRID_HEIGHT * 4));
_local1.graphics.lineTo(0, ((MapArray.GRID_HEIGHT * 2) * 4));
_local1.graphics.lineTo((-(MapArray.GRID_WIDTH) * 4), (MapArray.GRID_HEIGHT * 4));
_local1.graphics.lineTo(0, 0);
_local1.graphics.endFill();
return (_local1);
}
}
}//package src.vo
Section 98
//SchoolRoad (src.vo.SchoolRoad)
package src.vo {
public class SchoolRoad {
private var _mapArr:Array;
private var _nMaxTry:int;// = 500
private var _isSearch:Boolean;
private var _endPoint:MapNode;
private var _isPath:Boolean;
private var _roadArr:Array;
private var _openList:Array;
private var _h:uint;
private var _time:int;
private var _startPoint:MapNode;
private var _closeList:Array;
private var _w:uint;
public function SchoolRoad(){
_openList = new Array();
_closeList = new Array();
_roadArr = new Array();
super();
}
private function setGHF(_arg1:MapNode, _arg2:MapNode, _arg3:uint):void{
if (!_arg2.G){
_arg2.G = 0;
};
_arg1.G = (_arg2.G + _arg3);
_arg1.H = ((Math.abs((_arg1.px - _endPoint.px)) + Math.abs((_arg1.py - _endPoint.py))) * 10);
_arg1.F = (_arg1.H + _arg1.G);
_arg1.father = _arg2;
}
private function getMinF():uint{
var _local3:uint;
var _local4:MapNode;
var _local1:uint = 100000000;
var _local2:uint;
for each (_local4 in _openList) {
if (_local4.F < _local1){
_local1 = _local4.F;
_local3 = _local2;
};
_local2++;
};
return (_local3);
}
public function searchRoad(_arg1:MapNode, _arg2:MapNode, _arg3:Array){
var _local5:MapNode;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:MapNode;
var _local10:MapNode;
var _local4:int = new Date().getTime();
_startPoint = _arg1;
_endPoint = _arg2;
_startPoint.G = 0;
_startPoint.H = ((Math.abs((_startPoint.px - _endPoint.px)) + Math.abs((_startPoint.py - _endPoint.py))) * 10);
_startPoint.F = (_startPoint.G + _startPoint.H);
_mapArr = _arg3;
_w = (_mapArr[0].length - 1);
_h = (_mapArr.length - 1);
_openList.push(_startPoint);
while (true) {
_time = (new Date().getTime() - _local4);
if ((((_openList.length < 1)) || ((_time > 50)))){
_local6 = 1000000;
_local7 = 0;
_local8 = 0;
for each (_local9 in _closeList) {
if (_local9.H < _local6){
_local6 = _local9.H;
_local7 = _local8;
};
_local8++;
};
_local10 = _closeList[_local7];
while (_local10.father != _startPoint.father) {
_roadArr.push(_local10);
_local10 = _local10.father;
};
return (_roadArr);
};
_local5 = _openList.splice(getMinF(), 1)[0];
if (_local5 == _endPoint){
while (_local5.father != _startPoint.father) {
_roadArr.push(_local5);
_local5 = _local5.father;
};
return (_roadArr);
};
_closeList.push(_local5);
addAroundPoint(_local5);
};
}
private function addAroundPoint(_arg1:MapNode):void{
var _local2:uint = _arg1.px;
var _local3:uint = _arg1.py;
if ((((_local2 > 0)) && (!((_mapArr[_local3][(_local2 - 1)].goFlag == 2))))){
if (!inArr(_mapArr[_local3][(_local2 - 1)], _closeList)){
if (!inArr(_mapArr[_local3][(_local2 - 1)], _openList)){
setGHF(_mapArr[_local3][(_local2 - 1)], _arg1, 10);
_openList.push(_mapArr[_local3][(_local2 - 1)]);
} else {
checkG(_mapArr[_local3][(_local2 - 1)], _arg1);
};
};
};
if ((((_local2 < _w)) && (!((_mapArr[_local3][(_local2 + 1)].goFlag == 2))))){
if (!inArr(_mapArr[_local3][(_local2 + 1)], _closeList)){
if (!inArr(_mapArr[_local3][(_local2 + 1)], _openList)){
setGHF(_mapArr[_local3][(_local2 + 1)], _arg1, 10);
_openList.push(_mapArr[_local3][(_local2 + 1)]);
} else {
checkG(_mapArr[_local3][(_local2 + 1)], _arg1);
};
};
};
if ((((_local3 > 0)) && (!((_mapArr[(_local3 - 1)][_local2].goFlag == 2))))){
if (!inArr(_mapArr[(_local3 - 1)][_local2], _closeList)){
if (!inArr(_mapArr[(_local3 - 1)][_local2], _openList)){
setGHF(_mapArr[(_local3 - 1)][_local2], _arg1, 10);
_openList.push(_mapArr[(_local3 - 1)][_local2]);
} else {
checkG(_mapArr[(_local3 - 1)][_local2], _arg1);
};
};
};
if ((((_local3 < _h)) && (!((_mapArr[(_local3 + 1)][_local2].goFlag == 2))))){
if (!inArr(_mapArr[(_local3 + 1)][_local2], _closeList)){
if (!inArr(_mapArr[(_local3 + 1)][_local2], _openList)){
setGHF(_mapArr[(_local3 + 1)][_local2], _arg1, 10);
_openList.push(_mapArr[(_local3 + 1)][_local2]);
} else {
checkG(_mapArr[(_local3 + 1)][_local2], _arg1);
};
};
};
}
private function inArr(_arg1:MapNode, _arg2:Array):Boolean{
var _local3:MapNode;
for each (_local3 in _arg2) {
if (_arg1 == _local3){
return (true);
};
};
return (false);
}
private function checkG(_arg1:MapNode, _arg2:MapNode):void{
var _local3:uint = (_arg2.G + 10);
if (_local3 <= _arg1.G){
_arg1.G = _local3;
_arg1.F = (_arg1.H + _local3);
_arg1.father = _arg2;
};
}
}
}//package src.vo
Section 99
//TimerControl (src.vo.TimerControl)
package src.vo {
import src.role.*;
import flash.events.*;
import flash.utils.*;
public class TimerControl {
public var _timer:Timer;
private var _rid:int;
public function TimerControl(){
_rid = 0;
_timer = new Timer(50);
_timer.addEventListener(TimerEvent.TIMER, timerEventHandler);
_timer.start();
}
private function timerEventHandler(_arg1:TimerEvent):void{
var _local2:PlayerRole;
var _local3:PlayerRole;
var _local4:PlayerRole;
var _local5:PlayerRole;
_rid++;
for each (_local2 in InitRoleSite._rightList) {
if ((_rid % 20) == 0){
_local2.markSerGrid();
_local2.occupationHandler();
};
if ((_rid % 60) == 0){
_local2.findPlayer();
};
_local2.movieHandler();
_local2.moveAndHit();
if ((_rid % 40) == 0){
_local2.hitAgain();
};
};
for each (_local3 in InitRoleSite._leftList) {
if ((_rid % 20) == 0){
_local3.markSerGrid();
_local3.occupationHandler();
};
if ((_rid % 80) == 0){
_local3.findPlayer();
};
_local3.movieHandler();
_local3.moveAndHit();
if ((_rid % 40) == 0){
_local3.hitAgain();
};
};
for each (_local4 in InitRoleSite._upList) {
if ((_rid % 20) == 0){
_local4.markSerGrid();
_local4.occupationHandler();
};
if ((_rid % 80) == 0){
_local4.findPlayer();
};
_local4.movieHandler();
_local4.moveAndHit();
if ((_rid % 40) == 0){
_local4.hitAgain();
};
};
for each (_local5 in InitRoleSite._downList) {
if ((_rid % 20) == 0){
_local5.markSerGrid();
_local5.occupationHandler();
};
if ((_rid % 80) == 0){
_local5.findPlayer();
};
_local5.movieHandler();
_local5.moveAndHit();
if ((_rid % 40) == 0){
_local5.hitAgain();
};
};
}
public function stopTimerEvent():void{
_rid = 0;
_timer.reset();
_timer.stop();
_timer.removeEventListener(TimerEvent.TIMER, timerEventHandler);
}
}
}//package src.vo
Section 100
//BackgroundGraphic (BackgroundGraphic)
package {
import flash.display.*;
public dynamic class BackgroundGraphic extends MovieClip {
}
}//package
Section 101
//btnSound (btnSound)
package {
import flash.media.*;
public dynamic class btnSound extends Sound {
}
}//package
Section 102
//dieSound1 (dieSound1)
package {
import flash.media.*;
public dynamic class dieSound1 extends Sound {
}
}//package
Section 103
//fog_1 (fog_1)
package {
import flash.display.*;
public dynamic class fog_1 extends MovieClip {
public function fog_1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 104
//grid (grid)
package {
import flash.display.*;
public dynamic class grid extends MovieClip {
public function grid(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 105
//hitSound1 (hitSound1)
package {
import flash.media.*;
public dynamic class hitSound1 extends Sound {
}
}//package
Section 106
//hitSound10 (hitSound10)
package {
import flash.media.*;
public dynamic class hitSound10 extends Sound {
}
}//package
Section 107
//hitSound11 (hitSound11)
package {
import flash.media.*;
public dynamic class hitSound11 extends Sound {
}
}//package
Section 108
//hitSound2 (hitSound2)
package {
import flash.media.*;
public dynamic class hitSound2 extends Sound {
}
}//package
Section 109
//hitSound3 (hitSound3)
package {
import flash.media.*;
public dynamic class hitSound3 extends Sound {
}
}//package
Section 110
//hitSound4 (hitSound4)
package {
import flash.media.*;
public dynamic class hitSound4 extends Sound {
}
}//package
Section 111
//hitSound5 (hitSound5)
package {
import flash.media.*;
public dynamic class hitSound5 extends Sound {
}
}//package
Section 112
//hitSound6 (hitSound6)
package {
import flash.media.*;
public dynamic class hitSound6 extends Sound {
}
}//package
Section 113
//hitSound7 (hitSound7)
package {
import flash.media.*;
public dynamic class hitSound7 extends Sound {
}
}//package
Section 114
//hitSound8 (hitSound8)
package {
import flash.media.*;
public dynamic class hitSound8 extends Sound {
}
}//package
Section 115
//hitSound9 (hitSound9)
package {
import flash.media.*;
public dynamic class hitSound9 extends Sound {
}
}//package
Section 116
//LevelMC (LevelMC)
package {
import flash.display.*;
public dynamic class LevelMC extends MovieClip {
public function LevelMC(){
addFrameScript(19, frame20);
}
function frame20(){
this.parent.removeChild(this);
stop();
}
}
}//package
Section 117
//LockedNotice (LockedNotice)
package {
import flash.display.*;
public dynamic class LockedNotice extends MovieClip {
}
}//package
Section 118
//LogoFly (LogoFly)
package {
import flash.display.*;
public dynamic class LogoFly extends MovieClip {
public function LogoFly(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 119
//LogoSpin (LogoSpin)
package {
import flash.display.*;
public dynamic class LogoSpin extends MovieClip {
}
}//package
Section 120
//MiniLogo (MiniLogo)
package {
import flash.display.*;
public dynamic class MiniLogo extends MovieClip {
}
}//package
Section 121
//player0 (player0)
package {
import flash.display.*;
public dynamic class player0 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 122
//player1 (player1)
package {
import flash.display.*;
public dynamic class player1 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 123
//player10 (player10)
package {
import flash.display.*;
public dynamic class player10 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 124
//player11 (player11)
package {
import flash.display.*;
public dynamic class player11 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 125
//player2 (player2)
package {
import flash.display.*;
public dynamic class player2 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 126
//player3 (player3)
package {
import flash.display.*;
public dynamic class player3 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 127
//player4 (player4)
package {
import flash.display.*;
public dynamic class player4 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 128
//player5 (player5)
package {
import flash.display.*;
public dynamic class player5 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 129
//player6 (player6)
package {
import flash.display.*;
public dynamic class player6 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 130
//player7 (player7)
package {
import flash.display.*;
public dynamic class player7 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 131
//player8 (player8)
package {
import flash.display.*;
public dynamic class player8 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 132
//player88 (player88)
package {
import flash.display.*;
public dynamic class player88 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 133
//player9 (player9)
package {
import flash.display.*;
public dynamic class player9 extends MovieClip {
public var mcSelect:MovieClip;
public var ren:MovieClip;
public var mcBG:MovieClip;
public var mcHP:MovieClip;
}
}//package
Section 134
//PreloaderBar (PreloaderBar)
package {
import flash.display.*;
public dynamic class PreloaderBar extends SimpleButton {
}
}//package
Section 135
//PreloaderClip (PreloaderClip)
package {
import flash.display.*;
import flash.text.*;
public dynamic class PreloaderClip extends MovieClip {
public var procent:TextField;
public var ProgBar:PreloaderBar;
public function PreloaderClip(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 136
//SchoolWar (SchoolWar)
package {
import FOG.AS3.*;
import flash.events.*;
import flash.display.*;
import src.uitl.*;
import flash.media.*;
import src.view.*;
public class SchoolWar extends MovieClip {
public var selectAll:MovieClip;
public var pauseBtn:SimpleButton;
private var btnSound:Sound;
public var takenText:MovieClip;
public var attackText:MovieClip;
private var mc:MovieClip;
public var choose:MovieClip;
public var FogAPI;
private var _loseView:MovieClip;
public var bigMap:MovieClip;
public var bi:MovieClip;
private var _schoolMap:SchoolMap;
public var soundBtn:SimpleButton;
private var _chView:MovieClip;
public var rePlayBtn:SimpleButton;
private var _winView:MovieClip;
public var loseMC:MovieClip;
private var _beginView:MovieClip;
public var resumeBtn:SimpleButton;
public var winMC:MovieClip;
public var cancel:SimpleButton;
public var hand:MovieClip;
public var beginMC:MovieClip;
public function SchoolWar(){
addFrameScript(0, frame1, 1, frame2);
super();
}
private function init(_arg1:String):void{
this.removeChild(_chView);
_schoolMap = new SchoolMap(_arg1, stage);
this.addChild(_schoolMap);
_schoolMap.addEventListener("PlayAgain", playAgain);
}
private function playAgain(_arg1:Event):void{
_schoolMap.removeEventListener("PlayAgain", playAgain);
this.removeChild(_schoolMap);
_chView = ResourceLoader.getUIElement("choose");
addChild(_chView);
_chView.x = -205;
_chView.y = -10;
_chView.addEventListener(MouseEvent.CLICK, selectTeamEvent);
}
private function loaderCompleteEvent():void{
while (this.numChildren > 0) {
this.removeChildAt(0);
};
btnSound = (ResourceLoader.getClass("btnSound") as Sound);
initStart();
}
private function selectTeamEvent(_arg1:MouseEvent):void{
if ((_arg1.target.x << 0) == 246){
if (SchoolMap.isSound){
btnSound.play();
};
_chView.removeEventListener(MouseEvent.CLICK, selectTeamEvent);
init("left");
} else {
if ((_arg1.target.x << 0) == 388){
if (SchoolMap.isSound){
btnSound.play();
};
_chView.removeEventListener(MouseEvent.CLICK, selectTeamEvent);
init("up");
} else {
if ((_arg1.target.x << 0) == 530){
if (SchoolMap.isSound){
btnSound.play();
};
_chView.removeEventListener(MouseEvent.CLICK, selectTeamEvent);
init("right");
} else {
if ((_arg1.target.x << 0) == 672){
if (SchoolMap.isSound){
btnSound.play();
};
_chView.removeEventListener(MouseEvent.CLICK, selectTeamEvent);
init("down");
} else {
if (_arg1.target == _chView.back){
if (SchoolMap.isSound){
btnSound.play();
};
_chView.removeEventListener(MouseEvent.CLICK, selectTeamEvent);
this.removeChild(_chView);
initStart();
};
};
};
};
};
}
public function begin():void{
this.gotoAndStop(1, "game");
addScriptToNextframe(onComplete);
}
private function initStart():void{
_beginView = ResourceLoader.getUIElement("beginMC");
this.addChild(_beginView);
_beginView.x = -200;
_beginView.y = -30;
_beginView.addEventListener(MouseEvent.CLICK, onBeginView);
}
public function addScriptToNextframe(_arg1:Function):void{
var frameNum:int;
var onEnter:Function;
var fun = _arg1;
onEnter = function (_arg1:Event):void{
frameNum++;
if (frameNum == 2){
removeEventListener(Event.ENTER_FRAME, onEnter);
fun();
};
};
this.addEventListener(Event.ENTER_FRAME, onEnter);
frameNum = 0;
}
public function onComplete():void{
ResourceLoader.init("");
ResourceLoader.getInstance().loaderComplete(this, this);
loaderCompleteEvent();
}
private function onBeginView(_arg1:MouseEvent):void{
if (_arg1.target == _beginView.playBtn){
if (SchoolMap.isSound){
btnSound.play();
};
_arg1.currentTarget.removeEventListener(MouseEvent.CLICK, onBeginView);
this.removeChild(_beginView);
_chView = ResourceLoader.getUIElement("choose");
addChild(_chView);
_chView.x = -200;
_chView.y = -30;
_chView.addEventListener(MouseEvent.CLICK, selectTeamEvent);
} else {
if (_arg1.target == _beginView.addBtn){
if (SchoolMap.isSound){
btnSound.play();
};
FogAPI.Tracking.Click("http://www.freegamesforyourwebsite.com/");
} else {
if (_arg1.target == _beginView.moreBtn){
if (SchoolMap.isSound){
btnSound.play();
};
FogAPI.Tracking.Click();
} else {
if (_arg1.target == _beginView.ml){
FogAPI.Tracking.Click();
};
};
};
};
}
function frame2(){
stop();
this.begin();
}
function frame1(){
FogAPI = new CoreAPI({game:{id:10, fogid:20263, name:"high-school-wars", title:"High School Wars", category:"fighting-games", res:"640x480"}, remote:true, Preloader:{locked:false, domains:["local", "freeonlinegames.com"]}, root:root});
FogAPI.Preloader.Start();
}
}
}//package
Section 137
//VoiceOver (VoiceOver)
package {
import flash.media.*;
public dynamic class VoiceOver extends Sound {
}
}//package