Section 1
//FlxAnim (com.adamatomic.flixel.data.FlxAnim)
package com.adamatomic.flixel.data {
public class FlxAnim {
public var delay:Number;
public var frames:Array;
public var looped:Boolean;
public var name:String;
public function FlxAnim(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true){
name = _arg1;
delay = (1 / _arg3);
frames = _arg2;
looped = _arg4;
}
}
}//package com.adamatomic.flixel.data
Section 2
//FlxLogoPixel (com.adamatomic.flixel.data.FlxLogoPixel)
package com.adamatomic.flixel.data {
import flash.display.*;
public class FlxLogoPixel extends Sprite {
private var _curLayer:uint;
private var _layers:Array;
public function FlxLogoPixel(_arg1:int, _arg2:int, _arg3:uint, _arg4:uint, _arg5:uint){
x = _arg1;
y = _arg2;
_layers = new Array();
var _local6:Array = new Array(4294901760, 4278255360, 4278190335, 4294967040, 4278255615);
_layers.push(addChild(new Bitmap(new BitmapData(_arg3, _arg3, true, _arg5))));
var _local7:uint;
while (_local7 < _local6.length) {
_layers.push(addChild(new Bitmap(new BitmapData(_arg3, _arg3, true, _local6[_arg4]))));
++_arg4;
if (_arg4 >= _local6.length){
_arg4 = 0;
};
_local7++;
};
_curLayer = (_layers.length - 1);
}
public function update():void{
if (_curLayer == 0){
return;
};
if (_layers[_curLayer].alpha >= 0.1){
_layers[_curLayer].alpha = (_layers[_curLayer].alpha - 0.1);
} else {
_layers[_curLayer].alpha = 0;
_curLayer--;
};
}
}
}//package com.adamatomic.flixel.data
Section 3
//FlxArray (com.adamatomic.flixel.FlxArray)
package com.adamatomic.flixel {
public dynamic class FlxArray extends Array {
public function getNonexist():FlxCore{
if (this.length <= 0){
return (null);
};
var _local1:uint;
do {
if (!(this[_local1] as FlxCore).exists){
return (this[_local1]);
};
++_local1;
} while (_local1 < this.length);
return (null);
}
public function add(_arg1:Object):Object{
var _local2:uint;
while (_local2 < this.length) {
if (this[_local2] == null){
return ((this[_local2] = _arg1));
};
_local2++;
};
return (this[(this.push(_arg1) - 1)]);
}
public function remove(_arg1:Object, _arg2:Boolean=false):void{
removeAt(indexOf(_arg1), _arg2);
}
public function removeAt(_arg1:uint, _arg2:Boolean=false):void{
if (_arg2){
this.splice(_arg1, 1);
} else {
this[_arg1] = null;
};
}
public function killAt(_arg1:uint):void{
if ((this[_arg1] is FlxCore)){
this[_arg1].kill();
};
}
public function clear():void{
this.length = 0;
}
public function kill(_arg1:FlxCore):void{
killAt(indexOf(_arg1));
}
public static function getRandom(_arg1:Array):Object{
return (_arg1[Math.floor((Math.random() * _arg1.length))]);
}
}
}//package com.adamatomic.flixel
Section 4
//FlxCore (com.adamatomic.flixel.FlxCore)
package com.adamatomic.flixel {
import flash.geom.*;
public class FlxCore {
public var y:Number;
public var visible:Boolean;
public var active:Boolean;
public var x:Number;
public var scale:Point;
public var width:uint;
public var offset:Point;
public var exists:Boolean;
public var height:uint;
public var parent:FlxState;// = null
public var dead:Boolean;
private var _flickerTimer:Number;
private var _flicker:Boolean;
public var scrollFactor:Point;
public function FlxCore(){
exists = true;
active = true;
visible = true;
dead = false;
x = 0;
y = 0;
width = 0;
height = 0;
scrollFactor = new Point(1, 1);
_flicker = false;
_flickerTimer = -1;
}
public function flickering():Boolean{
return ((_flickerTimer >= 0));
}
public function overlaps(_arg1:FlxCore):Boolean{
var _local2:Number = x;
var _local3:Number = y;
if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){
_local2 = (_local2 - Math.floor((FlxG.scroll.x * scrollFactor.x)));
_local3 = (_local3 - Math.floor((FlxG.scroll.y * scrollFactor.y)));
};
var _local4:Number = _arg1.x;
var _local5:Number = _arg1.y;
if (((!((_arg1.scrollFactor.x == 1))) || (!((_arg1.scrollFactor.y == 1))))){
_local4 = (_local4 - Math.floor((FlxG.scroll.x * _arg1.scrollFactor.x)));
_local5 = (_local5 - Math.floor((FlxG.scroll.y * _arg1.scrollFactor.y)));
};
if ((((((((_local4 <= (_local2 - _arg1.width))) || ((_local4 >= (_local2 + width))))) || ((_local5 <= (_local3 - _arg1.height))))) || ((_local5 >= (_local3 + height))))){
return (false);
};
return (true);
}
public function update():void{
if (flickering()){
if (_flickerTimer > 0){
_flickerTimer = (_flickerTimer - FlxG.elapsed);
};
if (_flickerTimer < 0){
flicker(-1);
} else {
_flicker = !(_flicker);
visible = !(_flicker);
};
};
}
public function flicker(_arg1:Number=1):void{
_flickerTimer = _arg1;
if (_flickerTimer < 0){
_flicker = false;
visible = true;
};
}
public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{
var _local4:Number = (x - (offset.x * scale.x));
var _local5:Number = (y - (offset.y * scale.y));
if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){
_local4 = (_local4 - Math.floor((FlxG.scroll.x * scrollFactor.x)));
_local5 = (_local5 - Math.floor((FlxG.scroll.y * scrollFactor.y)));
};
trace(_local4, _local5);
if ((((((((_arg1 <= _local4)) || ((_arg1 >= (_local4 + (width * scale.x)))))) || ((_arg2 <= _local5)))) || ((_arg2 >= (_local5 + (height * scale.y)))))){
return (false);
};
return (true);
}
public function render():void{
}
public function kill():void{
exists = false;
dead = true;
}
protected function getScreenXY(_arg1:Point):void{
_arg1.x = (Math.floor(x) + Math.floor((FlxG.scroll.x * scrollFactor.x)));
_arg1.y = (Math.floor(y) + Math.floor((FlxG.scroll.y * scrollFactor.y)));
}
public function hitFloor():Boolean{
return (true);
}
public function hitCeiling():Boolean{
return (true);
}
public function onScreen():Boolean{
var _local1:Point = new Point();
getScreenXY(_local1);
if (((((((((_local1.x + width) < 0)) || ((_local1.x > FlxG.width)))) || (((_local1.y + height) < 0)))) || ((_local1.y > FlxG.height)))){
return (false);
};
return (true);
}
public function hitWall():Boolean{
return (true);
}
public function collide(_arg1:FlxSprite):void{
if ((((Math.abs((((_arg1.x + (_arg1.width >> 1)) - x) - (width >> 1))) > ((width >> 1) + (_arg1.width >> 1)))) && ((Math.abs((((_arg1.y + (_arg1.height >> 1)) - y) - (height >> 1))) > ((height >> 1) + (_arg1.height >> 1)))))){
return;
};
if ((((_arg1.x > x)) && (((_arg1.x + _arg1.width) < (x + width))))){
if (((((((_arg1.y + _arg1.height) < (y + (height >> 1)))) && (((_arg1.y + _arg1.height) > y)))) && (_arg1.hitFloor()))){
_arg1.y = (y - _arg1.height);
return;
};
if ((((((_arg1.y > (y + (height >> 1)))) && ((_arg1.y < (y + height))))) && (_arg1.hitCeiling()))){
_arg1.y = (y + height);
return;
};
};
if ((((_arg1.y > y)) && (((_arg1.y + _arg1.height) < (y + height))))){
if (((((((_arg1.x + _arg1.width) < (x + (width >> 1)))) && (((_arg1.x + _arg1.width) > x)))) && (_arg1.hitWall()))){
_arg1.x = (x - _arg1.width);
return;
};
if ((((((_arg1.x > (x + (width >> 1)))) && ((_arg1.x < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x + width);
return;
};
};
var _local2:Boolean;
if ((Math.abs(_arg1.velocity.x) > Math.abs(_arg1.velocity.y))){
_local2 = false;
};
var _local3:Boolean;
var _local4:Boolean;
if (_local2){
if (_arg1.velocity.y > 0){
if (overlapsPoint((_arg1.x + (_arg1.width >> 1)), (_arg1.y + _arg1.height))){
if (_arg1.hitFloor()){
_arg1.y = (y - _arg1.height);
};
} else {
_local4 = true;
};
} else {
if (_arg1.velocity.y < 0){
if (overlapsPoint((_arg1.x + (_arg1.width >> 1)), _arg1.y)){
if (_arg1.hitCeiling()){
_arg1.y = (y + height);
};
} else {
_local4 = true;
};
};
};
if (_arg1.velocity.x < 0){
if (overlapsPoint(_arg1.x, (_arg1.y + (_arg1.height >> 1)))){
if (_arg1.hitWall()){
_arg1.x = (x + width);
};
} else {
_local3 = true;
};
} else {
if (_arg1.velocity.x > 0){
if (overlapsPoint((_arg1.x + _arg1.width), (_arg1.y + (_arg1.height >> 1)))){
if (_arg1.hitWall()){
_arg1.x = (x - _arg1.width);
};
} else {
_local3 = true;
};
};
};
} else {
if (_arg1.velocity.x < 0){
if (overlapsPoint(_arg1.x, (_arg1.y + (_arg1.height >> 1)))){
if (_arg1.hitWall()){
_arg1.x = (x + width);
};
} else {
_local3 = true;
};
} else {
if (_arg1.velocity.x > 0){
if (overlapsPoint((_arg1.x + _arg1.width), (_arg1.y + (_arg1.height >> 1)))){
if (_arg1.hitWall()){
_arg1.x = (x - _arg1.width);
};
} else {
_local3 = true;
};
};
};
if (_arg1.velocity.y > 0){
if (overlapsPoint((_arg1.x + (_arg1.width >> 1)), (_arg1.y + _arg1.height))){
if (_arg1.hitFloor()){
_arg1.y = (y - _arg1.height);
};
} else {
_local4 = true;
};
} else {
if (_arg1.velocity.y < 0){
if (overlapsPoint((_arg1.x + (_arg1.width >> 1)), _arg1.y)){
if (_arg1.hitCeiling()){
_arg1.y = (y + height);
};
} else {
_local4 = true;
};
};
};
};
if (((!(_local4)) && (!(_local3)))){
return;
};
var _local5 = (_arg1.width >> 3);
if (_local5 < 1){
_local5 = 1;
};
if (((_local4) && (_local3))){
if (_local2){
if (_local4){
if ((((((_arg1.x + _arg1.width) - _local5) > x)) && (((_arg1.x + _local5) < (x + width))))){
if ((((((((_arg1.velocity.y > 0)) && (((_arg1.y + _arg1.height) > y)))) && (((_arg1.y + _arg1.height) < (y + height))))) && (_arg1.hitFloor()))){
_arg1.y = (y - _arg1.height);
} else {
if ((((((((_arg1.velocity.y < 0)) && ((_arg1.y > y)))) && ((_arg1.y < (y + height))))) && (_arg1.hitCeiling()))){
_arg1.y = (y + height);
};
};
};
};
if (_local3){
if ((((((_arg1.y + _arg1.height) - _local5) > y)) && (((_arg1.y + _local5) < (y + height))))){
if ((((((((_arg1.velocity.x > 0)) && (((_arg1.x + _arg1.width) > x)))) && (((_arg1.x + _arg1.width) < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x - _arg1.width);
} else {
if ((((((((_arg1.velocity.x < 0)) && ((_arg1.x > x)))) && ((_arg1.x < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x + width);
};
};
};
};
} else {
if (_local3){
if ((((((_arg1.y + _arg1.height) - _local5) > y)) && (((_arg1.y + _local5) < (y + height))))){
if ((((((((_arg1.velocity.x > 0)) && (((_arg1.x + _arg1.width) > x)))) && (((_arg1.x + _arg1.width) < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x - _arg1.width);
} else {
if ((((((((_arg1.velocity.x < 0)) && ((_arg1.x > x)))) && ((_arg1.x < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x + width);
};
};
};
};
if (_local4){
if ((((((_arg1.x + _arg1.width) - _local5) > x)) && (((_arg1.x + _local5) < (x + width))))){
if ((((((((_arg1.velocity.y > 0)) && (((_arg1.y + _arg1.height) > y)))) && (((_arg1.y + _arg1.height) < (y + height))))) && (_arg1.hitFloor()))){
_arg1.y = (y - _arg1.height);
} else {
if ((((((((_arg1.velocity.y < 0)) && ((_arg1.y > y)))) && ((_arg1.y < (y + height))))) && (_arg1.hitCeiling()))){
_arg1.y = (y + height);
};
};
};
};
};
} else {
if (_local4){
if ((((((_arg1.x + _arg1.width) - _local5) > x)) && (((_arg1.x + _local5) < (x + width))))){
if ((((((((_arg1.velocity.y > 0)) && (((_arg1.y + _arg1.height) > y)))) && (((_arg1.y + _arg1.height) < (y + height))))) && (_arg1.hitFloor()))){
_arg1.y = (y - _arg1.height);
} else {
if ((((((((_arg1.velocity.y < 0)) && ((_arg1.y > y)))) && ((_arg1.y < (y + height))))) && (_arg1.hitCeiling()))){
_arg1.y = (y + height);
};
};
};
} else {
if (_local3){
if ((((((_arg1.y + _arg1.height) - _local5) > y)) && (((_arg1.y + _local5) < (y + height))))){
if ((((((((_arg1.velocity.x > 0)) && (((_arg1.x + _arg1.width) > x)))) && (((_arg1.x + _arg1.width) < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x - _arg1.width);
} else {
if ((((((((_arg1.velocity.x < 0)) && ((_arg1.x > x)))) && ((_arg1.x < (x + width))))) && (_arg1.hitWall()))){
_arg1.x = (x + width);
};
};
};
};
};
};
}
}
}//package com.adamatomic.flixel
Section 5
//FlxG (com.adamatomic.flixel.FlxG)
package com.adamatomic.flixel {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
public class FlxG {
public static const LEFT:uint = 0;
public static const A:uint = 4;
public static const B:uint = 5;
public static const MOUSE:uint = 6;
public static const UP:uint = 2;
public static const DOWN:uint = 3;
public static const RIGHT:uint = 1;
public static var kMouse:Boolean;
public static var shouldPause:Boolean = true;
public static var kLeft:Boolean;
public static var scores:FlxArray;
private static var KEYCONTROL:FlxKeyControl = new FlxKeyControl();
private static var _music:Sound;
public static var height:uint;
public static var paused:Boolean = false;
public static var kB:Boolean;
private static var _volume:Number;
public static var kA:Boolean;
public static var buffer:BitmapData;
private static var _fade:Function;
public static var kUp:Boolean;
public static var levels:FlxArray;
public static var kRight:Boolean;
private static var _muted:uint;
private static var _musicPosition:Number;
public static var elapsed:Number;
private static var _oldKeys:Array;
private static var _cache:Object;
public static var level:uint;
public static var state:FlxState;
public static var score:uint;
private static var _log:Function;
public static var currentState:Class = null;
private static var _scrollTarget:Point;
public static var mouse:Point;
public static var followTarget:FlxCore;
public static var kDown:Boolean;
public static var followLead:Point;
public static var width:uint;
public static var followLerp:Number;
public static var mouseClicked:Boolean = false;
public static var scroll:Point;
private static var _keys:Array;
private static var _setCursor:Function;
private static var _quake:Function;
private static var _musicVolume:Number;
public static var oldkMouse:Boolean = false;
public static var followMin:Point;
private static var _flash:Function;
public static var followMax:Point;
private static var _masterVolume:Number;
private static var _musicChannel:SoundChannel;
private static var _switchState:Function;
public static function removeInactiveObjects(_arg1:FlxArray):FlxArray{
var _local2:FlxArray = new FlxArray();
var _local3:Number = 0;
while (_local3 < _arg1.length) {
if (_arg1[_local3] == null){
} else {
if (_arg1[_local3].active){
_local2.add(_arg1[_local3]);
};
};
_local3++;
};
_arg1.clear();
return (_local2);
}
public static function getVolume():Number{
return (_volume);
}
public static function collideArrays(_arg1:FlxArray, _arg2:FlxArray):void{
var _local3:uint;
var _local4:uint;
var _local5:FlxCore;
var _local6:FlxSprite;
if (_arg1 === _arg2){
_local3 = 0;
while (_local3 < _arg1.length) {
_local5 = _arg1[_local3];
if ((((((_local5 == null)) || (!(_local5.exists)))) || (_local5.dead))){
} else {
_local4 = (_local3 + 1);
while (_local4 < _arg2.length) {
_local6 = _arg2[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5.collide(_local6);
};
_local4++;
};
};
_local3++;
};
} else {
_local3 = 0;
while (_local3 < _arg1.length) {
_local5 = _arg1[_local3];
if ((((((_local5 == null)) || (!(_local5.exists)))) || (_local5.dead))){
} else {
_local4 = 0;
while (_local4 < _arg2.length) {
_local6 = _arg2[_local4];
if ((((((((_local5 === _local6)) || ((_local6 == null)))) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5.collide(_local6);
};
_local4++;
};
};
_local3++;
};
};
}
public static function setVolume(_arg1:Number):void{
_volume = _arg1;
adjustMusicVolume();
}
public static function getAngle(_arg1:Number, _arg2:Number):Number{
return (((Math.atan2(_arg2, _arg1) * 180) / Math.PI));
}
public static function AddKey(_arg1:int, _arg2:String):void{
KEYCONTROL.AddKey(_arg1, _arg2);
}
public static function bOverlapArrays(_arg1:FlxArray, _arg2:FlxArray, _arg3:Function):void{
var _local4:uint;
var _local5:uint;
var _local6:FlxSpriteEx;
var _local7:FlxSpriteEx;
if (_arg1 === _arg2){
_local4 = 0;
while (_local4 < _arg1.length) {
_local6 = _arg1[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5 = (_local4 + 1);
while (_local5 < _arg2.length) {
_local7 = _arg2[_local5];
if ((((((_local7 == null)) || (!(_local7.exists)))) || (_local7.dead))){
} else {
if (_local6.bOverlaps(_local7)){
_arg3(_local6, _local7);
};
};
_local5++;
};
};
_local4++;
};
} else {
_local4 = 0;
while (_local4 < _arg1.length) {
_local6 = _arg1[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5 = 0;
while (_local5 < _arg2.length) {
_local7 = _arg2[_local5];
if ((((((((_local6 === _local7)) || ((_local7 == null)))) || (!(_local7.exists)))) || (_local7.dead))){
} else {
if (_local6.bOverlaps(_local7)){
_arg3(_local6, _local7);
};
};
_local5++;
};
};
_local4++;
};
};
}
static function doFollow():void{
if (followTarget != null){
if (((followTarget.exists) && (!(followTarget.dead)))){
_scrollTarget.x = (((width >> 1) - followTarget.x) - (followTarget.width >> 1));
_scrollTarget.y = (((height >> 1) - followTarget.y) - (followTarget.height >> 1));
if (((!((followLead == null))) && ((followTarget is FlxSprite)))){
_scrollTarget.x = (_scrollTarget.x - ((followTarget as FlxSprite).velocity.x * followLead.x));
_scrollTarget.y = (_scrollTarget.y - ((followTarget as FlxSprite).velocity.y * followLead.y));
};
};
scroll.x = (scroll.x + (((_scrollTarget.x - scroll.x) * followLerp) * FlxG.elapsed));
scroll.y = (scroll.y + (((_scrollTarget.y - scroll.y) * followLerp) * FlxG.elapsed));
if (followMin != null){
if (scroll.x > followMin.x){
scroll.x = followMin.x;
};
if (scroll.y > followMin.y){
scroll.y = followMin.y;
};
};
if (followMax != null){
if (scroll.x < followMax.x){
scroll.x = followMax.x;
};
if (scroll.y < followMax.y){
scroll.y = followMax.y;
};
};
};
}
public static function pressed(_arg1:String):Boolean{
return (KEYCONTROL.Pressed(_arg1));
}
public static function play(_arg1:Class, _arg2:Number=1):void{
new (_arg1).play(0, 0, new SoundTransform((((_arg2 * _muted) * _volume) * _masterVolume)));
}
public static function computeVelocity(_arg1:Number, _arg2:Number=0, _arg3:Number=0, _arg4:Number=10000):Number{
var _local5:Number;
if (_arg2 != 0){
_arg1 = (_arg1 + (_arg2 * FlxG.elapsed));
} else {
if (_arg3 != 0){
_local5 = (_arg3 * FlxG.elapsed);
if ((_arg1 - _local5) > 0){
_arg1 = (_arg1 - _local5);
} else {
if ((_arg1 + _local5) < 0){
_arg1 = (_arg1 + _local5);
} else {
_arg1 = 0;
};
};
};
};
if (((!((_arg1 == 0))) && (!((_arg4 == 10000))))){
if (_arg1 > _arg4){
_arg1 = _arg4;
} else {
if (_arg1 < -(_arg4)){
_arg1 = -(_arg4);
};
};
};
return (_arg1);
}
static function setGameData(_arg1:uint, _arg2:uint, _arg3:Function, _arg4:Function, _arg5:Function, _arg6:Function, _arg7:Function, _arg8:Function):void{
_cache = new Object();
width = _arg1;
height = _arg2;
_muted = 1;
_volume = 1;
_musicVolume = 1;
_masterVolume = 0.5;
_musicPosition = -1;
mouse = new Point();
_switchState = _arg3;
_log = _arg4;
_quake = _arg5;
_flash = _arg6;
_fade = _arg7;
_setCursor = _arg8;
unfollow();
_keys = new Array();
_oldKeys = new Array();
var _local9:uint;
while (_local9 < 7) {
_keys.push(0);
_oldKeys.push(0);
_local9++;
};
FlxG.levels = new FlxArray();
FlxG.scores = new FlxArray();
level = 0;
score = 0;
}
public static function addBitmap(_arg1:Class, _arg2:Boolean=false):BitmapData{
var _local6:BitmapData;
var _local7:Matrix;
var _local3:Boolean;
var _local4:String = String(_arg1);
if ((((_cache[_local4] == undefined)) || ((_cache[_local4] == null)))){
_cache[_local4] = new (_arg1).bitmapData;
if (_arg2){
_local3 = true;
};
};
var _local5:BitmapData = _cache[_local4];
if (((((!(_local3)) && (_arg2))) && ((_local5.width == new (_arg1).bitmapData.width)))){
_local3 = true;
};
if (_local3){
_local6 = new BitmapData((_local5.width << 1), _local5.height, true, 0);
_local6.draw(_local5);
_local7 = new Matrix();
_local7.scale(-1, 1);
_local7.translate(_local6.width, 0);
_local6.draw(_local5, _local7);
_local5 = _local6;
};
return (_local5);
}
public static function stopMusic():void{
_musicPosition = 0;
if (_musicChannel != null){
_musicChannel.stop();
_musicChannel = null;
};
}
public static function unsetUnknownCallback():void{
KEYCONTROL.unknownKeyCallback = null;
}
public static function justReleased(_arg1:String):Boolean{
return (KEYCONTROL.JustReleased(_arg1));
}
public static function playMusic():void{
if (_musicPosition < 0){
return;
};
if (_musicPosition == 0){
if (_musicChannel == null){
_musicChannel = _music.play(0, 9999, new SoundTransform((((_muted * _volume) * _musicVolume) * _masterVolume)));
};
} else {
_musicChannel = _music.play(_musicPosition, 0, new SoundTransform((((_muted * _volume) * _musicVolume) * _masterVolume)));
_musicChannel.addEventListener(Event.SOUND_COMPLETE, loopMusic);
};
_musicPosition = 0;
}
public static function createBitmap(_arg1:uint, _arg2:uint, _arg3:uint):BitmapData{
var _local4:String = ((((_arg1 + "x") + _arg2) + ":") + _arg3);
if ((((_cache[_local4] == undefined)) || ((_cache[_local4] == null)))){
_cache[_local4] = new BitmapData(_arg1, _arg2, true, _arg3);
};
return (_cache[_local4]);
}
public static function log(_arg1:String):void{
_log(_arg1);
}
static function pressKey(_arg1:int):void{
KEYCONTROL.PressKey(_arg1);
}
public static function setCursor(_arg1:Class):void{
_setCursor(_arg1);
}
public static function overlapArray(_arg1:FlxArray, _arg2:FlxCore, _arg3:Function):void{
var _local4:FlxCore;
if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){
return;
};
var _local5:uint;
while (_local5 < _arg1.length) {
_local4 = _arg1[_local5];
if ((((((((_local4 === _arg2)) || ((_local4 == null)))) || (!(_local4.exists)))) || (_local4.dead))){
} else {
if (_local4.overlaps(_arg2)){
_arg3(_local4, _arg2);
};
};
_local5++;
};
}
static function updateKeys():void{
KEYCONTROL.UpdateKeys();
mouse.x = (state.mouseX - scroll.x);
mouse.y = (state.mouseY - scroll.y);
}
public static function overlapArrays(_arg1:FlxArray, _arg2:FlxArray, _arg3:Function):void{
var _local4:uint;
var _local5:uint;
var _local6:FlxCore;
var _local7:FlxCore;
if (_arg1 === _arg2){
_local4 = 0;
while (_local4 < _arg1.length) {
_local6 = _arg1[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5 = (_local4 + 1);
while (_local5 < _arg2.length) {
_local7 = _arg2[_local5];
if ((((((_local7 == null)) || (!(_local7.exists)))) || (_local7.dead))){
} else {
if (_local6.overlaps(_local7)){
_arg3(_local6, _local7);
};
};
_local5++;
};
};
_local4++;
};
} else {
_local4 = 0;
while (_local4 < _arg1.length) {
_local6 = _arg1[_local4];
if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){
} else {
_local5 = 0;
while (_local5 < _arg2.length) {
_local7 = _arg2[_local5];
if ((((((((_local6 === _local7)) || ((_local7 == null)))) || (!(_local7.exists)))) || (_local7.dead))){
} else {
if (_local6.overlaps(_local7)){
_arg3(_local6, _local7);
};
};
_local5++;
};
};
_local4++;
};
};
}
public static function getMusicVolume():Number{
return (_musicVolume);
}
public static function getMute():Boolean{
if (_muted == 0){
return (true);
};
return (false);
}
public static function justPressed(_arg1:String):Boolean{
return (KEYCONTROL.JustPressed(_arg1));
}
private static function adjustMusicVolume():void{
if (_muted < 0){
_muted = 0;
} else {
if (_muted > 1){
_muted = 1;
};
};
if (_volume < 0){
_volume = 0;
} else {
if (_volume > 1){
_volume = 1;
};
};
if (_musicVolume < 0){
_musicVolume = 0;
} else {
if (_musicVolume > 1){
_musicVolume = 1;
};
};
if (_masterVolume < 0){
_masterVolume = 0;
} else {
if (_masterVolume > 1){
_masterVolume = 1;
};
};
if (_musicChannel != null){
_musicChannel.soundTransform = new SoundTransform((((_muted * _volume) * _musicVolume) * _masterVolume));
};
}
static function getMasterVolume():Number{
return (_masterVolume);
}
public static function fade(_arg1:uint, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
_fade(_arg1, _arg2, _arg3, _arg4);
}
public static function followAdjust(_arg1:Number=0, _arg2:Number=0):void{
followLead = new Point(_arg1, _arg2);
}
public static function setMute(_arg1:Boolean):void{
if (_arg1){
_muted = 0;
} else {
_muted = 1;
};
adjustMusicVolume();
}
static function unfollow():void{
followTarget = null;
followLead = null;
followLerp = 1;
followMin = null;
followMax = null;
scroll = new Point();
_scrollTarget = new Point();
}
public static function follow(_arg1:FlxCore, _arg2:Number=1):void{
followTarget = _arg1;
followLerp = _arg2;
scroll.x = (_scrollTarget.x = (((width >> 1) - followTarget.x) - (followTarget.width >> 1)));
scroll.y = (_scrollTarget.y = (((height >> 1) - followTarget.y) - (followTarget.height >> 1)));
}
public static function collideArray(_arg1:FlxArray, _arg2:FlxSprite):void{
var _local3:FlxCore;
if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){
return;
};
var _local4:uint;
while (_local4 < _arg1.length) {
_local3 = _arg1[_local4];
if ((((((((_local3 === _arg2)) || ((_local3 == null)))) || (!(_local3.exists)))) || (_local3.dead))){
} else {
_local3.collide(_arg2);
};
_local4++;
};
}
public static function switchState(_arg1:Class):void{
_switchState(_arg1);
}
public static function openURL(_arg1:String):void{
navigateToURL(new URLRequest(_arg1), "_blank");
}
public static function setMasterVolume(_arg1:Number):void{
_masterVolume = _arg1;
adjustMusicVolume();
}
public static function pauseMusic():void{
if (_musicChannel == null){
_musicPosition = -1;
return;
};
_musicPosition = _musicChannel.position;
_musicChannel.stop();
while (_musicPosition >= _music.length) {
_musicPosition = (_musicPosition - _music.length);
};
_musicChannel = null;
}
public static function bOverlapArray(_arg1:FlxArray, _arg2:FlxSpriteEx, _arg3:Function):void{
var _local4:FlxSpriteEx;
if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){
return;
};
var _local5:uint;
while (_local5 < _arg1.length) {
_local4 = _arg1[_local5];
if ((((((((_local4 === _arg2)) || ((_local4 == null)))) || (!(_local4.exists)))) || (_local4.dead))){
} else {
if (_local4.bOverlaps(_arg2)){
_arg3(_local4, _arg2);
};
};
_local5++;
};
}
public static function followBounds(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0):void{
followMin = new Point(-(_arg1), -(_arg2));
followMax = new Point((-(_arg3) + width), (-(_arg4) + height));
if (followMax.x > followMin.x){
followMax.x = followMin.x;
};
if (followMax.y > followMin.y){
followMax.y = followMin.y;
};
}
public static function collideArray2(_arg1:FlxCore, _arg2:FlxArray):void{
var _local3:FlxSprite;
if ((((((_arg1 == null)) || (!(_arg1.exists)))) || (_arg1.dead))){
return;
};
var _local4:uint;
while (_local4 < _arg2.length) {
_local3 = _arg2[_local4];
if ((((((((_arg1 === _local3)) || ((_local3 == null)))) || (!(_local3.exists)))) || (_local3.dead))){
} else {
_arg1.collide(_local3);
};
_local4++;
};
}
public static function setMusicVolume(_arg1:Number):void{
_musicVolume = _arg1;
adjustMusicVolume();
}
public static function resetKeys():void{
KEYCONTROL.ResetKeys();
}
static function releaseKey(_arg1:int):void{
KEYCONTROL.ReleaseKey(_arg1);
}
public static function setMusic(_arg1:Class, _arg2:Number=1, _arg3:Boolean=true):void{
stopMusic();
_music = new (_arg1);
_musicVolume = _arg2;
if (_arg3){
playMusic();
};
}
public static function setUnknownCallback(_arg1:Function):void{
KEYCONTROL.unknownKeyCallback = _arg1;
}
public static function quake(_arg1:Number, _arg2:Number=0.5):void{
_quake(_arg1, _arg2);
}
private static function loopMusic(_arg1:Event=null):void{
if (_musicChannel == null){
return;
};
_musicChannel.removeEventListener(Event.SOUND_COMPLETE, loopMusic);
_musicChannel = null;
playMusic();
}
public static function rotatePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Point{
var _local6:Number = ((-(_arg5) / 180) * Math.PI);
var _local7:Number = (_arg1 - _arg3);
var _local8:Number = (_arg4 - _arg2);
return (new Point(((_arg3 + (Math.cos(_local6) * _local7)) - (Math.sin(_local6) * _local8)), (_arg4 - ((Math.sin(_local6) * _local7) + (Math.cos(_local6) * _local8)))));
}
public static function flash(_arg1:uint, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
_flash(_arg1, _arg2, _arg3, _arg4);
}
}
}//package com.adamatomic.flixel
Section 6
//FlxGame (com.adamatomic.flixel.FlxGame)
package com.adamatomic.flixel {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import com.adamatomic.flixel.data.*;
import flash.ui.*;
public class FlxGame extends Sprite {
private const MAX_CONSOLE_LINES:uint = 0x0100;
private const MAX_ELAPSED:Number = 0.0333;
private var _bmpFront:Bitmap;
private var ImgKeyC:Class;
private var _FPS:Array;
private var _flashDelay:Number;
private var ImgKeyMinus:Class;
private var SndBeep:Class;
private var _console:Sprite;
private var _flashHelper:Number;
private var ImgKeyX:Class;
private var _logoFade:Bitmap;
private var _help:Array;
private var _consoleYT:Number;
private var _quakeIntensity:Number;
private var _elapsed:Number;
private var _consoleY:Number;
private var _flipped:Boolean;
private var _total:uint;
private var _soundTrayBars:Array;
private var junk:String;// = "FlxGame_junk"
private var ImgKeyMouse:Class;
private var _flashComplete:Function;
private var _paused:Boolean;
private var _focusPopup:Sprite;
private var _quakeTimer:Number;
private var _fade:Bitmap;
private var _fc:uint;
private var _buffer:Sprite;
private var _poweredBy:Bitmap;
private var _consoleText:TextField;
private var _fSound:Class;
private var _soundTray:Sprite;
private var _frame:Class;
private var _cursor:Bitmap;
private var ImgKeyPlus:Class;
private var ImgPoweredBy:Class;
private var _soundTrayTimer:Number;
private var SndFlixel:Class;
private var _gy:int;
private var _fpsUpdate:Boolean;
private var _gx:int;
public var _curState:FlxState;
private var ImgKeysArrows:Class;
private var _showLogo:Boolean;
private var _curFPS:uint;
private var _created:Boolean;
private var _focusField:TextField;
private var _consoleFPS:TextField;
private var _fadeComplete:Function;
private var _iState:Class;
private var _bmpBack:Bitmap;
private var _consoleLines:Array;
private var _logoTimer:Number;
private var _quakeLength:Number;
private var _logoComplete:Boolean;
private var _f:FlxArray;
private var _fadeHelper:Number;
private var _fadeDelay:Number;
private var ImgKey0:Class;
private var ImgKey1:Class;
private var _flash:Bitmap;
private var _z:uint;
private var _bgc:Number;
public function FlxGame(_arg1:uint, _arg2:uint, _arg3:Class, _arg4:uint=2, _arg5:Number=4278190080, _arg6:Boolean=true, _arg7:Number=4294967295, _arg8:Class=null, _arg9:Class=null, _arg10:uint=0, _arg11:uint=0){
ImgPoweredBy = FlxGame_ImgPoweredBy;
ImgKeyX = FlxGame_ImgKeyX;
ImgKeyC = FlxGame_ImgKeyC;
ImgKeyMouse = FlxGame_ImgKeyMouse;
ImgKeysArrows = FlxGame_ImgKeysArrows;
ImgKeyMinus = FlxGame_ImgKeyMinus;
ImgKeyPlus = FlxGame_ImgKeyPlus;
ImgKey0 = FlxGame_ImgKey0;
ImgKey1 = FlxGame_ImgKey1;
SndBeep = FlxGame_SndBeep;
SndFlixel = FlxGame_SndFlixel;
super();
_z = _arg4;
_gx = _arg10;
_gy = _arg11;
_bgc = _arg5;
_fc = _arg7;
FlxG.setGameData(_arg1, _arg2, switchState, log, quake, flash, fade, setCursor);
_created = false;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
_elapsed = 0;
_total = 0;
_fpsUpdate = true;
_logoComplete = false;
_f = null;
_quakeTimer = 0;
_quakeIntensity = 0;
_quakeLength = 0;
if (_arg8 == null){
_fSound = SndFlixel;
} else {
_fSound = _arg8;
};
_curState = null;
_frame = _arg9;
_iState = _arg3;
_FPS = new Array(8);
_curFPS = 0;
FlxG.paused = false;
_help = new Array();
_help.push("A Button");
_help.push("B Button");
_help.push("Mouse");
_help.push("Move");
_showLogo = _arg6;
}
private function onFocus(_arg1:Event=null):void{
_focusPopup.visible = false;
FlxG.resetKeys();
FlxG.paused = false;
FlxG.playMusic();
}
private function log(_arg1:String):void{
var _local2:String;
var _local3:uint;
if (_arg1 == null){
_arg1 = "ERROR: NULL GAME LOG MESSAGE";
};
if (_console == null){
trace(_arg1);
return;
};
_consoleLines.push(_arg1);
if (_consoleLines.length > MAX_CONSOLE_LINES){
_consoleLines.shift();
_local2 = "";
_local3 = 0;
while (_local3 < _consoleLines.length) {
_local2 = (_local2 + (_consoleLines[_local3] + "\n"));
_local3++;
};
_consoleText.text = _local2;
} else {
_consoleText.appendText((_arg1 + "\n"));
};
_consoleText.scrollV = _consoleText.height;
}
private function setCursor(_arg1:Class):void{
if (_cursor != null){
_buffer.removeChild(_cursor);
};
_cursor = (_buffer.addChild(new (_arg1)) as Bitmap);
}
protected function help(_arg1:String=null, _arg2:String=null, _arg3:String=null, _arg4:String=null):void{
if (_arg1 != null){
_help[0] = _arg1;
};
if (_arg2 != null){
_help[1] = _arg2;
};
if (_arg3 != null){
_help[2] = _arg3;
};
if (_arg4 != null){
_help[3] = _arg4;
};
}
private function toggleConsole():void{
if (_consoleYT == (_gy * _z)){
_consoleYT = ((_gy * _z) - (FlxG.height * _z));
} else {
_consoleYT = (_gy * _z);
_console.visible = true;
};
}
private function showSoundTray():void{
FlxG.play(SndBeep);
_soundTrayTimer = 1;
_soundTray.y = (_gy * _z);
_soundTray.visible = true;
var _local1:uint = Math.round((FlxG.getMasterVolume() * 10));
if (FlxG.getMute()){
_local1 = 0;
};
var _local2:uint;
while (_local2 < _soundTrayBars.length) {
if (_local2 < _local1){
_soundTrayBars[_local2].alpha = 1;
} else {
_soundTrayBars[_local2].alpha = 0.5;
};
_local2++;
};
}
private function fade(_arg1:uint, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
if (_arg1 == 0){
_fade.visible = false;
return;
};
if (((!(_arg4)) && (_fade.visible))){
return;
};
_fade.bitmapData.fillRect(new Rectangle(0, 0, _fade.width, _fade.height), _arg1);
_fadeDelay = _arg2;
_fadeComplete = _arg3;
_fadeHelper = 0;
_fade.alpha = 0;
_fade.visible = true;
}
private function onMouseUp(_arg1:MouseEvent):void{
FlxG.kMouse = false;
}
private function onKeyUp(_arg1:KeyboardEvent):void{
var _local2:String = String.fromCharCode(_arg1.charCode);
FlxG.releaseKey(_arg1.keyCode);
if ((((((((_local2 == "1")) || ((_local2 == "!")))) || ((_local2 == "~")))) || ((_local2 == "`")))){
toggleConsole();
};
}
private function onEnterFrame(_arg1:Event):void{
var _local2:uint;
var _local4:uint;
var _local5:Bitmap;
var _local6:uint;
var _local7:uint;
var _local8:int;
var _local9:int;
var _local10:ColorTransform;
var _local11:TextField;
var _local12:uint;
var _local13:uint;
var _local14:Bitmap;
var _local3:uint = getTimer();
_elapsed = ((_local3 - _total) / 1000);
_total = _local3;
FlxG.elapsed = _elapsed;
if (FlxG.elapsed > MAX_ELAPSED){
FlxG.elapsed = MAX_ELAPSED;
};
if (_logoComplete){
if (_soundTrayTimer > 0){
_soundTrayTimer = (_soundTrayTimer - _elapsed);
} else {
if (_soundTray.y > -(_soundTray.height)){
_soundTray.y = (_soundTray.y - ((_elapsed * FlxG.height) * 2));
if (_soundTray.y < -(_soundTray.height)){
_soundTray.visible = false;
};
};
};
if (_console.visible){
_FPS[_curFPS] = (1 / _elapsed);
if (++_curFPS >= _FPS.length){
_curFPS = 0;
};
_fpsUpdate = !(_fpsUpdate);
if (_fpsUpdate){
_local4 = 0;
_local2 = 0;
while (_local2 < _FPS.length) {
_local4 = (_local4 + _FPS[_local2]);
_local2++;
};
_consoleFPS.text = (Math.floor((_local4 / _FPS.length)) + " fps");
};
};
if (_consoleY < _consoleYT){
_consoleY = (_consoleY + ((FlxG.height * 10) * _elapsed));
} else {
if (_consoleY > _consoleYT){
_consoleY = (_consoleY - ((FlxG.height * 10) * _elapsed));
};
};
if (_consoleY > (_gy * _z)){
_consoleY = (_gy * _z);
} else {
if (_consoleY < ((_gy * _z) - (FlxG.height * _z))){
_consoleY = ((_gy * _z) - (FlxG.height * _z));
_console.visible = false;
};
};
_console.y = Math.floor(_consoleY);
if (!FlxG.paused){
FlxG.updateKeys();
if (_cursor != null){
_cursor.x = (FlxG.mouse.x + FlxG.scroll.x);
_cursor.y = (FlxG.mouse.y + FlxG.scroll.y);
};
FlxG.doFollow();
_curState.update();
if (_quakeTimer > 0){
_quakeTimer = (_quakeTimer + _elapsed);
if (_quakeTimer > _quakeLength){
_quakeTimer = 0;
_buffer.x = 0;
_buffer.y = 0;
} else {
_buffer.x = (((((Math.random() * _quakeIntensity) * FlxG.width) * 2) - (_quakeIntensity * FlxG.width)) * _z);
_buffer.y = (((((Math.random() * _quakeIntensity) * FlxG.height) * 2) - (_quakeIntensity * FlxG.height)) * _z);
};
};
if (_flash.visible){
_flashHelper = (_flashHelper - (_elapsed / _flashDelay));
_flash.alpha = _flashHelper;
if (_flash.alpha <= 0){
_flash.visible = false;
if (_flashComplete != null){
_flashComplete();
};
};
};
if (((_fade.visible) && (!((_fade.alpha == 1))))){
_fadeHelper = (_fadeHelper + (_elapsed / _fadeDelay));
_fade.alpha = _fadeHelper;
if (_fade.alpha >= 1){
_fade.alpha = 1;
if (_fadeComplete != null){
_fadeComplete();
};
};
};
if (_flipped){
_bmpFront.bitmapData.fillRect(new Rectangle(0, 0, _bmpFront.width, _bmpFront.height), _bgc);
FlxG.buffer = _bmpFront.bitmapData;
} else {
_bmpBack.bitmapData.fillRect(new Rectangle(0, 0, _bmpBack.width, _bmpBack.height), _bgc);
FlxG.buffer = _bmpBack.bitmapData;
};
_curState.render();
_bmpBack.visible = !((_bmpFront.visible = _flipped));
_flipped = !(_flipped);
};
} else {
if (_created){
if (!_showLogo){
_logoComplete = true;
switchState(_iState);
} else {
if (_f == null){
_f = new FlxArray();
_local6 = 1;
if (FlxG.height > 200){
_local6 = 2;
};
_local7 = (32 * _local6);
_local8 = (((FlxG.height * _z) / 2) - (_local7 * 2));
_local9 = (((FlxG.width * _z) / 2) - _local7);
_f.push((addChild(new FlxLogoPixel((_local9 + _local7), _local8, _local7, 0, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel(_local9, (_local8 + _local7), _local7, 1, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel(_local9, (_local8 + (_local7 * 2)), _local7, 2, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel((_local9 + _local7), (_local8 + (_local7 * 2)), _local7, 3, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel(_local9, (_local8 + (_local7 * 3)), _local7, 4, _fc)) as FlxLogoPixel));
_poweredBy = new ImgPoweredBy();
_poweredBy.scaleX = _local6;
_poweredBy.scaleY = _local6;
_poweredBy.x = (((FlxG.width * _z) / 2) - (_poweredBy.width / 2));
_poweredBy.y = ((_local8 + (_local7 * 4)) + 16);
_local10 = new ColorTransform();
_local10.color = _fc;
_poweredBy.bitmapData.colorTransform(new Rectangle(0, 0, _poweredBy.width, _poweredBy.height), _local10);
addChild(_poweredBy);
_logoFade = (addChild(new Bitmap(new BitmapData((FlxG.width * _z), (FlxG.height * _z), true, 4278190080))) as Bitmap);
_logoFade.x = (_gx * _z);
_logoFade.y = (_gy * _z);
if (_fSound != null){
new _fSound().play(0, 0, new SoundTransform(0.35, 0));
};
};
_logoTimer = (_logoTimer + _elapsed);
_local2 = 0;
while (_local2 < _f.length) {
_f[_local2].update();
_local2++;
};
if (_logoFade.alpha > 0){
_logoFade.alpha = (_logoFade.alpha - (_elapsed * 0.5));
};
if (_logoTimer > 2){
removeChild(_poweredBy);
_local2 = 0;
while (_local2 < _f.length) {
removeChild(_f[_local2]);
_local2++;
};
_f.clear();
removeChild(_logoFade);
switchState(_iState);
_logoComplete = true;
};
};
} else {
if (root != null){
stage.showDefaultContextMenu = false;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.frameRate = 90;
_buffer = new Sprite();
_buffer.scaleX = _z;
_buffer.scaleY = _z;
addChild(_buffer);
_bmpBack = new Bitmap(new BitmapData(FlxG.width, FlxG.height, true, _bgc));
_bmpBack.x = _gx;
_bmpBack.y = _gy;
_buffer.addChild(_bmpBack);
_bmpFront = new Bitmap(new BitmapData(_bmpBack.width, _bmpBack.height, true, _bgc));
_bmpFront.x = _bmpBack.x;
_bmpFront.y = _bmpBack.y;
_buffer.addChild(_bmpFront);
_flipped = false;
_flash = new Bitmap(new BitmapData((FlxG.width * _z), (FlxG.height * _z)));
_flash.x = (_gx * _z);
_flash.y = (_gy * _z);
_flash.visible = false;
addChild(_flash);
_fade = new Bitmap(new BitmapData((FlxG.width * _z), (FlxG.height * _z)));
_fade.x = (_gx * _z);
_fade.y = (_gy * _z);
_fade.visible = false;
addChild(_fade);
_console = new Sprite();
_console.visible = false;
_console.x = ((_gx * _z) - FlxG.width);
_console.y = ((_gy * _z) - (FlxG.height * _z));
_consoleYT = (_consoleY = _console.y);
_local5 = new Bitmap(new BitmapData((FlxG.width * _z), (FlxG.height * _z), true, 2130706432));
_console.addChild(_local5);
_consoleText = new TextField();
_consoleText.width = _local5.width;
_consoleText.height = _local5.height;
_consoleText.multiline = true;
_consoleText.wordWrap = true;
_consoleText.embedFonts = true;
_consoleText.antiAliasType = AntiAliasType.NORMAL;
_consoleText.gridFitType = GridFitType.PIXEL;
_consoleText.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF);
_console.addChild(_consoleText);
_consoleFPS = new TextField();
_consoleFPS.width = _local5.width;
_consoleFPS.height = 20;
_consoleFPS.multiline = true;
_consoleFPS.wordWrap = true;
_consoleFPS.embedFonts = true;
_consoleFPS.antiAliasType = AntiAliasType.NORMAL;
_consoleFPS.gridFitType = GridFitType.PIXEL;
_consoleFPS.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, true, null, null, null, null, "right");
_console.addChild(_consoleFPS);
_consoleLines = new Array();
addChild(_console);
log("Extreme Gardening");
log("---------------------------------------");
log("");
log("Game by:");
log("Jan Willem Nijman | slordig.com");
log("");
log("Ported to flash by:");
log("Miroslav Malesevic | mirosurabu.com");
log("");
log("Developed using:");
log("Flixel.org");
stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
_focusPopup = new Sprite();
_focusPopup.visible = false;
if (FlxG.width > 160){
_focusPopup.scaleX = 2;
_focusPopup.scaleY = 2;
};
_focusPopup.x = ((_gx * _z) + (8 * _z));
_focusPopup.y = ((_gy * _z) + ((FlxG.height * _z) / 4));
_local5 = new Bitmap(new BitmapData(160, 36, true, 3204448256));
_focusPopup.x = (320 - _local5.width);
_focusPopup.y = (320 - _local5.height);
_focusPopup.addChild(_local5);
_local11 = new TextField();
_local11.width = _local5.width;
_local11.height = 20;
_local11.multiline = true;
_local11.wordWrap = true;
_local11.selectable = false;
_local11.embedFonts = true;
_local11.antiAliasType = AntiAliasType.NORMAL;
_local11.gridFitType = GridFitType.PIXEL;
_local11.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, null, null, null, null, null, "center");
_local11.text = "GAME PAUSED";
_local11.y = 7;
_focusPopup.addChild(_local11);
addChild(_focusPopup);
_soundTray = new Sprite();
_soundTray.visible = false;
_soundTray.scaleX = 2;
_soundTray.scaleY = 2;
_local5 = new Bitmap(new BitmapData(80, 30, true, 2130706432));
_soundTray.x = (((_gx + (FlxG.width / 2)) * _z) - ((_local5.width / 2) * _soundTray.scaleX));
_soundTray.addChild(_local5);
_local11 = new TextField();
_local11.width = _local5.width;
_local11.height = _local5.height;
_local11.multiline = true;
_local11.wordWrap = true;
_local11.selectable = false;
_local11.embedFonts = true;
_local11.antiAliasType = AntiAliasType.NORMAL;
_local11.gridFitType = GridFitType.PIXEL;
_local11.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "center");
_soundTray.addChild(_local11);
_local11.text = "VOLUME";
_local11.y = 16;
_local12 = 10;
_local13 = 14;
_soundTrayBars = new Array();
_local2 = 0;
while (_local2 < 10) {
_local5 = new Bitmap(new BitmapData(4, (_local2 + 1), false, 0xFFFFFF));
_local5.x = _local12;
_local5.y = _local13;
_soundTrayBars.push(_soundTray.addChild(_local5));
_local12 = (_local12 + 6);
_local13--;
_local2++;
};
addChild(_soundTray);
stage.addEventListener(Event.DEACTIVATE, onFocusLost);
stage.addEventListener(Event.ACTIVATE, onFocus);
if (_frame != null){
_local14 = new _frame();
_local14.scaleX = _z;
_local14.scaleY = _z;
addChild(_local14);
};
_created = true;
_logoTimer = 0;
};
};
};
}
private function switchState(_arg1:Class):void{
FlxG.currentState = _arg1;
FlxG.unfollow();
FlxG.resetKeys();
_quakeTimer = 0;
_buffer.x = 0;
_buffer.y = 0;
if (_cursor != null){
_buffer.removeChild(_cursor);
_cursor = null;
};
var _local2:FlxState = new (_arg1);
_buffer.addChild(_local2);
if (_curState != null){
_buffer.swapChildren(_local2, _curState);
_buffer.removeChild(_curState);
_curState.destroy();
};
_fade.visible = false;
_curState = _local2;
_curState.focusRect = false;
stage.focus = _curState;
FlxG.state = _curState;
_curState.onStateLoaded();
}
private function onMouseDown(_arg1:MouseEvent):void{
FlxG.kMouse = true;
}
private function onKeyDown(_arg1:KeyboardEvent):void{
var _local2:String = String.fromCharCode(_arg1.charCode);
FlxG.pressKey(_arg1.keyCode);
}
private function quake(_arg1:Number, _arg2:Number=0.5):void{
_quakeIntensity = _arg1;
_quakeLength = _arg2;
_quakeTimer = 0.01;
}
private function flash(_arg1:uint, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{
if (_arg1 == 0){
_flash.visible = false;
return;
};
if (((!(_arg4)) && (_flash.visible))){
return;
};
_flash.bitmapData.fillRect(new Rectangle(0, 0, _flash.width, _flash.height), _arg1);
_flashDelay = _arg2;
_flashComplete = _arg3;
_flashHelper = 1;
_flash.alpha = 1;
_flash.visible = true;
}
private function onFocusLost(_arg1:Event=null):void{
if (!FlxG.shouldPause){
return;
};
if (((!((x == 0))) || (!((y == 0))))){
x = 0;
y = 0;
};
Mouse.show();
_focusPopup.visible = true;
FlxG.paused = true;
FlxG.pauseMusic();
}
}
}//package com.adamatomic.flixel
Section 7
//FlxGame_ImgKey0 (com.adamatomic.flixel.FlxGame_ImgKey0)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKey0 extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 8
//FlxGame_ImgKey1 (com.adamatomic.flixel.FlxGame_ImgKey1)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKey1 extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 9
//FlxGame_ImgKeyC (com.adamatomic.flixel.FlxGame_ImgKeyC)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKeyC extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 10
//FlxGame_ImgKeyMinus (com.adamatomic.flixel.FlxGame_ImgKeyMinus)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKeyMinus extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 11
//FlxGame_ImgKeyMouse (com.adamatomic.flixel.FlxGame_ImgKeyMouse)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKeyMouse extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 12
//FlxGame_ImgKeyPlus (com.adamatomic.flixel.FlxGame_ImgKeyPlus)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKeyPlus extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 13
//FlxGame_ImgKeysArrows (com.adamatomic.flixel.FlxGame_ImgKeysArrows)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKeysArrows extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 14
//FlxGame_ImgKeyX (com.adamatomic.flixel.FlxGame_ImgKeyX)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgKeyX extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 15
//FlxGame_ImgPoweredBy (com.adamatomic.flixel.FlxGame_ImgPoweredBy)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_ImgPoweredBy extends BitmapAsset {
}
}//package com.adamatomic.flixel
Section 16
//FlxGame_junk (com.adamatomic.flixel.FlxGame_junk)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_junk extends FontAsset {
}
}//package com.adamatomic.flixel
Section 17
//FlxGame_SndBeep (com.adamatomic.flixel.FlxGame_SndBeep)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_SndBeep extends SoundAsset {
}
}//package com.adamatomic.flixel
Section 18
//FlxGame_SndFlixel (com.adamatomic.flixel.FlxGame_SndFlixel)
package com.adamatomic.flixel {
import mx.core.*;
public class FlxGame_SndFlixel extends SoundAsset {
}
}//package com.adamatomic.flixel
Section 19
//FlxKey (com.adamatomic.flixel.FlxKey)
package com.adamatomic.flixel {
public class FlxKey {
public var kOldValue:int;
public var kName:String;
public var kPressed:int;
public var kCode:int;
public function FlxKey(_arg1:int, _arg2:String){
kCode = _arg1;
kName = _arg2;
}
}
}//package com.adamatomic.flixel
Section 20
//FlxKeyControl (com.adamatomic.flixel.FlxKeyControl)
package com.adamatomic.flixel {
public class FlxKeyControl {
public var unknownKeyCallback:Function;// = null
private var KEYS:Array;
public function FlxKeyControl(){
KEYS = new Array();
super();
}
public function Pressed(_arg1:String):Boolean{
var _local3:FlxKey;
var _local2:uint;
while (_local2 < KEYS.length) {
_local3 = (KEYS[_local2] as FlxKey);
if (_local3.kName == _arg1){
return ((_local3.kPressed > 0));
};
_local2++;
};
return (false);
}
public function ResetKeys():void{
var _local2:FlxKey;
var _local1:uint;
while (_local1 < KEYS.length) {
_local2 = (KEYS[_local1] as FlxKey);
_local2.kPressed = 0;
_local1++;
};
}
public function JustReleased(_arg1:String):Boolean{
var _local3:FlxKey;
var _local2:uint;
while (_local2 < KEYS.length) {
_local3 = (KEYS[_local2] as FlxKey);
if (_local3.kName == _arg1){
return ((_local3.kPressed == -1));
};
_local2++;
};
return (false);
}
public function JustPressed(_arg1:String):Boolean{
var _local3:FlxKey;
var _local2:uint;
while (_local2 < KEYS.length) {
_local3 = (KEYS[_local2] as FlxKey);
if (_local3.kName == _arg1){
return ((_local3.kPressed == 2));
};
_local2++;
};
return (false);
}
public function ReleaseKey(_arg1:int):void{
var _local3:FlxKey;
var _local2:uint;
while (_local2 < KEYS.length) {
_local3 = (KEYS[_local2] as FlxKey);
if (_local3.kCode == _arg1){
if (_local3.kPressed > 0){
_local3.kPressed = -1;
} else {
_local3.kPressed = 0;
};
};
_local2++;
};
}
public function PressKey(_arg1:int):void{
var _local4:FlxKey;
var _local2:Boolean;
var _local3:uint;
while (_local3 < KEYS.length) {
_local4 = (KEYS[_local3] as FlxKey);
if (_local4.kCode == _arg1){
_local2 = false;
if (_local4.kPressed > 0){
_local4.kPressed = 1;
} else {
_local4.kPressed = 2;
};
};
_local3++;
};
if (((!((unknownKeyCallback == null))) && (_local2))){
unknownKeyCallback(_arg1);
};
}
public function UpdateKeys():void{
var _local2:FlxKey;
var _local1:uint;
while (_local1 < KEYS.length) {
_local2 = (KEYS[_local1] as FlxKey);
if ((((_local2.kOldValue == -1)) && ((_local2.kPressed == -1)))){
_local2.kPressed = 0;
} else {
if ((((_local2.kOldValue == 2)) && ((_local2.kPressed == 2)))){
_local2.kPressed = 1;
};
};
_local2.kOldValue = _local2.kPressed;
_local1++;
};
}
public function AddKey(_arg1:int, _arg2:String):void{
KEYS.push(new FlxKey(_arg1, _arg2));
}
}
}//package com.adamatomic.flixel
Section 21
//FlxLayer (com.adamatomic.flixel.FlxLayer)
package com.adamatomic.flixel {
public class FlxLayer extends FlxCore {
public var _children:FlxArray;
public function FlxLayer(){
_children = new FlxArray();
}
public function add(_arg1:FlxCore):FlxCore{
return ((_children.add(_arg1) as FlxCore));
}
override public function render():void{
super.render();
var _local1:uint;
while (_local1 < _children.length) {
if (((((!((_children[_local1] == null))) && (_children[_local1].exists))) && (_children[_local1].visible))){
_children[_local1].render();
};
_local1++;
};
}
override public function update():void{
super.update();
var _local1:uint;
while (_local1 < _children.length) {
if (((((!((_children[_local1] == null))) && (_children[_local1].exists))) && (_children[_local1].active))){
_children[_local1].update();
};
_local1++;
};
}
public function destroy():void{
_children.clear();
}
public function removeInactive():void{
_children = FlxG.removeInactiveObjects(_children);
}
}
}//package com.adamatomic.flixel
Section 22
//FlxMask (com.adamatomic.flixel.FlxMask)
package com.adamatomic.flixel {
public class FlxMask extends FlxSprite {
public function FlxMask(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
super(null, _arg1, _arg2, false, false, _arg3, _arg4, 2734751488, false);
offset.x = (_arg3 / 2);
offset.y = (_arg4 / 2);
}
}
}//package com.adamatomic.flixel
Section 23
//FlxSprite (com.adamatomic.flixel.FlxSprite)
package com.adamatomic.flixel {
import flash.display.*;
import flash.geom.*;
import com.adamatomic.flixel.data.*;
public class FlxSprite extends FlxCore {
public var acceleration:Point;
public var finished:Boolean;
public var angularAcceleration:Number;
public var smoothing:Boolean;// = true
private var _alpha:Number;
private var _animations:FlxArray;
public var blendMode:String;
private var _callback:Function;
public var pixels:BitmapData;
public var _curAnim:FlxAnim;
public var drag:Point;
public var angularDrag:Number;
private var _pZero:Point;
private var _flipped:uint;
public var colorTransform:ColorTransform;// = null
protected var _pixels:BitmapData;
public var angle:Number;
public var thrust:Number;
public var maxThrust:Number;
public var velocity:Point;
public var maxAngular:Number;
public var angularVelocity:Number;
public var maxVelocity:Point;
public var health:Number;
private var _bh:uint;
private var _p:Point;
private var _r:Rectangle;
private var _bw:uint;
private var _frameTimer:Number;
private var _facing:Boolean;
public var _curFrame:uint;
public static const RIGHT:Boolean = true;
public static const LEFT:Boolean = false;
public function FlxSprite(_arg1:Class=null, _arg2:int=0, _arg3:int=0, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:uint=0, _arg7:uint=0, _arg8:uint=0, _arg9:Boolean=false){
smoothing = _arg9;
if (_arg1 == null){
pixels = FlxG.createBitmap(_arg6, _arg7, _arg8);
} else {
pixels = FlxG.addBitmap(_arg1, _arg5);
};
x = _arg2;
y = _arg3;
if (_arg6 == 0){
if (_arg4){
_arg6 = pixels.height;
} else {
_arg6 = pixels.width;
};
};
width = (_bw = _arg6);
height = (_bh = pixels.height);
offset = new Point();
velocity = new Point();
acceleration = new Point();
drag = new Point();
maxVelocity = new Point(10000, 10000);
angle = 0;
angularVelocity = 0;
angularAcceleration = 0;
angularDrag = 0;
maxAngular = 10000;
thrust = 0;
scale = new Point(1, 1);
finished = false;
_facing = true;
_animations = new FlxArray();
if (_arg5){
_flipped = (pixels.width >> 1);
} else {
_flipped = 0;
};
_curAnim = null;
_curFrame = 0;
_frameTimer = 0;
_p = new Point(x, y);
_pZero = new Point();
_r = new Rectangle(0, 0, _bw, _bh);
_pixels = new BitmapData(width, height);
_pixels.copyPixels(pixels, _r, _pZero);
health = 1;
alpha = 1;
_callback = null;
}
override protected function getScreenXY(_arg1:Point):void{
_arg1.x = (Math.floor((x - offset.x)) + Math.floor((FlxG.scroll.x * scrollFactor.x)));
_arg1.y = (Math.floor((y - offset.y)) + Math.floor((FlxG.scroll.y * scrollFactor.y)));
}
public function hurt(_arg1:Number):void{
if ((health = (health - _arg1)) <= 0){
kill();
};
}
override public function render():void{
var _local1:Matrix;
if (!visible){
return;
};
getScreenXY(_p);
if (((((((((((!((angle == 0))) || (!((scale.x == 1))))) || (!((scale.y == 1))))) || (!((colorTransform == null))))) || (!((blendMode == null))))) || (smoothing))){
_local1 = new Matrix();
_local1.translate(-(offset.x), -(offset.y));
_local1.scale(scale.x, scale.y);
if (angle != 0){
_local1.rotate(((Math.PI * 2) * (angle / 360)));
};
_local1.translate((_p.x + offset.x), (_p.y + offset.y));
FlxG.buffer.draw(_pixels, _local1, colorTransform, blendMode, null, smoothing);
return;
};
FlxG.buffer.copyPixels(_pixels, _r, _p, null, null, true);
}
public function randomFrame():void{
_pixels.copyPixels(pixels, new Rectangle((Math.floor((Math.random() * (pixels.width / _bw))) * _bw), 0, _bw, _bh), _pZero);
}
private function calcFrame():void{
var _local1:uint;
if (_curAnim == null){
_pixels.copyPixels(pixels, _r, _pZero);
} else {
_local1 = (_curAnim.frames[_curFrame] * _bw);
if (((!(_facing)) && ((_flipped > 0)))){
_local1 = (((_flipped << 1) - _local1) - _bw);
};
_pixels.copyPixels(pixels, new Rectangle(_local1, 0, _bw, _bh), _pZero);
};
if (_alpha != 1){
_pixels.colorTransform(_r, new ColorTransform(1, 1, 1, _alpha));
};
if (_callback != null){
_callback(_curAnim.name, _curFrame, _curAnim.frames[_curFrame]);
};
}
override public function hitCeiling():Boolean{
velocity.y = 0;
return (true);
}
public function play(_arg1:String, _arg2:Boolean=false):void{
if (((((!(_arg2)) && (!((_curAnim == null))))) && ((_arg1 == _curAnim.name)))){
return;
};
_curFrame = 0;
_frameTimer = 0;
var _local3:uint;
while (_local3 < _animations.length) {
if (_animations[_local3].name == _arg1){
finished = false;
_curAnim = _animations[_local3];
calcFrame();
return;
};
_local3++;
};
}
override public function hitFloor():Boolean{
velocity.y = 0;
return (true);
}
public function set alpha(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
};
if (_arg1 < 0){
_arg1 = 0;
};
_alpha = _arg1;
calcFrame();
}
public function addAnimationCallback(_arg1:Function):void{
_callback = _arg1;
}
override public function update():void{
var _local1:Point;
var _local2:Point;
super.update();
if (!active){
return;
};
if (((((!((_curAnim == null))) && ((_curAnim.delay > 0)))) && (((_curAnim.looped) || (!(finished)))))){
_frameTimer = (_frameTimer + FlxG.elapsed);
if (_frameTimer > _curAnim.delay){
_frameTimer = (_frameTimer - _curAnim.delay);
if (_curFrame == (_curAnim.frames.length - 1)){
if (_curAnim.looped){
_curFrame = 0;
};
finished = true;
} else {
_curFrame++;
};
calcFrame();
};
};
angle = (angle + ((angularVelocity = FlxG.computeVelocity(angularVelocity, angularAcceleration, angularDrag, maxAngular)) * FlxG.elapsed));
if (thrust != 0){
_local1 = FlxG.rotatePoint(-(thrust), 0, 0, 0, angle);
_local2 = FlxG.rotatePoint(-(maxThrust), 0, 0, 0, angle);
maxVelocity.x = Math.abs(_local2.x);
maxVelocity.y = Math.abs(_local2.y);
} else {
_local1 = _pZero;
};
x = (x + ((velocity.x = FlxG.computeVelocity(velocity.x, (acceleration.x + _local1.x), drag.x, maxVelocity.x)) * FlxG.elapsed));
y = (y + ((velocity.y = FlxG.computeVelocity(velocity.y, (acceleration.y + _local1.y), drag.y, maxVelocity.y)) * FlxG.elapsed));
}
public function onEmit():void{
}
public function set facing(_arg1:Boolean):void{
var _local2 = !((_facing == _arg1));
_facing = _arg1;
if (_local2){
calcFrame();
};
}
public function specificFrame(_arg1:uint):void{
_pixels.copyPixels(pixels, new Rectangle((_arg1 * _bw), 0, _bw, _bh), _pZero);
}
public function get facing():Boolean{
return (_facing);
}
public function addAnimation(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true):void{
_animations.add(new FlxAnim(_arg1, _arg2, _arg3, _arg4));
}
public function get alpha():Number{
return (_alpha);
}
override public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{
var _local4:Number = ((x - offset.x) * scale.x);
var _local5:Number = ((y - offset.y) * scale.y);
if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){
_local4 = (_local4 - Math.floor((FlxG.scroll.x * scrollFactor.x)));
_local5 = (_local5 - Math.floor((FlxG.scroll.y * scrollFactor.y)));
};
if (_arg3){
return (_pixels.hitTest(new Point(0, 0), 0xFF, new Point((_arg1 - _local4), (_arg2 - _local5))));
};
if ((((((((_arg1 <= _local4)) || ((_arg1 >= (_local4 + (width * scale.x)))))) || ((_arg2 <= _local5)))) || ((_arg2 >= (_local5 + (height * scale.y)))))){
return (false);
};
return (true);
}
override public function hitWall():Boolean{
velocity.x = 0;
return (true);
}
}
}//package com.adamatomic.flixel
Section 24
//FlxSpriteEx (com.adamatomic.flixel.FlxSpriteEx)
package com.adamatomic.flixel {
public class FlxSpriteEx extends FlxSprite {
public var mask:FlxMask;
public function FlxSpriteEx(_arg1:Class=null, _arg2:int=0, _arg3:int=0, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:uint=0, _arg7:uint=0, _arg8:uint=0, _arg9:Boolean=true){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9);
mask = new FlxMask(_arg2, _arg3, _arg6, _arg7);
}
override public function update():void{
super.update();
mask.x = x;
mask.y = y;
mask.scale.x = scale.x;
mask.scale.y = scale.y;
}
public function bOverlaps(_arg1:FlxSpriteEx):Boolean{
return (mask.overlaps(_arg1.mask));
}
}
}//package com.adamatomic.flixel
Section 25
//FlxState (com.adamatomic.flixel.FlxState)
package com.adamatomic.flixel {
import flash.display.*;
public class FlxState extends Sprite {
private var _layer:FlxLayer;
public function FlxState(){
_layer = new FlxLayer();
FlxG.state = this;
}
public function add(_arg1:FlxCore):FlxCore{
_arg1.parent = this;
return (_layer.add(_arg1));
}
public function render():void{
_layer.render();
}
public function onStateLoaded():void{
}
public function update():void{
FlxG.mouseClicked = ((FlxG.kMouse) && (!(FlxG.oldkMouse)));
FlxG.oldkMouse = FlxG.kMouse;
_layer.update();
}
public function destroy():void{
_layer.destroy();
}
public function removeInactive():void{
_layer.removeInactive();
}
}
}//package com.adamatomic.flixel
Section 26
//MD5 (com.adobe.crypto.MD5)
package com.adobe.crypto {
import flash.utils.*;
import com.adobe.utils.*;
public class MD5 {
public static var digest:ByteArray;
private static function ff(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(f, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function f(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg2) | (~(_arg1) & _arg3)));
}
private static function g(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 & _arg3) | (_arg2 & ~(_arg3))));
}
private static function h(_arg1:int, _arg2:int, _arg3:int):int{
return (((_arg1 ^ _arg2) ^ _arg3));
}
private static function i(_arg1:int, _arg2:int, _arg3:int):int{
return ((_arg2 ^ (_arg1 | ~(_arg3))));
}
private static function transform(_arg1:Function, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int, _arg8:int):int{
var _local9:int = (((_arg2 + int(_arg1(_arg3, _arg4, _arg5))) + _arg6) + _arg8);
return ((IntUtil.rol(_local9, _arg7) + _arg3));
}
private static function hh(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(h, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hash(_arg1:String):String{
var _local2:ByteArray = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (hashBinary(_local2));
}
private static function createBlocks(_arg1:ByteArray):Array{
var _local2:Array = new Array();
var _local3:int = (_arg1.length * 8);
var _local4 = 0xFF;
var _local5:int;
while (_local5 < _local3) {
_local2[int((_local5 >> 5))] = (_local2[int((_local5 >> 5))] | ((_arg1[(_local5 / 8)] & _local4) << (_local5 % 32)));
_local5 = (_local5 + 8);
};
_local2[int((_local3 >> 5))] = (_local2[int((_local3 >> 5))] | (128 << (_local3 % 32)));
_local2[int(((((_local3 + 64) >>> 9) << 4) + 14))] = _local3;
return (_local2);
}
public static function hashBinary(_arg1:ByteArray):String{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local2 = 1732584193;
var _local3 = -271733879;
var _local4 = -1732584194;
var _local5 = 271733878;
var _local10:Array = createBlocks(_arg1);
var _local11:int = _local10.length;
var _local12:int;
while (_local12 < _local11) {
_local6 = _local2;
_local7 = _local3;
_local8 = _local4;
_local9 = _local5;
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 7, -680876936);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 1))], 12, -389564586);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 17, 606105819);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 3))], 22, -1044525330);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 7, -176418897);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 5))], 12, 1200080426);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 17, -1473231341);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 7))], 22, -45705983);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 7, 1770035416);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 9))], 12, -1958414417);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 17, -42063);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 11))], 22, -1990404162);
_local2 = ff(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 7, 1804603682);
_local5 = ff(_local5, _local2, _local3, _local4, _local10[int((_local12 + 13))], 12, -40341101);
_local4 = ff(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 17, -1502002290);
_local3 = ff(_local3, _local4, _local5, _local2, _local10[int((_local12 + 15))], 22, 1236535329);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 5, -165796510);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 6))], 9, -1069501632);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 14, 643717713);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 0))], 20, -373897302);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 5, -701558691);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 10))], 9, 38016083);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 14, -660478335);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 4))], 20, -405537848);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 5, 568446438);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 14))], 9, -1019803690);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 14, -187363961);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 8))], 20, 1163531501);
_local2 = gg(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 5, -1444681467);
_local5 = gg(_local5, _local2, _local3, _local4, _local10[int((_local12 + 2))], 9, -51403784);
_local4 = gg(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 14, 1735328473);
_local3 = gg(_local3, _local4, _local5, _local2, _local10[int((_local12 + 12))], 20, -1926607734);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 5))], 4, -378558);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 8))], 11, -2022574463);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 11))], 16, 1839030562);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 14))], 23, -35309556);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 1))], 4, -1530992060);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 4))], 11, 1272893353);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 7))], 16, -155497632);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 10))], 23, -1094730640);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 13))], 4, 681279174);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 0))], 11, -358537222);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 3))], 16, -722521979);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 6))], 23, 76029189);
_local2 = hh(_local2, _local3, _local4, _local5, _local10[int((_local12 + 9))], 4, -640364487);
_local5 = hh(_local5, _local2, _local3, _local4, _local10[int((_local12 + 12))], 11, -421815835);
_local4 = hh(_local4, _local5, _local2, _local3, _local10[int((_local12 + 15))], 16, 530742520);
_local3 = hh(_local3, _local4, _local5, _local2, _local10[int((_local12 + 2))], 23, -995338651);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 0))], 6, -198630844);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 7))], 10, 1126891415);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 14))], 15, -1416354905);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 5))], 21, -57434055);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 12))], 6, 1700485571);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 3))], 10, -1894986606);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 10))], 15, -1051523);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 1))], 21, -2054922799);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 8))], 6, 1873313359);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 15))], 10, -30611744);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 6))], 15, -1560198380);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 13))], 21, 1309151649);
_local2 = ii(_local2, _local3, _local4, _local5, _local10[int((_local12 + 4))], 6, -145523070);
_local5 = ii(_local5, _local2, _local3, _local4, _local10[int((_local12 + 11))], 10, -1120210379);
_local4 = ii(_local4, _local5, _local2, _local3, _local10[int((_local12 + 2))], 15, 718787259);
_local3 = ii(_local3, _local4, _local5, _local2, _local10[int((_local12 + 9))], 21, -343485551);
_local2 = (_local2 + _local6);
_local3 = (_local3 + _local7);
_local4 = (_local4 + _local8);
_local5 = (_local5 + _local9);
_local12 = (_local12 + 16);
};
digest = new ByteArray();
digest.writeInt(_local2);
digest.writeInt(_local3);
digest.writeInt(_local4);
digest.writeInt(_local5);
digest.position = 0;
return ((((IntUtil.toHex(_local2) + IntUtil.toHex(_local3)) + IntUtil.toHex(_local4)) + IntUtil.toHex(_local5)));
}
private static function gg(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(g, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
private static function ii(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):int{
return (transform(i, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7));
}
public static function hashBytes(_arg1:ByteArray):String{
return (hashBinary(_arg1));
}
}
}//package com.adobe.crypto
Section 27
//PNGEncoder (com.adobe.images.PNGEncoder)
package com.adobe.images {
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class PNGEncoder {
private static var crcTableComputed:Boolean = false;
private static var crcTable:Array;
private static function writeChunk(_arg1:ByteArray, _arg2:uint, _arg3:ByteArray):void{
var _local8:uint;
var _local9:uint;
var _local10:uint;
if (!crcTableComputed){
crcTableComputed = true;
crcTable = [];
_local9 = 0;
while (_local9 < 0x0100) {
_local8 = _local9;
_local10 = 0;
while (_local10 < 8) {
if ((_local8 & 1)){
_local8 = uint((uint(3988292384) ^ uint((_local8 >>> 1))));
} else {
_local8 = uint((_local8 >>> 1));
};
_local10++;
};
crcTable[_local9] = _local8;
_local9++;
};
};
var _local4:uint;
if (_arg3 != null){
_local4 = _arg3.length;
};
_arg1.writeUnsignedInt(_local4);
var _local5:uint = _arg1.position;
_arg1.writeUnsignedInt(_arg2);
if (_arg3 != null){
_arg1.writeBytes(_arg3);
};
var _local6:uint = _arg1.position;
_arg1.position = _local5;
_local8 = 4294967295;
var _local7:int;
while (_local7 < (_local6 - _local5)) {
_local8 = uint((crcTable[((_local8 ^ _arg1.readUnsignedByte()) & uint(0xFF))] ^ uint((_local8 >>> 8))));
_local7++;
};
_local8 = uint((_local8 ^ uint(4294967295)));
_arg1.position = _local6;
_arg1.writeUnsignedInt(_local8);
}
public static function encode(_arg1:BitmapData):ByteArray{
var _local6:uint;
var _local7:int;
var _local2:ByteArray = new ByteArray();
_local2.writeUnsignedInt(2303741511);
_local2.writeUnsignedInt(218765834);
var _local3:ByteArray = new ByteArray();
_local3.writeInt(_arg1.width);
_local3.writeInt(_arg1.height);
_local3.writeUnsignedInt(134610944);
_local3.writeByte(0);
writeChunk(_local2, 1229472850, _local3);
var _local4:ByteArray = new ByteArray();
var _local5:int;
while (_local5 < _arg1.height) {
_local4.writeByte(0);
if (!_arg1.transparent){
_local7 = 0;
while (_local7 < _arg1.width) {
_local6 = _arg1.getPixel(_local7, _local5);
_local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | 0xFF)));
_local7++;
};
} else {
_local7 = 0;
while (_local7 < _arg1.width) {
_local6 = _arg1.getPixel32(_local7, _local5);
_local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | (_local6 >>> 24))));
_local7++;
};
};
_local5++;
};
_local4.compress();
writeChunk(_local2, 1229209940, _local4);
writeChunk(_local2, 1229278788, null);
return (_local2);
}
}
}//package com.adobe.images
Section 28
//JSON (com.adobe.serialization.json.JSON)
package com.adobe.serialization.json {
public class JSON {
public static function decode(_arg1:String){
var _local2:JSONDecoder = new JSONDecoder(_arg1);
return (_local2.getValue());
}
public static function encode(_arg1:Object):String{
var _local2:JSONEncoder = new JSONEncoder(_arg1);
return (_local2.getString());
}
}
}//package com.adobe.serialization.json
Section 29
//JSONDecoder (com.adobe.serialization.json.JSONDecoder)
package com.adobe.serialization.json {
public class JSONDecoder {
private var value;
private var tokenizer:JSONTokenizer;
private var token:JSONToken;
public function JSONDecoder(_arg1:String){
this.tokenizer = new JSONTokenizer(_arg1);
this.nextToken();
this.value = this.parseValue();
}
private function parseObject():Object{
var _local2:String;
var _local1:Object = new Object();
this.nextToken();
if (this.token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
while (true) {
if (this.token.type == JSONTokenType.STRING){
_local2 = String(this.token.value);
this.nextToken();
if (this.token.type == JSONTokenType.COLON){
this.nextToken();
_local1[_local2] = this.parseValue();
this.nextToken();
if (this.token.type == JSONTokenType.RIGHT_BRACE){
return (_local1);
};
if (this.token.type == JSONTokenType.COMMA){
this.nextToken();
} else {
this.tokenizer.parseError(("Expecting } or , but found " + this.token.value));
};
} else {
this.tokenizer.parseError(("Expecting : but found " + this.token.value));
};
} else {
this.tokenizer.parseError(("Expecting string but found " + this.token.value));
};
};
return (null);
}
private function parseValue():Object{
if (this.token == null){
this.tokenizer.parseError("Unexpected end of input");
};
switch (this.token.type){
case JSONTokenType.LEFT_BRACE:
return (this.parseObject());
case JSONTokenType.LEFT_BRACKET:
return (this.parseArray());
case JSONTokenType.STRING:
case JSONTokenType.NUMBER:
case JSONTokenType.TRUE:
case JSONTokenType.FALSE:
case JSONTokenType.NULL:
return (this.token.value);
default:
this.tokenizer.parseError(("Unexpected " + this.token.value));
};
return (null);
}
private function nextToken():JSONToken{
return ((this.token = this.tokenizer.getNextToken()));
}
public function getValue(){
return (this.value);
}
private function parseArray():Array{
var _local1:Array = new Array();
this.nextToken();
if (this.token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
while (true) {
_local1.push(this.parseValue());
this.nextToken();
if (this.token.type == JSONTokenType.RIGHT_BRACKET){
return (_local1);
};
if (this.token.type == JSONTokenType.COMMA){
this.nextToken();
} else {
this.tokenizer.parseError(("Expecting ] or , but found " + this.token.value));
};
};
return (null);
}
}
}//package com.adobe.serialization.json
Section 30
//JSONEncoder (com.adobe.serialization.json.JSONEncoder)
package com.adobe.serialization.json {
import flash.utils.*;
public class JSONEncoder {
private var jsonString:String;
public function JSONEncoder(_arg1){
this.jsonString = this.convertToString(_arg1);
}
private function escapeString(_arg1:String):String{
var _local3:String;
var _local6:String;
var _local7:String;
var _local2 = "";
var _local4:Number = _arg1.length;
var _local5:int;
while (_local5 < _local4) {
_local3 = _arg1.charAt(_local5);
switch (_local3){
case "\"":
_local2 = (_local2 + "\\\"");
break;
case "\\":
_local2 = (_local2 + "\\\\");
break;
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;
default:
if (_local3 < " "){
_local6 = _local3.charCodeAt(0).toString(16);
_local7 = ((_local6.length == 2)) ? "00" : "000";
_local2 = (_local2 + (("\\u" + _local7) + _local6));
} else {
_local2 = (_local2 + _local3);
};
};
_local5++;
};
return ((("\"" + _local2) + "\""));
}
private function arrayToString(_arg1:Array):String{
var _local2 = "";
var _local3:int;
while (_local3 < _arg1.length) {
if (_local2.length > 0){
_local2 = (_local2 + ",");
};
_local2 = (_local2 + this.convertToString(_arg1[_local3]));
_local3++;
};
return ((("[" + _local2) + "]"));
}
public function getString():String{
return (this.jsonString);
}
private function objectToString(_arg1:Object):String{
var value:Object;
var key:String;
var v:XML;
var o = _arg1;
var s = "";
var classInfo:XML = describeType(o);
if (classInfo.@name.toString() == "Object"){
for (key in o) {
value = o[key];
if ((value is Function)){
} else {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((this.escapeString(key) + ":") + this.convertToString(value)));
};
};
} else {
for each (v in classInfo..*.(((name() == "variable")) || ((name() == "accessor")))) {
if (s.length > 0){
s = (s + ",");
};
s = (s + ((this.escapeString(v.@name.toString()) + ":") + this.convertToString(o[v.@name])));
};
};
return ((("{" + s) + "}"));
}
private function convertToString(_arg1):String{
if ((_arg1 is String)){
return (this.escapeString((_arg1 as String)));
};
if ((_arg1 is Number)){
return ((isFinite((_arg1 as Number))) ? _arg1.toString() : "null");
} else {
if ((_arg1 is Boolean)){
return ((_arg1) ? "true" : "false");
} else {
if ((_arg1 is Array)){
return (this.arrayToString((_arg1 as Array)));
};
if ((((_arg1 is Object)) && (!((_arg1 == null))))){
return (this.objectToString(_arg1));
};
};
};
return ("null");
}
}
}//package com.adobe.serialization.json
Section 31
//JSONParseError (com.adobe.serialization.json.JSONParseError)
package com.adobe.serialization.json {
public class JSONParseError extends Error {
private var _location:int;
private var _text:String;
public function JSONParseError(_arg1:String="", _arg2:int=0, _arg3:String=""){
super(_arg1);
name = "JSONParseError";
this._location = _arg2;
this._text = _arg3;
}
public function get location():int{
return (this._location);
}
public function get text():String{
return (this._text);
}
}
}//package com.adobe.serialization.json
Section 32
//JSONToken (com.adobe.serialization.json.JSONToken)
package com.adobe.serialization.json {
public class JSONToken {
private var _value:Object;
private var _type:int;
public function JSONToken(_arg1:int=-1, _arg2:Object=null){
this._type = _arg1;
this._value = _arg2;
}
public function get value():Object{
return (this._value);
}
public function get type():int{
return (this._type);
}
public function set type(_arg1:int):void{
this._type = _arg1;
}
public function set value(_arg1:Object):void{
this._value = _arg1;
}
}
}//package com.adobe.serialization.json
Section 33
//JSONTokenizer (com.adobe.serialization.json.JSONTokenizer)
package com.adobe.serialization.json {
public class JSONTokenizer {
private var loc:int;
private var ch:String;
private var obj:Object;
private var jsonString:String;
public function JSONTokenizer(_arg1:String){
this.jsonString = _arg1;
this.loc = 0;
this.nextChar();
}
private function skipComments():void{
if (this.ch == "/"){
this.nextChar();
switch (this.ch){
case "/":
do {
this.nextChar();
} while (((!((this.ch == "\n"))) && (!((this.ch == "")))));
this.nextChar();
break;
case "*":
this.nextChar();
while (true) {
if (this.ch == "*"){
this.nextChar();
if (this.ch == "/"){
this.nextChar();
break;
};
} else {
this.nextChar();
};
if (this.ch == ""){
this.parseError("Multi-line comment not closed");
};
};
break;
default:
this.parseError((("Unexpected " + this.ch) + " encountered (expecting '/' or '*' )"));
};
};
}
private function isDigit(_arg1:String):Boolean{
return ((((_arg1 >= "0")) && ((_arg1 <= "9"))));
}
private function readString():JSONToken{
var _local3:String;
var _local4:int;
var _local1:JSONToken = new JSONToken();
_local1.type = JSONTokenType.STRING;
var _local2 = "";
this.nextChar();
while (((!((this.ch == "\""))) && (!((this.ch == ""))))) {
if (this.ch == "\\"){
this.nextChar();
switch (this.ch){
case "\"":
_local2 = (_local2 + "\"");
break;
case "/":
_local2 = (_local2 + "/");
break;
case "\\":
_local2 = (_local2 + "\\");
break;
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":
_local3 = "";
_local4 = 0;
while (_local4 < 4) {
if (!this.isHexDigit(this.nextChar())){
this.parseError((" Excepted a hex digit, but found: " + this.ch));
};
_local3 = (_local3 + this.ch);
_local4++;
};
_local2 = (_local2 + String.fromCharCode(parseInt(_local3, 16)));
break;
default:
_local2 = (_local2 + ("\\" + this.ch));
};
} else {
_local2 = (_local2 + this.ch);
};
this.nextChar();
};
if (this.ch == ""){
this.parseError("Unterminated string literal");
};
this.nextChar();
_local1.value = _local2;
return (_local1);
}
private function nextChar():String{
return ((this.ch = this.jsonString.charAt(this.loc++)));
}
public function getNextToken():JSONToken{
var _local2:String;
var _local3:String;
var _local4:String;
var _local1:JSONToken = new JSONToken();
this.skipIgnored();
switch (this.ch){
case "{":
_local1.type = JSONTokenType.LEFT_BRACE;
_local1.value = "{";
this.nextChar();
break;
case "}":
_local1.type = JSONTokenType.RIGHT_BRACE;
_local1.value = "}";
this.nextChar();
break;
case "[":
_local1.type = JSONTokenType.LEFT_BRACKET;
_local1.value = "[";
this.nextChar();
break;
case "]":
_local1.type = JSONTokenType.RIGHT_BRACKET;
_local1.value = "]";
this.nextChar();
break;
case ",":
_local1.type = JSONTokenType.COMMA;
_local1.value = ",";
this.nextChar();
break;
case ":":
_local1.type = JSONTokenType.COLON;
_local1.value = ":";
this.nextChar();
break;
case "t":
_local2 = ((("t" + this.nextChar()) + this.nextChar()) + this.nextChar());
if (_local2 == "true"){
_local1.type = JSONTokenType.TRUE;
_local1.value = true;
this.nextChar();
} else {
this.parseError(("Expecting 'true' but found " + _local2));
};
break;
case "f":
_local3 = (((("f" + this.nextChar()) + this.nextChar()) + this.nextChar()) + this.nextChar());
if (_local3 == "false"){
_local1.type = JSONTokenType.FALSE;
_local1.value = false;
this.nextChar();
} else {
this.parseError(("Expecting 'false' but found " + _local3));
};
break;
case "n":
_local4 = ((("n" + this.nextChar()) + this.nextChar()) + this.nextChar());
if (_local4 == "null"){
_local1.type = JSONTokenType.NULL;
_local1.value = null;
this.nextChar();
} else {
this.parseError(("Expecting 'null' but found " + _local4));
};
break;
case "\"":
_local1 = this.readString();
break;
default:
if (((this.isDigit(this.ch)) || ((this.ch == "-")))){
_local1 = this.readNumber();
} else {
if (this.ch == ""){
return (null);
};
this.parseError((("Unexpected " + this.ch) + " encountered"));
};
};
return (_local1);
}
private function skipWhite():void{
while (this.isWhiteSpace(this.ch)) {
this.nextChar();
};
}
public function parseError(_arg1:String):void{
throw (new JSONParseError(_arg1, this.loc, this.jsonString));
}
private function isWhiteSpace(_arg1:String):Boolean{
return ((((((((_arg1 == " ")) || ((_arg1 == "\t")))) || ((_arg1 == "\n")))) || ((_arg1 == "\r"))));
}
private function skipIgnored():void{
var _local1:int;
do {
_local1 = this.loc;
this.skipWhite();
this.skipComments();
} while (_local1 != this.loc);
}
private function isHexDigit(_arg1:String):Boolean{
var _local2:String = _arg1.toUpperCase();
return (((this.isDigit(_arg1)) || ((((_local2 >= "A")) && ((_local2 <= "F"))))));
}
private function readNumber():JSONToken{
var _local1:JSONToken = new JSONToken();
_local1.type = JSONTokenType.NUMBER;
var _local2 = "";
if (this.ch == "-"){
_local2 = (_local2 + "-");
this.nextChar();
};
if (!this.isDigit(this.ch)){
this.parseError("Expecting a digit");
};
if (this.ch == "0"){
_local2 = (_local2 + this.ch);
this.nextChar();
if (this.isDigit(this.ch)){
this.parseError("A digit cannot immediately follow 0");
};
} else {
while (this.isDigit(this.ch)) {
_local2 = (_local2 + this.ch);
this.nextChar();
};
};
if (this.ch == "."){
_local2 = (_local2 + ".");
this.nextChar();
if (!this.isDigit(this.ch)){
this.parseError("Expecting a digit");
};
while (this.isDigit(this.ch)) {
_local2 = (_local2 + this.ch);
this.nextChar();
};
};
if ((((this.ch == "e")) || ((this.ch == "E")))){
_local2 = (_local2 + "e");
this.nextChar();
if ((((this.ch == "+")) || ((this.ch == "-")))){
_local2 = (_local2 + this.ch);
this.nextChar();
};
if (!this.isDigit(this.ch)){
this.parseError("Scientific notation number needs exponent value");
};
while (this.isDigit(this.ch)) {
_local2 = (_local2 + this.ch);
this.nextChar();
};
};
var _local3:Number = Number(_local2);
if (((isFinite(_local3)) && (!(isNaN(_local3))))){
_local1.value = _local3;
return (_local1);
};
this.parseError((("Number " + _local3) + " is not valid!"));
return (null);
}
}
}//package com.adobe.serialization.json
Section 34
//JSONTokenType (com.adobe.serialization.json.JSONTokenType)
package com.adobe.serialization.json {
public class JSONTokenType {
public static const NUMBER:int = 11;
public static const FALSE:int = 8;
public static const RIGHT_BRACKET:int = 4;
public static const NULL:int = 9;
public static const TRUE:int = 7;
public static const RIGHT_BRACE:int = 2;
public static const UNKNOWN:int = -1;
public static const COMMA:int = 0;
public static const LEFT_BRACKET:int = 3;
public static const STRING:int = 10;
public static const LEFT_BRACE:int = 1;
public static const COLON:int = 6;
}
}//package com.adobe.serialization.json
Section 35
//IntUtil (com.adobe.utils.IntUtil)
package com.adobe.utils {
public class IntUtil {
private static var hexChars:String = "0123456789abcdef";
public static function toHex(_arg1:int, _arg2:Boolean=false):String{
var _local4:int;
var _local5:int;
var _local3 = "";
if (_arg2){
_local4 = 0;
while (_local4 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15))));
_local4++;
};
} else {
_local5 = 0;
while (_local5 < 4) {
_local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15))));
_local5++;
};
};
return (_local3);
}
public static function ror(_arg1:int, _arg2:int):uint{
var _local3:int = (32 - _arg2);
return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3))));
}
public static function rol(_arg1:int, _arg2:int):int{
return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2))));
}
}
}//package com.adobe.utils
Section 36
//Level0 (com.mirosurabu.ExtremeGardening.Levels.Level0)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level0 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level0(){
Background = Level0_Background;
LevelData = Level0_LevelData;
super(Background, LevelData);
id = 0;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 37
//Level0_Background (com.mirosurabu.ExtremeGardening.Levels.Level0_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level0_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 38
//Level0_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level0_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level0_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 39
//Level1 (com.mirosurabu.ExtremeGardening.Levels.Level1)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level1 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level1(){
Background = Level1_Background;
LevelData = Level1_LevelData;
super(Background, LevelData);
id = 1;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 40
//Level1_Background (com.mirosurabu.ExtremeGardening.Levels.Level1_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level1_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 41
//Level1_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level1_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level1_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 42
//Level10 (com.mirosurabu.ExtremeGardening.Levels.Level10)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level10 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level10(){
Background = Level10_Background;
LevelData = Level10_LevelData;
super(Background, LevelData);
id = 10;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 43
//Level10_Background (com.mirosurabu.ExtremeGardening.Levels.Level10_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level10_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 44
//Level10_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level10_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level10_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 45
//Level11 (com.mirosurabu.ExtremeGardening.Levels.Level11)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level11 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level11(){
Background = Level11_Background;
LevelData = Level11_LevelData;
super(Background, LevelData);
id = 11;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 46
//Level11_Background (com.mirosurabu.ExtremeGardening.Levels.Level11_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level11_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 47
//Level11_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level11_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level11_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 48
//Level12 (com.mirosurabu.ExtremeGardening.Levels.Level12)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level12 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level12(){
Background = Level12_Background;
LevelData = Level12_LevelData;
super(Background, LevelData);
id = 12;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 49
//Level12_Background (com.mirosurabu.ExtremeGardening.Levels.Level12_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level12_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 50
//Level12_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level12_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level12_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 51
//Level13 (com.mirosurabu.ExtremeGardening.Levels.Level13)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level13 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level13(){
Background = Level13_Background;
LevelData = Level13_LevelData;
super(Background, LevelData);
id = 13;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 52
//Level13_Background (com.mirosurabu.ExtremeGardening.Levels.Level13_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level13_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 53
//Level13_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level13_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level13_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 54
//Level14 (com.mirosurabu.ExtremeGardening.Levels.Level14)
package com.mirosurabu.ExtremeGardening.Levels {
import com.adamatomic.flixel.*;
import com.mirosurabu.ExtremeGardening.*;
public class Level14 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level14(){
Background = Level14_Background;
LevelData = Level14_LevelData;
super(Background, LevelData);
id = 14;
}
override public function nextLevel():void{
FlxG.switchState(LevelWin);
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 55
//Level14_Background (com.mirosurabu.ExtremeGardening.Levels.Level14_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level14_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 56
//Level14_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level14_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level14_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 57
//Level2 (com.mirosurabu.ExtremeGardening.Levels.Level2)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level2 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level2(){
Background = Level2_Background;
LevelData = Level2_LevelData;
super(Background, LevelData);
id = 2;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 58
//Level2_Background (com.mirosurabu.ExtremeGardening.Levels.Level2_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level2_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 59
//Level2_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level2_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level2_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 60
//Level3 (com.mirosurabu.ExtremeGardening.Levels.Level3)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level3 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level3(){
Background = Level3_Background;
LevelData = Level3_LevelData;
super(Background, LevelData);
id = 3;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 61
//Level3_Background (com.mirosurabu.ExtremeGardening.Levels.Level3_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level3_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 62
//Level3_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level3_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level3_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 63
//Level4 (com.mirosurabu.ExtremeGardening.Levels.Level4)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level4 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level4(){
Background = Level4_Background;
LevelData = Level4_LevelData;
super(Background, LevelData);
id = 4;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 64
//Level4_Background (com.mirosurabu.ExtremeGardening.Levels.Level4_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level4_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 65
//Level4_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level4_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level4_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 66
//Level5 (com.mirosurabu.ExtremeGardening.Levels.Level5)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level5 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level5(){
Background = Level5_Background;
LevelData = Level5_LevelData;
super(Background, LevelData);
id = 5;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 67
//Level5_Background (com.mirosurabu.ExtremeGardening.Levels.Level5_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level5_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 68
//Level5_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level5_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level5_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 69
//Level6 (com.mirosurabu.ExtremeGardening.Levels.Level6)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level6 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level6(){
Background = Level6_Background;
LevelData = Level6_LevelData;
super(Background, LevelData);
id = 6;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 70
//Level6_Background (com.mirosurabu.ExtremeGardening.Levels.Level6_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level6_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 71
//Level6_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level6_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level6_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 72
//Level7 (com.mirosurabu.ExtremeGardening.Levels.Level7)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level7 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level7(){
Background = Level7_Background;
LevelData = Level7_LevelData;
super(Background, LevelData);
id = 7;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 73
//Level7_Background (com.mirosurabu.ExtremeGardening.Levels.Level7_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level7_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 74
//Level7_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level7_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level7_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 75
//Level8 (com.mirosurabu.ExtremeGardening.Levels.Level8)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level8 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level8(){
Background = Level8_Background;
LevelData = Level8_LevelData;
super(Background, LevelData);
id = 8;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 76
//Level8_Background (com.mirosurabu.ExtremeGardening.Levels.Level8_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level8_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 77
//Level8_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level8_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level8_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 78
//Level9 (com.mirosurabu.ExtremeGardening.Levels.Level9)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class Level9 extends LevelTemplate {
private var LevelData:Class;
private var Background:Class;
public function Level9(){
Background = Level9_Background;
LevelData = Level9_LevelData;
super(Background, LevelData);
id = 9;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 79
//Level9_Background (com.mirosurabu.ExtremeGardening.Levels.Level9_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level9_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 80
//Level9_LevelData (com.mirosurabu.ExtremeGardening.Levels.Level9_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class Level9_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 81
//LevelAllBronze (com.mirosurabu.ExtremeGardening.Levels.LevelAllBronze)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class LevelAllBronze extends LevelTemplate {
private var Background:Class;
private var LevelData:Class;
public function LevelAllBronze(){
Background = LevelAllBronze_Background;
LevelData = LevelAllBronze_LevelData;
super(Background, LevelData);
id = 15;
_headertext1.setText("MAKE ART!");
_headertext2.setText("");
_footer.btnMenu.visible = false;
_footer.btnRetry.visible = false;
}
override public function nextLevel():void{
removeListeners();
exittomenu = true;
}
override public function update():void{
super.update();
switch (state){
case "prepare":
_headertext1.setText("MAKE ART!");
_headertext2.setText("");
break;
case "success":
_headertext1.setText("SUCCESS");
_headertext2.setText("");
_headertext3.setText("");
break;
};
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 82
//LevelAllBronze_Background (com.mirosurabu.ExtremeGardening.Levels.LevelAllBronze_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class LevelAllBronze_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 83
//LevelAllBronze_LevelData (com.mirosurabu.ExtremeGardening.Levels.LevelAllBronze_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class LevelAllBronze_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 84
//LevelAllGold (com.mirosurabu.ExtremeGardening.Levels.LevelAllGold)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class LevelAllGold extends LevelTemplate {
private var Background:Class;
public function LevelAllGold(){
Background = LevelAllGold_Background;
super(Background);
state = "nothing";
id = 17;
_headertext1.setText("");
_headertext2.setText("");
_footer.btnMenu.visible = true;
_footer.btnRetry.visible = false;
_footer.btnNext.visible = false;
addChild(_footer);
}
override public function update():void{
super.update();
switch (state){
case "nothing":
break;
};
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 85
//LevelAllGold_Background (com.mirosurabu.ExtremeGardening.Levels.LevelAllGold_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class LevelAllGold_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 86
//LevelAllSilver (com.mirosurabu.ExtremeGardening.Levels.LevelAllSilver)
package com.mirosurabu.ExtremeGardening.Levels {
import com.adamatomic.flixel.*;
import com.mirosurabu.ExtremeGardening.*;
public class LevelAllSilver extends LevelTemplate {
public var points:Number;// = 0
public var timer:Number;// = 0
public var hard:Number;// = 1
private var Background:Class;
public var nextleaf:Number;// = 0
private var LevelData:Class;
public function LevelAllSilver(){
Background = LevelAllSilver_Background;
LevelData = LevelAllSilver_LevelData;
super(Background, LevelData);
id = 16;
_headertext1.setText("GET READY!");
_headertext2.setText("");
}
override public function update():void{
var _local1:Number;
var _local2:ShootLeaf;
var _local3:Number;
if (((FlxG.justPressed("ESC")) || (exittomenu))){
removeListeners();
FlxG.switchState(MainMenu);
};
if (FlxG.justPressed("R")){
gotoRetry();
};
switch (state){
case "prepare":
super.update();
_headertext1.setText("GET READY!");
_headertext2.setText("");
break;
case "play":
state = "none";
super.update();
state = "play";
timer = (timer + FlxG.elapsed);
if (timer >= nextleaf){
onStep();
};
if (FlxG.mouseClicked){
_local1 = 0;
while (_local1 < _leaves._children.length) {
_local2 = (_leaves._children[_local1] as ShootLeaf);
if (_local2.pointOverlap(mouseX, mouseY)){
_local3 = 0;
while (_local3 < 5) {
addParticle(new Blaadje(((_local2.x + (Math.random() * 20)) - 10), ((_local2.y + (Math.random() * 20)) - 10)));
_local3++;
};
points++;
_local2.erase();
};
_local1++;
};
};
_local1 = 0;
while (_local1 < _leaves._children.length) {
_local2 = (_leaves._children[_local1] as ShootLeaf);
if ((((_local2.velocity.y > 0)) && (((_local2.y - ((_local2.height / 2) * _local2.scale.y)) > 320)))){
_local2.erase();
state = "gameover";
_footer.btnNext.visible = false;
break;
};
_local1++;
};
_headertext1.setText(("SCORE: " + String(points)));
_headertext2.setText("");
_headertext3.setText("");
_midtext.setText("");
_footertext.setText("");
break;
case "gameover":
super.update();
Global.leveldata[id].tries++;
state = "goreal";
_headertext1.setText("GAME OVER");
_headertext2.setText(("SCORE: " + String(points)));
_headertext3.setText("");
score = points;
if (score >= Global.leveldata[id].goal){
addChild(_footer);
if (score >= Global.leveldata[id].goal3){
if (Global.leveldata[id].best < score){
Global.leveldata[id].best = score;
Global.leveldata[id].medal = "gold";
};
_medaltext1.setText("GOOOOOOLD!");
medal = new Gold();
} else {
if (score >= Global.leveldata[id].goal2){
if (Global.leveldata[id].best < score){
Global.leveldata[id].best = score;
Global.leveldata[id].medal = "silver";
};
_medaltext1.setText("BAM! SILVER");
medal = new Silver();
} else {
if (Global.leveldata[id].best <= score){
Global.leveldata[id].best = score;
Global.leveldata[id].medal = "bronze";
};
_medaltext1.setText("BRONZE");
medal = new Bronze();
};
};
medal.scaleX = medalzoom;
medal.scaleY = medalzoom;
medal.x = 160;
medal.y = 140;
addChild(medal);
};
Global.saveShared();
break;
case "goreal":
if (medalzoom > 5){
medalzoom = (medalzoom - (FlxG.elapsed * 600));
} else {
medalzoom = 5;
};
medalangle = (medalangle + ((0.02 * 60) * FlxG.elapsed));
medal.scaleX = medalzoom;
medal.scaleY = medalzoom;
medal.rotation = (Math.sin(medalangle) * 20);
break;
default:
super.update();
break;
};
_leaves.removeInactive();
_strokes.removeInactive();
}
override public function gotoRetry():void{
removeListeners();
FlxG.switchState(LevelAllSilver);
}
private function onStep():void{
var _local3:ShootLeaf;
timer = (timer - nextleaf);
var _local1:int = (Math.random() * hard);
var _local2:Number = 0;
while (_local2 < _local1) {
_local3 = new ShootLeaf(((Math.random() * 220) + 50), (320 + 15));
_leaves.add(_local3);
_local2++;
};
if (hard < 20){
hard = (hard + 0.05);
};
nextleaf = (((60 - (hard / 2)) * 1) / 60);
}
override public function nextLevel():void{
removeListeners();
exittomenu = true;
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 87
//LevelAllSilver_Background (com.mirosurabu.ExtremeGardening.Levels.LevelAllSilver_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class LevelAllSilver_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 88
//LevelAllSilver_LevelData (com.mirosurabu.ExtremeGardening.Levels.LevelAllSilver_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class LevelAllSilver_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 89
//LevelWin (com.mirosurabu.ExtremeGardening.Levels.LevelWin)
package com.mirosurabu.ExtremeGardening.Levels {
import com.mirosurabu.ExtremeGardening.*;
public class LevelWin extends LevelTemplate {
private var Background:Class;
private var LevelData:Class;
public function LevelWin(){
Background = LevelWin_Background;
LevelData = LevelWin_LevelData;
super(Background, LevelData);
state = "win";
_headertext1.setText("");
addChild(_footer);
_footer.btnMenu.visible = false;
_footer.btnRetry.visible = false;
}
override public function nextLevel():void{
removeListeners();
exittomenu = true;
}
override public function update():void{
super.update();
switch (state){
case "win":
break;
};
}
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 90
//LevelWin_Background (com.mirosurabu.ExtremeGardening.Levels.LevelWin_Background)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class LevelWin_Background extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 91
//LevelWin_LevelData (com.mirosurabu.ExtremeGardening.Levels.LevelWin_LevelData)
package com.mirosurabu.ExtremeGardening.Levels {
import mx.core.*;
public class LevelWin_LevelData extends ByteArrayAsset {
}
}//package com.mirosurabu.ExtremeGardening.Levels
Section 92
//Blaadje (com.mirosurabu.ExtremeGardening.Blaadje)
package com.mirosurabu.ExtremeGardening {
import com.adamatomic.flixel.*;
public class Blaadje extends FlxSprite {
private var ImgBlaadje2:Class;
private var ImgBlaadje3:Class;
private var ImgBlaadje1:Class;
public var acc:Number;// = 0
public var speed:Number;
public var angleadd:Number;
public var direction:Number;
private static const FRICTION:Number = 540;
public function Blaadje(_arg1:Number, _arg2:Number){
ImgBlaadje1 = Blaadje_ImgBlaadje1;
ImgBlaadje2 = Blaadje_ImgBlaadje2;
ImgBlaadje3 = Blaadje_ImgBlaadje3;
angleadd = ((Math.random() * 20) - 10);
super(this[("ImgBlaadje" + String(int(((Math.random() * 3) + 1))))], _arg1, _arg2);
direction = (Math.random() * 360);
speed = (Math.random() * 200);
acceleration.y = 600;
}
public function motionAdd(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local3 = (Math.cos(((direction * Math.PI) / 180)) * speed);
_local4 = (Math.sin(((direction * Math.PI) / 180)) * speed);
_local5 = (Math.cos(((_arg1 * Math.PI) / 180)) * _arg2);
_local6 = (Math.sin(((_arg1 * Math.PI) / 180)) * _arg2);
_local7 = (_local3 + _local5);
_local8 = (_local4 + _local6);
speed = Math.sqrt(((_local7 * _local7) + (_local8 * _local8)));
direction = ((Math.atan2(_local8, _local7) * 180) / Math.PI);
}
public function step():void{
angle = (angle + angleadd);
direction = (direction + (Math.sin((angle * 90)) * 2));
}
override public function update():void{
if ((((((((x > 330)) || ((x < -10)))) || ((y > 330)))) || ((y < -10)))){
active = false;
};
computeVelocity();
super.update();
decomputeVelocity();
acc = (acc + FlxG.elapsed);
while (acc > (1 / 60)) {
step();
acc = (acc - (1 / 60));
};
}
public function computeVelocity():void{
velocity.x = (speed * Math.cos(((direction * Math.PI) / 180)));
velocity.y = (speed * Math.sin(((direction * Math.PI) / 180)));
}
public function decomputeVelocity():void{
var _local1:Number = velocity.x;
var _local2:Number = velocity.y;
speed = Math.sqrt(((_local1 * _local1) + (_local2 * _local2)));
direction = ((Math.atan2(_local2, _local1) * 180) / Math.PI);
}
}
}//package com.mirosurabu.ExtremeGardening
Section 93
//Blaadje_ImgBlaadje1 (com.mirosurabu.ExtremeGardening.Blaadje_ImgBlaadje1)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class Blaadje_ImgBlaadje1 extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 94
//Blaadje_ImgBlaadje2 (com.mirosurabu.ExtremeGardening.Blaadje_ImgBlaadje2)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class Blaadje_ImgBlaadje2 extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 95
//Blaadje_ImgBlaadje3 (com.mirosurabu.ExtremeGardening.Blaadje_ImgBlaadje3)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class Blaadje_ImgBlaadje3 extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 96
//Global (com.mirosurabu.ExtremeGardening.Global)
package com.mirosurabu.ExtremeGardening {
import com.adamatomic.flixel.*;
import flash.net.*;
public class Global extends FlxG {
public static const LEVELCOUNT:Number = 15;
public static const HIGHSCORES_URL:String = "";
public static const MUSIC_VOLUME = 0.3;
public static const GAME_TITLE:String = "ExtremeGardeningNewgrounds";
public static const MOREGAMES_URL:String = "";
public static const VERSION:String = "1.04";
public static var allgold:Boolean = false;
public static var firstbronze:Boolean = false;
public static var firstgold:Boolean = false;
public static var sunsetarea:Boolean = false;
public static var nightarea:Boolean = false;
public static var dayarea:Boolean = false;
public static var leveldata:FlxArray;
public static var allsilver:Boolean = false;
public static var volumeon:Boolean = true;
public static var allbronze:Boolean = false;
public static var firstsilver:Boolean = false;
public static function loadShared():void{
var _local2:Number;
var _local1:SharedObject = SharedObject.getLocal((GAME_TITLE + VERSION));
if (_local1.data.exists != undefined){
_local2 = 0;
while (_local2 < (LEVELCOUNT + 3)) {
leveldata[_local2] = _local1.data.leveldata[_local2];
_local2++;
};
volumeon = _local1.data.volumeon;
allbronze = _local1.data.allbronze;
allsilver = _local1.data.allsilver;
allgold = _local1.data.allgold;
firstbronze = _local1.data.firstbronze;
firstsilver = _local1.data.firstsilver;
firstgold = _local1.data.firstgold;
dayarea = _local1.data.dayarea;
sunsetarea = _local1.data.sunsetarea;
nightarea = _local1.data.nightarea;
};
_local1.close();
}
public static function allsilvers():Boolean{
var _local1:Boolean;
var _local2:Number = 0;
while (_local2 < LEVELCOUNT) {
_local1 = ((_local1) && ((((leveldata[_local2].medal == "silver")) || ((leveldata[_local2].medal == "gold")))));
if (!_local1){
break;
};
_local2++;
};
return (_local1);
}
public static function saveShared():void{
var _local1:SharedObject = SharedObject.getLocal((GAME_TITLE + VERSION));
_local1.data.exists = true;
_local1.data.leveldata = leveldata;
_local1.data.volumeon = volumeon;
_local1.data.firstbronze = firstbronze;
_local1.data.firstsilver = firstsilver;
_local1.data.firstgold = firstgold;
_local1.data.dayarea = dayarea;
_local1.data.sunsetarea = sunsetarea;
_local1.data.nightarea = nightarea;
_local1.data.allbronze = allbronze;
_local1.data.allsilver = allsilver;
_local1.data.allgold = allgold;
_local1.flush();
_local1.close();
}
public static function loadDefault():void{
leveldata = new FlxArray();
var _local1:Number = 0;
while (_local1 < (LEVELCOUNT + 3)) {
leveldata.add(new LevelData());
_local1++;
};
leveldata[0].medal = "green";
leveldata[0].name = "introduction";
leveldata[0].goal = 75;
leveldata[0].goal2 = 90;
leveldata[0].goal3 = 100;
leveldata[1].name = "basics";
leveldata[1].goal = 80;
leveldata[1].goal2 = 90;
leveldata[1].goal3 = 99;
leveldata[2].name = "hoop";
leveldata[2].goal = 70;
leveldata[2].goal2 = 85;
leveldata[2].goal3 = 100;
leveldata[3].name = "treesome";
leveldata[3].goal = 80;
leveldata[3].goal2 = 90;
leveldata[3].goal3 = 100;
leveldata[4].name = "horticulture";
leveldata[4].goal = 70;
leveldata[4].goal2 = 90;
leveldata[4].goal3 = 99;
leveldata[5].name = "nouvelle vague";
leveldata[5].goal = 85;
leveldata[5].goal2 = 95;
leveldata[5].goal3 = 99;
leveldata[6].name = "the man";
leveldata[6].goal = 70;
leveldata[6].goal2 = 80;
leveldata[6].goal3 = 99;
leveldata[7].name = "what?";
leveldata[7].goal = 80;
leveldata[7].goal2 = 90;
leveldata[7].goal3 = 100;
leveldata[8].name = "connection";
leveldata[8].goal = 90;
leveldata[8].goal2 = 95;
leveldata[8].goal3 = 99;
leveldata[9].name = "perfection";
leveldata[9].goal = 90;
leveldata[9].goal2 = 95;
leveldata[9].goal3 = 99;
leveldata[10].name = "grrrrrr";
leveldata[10].goal = 85;
leveldata[10].goal2 = 90;
leveldata[10].goal3 = 95;
leveldata[11].name = "forest";
leveldata[11].goal = 90;
leveldata[11].goal2 = 95;
leveldata[11].goal3 = 99;
leveldata[12].name = "a classic";
leveldata[12].goal = 80;
leveldata[12].goal2 = 90;
leveldata[12].goal3 = 95;
leveldata[13].name = "masterpiece";
leveldata[13].goal = 70;
leveldata[13].goal2 = 80;
leveldata[13].goal3 = 90;
leveldata[14].name = "future art";
leveldata[14].goal = 90;
leveldata[14].goal2 = 95;
leveldata[14].goal3 = 100;
leveldata[15].name = "freestyle";
leveldata[15].medal = "none";
leveldata[15].goal = 0;
leveldata[15].goal2 = 0;
leveldata[15].goal3 = 0;
leveldata[16].name = "evil tree";
leveldata[16].medal = "none";
leveldata[16].goal = 0;
leveldata[16].goal2 = 10;
leveldata[16].goal3 = 20;
leveldata[17].name = "a message";
leveldata[17].medal = "none";
leveldata[17].goal = 0;
leveldata[17].goal2 = 10;
leveldata[17].goal3 = 20;
}
public static function allbronzes():Boolean{
var _local1:Boolean;
var _local2:Number = 0;
while (_local2 < LEVELCOUNT) {
_local1 = ((((_local1) && (!((leveldata[_local2].medal == "none"))))) && (!((leveldata[_local2].medal == "green"))));
if (!_local1){
break;
};
_local2++;
};
return (_local1);
}
public static function allgolds():Boolean{
var _local1:Boolean;
var _local2:Number = 0;
while (_local2 < LEVELCOUNT) {
_local1 = ((_local1) && ((leveldata[_local2].medal == "gold")));
if (!_local1){
break;
};
_local2++;
};
return (_local1);
}
public static function angleTowards(_arg1:FlxCore, _arg2:FlxCore):Number{
return (((Math.atan2((_arg2.y - _arg1.y), (_arg2.x - _arg1.x)) * 180) / Math.PI));
}
public static function configureKeys():void{
FlxG.AddKey(37, "LEFT");
FlxG.AddKey(38, "UP");
FlxG.AddKey(39, "RIGHT");
FlxG.AddKey(40, "DOWN");
FlxG.AddKey(90, "FIRE");
FlxG.AddKey(65, "A");
FlxG.AddKey(83, "S");
FlxG.AddKey(68, "D");
FlxG.AddKey(87, "W");
FlxG.AddKey(77, "M");
FlxG.AddKey(80, "P");
FlxG.AddKey(82, "R");
FlxG.AddKey(32, "Z");
FlxG.AddKey(13, "ENTER");
FlxG.AddKey(27, "ESC");
}
}
}//package com.mirosurabu.ExtremeGardening
Section 97
//JWSplash (com.mirosurabu.ExtremeGardening.JWSplash)
package com.mirosurabu.ExtremeGardening {
public class JWSplash extends SplashPage {
public var sc:SlordigClip;
private var ImgSplash:Class;
public function JWSplash(){
ImgSplash = JWSplash_ImgSplash;
super(null, MiroSplash, "http://www.slordig.com/?ref=NGgardeningsplash", 0.25, 1.5);
sc = new SlordigClip();
sc.mouseEnabled = false;
sc.x = (320 - sc.width);
sc.y = 100;
addChild(sc);
}
}
}//package com.mirosurabu.ExtremeGardening
Section 98
//JWSplash_ImgSplash (com.mirosurabu.ExtremeGardening.JWSplash_ImgSplash)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class JWSplash_ImgSplash extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 99
//Leaf (com.mirosurabu.ExtremeGardening.Leaf)
package com.mirosurabu.ExtremeGardening {
import flash.display.*;
import flash.geom.*;
import com.adamatomic.flixel.*;
public class Leaf extends FlxSprite {
private var ImgLeaf:Class;
protected var _back:FlxSprite;
private var ImgLeafback:Class;
private var bitmap:BitmapData;
public var fake:Boolean;// = false
public function Leaf(_arg1:Number, _arg2:Number){
ImgLeaf = Leaf_ImgLeaf;
ImgLeafback = Leaf_ImgLeafback;
bitmap = new BitmapData(320, 320);
super(ImgLeaf, (_arg1 + 10), (_arg2 + 10));
visible = false;
offset.x = (width / 2);
offset.y = (height / 2);
angle = (Math.random() * 360);
scale.x = (1 + (Math.random() * 0.5));
scale.y = scale.x;
_back = new FlxSprite(ImgLeafback, x, y);
_back.offset.x = offset.x;
_back.offset.y = offset.y;
_back.angle = angle;
_back.scale.x = (1.2 * scale.x);
_back.scale.y = (1.2 * scale.y);
_back.visible = false;
(FlxG.state as LevelTemplate).addStroke(_back);
}
public function cut():void{
if (!active){
return;
};
var _local1:Number = FlxG.mouse.x;
var _local2:Number = FlxG.mouse.y;
var _local3:Number = (x - (offset.x * scale.x));
var _local4:Number = (y - (offset.y * scale.y));
if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){
_local3 = (_local3 - Math.floor((FlxG.scroll.x * scrollFactor.x)));
_local4 = (_local4 - Math.floor((FlxG.scroll.y * scrollFactor.y)));
};
if ((((((((_local1 <= _local3)) || ((_local1 >= (_local3 + (width * scale.x)))))) || ((_local2 <= _local4)))) || ((_local2 >= (_local4 + (height * scale.y)))))){
return;
};
if (!fake){
(FlxG.state as LevelTemplate).mistakes++;
};
var _local5:Number = 0;
while (_local5 < 3) {
(FlxG.state as LevelTemplate).addParticle(new Blaadje(((x + (Math.random() * 20)) - 10), ((y + (Math.random() * 20)) - 10)));
_local5++;
};
active = false;
visible = false;
_back.active = false;
_back.visible = false;
}
public function mousePixelOverlap():Boolean{
var _local2:Boolean;
bitmap.fillRect(new Rectangle(0, 0, 320, 320), 0);
var _local1:Matrix = new Matrix();
var _local3:Number = (Math.floor((x - offset.x)) + Math.floor((FlxG.scroll.x * scrollFactor.x)));
var _local4:Number = (Math.floor((y - offset.y)) + Math.floor((FlxG.scroll.y * scrollFactor.y)));
_local1.translate(-(offset.x), -(offset.y));
_local1.scale(scale.x, scale.y);
if (angle != 0){
_local1.rotate(((Math.PI * 2) * (angle / 360)));
};
_local1.translate((_local3 + offset.x), (_local4 + offset.y));
bitmap.draw(_pixels, _local1);
_local2 = ((bitmap.getPixel(FlxG.mouse.x, FlxG.mouse.y) << 24) > 0);
return (_local2);
}
override public function update():void{
super.update();
visible = ((!(fake)) || (!(((FlxG.state as LevelTemplate).state == "prepare"))));
_back.visible = visible;
}
}
}//package com.mirosurabu.ExtremeGardening
Section 100
//Leaf_ImgLeaf (com.mirosurabu.ExtremeGardening.Leaf_ImgLeaf)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class Leaf_ImgLeaf extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 101
//Leaf_ImgLeafback (com.mirosurabu.ExtremeGardening.Leaf_ImgLeafback)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class Leaf_ImgLeafback extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 102
//LevelData (com.mirosurabu.ExtremeGardening.LevelData)
package com.mirosurabu.ExtremeGardening {
public class LevelData {
public var goal3:Number;
public var best:Number;// = 0
public var name:String;
public var goal:Number;
public var medal:String;// = "none"
public var tries:Number;// = 0
public var goal2:Number;
}
}//package com.mirosurabu.ExtremeGardening
Section 103
//LevelFooter (com.mirosurabu.ExtremeGardening.LevelFooter)
package com.mirosurabu.ExtremeGardening {
public class LevelFooter extends LevelButtons {
public var level:LevelTemplate;
public function LevelFooter(_arg1:LevelTemplate){
level = _arg1;
}
}
}//package com.mirosurabu.ExtremeGardening
Section 104
//LevelTemplate (com.mirosurabu.ExtremeGardening.LevelTemplate)
package com.mirosurabu.ExtremeGardening {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import com.adamatomic.flixel.*;
import flash.utils.*;
import com.mirosurabu.ExtremeGardening.Levels.*;
import com.newgrounds.*;
public class LevelTemplate extends FlxState {
public const MEDALZOOMSPEED:Number = 600;
public const MEDALANGLESPEED:Number = 0.02;
public var id:Number;
private var _particles:FlxLayer;
public var medalangle:Number;// = 0
public var MyDummy03:Level3;
public var MyDummy04:Level4;
public var MyDummy05:Level5;
public var MyDummy06:Level6;
public var MyDummy00:Level0;
public var total:Number;// = 0
public var MyDummy02:Level2;
public var medalzoom:Number;// = 104
public var MyDummy08:Level8;
public var MyDummy01:Level1;
public var _midtext:OutlinedText;
public var MyDummy07:Level7;
public var MyDummy09:Level9;
public var MyDummy10:Level10;
public var MyDummy11:Level11;
private var _prepareTimer:Number;// = 4
public var MyDummy13:Level13;
public var MyDummy14:Level14;
public var MyDummy15:LevelAllBronze;
public var MyDummy16:LevelAllSilver;
public var MyDummy17:LevelAllGold;
public var MyDummy12:Level12;
public var map:Array;
public var _headertext2:OutlinedText;
public var _headertext1:OutlinedText;
public var _headertext3:OutlinedText;
public var state:String;// = "prepare"
public var score:int;
public var _medaltext1:OutlinedText;
public var _medaltext2:OutlinedText;
protected var _leaves:FlxLayer;
public var _footer:LevelFooter;
private var _stams:FlxLayer;
public var mistakes:Number;// = 0
private var _bg:FlxSprite;
public var _footertext:OutlinedText;
private var _playTimer:Number;// = 10
protected var _strokes:FlxLayer;
public var medal:DisplayObject;
public var exittomenu:Boolean;// = false
public function LevelTemplate(_arg1:Class, _arg2:Class=null){
map = new Array();
super();
_bg = new FlxSprite(_arg1);
_strokes = new FlxLayer();
_leaves = new FlxLayer();
_stams = new FlxLayer();
_particles = new FlxLayer();
_headertext1 = new OutlinedText("MAKE THIS", 0, -10, "center");
_headertext2 = new OutlinedText("", 0, 10, "center");
_headertext3 = new OutlinedText("", 0, 30, "center");
_midtext = new OutlinedText("", 0, 140, "center");
_footertext = new OutlinedText("", 0, 280, "center");
_medaltext1 = new OutlinedText("", 0, 200, "center");
_medaltext2 = new OutlinedText("", 0, 240, "center");
_footer = new LevelFooter(this);
_footer.btnMenu.addEventListener(MouseEvent.CLICK, onMenu);
_footer.btnNext.addEventListener(MouseEvent.CLICK, onNext);
_footer.btnRetry.addEventListener(MouseEvent.CLICK, onRetry);
add(_bg);
add(_strokes);
add(_stams);
add(_leaves);
add(_particles);
addChild(_headertext1);
addChild(_headertext2);
addChild(_headertext3);
addChild(_midtext);
addChild(_footertext);
addChild(_medaltext1);
addChild(_medaltext2);
if (_arg2 != null){
loadLevel(_arg2);
};
}
public function countFake():Number{
var _local1:Number = 0;
var _local2:Number = 0;
while (_local2 < _leaves._children.length) {
if (!_leaves._children[_local2].active){
} else {
if ((_leaves._children[_local2] as Leaf).fake){
_local1++;
};
};
_local2++;
};
return (_local1);
}
public function gotoRetry():void{
removeListeners();
FlxG.switchState((getDefinitionByName(("com.mirosurabu.ExtremeGardening.Levels.Level" + String(id))) as Class));
}
private function onRetry(_arg1:MouseEvent):void{
_footer.level.gotoRetry();
}
public function prevLevel():void{
}
public function removeListeners():void{
_footer.btnMenu.removeEventListener(MouseEvent.CLICK, onMenu);
_footer.btnNext.removeEventListener(MouseEvent.CLICK, onNext);
_footer.btnRetry.removeEventListener(MouseEvent.CLICK, onRetry);
}
public function addStroke(_arg1:FlxSprite):void{
_strokes.add(_arg1);
}
public function loadLevel(_arg1:Class):void{
var _local4:Number;
var _local5:Number;
var _local6:Leaf;
var _local7:Stam;
var _local2:ByteArrayAsset = ByteArrayAsset(new (_arg1));
var _local3:Number = 0;
while (_local3 < 16) {
map.push(new Array());
_local4 = 0;
while (_local4 < 16) {
map[_local3].push(null);
_local5 = (_local2.readByte() - 48);
if ((((_local5 == 2)) || ((_local5 == 1)))){
_local6 = new Leaf((_local4 * 20), (_local3 * 20));
_local6.fake = (_local5 == 1);
_local6.visible = !(_local6.fake);
_leaves.add(_local6);
map[_local3][_local4] = _local6;
total++;
};
if (_local5 == 3){
_local7 = new Stam((_local4 * 20), (_local3 * 20));
_stams.add(_local7);
};
_local4++;
};
_local2.readByte();
_local2.readByte();
_local3++;
};
}
public function addParticle(_arg1:FlxSprite):void{
_particles.add(_arg1);
}
public function nextLevel():void{
removeListeners();
FlxG.switchState(Class(getDefinitionByName(("com.mirosurabu.ExtremeGardening.Levels.Level" + String((id + 1))))));
}
public function gotoMenu():void{
removeListeners();
exittomenu = true;
}
private function onNext(_arg1:MouseEvent):void{
_footer.level.nextLevel();
}
override public function update():void{
var _local1:int;
var _local2:int;
var _local3:Boolean;
var _local4:Boolean;
var _local5:Boolean;
var _local6:Boolean;
var _local7:Leaf;
var _local8:Leaf;
var _local9:Leaf;
var _local10:Leaf;
var _local11:Leaf;
var _local12:Leaf;
var _local13:Leaf;
var _local14:Leaf;
var _local15:Leaf;
super.update();
if (FlxG.justPressed("R")){
gotoRetry();
};
if (((FlxG.justPressed("ESC")) || (exittomenu))){
removeListeners();
FlxG.switchState(MainMenu);
};
switch (state){
case "artprepare":
_prepareTimer = (_prepareTimer - FlxG.elapsed);
if (_prepareTimer > 1){
_midtext.setText(String(int(_prepareTimer)));
};
if (_prepareTimer < 1){
_midtext.setText("GO!");
};
if (_prepareTimer <= 0){
state = "play";
};
break;
case "prepare":
_prepareTimer = (_prepareTimer - FlxG.elapsed);
if (_prepareTimer > 1){
_midtext.setText(String(int(_prepareTimer)));
};
if (_prepareTimer < 1){
_midtext.setText("GO!");
};
if (_prepareTimer <= 0){
state = "play";
};
_headertext2.setText((("GOAL: " + String(Global.leveldata[id].goal)) + "%"));
_footertext.setText(Global.leveldata[id].name);
break;
case "play":
_playTimer = (_playTimer - FlxG.elapsed);
_headertext1.setText("CUT!");
_headertext2.setText(String(int(_playTimer)));
_midtext.setText("");
if (_playTimer <= 0){
Global.leveldata[id].tries++;
mistakes = (mistakes + countFake());
score = (100 - ((mistakes / total) * 100));
_headertext1.setText((String(score) + "%"));
_headertext3.setText((("GOAL: " + String(Global.leveldata[id].goal)) + "%"));
_footertext.setText("");
if (id == 4){
Global.dayarea = true;
API.unlockMedal("Day area");
};
if (id == 9){
Global.sunsetarea = true;
API.unlockMedal("Sunset area");
};
if (id == 14){
Global.nightarea = true;
API.unlockMedal("Night area");
};
if (score >= Global.leveldata[id].goal){
state = "success";
_headertext2.setText("SUCCESS");
addChild(_footer);
if (score >= Global.leveldata[id].goal3){
if (Global.leveldata[id].best < score){
Global.leveldata[id].best = score;
Global.leveldata[id].medal = "gold";
if (id < (Global.LEVELCOUNT - 1)){
if (Global.leveldata[(id + 1)].medal == "none"){
Global.leveldata[(id + 1)].medal = "green";
};
};
};
_medaltext1.setText("GOOOOOOLD!");
medal = new Gold();
API.unlockMedal("1st Gold");
} else {
if (score >= Global.leveldata[id].goal2){
if (Global.leveldata[id].best < score){
Global.leveldata[id].best = score;
Global.leveldata[id].medal = "silver";
if (id < (Global.LEVELCOUNT - 1)){
if (Global.leveldata[(id + 1)].medal == "none"){
Global.leveldata[(id + 1)].medal = "green";
};
};
};
_medaltext1.setText("BAM! SILVER");
medal = new Silver();
API.unlockMedal("1st Silver");
} else {
if (Global.leveldata[id].best < score){
Global.leveldata[id].best = score;
Global.leveldata[id].medal = "bronze";
if (id < (Global.LEVELCOUNT - 1)){
if (Global.leveldata[(id + 1)].medal == "none"){
Global.leveldata[(id + 1)].medal = "green";
};
};
};
_medaltext1.setText("BRONZE");
medal = new Bronze();
API.unlockMedal("1st Bronze");
};
};
medal.scaleX = medalzoom;
medal.scaleY = medalzoom;
medal.x = 160;
medal.y = 140;
addChild(medal);
} else {
state = "failure";
_headertext2.setText("FAILURE");
addChild(_footer);
_footer.btnNext.visible = false;
};
Global.saveShared();
};
_local1 = (FlxG.mouse.x / 20);
_local2 = (FlxG.mouse.y / 20);
_local3 = (_local1 > 0);
_local4 = (_local1 < 15);
_local5 = (_local2 > 0);
_local6 = (_local2 < 15);
if (((((((((FlxG.kMouse) && ((_local1 >= 0)))) && ((_local1 < 16)))) && ((_local2 >= 0)))) && ((_local2 < 16)))){
_local7 = (((_local5) && (_local3))) ? map[(_local2 - 1)][(_local1 - 1)] : null;
_local8 = (_local5) ? map[(_local2 - 1)][_local1] : null;
_local9 = (((_local5) && (_local4))) ? map[(_local2 - 1)][(_local1 + 1)] : null;
_local10 = (_local3) ? map[_local2][(_local1 - 1)] : null;
_local11 = map[_local2][_local1];
_local12 = (_local4) ? map[_local2][(_local1 + 1)] : null;
_local13 = (((_local6) && (_local3))) ? map[(_local2 + 1)][(_local1 - 1)] : null;
_local14 = (_local6) ? map[(_local2 + 1)][_local1] : null;
_local15 = (((_local6) && (_local4))) ? map[(_local2 + 1)][(_local1 + 1)] : null;
if (_local7){
_local7.cut();
};
if (_local8){
_local8.cut();
};
if (_local9){
_local9.cut();
};
if (_local10){
_local10.cut();
};
if (_local11){
_local11.cut();
};
if (_local12){
_local12.cut();
};
if (_local13){
_local13.cut();
};
if (_local14){
_local14.cut();
};
if (_local15){
_local15.cut();
};
};
break;
case "success":
if (medalzoom > 5){
medalzoom = (medalzoom - (FlxG.elapsed * 600));
} else {
medalzoom = 5;
};
medalangle = (medalangle + ((0.02 * 60) * FlxG.elapsed));
medal.scaleX = medalzoom;
medal.scaleY = medalzoom;
medal.rotation = (Math.sin(medalangle) * 20);
break;
case "failure":
break;
};
_particles.removeInactive();
}
private function onMenu(_arg1:MouseEvent):void{
_footer.level.gotoMenu();
}
}
}//package com.mirosurabu.ExtremeGardening
Section 105
//MainMenu (com.mirosurabu.ExtremeGardening.MainMenu)
package com.mirosurabu.ExtremeGardening {
import flash.events.*;
import flash.display.*;
import com.adamatomic.flixel.*;
import flash.utils.*;
import com.mirosurabu.ExtremeGardening.Levels.*;
import com.newgrounds.*;
public class MainMenu extends FlxState {
private var _textExtreme:OutlinedText;
private var _textLevelName:OutlinedText;
private var ImgBg:Class;
private var _buttons:MenuButtons;
private var _stams:FlxLayer;
private var _textBest:OutlinedText;
private var _textGardening:OutlinedText;
private var _bg:FlxSprite;
private var _textTries:OutlinedText;
private var _current:Number;// = -1
private var _strokes:FlxLayer;
public function MainMenu(){
var _local2:String;
ImgBg = MainMenu_ImgBg;
super();
_bg = new FlxSprite(ImgBg);
_textExtreme = new OutlinedText("EXTREME", 0, 0, "center");
_textGardening = new OutlinedText("GARDENING", 0, 27, "center");
_textLevelName = new OutlinedText("", 0, 63, "center");
_textBest = new OutlinedText("", 0, 238, "center");
_textTries = new OutlinedText("", 0, 258, "center");
_strokes = new FlxLayer();
createStams();
_buttons = new MenuButtons();
var _local1:Number = 0;
while (_local1 < 15) {
_local2 = ("lvl" + String(_local1));
_buttons[_local2].mcBlack.visible = false;
_buttons[_local2].mcGreen.visible = false;
_buttons[_local2].mcBronze.visible = false;
_buttons[_local2].mcSilver.visible = false;
_buttons[_local2].mcGold.visible = false;
if (Global.leveldata[_local1].medal == "none"){
_buttons[_local2].mcBlack.visible = true;
};
if (Global.leveldata[_local1].medal == "green"){
_buttons[_local2].mcGreen.visible = true;
};
if (Global.leveldata[_local1].medal == "bronze"){
_buttons[_local2].mcBronze.visible = true;
};
if (Global.leveldata[_local1].medal == "silver"){
_buttons[_local2].mcSilver.visible = true;
};
if (Global.leveldata[_local1].medal == "gold"){
_buttons[_local2].mcGold.visible = true;
};
_buttons[_local2].addEventListener(MouseEvent.ROLL_OVER, onMouseOverButton);
_buttons[_local2].addEventListener(MouseEvent.ROLL_OUT, onMouseOutButton);
_buttons[_local2].addEventListener(MouseEvent.CLICK, onMouseClickButton);
_local1++;
};
if (((Global.allbronzes()) && (!(Global.allbronze)))){
API.unlockMedal("All Bronzes");
Global.allbronze = true;
Global.saveShared();
};
if (((Global.allsilvers()) && (!(Global.allsilver)))){
API.unlockMedal("All Silvers");
Global.allsilver = true;
Global.saveShared();
};
if (((Global.allgolds()) && (!(Global.allgold)))){
API.unlockMedal("All Golds");
Global.allgold = true;
Global.saveShared();
};
if (((Global.allbronzes()) && ((Global.leveldata[15].medal == "none")))){
Global.leveldata[15].medal = "green";
};
if (((Global.allsilvers()) && ((Global.leveldata[16].medal == "none")))){
Global.leveldata[16].medal = "green";
};
if (((Global.allgolds()) && ((Global.leveldata[17].medal == "none")))){
Global.leveldata[17].medal = "green";
};
_buttons.lvl15.visible = Global.allbronzes();
_buttons.lvl16.visible = Global.allsilvers();
_buttons.lvl17.visible = Global.allgolds();
setMedal(_buttons.lvl15, 15);
setMedal(_buttons.lvl16, 16);
setMedal(_buttons.lvl17, 17);
_buttons.lvl15.addEventListener(MouseEvent.CLICK, onLevel15);
_buttons.lvl15.addEventListener(MouseEvent.ROLL_OUT, onMouseOutButton);
_buttons.lvl15.addEventListener(MouseEvent.ROLL_OVER, onAllBronzesOver);
_buttons.lvl16.addEventListener(MouseEvent.CLICK, onLevel16);
_buttons.lvl16.addEventListener(MouseEvent.ROLL_OUT, onMouseOutButton);
_buttons.lvl16.addEventListener(MouseEvent.ROLL_OVER, onAllSilversOver);
_buttons.lvl17.addEventListener(MouseEvent.CLICK, onLevel17);
_buttons.lvl17.addEventListener(MouseEvent.ROLL_OUT, onMouseOutButton);
_buttons.lvl17.addEventListener(MouseEvent.ROLL_OVER, onAllGoldsOver);
_buttons.mcMuter.addEventListener(MouseEvent.CLICK, onMuter);
setVolume(Global.volumeon);
FlxG.setMusic(SndMenu);
add(_bg);
add(_strokes);
add(_stams);
addChild(_textExtreme);
addChild(_textGardening);
addChild(_textLevelName);
addChild(_textBest);
addChild(_textTries);
addChild(_buttons);
}
private function onMouseOutButton(_arg1:MouseEvent):void{
_textLevelName.setText("");
_textBest.setText("");
_textTries.setText("");
}
private function onLevel16(_arg1:MouseEvent):void{
removeListeners();
FlxG.setMusic(SndGame);
FlxG.switchState(LevelAllSilver);
}
private function onLevel17(_arg1:MouseEvent):void{
removeListeners();
FlxG.setMusic(SndGame);
FlxG.switchState(LevelAllGold);
}
private function onMouseOverButton(_arg1:MouseEvent):void{
setForLevel(getId((_arg1.currentTarget as MyMedal)));
}
private function getId(_arg1:DisplayObject):Number{
return (Number(_arg1.name.substr(3, (_arg1.name.length - 3))));
}
private function onAllSilversOver(_arg1:MouseEvent):void{
_textLevelName.setText("evil tree");
_textBest.setText(("best: " + Global.leveldata[16].best));
_textTries.setText("all silver!");
}
public function removeListeners():void{
var _local1:Number = 0;
while (_local1 < 15) {
_buttons[("lvl" + String(_local1))].removeEventListener(MouseEvent.ROLL_OVER, onMouseOverButton);
_buttons[("lvl" + String(_local1))].removeEventListener(MouseEvent.ROLL_OUT, onMouseOutButton);
_buttons[("lvl" + String(_local1))].removeEventListener(MouseEvent.CLICK, onMouseClickButton);
_local1++;
};
_buttons.mcMuter.removeEventListener(MouseEvent.CLICK, onMouseClickButton);
_buttons.lvl15.removeEventListener(MouseEvent.CLICK, onLevel15);
_buttons.lvl15.removeEventListener(MouseEvent.ROLL_OUT, onMouseOutButton);
_buttons.lvl15.removeEventListener(MouseEvent.ROLL_OVER, onAllBronzesOver);
_buttons.lvl16.removeEventListener(MouseEvent.CLICK, onLevel16);
_buttons.lvl16.removeEventListener(MouseEvent.ROLL_OUT, onMouseOutButton);
_buttons.lvl16.removeEventListener(MouseEvent.ROLL_OVER, onAllSilversOver);
_buttons.lvl17.removeEventListener(MouseEvent.CLICK, onLevel17);
_buttons.lvl17.removeEventListener(MouseEvent.ROLL_OUT, onMouseOutButton);
_buttons.lvl17.removeEventListener(MouseEvent.ROLL_OVER, onAllGoldsOver);
}
private function setVolume(_arg1:Boolean):void{
FlxG.setVolume((_arg1) ? 1 : 0);
_buttons.mcMuter.mcOff.visible = !(_arg1);
_buttons.mcMuter.mcOn.visible = _arg1;
Global.volumeon = _arg1;
Global.saveShared();
}
private function onAllGoldsOver(_arg1:MouseEvent):void{
_textLevelName.setText("a message");
_textBest.setText("");
_textTries.setText("all gold...");
}
private function onMuter(_arg1:MouseEvent):void{
setVolume((FlxG.getVolume() == 0));
}
public function createStams():void{
var _local1:Number;
_stams = new FlxLayer();
_local1 = 0;
while (_local1 < 16) {
_stams.add(new Stam(0, (_local1 * 20)));
_stams.add(new Stam((15 * 20), (_local1 * 20)));
_local1++;
};
}
private function onAllBronzesOver(_arg1:MouseEvent):void{
_textLevelName.setText("freestyle");
_textBest.setText("all");
_textTries.setText("bronze!");
}
public function setMedal(_arg1:DisplayObject, _arg2:Number):void{
var _local3:MyMedal = (_arg1 as MyMedal);
_local3.mcBlack.visible = (Global.leveldata[_arg2].medal == "none");
_local3.mcGreen.visible = (Global.leveldata[_arg2].medal == "green");
_local3.mcBronze.visible = (Global.leveldata[_arg2].medal == "bronze");
_local3.mcSilver.visible = (Global.leveldata[_arg2].medal == "silver");
_local3.mcGold.visible = (Global.leveldata[_arg2].medal == "gold");
}
private function onLevel15(_arg1:MouseEvent):void{
removeListeners();
FlxG.setMusic(SndGame);
FlxG.switchState(LevelAllBronze);
}
public function addStroke(_arg1:FlxSprite):void{
_strokes.add(_arg1);
}
private function onMouseClickButton(_arg1:MouseEvent):void{
var _local2:Number = getId((_arg1.currentTarget as MyMedal));
if (Global.leveldata[_local2].medal != "none"){
removeListeners();
FlxG.setMusic(SndGame);
FlxG.switchState((getDefinitionByName(("com.mirosurabu.ExtremeGardening.Levels.Level" + String(_local2))) as Class));
};
}
private function setForLevel(_arg1:Number):void{
if (Global.leveldata[_arg1].medal != "none"){
_textLevelName.setText(Global.leveldata[_arg1].name);
_textBest.setText((("best: " + String(Global.leveldata[_arg1].best)) + "%"));
_textTries.setText(("tries: " + String(Global.leveldata[_arg1].tries)));
} else {
_textLevelName.setText("???");
_textBest.setText("");
_textTries.setText("");
};
}
}
}//package com.mirosurabu.ExtremeGardening
Section 106
//MainMenu_ImgBg (com.mirosurabu.ExtremeGardening.MainMenu_ImgBg)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class MainMenu_ImgBg extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 107
//MiroSplash (com.mirosurabu.ExtremeGardening.MiroSplash)
package com.mirosurabu.ExtremeGardening {
public class MiroSplash extends SplashPage {
private var ImgSplash:Class;
public function MiroSplash(){
ImgSplash = MiroSplash_ImgSplash;
super(ImgSplash, MainMenu, "http://www.mirosurabu.com/?ref=NGgardeningsplash", 0.25, 1.5);
_splash.scale.x = 0.5;
_splash.scale.y = 0.5;
}
}
}//package com.mirosurabu.ExtremeGardening
Section 108
//MiroSplash_ImgSplash (com.mirosurabu.ExtremeGardening.MiroSplash_ImgSplash)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class MiroSplash_ImgSplash extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 109
//NGSplash (com.mirosurabu.ExtremeGardening.NGSplash)
package com.mirosurabu.ExtremeGardening {
public class NGSplash extends SplashPage {
private var ImgSplash:Class;
public function NGSplash(){
ImgSplash = NGSplash_ImgSplash;
super(ImgSplash, JWSplash, "http://www.newgrounds.com", 0.25, 1);
}
}
}//package com.mirosurabu.ExtremeGardening
Section 110
//NGSplash_ImgSplash (com.mirosurabu.ExtremeGardening.NGSplash_ImgSplash)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class NGSplash_ImgSplash extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 111
//OutlinedText (com.mirosurabu.ExtremeGardening.OutlinedText)
package com.mirosurabu.ExtremeGardening {
import flash.display.*;
import flash.text.*;
public class OutlinedText extends Sprite {
private var _backText1:TextExtreme;
private var _backText3:TextExtreme;
private var _foreText:TextExtreme;
private var _backText0:TextExtreme;
private var _backText2:TextExtreme;
public function OutlinedText(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String=null){
_foreText = createText(_arg1, _arg2, _arg3, 4294967295, _arg4);
_backText0 = createText(_arg1, (_arg2 - 1), (_arg3 - 1), 4278190080, _arg4);
_backText1 = createText(_arg1, (_arg2 - 1), (_arg3 + 1), 4278190080, _arg4);
_backText2 = createText(_arg1, (_arg2 + 1), (_arg3 - 1), 4278190080, _arg4);
_backText3 = createText(_arg1, (_arg2 + 1), (_arg3 + 1), 4278190080, _arg4);
addChild(_backText0);
addChild(_backText1);
addChild(_backText2);
addChild(_backText3);
addChild(_foreText);
}
public function createText(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:String=null):TextExtreme{
var _local6:TextExtreme = new TextExtreme();
_local6.myText.text = _arg1;
_local6.myText.textColor = _arg4;
_local6.myText.x = _arg2;
_local6.myText.y = _arg3;
var _local7:TextFormat = _local6.myText.getTextFormat();
_local7.align = _arg5;
_local6.myText.setTextFormat(_local7);
_local6.myText.defaultTextFormat = _local7;
return (_local6);
}
public function setText(_arg1:String):void{
_foreText.myText.text = _arg1;
_backText0.myText.text = _arg1;
_backText1.myText.text = _arg1;
_backText2.myText.text = _arg1;
_backText3.myText.text = _arg1;
}
}
}//package com.mirosurabu.ExtremeGardening
Section 112
//ShootLeaf (com.mirosurabu.ExtremeGardening.ShootLeaf)
package com.mirosurabu.ExtremeGardening {
public class ShootLeaf extends Leaf {
public var angleadd:Number;
public function ShootLeaf(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
angleadd = ((Math.random() * 20) - 10);
acceleration.y = ((0.1 * 60) * 60);
velocity.y = ((-4 - (Math.random() * 4)) * 60);
velocity.x = (((Math.random() * 5) - 4) * 60);
}
override public function update():void{
super.update();
_back.x = x;
_back.y = y;
_back.angle = angle;
angle = (angle + angleadd);
if (x < 30){
velocity.x = Math.abs(velocity.x);
};
if (x > (320 - 30)){
velocity.x = -(Math.abs(velocity.x));
};
}
public function erase():void{
active = false;
_back.active = false;
}
public function pointOverlap(_arg1:Number, _arg2:Number):Boolean{
var _local3:Number = (x - ((width / 2) * scale.x));
var _local4:Number = (x + ((width / 2) * scale.x));
var _local5:Number = (y - ((height / 2) * scale.y));
var _local6:Number = (y + ((height / 2) * scale.y));
return (!((((((((_arg1 < _local3)) || ((_arg1 > _local4)))) || ((_arg2 < _local5)))) || ((_arg2 > _local6)))));
}
}
}//package com.mirosurabu.ExtremeGardening
Section 113
//SplashPage (com.mirosurabu.ExtremeGardening.SplashPage)
package com.mirosurabu.ExtremeGardening {
import flash.events.*;
import com.adamatomic.flixel.*;
public class SplashPage extends FlxState {
public var _splash:FlxSprite;
private var _fadetime:Number;
private var _logoon:Boolean;// = false
private var _clicks:Number;// = 1
private var _logotime:Number;
private var _button:InvisibleButton;
private var _url:String;
private var _logocounter:Number;// = 0
private var _nextstate:Class;
public function SplashPage(_arg1:Class, _arg2:Class, _arg3:String, _arg4:Number, _arg5:Number){
if (_arg1 != null){
_splash = new FlxSprite(_arg1, 160, 160);
_splash.offset.x = (_splash.width / 2);
_splash.offset.y = (_splash.height / 2);
};
_fadetime = _arg4;
_logotime = _arg5;
_nextstate = _arg2;
_url = _arg3;
_button = new InvisibleButton();
_button.width = 320;
_button.height = 320;
_button.alpha = 0;
_button.buttonMode = true;
_button.addEventListener(MouseEvent.MOUSE_DOWN, onClick);
if (_arg1 != null){
add(_splash);
};
addChild(_button);
FlxG.flash(4278190080, _fadetime, onFlashComplete);
}
override public function update():void{
super.update();
if (!_logoon){
return;
};
_logocounter = (_logocounter + FlxG.elapsed);
if (_logocounter >= _logotime){
_logoon = false;
FlxG.fade(4278190080, _fadetime, onFadeComplete);
};
}
private function onFlashComplete():void{
_logoon = true;
}
private function onClick(_arg1:MouseEvent):void{
_clicks++;
if (_clicks == 2){
FlxG.openURL(_url);
_clicks = 0;
};
}
private function onFadeComplete():void{
_button.removeEventListener(MouseEvent.MOUSE_DOWN, onClick);
FlxG.switchState(_nextstate);
}
}
}//package com.mirosurabu.ExtremeGardening
Section 114
//Stam (com.mirosurabu.ExtremeGardening.Stam)
package com.mirosurabu.ExtremeGardening {
import com.adamatomic.flixel.*;
public class Stam extends FlxSprite {
private var ImgStam0:Class;
private var ImgStam1:Class;
private var ImgStam3:Class;
private var ImgStam2:Class;
private var ImgOutstam:Class;
private var _outstam:FlxSprite;
public function Stam(_arg1:Number, _arg2:Number){
ImgStam0 = Stam_ImgStam0;
ImgStam1 = Stam_ImgStam1;
ImgStam2 = Stam_ImgStam2;
ImgStam3 = Stam_ImgStam3;
ImgOutstam = Stam_ImgOutstam;
super(this[("ImgStam" + String(int((Math.random() * 4))))], _arg1, _arg2);
_outstam = new FlxSprite(ImgOutstam, (_arg1 - 2), (_arg2 - 2));
if ((FlxG.state is LevelTemplate)){
(FlxG.state as LevelTemplate).addStroke(_outstam);
};
if ((FlxG.state is MainMenu)){
(FlxG.state as MainMenu).addStroke(_outstam);
};
}
}
}//package com.mirosurabu.ExtremeGardening
Section 115
//Stam_ImgOutstam (com.mirosurabu.ExtremeGardening.Stam_ImgOutstam)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class Stam_ImgOutstam extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 116
//Stam_ImgStam0 (com.mirosurabu.ExtremeGardening.Stam_ImgStam0)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class Stam_ImgStam0 extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 117
//Stam_ImgStam1 (com.mirosurabu.ExtremeGardening.Stam_ImgStam1)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class Stam_ImgStam1 extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 118
//Stam_ImgStam2 (com.mirosurabu.ExtremeGardening.Stam_ImgStam2)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class Stam_ImgStam2 extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 119
//Stam_ImgStam3 (com.mirosurabu.ExtremeGardening.Stam_ImgStam3)
package com.mirosurabu.ExtremeGardening {
import mx.core.*;
public class Stam_ImgStam3 extends BitmapAsset {
}
}//package com.mirosurabu.ExtremeGardening
Section 120
//FlashAd (com.newgrounds.components.FlashAd)
package com.newgrounds.components {
import flash.events.*;
import com.newgrounds.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class FlashAd extends Sprite {
private var _adURLLoader:URLLoader;
private var _ad:Loader;
private var _adRect:Sprite;
private var _mask:Shape;
private var _showBackground:Boolean;
public var background:MovieClip;
private static const REMOVED_FROM_STAGE:String = "removedFromStage";
private static var _adResetTime:uint = 0;
private static var _adURL:URLRequest;
public function FlashAd(_arg1:Boolean=true){
if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){
return;
};
this._adRect = new Sprite();
this._adRect.graphics.beginFill(0);
this._adRect.graphics.moveTo(0, 0);
this._adRect.graphics.lineTo(300, 0);
this._adRect.graphics.lineTo(300, 250);
this._adRect.graphics.lineTo(0, 250);
this._adRect.graphics.lineTo(0, 0);
this._adRect.graphics.endFill();
this._mask = new Shape();
this._mask.graphics.beginFill(0);
this._mask.graphics.moveTo(0, 0);
this._mask.graphics.lineTo(300, 0);
this._mask.graphics.lineTo(300, 250);
this._mask.graphics.lineTo(0, 250);
this._mask.graphics.lineTo(0, 0);
this._mask.graphics.endFill();
addChild(this._adRect);
this._adRect.addChild(this._mask);
this._adRect.visible = false;
x = Math.round(x);
y = Math.round(y);
scaleX = 1;
scaleY = 1;
if (this.background){
if (this.background.ngLinkButton){
this.background.ngLinkButton.addEventListener(MouseEvent.CLICK, this.linkClickHandler);
};
if (this.background.loadingClip){
this.background.loadingClip.visible = false;
};
};
if (API.isFlashVersion(9, 0, 28)){
addEventListener(REMOVED_FROM_STAGE, this.onRemovedFromStage);
};
if (API.adsApproved){
this.loadAdFeed(API.adFeedURL);
} else {
API.addEventListener(APIEvent.ADS_APPROVED, this.onAdsApproved, false, 0, true);
};
this.showBackground = _arg1;
}
private function onAdFeedLoaded(_arg1:Event):void{
var _local2:URLLoader = URLLoader(_arg1.target);
if (((_local2.data) && (!((_local2.data == ""))))){
this.loadAd((_local2.data as String));
} else {
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, false, new APIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad")));
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = false;
};
};
}
private function onAdFeedError(_arg1:Event):void{
trace("[NewgroundsAPI] :: Unable to load ad feed!");
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = false;
};
}
private function onAdError(_arg1:Event):void{
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, false, new APIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad")));
this.removeAd();
}
private function onAdLoaded(_arg1:Event):void{
this._adRect.addChild(this._ad);
this._ad.mask = this._mask;
this._adRect.visible = true;
if (this.background){
if (this._showBackground){
this._adRect.mask = this.background.adMask;
};
if (this.background.loadingClip){
this.background.loadingClip.visible = false;
};
};
trace("[NewgroundsAPI] :: Ad loaded!");
dispatchEvent(new APIEvent(APIEvent.AD_ATTACHED, true));
}
public function get showBackground():Boolean{
return (this._showBackground);
}
public function set showBackground(_arg1:Boolean):void{
this._showBackground = _arg1;
if (this.background){
this.background.visible = _arg1;
this._adRect.mask = (_arg1) ? this.background.adMask : null;
};
}
private function get hasAdElapsed():Boolean{
if (getTimer() >= _adResetTime){
_adResetTime = (getTimer() + ((1000 * 60) * 5));
return (true);
};
return (false);
}
private function loadAdFeed(_arg1:String):void{
var adFeedURL = _arg1;
this._adURLLoader = new URLLoader();
this._adURLLoader.addEventListener(Event.COMPLETE, this.onAdFeedLoaded);
this._adURLLoader.addEventListener(IOErrorEvent.IO_ERROR, this.onAdError);
this._adURLLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onAdError);
if (!adFeedURL){
trace("[Newgrounds API] :: Invalid feed URL!");
return;
};
if (this.hasAdElapsed){
if (adFeedURL.indexOf("?") > -1){
_adURL = new URLRequest(((adFeedURL + "&random=") + Math.random()));
} else {
_adURL = new URLRequest(((adFeedURL + "?random=") + Math.random()));
};
};
try {
this._adURLLoader.load(_adURL);
} catch(e:Error) {
onAdError(null);
};
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = true;
};
}
private function onAdsApproved(_arg1:APIEvent):void{
API.removeEventListener(APIEvent.ADS_APPROVED, this.onAdsApproved, false);
if (_arg1.success){
this.loadAdFeed(API.adFeedURL);
} else {
trace("[NewgroundsAPI] :: No ad feed URL supplied to Newgrounds API ad!");
};
}
private function loadAd(_arg1:String):void{
if (this._ad){
this.removeAd();
};
this._ad = new Loader();
this._ad.contentLoaderInfo.addEventListener(Event.COMPLETE, this.onAdLoaded);
this._ad.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.onAdError);
this._ad.load(new URLRequest(_arg1), new LoaderContext(false, new ApplicationDomain(null)));
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = true;
};
}
public function removeAd():void{
removeEventListener(REMOVED_FROM_STAGE, this.onRemovedFromStage);
if (((this.background) && (this.background.loadingClip))){
this.background.loadingClip.visible = false;
};
if (this._adURLLoader){
try {
this._adURLLoader.close();
} catch(e:Error) {
};
};
if (this._adRect){
this._adRect.visible = false;
};
if (this._ad){
trace("[NewgroundsAPI] :: Ad removed");
try {
this._ad.close();
} catch(e:Error) {
};
try {
Object(this._ad).unloadAndStop(true);
} catch(e:Error) {
_ad.unload();
};
if (this._ad.parent){
this._ad.parent.removeChild(this._ad);
};
};
this._ad = null;
}
private function onRemovedFromStage(_arg1:Event):void{
this.removeAd();
}
private function linkClickHandler(_arg1:MouseEvent):void{
API.loadNewgrounds();
}
}
}//package com.newgrounds.components
Section 121
//FlxNGPreloader (com.newgrounds.components.FlxNGPreloader)
package com.newgrounds.components {
import flash.events.*;
import com.newgrounds.*;
import flash.display.*;
import flash.utils.*;
public class FlxNGPreloader extends MovieClip {
protected var _ad:FlashAd;
public var autoPlay:Boolean;// = false
public var NewgroundsAPIEncryptionKey:String;
protected var _loadBar:Bitmap;
protected var _loadBarMask:Shape;
protected var _adContainer:Sprite;
public var className:String;
protected var _initialized:Boolean;
public var NewgroundsAPIShowAds:Boolean;// = true
public var NewgroundsAPIId:String;
protected var _preloader:Sprite;
public function FlxNGPreloader():void{
this._preloader = new Sprite();
this._adContainer = new Sprite();
this._loadBarMask = new Shape();
super();
addEventListener(Event.ENTER_FRAME, this.enterFrameHandler);
}
private function playButtonClickHandler(_arg1:MouseEvent):void{
this.startGame();
}
protected function createMedalPopup(_arg1:Number, _arg2:Number):void{
var _local3:MedalPopup = new MedalPopup();
_local3.x = _arg1;
_local3.y = _arg2;
addChild(_local3);
}
private function adsApprovedHandler(_arg1:APIEvent):void{
API.removeEventListener(APIEvent.ADS_APPROVED, this.adsApprovedHandler);
if (this._adContainer){
this._ad = new FlashAd(false);
this._adContainer.addChild(this._ad);
this._preloader.addChild(this._adContainer);
this._adContainer.visible = true;
};
}
protected function enterFrameHandler(_arg1:Event):void{
var _local3:Sprite;
if (!this._initialized){
if (stage){
this.create();
};
return;
};
var _local2:Number = (loaderInfo.bytesLoaded / loaderInfo.bytesTotal);
this._loadBarMask.scaleX = (uint((_local2 * 200)) / 200);
if (_local2 >= 1){
removeEventListener(Event.ENTER_FRAME, this.enterFrameHandler);
if (this.autoPlay){
this.startGame();
} else {
_local3 = new Sprite();
_local3.addChild(new Bitmap(new FlxLoaderPlay(0, 0)));
_local3.x = this._loadBarMask.x;
_local3.y = this._loadBarMask.y;
_local3.buttonMode = true;
this._loadBar.visible = false;
_local3.addEventListener(MouseEvent.CLICK, this.playButtonClickHandler);
this._preloader.addChild(_local3);
};
};
}
protected function startGame():void{
var _local2:Object;
nextFrame();
var _local1:Class = Class(getDefinitionByName(this.className));
if (_local1){
_local2 = new (_local1);
addChild((_local2 as DisplayObject));
};
removeChild(this._preloader);
if (this._ad){
this._ad.removeAd();
};
this._ad = null;
this._adContainer = null;
this._loadBarMask = null;
this._preloader = null;
}
protected function create():void{
if (!this.NewgroundsAPIId){
trace("[NewgroundsAPI] :: No API ID set! Please set NewgroundsAPIId in your preloader.");
return;
};
if (this.NewgroundsAPIShowAds){
API.addEventListener(APIEvent.ADS_APPROVED, this.adsApprovedHandler, false, 0, true);
this._adContainer.graphics.beginFill(0);
this._adContainer.graphics.moveTo(-4, -4);
this._adContainer.graphics.lineTo(304, -4);
this._adContainer.graphics.lineTo(304, 254);
this._adContainer.graphics.lineTo(-4, 254);
this._adContainer.graphics.lineTo(-4, -4);
this._adContainer.graphics.endFill();
this._adContainer.scaleX = Math.min(1, (stage.stageWidth / 325));
this._adContainer.scaleY = this._adContainer.scaleX;
};
this._preloader.addChild(this._adContainer);
this._adContainer.visible = false;
var _local1:Bitmap = new Bitmap(new FlxLoaderFrame(0, 0));
_local1.y = 260;
this._preloader.addChild(_local1);
this._loadBarMask.graphics.beginFill(0);
this._loadBarMask.graphics.lineTo(304, 0);
this._loadBarMask.graphics.lineTo(304, 70);
this._loadBarMask.graphics.lineTo(0, 70);
this._loadBarMask.graphics.lineTo(0, 0);
this._loadBarMask.graphics.endFill();
this._loadBarMask.scaleX = 0;
this._loadBarMask.y = _local1.y;
this._preloader.addChild(this._loadBarMask);
this._loadBar = new Bitmap(new FlxLoaderBar(0, 0));
this._loadBar.y = _local1.y;
this._preloader.addChild(this._loadBar);
this._loadBar.mask = this._loadBarMask;
addChild(this._preloader);
this._preloader.x = ((stage.stageWidth - this._preloader.width) / 2);
this._preloader.y = ((stage.stageHeight - this._preloader.height) / 2);
API.connect(loaderInfo, this.NewgroundsAPIId, this.NewgroundsAPIEncryptionKey);
this._initialized = true;
}
}
}//package com.newgrounds.components
Section 122
//MedalPopup (com.newgrounds.components.MedalPopup)
package com.newgrounds.components {
import flash.events.*;
import com.newgrounds.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
public class MedalPopup extends MovieClip {
public var medalValueText:TextField;
public var medalContainer:Sprite;
private var _popDelay:Timer;
private var _initialized:Boolean;
private var _medalIcon:Bitmap;
public var medalNameText:TextField;
private var _medal:Medal;
private var _medalQueue:Array;
public function MedalPopup(){
this._medalQueue = [];
this._popDelay = new Timer(3000, 1);
super();
addFrameScript(0, this.frame1, 9, this.frame10, 18, this.frame19);
if (((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent")))){
return;
};
visible = false;
addEventListener(Event.ENTER_FRAME, this.enterFrameHandler);
stop();
API.addEventListener(APIEvent.MEDAL_UNLOCKED, this.onMedalUnlocked, false, 0, true);
this._popDelay.addEventListener(TimerEvent.TIMER, this.timerHandler);
}
private function timerHandler(_arg1:TimerEvent):void{
if (((this._medalIcon) && (this._medalIcon.parent))){
this._medalIcon.parent.removeChild(this._medalIcon);
this._medalIcon = null;
};
gotoAndPlay("medal_hide");
this._popDelay.stop();
}
private function showMedalInfo():void{
if (!this._medal){
return;
};
if (this.medalContainer){
this._medalIcon = this._medal.createIconBitmap();
this.medalContainer.addChild(this._medalIcon);
};
if (this.medalNameText){
this.medalNameText.text = this._medal.name;
};
if (this.medalValueText){
this.medalValueText.text = (this._medal.value.toString() + "pts");
};
this._popDelay.start();
stop();
}
function frame10(){
this.showMedalInfo();
stop();
}
public function get popupTime():Number{
return ((this._popDelay.delay / 1000));
}
private function onMedalUnlocked(_arg1:APIEvent):void{
if (((((_arg1.success) && (_arg1.data))) && ((_arg1.data is Medal)))){
this._medalQueue.push(Medal(_arg1.data));
};
}
private function enterFrameHandler(_arg1:Event):void{
var myIndex:uint;
var topIndex:uint;
var event = _arg1;
if (((this._medalQueue.length) && (!(visible)))){
this._medal = this._medalQueue.pop();
this._popDelay.start();
gotoAndPlay("medal_show");
visible = true;
};
if (((visible) && (parent))){
try {
myIndex = parent.getChildIndex(this);
topIndex = (parent.numChildren - 1);
if (myIndex != topIndex){
parent.setChildIndex(this, topIndex);
};
} catch(error:Error) {
};
};
}
function frame1(){
stop();
}
function frame19(){
stop();
visible = false;
}
public function set popupTime(_arg1:Number):void{
if (isNaN(_arg1)){
_arg1 = 3;
};
this._popDelay.delay = (_arg1 * 1000);
}
}
}//package com.newgrounds.components
Section 123
//API (com.newgrounds.API)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import com.newgrounds.components.*;
import flash.utils.*;
import com.adobe.serialization.json.*;
import flash.net.*;
import com.adobe.crypto.*;
import com.adobe.images.*;
import flash.system.*;
public class API {
private static const COMMANDS_WIKI_URL:String = "http://www.newgrounds.com/wiki/flashapi/commands/";
private static const AD_TERMS_URL:String = "http://www.newgrounds.com/wiki/flashads/terms/";
private static const GATEWAY_URL:String = "http://www.ngads.com/gateway_v2.php";
public static const VERSION:String = "2.3";
private static var connected:Boolean;
private static var user_id:uint;
private static var _preloadComplete:Boolean = false;
private static var user_email:String;
private static var _movieId:String;
private static var _isMetadataLoaded:Boolean = false;
private static var publisher_id:uint;
private static var _imageFilePath:String;
private static var _saveFilePath:String;
private static var ad_url:String;
private static var _debug:Boolean = true;
private static var _saveGroups:Array = [];
private static var do_echo:Boolean = false;
private static var session_id:String;
public static var errors:Dictionary = APIError.init_codes();
private static var timeoutTimer:Timer = new Timer(8000, 1);
private static var _medals:Array;
private static var user_name:String;
private static var period_aliases:Object = {t:{name:"Today", alias:"TODAY"}, p:{name:"Yesterday", alias:"YESTERDAY"}, w:{name:"This Week", alias:"THIS_WEEK"}, m:{name:"This Month", alias:"THIS_MONTH"}, y:{name:"This Year", alias:"THIS_YEAR"}, a:{name:"All-Time", alias:"ALL_TIME"}};
private static var _host:String;
private static var _connected:Boolean = false;
private static var _userpageFormat:String;
private static var _scoreboards:Array = new Array();
private static var _eventDispatcher:EventDispatcher = new EventDispatcher();
private static var compressor:BaseN = new BaseN(compression_radix);
private static var score_page_counts:Object = new Object();
private static var _adsApproved:Boolean = false;
private static var version:String;
public static var periods:Object = getPeriodAliases();
private static var _encryptionKey:String;
private static var root:DisplayObject;
private static var compression_radix:String = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X";
private static var _preloadAssets:Array = [];
private static var sharedObjects:Object = new Object();
private static var _trackerId:uint;
private static var _saveFile:SaveFile;
private static var userpage_format:String;
public static function loadUserPage(_arg1:uint=0, _arg2:String=null):Boolean{
var _local3:String;
if ((((_arg1 == 0)) && ((_arg2 == null)))){
if (hasUserSession()){
_arg1 = user_id;
_arg2 = user_name;
} else {
return (false);
};
};
if (publisher_id == 1){
_local3 = (("http://" + _arg2.toLowerCase()) + ".newgrounds.com");
navigateToURL(new URLRequest(_local3), "_blank");
return (true);
};
if (userpage_format){
_local3 = userpage_format;
_local3 = _local3.split(":user_id:").join(_arg1.toString());
_local3 = _local3.split(":user_name:").join(escape(_arg2));
navigateToURL(new URLRequest(_local3), "_blank");
return (true);
};
return (false);
}
private static function sendWarning(_arg1:String, _arg2:String=null):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n[NewgroundsAPI WARNING] :: \tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(("[NewgroundsAPI WARNING] :: " + _arg1));
}
public static function getPeriodAlias(_arg1:String):String{
var _local2:String;
for (_local2 in period_aliases) {
if (_local2 == _arg1){
return (period_aliases[_local2].alias);
};
};
return (null);
}
private static function onCommandError(_arg1:Event):void{
var _local2:SmartURLLoader = SmartURLLoader(_arg1.target);
var _local3:uint;
while (_local3 < _preloadAssets.length) {
if (_preloadAssets[_local3] == _local2){
_preloadAssets.splice(_local3, 1);
break;
};
_local3++;
};
}
public static function unlockMedal(_arg1:String):void{
var _local3:Object;
var _local4:Object;
if (((!(_arg1)) || ((_arg1 == "")))){
sendError({command_id:getCommandID("unlockMedal")}, new APIError("MISSING_PARAM", "missing required medal name"));
return;
};
var _local2:Medal = getMedalByName(_arg1);
if (!_local2){
sendMessage(("No medal with name: " + _arg1));
return;
};
if (((hasUserSession()) || (debugMode))){
sendMessage((("Attempting to unlock '" + _local2.name) + "'"));
if (_local2.unlocked){
sendWarning((("Medal '" + _local2.name) + "' is already unlocked!"));
return;
};
_local3 = new Object();
_local3.medal_id = _local2.id;
sendSecureCommand("unlockMedal", _local3);
} else {
sendMessage(("Locally unlocking " + _local2.name));
if (_local2.unlocked){
sendWarning((("Medal '" + _local2.name) + "' is already unlocked!"));
return;
};
_local2.unlocked = true;
_local4 = loadLocal("medals_unlocked");
if (!_local4){
_local4 = new Object();
};
_local4[_local2.id.toString()] = true;
saveLocal("medals_unlocked", _local4);
callListener(APIEvent.MEDAL_UNLOCKED, true, _local2);
};
}
public static function setVersion(_arg1:String):void{
if (((_arg1) && (!((_arg1 == ""))))){
version = _arg1;
};
}
public static function isFlashVersion(_arg1:uint, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0):Boolean{
var _local6:Array = Capabilities.version.split(" ")[1].split(",");
var _local7:Array = arguments;
var _local8:uint;
while (_local8 < _local7.length) {
_local6[_local8] = uint(_local6[_local8]);
_local8++;
};
_local8 = 0;
while (_local8 < _local7.length) {
if (_local6[_local8] > _local7[_local8]){
return (true);
};
if (_local6[_local8] < _local7[_local8]){
return (false);
};
_local8++;
};
return (true);
}
public static function getUserID():uint{
return (user_id);
}
private static function getHost():String{
return (_host);
}
public static function hasUserEmail():Boolean{
return (((!((user_email == null))) && (!((user_email == "")))));
}
private static function uncompressHex(_arg1:String):String{
var _local4:uint;
var _local6:String;
var _local7:uint;
var _local8:String;
var _local2:uint = uint(_arg1.charAt(0));
var _local3 = "";
var _local5:uint = 1;
while (_local5 < _arg1.length) {
_local6 = _arg1.substr(_local5, 4);
_local7 = uint(compressor.decode(_local6));
_local8 = _local7.toString(16);
if ((_local5 + 4) < _arg1.length){
_local4 = 6;
} else {
_local4 = _local2;
};
while (_local8.length < _local4) {
_local8 = ("0" + _local8);
};
_local3 = (_local3 + _local8);
_local5 = (_local5 + 4);
};
return (_local3);
}
public static function getMedalByName(_arg1:String):Medal{
var _local2:Medal;
for each (_local2 in _medals) {
if (_local2.name == _arg1){
return (_local2);
};
};
return (null);
}
private static function callListener(_arg1:String, _arg2:Boolean=true, _arg3=undefined):void{
dispatchEvent(new APIEvent(_arg1, _arg2, _arg3));
}
public static function set debugMode(_arg1:Boolean):void{
_debug = _arg1;
}
public static function loadLocal(_arg1:String){
var sharedObj:SharedObject;
var save_id = _arg1;
try {
if (!sharedObjects[save_id]){
sharedObjects[save_id] = SharedObject.getLocal(((("ng_ap_secure_" + _movieId) + "_") + save_id));
};
sharedObj = sharedObjects[save_id];
if (((((sharedObj) && (sharedObj.data))) && (sharedObj.data[save_id]))){
return (decodeData(sharedObj.data[save_id]));
} else {
return (null);
};
} catch(e:Error) {
sendWarning(("loadLocal ERROR: " + e));
return (null);
};
}
private static function populateScoreBoards(_arg1:Array):void{
_scoreboards = [];
var _local2:uint;
while (_local2 < _arg1.length) {
_scoreboards.push(new ScoreBoard(_arg1[_local2].id, _arg1[_local2].name, ""));
_local2++;
};
}
private static function populateSaveGroups(_arg1:Array):void{
var _local3:SaveGroup;
_saveGroups = [];
var _local2:uint;
while (_local2 < _arg1.length) {
_local3 = SaveGroup.createFromObject(_arg1[_local2]);
_saveGroups.push(_local3);
_local2++;
};
}
public static function createAd():FlashAd{
sendMessage("You may see a security sandbox violation. This is normal!");
return (new FlashAd());
}
public static function getSaveGroupById(_arg1:uint):SaveGroup{
if (((!(_saveGroups)) || ((_saveGroups.length < 1)))){
sendWarning("No save groups found");
return (null);
};
var _local2:uint;
while (_local2 < _saveGroups.length) {
if (_saveGroups[_local2].id == _arg1){
return (_saveGroups[_local2]);
};
_local2++;
};
return (null);
}
private static function dispatchEvent(_arg1:Event):void{
_eventDispatcher.dispatchEvent(_arg1);
echo(("Fired Event: " + _arg1.type));
}
public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
_eventDispatcher.removeEventListener(_arg1, _arg2, _arg3);
}
public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:uint=0, _arg5:Boolean=false):void{
_eventDispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public static function get adFeedURL():String{
return (ad_url);
}
public static function setUserEmail(_arg1:String):void{
user_email = _arg1;
}
public static function hasUserSession():Boolean{
return (((((!((session_id == null))) && (!((session_id == ""))))) && (!((publisher_id == 0)))));
}
private static function echo(_arg1:String):void{
if (do_echo){
trace(_arg1);
};
}
public static function getOfficialURL():String{
var _local1:String = ((((((GATEWAY_URL + "?tracker_id=") + _movieId) + "&command_id=") + getCommandID("loadOfficalVersion")) + "&seed=") + Math.random());
if (debugMode){
_local1 = (_local1 + "&debug=1");
};
return (_local1);
}
public static function executeSaveQuery(_arg1:SaveGroupQuery):void{
sendCommand("lookupSaveFiles", {publisher_id:publisher_id, group_id:_arg1.groupId, query:JSON.encode(_arg1.toObject())}, false, null, _arg1);
trace(JSON.encode(_arg1.toObject()));
}
public static function getScoreBoardById(_arg1:uint):ScoreBoard{
var _local2:ScoreBoard;
for each (_local2 in _scoreboards) {
if (_local2.id == _arg1){
return (_local2);
};
};
return (null);
}
private static function getPeriodAliases():Object{
var _local2:String;
var _local1:Object = new Object();
for (_local2 in period_aliases) {
_local1[period_aliases[_local2].alias] = _local2;
};
return (_local1);
}
private static function compressHex(_arg1:String):String{
var _local2:uint = (_arg1.length % 6);
var _local3 = "";
var _local4:uint;
while (_local4 < _arg1.length) {
_local3 = (_local3 + compressor.encode(uint(("0x" + _arg1.substr(_local4, 6))), 4));
_local4 = (_local4 + 6);
};
return ((_local2.toString() + _local3));
}
public static function get preloadComplete():Boolean{
return (_preloadComplete);
}
private static function assertConnected():Boolean{
if (!_connected){
return (false);
};
return (true);
}
public static function sendSecureCommand(_arg1:String, _arg2:Object, _arg3:Object=null, _arg4:Object=null, _arg5=null):void{
if (((((!(debugMode)) && (!(hasUserSession())))) && (!(hasUserEmail())))){
sendError({command_id:getCommandID(_arg1)}, new APIError("IDENTIFICATION_REQUIRED", (("You must be logged in or provide an e-mail address ( using NewgroundsAPI.setUserEmail(\"name@domain.com\"); ) to use " + _arg1) + "().")));
return;
};
if (!_arg1){
fatalError("Missing command", "sendSecureCommand");
};
if (!_arg2){
fatalError("Missing secure_params", "sendSecureCommand");
};
if (!_arg3){
_arg3 = new Object();
};
var _local6 = "";
var _local7:uint;
while (_local7 < 16) {
_local6 = (_local6 + compression_radix.charAt(Math.floor((Math.random() * compression_radix.length))));
_local7++;
};
if (((debugMode) && (!(session_id)))){
_arg2.session_id = "";
} else {
_arg2.session_id = session_id;
};
_arg2.as_version = 3;
_arg2.user_email = user_email;
_arg2.publisher_id = publisher_id;
_arg2.seed = _local6;
_arg2.command_id = getCommandID(_arg1);
var _local8:String = MD5.hash(_local6);
var _local9:String = RC4.encrypt(JSON.encode(_arg2), _encryptionKey);
var _local10:String = (_local8 + _local9);
_arg3.secure = compressHex(_local10);
sendCommand("securePacket", _arg3, false, _arg4, _arg5);
}
public static function sendMessage(_arg1:String, _arg2:Boolean=false):void{
var _local3:String = ("[NewgroundsAPI] :: " + _arg1);
trace(_local3);
}
private static function sendError(_arg1:Object, _arg2:APIError):void{
trace(((((("[NewgroundsAPI ERROR] :: " + getCommandName(_arg1.command_id)) + "() - ") + _arg2.name) + ":\n\t\t\t\t") + _arg2.message));
}
public static function getUserName():String{
return (user_name);
}
private static function getCommandName(_arg1:String):String{
return (_arg1);
}
public static function newSaveFile(_arg1:String):SaveFile{
var _local2:SaveGroup = getSaveGroupByName(_arg1);
if (_local2){
return (new SaveFile(_local2));
};
sendError({command_id:"newSaveFile"}, new APIError("INVALID_SAVE_GROUP", (("'" + _local2) + "' is not a valid save group.")));
return (null);
}
public static function get medals():Array{
return ((_medals) ? _medals.concat() : []);
}
public static function connectionTimeOut(_arg1:Event=null):void{
dispatchEvent(new APIEvent(APIEvent.API_CONNECTED, false, new APIError("CONNECTION_FAILED", "Connection to NewgroundsAPI gateway timed out.")));
}
private static function fatalError(_arg1:String, _arg2:String):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n\tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
throw (new Error(("***ERROR*** class=API\n\n" + _arg1)));
}
public static function getScoreBoardByName(_arg1:String):ScoreBoard{
var _local2:ScoreBoard;
for each (_local2 in _scoreboards) {
if (_local2.name == _arg1){
return (_local2);
};
};
return (null);
}
private static function sendNotice(_arg1:String, _arg2:String=null):void{
if (_arg2){
_arg1 = (_arg1 + ((("\n[NewgroundsAPI NOTICE] :: \tSee " + COMMANDS_WIKI_URL) + _arg2.toLowerCase()) + " for additional information."));
};
trace(("[NewgroundsAPI NOTICE] :: " + _arg1));
}
public static function get debugMode():Boolean{
return (_debug);
}
public static function loadCustomLink(_arg1:String):void{
sendCommand("loadCustomLink", {host:getHost(), link:_arg1}, true);
}
public static function loadMySite():void{
sendCommand("loadMySite", {host:getHost()}, true);
}
public static function getTrackerID():uint{
return (_trackerId);
}
public static function get adsApproved():Boolean{
return (_adsApproved);
}
private static function sendCommand(_arg1:String, _arg2:Object, _arg3:Boolean=false, _arg4:Object=null, _arg5=null):void{
var _local7:String;
var _local8:String;
var _local9:String;
if (((!(connected)) && (!((_arg1 == "connectMovie"))))){
_local7 = (("NewgroundsAPI." + _arg1) + "() - NewgroundsAPI.connectMovie() must be called before this command can be called\n");
fatalError(_local7, "connectMovie");
};
var _local6:SmartURLLoader = new SmartURLLoader();
_local6.addVariable("command_id", getCommandID(_arg1));
_local6.addVariable("tracker_id", _movieId);
if (debugMode){
_local6.addVariable("debug", 1);
};
if (_arg2){
for (_local8 in _arg2) {
_local6.addVariable(_local8, _arg2[_local8]);
};
};
if (_arg4){
for (_local9 in _arg4) {
_local6.addFile(_local9, _arg4[_local9], _local9);
};
};
if (_arg3){
_local6.method = URLRequestMethod.GET;
} else {
_local6.method = URLRequestMethod.POST;
};
_local6.preventCache = true;
if (_arg3){
_local6.openBrowser = true;
_local6.method = URLRequestMethod.GET;
} else {
_local6.addEventListener(Event.COMPLETE, onCommandComplete);
_local6.addEventListener(IOErrorEvent.IO_ERROR, onCommandError);
_local6.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onCommandError);
_local6.method = URLRequestMethod.POST;
};
_local6.owner = _arg5;
_local6.load(GATEWAY_URL);
}
public static function checkFilePrivledges(_arg1:SaveFile):void{
sendCommand("checkFilePrivs", {group:_arg1.groupId, filename:_arg1.name, user_id:(user_id) ? user_id : 0, publisher_id:publisher_id});
}
public static function isPublishedHost():Boolean{
return (((!((getHost() == "localhost"))) && ((getHost().indexOf("file://") == -1))));
}
public static function loadOfficialVersion():void{
navigateToURL(new URLRequest(getOfficialURL()));
}
public static function createSaveQuery(_arg1:String):SaveGroupQuery{
var _local2:SaveGroup = getSaveGroupByName(_arg1);
if (_local2){
return (_local2.createQuery());
};
return (null);
}
public static function saveFile(_arg1:SaveFile, _arg2:Boolean=false):void{
var _local3:Object = _arg1.toObject();
_local3.user_name = user_name;
_local3.overwrite = (_arg2) ? 1 : 0;
var _local4:ByteArray = new ByteArray();
if ((_arg1.contents is ByteArray)){
_local4.writeByte(0);
_local4.writeBytes(_arg1.contents);
} else {
_local4.writeByte(1);
_local4.writeObject(_arg1.contents);
};
_local4.compress();
var _local5:Object = new Object();
_local5.file = _local4;
if (_arg1.thumbnail){
_local5.thumbnail = PNGEncoder.encode(_arg1.thumbnail);
};
sendSecureCommand("saveFile", _local3, null, _local5, _arg1);
}
public static function getMedalById(_arg1:uint):Medal{
var _local2:Medal;
for each (_local2 in _medals) {
if (_local2.id == _arg1){
return (_local2);
};
};
return (null);
}
public static function loadSaveFile(_arg1:Number, _arg2:Boolean=true){
var _local3:Object = {publisher_id:publisher_id, save_id:_arg1, get_contents:_arg2};
sendCommand("loadSaveFile", _local3);
}
public static function loadNewgrounds():void{
sendCommand("loadNewgrounds", {host:getHost()}, true);
}
public static function rateSaveFile(_arg1:SaveFile, _arg2:SaveRating, _arg3:Number):void{
sendSecureCommand("rateSaveFile", {group:_arg1.groupId, save_id:_arg1.id, rating_id:_arg2.id, vote:_arg3, user_id:user_id}, null, null, _arg1);
}
public static function IsCompatible():Boolean{
return (!((publisher_id == 0)));
}
public static function loadScores(_arg1:ScoreBoard, _arg2:String=null):void{
var _local3 = "loadScores";
if (!_arg1.id){
sendError({command_id:getCommandID(_local3)}, new APIError("MISSING_PARAM", "missing required ScoreBoard instance"));
return;
};
if (!hasUserSession()){
callListener(APIEvent.SCORES_LOADED, false, new APIError("SITE_ID_REQUIRED", (("Host '" + getHost()) + "' does not have high scores enabled")));
return;
};
var _local4:Object = {};
_local4.publisher_id = publisher_id;
_local4.period = _arg1.period;
_local4.board = _arg1.id;
_local4.num_results = _arg1.num_results;
_local4.page = _arg1.page;
if (((!(_arg2)) || ((_arg2 == "")))){
_local4.tag = _arg1.tag;
} else {
_local4.tag = _arg2;
};
sendCommand(_local3, _local4);
}
public static function logCustomEvent(_arg1:String):void{
sendCommand("logCustomEvent", {host:getHost(), event:_arg1});
}
public static function decodeData(_arg1:String){
return (JSON.decode(RC4.decrypt(uncompressHex(_arg1), _encryptionKey)));
}
public static function postScore(_arg1:String, _arg2:uint, _arg3:String=""):void{
if (((!(_arg1)) || ((_arg1 == "")))){
sendError({command_id:getCommandID("postScore")}, new APIError("MISSING_PARAM", "missing required parameter(s)"));
return;
};
if (_arg3 == null){
_arg3 = "";
};
sendSecureCommand("postScore", {user_name:user_name, board:_arg1, value:_arg2, publisher_id:publisher_id, tag:_arg3});
}
private static function onCommandComplete(_arg1:Event):void{
var _local4:Object;
var _local5:APIError;
var _local2:SmartURLLoader = SmartURLLoader(_arg1.target);
echo((("INPUT: \n" + _local2.response) + "\n"));
var _local3:uint;
while (_local3 < _preloadAssets.length) {
if (_preloadAssets[_local3] == _local2){
_preloadAssets.splice(_local3, 1);
break;
};
_local3++;
};
if (_local2.response){
_local4 = JSON.decode(_local2.response);
} else {
_local4 = {success:false};
};
if (!_local4.success){
trace(("Error: " + _local4));
_local5 = new APIError(_local4.error_code, _local4.error_msg);
sendError(_local4, _local5);
} else {
_local4.owner = _local2.owner;
doEvent(_local4);
};
}
public static function encodeData(_arg1:Object):String{
return (compressHex(RC4.encrypt(JSON.encode(_arg1), _encryptionKey)));
}
private static function populateMedals(_arg1:Array):void{
var _local2:uint;
var _local3:Object;
if (_medals === null){
_medals = new Array();
_local2 = 0;
while (_local2 < _arg1.length) {
_local3 = _arg1[_local2];
_medals.push(Medal.createFromObject(_local3));
_local2++;
};
};
trace("[NewgroundsAPI] :: Medals loaded!");
}
private static function doEvent(_arg1:Object):void{
var _local2:String;
var _local3:Object;
var _local4:String;
var _local5:Boolean;
var _local6:ScoreBoard;
var _local7:SaveGroup;
var _local8:SaveFile;
var _local9:Array;
var _local10:*;
var _local11:String;
var _local12:Medal;
var _local13:uint;
var _local14:Object;
var _local15:uint;
switch (getCommandName(_arg1.command_id)){
case "connectMovie":
timeoutTimer.stop();
sendMessage("You have successfully connected to the Newgrounds API Gateway");
sendMessage((("Movie identified as \"" + _arg1.movie_name) + "\""));
callListener(APIEvent.API_CONNECTED, _arg1.success, {title:_arg1.movie_name});
_local5 = false;
if (_arg1.ad_status === -1){
_local2 = "This movie was not approved to run Flash Ads.";
sendWarning(_local2);
sendWarning((("visit " + AD_TERMS_URL) + " to view our approval guidelines"));
if (!_arg1.ad_url){
callListener(APIEvent.ADS_APPROVED, false, new APIError("FLASH_ADS_NOT_APPROVED", _local2));
} else {
_local5 = true;
};
} else {
if (_arg1.ad_status === 0){
_local2 = "Flash Ads are currently awaiting approval.";
sendNotice(_local2);
if (!_arg1.ad_url){
callListener(APIEvent.ADS_APPROVED, false, new APIError("FLASH_ADS_NOT_APPROVED", _local2));
} else {
_local5 = true;
};
};
};
if (_arg1.ad_url){
ad_url = unescape(_arg1.ad_url);
if (!_local5){
sendMessage("This movie has been approved to run Flash Ads!");
};
_adsApproved = true;
callListener(APIEvent.ADS_APPROVED, true);
};
if (_arg1.deny_host){
_local2 = (getHost() + " does not have permission to run this movie!");
sendWarning(_local2);
sendWarning(("\tUpdate your API configuration to unblock " + getHost()));
callListener(APIEvent.HOST_BLOCKED, true, {real_url:unescape(_arg1.movie_url), url:getOfficialURL()});
};
if (_arg1.movie_version){
sendWarning("According to your API Configuration, this version is out of date.");
if (version){
sendWarning(("\tThe this movie is version " + version));
};
sendWarning(("\tThe most current version is " + _arg1.movie_version));
callListener(APIEvent.NEW_VERSION_AVAILABLE, true, {version:_arg1.movie_version, real_url:unescape(_arg1.movie_url), url:getOfficialURL()});
};
if (_arg1.request_portal_url){
sendCommand("setPortalID", {portal_url:_host});
};
sendCommand("preloadSettings", {publisher_id:publisher_id, user_id:user_id});
break;
case "preloadSettings":
if (_arg1.medals){
populateMedals(_arg1.medals);
if (((!(hasUserSession())) && (!(debugMode)))){
echo("Checking for SharedObject Medals...");
_local10 = loadLocal("medals_unlocked");
if (_local10){
for (_local11 in _local10) {
if (_local10[_local11]){
_local12 = getMedalById(uint(_local11));
echo(("Now unlocking " + _local12.name));
_local12.unlocked = true;
};
};
};
};
};
if (_arg1.save_groups){
populateSaveGroups(_arg1.save_groups);
};
if (_arg1.save_file_path){
_saveFilePath = (_arg1.save_file_path + "/");
};
if (_arg1.image_file_path){
_imageFilePath = (_arg1.image_file_path + "/");
};
if (_arg1.score_boards){
populateScoreBoards(_arg1.score_boards);
};
trace("[NewgroundsAPI] :: Metadata loaded!");
callListener(APIEvent.METADATA_LOADED);
_preloadComplete = true;
break;
case "logCustomEvent":
if (_arg1.success){
sendMessage((("Event '" + _arg1.event) + "' was logged."));
};
callListener(APIEvent.EVENT_LOGGED, _arg1.success, {event:_arg1.event});
break;
case "postScore":
if (_arg1.success){
_local4 = "User";
if (user_email){
_local4 = user_email;
} else {
if (user_name){
_local4 = user_name;
};
};
_local6 = getScoreBoardById(_arg1.board);
if (_local6){
sendMessage((((((_local4 + " posted ") + _arg1.value) + " to '") + _local6.name) + "'"));
};
_local3 = {score:_arg1.score, value:_arg1.value, username:_local4};
};
callListener(APIEvent.SCORE_POSTED, _arg1.success, _local3);
break;
case "loadScores":
_local3 = new Object();
_local6 = getScoreBoardById(_arg1.board);
if (_local6){
_local6.setScores(_arg1.scores, _arg1.period, _arg1.page, _arg1.num_results);
};
callListener(APIEvent.SCORES_LOADED, _arg1.success, _local6);
break;
case "unlockMedal":
if (_medals){
_local12 = getMedalByName(_arg1.medal_name);
if (_local12.unlocked){
return;
};
_local12.unlocked = true;
callListener(APIEvent.MEDAL_UNLOCKED, _arg1.success, _local12);
};
break;
case "getMedals":
populateMedals(_arg1.medals);
callListener(APIEvent.MEDALS_LOADED, _arg1.success, _local3);
break;
case "loadSaveFile":
_local7 = getSaveGroupById(_arg1.group_id);
_local8 = new SaveFile(_local7);
_local8.id = _arg1.file.save_id;
_local8.name = _arg1.file.filename;
_local8.fileUrl = (_saveFilePath + _arg1.file.file);
_local8.thumbnailUrl = (_imageFilePath + _arg1.file.thumb);
_local8.authorName = _arg1.file.user_name;
_local8.authorId = _arg1.file.user_id;
_local8.description = _arg1.file.description;
if (((_arg1.file.keys) && (_arg1.file.keys.length))){
_local13 = 0;
while (_local13 < _arg1.file.keys.length) {
_local8.setKey(_arg1.file.keys[_local13].id, _arg1.file.keys[_local13].value);
_local13++;
};
};
if (((_arg1.file.ratings) && (_arg1.file.ratings.length))){
_local13 = 0;
while (_local13 < _arg1.file.ratings.length) {
_local8.setRating(_arg1.file.ratings[_local13].id, _arg1.file.ratings[_local13].votes, _arg1.file.ratings[_local13].score);
_local13++;
};
};
if (_arg1.get_contents){
_local8.loadContents();
};
callListener(APIEvent.FILE_INITIALIZED, _arg1.success, _local8);
break;
case "lookupSaveFiles":
_local9 = [];
_local13 = 0;
while (_local13 < _arg1.files.length) {
_local14 = _arg1.files[_local13];
_local8 = new SaveFile(getSaveGroupById(_arg1.group_id));
_local8.name = _local14.filename;
_local8.id = _local14.save_id;
_local8.description = _local14.description;
_local8.thumbnailUrl = (_imageFilePath + _local14.thumb);
_local8.fileUrl = (_saveFilePath + _local14.file);
_local8.authorName = _local14.user_name;
_local8.authorId = _local14.user_id;
if (((_local14.keys) && (_local14.keys.length))){
_local15 = 0;
while (_local15 < _local14.keys.length) {
_local8.setKey(_local14.keys[_local15].id, _local14.keys[_local15].value);
_local15++;
};
};
if (((_local14.ratings) && (_local14.ratings.length))){
_local15 = 0;
while (_local15 < _local14.ratings.length) {
_local8.setRating(_local14.ratings[_local15].id, _local14.ratings[_local15].votes, _local14.ratings[_local15].score);
_local15++;
};
};
_local9.push(_local8);
_local13++;
};
_arg1.owner.dispatchEvent(new APIEvent(APIEvent.QUERY_COMPLETE, _arg1.success, _local9));
break;
case "rateSaveFile":
_local8 = _arg1.owner;
if (_arg1.success){
_local8.setRating(_arg1.rating_id, _arg1.votes, _arg1.score);
};
_local8.dispatchEvent(new APIEvent(APIEvent.VOTE_COMPLETE, _arg1.success, _arg1));
break;
case "saveFile":
_local3 = {save_id:_arg1.save_id, filename:_arg1.filename, file_url:_arg1.file_url, thumbnail:_arg1.thumbnail, icon:_arg1.icon};
_arg1.owner.dispatchEvent(new APIEvent(APIEvent.FILE_SAVED, _arg1.success, _local3));
break;
case "checkFilePrivs":
_local3 = {filename:_arg1.filename, folder:_arg1.folder, can_read:_arg1.can_read, can_write:_arg1.can_write};
callListener(APIEvent.FILE_PRIVS_LOADED, _arg1.success, _local3);
break;
};
}
public static function loadMedals():void{
if (_medals){
dispatchEvent(new APIEvent(APIEvent.MEDALS_LOADED, true, medals));
return;
};
var _local1:Object = new Object();
if (hasUserSession()){
_local1.publisher_id = publisher_id;
_local1.user_id = user_id;
};
sendCommand("getMedals", _local1);
}
public static function connect(_arg1:LoaderInfo, _arg2:String, _arg3:String=null):void{
var loaderInfo = _arg1;
var m_id = _arg2;
var encrypt_key = _arg3;
if (!loaderInfo){
fatalError("Null loaderInfo paremeter passed in to connectMovie!", "");
return;
};
try {
if (loaderInfo.loader){
loaderInfo = loaderInfo.loader.loaderInfo;
};
} catch(error:Error) {
};
_host = loaderInfo.url;
if ((((_host.indexOf("http://") > -1)) || ((_host.indexOf("https://") > -1)))){
_host = _host.split("/")[2].toLowerCase();
} else {
_host = "localhost";
};
var flashVars:Object = loaderInfo.parameters;
if (isPublishedHost()){
debugMode = false;
};
if (((!(debugMode)) && (flashVars))){
if (flashVars.NewgroundsAPI_UserName){
user_name = flashVars.NewgroundsAPI_UserName;
};
if (flashVars.NewgroundsAPI_UserID){
user_id = flashVars.NewgroundsAPI_UserID;
};
if (flashVars.NewgroundsAPI_PublisherID){
publisher_id = flashVars.NewgroundsAPI_PublisherID;
} else {
publisher_id = 1;
};
if (flashVars.NewgroundsAPI_UserpageFormat){
_userpageFormat = flashVars.NewgroundsAPI_UserpageFormat;
};
if (flashVars.NewgroundsAPI_SessionID){
session_id = flashVars.NewgroundsAPI_SessionID;
};
} else {
publisher_id = 1;
session_id = "D3bu64p1U53R";
user_id = 10;
user_name = "API-Debugger";
};
if (connected){
return;
};
timeoutTimer.start();
if (!m_id){
fatalError("NewgroundsAPI.connectMovie() - missing required movieId parameter", "connectMovie");
};
_movieId = String(m_id);
_trackerId = uint(_movieId.substring(0, _movieId.indexOf(":")));
_encryptionKey = encrypt_key;
connected = true;
sendCommand("connectMovie", {host:getHost(), movie_version:version});
}
public static function saveLocal(_arg1:String, _arg2:Object, _arg3:uint=0):void{
var sharedObj:SharedObject;
var save_id = _arg1;
var save_data = _arg2;
var size_allocation = _arg3;
try {
if (!sharedObjects[save_id]){
sharedObjects[save_id] = SharedObject.getLocal(((("ng_ap_secure_" + _movieId) + "_") + save_id));
};
sharedObj = sharedObjects[save_id];
sharedObj.data[save_id] = encodeData(save_data);
sharedObj.flush();
} catch(e:Error) {
sendWarning(("saveLocal ERROR: " + e));
};
}
public static function getPeriodName(_arg1:String):String{
var _local2:String;
for (_local2 in period_aliases) {
if (_local2 == _arg1){
return (period_aliases[_local2].name);
};
};
return (null);
}
public static function getSaveGroupByName(_arg1:String):SaveGroup{
if (((!(_saveGroups)) || ((_saveGroups.length < 1)))){
sendWarning("No save groups found");
return (null);
};
var _local2:uint;
while (_local2 < _saveGroups.length) {
if (_saveGroups[_local2].name == _arg1){
return (_saveGroups[_local2]);
};
_local2++;
};
return (null);
}
private static function getCommandID(_arg1:String):String{
return (_arg1);
}
public static function hasEventListener(_arg1:String):Boolean{
return (_eventDispatcher.hasEventListener(_arg1));
}
public static function isNewgrounds():Boolean{
return ((((publisher_id == 1)) || ((getHost().toLowerCase().indexOf("ungrounded.net") > -1))));
}
public static function isConnected():Boolean{
return (_connected);
}
}
}//package com.newgrounds
Section 124
//APIError (com.newgrounds.APIError)
package com.newgrounds {
import flash.utils.*;
public class APIError {
public var alias:String;
public var message:String;
public var name:String;
public var code:Number;// = 0
private static const always_caps:Array = new Array("API", "URL", "ID");
public static const error_names:Object = init_names();
public static const aliases:Array = new Array("UNKNOWN_ERROR", "INVALID_API_ID", "MISSING_PARAM", "INVALID_STAT_ID", "INVALID_COMMAND_ID", "FLASH_ADS_NOT_APPROVED", "PERMISSION_DENIED", "IDENTIFICATION_REQUIRED", "INVALID_EMAIL_ADDRESS", "BANNED_USER", "SESSION_EXPIRED", "INVALID_SCORE", "INVALID_MEDAL", "INVALID_FOLDER", "FILE_NOT_FOUND", "SITE_ID_REQUIRED", "UPLOAD_IN_PROGRESS", "USER_CANCELLED", "CONFIRM_REQUEST", "CONNECTION_FAILED");
public static const error_codes:Object = init_codes();
public function APIError(_arg1, _arg2:String){
if ((_arg1 is String)){
_arg1 = error_codes[_arg1];
} else {
if (!(_arg1 is uint)){
_arg1 = 0;
};
};
this.code = _arg1;
this.message = _arg2;
this.name = error_names[_arg1];
this.alias = aliases[_arg1];
}
public function isError():Boolean{
return (true);
}
private static function init_names():Array{
var _local3:Array;
var _local4:uint;
var _local5:String;
var _local1:Array = new Array();
var _local2:uint;
while (_local2 < aliases.length) {
_local3 = aliases[_local2].toLowerCase().split("_");
_local4 = 0;
while (_local4 < _local3.length) {
_local3[_local4] = (_local3[_local4].substr(0, 1).toUpperCase() + _local3[_local4].substr(1, _local3[_local4].length));
for each (_local5 in always_caps) {
if (_local3[_local4].toUpperCase() == _local5){
_local3[_local4] = _local3[_local4].toUpperCase();
};
};
_local4++;
};
_local1[_local2] = _local3.join(" ");
_local2++;
};
return (_local1);
}
public static function init_codes():Dictionary{
var _local1:Dictionary = new Dictionary();
var _local2:uint;
while (_local2 < aliases.length) {
_local1[aliases[_local2]] = _local2;
_local2++;
};
return (_local1);
}
}
}//package com.newgrounds
Section 125
//APIEvent (com.newgrounds.APIEvent)
package com.newgrounds {
import flash.events.*;
public class APIEvent extends Event {
private var _error:APIError;
private var _success:Boolean;
private var _target;
private var _data;
public static const AD_ATTACHED:String = "adAttached";
public static const FILE_PRIVS_LOADED:String = "filePrivsLoaded";
public static const ADS_APPROVED:String = "adsApproved";
public static const MEDAL_UNLOCKED:String = "medalUnlocked";
public static const MEDALS_LOADED:String = "medalsLoaded";
public static const METADATA_LOADED:String = "metadataLoaded";
public static const NEW_VERSION_AVAILABLE:String = "newVersionAvailable";
public static const API_CONNECTED:String = "movieConnected";
public static const EVENT_LOGGED:String = "eventLogged";
public static const FILE_SAVED:String = "fileSaved";
public static const SCORE_POSTED:String = "scorePosted";
public static const VOTE_COMPLETE:String = "voteComplete";
public static const FILE_LOADED:String = "fileLoaded";
public static const QUERY_COMPLETE:String = "queryComplete";
public static const SCORES_LOADED:String = "scoresLoaded";
public static const HOST_BLOCKED:String = "hostBlocked";
public static const FILE_INITIALIZED:String = "fileInitialized";
public function APIEvent(_arg1:String, _arg2:Boolean=true, _arg3=undefined){
super(_arg1);
this._data = _arg3;
this._success = _arg2;
}
public function get success():Boolean{
return (this._success);
}
public function get data(){
return (this._data);
}
}
}//package com.newgrounds
Section 126
//BaseN (com.newgrounds.BaseN)
package com.newgrounds {
import flash.utils.*;
public class BaseN {
private var _hashVal:Dictionary;
private var _hashIndex:String;
private var _base:Number;
public function BaseN(_arg1:String=null){
if (_arg1){
this._hashIndex = _arg1;
} else {
this._hashIndex = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/";
};
this._base = this._hashIndex.length;
this._hashVal = new Dictionary();
var _local2:uint;
while (_local2 < this._base) {
this._hashVal[this._hashIndex.charAt(_local2)] = _local2;
_local2++;
};
}
public function encode(_arg1:Number, _arg2:uint=1):String{
var _local3:String = _arg1.toString();
var _local4 = "";
if (_local3.charAt(0) == "-"){
_local4 = "-";
_local3 = _local3.substring(1);
};
var _local5:Array = _local3.split(".", 2);
_local4 = (_local4 + this.baseNEncoder(_local5[0], _arg2));
if (_local5.length > 1){
_local4 = (_local4 + ("." + this.baseNEncoder(_local5[1])));
};
return (_local4);
}
private function baseNDecoder(_arg1:String):uint{
var _local2:uint;
var _local3:uint;
while (_local3 < _arg1.length) {
_local2 = (_local2 * this._base);
_local2 = (_local2 + this._hashVal[_arg1.charAt(_local3)]);
_local3++;
};
return (_local2);
}
public function decode(_arg1:String):Number{
var _local2 = "";
if (_arg1.charAt(0) == "-"){
_local2 = "-";
_arg1 = _arg1.substring(1);
};
var _local3:Array = _arg1.split(".", 2);
_local2 = (_local2 + this.baseNDecoder(_local3[0]));
if (_local3.length > 1){
_local2 = (_local2 + ".");
_local2 = (_local2 + this.baseNDecoder(_local3[1]));
};
return (Number(_local2));
}
private function baseNEncoder(_arg1:uint, _arg2:uint=1):String{
var _local3 = "";
var _local4:uint = _arg1;
while (_local4 != 0) {
_local3 = (this._hashIndex.charAt((_local4 % this._base)) + _local3);
_local4 = (_local4 / this._base);
};
if (_arg2){
while (_local3.length < _arg2) {
_local3 = (this._hashIndex.charAt(0) + _local3);
};
};
return (_local3);
}
}
}//package com.newgrounds
Section 127
//Medal (com.newgrounds.Medal)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class Medal {
private var _unlocked:Boolean;// = false
private var _iconLoader:Loader;
private var _difficultyId:uint;
private var _icon:BitmapData;
private var _value:uint;
private var _iconUrl:URLRequest;
private var _name:String;
private var _id:uint;
private static const DIFFICULT_NAMES:Array = [null, "Easy", "Moderate", "Challenging", "Difficult", "Brutal"];
private static const DEFAULT_ICON:BitmapData = new BitmapData(50, 50, false, 0);
public function Medal(_arg1:uint, _arg2:String, _arg3:uint, _arg4:uint, _arg5:Boolean, _arg6:String){
var id = _arg1;
var name = _arg2;
var value = _arg3;
var difficulty = _arg4;
var unlocked = _arg5;
var iconUrl = _arg6;
this._icon = DEFAULT_ICON;
super();
this._id = id;
this._name = name;
this._value = value;
this._difficultyId = difficulty;
this._unlocked = unlocked;
if (iconUrl){
this._iconUrl = new URLRequest(iconUrl);
this._iconLoader = new Loader();
this._iconLoader.contentLoaderInfo.addEventListener(Event.INIT, this.onIconLoaderInit);
this._iconLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.onIconLoaderError);
this._iconLoader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onIconLoaderError);
this._iconLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.onIconLoaderComplete);
try {
this._iconLoader.load(this._iconUrl, new LoaderContext(true));
} catch(e:Error) {
onIconLoaderError(null);
};
};
}
public function get icon():BitmapData{
return (this._icon);
}
public function set unlocked(_arg1:Boolean):void{
this._unlocked = _arg1;
}
public function get bytesLoaded():uint{
return ((this._iconLoader) ? this._iconLoader.contentLoaderInfo.bytesLoaded : 0);
}
public function get name():String{
return (this._name);
}
private function onIconLoaderComplete(_arg1:Event):void{
var _local2:Bitmap = (this._iconLoader.content as Bitmap);
this._icon = _local2.bitmapData;
this._iconLoader.unload();
this._iconLoader = null;
}
public function get bytesTotal():uint{
return ((this._iconLoader) ? this._iconLoader.contentLoaderInfo.bytesTotal : 0);
}
public function get id():uint{
return (this._id);
}
public function unlock():void{
if (!this._unlocked){
API.unlockMedal(this._name);
};
}
private function onIconLoaderError(_arg1:IOErrorEvent):void{
trace((((("[NewgroundsAPI WARNING] :: Failed to load medal icon for " + this.name) + " (") + this._iconUrl.url.split("/").pop()) + ")"));
this._iconLoader.unload();
this._iconLoader = null;
}
private function onIconLoaderInit(_arg1:Event):void{
}
public function get unlocked():Boolean{
return (this._unlocked);
}
public function createIconBitmap():Bitmap{
return (new Bitmap(this.icon));
}
public function toString():String{
return (this._name);
}
public function get value():uint{
return (this._value);
}
public function get difficultyId():uint{
return (this._difficultyId);
}
public function get difficulty():String{
return (DIFFICULT_NAMES[this._difficultyId]);
}
public static function createFromObject(_arg1:Object):Medal{
return (new Medal(_arg1.medal_id, _arg1.medal_name, _arg1.medal_value, _arg1.medal_difficulty, _arg1.medal_unlocked, _arg1.medal_icon));
}
}
}//package com.newgrounds
Section 128
//RC4 (com.newgrounds.RC4)
package com.newgrounds {
public class RC4 {
private static var mykey:Array = new Array(0xFF);
private static var sbox:Array = new Array(0xFF);
private static function charsToHex(_arg1:Array):String{
var _local2:String = new String("");
var _local3:Array = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local4:uint;
while (_local4 < _arg1.length) {
_local2 = (_local2 + (_local3[(_arg1[_local4] >> 4)] + _local3[(_arg1[_local4] & 15)]));
_local4++;
};
return (_local2);
}
public static function encrypt(_arg1:String, _arg2:String):String{
var _local3:Array = strToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (charsToHex(_local5));
}
private static function hexToChars(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:uint = ((_arg1.substr(0, 2))=="0x") ? 2 : 0;
while (_local3 < _arg1.length) {
_local2.push(parseInt(_arg1.substr(_local3, 2), 16));
_local3 = (_local3 + 2);
};
return (_local2);
}
public static function encryptbin(_arg1:String, _arg2:String):Array{
var _local3:Array = strToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (_local5);
}
public static function decrypt(_arg1:String, _arg2:String):String{
var _local3:Array = hexToChars(_arg1);
var _local4:Array = strToChars(_arg2);
var _local5:Array = calculate(_local3, _local4);
return (charsToStr(_local5));
}
private static function strToChars(_arg1:String):Array{
var _local2:Array = new Array();
var _local3:uint;
while (_local3 < _arg1.length) {
_local2.push(_arg1.charCodeAt(_local3));
_local3++;
};
return (_local2);
}
private static function calculate(_arg1:Array, _arg2:Array):Array{
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local10:uint;
initialize(_arg2);
var _local3:uint;
var _local4:uint;
var _local5:Array = new Array();
var _local9:uint;
while (_local9 < _arg1.length) {
_local3 = ((_local3 + 1) % 0x0100);
_local4 = ((_local4 + sbox[_local3]) % 0x0100);
_local7 = sbox[_local3];
sbox[_local3] = sbox[_local4];
sbox[_local4] = _local7;
_local10 = ((sbox[_local3] + sbox[_local4]) % 0x0100);
_local6 = sbox[_local10];
_local8 = (_arg1[_local9] ^ _local6);
_local5.push(_local8);
_local9++;
};
return (_local5);
}
private static function initialize(_arg1:Array):void{
var _local3:uint;
var _local2:uint;
var _local4:uint = _arg1.length;
var _local5:uint;
while (_local5 <= 0xFF) {
mykey[_local5] = _arg1[(_local5 % _local4)];
sbox[_local5] = _local5;
_local5++;
};
_local5 = 0;
while (_local5 <= 0xFF) {
_local2 = (((_local2 + sbox[_local5]) + mykey[_local5]) % 0x0100);
_local3 = sbox[_local5];
sbox[_local5] = sbox[_local2];
sbox[_local2] = _local3;
_local5++;
};
}
private static function charsToStr(_arg1:Array):String{
var _local2:String = new String("");
var _local3:uint;
while (_local3 < _arg1.length) {
_local2 = (_local2 + String.fromCharCode(_arg1[_local3]));
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 129
//SaveFile (com.newgrounds.SaveFile)
package com.newgrounds {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.net.*;
public class SaveFile extends EventDispatcher {
private var _group:SaveGroup;
private var _status:uint;
private var _fileUrl:String;
private var _ratings:Dictionary;
private var _id:uint;
private var _thumbnailUrl:String;
private var _description:String;
private var _keys:Dictionary;
private var _authorName:String;
private var _filename:String;
private var _thumbnail:BitmapData;
private var _authorId:uint;
private var _contents;
public function SaveFile(_arg1:SaveGroup){
this._keys = new Dictionary();
this._ratings = new Dictionary();
this._group = _arg1;
this._description = "";
}
public function get authorId():uint{
return (this._authorId);
}
public function get name():String{
return (this._filename);
}
public function set authorId(_arg1:uint):void{
this._authorId = _arg1;
}
override public function toString():String{
var _local2:Object;
var _local3:Object;
var _local1 = (((((("Save File " + this._filename) + " ID: ") + this._id) + "\n ") + this._description) + "\n");
for each (_local2 in this._keys) {
_local1 = (_local1 + ((((" " + this._group.getKeyById(_local2.id).name) + ": ") + _local2.val) + "\n"));
};
for each (_local3 in this._ratings) {
_local1 = (_local1 + ((((((" " + this._group.getRatingById(_local3.id).name) + "\n Score: ") + _local3.score) + " Votes: ") + _local3.votes) + "\n"));
};
return (_local1);
}
public function getRating(_arg1):Object{
var _local2:SaveRating;
if ((_arg1 is String)){
_local2 = this._group.getRatingByName(_arg1);
} else {
_local2 = this._group.getRatingById(_arg1);
};
if (_local2){
return (this._ratings[_local2]);
};
return (null);
}
public function set name(_arg1:String):void{
this._filename = _arg1;
}
public function get contents(){
return (this._contents);
}
public function get id():uint{
return (this._id);
}
public function setKey(_arg1, _arg2):void{
var _local3:SaveKey;
if ((_arg1 is String)){
_local3 = this._group.getKeyByName(_arg1);
} else {
_local3 = this._group.getKeyById(_arg1);
};
if (_local3){
this._keys[_local3] = {id:_local3.id, val:_arg2};
};
}
public function setRating(_arg1, _arg2:Number, _arg3:Number):void{
var _local4:SaveRating;
if ((_arg1 is String)){
_local4 = this._group.getRatingByName(_arg1);
} else {
_local4 = this._group.getRatingById(_arg1);
};
if (_local4){
this._ratings[_local4] = {id:_local4.id, name:_local4.name, votes:_arg2, score:_arg3};
};
}
public function loadContents():void{
var _local1:SmartURLLoader;
if (this._fileUrl){
_local1 = new SmartURLLoader();
_local1.responseFormat = URLLoaderDataFormat.BINARY;
_local1.addEventListener(Event.COMPLETE, this.onContentsLoaded);
_local1.load(this._fileUrl);
};
}
public function toObject():Object{
var _local2:Object;
var _local1:Object = {group:this.groupId, filename:this.name, description:this.description, shared:true};
_local1.keys = [];
for each (_local2 in this._keys) {
_local1.keys.push({id:_local2.id, value:_local2.val});
};
return (_local1);
}
public function getKey(_arg1){
var _local2:SaveKey;
if ((_arg1 is String)){
_local2 = this._group.getKeyByName(_arg1);
} else {
_local2 = this._group.getKeyById(_arg1);
};
if (_local2){
return (this._keys[_local2]);
};
return (null);
}
public function set fileUrl(_arg1:String):void{
this._fileUrl = _arg1;
}
public function get groupName():String{
return (this._group.name);
}
public function set contents(_arg1):void{
this._contents = _arg1;
}
public function get authorName():String{
return (this._authorName);
}
public function set id(_arg1:uint):void{
this._id = _arg1;
}
public function loadAuthorPage(){
API.loadUserPage(this._authorId, this._authorName);
}
public function sendRating(_arg1:String, _arg2:Number):void{
var _local3:SaveRating = this._group.getRatingByName(_arg1);
if (!_local3){
trace((("[NewgroundsAPISaveFile] " + _arg1) + " is not a recognized save file"));
return;
};
if ((((_arg2 < _local3.minValue)) || ((_arg2 > _local3.maxValue)))){
trace(((("[NewgroundsAPISaveFile] Vote must be between " + _local3.minValue) + " and ") + _local3.maxValue));
return;
};
_local3.voted = true;
API.rateSaveFile(this, _local3, _arg2);
}
public function set thumbnailUrl(_arg1:String):void{
this._thumbnailUrl = _arg1;
}
public function set thumbnail(_arg1:BitmapData):void{
if (this._thumbnail){
this._thumbnail.dispose();
};
this._thumbnail = _arg1.clone();
}
public function get groupType():uint{
return (this._group.type);
}
public function get fileUrl():String{
return (this._fileUrl);
}
public function get thumbnailUrl():String{
return (this._thumbnailUrl);
}
public function get shared():Boolean{
return (true);
}
public function set authorName(_arg1:String):void{
this._authorName = _arg1;
}
public function get thumbnail():BitmapData{
return (this._thumbnail);
}
public function set description(_arg1:String):void{
this._description = _arg1;
}
public function get groupId():uint{
return (this._group.id);
}
public function get description():String{
return (this._description);
}
public function save():void{
API.saveFile(this);
}
private function onContentsLoaded(_arg1:Event):void{
var _local2:ByteArray = _arg1.target.response;
_local2.uncompress();
var _local3:uint = _local2.readUnsignedByte();
if (_local3 == 0){
this._contents = new ByteArray();
this._contents.writeBytes(_local2, 1);
} else {
this._contents = _local2.readObject();
};
dispatchEvent(new APIEvent(APIEvent.FILE_LOADED, true, this.contents));
}
}
}//package com.newgrounds
Section 130
//SaveGroup (com.newgrounds.SaveGroup)
package com.newgrounds {
public class SaveGroup {
private var _id:uint;
private var _keys:Array;
private var _type:uint;
private var _name:String;
private var _ratings:Array;
private var _files:Array;
public static const TYPE_SYSTEM:uint = 0;
public static const TYPE_PRIVATE:uint = 1;
public static const TYPE_MODERATED:uint = 3;
public static const TYPE_PUBLIC:uint = 2;
public function SaveGroup(_arg1:uint, _arg2:String, _arg3:uint){
this._name = _arg2;
this._id = _arg1;
this._type = _arg3;
this._ratings = [];
this._keys = [];
this._files = [];
}
public function toString():String{
return ((((((("SaveGroup { name: " + this._name) + ", id: ") + this._id) + ", keys: ") + this._keys) + "}"));
}
public function getRatingById(_arg1:uint):SaveRating{
var _local2:uint;
while (_local2 < this._ratings.length) {
if (this._ratings[_local2].id == _arg1){
return (this._ratings[_local2]);
};
_local2++;
};
return (null);
}
public function getKeyByName(_arg1:String):SaveKey{
var _local2:uint;
while (_local2 < this._keys.length) {
if (this._keys[_local2].name == _arg1){
return (this._keys[_local2]);
};
_local2++;
};
return (null);
}
public function get name():String{
return (this._name);
}
public function getKeyById(_arg1:uint):SaveKey{
var _local2:uint;
while (_local2 < this._keys.length) {
if (this._keys[_local2].id == _arg1){
return (this._keys[_local2]);
};
_local2++;
};
return (null);
}
public function addRating(_arg1:SaveRating):void{
this._ratings.push(_arg1);
}
public function get id():uint{
return (this._id);
}
public function createQuery():SaveGroupQuery{
return (new SaveGroupQuery(this));
}
public function get keys():Array{
return (this._keys.concat());
}
public function getRatingByName(_arg1:String):SaveRating{
var _local2:uint;
while (_local2 < this._ratings.length) {
if (this._ratings[_local2].name == _arg1){
return (this._ratings[_local2]);
};
_local2++;
};
return (null);
}
public function get ratings():Array{
return (this._ratings.concat());
}
public function get type():uint{
return (this._type);
}
public function addKey(_arg1:SaveKey):void{
this._keys.push(_arg1);
}
public static function createFromObject(_arg1:Object):SaveGroup{
var _local4:Object;
var _local5:Object;
var _local2:SaveGroup = new SaveGroup(_arg1.group_id, _arg1.group_name, _arg1.group_type);
var _local3:uint;
while (_local3 < _arg1.keys.length) {
_local4 = _arg1.keys[_local3];
_local2.addKey(new SaveKey(_local4.id, _local4.name, _local4.type));
_local3++;
};
_local3 = 0;
while (_local3 < _arg1.ratings.length) {
_local5 = _arg1.ratings[_local3];
_local2.addRating(new SaveRating(_local5.id, _local5.name, _local5.float, _local5.min, _local5.max));
_local3++;
};
return (_local2);
}
}
}//package com.newgrounds
Section 131
//SaveGroupQuery (com.newgrounds.SaveGroupQuery)
package com.newgrounds {
import flash.events.*;
public class SaveGroupQuery extends EventDispatcher {
private var _group:SaveGroup;
private var _fileConditions:Array;
private var _ratingConditions:Array;
private var _resultsPerPage:uint;
private var _sortConditions:Array;
private var _lookupRatings:Array;
private var _randomizeResults:Boolean;
private var _lookupKeys:Array;
private var _page:uint;
private var _groupBy:Array;
private var _keyConditions:Array;
public static const UPDATED_ON:uint = 5;
public static const TABLE_RATINGS:uint = 3;
public static const TABLE_FILES:uint = 1;
public static const TOTAL_VOTES:String = "votes";
public static const AUTHOR_ID:uint = 1;
public static const FILE_STATUS:uint = 7;
public static const TABLE_KEYS:uint = 2;
public static const FILE_NAME:uint = 3;
public static const SCORE:String = "score";
public static const TOTAL_VIEWS:uint = 6;
public static const CREATED_ON:uint = 4;
public static const FILE_ID:uint = 0;
public static const AUTHOR_NAME:uint = 2;
public function SaveGroupQuery(_arg1:SaveGroup){
this._group = _arg1;
this.reset();
}
public function addKeyCondition(_arg1:String, _arg2:String, _arg3):void{
var _local4:SaveKey = this._group.getKeyByName(_arg1);
if (!_local4){
return;
};
if (!this.checkValue(_arg3, _local4.type)){
return;
};
this._keyConditions.push({key_id:_local4.id, operator:_arg2, value:_arg3});
}
public function sortOn(_arg1:uint, _arg2:Boolean=false):void{
this.addSortCondition(TABLE_FILES, _arg1, _arg2);
}
public function set isRandomized(_arg1:Boolean):void{
this._randomizeResults = _arg1;
}
public function get isRandomized():Boolean{
return (this._randomizeResults);
}
public function groupByRating(_arg1:String):void{
var _local2:SaveRating = this._group.getRatingByName(_arg1);
if (!_local2){
return;
};
this._groupBy.push({table:TABLE_RATINGS, field:_local2.id});
}
public function execute():void{
API.executeSaveQuery(this);
}
public function get page():uint{
return (this._page);
}
public function groupByKey(_arg1:String):void{
var _local2:SaveKey = this._group.getKeyByName(_arg1);
if (!_local2){
return;
};
this._groupBy.push({table:TABLE_KEYS, field:_local2.id});
}
public function sortOnKey(_arg1:String, _arg2:Boolean=false):void{
this.addSortCondition(TABLE_KEYS, this._group.getKeyByName(_arg1).id, _arg2);
}
public function toObject():Object{
var _local1:Object = {page:this._page, num_results:this._resultsPerPage};
if (this.isRandomized){
_local1.randomize = 1;
};
if (((this._fileConditions) && ((this._fileConditions.length > 0)))){
_local1.file_conditions = this._fileConditions;
};
if (((this._keyConditions) && ((this._keyConditions.length > 0)))){
_local1.key_conditions = this._keyConditions;
};
if (((this._ratingConditions) && ((this._ratingConditions.length > 0)))){
_local1.rating_conditions = this._ratingConditions;
};
if (((this._sortConditions) && ((this._sortConditions.length > 0)))){
_local1.sort_conditions = this._sortConditions;
};
if (((this._lookupKeys) && ((this._lookupKeys.length > 0)))){
_local1.lookup_keys = this._lookupKeys;
};
if (((this._lookupRatings) && ((this._lookupRatings.length > 0)))){
_local1.lookup_ratings = this._lookupRatings;
};
if (((this._groupBy) && ((this._groupBy.length > 0)))){
_local1.group_by = this._groupBy;
};
return (_local1);
}
public function reset():void{
this._fileConditions = [];
this._keyConditions = [];
this._ratingConditions = [];
this._sortConditions = [];
this._groupBy = [];
this._lookupKeys = [];
this._lookupRatings = [];
this._randomizeResults = false;
this._resultsPerPage = 20;
this._page = 1;
}
public function includeKey(_arg1:String):void{
var _local2:SaveKey = this._group.getKeyByName(_arg1);
if (_local2){
this._lookupKeys.push(_local2.id);
};
}
private function checkValue(_arg1, _arg2:uint):Boolean{
return (true);
}
public function set page(_arg1:uint):void{
this._page = _arg1;
}
public function addRatingCondition(_arg1:String, _arg2:String, _arg3, _arg4:String="score"):void{
var _local5:SaveRating = this._group.getRatingByName(_arg1);
if (!_local5){
return;
};
this._ratingConditions.push({rating_id:_local5.id, operator:_arg2, value:_arg3, column:_arg4});
}
public function includeRating(_arg1:String):void{
var _local2:SaveRating = this._group.getRatingByName(_arg1);
if (_local2){
this._lookupRatings.push(_local2.id);
};
}
public function sortOnRating(_arg1:String, _arg2:Boolean=false, _arg3:String="score"):void{
this.addSortCondition(TABLE_RATINGS, this._group.getRatingByName(_arg1).id, _arg2, _arg3);
}
public function set resultsPerPage(_arg1:uint):void{
this._resultsPerPage = _arg1;
}
public function excludeRating(_arg1:String):void{
var _local2:SaveRating = this._group.getRatingByName(_arg1);
var _local3:uint;
while (_local3 < this._lookupRatings.length) {
if (this._lookupRatings[_local3] == _local2.id){
this._lookupRatings.splice(_local3, 1);
return;
};
_local3++;
};
}
public function addFileCondition(_arg1:uint, _arg2:String, _arg3):void{
this._fileConditions.push({field:_arg1, operator:_arg2, value:_arg3});
}
public function excludeKey(_arg1:String):void{
var _local2:SaveKey = this._group.getKeyByName(_arg1);
var _local3:uint;
while (_local3 < this._lookupKeys.length) {
if (this._lookupKeys[_local3] == _local2.id){
this._lookupKeys.splice(_local3, 1);
return;
};
_local3++;
};
}
public function get resultsPerPage():uint{
return (this._resultsPerPage);
}
public function get groupId():uint{
return (this._group.id);
}
override public function toString():String{
return ("");
}
private function addSortCondition(_arg1:uint, _arg2:uint, _arg3:Boolean=false, _arg4=null):void{
var _local5:Object = {table:_arg1, field:_arg2, desc:_arg3};
if (_arg4){
_local5.extra = _arg4;
};
this._sortConditions.push(_local5);
}
public function groupBy(_arg1:uint):void{
this._groupBy.push({table:TABLE_FILES, field:_arg1});
}
public function get group():SaveGroup{
return (this._group);
}
}
}//package com.newgrounds
Section 132
//SaveKey (com.newgrounds.SaveKey)
package com.newgrounds {
public class SaveKey {
private var _id:uint;
private var _type:uint;
private var _name:String;
public static const TYPE_BOOLEAN:uint = 4;
public static const TYPE_STRING:uint = 3;
public static const TYPE_FLOAT:uint = 1;
public static const TYPE_INTEGER:uint = 2;
public function SaveKey(_arg1:uint, _arg2:String, _arg3:uint){
this._id = _arg1;
this._name = _arg2;
this._type = _arg3;
}
public function isValueValid(_arg1):Boolean{
if (this._type == TYPE_INTEGER){
return ((((_arg1 is int)) || ((_arg1 is uint))));
};
if (this._type == TYPE_FLOAT){
return ((((((_arg1 is int)) || ((_arg1 is uint)))) || ((_arg1 is Number))));
};
if (this._type == TYPE_STRING){
return ((_arg1 is String));
};
if (this._type == TYPE_BOOLEAN){
return ((((((((_arg1 is Boolean)) || ((_arg1 === 0)))) || ((_arg1 === 1)))) || ((_arg1 == ""))));
};
return (false);
}
public function get name():String{
return (this._name);
}
public function get type():uint{
return (this._type);
}
public function get id():uint{
return (this._id);
}
public function toString():String{
return (this._name);
}
}
}//package com.newgrounds
Section 133
//SaveRating (com.newgrounds.SaveRating)
package com.newgrounds {
public class SaveRating {
private var _voted:Boolean;
private var _name:String;
private var _maxValue:Number;
private var _isFloat:Boolean;
private var _id:uint;
private var _minValue:Number;
public function SaveRating(_arg1:uint, _arg2:String, _arg3:Boolean, _arg4:Number=-INF, _arg5:Number=INF){
this._id = _arg1;
this._name = _arg2;
this._isFloat = _arg3;
this._minValue = _arg4;
this._maxValue = _arg5;
}
public function get voted():Boolean{
return (this._voted);
}
public function set voted(_arg1:Boolean):void{
this._voted = _arg1;
}
public function toString():String{
return (this._name);
}
public function get maxValue():Number{
return (this._maxValue);
}
public function get name():String{
return (this._name);
}
public function get isFloat():Boolean{
return (this._isFloat);
}
public function get id():uint{
return (this._id);
}
public function get minValue():Number{
return (this._minValue);
}
}
}//package com.newgrounds
Section 134
//Score (com.newgrounds.Score)
package com.newgrounds {
public class Score {
private var _board:ScoreBoard;
private var _position:uint;
private var _numeric_value:uint;
private var _value:String;
private var _username:String;
private var _tag:String;
public function Score(_arg1:ScoreBoard, _arg2:Number, _arg3:String, _arg4:String, _arg5:uint, _arg6:String){
this._board = _arg1;
this._position = _arg2;
this._username = _arg3;
this._value = _arg4;
this._numeric_value = _arg5;
this._tag = _arg6;
}
public function get tag():String{
return (this._tag);
}
public function get board():ScoreBoard{
return (this._board);
}
public function get position():uint{
return (this._position);
}
public function get value():String{
return (this._value);
}
public function get username():String{
return (this._username);
}
public function get numeric_value():uint{
return (this._numeric_value);
}
}
}//package com.newgrounds
Section 135
//ScoreBoard (com.newgrounds.ScoreBoard)
package com.newgrounds {
import flash.events.*;
public class ScoreBoard extends EventDispatcher {
private var _scores:Array;
private var _tag:String;
private var _period:String;// = "Today"
private var _name:String;
private var _page:uint;// = 1
private var _id:uint;
private var _num_results:uint;// = 10
public function ScoreBoard(_arg1:uint, _arg2:String, _arg3:String){
this._name = _arg2;
this._id = _arg1;
this._scores = [];
this._tag = _arg3;
}
public function get period():String{
return (this._period);
}
public function get name():String{
return (this._name);
}
public function postScore(_arg1:uint):void{
API.postScore(this._name, _arg1);
}
public function get page():uint{
return (this._page);
}
public function get tag():String{
return (this._tag);
}
public function exists():Boolean{
return ((this._id > 0));
}
public function get scores():Array{
return (this._scores);
}
public function get id():Number{
return (this._id);
}
public function loadScores(_arg1:String="Today", _arg2:uint=1, _arg3:uint=10):void{
this._period = _arg1;
if (((!(this._period)) || ((this._period == "")))){
this._period = ScoreBoardPeriod.TODAY;
};
this._page = _arg2;
this._num_results = _arg3;
API.loadScores(this);
}
function setScores(_arg1:Array, _arg2:String, _arg3:Number, _arg4:Number):void{
var _local6:uint;
this._period = _arg2;
this._page = _arg3;
this._num_results = _arg4;
this._scores = [];
var _local5:uint;
while (_local5 < _arg1.length) {
_local6 = (((this._num_results * (this._page - 1)) + 1) + _local5);
this._scores.push(new Score(this, _local6, _arg1[_local5].username, _arg1[_local5].value, _arg1[_local5].numeric_value, _arg1[_local5].tag));
_local5++;
};
}
public function get num_results():uint{
return (this._num_results);
}
}
}//package com.newgrounds
Section 136
//ScoreBoardPeriod (com.newgrounds.ScoreBoardPeriod)
package com.newgrounds {
public class ScoreBoardPeriod {
public static const MONTH:String = "This Month";
public static const TODAY:String = "Today";
public static const WEEK:String = "This Week";
public static const ALL_TIME:String = "All-Time";
public static const YEAR:String = "This Year";
}
}//package com.newgrounds
Section 137
//SmartURLLoader (com.newgrounds.SmartURLLoader)
package com.newgrounds {
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.errors.*;
public class SmartURLLoader extends EventDispatcher {
private var _urlRequest:URLRequest;
private var _method:String;// = "GET"
private var _files:Dictionary;
private var _hasVariables:Boolean;
private var _dataFormat:String;// = "text"
private var _urlLoader:URLLoader;
private var _preventCache:Boolean;// = false
private var _variables:Dictionary;
public var owner;
private var _openBrowser:Boolean;// = false
private static const CRLF:String = "
";
private static var _loaders:Dictionary = new Dictionary();
public function SmartURLLoader(){
this._urlRequest = new URLRequest();
this._variables = new Dictionary();
}
public function get response(){
return (this._urlLoader.data);
}
public function set method(_arg1:String):void{
if (((this.hasFiles) && ((_arg1 == URLRequestMethod.GET)))){
throw (new IllegalOperationError("GET cannot be used to upload files."));
};
this._method = _arg1;
}
private function onIOError(_arg1:IOErrorEvent):void{
dispatchEvent(_arg1);
this.dispose();
}
public function addVariable(_arg1:String, _arg2=""):void{
this._variables[_arg1] = _arg2;
if (_arg2){
this._hasVariables = true;
};
}
private function onSecurityError(_arg1:SecurityErrorEvent):void{
dispatchEvent(_arg1);
this.dispose();
}
public function get preventCache():Boolean{
return (this._preventCache);
}
public function addFile(_arg1:String, _arg2:ByteArray, _arg3:String, _arg4:String="application/octect-stream"):void{
this.method = URLRequestMethod.POST;
if (!this._files){
this._files = new Dictionary();
};
this._files[_arg1] = new File(_arg1, _arg2, _arg3, _arg4);
}
public function get openBrowser():Boolean{
return (this._openBrowser);
}
public function set preventCache(_arg1:Boolean):void{
this._preventCache = _arg1;
}
public function get responseFormat():String{
return (this._dataFormat);
}
private function onComplete(_arg1:Event):void{
dispatchEvent(_arg1);
this.dispose();
}
public function dispose():void{
this._files = null;
this._variables = null;
if (this._urlLoader){
this._urlLoader.removeEventListener(Event.COMPLETE, this.onComplete);
this._urlLoader.removeEventListener(ProgressEvent.PROGRESS, this.onProgress);
this._urlLoader.removeEventListener(IOErrorEvent.IO_ERROR, this.onIOError);
this._urlLoader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, this.onHTTPStatus);
this._urlLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onSecurityError);
this._urlLoader = null;
};
this._urlRequest = null;
_loaders[this] = null;
}
public function get method():String{
return (this._method);
}
public function close():void{
try {
this._urlLoader.close();
} catch(e:Error) {
};
}
private function buildMultipartData(_arg1:String):ByteArray{
var _local3:String;
var _local4:File;
var _local2:ByteArray = new ByteArray();
_local2.endian = Endian.BIG_ENDIAN;
_arg1 = ("--" + _arg1);
for (_local3 in this._variables) {
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(((("Content-Disposition: form-data; name=\"" + _local3) + "\"") + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes((this._variables[_local3] + CRLF));
};
if (this.hasFiles){
for each (_local4 in this._files) {
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(("Content-Disposition: form-data; name=\"Filename\"" + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes((_local4.fileName + CRLF));
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(((((("Content-Disposition: form-data; name=\"" + _local4.dataField) + "\"; filename=\"") + _local4.fileName) + "\"") + CRLF));
_local2.writeUTFBytes((("Content-Type: " + _local4.contentType) + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeBytes(_local4.data);
_local2.writeUTFBytes(CRLF);
};
_local2.writeUTFBytes((_arg1 + CRLF));
_local2.writeUTFBytes(("Content-Disposition: form-data; name=\"Upload\"" + CRLF));
_local2.writeUTFBytes(CRLF);
_local2.writeUTFBytes(("Submit Query" + CRLF));
};
_local2.writeUTFBytes((_arg1 + "--"));
_local2.position = 0;
trace(_local2.readUTFBytes(_local2.length));
_local2.position = 0;
return (_local2);
}
public function clearVariables():void{
this._variables = new Dictionary();
}
private function onProgress(_arg1:ProgressEvent):void{
dispatchEvent(_arg1);
}
public function load(_arg1:String):void{
var urlVariables:URLVariables;
var key:String;
var boundary:String;
var i:uint;
var event:SecurityErrorEvent;
var url = _arg1;
this._urlRequest.url = url;
if (this._preventCache){
url = (url + ("?seed=" + Math.random()));
if (this._hasVariables){
url = (url + "&");
};
};
this._urlRequest.method = this._method;
if ((((this._urlRequest.method == URLRequestMethod.GET)) || (!(this.hasFiles)))){
this._urlRequest.contentType = "application/x-www-form-urlencoded";
if (this._hasVariables){
urlVariables = new URLVariables();
for (key in this._variables) {
urlVariables[key] = this._variables[key];
};
this._urlRequest.data = urlVariables;
};
} else {
boundary = "";
i = 0;
while (i < 32) {
boundary = (boundary + String.fromCharCode(uint((97 + (Math.random() * 25)))));
i = (i + 1);
};
this._urlRequest.contentType = (("multipart/form-data; boundary=\"" + boundary) + "\"");
this._urlRequest.data = this.buildMultipartData(boundary);
};
if (this.openBrowser){
navigateToURL(this._urlRequest, "_blank");
} else {
this._urlLoader = new URLLoader();
this._urlLoader.dataFormat = this._dataFormat;
this._urlLoader.addEventListener(Event.COMPLETE, this.onComplete);
this._urlLoader.addEventListener(ProgressEvent.PROGRESS, this.onProgress);
this._urlLoader.addEventListener(IOErrorEvent.IO_ERROR, this.onIOError);
this._urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS, this.onHTTPStatus);
this._urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.onSecurityError);
_loaders[this._urlLoader] = this;
try {
this._urlLoader.load(this._urlRequest);
} catch(error:Error) {
event = new SecurityErrorEvent(SecurityErrorEvent.SECURITY_ERROR, false, false, error.message);
onSecurityError(event);
};
};
}
public function set responseFormat(_arg1:String):void{
this._dataFormat = _arg1;
}
public function clearFiles():void{
this._files = null;
}
private function onHTTPStatus(_arg1:HTTPStatusEvent):void{
dispatchEvent(_arg1);
}
public function set openBrowser(_arg1:Boolean):void{
this._openBrowser = _arg1;
}
public function get hasFiles():Boolean{
return (Boolean(this._files));
}
}
}//package com.newgrounds
import flash.utils.*;
class File {
private var dataField:String;
private var contentType:String;
private var fileName:String;
private var data:ByteArray;
private function File(_arg1:String, _arg2:ByteArray, _arg3:String="Filedata", _arg4:String="application/octet-stream"){
this.fileName = _arg1;
this.data = _arg2;
this.dataField = _arg3;
this.contentType = _arg4;
}
}
Section 138
//MedalBronze_19 (MCMedal4_fla.MedalBronze_19)
package MCMedal4_fla {
import flash.events.*;
import flash.display.*;
public dynamic class MedalBronze_19 extends MovieClip {
public function MedalBronze_19(){
addFrameScript(0, frame1, 14, frame15);
}
public function onMouseOver(_arg1:Event):void{
if (currentFrame < 15){
play();
};
if (currentFrame >= 15){
gotoAndPlay(((15 - currentFrame) + 15));
};
}
function frame15(){
stop();
}
function frame1(){
stop();
this.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
this.addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
}
public function onMouseOut(_arg1:Event):void{
gotoAndPlay(((16 + 15) - currentFrame));
}
}
}//package MCMedal4_fla
Section 139
//MedalGold_21 (MCMedal4_fla.MedalGold_21)
package MCMedal4_fla {
import flash.events.*;
import flash.display.*;
public dynamic class MedalGold_21 extends MovieClip {
public function MedalGold_21(){
addFrameScript(0, frame1, 14, frame15);
}
public function onMouseOver(_arg1:Event):void{
if (currentFrame < 15){
play();
};
if (currentFrame >= 15){
gotoAndPlay(((15 - currentFrame) + 15));
};
}
function frame15(){
stop();
}
function frame1(){
stop();
this.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
this.addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
}
public function onMouseOut(_arg1:Event):void{
gotoAndPlay(((16 + 15) - currentFrame));
}
}
}//package MCMedal4_fla
Section 140
//MedalGreen_18 (MCMedal4_fla.MedalGreen_18)
package MCMedal4_fla {
import flash.events.*;
import flash.display.*;
public dynamic class MedalGreen_18 extends MovieClip {
public function MedalGreen_18(){
addFrameScript(0, frame1, 14, frame15);
}
public function onMouseOver(_arg1:Event):void{
if (currentFrame < 15){
play();
};
if (currentFrame >= 15){
gotoAndPlay(((15 - currentFrame) + 15));
};
}
function frame15(){
stop();
}
function frame1(){
stop();
this.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
this.addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
}
public function onMouseOut(_arg1:Event):void{
gotoAndPlay(((16 + 15) - currentFrame));
}
}
}//package MCMedal4_fla
Section 141
//MedalSilver_20 (MCMedal4_fla.MedalSilver_20)
package MCMedal4_fla {
import flash.events.*;
import flash.display.*;
public dynamic class MedalSilver_20 extends MovieClip {
public function MedalSilver_20(){
addFrameScript(0, frame1, 14, frame15);
}
public function onMouseOver(_arg1:Event):void{
if (currentFrame < 15){
play();
};
if (currentFrame >= 15){
gotoAndPlay(((15 - currentFrame) + 15));
};
}
function frame15(){
stop();
}
function frame1(){
stop();
this.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
this.addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
}
public function onMouseOut(_arg1:Event):void{
gotoAndPlay(((16 + 15) - currentFrame));
}
}
}//package MCMedal4_fla
Section 142
//MenuButton_7 (MCMedal4_fla.MenuButton_7)
package MCMedal4_fla {
import flash.display.*;
public dynamic class MenuButton_7 extends MovieClip {
public function MenuButton_7(){
addFrameScript(0, frame1);
}
function frame1(){
buttonMode = true;
}
}
}//package MCMedal4_fla
Section 143
//NextButton_3 (MCMedal4_fla.NextButton_3)
package MCMedal4_fla {
import flash.display.*;
public dynamic class NextButton_3 extends MovieClip {
public function NextButton_3(){
addFrameScript(0, frame1);
}
function frame1(){
buttonMode = true;
}
}
}//package MCMedal4_fla
Section 144
//NgLogo_27 (MCMedal4_fla.NgLogo_27)
package MCMedal4_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class NgLogo_27 extends MovieClip {
public function NgLogo_27(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
this.addEventListener(MouseEvent.CLICK, onClick);
}
public function onClick(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.newgrounds.com"), "_blank");
}
}
}//package MCMedal4_fla
Section 145
//RetryButton_5 (MCMedal4_fla.RetryButton_5)
package MCMedal4_fla {
import flash.display.*;
public dynamic class RetryButton_5 extends MovieClip {
public function RetryButton_5(){
addFrameScript(0, frame1);
}
function frame1(){
buttonMode = true;
}
}
}//package MCMedal4_fla
Section 146
//ToMute_23 (MCMedal4_fla.ToMute_23)
package MCMedal4_fla {
import flash.events.*;
import flash.display.*;
public dynamic class ToMute_23 extends MovieClip {
public function ToMute_23(){
addFrameScript(0, frame1, 14, frame15);
}
public function onMouseOver(_arg1:Event):void{
if (currentFrame < 15){
play();
};
if (currentFrame >= 15){
gotoAndPlay(((15 - currentFrame) + 15));
};
}
function frame15(){
stop();
}
function frame1(){
stop();
this.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
this.addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
}
public function onMouseOut(_arg1:Event):void{
gotoAndPlay(((16 + 15) - currentFrame));
}
}
}//package MCMedal4_fla
Section 147
//ToUnmute_25 (MCMedal4_fla.ToUnmute_25)
package MCMedal4_fla {
import flash.events.*;
import flash.display.*;
public dynamic class ToUnmute_25 extends MovieClip {
public function ToUnmute_25(){
addFrameScript(0, frame1, 14, frame15);
}
public function onMouseOver(_arg1:Event):void{
if (currentFrame < 15){
play();
};
if (currentFrame >= 15){
gotoAndPlay(((15 - currentFrame) + 15));
};
}
function frame15(){
stop();
}
function frame1(){
stop();
this.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
this.addEventListener(MouseEvent.ROLL_OUT, onMouseOut);
}
public function onMouseOut(_arg1:Event):void{
gotoAndPlay(((16 + 15) - currentFrame));
}
}
}//package MCMedal4_fla
Section 148
//BitmapAsset (mx.core.BitmapAsset)
package mx.core {
import flash.display.*;
public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject {
mx_internal static const VERSION:String = "3.4.1.10084";
public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
public function get measuredWidth():Number{
if (bitmapData){
return (bitmapData.width);
};
return (0);
}
public function get measuredHeight():Number{
if (bitmapData){
return (bitmapData.height);
};
return (0);
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
}
}//package mx.core
Section 149
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "3.4.1.10084";
}
}//package mx.core
Section 150
//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.4.1.10084";
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 151
//FlexBitmap (mx.core.FlexBitmap)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexBitmap extends Bitmap {
mx_internal static const VERSION:String = "3.4.1.10084";
public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){
var bitmapData = _arg1;
var pixelSnapping = _arg2;
var smoothing = _arg3;
super(bitmapData, pixelSnapping, smoothing);
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 152
//FlexLoader (mx.core.FlexLoader)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexLoader extends Loader {
mx_internal static const VERSION:String = "3.4.1.10084";
public function FlexLoader(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 153
//FlexShape (mx.core.FlexShape)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexShape extends Shape {
mx_internal static const VERSION:String = "3.4.1.10084";
public function FlexShape(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 154
//FlexVersion (mx.core.FlexVersion)
package mx.core {
import mx.resources.*;
public class FlexVersion {
public static const VERSION_2_0_1:uint = 33554433;
public static const CURRENT_VERSION:uint = 50331648;
public static const VERSION_3_0:uint = 50331648;
public static const VERSION_2_0:uint = 33554432;
public static const VERSION_ALREADY_READ:String = "versionAlreadyRead";
public static const VERSION_ALREADY_SET:String = "versionAlreadySet";
mx_internal static const VERSION:String = "3.4.1.10084";
private static var compatibilityVersionChanged:Boolean = false;
private static var _compatibilityErrorFunction:Function;
private static var _compatibilityVersion:uint = 50331648;
private static var compatibilityVersionRead:Boolean = false;
mx_internal static function changeCompatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
_compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function set compatibilityVersion(_arg1:uint):void{
var _local2:String;
if (_arg1 == _compatibilityVersion){
return;
};
if (compatibilityVersionChanged){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_SET);
};
if (compatibilityVersionRead){
if (compatibilityErrorFunction == null){
_local2 = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ);
throw (new Error(_local2));
};
compatibilityErrorFunction(_arg1, VERSION_ALREADY_READ);
};
_compatibilityVersion = _arg1;
compatibilityVersionChanged = true;
}
public static function get compatibilityVersion():uint{
compatibilityVersionRead = true;
return (_compatibilityVersion);
}
public static function set compatibilityErrorFunction(_arg1:Function):void{
_compatibilityErrorFunction = _arg1;
}
public static function set compatibilityVersionString(_arg1:String):void{
var _local2:Array = _arg1.split(".");
var _local3:uint = parseInt(_local2[0]);
var _local4:uint = parseInt(_local2[1]);
var _local5:uint = parseInt(_local2[2]);
compatibilityVersion = (((_local3 << 24) + (_local4 << 16)) + _local5);
}
public static function get compatibilityErrorFunction():Function{
return (_compatibilityErrorFunction);
}
public static function get compatibilityVersionString():String{
var _local1:uint = ((compatibilityVersion >> 24) & 0xFF);
var _local2:uint = ((compatibilityVersion >> 16) & 0xFF);
var _local3:uint = (compatibilityVersion & 0xFFFF);
return (((((_local1.toString() + ".") + _local2.toString()) + ".") + _local3.toString()));
}
}
}//package mx.core
Section 155
//FontAsset (mx.core.FontAsset)
package mx.core {
import flash.text.*;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "3.4.1.10084";
}
}//package mx.core
Section 156
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 157
//IButton (mx.core.IButton)
package mx.core {
public interface IButton extends IUIComponent {
function get emphasized():Boolean;
function set emphasized(_arg1:Boolean):void;
function callLater(_arg1:Function, _arg2:Array=null):void;
}
}//package mx.core
Section 158
//IChildList (mx.core.IChildList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public interface IChildList {
function get numChildren():int;
function removeChild(_arg1:DisplayObject):DisplayObject;
function getChildByName(_arg1:String):DisplayObject;
function removeChildAt(_arg1:int):DisplayObject;
function getChildIndex(_arg1:DisplayObject):int;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function getObjectsUnderPoint(_arg1:Point):Array;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function getChildAt(_arg1:int):DisplayObject;
function addChild(_arg1:DisplayObject):DisplayObject;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.core
Section 159
//IContainer (mx.core.IContainer)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
import flash.media.*;
import flash.text.*;
public interface IContainer extends IUIComponent {
function set hitArea(_arg1:Sprite):void;
function swapChildrenAt(_arg1:int, _arg2:int):void;
function getChildByName(_arg1:String):DisplayObject;
function get doubleClickEnabled():Boolean;
function get graphics():Graphics;
function get useHandCursor():Boolean;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function set mouseChildren(_arg1:Boolean):void;
function set creatingContentPane(_arg1:Boolean):void;
function get textSnapshot():TextSnapshot;
function getChildIndex(_arg1:DisplayObject):int;
function set doubleClickEnabled(_arg1:Boolean):void;
function getObjectsUnderPoint(_arg1:Point):Array;
function get creatingContentPane():Boolean;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function get soundTransform():SoundTransform;
function set useHandCursor(_arg1:Boolean):void;
function get numChildren():int;
function contains(_arg1:DisplayObject):Boolean;
function get verticalScrollPosition():Number;
function set defaultButton(_arg1:IFlexDisplayObject):void;
function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void;
function set horizontalScrollPosition(_arg1:Number):void;
function get focusManager():IFocusManager;
function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void;
function set mouseEnabled(_arg1:Boolean):void;
function getChildAt(_arg1:int):DisplayObject;
function set soundTransform(_arg1:SoundTransform):void;
function get tabChildren():Boolean;
function get tabIndex():int;
function set focusRect(_arg1:Object):void;
function get hitArea():Sprite;
function get mouseChildren():Boolean;
function removeChildAt(_arg1:int):DisplayObject;
function get defaultButton():IFlexDisplayObject;
function stopDrag():void;
function set tabEnabled(_arg1:Boolean):void;
function get horizontalScrollPosition():Number;
function get focusRect():Object;
function get viewMetrics():EdgeMetrics;
function set verticalScrollPosition(_arg1:Number):void;
function get dropTarget():DisplayObject;
function get mouseEnabled():Boolean;
function set tabChildren(_arg1:Boolean):void;
function set buttonMode(_arg1:Boolean):void;
function get tabEnabled():Boolean;
function get buttonMode():Boolean;
function removeChild(_arg1:DisplayObject):DisplayObject;
function set tabIndex(_arg1:int):void;
function addChild(_arg1:DisplayObject):DisplayObject;
function areInaccessibleObjectsUnderPoint(_arg1:Point):Boolean;
}
}//package mx.core
Section 160
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 161
//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 162
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
import flash.utils.*;
public interface IFlexModuleFactory {
function get preloadedRSLs():Dictionary;
function allowInsecureDomain(... _args):void;
function create(... _args):Object;
function allowDomain(... _args):void;
function info():Object;
}
}//package mx.core
Section 163
//IInvalidating (mx.core.IInvalidating)
package mx.core {
public interface IInvalidating {
function validateNow():void;
function invalidateSize():void;
function invalidateDisplayList():void;
function invalidateProperties():void;
}
}//package mx.core
Section 164
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 165
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 166
//IRectangularBorder (mx.core.IRectangularBorder)
package mx.core {
import flash.geom.*;
public interface IRectangularBorder extends IBorder {
function get backgroundImageBounds():Rectangle;
function get hasBackgroundImage():Boolean;
function set backgroundImageBounds(_arg1:Rectangle):void;
function layoutBackgroundImage():void;
}
}//package mx.core
Section 167
//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 168
//ISWFBridgeGroup (mx.core.ISWFBridgeGroup)
package mx.core {
import flash.events.*;
public interface ISWFBridgeGroup {
function getChildBridgeProvider(_arg1:IEventDispatcher):ISWFBridgeProvider;
function removeChildBridge(_arg1:IEventDispatcher):void;
function get parentBridge():IEventDispatcher;
function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void;
function set parentBridge(_arg1:IEventDispatcher):void;
function containsBridge(_arg1:IEventDispatcher):Boolean;
function getChildBridges():Array;
}
}//package mx.core
Section 169
//ISWFBridgeProvider (mx.core.ISWFBridgeProvider)
package mx.core {
import flash.events.*;
public interface ISWFBridgeProvider {
function get childAllowsParent():Boolean;
function get swfBridge():IEventDispatcher;
function get parentAllowsChild():Boolean;
}
}//package mx.core
Section 170
//IUIComponent (mx.core.IUIComponent)
package mx.core {
import flash.display.*;
import mx.managers.*;
public interface IUIComponent extends IFlexDisplayObject {
function set focusPane(_arg1:Sprite):void;
function get enabled():Boolean;
function set enabled(_arg1:Boolean):void;
function set isPopUp(_arg1:Boolean):void;
function get explicitMinHeight():Number;
function get percentWidth():Number;
function get isPopUp():Boolean;
function get owner():DisplayObjectContainer;
function get percentHeight():Number;
function get baselinePosition():Number;
function owns(_arg1:DisplayObject):Boolean;
function initialize():void;
function get maxWidth():Number;
function get minWidth():Number;
function getExplicitOrMeasuredWidth():Number;
function get explicitMaxWidth():Number;
function get explicitMaxHeight():Number;
function set percentHeight(_arg1:Number):void;
function get minHeight():Number;
function set percentWidth(_arg1:Number):void;
function get document():Object;
function get focusPane():Sprite;
function getExplicitOrMeasuredHeight():Number;
function set tweeningProperties(_arg1:Array):void;
function set explicitWidth(_arg1:Number):void;
function set measuredMinHeight(_arg1:Number):void;
function get explicitMinWidth():Number;
function get tweeningProperties():Array;
function get maxHeight():Number;
function set owner(_arg1:DisplayObjectContainer):void;
function set includeInLayout(_arg1:Boolean):void;
function setVisible(_arg1:Boolean, _arg2:Boolean=false):void;
function parentChanged(_arg1:DisplayObjectContainer):void;
function get explicitWidth():Number;
function get measuredMinHeight():Number;
function set measuredMinWidth(_arg1:Number):void;
function set explicitHeight(_arg1:Number):void;
function get includeInLayout():Boolean;
function get measuredMinWidth():Number;
function get explicitHeight():Number;
function set systemManager(_arg1:ISystemManager):void;
function set document(_arg1:Object):void;
function get systemManager():ISystemManager;
}
}//package mx.core
Section 171
//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 172
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.4.1.10084";
private static var classMap:Object = {};
public static function registerClass(_arg1:String, _arg2:Class):void{
var _local3:Class = classMap[_arg1];
if (!_local3){
classMap[_arg1] = _arg2;
};
}
public static function getClass(_arg1:String):Class{
return (classMap[_arg1]);
}
public static function getInstance(_arg1:String):Object{
var _local2:Class = classMap[_arg1];
if (!_local2){
throw (new Error((("No class registered for interface '" + _arg1) + "'.")));
};
return (_local2["getInstance"]());
}
}
}//package mx.core
Section 173
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.4.1.10084";
}
}//package mx.core
Section 174
//UIComponentGlobals (mx.core.UIComponentGlobals)
package mx.core {
import flash.display.*;
import flash.geom.*;
import mx.managers.*;
public class UIComponentGlobals {
mx_internal static var callLaterSuspendCount:int = 0;
mx_internal static var layoutManager:ILayoutManager;
mx_internal static var nextFocusObject:InteractiveObject;
mx_internal static var designTime:Boolean = false;
mx_internal static var tempMatrix:Matrix = new Matrix();
mx_internal static var callLaterDispatcherCount:int = 0;
private static var _catchCallLaterExceptions:Boolean = false;
public static function set catchCallLaterExceptions(_arg1:Boolean):void{
_catchCallLaterExceptions = _arg1;
}
public static function get designMode():Boolean{
return (designTime);
}
public static function set designMode(_arg1:Boolean):void{
designTime = _arg1;
}
public static function get catchCallLaterExceptions():Boolean{
return (_catchCallLaterExceptions);
}
}
}//package mx.core
Section 175
//ModuleEvent (mx.events.ModuleEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
import mx.modules.*;
public class ModuleEvent extends ProgressEvent {
public var errorText:String;
private var _module:IModuleInfo;
public static const READY:String = "ready";
public static const ERROR:String = "error";
public static const PROGRESS:String = "progress";
mx_internal static const VERSION:String = "3.4.1.10084";
public static const SETUP:String = "setup";
public static const UNLOAD:String = "unload";
public function ModuleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null, _arg7:IModuleInfo=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
this._module = _arg7;
}
public function get module():IModuleInfo{
if (_module){
return (_module);
};
return ((target as IModuleInfo));
}
override public function clone():Event{
return (new ModuleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText, module));
}
}
}//package mx.events
Section 176
//ResourceEvent (mx.events.ResourceEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class ResourceEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.4.1.10084";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function ResourceEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 177
//StyleEvent (mx.events.StyleEvent)
package mx.events {
import flash.events.*;
import mx.core.*;
public class StyleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.4.1.10084";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function StyleEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
this.errorText = _arg6;
}
override public function clone():Event{
return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 178
//RectangularDropShadow (mx.graphics.RectangularDropShadow)
package mx.graphics {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.utils.*;
import flash.filters.*;
public class RectangularDropShadow {
private var leftShadow:BitmapData;
private var _tlRadius:Number;// = 0
private var _trRadius:Number;// = 0
private var _angle:Number;// = 45
private var topShadow:BitmapData;
private var _distance:Number;// = 4
private var rightShadow:BitmapData;
private var _alpha:Number;// = 0.4
private var shadow:BitmapData;
private var _brRadius:Number;// = 0
private var _blRadius:Number;// = 0
private var _color:int;// = 0
private var bottomShadow:BitmapData;
private var changed:Boolean;// = true
mx_internal static const VERSION:String = "3.4.1.10084";
public function get blRadius():Number{
return (_blRadius);
}
public function set brRadius(_arg1:Number):void{
if (_brRadius != _arg1){
_brRadius = _arg1;
changed = true;
};
}
public function set color(_arg1:int):void{
if (_color != _arg1){
_color = _arg1;
changed = true;
};
}
public function drawShadow(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local15:Number;
var _local16:Number;
var _local17:Number;
var _local18:Number;
var _local19:Number;
var _local20:Number;
var _local21:Number;
var _local22:Number;
if (changed){
createShadowBitmaps();
changed = false;
};
_arg4 = Math.ceil(_arg4);
_arg5 = Math.ceil(_arg5);
var _local6:int = (leftShadow) ? leftShadow.width : 0;
var _local7:int = (rightShadow) ? rightShadow.width : 0;
var _local8:int = (topShadow) ? topShadow.height : 0;
var _local9:int = (bottomShadow) ? bottomShadow.height : 0;
var _local10:int = (_local6 + _local7);
var _local11:int = (_local8 + _local9);
var _local12:Number = ((_arg5 + _local11) / 2);
var _local13:Number = ((_arg4 + _local10) / 2);
var _local14:Matrix = new Matrix();
if (((leftShadow) || (topShadow))){
_local15 = Math.min((tlRadius + _local10), _local13);
_local16 = Math.min((tlRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (_arg3 - _local8), _local15, _local16);
_arg1.endFill();
};
if (((rightShadow) || (topShadow))){
_local17 = Math.min((trRadius + _local10), _local13);
_local18 = Math.min((trRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local17), (_arg3 - _local8), _local17, _local18);
_arg1.endFill();
};
if (((leftShadow) || (bottomShadow))){
_local19 = Math.min((blRadius + _local10), _local13);
_local20 = Math.min((blRadius + _local11), _local12);
_local14.tx = (_arg2 - _local6);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((_arg2 - _local6), (((_arg3 + _arg5) + _local9) - _local20), _local19, _local20);
_arg1.endFill();
};
if (((rightShadow) || (bottomShadow))){
_local21 = Math.min((brRadius + _local10), _local13);
_local22 = Math.min((brRadius + _local11), _local12);
_local14.tx = (((_arg2 + _arg4) + _local7) - shadow.width);
_local14.ty = (((_arg3 + _arg5) + _local9) - shadow.height);
_arg1.beginBitmapFill(shadow, _local14);
_arg1.drawRect((((_arg2 + _arg4) + _local7) - _local21), (((_arg3 + _arg5) + _local9) - _local22), _local21, _local22);
_arg1.endFill();
};
if (leftShadow){
_local14.tx = (_arg2 - _local6);
_local14.ty = 0;
_arg1.beginBitmapFill(leftShadow, _local14);
_arg1.drawRect((_arg2 - _local6), ((_arg3 - _local8) + _local16), _local6, ((((_arg5 + _local8) + _local9) - _local16) - _local20));
_arg1.endFill();
};
if (rightShadow){
_local14.tx = (_arg2 + _arg4);
_local14.ty = 0;
_arg1.beginBitmapFill(rightShadow, _local14);
_arg1.drawRect((_arg2 + _arg4), ((_arg3 - _local8) + _local18), _local7, ((((_arg5 + _local8) + _local9) - _local18) - _local22));
_arg1.endFill();
};
if (topShadow){
_local14.tx = 0;
_local14.ty = (_arg3 - _local8);
_arg1.beginBitmapFill(topShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local15), (_arg3 - _local8), ((((_arg4 + _local6) + _local7) - _local15) - _local17), _local8);
_arg1.endFill();
};
if (bottomShadow){
_local14.tx = 0;
_local14.ty = (_arg3 + _arg5);
_arg1.beginBitmapFill(bottomShadow, _local14);
_arg1.drawRect(((_arg2 - _local6) + _local19), (_arg3 + _arg5), ((((_arg4 + _local6) + _local7) - _local19) - _local21), _local9);
_arg1.endFill();
};
}
public function get brRadius():Number{
return (_brRadius);
}
public function get angle():Number{
return (_angle);
}
private function createShadowBitmaps():void{
var _local1:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius));
var _local2:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius));
if ((((_local1 < 0)) || ((_local2 < 0)))){
return;
};
var _local3:Shape = new FlexShape();
var _local4:Graphics = _local3.graphics;
_local4.beginFill(0xFFFFFF);
GraphicsUtil.drawRoundRectComplex(_local4, 0, 0, _local1, _local2, tlRadius, trRadius, blRadius, brRadius);
_local4.endFill();
var _local5:BitmapData = new BitmapData(_local1, _local2, true, 0);
_local5.draw(_local3, new Matrix());
var _local6:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha);
_local6.knockout = true;
var _local7:Rectangle = new Rectangle(0, 0, _local1, _local2);
var _local8:Rectangle = _local5.generateFilterRect(_local7, _local6);
var _local9:Number = (_local7.left - _local8.left);
var _local10:Number = (_local8.right - _local7.right);
var _local11:Number = (_local7.top - _local8.top);
var _local12:Number = (_local8.bottom - _local7.bottom);
shadow = new BitmapData(_local8.width, _local8.height);
shadow.applyFilter(_local5, _local7, new Point(_local9, _local11), _local6);
var _local13:Point = new Point(0, 0);
var _local14:Rectangle = new Rectangle();
if (_local9 > 0){
_local14.x = 0;
_local14.y = ((tlRadius + _local11) + _local12);
_local14.width = _local9;
_local14.height = 1;
leftShadow = new BitmapData(_local9, 1);
leftShadow.copyPixels(shadow, _local14, _local13);
} else {
leftShadow = null;
};
if (_local10 > 0){
_local14.x = (shadow.width - _local10);
_local14.y = ((trRadius + _local11) + _local12);
_local14.width = _local10;
_local14.height = 1;
rightShadow = new BitmapData(_local10, 1);
rightShadow.copyPixels(shadow, _local14, _local13);
} else {
rightShadow = null;
};
if (_local11 > 0){
_local14.x = ((tlRadius + _local9) + _local10);
_local14.y = 0;
_local14.width = 1;
_local14.height = _local11;
topShadow = new BitmapData(1, _local11);
topShadow.copyPixels(shadow, _local14, _local13);
} else {
topShadow = null;
};
if (_local12 > 0){
_local14.x = ((blRadius + _local9) + _local10);
_local14.y = (shadow.height - _local12);
_local14.width = 1;
_local14.height = _local12;
bottomShadow = new BitmapData(1, _local12);
bottomShadow.copyPixels(shadow, _local14, _local13);
} else {
bottomShadow = null;
};
}
public function get alpha():Number{
return (_alpha);
}
public function get color():int{
return (_color);
}
public function set angle(_arg1:Number):void{
if (_angle != _arg1){
_angle = _arg1;
changed = true;
};
}
public function set trRadius(_arg1:Number):void{
if (_trRadius != _arg1){
_trRadius = _arg1;
changed = true;
};
}
public function set tlRadius(_arg1:Number):void{
if (_tlRadius != _arg1){
_tlRadius = _arg1;
changed = true;
};
}
public function get trRadius():Number{
return (_trRadius);
}
public function set distance(_arg1:Number):void{
if (_distance != _arg1){
_distance = _arg1;
changed = true;
};
}
public function get distance():Number{
return (_distance);
}
public function get tlRadius():Number{
return (_tlRadius);
}
public function set alpha(_arg1:Number):void{
if (_alpha != _arg1){
_alpha = _arg1;
changed = true;
};
}
public function set blRadius(_arg1:Number):void{
if (_blRadius != _arg1){
_blRadius = _arg1;
changed = true;
};
}
}
}//package mx.graphics
Section 179
//IFocusManager (mx.managers.IFocusManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
public interface IFocusManager {
function get focusPane():Sprite;
function getFocus():IFocusManagerComponent;
function deactivate():void;
function set defaultButton(_arg1:IButton):void;
function set focusPane(_arg1:Sprite):void;
function set showFocusIndicator(_arg1:Boolean):void;
function moveFocus(_arg1:String, _arg2:DisplayObject=null):void;
function addSWFBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function removeSWFBridge(_arg1:IEventDispatcher):void;
function get defaultButtonEnabled():Boolean;
function findFocusManagerComponent(_arg1:InteractiveObject):IFocusManagerComponent;
function get nextTabIndex():int;
function get defaultButton():IButton;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:IFocusManagerComponent):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function getNextFocusManagerComponent(_arg1:Boolean=false):IFocusManagerComponent;
}
}//package mx.managers
Section 180
//IFocusManagerComponent (mx.managers.IFocusManagerComponent)
package mx.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package mx.managers
Section 181
//IFocusManagerContainer (mx.managers.IFocusManagerContainer)
package mx.managers {
import flash.events.*;
import flash.display.*;
public interface IFocusManagerContainer extends IEventDispatcher {
function set focusManager(_arg1:IFocusManager):void;
function get focusManager():IFocusManager;
function get systemManager():ISystemManager;
function contains(_arg1:DisplayObject):Boolean;
}
}//package mx.managers
Section 182
//ILayoutManager (mx.managers.ILayoutManager)
package mx.managers {
import flash.events.*;
public interface ILayoutManager extends IEventDispatcher {
function validateNow():void;
function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void;
function isInvalid():Boolean;
function invalidateDisplayList(_arg1:ILayoutManagerClient):void;
function set usePhasedInstantiation(_arg1:Boolean):void;
function invalidateSize(_arg1:ILayoutManagerClient):void;
function get usePhasedInstantiation():Boolean;
function invalidateProperties(_arg1:ILayoutManagerClient):void;
}
}//package mx.managers
Section 183
//ILayoutManagerClient (mx.managers.ILayoutManagerClient)
package mx.managers {
import flash.events.*;
public interface ILayoutManagerClient extends IEventDispatcher {
function get updateCompletePendingFlag():Boolean;
function set updateCompletePendingFlag(_arg1:Boolean):void;
function set initialized(_arg1:Boolean):void;
function validateProperties():void;
function validateDisplayList():void;
function get nestLevel():int;
function get initialized():Boolean;
function get processedDescriptors():Boolean;
function validateSize(_arg1:Boolean=false):void;
function set nestLevel(_arg1:int):void;
function set processedDescriptors(_arg1:Boolean):void;
}
}//package mx.managers
Section 184
//ISystemManager (mx.managers.ISystemManager)
package mx.managers {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
public interface ISystemManager extends IEventDispatcher, IChildList, IFlexModuleFactory {
function set focusPane(_arg1:Sprite):void;
function get toolTipChildren():IChildList;
function useSWFBridge():Boolean;
function isFontFaceEmbedded(_arg1:TextFormat):Boolean;
function deployMouseShields(_arg1:Boolean):void;
function get rawChildren():IChildList;
function get topLevelSystemManager():ISystemManager;
function dispatchEventFromSWFBridges(_arg1:Event, _arg2:IEventDispatcher=null, _arg3:Boolean=false, _arg4:Boolean=false):void;
function getSandboxRoot():DisplayObject;
function get swfBridgeGroup():ISWFBridgeGroup;
function removeFocusManager(_arg1:IFocusManagerContainer):void;
function addChildToSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function get document():Object;
function get focusPane():Sprite;
function get loaderInfo():LoaderInfo;
function addChildBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function getTopLevelRoot():DisplayObject;
function removeChildBridge(_arg1:IEventDispatcher):void;
function isDisplayObjectInABridgedApplication(_arg1:DisplayObject):Boolean;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function getDefinitionByName(_arg1:String):Object;
function activate(_arg1:IFocusManagerContainer):void;
function deactivate(_arg1:IFocusManagerContainer):void;
function get cursorChildren():IChildList;
function set document(_arg1:Object):void;
function get embeddedFontList():Object;
function set numModalWindows(_arg1:int):void;
function isTopLevel():Boolean;
function isTopLevelRoot():Boolean;
function get numModalWindows():int;
function addFocusManager(_arg1:IFocusManagerContainer):void;
function get stage():Stage;
function getVisibleApplicationRect(_arg1:Rectangle=null):Rectangle;
}
}//package mx.managers
Section 185
//SystemManagerGlobals (mx.managers.SystemManagerGlobals)
package mx.managers {
public class SystemManagerGlobals {
public static var topLevelSystemManagers:Array = [];
public static var changingListenersInOtherSystemManagers:Boolean;
public static var bootstrapLoaderInfoURL:String;
public static var showMouseCursor:Boolean;
public static var dispatchingEventToOtherSystemManagers:Boolean;
}
}//package mx.managers
Section 186
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
public interface IModuleInfo extends IEventDispatcher {
function get ready():Boolean;
function get loaded():Boolean;
function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void;
function release():void;
function get error():Boolean;
function get data():Object;
function publish(_arg1:IFlexModuleFactory):void;
function get factory():IFlexModuleFactory;
function set data(_arg1:Object):void;
function get url():String;
function get setup():Boolean;
function unload():void;
}
}//package mx.modules
Section 187
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.4.1.10084";
public static function getModule(_arg1:String):IModuleInfo{
return (getSingleton().getModule(_arg1));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(_arg1));
}
}
}//package mx.modules
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
import mx.events.*;
import flash.net.*;
class ModuleInfoProxy extends EventDispatcher implements IModuleInfo {
private var _data:Object;
private var info:ModuleInfo;
private var referenced:Boolean;// = false
private function ModuleInfoProxy(_arg1:ModuleInfo){
this.info = _arg1;
_arg1.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.UNLOAD, moduleEventHandler, false, 0, true);
}
public function get loaded():Boolean{
return (info.loaded);
}
public function release():void{
if (referenced){
info.removeReference();
referenced = false;
};
}
public function get error():Boolean{
return (info.error);
}
public function get factory():IFlexModuleFactory{
return (info.factory);
}
public function publish(_arg1:IFlexModuleFactory):void{
info.publish(_arg1);
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get ready():Boolean{
return (info.ready);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
var _local4:ModuleEvent;
info.resurrect();
if (!referenced){
info.addReference();
referenced = true;
};
if (info.error){
dispatchEvent(new ModuleEvent(ModuleEvent.ERROR));
} else {
if (info.loaded){
if (info.setup){
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
if (info.ready){
_local4 = new ModuleEvent(ModuleEvent.PROGRESS);
_local4.bytesLoaded = info.size;
_local4.bytesTotal = info.size;
dispatchEvent(_local4);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(_arg1, _arg2, _arg3);
};
};
}
private function moduleEventHandler(_arg1:ModuleEvent):void{
dispatchEvent(_arg1);
}
public function get url():String{
return (info.url);
}
public function get data():Object{
return (_data);
}
public function get setup():Boolean{
return (info.setup);
}
public function unload():void{
info.unload();
info.removeEventListener(ModuleEvent.SETUP, moduleEventHandler);
info.removeEventListener(ModuleEvent.PROGRESS, moduleEventHandler);
info.removeEventListener(ModuleEvent.READY, moduleEventHandler);
info.removeEventListener(ModuleEvent.ERROR, moduleEventHandler);
info.removeEventListener(ModuleEvent.UNLOAD, moduleEventHandler);
}
}
class ModuleManagerImpl extends EventDispatcher {
private var moduleList:Object;
private function ModuleManagerImpl(){
moduleList = {};
super();
}
public function getModule(_arg1:String):IModuleInfo{
var _local2:ModuleInfo = (moduleList[_arg1] as ModuleInfo);
if (!_local2){
_local2 = new ModuleInfo(_arg1);
moduleList[_arg1] = _local2;
};
return (new ModuleInfoProxy(_local2));
}
public function getAssociatedFactory(_arg1:Object):IFlexModuleFactory{
var m:Object;
var info:ModuleInfo;
var domain:ApplicationDomain;
var cls:Class;
var object = _arg1;
var className:String = getQualifiedClassName(object);
for each (m in moduleList) {
info = (m as ModuleInfo);
if (!info.ready){
} else {
domain = info.applicationDomain;
try {
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return (info.factory);
};
} catch(error:Error) {
};
};
};
return (null);
}
}
class ModuleInfo extends EventDispatcher {
private var _error:Boolean;// = false
private var loader:Loader;
private var factoryInfo:FactoryInfo;
private var limbo:Dictionary;
private var _loaded:Boolean;// = false
private var _ready:Boolean;// = false
private var numReferences:int;// = 0
private var _url:String;
private var _setup:Boolean;// = false
private function ModuleInfo(_arg1:String){
_url = _arg1;
}
private function clearLoader():void{
if (loader){
if (loader.contentLoaderInfo){
loader.contentLoaderInfo.removeEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
};
try {
if (loader.content){
loader.content.removeEventListener("ready", readyHandler);
loader.content.removeEventListener("error", moduleErrorHandler);
};
} catch(error:Error) {
};
if (_loaded){
try {
loader.close();
} catch(error:Error) {
};
};
try {
loader.unload();
} catch(error:Error) {
};
loader = null;
};
}
public function get size():int{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.bytesTotal : 0);
}
public function get loaded():Boolean{
return ((limbo) ? false : _loaded);
}
public function release():void{
if (((_ready) && (!(limbo)))){
limbo = new Dictionary(true);
limbo[factoryInfo] = 1;
factoryInfo = null;
} else {
unload();
};
}
public function get error():Boolean{
return ((limbo) ? false : _error);
}
public function get factory():IFlexModuleFactory{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.factory : null);
}
public function completeHandler(_arg1:Event):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
dispatchEvent(_local2);
}
public function publish(_arg1:IFlexModuleFactory):void{
if (factoryInfo){
return;
};
if (_url.indexOf("published://") != 0){
return;
};
factoryInfo = new FactoryInfo();
factoryInfo.factory = _arg1;
_loaded = true;
_setup = true;
_ready = true;
_error = false;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
dispatchEvent(new ModuleEvent(ModuleEvent.PROGRESS));
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
public function initHandler(_arg1:Event):void{
var moduleEvent:ModuleEvent;
var event = _arg1;
factoryInfo = new FactoryInfo();
try {
factoryInfo.factory = (loader.content as IFlexModuleFactory);
} catch(error:Error) {
};
if (!factoryInfo.factory){
moduleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = 0;
moduleEvent.bytesTotal = 0;
moduleEvent.errorText = "SWF is not a loadable module";
dispatchEvent(moduleEvent);
return;
};
loader.content.addEventListener("ready", readyHandler);
loader.content.addEventListener("error", moduleErrorHandler);
try {
factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain;
} catch(error:Error) {
};
_setup = true;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
}
public function resurrect():void{
var _local1:Object;
if (((!(factoryInfo)) && (limbo))){
for (_local1 in limbo) {
factoryInfo = (_local1 as FactoryInfo);
break;
};
limbo = null;
};
if (!factoryInfo){
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
loader = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
};
}
public function errorHandler(_arg1:ErrorEvent):void{
_error = true;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = 0;
_local2.bytesTotal = 0;
_local2.errorText = _arg1.text;
dispatchEvent(_local2);
}
public function get ready():Boolean{
return ((limbo) ? false : _ready);
}
private function loadBytes(_arg1:ApplicationDomain, _arg2:ByteArray):void{
var _local3:LoaderContext = new LoaderContext();
_local3.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local3)){
_local3["allowLoadBytesCodeExecution"] = true;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.loadBytes(_arg2, _local3);
}
public function removeReference():void{
numReferences--;
if (numReferences == 0){
release();
};
}
public function addReference():void{
numReferences++;
}
public function progressHandler(_arg1:ProgressEvent):void{
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
public function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void{
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (_arg3){
loadBytes(_arg1, _arg3);
return;
};
if (_url.indexOf("published://") == 0){
return;
};
var _local4:URLRequest = new URLRequest(_url);
var _local5:LoaderContext = new LoaderContext();
_local5.applicationDomain = (_arg1) ? _arg1 : new ApplicationDomain(ApplicationDomain.currentDomain);
_local5.securityDomain = _arg2;
if ((((_arg2 == null)) && ((Security.sandboxType == Security.REMOTE)))){
_local5.securityDomain = SecurityDomain.currentDomain;
};
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandler);
loader.load(_local4, _local5);
}
public function get url():String{
return (_url);
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function moduleErrorHandler(_arg1:Event):void{
var _local2:ModuleEvent;
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
if ((_arg1 is ModuleEvent)){
_local2 = ModuleEvent(_arg1);
} else {
_local2 = new ModuleEvent(ModuleEvent.ERROR);
};
dispatchEvent(_local2);
}
public function readyHandler(_arg1:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
var _local2:ModuleEvent = new ModuleEvent(ModuleEvent.READY);
_local2.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
_local2.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(_local2);
}
public function get setup():Boolean{
return ((limbo) ? false : _setup);
}
public function unload():void{
clearLoader();
if (_loaded){
dispatchEvent(new ModuleEvent(ModuleEvent.UNLOAD));
};
limbo = null;
factoryInfo = null;
_loaded = false;
_setup = false;
_ready = false;
_error = false;
}
}
class FactoryInfo {
public var bytesTotal:int;// = 0
public var factory:IFlexModuleFactory;
public var applicationDomain:ApplicationDomain;
private function FactoryInfo(){
}
}
Section 188
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
}
}//package mx.modules
Section 189
//IResourceBundle (mx.resources.IResourceBundle)
package mx.resources {
public interface IResourceBundle {
function get content():Object;
function get locale():String;
function get bundleName():String;
}
}//package mx.resources
Section 190
//IResourceManager (mx.resources.IResourceManager)
package mx.resources {
import flash.events.*;
import flash.system.*;
public interface IResourceManager extends IEventDispatcher {
function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean;
function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class;
function getLocales():Array;
function removeResourceBundlesForLocale(_arg1:String):void;
function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle;
function get localeChain():Array;
function getInt(_arg1:String, _arg2:String, _arg3:String=null):int;
function update():void;
function set localeChain(_arg1:Array):void;
function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint;
function addResourceBundle(_arg1:IResourceBundle):void;
function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array;
function getBundleNamesForLocale(_arg1:String):Array;
function removeResourceBundle(_arg1:String, _arg2:String):void;
function getObject(_arg1:String, _arg2:String, _arg3:String=null);
function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String;
function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void;
function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void;
function getPreferredLocaleChain():Array;
function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle;
function initializeLocaleChain(_arg1:Array):void;
function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number;
}
}//package mx.resources
Section 191
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 192
//LocaleSorter (mx.resources.LocaleSorter)
package mx.resources {
import mx.core.*;
public class LocaleSorter {
mx_internal static const VERSION:String = "3.4.1.10084";
private static function normalizeLocale(_arg1:String):String{
return (_arg1.toLowerCase().replace(/-/g, "_"));
}
public static function sortLocalesByPreference(_arg1:Array, _arg2:Array, _arg3:String=null, _arg4:Boolean=false):Array{
var result:Array;
var hasLocale:Object;
var i:int;
var j:int;
var k:int;
var l:int;
var locale:String;
var plocale:LocaleID;
var appLocales = _arg1;
var systemPreferences = _arg2;
var ultimateFallbackLocale = _arg3;
var addAll = _arg4;
var promote:Function = function (_arg1:String):void{
if (typeof(hasLocale[_arg1]) != "undefined"){
result.push(appLocales[hasLocale[_arg1]]);
delete hasLocale[_arg1];
};
};
result = [];
hasLocale = {};
var locales:Array = trimAndNormalize(appLocales);
var preferenceLocales:Array = trimAndNormalize(systemPreferences);
addUltimateFallbackLocale(preferenceLocales, ultimateFallbackLocale);
j = 0;
while (j < locales.length) {
hasLocale[locales[j]] = j;
j = (j + 1);
};
i = 0;
l = preferenceLocales.length;
while (i < l) {
plocale = LocaleID.fromString(preferenceLocales[i]);
promote(preferenceLocales[i]);
promote(plocale.toString());
while (plocale.transformToParent()) {
promote(plocale.toString());
};
plocale = LocaleID.fromString(preferenceLocales[i]);
j = 0;
while (j < l) {
locale = preferenceLocales[j];
if (plocale.isSiblingOf(LocaleID.fromString(locale))){
promote(locale);
};
j = (j + 1);
};
j = 0;
k = locales.length;
while (j < k) {
locale = locales[j];
if (plocale.isSiblingOf(LocaleID.fromString(locale))){
promote(locale);
};
j = (j + 1);
};
i = (i + 1);
};
if (addAll){
j = 0;
k = locales.length;
while (j < k) {
promote(locales[j]);
j = (j + 1);
};
};
return (result);
}
private static function addUltimateFallbackLocale(_arg1:Array, _arg2:String):void{
var _local3:String;
if (((!((_arg2 == null))) && (!((_arg2 == ""))))){
_local3 = normalizeLocale(_arg2);
if (_arg1.indexOf(_local3) == -1){
_arg1.push(_local3);
};
};
}
private static function trimAndNormalize(_arg1:Array):Array{
var _local2:Array = [];
var _local3:int;
while (_local3 < _arg1.length) {
_local2.push(normalizeLocale(_arg1[_local3]));
_local3++;
};
return (_local2);
}
}
}//package mx.resources
class LocaleID {
private var privateLangs:Boolean;// = false
private var script:String;// = ""
private var variants:Array;
private var privates:Array;
private var extensions:Object;
private var lang:String;// = ""
private var region:String;// = ""
private var extended_langs:Array;
public static const STATE_PRIMARY_LANGUAGE:int = 0;
public static const STATE_REGION:int = 3;
public static const STATE_EXTENDED_LANGUAGES:int = 1;
public static const STATE_EXTENSIONS:int = 5;
public static const STATE_SCRIPT:int = 2;
public static const STATE_VARIANTS:int = 4;
public static const STATE_PRIVATES:int = 6;
private function LocaleID(){
extended_langs = [];
variants = [];
extensions = {};
privates = [];
super();
}
public function equals(_arg1:LocaleID):Boolean{
return ((toString() == _arg1.toString()));
}
public function canonicalize():void{
var _local1:String;
for (_local1 in extensions) {
if (extensions.hasOwnProperty(_local1)){
if (extensions[_local1].length == 0){
delete extensions[_local1];
} else {
extensions[_local1] = extensions[_local1].sort();
};
};
};
extended_langs = extended_langs.sort();
variants = variants.sort();
privates = privates.sort();
if (script == ""){
script = LocaleRegistry.getScriptByLang(lang);
};
if ((((script == "")) && (!((region == ""))))){
script = LocaleRegistry.getScriptByLangAndRegion(lang, region);
};
if ((((region == "")) && (!((script == ""))))){
region = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
};
}
public function toString():String{
var _local2:String;
var _local1:Array = [lang];
Array.prototype.push.apply(_local1, extended_langs);
if (script != ""){
_local1.push(script);
};
if (region != ""){
_local1.push(region);
};
Array.prototype.push.apply(_local1, variants);
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1.push(_local2);
Array.prototype.push.apply(_local1, extensions[_local2]);
};
};
if (privates.length > 0){
_local1.push("x");
Array.prototype.push.apply(_local1, privates);
};
return (_local1.join("_"));
}
public function isSiblingOf(_arg1:LocaleID):Boolean{
return ((((lang == _arg1.lang)) && ((script == _arg1.script))));
}
public function transformToParent():Boolean{
var _local2:String;
var _local3:Array;
var _local4:String;
if (privates.length > 0){
privates.splice((privates.length - 1), 1);
return (true);
};
var _local1:String;
for (_local2 in extensions) {
if (extensions.hasOwnProperty(_local2)){
_local1 = _local2;
};
};
if (_local1){
_local3 = extensions[_local1];
if (_local3.length == 1){
delete extensions[_local1];
return (true);
};
_local3.splice((_local3.length - 1), 1);
return (true);
};
if (variants.length > 0){
variants.splice((variants.length - 1), 1);
return (true);
};
if (script != ""){
if (LocaleRegistry.getScriptByLang(lang) != ""){
script = "";
return (true);
};
if (region == ""){
_local4 = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
if (_local4 != ""){
region = _local4;
script = "";
return (true);
};
};
};
if (region != ""){
if (!(((script == "")) && ((LocaleRegistry.getScriptByLang(lang) == "")))){
region = "";
return (true);
};
};
if (extended_langs.length > 0){
extended_langs.splice((extended_langs.length - 1), 1);
return (true);
};
return (false);
}
public static function fromString(_arg1:String):LocaleID{
var _local5:Array;
var _local8:String;
var _local9:int;
var _local10:String;
var _local2:LocaleID = new (LocaleID);
var _local3:int = STATE_PRIMARY_LANGUAGE;
var _local4:Array = _arg1.replace(/-/g, "_").split("_");
var _local6:int;
var _local7:int = _local4.length;
while (_local6 < _local7) {
_local8 = _local4[_local6].toLowerCase();
if (_local3 == STATE_PRIMARY_LANGUAGE){
if (_local8 == "x"){
_local2.privateLangs = true;
} else {
if (_local8 == "i"){
_local2.lang = (_local2.lang + "i-");
} else {
_local2.lang = (_local2.lang + _local8);
_local3 = STATE_EXTENDED_LANGUAGES;
};
};
} else {
_local9 = _local8.length;
if (_local9 == 0){
} else {
_local10 = _local8.charAt(0).toLowerCase();
if ((((_local3 <= STATE_EXTENDED_LANGUAGES)) && ((_local9 == 3)))){
_local2.extended_langs.push(_local8);
if (_local2.extended_langs.length == 3){
_local3 = STATE_SCRIPT;
};
} else {
if ((((_local3 <= STATE_SCRIPT)) && ((_local9 == 4)))){
_local2.script = _local8;
_local3 = STATE_REGION;
} else {
if ((((_local3 <= STATE_REGION)) && ((((_local9 == 2)) || ((_local9 == 3)))))){
_local2.region = _local8;
_local3 = STATE_VARIANTS;
} else {
if ((((_local3 <= STATE_VARIANTS)) && ((((((((_local10 >= "a")) && ((_local10 <= "z")))) && ((_local9 >= 5)))) || ((((((_local10 >= "0")) && ((_local10 <= "9")))) && ((_local9 >= 4)))))))){
_local2.variants.push(_local8);
_local3 = STATE_VARIANTS;
} else {
if ((((_local3 < STATE_PRIVATES)) && ((_local9 == 1)))){
if (_local8 == "x"){
_local3 = STATE_PRIVATES;
_local5 = _local2.privates;
} else {
_local3 = STATE_EXTENSIONS;
_local5 = ((_local2.extensions[_local8]) || ([]));
_local2.extensions[_local8] = _local5;
};
} else {
if (_local3 >= STATE_EXTENSIONS){
_local5.push(_local8);
};
};
};
};
};
};
};
};
_local6++;
};
_local2.canonicalize();
return (_local2);
}
}
class LocaleRegistry {
private static const SCRIPT_ID_BY_LANG:Object = {ab:5, af:1, am:2, ar:3, as:4, ay:1, be:5, bg:5, bn:4, bs:1, ca:1, ch:1, cs:1, cy:1, da:1, de:1, dv:6, dz:7, el:8, en:1, eo:1, es:1, et:1, eu:1, fa:3, fi:1, fj:1, fo:1, fr:1, frr:1, fy:1, ga:1, gl:1, gn:1, gu:9, gv:1, he:10, hi:11, hr:1, ht:1, hu:1, hy:12, id:1, in:1, is:1, it:1, iw:10, ja:13, ka:14, kk:5, kl:1, km:15, kn:16, ko:17, la:1, lb:1, ln:1, lo:18, lt:1, lv:1, mg:1, mh:1, mk:5, ml:19, mo:1, mr:11, ms:1, mt:1, my:20, na:1, nb:1, nd:1, ne:11, nl:1, nn:1, no:1, nr:1, ny:1, om:1, or:21, pa:22, pl:1, ps:3, pt:1, qu:1, rn:1, ro:1, ru:5, rw:1, sg:1, si:23, sk:1, sl:1, sm:1, so:1, sq:1, ss:1, st:1, sv:1, sw:1, ta:24, te:25, th:26, ti:2, tl:1, tn:1, to:1, tr:1, ts:1, uk:5, ur:3, ve:1, vi:1, wo:1, xh:1, yi:10, zu:1, cpe:1, dsb:1, frs:1, gsw:1, hsb:1, kok:11, mai:11, men:1, nds:1, niu:1, nqo:27, nso:1, son:1, tem:1, tkl:1, tmh:1, tpi:1, tvl:1, zbl:28};
private static const SCRIPTS:Array = ["", "latn", "ethi", "arab", "beng", "cyrl", "thaa", "tibt", "grek", "gujr", "hebr", "deva", "armn", "jpan", "geor", "khmr", "knda", "kore", "laoo", "mlym", "mymr", "orya", "guru", "sinh", "taml", "telu", "thai", "nkoo", "blis", "hans", "hant", "mong", "syrc"];
private static const DEFAULT_REGION_BY_LANG_AND_SCRIPT:Object = {bg:{5:"bg"}, ca:{1:"es"}, zh:{30:"tw", 29:"cn"}, cs:{1:"cz"}, da:{1:"dk"}, de:{1:"de"}, el:{8:"gr"}, en:{1:"us"}, es:{1:"es"}, fi:{1:"fi"}, fr:{1:"fr"}, he:{10:"il"}, hu:{1:"hu"}, is:{1:"is"}, it:{1:"it"}, ja:{13:"jp"}, ko:{17:"kr"}, nl:{1:"nl"}, nb:{1:"no"}, pl:{1:"pl"}, pt:{1:"br"}, ro:{1:"ro"}, ru:{5:"ru"}, hr:{1:"hr"}, sk:{1:"sk"}, sq:{1:"al"}, sv:{1:"se"}, th:{26:"th"}, tr:{1:"tr"}, ur:{3:"pk"}, id:{1:"id"}, uk:{5:"ua"}, be:{5:"by"}, sl:{1:"si"}, et:{1:"ee"}, lv:{1:"lv"}, lt:{1:"lt"}, fa:{3:"ir"}, vi:{1:"vn"}, hy:{12:"am"}, az:{1:"az", 5:"az"}, eu:{1:"es"}, mk:{5:"mk"}, af:{1:"za"}, ka:{14:"ge"}, fo:{1:"fo"}, hi:{11:"in"}, ms:{1:"my"}, kk:{5:"kz"}, ky:{5:"kg"}, sw:{1:"ke"}, uz:{1:"uz", 5:"uz"}, tt:{5:"ru"}, pa:{22:"in"}, gu:{9:"in"}, ta:{24:"in"}, te:{25:"in"}, kn:{16:"in"}, mr:{11:"in"}, sa:{11:"in"}, mn:{5:"mn"}, gl:{1:"es"}, kok:{11:"in"}, syr:{32:"sy"}, dv:{6:"mv"}, nn:{1:"no"}, sr:{1:"cs", 5:"cs"}, cy:{1:"gb"}, mi:{1:"nz"}, mt:{1:"mt"}, quz:{1:"bo"}, tn:{1:"za"}, xh:{1:"za"}, zu:{1:"za"}, nso:{1:"za"}, se:{1:"no"}, smj:{1:"no"}, sma:{1:"no"}, sms:{1:"fi"}, smn:{1:"fi"}, bs:{1:"ba"}};
private static const SCRIPT_BY_ID:Object = {latn:1, ethi:2, arab:3, beng:4, cyrl:5, thaa:6, tibt:7, grek:8, gujr:9, hebr:10, deva:11, armn:12, jpan:13, geor:14, khmr:15, knda:16, kore:17, laoo:18, mlym:19, mymr:20, orya:21, guru:22, sinh:23, taml:24, telu:25, thai:26, nkoo:27, blis:28, hans:29, hant:30, mong:31, syrc:32};
private static const SCRIPT_ID_BY_LANG_AND_REGION:Object = {zh:{cn:29, sg:29, tw:30, hk:30, mo:30}, mn:{cn:31, sg:5}, pa:{pk:3, in:22}, ha:{gh:1, ne:1}};
private function LocaleRegistry(){
}
public static function getScriptByLangAndRegion(_arg1:String, _arg2:String):String{
var _local3:Object = SCRIPT_ID_BY_LANG_AND_REGION[_arg1];
if (_local3 == null){
return ("");
};
var _local4:Object = _local3[_arg2];
if (_local4 == null){
return ("");
};
return (SCRIPTS[int(_local4)].toLowerCase());
}
public static function getScriptByLang(_arg1:String):String{
var _local2:Object = SCRIPT_ID_BY_LANG[_arg1];
if (_local2 == null){
return ("");
};
return (SCRIPTS[int(_local2)].toLowerCase());
}
public static function getDefaultRegionForLangAndScript(_arg1:String, _arg2:String):String{
var _local3:Object = DEFAULT_REGION_BY_LANG_AND_SCRIPT[_arg1];
var _local4:Object = SCRIPT_BY_ID[_arg2];
if ((((_local3 == null)) || ((_local4 == null)))){
return ("");
};
return (((_local3[int(_local4)]) || ("")));
}
}
Section 193
//ResourceBundle (mx.resources.ResourceBundle)
package mx.resources {
import mx.core.*;
import flash.system.*;
import mx.utils.*;
public class ResourceBundle implements IResourceBundle {
mx_internal var _locale:String;
private var _content:Object;
mx_internal var _bundleName:String;
mx_internal static const VERSION:String = "3.4.1.10084";
mx_internal static var backupApplicationDomain:ApplicationDomain;
mx_internal static var locale:String;
public function ResourceBundle(_arg1:String=null, _arg2:String=null){
_content = {};
super();
mx_internal::_locale = _arg1;
mx_internal::_bundleName = _arg2;
_content = getContent();
}
protected function getContent():Object{
return ({});
}
public function getString(_arg1:String):String{
return (String(_getObject(_arg1)));
}
public function get content():Object{
return (_content);
}
public function getBoolean(_arg1:String, _arg2:Boolean=true):Boolean{
var _local3:String = _getObject(_arg1).toLowerCase();
if (_local3 == "false"){
return (false);
};
if (_local3 == "true"){
return (true);
};
return (_arg2);
}
public function getStringArray(_arg1:String):Array{
var _local2:Array = _getObject(_arg1).split(",");
var _local3:int = _local2.length;
var _local4:int;
while (_local4 < _local3) {
_local2[_local4] = StringUtil.trim(_local2[_local4]);
_local4++;
};
return (_local2);
}
public function getObject(_arg1:String):Object{
return (_getObject(_arg1));
}
private function _getObject(_arg1:String):Object{
var _local2:Object = content[_arg1];
if (!_local2){
throw (new Error(((("Key " + _arg1) + " was not found in resource bundle ") + bundleName)));
};
return (_local2);
}
public function get locale():String{
return (mx_internal::_locale);
}
public function get bundleName():String{
return (mx_internal::_bundleName);
}
public function getNumber(_arg1:String):Number{
return (Number(_getObject(_arg1)));
}
private static function getClassByName(_arg1:String, _arg2:ApplicationDomain):Class{
var _local3:Class;
if (_arg2.hasDefinition(_arg1)){
_local3 = (_arg2.getDefinition(_arg1) as Class);
};
return (_local3);
}
public static function getResourceBundle(_arg1:String, _arg2:ApplicationDomain=null):ResourceBundle{
var _local3:String;
var _local4:Class;
var _local5:Object;
var _local6:ResourceBundle;
if (!_arg2){
_arg2 = ApplicationDomain.currentDomain;
};
_local3 = (((mx_internal::locale + "$") + _arg1) + "_properties");
_local4 = getClassByName(_local3, _arg2);
if (!_local4){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, _arg2);
};
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, _arg2);
};
if (((!(_local4)) && (mx_internal::backupApplicationDomain))){
_local3 = (_arg1 + "_properties");
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
if (!_local4){
_local3 = _arg1;
_local4 = getClassByName(_local3, mx_internal::backupApplicationDomain);
};
};
if (_local4){
_local5 = new (_local4);
if ((_local5 is ResourceBundle)){
_local6 = ResourceBundle(_local5);
return (_local6);
};
};
throw (new Error(("Could not find resource bundle " + _arg1)));
}
}
}//package mx.resources
Section 194
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.4.1.10084";
private static var implClassDependency:ResourceManagerImpl;
private static var instance:IResourceManager;
public static function getInstance():IResourceManager{
if (!instance){
try {
instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager"));
} catch(e:Error) {
instance = new ResourceManagerImpl();
};
};
return (instance);
}
}
}//package mx.resources
Section 195
//ResourceManagerImpl (mx.resources.ResourceManagerImpl)
package mx.resources {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.utils.*;
public class ResourceManagerImpl extends EventDispatcher implements IResourceManager {
private var resourceModules:Object;
private var initializedForNonFrameworkApp:Boolean;// = false
private var localeMap:Object;
private var _localeChain:Array;
mx_internal static const VERSION:String = "3.4.1.10084";
private static var instance:IResourceManager;
public function ResourceManagerImpl(){
localeMap = {};
resourceModules = {};
super();
}
public function get localeChain():Array{
return (_localeChain);
}
public function set localeChain(_arg1:Array):void{
_localeChain = _arg1;
update();
}
public function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
var _local6:Array = String(_local5).split(",");
var _local7:int = _local6.length;
var _local8:int;
while (_local8 < _local7) {
_local6[_local8] = StringUtil.trim(_local6[_local8]);
_local8++;
};
return (_local6);
}
mx_internal function installCompiledResourceBundle(_arg1:ApplicationDomain, _arg2:String, _arg3:String):void{
var _local4:String;
var _local5:String = _arg3;
var _local6:int = _arg3.indexOf(":");
if (_local6 != -1){
_local4 = _arg3.substring(0, _local6);
_local5 = _arg3.substring((_local6 + 1));
};
if (getResourceBundle(_arg2, _arg3)){
return;
};
var _local7 = (((_arg2 + "$") + _local5) + "_properties");
if (_local4 != null){
_local7 = ((_local4 + ".") + _local7);
};
var _local8:Class;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
if (!_local8){
_local7 = _arg3;
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
_local7 = (_arg3 + "_properties");
if (_arg1.hasDefinition(_local7)){
_local8 = Class(_arg1.getDefinition(_local7));
};
};
if (!_local8){
throw (new Error((((("Could not find compiled resource bundle '" + _arg3) + "' for locale '") + _arg2) + "'.")));
};
var _local9:ResourceBundle = ResourceBundle(new (_local8));
_local9.mx_internal::_locale = _arg2;
_local9.mx_internal::_bundleName = _arg3;
addResourceBundle(_local9);
}
public function getString(_arg1:String, _arg2:String, _arg3:Array=null, _arg4:String=null):String{
var _local5:IResourceBundle = findBundle(_arg1, _arg2, _arg4);
if (!_local5){
return (null);
};
var _local6:String = String(_local5.content[_arg2]);
if (_arg3){
_local6 = StringUtil.substitute(_local6, _arg3);
};
return (_local6);
}
public function loadResourceModule(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var moduleInfo:IModuleInfo;
var resourceEventDispatcher:ResourceEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var updateFlag = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
moduleInfo = ModuleManager.getModule(url);
resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:* = _arg1.module.factory.create();
resourceModules[_arg1.module.url].resourceModule = _local2;
if (updateFlag){
update();
};
};
moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:ResourceEvent;
var _local2:String = ("Unable to load resource module from " + url);
if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){
_local3 = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
resourceEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
moduleInfo.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (resourceEventDispatcher);
}
public function getLocales():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in localeMap) {
_local1.push(_local2);
};
return (_local1);
}
public function removeResourceBundlesForLocale(_arg1:String):void{
delete localeMap[_arg1];
}
public function getResourceBundle(_arg1:String, _arg2:String):IResourceBundle{
var _local3:Object = localeMap[_arg1];
if (!_local3){
return (null);
};
return (_local3[_arg2]);
}
private function dumpResourceModule(_arg1):void{
var _local2:ResourceBundle;
var _local3:String;
for each (_local2 in _arg1.resourceBundles) {
trace(_local2.locale, _local2.bundleName);
for (_local3 in _local2.content) {
};
};
}
public function addResourceBundle(_arg1:IResourceBundle):void{
var _local2:String = _arg1.locale;
var _local3:String = _arg1.bundleName;
if (!localeMap[_local2]){
localeMap[_local2] = {};
};
localeMap[_local2][_local3] = _arg1;
}
public function getObject(_arg1:String, _arg2:String, _arg3:String=null){
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (undefined);
};
return (_local4.content[_arg2]);
}
public function getInt(_arg1:String, _arg2:String, _arg3:String=null):int{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (int(_local5));
}
private function findBundle(_arg1:String, _arg2:String, _arg3:String):IResourceBundle{
supportNonFrameworkApps();
return (((_arg3)!=null) ? getResourceBundle(_arg3, _arg1) : findResourceBundleWithResource(_arg1, _arg2));
}
private function supportNonFrameworkApps():void{
if (initializedForNonFrameworkApp){
return;
};
initializedForNonFrameworkApp = true;
if (getLocales().length > 0){
return;
};
var _local1:ApplicationDomain = ApplicationDomain.currentDomain;
if (!_local1.hasDefinition("_CompiledResourceBundleInfo")){
return;
};
var _local2:Class = Class(_local1.getDefinition("_CompiledResourceBundleInfo"));
var _local3:Array = _local2.compiledLocales;
var _local4:Array = _local2.compiledResourceBundleNames;
installCompiledResourceBundles(_local1, _local3, _local4);
localeChain = _local3;
}
public function getBundleNamesForLocale(_arg1:String):Array{
var _local3:String;
var _local2:Array = [];
for (_local3 in localeMap[_arg1]) {
_local2.push(_local3);
};
return (_local2);
}
public function getPreferredLocaleChain():Array{
return (LocaleSorter.sortLocalesByPreference(getLocales(), getSystemPreferredLocales(), null, true));
}
public function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (NaN);
};
var _local5:* = _local4.content[_arg2];
return (Number(_local5));
}
public function update():void{
dispatchEvent(new Event(Event.CHANGE));
}
public function getClass(_arg1:String, _arg2:String, _arg3:String=null):Class{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (null);
};
var _local5:* = _local4.content[_arg2];
return ((_local5 as Class));
}
public function removeResourceBundle(_arg1:String, _arg2:String):void{
delete localeMap[_arg1][_arg2];
if (getBundleNamesForLocale(_arg1).length == 0){
delete localeMap[_arg1];
};
}
public function initializeLocaleChain(_arg1:Array):void{
localeChain = LocaleSorter.sortLocalesByPreference(_arg1, getSystemPreferredLocales(), null, true);
}
public function findResourceBundleWithResource(_arg1:String, _arg2:String):IResourceBundle{
var _local5:String;
var _local6:Object;
var _local7:ResourceBundle;
if (!_localeChain){
return (null);
};
var _local3:int = _localeChain.length;
var _local4:int;
while (_local4 < _local3) {
_local5 = localeChain[_local4];
_local6 = localeMap[_local5];
if (!_local6){
} else {
_local7 = _local6[_arg1];
if (!_local7){
} else {
if ((_arg2 in _local7.content)){
return (_local7);
};
};
};
_local4++;
};
return (null);
}
public function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (0);
};
var _local5:* = _local4.content[_arg2];
return (uint(_local5));
}
private function getSystemPreferredLocales():Array{
var _local1:Array;
if (Capabilities["languages"]){
_local1 = Capabilities["languages"];
} else {
_local1 = [Capabilities.language];
};
return (_local1);
}
public function installCompiledResourceBundles(_arg1:ApplicationDomain, _arg2:Array, _arg3:Array):void{
var _local7:String;
var _local8:int;
var _local9:String;
var _local4:int = (_arg2) ? _arg2.length : 0;
var _local5:int = (_arg3) ? _arg3.length : 0;
var _local6:int;
while (_local6 < _local4) {
_local7 = _arg2[_local6];
_local8 = 0;
while (_local8 < _local5) {
_local9 = _arg3[_local8];
mx_internal::installCompiledResourceBundle(_arg1, _local7, _local9);
_local8++;
};
_local6++;
};
}
public function getBoolean(_arg1:String, _arg2:String, _arg3:String=null):Boolean{
var _local4:IResourceBundle = findBundle(_arg1, _arg2, _arg3);
if (!_local4){
return (false);
};
var _local5:* = _local4.content[_arg2];
return ((String(_local5).toLowerCase() == "true"));
}
public function unloadResourceModule(_arg1:String, _arg2:Boolean=true):void{
var _local4:Array;
var _local5:int;
var _local6:int;
var _local7:String;
var _local8:String;
var _local3:ResourceModuleInfo = resourceModules[_arg1];
if (!_local3){
return;
};
if (_local3.resourceModule){
_local4 = _local3.resourceModule.resourceBundles;
if (_local4){
_local5 = _local4.length;
_local6 = 0;
while (_local6 < _local5) {
_local7 = _local4[_local6].locale;
_local8 = _local4[_local6].bundleName;
removeResourceBundle(_local7, _local8);
_local6++;
};
};
};
resourceModules[_arg1] = null;
delete resourceModules[_arg1];
_local3.moduleInfo.unload();
if (_arg2){
this.update();
};
}
public static function getInstance():IResourceManager{
if (!instance){
instance = new (ResourceManagerImpl);
};
return (instance);
}
}
}//package mx.resources
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class ResourceModuleInfo {
public var resourceModule:IResourceModule;
public var errorHandler:Function;
public var readyHandler:Function;
public var moduleInfo:IModuleInfo;
private function ResourceModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.moduleInfo = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
class ResourceEventDispatcher extends EventDispatcher {
private function ResourceEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE);
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
Section 196
//HaloBorder (mx.skins.halo.HaloBorder)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.graphics.*;
import mx.utils.*;
public class HaloBorder extends RectangularBorder {
mx_internal var radiusObj:Object;
mx_internal var backgroundHole:Object;
mx_internal var radius:Number;
mx_internal var bRoundedCorners:Boolean;
mx_internal var backgroundColor:Object;
private var dropShadow:RectangularDropShadow;
protected var _borderMetrics:EdgeMetrics;
mx_internal var backgroundAlphaName:String;
mx_internal static const VERSION:String = "3.4.1.10084";
private static var BORDER_WIDTHS:Object = {none:0, solid:1, inset:2, outset:2, alert:3, dropdown:2, menuBorder:1, comboNonEdit:2};
public function HaloBorder(){
BORDER_WIDTHS["default"] = 3;
}
override public function styleChanged(_arg1:String):void{
if ((((((((((_arg1 == null)) || ((_arg1 == "styleName")))) || ((_arg1 == "borderStyle")))) || ((_arg1 == "borderThickness")))) || ((_arg1 == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
if (((isNaN(_arg1)) || (isNaN(_arg2)))){
return;
};
super.updateDisplayList(_arg1, _arg2);
backgroundColor = getBackgroundColor();
bRoundedCorners = false;
backgroundAlphaName = "backgroundAlpha";
backgroundHole = null;
radius = 0;
radiusObj = null;
drawBorder(_arg1, _arg2);
drawBackground(_arg1, _arg2);
}
mx_internal function drawBorder(_arg1:Number, _arg2:Number):void{
var _local5:Number;
var _local6:uint;
var _local7:uint;
var _local8:String;
var _local9:Number;
var _local10:uint;
var _local11:Boolean;
var _local12:uint;
var _local13:Array;
var _local14:Array;
var _local15:uint;
var _local16:uint;
var _local17:uint;
var _local18:uint;
var _local19:Boolean;
var _local20:Object;
var _local22:Number;
var _local23:Number;
var _local24:Number;
var _local25:Object;
var _local27:Number;
var _local28:Number;
var _local29:IContainer;
var _local30:EdgeMetrics;
var _local31:Boolean;
var _local32:Number;
var _local33:Array;
var _local34:uint;
var _local35:Boolean;
var _local36:Number;
var _local3:String = getStyle("borderStyle");
var _local4:Array = getStyle("highlightAlphas");
var _local21:Boolean;
var _local26:Graphics = graphics;
_local26.clear();
if (_local3){
switch (_local3){
case "none":
break;
case "inset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, 25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local22, _local24, Number(_local25), Number(_local25), Number(_local25));
break;
case "outset":
_local7 = getStyle("borderColor");
_local22 = ColorUtil.adjustBrightness2(_local7, -40);
_local23 = ColorUtil.adjustBrightness2(_local7, -25);
_local24 = ColorUtil.adjustBrightness2(_local7, 40);
_local25 = backgroundColor;
if ((((_local25 === null)) || ((_local25 === "")))){
_local25 = _local7;
};
draw3dBorder(_local23, _local24, _local22, Number(_local25), Number(_local25), Number(_local25));
break;
case "alert":
case "default":
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_local27 = getStyle("backgroundAlpha");
_local5 = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local28 = (bRoundedCorners) ? radius : 0;
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, _local28, _local28);
if (!bRoundedCorners){
radiusObj = {};
};
_local29 = (parent as IContainer);
if (_local29){
_local30 = _local29.viewMetrics;
backgroundHole = {x:_local30.left, y:_local30.top, w:Math.max(0, ((_arg1 - _local30.left) - _local30.right)), h:Math.max(0, ((_arg2 - _local30.top) - _local30.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (_local27 != _local5){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
_local26.beginFill(Number(backgroundColor), _local27);
_local26.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
_local26.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
break;
case "dropdown":
_local12 = getStyle("dropdownBorderColor");
drawDropShadow(0, 0, _arg1, _arg2, 4, 0, 0, 4);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, 5068126, 1);
drawRoundRect(0, 0, _arg1, _arg2, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
if (!isNaN(_local12)){
drawRoundRect(0, 0, (_arg1 + 1), _arg2, {tl:4, tr:0, br:0, bl:4}, _local12, 0.5);
drawRoundRect(1, 1, (_arg1 - 1), (_arg2 - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (_arg1 - 1), (_arg2 - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (_arg1 - 1), (_arg2 - 3)));
};
backgroundColor = null;
break;
case "menuBorder":
_local7 = getStyle("borderColor");
drawRoundRect(0, 0, _arg1, _arg2, 0, _local7, 1);
drawDropShadow(1, 1, (_arg1 - 2), (_arg2 - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((_arg1 == 0)) || ((_arg2 == 0)))){
backgroundColor = null;
break;
};
_local14 = getStyle("footerColors");
_local31 = !((_local14 == null));
_local32 = getStyle("borderAlpha");
if (_local31){
_local26.lineStyle(0, ((_local14.length > 0)) ? _local14[1] : _local14[0], _local32);
_local26.moveTo(0, 0);
_local26.lineTo(_arg1, 0);
_local26.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
radius = IStyleClient(parent.parent).getStyle("cornerRadius");
_local32 = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(radius)){
radius = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
radius = 0;
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
if ((((_local14.length > 1)) && (!((_local14[0] == _local14[1]))))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(1, 2, (_arg1 - 2), (_arg2 - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, _local14, _local32, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
};
backgroundColor = null;
break;
case "applicationControlBar":
_local13 = getStyle("fillColors");
_local5 = getStyle("backgroundAlpha");
_local4 = getStyle("highlightAlphas");
_local33 = getStyle("fillAlphas");
_local11 = getStyle("docked");
_local34 = uint(backgroundColor);
radius = getStyle("cornerRadius");
if (!radius){
radius = 0;
};
drawDropShadow(0, 1, _arg1, (_arg2 - 1), radius, radius, radius, radius);
if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local34, _local5, verticalGradientMatrix(0, 0, _arg1, _arg2));
};
drawRoundRect(0, 1, _arg1, (_arg2 - 1), radius, _local13, _local33, verticalGradientMatrix(0, 0, _arg1, _arg2));
drawRoundRect(0, 1, _arg1, ((_arg2 / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], _local4, verticalGradientMatrix(0, 0, _arg1, ((_arg2 / 2) - 1)));
drawRoundRect(0, 1, _arg1, (_arg2 - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:_arg1, h:(_arg2 - 2), r:{tl:radius, tr:radius, bl:0, br:0}});
backgroundColor = null;
break;
default:
_local7 = getStyle("borderColor");
_local9 = getStyle("borderThickness");
_local8 = getStyle("borderSides");
_local35 = true;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
_local36 = Math.max((radius - _local9), 0);
_local20 = {x:_local9, y:_local9, w:(_arg1 - (_local9 * 2)), h:(_arg2 - (_local9 * 2)), r:_local36};
if (!bRoundedCorners){
radiusObj = {tl:radius, tr:radius, bl:0, br:0};
_local20.r = {tl:_local36, tr:_local36, bl:0, br:0};
};
if (_local8 != "left top right bottom"){
_local20.r = {tl:_local36, tr:_local36, bl:(bRoundedCorners) ? _local36 : 0, br:(bRoundedCorners) ? _local36 : 0};
radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0};
_local8 = _local8.toLowerCase();
if (_local8.indexOf("left") == -1){
_local20.x = 0;
_local20.w = (_local20.w + _local9);
_local20.r.tl = 0;
_local20.r.bl = 0;
radiusObj.tl = 0;
radiusObj.bl = 0;
_local35 = false;
};
if (_local8.indexOf("top") == -1){
_local20.y = 0;
_local20.h = (_local20.h + _local9);
_local20.r.tl = 0;
_local20.r.tr = 0;
radiusObj.tl = 0;
radiusObj.tr = 0;
_local35 = false;
};
if (_local8.indexOf("right") == -1){
_local20.w = (_local20.w + _local9);
_local20.r.tr = 0;
_local20.r.br = 0;
radiusObj.tr = 0;
radiusObj.br = 0;
_local35 = false;
};
if (_local8.indexOf("bottom") == -1){
_local20.h = (_local20.h + _local9);
_local20.r.bl = 0;
_local20.r.br = 0;
radiusObj.bl = 0;
radiusObj.br = 0;
_local35 = false;
};
};
if ((((radius == 0)) && (_local35))){
drawDropShadow(0, 0, _arg1, _arg2, 0, 0, 0, 0);
_local26.beginFill(_local7);
_local26.drawRect(0, 0, _arg1, _arg2);
_local26.drawRect(_local9, _local9, (_arg1 - (2 * _local9)), (_arg2 - (2 * _local9)));
_local26.endFill();
} else {
if (radiusObj){
drawDropShadow(0, 0, _arg1, _arg2, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl);
drawRoundRect(0, 0, _arg1, _arg2, radiusObj, _local7, 1, null, null, null, _local20);
radiusObj.tl = Math.max((radius - _local9), 0);
radiusObj.tr = Math.max((radius - _local9), 0);
radiusObj.bl = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
radiusObj.br = (bRoundedCorners) ? Math.max((radius - _local9), 0) : 0;
} else {
drawDropShadow(0, 0, _arg1, _arg2, radius, radius, radius, radius);
drawRoundRect(0, 0, _arg1, _arg2, radius, _local7, 1, null, null, null, _local20);
radius = Math.max((getStyle("cornerRadius") - _local9), 0);
};
};
};
};
}
mx_internal function drawBackground(_arg1:Number, _arg2:Number):void{
var _local4:Number;
var _local5:Number;
var _local6:EdgeMetrics;
var _local7:Graphics;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Array;
var _local12:Number;
if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
_local4 = Number(backgroundColor);
_local5 = 1;
_local6 = getBackgroundColorMetrics();
_local7 = graphics;
if (((((isNaN(_local4)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){
_local5 = 0;
_local4 = 0xFFFFFF;
} else {
_local5 = getStyle(backgroundAlphaName);
};
if (((!((radius == 0))) || (backgroundHole))){
_local8 = _local6.bottom;
if (radiusObj){
_local9 = Math.max((radius - Math.max(_local6.top, _local6.left, _local6.right)), 0);
_local10 = (bRoundedCorners) ? Math.max((radius - Math.max(_local6.bottom, _local6.left, _local6.right)), 0) : 0;
radiusObj = {tl:_local9, tr:_local9, bl:_local10, br:_local10};
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radiusObj, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
} else {
drawRoundRect(_local6.left, _local6.top, (width - (_local6.left + _local6.right)), (height - (_local6.top + _local8)), radius, _local4, _local5, null, GradientType.LINEAR, null, backgroundHole);
};
} else {
_local7.beginFill(_local4, _local5);
_local7.drawRect(_local6.left, _local6.top, ((_arg1 - _local6.right) - _local6.left), ((_arg2 - _local6.bottom) - _local6.top));
_local7.endFill();
};
};
var _local3:String = getStyle("borderStyle");
if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((_local3 == "alert")) || ((_local3 == "default")))))) && ((getStyle("headerColors") == null)))){
_local11 = getStyle("highlightAlphas");
_local12 = (_local11) ? _local11[0] : 0.3;
drawRoundRect(0, 0, _arg1, _arg2, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, _local12, null, GradientType.LINEAR, null, {x:0, y:1, w:_arg1, h:(_arg2 - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
mx_internal function drawDropShadow(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):void{
var _local11:Number;
var _local12:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((_arg3 == 0)))) || ((_arg4 == 0)))){
return;
};
var _local9:Number = getStyle("shadowDistance");
var _local10:String = getStyle("shadowDirection");
if (getStyle("borderStyle") == "applicationControlBar"){
_local12 = getStyle("docked");
_local11 = (_local12) ? 90 : getDropShadowAngle(_local9, _local10);
_local9 = Math.abs(_local9);
} else {
_local11 = getDropShadowAngle(_local9, _local10);
_local9 = (Math.abs(_local9) + 2);
};
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = _local9;
dropShadow.angle = _local11;
dropShadow.color = getStyle("dropShadowColor");
dropShadow.alpha = 0.4;
dropShadow.tlRadius = _arg5;
dropShadow.trRadius = _arg6;
dropShadow.blRadius = _arg8;
dropShadow.brRadius = _arg7;
dropShadow.drawShadow(graphics, _arg1, _arg2, _arg3, _arg4);
}
mx_internal function getBackgroundColor():Object{
var _local2:Object;
var _local1:IUIComponent = (parent as IUIComponent);
if (((_local1) && (!(_local1.enabled)))){
_local2 = getStyle("backgroundDisabledColor");
if (((!((_local2 === null))) && (StyleManager.isValidStyleValue(_local2)))){
return (_local2);
};
};
return (getStyle("backgroundColor"));
}
mx_internal function draw3dBorder(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):void{
var _local7:Number = width;
var _local8:Number = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
var _local9:Graphics = graphics;
_local9.beginFill(_arg1);
_local9.drawRect(0, 0, _local7, _local8);
_local9.drawRect(1, 0, (_local7 - 2), _local8);
_local9.endFill();
_local9.beginFill(_arg2);
_local9.drawRect(1, 0, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg3);
_local9.drawRect(1, (_local8 - 1), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg4);
_local9.drawRect(1, 1, (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg5);
_local9.drawRect(1, (_local8 - 2), (_local7 - 2), 1);
_local9.endFill();
_local9.beginFill(_arg6);
_local9.drawRect(1, 2, (_local7 - 2), (_local8 - 4));
_local9.drawRect(2, 2, (_local7 - 4), (_local8 - 4));
_local9.endFill();
}
mx_internal function getBackgroundColorMetrics():EdgeMetrics{
return (borderMetrics);
}
mx_internal function getDropShadowAngle(_arg1:Number, _arg2:String):Number{
if (_arg2 == "left"){
return (((_arg1 >= 0)) ? 135 : 225);
//unresolved jump
};
if (_arg2 == "right"){
return (((_arg1 >= 0)) ? 45 : 315);
//unresolved jump
};
return (((_arg1 >= 0)) ? 90 : 270);
}
override public function get borderMetrics():EdgeMetrics{
var _local1:Number;
var _local3:String;
if (_borderMetrics){
return (_borderMetrics);
};
var _local2:String = getStyle("borderStyle");
if ((((_local2 == "default")) || ((_local2 == "alert")))){
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
return (EdgeMetrics.EMPTY);
};
} else {
if ((((_local2 == "controlBar")) || ((_local2 == "applicationControlBar")))){
_borderMetrics = new EdgeMetrics(1, 1, 1, 1);
} else {
if (_local2 == "solid"){
_local1 = getStyle("borderThickness");
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
_local3 = getStyle("borderSides");
if (_local3 != "left top right bottom"){
if (_local3.indexOf("left") == -1){
_borderMetrics.left = 0;
};
if (_local3.indexOf("top") == -1){
_borderMetrics.top = 0;
};
if (_local3.indexOf("right") == -1){
_borderMetrics.right = 0;
};
if (_local3.indexOf("bottom") == -1){
_borderMetrics.bottom = 0;
};
};
} else {
_local1 = BORDER_WIDTHS[_local2];
if (isNaN(_local1)){
_local1 = 0;
};
_borderMetrics = new EdgeMetrics(_local1, _local1, _local1, _local1);
};
};
};
return (_borderMetrics);
}
}
}//package mx.skins.halo
Section 197
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
import mx.core.*;
import flash.display.*;
import mx.styles.*;
import mx.skins.*;
import mx.utils.*;
public class HaloFocusRect extends ProgrammaticSkin implements IStyleClient {
private var _focusColor:Number;
mx_internal static const VERSION:String = "3.4.1.10084";
public function get inheritingStyles():Object{
return (styleName.inheritingStyles);
}
public function set inheritingStyles(_arg1:Object):void{
}
public function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void{
}
public function registerEffects(_arg1:Array):void{
}
public function regenerateStyleCache(_arg1:Boolean):void{
}
public function get styleDeclaration():CSSStyleDeclaration{
return (CSSStyleDeclaration(styleName));
}
public function getClassStyleDeclarations():Array{
return ([]);
}
public function get className():String{
return ("HaloFocusRect");
}
public function clearStyle(_arg1:String):void{
if (_arg1 == "focusColor"){
_focusColor = NaN;
};
}
public function setStyle(_arg1:String, _arg2):void{
if (_arg1 == "focusColor"){
_focusColor = _arg2;
};
}
public function set nonInheritingStyles(_arg1:Object):void{
}
public function get nonInheritingStyles():Object{
return (styleName.nonInheritingStyles);
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local15:Number;
var _local16:Number;
var _local17:Number;
super.updateDisplayList(_arg1, _arg2);
var _local3:String = getStyle("focusBlendMode");
var _local4:Number = getStyle("focusAlpha");
var _local5:Number = getStyle("focusColor");
var _local6:Number = getStyle("cornerRadius");
var _local7:Number = getStyle("focusThickness");
var _local8:String = getStyle("focusRoundedCorners");
var _local9:Number = getStyle("themeColor");
var _local10:Number = _local5;
if (isNaN(_local10)){
_local10 = _local9;
};
var _local11:Graphics = graphics;
_local11.clear();
if (_local3){
blendMode = _local3;
};
if (((!((_local8 == "tl tr bl br"))) && ((_local6 > 0)))){
_local12 = 0;
_local13 = 0;
_local14 = 0;
_local15 = 0;
_local16 = (_local6 + _local7);
if (_local8.indexOf("tl") >= 0){
_local12 = _local16;
};
if (_local8.indexOf("tr") >= 0){
_local14 = _local16;
};
if (_local8.indexOf("bl") >= 0){
_local13 = _local16;
};
if (_local8.indexOf("br") >= 0){
_local15 = _local16;
};
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, 0, 0, _arg1, _arg2, _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
_local16 = (_local6 + (_local7 / 2));
_local12 = (_local12) ? _local16 : 0;
_local14 = (_local14) ? _local16 : 0;
_local13 = (_local13) ? _local16 : 0;
_local15 = (_local15) ? _local16 : 0;
_local11.beginFill(_local10, _local4);
GraphicsUtil.drawRoundRectComplex(_local11, (_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local12, _local14, _local13, _local15);
_local12 = (_local12) ? _local6 : 0;
_local14 = (_local14) ? _local6 : 0;
_local13 = (_local13) ? _local6 : 0;
_local15 = (_local15) ? _local6 : 0;
GraphicsUtil.drawRoundRectComplex(_local11, _local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local12, _local14, _local13, _local15);
_local11.endFill();
} else {
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + _local7) : 0 * 2);
_local11.drawRoundRect(0, 0, _arg1, _arg2, _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
_local11.beginFill(_local10, _local4);
_local17 = (((_local6 > 0)) ? (_local6 + (_local7 / 2)) : 0 * 2);
_local11.drawRoundRect((_local7 / 2), (_local7 / 2), (_arg1 - _local7), (_arg2 - _local7), _local17, _local17);
_local17 = (_local6 * 2);
_local11.drawRoundRect(_local7, _local7, (_arg1 - (2 * _local7)), (_arg2 - (2 * _local7)), _local17, _local17);
_local11.endFill();
};
}
override public function getStyle(_arg1:String){
return (((_arg1 == "focusColor")) ? _focusColor : super.getStyle(_arg1));
}
public function set styleDeclaration(_arg1:CSSStyleDeclaration):void{
}
}
}//package mx.skins.halo
Section 198
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin implements IBorder {
mx_internal static const VERSION:String = "3.4.1.10084";
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 199
//ProgrammaticSkin (mx.skins.ProgrammaticSkin)
package mx.skins {
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import mx.managers.*;
import mx.utils.*;
public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin {
private var _initialized:Boolean;// = false
private var _height:Number;
private var invalidateDisplayListFlag:Boolean;// = false
private var _styleName:IStyleClient;
private var _nestLevel:int;// = 0
private var _processedDescriptors:Boolean;// = false
private var _updateCompletePendingFlag:Boolean;// = true
private var _width:Number;
mx_internal static const VERSION:String = "3.4.1.10084";
private static var tempMatrix:Matrix = new Matrix();
public function ProgrammaticSkin(){
_width = measuredWidth;
_height = measuredHeight;
}
public function getStyle(_arg1:String){
return ((_styleName) ? _styleName.getStyle(_arg1) : null);
}
protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
}
public function get nestLevel():int{
return (_nestLevel);
}
public function set nestLevel(_arg1:int):void{
_nestLevel = _arg1;
invalidateDisplayList();
}
override public function get height():Number{
return (_height);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function verticalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 90));
}
public function validateSize(_arg1:Boolean=false):void{
}
public function invalidateDisplayList():void{
if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){
invalidateDisplayListFlag = true;
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
}
public function set updateCompletePendingFlag(_arg1:Boolean):void{
_updateCompletePendingFlag = _arg1;
}
protected function horizontalGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Matrix{
return (rotatedGradientMatrix(_arg1, _arg2, _arg3, _arg4, 0));
}
override public function set height(_arg1:Number):void{
_height = _arg1;
invalidateDisplayList();
}
public function set processedDescriptors(_arg1:Boolean):void{
_processedDescriptors = _arg1;
}
public function validateDisplayList():void{
invalidateDisplayListFlag = false;
updateDisplayList(width, height);
}
public function get measuredWidth():Number{
return (0);
}
override public function set width(_arg1:Number):void{
_width = _arg1;
invalidateDisplayList();
}
public function get measuredHeight():Number{
return (0);
}
public function set initialized(_arg1:Boolean):void{
_initialized = _arg1;
}
protected function drawRoundRect(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Object=null, _arg6:Object=null, _arg7:Object=null, _arg8:Matrix=null, _arg9:String="linear", _arg10:Array=null, _arg11:Object=null):void{
var _local13:Number;
var _local14:Array;
var _local15:Object;
var _local12:Graphics = graphics;
if ((((_arg3 == 0)) || ((_arg4 == 0)))){
return;
};
if (_arg6 !== null){
if ((_arg6 is uint)){
_local12.beginFill(uint(_arg6), Number(_arg7));
} else {
if ((_arg6 is Array)){
_local14 = ((_arg7 is Array)) ? (_arg7 as Array) : [_arg7, _arg7];
if (!_arg10){
_arg10 = [0, 0xFF];
};
_local12.beginGradientFill(_arg9, (_arg6 as Array), _local14, _arg10, _arg8);
};
};
};
if (!_arg5){
_local12.drawRect(_arg1, _arg2, _arg3, _arg4);
} else {
if ((_arg5 is Number)){
_local13 = (Number(_arg5) * 2);
_local12.drawRoundRect(_arg1, _arg2, _arg3, _arg4, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg1, _arg2, _arg3, _arg4, _arg5.tl, _arg5.tr, _arg5.bl, _arg5.br);
};
};
if (_arg11){
_local15 = _arg11.r;
if ((_local15 is Number)){
_local13 = (Number(_local15) * 2);
_local12.drawRoundRect(_arg11.x, _arg11.y, _arg11.w, _arg11.h, _local13, _local13);
} else {
GraphicsUtil.drawRoundRectComplex(_local12, _arg11.x, _arg11.y, _arg11.w, _arg11.h, _local15.tl, _local15.tr, _local15.bl, _local15.br);
};
};
if (_arg6 !== null){
_local12.endFill();
};
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function set styleName(_arg1:Object):void{
if (_styleName != _arg1){
_styleName = (_arg1 as IStyleClient);
invalidateDisplayList();
};
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean;
if (_width != _arg1){
_width = _arg1;
_local3 = true;
};
if (_height != _arg2){
_height = _arg2;
_local3 = true;
};
if (_local3){
invalidateDisplayList();
};
}
public function styleChanged(_arg1:String):void{
invalidateDisplayList();
}
override public function get width():Number{
return (_width);
}
public function invalidateProperties():void{
}
public function get initialized():Boolean{
return (_initialized);
}
protected function rotatedGradientMatrix(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Matrix{
tempMatrix.createGradientBox(_arg3, _arg4, ((_arg5 * Math.PI) / 180), _arg1, _arg2);
return (tempMatrix);
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function get styleName():Object{
return (_styleName);
}
public function validateNow():void{
if (invalidateDisplayListFlag){
validateDisplayList();
};
}
public function invalidateSize():void{
}
public function validateProperties():void{
}
}
}//package mx.skins
Section 200
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import mx.styles.*;
import flash.system.*;
import mx.resources.*;
import flash.net.*;
public class RectangularBorder extends Border implements IRectangularBorder {
private var backgroundImage:DisplayObject;
private var backgroundImageHeight:Number;
private var _backgroundImageBounds:Rectangle;
private var backgroundImageStyle:Object;
private var backgroundImageWidth:Number;
private var resourceManager:IResourceManager;
mx_internal static const VERSION:String = "3.4.1.10084";
public function RectangularBorder(){
resourceManager = ResourceManager.getInstance();
super();
addEventListener(Event.REMOVED, removedHandler);
}
public function layoutBackgroundImage():void{
var _local4:Number;
var _local5:Number;
var _local7:Number;
var _local8:Number;
var _local14:Number;
var _local15:Graphics;
var _local1:DisplayObject = parent;
var _local2:EdgeMetrics = ((_local1 is IContainer)) ? IContainer(_local1).viewMetrics : borderMetrics;
var _local3 = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageBounds){
_local4 = _backgroundImageBounds.width;
_local5 = _backgroundImageBounds.height;
} else {
_local4 = ((width - _local2.left) - _local2.right);
_local5 = ((height - _local2.top) - _local2.bottom);
};
var _local6:Number = getBackgroundSize();
if (isNaN(_local6)){
_local7 = 1;
_local8 = 1;
} else {
_local14 = (_local6 * 0.01);
_local7 = ((_local14 * _local4) / backgroundImageWidth);
_local8 = ((_local14 * _local5) / backgroundImageHeight);
};
backgroundImage.scaleX = _local7;
backgroundImage.scaleY = _local8;
var _local9:Number = Math.round((0.5 * (_local4 - (backgroundImageWidth * _local7))));
var _local10:Number = Math.round((0.5 * (_local5 - (backgroundImageHeight * _local8))));
backgroundImage.x = _local2.left;
backgroundImage.y = _local2.top;
var _local11:Shape = Shape(backgroundImage.mask);
_local11.x = _local2.left;
_local11.y = _local2.top;
if (((_local3) && ((_local1 is IContainer)))){
_local9 = (_local9 - IContainer(_local1).horizontalScrollPosition);
_local10 = (_local10 - IContainer(_local1).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + _local9);
backgroundImage.y = (backgroundImage.y + _local10);
var _local12:Number = ((width - _local2.left) - _local2.right);
var _local13:Number = ((height - _local2.top) - _local2.bottom);
if (((!((_local11.width == _local12))) || (!((_local11.height == _local13))))){
_local15 = _local11.graphics;
_local15.clear();
_local15.beginFill(0xFFFFFF);
_local15.drawRect(0, 0, _local12, _local13);
_local15.endFill();
};
}
public function set backgroundImageBounds(_arg1:Rectangle):void{
if (((((_backgroundImageBounds) && (_arg1))) && (_backgroundImageBounds.equals(_arg1)))){
return;
};
_backgroundImageBounds = _arg1;
invalidateDisplayList();
}
private function getBackgroundSize():Number{
var _local3:int;
var _local1:Number = NaN;
var _local2:Object = getStyle("backgroundSize");
if (((_local2) && ((_local2 is String)))){
_local3 = _local2.indexOf("%");
if (_local3 != -1){
_local1 = Number(_local2.substr(0, _local3));
};
};
return (_local1);
}
private function removedHandler(_arg1:Event):void{
var _local2:IChildList;
if (backgroundImage){
_local2 = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
_local2.removeChild(backgroundImage.mask);
_local2.removeChild(backgroundImage);
backgroundImage = null;
};
}
private function initBackgroundImage(_arg1:DisplayObject):void{
backgroundImage = _arg1;
if ((_arg1 is Loader)){
backgroundImageWidth = Loader(_arg1).contentLoaderInfo.width;
backgroundImageHeight = Loader(_arg1).contentLoaderInfo.height;
} else {
backgroundImageWidth = backgroundImage.width;
backgroundImageHeight = backgroundImage.height;
if ((_arg1 is ISimpleStyleClient)){
ISimpleStyleClient(_arg1).styleName = styleName;
};
};
var _local2:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
var _local3:Shape = new FlexShape();
_local3.name = "backgroundMask";
_local3.x = 0;
_local3.y = 0;
_local2.addChild(_local3);
var _local4:int = _local2.getChildIndex(this);
_local2.addChildAt(backgroundImage, (_local4 + 1));
backgroundImage.mask = _local3;
}
public function get backgroundImageBounds():Rectangle{
return (_backgroundImageBounds);
}
public function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function completeEventHandler(_arg1:Event):void{
if (!parent){
return;
};
var _local2:DisplayObject = DisplayObject(LoaderInfo(_arg1.target).loader);
initBackgroundImage(_local2);
layoutBackgroundImage();
dispatchEvent(_arg1.clone());
}
override protected function updateDisplayList(_arg1:Number, _arg2:Number):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var message:String;
var unscaledWidth = _arg1;
var unscaledHeight = _arg2;
if (!parent){
return;
};
var newStyle:Object = getStyle("backgroundImage");
if (newStyle != backgroundImageStyle){
removedHandler(null);
backgroundImageStyle = newStyle;
if (((newStyle) && ((newStyle as Class)))){
cls = Class(newStyle);
initBackgroundImage(new (cls));
} else {
if (((newStyle) && ((newStyle is String)))){
try {
cls = Class(getDefinitionByName(String(newStyle)));
} catch(e:Error) {
};
if (cls){
newStyleObj = new (cls);
initBackgroundImage(newStyleObj);
} else {
loader = new FlexLoader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeEventHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorEventHandler);
loader.contentLoaderInfo.addEventListener(ErrorEvent.ERROR, errorEventHandler);
loaderContext = new LoaderContext();
loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
loader.load(new URLRequest(String(newStyle)), loaderContext);
};
} else {
if (newStyle){
message = resourceManager.getString("skins", "notLoaded", [newStyle]);
throw (new Error(message));
};
};
};
};
if (backgroundImage){
layoutBackgroundImage();
};
}
private function errorEventHandler(_arg1:Event):void{
}
}
}//package mx.skins
Section 201
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.utils.*;
import mx.managers.*;
public class CSSStyleDeclaration extends EventDispatcher {
mx_internal var effects:Array;
protected var overrides:Object;
public var defaultFactory:Function;
public var factory:Function;
mx_internal var selectorRefCount:int;// = 0
private var styleManager:IStyleManager2;
private var clones:Dictionary;
mx_internal static const VERSION:String = "3.4.1.10084";
private static const NOT_A_COLOR:uint = 4294967295;
private static const FILTERMAP_PROP:String = "__reserved__filterMap";
public function CSSStyleDeclaration(_arg1:String=null){
clones = new Dictionary(true);
super();
if (_arg1){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
styleManager.setStyleDeclaration(_arg1, this, false);
};
}
mx_internal function addStyleToProtoChain(_arg1:Object, _arg2:DisplayObject, _arg3:Object=null):Object{
var p:String;
var emptyObjectFactory:Function;
var filteredChain:Object;
var filterObjectFactory:Function;
var i:String;
var chain = _arg1;
var target = _arg2;
var filterMap = _arg3;
var nodeAddedToChain:Boolean;
var originalChain:Object = chain;
if (filterMap){
chain = {};
};
if (defaultFactory != null){
defaultFactory.prototype = chain;
chain = new defaultFactory();
nodeAddedToChain = true;
};
if (factory != null){
factory.prototype = chain;
chain = new factory();
nodeAddedToChain = true;
};
if (overrides){
if ((((defaultFactory == null)) && ((factory == null)))){
emptyObjectFactory = function ():void{
};
emptyObjectFactory.prototype = chain;
chain = new (emptyObjectFactory);
nodeAddedToChain = true;
};
for (p in overrides) {
if (overrides[p] === undefined){
delete chain[p];
} else {
chain[p] = overrides[p];
};
};
};
if (filterMap){
if (nodeAddedToChain){
filteredChain = {};
filterObjectFactory = function ():void{
};
filterObjectFactory.prototype = originalChain;
filteredChain = new (filterObjectFactory);
for (i in chain) {
if (filterMap[i] != null){
filteredChain[filterMap[i]] = chain[i];
};
};
chain = filteredChain;
chain[FILTERMAP_PROP] = filterMap;
} else {
chain = originalChain;
};
};
if (nodeAddedToChain){
clones[chain] = 1;
};
return (chain);
}
public function getStyle(_arg1:String){
var _local2:*;
var _local3:*;
if (overrides){
if ((((_arg1 in overrides)) && ((overrides[_arg1] === undefined)))){
return (undefined);
};
_local3 = overrides[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (factory != null){
factory.prototype = {};
_local2 = new factory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
if (defaultFactory != null){
defaultFactory.prototype = {};
_local2 = new defaultFactory();
_local3 = _local2[_arg1];
if (_local3 !== undefined){
return (_local3);
};
};
return (undefined);
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, undefined);
}
public function setStyle(_arg1:String, _arg2):void{
var _local7:int;
var _local8:Object;
var _local3:Object = getStyle(_arg1);
var _local4:Boolean;
if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((_local3 === _arg2))))){
_local4 = true;
};
if (_arg2 !== undefined){
setStyle(_arg1, _arg2);
} else {
if (_arg2 == _local3){
return;
};
setStyle(_arg1, _arg2);
};
var _local5:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local6:int = _local5.length;
if (_local4){
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.regenerateStyleCache(true);
_local7++;
};
};
_local7 = 0;
while (_local7 < _local6) {
_local8 = _local5[_local7];
_local8.notifyStyleChangeInChildren(_arg1, true);
_local7++;
};
}
private function clearStyleAttr(_arg1:String):void{
var _local2:*;
if (!overrides){
overrides = {};
};
overrides[_arg1] = undefined;
for (_local2 in clones) {
delete _local2[_arg1];
};
}
mx_internal function createProtoChainRoot():Object{
var _local1:Object = {};
if (defaultFactory != null){
defaultFactory.prototype = _local1;
_local1 = new defaultFactory();
};
if (factory != null){
factory.prototype = _local1;
_local1 = new factory();
};
clones[_local1] = 1;
return (_local1);
}
mx_internal function clearOverride(_arg1:String):void{
if (((overrides) && (overrides[_arg1]))){
delete overrides[_arg1];
};
}
mx_internal function setStyle(_arg1:String, _arg2):void{
var _local3:Object;
var _local4:*;
var _local5:Number;
var _local6:Object;
if (_arg2 === undefined){
clearStyleAttr(_arg1);
return;
};
if ((_arg2 is String)){
if (!styleManager){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
};
_local5 = styleManager.getColorName(_arg2);
if (_local5 != NOT_A_COLOR){
_arg2 = _local5;
};
};
if (defaultFactory != null){
_local3 = new defaultFactory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if (factory != null){
_local3 = new factory();
if (_local3[_arg1] !== _arg2){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
} else {
if (overrides){
delete overrides[_arg1];
};
};
};
if ((((defaultFactory == null)) && ((factory == null)))){
if (!overrides){
overrides = {};
};
overrides[_arg1] = _arg2;
};
for (_local4 in clones) {
_local6 = _local4[FILTERMAP_PROP];
if (_local6){
if (_local6[_arg1] != null){
_local4[_local6[_arg1]] = _arg2;
};
} else {
_local4[_arg1] = _arg2;
};
};
}
}
}//package mx.styles
Section 202
//ISimpleStyleClient (mx.styles.ISimpleStyleClient)
package mx.styles {
public interface ISimpleStyleClient {
function set styleName(_arg1:Object):void;
function styleChanged(_arg1:String):void;
function get styleName():Object;
}
}//package mx.styles
Section 203
//IStyleClient (mx.styles.IStyleClient)
package mx.styles {
public interface IStyleClient extends ISimpleStyleClient {
function regenerateStyleCache(_arg1:Boolean):void;
function get className():String;
function clearStyle(_arg1:String):void;
function getClassStyleDeclarations():Array;
function get inheritingStyles():Object;
function set nonInheritingStyles(_arg1:Object):void;
function setStyle(_arg1:String, _arg2):void;
function get styleDeclaration():CSSStyleDeclaration;
function set styleDeclaration(_arg1:CSSStyleDeclaration):void;
function get nonInheritingStyles():Object;
function set inheritingStyles(_arg1:Object):void;
function getStyle(_arg1:String);
function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void;
function registerEffects(_arg1:Array):void;
}
}//package mx.styles
Section 204
//IStyleManager (mx.styles.IStyleManager)
package mx.styles {
import flash.events.*;
public interface IStyleManager {
function isColorName(_arg1:String):Boolean;
function registerParentDisplayListInvalidatingStyle(_arg1:String):void;
function registerInheritingStyle(_arg1:String):void;
function set stylesRoot(_arg1:Object):void;
function get typeSelectorCache():Object;
function styleDeclarationsChanged():void;
function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void;
function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean;
function isSizeInvalidatingStyle(_arg1:String):Boolean;
function get inheritingStyles():Object;
function isValidStyleValue(_arg1):Boolean;
function isParentSizeInvalidatingStyle(_arg1:String):Boolean;
function getColorName(_arg1:Object):uint;
function set typeSelectorCache(_arg1:Object):void;
function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void;
function getColorNames(_arg1:Array):void;
function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher;
function isInheritingStyle(_arg1:String):Boolean;
function set inheritingStyles(_arg1:Object):void;
function get stylesRoot():Object;
function initProtoChainRoots():void;
function registerColorName(_arg1:String, _arg2:uint):void;
function registerParentSizeInvalidatingStyle(_arg1:String):void;
function registerSizeInvalidatingStyle(_arg1:String):void;
function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void;
function isInheritingTextFormatStyle(_arg1:String):Boolean;
function getStyleDeclaration(_arg1:String):CSSStyleDeclaration;
}
}//package mx.styles
Section 205
//IStyleManager2 (mx.styles.IStyleManager2)
package mx.styles {
import flash.events.*;
import flash.system.*;
public interface IStyleManager2 extends IStyleManager {
function get selectors():Array;
function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher;
}
}//package mx.styles
Section 206
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 207
//StyleManager (mx.styles.StyleManager)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
public class StyleManager {
mx_internal static const VERSION:String = "3.4.1.10084";
public static const NOT_A_COLOR:uint = 4294967295;
private static var _impl:IStyleManager2;
private static var implClassDependency:StyleManagerImpl;
public static function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentSizeInvalidatingStyle(_arg1));
}
public static function registerInheritingStyle(_arg1:String):void{
impl.registerInheritingStyle(_arg1);
}
mx_internal static function set stylesRoot(_arg1:Object):void{
impl.stylesRoot = _arg1;
}
mx_internal static function get inheritingStyles():Object{
return (impl.inheritingStyles);
}
mx_internal static function styleDeclarationsChanged():void{
impl.styleDeclarationsChanged();
}
public static function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
impl.setStyleDeclaration(_arg1, _arg2, _arg3);
}
public static function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
impl.registerParentDisplayListInvalidatingStyle(_arg1);
}
mx_internal static function get typeSelectorCache():Object{
return (impl.typeSelectorCache);
}
mx_internal static function set inheritingStyles(_arg1:Object):void{
impl.inheritingStyles = _arg1;
}
public static function isColorName(_arg1:String):Boolean{
return (impl.isColorName(_arg1));
}
public static function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return (impl.isParentDisplayListInvalidatingStyle(_arg1));
}
public static function isSizeInvalidatingStyle(_arg1:String):Boolean{
return (impl.isSizeInvalidatingStyle(_arg1));
}
public static function getColorName(_arg1:Object):uint{
return (impl.getColorName(_arg1));
}
mx_internal static function set typeSelectorCache(_arg1:Object):void{
impl.typeSelectorCache = _arg1;
}
public static function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
impl.unloadStyleDeclarations(_arg1, _arg2);
}
public static function getColorNames(_arg1:Array):void{
impl.getColorNames(_arg1);
}
public static function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false, _arg4:ApplicationDomain=null, _arg5:SecurityDomain=null):IEventDispatcher{
return (impl.loadStyleDeclarations2(_arg1, _arg2, _arg4, _arg5));
}
private static function get impl():IStyleManager2{
if (!_impl){
_impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2"));
};
return (_impl);
}
public static function isValidStyleValue(_arg1):Boolean{
return (impl.isValidStyleValue(_arg1));
}
mx_internal static function get stylesRoot():Object{
return (impl.stylesRoot);
}
public static function isInheritingStyle(_arg1:String):Boolean{
return (impl.isInheritingStyle(_arg1));
}
mx_internal static function initProtoChainRoots():void{
impl.initProtoChainRoots();
}
public static function registerParentSizeInvalidatingStyle(_arg1:String):void{
impl.registerParentSizeInvalidatingStyle(_arg1);
}
public static function get selectors():Array{
return (impl.selectors);
}
public static function registerSizeInvalidatingStyle(_arg1:String):void{
impl.registerSizeInvalidatingStyle(_arg1);
}
public static function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
impl.clearStyleDeclaration(_arg1, _arg2);
}
public static function registerColorName(_arg1:String, _arg2:uint):void{
impl.registerColorName(_arg1, _arg2);
}
public static function isInheritingTextFormatStyle(_arg1:String):Boolean{
return (impl.isInheritingTextFormatStyle(_arg1));
}
public static function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
return (impl.getStyleDeclaration(_arg1));
}
}
}//package mx.styles
Section 208
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.utils.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.resources.*;
import mx.managers.*;
public class StyleManagerImpl implements IStyleManager2 {
private var _stylesRoot:Object;
private var _selectors:Object;
private var styleModules:Object;
private var _inheritingStyles:Object;
private var resourceManager:IResourceManager;
private var _typeSelectorCache:Object;
mx_internal static const VERSION:String = "3.4.1.10084";
private static var parentSizeInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var colorNames:Object = {transparent:"transparent", black:0, blue:0xFF, green:0x8000, gray:0x808080, silver:0xC0C0C0, lime:0xFF00, olive:0x808000, white:0xFFFFFF, yellow:0xFFFF00, maroon:0x800000, navy:128, red:0xFF0000, purple:0x800080, teal:0x8080, fuchsia:0xFF00FF, aqua:0xFFFF, magenta:0xFF00FF, cyan:0xFFFF, halogreen:8453965, haloblue:40447, haloorange:0xFFB600, halosilver:11455193};
private static var inheritingTextFormatStyles:Object = {align:true, bold:true, color:true, font:true, indent:true, italic:true, size:true};
private static var instance:IStyleManager2;
private static var parentDisplayListInvalidatingStyles:Object = {bottom:true, horizontalCenter:true, left:true, right:true, top:true, verticalCenter:true, baseline:true};
private static var sizeInvalidatingStyles:Object = {borderStyle:true, borderThickness:true, fontAntiAliasType:true, fontFamily:true, fontGridFitType:true, fontSharpness:true, fontSize:true, fontStyle:true, fontThickness:true, fontWeight:true, headerHeight:true, horizontalAlign:true, horizontalGap:true, kerning:true, leading:true, letterSpacing:true, paddingBottom:true, paddingLeft:true, paddingRight:true, paddingTop:true, strokeWidth:true, tabHeight:true, tabWidth:true, verticalAlign:true, verticalGap:true};
public function StyleManagerImpl(){
_selectors = {};
styleModules = {};
resourceManager = ResourceManager.getInstance();
_inheritingStyles = {};
_typeSelectorCache = {};
super();
}
public function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void{
_arg2.selectorRefCount++;
_selectors[_arg1] = _arg2;
typeSelectorCache = {};
if (_arg3){
styleDeclarationsChanged();
};
}
public function registerParentDisplayListInvalidatingStyle(_arg1:String):void{
parentDisplayListInvalidatingStyles[_arg1] = true;
}
public function getStyleDeclaration(_arg1:String):CSSStyleDeclaration{
var _local2:int;
if (_arg1.charAt(0) != "."){
_local2 = _arg1.lastIndexOf(".");
if (_local2 != -1){
_arg1 = _arg1.substr((_local2 + 1));
};
};
return (_selectors[_arg1]);
}
public function set typeSelectorCache(_arg1:Object):void{
_typeSelectorCache = _arg1;
}
public function isColorName(_arg1:String):Boolean{
return (!((colorNames[_arg1.toLowerCase()] === undefined)));
}
public function set inheritingStyles(_arg1:Object):void{
_inheritingStyles = _arg1;
}
public function getColorNames(_arg1:Array):void{
var _local4:uint;
if (!_arg1){
return;
};
var _local2:int = _arg1.length;
var _local3:int;
while (_local3 < _local2) {
if (((!((_arg1[_local3] == null))) && (isNaN(_arg1[_local3])))){
_local4 = getColorName(_arg1[_local3]);
if (_local4 != StyleManager.NOT_A_COLOR){
_arg1[_local3] = _local4;
};
};
_local3++;
};
}
public function isInheritingTextFormatStyle(_arg1:String):Boolean{
return ((inheritingTextFormatStyles[_arg1] == true));
}
public function registerParentSizeInvalidatingStyle(_arg1:String):void{
parentSizeInvalidatingStyles[_arg1] = true;
}
public function registerColorName(_arg1:String, _arg2:uint):void{
colorNames[_arg1.toLowerCase()] = _arg2;
}
public function isParentSizeInvalidatingStyle(_arg1:String):Boolean{
return ((parentSizeInvalidatingStyles[_arg1] == true));
}
public function registerInheritingStyle(_arg1:String):void{
inheritingStyles[_arg1] = true;
}
public function set stylesRoot(_arg1:Object):void{
_stylesRoot = _arg1;
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function isParentDisplayListInvalidatingStyle(_arg1:String):Boolean{
return ((parentDisplayListInvalidatingStyles[_arg1] == true));
}
public function isSizeInvalidatingStyle(_arg1:String):Boolean{
return ((sizeInvalidatingStyles[_arg1] == true));
}
public function styleDeclarationsChanged():void{
var _local4:Object;
var _local1:Array = SystemManagerGlobals.topLevelSystemManagers;
var _local2:int = _local1.length;
var _local3:int;
while (_local3 < _local2) {
_local4 = _local1[_local3];
_local4.regenerateStyleCache(true);
_local4.notifyStyleChangeInChildren(null, true);
_local3++;
};
}
public function isValidStyleValue(_arg1):Boolean{
return (!((_arg1 === undefined)));
}
public function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher{
return (loadStyleDeclarations2(_arg1, _arg2));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void{
var _local4:IModuleInfo;
var _local3:StyleModuleInfo = styleModules[_arg1];
if (_local3){
_local3.styleModule.unload();
_local4 = _local3.module;
_local4.unload();
_local4.removeEventListener(ModuleEvent.READY, _local3.readyHandler);
_local4.removeEventListener(ModuleEvent.ERROR, _local3.errorHandler);
styleModules[_arg1] = null;
};
if (_arg2){
styleDeclarationsChanged();
};
}
public function getColorName(_arg1:Object):uint{
var _local2:Number;
var _local3:*;
if ((_arg1 is String)){
if (_arg1.charAt(0) == "#"){
_local2 = Number(("0x" + _arg1.slice(1)));
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
if ((((_arg1.charAt(1) == "x")) && ((_arg1.charAt(0) == "0")))){
_local2 = Number(_arg1);
return ((isNaN(_local2)) ? StyleManager.NOT_A_COLOR : uint(_local2));
};
_local3 = colorNames[_arg1.toLowerCase()];
if (_local3 === undefined){
return (StyleManager.NOT_A_COLOR);
};
return (uint(_local3));
};
return (uint(_arg1));
}
public function isInheritingStyle(_arg1:String):Boolean{
return ((inheritingStyles[_arg1] == true));
}
public function get stylesRoot():Object{
return (_stylesRoot);
}
public function initProtoChainRoots():void{
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
delete _inheritingStyles["textDecoration"];
delete _inheritingStyles["leading"];
};
if (!stylesRoot){
stylesRoot = _selectors["global"].addStyleToProtoChain({}, null);
};
}
public function loadStyleDeclarations2(_arg1:String, _arg2:Boolean=true, _arg3:ApplicationDomain=null, _arg4:SecurityDomain=null):IEventDispatcher{
var module:IModuleInfo;
var styleEventDispatcher:StyleEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = _arg1;
var update = _arg2;
var applicationDomain = _arg3;
var securityDomain = _arg4;
module = ModuleManager.getModule(url);
var readyHandler:Function = function (_arg1:ModuleEvent):void{
var _local2:IStyleModule = IStyleModule(_arg1.module.factory.create());
styleModules[_arg1.module.url].styleModule = _local2;
if (update){
styleDeclarationsChanged();
};
};
module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
styleEventDispatcher = new StyleEventDispatcher(module);
var errorHandler:Function = function (_arg1:ModuleEvent):void{
var _local3:StyleEvent;
var _local2:String = resourceManager.getString("styles", "unableToLoad", [_arg1.errorText, url]);
if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){
_local3 = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local3.bytesLoaded = 0;
_local3.bytesTotal = 0;
_local3.errorText = _local2;
styleEventDispatcher.dispatchEvent(_local3);
} else {
throw (new Error(_local2));
};
};
module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (_arg1:TimerEvent):void{
timer.removeEventListener(TimerEvent.TIMER, timerHandler);
timer.stop();
module.load(applicationDomain, securityDomain);
};
timer.addEventListener(TimerEvent.TIMER, timerHandler, false, 0, true);
timer.start();
return (styleEventDispatcher);
}
public function registerSizeInvalidatingStyle(_arg1:String):void{
sizeInvalidatingStyles[_arg1] = true;
}
public function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void{
var _local3:CSSStyleDeclaration = getStyleDeclaration(_arg1);
if (((_local3) && ((_local3.selectorRefCount > 0)))){
_local3.selectorRefCount--;
};
delete _selectors[_arg1];
if (_arg2){
styleDeclarationsChanged();
};
}
public function get selectors():Array{
var _local2:String;
var _local1:Array = [];
for (_local2 in _selectors) {
_local1.push(_local2);
};
return (_local1);
}
public static function getInstance():IStyleManager2{
if (!instance){
instance = new (StyleManagerImpl);
};
return (instance);
}
}
}//package mx.styles
import flash.events.*;
import mx.modules.*;
import mx.events.*;
class StyleEventDispatcher extends EventDispatcher {
private function StyleEventDispatcher(_arg1:IModuleInfo){
_arg1.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
_arg1.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_readyHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.COMPLETE);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
dispatchEvent(_local2);
}
private function moduleInfo_errorHandler(_arg1:ModuleEvent):void{
var _local2:StyleEvent = new StyleEvent(StyleEvent.ERROR, _arg1.bubbles, _arg1.cancelable);
_local2.bytesLoaded = _arg1.bytesLoaded;
_local2.bytesTotal = _arg1.bytesTotal;
_local2.errorText = _arg1.errorText;
dispatchEvent(_local2);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var readyHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
private function StyleModuleInfo(_arg1:IModuleInfo, _arg2:Function, _arg3:Function){
this.module = _arg1;
this.readyHandler = _arg2;
this.errorHandler = _arg3;
}
}
Section 209
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
import mx.core.*;
public class ColorUtil {
mx_internal static const VERSION:String = "3.4.1.10084";
public static function adjustBrightness2(_arg1:uint, _arg2:Number):uint{
var _local3:Number;
var _local4:Number;
var _local5:Number;
if (_arg2 == 0){
return (_arg1);
};
if (_arg2 < 0){
_arg2 = ((100 + _arg2) / 100);
_local3 = (((_arg1 >> 16) & 0xFF) * _arg2);
_local4 = (((_arg1 >> 8) & 0xFF) * _arg2);
_local5 = ((_arg1 & 0xFF) * _arg2);
} else {
_arg2 = (_arg2 / 100);
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
_local3 = (_local3 + ((0xFF - _local3) * _arg2));
_local4 = (_local4 + ((0xFF - _local4) * _arg2));
_local5 = (_local5 + ((0xFF - _local5) * _arg2));
_local3 = Math.min(_local3, 0xFF);
_local4 = Math.min(_local4, 0xFF);
_local5 = Math.min(_local5, 0xFF);
};
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
public static function rgbMultiply(_arg1:uint, _arg2:uint):uint{
var _local3:Number = ((_arg1 >> 16) & 0xFF);
var _local4:Number = ((_arg1 >> 8) & 0xFF);
var _local5:Number = (_arg1 & 0xFF);
var _local6:Number = ((_arg2 >> 16) & 0xFF);
var _local7:Number = ((_arg2 >> 8) & 0xFF);
var _local8:Number = (_arg2 & 0xFF);
return ((((((_local3 * _local6) / 0xFF) << 16) | (((_local4 * _local7) / 0xFF) << 8)) | ((_local5 * _local8) / 0xFF)));
}
public static function adjustBrightness(_arg1:uint, _arg2:Number):uint{
var _local3:Number = Math.max(Math.min((((_arg1 >> 16) & 0xFF) + _arg2), 0xFF), 0);
var _local4:Number = Math.max(Math.min((((_arg1 >> 8) & 0xFF) + _arg2), 0xFF), 0);
var _local5:Number = Math.max(Math.min(((_arg1 & 0xFF) + _arg2), 0xFF), 0);
return ((((_local3 << 16) | (_local4 << 8)) | _local5));
}
}
}//package mx.utils
Section 210
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import mx.core.*;
import flash.display.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.4.1.10084";
public static function drawRoundRectComplex(_arg1:Graphics, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number):void{
var _local10:Number = (_arg2 + _arg4);
var _local11:Number = (_arg3 + _arg5);
var _local12:Number = ((_arg4 < _arg5)) ? (_arg4 * 2) : (_arg5 * 2);
_arg6 = ((_arg6 < _local12)) ? _arg6 : _local12;
_arg7 = ((_arg7 < _local12)) ? _arg7 : _local12;
_arg8 = ((_arg8 < _local12)) ? _arg8 : _local12;
_arg9 = ((_arg9 < _local12)) ? _arg9 : _local12;
var _local13:Number = (_arg9 * 0.292893218813453);
var _local14:Number = (_arg9 * 0.585786437626905);
_arg1.moveTo(_local10, (_local11 - _arg9));
_arg1.curveTo(_local10, (_local11 - _local14), (_local10 - _local13), (_local11 - _local13));
_arg1.curveTo((_local10 - _local14), _local11, (_local10 - _arg9), _local11);
_local13 = (_arg8 * 0.292893218813453);
_local14 = (_arg8 * 0.585786437626905);
_arg1.lineTo((_arg2 + _arg8), _local11);
_arg1.curveTo((_arg2 + _local14), _local11, (_arg2 + _local13), (_local11 - _local13));
_arg1.curveTo(_arg2, (_local11 - _local14), _arg2, (_local11 - _arg8));
_local13 = (_arg6 * 0.292893218813453);
_local14 = (_arg6 * 0.585786437626905);
_arg1.lineTo(_arg2, (_arg3 + _arg6));
_arg1.curveTo(_arg2, (_arg3 + _local14), (_arg2 + _local13), (_arg3 + _local13));
_arg1.curveTo((_arg2 + _local14), _arg3, (_arg2 + _arg6), _arg3);
_local13 = (_arg7 * 0.292893218813453);
_local14 = (_arg7 * 0.585786437626905);
_arg1.lineTo((_local10 - _arg7), _arg3);
_arg1.curveTo((_local10 - _local14), _arg3, (_local10 - _local13), (_arg3 + _local13));
_arg1.curveTo(_local10, (_arg3 + _local14), _local10, (_arg3 + _arg7));
_arg1.lineTo(_local10, (_local11 - _arg9));
}
}
}//package mx.utils
Section 211
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import mx.core.*;
import flash.display.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.4.1.10084";
private static var counter:int = 0;
public static function displayObjectToString(_arg1:DisplayObject):String{
var result:String;
var o:DisplayObject;
var s:String;
var indices:Array;
var displayObject = _arg1;
try {
o = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
} catch(e:SecurityError) {
};
return (result);
}
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
}
}//package mx.utils
Section 212
//StringUtil (mx.utils.StringUtil)
package mx.utils {
import mx.core.*;
public class StringUtil {
mx_internal static const VERSION:String = "3.4.1.10084";
public static function trim(_arg1:String):String{
if (_arg1 == null){
return ("");
};
var _local2:int;
while (isWhitespace(_arg1.charAt(_local2))) {
_local2++;
};
var _local3:int = (_arg1.length - 1);
while (isWhitespace(_arg1.charAt(_local3))) {
_local3--;
};
if (_local3 >= _local2){
return (_arg1.slice(_local2, (_local3 + 1)));
};
return ("");
}
public static function isWhitespace(_arg1:String):Boolean{
switch (_arg1){
case " ":
case "\t":
case "\r":
case "\n":
case "\f":
return (true);
default:
return (false);
};
}
public static function substitute(_arg1:String, ... _args):String{
var _local4:Array;
if (_arg1 == null){
return ("");
};
var _local3:uint = _args.length;
if ((((_local3 == 1)) && ((_args[0] is Array)))){
_local4 = (_args[0] as Array);
_local3 = _local4.length;
} else {
_local4 = _args;
};
var _local5:int;
while (_local5 < _local3) {
_arg1 = _arg1.replace(new RegExp((("\\{" + _local5) + "\\}"), "g"), _local4[_local5]);
_local5++;
};
return (_arg1);
}
public static function trimArrayElements(_arg1:String, _arg2:String):String{
var _local3:Array;
var _local4:int;
var _local5:int;
if (((!((_arg1 == ""))) && (!((_arg1 == null))))){
_local3 = _arg1.split(_arg2);
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_local3[_local5] = StringUtil.trim(_local3[_local5]);
_local5++;
};
if (_local4 > 0){
_arg1 = _local3.join(_arg2);
};
};
return (_arg1);
}
}
}//package mx.utils
Section 213
//NewgroundsAPIAsset_FlashAd_Container_23 (NewgroundsAPI_fla.NewgroundsAPIAsset_FlashAd_Container_23)
package NewgroundsAPI_fla {
import flash.events.*;
import com.newgrounds.*;
import flash.display.*;
public dynamic class NewgroundsAPIAsset_FlashAd_Container_23 extends MovieClip {
public var ngLinkButton:SimpleButton;
public var adMask:MovieClip;
public function NewgroundsAPIAsset_FlashAd_Container_23(){
addFrameScript(0, this.frame1, 10, this.frame11);
}
function frame1(){
this.ngLinkButton.addEventListener(MouseEvent.CLICK, this.onNGLinkClicked);
}
public function onNGLinkClicked(_arg1:MouseEvent):void{
API.loadNewgrounds();
}
function frame11(){
gotoAndPlay(1);
}
}
}//package NewgroundsAPI_fla
Section 214
//NewgroundsAPIAsset_Load_Indicator_3 (NewgroundsAPI_fla.NewgroundsAPIAsset_Load_Indicator_3)
package NewgroundsAPI_fla {
import flash.events.*;
import flash.display.*;
public dynamic class NewgroundsAPIAsset_Load_Indicator_3 extends MovieClip {
public function NewgroundsAPIAsset_Load_Indicator_3(){
addFrameScript(0, this.frame1);
}
function frame1(){
addEventListener(Event.ENTER_FRAME, this.onEnterFrame);
}
public function onEnterFrame(_arg1:Event):void{
if (((visible) && (stage))){
rotation = (rotation + 30);
} else {
removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
};
}
}
}//package NewgroundsAPI_fla
Section 215
//_activeButtonStyleStyle (_activeButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 216
//_activeTabStyleStyle (_activeTabStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeTabStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".activeTabStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".activeTabStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 217
//_alertButtonStyleStyle (_alertButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _alertButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".alertButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".alertButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 734012;
};
};
}
}
}//package
Section 218
//_comboDropdownStyle (_comboDropdownStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _comboDropdownStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".comboDropdown", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.shadowDirection = "center";
this.fontWeight = "normal";
this.dropShadowEnabled = true;
this.leading = 0;
this.backgroundColor = 0xFFFFFF;
this.shadowDistance = 1;
this.cornerRadius = 0;
this.borderThickness = 0;
this.paddingLeft = 5;
this.paddingRight = 5;
};
};
}
}
}//package
Section 219
//_dataGridStylesStyle (_dataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dataGridStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dataGridStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dataGridStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 220
//_dateFieldPopupStyle (_dateFieldPopupStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dateFieldPopupStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".dateFieldPopup", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.dropShadowEnabled = true;
this.backgroundColor = 0xFFFFFF;
this.borderThickness = 0;
};
};
}
}
}//package
Section 221
//_errorTipStyle (_errorTipStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _errorTipStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".errorTip", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.borderStyle = "errorTipRight";
this.paddingTop = 4;
this.borderColor = 13510953;
this.color = 0xFFFFFF;
this.fontSize = 9;
this.shadowColor = 0;
this.paddingLeft = 4;
this.paddingBottom = 4;
this.paddingRight = 4;
};
};
}
}
}//package
Section 222
//_globalStyle (_globalStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _globalStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration("global", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fillColor = 0xFFFFFF;
this.kerning = false;
this.iconColor = 0x111111;
this.textRollOverColor = 2831164;
this.horizontalAlign = "left";
this.shadowCapColor = 14015965;
this.backgroundAlpha = 1;
this.filled = true;
this.textDecoration = "none";
this.roundedBottomCorners = true;
this.fontThickness = 0;
this.focusBlendMode = "normal";
this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE];
this.horizontalGap = 8;
this.borderCapColor = 9542041;
this.buttonColor = 7305079;
this.indentation = 17;
this.selectionDisabledColor = 0xDDDDDD;
this.closeDuration = 250;
this.embedFonts = false;
this.paddingTop = 0;
this.letterSpacing = 0;
this.focusAlpha = 0.4;
this.bevel = true;
this.fontSize = 10;
this.shadowColor = 0xEEEEEE;
this.borderAlpha = 1;
this.paddingLeft = 0;
this.fontWeight = "normal";
this.indicatorGap = 14;
this.focusSkin = HaloFocusRect;
this.dropShadowEnabled = false;
this.leading = 2;
this.borderSkin = HaloBorder;
this.fontSharpness = 0;
this.modalTransparencyDuration = 100;
this.borderThickness = 1;
this.backgroundSize = "auto";
this.borderStyle = "inset";
this.borderColor = 12040892;
this.fontAntiAliasType = "advanced";
this.errorColor = 0xFF0000;
this.shadowDistance = 2;
this.horizontalGridLineColor = 0xF7F7F7;
this.stroked = false;
this.modalTransparencyColor = 0xDDDDDD;
this.cornerRadius = 0;
this.verticalAlign = "top";
this.textIndent = 0;
this.fillAlphas = [0.6, 0.4, 0.75, 0.65];
this.verticalGridLineColor = 14015965;
this.themeColor = 40447;
this.version = "3.0.0";
this.shadowDirection = "center";
this.modalTransparency = 0.5;
this.repeatInterval = 35;
this.openDuration = 250;
this.textAlign = "left";
this.fontFamily = "Verdana";
this.textSelectedColor = 2831164;
this.paddingBottom = 0;
this.strokeWidth = 1;
this.fontGridFitType = "pixel";
this.horizontalGridLines = false;
this.useRollOver = true;
this.verticalGridLines = true;
this.repeatDelay = 500;
this.fontStyle = "normal";
this.dropShadowColor = 0;
this.focusThickness = 2;
this.verticalGap = 6;
this.disabledColor = 11187123;
this.paddingRight = 0;
this.focusRoundedCorners = "tl tr bl br";
this.borderSides = "left top right bottom";
this.disabledIconColor = 0x999999;
this.modalTransparencyBlur = 3;
this.color = 734012;
this.selectionDuration = 250;
this.highlightAlphas = [0.3, 0];
};
};
}
}
}//package
Section 223
//_headerDateTextStyle (_headerDateTextStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDateTextStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDateText", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.textAlign = "center";
};
};
}
}
}//package
Section 224
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDragProxyStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDragProxyStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".headerDragProxyStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 225
//_linkButtonStyleStyle (_linkButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _linkButtonStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".linkButtonStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".linkButtonStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 2;
this.paddingLeft = 2;
this.paddingBottom = 2;
this.paddingRight = 2;
};
};
}
}
}//package
Section 226
//_opaquePanelStyle (_opaquePanelStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _opaquePanelStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".opaquePanel");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".opaquePanel", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderColor = 0xFFFFFF;
this.backgroundColor = 0xFFFFFF;
this.headerColors = [0xE7E7E7, 0xD9D9D9];
this.footerColors = [0xE7E7E7, 0xC7C7C7];
this.borderAlpha = 1;
};
};
}
}
}//package
Section 227
//_plainStyle (_plainStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _plainStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".plain", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.paddingTop = 0;
this.backgroundColor = 0xFFFFFF;
this.backgroundImage = "";
this.horizontalAlign = "left";
this.paddingLeft = 0;
this.paddingBottom = 0;
this.paddingRight = 0;
};
};
}
}
}//package
Section 228
//_popUpMenuStyle (_popUpMenuStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _popUpMenuStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".popUpMenu", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "normal";
this.textAlign = "left";
};
};
}
}
}//package
Section 229
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _richTextEditorTextAreaStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".richTextEditorTextAreaStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".richTextEditorTextAreaStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 230
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _swatchPanelTextFieldStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.borderStyle = "inset";
this.borderColor = 14015965;
this.highlightColor = 12897484;
this.backgroundColor = 0xFFFFFF;
this.shadowCapColor = 14015965;
this.shadowColor = 14015965;
this.paddingLeft = 5;
this.buttonColor = 7305079;
this.borderCapColor = 9542041;
this.paddingRight = 5;
};
};
}
}
}//package
Section 231
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaHScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaHScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaHScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 232
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaVScrollBarStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".textAreaVScrollBarStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".textAreaVScrollBarStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
};
};
}
}
}//package
Section 233
//_todayStyleStyle (_todayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _todayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".todayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0xFFFFFF;
this.textAlign = "center";
};
};
}
}
}//package
Section 234
//_weekDayStyleStyle (_weekDayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _weekDayStyleStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".weekDayStyle", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
this.textAlign = "center";
};
};
}
}
}//package
Section 235
//_windowStatusStyle (_windowStatusStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStatusStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStatus");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStatus", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.color = 0x666666;
};
};
}
}
}//package
Section 236
//_windowStylesStyle (_windowStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStylesStyle {
public static function init(_arg1:IFlexModuleFactory):void{
var fbs = _arg1;
var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".windowStyles");
if (!style){
style = new CSSStyleDeclaration();
StyleManager.setStyleDeclaration(".windowStyles", style, false);
};
if (style.defaultFactory == null){
style.defaultFactory = function ():void{
this.fontWeight = "bold";
};
};
}
}
}//package
Section 237
//Bronze (Bronze)
package {
import flash.display.*;
public dynamic class Bronze extends MovieClip {
}
}//package
Section 238
//en_US$core_properties (en_US$core_properties)
package {
import mx.resources.*;
public class en_US$core_properties extends ResourceBundle {
public function en_US$core_properties(){
super("en_US", "core");
}
override protected function getContent():Object{
var _local1:Object = {multipleChildSets_ClassAndInstance:"Multiple sets of visual children have been specified for this component (component definition and component instance).", truncationIndicator:"...", notExecuting:"Repeater is not executing.", versionAlreadyRead:"Compatibility version has already been read.", multipleChildSets_ClassAndSubclass:"Multiple sets of visual children have been specified for this component (base component definition and derived component definition).", viewSource:"View Source", badFile:"File does not exist.", stateUndefined:"Undefined state '{0}'.", versionAlreadySet:"Compatibility version has already been set."};
return (_local1);
}
}
}//package
Section 239
//en_US$skins_properties (en_US$skins_properties)
package {
import mx.resources.*;
public class en_US$skins_properties extends ResourceBundle {
public function en_US$skins_properties(){
super("en_US", "skins");
}
override protected function getContent():Object{
var _local1:Object = {notLoaded:"Unable to load '{0}'."};
return (_local1);
}
}
}//package
Section 240
//en_US$styles_properties (en_US$styles_properties)
package {
import mx.resources.*;
public class en_US$styles_properties extends ResourceBundle {
public function en_US$styles_properties(){
super("en_US", "styles");
}
override protected function getContent():Object{
var _local1:Object = {unableToLoad:"Unable to load style({0}): {1}."};
return (_local1);
}
}
}//package
Section 241
//ExtremeGardening (ExtremeGardening)
package {
import com.adamatomic.flixel.*;
import com.mirosurabu.ExtremeGardening.*;
public class ExtremeGardening extends FlxGame {
public function ExtremeGardening(){
super(640, 640, NGSplash, 2, 0, false);
Global.loadDefault();
Global.loadShared();
Global.configureKeys();
FlxG.setMasterVolume(1);
}
}
}//package
Section 242
//FlxLoaderBar (FlxLoaderBar)
package {
import flash.display.*;
public dynamic class FlxLoaderBar extends BitmapData {
public function FlxLoaderBar(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 243
//FlxLoaderFrame (FlxLoaderFrame)
package {
import flash.display.*;
public dynamic class FlxLoaderFrame extends BitmapData {
public function FlxLoaderFrame(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 244
//FlxLoaderPlay (FlxLoaderPlay)
package {
import flash.display.*;
public dynamic class FlxLoaderPlay extends BitmapData {
public function FlxLoaderPlay(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package
Section 245
//Gold (Gold)
package {
import flash.display.*;
public dynamic class Gold extends MovieClip {
}
}//package
Section 246
//InvisibleButton (InvisibleButton)
package {
import flash.display.*;
public dynamic class InvisibleButton extends SimpleButton {
}
}//package
Section 247
//LevelButtons (LevelButtons)
package {
import flash.display.*;
public dynamic class LevelButtons extends MovieClip {
public var btnNext:MovieClip;
public var btnRetry:MovieClip;
public var btnMenu:MovieClip;
}
}//package
Section 248
//MCMedal4 (MCMedal4)
package {
import flash.display.*;
public dynamic class MCMedal4 extends MovieClip {
}
}//package
Section 249
//MenuButtons (MenuButtons)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class MenuButtons extends MovieClip {
public var lvl2:MyMedal;
public var lvl9:MyMedal;
public var lvl6:MyMedal;
public var lvl8:MyMedal;
public var lvl0:MyMedal;
public var lvl3:MyMedal;
public var lvl4:MyMedal;
public var lvl5:MyMedal;
public var lvl7:MyMedal;
public var lvl1:MyMedal;
public var mcMuter:Muter;
public var jw:InvisibleButton;
public var lvl10:MyMedal;
public var lvl11:MyMedal;
public var lvl12:MyMedal;
public var lvl14:MyMedal;
public var lvl15:MyMedal;
public var lvl16:MyMedal;
public var lvl17:MyMedal;
public var lvl13:MyMedal;
public var miro:SimpleButton;
public function MenuButtons(){
addFrameScript(0, frame1);
}
public function onMiro(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.mirosurabu.com/?ref=NGgardeningmenu"), "_blank");
}
public function onJW(_arg1:Event):void{
navigateToURL(new URLRequest("http://www.slordig.com/?ref=NGgardeningmenu"), "_blank");
}
function frame1(){
jw.addEventListener(MouseEvent.MOUSE_DOWN, onJW);
miro.addEventListener(MouseEvent.MOUSE_DOWN, onMiro);
}
}
}//package
Section 250
//Muter (Muter)
package {
import flash.display.*;
public dynamic class Muter extends MovieClip {
public var mcOn:MovieClip;
public var mcOff:MovieClip;
}
}//package
Section 251
//MyMedal (MyMedal)
package {
import flash.display.*;
public dynamic class MyMedal extends MovieClip {
public var mcBlack:MovieClip;
public var mcGreen:MovieClip;
public var mcGold:MovieClip;
public var mcSilver:MovieClip;
public var mcBronze:MovieClip;
}
}//package
Section 252
//Preloader (Preloader)
package {
import com.newgrounds.components.*;
public class Preloader extends FlxNGPreloader {
public function Preloader():void{
className = "ExtremeGardening";
NewgroundsAPIId = "11407";
NewgroundsAPIEncryptionKey = "LQvOj38midwzLSvAJYetOoF6I4qhM4oL";
NewgroundsAPIShowAds = true;
createMedalPopup(0, 0);
}
}
}//package
Section 253
//Silver (Silver)
package {
import flash.display.*;
public dynamic class Silver extends MovieClip {
}
}//package
Section 254
//SlordigClip (SlordigClip)
package {
import flash.display.*;
public dynamic class SlordigClip extends MovieClip {
}
}//package
Section 255
//SndGame (SndGame)
package {
import flash.media.*;
public dynamic class SndGame extends Sound {
}
}//package
Section 256
//SndMenu (SndMenu)
package {
import flash.media.*;
public dynamic class SndMenu extends Sound {
}
}//package
Section 257
//TextExtreme (TextExtreme)
package {
import flash.display.*;
import flash.text.*;
public dynamic class TextExtreme extends MovieClip {
public var myText:TextField;
}
}//package