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(Name:String, Frames:Array, FrameRate:Number=0, Looped:Boolean=true){
super();
name = Name;
delay = (1 / FrameRate);
frames = Frames;
looped = Looped;
}
}
}//package com.adamatomic.flixel.data
Section 2
//FlxCore (com.adamatomic.flixel.data.FlxCore)
package com.adamatomic.flixel.data {
import flash.geom.*;
import com.adamatomic.flixel.*;
public class FlxCore {
private var _flicker:Boolean;
private var _shakeTimer:Number;// = 0
public var active:Boolean;
private var _shake:Boolean;// = false
public var visible:Boolean;
public var width:uint;
protected var _shakeY:Number;// = 0
private var _shakeAmount:Number;// = 1
private var _flickerTimer:Number;
public var exists:Boolean;
public var height:uint;
public var dead:Boolean;
protected var _shakeX:Number;// = 0
public var x:Number;
public var y:Number;
public var scrollFactor:Point;
public function FlxCore(){
super();
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 update():void{
if (flickering()){
if (_flickerTimer > 0){
_flickerTimer = (_flickerTimer - FlxG.elapsed);
};
if (_flickerTimer < 0){
flicker(-1);
} else {
_flicker = !(_flicker);
visible = !(_flicker);
};
};
if (_shake){
_shakeTimer = (_shakeTimer - FlxG.elapsed);
if (_shakeTimer <= 0){
shake(-1);
} else {
_shakeX = (((Math.random() * _shakeAmount) * 2) - _shakeAmount);
_shakeY = (((Math.random() * _shakeAmount) * 2) - _shakeAmount);
};
};
}
public function overlapsPoint(X:Number, Y:Number, PerPixel:Boolean=false):Boolean{
if ((((((((X <= x)) || ((X >= (x + width))))) || ((Y <= y)))) || ((Y >= (y + height))))){
return (false);
};
return (true);
}
public function shaking():Boolean{
return (_shake);
}
public function render():void{
}
public function flicker(Duration:Number=1):void{
_flickerTimer = Duration;
if (_flickerTimer < 0){
_flicker = false;
visible = true;
};
}
public function kill():void{
exists = false;
dead = true;
}
protected function getScreenXY(p:Point):void{
p.x = ((Math.floor(x) + _shakeX) + Math.floor((FlxG.scroll.x * scrollFactor.x)));
p.y = ((Math.floor(y) + _shakeY) + Math.floor((FlxG.scroll.y * scrollFactor.y)));
}
public function hitFloor(block:FlxBlock):Boolean{
return (true);
}
public function shake(Duration:Number=1, Amount:Number=1):void{
_shakeTimer = Duration;
if (_shakeTimer < 0){
_shake = false;
_shakeX = (_shakeY = 0);
} else {
_shake = true;
_shakeAmount = Amount;
};
}
public function hitCeiling(block:FlxBlock):Boolean{
return (true);
}
public function overlaps(Core:FlxCore):Boolean{
if ((((((((Core.x <= (x - Core.width))) || ((Core.x >= (x + width))))) || ((Core.y <= (y - Core.height))))) || ((Core.y >= (y + height))))){
return (false);
};
return (true);
}
public function onScreen():Boolean{
var p:Point = new Point();
getScreenXY(p);
if (((((((((p.x + width) < 0)) || ((p.x > FlxG.width)))) || (((p.y + height) < 0)))) || ((p.y > FlxG.height)))){
return (false);
};
return (true);
}
public function hitWall(block:FlxBlock):Boolean{
return (true);
}
}
}//package com.adamatomic.flixel.data
Section 3
//FlxFactory (com.adamatomic.flixel.data.FlxFactory)
package com.adamatomic.flixel.data {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
public class FlxFactory extends MovieClip {
protected var className:String;
private var bits:Array;
private var ImgBit:Class;
private var bmpBar:Bitmap;
private var Buffer:Sprite;
private var ImgBar:Class;
protected var myURL:String;
public function FlxFactory(){
var tmp:Bitmap;
var fmt:TextFormat;
var txt:TextField;
ImgBar = FlxFactory_ImgBar;
ImgBit = FlxFactory_ImgBit;
super();
stop();
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
if (((((((!((myURL == null))) && ((myURL.length > 0)))) && ((root.loaderInfo.url.indexOf(myURL) < 0)))) && ((root.loaderInfo.url.indexOf("localhost") < 0)))){
tmp = new Bitmap(new BitmapData(stage.stageWidth, stage.stageHeight, true, 4294967295));
addChild(tmp);
fmt = new TextFormat();
fmt.color = 0;
fmt.size = 16;
fmt.align = "center";
fmt.bold = true;
txt = new TextField();
txt.width = (tmp.width - 16);
txt.height = (tmp.height - 16);
txt.y = 8;
txt.multiline = true;
txt.wordWrap = true;
txt.defaultTextFormat = fmt;
txt.text = (("Hi there! It looks like somebody copied this game without my permission. It is meant to be played ad-free! If you would like to play it at my site with NO annoying ads, just click anywhere, or copy-paste this URL into your browser.\n\n" + myURL) + "\n\nThanks, and have fun!");
addChild(txt);
txt.addEventListener(MouseEvent.CLICK, goToMyURL);
tmp.addEventListener(MouseEvent.CLICK, goToMyURL);
return;
};
Buffer = new Sprite();
Buffer.scaleX = 2;
Buffer.scaleY = 2;
addChild(Buffer);
bmpBar = new ImgBar();
bmpBar.x = (((stage.stageWidth / Buffer.scaleX) - bmpBar.width) / 2);
bmpBar.y = (((stage.stageHeight / Buffer.scaleY) - bmpBar.height) / 2);
Buffer.addChild(bmpBar);
bits = new Array();
var i:uint;
while (i < 9) {
tmp = new ImgBit();
tmp.visible = false;
tmp.x = ((bmpBar.x + 2) + (i * 3));
tmp.y = (bmpBar.y + 2);
bits.push(tmp);
Buffer.addChild(tmp);
i++;
};
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
private function goToMyURL(event:MouseEvent=null):void{
navigateToURL(new URLRequest(("http://" + myURL)));
}
private function onEnterFrame(event:Event):void{
var i:int;
var mainClass:Class;
var app:Object;
var limit:uint;
graphics.clear();
if (framesLoaded == totalFrames){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
nextFrame();
mainClass = Class(getDefinitionByName(className));
if (mainClass){
app = new (mainClass);
addChild((app as DisplayObject));
};
i = (bits.length - 1);
while (i >= 0) {
bits.pop();
i--;
};
removeChild(Buffer);
} else {
limit = ((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal) * 10);
i = 0;
while ((((i < limit)) && ((i < bits.length)))) {
bits[i].visible = true;
i++;
};
};
}
}
}//package com.adamatomic.flixel.data
Section 4
//FlxFactory_ImgBar (com.adamatomic.flixel.data.FlxFactory_ImgBar)
package com.adamatomic.flixel.data {
import mx.core.*;
public class FlxFactory_ImgBar extends BitmapAsset {
}
}//package com.adamatomic.flixel.data
Section 5
//FlxFactory_ImgBit (com.adamatomic.flixel.data.FlxFactory_ImgBit)
package com.adamatomic.flixel.data {
import mx.core.*;
public class FlxFactory_ImgBit extends BitmapAsset {
}
}//package com.adamatomic.flixel.data
Section 6
//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(xPos:int, yPos:int, pixelSize:uint, index:uint, finalColor:uint){
super();
x = xPos;
y = yPos;
_layers = new Array();
var colors:Array = new Array(4294901760, 4278255360, 4278190335, 4294967040, 4278255615);
_layers.push(addChild(new Bitmap(new BitmapData(pixelSize, pixelSize, true, finalColor))));
var i:uint;
while (i < colors.length) {
_layers.push(addChild(new Bitmap(new BitmapData(pixelSize, pixelSize, true, colors[index]))));
++index;
if (index >= colors.length){
index = 0;
};
i++;
};
_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 7
//FlxArray (com.adamatomic.flixel.FlxArray)
package com.adamatomic.flixel {
import com.adamatomic.flixel.data.*;
public dynamic class FlxArray extends Array {
public function FlxArray(){
super();
}
public function getNonexist():FlxCore{
var i:uint;
do {
if (!(this[i] as FlxCore).exists){
return (this[i]);
};
++i;
} while (i < this.length);
return (null);
}
public function add(Obj:Object):Object{
var i:uint;
while (i < this.length) {
if (this[i] == null){
return ((this[i] = Obj));
};
i++;
};
return (this[(this.push(Obj) - 1)]);
}
public function remove(Core:FlxCore, ForceDelete:Boolean=false):void{
removeAt(indexOf(Core), ForceDelete);
}
public function clear():void{
var i:int = (this.length - 1);
while (i >= 0) {
this.pop();
i--;
};
}
public function removeAt(Index:uint, ForceDelete:Boolean=false):void{
if (ForceDelete){
delete this[Index];
this[Index] = null;
} else {
if ((this[Index] is FlxCore)){
this[Index].kill();
};
};
}
public static function getRandom(Arr:Array):Object{
return (Arr[Math.floor((Math.random() * Arr.length))]);
}
}
}//package com.adamatomic.flixel
Section 8
//FlxBlock (com.adamatomic.flixel.FlxBlock)
package com.adamatomic.flixel {
import com.adamatomic.flixel.data.*;
import flash.display.*;
import flash.geom.*;
public class FlxBlock extends FlxCore {
private var _p:Point;
private var _pixels:BitmapData;
private var _rects:FlxArray;
private var _tileSize:uint;
public function FlxBlock(X:int, Y:int, Width:uint, Height:uint, TileGraphic:Class, Empties:uint=0){
var widthInTiles:uint;
var heightInTiles:uint;
super();
x = X;
y = Y;
width = Width;
height = Height;
if (TileGraphic == null){
return;
};
_pixels = FlxG.addBitmap(TileGraphic);
_rects = new FlxArray();
_p = new Point();
_tileSize = _pixels.height;
widthInTiles = Math.ceil((width / _tileSize));
heightInTiles = Math.ceil((height / _tileSize));
width = (widthInTiles * _tileSize);
height = (heightInTiles * _tileSize);
var numTiles:uint = (widthInTiles * heightInTiles);
var numGraphics:uint = (_pixels.width / _tileSize);
var i:uint;
while (i < numTiles) {
if ((Math.random() * (numGraphics + Empties)) > Empties){
_rects.push(new Rectangle((_tileSize * Math.floor((Math.random() * numGraphics))), 0, _tileSize, _tileSize));
} else {
_rects.push(null);
};
i++;
};
}
public function collide(Spr:FlxSprite):void{
if ((((Math.abs((((Spr.x + (Spr.width >> 1)) - x) - (width >> 1))) > ((width >> 1) + (Spr.width >> 1)))) && ((Math.abs((((Spr.y + (Spr.height >> 1)) - y) - (height >> 1))) > ((height >> 1) + (Spr.height >> 1)))))){
return;
};
var yFirst:Boolean;
if ((Math.abs(Spr.velocity.x) > Math.abs(Spr.velocity.y))){
yFirst = false;
};
var checkForMoreX:Boolean;
var checkForMoreY:Boolean;
if (yFirst){
if (Spr.velocity.y > 0){
if (overlapsPoint((Spr.x + (Spr.width >> 1)), (Spr.y + Spr.height))){
if (Spr.hitFloor(this)){
Spr.y = (y - Spr.height);
};
} else {
checkForMoreY = true;
};
} else {
if (Spr.velocity.y < 0){
if (overlapsPoint((Spr.x + (Spr.width >> 1)), Spr.y)){
if (Spr.hitCeiling(this)){
Spr.y = (y + height);
};
} else {
checkForMoreY = true;
};
};
};
if (Spr.velocity.x < 0){
if (overlapsPoint(Spr.x, (Spr.y + (Spr.height >> 1)))){
if (Spr.hitWall(this)){
Spr.x = (x + width);
};
} else {
checkForMoreX = true;
};
} else {
if (Spr.velocity.x > 0){
if (overlapsPoint((Spr.x + Spr.width), (Spr.y + (Spr.height >> 1)))){
if (Spr.hitWall(this)){
Spr.x = (x - Spr.width);
};
} else {
checkForMoreX = true;
};
};
};
} else {
if (Spr.velocity.x < 0){
if (overlapsPoint(Spr.x, (Spr.y + (Spr.height >> 1)))){
if (Spr.hitWall(this)){
Spr.x = (x + width);
};
} else {
checkForMoreX = true;
};
} else {
if (Spr.velocity.x > 0){
if (overlapsPoint((Spr.x + Spr.width), (Spr.y + (Spr.height >> 1)))){
if (Spr.hitWall(this)){
Spr.x = (x - Spr.width);
};
} else {
checkForMoreX = true;
};
};
};
if (Spr.velocity.y > 0){
if (overlapsPoint((Spr.x + (Spr.width >> 1)), (Spr.y + Spr.height))){
if (Spr.hitFloor(this)){
Spr.y = (y - Spr.height);
};
} else {
checkForMoreY = true;
};
} else {
if (Spr.velocity.y < 0){
if (overlapsPoint((Spr.x + (Spr.width >> 1)), Spr.y)){
if (Spr.hitCeiling(this)){
Spr.y = (y + height);
};
} else {
checkForMoreY = true;
};
};
};
};
if (((!(checkForMoreY)) && (!(checkForMoreX)))){
return;
};
var bias = (Spr.width >> 3);
if (bias < 1){
bias = 1;
};
if (((checkForMoreY) && (checkForMoreX))){
if (yFirst){
if (checkForMoreY){
if ((((((Spr.x + Spr.width) - bias) > x)) && (((Spr.x + bias) < (x + width))))){
if ((((((((Spr.velocity.y > 0)) && (((Spr.y + Spr.height) > y)))) && (((Spr.y + Spr.height) < (y + height))))) && (Spr.hitFloor(this)))){
Spr.y = (y - Spr.height);
} else {
if ((((((((Spr.velocity.y < 0)) && ((Spr.y > y)))) && ((Spr.y < (y + height))))) && (Spr.hitCeiling(this)))){
Spr.y = (y + height);
};
};
};
};
if (checkForMoreX){
if ((((((Spr.y + Spr.height) - bias) > y)) && (((Spr.y + bias) < (y + height))))){
if ((((((((Spr.velocity.x > 0)) && (((Spr.x + Spr.width) > x)))) && (((Spr.x + Spr.width) < (x + width))))) && (Spr.hitWall(this)))){
Spr.x = (x - Spr.width);
} else {
if ((((((((Spr.velocity.x < 0)) && ((Spr.x > x)))) && ((Spr.x < (x + width))))) && (Spr.hitWall(this)))){
Spr.x = (x + width);
};
};
};
};
} else {
if (checkForMoreX){
if ((((((Spr.y + Spr.height) - bias) > y)) && (((Spr.y + bias) < (y + height))))){
if ((((((((Spr.velocity.x > 0)) && (((Spr.x + Spr.width) > x)))) && (((Spr.x + Spr.width) < (x + width))))) && (Spr.hitWall(this)))){
Spr.x = (x - Spr.width);
} else {
if ((((((((Spr.velocity.x < 0)) && ((Spr.x > x)))) && ((Spr.x < (x + width))))) && (Spr.hitWall(this)))){
Spr.x = (x + width);
};
};
};
};
if (checkForMoreY){
if ((((((Spr.x + Spr.width) - bias) > x)) && (((Spr.x + bias) < (x + width))))){
if ((((((((Spr.velocity.y > 0)) && (((Spr.y + Spr.height) > y)))) && (((Spr.y + Spr.height) < (y + height))))) && (Spr.hitFloor(this)))){
Spr.y = (y - Spr.height);
} else {
if ((((((((Spr.velocity.y < 0)) && ((Spr.y > y)))) && ((Spr.y < (y + height))))) && (Spr.hitCeiling(this)))){
Spr.y = (y + height);
};
};
};
};
};
} else {
if (checkForMoreY){
if ((((((Spr.x + Spr.width) - bias) > x)) && (((Spr.x + bias) < (x + width))))){
if ((((((((Spr.velocity.y > 0)) && (((Spr.y + Spr.height) > y)))) && (((Spr.y + Spr.height) < (y + height))))) && (Spr.hitFloor(this)))){
Spr.y = (y - Spr.height);
} else {
if ((((((((Spr.velocity.y < 0)) && ((Spr.y > y)))) && ((Spr.y < (y + height))))) && (Spr.hitCeiling(this)))){
Spr.y = (y + height);
};
};
};
} else {
if (checkForMoreX){
if ((((((Spr.y + Spr.height) - bias) > y)) && (((Spr.y + bias) < (y + height))))){
if ((((((((Spr.velocity.x > 0)) && (((Spr.x + Spr.width) > x)))) && (((Spr.x + Spr.width) < (x + width))))) && (Spr.hitWall(this)))){
Spr.x = (x - Spr.width);
} else {
if ((((((((Spr.velocity.x < 0)) && ((Spr.x > x)))) && ((Spr.x < (x + width))))) && (Spr.hitWall(this)))){
Spr.x = (x + width);
};
};
};
};
};
};
}
override public function render():void{
if (!visible){
return;
};
getScreenXY(_p);
var opx:int = _p.x;
var i:uint;
while (i < _rects.length) {
if (_rects[i] != null){
FlxG.buffer.copyPixels(_pixels, _rects[i], _p, null, null, true);
};
_p.x = (_p.x + _tileSize);
if (_p.x >= (opx + width)){
_p.x = opx;
_p.y = (_p.y + _tileSize);
};
i++;
};
}
public static function collideArrays(Blocks:FlxArray, Sprites:FlxArray):void{
var j:uint;
var i:uint;
while (i < Blocks.length) {
j = 0;
while (j < Sprites.length) {
if (((!(Sprites[j].exists)) || (Sprites[j].dead))){
} else {
Blocks[i].collide(Sprites[j]);
};
j++;
};
i++;
};
}
public static function collideArray(Blocks:FlxArray, Sprite:FlxSprite):void{
if (((!(Sprite.exists)) || (Sprite.dead))){
return;
};
var i:uint;
while (i < Blocks.length) {
Blocks[i].collide(Sprite);
i++;
};
}
}
}//package com.adamatomic.flixel
Section 9
//FlxButton (com.adamatomic.flixel.FlxButton)
package com.adamatomic.flixel {
import com.adamatomic.flixel.data.*;
import flash.geom.*;
public class FlxButton extends FlxCore {
private var _pressed:Boolean;
private var _callback:Function;
private var _offTO:Point;
private var _off:FlxSprite;
private var _onToggle:Boolean;
private var _offT:FlxText;
private var _onTO:Point;
private var _onT:FlxText;
private var _on:FlxSprite;
public function FlxButton(X:int, Y:int, Image:FlxSprite, Callback:Function, ImageOn:FlxSprite=null, TextOff:FlxText=null, TextOn:FlxText=null){
super();
x = X;
y = Y;
_off = (FlxG.state.add(Image) as FlxSprite);
if (ImageOn == null){
_on = _off;
} else {
_on = (FlxG.state.add(ImageOn) as FlxSprite);
};
width = _off.width;
height = _off.height;
if (TextOff != null){
_offT = (FlxG.state.add(TextOff) as FlxText);
};
if (TextOn == null){
_onT = _offT;
} else {
_onT = (FlxG.state.add(TextOn) as FlxText);
};
if (_offT != null){
_offTO = new Point(_offT.x, _offT.y);
};
if (_onT != null){
_onTO = new Point(_onT.x, _onT.y);
};
_callback = Callback;
_onToggle = false;
_pressed = false;
}
public function switchOn():void{
_onToggle = true;
}
override public function update():void{
super.update();
if (!visible){
_off.visible = false;
_on.visible = false;
_offT.visible = false;
_onT.visible = false;
return;
};
visibility(false);
if (_off.overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){
if (!FlxG.kMouse){
_pressed = false;
} else {
if (!_pressed){
_pressed = true;
_callback();
};
};
visibility(!(_pressed));
};
if (_onToggle){
visibility(_off.visible);
};
_off.x = x;
_off.y = y;
if (_offT){
_offT.x = (_offTO.x + x);
_offT.y = (_offTO.y + y);
};
_on.x = x;
_on.y = y;
if (_onT){
_onT.x = (_onTO.x + x);
_onT.y = (_onTO.y + y);
};
}
private function visibility(On:Boolean):void{
if (On){
_off.visible = false;
if (_offT != null){
_offT.visible = false;
};
_on.visible = true;
if (_onT != null){
_onT.visible = true;
};
} else {
_on.visible = false;
if (_onT != null){
_onT.visible = false;
};
_off.visible = true;
if (_offT != null){
_offT.visible = true;
};
};
}
public function switchOff():void{
_onToggle = false;
}
public function on():Boolean{
return (_onToggle);
}
}
}//package com.adamatomic.flixel
Section 10
//FlxEmitter (com.adamatomic.flixel.FlxEmitter)
package com.adamatomic.flixel {
import com.adamatomic.flixel.data.*;
import flash.geom.*;
public class FlxEmitter extends FlxCore {
public var maxVelocity:Point;
private var _maxRotation:Number;
private var _delay:Number;
private var _sprites:FlxArray;
private var _gravity:Number;
private var _minRotation:Number;
private var _drag:Number;
private var _particle:uint;
private var _timer:Number;
public var minVelocity:Point;
public function FlxEmitter(X:Number, Y:Number, Width:uint, Height:uint, Sprites:FlxArray=null, Delay:Number=-1, MinVelocityX:Number=-100, MaxVelocityX:Number=100, MinVelocityY:Number=-100, MaxVelocityY:Number=100, MinRotation:Number=-360, MaxRotation:Number=360, Gravity:Number=500, Drag:Number=0, Graphics:Class=null, Quantity:uint=0, Multiple:Boolean=false){
var i:uint;
super();
visible = false;
x = X;
y = Y;
width = Width;
height = Height;
minVelocity = new Point(MinVelocityX, MinVelocityY);
maxVelocity = new Point(MaxVelocityX, MaxVelocityY);
_minRotation = MinRotation;
_maxRotation = MaxRotation;
_gravity = Gravity;
_drag = Drag;
_delay = Delay;
if (Graphics != null){
_sprites = new FlxArray();
i = 0;
while (i < Quantity) {
if (Multiple){
(_sprites.add(new FlxSprite(Graphics, 0, 0, true)) as FlxSprite).randomFrame();
} else {
_sprites.add(new FlxSprite(Graphics));
};
i++;
};
} else {
_sprites = Sprites;
};
i = 0;
while (i < _sprites.length) {
FlxG.state.add(_sprites[i]);
i++;
};
kill();
if (_delay > 0){
reset();
};
}
public function emit():void{
var s:FlxSprite;
s = _sprites[_particle];
s.exists = true;
s.x = (x - (s.width >> 1));
if (width != 0){
s.x = (s.x + (Math.random() * width));
};
s.y = (y - (s.height >> 1));
if (height != 0){
s.y = (s.y + (Math.random() * height));
};
s.velocity.x = minVelocity.x;
if (minVelocity.x != maxVelocity.x){
s.velocity.x = (s.velocity.x + (Math.random() * (maxVelocity.x - minVelocity.x)));
};
s.velocity.y = minVelocity.y;
if (minVelocity.y != maxVelocity.y){
s.velocity.y = (s.velocity.y + (Math.random() * (maxVelocity.y - minVelocity.y)));
};
s.acceleration.y = _gravity;
s.angularVelocity = _minRotation;
if (_minRotation != _maxRotation){
s.angularVelocity = (s.angularVelocity + (Math.random() * (_maxRotation - _minRotation)));
};
if (s.angularVelocity != 0){
s.angle = ((Math.random() * 360) - 180);
};
s.drag.x = _drag;
s.drag.y = _drag;
_particle++;
if (_particle >= _sprites.length){
_particle = 0;
};
}
override public function update():void{
var i:uint;
_timer = (_timer + FlxG.elapsed);
if (_delay < 0){
if (_timer > -(_delay)){
kill();
return;
};
if (!_sprites[0].exists){
i = 0;
while (i < _sprites.length) {
emit();
i++;
};
};
return;
};
while (_timer > _delay) {
_timer = (_timer - _delay);
emit();
};
}
override public function kill():void{
active = false;
var i:uint;
while (i < _sprites.length) {
_sprites[i].exists = false;
i++;
};
}
public function reset():void{
active = true;
_timer = 0;
_particle = 0;
}
}
}//package com.adamatomic.flixel
Section 11
//FlxG (com.adamatomic.flixel.FlxG)
package com.adamatomic.flixel {
import flash.events.*;
import com.adamatomic.flixel.data.*;
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 kLeft:Boolean;
public static var scores:Array;
private static var _music:Sound;
public static var height:uint;
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:Array;
public static var kRight:Boolean;
private static var _muted:uint;
private static var _musicPosition: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;
private static var _scrollTarget:Point;
public static var elapsed:Number;
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 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 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 function FlxG(){
super();
}
public static function getVolume():Number{
return (_volume);
}
public static function setVolume(Volume:Number):void{
_volume = Volume;
adjustMusicVolume();
}
public static function getAngle(X:Number, Y:Number):Number{
return (((Math.atan2(Y, X) * 180) / Math.PI));
}
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 addBitmap(Graphic:Class, Reverse:Boolean=false):BitmapData{
var newPixels:BitmapData;
var mtx:Matrix;
var needReverse:Boolean;
var key:String = String(Graphic);
if ((((_cache[key] == undefined)) || ((_cache[key] == null)))){
_cache[key] = new (Graphic).bitmapData;
if (Reverse){
needReverse = true;
};
};
var pixels:BitmapData = _cache[key];
if (((((!(needReverse)) && (Reverse))) && ((pixels.width == new (Graphic).bitmapData.width)))){
needReverse = true;
};
if (needReverse){
newPixels = new BitmapData((pixels.width << 1), pixels.height, true, 0);
newPixels.draw(pixels);
mtx = new Matrix();
mtx.scale(-1, 1);
mtx.translate(newPixels.width, 0);
newPixels.draw(pixels, mtx);
pixels = newPixels;
};
return (pixels);
}
public static function pressed(Key:uint):Boolean{
return ((_keys[Key] > 0));
}
public static function play(SoundEffect:Class, Volume:Number=1):void{
new (SoundEffect).play(0, 0, new SoundTransform((((Volume * _muted) * _volume) * _masterVolume)));
}
public static function computeVelocity(Velocity:Number, Acceleration:Number=0, Drag:Number=0, Max:Number=10000):Number{
var d:Number;
if (Acceleration != 0){
Velocity = (Velocity + (Acceleration * FlxG.elapsed));
} else {
if (Drag != 0){
d = (Drag * FlxG.elapsed);
if ((Velocity - d) > 0){
Velocity = (Velocity - d);
} else {
if ((Velocity + d) < 0){
Velocity = (Velocity + d);
} else {
Velocity = 0;
};
};
};
};
if (((!((Velocity == 0))) && (!((Max == 10000))))){
if (Velocity > Max){
Velocity = Max;
} else {
if (Velocity < -(Max)){
Velocity = -(Max);
};
};
};
return (Velocity);
}
static function setGameData(Width:uint, Height:uint, SwitchState:Function, Log:Function, Quake:Function, Flash:Function, Fade:Function, SetCursor:Function):void{
_cache = new Object();
width = Width;
height = Height;
_muted = 1;
_volume = 1;
_musicVolume = 1;
_masterVolume = 0.5;
_musicPosition = -1;
mouse = new Point();
_switchState = SwitchState;
_log = Log;
_quake = Quake;
_flash = Flash;
_fade = Fade;
_setCursor = SetCursor;
unfollow();
_keys = new Array();
_oldKeys = new Array();
var i:uint;
while (i < 7) {
_keys.push(0);
_oldKeys.push(0);
i++;
};
FlxG.levels = new Array();
FlxG.scores = new Array();
level = 0;
score = 0;
}
public static function stopMusic():void{
_musicPosition = 0;
if (_musicChannel != null){
_musicChannel.stop();
_musicChannel = null;
};
}
public static function justReleased(Key:uint):Boolean{
return ((_keys[Key] == -1));
}
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(Width:uint, Height:uint, Color:uint):BitmapData{
var key:String = ((((Width + "x") + Height) + ":") + Color);
if ((((_cache[key] == undefined)) || ((_cache[key] == null)))){
_cache[key] = new BitmapData(Width, Height, true, Color);
};
return (_cache[key]);
}
public static function log(Data:String):void{
_log(Data);
}
static function pressKey(k:uint):void{
if (_keys[k] > 0){
_keys[k] = 1;
} else {
_keys[k] = 2;
};
}
public static function setCursor(CursorGraphic:Class):void{
_setCursor(CursorGraphic);
}
static function updateKeys():void{
var i:uint;
while (i < 7) {
if ((((_oldKeys[i] == -1)) && ((_keys[i] == -1)))){
_keys[i] = 0;
} else {
if ((((_oldKeys[i] == 2)) && ((_keys[i] == 2)))){
_keys[i] = 1;
};
};
_oldKeys[i] = _keys[i];
i++;
};
mouse.x = (state.mouseX - scroll.x);
mouse.y = (state.mouseY - scroll.y);
}
public static function getMusicVolume():Number{
return (_musicVolume);
}
static function unfollow():void{
followTarget = null;
followLead = null;
followLerp = 1;
followMin = null;
followMax = null;
scroll = new Point();
_scrollTarget = new Point();
}
public static function getMute():Boolean{
if (_muted == 0){
return (true);
};
return (false);
}
public static function justPressed(Key:uint):Boolean{
return ((_keys[Key] == 2));
}
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 followAdjust(LeadX:Number=0, LeadY:Number=0):void{
followLead = new Point(LeadX, LeadY);
}
public static function logObject(object:Object):void{
var key:String;
var pairs:Array = [];
for (key in object) {
pairs.push(((key + "=") + object[key].toString()));
};
log(pairs.join(", "));
}
public static function setMute(SoundOff:Boolean):void{
if (SoundOff){
_muted = 0;
} else {
_muted = 1;
};
adjustMusicVolume();
}
public static function follow(Target:FlxCore, Lerp:Number=1):void{
followTarget = Target;
followLerp = Lerp;
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 fade(Color:uint, Duration:Number=1, FadeComplete:Function=null):void{
_fade(Color, Duration, FadeComplete);
}
public static function switchState(State:Class):void{
_switchState(State);
}
public static function openURL(URL:String):void{
navigateToURL(new URLRequest(URL));
}
static function setMasterVolume(Volume:Number):void{
_masterVolume = Volume;
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 followBounds(MinX:int=0, MinY:int=0, MaxX:int=0, MaxY:int=0):void{
followMin = new Point(-(MinX), -(MinY));
followMax = new Point((-(MaxX) + width), (-(MaxY) + height));
if (followMax.x > followMin.x){
followMax.x = followMin.x;
};
if (followMax.y > followMin.y){
followMax.y = followMin.y;
};
}
public static function quake(Intensity:Number, Duration:Number=0.5):void{
_quake(Intensity, Duration);
}
public static function setMusicVolume(Volume:Number):void{
_musicVolume = Volume;
adjustMusicVolume();
}
public static function setMusic(Music:Class, Volume:Number=1, Autoplay:Boolean=true):void{
stopMusic();
_music = new (Music);
_musicVolume = Volume;
if (Autoplay){
playMusic();
};
}
static function releaseKey(k:uint):void{
if (_keys[k] > 0){
_keys[k] = -1;
} else {
_keys[k] = 0;
};
}
private static function loopMusic(event:Event=null):void{
if (_musicChannel == null){
return;
};
_musicChannel.removeEventListener(Event.SOUND_COMPLETE, loopMusic);
playMusic();
}
public static function resetKeys():void{
kUp = (kDown = (kLeft = (kRight = (kA = (kB = (kMouse = false))))));
var i:uint;
while (i < _keys.length) {
_keys[i] = 0;
i++;
};
}
public static function flash(Color:uint, Duration:Number=1):void{
_flash(Color, Duration);
}
public static function rotatePoint(X:Number, Y:Number, PivotX:Number, PivotY:Number, Angle:Number):Point{
var radians:Number = ((-(Angle) / 180) * Math.PI);
var dx:Number = (X - PivotX);
var dy:Number = (PivotY - Y);
return (new Point(((PivotX + (Math.cos(radians) * dx)) - (Math.sin(radians) * dy)), (PivotY - ((Math.sin(radians) * dx) + (Math.cos(radians) * dy)))));
}
}
}//package com.adamatomic.flixel
Section 12
//FlxGame (com.adamatomic.flixel.FlxGame)
package com.adamatomic.flixel {
import flash.events.*;
import com.adamatomic.flixel.data.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import flash.text.*;
import flash.utils.*;
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 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 _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 _logoTimerFinished:Number;
private var _frame:Class;
private var _soundTray:Sprite;
private var ImgKeyPlus:Class;
private var ImgPoweredBy:Class;
private var _cursor:Bitmap;
private var _soundTrayTimer:Number;
private var SndFlixel:Class;
private var _gy:int;
private var _fpsUpdate:Boolean;
private var _gx:int;
private var _curState:FlxState;
private var ImgKeysArrows:Class;
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(GameSizeX:uint, GameSizeY:uint, InitialState:Class, Zoom:uint=2, BGColor:Number=4278190080, FlixelColor:Number=4294967295, FlixelSound:Class=null, Frame:Class=null, ScreenOffsetX:uint=0, ScreenOffsetY: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 = Zoom;
_gx = ScreenOffsetX;
_gy = ScreenOffsetY;
_bgc = BGColor;
_fc = FlixelColor;
FlxG.setGameData(GameSizeX, GameSizeY, switchState, log, quake, flash, fade, setCursor);
_created = false;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
_elapsed = 0;
_total = 0;
_fpsUpdate = true;
Mouse.hide();
_logoComplete = false;
_f = null;
_quakeTimer = 0;
_quakeIntensity = 0;
_quakeLength = 0;
if (FlixelSound == null){
_fSound = SndFlixel;
} else {
_fSound = FlixelSound;
};
_logoTimerFinished = 2;
_curState = null;
_frame = Frame;
_iState = InitialState;
_FPS = new Array(8);
_curFPS = 0;
_paused = false;
_help = new Array();
_help.push("A Button");
_help.push("B Button");
_help.push("Mouse");
_help.push("Move");
}
private function onFocus(event:FocusEvent=null):void{
Mouse.hide();
_focusPopup.visible = false;
FlxG.resetKeys();
_paused = false;
FlxG.playMusic();
}
private function log(Data:String):void{
var newText:String;
var i:uint;
if (Data == null){
Data = "ERROR: NULL GAME LOG MESSAGE";
};
if (_console == null){
trace(Data);
return;
};
_consoleLines.push(Data);
if (_consoleLines.length > MAX_CONSOLE_LINES){
_consoleLines.shift();
newText = "";
i = 0;
while (i < _consoleLines.length) {
newText = (newText + (_consoleLines[i] + "\n"));
i++;
};
_consoleText.text = newText;
} else {
_consoleText.appendText((Data + "\n"));
};
_consoleText.scrollV = _consoleText.height;
}
private function setCursor(CursorGraphic:Class):void{
if (_cursor != null){
_buffer.removeChild(_cursor);
};
_cursor = (_buffer.addChild(new (CursorGraphic)) as Bitmap);
}
protected function help(X:String=null, C:String=null, Mouse:String=null, Arrows:String=null):void{
if (X != null){
_help[0] = X;
};
if (C != null){
_help[1] = C;
};
if (Mouse != null){
_help[2] = Mouse;
};
if (Arrows != null){
_help[3] = Arrows;
};
}
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 gv:uint = Math.round((FlxG.getMasterVolume() * 10));
if (FlxG.getMute()){
gv = 0;
};
var i:uint;
while (i < _soundTrayBars.length) {
if (i < gv){
_soundTrayBars[i].alpha = 1;
} else {
_soundTrayBars[i].alpha = 0.5;
};
i++;
};
}
private function fade(Color:uint, Duration:Number=1, FadeComplete:Function=null):void{
if (Color == 0){
_fade.visible = false;
return;
};
_fade.bitmapData.fillRect(new Rectangle(0, 0, _fade.width, _fade.height), Color);
_fadeDelay = Duration;
_fadeComplete = FadeComplete;
_fadeHelper = 0;
_fade.alpha = 0;
_fade.visible = true;
}
private function onMouseUp(event:MouseEvent):void{
FlxG.kMouse = false;
FlxG.releaseKey(6);
}
private function onKeyUp(event:KeyboardEvent):void{
var code:String = String.fromCharCode(event.charCode);
if (event.keyCode == 37){
FlxG.kLeft = false;
FlxG.releaseKey(0);
} else {
if (event.keyCode == 39){
FlxG.kRight = false;
FlxG.releaseKey(1);
} else {
if (event.keyCode == 38){
FlxG.kUp = false;
FlxG.releaseKey(2);
} else {
if (event.keyCode == 40){
FlxG.kDown = false;
FlxG.releaseKey(3);
} else {
if ((((code == "x")) || ((code == "X")))){
FlxG.kA = false;
FlxG.releaseKey(4);
} else {
if ((((code == "c")) || ((code == "C")))){
FlxG.kB = false;
FlxG.releaseKey(5);
} else {
if ((((code == "0")) || ((code == ")")))){
FlxG.setMute(!(FlxG.getMute()));
showSoundTray();
} else {
if ((((code == "-")) || ((code == "_")))){
FlxG.setMute(false);
FlxG.setMasterVolume((FlxG.getMasterVolume() - 0.1));
showSoundTray();
} else {
if ((((code == "+")) || ((code == "=")))){
FlxG.setMute(false);
FlxG.setMasterVolume((FlxG.getMasterVolume() + 0.1));
showSoundTray();
} else {
if ((((((((code == "1")) || ((code == "!")))) || ((code == "~")))) || ((code == "`")))){
toggleConsole();
};
};
};
};
};
};
};
};
};
};
}
private function onEnterFrame(event:Event):void{
var i:uint;
var fps:uint;
var tmp:Bitmap;
var scale:uint;
var pixelSize:uint;
var top:int;
var left:int;
var ct:ColorTransform;
var text:TextField;
var tmp2:Bitmap;
var bx:uint;
var by:uint;
var bmp:Bitmap;
var t:uint = getTimer();
_elapsed = ((t - _total) / 1000);
_total = t;
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){
fps = 0;
i = 0;
while (i < _FPS.length) {
fps = (fps + _FPS[i]);
i++;
};
_consoleFPS.text = (Math.floor((fps / _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 (!_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){
_flash.alpha = (_flash.alpha - (_elapsed / _flashDelay));
if (_flash.alpha <= 0){
_flash.visible = false;
};
};
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 (root.loaderInfo.url.indexOf("localhost") >= 0){
_logoComplete = true;
switchState(_iState);
} else {
if (_f == null){
_f = new FlxArray();
scale = 1;
if (FlxG.height > 200){
scale = 2;
};
pixelSize = (32 * scale);
top = (((FlxG.height * _z) / 2) - (pixelSize * 2));
left = (((FlxG.width * _z) / 2) - pixelSize);
_f.push((addChild(new FlxLogoPixel((left + pixelSize), top, pixelSize, 0, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel(left, (top + pixelSize), pixelSize, 1, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel(left, (top + (pixelSize * 2)), pixelSize, 2, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel((left + pixelSize), (top + (pixelSize * 2)), pixelSize, 3, _fc)) as FlxLogoPixel));
_f.push((addChild(new FlxLogoPixel(left, (top + (pixelSize * 3)), pixelSize, 4, _fc)) as FlxLogoPixel));
_poweredBy = new ImgPoweredBy();
_poweredBy.scaleX = scale;
_poweredBy.scaleY = scale;
_poweredBy.x = (((FlxG.width * _z) / 2) - (_poweredBy.width / 2));
_poweredBy.y = ((top + (pixelSize * 4)) + 16);
ct = new ColorTransform();
ct.color = _fc;
_poweredBy.bitmapData.colorTransform(new Rectangle(0, 0, _poweredBy.width, _poweredBy.height), ct);
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);
i = 0;
while (i < _f.length) {
_f[i].update();
i++;
};
if (_logoFade.alpha > 0){
_logoFade.alpha = (_logoFade.alpha - (_elapsed * 0.5));
};
if (_logoTimer > _logoTimerFinished){
removeChild(_poweredBy);
i = 0;
while (i < _f.length) {
removeChild(_f[i]);
i++;
};
_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);
_console.y = ((_gy * _z) - (FlxG.height * _z));
_consoleYT = (_consoleY = _console.y);
tmp = new Bitmap(new BitmapData((FlxG.width * _z), (FlxG.height * _z), true, 2130706432));
_console.addChild(tmp);
_consoleText = new TextField();
_consoleText.width = tmp.width;
_consoleText.height = tmp.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 = tmp.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("flixel v1.1");
log("---------------------------------------");
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));
tmp = new Bitmap(new BitmapData(160, 100, true, 3204448256));
_focusPopup.x = (((_gx + (FlxG.width / 2)) * _z) - ((tmp.width / 2) * _focusPopup.scaleX));
_focusPopup.y = (((_gy + (FlxG.height / 2)) * _z) - ((tmp.height / 2) * _focusPopup.scaleY));
_focusPopup.addChild(tmp);
text = new TextField();
text.width = tmp.width;
text.height = 20;
text.multiline = true;
text.wordWrap = true;
text.selectable = false;
text.embedFonts = true;
text.antiAliasType = AntiAliasType.NORMAL;
text.gridFitType = GridFitType.PIXEL;
text.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, null, null, null, null, null, "center");
text.text = "GAME PAUSED";
text.y = 7;
_focusPopup.addChild(text);
tmp2 = (_focusPopup.addChild(new ImgKeyX()) as Bitmap);
tmp2.x = 4;
tmp2.y = 36;
tmp2 = (_focusPopup.addChild(new ImgKeyC()) as Bitmap);
tmp2.x = 4;
tmp2.y = (36 + 14);
tmp2 = (_focusPopup.addChild(new ImgKeyMouse()) as Bitmap);
tmp2.x = 4;
tmp2.y = ((36 + 14) + 14);
tmp2 = (_focusPopup.addChild(new ImgKeysArrows()) as Bitmap);
tmp2.x = 4;
tmp2.y = (((36 + 14) + 14) + 14);
tmp2 = (_focusPopup.addChild(new ImgKeyMinus()) as Bitmap);
tmp2.x = 84;
tmp2.y = 36;
tmp2 = (_focusPopup.addChild(new ImgKeyPlus()) as Bitmap);
tmp2.x = 84;
tmp2.y = (36 + 14);
tmp2 = (_focusPopup.addChild(new ImgKey0()) as Bitmap);
tmp2.x = 84;
tmp2.y = ((36 + 14) + 14);
tmp2 = (_focusPopup.addChild(new ImgKey1()) as Bitmap);
tmp2.x = 84;
tmp2.y = (((36 + 14) + 14) + 14);
text = new TextField();
text.width = (tmp.width / 2);
text.height = (tmp.height - 20);
text.multiline = true;
text.wordWrap = true;
text.selectable = false;
text.embedFonts = true;
text.antiAliasType = AntiAliasType.NORMAL;
text.gridFitType = GridFitType.PIXEL;
text.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "left", null, null, null, 4);
text.text = "";
i = 0;
while (i < _help.length) {
if (i == (_help.length - 1)){
text.appendText(" ");
};
if (_help[i] != null){
text.appendText(_help[i]);
};
text.appendText("\n");
i++;
};
text.x = 15;
text.y = 35;
_focusPopup.addChild(text);
text = new TextField();
text.width = (tmp.width / 2);
text.height = (tmp.height - 20);
text.multiline = true;
text.wordWrap = true;
text.selectable = false;
text.embedFonts = true;
text.antiAliasType = AntiAliasType.NORMAL;
text.gridFitType = GridFitType.PIXEL;
text.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "left", null, null, null, 4);
text.text = "Sound up\nSound Down\nMute\nConsole";
text.x = 95;
text.y = 35;
_focusPopup.addChild(text);
addChild(_focusPopup);
_soundTray = new Sprite();
_soundTray.visible = false;
_soundTray.scaleX = 2;
_soundTray.scaleY = 2;
tmp = new Bitmap(new BitmapData(80, 30, true, 2130706432));
_soundTray.x = (((_gx + (FlxG.width / 2)) * _z) - ((tmp.width / 2) * _soundTray.scaleX));
_soundTray.addChild(tmp);
text = new TextField();
text.width = tmp.width;
text.height = tmp.height;
text.multiline = true;
text.wordWrap = true;
text.selectable = false;
text.embedFonts = true;
text.antiAliasType = AntiAliasType.NORMAL;
text.gridFitType = GridFitType.PIXEL;
text.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "center");
_soundTray.addChild(text);
text.text = "VOLUME";
text.y = 16;
bx = 10;
by = 14;
_soundTrayBars = new Array();
i = 0;
while (i < 10) {
tmp = new Bitmap(new BitmapData(4, (i + 1), false, 0xFFFFFF));
tmp.x = bx;
tmp.y = by;
_soundTrayBars.push(_soundTray.addChild(tmp));
bx = (bx + 6);
by--;
i++;
};
addChild(_soundTray);
_focusField = new TextField();
_focusField.width = (FlxG.width * _z);
_focusField.height = (FlxG.height * _z);
_focusField.selectable = false;
addChild(_focusField);
_focusField.addEventListener(FocusEvent.FOCUS_IN, onFocus);
_focusField.addEventListener(FocusEvent.FOCUS_OUT, onFocusLost);
if (_frame != null){
bmp = new _frame();
bmp.scaleX = _z;
bmp.scaleY = _z;
addChild(bmp);
};
_created = true;
_logoTimer = 0;
};
};
};
}
private function switchState(state:Class):void{
FlxG.unfollow();
FlxG.resetKeys();
_quakeTimer = 0;
_buffer.x = 0;
_buffer.y = 0;
if (_cursor != null){
_buffer.removeChild(_cursor);
_cursor = null;
};
var newState:FlxState = new (state);
_buffer.addChild(newState);
if (_curState != null){
_buffer.swapChildren(newState, _curState);
_buffer.removeChild(_curState);
_curState.destroy();
};
_fade.visible = false;
_curState = newState;
}
private function onMouseDown(event:MouseEvent):void{
FlxG.kMouse = true;
FlxG.pressKey(6);
}
private function onKeyDown(event:KeyboardEvent):void{
var code:String = String.fromCharCode(event.charCode);
if (event.keyCode == 37){
FlxG.kLeft = true;
FlxG.pressKey(0);
} else {
if (event.keyCode == 39){
FlxG.kRight = true;
FlxG.pressKey(1);
} else {
if (event.keyCode == 38){
FlxG.kUp = true;
FlxG.pressKey(2);
} else {
if (event.keyCode == 40){
FlxG.kDown = true;
FlxG.pressKey(3);
} else {
if ((((code == "x")) || ((code == "X")))){
FlxG.kA = true;
FlxG.pressKey(4);
} else {
if ((((code == "c")) || ((code == "C")))){
FlxG.kB = true;
FlxG.pressKey(5);
};
};
};
};
};
};
}
private function quake(Intensity:Number, Duration:Number=0.5):void{
_quakeIntensity = Intensity;
_quakeLength = Duration;
_quakeTimer = 0.01;
}
private function flash(Color:uint, Duration:Number=1):void{
if (Color == 0){
_flash.visible = false;
return;
};
_flash.bitmapData.fillRect(new Rectangle(0, 0, _flash.width, _flash.height), Color);
_flashDelay = Duration;
_flash.alpha = 1;
_flash.visible = true;
}
private function onFocusLost(event:FocusEvent=null):void{
Mouse.show();
_focusPopup.visible = true;
_paused = true;
FlxG.pauseMusic();
}
}
}//package com.adamatomic.flixel
Section 13
//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 14
//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 15
//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 16
//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 17
//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 18
//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 19
//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 20
//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 21
//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 22
//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 23
//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 24
//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 25
//FlxSprite (com.adamatomic.flixel.FlxSprite)
package com.adamatomic.flixel {
import com.adamatomic.flixel.data.*;
import flash.display.*;
import flash.geom.*;
public class FlxSprite extends FlxCore {
public var acceleration:Point;
public var angularAcceleration:Number;
private var _animations:FlxArray;
public var offset:Point;
public var pixels:BitmapData;
private var _curAnim:FlxAnim;
public var drag:Point;
public var angularDrag:Number;
private var _flipped:uint;
private 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 facingRight:Boolean;
public var health:Number;
private var _bh:uint;
private var _p:Point;
public var finished:Boolean;
private var _r:Rectangle;
private var _bw:uint;
private var _frameTimer:Number;
protected var _curFrame:uint;
public function FlxSprite(Graphic:Class=null, X:int=0, Y:int=0, Animated:Boolean=false, Reverse:Boolean=false, Width:uint=0, Height:uint=0, Color:uint=0){
super();
if (Graphic == null){
pixels = FlxG.createBitmap(Width, Height, Color);
} else {
pixels = FlxG.addBitmap(Graphic, Reverse);
};
x = X;
y = Y;
if (Width == 0){
if (Animated){
Width = pixels.height;
} else {
Width = pixels.width;
};
};
width = (_bw = Width);
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;
finished = false;
facingRight = true;
_animations = new FlxArray();
if (Reverse){
_flipped = (pixels.width >> 1);
} else {
_flipped = 0;
};
_curAnim = null;
_curFrame = 0;
_frameTimer = 0;
_p = new Point(x, y);
_r = new Rectangle(0, 0, _bw, _bh);
if (Animated){
_pixels = new BitmapData(width, height);
_pixels.copyPixels(pixels, _r, new Point());
} else {
_pixels = null;
};
health = 1;
}
override protected function getScreenXY(p:Point):void{
p.x = ((Math.floor((x - offset.x)) + _shakeX) + Math.floor((FlxG.scroll.x * scrollFactor.x)));
p.y = ((Math.floor((y - offset.y)) + _shakeY) + Math.floor((FlxG.scroll.y * scrollFactor.y)));
}
public function hurt(Damage:Number):void{
if ((health = (health - Damage)) <= 0){
kill();
};
}
override public function render():void{
var mtx:Matrix;
if (!visible){
return;
};
getScreenXY(_p);
if (angle != 0){
mtx = new Matrix();
mtx.translate(-((_bw >> 1)), -((_bh >> 1)));
mtx.rotate(((Math.PI * 2) * (angle / 360)));
mtx.translate((_p.x + (_bw >> 1)), (_p.y + (_bh >> 1)));
if (_pixels != null){
FlxG.buffer.draw(_pixels, mtx);
} else {
FlxG.buffer.draw(pixels, mtx);
};
return;
} else {
if (_pixels != null){
FlxG.buffer.copyPixels(_pixels, _r, _p, null, null, true);
} else {
FlxG.buffer.copyPixels(pixels, _r, _p, null, null, true);
};
};
}
private function calcFrame():void{
var rx:uint;
if (_curAnim){
rx = (_curAnim.frames[_curFrame] * _bw);
if (((!(facingRight)) && ((_flipped > 0)))){
rx = (((_flipped << 1) - rx) - _bw);
};
} else {
rx = (facingRight) ? 0 : _bw;
};
_pixels.copyPixels(pixels, new Rectangle(rx, 0, _bw, _bh), new Point());
}
public function facing(Right:Boolean):void{
facingRight = Right;
calcFrame();
}
override public function hitCeiling(block:FlxBlock):Boolean{
velocity.y = 0;
return (true);
}
override public function hitFloor(block:FlxBlock):Boolean{
velocity.y = 0;
return (true);
}
public function play(AnimName:String, Force:Boolean=false):void{
if (((((!(Force)) && (!((_curAnim == null))))) && ((AnimName == _curAnim.name)))){
return;
};
_curFrame = 0;
_frameTimer = 0;
var i:uint;
while (i < _animations.length) {
if (_animations[i].name == AnimName){
finished = false;
_curAnim = _animations[i];
calcFrame();
return;
};
i++;
};
}
override public function update():void{
var thrustComponents:Point;
var maxComponents: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){
thrustComponents = FlxG.rotatePoint(-(thrust), 0, 0, 0, angle);
maxComponents = FlxG.rotatePoint(-(maxThrust), 0, 0, 0, angle);
maxVelocity.x = Math.abs(maxComponents.x);
maxVelocity.y = Math.abs(maxComponents.y);
} else {
thrustComponents = new Point();
};
x = (x + ((velocity.x = FlxG.computeVelocity(velocity.x, (acceleration.x + thrustComponents.x), drag.x, maxVelocity.x)) * FlxG.elapsed));
y = (y + ((velocity.y = FlxG.computeVelocity(velocity.y, (acceleration.y + thrustComponents.y), drag.y, maxVelocity.y)) * FlxG.elapsed));
}
public function addAnimation(Name:String, Frames:Array, FrameRate:Number=0, Looped:Boolean=true):void{
_animations.add(new FlxAnim(Name, Frames, FrameRate, Looped));
}
public function randomFrame():void{
_pixels.copyPixels(pixels, new Rectangle((Math.floor((Math.random() * (pixels.width / _bw))) * _bw), 0, _bw, _bh), new Point());
}
override public function overlapsPoint(X:Number, Y:Number, PerPixel:Boolean=false):Boolean{
if (PerPixel){
return (pixels.hitTest(new Point(0, 0), 0xFF, new Point(X, Y)));
};
if ((((((((X <= x)) || ((X >= (x + width))))) || ((Y <= y)))) || ((Y >= (y + height))))){
return (false);
};
return (true);
}
override public function hitWall(block:FlxBlock):Boolean{
velocity.x = 0;
return (true);
}
public static function overlapArrays(Array1:FlxArray, Array2:FlxArray, Collide:Function):void{
var j:uint;
var spr1:FlxSprite;
var spr2:FlxSprite;
var i:uint;
while (i < Array1.length) {
spr1 = Array1[i];
if (((!(spr1.exists)) || (spr1.dead))){
} else {
j = 0;
while (j < Array2.length) {
spr2 = Array2[j];
if (((!(spr2.exists)) || (spr2.dead))){
} else {
if (spr1.overlaps(spr2)){
Collide(spr1, spr2);
};
};
j++;
};
};
i++;
};
}
public static function overlapArray(Array:FlxArray, Sprite:FlxSprite, Collide:Function):void{
var spr:FlxSprite;
if (((!(Sprite.exists)) || (Sprite.dead))){
return;
};
var i:uint;
while (i < Array.length) {
spr = Array[i];
if (((!(spr.exists)) || (spr.dead))){
} else {
if (spr.overlaps(Sprite)){
Collide(spr, Sprite);
};
};
i++;
};
}
}
}//package com.adamatomic.flixel
Section 26
//FlxState (com.adamatomic.flixel.FlxState)
package com.adamatomic.flixel {
import com.adamatomic.flixel.data.*;
import flash.display.*;
public class FlxState extends Sprite {
private var _children:FlxArray;
public function FlxState(){
super();
FlxG.state = this;
_children = new FlxArray();
}
public function add(Core:FlxCore):FlxCore{
return ((_children.add(Core) as FlxCore));
}
public function render():void{
var i:uint;
while (i < _children.length) {
if (((_children[i].exists) && (_children[i].visible))){
_children[i].render();
};
i++;
};
}
public function update():void{
var i:uint;
while (i < _children.length) {
if (((_children[i].exists) && (_children[i].active))){
_children[i].update();
};
i++;
};
}
public function destroy():void{
_children.clear();
}
}
}//package com.adamatomic.flixel
Section 27
//FlxText (com.adamatomic.flixel.FlxText)
package com.adamatomic.flixel {
import com.adamatomic.flixel.data.*;
import flash.geom.*;
import flash.text.*;
public class FlxText extends FlxCore {
private var _ox:Number;
private var _oy:Number;
private var _tf:TextField;
private var _mtx:Matrix;
public var angle:Number;
private var _oa:Number;
public function FlxText(X:Number, Y:Number, Width:uint, Height:uint, Text:String, Color:uint=0, Font:String=null, Size:uint=8, Justification:String=null, Angle:Number=0){
super();
_ox = (x = X);
_oy = (y = Y);
_oa = (angle = Angle);
width = Width;
height = Height;
if (Font == null){
Font = "system";
};
if (Text == null){
Text = "";
};
_tf = new TextField();
_tf.width = width;
_tf.height = height;
_tf.embedFonts = true;
_tf.selectable = false;
_tf.sharpness = 100;
_tf.defaultTextFormat = new TextFormat(Font, Size, Color, null, null, null, null, null, Justification);
_tf.text = Text;
_mtx = new Matrix();
_mtx.translate(-((width >> 1)), -((height >> 1)));
_mtx.rotate(((Math.PI * 2) * (angle / 360)));
_mtx.translate((Math.floor(x) + (width >> 1)), (Math.floor(y) + (height >> 1)));
}
public function setColor(Color:uint):void{
var format:TextFormat = _tf.defaultTextFormat;
format.color = Color;
_tf.defaultTextFormat = format;
_tf.text = _tf.text;
}
public function setText(Text:String):void{
_tf.text = Text;
}
override public function update():void{
super.update();
var n:Point = new Point();
getScreenXY(n);
if (((((!((_ox == n.x))) || (!((_oy == n.y))))) || (!((_oa == angle))))){
_mtx = new Matrix();
_mtx.translate(-((width >> 1)), -((height >> 1)));
_mtx.rotate(((Math.PI * 2) * (angle / 360)));
_mtx.translate((n.x + (width >> 1)), (n.y + (height >> 1)));
_ox = n.x;
_oy = n.y;
};
}
override public function render():void{
FlxG.buffer.draw(_tf, _mtx);
}
}
}//package com.adamatomic.flixel
Section 28
//Arrow (com.noonat.queens.Arrow)
package com.noonat.queens {
public class Arrow extends Sprite {
private var _direction:Number;
private var ImgArrow:Class;
public function Arrow($x:Number, $y:Number, $direction:Number):void{
ImgArrow = Arrow_ImgArrow;
super(ImgArrow, $x, $y, true, true);
acceleration.x = ($direction * 2000);
maxVelocity.x = 500;
height = 3;
_direction = $direction;
}
override public function update():void{
if (!exists){
return;
};
if (!inFollowBounds()){
kill();
return;
};
facing((_direction > 0));
super.update();
}
}
}//package com.noonat.queens
Section 29
//Arrow_ImgArrow (com.noonat.queens.Arrow_ImgArrow)
package com.noonat.queens {
import mx.core.*;
public class Arrow_ImgArrow extends BitmapAsset {
}
}//package com.noonat.queens
Section 30
//ArrowShooter (com.noonat.queens.ArrowShooter)
package com.noonat.queens {
import com.adamatomic.flixel.*;
public class ArrowShooter extends Sprite {
private var SndArrow:Class;
private var ImgArrowShooter:Class;
private var _arrows:FlxArray;
private var _arrow:int;// = 0
private var _queen:Queen;
private var _timer:Number;// = 2
public var screen:int;
public function ArrowShooter($x:Number, $y:Number, $arrows:FlxArray, $queen:Queen, $timer:Number=-1):void{
ImgArrowShooter = ArrowShooter_ImgArrowShooter;
SndArrow = ArrowShooter_SndArrow;
super(ImgArrowShooter, $x, $y, false, false);
_arrows = $arrows;
_queen = $queen;
if ($timer >= 0){
_timer = $timer;
};
}
override public function update():void{
if (!onScreen()){
return;
};
_timer = (_timer - FlxG.elapsed);
if (_timer < 0){
fire();
};
super.update();
}
public function fire():void{
FlxG.play(SndArrow);
_arrows.add(FlxG.state.add(new Arrow(x, ((y + (_arrow * 16)) + 4), -1)));
_arrows.add(FlxG.state.add(new Arrow(x, ((y + (_arrow * 16)) + 11), -1)));
_arrows.add(FlxG.state.add(new Arrow(((x + width) - 8), ((y + (_arrow * 16)) + 4), 1)));
_arrows.add(FlxG.state.add(new Arrow(((x + width) - 8), ((y + (_arrow * 16)) + 11), 1)));
_arrow++;
if (_arrow == 2){
_arrow = 0;
};
_timer = (_timer + 1);
}
}
}//package com.noonat.queens
Section 31
//ArrowShooter_ImgArrowShooter (com.noonat.queens.ArrowShooter_ImgArrowShooter)
package com.noonat.queens {
import mx.core.*;
public class ArrowShooter_ImgArrowShooter extends BitmapAsset {
}
}//package com.noonat.queens
Section 32
//ArrowShooter_SndArrow (com.noonat.queens.ArrowShooter_SndArrow)
package com.noonat.queens {
import mx.core.*;
public class ArrowShooter_SndArrow extends SoundAsset {
}
}//package com.noonat.queens
Section 33
//King (com.noonat.queens.King)
package com.noonat.queens {
public class King extends Sprite {
private var _runVelocity:int;// = 20
private var _jumpVelocity:int;// = 180
private var _queen:Queen;
private var _intro:Boolean;// = true
private var ImgKing:Class;
public function King($queen:Queen, $x:int, $y:int){
ImgKing = King_ImgKing;
super(ImgKing, $x, $y, true, true);
_queen = $queen;
width = 8;
height = 14;
offset.x = 4;
offset.y = 2;
maxVelocity.x = _runVelocity;
maxVelocity.y = (_jumpVelocity * 2);
acceleration.y = 420;
drag.x = (maxVelocity.x * 8);
addAnimation("idle", [1]);
addAnimation("run", [1, 2, 3, 0], 5);
addAnimation("dead", [4]);
play("idle");
}
override public function update():void{
if (_intro){
if (x > 72){
acceleration.x = (acceleration.x - drag.x);
} else {
_intro = false;
acceleration.x = 0;
drag.x = (drag.x / 2);
maxVelocity.x = (maxVelocity.x / 2);
};
} else {
if (_queen.x > 180){
if (x < 440){
facing(true);
acceleration.x = (acceleration.x + drag.x);
} else {
facing(false);
acceleration.x = 0;
};
};
if (_queen.x > 480){
if (x < (480 - 16)){
x = (480 - 16);
};
if (x < (480 * 2)){
facing(true);
acceleration.x = (acceleration.x + drag.x);
} else {
facing(false);
acceleration.x = 0;
};
};
if ((((_queen.x > 1200)) && ((x < 1200)))){
x = 1612;
y = 50;
};
};
if (!dead){
if (velocity.x != 0){
play("run");
} else {
play("idle");
};
} else {
acceleration.y = 0;
};
super.update();
}
override public function kill():void{
if (dead){
return;
};
play("dead");
super.kill();
exists = true;
}
}
}//package com.noonat.queens
Section 34
//King_ImgKing (com.noonat.queens.King_ImgKing)
package com.noonat.queens {
import mx.core.*;
public class King_ImgKing extends BitmapAsset {
}
}//package com.noonat.queens
Section 35
//MenuState (com.noonat.queens.MenuState)
package com.noonat.queens {
import com.adamatomic.flixel.*;
public class MenuState extends FlxState {
private var _title:FlxText;
private var _b:FlxButton;
private var _bg:FlxSprite;
private var _fadingTime:Number;
private var _pressedA:Boolean;
private var _pressedB:Boolean;
private var _fading:Boolean;
private var ImgCursor:Class;
private var ImgWallBricks:Class;
private static var _firstTime:Boolean = true;
public function MenuState():void{
ImgWallBricks = MenuState_ImgWallBricks;
ImgCursor = MenuState_ImgCursor;
super();
_fading = false;
_fadingTime = 1.2;
FlxG.setCursor(ImgCursor);
}
override public function update():void{
if (!_fading){
_fading = true;
FlxG.fade(4294967295, 1);
};
if (_fadingTime > 0){
_fadingTime = (_fadingTime - FlxG.elapsed);
if (_fadingTime < 0){
FlxG.fade(0);
FlxG.flash(4294967295, 1);
this.add(new FlxBlock(0, 0, FlxG.width, FlxG.height, ImgWallBricks));
_title = (this.add(new FlxText(0, 70, FlxG.width, 80, "queens", 4291611852, null, 32, "center")) as FlxText);
this.add(new FlxText(170, 120, 110, 20, "by noonat", 4284900966, null, 8, "left"));
this.add(new FlxText(120, 200, 110, 20, "PRESS X TO PLAY", 9285844, null, 8, "left"));
if (_firstTime){
_firstTime = false;
_b = (this.add(new FlxButton(110, 200, new FlxSprite(null, 0, 0, false, false, 104, 15, 4279247411), onButton, new FlxSprite(null, 0, 0, false, false, 104, 15, 4280433748), new FlxText(25, 1, 100, 10, "CLICK HERE", 8098479), new FlxText(25, 1, 100, 10, "CLICK HERE", 9285844))) as FlxButton);
};
};
};
if (FlxG.justPressed(FlxG.A)){
FlxG.switchState(PlayState);
};
super.update();
}
private function onButton():void{
_b.visible = false;
}
}
}//package com.noonat.queens
Section 36
//MenuState_ImgCursor (com.noonat.queens.MenuState_ImgCursor)
package com.noonat.queens {
import mx.core.*;
public class MenuState_ImgCursor extends BitmapAsset {
}
}//package com.noonat.queens
Section 37
//MenuState_ImgWallBricks (com.noonat.queens.MenuState_ImgWallBricks)
package com.noonat.queens {
import mx.core.*;
public class MenuState_ImgWallBricks extends BitmapAsset {
}
}//package com.noonat.queens
Section 38
//Platform (com.noonat.queens.Platform)
package com.noonat.queens {
import flash.display.*;
import flash.geom.*;
import com.adamatomic.flixel.*;
public class Platform extends FlxBlock {
private var _axis:int;
private var _pixels:BitmapData;
private var _waiting:Number;// = 0
private var _min:Number;
private var _wait:Number;
private var _max:Number;
private var _speedNeg:Number;
private var _speedPos:Number;
private var SndCrusher:Class;
private var _p:Point;
private var _r:Rectangle;
private var ImgPlatform:Class;
private var _direction:int;
public var moved:Number;// = 0
public static var AXIS_X:int = 0;
public static var AXIS_Y:int = 1;
public function Platform($x:Number, $y:Number, $w:Number, $h:Number, $axis:int, $direction:int, $min:Number, $max:Number, $speed, $wait:Number, $graphic:Class=null){
ImgPlatform = Platform_ImgPlatform;
SndCrusher = Platform_SndCrusher;
super($x, $y, $w, $h, null);
_p = new Point();
_r = new Rectangle(0, 0, width, height);
_pixels = FlxG.addBitmap(($graphic) ? $graphic : ImgPlatform);
_axis = $axis;
_direction = $direction;
_min = $min;
_max = $max;
_speedNeg = (($speed is Number)) ? $speed : $speed[0];
_speedPos = (($speed is Number)) ? $speed : $speed[1];
_wait = $wait;
}
override public function update():void{
var value:Number;
if ((((FlxG.state is PlayState)) && ((FlxG.state as PlayState).broken))){
return;
};
moved = 0;
if (((((((((x + width) < -(FlxG.followMin.x))) || ((x > (-(FlxG.followMax.x) + FlxG.width))))) || (((y + height) < -(FlxG.followMin.y))))) || ((y > (-(FlxG.followMax.y) + FlxG.height))))){
return;
};
var elapsed:Number = FlxG.elapsed;
if (_waiting > 0){
_waiting = (_waiting - elapsed);
elapsed = Math.abs(_waiting);
};
if (_waiting <= 0){
value = ((_axis === AXIS_X)) ? x : y;
moved = ((_direction * ((_direction < 0)) ? _speedNeg : _speedPos) * elapsed);
value = (value + moved);
if (_direction < 0){
if (value < _min){
_direction = 1;
if (_wait){
_waiting = _wait;
};
};
} else {
if (value > _max){
if (height === 64){
FlxG.quake(0.0025, 0.2);
FlxG.play(SndCrusher);
};
moved = (moved - (value - _max));
value = _max;
_direction = -1;
if (_wait){
_waiting = _wait;
};
};
};
this[((_axis === AXIS_X)) ? "x" : "y"] = value;
};
super.update();
}
override public function render():void{
if (!visible){
return;
};
getScreenXY(_p);
FlxG.buffer.copyPixels(_pixels, _r, _p, null, null, true);
}
}
}//package com.noonat.queens
Section 39
//Platform_ImgPlatform (com.noonat.queens.Platform_ImgPlatform)
package com.noonat.queens {
import mx.core.*;
public class Platform_ImgPlatform extends BitmapAsset {
}
}//package com.noonat.queens
Section 40
//Platform_SndCrusher (com.noonat.queens.Platform_SndCrusher)
package com.noonat.queens {
import mx.core.*;
public class Platform_SndCrusher extends SoundAsset {
}
}//package com.noonat.queens
Section 41
//PlayState (com.noonat.queens.PlayState)
package com.noonat.queens {
import com.adamatomic.flixel.*;
public class PlayState extends FlxState {
private var ImgRockGibs:Class;
private var ImgCrusher:Class;
private var ImgRoofFringe:Class;
private var ImgRoofBricks2:Class;
private var ImgRoofBricksDarkBloody:Class;
private var _king:King;
private var ImgRoofBricks3:Class;
private var _gears1:FlxArray;
private var ImgRoofBricksDarkLarge:Class;
private var _blocks:FlxArray;
private var ImgGear2:Class;
private var _bridge:FlxBlock;
private var _arrows:FlxArray;
private var _crushers:FlxArray;
private var _queen:Queen;
private var _time:Number;// = 0
private var _gears2:FlxArray;
private var ImgPlatformWide:Class;
private var SndBridge:Class;
private var _postBroken:FlxArray;
private var ImgWallBricks:Class;
private var _rock:Rock;
private var _roofSpikes:FlxArray;
private var ImgRoofBricks:Class;
private var ImgDirt:Class;
private var ImgGlow:Class;
private var ImgRoofBricks4px:Class;
public var broken:Boolean;// = false
private var SndExplode:Class;
private var ImgWallBricksFade:Class;
private var _queenNames:Array;
private var ImgRoofBricksDark:Class;
private var _preBroken:FlxArray;
private var ImgGear:Class;
private var _platforms:FlxArray;
private var ImgDirtObjects:Class;
private var _preBrokenNoCollide:FlxArray;
private var ImgDirtFringe:Class;
private var _bridgeGibs:FlxEmitter;// = null
public static var _playCount:int = 0;
public function PlayState():void{
var spr:FlxSprite;
var plt:Platform;
var t:Array;
ImgCrusher = PlayState_ImgCrusher;
ImgDirt = PlayState_ImgDirt;
ImgDirtFringe = PlayState_ImgDirtFringe;
ImgDirtObjects = PlayState_ImgDirtObjects;
ImgGlow = PlayState_ImgGlow;
SndBridge = PlayState_SndBridge;
ImgPlatformWide = PlayState_ImgPlatformWide;
ImgRoofBricks = PlayState_ImgRoofBricks;
ImgRoofBricks4px = PlayState_ImgRoofBricks4px;
ImgRoofBricksDark = PlayState_ImgRoofBricksDark;
ImgRoofBricksDarkBloody = PlayState_ImgRoofBricksDarkBloody;
ImgRoofBricksDarkLarge = PlayState_ImgRoofBricksDarkLarge;
ImgRoofBricks2 = PlayState_ImgRoofBricks2;
ImgRoofBricks3 = PlayState_ImgRoofBricks3;
ImgRoofFringe = PlayState_ImgRoofFringe;
ImgWallBricks = PlayState_ImgWallBricks;
ImgRockGibs = PlayState_ImgRockGibs;
ImgWallBricksFade = PlayState_ImgWallBricksFade;
SndExplode = PlayState_SndExplode;
ImgGear = PlayState_ImgGear;
ImgGear2 = PlayState_ImgGear2;
_queenNames = ["Abbatissa", "Abelota", "Achethe", "Ade", "Admiranda", "Agnes", "Aicusa", "Akelda", "Alainne", "Alba", "Albiona", "Aleusa", "Alice", "Alma", "Alsneta", "Andrie", "Angelet", "Angharad", "Anglides", "Anna", "Anthoinette", "Argante", "Astolat", "Atilda", "Avarona", "Avice", "Avilon", "Avoca", "Aysta", "Badelota", "Bausanne", "Bauteut", "Beatrice", "Bedegrayne", "Bedeluue", "Belakane", "Bencelina", "Berte", "Bertha", "Blancheflor", "Blissot", "Blitha", "Boime", "Branwyn", "Brise", "Calla", "Camilla", "Celestine", "Chelinda", "Clarine", "Cotovatre", "Dametta", "Damisona", "Deloys", "Desdemona", "Devonny", "Dinae", "Durilda", "Elaine", "Elaisse", "Ellerete", "Elsa", "Emeria", "Emma", "Enid", "Enide", "Enota", "Esa", "Eschiva", "Esdeline", "Estienne", "Estrangia", "Ettare", "Eugenia", "Eustachia", "Extranea", "Fina", "Finepopla", "Fortunata", "Fousafia", "Galiene", "Ganieda", "Gemma", "Gerbaga", "Germainne", "Gersendis", "Ginnade", "Giraude", "Gladuse", "Golla", "Grainne", "Guenloie", "Gvenour", "Gwenddydd", "Gwendolen", "Gwendoloena", "Gwenhwyfach", "Helmeth", "Helsin", "Helvynya", "Herzeloyde", "Hesse", "Hextilda", "Houdee", "Iblis", "Igerne", "Igrayne", "Ilene", "Imedia", "Isabella", "Isolde", "Isoude", "Italia", "Jeromia", "Jessamine", "Joanenna", "Josiane", "Jourdenete", "Juliana", "Justina", "Keina", "Kemma", "Kiena", "Kima", "Kinna", "Kymme", "Laudine", "Lausanne", "Leda", "Legarda", "Lena", "Letselina", "Lia", "Libourc", "Lidoine", "Ligarda", "Lige", "Lindara", "Llamrei", "Lota", "Lunet", "Lunete", "Lynelle", "Lynessa", "Lynley", "Lynnette", "Lyonesse", "Lyonet", "Lyonors", "Lysanor", "Magestya", "Margawse", "Maronne", "Marsilia", "Martine", "Matilda", "Maxencia", "Mazelina", "Melodie", "Melusine", "Michiele", "Minnota", "Mique", "Mitri", "Modron", "Morcades", "Morgawse", "Morguase", "Nicia", "Nimiane", "Nimue", "Nineve", "Noblete", "Nog", "Norma", "Nycaise", "Nyneve", "Olwyn", "Optata", "Oreute", "Orguelleuse", "Ottilia", "Pandonia", "Parise", "Parisete", "Pasques", "Paulina", "Pechel", "Philomena", "Plente", "Popelina", "Precious", "Pridwyn", "Primaveira", "Primeveire", "Pronele", "Prydwyn", "Quinevere", "Ragnall", "Raieyana", "Rametta", "Roana", "Roberge", "Rogerete", "Rohesia", "Salerna", "Saveage", "Sebille", "Sewenna", "Shalott", "Sigune", "Soredamors", "Souplice", "Splendora", "Sreda", "Swale", "Thangustella", "Tryamon", "Udeline", "Urie", "Viviane", "Vivien", "Watcelina", "Wenhaver", "Wimarc", "Wimarca", "Ygeme", "Ygraine", "Ynstauncia", "Ysane", "Ysenda", "Ysolde", "Ysopa", "Ysoria"];
super();
_playCount++;
var i:int = Math.floor((Math.random() * _queenNames.length));
var nameText:FlxText = new FlxText(0, 150, 320, 80, ("queen " + _queenNames[i].toLowerCase()), 4280164374, null, 24, "center");
nameText.scrollFactor.x = 0.7;
this.add(nameText);
_queen = new Queen(72, 10);
FlxG.follow(_queen, 2.5);
_king = new King(_queen, 80, 10);
_king.facing(false);
_arrows = new FlxArray();
_blocks = new FlxArray();
_platforms = new FlxArray();
_roofSpikes = new FlxArray();
this.add(new FlxBlock(32, 40, 32, 16, ImgWallBricks));
this.add(new FlxBlock(32, 56, 32, 8, ImgWallBricksFade));
this.add(new FlxBlock(0, -248, 960, 280, ImgWallBricks));
this.addRoofBlock(0, 32);
this.addRoofBlock(64, 960);
_blocks.add(new FlxBlock(-32, 0, 32, 240, null));
this.addDirtBlock(0, ((_playCount == 1)) ? 97 : 98);
this.addDirtBlock(160, 192);
this.addDirtBlock(224, 320);
this.addDirtBlock(320, 396, -56);
this.addDirtBlock(396, 576, -80);
this.addRoofSpike(160, 1);
this.addRoofSpike(180);
this.addRoofSpike(200).maxVelocity.y = 10000;
this.addRoofSpike(240, 0, 24);
this.addArrowShooter(544, -112, -80, 0.25);
_platforms.add(this.add(new Platform(650, 200, 32, 8, Platform.AXIS_X, -1, 625, 725, 40, 2)));
_platforms.add(this.add(new Platform(800, 170, 32, 8, Platform.AXIS_X, 1, 800, 900, 40, 2)));
this.addRoofSpike(740);
this.addRoofSpike(805);
this.addDirtBlock(940, 0x0400);
this.addCaveBlock(1056, -240, 384, 560, ImgRoofBricksDark, false);
this.addCaveBlock(1056, -240, 384, 560, ImgRoofBricksDarkLarge, false, 4);
this.addCaveBlock(1152, -240, 288, 128, ImgRoofBricks);
_blocks.add(this.add(new FlxBlock(1160, -64, 8, 4, ImgRoofBricks4px)));
_blocks.add(this.add(new FlxBlock(1160, -28, 8, 4, ImgRoofBricks4px)));
_rock = (this.add(new Rock(1312, -112)) as Rock);
this.addCaveBlock(1168, -96, 144, 72, ImgRoofBricks);
this.addCaveBlock(1312, -96, 32, 32, ImgRoofBricks);
this.addCaveBlock(1376, -112, 26, 48, ImgRoofBricks);
this.addCaveBlock(1040, -240, 112, 368, ImgRoofBricks);
this.addCaveBlock(1152, 0, 160, 128, ImgRoofBricks);
_blocks.add(this.add(new FlxBlock(1312, 28, 8, 4, ImgRoofBricks4px)));
_blocks.add(this.add(new FlxBlock(1312, 60, 8, 4, ImgRoofBricks4px)));
_blocks.add(this.add(new FlxBlock(1312, 92, 8, 4, ImgRoofBricks4px)));
_blocks.add(this.add(new FlxBlock(1312, 124, 8, 4, ImgRoofBricks4px)));
this.addCaveBlock(1408, -112, 32, 240, ImgRoofBricks);
this.addCaveBlock(1328, 168, 16, 16, ImgRoofBricks);
_bridge = this.addCaveBlock(1344, 160, 64, 24, ImgRoofBricks, false);
this.addCaveBlock(0x0400, 192, 64, 48, ImgRoofBricks);
this.addCaveBlock(1088, 176, 0x0100, 80, ImgRoofBricks);
this.addCaveBlock(1408, 160, 32, 80, ImgRoofBricks);
_preBroken = new FlxArray();
_preBrokenNoCollide = new FlxArray();
_postBroken = new FlxArray();
_crushers = new FlxArray();
i = 0;
while (i < 6) {
plt = new Platform((1464 + (i * 48)), ((160 - 128) + Math.floor((Math.random() * 64))), 32, 64, Platform.AXIS_Y, (Math.floor((Math.random() * 2))) ? -1 : 1, (160 - 128), (160 - 64), [150, (900 + (Math.random() * 200))], ((Math.random() * 0.2) + 0.1), ImgCrusher);
_crushers.add(this.add(plt));
i++;
};
_gears1 = new FlxArray();
i = 0;
while (i < 11) {
spr = new FlxSprite(ImgGear2, (1464 + (i * 40)), 285);
spr.angularAcceleration = 5;
this.add(spr);
_gears1.add(spr);
i++;
};
_gears2 = new FlxArray();
i = 0;
while (i < 10) {
spr = new FlxSprite(ImgGear, (1488 + (i * 40)), 285);
spr.angularAcceleration = 10;
this.add(spr);
_gears2.add(spr);
i++;
};
this.add(new FlxBlock(1696, 96, 64, 64, ImgGlow));
this.add(new FlxBlock(1440, 0, 320, 104, ImgWallBricks));
this.addCaveBlock(1440, 104, 320, 16, ImgRoofBricks);
_preBroken.add(this.addCaveBlock(1440, 160, 320, 16, ImgRoofBricksDarkBloody, false));
this.addCaveBlock(1440, 176, 32, 16, ImgRoofBricksDark);
_preBroken.add(this.addCaveBlock(1440, 192, 16, 48, ImgRoofBricksDark, false));
this.addCaveBlock(1088, 0x0100, 352, 64, ImgRoofBricks);
this.addCaveBlock(1440, 0x0100, 32, 64, ImgRoofBricksDark);
_preBroken.add(this.addCaveBlock(1728, 176, 32, 16, ImgRoofBricksDark, false));
_preBroken.add(this.addCaveBlock(1744, 192, 16, 48, ImgRoofBricksDark, false));
this.addCaveBlock(1728, 0x0100, 32, 48, ImgRoofBricksDark);
this.addCaveBlock(1472, 304, 288, 16, ImgRoofBricksDark);
_preBrokenNoCollide.add(this.addCaveBlock(0x0600, 176, 16, 128, ImgRoofBricksDark, false));
_preBrokenNoCollide.add(this.addCaveBlock(1648, 176, 16, 128, ImgRoofBricksDark, false));
var tiles:Array = [[2.5, -0.5, 0.5, 0.5, ImgRoofBricksDark], [4, -2.5, 1, 0.5, ImgRoofBricksDark], [6.5, -0.5, 0.5, 0.5, ImgRoofBricksDark], [9, -1.5, 0.5, 1.5, ImgRoofBricksDark], [9.5, -0.5, 0.5, 0.5, ImgRoofBricksDark], [10.5, -2.5, 0.5, 0.5, ImgRoofBricksDark], [12.5, -5.5, 1.5, 0.5, ImgRoofBricksDark], [13.5, -6, 0.5, 0.5, ImgRoofBricksDark], [0, -9, 12, 1, ImgRoofBricksDarkBloody], [9, -12.5, 3, 1, ImgWallBricksFade], [9, -10, 1, 1, ImgRoofBricks], [11, -10, 1, 1, ImgRoofBricks], [11.5, -11, 1, 1, ImgRoofBricks], [0, -8, 4, 1, ImgRoofBricksDark], [0, -7, 1, 4, ImgRoofBricksDark], [3, -2, 3, 2, ImgRoofBricksDark], [7, -3, 2, 3, ImgRoofBricksDark], [10, -2, 2, 2, ImgRoofBricksDark], [11, -5, 3, 3, ImgRoofBricksDark], [13, -2, 4, 2, ImgRoofBricksDark], [14.5, -4, 2, 2, ImgRoofBricksDark], [18, -4, 1, 1, ImgRoofBricksDark], [14.5, -6, 4, 2, ImgRoofBricksDark], [14, -8, 2, 2, ImgRoofBricksDark], [19, -7, 1, 5, ImgRoofBricksDark], [17, -8, 3, 1, ImgRoofBricksDark], [16, -9, 4, 1, ImgRoofBricksDark]];
i = 0;
while (i < tiles.length) {
t = tiles[i];
_postBroken.add(new FlxBlock((1440 + (t[0] * 16)), (304 + (t[1] * 16)), (t[2] * 16), (t[3] * 16), t[4]));
i++;
};
this.add(_king);
this.add(_queen);
}
public function addArrowShooter(x:Number, y:Number, y2:Number, timer:Number=-1):ArrowShooter{
y = (y + 240);
_blocks.add(new FlxBlock((x + 6), y, 20, 32, null));
var shooter:ArrowShooter = (this.add(new ArrowShooter(x, y, _arrows, _queen, timer)) as ArrowShooter);
this.add(new FlxBlock(x, y, 32, 32, ImgDirtFringe));
this.add(new FlxBlock(x, y, 32, 32, ImgDirtFringe));
this.add(new FlxBlock(x, y, 32, 32, ImgDirtFringe));
return (shooter);
}
public function arrowHitQueen(arrow:Arrow, queen:Queen):void{
queen.kill();
}
override public function update():void{
var i:int;
var crusher:Platform;
if (((_bridge.exists) && ((_rock.y > 120)))){
_rock.x = 1392;
_rock.y = 240;
_bridge.kill();
};
if (((((!(_bridge.exists)) && (!(_bridgeGibs)))) && ((_queen.y > 30)))){
FlxG.play(SndBridge);
_bridgeGibs = (FlxG.state.add(new FlxEmitter(_bridge.x, _bridge.y, _bridge.width, _bridge.height, null, -5, -50, 50, -100, 0, -720, 720, 400, 0, ImgRockGibs, 60, true)) as FlxEmitter);
_bridgeGibs.reset();
FlxG.quake(0.005, 0.2);
};
if (!broken){
if (_rock.y > 272){
broken = true;
FlxG.play(SndExplode);
FlxG.flash(4292406178, 3);
FlxG.quake(0.02, 1);
_crushers[0].y = 73;
_crushers[1].y = 91;
_crushers[2].kill();
_crushers[3].kill();
_crushers[4].kill();
_crushers[5].kill();
i = 0;
while (i < _preBroken.length) {
_preBroken[i].kill();
i++;
};
i = 0;
while (i < _preBrokenNoCollide.length) {
_preBrokenNoCollide[i].kill();
i++;
};
i = 0;
while (i < _postBroken.length) {
this.add(_postBroken[i]);
i++;
};
i = 0;
while (i < _gears1.length) {
_gears1[i].angularAcceleration = 0;
_gears1[i].angularVelocity = 0;
i++;
};
i = 0;
while (i < _gears2.length) {
_gears2[i].kill();
i++;
};
_queen.x = 1460;
_queen.y = 200;
_king.x = 1608;
_king.y = 146;
_king.kill();
};
if (_queen.y > 272){
_queen.kill();
};
};
if (_queen.x > 1760){
FlxG.switchState(MenuState);
};
var x:Number = (Math.floor((_queen.x / 480)) * 480);
var x2:Number = Math.min((x + 480), 1760);
FlxG.followBounds(x, -240, x2, (_bridge.exists) ? 240 : 320);
_time = (_time + FlxG.elapsed);
super.update();
var dead:Boolean = _queen.dead;
_queen.dead = false;
FlxBlock.collideArray(_blocks, _queen);
FlxBlock.collideArray((broken) ? _postBroken : _preBroken, _queen);
if (_bridge.exists){
_bridge.collide(_queen);
};
FlxBlock.collideArray(_platforms, _queen);
_rock.block.collide(_queen);
_queen.dead = dead;
FlxBlock.collideArray(_blocks, _king);
FlxBlock.collideArray((broken) ? _postBroken : _preBroken, _king);
FlxBlock.collideArray(_blocks, _rock);
FlxBlock.collideArrays(_blocks, _roofSpikes);
FlxBlock.collideArrays(_platforms, _roofSpikes);
FlxSprite.overlapArray(_roofSpikes, _queen, spikeHitQueen);
FlxSprite.overlapArray(_arrows, _queen, arrowHitQueen);
if (!broken){
for each (crusher in _crushers) {
if (crusher.overlaps(_queen)){
_queen.kill();
};
};
};
}
public function spikeHitQueen(spike:RoofSpike, queen:Queen):void{
queen.kill();
queen.acceleration.x = 0;
queen.acceleration.y = 2000;
}
public function crusherHitQueen(crusher:Platform, queen:Queen):void{
queen.kill();
}
public function addDirtBlock(x:Number, x2:Number, y:Number=-32, y2:Number=0, fringe:Boolean=true, objects:Boolean=true):void{
y = (y + 240);
y2 = (y2 + 240);
var w:Number = (x2 - x);
var h:Number = (y2 - y);
_blocks.add(this.add(new FlxBlock(x, y, w, h, ImgDirt)));
if (fringe){
this.add(new FlxBlock(x, (y - 32), (Math.floor((w / 32)) * 32), 32, ImgDirtFringe));
};
if (objects){
w = (w - 16);
h = (h - 16);
if ((((w >= 8)) && ((h >= 8)))){
x = (x + 8);
y = (y + 8);
};
this.add(new FlxBlock(x, y, w, h, ImgDirtObjects, 8));
};
}
public function addCaveBlock(x:Number, y:Number, w:Number, h:Number, image:Class, collide:Boolean=true, empties:int=0):FlxBlock{
var block:FlxBlock = new FlxBlock(x, y, w, h, image, empties);
this.add(block);
if (collide){
_blocks.add(block);
};
return (block);
}
public function addRoofSpike(x:Number, shakeTime:Number=0.2, triggerDistance:Number=4, y:Number=56):RoofSpike{
var spike:RoofSpike = new RoofSpike(_queen, x, y, shakeTime, triggerDistance);
_roofSpikes.add(this.add(spike));
return (spike);
}
public function addRoofBlock(x:Number, x2:Number):void{
var w:Number = (x2 - x);
_blocks.add(this.add(new FlxBlock(x, 24, w, 16, ImgRoofBricks)));
this.add(new FlxBlock(x, 40, w, 8, ImgRoofBricks2));
this.add(new FlxBlock(x, 48, w, 8, ImgRoofBricks3));
this.add(new FlxBlock(x, 56, w, 8, ImgRoofFringe));
}
}
}//package com.noonat.queens
Section 42
//PlayState_ImgCrusher (com.noonat.queens.PlayState_ImgCrusher)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgCrusher extends BitmapAsset {
}
}//package com.noonat.queens
Section 43
//PlayState_ImgDirt (com.noonat.queens.PlayState_ImgDirt)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgDirt extends BitmapAsset {
}
}//package com.noonat.queens
Section 44
//PlayState_ImgDirtFringe (com.noonat.queens.PlayState_ImgDirtFringe)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgDirtFringe extends BitmapAsset {
}
}//package com.noonat.queens
Section 45
//PlayState_ImgDirtObjects (com.noonat.queens.PlayState_ImgDirtObjects)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgDirtObjects extends BitmapAsset {
}
}//package com.noonat.queens
Section 46
//PlayState_ImgGear (com.noonat.queens.PlayState_ImgGear)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgGear extends BitmapAsset {
}
}//package com.noonat.queens
Section 47
//PlayState_ImgGear2 (com.noonat.queens.PlayState_ImgGear2)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgGear2 extends BitmapAsset {
}
}//package com.noonat.queens
Section 48
//PlayState_ImgGlow (com.noonat.queens.PlayState_ImgGlow)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgGlow extends BitmapAsset {
}
}//package com.noonat.queens
Section 49
//PlayState_ImgPlatformWide (com.noonat.queens.PlayState_ImgPlatformWide)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgPlatformWide extends BitmapAsset {
}
}//package com.noonat.queens
Section 50
//PlayState_ImgRockGibs (com.noonat.queens.PlayState_ImgRockGibs)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgRockGibs extends BitmapAsset {
}
}//package com.noonat.queens
Section 51
//PlayState_ImgRoofBricks (com.noonat.queens.PlayState_ImgRoofBricks)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgRoofBricks extends BitmapAsset {
}
}//package com.noonat.queens
Section 52
//PlayState_ImgRoofBricks2 (com.noonat.queens.PlayState_ImgRoofBricks2)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgRoofBricks2 extends BitmapAsset {
}
}//package com.noonat.queens
Section 53
//PlayState_ImgRoofBricks3 (com.noonat.queens.PlayState_ImgRoofBricks3)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgRoofBricks3 extends BitmapAsset {
}
}//package com.noonat.queens
Section 54
//PlayState_ImgRoofBricks4px (com.noonat.queens.PlayState_ImgRoofBricks4px)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgRoofBricks4px extends BitmapAsset {
}
}//package com.noonat.queens
Section 55
//PlayState_ImgRoofBricksDark (com.noonat.queens.PlayState_ImgRoofBricksDark)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgRoofBricksDark extends BitmapAsset {
}
}//package com.noonat.queens
Section 56
//PlayState_ImgRoofBricksDarkBloody (com.noonat.queens.PlayState_ImgRoofBricksDarkBloody)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgRoofBricksDarkBloody extends BitmapAsset {
}
}//package com.noonat.queens
Section 57
//PlayState_ImgRoofBricksDarkLarge (com.noonat.queens.PlayState_ImgRoofBricksDarkLarge)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgRoofBricksDarkLarge extends BitmapAsset {
}
}//package com.noonat.queens
Section 58
//PlayState_ImgRoofFringe (com.noonat.queens.PlayState_ImgRoofFringe)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgRoofFringe extends BitmapAsset {
}
}//package com.noonat.queens
Section 59
//PlayState_ImgWallBricks (com.noonat.queens.PlayState_ImgWallBricks)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgWallBricks extends BitmapAsset {
}
}//package com.noonat.queens
Section 60
//PlayState_ImgWallBricksFade (com.noonat.queens.PlayState_ImgWallBricksFade)
package com.noonat.queens {
import mx.core.*;
public class PlayState_ImgWallBricksFade extends BitmapAsset {
}
}//package com.noonat.queens
Section 61
//PlayState_SndBridge (com.noonat.queens.PlayState_SndBridge)
package com.noonat.queens {
import mx.core.*;
public class PlayState_SndBridge extends SoundAsset {
}
}//package com.noonat.queens
Section 62
//PlayState_SndExplode (com.noonat.queens.PlayState_SndExplode)
package com.noonat.queens {
import mx.core.*;
public class PlayState_SndExplode extends SoundAsset {
}
}//package com.noonat.queens
Section 63
//Queen (com.noonat.queens.Queen)
package com.noonat.queens {
import com.adamatomic.flixel.*;
public class Queen extends FlxSprite {
private var ImgQueen:Class;
private var _runVelocity:int;// = 70
private var _jumpVelocity:int;// = 180
private var ImgQueen2:Class;
private var ImgQueen3:Class;
private var _restartTimer:Number;// = 0
private var SndFootstep:Class;
private var _standingUp:Boolean;// = false
private var _jumped:Boolean;// = false
private var _intro:Boolean;// = true
private var SndHurt:Class;
private var _lastSoundFrame:int;// = 0
private static var _lastQueen:Class = null;
public function Queen(X:int, Y:int){
var s:*;
var r:*;
ImgQueen = Queen_ImgQueen;
ImgQueen2 = Queen_ImgQueen2;
ImgQueen3 = Queen_ImgQueen3;
SndFootstep = Queen_SndFootstep;
SndHurt = Queen_SndHurt;
do {
r = Math.random();
if (r < 0.33){
s = ImgQueen;
} else {
if (r < 0.66){
s = ImgQueen2;
} else {
s = ImgQueen3;
};
};
} while (s === _lastQueen);
_lastQueen = s;
super(s, X, Y, true, true);
offset.x = 5;
offset.y = 2;
width = 6;
height = 14;
maxVelocity.x = _runVelocity;
maxVelocity.y = (_jumpVelocity * 2);
acceleration.y = 420;
drag.x = (maxVelocity.x * 8);
addAnimation("idle", [1]);
addAnimation("run", [1, 2, 3, 0], 10);
addAnimation("jump", [2]);
addAnimation("standUp", [4, 5, 6], 2, false);
addAnimation("dead", [4], 1, false);
}
override public function update():void{
if (((!(dead)) && ((y > 320)))){
kill();
};
acceleration.x = 0;
if (dead){
_restartTimer = (_restartTimer + FlxG.elapsed);
if (_restartTimer > 3){
FlxG.switchState(PlayState);
};
} else {
if (_standingUp){
if (finished){
_standingUp = false;
} else {
super.update();
return;
};
};
if (_intro){
if (y < 16){
acceleration.x = (acceleration.x - (drag.x * 0.1));
};
} else {
if (FlxG.kLeft){
facing(false);
acceleration.x = (acceleration.x - drag.x);
} else {
if (FlxG.kRight){
facing(true);
acceleration.x = (acceleration.x + drag.x);
};
};
if (((((FlxG.justPressed(FlxG.A)) && (!(_jumped)))) && ((velocity.y < 30)))){
_jumped = true;
velocity.y = -(_jumpVelocity);
};
if (FlxG.justPressed(FlxG.B)){
FlxG.play(SndFootstep);
};
};
if (velocity.y != 0){
_lastSoundFrame = 0;
play("jump");
} else {
if (velocity.x != 0){
play("run");
if ((((((_curFrame == 1)) || ((_curFrame == 3)))) && (!((_lastSoundFrame == _curFrame))))){
_lastSoundFrame = _curFrame;
FlxG.play(SndFootstep, 0.8);
};
} else {
_lastSoundFrame = 0;
play("idle");
};
};
};
super.update();
}
override public function kill():void{
if (dead){
return;
};
FlxG.play(SndHurt, 0.5);
play("dead");
super.kill();
exists = true;
FlxG.quake(0.005, 0.35);
FlxG.flash(4292406178, 0.2);
FlxG.fade(4278190080, 2);
}
override public function hitFloor(block:FlxBlock):Boolean{
if ((((y > 64)) && (_intro))){
_intro = false;
FlxG.quake(0.005, 0.2);
FlxG.play(SndHurt, 0.5);
play("standUp");
_standingUp = true;
} else {
if (velocity.y > 50){
FlxG.play(SndFootstep, 0.8);
};
};
_jumped = false;
if ((block is Platform)){
x = (x + (block as Platform).moved);
};
return (super.hitFloor(block));
}
override public function hitWall(block:FlxBlock):Boolean{
if ((block is RockBlock)){
(block as RockBlock).rock.x = ((block as RockBlock).rock.x + 0.2);
return (true);
};
return (super.hitWall(block));
}
}
}//package com.noonat.queens
Section 64
//Queen_ImgQueen (com.noonat.queens.Queen_ImgQueen)
package com.noonat.queens {
import mx.core.*;
public class Queen_ImgQueen extends BitmapAsset {
}
}//package com.noonat.queens
Section 65
//Queen_ImgQueen2 (com.noonat.queens.Queen_ImgQueen2)
package com.noonat.queens {
import mx.core.*;
public class Queen_ImgQueen2 extends BitmapAsset {
}
}//package com.noonat.queens
Section 66
//Queen_ImgQueen3 (com.noonat.queens.Queen_ImgQueen3)
package com.noonat.queens {
import mx.core.*;
public class Queen_ImgQueen3 extends BitmapAsset {
}
}//package com.noonat.queens
Section 67
//Queen_SndFootstep (com.noonat.queens.Queen_SndFootstep)
package com.noonat.queens {
import mx.core.*;
public class Queen_SndFootstep extends SoundAsset {
}
}//package com.noonat.queens
Section 68
//Queen_SndHurt (com.noonat.queens.Queen_SndHurt)
package com.noonat.queens {
import mx.core.*;
public class Queen_SndHurt extends SoundAsset {
}
}//package com.noonat.queens
Section 69
//Rock (com.noonat.queens.Rock)
package com.noonat.queens {
import com.adamatomic.flixel.*;
public class Rock extends Sprite {
private var ImgRock:Class;
public var block:RockBlock;
public function Rock($x:Number, $y:Number):void{
ImgRock = Rock_ImgRock;
super(ImgRock, $x, $y, false, false);
block = new RockBlock(this, x, y, width, height, null);
acceleration.y = 840;
maxVelocity.x = 20;
}
override public function update():void{
acceleration.x = 0;
if (velocity.y > 40){
acceleration.x = 1000;
};
super.update();
block.x = x;
block.y = y;
}
override public function hitFloor(block:FlxBlock):Boolean{
acceleration.x = 0;
velocity.x = 0;
velocity.y = 0;
return (super.hitFloor(block));
}
}
}//package com.noonat.queens
Section 70
//Rock_ImgRock (com.noonat.queens.Rock_ImgRock)
package com.noonat.queens {
import mx.core.*;
public class Rock_ImgRock extends BitmapAsset {
}
}//package com.noonat.queens
Section 71
//RockBlock (com.noonat.queens.RockBlock)
package com.noonat.queens {
import com.adamatomic.flixel.*;
public class RockBlock extends FlxBlock {
public var rock:Rock;
public function RockBlock($rock:Rock, X:int, Y:int, Width:uint, Height:uint, TileGraphic:Class, Empties:uint=0):void{
rock = $rock;
super(X, Y, Width, Height, TileGraphic, Empties);
}
}
}//package com.noonat.queens
Section 72
//RoofSpike (com.noonat.queens.RoofSpike)
package com.noonat.queens {
import com.adamatomic.flixel.*;
public class RoofSpike extends Sprite {
private var _falling:Boolean;// = false
private var _queen:Queen;
private var SndSpike:Class;
private var SndSpikeRumble:Class;
private var ImgRoofSpike:Class;
private var _gibs:FlxEmitter;
private var _shakeTime:Number;
private var _triggerDistance:int;
private var ImgDirtGibs:Class;
public function RoofSpike($queen:Queen, $x:int, $y:int, $shakeTime:Number=0.2, $triggerDistance:int=4):void{
ImgRoofSpike = RoofSpike_ImgRoofSpike;
ImgDirtGibs = RoofSpike_ImgDirtGibs;
SndSpike = RoofSpike_SndSpike;
SndSpikeRumble = RoofSpike_SndSpikeRumble;
super(ImgRoofSpike, $x, $y, false, false);
width = 12;
height = 20;
offset.x = 2;
_queen = $queen;
_triggerDistance = $triggerDistance;
_shakeTime = $shakeTime;
_gibs = (FlxG.state.add(new FlxEmitter(0, 0, width, height, null, -1.5, -50, 50, -100, 0, -720, 720, 400, 0, ImgDirtGibs, 15, true)) as FlxEmitter);
}
public function falling():Boolean{
return (_falling);
}
override public function update():void{
if (!inFollowBounds()){
return;
};
if (((!(_falling)) && (!(((((x - _triggerDistance) > (_queen.x + _queen.width))) || ((((x + width) + _triggerDistance) < _queen.x))))))){
fall();
};
if (((_falling) && (!(shaking())))){
acceleration.y = 1000;
maxVelocity.y = 1000;
};
super.update();
}
override public function hitFloor(block:FlxBlock):Boolean{
FlxG.play(SndSpike, 0.3);
_gibs.x = x;
_gibs.y = (y - 8);
_gibs.reset();
kill();
return (super.hitFloor(block));
}
public function fall():void{
FlxG.play(SndSpikeRumble, 0.1);
_falling = true;
shake(_shakeTime);
}
}
}//package com.noonat.queens
Section 73
//RoofSpike_ImgDirtGibs (com.noonat.queens.RoofSpike_ImgDirtGibs)
package com.noonat.queens {
import mx.core.*;
public class RoofSpike_ImgDirtGibs extends BitmapAsset {
}
}//package com.noonat.queens
Section 74
//RoofSpike_ImgRoofSpike (com.noonat.queens.RoofSpike_ImgRoofSpike)
package com.noonat.queens {
import mx.core.*;
public class RoofSpike_ImgRoofSpike extends BitmapAsset {
}
}//package com.noonat.queens
Section 75
//RoofSpike_SndSpike (com.noonat.queens.RoofSpike_SndSpike)
package com.noonat.queens {
import mx.core.*;
public class RoofSpike_SndSpike extends SoundAsset {
}
}//package com.noonat.queens
Section 76
//RoofSpike_SndSpikeRumble (com.noonat.queens.RoofSpike_SndSpikeRumble)
package com.noonat.queens {
import mx.core.*;
public class RoofSpike_SndSpikeRumble extends SoundAsset {
}
}//package com.noonat.queens
Section 77
//Sprite (com.noonat.queens.Sprite)
package com.noonat.queens {
import com.adamatomic.flixel.*;
public class Sprite extends FlxSprite {
public function Sprite($graphic:Class=null, $x:int=0, $y:int=0, $animated:Boolean=false, $reverse:Boolean=false, $width:uint=0, $height:uint=0, $color:uint=0){
super($graphic, $x, $y, $animated, $reverse, $width, $height, $color);
}
public function inFollowBounds():Boolean{
if (((((((((x + width) < -(FlxG.followMin.x))) || ((x > (-(FlxG.followMax.x) + FlxG.width))))) || (((y + height) < -(FlxG.followMin.y))))) || ((y > (-(FlxG.followMax.y) + FlxG.height))))){
return (false);
};
return (true);
}
}
}//package com.noonat.queens
Section 78
//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.3.0.4852";
public function BitmapAsset(bitmapData:BitmapData=null, pixelSnapping:String="auto", smoothing:Boolean=false){
super(bitmapData, pixelSnapping, smoothing);
}
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(newWidth:Number, newHeight:Number):void{
width = newWidth;
height = newHeight;
}
public function move(x:Number, y:Number):void{
this.x = x;
this.y = y;
}
}
}//package mx.core
Section 79
//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.3.0.4852";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(left:Number=0, top:Number=0, right:Number=0, bottom:Number=0){
super();
this.left = left;
this.top = top;
this.right = right;
this.bottom = bottom;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(left, top, right, bottom));
}
}
}//package mx.core
Section 80
//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.3.0.4852";
public function FlexBitmap(bitmapData:BitmapData=null, pixelSnapping:String="auto", smoothing:Boolean=false){
var bitmapData = bitmapData;
var pixelSnapping = pixelSnapping;
var smoothing = smoothing;
super(bitmapData, pixelSnapping, smoothing);
name = NameUtil.createUniqueName(this);
//unresolved jump
var _slot1 = e;
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 81
//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.3.0.4852";
public function FlexLoader(){
super();
name = NameUtil.createUniqueName(this);
//unresolved jump
var _slot1 = e;
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 82
//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.3.0.4852";
public function FlexShape(){
super();
name = NameUtil.createUniqueName(this);
//unresolved jump
var _slot1 = e;
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 83
//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.3.0.4852";
private static var compatibilityVersionChanged:Boolean = false;
private static var _compatibilityErrorFunction:Function;
private static var _compatibilityVersion:uint = 50331648;
private static var compatibilityVersionRead:Boolean = false;
public function FlexVersion(){
super();
}
mx_internal static function changeCompatibilityVersionString(value:String):void{
var pieces:Array = value.split(".");
var major:uint = parseInt(pieces[0]);
var minor:uint = parseInt(pieces[1]);
var update:uint = parseInt(pieces[2]);
_compatibilityVersion = (((major << 24) + (minor << 16)) + update);
}
public static function set compatibilityVersion(value:uint):void{
var s:String;
if (value == _compatibilityVersion){
return;
};
if (compatibilityVersionChanged){
if (compatibilityErrorFunction == null){
s = ResourceManager.getInstance().getString("core", VERSION_ALREADY_SET);
throw (new Error(s));
};
compatibilityErrorFunction(value, VERSION_ALREADY_SET);
};
if (compatibilityVersionRead){
if (compatibilityErrorFunction == null){
s = ResourceManager.getInstance().getString("core", VERSION_ALREADY_READ);
throw (new Error(s));
};
compatibilityErrorFunction(value, VERSION_ALREADY_READ);
};
_compatibilityVersion = value;
compatibilityVersionChanged = true;
}
public static function get compatibilityVersion():uint{
compatibilityVersionRead = true;
return (_compatibilityVersion);
}
public static function set compatibilityErrorFunction(value:Function):void{
_compatibilityErrorFunction = value;
}
public static function set compatibilityVersionString(value:String):void{
var pieces:Array = value.split(".");
var major:uint = parseInt(pieces[0]);
var minor:uint = parseInt(pieces[1]);
var update:uint = parseInt(pieces[2]);
compatibilityVersion = (((major << 24) + (minor << 16)) + update);
}
public static function get compatibilityErrorFunction():Function{
return (_compatibilityErrorFunction);
}
public static function get compatibilityVersionString():String{
var major:uint = ((compatibilityVersion >> 24) & 0xFF);
var minor:uint = ((compatibilityVersion >> 16) & 0xFF);
var update:uint = (compatibilityVersion & 0xFFFF);
return (((((major.toString() + ".") + minor.toString()) + ".") + update.toString()));
}
}
}//package mx.core
Section 84
//FontAsset (mx.core.FontAsset)
package mx.core {
import flash.text.*;
public class FontAsset extends Font implements IFlexAsset {
mx_internal static const VERSION:String = "3.3.0.4852";
public function FontAsset(){
super();
}
}
}//package mx.core
Section 85
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 86
//IButton (mx.core.IButton)
package mx.core {
public interface IButton extends IUIComponent {
function get emphasized():Boolean;
function set emphasized(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IButton.as:Boolean):void;
function callLater(_arg1:Function, _arg2:Array=null):void;
}
}//package mx.core
Section 87
//IChildList (mx.core.IChildList)
package mx.core {
import flash.display.*;
import flash.geom.*;
public interface IChildList {
function get numChildren():int;
function removeChild(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IChildList.as:DisplayObject):DisplayObject;
function getChildByName(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IChildList.as:String):DisplayObject;
function removeChildAt(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IChildList.as:int):DisplayObject;
function getChildIndex(:DisplayObject):int;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function getObjectsUnderPoint(child:Point):Array;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function getChildAt(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IChildList.as:int):DisplayObject;
function addChild(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IChildList.as:DisplayObject):DisplayObject;
function contains(flash.display:DisplayObject):Boolean;
}
}//package mx.core
Section 88
//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(mx.core:IContainer/mx.core:IContainer:graphics/get:Sprite):void;
function swapChildrenAt(_arg1:int, _arg2:int):void;
function getChildByName(Graphics:String):DisplayObject;
function get doubleClickEnabled():Boolean;
function get graphics():Graphics;
function get useHandCursor():Boolean;
function addChildAt(_arg1:DisplayObject, _arg2:int):DisplayObject;
function set mouseChildren(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void;
function set creatingContentPane(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void;
function get textSnapshot():TextSnapshot;
function getChildIndex(value:DisplayObject):int;
function set doubleClickEnabled(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void;
function getObjectsUnderPoint(lockCenter:Point):Array;
function get creatingContentPane():Boolean;
function setChildIndex(_arg1:DisplayObject, _arg2:int):void;
function get soundTransform():SoundTransform;
function set useHandCursor(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void;
function get numChildren():int;
function contains(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;ISpriteInterface.as:DisplayObject):Boolean;
function get verticalScrollPosition():Number;
function set defaultButton(mx.core:IContainer/mx.core:IContainer:graphics/get:IFlexDisplayObject):void;
function swapChildren(_arg1:DisplayObject, _arg2:DisplayObject):void;
function set horizontalScrollPosition(mx.core:IContainer/mx.core:IContainer:graphics/get:Number):void;
function get focusManager():IFocusManager;
function startDrag(_arg1:Boolean=false, _arg2:Rectangle=null):void;
function set mouseEnabled(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void;
function getChildAt(Graphics:int):DisplayObject;
function set soundTransform(mx.core:IContainer/mx.core:IContainer:graphics/get:SoundTransform):void;
function get tabChildren():Boolean;
function get tabIndex():int;
function set focusRect(mx.core:IContainer/mx.core:IContainer:graphics/get:Object):void;
function get hitArea():Sprite;
function get mouseChildren():Boolean;
function removeChildAt(Graphics:int):DisplayObject;
function get defaultButton():IFlexDisplayObject;
function stopDrag():void;
function set tabEnabled(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void;
function get horizontalScrollPosition():Number;
function get focusRect():Object;
function get viewMetrics():EdgeMetrics;
function set verticalScrollPosition(mx.core:IContainer/mx.core:IContainer:graphics/get:Number):void;
function get dropTarget():DisplayObject;
function get mouseEnabled():Boolean;
function set tabChildren(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void;
function set buttonMode(mx.core:IContainer/mx.core:IContainer:graphics/get:Boolean):void;
function get tabEnabled():Boolean;
function get buttonMode():Boolean;
function removeChild(Graphics:DisplayObject):DisplayObject;
function set tabIndex(mx.core:IContainer/mx.core:IContainer:graphics/get:int):void;
function addChild(Graphics:DisplayObject):DisplayObject;
function areInaccessibleObjectsUnderPoint(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;ISpriteInterface.as:Point):Boolean;
}
}//package mx.core
Section 89
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 90
//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(void:Point):Point;
function get name():String;
function set width(flash.display:Number):void;
function get measuredHeight():Number;
function get blendMode():String;
function get scale9Grid():Rectangle;
function set name(flash.display:String):void;
function set scaleX(flash.display:Number):void;
function set scaleY(flash.display:Number):void;
function get measuredWidth():Number;
function get accessibilityProperties():AccessibilityProperties;
function set scrollRect(flash.display:Rectangle):void;
function get cacheAsBitmap():Boolean;
function globalToLocal(void:Point):Point;
function get height():Number;
function set blendMode(flash.display:String):void;
function get parent():DisplayObjectContainer;
function getBounds(String:DisplayObject):Rectangle;
function get opaqueBackground():Object;
function set scale9Grid(flash.display:Rectangle):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
function set alpha(flash.display:Number):void;
function set accessibilityProperties(flash.display:AccessibilityProperties):void;
function get width():Number;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function set cacheAsBitmap(flash.display: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(flash.display:Number):void;
function set mask(flash.display:DisplayObject):void;
function getRect(String:DisplayObject):Rectangle;
function get alpha():Number;
function set transform(flash.display:Transform):void;
function move(_arg1:Number, _arg2:Number):void;
function get loaderInfo():LoaderInfo;
function get root():DisplayObject;
function hitTestObject(mx.core:IFlexDisplayObject/mx.core:IFlexDisplayObject:stage/get:DisplayObject):Boolean;
function set opaqueBackground(flash.display:Object):void;
function set visible(flash.display:Boolean):void;
function get mask():DisplayObject;
function set x(flash.display:Number):void;
function set y(flash.display:Number):void;
function get transform():Transform;
function set filters(flash.display:Array):void;
function get x():Number;
function get y():Number;
function get filters():Array;
function set rotation(flash.display:Number):void;
function get stage():Stage;
}
}//package mx.core
Section 91
//IFlexModuleFactory (mx.core.IFlexModuleFactory)
package mx.core {
public interface IFlexModuleFactory {
function create(... _args):Object;
function info():Object;
}
}//package mx.core
Section 92
//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 93
//IProgrammaticSkin (mx.core.IProgrammaticSkin)
package mx.core {
public interface IProgrammaticSkin {
function validateNow():void;
function validateDisplayList():void;
}
}//package mx.core
Section 94
//IRawChildrenContainer (mx.core.IRawChildrenContainer)
package mx.core {
public interface IRawChildrenContainer {
function get rawChildren():IChildList;
}
}//package mx.core
Section 95
//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(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IRectangularBorder.as:Rectangle):void;
function layoutBackgroundImage():void;
}
}//package mx.core
Section 96
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void;
function get isDocument():Boolean;
function set repeaters(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void;
function initializeRepeaterArrays(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:IRepeaterClient):void;
function get repeaters():Array;
function set repeaterIndices(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void;
function get repeaterIndices():Array;
}
}//package mx.core
Section 97
//ISWFBridgeGroup (mx.core.ISWFBridgeGroup)
package mx.core {
import flash.events.*;
public interface ISWFBridgeGroup {
function getChildBridgeProvider(mx.core:ISWFBridgeGroup/mx.core:ISWFBridgeGroup:parentBridge/get:IEventDispatcher):ISWFBridgeProvider;
function removeChildBridge(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;ISWFBridgeGroup.as:IEventDispatcher):void;
function get parentBridge():IEventDispatcher;
function addChildBridge(_arg1:IEventDispatcher, _arg2:ISWFBridgeProvider):void;
function set parentBridge(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\core;ISWFBridgeGroup.as:IEventDispatcher):void;
function containsBridge(IEventDispatcher:IEventDispatcher):Boolean;
function getChildBridges():Array;
}
}//package mx.core
Section 98
//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 99
//IUIComponent (mx.core.IUIComponent)
package mx.core {
import flash.display.*;
import mx.managers.*;
public interface IUIComponent extends IFlexDisplayObject {
function set focusPane(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Sprite):void;
function get enabled():Boolean;
function set enabled(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Boolean):void;
function set isPopUp(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get: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(Number: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(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void;
function get minHeight():Number;
function set percentWidth(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void;
function get document():Object;
function get focusPane():Sprite;
function getExplicitOrMeasuredHeight():Number;
function set tweeningProperties(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Array):void;
function set explicitWidth(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void;
function set measuredMinHeight(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void;
function get explicitMinWidth():Number;
function get tweeningProperties():Array;
function get maxHeight():Number;
function set owner(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:DisplayObjectContainer):void;
function set includeInLayout(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Boolean):void;
function setVisible(_arg1:Boolean, _arg2:Boolean=false):void;
function parentChanged(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:DisplayObjectContainer):void;
function get explicitWidth():Number;
function get measuredMinHeight():Number;
function set measuredMinWidth(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void;
function set explicitHeight(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Number):void;
function get includeInLayout():Boolean;
function get measuredMinWidth():Number;
function get explicitHeight():Number;
function set systemManager(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:ISystemManager):void;
function set document(mx.core:IUIComponent/mx.core:IUIComponent:baselinePosition/get:Object):void;
function get systemManager():ISystemManager;
}
}//package mx.core
Section 100
//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 101
//Singleton (mx.core.Singleton)
package mx.core {
public class Singleton {
mx_internal static const VERSION:String = "3.3.0.4852";
private static var classMap:Object = {};
public function Singleton(){
super();
}
public static function registerClass(interfaceName:String, clazz:Class):void{
var c:Class = classMap[interfaceName];
if (!c){
classMap[interfaceName] = clazz;
};
}
public static function getClass(interfaceName:String):Class{
return (classMap[interfaceName]);
}
public static function getInstance(interfaceName:String):Object{
var c:Class = classMap[interfaceName];
if (!c){
throw (new Error((("No class registered for interface '" + interfaceName) + "'.")));
};
return (c["getInstance"]());
}
}
}//package mx.core
Section 102
//SoundAsset (mx.core.SoundAsset)
package mx.core {
import flash.media.*;
public class SoundAsset extends Sound implements IFlexAsset {
mx_internal static const VERSION:String = "3.3.0.4852";
public function SoundAsset(){
super();
}
}
}//package mx.core
Section 103
//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 function UIComponentGlobals(){
super();
}
public static function set catchCallLaterExceptions(value:Boolean):void{
_catchCallLaterExceptions = value;
}
public static function get designMode():Boolean{
return (designTime);
}
public static function set designMode(value:Boolean):void{
designTime = value;
}
public static function get catchCallLaterExceptions():Boolean{
return (_catchCallLaterExceptions);
}
}
}//package mx.core
Section 104
//ModuleEvent (mx.events.ModuleEvent)
package mx.events {
import flash.events.*;
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.3.0.4852";
public static const SETUP:String = "setup";
public static const UNLOAD:String = "unload";
public function ModuleEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, bytesLoaded:uint=0, bytesTotal:uint=0, errorText:String=null, module:IModuleInfo=null){
super(type, bubbles, cancelable, bytesLoaded, bytesTotal);
this.errorText = errorText;
this._module = module;
}
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 105
//ResourceEvent (mx.events.ResourceEvent)
package mx.events {
import flash.events.*;
public class ResourceEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.3.0.4852";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function ResourceEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, bytesLoaded:uint=0, bytesTotal:uint=0, errorText:String=null){
super(type, bubbles, cancelable, bytesLoaded, bytesTotal);
this.errorText = errorText;
}
override public function clone():Event{
return (new ResourceEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 106
//StyleEvent (mx.events.StyleEvent)
package mx.events {
import flash.events.*;
public class StyleEvent extends ProgressEvent {
public var errorText:String;
mx_internal static const VERSION:String = "3.3.0.4852";
public static const COMPLETE:String = "complete";
public static const PROGRESS:String = "progress";
public static const ERROR:String = "error";
public function StyleEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, bytesLoaded:uint=0, bytesTotal:uint=0, errorText:String=null){
super(type, bubbles, cancelable, bytesLoaded, bytesTotal);
this.errorText = errorText;
}
override public function clone():Event{
return (new StyleEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, errorText));
}
}
}//package mx.events
Section 107
//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.3.0.4852";
public function RectangularDropShadow(){
super();
}
public function get blRadius():Number{
return (_blRadius);
}
public function set brRadius(value:Number):void{
if (_brRadius != value){
_brRadius = value;
changed = true;
};
}
public function set color(value:int):void{
if (_color != value){
_color = value;
changed = true;
};
}
public function drawShadow(g:Graphics, x:Number, y:Number, width:Number, height:Number):void{
var tlWidth:Number;
var tlHeight:Number;
var trWidth:Number;
var trHeight:Number;
var blWidth:Number;
var blHeight:Number;
var brWidth:Number;
var brHeight:Number;
if (changed){
createShadowBitmaps();
changed = false;
};
width = Math.ceil(width);
height = Math.ceil(height);
var leftThickness:int = (leftShadow) ? leftShadow.width : 0;
var rightThickness:int = (rightShadow) ? rightShadow.width : 0;
var topThickness:int = (topShadow) ? topShadow.height : 0;
var bottomThickness:int = (bottomShadow) ? bottomShadow.height : 0;
var widthThickness:int = (leftThickness + rightThickness);
var heightThickness:int = (topThickness + bottomThickness);
var maxCornerHeight:Number = ((height + heightThickness) / 2);
var maxCornerWidth:Number = ((width + widthThickness) / 2);
var matrix:Matrix = new Matrix();
if (((leftShadow) || (topShadow))){
tlWidth = Math.min((tlRadius + widthThickness), maxCornerWidth);
tlHeight = Math.min((tlRadius + heightThickness), maxCornerHeight);
matrix.tx = (x - leftThickness);
matrix.ty = (y - topThickness);
g.beginBitmapFill(shadow, matrix);
g.drawRect((x - leftThickness), (y - topThickness), tlWidth, tlHeight);
g.endFill();
};
if (((rightShadow) || (topShadow))){
trWidth = Math.min((trRadius + widthThickness), maxCornerWidth);
trHeight = Math.min((trRadius + heightThickness), maxCornerHeight);
matrix.tx = (((x + width) + rightThickness) - shadow.width);
matrix.ty = (y - topThickness);
g.beginBitmapFill(shadow, matrix);
g.drawRect((((x + width) + rightThickness) - trWidth), (y - topThickness), trWidth, trHeight);
g.endFill();
};
if (((leftShadow) || (bottomShadow))){
blWidth = Math.min((blRadius + widthThickness), maxCornerWidth);
blHeight = Math.min((blRadius + heightThickness), maxCornerHeight);
matrix.tx = (x - leftThickness);
matrix.ty = (((y + height) + bottomThickness) - shadow.height);
g.beginBitmapFill(shadow, matrix);
g.drawRect((x - leftThickness), (((y + height) + bottomThickness) - blHeight), blWidth, blHeight);
g.endFill();
};
if (((rightShadow) || (bottomShadow))){
brWidth = Math.min((brRadius + widthThickness), maxCornerWidth);
brHeight = Math.min((brRadius + heightThickness), maxCornerHeight);
matrix.tx = (((x + width) + rightThickness) - shadow.width);
matrix.ty = (((y + height) + bottomThickness) - shadow.height);
g.beginBitmapFill(shadow, matrix);
g.drawRect((((x + width) + rightThickness) - brWidth), (((y + height) + bottomThickness) - brHeight), brWidth, brHeight);
g.endFill();
};
if (leftShadow){
matrix.tx = (x - leftThickness);
matrix.ty = 0;
g.beginBitmapFill(leftShadow, matrix);
g.drawRect((x - leftThickness), ((y - topThickness) + tlHeight), leftThickness, ((((height + topThickness) + bottomThickness) - tlHeight) - blHeight));
g.endFill();
};
if (rightShadow){
matrix.tx = (x + width);
matrix.ty = 0;
g.beginBitmapFill(rightShadow, matrix);
g.drawRect((x + width), ((y - topThickness) + trHeight), rightThickness, ((((height + topThickness) + bottomThickness) - trHeight) - brHeight));
g.endFill();
};
if (topShadow){
matrix.tx = 0;
matrix.ty = (y - topThickness);
g.beginBitmapFill(topShadow, matrix);
g.drawRect(((x - leftThickness) + tlWidth), (y - topThickness), ((((width + leftThickness) + rightThickness) - tlWidth) - trWidth), topThickness);
g.endFill();
};
if (bottomShadow){
matrix.tx = 0;
matrix.ty = (y + height);
g.beginBitmapFill(bottomShadow, matrix);
g.drawRect(((x - leftThickness) + blWidth), (y + height), ((((width + leftThickness) + rightThickness) - blWidth) - brWidth), bottomThickness);
g.endFill();
};
}
public function get brRadius():Number{
return (_brRadius);
}
public function get angle():Number{
return (_angle);
}
private function createShadowBitmaps():void{
var roundRectWidth:Number = ((Math.max(tlRadius, blRadius) + (2 * distance)) + Math.max(trRadius, brRadius));
var roundRectHeight:Number = ((Math.max(tlRadius, trRadius) + (2 * distance)) + Math.max(blRadius, brRadius));
if ((((roundRectWidth < 0)) || ((roundRectHeight < 0)))){
return;
};
var roundRect:Shape = new FlexShape();
var g:Graphics = roundRect.graphics;
g.beginFill(0xFFFFFF);
GraphicsUtil.drawRoundRectComplex(g, 0, 0, roundRectWidth, roundRectHeight, tlRadius, trRadius, blRadius, brRadius);
g.endFill();
var roundRectBitmap:BitmapData = new BitmapData(roundRectWidth, roundRectHeight, true, 0);
roundRectBitmap.draw(roundRect, new Matrix());
var filter:DropShadowFilter = new DropShadowFilter(distance, angle, color, alpha);
filter.knockout = true;
var inputRect:Rectangle = new Rectangle(0, 0, roundRectWidth, roundRectHeight);
var outputRect:Rectangle = roundRectBitmap.generateFilterRect(inputRect, filter);
var leftThickness:Number = (inputRect.left - outputRect.left);
var rightThickness:Number = (outputRect.right - inputRect.right);
var topThickness:Number = (inputRect.top - outputRect.top);
var bottomThickness:Number = (outputRect.bottom - inputRect.bottom);
shadow = new BitmapData(outputRect.width, outputRect.height);
shadow.applyFilter(roundRectBitmap, inputRect, new Point(leftThickness, topThickness), filter);
var origin:Point = new Point(0, 0);
var rect:Rectangle = new Rectangle();
if (leftThickness > 0){
rect.x = 0;
rect.y = ((tlRadius + topThickness) + bottomThickness);
rect.width = leftThickness;
rect.height = 1;
leftShadow = new BitmapData(leftThickness, 1);
leftShadow.copyPixels(shadow, rect, origin);
} else {
leftShadow = null;
};
if (rightThickness > 0){
rect.x = (shadow.width - rightThickness);
rect.y = ((trRadius + topThickness) + bottomThickness);
rect.width = rightThickness;
rect.height = 1;
rightShadow = new BitmapData(rightThickness, 1);
rightShadow.copyPixels(shadow, rect, origin);
} else {
rightShadow = null;
};
if (topThickness > 0){
rect.x = ((tlRadius + leftThickness) + rightThickness);
rect.y = 0;
rect.width = 1;
rect.height = topThickness;
topShadow = new BitmapData(1, topThickness);
topShadow.copyPixels(shadow, rect, origin);
} else {
topShadow = null;
};
if (bottomThickness > 0){
rect.x = ((blRadius + leftThickness) + rightThickness);
rect.y = (shadow.height - bottomThickness);
rect.width = 1;
rect.height = bottomThickness;
bottomShadow = new BitmapData(1, bottomThickness);
bottomShadow.copyPixels(shadow, rect, origin);
} else {
bottomShadow = null;
};
}
public function get alpha():Number{
return (_alpha);
}
public function get color():int{
return (_color);
}
public function set angle(value:Number):void{
if (_angle != value){
_angle = value;
changed = true;
};
}
public function set trRadius(value:Number):void{
if (_trRadius != value){
_trRadius = value;
changed = true;
};
}
public function set tlRadius(value:Number):void{
if (_tlRadius != value){
_tlRadius = value;
changed = true;
};
}
public function get trRadius():Number{
return (_trRadius);
}
public function set distance(value:Number):void{
if (_distance != value){
_distance = value;
changed = true;
};
}
public function get distance():Number{
return (_distance);
}
public function get tlRadius():Number{
return (_tlRadius);
}
public function set alpha(value:Number):void{
if (_alpha != value){
_alpha = value;
changed = true;
};
}
public function set blRadius(value:Number):void{
if (_blRadius != value){
_blRadius = value;
changed = true;
};
}
}
}//package mx.graphics
Section 108
//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(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManager.as:IButton):void;
function set focusPane(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManager.as:Sprite):void;
function set showFocusIndicator(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManager.as:Boolean):void;
function moveFocus(_arg1:String, _arg2:DisplayObject=null):void;
function addSWFBridge(_arg1:IEventDispatcher, _arg2:DisplayObject):void;
function removeSWFBridge(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManager.as:IEventDispatcher):void;
function get defaultButtonEnabled():Boolean;
function findFocusManagerComponent(value:InteractiveObject):IFocusManagerComponent;
function get nextTabIndex():int;
function get defaultButton():IButton;
function get showFocusIndicator():Boolean;
function setFocus(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManager.as:IFocusManagerComponent):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManager.as:Boolean):void;
function hideFocus():void;
function getNextFocusManagerComponent(value:Boolean=false):IFocusManagerComponent;
}
}//package mx.managers
Section 109
//IFocusManagerComponent (mx.managers.IFocusManagerComponent)
package mx.managers {
public interface IFocusManagerComponent {
function set focusEnabled(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManagerComponent.as:Boolean):void;
function drawFocus(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManagerComponent.as: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 110
//IFocusManagerContainer (mx.managers.IFocusManagerContainer)
package mx.managers {
import flash.events.*;
import flash.display.*;
public interface IFocusManagerContainer extends IEventDispatcher {
function set focusManager(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;IFocusManagerContainer.as:IFocusManager):void;
function get focusManager():IFocusManager;
function get systemManager():ISystemManager;
function contains(mx.managers:DisplayObject):Boolean;
}
}//package mx.managers
Section 111
//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(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:ILayoutManagerClient):void;
function set usePhasedInstantiation(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:Boolean):void;
function invalidateSize(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:ILayoutManagerClient):void;
function get usePhasedInstantiation():Boolean;
function invalidateProperties(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:ILayoutManagerClient):void;
}
}//package mx.managers
Section 112
//ILayoutManagerClient (mx.managers.ILayoutManagerClient)
package mx.managers {
import flash.events.*;
public interface ILayoutManagerClient extends IEventDispatcher {
function get updateCompletePendingFlag():Boolean;
function set updateCompletePendingFlag(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean):void;
function set initialized(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean):void;
function validateProperties():void;
function validateDisplayList():void;
function get nestLevel():int;
function get initialized():Boolean;
function get processedDescriptors():Boolean;
function validateSize(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean=false):void;
function set nestLevel(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:int):void;
function set processedDescriptors(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean):void;
}
}//package mx.managers
Section 113
//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(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:Sprite):void;
function get toolTipChildren():IChildList;
function useSWFBridge():Boolean;
function isFontFaceEmbedded(flash.display:TextFormat):Boolean;
function deployMouseShields(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get: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(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get: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(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IEventDispatcher):void;
function isDisplayObjectInABridgedApplication(flash.display:DisplayObject):Boolean;
function get popUpChildren():IChildList;
function get screen():Rectangle;
function removeChildFromSandboxRoot(_arg1:String, _arg2:DisplayObject):void;
function getDefinitionByName(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\managers;ISystemManager.as:String):Object;
function activate(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IFocusManagerContainer):void;
function deactivate(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IFocusManagerContainer):void;
function get cursorChildren():IChildList;
function set document(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:Object):void;
function get embeddedFontList():Object;
function set numModalWindows(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:int):void;
function isTopLevel():Boolean;
function isTopLevelRoot():Boolean;
function get numModalWindows():int;
function addFocusManager(mx.managers:ISystemManager/mx.managers:ISystemManager:cursorChildren/get:IFocusManagerContainer):void;
function get stage():Stage;
function getVisibleApplicationRect(value:Rectangle=null):Rectangle;
}
}//package mx.managers
Section 114
//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 function SystemManagerGlobals(){
super();
}
}
}//package mx.managers
Section 115
//IModuleInfo (mx.modules.IModuleInfo)
package mx.modules {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import flash.utils.*;
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(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\modules;IModuleInfo.as:IFlexModuleFactory):void;
function get factory():IFlexModuleFactory;
function set data(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\modules;IModuleInfo.as:Object):void;
function get url():String;
function get setup():Boolean;
function unload():void;
}
}//package mx.modules
Section 116
//ModuleManager (mx.modules.ModuleManager)
package mx.modules {
import mx.core.*;
public class ModuleManager {
mx_internal static const VERSION:String = "3.3.0.4852";
public function ModuleManager(){
super();
}
public static function getModule(url:String):IModuleInfo{
return (getSingleton().getModule(url));
}
private static function getSingleton():Object{
if (!ModuleManagerGlobals.managerSingleton){
ModuleManagerGlobals.managerSingleton = new ModuleManagerImpl();
};
return (ModuleManagerGlobals.managerSingleton);
}
public static function getAssociatedFactory(object:Object):IFlexModuleFactory{
return (getSingleton().getAssociatedFactory(object));
}
}
}//package mx.modules
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.system.*;
import mx.events.*;
import flash.utils.*;
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(info:ModuleInfo){
super();
this.info = info;
info.addEventListener(ModuleEvent.SETUP, moduleEventHandler, false, 0, true);
info.addEventListener(ModuleEvent.PROGRESS, moduleEventHandler, false, 0, true);
info.addEventListener(ModuleEvent.READY, moduleEventHandler, false, 0, true);
info.addEventListener(ModuleEvent.ERROR, moduleEventHandler, false, 0, true);
info.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(factory:IFlexModuleFactory):void{
info.publish(factory);
}
public function set data(value:Object):void{
_data = value;
}
public function get ready():Boolean{
return (info.ready);
}
public function load(applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null, bytes:ByteArray=null):void{
var moduleEvent: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){
moduleEvent = new ModuleEvent(ModuleEvent.PROGRESS);
moduleEvent.bytesLoaded = info.size;
moduleEvent.bytesTotal = info.size;
dispatchEvent(moduleEvent);
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
};
};
} else {
info.load(applicationDomain, securityDomain, bytes);
};
};
}
private function moduleEventHandler(event:ModuleEvent):void{
dispatchEvent(event);
}
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(url:String):IModuleInfo{
var info:ModuleInfo = (moduleList[url] as ModuleInfo);
if (!info){
info = new ModuleInfo(url);
moduleList[url] = info;
};
return (new ModuleInfoProxy(info));
}
public function getAssociatedFactory(object:Object):IFlexModuleFactory{
var m:Object;
var info:ModuleInfo;
var domain:ApplicationDomain;
var cls:Class;
var object = object;
var className:String = getQualifiedClassName(object);
for each (m in moduleList) {
info = (m as ModuleInfo);
if (!info.ready){
} else {
domain = info.applicationDomain;
cls = Class(domain.getDefinition(className));
if ((object is cls)){
return (info.factory);
};
//unresolved jump
var _slot1 = 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(url:String){
super();
_url = url;
}
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);
};
if (loader.content){
loader.content.removeEventListener("ready", readyHandler);
loader.content.removeEventListener("error", moduleErrorHandler);
};
//unresolved jump
var _slot1 = error;
if (_loaded){
loader.close();
//unresolved jump
var _slot1 = error;
};
loader.unload();
//unresolved jump
var _slot1 = 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(event:Event):void{
var moduleEvent:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = loader.contentLoaderInfo.bytesLoaded;
moduleEvent.bytesTotal = loader.contentLoaderInfo.bytesTotal;
dispatchEvent(moduleEvent);
}
public function publish(factory:IFlexModuleFactory):void{
if (factoryInfo){
return;
};
if (_url.indexOf("published://") != 0){
return;
};
factoryInfo = new FactoryInfo();
factoryInfo.factory = factory;
_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(event:Event):void{
var moduleEvent:ModuleEvent;
var event = event;
factoryInfo = new FactoryInfo();
factoryInfo.factory = (loader.content as IFlexModuleFactory);
//unresolved jump
var _slot1 = 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);
factoryInfo.applicationDomain = loader.contentLoaderInfo.applicationDomain;
//unresolved jump
var _slot1 = error;
_setup = true;
dispatchEvent(new ModuleEvent(ModuleEvent.SETUP));
}
public function resurrect():void{
var f:Object;
if (((!(factoryInfo)) && (limbo))){
for (f in limbo) {
factoryInfo = (f 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(event:ErrorEvent):void{
_error = true;
var moduleEvent:ModuleEvent = new ModuleEvent(ModuleEvent.ERROR, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = 0;
moduleEvent.bytesTotal = 0;
moduleEvent.errorText = event.text;
dispatchEvent(moduleEvent);
}
public function get ready():Boolean{
return ((limbo) ? false : _ready);
}
private function loadBytes(applicationDomain:ApplicationDomain, bytes:ByteArray):void{
var c:LoaderContext = new LoaderContext();
c.applicationDomain = (applicationDomain) ? applicationDomain : new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in c)){
c["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(bytes, c);
}
public function removeReference():void{
numReferences--;
if (numReferences == 0){
release();
};
}
public function addReference():void{
numReferences++;
}
public function progressHandler(event:ProgressEvent):void{
var moduleEvent:ModuleEvent = new ModuleEvent(ModuleEvent.PROGRESS, event.bubbles, event.cancelable);
moduleEvent.bytesLoaded = event.bytesLoaded;
moduleEvent.bytesTotal = event.bytesTotal;
dispatchEvent(moduleEvent);
}
public function load(applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null, bytes:ByteArray=null):void{
if (_loaded){
return;
};
_loaded = true;
limbo = null;
if (bytes){
loadBytes(applicationDomain, bytes);
return;
};
if (_url.indexOf("published://") == 0){
return;
};
var r:URLRequest = new URLRequest(_url);
var c:LoaderContext = new LoaderContext();
c.applicationDomain = (applicationDomain) ? applicationDomain : new ApplicationDomain(ApplicationDomain.currentDomain);
c.securityDomain = securityDomain;
if ((((securityDomain == null)) && ((Security.sandboxType == Security.REMOTE)))){
c.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(r, c);
}
public function get url():String{
return (_url);
}
public function get applicationDomain():ApplicationDomain{
return ((((!(limbo)) && (factoryInfo))) ? factoryInfo.applicationDomain : null);
}
public function moduleErrorHandler(event:Event):void{
var errorEvent:ModuleEvent;
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
if ((event is ModuleEvent)){
errorEvent = ModuleEvent(event);
} else {
errorEvent = new ModuleEvent(ModuleEvent.ERROR);
};
dispatchEvent(errorEvent);
}
public function readyHandler(event:Event):void{
_ready = true;
factoryInfo.bytesTotal = loader.contentLoaderInfo.bytesTotal;
clearLoader();
dispatchEvent(new ModuleEvent(ModuleEvent.READY));
}
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(){
super();
}
}
Section 117
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals)
package mx.modules {
public class ModuleManagerGlobals {
public static var managerSingleton:Object = null;
public function ModuleManagerGlobals(){
super();
}
}
}//package mx.modules
Section 118
//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 119
//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(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\resources;IResourceManager.as: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(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\resources;IResourceManager.as:Array):void;
function getUint(_arg1:String, _arg2:String, _arg3:String=null):uint;
function addResourceBundle(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\resources;IResourceManager.as:IResourceBundle):void;
function getStringArray(_arg1:String, _arg2:String, _arg3:String=null):Array;
function getBundleNamesForLocale(: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(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\resources;IResourceManager.as:Array):void;
function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number;
}
}//package mx.resources
Section 120
//IResourceModule (mx.resources.IResourceModule)
package mx.resources {
public interface IResourceModule {
function get resourceBundles():Array;
}
}//package mx.resources
Section 121
//LocaleSorter (mx.resources.LocaleSorter)
package mx.resources {
public class LocaleSorter {
mx_internal static const VERSION:String = "3.3.0.4852";
public function LocaleSorter(){
super();
}
private static function normalizeLocale(locale:String):String{
return (locale.toLowerCase().replace(/-/g, "_"));
}
public static function sortLocalesByPreference(appLocales:Array, systemPreferences:Array, ultimateFallbackLocale:String=null, addAll: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 = appLocales;
var systemPreferences = systemPreferences;
var ultimateFallbackLocale = ultimateFallbackLocale;
var addAll = addAll;
var promote:Function = function (locale:String):void{
if (typeof(hasLocale[locale]) != "undefined"){
result.push(appLocales[hasLocale[locale]]);
delete hasLocale[locale];
};
};
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(preferenceLocales:Array, ultimateFallbackLocale:String):void{
var locale:String;
if (((!((ultimateFallbackLocale == null))) && (!((ultimateFallbackLocale == ""))))){
locale = normalizeLocale(ultimateFallbackLocale);
if (preferenceLocales.indexOf(locale) == -1){
preferenceLocales.push(locale);
};
};
}
private static function trimAndNormalize(list:Array):Array{
var resultList:Array = [];
var i:int;
while (i < list.length) {
resultList.push(normalizeLocale(list[i]));
i++;
};
return (resultList);
}
}
}//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(locale:LocaleID):Boolean{
return ((toString() == locale.toString()));
}
public function canonicalize():void{
var i:String;
for (i in extensions) {
if (extensions.hasOwnProperty(i)){
if (extensions[i].length == 0){
delete extensions[i];
} else {
extensions[i] = extensions[i].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 i:String;
var stack:Array = [lang];
Array.prototype.push.apply(stack, extended_langs);
if (script != ""){
stack.push(script);
};
if (region != ""){
stack.push(region);
};
Array.prototype.push.apply(stack, variants);
for (i in extensions) {
if (extensions.hasOwnProperty(i)){
stack.push(i);
Array.prototype.push.apply(stack, extensions[i]);
};
};
if (privates.length > 0){
stack.push("x");
Array.prototype.push.apply(stack, privates);
};
return (stack.join("_"));
}
public function isSiblingOf(other:LocaleID):Boolean{
return ((((lang == other.lang)) && ((script == other.script))));
}
public function transformToParent():Boolean{
var i:String;
var lastExtension:Array;
var defaultRegion:String;
if (privates.length > 0){
privates.splice((privates.length - 1), 1);
return (true);
};
var lastExtensionName:String;
for (i in extensions) {
if (extensions.hasOwnProperty(i)){
lastExtensionName = i;
};
};
if (lastExtensionName){
lastExtension = extensions[lastExtensionName];
if (lastExtension.length == 1){
delete extensions[lastExtensionName];
return (true);
};
lastExtension.splice((lastExtension.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 == ""){
defaultRegion = LocaleRegistry.getDefaultRegionForLangAndScript(lang, script);
if (defaultRegion != ""){
region = defaultRegion;
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(str:String):LocaleID{
var last_extension:Array;
var subtag:String;
var subtag_length:int;
var firstChar:String;
var localeID:LocaleID = new (LocaleID);
var state:int = STATE_PRIMARY_LANGUAGE;
var subtags:Array = str.replace(/-/g, "_").split("_");
var i:int;
var l:int = subtags.length;
while (i < l) {
subtag = subtags[i].toLowerCase();
if (state == STATE_PRIMARY_LANGUAGE){
if (subtag == "x"){
localeID.privateLangs = true;
} else {
if (subtag == "i"){
localeID.lang = (localeID.lang + "i-");
} else {
localeID.lang = (localeID.lang + subtag);
state = STATE_EXTENDED_LANGUAGES;
};
};
} else {
subtag_length = subtag.length;
if (subtag_length == 0){
} else {
firstChar = subtag.charAt(0).toLowerCase();
if ((((state <= STATE_EXTENDED_LANGUAGES)) && ((subtag_length == 3)))){
localeID.extended_langs.push(subtag);
if (localeID.extended_langs.length == 3){
state = STATE_SCRIPT;
};
} else {
if ((((state <= STATE_SCRIPT)) && ((subtag_length == 4)))){
localeID.script = subtag;
state = STATE_REGION;
} else {
if ((((state <= STATE_REGION)) && ((((subtag_length == 2)) || ((subtag_length == 3)))))){
localeID.region = subtag;
state = STATE_VARIANTS;
} else {
if ((((state <= STATE_VARIANTS)) && ((((((((firstChar >= "a")) && ((firstChar <= "z")))) && ((subtag_length >= 5)))) || ((((((firstChar >= "0")) && ((firstChar <= "9")))) && ((subtag_length >= 4)))))))){
localeID.variants.push(subtag);
state = STATE_VARIANTS;
} else {
if ((((state < STATE_PRIVATES)) && ((subtag_length == 1)))){
if (subtag == "x"){
state = STATE_PRIVATES;
last_extension = localeID.privates;
} else {
state = STATE_EXTENSIONS;
last_extension = ((localeID.extensions[subtag]) || ([]));
localeID.extensions[subtag] = last_extension;
};
} else {
if (state >= STATE_EXTENSIONS){
last_extension.push(subtag);
};
};
};
};
};
};
};
};
i++;
};
localeID.canonicalize();
return (localeID);
}
}
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(){
super();
}
public static function getScriptByLangAndRegion(lang:String, region:String):String{
var langRegions:Object = SCRIPT_ID_BY_LANG_AND_REGION[lang];
if (langRegions == null){
return ("");
};
var scriptID:Object = langRegions[region];
if (scriptID == null){
return ("");
};
return (SCRIPTS[int(scriptID)].toLowerCase());
}
public static function getScriptByLang(lang:String):String{
var scriptID:Object = SCRIPT_ID_BY_LANG[lang];
if (scriptID == null){
return ("");
};
return (SCRIPTS[int(scriptID)].toLowerCase());
}
public static function getDefaultRegionForLangAndScript(lang:String, script:String):String{
var langObj:Object = DEFAULT_REGION_BY_LANG_AND_SCRIPT[lang];
var scriptID:Object = SCRIPT_BY_ID[script];
if ((((langObj == null)) || ((scriptID == null)))){
return ("");
};
return (((langObj[int(scriptID)]) || ("")));
}
}
Section 122
//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.3.0.4852";
mx_internal static var backupApplicationDomain:ApplicationDomain;
mx_internal static var locale:String;
public function ResourceBundle(locale:String=null, bundleName:String=null){
_content = {};
super();
mx_internal::_locale = locale;
mx_internal::_bundleName = bundleName;
_content = getContent();
}
protected function getContent():Object{
return ({});
}
public function getString(key:String):String{
return (String(_getObject(key)));
}
public function get content():Object{
return (_content);
}
public function getBoolean(key:String, defaultValue:Boolean=true):Boolean{
var temp:String = _getObject(key).toLowerCase();
if (temp == "false"){
return (false);
};
if (temp == "true"){
return (true);
};
return (defaultValue);
}
public function getStringArray(key:String):Array{
var array:Array = _getObject(key).split(",");
var n:int = array.length;
var i:int;
while (i < n) {
array[i] = StringUtil.trim(array[i]);
i++;
};
return (array);
}
public function getObject(key:String):Object{
return (_getObject(key));
}
private function _getObject(key:String):Object{
var value:Object = content[key];
if (!value){
throw (new Error(((("Key " + key) + " was not found in resource bundle ") + bundleName)));
};
return (value);
}
public function get locale():String{
return (mx_internal::_locale);
}
public function get bundleName():String{
return (mx_internal::_bundleName);
}
public function getNumber(key:String):Number{
return (Number(_getObject(key)));
}
private static function getClassByName(name:String, domain:ApplicationDomain):Class{
var c:Class;
if (domain.hasDefinition(name)){
c = (domain.getDefinition(name) as Class);
};
return (c);
}
public static function getResourceBundle(baseName:String, currentDomain:ApplicationDomain=null):ResourceBundle{
var className:String;
var bundleClass:Class;
var bundleObj:Object;
var bundle:ResourceBundle;
if (!currentDomain){
currentDomain = ApplicationDomain.currentDomain;
};
className = (((mx_internal::locale + "$") + baseName) + "_properties");
bundleClass = getClassByName(className, currentDomain);
if (!bundleClass){
className = (baseName + "_properties");
bundleClass = getClassByName(className, currentDomain);
};
if (!bundleClass){
className = baseName;
bundleClass = getClassByName(className, currentDomain);
};
if (((!(bundleClass)) && (mx_internal::backupApplicationDomain))){
className = (baseName + "_properties");
bundleClass = getClassByName(className, mx_internal::backupApplicationDomain);
if (!bundleClass){
className = baseName;
bundleClass = getClassByName(className, mx_internal::backupApplicationDomain);
};
};
if (bundleClass){
bundleObj = new (bundleClass);
if ((bundleObj is ResourceBundle)){
bundle = ResourceBundle(bundleObj);
return (bundle);
};
};
throw (new Error(("Could not find resource bundle " + baseName)));
}
}
}//package mx.resources
Section 123
//ResourceManager (mx.resources.ResourceManager)
package mx.resources {
import mx.core.*;
public class ResourceManager {
mx_internal static const VERSION:String = "3.3.0.4852";
private static var implClassDependency:ResourceManagerImpl;
private static var instance:IResourceManager;
public function ResourceManager(){
super();
}
public static function getInstance():IResourceManager{
if (!instance){
instance = IResourceManager(Singleton.getInstance("mx.resources::IResourceManager"));
//unresolved jump
var _slot1 = e;
instance = new ResourceManagerImpl();
};
return (instance);
}
}
}//package mx.resources
Section 124
//ResourceManagerImpl (mx.resources.ResourceManagerImpl)
package mx.resources {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import flash.utils.*;
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.3.0.4852";
private static var instance:IResourceManager;
public function ResourceManagerImpl(){
localeMap = {};
resourceModules = {};
super();
}
public function get localeChain():Array{
return (_localeChain);
}
public function set localeChain(value:Array):void{
_localeChain = value;
update();
}
public function getStringArray(bundleName:String, resourceName:String, locale:String=null):Array{
var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale);
if (!resourceBundle){
return (null);
};
var value:* = resourceBundle.content[resourceName];
var array:Array = String(value).split(",");
var n:int = array.length;
var i:int;
while (i < n) {
array[i] = StringUtil.trim(array[i]);
i++;
};
return (array);
}
mx_internal function installCompiledResourceBundle(applicationDomain:ApplicationDomain, locale:String, bundleName:String):void{
var packageName:String;
var localName:String = bundleName;
var colonIndex:int = bundleName.indexOf(":");
if (colonIndex != -1){
packageName = bundleName.substring(0, colonIndex);
localName = bundleName.substring((colonIndex + 1));
};
if (getResourceBundle(locale, bundleName)){
return;
};
var resourceBundleClassName = (((locale + "$") + localName) + "_properties");
if (packageName != null){
resourceBundleClassName = ((packageName + ".") + resourceBundleClassName);
};
var bundleClass:Class;
if (applicationDomain.hasDefinition(resourceBundleClassName)){
bundleClass = Class(applicationDomain.getDefinition(resourceBundleClassName));
};
if (!bundleClass){
resourceBundleClassName = bundleName;
if (applicationDomain.hasDefinition(resourceBundleClassName)){
bundleClass = Class(applicationDomain.getDefinition(resourceBundleClassName));
};
};
if (!bundleClass){
resourceBundleClassName = (bundleName + "_properties");
if (applicationDomain.hasDefinition(resourceBundleClassName)){
bundleClass = Class(applicationDomain.getDefinition(resourceBundleClassName));
};
};
if (!bundleClass){
throw (new Error((((("Could not find compiled resource bundle '" + bundleName) + "' for locale '") + locale) + "'.")));
};
var resourceBundle:ResourceBundle = ResourceBundle(new (bundleClass));
resourceBundle.mx_internal::_locale = locale;
resourceBundle.mx_internal::_bundleName = bundleName;
addResourceBundle(resourceBundle);
}
public function getString(bundleName:String, resourceName:String, parameters:Array=null, locale:String=null):String{
var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale);
if (!resourceBundle){
return (null);
};
var value:String = String(resourceBundle.content[resourceName]);
if (parameters){
value = StringUtil.substitute(value, parameters);
};
return (value);
}
public function loadResourceModule(url:String, updateFlag:Boolean=true, applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null):IEventDispatcher{
var moduleInfo:IModuleInfo;
var resourceEventDispatcher:ResourceEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = url;
var updateFlag = updateFlag;
var applicationDomain = applicationDomain;
var securityDomain = securityDomain;
moduleInfo = ModuleManager.getModule(url);
resourceEventDispatcher = new ResourceEventDispatcher(moduleInfo);
var readyHandler:Function = function (event:ModuleEvent):void{
var resourceModule:* = event.module.factory.create();
resourceModules[event.module.url].resourceModule = resourceModule;
if (updateFlag){
update();
};
};
moduleInfo.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
var errorHandler:Function = function (event:ModuleEvent):void{
var resourceEvent:ResourceEvent;
var message:String = ("Unable to load resource module from " + url);
if (resourceEventDispatcher.willTrigger(ResourceEvent.ERROR)){
resourceEvent = new ResourceEvent(ResourceEvent.ERROR, event.bubbles, event.cancelable);
resourceEvent.bytesLoaded = 0;
resourceEvent.bytesTotal = 0;
resourceEvent.errorText = message;
resourceEventDispatcher.dispatchEvent(resourceEvent);
} else {
throw (new Error(message));
};
};
moduleInfo.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
resourceModules[url] = new ResourceModuleInfo(moduleInfo, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (event: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 p:String;
var locales:Array = [];
for (p in localeMap) {
locales.push(p);
};
return (locales);
}
public function removeResourceBundlesForLocale(locale:String):void{
delete localeMap[locale];
}
public function getResourceBundle(locale:String, bundleName:String):IResourceBundle{
var bundleMap:Object = localeMap[locale];
if (!bundleMap){
return (null);
};
return (bundleMap[bundleName]);
}
private function dumpResourceModule(resourceModule):void{
var bundle:ResourceBundle;
var p:String;
for each (bundle in resourceModule.resourceBundles) {
trace(bundle.locale, bundle.bundleName);
for (p in bundle.content) {
};
};
}
public function addResourceBundle(resourceBundle:IResourceBundle):void{
var locale:String = resourceBundle.locale;
var bundleName:String = resourceBundle.bundleName;
if (!localeMap[locale]){
localeMap[locale] = {};
};
localeMap[locale][bundleName] = resourceBundle;
}
public function getObject(bundleName:String, resourceName:String, locale:String=null){
var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale);
if (!resourceBundle){
return (undefined);
};
return (resourceBundle.content[resourceName]);
}
public function getInt(bundleName:String, resourceName:String, locale:String=null):int{
var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale);
if (!resourceBundle){
return (0);
};
var value:* = resourceBundle.content[resourceName];
return (int(value));
}
private function findBundle(bundleName:String, resourceName:String, locale:String):IResourceBundle{
supportNonFrameworkApps();
return (((locale)!=null) ? getResourceBundle(locale, bundleName) : findResourceBundleWithResource(bundleName, resourceName));
}
private function supportNonFrameworkApps():void{
if (initializedForNonFrameworkApp){
return;
};
initializedForNonFrameworkApp = true;
if (getLocales().length > 0){
return;
};
var applicationDomain:ApplicationDomain = ApplicationDomain.currentDomain;
if (!applicationDomain.hasDefinition("_CompiledResourceBundleInfo")){
return;
};
var c:Class = Class(applicationDomain.getDefinition("_CompiledResourceBundleInfo"));
var locales:Array = c.compiledLocales;
var bundleNames:Array = c.compiledResourceBundleNames;
installCompiledResourceBundles(applicationDomain, locales, bundleNames);
localeChain = locales;
}
public function getBundleNamesForLocale(locale:String):Array{
var p:String;
var bundleNames:Array = [];
for (p in localeMap[locale]) {
bundleNames.push(p);
};
return (bundleNames);
}
public function getPreferredLocaleChain():Array{
return (LocaleSorter.sortLocalesByPreference(getLocales(), getSystemPreferredLocales(), null, true));
}
public function getNumber(bundleName:String, resourceName:String, locale:String=null):Number{
var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale);
if (!resourceBundle){
return (NaN);
};
var value:* = resourceBundle.content[resourceName];
return (Number(value));
}
public function update():void{
dispatchEvent(new Event(Event.CHANGE));
}
public function getClass(bundleName:String, resourceName:String, locale:String=null):Class{
var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale);
if (!resourceBundle){
return (null);
};
var value:* = resourceBundle.content[resourceName];
return ((value as Class));
}
public function removeResourceBundle(locale:String, bundleName:String):void{
delete localeMap[locale][bundleName];
if (getBundleNamesForLocale(locale).length == 0){
delete localeMap[locale];
};
}
public function initializeLocaleChain(compiledLocales:Array):void{
localeChain = LocaleSorter.sortLocalesByPreference(compiledLocales, getSystemPreferredLocales(), null, true);
}
public function findResourceBundleWithResource(bundleName:String, resourceName:String):IResourceBundle{
var locale:String;
var bundleMap:Object;
var bundle:ResourceBundle;
if (!_localeChain){
return (null);
};
var n:int = _localeChain.length;
var i:int;
while (i < n) {
locale = localeChain[i];
bundleMap = localeMap[locale];
if (!bundleMap){
} else {
bundle = bundleMap[bundleName];
if (!bundle){
} else {
if ((resourceName in bundle.content)){
return (bundle);
};
};
};
i++;
};
return (null);
}
public function getUint(bundleName:String, resourceName:String, locale:String=null):uint{
var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale);
if (!resourceBundle){
return (0);
};
var value:* = resourceBundle.content[resourceName];
return (uint(value));
}
private function getSystemPreferredLocales():Array{
var systemPreferences:Array;
if (Capabilities["languages"]){
systemPreferences = Capabilities["languages"];
} else {
systemPreferences = [Capabilities.language];
};
return (systemPreferences);
}
public function installCompiledResourceBundles(applicationDomain:ApplicationDomain, locales:Array, bundleNames:Array):void{
var locale:String;
var j:int;
var bundleName:String;
var n:int = (locales) ? locales.length : 0;
var m:int = (bundleNames) ? bundleNames.length : 0;
var i:int;
while (i < n) {
locale = locales[i];
j = 0;
while (j < m) {
bundleName = bundleNames[j];
mx_internal::installCompiledResourceBundle(applicationDomain, locale, bundleName);
j++;
};
i++;
};
}
public function getBoolean(bundleName:String, resourceName:String, locale:String=null):Boolean{
var resourceBundle:IResourceBundle = findBundle(bundleName, resourceName, locale);
if (!resourceBundle){
return (false);
};
var value:* = resourceBundle.content[resourceName];
return ((String(value).toLowerCase() == "true"));
}
public function unloadResourceModule(url:String, update:Boolean=true):void{
throw (new Error("unloadResourceModule() is not yet implemented."));
}
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(moduleInfo:IModuleInfo, readyHandler:Function, errorHandler:Function){
super();
this.moduleInfo = moduleInfo;
this.readyHandler = readyHandler;
this.errorHandler = errorHandler;
}
}
class ResourceEventDispatcher extends EventDispatcher {
private function ResourceEventDispatcher(moduleInfo:IModuleInfo){
super();
moduleInfo.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
moduleInfo.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
moduleInfo.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(event:ModuleEvent):void{
var resourceEvent:ResourceEvent = new ResourceEvent(ResourceEvent.PROGRESS, event.bubbles, event.cancelable);
resourceEvent.bytesLoaded = event.bytesLoaded;
resourceEvent.bytesTotal = event.bytesTotal;
dispatchEvent(resourceEvent);
}
private function moduleInfo_readyHandler(event:ModuleEvent):void{
var resourceEvent:ResourceEvent = new ResourceEvent(ResourceEvent.COMPLETE);
dispatchEvent(resourceEvent);
}
private function moduleInfo_errorHandler(event:ModuleEvent):void{
var resourceEvent:ResourceEvent = new ResourceEvent(ResourceEvent.ERROR, event.bubbles, event.cancelable);
resourceEvent.bytesLoaded = event.bytesLoaded;
resourceEvent.bytesTotal = event.bytesTotal;
resourceEvent.errorText = event.errorText;
dispatchEvent(resourceEvent);
}
}
Section 125
//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.3.0.4852";
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(){
super();
BORDER_WIDTHS["default"] = 3;
}
override public function styleChanged(styleProp:String):void{
if ((((((((((styleProp == null)) || ((styleProp == "styleName")))) || ((styleProp == "borderStyle")))) || ((styleProp == "borderThickness")))) || ((styleProp == "borderSides")))){
_borderMetrics = null;
};
invalidateDisplayList();
}
override protected function updateDisplayList(w:Number, h:Number):void{
if (((isNaN(w)) || (isNaN(h)))){
return;
};
super.updateDisplayList(w, h);
backgroundColor = getBackgroundColor();
bRoundedCorners = false;
backgroundAlphaName = "backgroundAlpha";
backgroundHole = null;
radius = 0;
radiusObj = null;
drawBorder(w, h);
drawBackground(w, h);
}
mx_internal function drawBorder(w:Number, h:Number):void{
var backgroundAlpha:Number;
var borderCapColor:uint;
var borderColor:uint;
var borderSides:String;
var borderThickness:Number;
var buttonColor:uint;
var docked:Boolean;
var dropdownBorderColor:uint;
var fillColors:Array;
var footerColors:Array;
var highlightColor:uint;
var shadowCapColor:uint;
var shadowColor:uint;
var themeColor:uint;
var translucent:Boolean;
var hole:Object;
var borderColorDrk1:Number;
var borderColorDrk2:Number;
var borderColorLt1:Number;
var borderInnerColor:Object;
var contentAlpha:Number;
var br:Number;
var parentContainer:IContainer;
var vm:EdgeMetrics;
var showChrome:Boolean;
var borderAlpha:Number;
var fillAlphas:Array;
var backgroundColorNum:uint;
var bHasAllSides:Boolean;
var holeRadius:Number;
var borderStyle:String = getStyle("borderStyle");
var highlightAlphas:Array = getStyle("highlightAlphas");
var drawTopHighlight:Boolean;
var g:Graphics = graphics;
g.clear();
if (borderStyle){
switch (borderStyle){
case "none":
break;
case "inset":
borderColor = getStyle("borderColor");
borderColorDrk1 = ColorUtil.adjustBrightness2(borderColor, -40);
borderColorDrk2 = ColorUtil.adjustBrightness2(borderColor, 25);
borderColorLt1 = ColorUtil.adjustBrightness2(borderColor, 40);
borderInnerColor = backgroundColor;
if ((((borderInnerColor === null)) || ((borderInnerColor === "")))){
borderInnerColor = borderColor;
};
draw3dBorder(borderColorDrk2, borderColorDrk1, borderColorLt1, Number(borderInnerColor), Number(borderInnerColor), Number(borderInnerColor));
break;
case "outset":
borderColor = getStyle("borderColor");
borderColorDrk1 = ColorUtil.adjustBrightness2(borderColor, -40);
borderColorDrk2 = ColorUtil.adjustBrightness2(borderColor, -25);
borderColorLt1 = ColorUtil.adjustBrightness2(borderColor, 40);
borderInnerColor = backgroundColor;
if ((((borderInnerColor === null)) || ((borderInnerColor === "")))){
borderInnerColor = borderColor;
};
draw3dBorder(borderColorDrk2, borderColorLt1, borderColorDrk1, Number(borderInnerColor), Number(borderInnerColor), Number(borderInnerColor));
break;
case "alert":
case "default":
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
contentAlpha = getStyle("backgroundAlpha");
backgroundAlpha = getStyle("borderAlpha");
backgroundAlphaName = "borderAlpha";
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
br = (bRoundedCorners) ? radius : 0;
drawDropShadow(0, 0, w, h, radius, radius, br, br);
if (!bRoundedCorners){
radiusObj = {};
};
parentContainer = (parent as IContainer);
if (parentContainer){
vm = parentContainer.viewMetrics;
backgroundHole = {x:vm.left, y:vm.top, w:Math.max(0, ((w - vm.left) - vm.right)), h:Math.max(0, ((h - vm.top) - vm.bottom)), r:0};
if ((((backgroundHole.w > 0)) && ((backgroundHole.h > 0)))){
if (contentAlpha != backgroundAlpha){
drawDropShadow(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h, 0, 0, 0, 0);
};
g.beginFill(Number(backgroundColor), contentAlpha);
g.drawRect(backgroundHole.x, backgroundHole.y, backgroundHole.w, backgroundHole.h);
g.endFill();
};
};
backgroundColor = getStyle("borderColor");
};
break;
case "dropdown":
dropdownBorderColor = getStyle("dropdownBorderColor");
drawDropShadow(0, 0, w, h, 4, 0, 0, 4);
drawRoundRect(0, 0, w, h, {tl:4, tr:0, br:0, bl:4}, 5068126, 1);
drawRoundRect(0, 0, w, h, {tl:4, tr:0, br:0, bl:4}, [0xFFFFFF, 0xFFFFFF], [0.7, 0], verticalGradientMatrix(0, 0, w, h));
drawRoundRect(1, 1, (w - 1), (h - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (w - 1), (h - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (w - 1), (h - 3)));
if (!isNaN(dropdownBorderColor)){
drawRoundRect(0, 0, (w + 1), h, {tl:4, tr:0, br:0, bl:4}, dropdownBorderColor, 0.5);
drawRoundRect(1, 1, (w - 1), (h - 2), {tl:3, tr:0, br:0, bl:3}, 0xFFFFFF, 1);
drawRoundRect(1, 2, (w - 1), (h - 3), {tl:3, tr:0, br:0, bl:3}, [0xEEEEEE, 0xFFFFFF], 1, verticalGradientMatrix(0, 0, (w - 1), (h - 3)));
};
backgroundColor = null;
break;
case "menuBorder":
borderColor = getStyle("borderColor");
drawRoundRect(0, 0, w, h, 0, borderColor, 1);
drawDropShadow(1, 1, (w - 2), (h - 2), 0, 0, 0, 0);
break;
case "comboNonEdit":
break;
case "controlBar":
if ((((w == 0)) || ((h == 0)))){
backgroundColor = null;
break;
};
footerColors = getStyle("footerColors");
showChrome = !((footerColors == null));
borderAlpha = getStyle("borderAlpha");
if (showChrome){
g.lineStyle(0, ((footerColors.length > 0)) ? footerColors[1] : footerColors[0], borderAlpha);
g.moveTo(0, 0);
g.lineTo(w, 0);
g.lineStyle(0, 0, 0);
if (((((parent) && (parent.parent))) && ((parent.parent is IStyleClient)))){
radius = IStyleClient(parent.parent).getStyle("cornerRadius");
borderAlpha = IStyleClient(parent.parent).getStyle("borderAlpha");
};
if (isNaN(radius)){
radius = 0;
};
if (IStyleClient(parent.parent).getStyle("roundedBottomCorners").toString().toLowerCase() != "true"){
radius = 0;
};
drawRoundRect(0, 1, w, (h - 1), {tl:0, tr:0, bl:radius, br:radius}, footerColors, borderAlpha, verticalGradientMatrix(0, 0, w, h));
if ((((footerColors.length > 1)) && (!((footerColors[0] == footerColors[1]))))){
drawRoundRect(0, 1, w, (h - 1), {tl:0, tr:0, bl:radius, br:radius}, [0xFFFFFF, 0xFFFFFF], highlightAlphas, verticalGradientMatrix(0, 0, w, h));
drawRoundRect(1, 2, (w - 2), (h - 3), {tl:0, tr:0, bl:(radius - 1), br:(radius - 1)}, footerColors, borderAlpha, verticalGradientMatrix(0, 0, w, h));
};
};
backgroundColor = null;
break;
case "applicationControlBar":
fillColors = getStyle("fillColors");
backgroundAlpha = getStyle("backgroundAlpha");
highlightAlphas = getStyle("highlightAlphas");
fillAlphas = getStyle("fillAlphas");
docked = getStyle("docked");
backgroundColorNum = uint(backgroundColor);
radius = getStyle("cornerRadius");
if (!radius){
radius = 0;
};
drawDropShadow(0, 1, w, (h - 1), radius, radius, radius, radius);
if (((!((backgroundColor === null))) && (StyleManager.isValidStyleValue(backgroundColor)))){
drawRoundRect(0, 1, w, (h - 1), radius, backgroundColorNum, backgroundAlpha, verticalGradientMatrix(0, 0, w, h));
};
drawRoundRect(0, 1, w, (h - 1), radius, fillColors, fillAlphas, verticalGradientMatrix(0, 0, w, h));
drawRoundRect(0, 1, w, ((h / 2) - 1), {tl:radius, tr:radius, bl:0, br:0}, [0xFFFFFF, 0xFFFFFF], highlightAlphas, verticalGradientMatrix(0, 0, w, ((h / 2) - 1)));
drawRoundRect(0, 1, w, (h - 1), {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, 0.3, null, GradientType.LINEAR, null, {x:0, y:2, w:w, h:(h - 2), r:{tl:radius, tr:radius, bl:0, br:0}});
backgroundColor = null;
break;
default:
borderColor = getStyle("borderColor");
borderThickness = getStyle("borderThickness");
borderSides = getStyle("borderSides");
bHasAllSides = true;
radius = getStyle("cornerRadius");
bRoundedCorners = (getStyle("roundedBottomCorners").toString().toLowerCase() == "true");
holeRadius = Math.max((radius - borderThickness), 0);
hole = {x:borderThickness, y:borderThickness, w:(w - (borderThickness * 2)), h:(h - (borderThickness * 2)), r:holeRadius};
if (!bRoundedCorners){
radiusObj = {tl:radius, tr:radius, bl:0, br:0};
hole.r = {tl:holeRadius, tr:holeRadius, bl:0, br:0};
};
if (borderSides != "left top right bottom"){
hole.r = {tl:holeRadius, tr:holeRadius, bl:(bRoundedCorners) ? holeRadius : 0, br:(bRoundedCorners) ? holeRadius : 0};
radiusObj = {tl:radius, tr:radius, bl:(bRoundedCorners) ? radius : 0, br:(bRoundedCorners) ? radius : 0};
borderSides = borderSides.toLowerCase();
if (borderSides.indexOf("left") == -1){
hole.x = 0;
hole.w = (hole.w + borderThickness);
hole.r.tl = 0;
hole.r.bl = 0;
radiusObj.tl = 0;
radiusObj.bl = 0;
bHasAllSides = false;
};
if (borderSides.indexOf("top") == -1){
hole.y = 0;
hole.h = (hole.h + borderThickness);
hole.r.tl = 0;
hole.r.tr = 0;
radiusObj.tl = 0;
radiusObj.tr = 0;
bHasAllSides = false;
};
if (borderSides.indexOf("right") == -1){
hole.w = (hole.w + borderThickness);
hole.r.tr = 0;
hole.r.br = 0;
radiusObj.tr = 0;
radiusObj.br = 0;
bHasAllSides = false;
};
if (borderSides.indexOf("bottom") == -1){
hole.h = (hole.h + borderThickness);
hole.r.bl = 0;
hole.r.br = 0;
radiusObj.bl = 0;
radiusObj.br = 0;
bHasAllSides = false;
};
};
if ((((radius == 0)) && (bHasAllSides))){
drawDropShadow(0, 0, w, h, 0, 0, 0, 0);
g.beginFill(borderColor);
g.drawRect(0, 0, w, h);
g.drawRect(borderThickness, borderThickness, (w - (2 * borderThickness)), (h - (2 * borderThickness)));
g.endFill();
} else {
if (radiusObj){
drawDropShadow(0, 0, w, h, radiusObj.tl, radiusObj.tr, radiusObj.br, radiusObj.bl);
drawRoundRect(0, 0, w, h, radiusObj, borderColor, 1, null, null, null, hole);
radiusObj.tl = Math.max((radius - borderThickness), 0);
radiusObj.tr = Math.max((radius - borderThickness), 0);
radiusObj.bl = (bRoundedCorners) ? Math.max((radius - borderThickness), 0) : 0;
radiusObj.br = (bRoundedCorners) ? Math.max((radius - borderThickness), 0) : 0;
} else {
drawDropShadow(0, 0, w, h, radius, radius, radius, radius);
drawRoundRect(0, 0, w, h, radius, borderColor, 1, null, null, null, hole);
radius = Math.max((getStyle("cornerRadius") - borderThickness), 0);
};
};
};
};
}
mx_internal function drawBackground(w:Number, h:Number):void{
var nd:Number;
var alpha:Number;
var bm:EdgeMetrics;
var g:Graphics;
var bottom:Number;
var bottomRadius:Number;
var highlightAlphas:Array;
var highlightAlpha:Number;
if (((((((!((backgroundColor === null))) && (!((backgroundColor === ""))))) || (getStyle("mouseShield")))) || (getStyle("mouseShieldChildren")))){
nd = Number(backgroundColor);
alpha = 1;
bm = getBackgroundColorMetrics();
g = graphics;
if (((((isNaN(nd)) || ((backgroundColor === "")))) || ((backgroundColor === null)))){
alpha = 0;
nd = 0xFFFFFF;
} else {
alpha = getStyle(backgroundAlphaName);
};
if (((!((radius == 0))) || (backgroundHole))){
bottom = bm.bottom;
if (radiusObj){
bottomRadius = (bRoundedCorners) ? radius : 0;
radiusObj = {tl:radius, tr:radius, bl:bottomRadius, br:bottomRadius};
drawRoundRect(bm.left, bm.top, (width - (bm.left + bm.right)), (height - (bm.top + bottom)), radiusObj, nd, alpha, null, GradientType.LINEAR, null, backgroundHole);
} else {
drawRoundRect(bm.left, bm.top, (width - (bm.left + bm.right)), (height - (bm.top + bottom)), radius, nd, alpha, null, GradientType.LINEAR, null, backgroundHole);
};
} else {
g.beginFill(nd, alpha);
g.drawRect(bm.left, bm.top, ((w - bm.right) - bm.left), ((h - bm.bottom) - bm.top));
g.endFill();
};
};
var borderStyle:String = getStyle("borderStyle");
if ((((((FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)) && ((((borderStyle == "alert")) || ((borderStyle == "default")))))) && ((getStyle("headerColors") == null)))){
highlightAlphas = getStyle("highlightAlphas");
highlightAlpha = (highlightAlphas) ? highlightAlphas[0] : 0.3;
drawRoundRect(0, 0, w, h, {tl:radius, tr:radius, bl:0, br:0}, 0xFFFFFF, highlightAlpha, null, GradientType.LINEAR, null, {x:0, y:1, w:w, h:(h - 1), r:{tl:radius, tr:radius, bl:0, br:0}});
};
}
mx_internal function drawDropShadow(x:Number, y:Number, width:Number, height:Number, tlRadius:Number, trRadius:Number, brRadius:Number, blRadius:Number):void{
var angle:Number;
var docked:Boolean;
if ((((((((getStyle("dropShadowEnabled") == false)) || ((getStyle("dropShadowEnabled") == "false")))) || ((width == 0)))) || ((height == 0)))){
return;
};
var distance:Number = getStyle("shadowDistance");
var direction:String = getStyle("shadowDirection");
if (getStyle("borderStyle") == "applicationControlBar"){
docked = getStyle("docked");
angle = (docked) ? 90 : getDropShadowAngle(distance, direction);
distance = Math.abs(distance);
} else {
angle = getDropShadowAngle(distance, direction);
distance = (Math.abs(distance) + 2);
};
if (!dropShadow){
dropShadow = new RectangularDropShadow();
};
dropShadow.distance = distance;
dropShadow.angle = angle;
dropShadow.color = getStyle("dropShadowColor");
dropShadow.alpha = 0.4;
dropShadow.tlRadius = tlRadius;
dropShadow.trRadius = trRadius;
dropShadow.blRadius = blRadius;
dropShadow.brRadius = brRadius;
dropShadow.drawShadow(graphics, x, y, width, height);
}
mx_internal function getBackgroundColor():Object{
var color:Object;
var p:IUIComponent = (parent as IUIComponent);
if (((p) && (!(p.enabled)))){
color = getStyle("backgroundDisabledColor");
if (((!((color === null))) && (StyleManager.isValidStyleValue(color)))){
return (color);
};
};
return (getStyle("backgroundColor"));
}
mx_internal function draw3dBorder(c1:Number, c2:Number, c3:Number, c4:Number, c5:Number, c6:Number):void{
var w:Number = width;
var h:Number = height;
drawDropShadow(0, 0, width, height, 0, 0, 0, 0);
var g:Graphics = graphics;
g.beginFill(c1);
g.drawRect(0, 0, w, h);
g.drawRect(1, 0, (w - 2), h);
g.endFill();
g.beginFill(c2);
g.drawRect(1, 0, (w - 2), 1);
g.endFill();
g.beginFill(c3);
g.drawRect(1, (h - 1), (w - 2), 1);
g.endFill();
g.beginFill(c4);
g.drawRect(1, 1, (w - 2), 1);
g.endFill();
g.beginFill(c5);
g.drawRect(1, (h - 2), (w - 2), 1);
g.endFill();
g.beginFill(c6);
g.drawRect(1, 2, (w - 2), (h - 4));
g.drawRect(2, 2, (w - 4), (h - 4));
g.endFill();
}
mx_internal function getBackgroundColorMetrics():EdgeMetrics{
return (borderMetrics);
}
mx_internal function getDropShadowAngle(distance:Number, direction:String):Number{
if (direction == "left"){
return (((distance >= 0)) ? 135 : 225);
} else {
if (direction == "right"){
return (((distance >= 0)) ? 45 : 315);
//unresolved jump
};
};
return (!NULL!);
}
override public function get borderMetrics():EdgeMetrics{
var borderThickness:Number;
var borderSides:String;
if (_borderMetrics){
return (_borderMetrics);
};
var borderStyle:String = getStyle("borderStyle");
if ((((borderStyle == "default")) || ((borderStyle == "alert")))){
if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0){
_borderMetrics = new EdgeMetrics(0, 0, 0, 0);
} else {
return (EdgeMetrics.EMPTY);
};
} else {
if ((((borderStyle == "controlBar")) || ((borderStyle == "applicationControlBar")))){
_borderMetrics = new EdgeMetrics(1, 1, 1, 1);
} else {
if (borderStyle == "solid"){
borderThickness = getStyle("borderThickness");
if (isNaN(borderThickness)){
borderThickness = 0;
};
_borderMetrics = new EdgeMetrics(borderThickness, borderThickness, borderThickness, borderThickness);
borderSides = getStyle("borderSides");
if (borderSides != "left top right bottom"){
if (borderSides.indexOf("left") == -1){
_borderMetrics.left = 0;
};
if (borderSides.indexOf("top") == -1){
_borderMetrics.top = 0;
};
if (borderSides.indexOf("right") == -1){
_borderMetrics.right = 0;
};
if (borderSides.indexOf("bottom") == -1){
_borderMetrics.bottom = 0;
};
};
} else {
borderThickness = BORDER_WIDTHS[borderStyle];
if (isNaN(borderThickness)){
borderThickness = 0;
};
_borderMetrics = new EdgeMetrics(borderThickness, borderThickness, borderThickness, borderThickness);
};
};
};
return (_borderMetrics);
}
}
}//package mx.skins.halo
Section 126
//HaloFocusRect (mx.skins.halo.HaloFocusRect)
package mx.skins.halo {
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.3.0.4852";
public function HaloFocusRect(){
super();
}
public function get inheritingStyles():Object{
return (styleName.inheritingStyles);
}
public function set inheritingStyles(value:Object):void{
}
public function notifyStyleChangeInChildren(styleProp:String, recursive:Boolean):void{
}
public function registerEffects(effects:Array):void{
}
public function regenerateStyleCache(recursive: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(styleProp:String):void{
if (styleProp == "focusColor"){
_focusColor = NaN;
};
}
public function setStyle(styleProp:String, newValue):void{
if (styleProp == "focusColor"){
_focusColor = newValue;
};
}
public function set nonInheritingStyles(value:Object):void{
}
public function get nonInheritingStyles():Object{
return (styleName.nonInheritingStyles);
}
override protected function updateDisplayList(w:Number, h:Number):void{
var tl:Number;
var bl:Number;
var tr:Number;
var br:Number;
var nr:Number;
var ellipseSize:Number;
super.updateDisplayList(w, h);
var focusBlendMode:String = getStyle("focusBlendMode");
var focusAlpha:Number = getStyle("focusAlpha");
var focusColor:Number = getStyle("focusColor");
var cornerRadius:Number = getStyle("cornerRadius");
var focusThickness:Number = getStyle("focusThickness");
var focusRoundedCorners:String = getStyle("focusRoundedCorners");
var themeColor:Number = getStyle("themeColor");
var rectColor:Number = focusColor;
if (isNaN(rectColor)){
rectColor = themeColor;
};
var g:Graphics = graphics;
g.clear();
if (focusBlendMode){
blendMode = focusBlendMode;
};
if (((!((focusRoundedCorners == "tl tr bl br"))) && ((cornerRadius > 0)))){
tl = 0;
bl = 0;
tr = 0;
br = 0;
nr = (cornerRadius + focusThickness);
if (focusRoundedCorners.indexOf("tl") >= 0){
tl = nr;
};
if (focusRoundedCorners.indexOf("tr") >= 0){
tr = nr;
};
if (focusRoundedCorners.indexOf("bl") >= 0){
bl = nr;
};
if (focusRoundedCorners.indexOf("br") >= 0){
br = nr;
};
g.beginFill(rectColor, focusAlpha);
GraphicsUtil.drawRoundRectComplex(g, 0, 0, w, h, tl, tr, bl, br);
tl = (tl) ? cornerRadius : 0;
tr = (tr) ? cornerRadius : 0;
bl = (bl) ? cornerRadius : 0;
br = (br) ? cornerRadius : 0;
GraphicsUtil.drawRoundRectComplex(g, focusThickness, focusThickness, (w - (2 * focusThickness)), (h - (2 * focusThickness)), tl, tr, bl, br);
g.endFill();
nr = (cornerRadius + (focusThickness / 2));
tl = (tl) ? nr : 0;
tr = (tr) ? nr : 0;
bl = (bl) ? nr : 0;
br = (br) ? nr : 0;
g.beginFill(rectColor, focusAlpha);
GraphicsUtil.drawRoundRectComplex(g, (focusThickness / 2), (focusThickness / 2), (w - focusThickness), (h - focusThickness), tl, tr, bl, br);
tl = (tl) ? cornerRadius : 0;
tr = (tr) ? cornerRadius : 0;
bl = (bl) ? cornerRadius : 0;
br = (br) ? cornerRadius : 0;
GraphicsUtil.drawRoundRectComplex(g, focusThickness, focusThickness, (w - (2 * focusThickness)), (h - (2 * focusThickness)), tl, tr, bl, br);
g.endFill();
} else {
g.beginFill(rectColor, focusAlpha);
ellipseSize = (((cornerRadius > 0)) ? (cornerRadius + focusThickness) : 0 * 2);
g.drawRoundRect(0, 0, w, h, ellipseSize, ellipseSize);
ellipseSize = (cornerRadius * 2);
g.drawRoundRect(focusThickness, focusThickness, (w - (2 * focusThickness)), (h - (2 * focusThickness)), ellipseSize, ellipseSize);
g.endFill();
g.beginFill(rectColor, focusAlpha);
ellipseSize = (((cornerRadius > 0)) ? (cornerRadius + (focusThickness / 2)) : 0 * 2);
g.drawRoundRect((focusThickness / 2), (focusThickness / 2), (w - focusThickness), (h - focusThickness), ellipseSize, ellipseSize);
ellipseSize = (cornerRadius * 2);
g.drawRoundRect(focusThickness, focusThickness, (w - (2 * focusThickness)), (h - (2 * focusThickness)), ellipseSize, ellipseSize);
g.endFill();
};
}
override public function getStyle(styleProp:String){
return (((styleProp == "focusColor")) ? _focusColor : super.getStyle(styleProp));
}
public function set styleDeclaration(value:CSSStyleDeclaration):void{
}
}
}//package mx.skins.halo
Section 127
//Border (mx.skins.Border)
package mx.skins {
import mx.core.*;
public class Border extends ProgrammaticSkin implements IBorder {
mx_internal static const VERSION:String = "3.3.0.4852";
public function Border(){
super();
}
public function get borderMetrics():EdgeMetrics{
return (EdgeMetrics.EMPTY);
}
}
}//package mx.skins
Section 128
//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.3.0.4852";
private static var tempMatrix:Matrix = new Matrix();
public function ProgrammaticSkin(){
super();
_width = measuredWidth;
_height = measuredHeight;
}
public function getStyle(styleProp:String){
return ((_styleName) ? _styleName.getStyle(styleProp) : null);
}
protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
}
public function get nestLevel():int{
return (_nestLevel);
}
public function set nestLevel(value:int):void{
_nestLevel = value;
invalidateDisplayList();
}
override public function get height():Number{
return (_height);
}
public function get updateCompletePendingFlag():Boolean{
return (_updateCompletePendingFlag);
}
protected function verticalGradientMatrix(x:Number, y:Number, width:Number, height:Number):Matrix{
return (rotatedGradientMatrix(x, y, width, height, 90));
}
public function validateSize(recursive:Boolean=false):void{
}
public function invalidateDisplayList():void{
if (((!(invalidateDisplayListFlag)) && ((nestLevel > 0)))){
invalidateDisplayListFlag = true;
UIComponentGlobals.layoutManager.invalidateDisplayList(this);
};
}
public function set updateCompletePendingFlag(value:Boolean):void{
_updateCompletePendingFlag = value;
}
protected function horizontalGradientMatrix(x:Number, y:Number, width:Number, height:Number):Matrix{
return (rotatedGradientMatrix(x, y, width, height, 0));
}
override public function set height(value:Number):void{
_height = value;
invalidateDisplayList();
}
public function set processedDescriptors(value:Boolean):void{
_processedDescriptors = value;
}
public function validateDisplayList():void{
invalidateDisplayListFlag = false;
updateDisplayList(width, height);
}
public function get measuredWidth():Number{
return (0);
}
override public function set width(value:Number):void{
_width = value;
invalidateDisplayList();
}
public function get measuredHeight():Number{
return (0);
}
public function set initialized(value:Boolean):void{
_initialized = value;
}
protected function drawRoundRect(x:Number, y:Number, width:Number, height:Number, cornerRadius:Object=null, color:Object=null, alpha:Object=null, gradientMatrix:Matrix=null, gradientType:String="linear", gradientRatios:Array=null, hole:Object=null):void{
var ellipseSize:Number;
var alphas:Array;
var holeR:Object;
var g:Graphics = graphics;
if ((((width == 0)) || ((height == 0)))){
return;
};
if (color !== null){
if ((color is uint)){
g.beginFill(uint(color), Number(alpha));
} else {
if ((color is Array)){
alphas = ((alpha is Array)) ? (alpha as Array) : [alpha, alpha];
if (!gradientRatios){
gradientRatios = [0, 0xFF];
};
g.beginGradientFill(gradientType, (color as Array), alphas, gradientRatios, gradientMatrix);
};
};
};
if (!cornerRadius){
g.drawRect(x, y, width, height);
} else {
if ((cornerRadius is Number)){
ellipseSize = (Number(cornerRadius) * 2);
g.drawRoundRect(x, y, width, height, ellipseSize, ellipseSize);
} else {
GraphicsUtil.drawRoundRectComplex(g, x, y, width, height, cornerRadius.tl, cornerRadius.tr, cornerRadius.bl, cornerRadius.br);
};
};
if (hole){
holeR = hole.r;
if ((holeR is Number)){
ellipseSize = (Number(holeR) * 2);
g.drawRoundRect(hole.x, hole.y, hole.w, hole.h, ellipseSize, ellipseSize);
} else {
GraphicsUtil.drawRoundRectComplex(g, hole.x, hole.y, hole.w, hole.h, holeR.tl, holeR.tr, holeR.bl, holeR.br);
};
};
if (color !== null){
g.endFill();
};
}
public function get processedDescriptors():Boolean{
return (_processedDescriptors);
}
public function set styleName(value:Object):void{
if (_styleName != value){
_styleName = (value as IStyleClient);
invalidateDisplayList();
};
}
public function setActualSize(newWidth:Number, newHeight:Number):void{
var changed:Boolean;
if (_width != newWidth){
_width = newWidth;
changed = true;
};
if (_height != newHeight){
_height = newHeight;
changed = true;
};
if (changed){
invalidateDisplayList();
};
}
public function styleChanged(styleProp: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(x:Number, y:Number, width:Number, height:Number, rotation:Number):Matrix{
tempMatrix.createGradientBox(width, height, ((rotation * Math.PI) / 180), x, y);
return (tempMatrix);
}
public function move(x:Number, y:Number):void{
this.x = x;
this.y = y;
}
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 129
//RectangularBorder (mx.skins.RectangularBorder)
package mx.skins {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import flash.geom.*;
import mx.styles.*;
import flash.system.*;
import mx.resources.*;
import flash.utils.*;
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.3.0.4852";
public function RectangularBorder(){
resourceManager = ResourceManager.getInstance();
super();
addEventListener(Event.REMOVED, removedHandler);
}
public function layoutBackgroundImage():void{
var sW:Number;
var sH:Number;
var sX:Number;
var sY:Number;
var scale:Number;
var g:Graphics;
var p:DisplayObject = parent;
var bm:EdgeMetrics = ((p is IContainer)) ? IContainer(p).viewMetrics : borderMetrics;
var scrollableBk = !((getStyle("backgroundAttachment") == "fixed"));
if (_backgroundImageBounds){
sW = _backgroundImageBounds.width;
sH = _backgroundImageBounds.height;
} else {
sW = ((width - bm.left) - bm.right);
sH = ((height - bm.top) - bm.bottom);
};
var percentage:Number = getBackgroundSize();
if (isNaN(percentage)){
sX = 1;
sY = 1;
} else {
scale = (percentage * 0.01);
sX = ((scale * sW) / backgroundImageWidth);
sY = ((scale * sH) / backgroundImageHeight);
};
backgroundImage.scaleX = sX;
backgroundImage.scaleY = sY;
var offsetX:Number = Math.round((0.5 * (sW - (backgroundImageWidth * sX))));
var offsetY:Number = Math.round((0.5 * (sH - (backgroundImageHeight * sY))));
backgroundImage.x = bm.left;
backgroundImage.y = bm.top;
var backgroundMask:Shape = Shape(backgroundImage.mask);
backgroundMask.x = bm.left;
backgroundMask.y = bm.top;
if (((scrollableBk) && ((p is IContainer)))){
offsetX = (offsetX - IContainer(p).horizontalScrollPosition);
offsetY = (offsetY - IContainer(p).verticalScrollPosition);
};
backgroundImage.alpha = getStyle("backgroundAlpha");
backgroundImage.x = (backgroundImage.x + offsetX);
backgroundImage.y = (backgroundImage.y + offsetY);
var maskWidth:Number = ((width - bm.left) - bm.right);
var maskHeight:Number = ((height - bm.top) - bm.bottom);
if (((!((backgroundMask.width == maskWidth))) || (!((backgroundMask.height == maskHeight))))){
g = backgroundMask.graphics;
g.clear();
g.beginFill(0xFFFFFF);
g.drawRect(0, 0, maskWidth, maskHeight);
g.endFill();
};
}
public function set backgroundImageBounds(value:Rectangle):void{
_backgroundImageBounds = value;
invalidateDisplayList();
}
private function getBackgroundSize():Number{
var index:int;
var percentage:Number = NaN;
var backgroundSize:Object = getStyle("backgroundSize");
if (((backgroundSize) && ((backgroundSize is String)))){
index = backgroundSize.indexOf("%");
if (index != -1){
percentage = Number(backgroundSize.substr(0, index));
};
};
return (percentage);
}
private function removedHandler(event:Event):void{
var childrenList:IChildList;
if (backgroundImage){
childrenList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
childrenList.removeChild(backgroundImage.mask);
childrenList.removeChild(backgroundImage);
backgroundImage = null;
};
}
private function initBackgroundImage(image:DisplayObject):void{
backgroundImage = image;
if ((image is Loader)){
backgroundImageWidth = Loader(image).contentLoaderInfo.width;
backgroundImageHeight = Loader(image).contentLoaderInfo.height;
} else {
backgroundImageWidth = backgroundImage.width;
backgroundImageHeight = backgroundImage.height;
if ((image is ISimpleStyleClient)){
ISimpleStyleClient(image).styleName = styleName;
};
};
var childrenList:IChildList = ((parent is IRawChildrenContainer)) ? IRawChildrenContainer(parent).rawChildren : IChildList(parent);
var backgroundMask:Shape = new FlexShape();
backgroundMask.name = "backgroundMask";
backgroundMask.x = 0;
backgroundMask.y = 0;
childrenList.addChild(backgroundMask);
var myIndex:int = childrenList.getChildIndex(this);
childrenList.addChildAt(backgroundImage, (myIndex + 1));
backgroundImage.mask = backgroundMask;
}
public function get backgroundImageBounds():Rectangle{
return (_backgroundImageBounds);
}
public function get hasBackgroundImage():Boolean{
return (!((backgroundImage == null)));
}
private function completeEventHandler(event:Event):void{
if (!parent){
return;
};
var target:DisplayObject = DisplayObject(LoaderInfo(event.target).loader);
initBackgroundImage(target);
layoutBackgroundImage();
dispatchEvent(event.clone());
}
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void{
var cls:Class;
var newStyleObj:DisplayObject;
var loader:Loader;
var loaderContext:LoaderContext;
var message:String;
var unscaledWidth = unscaledWidth;
var unscaledHeight = unscaledHeight;
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)))){
cls = Class(getDefinitionByName(String(newStyle)));
//unresolved jump
var _slot1 = e;
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(event:Event):void{
}
}
}//package mx.skins
Section 130
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.display.*;
import mx.managers.*;
import flash.utils.*;
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.3.0.4852";
private static const NOT_A_COLOR:uint = 4294967295;
private static const FILTERMAP_PROP:String = "__reserved__filterMap";
public function CSSStyleDeclaration(selector:String=null){
clones = new Dictionary(true);
super();
if (selector){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
styleManager.setStyleDeclaration(selector, this, false);
};
}
mx_internal function addStyleToProtoChain(chain:Object, target:DisplayObject, filterMap:Object=null):Object{
var p:String;
var emptyObjectFactory:Function;
var filteredChain:Object;
var filterObjectFactory:Function;
var i:String;
var chain = chain;
var target = target;
var filterMap = filterMap;
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(styleProp:String){
var o:*;
var v:*;
if (overrides){
if ((((styleProp in overrides)) && ((overrides[styleProp] === undefined)))){
return (undefined);
};
v = overrides[styleProp];
if (v !== undefined){
return (v);
};
};
if (factory != null){
factory.prototype = {};
o = new factory();
v = o[styleProp];
if (v !== undefined){
return (v);
};
};
if (defaultFactory != null){
defaultFactory.prototype = {};
o = new defaultFactory();
v = o[styleProp];
if (v !== undefined){
return (v);
};
};
return (undefined);
}
public function clearStyle(styleProp:String):void{
setStyle(styleProp, undefined);
}
public function setStyle(styleProp:String, newValue):void{
var i:int;
var sm:Object;
var oldValue:Object = getStyle(styleProp);
var regenerate:Boolean;
if ((((((((((selectorRefCount > 0)) && ((factory == null)))) && ((defaultFactory == null)))) && (!(overrides)))) && (!((oldValue === newValue))))){
regenerate = true;
};
if (newValue !== undefined){
setStyle(styleProp, newValue);
} else {
if (newValue == oldValue){
return;
};
setStyle(styleProp, newValue);
};
var sms:Array = SystemManagerGlobals.topLevelSystemManagers;
var n:int = sms.length;
if (regenerate){
i = 0;
while (i < n) {
sm = sms[i];
sm.regenerateStyleCache(true);
i++;
};
};
i = 0;
while (i < n) {
sm = sms[i];
sm.notifyStyleChangeInChildren(styleProp, true);
i++;
};
}
private function clearStyleAttr(styleProp:String):void{
var clone:*;
if (!overrides){
overrides = {};
};
overrides[styleProp] = undefined;
for (clone in clones) {
delete clone[styleProp];
};
}
mx_internal function createProtoChainRoot():Object{
var root:Object = {};
if (defaultFactory != null){
defaultFactory.prototype = root;
root = new defaultFactory();
};
if (factory != null){
factory.prototype = root;
root = new factory();
};
clones[root] = 1;
return (root);
}
mx_internal function clearOverride(styleProp:String):void{
if (((overrides) && (overrides[styleProp]))){
delete overrides[styleProp];
};
}
mx_internal function setStyle(styleProp:String, value):void{
var o:Object;
var clone:*;
var colorNumber:Number;
var cloneFilter:Object;
if (value === undefined){
clearStyleAttr(styleProp);
return;
};
if ((value is String)){
if (!styleManager){
styleManager = (Singleton.getInstance("mx.styles::IStyleManager2") as IStyleManager2);
};
colorNumber = styleManager.getColorName(value);
if (colorNumber != NOT_A_COLOR){
value = colorNumber;
};
};
if (defaultFactory != null){
o = new defaultFactory();
if (o[styleProp] !== value){
if (!overrides){
overrides = {};
};
overrides[styleProp] = value;
} else {
if (overrides){
delete overrides[styleProp];
};
};
};
if (factory != null){
o = new factory();
if (o[styleProp] !== value){
if (!overrides){
overrides = {};
};
overrides[styleProp] = value;
} else {
if (overrides){
delete overrides[styleProp];
};
};
};
if ((((defaultFactory == null)) && ((factory == null)))){
if (!overrides){
overrides = {};
};
overrides[styleProp] = value;
};
for (clone in clones) {
cloneFilter = clone[FILTERMAP_PROP];
if (cloneFilter){
if (cloneFilter[styleProp] != null){
clone[cloneFilter[styleProp]] = value;
};
} else {
clone[styleProp] = value;
};
};
}
}
}//package mx.styles
Section 131
//ISimpleStyleClient (mx.styles.ISimpleStyleClient)
package mx.styles {
public interface ISimpleStyleClient {
function set styleName(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;ISimpleStyleClient.as:Object):void;
function styleChanged(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;ISimpleStyleClient.as:String):void;
function get styleName():Object;
}
}//package mx.styles
Section 132
//IStyleClient (mx.styles.IStyleClient)
package mx.styles {
public interface IStyleClient extends ISimpleStyleClient {
function regenerateStyleCache(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:Boolean):void;
function get className():String;
function clearStyle(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:String):void;
function getClassStyleDeclarations():Array;
function get inheritingStyles():Object;
function set nonInheritingStyles(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:Object):void;
function setStyle(_arg1:String, _arg2):void;
function get styleDeclaration():CSSStyleDeclaration;
function set styleDeclaration(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:CSSStyleDeclaration):void;
function get nonInheritingStyles():Object;
function set inheritingStyles(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:Object):void;
function getStyle(*:String);
function notifyStyleChangeInChildren(_arg1:String, _arg2:Boolean):void;
function registerEffects(mx.styles:IStyleClient/mx.styles:IStyleClient:className/get:Array):void;
}
}//package mx.styles
Section 133
//IStyleManager (mx.styles.IStyleManager)
package mx.styles {
import flash.events.*;
public interface IStyleManager {
function isColorName(value:String):Boolean;
function registerParentDisplayListInvalidatingStyle(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void;
function registerInheritingStyle(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void;
function set stylesRoot(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Object):void;
function get typeSelectorCache():Object;
function styleDeclarationsChanged():void;
function setStyleDeclaration(_arg1:String, _arg2:CSSStyleDeclaration, _arg3:Boolean):void;
function isParentDisplayListInvalidatingStyle(value:String):Boolean;
function isSizeInvalidatingStyle(value:String):Boolean;
function get inheritingStyles():Object;
function isValidStyleValue(value):Boolean;
function isParentSizeInvalidatingStyle(value:String):Boolean;
function getColorName(mx.styles:IStyleManager/mx.styles:IStyleManager:inheritingStyles/set:Object):uint;
function set typeSelectorCache(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Object):void;
function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void;
function getColorNames(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Array):void;
function loadStyleDeclarations(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=false):IEventDispatcher;
function isInheritingStyle(value:String):Boolean;
function set inheritingStyles(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Object):void;
function get stylesRoot():Object;
function initProtoChainRoots():void;
function registerColorName(_arg1:String, _arg2:uint):void;
function registerParentSizeInvalidatingStyle(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void;
function registerSizeInvalidatingStyle(C:\autobuild\3.3.0\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void;
function clearStyleDeclaration(_arg1:String, _arg2:Boolean):void;
function isInheritingTextFormatStyle(value:String):Boolean;
function getStyleDeclaration(mx.styles:IStyleManager/mx.styles:IStyleManager:inheritingStyles/get:String):CSSStyleDeclaration;
}
}//package mx.styles
Section 134
//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 135
//IStyleModule (mx.styles.IStyleModule)
package mx.styles {
public interface IStyleModule {
function unload():void;
}
}//package mx.styles
Section 136
//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.3.0.4852";
public static const NOT_A_COLOR:uint = 4294967295;
private static var _impl:IStyleManager2;
private static var implClassDependency:StyleManagerImpl;
public function StyleManager(){
super();
}
public static function isParentSizeInvalidatingStyle(styleName:String):Boolean{
return (impl.isParentSizeInvalidatingStyle(styleName));
}
public static function registerInheritingStyle(styleName:String):void{
impl.registerInheritingStyle(styleName);
}
mx_internal static function set stylesRoot(value:Object):void{
impl.stylesRoot = value;
}
mx_internal static function get inheritingStyles():Object{
return (impl.inheritingStyles);
}
mx_internal static function styleDeclarationsChanged():void{
impl.styleDeclarationsChanged();
}
public static function setStyleDeclaration(selector:String, styleDeclaration:CSSStyleDeclaration, update:Boolean):void{
impl.setStyleDeclaration(selector, styleDeclaration, update);
}
public static function registerParentDisplayListInvalidatingStyle(styleName:String):void{
impl.registerParentDisplayListInvalidatingStyle(styleName);
}
mx_internal static function get typeSelectorCache():Object{
return (impl.typeSelectorCache);
}
mx_internal static function set inheritingStyles(value:Object):void{
impl.inheritingStyles = value;
}
public static function isColorName(colorName:String):Boolean{
return (impl.isColorName(colorName));
}
public static function isParentDisplayListInvalidatingStyle(styleName:String):Boolean{
return (impl.isParentDisplayListInvalidatingStyle(styleName));
}
public static function isSizeInvalidatingStyle(styleName:String):Boolean{
return (impl.isSizeInvalidatingStyle(styleName));
}
public static function getColorName(colorName:Object):uint{
return (impl.getColorName(colorName));
}
mx_internal static function set typeSelectorCache(value:Object):void{
impl.typeSelectorCache = value;
}
public static function unloadStyleDeclarations(url:String, update:Boolean=true):void{
impl.unloadStyleDeclarations(url, update);
}
public static function getColorNames(colors:Array):void{
impl.getColorNames(colors);
}
public static function loadStyleDeclarations(url:String, update:Boolean=true, trustContent:Boolean=false, applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null):IEventDispatcher{
return (impl.loadStyleDeclarations2(url, update, applicationDomain, securityDomain));
}
private static function get impl():IStyleManager2{
if (!_impl){
_impl = IStyleManager2(Singleton.getInstance("mx.styles::IStyleManager2"));
};
return (_impl);
}
public static function isValidStyleValue(value):Boolean{
return (impl.isValidStyleValue(value));
}
mx_internal static function get stylesRoot():Object{
return (impl.stylesRoot);
}
public static function isInheritingStyle(styleName:String):Boolean{
return (impl.isInheritingStyle(styleName));
}
mx_internal static function initProtoChainRoots():void{
impl.initProtoChainRoots();
}
public static function registerParentSizeInvalidatingStyle(styleName:String):void{
impl.registerParentSizeInvalidatingStyle(styleName);
}
public static function get selectors():Array{
return (impl.selectors);
}
public static function registerSizeInvalidatingStyle(styleName:String):void{
impl.registerSizeInvalidatingStyle(styleName);
}
public static function clearStyleDeclaration(selector:String, update:Boolean):void{
impl.clearStyleDeclaration(selector, update);
}
public static function registerColorName(colorName:String, colorValue:uint):void{
impl.registerColorName(colorName, colorValue);
}
public static function isInheritingTextFormatStyle(styleName:String):Boolean{
return (impl.isInheritingTextFormatStyle(styleName));
}
public static function getStyleDeclaration(selector:String):CSSStyleDeclaration{
return (impl.getStyleDeclaration(selector));
}
}
}//package mx.styles
Section 137
//StyleManagerImpl (mx.styles.StyleManagerImpl)
package mx.styles {
import flash.events.*;
import mx.core.*;
import flash.system.*;
import mx.modules.*;
import mx.events.*;
import mx.resources.*;
import mx.managers.*;
import flash.utils.*;
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.3.0.4852";
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(selector:String, styleDeclaration:CSSStyleDeclaration, update:Boolean):void{
styleDeclaration.selectorRefCount++;
_selectors[selector] = styleDeclaration;
typeSelectorCache = {};
if (update){
styleDeclarationsChanged();
};
}
public function registerParentDisplayListInvalidatingStyle(styleName:String):void{
parentDisplayListInvalidatingStyles[styleName] = true;
}
public function getStyleDeclaration(selector:String):CSSStyleDeclaration{
var index:int;
if (selector.charAt(0) != "."){
index = selector.lastIndexOf(".");
if (index != -1){
selector = selector.substr((index + 1));
};
};
return (_selectors[selector]);
}
public function set typeSelectorCache(value:Object):void{
_typeSelectorCache = value;
}
public function isColorName(colorName:String):Boolean{
return (!((colorNames[colorName.toLowerCase()] === undefined)));
}
public function set inheritingStyles(value:Object):void{
_inheritingStyles = value;
}
public function getColorNames(colors:Array):void{
var colorNumber:uint;
if (!colors){
return;
};
var n:int = colors.length;
var i:int;
while (i < n) {
if (((!((colors[i] == null))) && (isNaN(colors[i])))){
colorNumber = getColorName(colors[i]);
if (colorNumber != StyleManager.NOT_A_COLOR){
colors[i] = colorNumber;
};
};
i++;
};
}
public function isInheritingTextFormatStyle(styleName:String):Boolean{
return ((inheritingTextFormatStyles[styleName] == true));
}
public function registerParentSizeInvalidatingStyle(styleName:String):void{
parentSizeInvalidatingStyles[styleName] = true;
}
public function registerColorName(colorName:String, colorValue:uint):void{
colorNames[colorName.toLowerCase()] = colorValue;
}
public function isParentSizeInvalidatingStyle(styleName:String):Boolean{
return ((parentSizeInvalidatingStyles[styleName] == true));
}
public function registerInheritingStyle(styleName:String):void{
inheritingStyles[styleName] = true;
}
public function set stylesRoot(value:Object):void{
_stylesRoot = value;
}
public function get typeSelectorCache():Object{
return (_typeSelectorCache);
}
public function isParentDisplayListInvalidatingStyle(styleName:String):Boolean{
return ((parentDisplayListInvalidatingStyles[styleName] == true));
}
public function isSizeInvalidatingStyle(styleName:String):Boolean{
return ((sizeInvalidatingStyles[styleName] == true));
}
public function styleDeclarationsChanged():void{
var sm:Object;
var sms:Array = SystemManagerGlobals.topLevelSystemManagers;
var n:int = sms.length;
var i:int;
while (i < n) {
sm = sms[i];
sm.regenerateStyleCache(true);
sm.notifyStyleChangeInChildren(null, true);
i++;
};
}
public function isValidStyleValue(value):Boolean{
return (!((value === undefined)));
}
public function loadStyleDeclarations(url:String, update:Boolean=true, trustContent:Boolean=false):IEventDispatcher{
return (loadStyleDeclarations2(url, update));
}
public function get inheritingStyles():Object{
return (_inheritingStyles);
}
public function unloadStyleDeclarations(url:String, update:Boolean=true):void{
var module:IModuleInfo;
var styleModuleInfo:StyleModuleInfo = styleModules[url];
if (styleModuleInfo){
styleModuleInfo.styleModule.unload();
module = styleModuleInfo.module;
module.unload();
module.removeEventListener(ModuleEvent.READY, styleModuleInfo.readyHandler);
module.removeEventListener(ModuleEvent.ERROR, styleModuleInfo.errorHandler);
styleModules[url] = null;
};
if (update){
styleDeclarationsChanged();
};
}
public function getColorName(colorName:Object):uint{
var n:Number;
var c:*;
if ((colorName is String)){
if (colorName.charAt(0) == "#"){
n = Number(("0x" + colorName.slice(1)));
return ((isNaN(n)) ? StyleManager.NOT_A_COLOR : uint(n));
};
if ((((colorName.charAt(1) == "x")) && ((colorName.charAt(0) == "0")))){
n = Number(colorName);
return ((isNaN(n)) ? StyleManager.NOT_A_COLOR : uint(n));
};
c = colorNames[colorName.toLowerCase()];
if (c === undefined){
return (StyleManager.NOT_A_COLOR);
};
return (uint(c));
};
return (uint(colorName));
}
public function isInheritingStyle(styleName:String):Boolean{
return ((inheritingStyles[styleName] == 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(url:String, update:Boolean=true, applicationDomain:ApplicationDomain=null, securityDomain:SecurityDomain=null):IEventDispatcher{
var module:IModuleInfo;
var styleEventDispatcher:StyleEventDispatcher;
var timer:Timer;
var timerHandler:Function;
var url = url;
var update = update;
var applicationDomain = applicationDomain;
var securityDomain = securityDomain;
module = ModuleManager.getModule(url);
var readyHandler:Function = function (moduleEvent:ModuleEvent):void{
var styleModule:IStyleModule = IStyleModule(moduleEvent.module.factory.create());
styleModules[moduleEvent.module.url].styleModule = styleModule;
if (update){
styleDeclarationsChanged();
};
};
module.addEventListener(ModuleEvent.READY, readyHandler, false, 0, true);
styleEventDispatcher = new StyleEventDispatcher(module);
var errorHandler:Function = function (moduleEvent:ModuleEvent):void{
var styleEvent:StyleEvent;
var errorText:String = resourceManager.getString("styles", "unableToLoad", [moduleEvent.errorText, url]);
if (styleEventDispatcher.willTrigger(StyleEvent.ERROR)){
styleEvent = new StyleEvent(StyleEvent.ERROR, moduleEvent.bubbles, moduleEvent.cancelable);
styleEvent.bytesLoaded = 0;
styleEvent.bytesTotal = 0;
styleEvent.errorText = errorText;
styleEventDispatcher.dispatchEvent(styleEvent);
} else {
throw (new Error(errorText));
};
};
module.addEventListener(ModuleEvent.ERROR, errorHandler, false, 0, true);
styleModules[url] = new StyleModuleInfo(module, readyHandler, errorHandler);
timer = new Timer(0);
timerHandler = function (event: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(styleName:String):void{
sizeInvalidatingStyles[styleName] = true;
}
public function clearStyleDeclaration(selector:String, update:Boolean):void{
var styleDeclaration:CSSStyleDeclaration = getStyleDeclaration(selector);
if (((styleDeclaration) && ((styleDeclaration.selectorRefCount > 0)))){
styleDeclaration.selectorRefCount--;
};
delete _selectors[selector];
if (update){
styleDeclarationsChanged();
};
}
public function get selectors():Array{
var i:String;
var theSelectors:Array = [];
for (i in _selectors) {
theSelectors.push(i);
};
return (theSelectors);
}
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(moduleInfo:IModuleInfo){
super();
moduleInfo.addEventListener(ModuleEvent.ERROR, moduleInfo_errorHandler, false, 0, true);
moduleInfo.addEventListener(ModuleEvent.PROGRESS, moduleInfo_progressHandler, false, 0, true);
moduleInfo.addEventListener(ModuleEvent.READY, moduleInfo_readyHandler, false, 0, true);
}
private function moduleInfo_progressHandler(event:ModuleEvent):void{
var styleEvent:StyleEvent = new StyleEvent(StyleEvent.PROGRESS, event.bubbles, event.cancelable);
styleEvent.bytesLoaded = event.bytesLoaded;
styleEvent.bytesTotal = event.bytesTotal;
dispatchEvent(styleEvent);
}
private function moduleInfo_readyHandler(event:ModuleEvent):void{
var styleEvent:StyleEvent = new StyleEvent(StyleEvent.COMPLETE);
dispatchEvent(styleEvent);
}
private function moduleInfo_errorHandler(event:ModuleEvent):void{
var styleEvent:StyleEvent = new StyleEvent(StyleEvent.ERROR, event.bubbles, event.cancelable);
styleEvent.bytesLoaded = event.bytesLoaded;
styleEvent.bytesTotal = event.bytesTotal;
styleEvent.errorText = event.errorText;
dispatchEvent(styleEvent);
}
}
class StyleModuleInfo {
public var errorHandler:Function;
public var readyHandler:Function;
public var module:IModuleInfo;
public var styleModule:IStyleModule;
private function StyleModuleInfo(module:IModuleInfo, readyHandler:Function, errorHandler:Function){
super();
this.module = module;
this.readyHandler = readyHandler;
this.errorHandler = errorHandler;
}
}
Section 138
//ColorUtil (mx.utils.ColorUtil)
package mx.utils {
public class ColorUtil {
mx_internal static const VERSION:String = "3.3.0.4852";
public function ColorUtil(){
super();
}
public static function adjustBrightness2(rgb:uint, brite:Number):uint{
var r:Number;
var g:Number;
var b:Number;
if (brite == 0){
return (rgb);
};
if (brite < 0){
brite = ((100 + brite) / 100);
r = (((rgb >> 16) & 0xFF) * brite);
g = (((rgb >> 8) & 0xFF) * brite);
b = ((rgb & 0xFF) * brite);
} else {
brite = (brite / 100);
r = ((rgb >> 16) & 0xFF);
g = ((rgb >> 8) & 0xFF);
b = (rgb & 0xFF);
r = (r + ((0xFF - r) * brite));
g = (g + ((0xFF - g) * brite));
b = (b + ((0xFF - b) * brite));
r = Math.min(r, 0xFF);
g = Math.min(g, 0xFF);
b = Math.min(b, 0xFF);
};
return ((((r << 16) | (g << 8)) | b));
}
public static function rgbMultiply(rgb1:uint, rgb2:uint):uint{
var r1:Number = ((rgb1 >> 16) & 0xFF);
var g1:Number = ((rgb1 >> 8) & 0xFF);
var b1:Number = (rgb1 & 0xFF);
var r2:Number = ((rgb2 >> 16) & 0xFF);
var g2:Number = ((rgb2 >> 8) & 0xFF);
var b2:Number = (rgb2 & 0xFF);
return ((((((r1 * r2) / 0xFF) << 16) | (((g1 * g2) / 0xFF) << 8)) | ((b1 * b2) / 0xFF)));
}
public static function adjustBrightness(rgb:uint, brite:Number):uint{
var r:Number = Math.max(Math.min((((rgb >> 16) & 0xFF) + brite), 0xFF), 0);
var g:Number = Math.max(Math.min((((rgb >> 8) & 0xFF) + brite), 0xFF), 0);
var b:Number = Math.max(Math.min(((rgb & 0xFF) + brite), 0xFF), 0);
return ((((r << 16) | (g << 8)) | b));
}
}
}//package mx.utils
Section 139
//GraphicsUtil (mx.utils.GraphicsUtil)
package mx.utils {
import flash.display.*;
public class GraphicsUtil {
mx_internal static const VERSION:String = "3.3.0.4852";
public function GraphicsUtil(){
super();
}
public static function drawRoundRectComplex(graphics:Graphics, x:Number, y:Number, width:Number, height:Number, topLeftRadius:Number, topRightRadius:Number, bottomLeftRadius:Number, bottomRightRadius:Number):void{
var xw:Number = (x + width);
var yh:Number = (y + height);
var minSize:Number = ((width < height)) ? (width * 2) : (height * 2);
topLeftRadius = ((topLeftRadius < minSize)) ? topLeftRadius : minSize;
topRightRadius = ((topRightRadius < minSize)) ? topRightRadius : minSize;
bottomLeftRadius = ((bottomLeftRadius < minSize)) ? bottomLeftRadius : minSize;
bottomRightRadius = ((bottomRightRadius < minSize)) ? bottomRightRadius : minSize;
var a:Number = (bottomRightRadius * 0.292893218813453);
var s:Number = (bottomRightRadius * 0.585786437626905);
graphics.moveTo(xw, (yh - bottomRightRadius));
graphics.curveTo(xw, (yh - s), (xw - a), (yh - a));
graphics.curveTo((xw - s), yh, (xw - bottomRightRadius), yh);
a = (bottomLeftRadius * 0.292893218813453);
s = (bottomLeftRadius * 0.585786437626905);
graphics.lineTo((x + bottomLeftRadius), yh);
graphics.curveTo((x + s), yh, (x + a), (yh - a));
graphics.curveTo(x, (yh - s), x, (yh - bottomLeftRadius));
a = (topLeftRadius * 0.292893218813453);
s = (topLeftRadius * 0.585786437626905);
graphics.lineTo(x, (y + topLeftRadius));
graphics.curveTo(x, (y + s), (x + a), (y + a));
graphics.curveTo((x + s), y, (x + topLeftRadius), y);
a = (topRightRadius * 0.292893218813453);
s = (topRightRadius * 0.585786437626905);
graphics.lineTo((xw - topRightRadius), y);
graphics.curveTo((xw - s), y, (xw - a), (y + a));
graphics.curveTo(xw, (y + s), xw, (y + topRightRadius));
graphics.lineTo(xw, (yh - bottomRightRadius));
}
}
}//package mx.utils
Section 140
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "3.3.0.4852";
private static var counter:int = 0;
public function NameUtil(){
super();
}
public static function displayObjectToString(displayObject:DisplayObject):String{
var result:String;
var o:DisplayObject;
var s:String;
var indices:Array;
var displayObject = displayObject;
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;
};
//unresolved jump
var _slot1 = e;
return (result);
}
public static function createUniqueName(object:Object):String{
if (!object){
return (null);
};
var name:String = getQualifiedClassName(object);
var index:int = name.indexOf("::");
if (index != -1){
name = name.substr((index + 2));
};
var charCode:int = name.charCodeAt((name.length - 1));
if ((((charCode >= 48)) && ((charCode <= 57)))){
name = (name + "_");
};
return ((name + counter++));
}
}
}//package mx.utils
Section 141
//StringUtil (mx.utils.StringUtil)
package mx.utils {
public class StringUtil {
mx_internal static const VERSION:String = "3.3.0.4852";
public function StringUtil(){
super();
}
public static function trim(str:String):String{
if (str == null){
return ("");
};
var startIndex:int;
while (isWhitespace(str.charAt(startIndex))) {
startIndex++;
};
var endIndex:int = (str.length - 1);
while (isWhitespace(str.charAt(endIndex))) {
endIndex--;
};
if (endIndex >= startIndex){
return (str.slice(startIndex, (endIndex + 1)));
};
return ("");
}
public static function isWhitespace(character:String):Boolean{
switch (character){
case " ":
case "\t":
case "\r":
case "\n":
case "\f":
return (true);
default:
return (false);
};
}
public static function substitute(str:String, ... _args):String{
var args:Array;
if (str == null){
return ("");
};
var len:uint = _args.length;
if ((((len == 1)) && ((_args[0] is Array)))){
args = (_args[0] as Array);
len = args.length;
} else {
args = _args;
};
var i:int;
while (i < len) {
str = str.replace(new RegExp((("\\{" + i) + "\\}"), "g"), args[i]);
i++;
};
return (str);
}
public static function trimArrayElements(value:String, delimiter:String):String{
var items:Array;
var len:int;
var i:int;
if (((!((value == ""))) && (!((value == null))))){
items = value.split(delimiter);
len = items.length;
i = 0;
while (i < len) {
items[i] = StringUtil.trim(items[i]);
i++;
};
if (len > 0){
value = items.join(delimiter);
};
};
return (value);
}
}
}//package mx.utils
Section 142
//_activeButtonStyleStyle (_activeButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeButtonStyleStyle {
public static function init(_activeButtonStyleStyle:IFlexModuleFactory):void{
var fbs = _activeButtonStyleStyle;
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 143
//_activeTabStyleStyle (_activeTabStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _activeTabStyleStyle {
public static function init(:IFlexModuleFactory):void{
var fbs = ;
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 144
//_alertButtonStyleStyle (_alertButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _alertButtonStyleStyle {
public static function init(:IFlexModuleFactory):void{
var fbs = ;
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 145
//_comboDropdownStyle (_comboDropdownStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _comboDropdownStyle {
public static function init(dropShadowEnabled:IFlexModuleFactory):void{
var fbs = dropShadowEnabled;
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.paddingLeft = 5;
this.fontWeight = "normal";
this.cornerRadius = 0;
this.paddingRight = 5;
this.dropShadowEnabled = true;
this.shadowDirection = "center";
this.leading = 0;
this.borderThickness = 0;
this.shadowDistance = 1;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 146
//_dataGridStylesStyle (_dataGridStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dataGridStylesStyle {
public static function init(:IFlexModuleFactory):void{
var fbs = ;
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 147
//_dateFieldPopupStyle (_dateFieldPopupStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _dateFieldPopupStyle {
public static function init(_dateFieldPopupStyle.as$14:IFlexModuleFactory):void{
var fbs = _dateFieldPopupStyle.as$14;
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.borderThickness = 0;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 148
//_errorTipStyle (_errorTipStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _errorTipStyle {
public static function init(fontWeight:IFlexModuleFactory):void{
var fbs = fontWeight;
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.paddingTop = 4;
this.borderColor = 13510953;
this.paddingLeft = 4;
this.color = 0xFFFFFF;
this.fontWeight = "bold";
this.paddingRight = 4;
this.shadowColor = 0;
this.fontSize = 9;
this.paddingBottom = 4;
this.borderStyle = "errorTipRight";
};
};
}
}
}//package
Section 149
//_globalStyle (_globalStyle)
package {
import mx.core.*;
import mx.styles.*;
import mx.skins.halo.*;
public class _globalStyle {
public static function init(borderAlpha:IFlexModuleFactory):void{
var fbs = borderAlpha;
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.fontWeight = "normal";
this.modalTransparencyBlur = 3;
this.verticalGridLineColor = 14015965;
this.borderStyle = "inset";
this.buttonColor = 7305079;
this.borderCapColor = 9542041;
this.textAlign = "left";
this.disabledIconColor = 0x999999;
this.stroked = false;
this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE];
this.fontStyle = "normal";
this.borderSides = "left top right bottom";
this.borderThickness = 1;
this.modalTransparencyDuration = 100;
this.useRollOver = true;
this.strokeWidth = 1;
this.filled = true;
this.borderColor = 12040892;
this.horizontalGridLines = false;
this.horizontalGridLineColor = 0xF7F7F7;
this.shadowCapColor = 14015965;
this.fontGridFitType = "pixel";
this.horizontalAlign = "left";
this.modalTransparencyColor = 0xDDDDDD;
this.disabledColor = 11187123;
this.borderSkin = HaloBorder;
this.dropShadowColor = 0;
this.paddingBottom = 0;
this.indentation = 17;
this.version = "3.0.0";
this.fontThickness = 0;
this.verticalGridLines = true;
this.embedFonts = false;
this.fontSharpness = 0;
this.shadowDirection = "center";
this.textDecoration = "none";
this.selectionDuration = 250;
this.bevel = true;
this.fillColor = 0xFFFFFF;
this.focusBlendMode = "normal";
this.dropShadowEnabled = false;
this.textRollOverColor = 2831164;
this.textIndent = 0;
this.fontSize = 10;
this.openDuration = 250;
this.closeDuration = 250;
this.kerning = false;
this.paddingTop = 0;
this.highlightAlphas = [0.3, 0];
this.cornerRadius = 0;
this.horizontalGap = 8;
this.textSelectedColor = 2831164;
this.paddingLeft = 0;
this.modalTransparency = 0.5;
this.roundedBottomCorners = true;
this.repeatDelay = 500;
this.selectionDisabledColor = 0xDDDDDD;
this.fontAntiAliasType = "advanced";
this.focusSkin = HaloFocusRect;
this.verticalGap = 6;
this.leading = 2;
this.shadowColor = 0xEEEEEE;
this.backgroundAlpha = 1;
this.iconColor = 0x111111;
this.focusAlpha = 0.4;
this.borderAlpha = 1;
this.focusThickness = 2;
this.themeColor = 40447;
this.backgroundSize = "auto";
this.indicatorGap = 14;
this.letterSpacing = 0;
this.fontFamily = "Verdana";
this.fillAlphas = [0.6, 0.4, 0.75, 0.65];
this.color = 734012;
this.paddingRight = 0;
this.errorColor = 0xFF0000;
this.verticalAlign = "top";
this.focusRoundedCorners = "tl tr bl br";
this.shadowDistance = 2;
this.repeatInterval = 35;
};
};
}
}
}//package
Section 150
//_headerDateTextStyle (_headerDateTextStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDateTextStyle {
public static function init(center:IFlexModuleFactory):void{
var fbs = center;
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.textAlign = "center";
this.fontWeight = "bold";
};
};
}
}
}//package
Section 151
//_headerDragProxyStyleStyle (_headerDragProxyStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _headerDragProxyStyleStyle {
public static function init(:IFlexModuleFactory):void{
var fbs = ;
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 152
//_linkButtonStyleStyle (_linkButtonStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _linkButtonStyleStyle {
public static function init(http://adobe.com/AS3/2006/builtin:IFlexModuleFactory):void{
var fbs = http://adobe.com/AS3/2006/builtin;
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.paddingRight = 2;
this.paddingBottom = 2;
};
};
}
}
}//package
Section 153
//_opaquePanelStyle (_opaquePanelStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _opaquePanelStyle {
public static function init(Object:IFlexModuleFactory):void{
var fbs = Object;
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.footerColors = [0xE7E7E7, 0xC7C7C7];
this.borderColor = 0xFFFFFF;
this.headerColors = [0xE7E7E7, 0xD9D9D9];
this.borderAlpha = 1;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 154
//_plainStyle (_plainStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _plainStyle {
public static function init(left:IFlexModuleFactory):void{
var fbs = left;
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.paddingLeft = 0;
this.horizontalAlign = "left";
this.paddingRight = 0;
this.backgroundImage = "";
this.paddingBottom = 0;
this.backgroundColor = 0xFFFFFF;
};
};
}
}
}//package
Section 155
//_popUpMenuStyle (_popUpMenuStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _popUpMenuStyle {
public static function init(left:IFlexModuleFactory):void{
var fbs = left;
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.textAlign = "left";
this.fontWeight = "normal";
};
};
}
}
}//package
Section 156
//_richTextEditorTextAreaStyleStyle (_richTextEditorTextAreaStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _richTextEditorTextAreaStyleStyle {
public static function init(_richTextEditorTextAreaStyleStyle:IFlexModuleFactory):void{
var fbs = _richTextEditorTextAreaStyleStyle;
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 157
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _swatchPanelTextFieldStyle {
public static function init(shadowColor:IFlexModuleFactory):void{
var fbs = shadowColor;
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.highlightColor = 12897484;
this.borderColor = 14015965;
this.paddingLeft = 5;
this.shadowCapColor = 14015965;
this.paddingRight = 5;
this.shadowColor = 14015965;
this.borderStyle = "inset";
this.buttonColor = 7305079;
this.backgroundColor = 0xFFFFFF;
this.borderCapColor = 9542041;
};
};
}
}
}//package
Section 158
//_textAreaHScrollBarStyleStyle (_textAreaHScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaHScrollBarStyleStyle {
public static function init(_textAreaHScrollBarStyleStyle:IFlexModuleFactory):void{
var fbs = _textAreaHScrollBarStyleStyle;
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 159
//_textAreaVScrollBarStyleStyle (_textAreaVScrollBarStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _textAreaVScrollBarStyleStyle {
public static function init(_textAreaVScrollBarStyleStyle:IFlexModuleFactory):void{
var fbs = _textAreaVScrollBarStyleStyle;
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 160
//_todayStyleStyle (_todayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _todayStyleStyle {
public static function init(center:IFlexModuleFactory):void{
var fbs = center;
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.textAlign = "center";
this.color = 0xFFFFFF;
};
};
}
}
}//package
Section 161
//_weekDayStyleStyle (_weekDayStyleStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _weekDayStyleStyle {
public static function init(center:IFlexModuleFactory):void{
var fbs = center;
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.textAlign = "center";
this.fontWeight = "bold";
};
};
}
}
}//package
Section 162
//_windowStatusStyle (_windowStatusStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStatusStyle {
public static function init(:IFlexModuleFactory):void{
var fbs = ;
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 163
//_windowStylesStyle (_windowStylesStyle)
package {
import mx.core.*;
import mx.styles.*;
public class _windowStylesStyle {
public static function init(:IFlexModuleFactory):void{
var fbs = ;
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 164
//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 165
//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 166
//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 167
//Preloader (Preloader)
package {
import com.adamatomic.flixel.data.*;
public class Preloader extends FlxFactory {
public function Preloader():void{
className = "Queens";
super();
}
}
}//package
Section 168
//Queens (Queens)
package {
import com.adamatomic.flixel.*;
import com.noonat.queens.*;
public class Queens extends FlxGame {
public function Queens():void{
super(320, 240, MenuState, 2, 4279177483, 4294967295);
help("Jump", "Unused", "Unused");
}
}
}//package