Section 1
//FlexSprite (mx.core.FlexSprite)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexSprite extends Sprite {
mx_internal static const VERSION:String = "2.0.1.0";
public function FlexSprite(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 2
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 3
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get name():String;
function set width(_arg1:Number):void;
function get measuredHeight():Number;
function set height(_arg1:Number):void;
function get scaleY():Number;
function move(_arg1:Number, _arg2:Number):void;
function get scaleX():Number;
function set mask(_arg1:DisplayObject):void;
function set scaleX(_arg1:Number):void;
function set name(_arg1:String):void;
function set scaleY(_arg1:Number):void;
function get visible():Boolean;
function get measuredWidth():Number;
function set visible(_arg1:Boolean):void;
function get alpha():Number;
function get height():Number;
function get width():Number;
function get parent():DisplayObjectContainer;
function get mask():DisplayObject;
function set x(_arg1:Number):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set y(_arg1:Number):void;
function get x():Number;
function get y():Number;
function set alpha(_arg1:Number):void;
}
}//package mx.core
Section 4
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function get repeaters():Array;
function get instanceIndices():Array;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
function set repeaterIndices(_arg1:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 5
//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 6
//SpriteAsset (mx.core.SpriteAsset)
package mx.core {
public class SpriteAsset extends FlexSprite implements IFlexAsset, IFlexDisplayObject {
private var _measuredWidth:Number;
private var _measuredHeight:Number;
mx_internal static const VERSION:String = "2.0.1.0";
public function SpriteAsset(){
_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;
}
}
}//package mx.core
Section 7
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "2.0.1.0";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var _local2:String;
var _local3:DisplayObject;
var _local4:String;
var _local5:Array;
_local3 = _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{
var _local2:String;
var _local3:int;
var _local4:int;
if (!_arg1){
return (null);
};
_local2 = getQualifiedClassName(_arg1);
_local3 = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
_local4 = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 8
//AppSettings (AppSettings)
package {
public class AppSettings {
public static var GAME_ID:String = "01526";
public static var SERVERS:Array = ["http://app.gamejacket.net/gja/", "http://app1.gamejacket.net/gja/", "http://app2.gamejacket.net/gja/", "http://app3.gamejacket.net/gja/", "http://app4.gamejacket.net/gja/", "http://app5.gamejacket.net/gja/", "http://app6.gamejacket.net/gja/", "http://app7.gamejacket.net/gja/", "http://app8.gamejacket.net/gja/", "http://app9.gamejacket.net/gja/"];
}
}//package
Section 9
//gj (gj)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
import flash.net.*;
import flash.filters.*;
public class gj extends Sprite {
private var sprLogo:Object;
private var mainStageWidth:Number;
private var loopNumber:Number;// = 0
private var GJID:String;
private var mainStageHeight:Number;
private var loaderData:Loader;
private var Retry:Class;
private var arrayPosition:Number;// = 0
private var Logo:Class;
private var serverArray:Array;
private var loadTimer:Timer;
public function gj(){
arrayPosition = 0;
loopNumber = 0;
loadTimer = new Timer(2000, 1);
Logo = gj_Logo;
Retry = gj_Retry;
super();
Security.allowDomain("*");
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.quality = StageQuality.HIGH;
mainStageHeight = stage.stageHeight;
mainStageWidth = stage.stageWidth;
GJID = String(AppSettings.GAME_ID);
serverArray = AppSettings.SERVERS;
stage.addEventListener(Event.RESIZE, setupDisplay);
setupDisplay();
loadDataSWF();
}
private function updateFramerate(_arg1:Event):void{
stage.frameRate = _arg1.currentTarget.newFrameRate;
}
private function advanceArrayAndReload():void{
arrayPosition = (arrayPosition + 1);
if (arrayPosition >= serverArray.length){
arrayPosition = 0;
loopNumber = (loopNumber + 1);
};
if (loopNumber >= 2){
setupError();
} else {
loaderData.unload();
loadDataSWF();
};
}
private function timerHandler(_arg1:TimerEvent):void{
loaderData.unload();
loadTimer.stop();
advanceArrayAndReload();
}
private function progressHandlerDataSWF(_arg1:ProgressEvent):void{
if (_arg1.bytesTotal > 0){
loadTimer.removeEventListener("timer", timerHandler);
loadTimer.stop();
};
}
private function completeHandlerDataSWF(_arg1:Event):void{
var info:LoaderInfo;
var e = _arg1;
stage.removeEventListener(Event.RESIZE, setupDisplay);
loadTimer.removeEventListener("timer", timerHandler);
loadTimer.stop();
info = LoaderInfo(Loader(e.target.loader).contentLoaderInfo);
e.target.loader.content.loadDetails(GJID, stage.stageWidth, stage.stageHeight, serverArray[arrayPosition], info.loaderURL);
e.target.loader.content.addEventListener("updateFramerate", updateFramerate);
e.target.loader.content.addEventListener("updateStage", updateStage);
e.target.loader.content.addEventListener("setupError", function (_arg1:Event):void{
setupError();
});
addChild(loaderData);
}
private function setupError():void{
var _local1:Object;
_local1 = new Retry();
_local1.x = (mainStageWidth / 2);
_local1.y = (mainStageHeight / 2);
_local1.filters = [new DropShadowFilter(4, 45, 0, 0.7, 5, 5, 0.7, 3)];
_local1.alpha = 0.5;
addChild(DisplayObject(_local1));
navigateToURL(new URLRequest(((("http://www.gamejacket.com/gameFail.html?GJID=" + GJID) + "&host=") + loaderInfo.url)), "_blank");
}
private function setupDisplay(_arg1:Event=null):void{
mainStageHeight = stage.stageHeight;
mainStageWidth = stage.stageWidth;
this.graphics.beginFill(0xE7E7E7, 100);
GJHelper.drawRect(this.graphics, 0, 0, mainStageWidth, mainStageHeight, 0, GJHelper.NONE);
this.graphics.endFill();
GJHelper.constructBG(this, 0, 0, mainStageWidth, mainStageHeight);
if (sprLogo){
removeChild(DisplayObject(sprLogo));
};
sprLogo = new Logo();
sprLogo.x = (mainStageWidth / 2);
sprLogo.y = (mainStageHeight / 2);
sprLogo.filters = [new DropShadowFilter(4, 45, 0, 0.7, 5, 5, 0.7, 3)];
sprLogo.alpha = 0.5;
addChild(DisplayObject(sprLogo));
loadTimer.addEventListener("timer", timerHandler);
}
private function updateStage(_arg1:Event):void{
stage.scaleMode = StageScaleMode.SHOW_ALL;
}
private function loadDataSWF():void{
var _local1:String;
var _local2:Object;
var _local3:String;
var _local4:URLRequest;
var _local5:String;
loaderData = new Loader();
loaderData.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandlerDataSWF);
loaderData.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandlerDataSWF);
loaderData.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandlerDataSWF);
loadTimer.reset();
loadTimer.start();
_local1 = "GJData.swf";
_local2 = LoaderInfo(this.root.loaderInfo).parameters;
for (_local3 in _local2) {
_local5 = String(_local2[_local3]);
if (_local3.toUpperCase() == "D"){
_local1 = "GJDataDebug.swf";
};
};
_local4 = new URLRequest((serverArray[arrayPosition] + _local1));
loaderData.load(_local4);
}
private function ioErrorHandlerDataSWF(_arg1:IOErrorEvent):void{
loadTimer.stop();
advanceArrayAndReload();
}
}
}//package
Section 10
//gj_Logo (gj_Logo)
package {
import mx.core.*;
public class gj_Logo extends SpriteAsset {
}
}//package
Section 11
//gj_Retry (gj_Retry)
package {
import mx.core.*;
public class gj_Retry extends SpriteAsset {
}
}//package
Section 12
//GJHelper (GJHelper)
package {
import flash.display.*;
public class GJHelper {
public static var ALL:Number = (((TOP_LEFT | TOP_RIGHT) | BOTTOM_LEFT) | BOTTOM_RIGHT);
public static var BOTTOM_RIGHT:Number = 8;
public static var TOP_LEFT:Number = 1;
public static var TOP_RIGHT:Number = 2;
public static var NONE:Number = 0;
public static var BOTTOM_LEFT:Number = 4;
public static function adjustedAdvertSize(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Object{
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
_arg3 = (_arg3 - 74);
_arg4 = (_arg4 - 96);
_local7 = _arg5;
_local8 = _arg6;
if (_local7 > _arg3){
_local9 = (_arg3 / _local7);
_local7 = _arg3;
_local8 = int((_local8 * _local9));
_arg1 = _local7;
_arg2 = _local8;
};
if (_local8 > _arg4){
_local10 = (_arg4 / _local8);
_local7 = int((_local7 * _local10));
_local8 = _arg4;
_arg1 = _local7;
_arg2 = _local8;
};
return ({width:_arg1, height:_arg2});
}
public static function drawRect(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):void{
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
if (arguments.length < 4){
return;
};
if (_arg6 > 0){
if (_arg6 > (Math.min(_arg4, _arg5) / 2)){
_arg6 = (Math.min(_arg4, _arg5) / 2);
};
_local9 = (Math.PI / 4);
_local10 = (_local9 / 2);
if ((_arg7 & GJHelper.TOP_LEFT)){
_arg1.moveTo((_arg2 + _arg6), _arg3);
} else {
_arg1.moveTo(_arg2, _arg3);
};
_local11 = (-(Math.PI) / 2);
if ((_arg7 & GJHelper.TOP_RIGHT)){
_arg1.lineTo(((_arg2 + _arg4) - _arg6), _arg3);
_local12 = (((_arg2 + _arg4) - _arg6) + ((Math.cos((_local11 + _local10)) * _arg6) / Math.cos((_local9 / 2))));
_local13 = ((_arg3 + _arg6) + ((Math.sin((_local11 + _local10)) * _arg6) / Math.cos((_local9 / 2))));
_local14 = (((_arg2 + _arg4) - _arg6) + (Math.cos((_local11 + _local9)) * _arg6));
_local15 = ((_arg3 + _arg6) + (Math.sin((_local11 + _local9)) * _arg6));
_arg1.curveTo(_local12, _local13, _local14, _local15);
_local11 = (_local11 + _local9);
_local12 = (((_arg2 + _arg4) - _arg6) + ((Math.cos((_local11 + _local10)) * _arg6) / Math.cos((_local9 / 2))));
_local13 = ((_arg3 + _arg6) + ((Math.sin((_local11 + _local10)) * _arg6) / Math.cos((_local9 / 2))));
_local14 = (((_arg2 + _arg4) - _arg6) + (Math.cos((_local11 + _local9)) * _arg6));
_local15 = ((_arg3 + _arg6) + (Math.sin((_local11 + _local9)) * _arg6));
_arg1.curveTo(_local12, _local13, _local14, _local15);
} else {
_arg1.lineTo((_arg2 + _arg4), _arg3);
};
if ((_arg7 & GJHelper.BOTTOM_RIGHT)){
_arg1.lineTo((_arg2 + _arg4), ((_arg3 + _arg5) - _arg6));
_local11 = (_local11 + _local9);
_local12 = (((_arg2 + _arg4) - _arg6) + ((Math.cos((_local11 + _local10)) * _arg6) / Math.cos(_local10)));
_local13 = (((_arg3 + _arg5) - _arg6) + ((Math.sin((_local11 + _local10)) * _arg6) / Math.cos(_local10)));
_local14 = (((_arg2 + _arg4) - _arg6) + (Math.cos((_local11 + _local9)) * _arg6));
_local15 = (((_arg3 + _arg5) - _arg6) + (Math.sin((_local11 + _local9)) * _arg6));
_arg1.curveTo(_local12, _local13, _local14, _local15);
_local11 = (_local11 + _local9);
_local12 = (((_arg2 + _arg4) - _arg6) + ((Math.cos((_local11 + _local10)) * _arg6) / Math.cos(_local10)));
_local13 = (((_arg3 + _arg5) - _arg6) + ((Math.sin((_local11 + _local10)) * _arg6) / Math.cos(_local10)));
_local14 = (((_arg2 + _arg4) - _arg6) + (Math.cos((_local11 + _local9)) * _arg6));
_local15 = (((_arg3 + _arg5) - _arg6) + (Math.sin((_local11 + _local9)) * _arg6));
_arg1.curveTo(_local12, _local13, _local14, _local15);
} else {
_arg1.lineTo((_arg2 + _arg4), (_arg3 + _arg5));
};
if ((_arg7 & GJHelper.BOTTOM_LEFT)){
_arg1.lineTo((_arg2 + _arg6), (_arg3 + _arg5));
_local11 = (_local11 + _local9);
_local12 = ((_arg2 + _arg6) + ((Math.cos((_local11 + _local10)) * _arg6) / Math.cos(_local10)));
_local13 = (((_arg3 + _arg5) - _arg6) + ((Math.sin((_local11 + _local10)) * _arg6) / Math.cos(_local10)));
_local14 = ((_arg2 + _arg6) + (Math.cos((_local11 + _local9)) * _arg6));
_local15 = (((_arg3 + _arg5) - _arg6) + (Math.sin((_local11 + _local9)) * _arg6));
_arg1.curveTo(_local12, _local13, _local14, _local15);
_local11 = (_local11 + _local9);
_local12 = ((_arg2 + _arg6) + ((Math.cos((_local11 + _local10)) * _arg6) / Math.cos(_local10)));
_local13 = (((_arg3 + _arg5) - _arg6) + ((Math.sin((_local11 + _local10)) * _arg6) / Math.cos(_local10)));
_local14 = ((_arg2 + _arg6) + (Math.cos((_local11 + _local9)) * _arg6));
_local15 = (((_arg3 + _arg5) - _arg6) + (Math.sin((_local11 + _local9)) * _arg6));
_arg1.curveTo(_local12, _local13, _local14, _local15);
} else {
_arg1.lineTo(_arg2, (_arg3 + _arg5));
};
if ((_arg7 & GJHelper.TOP_LEFT)){
_arg1.lineTo(_arg2, (_arg3 + _arg6));
_local11 = (_local11 + _local9);
_local12 = ((_arg2 + _arg6) + ((Math.cos((_local11 + _local10)) * _arg6) / Math.cos(_local10)));
_local13 = ((_arg3 + _arg6) + ((Math.sin((_local11 + _local10)) * _arg6) / Math.cos(_local10)));
_local14 = ((_arg2 + _arg6) + (Math.cos((_local11 + _local9)) * _arg6));
_local15 = ((_arg3 + _arg6) + (Math.sin((_local11 + _local9)) * _arg6));
_arg1.curveTo(_local12, _local13, _local14, _local15);
_local11 = (_local11 + _local9);
_local12 = ((_arg2 + _arg6) + ((Math.cos((_local11 + _local10)) * _arg6) / Math.cos(_local10)));
_local13 = ((_arg3 + _arg6) + ((Math.sin((_local11 + _local10)) * _arg6) / Math.cos(_local10)));
_local14 = ((_arg2 + _arg6) + (Math.cos((_local11 + _local9)) * _arg6));
_local15 = ((_arg3 + _arg6) + (Math.sin((_local11 + _local9)) * _arg6));
_arg1.curveTo(_local12, _local13, _local14, _local15);
} else {
_arg1.lineTo(_arg2, _arg3);
};
} else {
_arg1.moveTo(_arg2, _arg3);
_arg1.lineTo((_arg2 + _arg4), _arg3);
_arg1.lineTo((_arg2 + _arg4), (_arg3 + _arg5));
_arg1.lineTo(_arg2, (_arg3 + _arg5));
_arg1.lineTo(_arg2, _arg3);
};
}
public static function constructBG(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local6:Number;
var _local7:Sprite;
var _local8:Sprite;
var _local9:Sprite;
var _local10:Sprite;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
_local6 = 6;
_local7 = new Sprite();
_local7.graphics.beginFill(4080709, 100);
drawRect(_local7.graphics, _arg2, _arg3, _arg4, _arg5, 0, GJHelper.NONE);
_local7.graphics.endFill();
_local8 = new Sprite();
_local8.graphics.beginFill(0xE7E7E7, 100);
drawRect(_local8.graphics, _local6, _local6, (_arg4 - (_local6 * 2)), (_arg5 - (_local6 * 2)), 5, GJHelper.ALL);
_local8.graphics.endFill();
_local9 = new Sprite();
_local9.graphics.beginFill(0xE7E7E7, 100);
drawRect(_local9.graphics, _local6, _local6, (_arg4 - (_local6 * 2)), (_arg5 - (_local6 * 2)), 5, GJHelper.ALL);
_local9.graphics.endFill();
_local10 = new Sprite();
_local10.mask = _local9;
_local8.addChild(_local10);
_local10.graphics.lineStyle(1, 0xCBCBCB, 1, true);
_local11 = Math.ceil(((_arg4 - (_local6 * 2)) / 10));
_local12 = Math.ceil(((_arg5 - (_local6 * 2)) / 10));
_local13 = 0;
_local14 = 0;
_local15 = 0;
if (_local11 > _local12){
_local13 = 0;
while (_local13 <= _local11) {
_local10.graphics.moveTo((_local6 + (_local13 * 10)), _local6);
_local10.graphics.lineTo(_local6, (_local6 + (_local14 * 10)));
_local14++;
_local13++;
};
_local13 = 0;
_local15 = (_local6 + (_local11 * 10));
_local14 = 0;
while (_local14 <= _local12) {
_local10.graphics.moveTo(_local15, (_local6 + (_local14 * 10)));
_local10.graphics.lineTo((_local6 + (_local13 * 10)), _local15);
_local13++;
_local14++;
};
} else {
_local13 = 0;
while (_local13 <= _local12) {
_local10.graphics.moveTo((_local6 + (_local13 * 10)), _local6);
_local10.graphics.lineTo(_local6, (_local6 + (_local14 * 10)));
_local14++;
_local13++;
};
_local13 = 0;
_local15 = (_local6 + (_local12 * 10));
_local14 = 0;
while (_local14 <= _local11) {
_local10.graphics.moveTo(_local15, (_local6 + (_local14 * 10)));
_local10.graphics.lineTo((_local6 + (_local13 * 10)), _local15);
_local13++;
_local14++;
};
};
_arg1.addChild(_local7);
_arg1.addChild(_local8);
}
}
}//package