STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229494
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2575 · P5149

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/81203781?noj=FRM81203781-14DC" width="1" height="1"></div>

Mario & Platformer - Robin the Mercenary 2.swf

This is the info page for
Flash #231382

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS3]
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
//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 3
//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 4
//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 5
//FlxArray (com.adamatomic.flixel.FlxArray) package com.adamatomic.flixel { public dynamic class FlxArray extends Array { public function FlxArray(){ super(); } public function getNonexist():FlxCore{ if (this.length <= 0){ return (null); }; 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(Obj:Object, Splice:Boolean=false):void{ removeAt(indexOf(Obj), Splice); } public function removeAt(Index:uint, Splice:Boolean=false):void{ if (Splice){ this.splice(Index, 1); } else { this[Index] = null; }; } public function killAt(Index:uint):void{ if ((this[Index] is FlxCore)){ this[Index].kill(); }; } public function clear():void{ this.length = 0; } public function kill(Core:FlxCore):void{ killAt(indexOf(Core)); } public static function getRandom(Arr:Array):Object{ return (Arr[Math.floor((Math.random() * Arr.length))]); } } }//package com.adamatomic.flixel
Section 6
//FlxBlock (com.adamatomic.flixel.FlxBlock) package com.adamatomic.flixel { import flash.display.*; import flash.geom.*; public class FlxBlock extends FlxCore { private var life:int; private var _tileSize:uint; private var _p:Point; private var _gibs:FlxEmitter; private var _pixels:BitmapData; private var ImgGibs:Class; private var _rects:FlxArray; private var SndExplode:Class; private var destruct:Boolean;// = false public function FlxBlock(X:int, Y:int, Width:uint, Height:uint, TileGraphic:Class, Empties:uint=0, lif:int=5){ var widthInTiles:uint; var heightInTiles:uint; ImgGibs = FlxBlock_ImgGibs; SndExplode = FlxBlock_SndExplode; super(); x = X; y = Y; width = Width; height = Height; life = lif; if (life > 0){ destruct = true; }; 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); _gibs = (FlxG.state.add(new FlxEmitter(0, 0, 0, 0, null, -1.5, -150, 150, -200, 0, -720, 720, 400, 0, ImgGibs, 20, true)) as FlxEmitter); 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++; }; } override public function render():void{ super.render(); 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 function hurt(Damage:Number):void{ if (destruct){ life = (life - Damage); if (life < 0){ kill(); _gibs.x = (x + (width / 2)); _gibs.y = (y + (height / 2)); _gibs.reset(); FlxG.play(SndExplode); }; }; } } }//package com.adamatomic.flixel
Section 7
//FlxBlock_ImgGibs (com.adamatomic.flixel.FlxBlock_ImgGibs) package com.adamatomic.flixel { import mx.core.*; public class FlxBlock_ImgGibs extends BitmapAsset { } }//package com.adamatomic.flixel
Section 8
//FlxBlock_SndExplode (com.adamatomic.flixel.FlxBlock_SndExplode) package com.adamatomic.flixel { import mx.core.*; public class FlxBlock_SndExplode extends SoundAsset { } }//package com.adamatomic.flixel
Section 9
//FlxButton (com.adamatomic.flixel.FlxButton) package com.adamatomic.flixel { import flash.geom.*; public class FlxButton extends FlxCore { private var _onTO:Point; private var _pressed:Boolean; public var _onT:FlxText; private var _callback:Function; private var _off:FlxSprite; private var _onToggle:Boolean; private var _offTO:Point; public var _offT:FlxText; private var _on:FlxSprite; public function FlxButton(X:int, Y:int, Image:FlxSprite, Callback:Function, ImageOn:FlxSprite=null, Text:FlxText=null, TextOn:FlxText=null){ super(); x = X; y = Y; _off = Image; if (ImageOn == null){ _on = _off; } else { _on = ImageOn; }; width = _off.width; height = _off.height; if (Text != null){ _offT = Text; }; if (TextOn == null){ _onT = _offT; } else { _onT = TextOn; }; if (_offT != null){ _offTO = new Point(_offT.x, _offT.y); }; if (_onT != null){ _onTO = new Point(_onT.x, _onT.y); }; _off.scrollFactor = scrollFactor; _on.scrollFactor = scrollFactor; if (_offT != null){ _offT.scrollFactor = scrollFactor; _onT.scrollFactor = scrollFactor; }; _callback = Callback; _onToggle = false; _pressed = false; updatePositions(); } override public function update():void{ super.update(); if (((((!((_off == null))) && (_off.exists))) && (_off.active))){ _off.update(); }; if (((((!((_on == null))) && (_on.exists))) && (_on.active))){ _on.update(); }; if (_offT != null){ if (((((!((_offT == null))) && (_offT.exists))) && (_offT.active))){ _offT.update(); }; if (((((!((_onT == null))) && (_onT.exists))) && (_onT.active))){ _onT.update(); }; }; 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); }; updatePositions(); } 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; }; }; } override public function render():void{ super.render(); if (((((!((_off == null))) && (_off.exists))) && (_off.visible))){ _off.render(); }; if (((((!((_on == null))) && (_on.exists))) && (_on.visible))){ _on.render(); }; if (_offT != null){ if (((((!((_offT == null))) && (_offT.exists))) && (_offT.visible))){ _offT.render(); }; if (((((!((_onT == null))) && (_onT.exists))) && (_onT.visible))){ _onT.render(); }; }; } public function switchOff():void{ _onToggle = false; } public function on():Boolean{ return (_onToggle); } private function updatePositions():void{ _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); }; } public function switchOn():void{ _onToggle = true; } } }//package com.adamatomic.flixel
Section 10
//FlxCore (com.adamatomic.flixel.FlxCore) package com.adamatomic.flixel { import flash.geom.*; public class FlxCore { private var _flicker:Boolean; public var active:Boolean; public var visible:Boolean; public var width:uint; private var _flickerTimer:Number; public var exists:Boolean; public var height:uint; public var dead:Boolean; 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 update():void{ if (flickering()){ if (_flickerTimer > 0){ _flickerTimer = (_flickerTimer - FlxG.elapsed); }; if (_flickerTimer < 0){ flicker(-1); } else { _flicker = !(_flicker); visible = !(_flicker); }; }; } public function flicker(Duration:Number=1):void{ _flickerTimer = Duration; if (_flickerTimer < 0){ _flicker = false; visible = true; }; } public function overlapsPoint(X:Number, Y:Number, PerPixel:Boolean=false):Boolean{ var tx:Number = x; var ty:Number = y; if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){ tx = (tx - Math.floor((FlxG.scroll.x * scrollFactor.x))); ty = (ty - Math.floor((FlxG.scroll.y * scrollFactor.y))); }; if ((((((((X <= tx)) || ((X >= (tx + width))))) || ((Y <= ty)))) || ((Y >= (ty + height))))){ return (false); }; return (true); } public function render():void{ } public function kill():void{ exists = false; dead = true; } protected function getScreenXY(p:Point):void{ p.x = (Math.floor(x) + Math.floor((FlxG.scroll.x * scrollFactor.x))); p.y = (Math.floor(y) + Math.floor((FlxG.scroll.y * scrollFactor.y))); } public function hitFloor(spr=null):Boolean{ return (true); } public function hitCeiling():Boolean{ return (true); } public function overlaps(Core:FlxCore):Boolean{ var tx:Number = x; var ty:Number = y; if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){ tx = (tx - Math.floor((FlxG.scroll.x * scrollFactor.x))); ty = (ty - Math.floor((FlxG.scroll.y * scrollFactor.y))); }; var cx:Number = Core.x; var cy:Number = Core.y; if (((!((Core.scrollFactor.x == 1))) || (!((Core.scrollFactor.y == 1))))){ cx = (cx - Math.floor((FlxG.scroll.x * Core.scrollFactor.x))); cy = (cy - Math.floor((FlxG.scroll.y * Core.scrollFactor.y))); }; if ((((((((cx <= (tx - Core.width))) || ((cx >= (tx + width))))) || ((cy <= (ty - Core.height))))) || ((cy >= (ty + height))))){ return (false); }; return (true); } public function flickering():Boolean{ return ((_flickerTimer >= 0)); } 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():Boolean{ return (true); } public function collide(Spr:FlxSprite, core=null):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(core)){ 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()){ Spr.y = (y + height); }; } else { checkForMoreY = true; }; }; }; if (Spr.velocity.x < 0){ if (overlapsPoint(Spr.x, (Spr.y + (Spr.height >> 1)))){ if (Spr.hitWall()){ 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()){ 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()){ 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()){ 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()){ 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()){ 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()))){ Spr.y = (y - Spr.height); } else { if ((((((((Spr.velocity.y < 0)) && ((Spr.y > y)))) && ((Spr.y < (y + height))))) && (Spr.hitCeiling()))){ 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()))){ Spr.x = (x - Spr.width); } else { if ((((((((Spr.velocity.x < 0)) && ((Spr.x > x)))) && ((Spr.x < (x + width))))) && (Spr.hitWall()))){ 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()))){ Spr.x = (x - Spr.width); } else { if ((((((((Spr.velocity.x < 0)) && ((Spr.x > x)))) && ((Spr.x < (x + width))))) && (Spr.hitWall()))){ 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()))){ Spr.y = (y - Spr.height); } else { if ((((((((Spr.velocity.y < 0)) && ((Spr.y > y)))) && ((Spr.y < (y + height))))) && (Spr.hitCeiling()))){ 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()))){ Spr.y = (y - Spr.height); } else { if ((((((((Spr.velocity.y < 0)) && ((Spr.y > y)))) && ((Spr.y < (y + height))))) && (Spr.hitCeiling()))){ 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()))){ Spr.x = (x - Spr.width); } else { if ((((((((Spr.velocity.x < 0)) && ((Spr.x > x)))) && ((Spr.x < (x + width))))) && (Spr.hitWall()))){ Spr.x = (x + width); }; }; }; }; }; }; } } }//package com.adamatomic.flixel
Section 11
//FlxEmitter (com.adamatomic.flixel.FlxEmitter) package com.adamatomic.flixel { 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, Parent:FlxLayer=null){ 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++; }; i = 0; while (i < _sprites.length) { if (Parent == null){ FlxG.state.add(_sprites[i]); } else { Parent.add(_sprites[i]); }; i++; }; } else { _sprites = Sprites; }; kill(); if (_delay > 0){ reset(); }; } public function emit():void{ var s:FlxSprite = _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; }; s.onEmit(); } 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 12
//FlxG (com.adamatomic.flixel.FlxG) package com.adamatomic.flixel { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.media.*; import flash.net.*; public class FlxG { public static const LEFT:uint = 0; public static const A:uint = 4; public static const B:uint = 5; public static const MOUSE:uint = 6; public static const UP:uint = 2; public static const DOWN:uint = 3; public static const RIGHT:uint = 1; public static var clevel:uint = 0; private static var _switchState:Function; public static var kMouse:Boolean; public static var followMax:Point; public static var extra:Boolean = false; public static var kLeft:Boolean; public static var lvl1coins:Boolean = false; public static var kong; public static var KEYCONTROL:FlxKeyControl = new FlxKeyControl(); public static var scores:FlxArray; public static var height:uint; private static var _music:Sound; public static var kB:Boolean; private static var _volume:Number; public static var kA:Boolean; public static var buffer:BitmapData; public static var mochiOn:Boolean = true; public static var gameComplete:Boolean = false; public static var arcl:uint = 1; private static var _fade:Function; public static var kUp:Boolean; private static var _musicPosition:Number; public static var kRight:Boolean; private static var _muted:uint; public static var levels:FlxArray; public static var autolv:uint = 1; public static var elapsed:Number; private static var _cache:Object; public static var level:uint; public static var state:FlxState; public static var score:uint; private static var _log:Function; public static var adsA:Boolean = false; private static var _scrollTarget:Point; public static var mouse:Point; public static var followTarget:FlxCore; public static var kDown:Boolean; public static var lvl2coins:Boolean = false; public static var followLead:Point; public static var money:uint = 0; public static var width:uint; public static var quitar:Boolean = false; public static var scroll:Point; public static var lmoney:uint = 0; public static var followLerp:Number; private static var _setCursor:Function; private static var _quake:Function; public static var followMin:Point; public static var jumpR:Boolean = false; private static var _musicVolume:Number; public static var FlxSave:SharedObject = SharedObject.getLocal("robinffg"); public static var lifel:uint = 1; private static var _flash:Function; public static var jetl:uint = 1; private static var _masterVolume:Number; private static var _musicChannel:SoundChannel; public static var jumpl:uint = 1; public function FlxG(){ super(); } 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))))); } public static function setUnknownCallback(callBackFunction:Function):void{ KEYCONTROL.unknownKeyCallback = callBackFunction; } public static function getVolume():Number{ return (_volume); } public static function collideArrays(Cores:FlxArray, Sprites:FlxArray):void{ var i:uint; var j:uint; var core:FlxCore; var sprite:FlxSprite; if (Cores === Sprites){ i = 0; while (i < Cores.length) { core = Cores[i]; if ((((((core == null)) || (!(core.exists)))) || (core.dead))){ } else { j = (i + 1); while (j < Sprites.length) { sprite = Sprites[j]; if ((((((sprite == null)) || (!(sprite.exists)))) || (sprite.dead))){ } else { core.collide(sprite); }; j++; }; }; i++; }; } else { i = 0; while (i < Cores.length) { core = Cores[i]; if ((((((core == null)) || (!(core.exists)))) || (core.dead))){ } else { j = 0; while (j < Sprites.length) { sprite = Sprites[j]; if ((((((((core === sprite)) || ((sprite == null)))) || (!(sprite.exists)))) || (sprite.dead))){ } else { core.collide(sprite); }; j++; }; }; i++; }; }; } public static function setVolume(Volume:Number):void{ _volume = Volume; adjustMusicVolume(); } 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 AddKey(keyCode:int, keyName:String):void{ KEYCONTROL.AddKey(keyCode, keyName); } public static function getAngle(X:Number, Y:Number):Number{ return (((Math.atan2(Y, X) * 180) / Math.PI)); } 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 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(); FlxG.levels = new FlxArray(); FlxG.scores = new FlxArray(); var i = 1; i = 1; while (i < 17) { FlxG.scores[i] = 0; i++; }; i = 1; while (i < 17) { FlxG.levels[i] = false; i++; }; level = 0; score = 0; } public static function stopMusic():void{ _musicPosition = 0; if (_musicChannel != null){ _musicChannel.stop(); _musicChannel = null; }; } public static function unsetUnknownCallback():void{ KEYCONTROL.unknownKeyCallback = null; } public static function pressed(KeyName:String):Boolean{ return (KEYCONTROL.Pressed(KeyName)); } public static function justReleased(KeyName:String):Boolean{ return (KEYCONTROL.JustReleased(KeyName)); } 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 pressKey(k:int):void{ KEYCONTROL.PressKey(k); } public static function setCursor(CursorGraphic:Class):void{ _setCursor(CursorGraphic); } public static function overlapArray(Array:FlxArray, Core:FlxCore, Collide:Function):void{ var c:FlxCore; if ((((((Core == null)) || (!(Core.exists)))) || (Core.dead))){ return; }; var i:uint; while (i < Array.length) { c = Array[i]; if ((((((((c === Core)) || ((c == null)))) || (!(c.exists)))) || (c.dead))){ } else { if (c.overlaps(Core)){ Collide(c, Core); }; }; i++; }; } public static function log(Data:String):void{ _log(Data); } static function updateKeys():void{ KEYCONTROL.UpdateKeys(); mouse.x = (state.mouseX - scroll.x); mouse.y = (state.mouseY - scroll.y); } 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 overlapArrays(Array1:FlxArray, Array2:FlxArray, Collide:Function):void{ var i:uint; var j:uint; var core1:FlxCore; var core2:FlxCore; if (Array1 === Array2){ i = 0; while (i < Array1.length) { core1 = Array1[i]; if ((((((core1 == null)) || (!(core1.exists)))) || (core1.dead))){ } else { j = (i + 1); while (j < Array2.length) { core2 = Array2[j]; if ((((((core2 == null)) || (!(core2.exists)))) || (core2.dead))){ } else { if (core1.overlaps(core2)){ Collide(core1, core2); }; }; j++; }; }; i++; }; } else { i = 0; while (i < Array1.length) { core1 = Array1[i]; if ((((((core1 == null)) || (!(core1.exists)))) || (core1.dead))){ } else { j = 0; while (j < Array2.length) { core2 = Array2[j]; if ((((((((core1 === core2)) || ((core2 == null)))) || (!(core2.exists)))) || (core2.dead))){ } else { if (core1.overlaps(core2)){ Collide(core1, core2); }; }; j++; }; }; i++; }; }; } public static function quake(Intensity:Number, Duration:Number=0.5):void{ _quake(Intensity, Duration); } public static function getMusicVolume():Number{ return (_musicVolume); } public static function ChangeKey(keyName:String, keyCode:int):void{ KEYCONTROL.ChangeKey(keyName, keyCode); } public static function releaseKey(k:int):void{ KEYCONTROL.ReleaseKey(k); } static function unfollow():void{ followTarget = null; followLead = null; followLerp = 1; followMin = null; followMax = null; scroll = new Point(); _scrollTarget = new Point(); } 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 getMute():Boolean{ if (_muted == 0){ return (true); }; return (false); } public static function followAdjust(LeadX:Number=0, LeadY:Number=0):void{ followLead = new Point(LeadX, LeadY); } public static function setMute(SoundOff:Boolean):void{ if (SoundOff){ _muted = 0; } else { _muted = 1; }; adjustMusicVolume(); } public static function justPressed(KeyName:String):Boolean{ return (KEYCONTROL.JustPressed(KeyName)); } 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, Force:Boolean=false):void{ _fade(Color, Duration, FadeComplete, Force); } public static function collideArray(Cores:FlxArray, Sprite:FlxSprite):void{ var core:FlxCore; if ((((((Sprite == null)) || (!(Sprite.exists)))) || (Sprite.dead))){ return; }; var i:uint; while (i < Cores.length) { core = Cores[i]; if ((((((((core === Sprite)) || ((core == null)))) || (!(core.exists)))) || (core.dead))){ } else { core.collide(Sprite, core); }; i++; }; } 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 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 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 setMusicVolume(Volume:Number):void{ _musicVolume = Volume; adjustMusicVolume(); } public static function resetKeys():void{ KEYCONTROL.ResetKeys(); } private static function loopMusic(event:Event=null):void{ if (_musicChannel == null){ return; }; _musicChannel.removeEventListener(Event.SOUND_COMPLETE, loopMusic); _musicChannel = null; playMusic(); } public static function setMusic(Music:Class, Volume:Number=1, Autoplay:Boolean=true):void{ stopMusic(); _music = new (Music); _musicVolume = Volume; if (Autoplay){ playMusic(); }; } public static function flash(Color:uint, Duration:Number=1, FlashComplete:Function=null, Force:Boolean=false):void{ _flash(Color, Duration, FlashComplete, Force); } public static function collideArray2(Core:FlxCore, Sprites:FlxArray):void{ var sprite:FlxSprite; if ((((((Core == null)) || (!(Core.exists)))) || (Core.dead))){ return; }; var i:uint; while (i < Sprites.length) { sprite = Sprites[i]; if ((((((((Core === sprite)) || ((sprite == null)))) || (!(sprite.exists)))) || (sprite.dead))){ } else { Core.collide(sprite); }; i++; }; } } }//package com.adamatomic.flixel
Section 13
//FlxGame (com.adamatomic.flixel.FlxGame) package com.adamatomic.flixel { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.net.*; import flash.ui.*; public class FlxGame extends Sprite { private const MAX_CONSOLE_LINES:uint = 0x0100; private const MAX_ELAPSED:Number = 0.0333; private var _flash:Bitmap; private var _bmpFront:Bitmap; private var ImgKeyC:Class; private var count:uint;// = 0 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 _flashHelper:Number; private var _logoFade:Bitmap; private var _help:Array; private var _consoleYT:Number; private var pLogo:Bitmap; 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 _quakeIntensity:Number; private var _quakeTimer:Number; private var _focusPopup:Sprite; private var pLogo2; private var _flashComplete:Function; private var _fade:Bitmap; private var _fc:uint; private var _buffer:Sprite; private var _poweredBy:Bitmap; private var _consoleText:TextField; private var _fSound:Class; private var _soundTray:Sprite; private var _frame:Class; private var _cursor:Bitmap; private var ImgKeyPlus:Class; private var ImgPoweredBy:Class; private var _soundTrayTimer:Number; private var SndFlixel:Class; private var _gy:int; private var _fpsUpdate:Boolean; private var _gx:int; private var _curState:FlxState; private var ImgKeysArrows:Class; private var _showLogo:Boolean; private var _curFPS:uint; private var _created:Boolean; private var _focusField:TextField; private var _consoleFPS:TextField; private var _fadeComplete:Function; private var _iState:Class; private var _bmpBack:Bitmap; private var _consoleLines:Array; private var pakoL:Class; private var _logoTimer:Number; private var _quakeLength:Number; private var mLoader:Loader; 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 _z:uint; private var spon:Class; private var _bgc:Number; public static var _paused:Boolean; public function FlxGame(GameSizeX:uint, GameSizeY:uint, InitialState:Class, Zoom:uint=2, BGColor:Number=4278190080, ShowFlixelLogo:Boolean=true, 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; pakoL = FlxGame_pakoL; spon = FlxGame_spon; 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; }; _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"); _showLogo = ShowFlixelLogo; FlxG.AddKey(38, "Up"); FlxG.AddKey(40, "Down"); FlxG.AddKey(37, "Left"); FlxG.AddKey(39, "Right"); FlxG.AddKey(32, "aKey"); FlxG.AddKey(88, "bKey"); } private function comprobar(e:Event):void{ count++; if (count >= 250){ pLogo2.removeEventListener(MouseEvent.CLICK, onSponsor); removeChild(pLogo2); pLogo2 = null; removeEventListener(Event.ENTER_FRAME, comprobar); }; } private function onFocus(event:Event=null):void{ Mouse.hide(); _focusPopup.visible = false; FlxG.resetKeys(); _paused = false; FlxG.playMusic(); } public function pause(p:Boolean):void{ if (((p) && ((_paused == false)))){ if (((!((x == 0))) || (!((y == 0))))){ x = 0; y = 0; }; Mouse.show(); _focusPopup.visible = true; _paused = true; FlxG.pauseMusic(); }; if ((((p == false)) && (_paused))){ 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); } private function onSponsor(e:MouseEvent):void{ navigateToURL(new URLRequest("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=robin_mercenary_2&utm_source=ingame&utm_content=ingame"), "_BLANK"); } 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, Force:Boolean=false):void{ if (Color == 0){ _fade.visible = false; return; }; if (((!(Force)) && (_fade.visible))){ 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; } 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 onMouseUp(event:MouseEvent):void{ FlxG.kMouse = false; } private function onKeyUp(event:KeyboardEvent):void{ var code:String = String.fromCharCode(event.charCode); FlxG.releaseKey(event.keyCode); if ((((code == "m")) || ((code == "M")))){ 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 == "p")) || ((code == "P")))){ if (_paused){ pause(false); } else { pause(true); }; } else { if ((((code == "q")) || ((code == "Q")))){ if (FlxGame._paused){ FlxG.quitar = true; }; } else { if ((((((((code == "0")) || ((code == "!")))) || ((code == "0")))) || ((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 text:TextField; 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){ _flashHelper = (_flashHelper - (_elapsed / _flashDelay)); _flash.alpha = _flashHelper; if (_flash.alpha <= 0){ _flash.visible = false; if (_flashComplete != null){ _flashComplete(); }; }; }; if (((_fade.visible) && (!((_fade.alpha == 1))))){ _fadeHelper = (_fadeHelper + (_elapsed / _fadeDelay)); _fade.alpha = _fadeHelper; if (_fade.alpha >= 1){ _fade.alpha = 1; if (_fadeComplete != null){ _fadeComplete(); }; }; }; if (_flipped){ _bmpFront.bitmapData.fillRect(new Rectangle(0, 0, _bmpFront.width, _bmpFront.height), _bgc); FlxG.buffer = _bmpFront.bitmapData; } else { _bmpBack.bitmapData.fillRect(new Rectangle(0, 0, _bmpBack.width, _bmpBack.height), _bgc); FlxG.buffer = _bmpBack.bitmapData; }; _curState.render(); _bmpBack.visible = !((_bmpFront.visible = _flipped)); _flipped = !(_flipped); }; } else { if (_created){ if (!_showLogo){ _logoComplete = true; switchState(_iState); } else { if (_f == null){ _f = new FlxArray(); scale = 1; if (FlxG.height > 200){ scale = 2; }; pixelSize = (32 * scale); top = (((FlxG.height * _z) / 2) - (pixelSize * 2)); left = (((FlxG.width * _z) / 2) - pixelSize); pLogo = new (pakoL); pLogo.x = ((root.stage.width / 2) - (pLogo.width / 2)); pLogo.y = (((root.stage.height / 2) - (pLogo.height / 2)) - 250); addChild(pLogo); Mouse.show(); pLogo2 = new spon(); addChild(pLogo2); pLogo2.x = -80; addEventListener(Event.ENTER_FRAME, comprobar); pLogo2.addEventListener(MouseEvent.CLICK, onSponsor); _logoFade = (addChild(new Bitmap(new BitmapData((FlxG.width * _z), (FlxG.height * _z), true, 4278190080))) as Bitmap); _logoFade.x = (_gx * _z); _logoFade.y = (_gy * _z); }; _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 > 2){ removeChild(pLogo); Mouse.hide(); 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.25"); 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); text = new TextField(); 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 = "Press Q and then P to Exit or P to UnPause"; text.x = 25; text.y = 45; _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); stage.addEventListener(Event.DEACTIVATE, onFocusLost); stage.addEventListener(Event.ACTIVATE, onFocus); 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; } private function onKeyDown(event:KeyboardEvent):void{ var code:String = String.fromCharCode(event.charCode); FlxG.pressKey(event.keyCode); } 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, FlashComplete:Function=null, Force:Boolean=false):void{ if (Color == 0){ _flash.visible = false; return; }; if (((!(Force)) && (_flash.visible))){ return; }; _flash.bitmapData.fillRect(new Rectangle(0, 0, _flash.width, _flash.height), Color); _flashDelay = Duration; _flashComplete = FlashComplete; _flashHelper = 1; _flash.alpha = 1; _flash.visible = true; } private function onFocusLost(event:Event=null):void{ if (((!((x == 0))) || (!((y == 0))))){ x = 0; y = 0; }; Mouse.show(); _focusPopup.visible = true; _paused = true; FlxG.pauseMusic(); } } }//package com.adamatomic.flixel
Section 14
//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 15
//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 16
//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 17
//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 18
//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 19
//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 20
//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 21
//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 22
//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 23
//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 24
//FlxGame_pakoL (com.adamatomic.flixel.FlxGame_pakoL) package com.adamatomic.flixel { import mx.core.*; public class FlxGame_pakoL extends BitmapAsset { } }//package com.adamatomic.flixel
Section 25
//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 26
//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 27
//FlxGame_spon (com.adamatomic.flixel.FlxGame_spon) package com.adamatomic.flixel { import mx.core.*; import flash.utils.*; public class FlxGame_spon extends MovieClipLoaderAsset { public var dataClass:Class; private static var bytes:ByteArray = null; public function FlxGame_spon(){ dataClass = FlxGame_spon_dataClass; super(); initialWidth = (16000 / 20); initialHeight = (10000 / 20); } override public function get movieClipData():ByteArray{ if (bytes == null){ bytes = ByteArray(new dataClass()); }; return (bytes); } } }//package com.adamatomic.flixel
Section 28
//FlxGame_spon_dataClass (com.adamatomic.flixel.FlxGame_spon_dataClass) package com.adamatomic.flixel { import mx.core.*; public class FlxGame_spon_dataClass extends ByteArrayAsset { } }//package com.adamatomic.flixel
Section 29
//FlxKey (com.adamatomic.flixel.FlxKey) package com.adamatomic.flixel { public class FlxKey { public var kOldValue:int; public var kName:String; public var kPressed:int; public var kCode:int; public function FlxKey(code:int, name:String){ super(); kCode = code; kName = name; } } }//package com.adamatomic.flixel
Section 30
//FlxKeyControl (com.adamatomic.flixel.FlxKeyControl) package com.adamatomic.flixel { public class FlxKeyControl { public var unknownKeyCallback:Function;// = null public var KEYS:Array; public function FlxKeyControl(){ KEYS = new Array(); super(); } public function Pressed(name:String):Boolean{ var k:FlxKey; var i:uint; while (i < KEYS.length) { k = (KEYS[i] as FlxKey); if (k.kName == name){ return ((k.kPressed > 0)); }; i++; }; return (false); } public function ResetKeys():void{ var k:FlxKey; var i:uint; while (i < KEYS.length) { k = (KEYS[i] as FlxKey); k.kPressed = 0; i++; }; } public function JustReleased(name:String):Boolean{ var k:FlxKey; var i:uint; while (i < KEYS.length) { k = (KEYS[i] as FlxKey); if (k.kName == name){ return ((k.kPressed == -1)); }; i++; }; return (false); } public function ChangeKey(keyName:String, keyCode:int):void{ var k:FlxKey; var i:uint; while (i < KEYS.length) { k = (KEYS[i] as FlxKey); if (k.kName == keyName){ k.kCode = keyCode; }; i++; }; } public function JustPressed(name:String):Boolean{ var k:FlxKey; var i:uint; while (i < KEYS.length) { k = (KEYS[i] as FlxKey); if (k.kName == name){ return ((k.kPressed == 2)); }; i++; }; return (false); } public function ReleaseKey(code:int):void{ var k:FlxKey; var i:uint; while (i < KEYS.length) { k = (KEYS[i] as FlxKey); if (k.kCode == code){ if (k.kPressed > 0){ k.kPressed = -1; } else { k.kPressed = 0; }; }; i++; }; } public function PressKey(code:int):void{ var k:FlxKey; var notFound:Boolean; var i:uint; while (i < KEYS.length) { k = (KEYS[i] as FlxKey); if (k.kCode == code){ notFound = false; if (k.kPressed > 0){ k.kPressed = 1; } else { k.kPressed = 2; }; }; i++; }; if (((!((unknownKeyCallback == null))) && (notFound))){ unknownKeyCallback(code); }; } public function UpdateKeys():void{ var k:FlxKey; var i:uint; while (i < KEYS.length) { k = (KEYS[i] as FlxKey); if ((((k.kOldValue == -1)) && ((k.kPressed == -1)))){ k.kPressed = 0; } else { if ((((k.kOldValue == 2)) && ((k.kPressed == 2)))){ k.kPressed = 1; }; }; k.kOldValue = k.kPressed; i++; }; } public function AddKey(keyCode:int, keyName:String):void{ KEYS.push(new FlxKey(keyCode, keyName)); } } }//package com.adamatomic.flixel
Section 31
//FlxKong (com.adamatomic.flixel.FlxKong) package com.adamatomic.flixel { import flash.events.*; import flash.display.*; import com.kongregate.as3.client.events.*; import com.kongregate.as3.client.*; public class FlxKong extends Sprite { public var API; private var kongregate:KongregateAPI; public function FlxKong(){ super(); } public function init():void{ kongregate = new KongregateAPI(); this.addChild(kongregate); kongregate.addEventListener(KongregateEvent.COMPLETE, myMethod); } private function myMethod(e:KongregateEvent):void{ API = kongregate; API.services.connect(); } private function APILoaded(event:Event):void{ API = event.target.content; API.services.connect(); FlxG.log(API.services); FlxG.log(API.user); FlxG.log(API.scores); FlxG.log(API.stats); } } }//package com.adamatomic.flixel
Section 32
//FlxLayer (com.adamatomic.flixel.FlxLayer) package com.adamatomic.flixel { public class FlxLayer extends FlxCore { private var _children:FlxArray; public function FlxLayer(){ super(); _children = new FlxArray(); } public function add(Core:FlxCore):FlxCore{ return ((_children.add(Core) as FlxCore)); } override public function render():void{ super.render(); var i:uint; while (i < _children.length) { if (((((!((_children[i] == null))) && (_children[i].exists))) && (_children[i].visible))){ _children[i].render(); }; i++; }; } override public function update():void{ super.update(); var i:uint; while (i < _children.length) { if (((((!((_children[i] == null))) && (_children[i].exists))) && (_children[i].active))){ _children[i].update(); }; i++; }; } public function destroy():void{ _children.clear(); } } }//package com.adamatomic.flixel
Section 33
//FlxSprite (com.adamatomic.flixel.FlxSprite) package com.adamatomic.flixel { import flash.display.*; import flash.geom.*; import com.adamatomic.flixel.data.*; public class FlxSprite extends FlxCore { public var acceleration:Point; public var finished:Boolean; public var angularAcceleration:Number; private var _alpha:Number; private var _animations:FlxArray; public var offset:Point; private var _callback:Function; protected var _curAnim:FlxAnim; public var drag:Point; public var angularDrag:Number; private var _pZero:Point; private var _flipped:uint; public var pixels:BitmapData; public var scale:Point; 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 health:Number; private var _bh:uint; private var _p:Point; private var _r:Rectangle; private var _bw:uint; private var _frameTimer:Number; private var _facing:Boolean; protected var _curFrame:uint; public static const RIGHT:Boolean = true; public static const LEFT:Boolean = false; 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; scale = new Point(1, 1); finished = false; _facing = true; _animations = new FlxArray(); if (Reverse){ _flipped = (pixels.width >> 1); } else { _flipped = 0; }; _curAnim = null; _curFrame = 0; _frameTimer = 0; _p = new Point(x, y); _pZero = new Point(); _r = new Rectangle(0, 0, _bw, _bh); _pixels = new BitmapData(width, height); _pixels.copyPixels(pixels, _r, _pZero); health = 1; alpha = 1; _callback = null; } override protected function getScreenXY(P:Point):void{ P.x = (Math.floor((x - offset.x)) + Math.floor((FlxG.scroll.x * scrollFactor.x))); P.y = (Math.floor((y - offset.y)) + 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))) || (!((scale.x == 1))))) || (!((scale.y == 1))))){ mtx = new Matrix(); mtx.translate(-((_bw >> 1)), -((_bh >> 1))); mtx.scale(scale.x, scale.y); if (angle != 0){ mtx.rotate(((Math.PI * 2) * (angle / 360))); }; mtx.translate((_p.x + (_bw >> 1)), (_p.y + (_bh >> 1))); FlxG.buffer.draw(_pixels, mtx); return; }; FlxG.buffer.copyPixels(_pixels, _r, _p, null, null, true); } public function randomFrame():void{ _pixels.copyPixels(pixels, new Rectangle((Math.floor((Math.random() * (pixels.width / _bw))) * _bw), 0, _bw, _bh), _pZero); } private function calcFrame():void{ var rx:uint; if (_curAnim == null){ _pixels.copyPixels(pixels, _r, _pZero); } else { rx = (_curAnim.frames[_curFrame] * _bw); if (((!(_facing)) && ((_flipped > 0)))){ rx = (((_flipped << 1) - rx) - _bw); }; _pixels.copyPixels(pixels, new Rectangle(rx, 0, _bw, _bh), _pZero); }; if (_alpha != 1){ _pixels.colorTransform(_r, new ColorTransform(1, 1, 1, _alpha)); }; if (_callback != null){ _callback(_curAnim.name, _curFrame, _curAnim.frames[_curFrame]); }; } override public function hitCeiling():Boolean{ velocity.y = 0; return (true); } public function play(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 hitFloor(spr=null):Boolean{ velocity.y = 0; return (true); } 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 = _pZero; }; 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 set alpha(Alpha:Number):void{ if (Alpha > 1){ Alpha = 1; }; if (Alpha < 0){ Alpha = 0; }; _alpha = Alpha; calcFrame(); } public function addAnimationCallback(AnimationCallback:Function):void{ _callback = AnimationCallback; } public function onEmit():void{ } public function set facing(Direction:Boolean):void{ var c = !((_facing == Direction)); _facing = Direction; if (c){ calcFrame(); }; } public function specificFrame(Frame:uint):void{ _pixels.copyPixels(pixels, new Rectangle((Frame * _bw), 0, _bw, _bh), _pZero); } public function get facing():Boolean{ return (_facing); } public function addAnimation(Name:String, Frames:Array, FrameRate:Number=0, Looped:Boolean=true):void{ _animations.add(new FlxAnim(Name, Frames, FrameRate, Looped)); } public function get alpha():Number{ return (_alpha); } override public function overlapsPoint(X:Number, Y:Number, PerPixel:Boolean=false):Boolean{ var tx:Number = x; var ty:Number = y; if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){ tx = (tx - Math.floor((FlxG.scroll.x * scrollFactor.x))); ty = (ty - Math.floor((FlxG.scroll.y * scrollFactor.y))); }; if (PerPixel){ return (_pixels.hitTest(new Point(0, 0), 0xFF, new Point((X - tx), (Y - ty)))); }; if ((((((((X <= tx)) || ((X >= (tx + width))))) || ((Y <= ty)))) || ((Y >= (ty + height))))){ return (false); }; return (true); } override public function hitWall():Boolean{ velocity.x = 0; return (true); } } }//package com.adamatomic.flixel
Section 34
//FlxState (com.adamatomic.flixel.FlxState) package com.adamatomic.flixel { import flash.display.*; public class FlxState extends Sprite { private var _layer:FlxLayer; public function FlxState(){ super(); _layer = new FlxLayer(); FlxG.state = this; } public function add(Core:FlxCore):FlxCore{ return (_layer.add(Core)); } public function render():void{ _layer.render(); } public function update():void{ _layer.update(); } public function destroy():void{ _layer.destroy(); } } }//package com.adamatomic.flixel
Section 35
//FlxText (com.adamatomic.flixel.FlxText) package com.adamatomic.flixel { 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 36
//FlxTilemap (com.adamatomic.flixel.FlxTilemap) package com.adamatomic.flixel { import flash.display.*; import flash.geom.*; public class FlxTilemap extends FlxCore { private var _screenRows:uint; private var _ci:uint; private var _data:FlxArray; private var _pixels:BitmapData; private var _block:FlxBlock; public var thefat; private var _rects:FlxArray; private var _screenCols:uint; private var _tileSize:uint; private var _p:Point; private var heightInTiles:uint; private var widthInTiles:uint; public function FlxTilemap(MapData:String, TileGraphic:Class, CollisionIndex:uint=1, DrawIndex:uint=1, padre=null, valorc:int=5){ var c:uint; var cols:Array; super(); thefat = padre; _ci = CollisionIndex; widthInTiles = 0; heightInTiles = 0; _data = new FlxArray(); var rows:Array = MapData.split("\n"); heightInTiles = rows.length; var r:uint; while (r < heightInTiles) { cols = rows[r].split(","); if (cols.length <= 1){ heightInTiles--; } else { if (widthInTiles == 0){ widthInTiles = cols.length; }; c = 0; while (c < widthInTiles) { _data.push(uint(cols[c])); c++; }; }; r++; }; _pixels = FlxG.addBitmap(TileGraphic); _rects = new FlxArray(); _p = new Point(); _tileSize = _pixels.height; width = (widthInTiles * _tileSize); height = (heightInTiles * _tileSize); var numTiles:uint = (widthInTiles * heightInTiles); var i:uint; while (i < numTiles) { if (_data[i] >= DrawIndex){ _rects.push(new Rectangle((_tileSize * _data[i]), 0, _tileSize, _tileSize)); } else { _rects.push(null); }; i++; }; _block = new FlxBlock(0, 0, _tileSize, _tileSize, null); _screenRows = (Math.ceil((FlxG.height / _tileSize)) + 1); if (_screenRows > heightInTiles){ _screenRows = heightInTiles; }; _screenCols = (Math.ceil((FlxG.width / _tileSize)) + 1); if (_screenCols > widthInTiles){ _screenCols = widthInTiles; }; var ncoins:int; trace(((widthInTiles + "_") + heightInTiles)); r = 0; while (r < heightInTiles) { c = 0; while (c < widthInTiles) { if (_data[((r * widthInTiles) + c)] == 7){ thefat.mkcoin(c, r, valorc); ncoins++; }; if ((((_data[((r * widthInTiles) + c)] > 7)) && ((_data[((r * widthInTiles) + c)] < 19)))){ thefat.mkenemi(c, r, _data[((r * widthInTiles) + c)]); }; if (_data[((r * widthInTiles) + c)] == 19){ thefat.mkblok(c, r, valorc); }; c++; }; r++; }; trace(("Monedas: " + ncoins)); } override public function render():void{ var c:uint; var cri:uint; super.render(); getScreenXY(_p); var tx:int = Math.floor((-(_p.x) / _tileSize)); var ty:int = Math.floor((-(_p.y) / _tileSize)); if (tx < 0){ tx = 0; }; if (tx > (widthInTiles - _screenCols)){ tx = (widthInTiles - _screenCols); }; if (ty < 0){ ty = 0; }; if (ty > (heightInTiles - _screenRows)){ ty = (heightInTiles - _screenRows); }; var ri:int = ((ty * widthInTiles) + tx); _p.x = (_p.x + (tx * _tileSize)); _p.y = (_p.y + (ty * _tileSize)); var opx:int = _p.x; var r:uint; while (r < _screenRows) { cri = ri; c = 0; while (c < _screenCols) { if (_rects[cri] != null){ FlxG.buffer.copyPixels(_pixels, _rects[cri], _p, null, null, true); }; cri++; _p.x = (_p.x + _tileSize); c++; }; ri = (ri + widthInTiles); _p.x = opx; _p.y = (_p.y + _tileSize); r++; }; } override public function collide(Spr:FlxSprite, core=null):void{ var c:uint; var ix:uint = Math.floor(((Spr.x - x) / _tileSize)); var iy:uint = Math.floor(((Spr.y - y) / _tileSize)); var iw:uint = (Math.ceil((Spr.width / _tileSize)) + 1); var ih:uint = (Math.ceil((Spr.height / _tileSize)) + 1); var r:uint; while (r < ih) { if ((((r < 0)) || ((r >= heightInTiles)))){ } else { c = 0; while (c < iw) { if ((((c < 0)) || ((c >= widthInTiles)))){ } else { if (_data[((((iy + r) * widthInTiles) + ix) + c)] >= _ci){ _block.x = (x + ((ix + c) * _tileSize)); _block.y = (y + ((iy + r) * _tileSize)); _block.collide(Spr); }; }; c++; }; }; r++; }; } } }//package com.adamatomic.flixel
Section 37
//Bot (com.adamatomic.Mode.Bot) package com.adamatomic.Mode { import flash.geom.*; import com.adamatomic.flixel.*; public class Bot extends FlxSprite { private var _max_health:int;// = 10 private var _timer:Number; private var _padre; private var SndHit:Class; private var ImgBot2:Class; private var ImgBot3:Class; private var ImgBot4:Class; private var _gibs:FlxEmitter; private var _tipo:int; private var SndJet:Class; private var SndExplode:Class; private var _jets:FlxEmitter; private var bvida; private var _b:FlxArray; private var ImgBot:Class; private var laclase:Class; private var _p:Player; private var _shotClock:Number; private var ImgGibs:Class; private var ImgJet:Class; private static var _cb:uint = 0; public function Bot(xPos:int, yPos:int, Bullets:FlxArray, ThePlayer:Player, par, tip:int=1){ ImgBot = Bot_ImgBot; ImgBot2 = Bot_ImgBot2; ImgBot3 = Bot_ImgBot3; ImgBot4 = Bot_ImgBot4; ImgGibs = Bot_ImgGibs; ImgJet = Bot_ImgJet; SndExplode = Bot_SndExplode; SndHit = Bot_SndHit; SndJet = Bot_SndJet; width = 12; height = 12; if (tip == 1){ laclase = ImgBot; health = 2; } else { if (tip == 2){ laclase = ImgBot2; health = 15; } else { if (tip == 3){ laclase = ImgBot3; health = 25; } else { if (tip == 4){ laclase = ImgBot4; health = 300; bvida = par.add(new FlxSprite(null, 0, 2, false, false, 20, 2, 4291761172)); width = 24; height = 24; }; }; }; }; _max_health = health; super(laclase, xPos, yPos, true); _p = ThePlayer; _b = Bullets; _tipo = tip; _padre = par; offset.x = 2; offset.y = 2; maxAngular = 120; angularDrag = 400; maxThrust = 100; drag.x = 40; drag.y = 40; addAnimation("idle", [0]); addAnimation("dead", [1, 2, 3, 4, 5], 15, false); _gibs = (FlxG.state.add(new FlxEmitter(0, 0, 0, 0, null, -1.5, -150, 150, -200, 0, -720, 720, 400, 0, ImgGibs, 20, true)) as FlxEmitter); _jets = (FlxG.state.add(new FlxEmitter(0, 0, 0, 0, null, 0.01, 0, 0, 0, 0, 0, 0, 0, 0, ImgJet, 15)) as FlxEmitter); reset(x, y); } public function reset(X:Number, Y:Number):void{ exists = true; dead = false; visible = true; active = true; x = X; y = Y; thrust = 0; velocity.x = 0; velocity.y = 0; angle = ((Math.random() * 360) - 180); health = _max_health; _timer = 0; _shotClock = 0; play("idle"); _jets.kill(); _padre._numbots++; } override public function update():void{ var v:Point; var os:Number; if (dead){ if (_tipo == 4){ bvida.scale.x = 0; }; if (finished){ exists = false; } else { super.update(); }; return; }; if (_tipo == 4){ bvida.x = x; bvida.y = (y - 3); bvida.scale.x = (health / _max_health); }; var ot:Number = _timer; if ((((_timer == 0)) && (onScreen()))){ FlxG.play(SndJet); }; _timer = (_timer + FlxG.elapsed); if ((((ot < 4)) && ((_timer >= 4)))){ _jets.kill(); }; var dx:Number = (x - _p.x); var dy:Number = (y - _p.y); var da:Number = FlxG.getAngle(dx, dy); if (da < 0){ da = (da + 360); }; var ac:Number = angle; if (ac < 0){ ac = (ac + 360); }; if (da < angle){ angularAcceleration = -(angularDrag); } else { if (da > angle){ angularAcceleration = angularDrag; } else { angularAcceleration = 0; }; }; thrust = 0; if (_timer > 6){ _timer = 0; } else { if (_timer < 4){ if (!_jets.active){ _jets.reset(); }; thrust = 50; _jets.x = (x + (width / 2)); _jets.y = (y + (height / 2)); v = FlxG.rotatePoint(50, 0, 0, 0, angle); _jets.maxVelocity.x = (v.x + 30); _jets.minVelocity.x = (v.x - 30); _jets.maxVelocity.y = (v.y + 30); _jets.minVelocity.y = (v.y - 30); }; }; if (onScreen()){ os = _shotClock; _shotClock = (_shotClock + FlxG.elapsed); if ((((os < 4)) && ((_shotClock >= 4)))){ _shotClock = 0; shoot(); } else { if ((((os < 3.5)) && ((_shotClock >= 3.5)))){ shoot(); } else { if ((((os < 3)) && ((_shotClock >= 3)))){ shoot(); }; }; }; }; super.update(); } override public function hurt(Damage:Number):void{ FlxG.play(SndHit); flicker(0.2); FlxG.score = (FlxG.score + 10); super.hurt(Damage); } private function shoot():void{ var ba:Point = FlxG.rotatePoint(-120, 0, 0, 0, angle); _b[_cb].shoot(((x + (width / 2)) - 2), ((y + (height / 2)) - 2), ba.x, ba.y); if (++_cb >= _b.length){ _cb = 0; }; } override public function kill():void{ if (dead){ return; }; FlxG.play(SndExplode); super.kill(); exists = true; flicker(-1); play("dead"); _jets.kill(); _gibs.x = (x + (width / 2)); _gibs.y = (y + (height / 2)); _gibs.reset(); FlxG.score = (FlxG.score + 200); _padre._numbots--; } } }//package com.adamatomic.Mode
Section 38
//Bot_ImgBot (com.adamatomic.Mode.Bot_ImgBot) package com.adamatomic.Mode { import mx.core.*; public class Bot_ImgBot extends BitmapAsset { } }//package com.adamatomic.Mode
Section 39
//Bot_ImgBot2 (com.adamatomic.Mode.Bot_ImgBot2) package com.adamatomic.Mode { import mx.core.*; public class Bot_ImgBot2 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 40
//Bot_ImgBot3 (com.adamatomic.Mode.Bot_ImgBot3) package com.adamatomic.Mode { import mx.core.*; public class Bot_ImgBot3 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 41
//Bot_ImgBot4 (com.adamatomic.Mode.Bot_ImgBot4) package com.adamatomic.Mode { import mx.core.*; public class Bot_ImgBot4 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 42
//Bot_ImgGibs (com.adamatomic.Mode.Bot_ImgGibs) package com.adamatomic.Mode { import mx.core.*; public class Bot_ImgGibs extends BitmapAsset { } }//package com.adamatomic.Mode
Section 43
//Bot_ImgJet (com.adamatomic.Mode.Bot_ImgJet) package com.adamatomic.Mode { import mx.core.*; public class Bot_ImgJet extends BitmapAsset { } }//package com.adamatomic.Mode
Section 44
//Bot_SndExplode (com.adamatomic.Mode.Bot_SndExplode) package com.adamatomic.Mode { import mx.core.*; public class Bot_SndExplode extends SoundAsset { } }//package com.adamatomic.Mode
Section 45
//Bot_SndHit (com.adamatomic.Mode.Bot_SndHit) package com.adamatomic.Mode { import mx.core.*; public class Bot_SndHit extends SoundAsset { } }//package com.adamatomic.Mode
Section 46
//Bot_SndJet (com.adamatomic.Mode.Bot_SndJet) package com.adamatomic.Mode { import mx.core.*; public class Bot_SndJet extends SoundAsset { } }//package com.adamatomic.Mode
Section 47
//BotBullet (com.adamatomic.Mode.BotBullet) package com.adamatomic.Mode { import com.adamatomic.flixel.*; public class BotBullet extends FlxSprite { private var SndHit:Class; private var ImgBullet:Class; private var SndShoot:Class; public function BotBullet(){ ImgBullet = BotBullet_ImgBullet; SndHit = BotBullet_SndHit; SndShoot = BotBullet_SndShoot; super(ImgBullet, 0, 0, true); addAnimation("idle", [0, 1], 50); addAnimation("poof", [2, 3, 4], 50, false); exists = false; } override public function update():void{ if (((dead) && (finished))){ exists = false; } else { super.update(); }; } override public function hurt(Damage:Number):void{ if (dead){ return; }; velocity.x = 0; velocity.y = 0; if (onScreen()){ FlxG.play(SndHit); }; dead = true; play("poof"); } override public function hitCeiling():Boolean{ hurt(0); return (true); } override public function hitFloor(spr=null):Boolean{ hurt(0); return (true); } override public function hitWall():Boolean{ hurt(0); return (true); } public function shoot(X:int, Y:int, VelocityX:int, VelocityY:int):void{ FlxG.play(SndShoot, 0.5); x = X; y = Y; velocity.x = VelocityX; velocity.y = VelocityY; play("idle"); dead = false; exists = true; visible = true; } } }//package com.adamatomic.Mode
Section 48
//BotBullet_ImgBullet (com.adamatomic.Mode.BotBullet_ImgBullet) package com.adamatomic.Mode { import mx.core.*; public class BotBullet_ImgBullet extends BitmapAsset { } }//package com.adamatomic.Mode
Section 49
//BotBullet_SndHit (com.adamatomic.Mode.BotBullet_SndHit) package com.adamatomic.Mode { import mx.core.*; public class BotBullet_SndHit extends SoundAsset { } }//package com.adamatomic.Mode
Section 50
//BotBullet_SndShoot (com.adamatomic.Mode.BotBullet_SndShoot) package com.adamatomic.Mode { import mx.core.*; public class BotBullet_SndShoot extends SoundAsset { } }//package com.adamatomic.Mode
Section 51
//Bullet (com.adamatomic.Mode.Bullet) package com.adamatomic.Mode { import com.adamatomic.flixel.*; public class Bullet extends FlxSprite { private var ImgBullet:Class; private var ImgBullet2:Class; private var ImgBullet3:Class; private var ImgBullet4:Class; private var ImgBullet5:Class; private var SndHit:Class; private var SndShoot1:Class; private var SndShoot2:Class; private var SndShoot3:Class; private var SndShoot4:Class; public function Bullet(){ ImgBullet = Bullet_ImgBullet; ImgBullet2 = Bullet_ImgBullet2; ImgBullet3 = Bullet_ImgBullet3; ImgBullet4 = Bullet_ImgBullet4; ImgBullet5 = Bullet_ImgBullet5; SndHit = Bullet_SndHit; SndShoot1 = Bullet_SndShoot1; SndShoot2 = Bullet_SndShoot2; SndShoot3 = Bullet_SndShoot3; SndShoot4 = Bullet_SndShoot4; super(ImgBullet, 0, 0, true); width = 6; height = 6; offset.x = 1; offset.y = 1; exists = false; addAnimation("up", [0]); addAnimation("down", [1]); addAnimation("left", [3]); addAnimation("right", [2]); addAnimation("poof", [4, 5, 6, 7], 50, false); } override public function update():void{ if (((dead) && (finished))){ exists = false; } else { super.update(); }; } override public function hurt(Damage:Number):void{ if (dead){ return; }; velocity.x = 0; velocity.y = 0; if (onScreen()){ FlxG.play(SndHit); }; dead = true; play("poof"); } public function shoot(X:int, Y:int, VelocityX:int, VelocityY:int):void{ switch (FlxG.arcl){ case 1: super.pixels = FlxG.addBitmap(ImgBullet, false); FlxG.play(SndShoot1); break; case 2: super.pixels = FlxG.addBitmap(ImgBullet2, false); FlxG.play(SndShoot2); break; case 3: super.pixels = FlxG.addBitmap(ImgBullet3, false); FlxG.play(SndShoot2); break; case 4: super.pixels = FlxG.addBitmap(ImgBullet4, false); FlxG.play(SndShoot3); break; case 5: super.pixels = FlxG.addBitmap(ImgBullet5, false); FlxG.play(SndShoot4); break; }; x = X; y = Y; velocity.x = VelocityX; velocity.y = VelocityY; if (velocity.y < 0){ play("up"); } else { if (velocity.y > 0){ play("down"); } else { if (velocity.x < 0){ play("left"); } else { if (velocity.x > 0){ play("right"); }; }; }; }; dead = false; exists = true; visible = true; } override public function hitCeiling():Boolean{ hurt(0); return (true); } override public function hitFloor(spr=null):Boolean{ hurt(0); return (true); } override public function hitWall():Boolean{ hurt(0); return (true); } } }//package com.adamatomic.Mode
Section 52
//Bullet_ImgBullet (com.adamatomic.Mode.Bullet_ImgBullet) package com.adamatomic.Mode { import mx.core.*; public class Bullet_ImgBullet extends BitmapAsset { } }//package com.adamatomic.Mode
Section 53
//Bullet_ImgBullet2 (com.adamatomic.Mode.Bullet_ImgBullet2) package com.adamatomic.Mode { import mx.core.*; public class Bullet_ImgBullet2 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 54
//Bullet_ImgBullet3 (com.adamatomic.Mode.Bullet_ImgBullet3) package com.adamatomic.Mode { import mx.core.*; public class Bullet_ImgBullet3 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 55
//Bullet_ImgBullet4 (com.adamatomic.Mode.Bullet_ImgBullet4) package com.adamatomic.Mode { import mx.core.*; public class Bullet_ImgBullet4 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 56
//Bullet_ImgBullet5 (com.adamatomic.Mode.Bullet_ImgBullet5) package com.adamatomic.Mode { import mx.core.*; public class Bullet_ImgBullet5 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 57
//Bullet_SndHit (com.adamatomic.Mode.Bullet_SndHit) package com.adamatomic.Mode { import mx.core.*; public class Bullet_SndHit extends SoundAsset { } }//package com.adamatomic.Mode
Section 58
//Bullet_SndShoot1 (com.adamatomic.Mode.Bullet_SndShoot1) package com.adamatomic.Mode { import mx.core.*; public class Bullet_SndShoot1 extends SoundAsset { } }//package com.adamatomic.Mode
Section 59
//Bullet_SndShoot2 (com.adamatomic.Mode.Bullet_SndShoot2) package com.adamatomic.Mode { import mx.core.*; public class Bullet_SndShoot2 extends SoundAsset { } }//package com.adamatomic.Mode
Section 60
//Bullet_SndShoot3 (com.adamatomic.Mode.Bullet_SndShoot3) package com.adamatomic.Mode { import mx.core.*; public class Bullet_SndShoot3 extends SoundAsset { } }//package com.adamatomic.Mode
Section 61
//Bullet_SndShoot4 (com.adamatomic.Mode.Bullet_SndShoot4) package com.adamatomic.Mode { import mx.core.*; public class Bullet_SndShoot4 extends SoundAsset { } }//package com.adamatomic.Mode
Section 62
//Coin (com.adamatomic.Mode.Coin) package com.adamatomic.Mode { import com.adamatomic.flixel.*; public class Coin extends FlxSprite { private var _img:Class; private var SndExtra:Class; public var _tipo:int; private var ImgCoin:Class; private var _padre; private var SndLife:Class; private var ImgExtra:Class; public var _value:int; private var t:FlxText; private var SndCoin:Class; private var _ok:Boolean;// = false private var ImgLife:Class; public function Coin(X:int, Y:int, val:int, tip:int, par){ ImgCoin = Coin_ImgCoin; ImgLife = Coin_ImgLife; ImgExtra = Coin_ImgExtra; SndCoin = Coin_SndCoin; SndLife = Coin_SndLife; SndExtra = Coin_SndExtra; _value = val; _tipo = tip; _padre = par; switch (_tipo){ case 1: _img = ImgCoin; break; case 2: _img = ImgLife; break; case 3: _img = ImgExtra; break; }; super(_img, (X * 16), (Y * 16), false, false); width = 11; height = 11; offset.x = 0; offset.y = 0; } override public function update():void{ if (((!(_ok)) && ((_tipo == 1)))){ _ok = true; t = (_padre.add(new FlxText(x, y, 12, 12, _value.toString(), 4999171, null, 7, "center")) as FlxText); }; } override public function kill():void{ super.kill(); if (_tipo == 1){ t.kill(); }; switch (_tipo){ case 1: FlxG.lmoney = (FlxG.lmoney + _value); FlxG.play(SndCoin); break; case 2: _padre.heal(1); FlxG.play(SndLife); break; case 3: FlxG.extra = true; FlxG.play(SndExtra); break; }; FlxG.score = (FlxG.score + (_value * 10)); } } }//package com.adamatomic.Mode
Section 63
//Coin_ImgCoin (com.adamatomic.Mode.Coin_ImgCoin) package com.adamatomic.Mode { import mx.core.*; public class Coin_ImgCoin extends BitmapAsset { } }//package com.adamatomic.Mode
Section 64
//Coin_ImgExtra (com.adamatomic.Mode.Coin_ImgExtra) package com.adamatomic.Mode { import mx.core.*; public class Coin_ImgExtra extends BitmapAsset { } }//package com.adamatomic.Mode
Section 65
//Coin_ImgLife (com.adamatomic.Mode.Coin_ImgLife) package com.adamatomic.Mode { import mx.core.*; public class Coin_ImgLife extends BitmapAsset { } }//package com.adamatomic.Mode
Section 66
//Coin_SndCoin (com.adamatomic.Mode.Coin_SndCoin) package com.adamatomic.Mode { import mx.core.*; public class Coin_SndCoin extends SoundAsset { } }//package com.adamatomic.Mode
Section 67
//Coin_SndExtra (com.adamatomic.Mode.Coin_SndExtra) package com.adamatomic.Mode { import mx.core.*; public class Coin_SndExtra extends SoundAsset { } }//package com.adamatomic.Mode
Section 68
//Coin_SndLife (com.adamatomic.Mode.Coin_SndLife) package com.adamatomic.Mode { import mx.core.*; public class Coin_SndLife extends SoundAsset { } }//package com.adamatomic.Mode
Section 69
//Enemy (com.adamatomic.Mode.Enemy) package com.adamatomic.Mode { import flash.geom.*; import com.adamatomic.flixel.*; public class Enemy extends FlxSprite { private var num:int; private var _padre; private var SndHit:Class; private var _jumps:Boolean; private var _gibs:FlxEmitter; private var _tipo:int; private var laclase:Class; private var _can_jump:Boolean;// = true private var ydist:int;// = 0 private var _shoot:Boolean;// = false private var ImgEnemy:Class; private var _hurt_counter:Number;// = 0 private var ImgEnemy3:Class; private var ImgEnemy4:Class; private var ImgEnemy5:Class; private var ImgEnemy6:Class; private var ImgEnemy7:Class; private var ImgEnemy2:Class; private var dist:int;// = 0 private var _max_health:int;// = 10 private var _last_jump:Number;// = 0 private var _shotClock:Number; private var _timer:int;// = 0 private var _jump_power:int;// = 800 private var cuant:int;// = 20 private var SndExplode:Class; private var bvida; private var max_x:int; public var _b:FlxArray; private var max_y:int; private var saw:Boolean;// = false private var mizq:Boolean;// = false private var _p:FlxSprite; private var ImgGibs:Class; private var _move_speed:int;// = 400 private static var _cb:uint = 0; public function Enemy(X:Number, Y:Number, ThePlayer:FlxSprite, par, Bullets:FlxArray=null, tip:int=1):void{ ImgEnemy = Enemy_ImgEnemy; ImgEnemy2 = Enemy_ImgEnemy2; ImgEnemy3 = Enemy_ImgEnemy3; ImgEnemy4 = Enemy_ImgEnemy4; ImgEnemy5 = Enemy_ImgEnemy5; ImgEnemy6 = Enemy_ImgEnemy6; ImgEnemy7 = Enemy_ImgEnemy7; ImgGibs = Enemy_ImgGibs; SndExplode = Enemy_SndExplode; SndHit = Enemy_SndHit; switch (tip){ case 1: laclase = ImgEnemy; break; case 2: laclase = ImgEnemy2; break; case 3: laclase = ImgEnemy3; break; case 4: laclase = ImgEnemy4; break; case 5: laclase = ImgEnemy5; break; case 6: laclase = ImgEnemy6; break; case 7: laclase = ImgEnemy7; break; }; super(laclase, X, Y, true, true); switch (tip){ case 1: width = 12; height = 12; _jumps = true; maxVelocity.x = 30; maxVelocity.y = 150; health = 2; acceleration.y = 420; drag.x = 300; max_x = 130; max_y = 100; addAnimation("normal", [1, 2, 3, 4, 5], 7); break; case 2: width = 12; height = 12; _jumps = false; maxVelocity.x = 90; maxVelocity.y = 200; health = 4; acceleration.y = 400; acceleration.x = 5; drag.x = 160; max_x = 130; max_y = 30; addAnimation("normal", [1, 2, 3, 4, 5], 13); break; case 3: width = 17; height = 17; _jumps = false; maxVelocity.x = 20; maxVelocity.y = 100; health = 10; acceleration.y = 420; drag.x = 200; _shoot = true; max_x = 200; max_y = 10; addAnimation("normal", [1, 2, 3, 4, 5], 10); break; case 4: width = 12; height = 12; _jumps = true; maxVelocity.x = 50; maxVelocity.y = 130; health = 12; acceleration.y = 500; acceleration.x = 5; drag.x = 160; max_x = 130; max_y = 100; addAnimation("normal", [1, 2, 3, 4, 5], 13); break; case 5: width = 24; height = 24; _jumps = true; maxVelocity.x = 60; maxVelocity.y = 290; health = 150; acceleration.y = 500; acceleration.x = 5; _shoot = true; drag.x = 160; max_x = 230; max_y = 200; cuant = 75; addAnimation("normal", [1, 2, 3, 4, 5], 13); bvida = par.add(new FlxSprite(null, 0, 2, false, false, 20, 2, 4291761172)); break; case 6: width = 17; height = 17; _jumps = false; maxVelocity.x = 0; maxVelocity.y = 100; health = 10; acceleration.y = 420; drag.x = 200; _shoot = true; max_x = 200; max_y = 10; addAnimation("normal", [0, 1, 2], 10); break; case 7: width = 17; height = 17; _jumps = false; maxVelocity.x = 0; maxVelocity.y = 100; health = 20; acceleration.y = 420; drag.x = 200; _shoot = true; max_x = 200; max_y = 10; addAnimation("normal", [0, 1, 2], 10); break; }; _max_health = health; if (_shoot){ _b = Bullets; }; _p = ThePlayer; _padre = par; _tipo = tip; _shotClock = 0; offset.x = 0; offset.y = 0; addAnimation("jump", [6]); addAnimation("attack", [8], 10); addAnimation("stopped", [0]); addAnimation("hurt", [7], 10); addAnimation("dead", [9], 5); _gibs = (FlxG.state.add(new FlxEmitter(0, 0, 0, 0, null, -1.5, -150, 150, -200, 0, -720, 720, 400, 0, ImgGibs, cuant, true)) as FlxEmitter); } override public function hurt(Damage:Number):void{ FlxG.play(SndHit); flicker(0.2); FlxG.score = (FlxG.score + 10); super.hurt(Damage); } private function shoot():void{ var ba:Point; if (!facing){ ba = FlxG.rotatePoint(-120, 0, 0, 0, angle); } else { ba = FlxG.rotatePoint(-120, 0, 0, 0, (angle + 180)); }; _b[_cb].shoot(((x + (width / 2)) - 2), ((y + (height / 2)) + 2), ba.x, ba.y); if (++_cb >= _b.length){ _cb = 0; }; } override public function update():void{ var os:Number; if (dead){ if (finished){ exists = false; } else { super.update(); }; return; }; if (_tipo == 5){ bvida.x = x; bvida.y = (y - 3); bvida.scale.x = (health / _max_health); }; if (_hurt_counter > 0){ _hurt_counter = (_hurt_counter - (FlxG.elapsed * 3)); }; if (_p.x > x){ dist = (_p.x - x); mizq = false; } else { dist = (x - _p.x); mizq = true; }; if (_p.y > y){ ydist = (_p.y - y); } else { ydist = (y - _p.y); }; if ((((dist < max_x)) && ((ydist < max_y)))){ saw = true; } else { saw = false; }; if (saw){ if (_p.x < x){ facing = false; velocity.x = (velocity.x - (_move_speed * FlxG.elapsed)); } else { facing = true; velocity.x = (velocity.x + (_move_speed * FlxG.elapsed)); }; } else { if (_timer <= 0){ _timer = 100; num = (Math.random() * 5); if (num < 3){ facing = true; velocity.x = (velocity.x + (_move_speed * FlxG.elapsed)); } else { facing = false; velocity.x = (velocity.x - (_move_speed * FlxG.elapsed)); }; } else { _timer--; if (facing){ velocity.x = (velocity.x + (_move_speed * FlxG.elapsed)); } else { velocity.x = (velocity.x - (_move_speed * FlxG.elapsed)); }; }; }; if (_jumps){ if (_last_jump > 0){ _last_jump = (_last_jump - FlxG.elapsed); }; if (((!((velocity.y == 0))) || ((_last_jump > 0)))){ _can_jump = false; }; if ((((((_p.y < y)) && (_can_jump))) && (saw))){ velocity.y = -(_jump_power); _can_jump = false; _last_jump = 2; }; }; if (_hurt_counter > 0){ play("hurt"); } else { if (velocity.y != 0){ play("jump"); } else { if (velocity.x == 0){ play("stopped"); } else { play("normal"); }; }; }; if (_shoot){ if (onScreen()){ os = _shotClock; _shotClock = (_shotClock + FlxG.elapsed); if ((((os < 4)) && ((_shotClock >= 4)))){ _shotClock = 0; shoot(); }; }; }; super.update(); } public function reset(X:Number, Y:Number):void{ exists = true; dead = false; visible = true; active = true; x = X; y = Y; velocity.x = 0; velocity.y = 0; health = 2; play("normal"); _shotClock = 0; _padre._numenemies++; } override public function hitFloor(spr=null):Boolean{ _can_jump = true; return (super.hitFloor()); } override public function kill():void{ if (dead){ return; }; FlxG.play(SndExplode); super.kill(); exists = true; flicker(-1); _gibs.x = (x + (width / 2)); _gibs.y = (y + (height / 2)); _gibs.reset(); FlxG.score = (FlxG.score + 200); play("dead"); var n:int = Math.round((Math.random() * 10)); if (n == 5){ _padre._coins.add(_padre.add(new Coin(Math.round((x / 16)), Math.round((y / 16)), 1, 2, _padre))); }; _padre._numenemies--; } } }//package com.adamatomic.Mode
Section 70
//Enemy_ImgEnemy (com.adamatomic.Mode.Enemy_ImgEnemy) package com.adamatomic.Mode { import mx.core.*; public class Enemy_ImgEnemy extends BitmapAsset { } }//package com.adamatomic.Mode
Section 71
//Enemy_ImgEnemy2 (com.adamatomic.Mode.Enemy_ImgEnemy2) package com.adamatomic.Mode { import mx.core.*; public class Enemy_ImgEnemy2 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 72
//Enemy_ImgEnemy3 (com.adamatomic.Mode.Enemy_ImgEnemy3) package com.adamatomic.Mode { import mx.core.*; public class Enemy_ImgEnemy3 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 73
//Enemy_ImgEnemy4 (com.adamatomic.Mode.Enemy_ImgEnemy4) package com.adamatomic.Mode { import mx.core.*; public class Enemy_ImgEnemy4 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 74
//Enemy_ImgEnemy5 (com.adamatomic.Mode.Enemy_ImgEnemy5) package com.adamatomic.Mode { import mx.core.*; public class Enemy_ImgEnemy5 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 75
//Enemy_ImgEnemy6 (com.adamatomic.Mode.Enemy_ImgEnemy6) package com.adamatomic.Mode { import mx.core.*; public class Enemy_ImgEnemy6 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 76
//Enemy_ImgEnemy7 (com.adamatomic.Mode.Enemy_ImgEnemy7) package com.adamatomic.Mode { import mx.core.*; public class Enemy_ImgEnemy7 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 77
//Enemy_ImgGibs (com.adamatomic.Mode.Enemy_ImgGibs) package com.adamatomic.Mode { import mx.core.*; public class Enemy_ImgGibs extends BitmapAsset { } }//package com.adamatomic.Mode
Section 78
//Enemy_SndExplode (com.adamatomic.Mode.Enemy_SndExplode) package com.adamatomic.Mode { import mx.core.*; public class Enemy_SndExplode extends SoundAsset { } }//package com.adamatomic.Mode
Section 79
//Enemy_SndHit (com.adamatomic.Mode.Enemy_SndHit) package com.adamatomic.Mode { import mx.core.*; public class Enemy_SndHit extends SoundAsset { } }//package com.adamatomic.Mode
Section 80
//LevelSelectState (com.adamatomic.Mode.LevelSelectState) package com.adamatomic.Mode { import flash.events.*; import flash.display.*; import com.adamatomic.flixel.*; import flash.net.*; public class LevelSelectState extends FlxState { private var SndNeg:Class; private var SndHit:Class; private var Butb:Class; private var ImgExtra2:Class; private var ImgExtra:Class; private var mLogo:Class; private var func:Function; private var xd3; private var xd2; private var botonsp1:Class; private var botonsp2:Class; private var ImgCursor:Class; private var But:Class; private var _b:FlxButton; private var SndHit2:Class; private var xd; private var But1:Class; private var But2:Class; private var But3:Class; private var _ok:Boolean;// = false public function LevelSelectState():void{ But1 = LevelSelectState_But1; But3 = LevelSelectState_But3; Butb = LevelSelectState_Butb; But2 = LevelSelectState_But2; SndHit = LevelSelectState_SndHit; SndHit2 = LevelSelectState_SndHit2; SndNeg = LevelSelectState_SndNeg; ImgCursor = LevelSelectState_ImgCursor; mLogo = LevelSelectState_mLogo; ImgExtra = LevelSelectState_ImgExtra; ImgExtra2 = LevelSelectState_ImgExtra2; botonsp2 = LevelSelectState_botonsp2; botonsp1 = LevelSelectState_botonsp1; super(); var log:FlxSprite = new FlxSprite(mLogo, 0, 0, false, false, 320, 240, 0); this.add(log); } private function onButton9():void{ FlxG.level = 9; levelsel(); } private function onFade():void{ FlxG.switchState(PlayStateTiles); } private function onFade2():void{ FlxG.switchState(ShopState); } private function onFade3():void{ FlxG.switchState(MenuState); } private function onSponsor(e:MouseEvent):void{ FlxG.play(SndHit2); navigateToURL(new URLRequest("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=robin_mercenary_2&utm_source=ingame&utm_content=ingame"), "_BLANK"); } private function onButton3a(e:MouseEvent):void{ xd2.addChild(xd3); } private function onButton3b(e:MouseEvent):void{ xd2.removeChild(xd3); } private function onButton11():void{ FlxG.level = 11; levelsel(); } private function onButton12():void{ FlxG.level = 12; levelsel(); } private function onButton13():void{ FlxG.level = 13; levelsel(); } private function onButton14():void{ FlxG.level = 14; levelsel(); } private function onButton15():void{ FlxG.level = 15; levelsel(); } private function negf():void{ FlxG.play(SndNeg); } private function onButton10():void{ FlxG.level = 10; levelsel(); } private function onButton16():void{ FlxG.level = 16; levelsel(); } private function onButton6():void{ FlxG.level = 6; levelsel(); } private function onButton7():void{ FlxG.level = 7; levelsel(); } private function back():void{ FlxG.play(SndHit2); FlxG.flash(4292406178, 0.5); FlxG.fade(4279442459, 0.5, onFade3); } private function onButton3():void{ FlxG.level = 3; levelsel(); } private function onButton4():void{ FlxG.level = 4; levelsel(); } override public function update():void{ var tscore:int; var x:int; if (!_ok){ _ok = true; FlxG.flash(4292406178, 0.5); (this.add(new FlxText(215, 5, 100, 20, ("Money: " + FlxG.money.toString()), 0, null, 8, "left")) as FlxText); (this.add(new FlxText(216, 6, 100, 20, ("Money: " + FlxG.money.toString()), 15061767, null, 8, "left")) as FlxText); tscore = 0; x = 1; while (x < FlxG.scores.length) { tscore = (tscore + FlxG.scores[x]); x++; }; (this.add(new FlxText(215, 15, 100, 20, ("Score: " + tscore.toString()), 0, null, 8, "left")) as FlxText); (this.add(new FlxText(216, 16, 100, 20, ("Score: " + tscore.toString()), 0xFFFFFF, null, 8, "left")) as FlxText); if (FlxG.clevel >= 0){ But = Butb; func = onButton1; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(5, 60, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 1", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 1", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 1){ But = Butb; func = onButton2; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(5, 90, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 2", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 2", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 2){ But = Butb; func = onButton3; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(5, 120, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 3", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 3", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 3){ But = Butb; func = onButton4; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(5, 150, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 4", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 4", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 4){ But = Butb; func = onButton5; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(5, 180, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 5", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 5", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 5){ But = Butb; func = onButton6; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(110, 60, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 6", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 6", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 6){ But = Butb; func = onButton7; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(110, 90, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 7", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 7", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 7){ But = Butb; func = onButton8; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(110, 120, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 8", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 8", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 8){ But = Butb; func = onButton9; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(110, 150, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 9", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 9", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 9){ But = Butb; func = onButton10; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(215, 60, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 10", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 10", 0xFFFFFF, null, 10))) as FlxButton); _b = (this.add(new FlxButton(50, 210, new FlxSprite(But2, 0, 0, false, false), onShop, new FlxSprite(But2, 0, 0, false, false), new FlxText(30, 8, 100, 16, "Shop", 0, null, 10), new FlxText(30, 8, 100, 16, "->Shop", 0, null, 10))) as FlxButton); if (FlxG.clevel >= 10){ But = Butb; func = onButton11; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(215, 90, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 11", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 11", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 11){ But = Butb; func = onButton12; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(215, 120, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 12", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 12", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 12){ But = Butb; func = onButton13; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(215, 150, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 13", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 13", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 13){ But = Butb; func = onButton14; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(215, 180, new FlxSprite(But, 0, 0, false, false), func, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 5, 100, 16, "Level 14", 0xFFFFFF, null, 10), new FlxText(20, 5, 100, 16, "->Level 14", 0xFFFFFF, null, 10))) as FlxButton); if (FlxG.clevel >= 14){ But = Butb; func = onButton15; } else { But = But1; func = negf; }; if (FlxG.clevel >= 15){ But = Butb; func = onButton16; } else { But = But1; func = negf; }; _b = (this.add(new FlxButton(215, 30, new FlxSprite(But3, 0, 0, false, false), back, new FlxSprite(But3, 0, 0, false, false), new FlxText(12, 4, 100, 16, "Back", 0, null, 8), new FlxText(2, 4, 100, 16, "<--Back", 0, null, 8))) as FlxButton); if ((((FlxG.levels[1] == true)) || ((FlxG.levels[1] == "true")))){ this.add(new FlxSprite(ImgExtra, 85, 65, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 85, 65, false, false)); }; if ((((FlxG.levels[2] == true)) || ((FlxG.levels[2] == "true")))){ this.add(new FlxSprite(ImgExtra, 85, 95, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 85, 95, false, false)); }; if ((((FlxG.levels[3] == true)) || ((FlxG.levels[3] == "true")))){ this.add(new FlxSprite(ImgExtra, 85, 125, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 85, 125, false, false)); }; if ((((FlxG.levels[4] == true)) || ((FlxG.levels[4] == "true")))){ this.add(new FlxSprite(ImgExtra, 85, 155, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 85, 155, false, false)); }; if ((((FlxG.levels[5] == true)) || ((FlxG.levels[5] == "true")))){ this.add(new FlxSprite(ImgExtra, 85, 185, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 85, 185, false, false)); }; if ((((FlxG.levels[6] == true)) || ((FlxG.levels[6] == "true")))){ this.add(new FlxSprite(ImgExtra, 190, 65, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 190, 65, false, false)); }; if ((((FlxG.levels[7] == true)) || ((FlxG.levels[7] == "true")))){ this.add(new FlxSprite(ImgExtra, 190, 95, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 190, 95, false, false)); }; if ((((FlxG.levels[8] == true)) || ((FlxG.levels[8] == "true")))){ this.add(new FlxSprite(ImgExtra, 190, 125, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 190, 125, false, false)); }; if ((((FlxG.levels[9] == true)) || ((FlxG.levels[9] == "true")))){ this.add(new FlxSprite(ImgExtra, 190, 155, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 190, 155, false, false)); }; if ((((FlxG.levels[10] == true)) || ((FlxG.levels[10] == "true")))){ this.add(new FlxSprite(ImgExtra, 295, 65, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 295, 65, false, false)); }; if ((((FlxG.levels[11] == true)) || ((FlxG.levels[11] == "true")))){ this.add(new FlxSprite(ImgExtra, 295, 95, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 295, 95, false, false)); }; if ((((FlxG.levels[12] == true)) || ((FlxG.levels[12] == "true")))){ this.add(new FlxSprite(ImgExtra, 295, 125, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 295, 125, false, false)); }; if ((((FlxG.levels[13] == true)) || ((FlxG.levels[13] == "true")))){ this.add(new FlxSprite(ImgExtra, 295, 155, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 295, 155, false, false)); }; if ((((FlxG.levels[14] == true)) || ((FlxG.levels[14] == "true")))){ this.add(new FlxSprite(ImgExtra, 295, 185, false, false)); } else { this.add(new FlxSprite(ImgExtra2, 295, 185, false, false)); }; xd = new botonsp1(); xd3 = new botonsp2(); xd2 = new MovieClip(); addChild(xd2); xd2.addChild(xd); xd2.x = 170; xd2.y = 210; xd2.addEventListener(MouseEvent.CLICK, onSponsor); xd2.addEventListener(MouseEvent.ROLL_OVER, onButton3a); xd2.addEventListener(MouseEvent.ROLL_OUT, onButton3b); FlxG.setCursor(ImgCursor); }; super.update(); } private function onButton8():void{ FlxG.level = 8; levelsel(); } private function onButton1():void{ FlxG.level = 1; levelsel(); } private function onButton5():void{ FlxG.level = 5; levelsel(); } private function onShop():void{ FlxG.play(SndHit2); FlxG.flash(4292406178, 0.5); FlxG.fade(4279442459, 0.5, onFade2); } private function levelsel():void{ FlxG.play(SndHit2); FlxG.flash(4292406178, 0.5); FlxG.fade(4279442459, 0.5, onFade); } private function onButton2():void{ FlxG.level = 2; levelsel(); } } }//package com.adamatomic.Mode
Section 81
//LevelSelectState_botonsp1 (com.adamatomic.Mode.LevelSelectState_botonsp1) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_botonsp1 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 82
//LevelSelectState_botonsp2 (com.adamatomic.Mode.LevelSelectState_botonsp2) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_botonsp2 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 83
//LevelSelectState_But1 (com.adamatomic.Mode.LevelSelectState_But1) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_But1 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 84
//LevelSelectState_But2 (com.adamatomic.Mode.LevelSelectState_But2) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_But2 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 85
//LevelSelectState_But3 (com.adamatomic.Mode.LevelSelectState_But3) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_But3 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 86
//LevelSelectState_Butb (com.adamatomic.Mode.LevelSelectState_Butb) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_Butb extends BitmapAsset { } }//package com.adamatomic.Mode
Section 87
//LevelSelectState_ImgCursor (com.adamatomic.Mode.LevelSelectState_ImgCursor) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_ImgCursor extends BitmapAsset { } }//package com.adamatomic.Mode
Section 88
//LevelSelectState_ImgExtra (com.adamatomic.Mode.LevelSelectState_ImgExtra) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_ImgExtra extends BitmapAsset { } }//package com.adamatomic.Mode
Section 89
//LevelSelectState_ImgExtra2 (com.adamatomic.Mode.LevelSelectState_ImgExtra2) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_ImgExtra2 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 90
//LevelSelectState_mLogo (com.adamatomic.Mode.LevelSelectState_mLogo) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_mLogo extends BitmapAsset { } }//package com.adamatomic.Mode
Section 91
//LevelSelectState_SndHit (com.adamatomic.Mode.LevelSelectState_SndHit) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_SndHit extends SoundAsset { } }//package com.adamatomic.Mode
Section 92
//LevelSelectState_SndHit2 (com.adamatomic.Mode.LevelSelectState_SndHit2) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_SndHit2 extends SoundAsset { } }//package com.adamatomic.Mode
Section 93
//LevelSelectState_SndNeg (com.adamatomic.Mode.LevelSelectState_SndNeg) package com.adamatomic.Mode { import mx.core.*; public class LevelSelectState_SndNeg extends SoundAsset { } }//package com.adamatomic.Mode
Section 94
//MenuState (com.adamatomic.Mode.MenuState) package com.adamatomic.Mode { import flash.events.*; import flash.display.*; import com.adamatomic.flixel.*; import CPMStar.*; import flash.net.*; import com.CPMStar.*; public class MenuState extends FlxState { private var botonsp:Class; private var xd3; private var SndHit:Class; private var botonsp1:Class; private var botonsp2:Class; private var ImgBoton:Class; private var count:uint;// = 0 private var _ok2:Boolean; private var ImgCursor:Class; private var But:Class; private var _b:FlxButton; private var _e:FlxEmitter; private var SndHit2:Class; private var xd; public var adBox; private var xd2; private var mLogo:Class; private var _ok:Boolean; public function MenuState():void{ var scoresraw:String; var scores2:Array; var i:int; var levelsraw:String; var levels2:Array; ImgCursor = MenuState_ImgCursor; SndHit = MenuState_SndHit; SndHit2 = MenuState_SndHit2; mLogo = MenuState_mLogo; But = MenuState_But; botonsp = MenuState_botonsp; ImgBoton = MenuState_ImgBoton; botonsp2 = MenuState_botonsp2; botonsp1 = MenuState_botonsp1; super(); var log:FlxSprite = new FlxSprite(mLogo, 0, 0, false, false, 320, 240, 0); this.add(log); _ok = false; _ok2 = false; if (FlxG.FlxSave.data.key1 != null){ FlxG.KEYCONTROL.ChangeKey("Up", FlxG.FlxSave.data.key1); FlxG.KEYCONTROL.ChangeKey("Down", FlxG.FlxSave.data.key2); FlxG.KEYCONTROL.ChangeKey("Left", FlxG.FlxSave.data.key3); FlxG.KEYCONTROL.ChangeKey("Right", FlxG.FlxSave.data.key4); FlxG.KEYCONTROL.ChangeKey("aKey", FlxG.FlxSave.data.key5); FlxG.KEYCONTROL.ChangeKey("bKey", FlxG.FlxSave.data.key6); FlxG.jumpR = FlxG.FlxSave.data.jumpr; }; if (FlxG.FlxSave.data.money != null){ FlxG.money = FlxG.FlxSave.data.money; FlxG.clevel = FlxG.FlxSave.data.clevel; FlxG.jumpl = FlxG.FlxSave.data.jumpl; FlxG.arcl = FlxG.FlxSave.data.arcl; FlxG.lifel = FlxG.FlxSave.data.lifel; FlxG.jetl = FlxG.FlxSave.data.jetl; FlxG.autolv = FlxG.FlxSave.data.autolv; FlxG.gameComplete = FlxG.FlxSave.data.gameComplete; scoresraw = FlxG.FlxSave.data.scores; scores2 = new Array(); scores2 = scoresraw.split(","); i = 0; i = 0; while (i < 17) { FlxG.scores[i] = int(scores2[i]); i = (i + 1); }; i = 0; levelsraw = FlxG.FlxSave.data.levels; levels2 = new Array(); levels2 = levelsraw.split(","); i = 1; while (i < 17) { FlxG.levels[i] = levels2[i]; i = (i + 1); }; //unresolved jump var _slot1 = e; trace(_slot1); }; } private function onButton3b(e:MouseEvent):void{ xd2.removeChild(xd3); } private function onFade2():void{ FlxG.switchState(OptionsState); } override public function update():void{ var _btext:String; var CPMStarContentSpotID:String; var ad:*; if (!FlxG.kong){ (FlxG.kong = (parent.addChild(new FlxKong()) as FlxKong)).init(); }; if (!_ok){ _ok = true; FlxG.flash(4292406178, 0.5); FlxG.quake(0.035, 0.5); _btext = "New Game"; if (FlxG.FlxSave.data.money != null){ _btext = "Continue"; }; _b = (this.add(new FlxButton(15, 140, new FlxSprite(ImgBoton, 0, 0, false, false, 100, 30), onButton, new FlxSprite(ImgBoton, 0, 0, false, false, 100, 30), new FlxText(25, 9, 100, 10, _btext, 0), new FlxText(25, 9, 100, 10, ("->" + _btext), 0))) as FlxButton); _b = (this.add(new FlxButton(15, 170, new FlxSprite(ImgBoton, 0, 0, false, false, 100, 30), onButton2, new FlxSprite(ImgBoton, 0, 0, false, false, 100, 30), new FlxText(25, 9, 100, 10, "Options", 0), new FlxText(25, 9, 100, 10, "->Options", 0))) as FlxButton); xd = new botonsp1(); xd3 = new botonsp2(); xd2 = new MovieClip(); addChild(xd2); xd2.addChild(xd); xd2.x = 15; xd2.y = 200; xd2.addEventListener(MouseEvent.CLICK, onButton3e); xd2.addEventListener(MouseEvent.ROLL_OVER, onButton3a); xd2.addEventListener(MouseEvent.ROLL_OUT, onButton3b); if (FlxG.adsA){ adBox = new MovieClip(); adBox.x = 700; addChild(adBox); CPMStarContentSpotID = "728Q2D29410C"; ad = new AdLoader(CPMStarContentSpotID); adBox.addChild(ad); addEventListener(Event.ENTER_FRAME, comprobar); }; FlxG.setCursor(ImgCursor); }; super.update(); } private function onButton3e(e:MouseEvent):void{ FlxG.play(SndHit2); navigateToURL(new URLRequest("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=robin_mercenary_2&utm_source=ingame&utm_content=ingame"), "_BLANK"); } private function comprobar(e:Event):void{ count++; if (count >= 150){ adBox.x = 150; adBox.y = 100; adBox.width = 200; adBox.height = 200; removeEventListener(Event.ENTER_FRAME, comprobar); }; } private function onButton():void{ if (!_ok2){ _ok2 = true; FlxG.play(SndHit2); FlxG.flash(4292406178, 0.5); FlxG.fade(4279442459, 0.5, onFade); }; } private function onFade():void{ FlxG.switchState(LevelSelectState); } private function onButton2():void{ if (!_ok2){ _ok2 = true; FlxG.play(SndHit2); FlxG.flash(4292406178, 0.5); FlxG.fade(4279442459, 0.5, onFade2); }; } private function onButton3a(e:MouseEvent):void{ xd2.addChild(xd3); } } }//package com.adamatomic.Mode
Section 95
//MenuState_botonsp (com.adamatomic.Mode.MenuState_botonsp) package com.adamatomic.Mode { import mx.core.*; public class MenuState_botonsp extends BitmapAsset { } }//package com.adamatomic.Mode
Section 96
//MenuState_botonsp1 (com.adamatomic.Mode.MenuState_botonsp1) package com.adamatomic.Mode { import mx.core.*; public class MenuState_botonsp1 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 97
//MenuState_botonsp2 (com.adamatomic.Mode.MenuState_botonsp2) package com.adamatomic.Mode { import mx.core.*; public class MenuState_botonsp2 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 98
//MenuState_But (com.adamatomic.Mode.MenuState_But) package com.adamatomic.Mode { import mx.core.*; public class MenuState_But extends BitmapAsset { } }//package com.adamatomic.Mode
Section 99
//MenuState_ImgBoton (com.adamatomic.Mode.MenuState_ImgBoton) package com.adamatomic.Mode { import mx.core.*; public class MenuState_ImgBoton extends BitmapAsset { } }//package com.adamatomic.Mode
Section 100
//MenuState_ImgCursor (com.adamatomic.Mode.MenuState_ImgCursor) package com.adamatomic.Mode { import mx.core.*; public class MenuState_ImgCursor extends BitmapAsset { } }//package com.adamatomic.Mode
Section 101
//MenuState_mLogo (com.adamatomic.Mode.MenuState_mLogo) package com.adamatomic.Mode { import mx.core.*; public class MenuState_mLogo extends BitmapAsset { } }//package com.adamatomic.Mode
Section 102
//MenuState_SndHit (com.adamatomic.Mode.MenuState_SndHit) package com.adamatomic.Mode { import mx.core.*; public class MenuState_SndHit extends SoundAsset { } }//package com.adamatomic.Mode
Section 103
//MenuState_SndHit2 (com.adamatomic.Mode.MenuState_SndHit2) package com.adamatomic.Mode { import mx.core.*; public class MenuState_SndHit2 extends SoundAsset { } }//package com.adamatomic.Mode
Section 104
//OptionsState (com.adamatomic.Mode.OptionsState) package com.adamatomic.Mode { import flash.events.*; import com.adamatomic.flixel.*; public class OptionsState extends FlxState { private var tempT; private var bA; private var bD; private var bJ; private var bK; private var bS; private var bW; private var mLogo:Class; private var ImgCursor:Class; private var _t1:FlxText; private var _t2:FlxText; private var But:Class; private var _b:FlxButton; private var jped:String; private var SndHit2:Class; private var muted:String; private var j_on11:FlxText; private var j_on12:FlxText; private var _ok:Boolean;// = false public function OptionsState():void{ But = OptionsState_But; SndHit2 = OptionsState_SndHit2; ImgCursor = OptionsState_ImgCursor; mLogo = OptionsState_mLogo; super(); var log:FlxSprite = new FlxSprite(mLogo, 0, 0, false, false, 320, 240, 0); this.add(log); FlxG.setCursor(ImgCursor); } private function onFade():void{ FlxG.switchState(MenuState); } private function mute():void{ if (FlxG.getMute()){ FlxG.setMute(false); _t1.setText("Sound On"); _t2.setText("Sound On"); } else { FlxG.setMute(true); _t1.setText("Sound Off"); _t2.setText("Sound Off"); }; FlxG.play(SndHit2); } private function c1():void{ bW._onT = new FlxText(10, 9, 100, 16, "Press any Key...", 0, null); bW._offT = new FlxText(10, 9, 100, 16, "Press any Key...", 0, null); stage.addEventListener(KeyboardEvent.KEY_DOWN, changek1); } private function c2():void{ bS._onT = new FlxText(10, 9, 100, 16, "Press any Key...", 0, null); bS._offT = new FlxText(10, 9, 100, 16, "Press any Key...", 0, null); stage.addEventListener(KeyboardEvent.KEY_DOWN, changek2); } private function c3():void{ bD._onT = new FlxText(10, 9, 100, 16, "Press any Key...", 0, null); bD._offT = new FlxText(10, 9, 100, 16, "Press any Key...", 0, null); stage.addEventListener(KeyboardEvent.KEY_DOWN, changek3); } private function c4():void{ bA._onT = new FlxText(10, 9, 100, 16, "Press any Key...", 0, null); bA._offT = new FlxText(10, 9, 100, 16, "Press any Key...", 0, null); stage.addEventListener(KeyboardEvent.KEY_DOWN, changek4); } private function c5():void{ bK._onT = new FlxText(10, 9, 100, 16, "Press any Key...", 0, null); bK._offT = new FlxText(10, 9, 100, 16, "Press any Key...", 0, null); stage.addEventListener(KeyboardEvent.KEY_DOWN, changek5); } override public function update():void{ if (!_ok){ _ok = true; FlxG.flash(4292406178, 0.5); _b = (this.add(new FlxButton(10, 215, new FlxSprite(But, 0, 0, false, false), back, new FlxSprite(But, 0, 0, false, false), new FlxText(10, 9, 100, 16, "Back", 0, null), new FlxText(10, 9, 100, 16, "<--Back", 0, null))) as FlxButton); _b = (this.add(new FlxButton(10, 50, new FlxSprite(But, 0, 0, false, false), reset, new FlxSprite(But, 0, 0, false, false), new FlxText(10, 9, 100, 16, "Reset Data", 0, null), new FlxText(10, 9, 100, 16, "->Reset Data", 0, null))) as FlxButton); _b = (this.add(new FlxButton(10, 100, new FlxSprite(But, 0, 0, false, false), mute, new FlxSprite(But, 0, 0, false, false), new FlxText(10, 9, 100, 16, "Mute Sound", 0, null), new FlxText(10, 9, 100, 16, "->Mute Sound", 0, null))) as FlxButton); if (FlxG.jumpR){ jped = "Activated"; } else { jped = "Deactivated"; }; _b = (this.add(new FlxButton(10, 150, new FlxSprite(But, 0, 0, false, false), jpR, new FlxSprite(But, 0, 0, false, false), new FlxText(10, 9, 100, 16, "Variable Jump", 0, null), new FlxText(10, 9, 100, 16, "->Variable Jump", 0, null))) as FlxButton); (this.add(new FlxText(9, 179, 200, 40, "You stop jumping when you\n Release the Jump Key.", 0, null, 8, "left")) as FlxText); (this.add(new FlxText(10, 180, 200, 40, "You stop jumping when you\n Release the Jump Key.", 0xFFFFFF, null, 8, "left")) as FlxText); j_on11 = (this.add(new FlxText(120, 160, 100, 20, jped, 0, null, 8, "left")) as FlxText); j_on12 = (this.add(new FlxText(121, 161, 100, 20, jped, 0xFFFFFF, null, 8, "left")) as FlxText); if (FlxG.KEYCONTROL.KEYS[0].kCode == 38){ tempT = "/\\"; } else { if (FlxG.KEYCONTROL.KEYS[0].kCode == 40){ tempT = "\\/"; } else { if (FlxG.KEYCONTROL.KEYS[0].kCode == 37){ tempT = "<"; } else { if (FlxG.KEYCONTROL.KEYS[0].kCode == 39){ tempT = ">"; } else { if (FlxG.KEYCONTROL.KEYS[0].kCode == 32){ tempT = "Space"; } else { if (FlxG.KEYCONTROL.KEYS[0].kCode == 16){ tempT = "Shift"; } else { if (FlxG.KEYCONTROL.KEYS[0].kCode == 17){ tempT = "Control"; } else { tempT = String.fromCharCode(FlxG.KEYCONTROL.KEYS[0].kCode); }; }; }; }; }; }; }; bW = (this.add(new FlxButton(210, 60, new FlxSprite(But, 0, 0, false, false), c1, new FlxSprite(But, 0, 0, false, false), new FlxText(10, 9, 100, 16, ("Up: " + tempT), 0, null), new FlxText(10, 9, 100, 16, ("Up: " + tempT), 0, null))) as FlxButton); if (FlxG.KEYCONTROL.KEYS[1].kCode == 38){ tempT = "/\\"; } else { if (FlxG.KEYCONTROL.KEYS[1].kCode == 40){ tempT = "\\/"; } else { if (FlxG.KEYCONTROL.KEYS[1].kCode == 37){ tempT = "<"; } else { if (FlxG.KEYCONTROL.KEYS[1].kCode == 39){ tempT = ">"; } else { if (FlxG.KEYCONTROL.KEYS[1].kCode == 32){ tempT = "Space"; } else { if (FlxG.KEYCONTROL.KEYS[1].kCode == 16){ tempT = "Shift"; } else { if (FlxG.KEYCONTROL.KEYS[1].kCode == 17){ tempT = "Control"; } else { tempT = String.fromCharCode(FlxG.KEYCONTROL.KEYS[1].kCode); }; }; }; }; }; }; }; bS = (this.add(new FlxButton(210, 90, new FlxSprite(But, 0, 0, false, false), c2, new FlxSprite(But, 0, 0, false, false), new FlxText(10, 9, 100, 16, ("Down: " + tempT), 0, null), new FlxText(10, 9, 100, 16, ("Down: " + tempT), 0, null))) as FlxButton); if (FlxG.KEYCONTROL.KEYS[2].kCode == 38){ tempT = "/\\"; } else { if (FlxG.KEYCONTROL.KEYS[2].kCode == 40){ tempT = "\\/"; } else { if (FlxG.KEYCONTROL.KEYS[2].kCode == 37){ tempT = "<"; } else { if (FlxG.KEYCONTROL.KEYS[2].kCode == 39){ tempT = ">"; } else { if (FlxG.KEYCONTROL.KEYS[2].kCode == 32){ tempT = "Space"; } else { if (FlxG.KEYCONTROL.KEYS[2].kCode == 16){ tempT = "Shift"; } else { if (FlxG.KEYCONTROL.KEYS[2].kCode == 17){ tempT = "Control"; } else { tempT = String.fromCharCode(FlxG.KEYCONTROL.KEYS[3].kCode); }; }; }; }; }; }; }; bD = (this.add(new FlxButton(210, 120, new FlxSprite(But, 0, 0, false, false), c3, new FlxSprite(But, 0, 0, false, false), new FlxText(10, 9, 100, 16, ("Right: " + tempT), 0, null), new FlxText(10, 9, 100, 16, ("Right: " + tempT), 0, null))) as FlxButton); if (FlxG.KEYCONTROL.KEYS[3].kCode == 38){ tempT = "/\\"; } else { if (FlxG.KEYCONTROL.KEYS[3].kCode == 40){ tempT = "\\/"; } else { if (FlxG.KEYCONTROL.KEYS[3].kCode == 37){ tempT = "<"; } else { if (FlxG.KEYCONTROL.KEYS[3].kCode == 39){ tempT = ">"; } else { if (FlxG.KEYCONTROL.KEYS[3].kCode == 32){ tempT = "Space"; } else { if (FlxG.KEYCONTROL.KEYS[3].kCode == 16){ tempT = "Shift"; } else { if (FlxG.KEYCONTROL.KEYS[3].kCode == 17){ tempT = "Control"; } else { tempT = String.fromCharCode(FlxG.KEYCONTROL.KEYS[2].kCode); }; }; }; }; }; }; }; bA = (this.add(new FlxButton(210, 150, new FlxSprite(But, 0, 0, false, false), c4, new FlxSprite(But, 0, 0, false, false), new FlxText(10, 9, 100, 16, ("Left: " + tempT), 0, null), new FlxText(10, 9, 100, 16, ("Left: " + tempT), 0, null))) as FlxButton); if (FlxG.KEYCONTROL.KEYS[4].kCode == 38){ tempT = "/\\"; } else { if (FlxG.KEYCONTROL.KEYS[4].kCode == 40){ tempT = "\\/"; } else { if (FlxG.KEYCONTROL.KEYS[4].kCode == 37){ tempT = "<"; } else { if (FlxG.KEYCONTROL.KEYS[4].kCode == 39){ tempT = ">"; } else { if (FlxG.KEYCONTROL.KEYS[4].kCode == 32){ tempT = "Space"; } else { if (FlxG.KEYCONTROL.KEYS[4].kCode == 16){ tempT = "Shift"; } else { if (FlxG.KEYCONTROL.KEYS[4].kCode == 17){ tempT = "Control"; } else { tempT = String.fromCharCode(FlxG.KEYCONTROL.KEYS[4].kCode); }; }; }; }; }; }; }; bK = (this.add(new FlxButton(210, 180, new FlxSprite(But, 0, 0, false, false), c5, new FlxSprite(But, 0, 0, false, false), new FlxText(10, 9, 100, 16, ("Jump: " + tempT), 0, null), new FlxText(10, 9, 100, 16, ("Jump: " + tempT), 0, null))) as FlxButton); if (FlxG.KEYCONTROL.KEYS[5].kCode == 38){ tempT = "/\\"; } else { if (FlxG.KEYCONTROL.KEYS[5].kCode == 40){ tempT = "\\/"; } else { if (FlxG.KEYCONTROL.KEYS[5].kCode == 37){ tempT = "<"; } else { if (FlxG.KEYCONTROL.KEYS[5].kCode == 39){ tempT = ">"; } else { if (FlxG.KEYCONTROL.KEYS[5].kCode == 32){ tempT = "Space"; } else { if (FlxG.KEYCONTROL.KEYS[5].kCode == 16){ tempT = "Shift"; } else { if (FlxG.KEYCONTROL.KEYS[5].kCode == 17){ tempT = "Control"; } else { tempT = String.fromCharCode(FlxG.KEYCONTROL.KEYS[5].kCode); }; }; }; }; }; }; }; bJ = (this.add(new FlxButton(210, 210, new FlxSprite(But, 0, 0, false, false), c6, new FlxSprite(But, 0, 0, false, false), new FlxText(10, 9, 100, 16, ("Shoot: " + tempT), 0, null), new FlxText(10, 9, 100, 16, ("Shoot: " + tempT), 0, null))) as FlxButton); _t2 = (this.add(new FlxText(34, 121, 100, 20, muted, 0xFFFFFF, null, 8, "left")) as FlxText); if (FlxG.getMute()){ muted = "Sound Off"; } else { muted = "Sound On"; }; _t1 = (this.add(new FlxText(10, 130, 100, 20, muted, 0, null, 8, "left")) as FlxText); _t2 = (this.add(new FlxText(11, 131, 100, 20, muted, 0xFFFFFF, null, 8, "left")) as FlxText); (this.add(new FlxText(9, 80, 200, 20, "All you data will be Deleted!", 0, null, 8, "left")) as FlxText); (this.add(new FlxText(10, 81, 200, 20, "All you data will be Deleted!", 0xFFFFFF, null, 8, "left")) as FlxText); (this.add(new FlxText(219, 44, 200, 20, "Change Controls:", 0, null, 8, "left")) as FlxText); (this.add(new FlxText(220, 45, 200, 20, "Change Controls:", 0xFFFFFF, null, 8, "left")) as FlxText); }; super.update(); } private function c6():void{ bJ._onT = new FlxText(10, 9, 100, 16, "Press any Key...", 0, null); bJ._offT = new FlxText(10, 9, 100, 16, "Press any Key...", 0, null); stage.addEventListener(KeyboardEvent.KEY_DOWN, changek6); } private function jpR():void{ if (FlxG.jumpR){ FlxG.jumpR = false; j_on11.setText("Deactivated"); j_on12.setText("Deactivated"); } else { FlxG.jumpR = true; j_on11.setText("Activated"); j_on12.setText("Activated"); }; FlxG.play(SndHit2); } private function reset():void{ FlxG.FlxSave.clear(); FlxG.play(SndHit2); (this.add(new FlxText(26, 40, 100, 20, "Data Cleared!", 0, null, 8, "left")) as FlxText); (this.add(new FlxText(27, 41, 100, 20, "Data Cleared!", 0xFFFFFF, null, 8, "left")) as FlxText); FlxG.money = 0; FlxG.clevel = 0; FlxG.jumpl = 1; FlxG.arcl = 1; FlxG.lifel = 1; FlxG.jetl = 1; var i = 1; FlxG.levels = new FlxArray(); FlxG.scores = new FlxArray(); i = 1; while (i < 17) { FlxG.scores[i] = 0; i++; }; i = 1; while (i < 17) { FlxG.levels[i] = false; i++; }; } private function changek3(e:KeyboardEvent):void{ FlxG.KEYCONTROL.ChangeKey("Right", e.keyCode); if (e.keyCode == 38){ tempT = "/\\"; } else { if (e.keyCode == 40){ tempT = "\\/"; } else { if (e.keyCode == 37){ tempT = "<"; } else { if (e.keyCode == 39){ tempT = ">"; } else { if (e.keyCode == 32){ tempT = "Space"; } else { if (e.keyCode == 16){ tempT = "Shift"; } else { if (e.keyCode == 17){ tempT = "Control"; } else { tempT = String.fromCharCode(e.keyCode); }; }; }; }; }; }; }; bD._onT = new FlxText(10, 9, 100, 16, ("Right: " + tempT), 0, null); bD._offT = new FlxText(10, 9, 100, 16, ("Right: " + tempT), 0, null); stage.removeEventListener(KeyboardEvent.KEY_DOWN, changek3); } private function changek5(e:KeyboardEvent):void{ FlxG.KEYCONTROL.ChangeKey("aKey", e.keyCode); if (e.keyCode == 38){ tempT = "/\\"; } else { if (e.keyCode == 40){ tempT = "\\/"; } else { if (e.keyCode == 37){ tempT = "<"; } else { if (e.keyCode == 39){ tempT = ">"; } else { if (e.keyCode == 32){ tempT = "Space"; } else { if (e.keyCode == 16){ tempT = "Shift"; } else { if (e.keyCode == 17){ tempT = "Control"; } else { tempT = String.fromCharCode(e.keyCode); }; }; }; }; }; }; }; bK._onT = new FlxText(10, 9, 100, 16, ("Jump: " + tempT), 0, null); bK._offT = new FlxText(10, 9, 100, 16, ("Jump: " + tempT), 0, null); stage.removeEventListener(KeyboardEvent.KEY_DOWN, changek5); } private function changek6(e:KeyboardEvent):void{ FlxG.KEYCONTROL.ChangeKey("bKey", e.keyCode); if (e.keyCode == 38){ tempT = "/\\"; } else { if (e.keyCode == 40){ tempT = "\\/"; } else { if (e.keyCode == 37){ tempT = "<"; } else { if (e.keyCode == 39){ tempT = ">"; } else { if (e.keyCode == 32){ tempT = "Space"; } else { if (e.keyCode == 16){ tempT = "Shift"; } else { if (e.keyCode == 17){ tempT = "Control"; } else { tempT = String.fromCharCode(e.keyCode); }; }; }; }; }; }; }; bJ._onT = new FlxText(10, 9, 100, 16, ("Shoot: " + tempT), 0, null); bJ._offT = new FlxText(10, 9, 100, 16, ("Shoot: " + tempT), 0, null); stage.removeEventListener(KeyboardEvent.KEY_DOWN, changek6); } private function changek2(e:KeyboardEvent):void{ FlxG.KEYCONTROL.ChangeKey("Down", e.keyCode); if (e.keyCode == 38){ tempT = "/\\"; } else { if (e.keyCode == 40){ tempT = "\\/"; } else { if (e.keyCode == 37){ tempT = "<"; } else { if (e.keyCode == 39){ tempT = ">"; } else { if (e.keyCode == 32){ tempT = "Space"; } else { if (e.keyCode == 16){ tempT = "Shift"; } else { if (e.keyCode == 17){ tempT = "Control"; } else { tempT = String.fromCharCode(e.keyCode); }; }; }; }; }; }; }; bS._onT = new FlxText(10, 9, 100, 16, ("Down: " + tempT), 0, null); bS._offT = new FlxText(10, 9, 100, 16, ("Down: " + tempT), 0, null); stage.removeEventListener(KeyboardEvent.KEY_DOWN, changek2); } private function changek4(e:KeyboardEvent):void{ FlxG.KEYCONTROL.ChangeKey("Left", e.keyCode); if (e.keyCode == 38){ tempT = "/\\"; } else { if (e.keyCode == 40){ tempT = "\\/"; } else { if (e.keyCode == 37){ tempT = "<"; } else { if (e.keyCode == 39){ tempT = ">"; } else { if (e.keyCode == 32){ tempT = "Space"; } else { if (e.keyCode == 16){ tempT = "Shift"; } else { if (e.keyCode == 17){ tempT = "Control"; } else { tempT = String.fromCharCode(e.keyCode); }; }; }; }; }; }; }; bA._onT = new FlxText(10, 9, 100, 16, ("Left: " + tempT), 0, null); bA._offT = new FlxText(10, 9, 100, 16, ("Left: " + tempT), 0, null); stage.removeEventListener(KeyboardEvent.KEY_DOWN, changek4); } private function back():void{ FlxG.FlxSave.data.key1 = FlxG.KEYCONTROL.KEYS[0].kCode; FlxG.FlxSave.data.key2 = FlxG.KEYCONTROL.KEYS[1].kCode; FlxG.FlxSave.data.key3 = FlxG.KEYCONTROL.KEYS[2].kCode; FlxG.FlxSave.data.key4 = FlxG.KEYCONTROL.KEYS[3].kCode; FlxG.FlxSave.data.key5 = FlxG.KEYCONTROL.KEYS[4].kCode; FlxG.FlxSave.data.key6 = FlxG.KEYCONTROL.KEYS[5].kCode; FlxG.FlxSave.data.jumpr = FlxG.jumpR; FlxG.FlxSave.flush(); FlxG.play(SndHit2); FlxG.flash(4292406178, 0.5); FlxG.fade(4279442459, 0.5, onFade); } private function changek1(e:KeyboardEvent):void{ FlxG.KEYCONTROL.ChangeKey("Up", e.keyCode); if (e.keyCode == 38){ tempT = "/\\"; } else { if (e.keyCode == 40){ tempT = "\\/"; } else { if (e.keyCode == 37){ tempT = "<"; } else { if (e.keyCode == 39){ tempT = ">"; } else { if (e.keyCode == 32){ tempT = "Space"; } else { if (e.keyCode == 16){ tempT = "Shift"; } else { if (e.keyCode == 17){ tempT = "Control"; } else { tempT = String.fromCharCode(e.keyCode); }; }; }; }; }; }; }; bW._onT = new FlxText(10, 9, 100, 16, ("Up: " + tempT), 0, null); bW._offT = new FlxText(10, 9, 100, 16, ("Up: " + tempT), 0, null); stage.removeEventListener(KeyboardEvent.KEY_DOWN, changek1); } } }//package com.adamatomic.Mode
Section 105
//OptionsState_But (com.adamatomic.Mode.OptionsState_But) package com.adamatomic.Mode { import mx.core.*; public class OptionsState_But extends BitmapAsset { } }//package com.adamatomic.Mode
Section 106
//OptionsState_ImgCursor (com.adamatomic.Mode.OptionsState_ImgCursor) package com.adamatomic.Mode { import mx.core.*; public class OptionsState_ImgCursor extends BitmapAsset { } }//package com.adamatomic.Mode
Section 107
//OptionsState_mLogo (com.adamatomic.Mode.OptionsState_mLogo) package com.adamatomic.Mode { import mx.core.*; public class OptionsState_mLogo extends BitmapAsset { } }//package com.adamatomic.Mode
Section 108
//OptionsState_SndHit2 (com.adamatomic.Mode.OptionsState_SndHit2) package com.adamatomic.Mode { import mx.core.*; public class OptionsState_SndHit2 extends SoundAsset { } }//package com.adamatomic.Mode
Section 109
//Platform (com.adamatomic.Mode.Platform) package com.adamatomic.Mode { import flash.display.*; import flash.geom.*; import com.adamatomic.flixel.*; public class Platform extends FlxBlock { public var _axis:int; public var moved:Number;// = 0 private var _pixels:BitmapData; private var _waiting:Number;// = 0 private var _direction:int; private var _min:Number; private var _wait:Number; private var SndCrusher:Class; private var _max:Number; private var _speedPos:Number; private var _speedNeg:Number; private var _p:Point; private var ImgPlatform:Class; private var _r:Rectangle; public static var AXIS_X:int = 0; public static var AXIS_Y:int = 1; public function Platform(arg1:Number, arg2:Number, arg3:Number, arg4:Number, arg5:int, arg6:int, arg7:Number, arg8:Number, arg9, arg10:Number, arg11:Class=null){ ImgPlatform = Platform_ImgPlatform; super(arg1, arg2, arg3, arg4, null, 0, 0); _p = new Point(); _r = new Rectangle(0, 0, width, height); _pixels = FlxG.addBitmap((arg11) ? arg11 : ImgPlatform); _axis = arg5; _direction = arg6; _min = arg7; _max = arg8; _speedNeg = ((arg9 as Number)) ? arg9 : arg9[0]; _speedPos = ((arg9 as Number)) ? arg9 : arg9[1]; _wait = arg10; } override public function update():void{ var loc2:*; var loc1:*; loc2 = NaN; 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; }; loc1 = FlxG.elapsed; if (_waiting > 0){ _waiting = (_waiting - loc1); loc1 = Math.abs(_waiting); }; if (_waiting <= 0){ loc2 = ((_axis)!==AXIS_X) ? y : x; moved = ((_direction * ((_direction < 0)) ? _speedNeg : _speedPos) * loc1); loc2 = (loc2 + moved); if (_direction < 0){ if (loc2 < _min){ _direction = 1; if (_wait){ _waiting = _wait; }; }; } else { if (loc2 > _max){ if (height === 64){ FlxG.quake(0.0025, 0.2); }; moved = (moved - (loc2 - _max)); loc2 = _max; _direction = -1; if (_wait){ _waiting = _wait; }; }; }; this[((_axis)!==AXIS_X) ? "y" : "x"] = loc2; }; super.update(); } override public function render():void{ if (!visible){ return; }; getScreenXY(_p); FlxG.buffer.copyPixels(_pixels, _r, _p, null, null, true); } AXIS_X = 0; AXIS_Y = 1; } }//package com.adamatomic.Mode
Section 110
//Platform_ImgPlatform (com.adamatomic.Mode.Platform_ImgPlatform) package com.adamatomic.Mode { import mx.core.*; public class Platform_ImgPlatform extends BitmapAsset { } }//package com.adamatomic.Mode
Section 111
//Player (com.adamatomic.Mode.Player) package com.adamatomic.Mode { import com.adamatomic.flixel.*; public class Player extends FlxSprite { private var _down:Boolean; public var padre; private var _jumpPower:int; private var SndJam:Class; private var _gibs:FlxEmitter; private var autolvl:int;// = 5 public var _fuel:int; private var SndJump:Class; private var _jumping:Boolean;// = false private var _up:Boolean; private var _bulletVel:int; public var _maxhealth:uint;// = 5 private var _boosters:Boolean; private var shotimer:int;// = 0 public var Plat:Boolean;// = false private var SndLand:Class; public var varjump:Boolean;// = false private var ImgSpaceman:Class; private var SndExplode:Class; private var _jets:FlxEmitter; private var SndExplode2:Class; public var _maxfuel:int; private var maxstime:int;// = 20 private var _restart:Number; private var _curBullet:uint; private var _canjet:Boolean;// = false private var _bullets:FlxArray; private var ImgGibs:Class; private var SndHurt:Class; private var ImgJet:Class; public function Player(X:int, Y:int, Bullets:FlxArray){ ImgSpaceman = Player_ImgSpaceman; ImgGibs = Player_ImgGibs; SndJump = Player_SndJump; SndLand = Player_SndLand; SndExplode = Player_SndExplode; SndExplode2 = Player_SndExplode2; SndHurt = Player_SndHurt; SndJam = Player_SndJam; ImgJet = Player_ImgJet; super(ImgSpaceman, X, Y, true, true, 14, 12); _restart = 0; varjump = FlxG.jumpR; autolvl = FlxG.autolv; switch (autolvl){ case 1: maxstime = 30; break; case 2: maxstime = 20; break; case 3: maxstime = 15; break; case 4: maxstime = 10; break; case 5: maxstime = 7; break; }; switch (FlxG.lifel){ case 1: _maxhealth = 5; break; case 2: _maxhealth = 7; break; case 3: _maxhealth = 9; break; case 4: _maxhealth = 11; break; case 5: _maxhealth = 15; break; }; health = _maxhealth; switch (FlxG.jumpl){ case 1: _jumpPower = 150; break; case 2: _jumpPower = 180; break; case 3: _jumpPower = 210; break; case 4: _jumpPower = 240; break; case 5: _jumpPower = 270; break; }; if (FlxG.jetl > 1){ _maxfuel = (FlxG.jetl * 150); } else { _maxfuel = 0; }; _fuel = _maxfuel; _jets = (FlxG.state.add(new FlxEmitter(0, 0, 0, 0, null, 0.01, -10, 10, 20, 50, 0, 0, 0, 0, ImgJet, 15)) as FlxEmitter); _jets.y = -15; _jets.kill(); width = 12; height = 12; offset.x = 1; offset.y = 0; var runSpeed:uint = 80; drag.x = (runSpeed * 8); acceleration.y = 420; maxVelocity.x = runSpeed; maxVelocity.y = _jumpPower; addAnimation("idle", [0]); addAnimation("run", [1, 2, 3, 4, 5, 6], 12); addAnimation("jump", [6]); addAnimation("idle_up", [7]); addAnimation("run_up", [10, 11, 12, 13], 12); addAnimation("jump_up", [8]); addAnimation("jump_down", [9]); _bullets = Bullets; _curBullet = 0; _bulletVel = 360; _gibs = (FlxG.state.add(new FlxEmitter(0, 0, 0, 0, null, -1.5, -150, 150, -200, 0, -720, 720, 400, 0, ImgGibs, 60, true)) as FlxEmitter); } override public function hurt(Damage:Number):void{ Damage = 1; if (flickering()){ return; }; FlxG.play(SndHurt); flicker(1.3); if (FlxG.score > 1000){ FlxG.score = (FlxG.score - 1000); }; if (velocity.x > 0){ velocity.x = -(maxVelocity.x); } else { velocity.x = maxVelocity.x; }; super.hurt(Damage); } override public function hitFloor(spr=null):Boolean{ if ((spr as Platform)){ if (spr._axis == 0){ x = (x + (spr as Platform).moved); } else { y = (y + (spr as Platform).moved); velocity.y = -(_jumpPower); }; Plat = true; } else { Plat = false; }; _canjet = false; if (velocity.y > 50){ FlxG.play(SndLand); }; return (super.hitFloor()); } override public function update():void{ if (dead){ _restart = (_restart + FlxG.elapsed); if (_restart > 2){ FlxG.switchState(PlayStateTiles); }; return; }; if (_fuel <= 0){ _jets.kill(); }; if (((((FlxG.pressed("aKey")) && ((velocity.y >= -40)))) && (_canjet))){ _boosters = true; _jets.reset(); }; if (((_boosters) && (!(FlxG.pressed("aKey"))))){ _boosters = false; _jets.kill(); }; if (((_boosters) && ((_fuel > 0)))){ velocity.y = -70; _fuel = (_fuel + -10); _jets.y = (this.y + 3); _jets.x = (this.x + 3); }; if (((!(_boosters)) && ((_fuel < _maxfuel)))){ _fuel = (_fuel + 20); if (_fuel > _maxfuel){ _fuel = _maxfuel; }; }; if (((FlxG.justReleased("aKey")) && (_canjet))){ _canjet = false; }; if (((FlxG.justReleased("aKey")) && (_jumping))){ _canjet = true; _jumping = false; if (varjump){ if (FlxG.jumpl > 1){ if (velocity.y < 25){ velocity.y = -25; } else { if (velocity.y < -10){ velocity.y = -10; }; }; }; }; }; acceleration.x = 0; if (FlxG.pressed("Left")){ facing = LEFT; acceleration.x = (acceleration.x - drag.x); } else { if (FlxG.pressed("Right")){ facing = RIGHT; acceleration.x = (acceleration.x + drag.x); }; }; if (((((FlxG.justPressed("aKey")) && (!(velocity.y)))) || (((FlxG.justPressed("aKey")) && ((Plat == true)))))){ velocity.y = -(_jumpPower); FlxG.play(SndJump); Plat = false; _jumping = true; }; _up = false; _down = false; if (FlxG.pressed("Up")){ _up = true; } else { if (((FlxG.pressed("Down")) && (velocity.y))){ _down = true; }; }; if (velocity.y != 0){ if (_up){ play("jump_up"); } else { if (_down){ play("jump_down"); } else { play("jump"); }; }; } else { if (velocity.x == 0){ if (_up){ play("idle_up"); } else { play("idle"); }; } else { if (_up){ play("run_up"); } else { play("run"); }; }; }; super.update(); if (((FlxG.pressed("bKey")) && ((autolvl > 0)))){ if (shotimer == 0){ dispara(); shotimer = maxstime; } else { shotimer--; }; } else { if (FlxG.justPressed("bKey")){ dispara(); } else { shotimer = 0; }; }; } override public function kill():void{ if (dead){ return; }; FlxG.lmoney = 0; FlxG.play(SndExplode); FlxG.play(SndExplode2); super.kill(); flicker(-1); exists = true; visible = false; FlxG.quake(0.005, 0.35); FlxG.flash(4292406178, 0.35); _gibs.x = (x + (width / 2)); _gibs.y = (y + (height / 2)); _gibs.reset(); } private function dispara():void{ var bXVel:int; var bYVel:int; var bX:int = (x + 4); var bY:int = (y + 4); var dir:uint; if (_up){ bY = (bY - (_bullets[_curBullet].height - 4)); bYVel = -(_bulletVel); dir = 1; } else { if (_down){ bY = (bY + (height - 4)); bYVel = _bulletVel; dir = 2; } else { if (facing == RIGHT){ bX = (bX + (width - 4)); bXVel = _bulletVel; dir = 3; } else { bX = (bX - (_bullets[_curBullet].width - 4)); bXVel = -(_bulletVel); dir = 4; }; }; }; _bullets[_curBullet].shoot(bX, bY, bXVel, bYVel); padre.flas(dir); if (++_curBullet >= _bullets.length){ _curBullet = 0; }; } } }//package com.adamatomic.Mode
Section 112
//Player_ImgGibs (com.adamatomic.Mode.Player_ImgGibs) package com.adamatomic.Mode { import mx.core.*; public class Player_ImgGibs extends BitmapAsset { } }//package com.adamatomic.Mode
Section 113
//Player_ImgJet (com.adamatomic.Mode.Player_ImgJet) package com.adamatomic.Mode { import mx.core.*; public class Player_ImgJet extends BitmapAsset { } }//package com.adamatomic.Mode
Section 114
//Player_ImgSpaceman (com.adamatomic.Mode.Player_ImgSpaceman) package com.adamatomic.Mode { import mx.core.*; public class Player_ImgSpaceman extends BitmapAsset { } }//package com.adamatomic.Mode
Section 115
//Player_SndExplode (com.adamatomic.Mode.Player_SndExplode) package com.adamatomic.Mode { import mx.core.*; public class Player_SndExplode extends SoundAsset { } }//package com.adamatomic.Mode
Section 116
//Player_SndExplode2 (com.adamatomic.Mode.Player_SndExplode2) package com.adamatomic.Mode { import mx.core.*; public class Player_SndExplode2 extends SoundAsset { } }//package com.adamatomic.Mode
Section 117
//Player_SndHurt (com.adamatomic.Mode.Player_SndHurt) package com.adamatomic.Mode { import mx.core.*; public class Player_SndHurt extends SoundAsset { } }//package com.adamatomic.Mode
Section 118
//Player_SndJam (com.adamatomic.Mode.Player_SndJam) package com.adamatomic.Mode { import mx.core.*; public class Player_SndJam extends SoundAsset { } }//package com.adamatomic.Mode
Section 119
//Player_SndJump (com.adamatomic.Mode.Player_SndJump) package com.adamatomic.Mode { import mx.core.*; public class Player_SndJump extends SoundAsset { } }//package com.adamatomic.Mode
Section 120
//Player_SndLand (com.adamatomic.Mode.Player_SndLand) package com.adamatomic.Mode { import mx.core.*; public class Player_SndLand extends SoundAsset { } }//package com.adamatomic.Mode
Section 121
//PlayStateTiles (com.adamatomic.Mode.PlayStateTiles) package com.adamatomic.Mode { import com.adamatomic.flixel.*; public class PlayStateTiles extends FlxState { private var _player:Player; private var coinsts:FlxText; public var _coins:FlxArray; public var fuel_bar; private var TxtMap10:Class; private var TxtMap11:Class; private var TxtMap12:Class; private var TxtMap13:Class; private var TxtMap14:Class; public var _extra:Boolean;// = false private var distxe:int; private var ImgFlash:Class; private var _score2Shadow:FlxText; private var _jamText:FlxText; private var _ok2:Boolean;// = false public var bvol:Boolean;// = false private var distye:int; private var aperror:Boolean;// = false public var efound:Boolean; private var backG:Class; private var _timerkilled:int;// = 0 private var _fading:Boolean; public var bfound:Boolean; private var _tilemap2:FlxTilemap; private var f; public var fdir:uint; private var _spawners:FlxArray; private var _bots:FlxArray; private var _bullets:FlxArray; private var _scoreTimer:Number; public var flax; public var _numenemies:int; public var flexa; private var _botBullets:FlxArray; private var SndMode:Class; private var lvlh:int;// = 0 private var ImgNotch:Class; public var flaxt:uint;// = 0 public var fuel_barf; private var _jamText2:FlxText; private var apunt_ene:int;// = 0 private var ImgTiles:Class; private var lvlw:int;// = 0 private var _blocks:FlxArray; private var ImgBlock:Class; private var _score:FlxText; private var diste:int; private var _tilemap:FlxTilemap; public var _maxbots:int; private var coinst:FlxText; private var _scoreShadow:FlxText; private var ImgPlatform2:Class; public var _money:int;// = 0 private var TxtMap1:Class; private var TxtMap2:Class; private var TxtMap3:Class; private var TxtMap4:Class; private var TxtMap5:Class; private var TxtMap6:Class; private var TxtMap7:Class; private var TxtMap8:Class; private var TxtMap9:Class; public var _numbots:int; public var _maxenemies:int; private var _notches:FlxArray; private var _platforms:FlxArray; private var _e:FlxArray; private var LaFlexa:Class; public var flexa_on:Boolean;// = false private var _score2:FlxText; public function PlayStateTiles():void{ var i:uint; var tmp:FlxSprite; SndMode = PlayStateTiles_SndMode; TxtMap1 = PlayStateTiles_TxtMap1; TxtMap2 = PlayStateTiles_TxtMap2; TxtMap3 = PlayStateTiles_TxtMap3; TxtMap4 = PlayStateTiles_TxtMap4; TxtMap5 = PlayStateTiles_TxtMap5; TxtMap6 = PlayStateTiles_TxtMap6; TxtMap7 = PlayStateTiles_TxtMap7; TxtMap8 = PlayStateTiles_TxtMap8; TxtMap9 = PlayStateTiles_TxtMap9; TxtMap10 = PlayStateTiles_TxtMap10; TxtMap11 = PlayStateTiles_TxtMap11; TxtMap12 = PlayStateTiles_TxtMap12; TxtMap13 = PlayStateTiles_TxtMap13; TxtMap14 = PlayStateTiles_TxtMap14; ImgTiles = PlayStateTiles_ImgTiles; ImgBlock = PlayStateTiles_ImgBlock; backG = PlayStateTiles_backG; ImgNotch = PlayStateTiles_ImgNotch; ImgFlash = PlayStateTiles_ImgFlash; ImgPlatform2 = PlayStateTiles_ImgPlatform2; LaFlexa = PlayStateTiles_LaFlexa; super(); _bullets = new FlxArray(); _botBullets = new FlxArray(); _bots = new FlxArray(); _spawners = new FlxArray(); _coins = new FlxArray(); _e = new FlxArray(); _blocks = new FlxArray(); _platforms = new FlxArray(); switch (FlxG.level){ case 1: lvlw = 1200; lvlh = 400; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(null, 0, 0, false, false, lvlw, lvlh, 4287022037)); _player = new Player((3 * 16), (21 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap1(), ImgTiles, 29, 1, this, 1); _coins.add(this.add(new Coin(71, 11, 1, 3, this))); _spawners.add(this.add(new Spawner((26 * 16), (10 * 16), _bots, _botBullets, _player, 5, 20, this, 1))); _spawners.add(this.add(new Spawner((58 * 16), (17 * 16), _e, _botBullets, _player, 7, 30, this, 2))); _platforms.add(this.add(new Platform((46 * 16), (13 * 16), 32, 8, Platform.AXIS_Y, -1, (13 * 16), (21 * 16), 40, 2))); _platforms.add(this.add(new Platform((67 * 16), (13 * 16), 32, 8, Platform.AXIS_Y, -1, (13 * 16), (21 * 16), 40, 2))); this.add(new FlxText((3 * 16), (18 * 16), 300, 16, "You can destroy this block. Shoot at it!!", 0, null, 7)); this.add(new FlxText((59 * 16), (10 * 16), 300, 16, "Try to get the hidden star of each level!", 0, null, 7)); this.add(new FlxText((2 * 16), (19 * 16), 400, 16, "You must kill all the enemies and destroy the generators to complete the level!", 0, null, 7)); f = new FlxText((4 * 16), (23 * 16), 410, 300, "You can keep the Shoot Button pressed to Auto-Shoot, and upgrade the Auto-Gun lvl for Faster Speed!!!", 0, null, 8, "left"); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 2: lvlw = 800; lvlh = 800; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(backG, 0, 0, false, false, lvlw, lvlh, 0)); _player = new Player((3 * 16), (42 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap2(), ImgTiles, 29, 1, this, 2); _coins.add(this.add(new Coin(47, 30, 1, 3, this))); _spawners.add(this.add(new Spawner((45 * 16), (30 * 16), _bots, _botBullets, _player, 5, 20, this, 1))); _spawners.add(this.add(new Spawner((18 * 16), (6 * 16), _e, _botBullets, _player, 7, 30, this, 2))); _platforms.add(this.add(new Platform((36 * 16), (31 * 16), 32, 8, Platform.AXIS_X, -1, (28 * 16), (36 * 16), 40, 2))); _platforms.add(this.add(new Platform((2 * 16), (39 * 16), 32, 8, Platform.AXIS_Y, -1, (7 * 16), (39 * 16), 40, 2))); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 3: lvlw = 800; lvlh = 800; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(null, 0, 0, false, false, lvlw, lvlh, 4287022037)); _player = new Player((2 * 16), (42 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap3(), ImgTiles, 29, 1, this, 3); _coins.add(this.add(new Coin(24, 25, 1, 3, this))); _spawners.add(this.add(new Spawner((23 * 16), (23 * 16), _bots, _botBullets, _player, 5, 20, this, 1))); _spawners.add(this.add(new Spawner((45 * 16), (17 * 16), _e, _botBullets, _player, 7, 30, this, 2))); _spawners.add(this.add(new Spawner((21 * 16), (25 * 16), _e, _botBullets, _player, 7, 30, this, 2))); _platforms.add(this.add(new Platform((13 * 16), (28 * 16), 32, 8, Platform.AXIS_X, -1, (13 * 16), (18 * 16), 40, 2))); _platforms.add(this.add(new Platform((23 * 16), (29 * 16), 32, 8, Platform.AXIS_Y, -1, (29 * 16), (37 * 16), 40, 2))); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 4: lvlw = 800; lvlh = 1200; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(null, 0, 0, false, false, lvlw, lvlh, 4287022037)); _player = new Player((3 * 16), (66 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap4(), ImgTiles, 29, 1, this, 3); _coins.add(this.add(new Coin(41, 49, 1, 3, this))); _spawners.add(this.add(new Spawner((25 * 16), (18 * 16), _bots, _botBullets, _player, 5, 20, this, 1))); _spawners.add(this.add(new Spawner((12 * 16), (54 * 16), _e, _botBullets, _player, 7, 30, this, 2))); _platforms.add(this.add(new Platform((16 * 16), (62 * 16), 32, 8, Platform.AXIS_X, -1, (16 * 16), (24 * 16), 40, 2))); _platforms.add(this.add(new Platform((20 * 16), (60 * 16), 32, 8, Platform.AXIS_X, -1, (20 * 16), (25 * 16), 40, 2))); _platforms.add(this.add(new Platform((18 * 16), (58 * 16), 32, 8, Platform.AXIS_X, -1, (18 * 16), (23 * 16), 40, 2))); _platforms.add(this.add(new Platform((19 * 16), (56 * 16), 32, 8, Platform.AXIS_X, -1, (19 * 16), (27 * 16), 40, 2))); _platforms.add(this.add(new Platform((21 * 16), (54 * 16), 32, 8, Platform.AXIS_X, -1, (21 * 16), (29 * 16), 40, 2))); _platforms.add(this.add(new Platform((13 * 16), (39 * 16), 32, 8, Platform.AXIS_Y, -1, (39 * 16), (54 * 16), 40, 2))); _platforms.add(this.add(new Platform((31 * 16), (28 * 16), 32, 8, Platform.AXIS_Y, -1, (28 * 16), (54 * 16), 40, 2))); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 5: lvlw = 800; lvlh = 800; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(null, 0, 0, false, false, lvlw, lvlh, 4287022037)); _player = new Player((23 * 16), (23 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap5(), ImgTiles, 29, 1, this, 5); _coins.add(this.add(new Coin(41, 49, 1, 3, this))); _spawners.add(this.add(new Spawner((8 * 16), (6 * 16), _bots, _botBullets, _player, 5, 20, this, 1))); _spawners.add(this.add(new Spawner((23 * 16), (14 * 16), _e, _botBullets, _player, 7, 30, this, 2, 1))); _spawners.add(this.add(new Spawner((45 * 16), (34 * 16), _e, _botBullets, _player, 7, 30, this, 2, 2))); _platforms.add(this.add(new Platform((6 * 16), (35 * 16), 32, 8, Platform.AXIS_X, -1, (6 * 16), (27 * 16), 40, 2))); _platforms.add(this.add(new Platform((14 * 16), (10 * 16), 32, 8, Platform.AXIS_Y, -1, (10 * 16), (26 * 16), 40, 2))); _platforms.add(this.add(new Platform((30 * 16), (26 * 16), 32, 8, Platform.AXIS_Y, -1, (26 * 16), (39 * 16), 40, 2))); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 6: lvlw = 1200; lvlh = 480; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(null, 0, 0, false, false, lvlw, lvlh, 4287022037)); _player = new Player((42 * 16), (17 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap6(), ImgTiles, 29, 1, this, 6); _coins.add(this.add(new Coin(56, 17, 1, 3, this))); _spawners.add(this.add(new Spawner((33 * 16), (4 * 16), _bots, _botBullets, _player, 5, 20, this, 1))); _spawners.add(this.add(new Spawner((49 * 16), (7 * 16), _e, _botBullets, _player, 7, 30, this, 2, 3))); _spawners.add(this.add(new Spawner((7 * 16), (19 * 16), _e, _botBullets, _player, 7, 30, this, 2, 2))); _spawners.add(this.add(new Spawner((65 * 16), (11 * 16), _e, _botBullets, _player, 10, 50, this, 2, 3))); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 7: lvlw = 400; lvlh = 1200; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(null, 0, 0, false, false, lvlw, lvlh, 4287022037)); _player = new Player((12 * 16), (4 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap7(), ImgTiles, 29, 1, this, 6); _coins.add(this.add(new Coin(6, 43, 1, 3, this))); _spawners.add(this.add(new Spawner((18 * 16), (45 * 16), _bots, _botBullets, _player, 5, 20, this, 1))); _spawners.add(this.add(new Spawner((12 * 16), (18 * 16), _e, _botBullets, _player, 7, 30, this, 2, 3))); _spawners.add(this.add(new Spawner((12 * 16), (9 * 16), _e, _botBullets, _player, 7, 30, this, 2, 2))); _spawners.add(this.add(new Spawner((17 * 16), (47 * 16), _e, _botBullets, _player, 10, 50, this, 2, 4))); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 8: lvlw = 1200; lvlh = 400; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(null, 0, 0, false, false, lvlw, lvlh, 4287022037)); _player = new Player((3 * 16), (10 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap8(), ImgTiles, 29, 1, this, 8); _coins.add(this.add(new Coin(56, 16, 1, 3, this))); _spawners.add(this.add(new Spawner((70 * 16), (9 * 16), _bots, _botBullets, _player, 5, 20, this, 1, 2))); _spawners.add(this.add(new Spawner((24 * 16), (5 * 16), _e, _botBullets, _player, 7, 30, this, 2, 3))); _spawners.add(this.add(new Spawner((22 * 16), (13 * 16), _e, _botBullets, _player, 7, 50, this, 2, 2))); _spawners.add(this.add(new Spawner((53 * 16), (5 * 16), _e, _botBullets, _player, 10, 30, this, 2, 1))); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 9: lvlw = 800; lvlh = 800; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(null, 0, 0, false, false, lvlw, lvlh, 4287022037)); _player = new Player((4 * 16), (21 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap9(), ImgTiles, 29, 1, this, 8); _coins.add(this.add(new Coin(43, 14, 1, 3, this))); _spawners.add(this.add(new Spawner((33 * 16), (9 * 16), _bots, _botBullets, _player, 5, 20, this, 1, 2))); _spawners.add(this.add(new Spawner((55 * 16), (14 * 16), _e, _botBullets, _player, 7, 30, this, 2, 3))); _spawners.add(this.add(new Spawner((70 * 16), (5 * 16), _e, _botBullets, _player, 7, 50, this, 2, 4))); _spawners.add(this.add(new Spawner((61 * 16), (16 * 16), _e, _botBullets, _player, 10, 30, this, 2, 1))); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 10: lvlw = 480; lvlh = 480; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(null, 0, 0, false, false, lvlw, lvlh, 4287022037)); _player = new Player((4 * 16), (21 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap10(), ImgTiles, 29, 1, this, 8); _coins.add(this.add(new Coin(10, 8, 1, 3, this))); _spawners.add(this.add(new Spawner((5 * 16), (12 * 16), _bots, _botBullets, _player, 5, 20, this, 1, 1))); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 11: lvlw = 800; lvlh = 800; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(backG, 0, 0, false, false, lvlw, lvlh, 0)); _player = new Player((6 * 16), (38 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap11(), ImgTiles, 29, 1, this, 10); _coins.add(this.add(new Coin(16, 6, 1, 3, this))); _spawners.add(this.add(new Spawner((20 * 16), (25 * 16), _bots, _botBullets, _player, 5, 20, this, 2))); _spawners.add(this.add(new Spawner((12 * 16), (28 * 16), _e, _botBullets, _player, 7, 30, this, 4))); _platforms.add(this.add(new Platform((36 * 16), (31 * 16), 32, 8, Platform.AXIS_X, -1, (28 * 16), (36 * 16), 40, 2))); _platforms.add(this.add(new Platform((2 * 16), (39 * 16), 32, 8, Platform.AXIS_Y, -1, (7 * 16), (39 * 16), 40, 2))); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 12: lvlw = 480; lvlh = 480; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(null, 0, 0, false, false, lvlw, lvlh, 4287022037)); _player = new Player((4 * 16), (10 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap12(), ImgTiles, 29, 1, this, 6); _coins.add(this.add(new Coin(5, 3, 1, 3, this))); _spawners.add(this.add(new Spawner((5 * 16), (9 * 16), _bots, _botBullets, _player, 5, 20, this, 1, 3))); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 13: lvlw = 1200; lvlh = 400; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(null, 0, 0, false, false, lvlw, lvlh, 4287022037)); _player = new Player((40 * 16), (21 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap13(), ImgTiles, 29, 1, this, 1); _coins.add(this.add(new Coin(55, 13, 1, 3, this))); _spawners.add(this.add(new Spawner((41 * 16), (12 * 16), _bots, _botBullets, _player, 5, 20, this, 1, 2))); FlxG.followBounds(0, 0, lvlw, lvlh); break; case 14: lvlw = 400; lvlh = 1200; _maxbots = 2; _maxenemies = 10; this.add(new FlxSprite(null, 0, 0, false, false, lvlw, lvlh, 4287022037)); _player = new Player((12 * 16), (4 * 16), _bullets); _player.padre = this; flax = this.add(new FlxSprite(ImgFlash, -100, -100, false, false, 3, 3)); _tilemap = new FlxTilemap(new TxtMap14(), ImgTiles, 29, 1, this, 6); _coins.add(this.add(new Coin(2, 28, 1, 3, this))); _spawners.add(this.add(new Spawner((18 * 16), (45 * 16), _bots, _botBullets, _player, 5, 20, this, 1, 3))); _spawners.add(this.add(new Spawner((12 * 16), (18 * 16), _e, _botBullets, _player, 7, 30, this, 2, 3))); _spawners.add(this.add(new Spawner((12 * 16), (9 * 16), _e, _botBullets, _player, 7, 30, this, 2, 4))); _spawners.add(this.add(new Spawner((17 * 16), (47 * 16), _e, _botBullets, _player, 10, 50, this, 2, 4))); FlxG.followBounds(0, 0, lvlw, lvlh); break; }; _player.addAnimationCallback(AnimationCallbackTest); i = 0; while (i < 30) { _botBullets.add(this.add(new BotBullet())); i++; }; i = 0; while (i < 12) { _bullets.add(this.add(new Bullet())); i++; }; this.add(_player); FlxG.follow(_player, 2.5); FlxG.followAdjust(0.5, 0); this.add(_tilemap); if (f){ this.add(f); }; FlxG.setMusic(SndMode); FlxG.flash(4279442459); _score = (this.add(new FlxText(((FlxG.width / 2) - 28), 0, 150, 50, ("Score: " + FlxG.score.toString()), 0, null, 8)) as FlxText); _score.scrollFactor.x = (_score.scrollFactor.y = 0); _scoreShadow = (this.add(new FlxText((_score.x + 1), (_score.y + 1), _score.width, _score.height, ("Score: " + FlxG.score.toString()), 0xFFFFFF, null, 8)) as FlxText); _scoreShadow.scrollFactor.x = (_scoreShadow.scrollFactor.y = 0); if (FlxG.scores.length < 2){ FlxG.scores.push(0); FlxG.scores.push(0); }; _notches = new FlxArray(); var tmptext:FlxText = (this.add(new FlxText(0, 1, 150, 50, "Life:", 0, null, 8)) as FlxText); tmptext.scrollFactor.x = (tmptext.scrollFactor.y = 0); tmptext = (this.add(new FlxText(1, 2, 150, 50, "Life:", 0xFFFFFF, null, 8)) as FlxText); tmptext.scrollFactor.x = (tmptext.scrollFactor.y = 0); i = 0; while (i < 10) { tmp = new FlxSprite(ImgNotch, (24 + (i * 11)), 4, true, false, 10, 10); tmp.scrollFactor.x = (tmp.scrollFactor.y = 0); tmp.addAnimation("on", [0]); tmp.addAnimation("off", [1]); tmp.play("on"); _notches.add(this.add(tmp)); i++; }; coinst = (this.add(new FlxText((FlxG.width - 70), 1, 150, 50, "Money: 0", 0, null, 8)) as FlxText); coinst.scrollFactor.x = (coinst.scrollFactor.y = 0); coinsts = (this.add(new FlxText((FlxG.width - 71), 2, 150, 50, "Money: 0", 0xFFFFFF, null, 8)) as FlxText); coinsts.scrollFactor.x = (coinsts.scrollFactor.y = 0); _jamText = (this.add(new FlxText(0, ((FlxG.height / 2) + 20), FlxG.width, 20, "Now kill the remaining monsters!", 0, null, 13, "center")) as FlxText); _jamText.scrollFactor.x = (_jamText.scrollFactor.y = 0); _jamText.visible = false; _jamText2 = (this.add(new FlxText(0, ((FlxG.height / 2) + 21), (FlxG.width + 1), 20, "Now kill the remaining monsters!", 789623, null, 13, "center")) as FlxText); _jamText2.scrollFactor.x = (_jamText2.scrollFactor.y = 0); _jamText2.visible = false; fuel_barf = this.add(new FlxSprite(null, 196, 3, false, false, 49, 9, 4278190080)); fuel_barf.scrollFactor.x = (fuel_barf.scrollFactor.y = 0); fuel_bar = this.add(new FlxSprite(null, (fuel_barf.x + 1), (fuel_barf.y + 1), false, false, 47, 7, 4294938624)); fuel_bar.scrollFactor.x = (fuel_bar.scrollFactor.y = 0); FlxG.quitar = false; fuel_bar.scale.x = 1; fuel_bar.x = ((fuel_barf.x + 1) - (((1 - fuel_bar.scale.x) / 2) * 47)); if (_player._maxfuel == 0){ fuel_barf.scale.x = 0; fuel_bar.scale.x = 0; }; } private function getCoin(coin:FlxSprite, Player:FlxSprite):void{ coin.kill(); } public function mkcoin(_x:int, _y:int, valor:int):void{ _coins.add(this.add(new Coin(_x, _y, valor, 1, this))); } public function mkblok(_x:int, _y:int, valor:int):void{ _blocks.add(this.add(new FlxBlock((_x * 16), (_y * 16), 16, 16, ImgBlock))); } private function botHitPlayer(Bot:FlxSprite, Player:FlxSprite):void{ Player.hurt(1); if (Bot.x > Player.x){ Player.velocity.x = -100; } else { Player.velocity.x = 100; }; } private function onVictory():void{ FlxG.stopMusic(); FlxG.switchState(VictoryState); } public function flas(dir:uint):void{ fdir = dir; if (dir == 1){ flax.x = (_player.x + 4); flax.y = (_player.y - 3); flax.angle = 0; } else { if (dir == 2){ flax.x = (_player.x + 5); flax.y = (_player.y + 15); flax.angle = 180; } else { if (dir == 3){ flax.x = (_player.x + 14); flax.y = (_player.y + 4); flax.angle = 90; } else { if (dir == 4){ flax.x = (_player.x - 2); flax.y = (_player.y + 5); flax.angle = 170; }; }; }; }; flaxt = 9; } public function mkenemi(_x:int, _y:int, valor:int):void{ var tipE:int = (valor - 7); if (tipE < 8){ _e.add(this.add(new Enemy((_x * 16), (_y * 16), _player, this, _botBullets, tipE))); } else { tipE = (tipE - 7); _bots.add(this.add(new Bot((_x * 16), (_y * 16), _botBullets, _player, this, tipE))); }; } private function hitBlock(block:FlxBlock, Bullet:FlxSprite):void{ Bullet.hurt(0); block.hurt(FlxG.arcl); } override public function update():void{ var i:uint; var found:uint; var os:uint = FlxG.score; var lf:int = FlxG.lmoney; if (flaxt > 0){ flaxt--; if (fdir == 1){ flax.x = (_player.x + 4); flax.y = (_player.y - 3); } else { if (fdir == 2){ flax.x = (_player.x + 5); flax.y = (_player.y + 15); } else { if (fdir == 3){ flax.x = (_player.x + 14); flax.y = (_player.y + 4); } else { if (fdir == 4){ flax.x = (_player.x - 2); flax.y = (_player.y + 5); }; }; }; }; } else { flax.x = -100; flax.y = -100; }; super.update(); if (_timerkilled > 1){ _timerkilled--; } else { if (_timerkilled == 1){ _jamText.visible = false; _jamText2.visible = false; _timerkilled = 0; }; }; if (_player._maxfuel > 0){ fuel_bar.scale.x = (_player._fuel / _player._maxfuel); fuel_bar.x = ((fuel_barf.x + 1) - (((1 - fuel_bar.scale.x) / 2) * 47)); if (_player._fuel == _player._maxfuel){ fuel_bar.scale.x = 1; fuel_bar.x = ((fuel_barf.x + 1) - (((1 - fuel_bar.scale.x) / 2) * 47)); }; }; FlxG.collideArray2(_tilemap, _botBullets); FlxG.collideArray2(_tilemap, _bots); FlxG.collideArrays(_blocks, _botBullets); FlxG.collideArrays(_blocks, _bots); FlxG.collideArray(_blocks, _player); FlxG.collideArrays(_blocks, _e); FlxG.collideArray(_platforms, _player); FlxG.collideArrays(_platforms, _botBullets); FlxG.collideArrays(_platforms, _bots); FlxG.collideArrays(_platforms, _e); FlxG.overlapArrays(_blocks, _bullets, hitBlock); FlxG.overlapArrays(_platforms, _bullets, hitBlock); FlxG.overlapArrays(_bullets, _bots, bulletHitBot); FlxG.overlapArrays(_bullets, _spawners, bulletHitBot); FlxG.overlapArray(_bots, _player, botHitPlayer); FlxG.overlapArray(_spawners, _player, botHitPlayer); FlxG.overlapArray(_botBullets, _player, bulletHitBot); FlxG.overlapArray(_coins, _player, getCoin); FlxG.collideArray2(_tilemap, _bullets); _tilemap.collide(_player); FlxG.collideArray2(_tilemap, _e); FlxG.overlapArray(_e, _player, botHitPlayer); FlxG.overlapArrays(_bullets, _e, bulletHitBot); if (!_fading){ if (FlxG.quitar){ FlxG.quitar = false; _fading = true; FlxG.fade(4278190080, 0.5, onQuit); }; found = 0; i = 0; while (i < _spawners.length) { if (!_spawners[i].dead){ found = (found + 1); }; i = (i + 1); }; //unresolved jump var _slot1 = e; if ((((found == 0)) && ((_ok2 == false)))){ i = 0; while (i < _e.length) { if (!_e[i].dead){ found = (found + 1); }; i = (i + 1); }; //unresolved jump var _slot1 = e; i = 0; while (i < _bots.length) { if (!_bots[i].dead){ found = (found + 1); }; i = (i + 1); }; //unresolved jump var _slot1 = e; _jamText.setText((("Now kill the remaining monsters! (" + found) + ")")); _jamText2.setText((("Now kill the remaining monsters! (" + found) + ")")); _jamText.visible = true; _jamText2.visible = true; _timerkilled = 250; _ok2 = true; flexa = this.add(new FlxSprite(LaFlexa, _player.x, _player.y, false, false)); flexa_on = true; }; if (flexa_on){ flexa.x = ((_player.x - 14) + 7); flexa.y = ((_player.y - 14) + 6); if (bvol){ if (((_bots[apunt_ene].dead) || (!(_bots[apunt_ene])))){ diste = 0; }; } else { if (((_e[apunt_ene].dead) || (!(_e[apunt_ene])))){ diste = 0; }; }; x = 0; while (x < (_bots.length - 1)) { if (((((_bots[x]) && (_bots[x].exists))) && ((_bots[x].dead == false)))){ if (_player.y > _bots[x].y){ distye = (_player.y - _bots[x].y); } else { distye = (_bots[x].y - _player.y); }; if (_player.x > _bots[x].x){ distxe = (_player.x - _bots[x].x); } else { distxe = (_bots[x].x - _player.x); }; if ((((diste == 0)) || (aperror))){ aperror = false; diste = Math.sqrt((Math.pow(distye, 2) + Math.pow(distxe, 2))); apunt_ene = x; bvol = true; } else { if ((((((Math.sqrt((Math.pow(distye, 2) + Math.pow(distxe, 2))) < diste)) || (((!(_bots[apunt_ene])) && (bvol))))) || ((((_bots[apunt_ene].dead == true)) && (bvol))))){ diste = Math.sqrt((Math.pow(distye, 2) + Math.pow(distxe, 2))); apunt_ene = x; bvol = true; } else { if ((((x == apunt_ene)) && (bvol))){ diste = Math.sqrt((Math.pow(distye, 2) + Math.pow(distxe, 2))); }; }; }; }; x++; }; x = 0; while (x < (_e.length - 1)) { if (((((_e[x]) && ((_e[x].dead == false)))) && (_e[x].exists))){ if (_player.y > _e[x].y){ distye = (_player.y - _e[x].y); } else { distye = (_e[x].y - _player.y); }; if (_player.x > _e[x].x){ distxe = (_player.x - _e[x].x); } else { distxe = (_e[x].x - _player.x); }; if ((((diste == 0)) || (aperror))){ aperror = false; diste = Math.sqrt((Math.pow(distye, 2) + Math.pow(distxe, 2))); apunt_ene = x; bvol = false; } else { if ((((((Math.sqrt((Math.pow(distye, 2) + Math.pow(distxe, 2))) < diste)) || (((!(_e[apunt_ene])) && (!(bvol)))))) || ((((_e[apunt_ene].dead == true)) && (!(bvol)))))){ diste = Math.sqrt((Math.pow(distye, 2) + Math.pow(distxe, 2))); apunt_ene = x; bvol = false; } else { if ((((x == apunt_ene)) && (!(bvol)))){ diste = Math.sqrt((Math.pow(distye, 2) + Math.pow(distxe, 2))); }; }; }; }; x++; }; trace(apunt_ene); if (bvol){ flexa.angle = (Math.round(((Math.atan2((_bots[apunt_ene].y - _player.y), (_bots[apunt_ene].x - _player.x)) * 180) / Math.PI)) + 90); } else { flexa.angle = (Math.round(((Math.atan2((_e[apunt_ene].y - _player.y), (_e[apunt_ene].x - _player.x)) * 180) / Math.PI)) + 90); }; aperror = false; //unresolved jump var _slot1 = e; diste = 9000; aperror = true; trace(_slot1.message); trace(((((apunt_ene + " _ ") + diste) + "_") + bvol)); }; i = 0; while (i < _e.length) { if (!_e[i].dead){ found = (found + 1); }; i = (i + 1); }; //unresolved jump var _slot1 = e; i = 0; while (i < _bots.length) { if (!_bots[i].dead){ found = (found + 1); }; i = (i + 1); }; //unresolved jump var _slot1 = e; if (found == 0){ _fading = true; flexa_on = false; flexa.alpha = 0; FlxG.fade(4292406178, 3, onVictory); } else { i = 0; while (i < _notches.length) { if (i < _player.health){ _notches[i].play("on"); } else { _notches[i].play("off"); }; i = (i + 1); }; }; if (os != FlxG.score){ if (_player.dead){ FlxG.score = 0; }; _score.setText(("Score: " + FlxG.score.toString())); _scoreShadow.setText(("Score: " + FlxG.score.toString())); }; if (lf != FlxG.lmoney){ if (_player.dead){ _money = Math.round((_money / 2)); }; coinst.setText(("Money: " + FlxG.lmoney.toString())); coinsts.setText(("Money: " + FlxG.lmoney.toString())); }; }; } private function bulletHitBot(Bullet:FlxSprite, Bot:FlxSprite):void{ Bullet.hurt(0); Bot.hurt(FlxG.arcl); } public function heal(cant:int):void{ if (_player.health < ((_player._maxhealth + 1) - cant)){ _player.health = (_player.health + cant); } else { FlxG.score = (FlxG.score + (cant * 10)); }; } private function onQuit():void{ FlxG.stopMusic(); FlxG.switchState(LevelSelectState); } private function AnimationCallbackTest(Name:String, Frame:uint, FrameIndex:uint):void{ FlxG.log(((((("ANIMATION NAME: " + Name) + ", FRAME: ") + Frame) + ", FRAME INDEX: ") + FrameIndex)); } } }//package com.adamatomic.Mode
Section 122
//PlayStateTiles_backG (com.adamatomic.Mode.PlayStateTiles_backG) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_backG extends BitmapAsset { } }//package com.adamatomic.Mode
Section 123
//PlayStateTiles_ImgBlock (com.adamatomic.Mode.PlayStateTiles_ImgBlock) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_ImgBlock extends BitmapAsset { } }//package com.adamatomic.Mode
Section 124
//PlayStateTiles_ImgFlash (com.adamatomic.Mode.PlayStateTiles_ImgFlash) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_ImgFlash extends BitmapAsset { } }//package com.adamatomic.Mode
Section 125
//PlayStateTiles_ImgNotch (com.adamatomic.Mode.PlayStateTiles_ImgNotch) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_ImgNotch extends BitmapAsset { } }//package com.adamatomic.Mode
Section 126
//PlayStateTiles_ImgPlatform2 (com.adamatomic.Mode.PlayStateTiles_ImgPlatform2) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_ImgPlatform2 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 127
//PlayStateTiles_ImgTiles (com.adamatomic.Mode.PlayStateTiles_ImgTiles) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_ImgTiles extends BitmapAsset { } }//package com.adamatomic.Mode
Section 128
//PlayStateTiles_LaFlexa (com.adamatomic.Mode.PlayStateTiles_LaFlexa) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_LaFlexa extends BitmapAsset { } }//package com.adamatomic.Mode
Section 129
//PlayStateTiles_SndMode (com.adamatomic.Mode.PlayStateTiles_SndMode) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_SndMode extends SoundAsset { } }//package com.adamatomic.Mode
Section 130
//PlayStateTiles_TxtMap1 (com.adamatomic.Mode.PlayStateTiles_TxtMap1) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap1 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 131
//PlayStateTiles_TxtMap10 (com.adamatomic.Mode.PlayStateTiles_TxtMap10) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap10 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 132
//PlayStateTiles_TxtMap11 (com.adamatomic.Mode.PlayStateTiles_TxtMap11) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap11 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 133
//PlayStateTiles_TxtMap12 (com.adamatomic.Mode.PlayStateTiles_TxtMap12) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap12 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 134
//PlayStateTiles_TxtMap13 (com.adamatomic.Mode.PlayStateTiles_TxtMap13) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap13 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 135
//PlayStateTiles_TxtMap14 (com.adamatomic.Mode.PlayStateTiles_TxtMap14) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap14 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 136
//PlayStateTiles_TxtMap2 (com.adamatomic.Mode.PlayStateTiles_TxtMap2) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap2 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 137
//PlayStateTiles_TxtMap3 (com.adamatomic.Mode.PlayStateTiles_TxtMap3) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap3 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 138
//PlayStateTiles_TxtMap4 (com.adamatomic.Mode.PlayStateTiles_TxtMap4) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap4 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 139
//PlayStateTiles_TxtMap5 (com.adamatomic.Mode.PlayStateTiles_TxtMap5) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap5 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 140
//PlayStateTiles_TxtMap6 (com.adamatomic.Mode.PlayStateTiles_TxtMap6) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap6 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 141
//PlayStateTiles_TxtMap7 (com.adamatomic.Mode.PlayStateTiles_TxtMap7) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap7 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 142
//PlayStateTiles_TxtMap8 (com.adamatomic.Mode.PlayStateTiles_TxtMap8) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap8 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 143
//PlayStateTiles_TxtMap9 (com.adamatomic.Mode.PlayStateTiles_TxtMap9) package com.adamatomic.Mode { import mx.core.*; public class PlayStateTiles_TxtMap9 extends ByteArrayAsset { } }//package com.adamatomic.Mode
Section 144
//ShopState (com.adamatomic.Mode.ShopState) package com.adamatomic.Mode { import flash.events.*; import com.adamatomic.flixel.*; import mochi.as3.*; import flash.ui.*; import flash.errors.*; public class ShopState extends FlxState { private var SndNeg:Class; private var SndHit:Class; private var SndBuy:Class; private var mochib:FlxButton; private var sl_t:FlxText; private var jl_t:FlxText; private var mLogo:Class; private var fl_t:FlxText; private var p1:FlxText; private var p3:FlxText; private var p4:FlxText; private var p5:FlxText; private var p2:FlxText; private var mont2:FlxText; private var ImgCoin:Class; private var ImgCursor:Class; private var al_t:FlxText; private var But:Class; private var _b:FlxButton; private var SndHit2:Class; private var mont:FlxText; private var pr3:uint; private var pr4:uint; private var pr5:uint; private var ll_t:FlxText; private var pr2:uint; private var But2:Class; private var _ok:Boolean;// = false private var pr1:uint; public function ShopState():void{ But = ShopState_But; But2 = ShopState_But2; SndHit = ShopState_SndHit; SndHit2 = ShopState_SndHit2; SndNeg = ShopState_SndNeg; SndBuy = ShopState_SndBuy; ImgCursor = ShopState_ImgCursor; mLogo = ShopState_mLogo; ImgCoin = ShopState_ImgCoin; super(); var log:FlxSprite = new FlxSprite(mLogo, 0, 0, false, false, 320, 240, 0); this.add(log); FlxG.setCursor(ImgCursor); pr1 = (FlxG.jumpl * 200); pr2 = (FlxG.arcl * 250); pr3 = (FlxG.lifel * 300); pr4 = (FlxG.jetl * 500); pr5 = (FlxG.autolv * 300); if (FlxG.mochiOn){ MochiSocial.showLoginWidget(); MochiSocial.addEventListener(MochiCoins.ITEM_NEW, usargold); }; } private function buy4():void{ if (FlxG.jetl == 5){ FlxG.play(SndNeg); p4.setText("Max"); } else { if (FlxG.money >= pr4){ FlxG.jetl++; FlxG.money = (FlxG.money - pr4); fl_t.setText(FlxG.jetl.toString()); mont.setText(("Money: " + FlxG.money.toString())); mont2.setText(("Money: " + FlxG.money.toString())); FlxG.play(SndBuy); pr4 = (FlxG.jetl * 500); if (FlxG.jetl == 5){ p4.setText("Max"); } else { p4.setText(pr4.toString()); }; FlxG.FlxSave.data.money = FlxG.money; FlxG.FlxSave.data.jetl = FlxG.jetl; FlxG.FlxSave.flush(); } else { FlxG.play(SndNeg); }; }; } private function onFade():void{ MochiSocial.hideLoginWidget(); Mouse.hide(); FlxG.switchState(LevelSelectState); } private function usargold(e:Object):void{ FlxG.money = (FlxG.money + (e.count * e.properties.cantidad)); trace((("\n\n\n\n--------------" + e.properties.cantidad) + "-----------\n\n\n\n")); FlxG.play(SndBuy); mont.setText(("Money: " + FlxG.money.toString())); mont2.setText(("Money: " + FlxG.money.toString())); FlxG.kMouse = false; FlxG.FlxSave.data.money = FlxG.money; FlxG.FlxSave.flush(); } private function buy5():void{ if (FlxG.autolv == 5){ FlxG.play(SndNeg); p5.setText("Max"); } else { if (FlxG.money >= pr5){ FlxG.autolv++; FlxG.money = (FlxG.money - pr5); al_t.setText(FlxG.autolv.toString()); mont.setText(("Money: " + FlxG.money.toString())); mont2.setText(("Money: " + FlxG.money.toString())); FlxG.play(SndBuy); pr5 = (FlxG.autolv * 300); if (FlxG.autolv == 5){ p5.setText("Max"); } else { p5.setText(pr5.toString()); }; FlxG.FlxSave.data.money = FlxG.money; FlxG.FlxSave.data.autolv = FlxG.autolv; FlxG.FlxSave.flush(); } else { FlxG.play(SndNeg); }; }; } override public function update():void{ if (!_ok){ _ok = true; FlxG.flash(4292406178, 0.5); mont = (this.add(new FlxText(250, 5, 100, 20, ("Money: " + FlxG.money.toString()), 0, null, 8, "left")) as FlxText); mont2 = (this.add(new FlxText(251, 6, 100, 20, ("Money: " + FlxG.money.toString()), 15061767, null, 8, "left")) as FlxText); _b = (this.add(new FlxButton(5, 215, new FlxSprite(But, 0, 0, false, false), back, new FlxSprite(But, 0, 0, false, false), new FlxText(20, 8, 100, 16, "Back", 0, null, 10), new FlxText(20, 8, 100, 16, "<--Back", 0, null, 10))) as FlxButton); if (FlxG.mochiOn){ this.add(new FlxText(5, 50, 300, 20, "Get some Gold and buy the best upgrades!", 4294963200, null, 8, "left")); mochib = (this.add(new FlxButton(220, 40, new FlxSprite(But, 0, 0, false, false), buygf, new FlxSprite(But, 0, 0, false, false), new FlxText(18, 8, 100, 16, "Buy Gold!", 1399182, null, 10), new FlxText(18, 8, 100, 16, "¡Buy Gold!", 0, null, 10))) as FlxButton); }; this.add(new FlxText(80, 100, 100, 20, "Jump Level", 0xFFFFFF, null, 8, "left")); jl_t = (this.add(new FlxText(150, 100, 150, 50, ("" + FlxG.jumpl), 0xFFFFFF, null, 8)) as FlxText); _b = (this.add(new FlxButton(160, 96, new FlxSprite(But2, 0, 0, false, false), buy1, new FlxSprite(But2, 0, 0, false, false), new FlxText(10, 2, 100, 16, "Buy", 1399182, null, 10), new FlxText(10, 2, 100, 16, "Buy", 0, null, 10))) as FlxButton); this.add(new FlxSprite(ImgCoin, 205, 100, false, false)); p1 = (this.add(new FlxText(215, 99, 100, 20, pr1.toString(), 0xFFFFFF, null, 8, "left")) as FlxText); this.add(new FlxText(80, 120, 100, 20, "Shoot Level", 0xFFFFFF, null, 8, "left")); sl_t = (this.add(new FlxText(150, 120, 150, 50, ("" + FlxG.arcl), 0xFFFFFF, null, 8)) as FlxText); _b = (this.add(new FlxButton(160, 116, new FlxSprite(But2, 0, 0, false, false), buy2, new FlxSprite(But2, 0, 0, false, false), new FlxText(10, 2, 100, 16, "Buy", 1399182, null, 10), new FlxText(10, 2, 100, 16, "Buy", 0, null, 10))) as FlxButton); this.add(new FlxSprite(ImgCoin, 205, 120, false, false)); p2 = (this.add(new FlxText(215, 119, 100, 20, pr2.toString(), 0xFFFFFF, null, 8, "left")) as FlxText); this.add(new FlxText(80, 140, 100, 20, "Life Level", 0xFFFFFF, null, 8, "left")); ll_t = (this.add(new FlxText(150, 140, 150, 50, ("" + FlxG.lifel), 0xFFFFFF, null, 8)) as FlxText); _b = (this.add(new FlxButton(160, 136, new FlxSprite(But2, 0, 0, false, false), buy3, new FlxSprite(But2, 0, 0, false, false), new FlxText(10, 2, 100, 16, "Buy", 1399182, null, 10), new FlxText(10, 2, 100, 16, "Buy", 0, null, 10))) as FlxButton); this.add(new FlxSprite(ImgCoin, 205, 140, false, false)); p3 = (this.add(new FlxText(215, 139, 100, 20, pr3.toString(), 0xFFFFFF, null, 8, "left")) as FlxText); this.add(new FlxText(80, 160, 100, 20, "Jetpack Level", 0xFFFFFF, null, 8, "left")); fl_t = (this.add(new FlxText(150, 160, 150, 50, ("" + FlxG.jetl), 0xFFFFFF, null, 8)) as FlxText); _b = (this.add(new FlxButton(160, 156, new FlxSprite(But2, 0, 0, false, false), buy4, new FlxSprite(But2, 0, 0, false, false), new FlxText(10, 2, 100, 16, "Buy", 1399182, null, 10), new FlxText(10, 2, 100, 16, "Buy", 0, null, 10))) as FlxButton); this.add(new FlxSprite(ImgCoin, 205, 160, false, false)); p4 = (this.add(new FlxText(215, 159, 100, 20, pr4.toString(), 0xFFFFFF, null, 8, "left")) as FlxText); this.add(new FlxText(80, 180, 100, 20, "Auto-Gun Lvl", 0xFFFFFF, null, 8, "left")); al_t = (this.add(new FlxText(150, 180, 150, 50, ("" + FlxG.autolv), 0xFFFFFF, null, 8)) as FlxText); _b = (this.add(new FlxButton(160, 176, new FlxSprite(But2, 0, 0, false, false), buy5, new FlxSprite(But2, 0, 0, false, false), new FlxText(10, 2, 100, 16, "Buy", 1399182, null, 10), new FlxText(10, 2, 100, 16, "Buy", 0, null, 10))) as FlxButton); this.add(new FlxSprite(ImgCoin, 205, 180, false, false)); p5 = (this.add(new FlxText(215, 179, 100, 20, pr5.toString(), 0xFFFFFF, null, 8, "left")) as FlxText); this.add(new FlxText(104, 209, 210, 300, "To Use the Jetpack, just jump in the\n max height of your jump.\nHigher levels grants you more fuel.", 0, null, 8, "left")); this.add(new FlxText(105, 210, 210, 300, "To Use the Jetpack, just jump in the\n max height of your jump.\nHigher levels grants you more fuel.", 0xFFFFFF, null, 8, "left")); if (FlxG.jumpl == 5){ p1.setText("Max"); }; if (FlxG.arcl == 5){ p2.setText("Max"); }; if (FlxG.lifel == 5){ p3.setText("Max"); }; if (FlxG.jetl == 5){ p4.setText("Max"); }; if (FlxG.autolv == 5){ p5.setText("Max"); }; }; super.update(); } private function buygf():void{ MochiCoins.showStore(); MochiCoins.showItem({item:"caff585d2e48c595"}); Mouse.show(); FlxG.kMouse = false; } private function buy1():void{ if (FlxG.jumpl == 5){ FlxG.play(SndNeg); p1.setText("Max"); } else { if (FlxG.money >= pr1){ FlxG.jumpl++; FlxG.money = (FlxG.money - pr1); jl_t.setText(FlxG.jumpl.toString()); mont.setText(("Money: " + FlxG.money.toString())); mont2.setText(("Money: " + FlxG.money.toString())); FlxG.play(SndBuy); pr1 = (FlxG.jumpl * 200); if (FlxG.jumpl == 5){ p1.setText("Max"); } else { p1.setText(pr1.toString()); }; FlxG.FlxSave.data.money = FlxG.money; FlxG.FlxSave.data.jumpl = FlxG.jumpl; FlxG.FlxSave.flush(); } else { FlxG.play(SndNeg); }; }; } private function buy2():void{ if (FlxG.arcl == 5){ FlxG.play(SndNeg); p2.setText("Max"); } else { if (FlxG.money >= pr2){ FlxG.arcl++; FlxG.money = (FlxG.money - pr2); sl_t.setText(FlxG.arcl.toString()); mont.setText(("Money: " + FlxG.money.toString())); mont2.setText(("Money: " + FlxG.money.toString())); FlxG.play(SndBuy); pr2 = (FlxG.arcl * 250); if (FlxG.arcl == 5){ p2.setText("Max"); } else { p2.setText(pr2.toString()); }; FlxG.FlxSave.data.money = FlxG.money; FlxG.FlxSave.data.arcl = FlxG.arcl; FlxG.FlxSave.flush(); } else { FlxG.play(SndNeg); }; }; } private function buy3():void{ if (FlxG.lifel == 5){ FlxG.play(SndNeg); p3.setText("Max"); } else { if (FlxG.money >= pr3){ FlxG.lifel++; FlxG.money = (FlxG.money - pr3); ll_t.setText(FlxG.lifel.toString()); mont.setText(("Money: " + FlxG.money.toString())); mont2.setText(("Money: " + FlxG.money.toString())); FlxG.play(SndBuy); pr3 = (FlxG.lifel * 300); if (FlxG.lifel == 5){ p3.setText("Max"); } else { p3.setText(pr3.toString()); }; FlxG.FlxSave.data.money = FlxG.money; FlxG.FlxSave.data.lifel = FlxG.lifel; FlxG.FlxSave.flush(); } else { FlxG.play(SndNeg); }; }; } private function back():void{ FlxG.FlxSave.data.arcl = FlxG.arcl; FlxG.FlxSave.data.jumpl = FlxG.jumpl; FlxG.FlxSave.data.jetl = FlxG.jetl; FlxG.FlxSave.data.lifel = FlxG.lifel; FlxG.FlxSave.data.autolv = FlxG.autolv; FlxG.FlxSave.data.money = FlxG.money; FlxG.FlxSave.flush(); FlxG.play(SndHit2); FlxG.flash(4292406178, 0.5); FlxG.fade(4279442459, 0.5, onFade); } } }//package com.adamatomic.Mode
Section 145
//ShopState_But (com.adamatomic.Mode.ShopState_But) package com.adamatomic.Mode { import mx.core.*; public class ShopState_But extends BitmapAsset { } }//package com.adamatomic.Mode
Section 146
//ShopState_But2 (com.adamatomic.Mode.ShopState_But2) package com.adamatomic.Mode { import mx.core.*; public class ShopState_But2 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 147
//ShopState_ImgCoin (com.adamatomic.Mode.ShopState_ImgCoin) package com.adamatomic.Mode { import mx.core.*; public class ShopState_ImgCoin extends BitmapAsset { } }//package com.adamatomic.Mode
Section 148
//ShopState_ImgCursor (com.adamatomic.Mode.ShopState_ImgCursor) package com.adamatomic.Mode { import mx.core.*; public class ShopState_ImgCursor extends BitmapAsset { } }//package com.adamatomic.Mode
Section 149
//ShopState_mLogo (com.adamatomic.Mode.ShopState_mLogo) package com.adamatomic.Mode { import mx.core.*; public class ShopState_mLogo extends BitmapAsset { } }//package com.adamatomic.Mode
Section 150
//ShopState_SndBuy (com.adamatomic.Mode.ShopState_SndBuy) package com.adamatomic.Mode { import mx.core.*; public class ShopState_SndBuy extends SoundAsset { } }//package com.adamatomic.Mode
Section 151
//ShopState_SndHit (com.adamatomic.Mode.ShopState_SndHit) package com.adamatomic.Mode { import mx.core.*; public class ShopState_SndHit extends SoundAsset { } }//package com.adamatomic.Mode
Section 152
//ShopState_SndHit2 (com.adamatomic.Mode.ShopState_SndHit2) package com.adamatomic.Mode { import mx.core.*; public class ShopState_SndHit2 extends SoundAsset { } }//package com.adamatomic.Mode
Section 153
//ShopState_SndNeg (com.adamatomic.Mode.ShopState_SndNeg) package com.adamatomic.Mode { import mx.core.*; public class ShopState_SndNeg extends SoundAsset { } }//package com.adamatomic.Mode
Section 154
//Spawner (com.adamatomic.Mode.Spawner) package com.adamatomic.Mode { import com.adamatomic.flixel.*; public class Spawner extends FlxSprite { private var ImgSpawner:Class; private var _timer:Number; private var _padre; private var SndHit:Class; private var _gibs:FlxEmitter; private var _tipo:int; private var ImgSpawnerGibs:Class; private var SndExplode2:Class; private var recarga:uint;// = 0 private var _tip:int; private var SndExplode:Class; private var _b:FlxArray; private var _b2:FlxArray; private var _p:Player; public function Spawner(X:int, Y:int, Bots:FlxArray, BotBullets:FlxArray, ThePlayer:Player, life:int, rate:int, par, tip:int, type:int=1){ ImgSpawner = Spawner_ImgSpawner; ImgSpawnerGibs = Spawner_ImgSpawnerGibs; SndExplode = Spawner_SndExplode; SndExplode2 = Spawner_SndExplode2; SndHit = Spawner_SndHit; super(ImgSpawner, X, Y, true, false); _b = Bots; _tipo = tip; _padre = par; _b2 = BotBullets; _p = ThePlayer; _timer = (Math.random() * rate); recarga = ((Math.random() * (rate / 5)) + ((rate / 5) * 4)); health = life; _tip = type; addAnimation("open", [1, 2, 3, 4, 5], 40, false); addAnimation("close", [5, 4, 3, 2, 1, 0], 40, false); addAnimation("dead", [6]); } override public function update():void{ if (dead){ return; }; _timer = (_timer + FlxG.elapsed); var limit:uint = recarga; if (onScreen()){ limit = (recarga / 2); }; if (_timer > limit){ _timer = 0; makeBot(); } else { if (_timer > (limit - 0.35)){ play("open"); } else { if (_timer > 1){ play("close"); }; }; }; super.update(); } override public function hurt(Damage:Number):void{ FlxG.play(SndHit); flicker(0.2); FlxG.score = (FlxG.score + 50); super.hurt(Damage); } override public function kill():void{ if (dead){ return; }; FlxG.play(SndExplode); FlxG.play(SndExplode2); super.kill(); exists = true; flicker(-1); play("dead"); FlxG.quake(0.005, 0.35); FlxG.flash(4292406178, 0.35); makeBot(); _gibs = (FlxG.state.add(new FlxEmitter((x + (width / 2)), (y + (height / 2)), 0, 0, null, -2, -200, 200, -300, 0, -720, 720, 400, 0, ImgSpawnerGibs, 50, true)) as FlxEmitter); _gibs.reset(); FlxG.score = (FlxG.score + 1000); } private function makeBot():void{ var b:*; var i:uint; if (_tipo == 1){ if (_padre._numbots < _padre._maxbots){ b = new Bot((x + (width / 2)), (y + (width / 2)), _b2, _p, _padre, _tip); b.x = (b.x - (b.width / 2)); b.y = (b.y - (b.height / 2)); }; } else { if (_padre._numenemies < _padre._maxenemies){ b = new Enemy((x + (width / 2)), (y + (width / 2)), _p, _padre, _b2, _tip); b.x = (b.x - (b.width / 2)); b.y = (b.y - (b.height / 2)); }; }; _b.add(FlxG.state.add(b)); } } }//package com.adamatomic.Mode
Section 155
//Spawner_ImgSpawner (com.adamatomic.Mode.Spawner_ImgSpawner) package com.adamatomic.Mode { import mx.core.*; public class Spawner_ImgSpawner extends BitmapAsset { } }//package com.adamatomic.Mode
Section 156
//Spawner_ImgSpawnerGibs (com.adamatomic.Mode.Spawner_ImgSpawnerGibs) package com.adamatomic.Mode { import mx.core.*; public class Spawner_ImgSpawnerGibs extends BitmapAsset { } }//package com.adamatomic.Mode
Section 157
//Spawner_SndExplode (com.adamatomic.Mode.Spawner_SndExplode) package com.adamatomic.Mode { import mx.core.*; public class Spawner_SndExplode extends SoundAsset { } }//package com.adamatomic.Mode
Section 158
//Spawner_SndExplode2 (com.adamatomic.Mode.Spawner_SndExplode2) package com.adamatomic.Mode { import mx.core.*; public class Spawner_SndExplode2 extends SoundAsset { } }//package com.adamatomic.Mode
Section 159
//Spawner_SndHit (com.adamatomic.Mode.Spawner_SndHit) package com.adamatomic.Mode { import mx.core.*; public class Spawner_SndHit extends SoundAsset { } }//package com.adamatomic.Mode
Section 160
//VictoryState (com.adamatomic.Mode.VictoryState) package com.adamatomic.Mode { import flash.events.*; import flash.display.*; import com.adamatomic.flixel.*; import flash.net.*; public class VictoryState extends FlxState { private var botonsp:Class; private var xd3; private var SndMenu:Class; private var ImgBoton:Class; private var botonsp1:Class; private var botonsp2:Class; private var SndHit:Class; private var _timer:Number; private var _fading:Boolean; private var ImgCursor:Class; private var xd2; private var But:Class; private var _b:FlxButton; private var SndHit2:Class; private var xd; private var ImgGibs:Class; public function VictoryState(){ var stars:uint; ImgGibs = VictoryState_ImgGibs; SndMenu = VictoryState_SndMenu; But = VictoryState_But; botonsp = VictoryState_botonsp; ImgBoton = VictoryState_ImgBoton; botonsp2 = VictoryState_botonsp2; botonsp1 = VictoryState_botonsp1; ImgCursor = VictoryState_ImgCursor; SndHit = VictoryState_SndHit; SndHit2 = VictoryState_SndHit2; super(); _timer = 0; _fading = false; FlxG.flash(4292406178); (this.add(new FlxEmitter(0, -50, FlxG.width, 0, null, 0.03, 0, 0, 0, 100, -360, 360, 80, 0, ImgGibs, 120, true)) as FlxEmitter); if (FlxG.level == 14){ FlxG.gameComplete = true; this.add(new FlxText(0, ((FlxG.height / 2) - 35), FlxG.width, 80, "Game Complete!!!!\n\nI Hope you liked the Game =) \nWatch for the next game of robin where he take guns!!!", 14216098, null, 16, "center")); } else { this.add(new FlxText(0, ((FlxG.height / 2) - 35), FlxG.width, 80, ((("Level " + FlxG.level) + " Complete!\n\nSCORE: ") + FlxG.score), 14216098, null, 16, "center")); }; _b = (this.add(new FlxButton(15, 170, new FlxSprite(ImgBoton, 0, 0, false, false, 100, 30), onButton2, new FlxSprite(ImgBoton, 0, 0, false, false, 100, 30), new FlxText(25, 9, 100, 10, "Continue", 0), new FlxText(25, 9, 100, 10, "->Continue", 0))) as FlxButton); xd = new botonsp1(); xd3 = new botonsp2(); xd2 = new MovieClip(); addChild(xd2); xd2.addChild(xd); xd2.x = 15; xd2.y = 200; xd2.addEventListener(MouseEvent.CLICK, onButton3e); xd2.addEventListener(MouseEvent.ROLL_OVER, onButton3a); xd2.addEventListener(MouseEvent.ROLL_OUT, onButton3b); FlxG.setCursor(ImgCursor); if (FlxG.scores[FlxG.level] < FlxG.score){ FlxG.scores[FlxG.level] = FlxG.score; }; if (FlxG.extra){ FlxG.levels[FlxG.level] = Boolean(FlxG.extra); }; if (FlxG.level > FlxG.clevel){ FlxG.clevel = FlxG.level; }; FlxG.money = (FlxG.money + FlxG.lmoney); if ((((FlxG.lmoney == 89)) && ((FlxG.level == 1)))){ FlxG.lvl1coins = true; }; if ((((FlxG.lmoney == 282)) && ((FlxG.level == 2)))){ FlxG.lvl2coins = true; }; FlxG.extra = false; FlxG.score = 0; FlxG.lmoney = 0; FlxG.FlxSave.data.money = FlxG.money; FlxG.FlxSave.data.clevel = FlxG.clevel; FlxG.FlxSave.data.arcl = FlxG.arcl; FlxG.FlxSave.data.jumpl = FlxG.jumpl; FlxG.FlxSave.data.jetl = FlxG.jetl; FlxG.FlxSave.data.autolv = FlxG.autolv; FlxG.FlxSave.data.gameComplete = FlxG.gameComplete; FlxG.FlxSave.data.lvl1coins = FlxG.lvl1coins; FlxG.FlxSave.data.lvl2coins = FlxG.lvl2coins; FlxG.FlxSave.data.lifel = FlxG.lifel; FlxG.FlxSave.data.scores = FlxG.scores.join(","); FlxG.FlxSave.data.levels = FlxG.levels.join(","); FlxG.FlxSave.flush(); var tscore:uint; var x = 1; while (x < FlxG.scores.length) { tscore = (tscore + FlxG.scores[x]); x++; }; if (FlxG.kong){ FlxG.kong.API.scores.submit(tscore); FlxG.kong.API.stats.submit("Money", FlxG.money); FlxG.kong.API.stats.submit("Score", tscore); FlxG.kong.API.stats.submit("GameComplete", FlxG.gameComplete); FlxG.kong.API.stats.submit("JumpLevel", FlxG.jumpl); FlxG.kong.API.stats.submit("BowLevel", FlxG.arcl); FlxG.kong.API.stats.submit("LifeLevel", FlxG.lifel); FlxG.kong.API.stats.submit("JetLevel", FlxG.jetl); FlxG.kong.API.stats.submit("AutoLevel", FlxG.autolv); stars = 0; x = 1; while (x < FlxG.levels.length) { trace(FlxG.levels[x]); if (FlxG.levels[x] == "true"){ stars = (stars + 1); trace(((x + " ") + stars)); }; if (FlxG.levels[x] == true){ stars = (stars + 1); trace((((x + " ") + stars) + "__dif")); }; x++; }; }; } private function onButton3b(e:MouseEvent):void{ xd2.removeChild(xd3); } override public function update():void{ super.update(); if (!_fading){ }; } private function onPlay():void{ FlxG.switchState(LevelSelectState); } private function onButton3e(e:MouseEvent):void{ FlxG.play(SndHit2); navigateToURL(new URLRequest("http://www.playhub.com/?utm_medium=brandedgames_external&utm_campaign=robin_mercenary_2&utm_source=ingame&utm_content=ingame"), "_BLANK"); } private function onButton3a(e:MouseEvent):void{ xd2.addChild(xd3); } private function onButton2():void{ if (!_fading){ FlxG.play(SndMenu); FlxG.fade(4279442459, 2, onPlay); _fading = true; }; } } }//package com.adamatomic.Mode
Section 161
//VictoryState_botonsp (com.adamatomic.Mode.VictoryState_botonsp) package com.adamatomic.Mode { import mx.core.*; public class VictoryState_botonsp extends BitmapAsset { } }//package com.adamatomic.Mode
Section 162
//VictoryState_botonsp1 (com.adamatomic.Mode.VictoryState_botonsp1) package com.adamatomic.Mode { import mx.core.*; public class VictoryState_botonsp1 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 163
//VictoryState_botonsp2 (com.adamatomic.Mode.VictoryState_botonsp2) package com.adamatomic.Mode { import mx.core.*; public class VictoryState_botonsp2 extends BitmapAsset { } }//package com.adamatomic.Mode
Section 164
//VictoryState_But (com.adamatomic.Mode.VictoryState_But) package com.adamatomic.Mode { import mx.core.*; public class VictoryState_But extends BitmapAsset { } }//package com.adamatomic.Mode
Section 165
//VictoryState_ImgBoton (com.adamatomic.Mode.VictoryState_ImgBoton) package com.adamatomic.Mode { import mx.core.*; public class VictoryState_ImgBoton extends BitmapAsset { } }//package com.adamatomic.Mode
Section 166
//VictoryState_ImgCursor (com.adamatomic.Mode.VictoryState_ImgCursor) package com.adamatomic.Mode { import mx.core.*; public class VictoryState_ImgCursor extends BitmapAsset { } }//package com.adamatomic.Mode
Section 167
//VictoryState_ImgGibs (com.adamatomic.Mode.VictoryState_ImgGibs) package com.adamatomic.Mode { import mx.core.*; public class VictoryState_ImgGibs extends BitmapAsset { } }//package com.adamatomic.Mode
Section 168
//VictoryState_SndHit (com.adamatomic.Mode.VictoryState_SndHit) package com.adamatomic.Mode { import mx.core.*; public class VictoryState_SndHit extends SoundAsset { } }//package com.adamatomic.Mode
Section 169
//VictoryState_SndHit2 (com.adamatomic.Mode.VictoryState_SndHit2) package com.adamatomic.Mode { import mx.core.*; public class VictoryState_SndHit2 extends SoundAsset { } }//package com.adamatomic.Mode
Section 170
//VictoryState_SndMenu (com.adamatomic.Mode.VictoryState_SndMenu) package com.adamatomic.Mode { import mx.core.*; public class VictoryState_SndMenu extends SoundAsset { } }//package com.adamatomic.Mode
Section 171
//KongregateEvent (com.kongregate.as3.client.events.KongregateEvent) package com.kongregate.as3.client.events { import flash.events.*; public class KongregateEvent extends Event { public static const COMPLETE:String = "component_api_available"; public function KongregateEvent(_arg1:String){ super(_arg1); } } }//package com.kongregate.as3.client.events
Section 172
//AbstractShadowService (com.kongregate.as3.client.services.AbstractShadowService) package com.kongregate.as3.client.services { import flash.events.*; public class AbstractShadowService extends EventDispatcher { protected function alert(_arg1:String, _arg2:String, _arg3="", _arg4:String=""):void{ trace(((((((("Kongregate API: " + _arg1) + ".") + _arg2) + "(") + _arg3) + ") ") + _arg4)); } } }//package com.kongregate.as3.client.services
Section 173
//HighScoreServiceShadow (com.kongregate.as3.client.services.HighScoreServiceShadow) package com.kongregate.as3.client.services { public class HighScoreServiceShadow extends AbstractShadowService implements IHighScoreServices { private var mode:String; public function HighScoreServiceShadow(){ mode = ""; } public function submit(_arg1:Number, _arg2:String=null):void{ alert("IHighScoreServices", "submit", arguments); } public function connect():Boolean{ alert("IKongregateServices", "connect"); return (true); } public function requestList(_arg1:Function):void{ alert("IHighScoreServices", "requestList", "", (("[Mode: " + mode) + "]")); _arg1({success:false}); } public function setMode(_arg1:String):void{ alert("IHighScoreServices", "setMode", arguments); this.mode = _arg1; } } }//package com.kongregate.as3.client.services
Section 174
//IHighScoreServices (com.kongregate.as3.client.services.IHighScoreServices) package com.kongregate.as3.client.services { public interface IHighScoreServices { function setMode(_arg1:String):void; function submit(_arg1:Number, _arg2:String=null):void; function requestList(_arg1:Function):void; } }//package com.kongregate.as3.client.services
Section 175
//IKongregateServices (com.kongregate.as3.client.services.IKongregateServices) package com.kongregate.as3.client.services { import flash.events.*; public interface IKongregateServices extends IEventDispatcher { function getPlayerInfo(_arg1:Function):void; function connect(_arg1:Number=-1):Boolean; } }//package com.kongregate.as3.client.services
Section 176
//IStatServices (com.kongregate.as3.client.services.IStatServices) package com.kongregate.as3.client.services { public interface IStatServices { function submitArray(_arg1:Array):void; function submit(_arg1:String, _arg2:Number):void; } }//package com.kongregate.as3.client.services
Section 177
//IUserServices (com.kongregate.as3.client.services.IUserServices) package com.kongregate.as3.client.services { public interface IUserServices { function getName():String; function getPlayerInfo(_arg1:Function):void; } }//package com.kongregate.as3.client.services
Section 178
//KongregateServiceShadow (com.kongregate.as3.client.services.KongregateServiceShadow) package com.kongregate.as3.client.services { public class KongregateServiceShadow extends AbstractShadowService implements IKongregateServices { public function getName():String{ alert("IKongregateServices", "getName"); return ("Guest"); } public function connect(_arg1:Number=-1):Boolean{ alert("IKongregateServices", "connect", arguments); return (true); } public function getPlayerInfo(_arg1:Function):void{ alert("IKongregateServices", "getPlayerInfo"); _arg1(new Object()); } } }//package com.kongregate.as3.client.services
Section 179
//StatServiceShadow (com.kongregate.as3.client.services.StatServiceShadow) package com.kongregate.as3.client.services { public class StatServiceShadow extends AbstractShadowService implements IStatServices { public function submitArray(_arg1:Array):void{ alert("IStatServices", "submitArray", arguments); } public function submit(_arg1:String, _arg2:Number):void{ alert("IStatServices", "submitStat", arguments); } } }//package com.kongregate.as3.client.services
Section 180
//UserServiceShadow (com.kongregate.as3.client.services.UserServiceShadow) package com.kongregate.as3.client.services { public class UserServiceShadow extends AbstractShadowService implements IUserServices { public function getName():String{ alert("UserService", "getName"); return ("Guest"); } public function getPlayerInfo(_arg1:Function):void{ alert("UserService", "getPlayerInfo"); _arg1({isGuest:true, name:"Guest", points:0, level:0, isMode:false, isAdmin:false, isDeveloper:false, avatarPath:"", chatAvatarPath:""}); } } }//package com.kongregate.as3.client.services
Section 181
//IAPIBootstrap (com.kongregate.as3.client.IAPIBootstrap) package com.kongregate.as3.client { import flash.events.*; import flash.display.*; public interface IAPIBootstrap { function init(_arg1:Event=null, _arg2:Stage=null):void; function hideLog():void; function showLog(_arg1:int=0):void; } }//package com.kongregate.as3.client
Section 182
//KongregateAPI (com.kongregate.as3.client.KongregateAPI) package com.kongregate.as3.client { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; import com.kongregate.as3.client.events.*; import com.kongregate.as3.client.services.*; import flash.net.*; import flash.errors.*; public class KongregateAPI extends Sprite { private const VERSION:Number = 1; private var loader:Loader; private var loadedDomain:ApplicationDomain; private static const CLASS_USER:String = "com.kongregate.as3.client.services.UserServices"; private static const CLASS_STATS:String = "com.kongregate.as3.client.services.StatServices"; private static const CLASS_SERVICES:String = "com.kongregate.as3.client.services.KongregateServices"; private static const CLASS_SCORES:String = "com.kongregate.as3.client.services.HighScoreServices"; private static const DEBUG_API_URL:String = "//Linuxpc/kongregate/public/flash/API_AS3.swf"; private static var _connected:Boolean; private static var kUser:IUserServices; private static var _loaded:Boolean; private static var kServices:IKongregateServices; private static var kScores:IHighScoreServices; private static var mInstance:KongregateAPI; private static var kStats:IStatServices; private static var kAPI:IAPIBootstrap; public function KongregateAPI(){ if (mInstance != null){ throw (new Error("Warning: KongregateAPI has been added to stage more than once or accessed improperly. Use getInstance() or a stage reference to access.")); }; mInstance = this; this.addEventListener(Event.ADDED_TO_STAGE, init, false, 0, true); } public function get loaded():Boolean{ return (_loaded); } public function get connected():Boolean{ return (_connected); } private function alertConnected(_arg1:TimerEvent=null):void{ var _local2:KongregateEvent; var _local3:Boolean; _local2 = new KongregateEvent(KongregateEvent.COMPLETE); _local3 = this.dispatchEvent(_local2); } private function init(_arg1:Event):void{ var _local2:Object; var _local3:String; var _local4:URLRequest; var _local5:LoaderContext; this.removeEventListener(Event.ADDED_TO_STAGE, init); _loaded = false; _connected = false; _local2 = LoaderInfo(root.loaderInfo).parameters; _local3 = _local2.api_path; if (_local3 == null){ trace("Alert: Kongregate API could not be loaded, due to local testing. API will load when the game is uploaded."); createShadowServices(); return; }; Security.allowDomain("*.kongregate.com"); Security.allowDomain("kongregatetrunk.com"); _local4 = new URLRequest(_local3); _local5 = new LoaderContext(false); _local5.applicationDomain = ApplicationDomain.currentDomain; _local5.securityDomain = SecurityDomain.currentDomain; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler); loader.load(_local4, _local5); } public function get api():IAPIBootstrap{ return (kAPI); } private function loadComplete(_arg1:Event):void{ getServices(); } public function get scores():IHighScoreServices{ return (kScores); } private function ioErrorHandler(_arg1:IOErrorEvent):void{ throw (new IOError(("API file not found. " + _arg1))); } public function get services():IKongregateServices{ return (kServices); } public function get stats():IStatServices{ return (kStats); } private function createShadowServices():void{ var _local1:Timer; trace(">>> Kongregate Shadow Services instantiated for local development.."); kServices = new KongregateServiceShadow(); kScores = new HighScoreServiceShadow(); kStats = new StatServiceShadow(); kUser = new UserServiceShadow(); _local1 = new Timer(200, 1); _local1.addEventListener(TimerEvent.TIMER_COMPLETE, alertConnected); _local1.start(); _connected = true; } public function get user():IUserServices{ return (kUser); } private function getServices():void{ var _local1:ApplicationDomain; var _local2:*; var _local3:*; var _local4:*; var _local5:*; _local1 = ApplicationDomain.currentDomain; kAPI = IAPIBootstrap(loader.getChildAt(0)); this.addChild(loader); _local2 = _local1.getDefinition(CLASS_SERVICES); trace(_local2); kServices = _local2.getInstance(); _local3 = _local1.getDefinition(CLASS_SCORES); kScores = _local3.getInstance(); _local4 = _local1.getDefinition(CLASS_STATS); kStats = _local4.getInstance(); _local5 = _local1.getDefinition(CLASS_USER); kUser = _local5.getInstance(); kServices.connect(VERSION); _loaded = true; _connected = true; alertConnected(); } public static function getInstance():KongregateAPI{ if (!mInstance){ throw (new IllegalOperationError("You must add the Kongregate API component to the stage before attempting to access it.")); }; return (mInstance); } } }//package com.kongregate.as3.client
Section 183
//AdLoader (CPMStar.AdLoader) package CPMStar { import flash.events.*; import flash.display.*; import flash.system.*; import flash.net.*; public class AdLoader extends Sprite { private var cpmstarLoader:Loader; private var contentspotid:String; public function AdLoader(contentspotid:String){ super(); this.contentspotid = contentspotid; addEventListener(Event.ADDED, addedHandler); } private function dispatchHandler(event:Event):void{ dispatchEvent(event); } private function addedHandler(event:Event):void{ removeEventListener(Event.ADDED, addedHandler); Security.allowDomain("server.cpmstar.com"); var cpmstarViewSWFUrl:String = "http://server.cpmstar.com/adviewas3.swf"; var container:DisplayObjectContainer = parent; cpmstarLoader = new Loader(); cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, dispatchHandler); cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, dispatchHandler); cpmstarLoader.load(new URLRequest(((cpmstarViewSWFUrl + "?contentspotid=") + contentspotid))); addChild(cpmstarLoader); } } }//package CPMStar
Section 184
//MochiCoins (mochi.as3.MochiCoins) package mochi.as3 { public class MochiCoins { public static const STORE_HIDE:String = "StoreHide"; public static const NO_USER:String = "NoUser"; public static const IO_ERROR:String = "IOError"; public static const ITEM_NEW:String = "ItemNew"; public static const ITEM_OWNED:String = "ItemOwned"; public static const STORE_ITEMS:String = "StoreItems"; public static const ERROR:String = "Error"; public static const STORE_SHOW:String = "StoreShow"; public static var _inventory:MochiInventory; public function MochiCoins(){ super(); } public static function triggerEvent(eventType:String, args:Object):void{ MochiSocial.triggerEvent(eventType, args); } public static function removeEventListener(eventType:String, delegate:Function):void{ MochiSocial.removeEventListener(eventType, delegate); } public static function addEventListener(eventType:String, delegate:Function):void{ MochiSocial.addEventListener(eventType, delegate); } public static function getStoreItems():void{ MochiServices.send("coins_getStoreItems"); } public static function get inventory():MochiInventory{ return (_inventory); } public static function showStore(options:Object=null):void{ MochiServices.bringToTop(); MochiServices.send("coins_showStore", {options:options}, null, null); } public static function showItem(options:Object=null):void{ if (((!(options)) || (!((typeof(options.item) == "string"))))){ trace("ERROR: showItem call must pass an Object with an item key"); return; }; MochiServices.bringToTop(); MochiServices.send("coins_showItem", {options:options}, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function showVideo(options:Object=null):void{ if (((!(options)) || (!((typeof(options.item) == "string"))))){ trace("ERROR: showVideo call must pass an Object with an item key"); return; }; MochiServices.bringToTop(); MochiServices.send("coins_showVideo", {options:options}, null, null); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (args:Object):void{ _inventory = new MochiInventory(); }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (args:Object):void{ _inventory = null; }); } }//package mochi.as3
Section 185
//MochiDigits (mochi.as3.MochiDigits) package mochi.as3 { public final class MochiDigits { private var Sibling:MochiDigits; private var Fragment:Number; private var Encoder:Number; public function MochiDigits(digit:Number=0, index:uint=0):void{ super(); Encoder = 0; setValue(digit, index); } public function reencode():void{ var newEncode:uint = int((2147483647 * Math.random())); Fragment = (Fragment ^ (newEncode ^ Encoder)); Encoder = newEncode; } public function set value(v:Number):void{ setValue(v); } public function toString():String{ var s:String = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ s = (s + Sibling.toString()); }; return (s); } public function setValue(digit:Number=0, index:uint=0):void{ var s:String = digit.toString(); var _temp1 = index; index = (index + 1); Fragment = (s.charCodeAt(_temp1) ^ Encoder); if (index < s.length){ Sibling = new MochiDigits(digit, index); } else { Sibling = null; }; reencode(); } public function get value():Number{ return (Number(this.toString())); } public function addValue(inc:Number):void{ value = (value + inc); } } }//package mochi.as3
Section 186
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher) package mochi.as3 { public class MochiEventDispatcher { private var eventTable:Object; public function MochiEventDispatcher():void{ super(); eventTable = {}; } public function triggerEvent(event:String, args:Object):void{ var i:Object; if (eventTable[event] == undefined){ return; }; for (i in eventTable[event]) { var _local6 = eventTable[event]; _local6[i](args); }; } public function removeEventListener(event:String, delegate:Function):void{ var s:Object; if (eventTable[event] == undefined){ eventTable[event] = []; return; }; for (s in eventTable[event]) { if (eventTable[event][s] != delegate){ } else { eventTable[event].splice(Number(s), 1); }; }; } public function addEventListener(event:String, delegate:Function):void{ removeEventListener(event, delegate); eventTable[event].push(delegate); } } }//package mochi.as3
Section 187
//MochiEvents (mochi.as3.MochiEvents) package mochi.as3 { import flash.display.*; public class MochiEvents { public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL"; public static const FORMAT_LONG:String = "LongForm"; public static const ALIGN_BOTTOM:String = "ALIGN_B"; public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived"; public static const FORMAT_SHORT:String = "ShortForm"; public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR"; public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR"; public static const ALIGN_TOP:String = "ALIGN_T"; public static const ALIGN_LEFT:String = "ALIGN_L"; public static const ALIGN_RIGHT:String = "ALIGN_R"; public static const ALIGN_TOP_LEFT:String = "ALIGN_TL"; public static const ALIGN_CENTER:String = "ALIGN_C"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); private static var gameStart:Number; private static var levelStart:Number; public function MochiEvents(){ super(); } public static function addEventListener(eventType:String, delegate:Function):void{ _dispatcher.addEventListener(eventType, delegate); } public static function removeEventListener(eventType:String, delegate:Function):void{ _dispatcher.removeEventListener(eventType, delegate); } public static function startSession(achievementID:String):void{ MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null); } public static function triggerEvent(eventType:String, args:Object):void{ _dispatcher.triggerEvent(eventType, args); } public static function setNotifications(clip:MovieClip, style:Object):void{ var s:Object; var args:Object = {}; for (s in style) { args[s] = style[s]; }; args.clip = clip; MochiServices.send("events_setNotifications", args, null, null); } public static function endGame():void{ var delta:Number = (new Date().time - gameStart); trigger("end_game", {time:delta}); } public static function startGame():void{ gameStart = new Date().time; trigger("start_game"); } public static function trigger(kind:String, obj:Object=null):void{ if (obj == null){ obj = {}; } else { if (obj["kind"] != undefined){ trace("WARNING: optional arguments package contains key 'id', it will be overwritten"); obj["kind"] = kind; }; }; MochiServices.send("events_triggerEvent", {eventObject:obj}, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function startLevel():void{ levelStart = new Date().time; trigger("start_level"); } public static function endLevel():void{ var delta:Number = (new Date().time - levelStart); trigger("end_level", {time:delta}); } } }//package mochi.as3
Section 188
//MochiInventory (mochi.as3.MochiInventory) package mochi.as3 { import flash.events.*; import flash.utils.*; public dynamic class MochiInventory extends Proxy { private var _timer:Timer; private var _names:Array; private var _syncID:Number; private var _consumableProperties:Object; private var _storeSync:Object; private var _outstandingID:Number; private var _syncPending:Boolean; public static const READY:String = "InvReady"; public static const ERROR:String = "Error"; public static const IO_ERROR:String = "IoError"; private static const KEY_SALT:String = " syncMaint"; public static const WRITTEN:String = "InvWritten"; public static const NOT_READY:String = "InvNotReady"; public static const VALUE_ERROR:String = "InvValueError"; private static const CONSUMER_KEY:String = "MochiConsumables"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public function MochiInventory():void{ super(); MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned); MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut); _storeSync = new Object(); _syncPending = false; _outstandingID = 0; _syncID = 0; _timer = new Timer(1000); _timer.addEventListener(TimerEvent.TIMER, sync); _timer.start(); if (MochiSocial.loggedIn){ loggedIn(); } else { loggedOut(); }; } private function newItems(event:Object):void{ if (!this[(event.id + KEY_SALT)]){ this[(event.id + KEY_SALT)] = 0; }; if (!this[event.id]){ this[event.id] = 0; }; this[(event.id + KEY_SALT)] = (this[(event.id + KEY_SALT)] + event.count); this[event.id] = (this[event.id] + event.count); if (event.privateProperties.consumable){ if (!this[event.privateProperties.tag]){ this[event.privateProperties.tag] = 0; }; this[event.privateProperties.tag] = (this[event.privateProperties.tag] + (event.privateProperties.inc * event.count)); }; } public function release():void{ MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(name){ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (-1); }; if (_consumableProperties[name]){ return (MochiDigits(_consumableProperties[name]).value); }; return (undefined); } private function loggedIn(args:Object=null):void{ MochiUserData.get(CONSUMER_KEY, getConsumableBag); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(name):Boolean{ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (false); }; if (_consumableProperties[name] == undefined){ return (false); }; return (true); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(index:int):int{ return (((index)>=_names.length) ? 0 : (index + 1)); } private function putConsumableBag(userData:MochiUserData):void{ _syncPending = false; if (userData.error){ triggerEvent(ERROR, {type:IO_ERROR, error:userData.error}); _outstandingID = -1; }; triggerEvent(WRITTEN, {}); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(name, value):void{ var d:MochiDigits; if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return; }; if (!(value is Number)){ triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:value}); return; }; if (_consumableProperties[name]){ d = MochiDigits(_consumableProperties[name]); if (d.value == value){ return; }; d.value = value; } else { _names.push(name); _consumableProperties[name] = new MochiDigits(value); }; _syncID++; } private function itemOwned(event:Object):void{ _storeSync[event.id] = {properties:event.properties, count:event.count}; } private function sync(e:Event=null):void{ var key:String; if (((_syncPending) || ((_syncID == _outstandingID)))){ return; }; _outstandingID = _syncID; var output:Object = {}; for (key in _consumableProperties) { output[key] = MochiDigits(_consumableProperties[key]).value; }; MochiUserData.put(CONSUMER_KEY, output, putConsumableBag); _syncPending = true; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(index:int):String{ return (_names[(index - 1)]); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(name):Boolean{ if (!_consumableProperties[name]){ return (false); }; _names.splice(_names.indexOf(name), 1); delete _consumableProperties[name]; return (true); } private function getConsumableBag(userData:MochiUserData):void{ var key:String; var unsynced:Number; if (userData.error){ triggerEvent(ERROR, {type:IO_ERROR, error:userData.error}); return; }; _consumableProperties = {}; _names = new Array(); if (userData.data){ for (key in userData.data) { _names.push(key); _consumableProperties[key] = new MochiDigits(userData.data[key]); }; }; for (key in _storeSync) { unsynced = _storeSync[key].count; if (_consumableProperties[(key + KEY_SALT)]){ unsynced = (unsynced - _consumableProperties[key]); }; if (unsynced == 0){ } else { newItems({id:key, count:unsynced, properties:_storeSync[key].properties}); }; }; triggerEvent(READY, {}); } private function loggedOut(args:Object=null):void{ _consumableProperties = null; } public static function triggerEvent(eventType:String, args:Object):void{ _dispatcher.triggerEvent(eventType, args); } public static function removeEventListener(eventType:String, delegate:Function):void{ _dispatcher.removeEventListener(eventType, delegate); } public static function addEventListener(eventType:String, delegate:Function):void{ _dispatcher.addEventListener(eventType, delegate); } } }//package mochi.as3
Section 189
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.utils.*; import flash.system.*; import flash.net.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; private static var _preserved:Object; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; public static var servicesSync:MochiSync = new MochiSync(); private static var _clip:MovieClip; private static var _id:String; private static var _services:String = "services.swf"; private static var _servURL:String = "http://www.mochiads.com/static/lib/services/"; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _loader:Loader; private static var _connecting:Boolean = false; private static var _mochiLocalConnection:MovieClip; private static var _listenChannelName:String = "__ms_"; public static var onError:Object; public static var netup:Boolean = true; private static var _mochiLC:String = "MochiLC.swf"; public function MochiServices(){ super(); } public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } private static function onReceive(pkg:Object):void{ var methodName:String; var pkg = pkg; var cb:String = pkg.callbackID; var cblst:Object = _clip._callbacks[cb]; if (!cblst){ return; }; var method:* = cblst.callbackMethod; methodName = ""; var obj:Object = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ method.apply(obj, pkg.args); //unresolved jump var _slot1 = error; trace(((("Error invoking callback method '" + methodName) + "': ") + _slot1.toString())); } else { if (obj != null){ obj(pkg.args); //unresolved jump var _slot1 = error; trace(("Error invoking method on object: " + _slot1.toString())); }; }; delete _clip._callbacks[cb]; } public static function get childClip():Object{ return (_clip); } public static function send(methodName:String, args:Object=null, callbackObject:Object=null, callbackMethod:Object=null):void{ if (_connected){ _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName)); handleError(args, callbackObject, callbackMethod); flush(true); return; }; _clip._queue.push({methodName:methodName, args:args, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod}; _clip._nextcallbackID++; }; }; } private static function init(id:String, clip:Object):void{ _id = id; if (clip != null){ _container = clip; loadCommunicator(id, _container); }; } private static function clickMovie(url:String, cb:Function):MovieClip{ var b:int; var loader:Loader; var avm1_bytecode:Array = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; var header:Array = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; var footer:Array = [0, 64, 0, 0, 0]; var mc:MovieClip = new MovieClip(); var lc:LocalConnection = new LocalConnection(); var lc_name:String = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().time)); lc = new LocalConnection(); mc.lc = lc; mc.click = cb; lc.client = mc; lc.connect(lc_name); var ba:ByteArray = new ByteArray(); var cpool:ByteArray = new ByteArray(); cpool.endian = Endian.LITTLE_ENDIAN; cpool.writeShort(1); cpool.writeUTFBytes(((url + " ") + lc_name)); cpool.writeByte(0); var actionLength:uint = ((avm1_bytecode.length + cpool.length) + 4); var fileLength:uint = (actionLength + 35); ba.endian = Endian.LITTLE_ENDIAN; ba.writeUTFBytes("FWS"); ba.writeByte(8); ba.writeUnsignedInt(fileLength); for each (b in header) { ba.writeByte(b); }; ba.writeUnsignedInt(actionLength); ba.writeByte(136); ba.writeShort(cpool.length); ba.writeBytes(cpool); for each (b in avm1_bytecode) { ba.writeByte(b); }; for each (b in footer) { ba.writeByte(b); }; loader = new Loader(); loader.loadBytes(ba); mc.addChild(loader); return (mc); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function addLinkEvent(url:String, burl:String, btn:DisplayObjectContainer, onClick:Function=null):void{ var avm1Click:DisplayObject; var x:String; var req:URLRequest; var loader:Loader; var setURL:Function; var err:Function; var complete:Function; var url = url; var burl = burl; var btn = btn; var onClick = onClick; var vars:Object = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); var s = "?"; var i:Number = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://x.mochiads.com/linkping.swf"); loader = new Loader(); setURL = function (url:String):void{ if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(url, onClick); var rect:Rectangle = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = rect.x; avm1Click.y = rect.y; avm1Click.scaleX = (0.01 * rect.width); avm1Click.scaleY = (0.01 * rect.height); }; err = function (ev:Object):void{ netup = false; ev.target.removeEventListener(ev.type, arguments.callee); setURL(burl); }; complete = function (ev:Object):void{ ev.target.removeEventListener(ev.type, arguments.callee); }; if (netup){ setURL((url + s)); } else { setURL(burl); }; if (!((netupAttempted) || (_connected))){ netupAttempted = true; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); }; } public static function warnID(bid:String, leaderboard:Boolean):void{ bid = bid.toLowerCase(); if (bid.length != 16){ trace((("WARNING: " + (leaderboard) ? "board" : "game") + " ID is not the appropriate length")); return; } else { if (bid == "1e113c7239048b3f"){ if (leaderboard){ trace("WARNING: Using testing board ID"); } else { trace("WARNING: Using testing board ID as game ID"); }; return; } else { if (bid == "84993a1de4031cd8"){ if (leaderboard){ trace("WARNING: Using testing game ID as board ID"); } else { trace("WARNING: Using testing game ID"); }; return; }; }; }; var i:Number = 0; while (i < bid.length) { switch (bid.charAt(i)){ case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": case "a": case "b": case "c": case "d": case "e": case "f": break; default: trace(("WARNING: Board ID contains illegal characters: " + bid)); return; }; i++; }; } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); _mochiLocalConnection.close(); //unresolved jump var _slot1 = error; }; if (_timer != null){ _timer.stop(); //unresolved jump var _slot1 = error; }; } public static function allowDomains(server:String):String{ var hostname:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (server.indexOf("http://") != -1){ hostname = server.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain(hostname); Security.allowInsecureDomain(hostname); }; }; return (hostname); } public static function getVersion():String{ return ("3.7 as3"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); } private static function flush(error:Boolean):void{ var request:Object; var callback:Object; if (((_clip) && (_clip._queue))){ while (_clip._queue.length > 0) { request = _clip._queue.shift(); callback = null; if (request != null){ if (request.callbackID != null){ callback = _clip._callbacks[request.callbackID]; }; delete _clip._callbacks[request.callbackID]; if (((error) && (!((callback == null))))){ handleError(request.args, callback.callbackObject, callback.callbackMethod); }; }; }; }; } public static function get id():String{ return (_id); } private static function onEvent(pkg:Object):void{ var target:String = pkg.target; var event:String = pkg.event; switch (target){ case "events": MochiEvents.triggerEvent(pkg.event, pkg.args); break; case "coins": MochiCoins.triggerEvent(pkg.event, pkg.args); break; case "sync": servicesSync.triggerEvent(pkg.event, pkg.args); break; }; } private static function urlOptions(clip:Object):Object{ var options:String; var pairs:Array; var i:Number; var kv:Array; var opts:Object = {}; if (clip.stage){ options = clip.stage.loaderInfo.parameters.mochiad_options; } else { options = clip.loaderInfo.parameters.mochiad_options; }; if (options){ pairs = options.split("&"); i = 0; while (i < pairs.length) { kv = pairs[i].split("="); opts[unescape(kv[0])] = unescape(kv[1]); i++; }; }; return (opts); } public static function setContainer(container:Object=null, doAdd:Boolean=true):void{ if (container != null){ if ((container is Sprite)){ _container = container; }; }; if (doAdd){ if ((_container is Sprite)){ Sprite(_container).addChild(_clip); }; }; } private static function handleError(args:Object, callbackObject:Object, callbackMethod:Object):void{ var args = args; var callbackObject = callbackObject; var callbackMethod = callbackMethod; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ var _local5 = callbackObject; _local5[callbackMethod](args); //unresolved jump var _slot1 = error; } else { if (callbackMethod != null){ callbackMethod.apply(args); //unresolved jump var _slot1 = error; }; }; }; } private static function loadError(ev:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); } private static function initComChannels():void{ if (!_connected){ trace("[SERVICES_API] connected!"); _connecting = false; _connected = true; _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _clip.onReceive = onReceive; _clip.onEvent = onEvent; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; while (_clip._queue.length > 0) { _mochiLocalConnection.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function loadLCBridge(clip:Object):void{ var loader:Loader; var clip = clip; loader = new Loader(); var mochiLCURL:String = (_servURL + _mochiLC); var req:URLRequest = new URLRequest(mochiLCURL); var complete:Function = function (ev:Object):void{ _mochiLocalConnection = MovieClip(loader.content); listen(); }; loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); loader.load(req); clip.addChild(loader); } private static function listen():void{ _mochiLocalConnection.connect(_listenChannelName); _clip.handshake = function (args:Object):void{ MochiServices.comChannelName = args.newChannel; }; trace("Waiting for MochiAds services to connect..."); } public static function get clip():Object{ return (_container); } public static function set comChannelName(val:String):void{ if (val != null){ if (val.length > 3){ _sendChannelName = (val + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(id:String, clip:Object):MovieClip{ var clipname:String = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(clip).servURL){ _servURL = urlOptions(clip).servURL; }; var servicesURL:String = (_servURL + _services); if (urlOptions(clip).servicesURL){ servicesURL = urlOptions(clip).servicesURL; }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999)))); MochiServices.allowDomains(servicesURL); _clip = createEmptyMovieClip(clip, clipname, 10336, false); loadLCBridge(_clip); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); var req:URLRequest = new URLRequest(servicesURL); var vars:URLVariables = new URLVariables(); vars.listenLC = _listenChannelName; vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options; vars.api_version = getVersion(); if (widget){ vars.widget = true; }; req.data = vars; _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _clip._nextcallbackID = 0; _clip._callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function connect(id:String, clip:Object, onError:Object=null):void{ var id = id; var clip = clip; var onError = onError; warnID(id, false); if ((clip is DisplayObject)){ if (clip.stage == null){ trace("MochiServices connect requires the containing clip be attached to the stage"); }; if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (errorCode:String):void{ trace(errorCode); }; }; }; } public static function createEmptyMovieClip(parent:Object, name:String, depth:Number, doAdd:Boolean=true):MovieClip{ var parent = parent; var name = name; var depth = depth; var doAdd = doAdd; var mc:MovieClip = new MovieClip(); if (doAdd){ if (((false) && (depth))){ parent.addChildAt(mc, depth); } else { parent.addChild(mc); }; }; parent[name] = mc; //unresolved jump var _slot1 = e; throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); mc["_name"] = name; return (mc); } public static function bringToTop(e:Event=null):void{ var e = e; if (((!((MochiServices.clip == null))) && (!((MochiServices.childClip == null))))){ if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; //unresolved jump var _slot1 = errorObject; trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; } public static function connectWait(e:TimerEvent):void{ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load. (timeout)"); MochiServices.disconnect(); MochiServices.onError("IOError"); }; } } }//package mochi.as3
Section 190
//MochiSocial (mochi.as3.MochiSocial) package mochi.as3 { public class MochiSocial { public static const LOGGED_IN:String = "LoggedIn"; public static const PROFILE_HIDE:String = "ProfileHide"; public static const NO_USER:String = "NoUser"; public static const PROPERTIES_SIZE:String = "PropertiesSize"; public static const IO_ERROR:String = "IOError"; public static const PROPERTIES_SAVED:String = "PropertySaved"; public static const WIDGET_LOADED:String = "WidgetLoaded"; public static const USER_INFO:String = "UserInfo"; public static const ERROR:String = "Error"; public static const LOGIN_SHOW:String = "LoginShow"; public static const LOGGED_OUT:String = "LoggedOut"; public static const PROFILE_SHOW:String = "ProfileShow"; public static const LOGIN_SHOWN:String = "LoginShown"; public static const LOGIN_HIDE:String = "LoginHide"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public static var _user_info:Object = null; public function MochiSocial(){ super(); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function saveUserProperties(properties:Object):void{ MochiServices.send("coins_saveUserProperties", properties); } public static function get loggedIn():Boolean{ return (!((_user_info == null))); } public static function triggerEvent(eventType:String, args:Object):void{ _dispatcher.triggerEvent(eventType, args); } public static function addEventListener(eventType:String, delegate:Function):void{ _dispatcher.addEventListener(eventType, delegate); } public static function getUserInfo():void{ MochiServices.send("coins_getUserInfo"); } public static function showLoginWidget(options:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showLoginWidget", {options:options}); } public static function removeEventListener(eventType:String, delegate:Function):void{ _dispatcher.removeEventListener(eventType, delegate); } public static function requestLogin():void{ MochiServices.send("coins_requestLogin"); } public static function getAPIURL():String{ if (!_user_info){ return (null); }; return (_user_info.api_url); } public static function hideLoginWidget():void{ MochiServices.send("coins_hideLoginWidget"); } public static function getAPIToken():String{ if (!_user_info){ return (null); }; return (_user_info.api_token); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (args:Object):void{ _user_info = args; }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (args:Object):void{ _user_info = null; }); } }//package mochi.as3
Section 191
//MochiSync (mochi.as3.MochiSync) package mochi.as3 { import flash.utils.*; public dynamic class MochiSync extends Proxy { private var _syncContainer:Object; public static var SYNC_PROPERTY:String = "UpdateProperty"; public static var SYNC_REQUEST:String = "SyncRequest"; public function MochiSync():void{ super(); _syncContainer = {}; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(name, value):void{ if (_syncContainer[name] == value){ return; }; var n:String = name.toString(); _syncContainer[n] = value; MochiServices.send("sync_propUpdate", {name:n, value:value}); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(name){ return (_syncContainer[name]); } public function triggerEvent(eventType:String, args:Object):void{ switch (eventType){ case SYNC_REQUEST: MochiServices.send("sync_syncronize", _syncContainer); break; case SYNC_PROPERTY: _syncContainer[args.name] = args.value; break; }; } } }//package mochi.as3
Section 192
//MochiUserData (mochi.as3.MochiUserData) package mochi.as3 { import flash.events.*; import flash.utils.*; import flash.net.*; public class MochiUserData extends EventDispatcher { public var callback:Function;// = null public var operation:String;// = null public var error:Event;// = null public var data;// = null public var _loader:URLLoader; public var key:String;// = null public function MochiUserData(key:String="", callback:Function=null){ super(); this.key = key; this.callback = callback; } public function serialize(obj):ByteArray{ var arr:ByteArray = new ByteArray(); arr.objectEncoding = ObjectEncoding.AMF3; arr.writeObject(obj); arr.compress(); return (arr); } public function errorHandler(event:IOErrorEvent):void{ data = null; error = event; if (callback != null){ performCallback(); } else { dispatchEvent(event); }; close(); } public function putEvent(obj):void{ request("put", serialize(obj)); } public function deserialize(arr:ByteArray){ arr.objectEncoding = ObjectEncoding.AMF3; arr.uncompress(); return (arr.readObject()); } public function securityErrorHandler(event:SecurityErrorEvent):void{ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + event.toString()))); } public function getEvent():void{ request("get", serialize(null)); } override public function toString():String{ return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]")); } public function performCallback():void{ callback(this); //unresolved jump var _slot1 = e; trace(("[MochiUserData] exception during callback: " + _slot1)); } public function request(_operation:String, _data:ByteArray):void{ var _operation = _operation; var _data = _data; operation = _operation; var api_url:String = MochiSocial.getAPIURL(); var api_token:String = MochiSocial.getAPIToken(); if ((((api_url == null)) || ((api_token == null)))){ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in")); return; }; _loader = new URLLoader(); var args:URLVariables = new URLVariables(); args.op = _operation; args.key = key; var req:URLRequest = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString())); req.method = URLRequestMethod.POST; req.contentType = "application/x-mochi-userdata"; req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)]; req.data = _data; _loader.dataFormat = URLLoaderDataFormat.BINARY; _loader.addEventListener(Event.COMPLETE, completeHandler); _loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); _loader.load(req); //unresolved jump var _slot1 = e; errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _slot1.toString()))); } public function completeHandler(event:Event):void{ var event = event; if (_loader.data.length){ data = deserialize(_loader.data); } else { data = null; }; //unresolved jump var _slot1 = e; errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + _slot1.toString()))); return; if (callback != null){ performCallback(); } else { dispatchEvent(event); }; close(); } public function close():void{ if (_loader){ _loader.removeEventListener(Event.COMPLETE, completeHandler); _loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); _loader.close(); _loader = null; }; error = null; callback = null; } public static function get(key:String, callback:Function):void{ var userData:MochiUserData = new MochiUserData(key, callback); userData.getEvent(); } public static function put(key:String, obj, callback:Function):void{ var userData:MochiUserData = new MochiUserData(key, callback); userData.putEvent(obj); } } }//package mochi.as3
Section 193
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.4.0.6955"; 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 194
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.4.0.6955"; public function ByteArrayAsset(){ super(); } } }//package mx.core
Section 195
//EdgeMetrics (mx.core.EdgeMetrics) package mx.core { public class EdgeMetrics { public var top:Number; public var left:Number; public var bottom:Number; public var right:Number; mx_internal static const VERSION:String = "3.4.0.6955"; 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 196
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.4.0.6955"; 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 197
//FlexLoader (mx.core.FlexLoader) package mx.core { import flash.display.*; import mx.utils.*; public class FlexLoader extends Loader { mx_internal static const VERSION:String = "3.4.0.6955"; 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 198
//FlexMovieClip (mx.core.FlexMovieClip) package mx.core { import flash.display.*; import mx.utils.*; public class FlexMovieClip extends MovieClip { mx_internal static const VERSION:String = "3.4.0.6955"; public function FlexMovieClip(){ super(); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 199
//FlexShape (mx.core.FlexShape) package mx.core { import flash.display.*; import mx.utils.*; public class FlexShape extends Shape { mx_internal static const VERSION:String = "3.4.0.6955"; 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 200
//FlexVersion (mx.core.FlexVersion) package mx.core { import mx.resources.*; public class FlexVersion { public static const VERSION_2_0_1:uint = 33554433; public static const CURRENT_VERSION:uint = 50331648; public static const VERSION_3_0:uint = 50331648; public static const VERSION_2_0:uint = 33554432; public static const VERSION_ALREADY_READ:String = "versionAlreadyRead"; public static const VERSION_ALREADY_SET:String = "versionAlreadySet"; mx_internal static const VERSION:String = "3.4.0.6955"; 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 201
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "3.4.0.6955"; public function FontAsset(){ super(); } } }//package mx.core
Section 202
//IBorder (mx.core.IBorder) package mx.core { public interface IBorder { function get borderMetrics():EdgeMetrics; } }//package mx.core
Section 203
//IButton (mx.core.IButton) package mx.core { public interface IButton extends IUIComponent { function get emphasized():Boolean; function set emphasized(C:\autobuild\3.x\frameworks\projects\framework\src;mx\core;IButton.as:Boolean):void; function callLater(_arg1:Function, _arg2:Array=null):void; } }//package mx.core
Section 204
//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.x\frameworks\projects\framework\src;mx\core;IChildList.as:DisplayObject):DisplayObject; function getChildByName(C:\autobuild\3.x\frameworks\projects\framework\src;mx\core;IChildList.as:String):DisplayObject; function removeChildAt(C:\autobuild\3.x\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.x\frameworks\projects\framework\src;mx\core;IChildList.as:int):DisplayObject; function addChild(C:\autobuild\3.x\frameworks\projects\framework\src;mx\core;IChildList.as:DisplayObject):DisplayObject; function contains(flash.display:DisplayObject):Boolean; } }//package mx.core
Section 205
//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.x\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.x\frameworks\projects\framework\src;mx\core;ISpriteInterface.as:Point):Boolean; } }//package mx.core
Section 206
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 207
//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 208
//IFlexModuleFactory (mx.core.IFlexModuleFactory) package mx.core { public interface IFlexModuleFactory { function create(... _args):Object; function info():Object; } }//package mx.core
Section 209
//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 210
//IProgrammaticSkin (mx.core.IProgrammaticSkin) package mx.core { public interface IProgrammaticSkin { function validateNow():void; function validateDisplayList():void; } }//package mx.core
Section 211
//IRawChildrenContainer (mx.core.IRawChildrenContainer) package mx.core { public interface IRawChildrenContainer { function get rawChildren():IChildList; } }//package mx.core
Section 212
//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.x\frameworks\projects\framework\src;mx\core;IRectangularBorder.as:Rectangle):void; function layoutBackgroundImage():void; } }//package mx.core
Section 213
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function get instanceIndices():Array; function set instanceIndices(C:\autobuild\3.x\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function get isDocument():Boolean; function set repeaters(C:\autobuild\3.x\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function initializeRepeaterArrays(C:\autobuild\3.x\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:IRepeaterClient):void; function get repeaters():Array; function set repeaterIndices(C:\autobuild\3.x\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 214
//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.x\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.x\frameworks\projects\framework\src;mx\core;ISWFBridgeGroup.as:IEventDispatcher):void; function containsBridge(IEventDispatcher:IEventDispatcher):Boolean; function getChildBridges():Array; } }//package mx.core
Section 215
//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 216
//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 217
//MovieClipAsset (mx.core.MovieClipAsset) package mx.core { public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.4.0.6955"; public function MovieClipAsset(){ super(); _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } 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; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 218
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset) package mx.core { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject { protected var initialHeight:Number;// = 0 private var loader:Loader;// = null private var initialized:Boolean;// = false protected var initialWidth:Number;// = 0 private var requestedHeight:Number; private var requestedWidth:Number; mx_internal static const VERSION:String = "3.4.0.6955"; public function MovieClipLoaderAsset(){ super(); var loaderContext:LoaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); if (("allowLoadBytesCodeExecution" in loaderContext)){ loaderContext["allowLoadBytesCodeExecution"] = true; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.loadBytes(movieClipData, loaderContext); addChild(loader); } override public function get width():Number{ if (!initialized){ return (initialWidth); }; return (super.width); } override public function set width(value:Number):void{ if (!initialized){ requestedWidth = value; } else { loader.width = value; }; } override public function get measuredHeight():Number{ return (initialHeight); } private function completeHandler(event:Event):void{ initialized = true; initialWidth = loader.width; initialHeight = loader.height; if (!isNaN(requestedWidth)){ loader.width = requestedWidth; }; if (!isNaN(requestedHeight)){ loader.height = requestedHeight; }; dispatchEvent(event); } override public function set height(value:Number):void{ if (!initialized){ requestedHeight = value; } else { loader.height = value; }; } override public function get measuredWidth():Number{ return (initialWidth); } override public function get height():Number{ if (!initialized){ return (initialHeight); }; return (super.height); } public function get movieClipData():ByteArray{ return (null); } } }//package mx.core
Section 219
//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 220
//Singleton (mx.core.Singleton) package mx.core { public class Singleton { mx_internal static const VERSION:String = "3.4.0.6955"; 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 221
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.4.0.6955"; public function SoundAsset(){ super(); } } }//package mx.core
Section 222
//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 223
//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.4.0.6955"; 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 224
//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.4.0.6955"; 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 225
//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.4.0.6955"; 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 226
//RectangularDropShadow (mx.graphics.RectangularDropShadow) package mx.graphics { import mx.core.*; import flash.display.*; import flash.geom.*; import mx.utils.*; import flash.filters.*; public class RectangularDropShadow { private var leftShadow:BitmapData; private var _tlRadius:Number;// = 0 private var _trRadius:Number;// = 0 private var _angle:Number;// = 45 private var topShadow:BitmapData; private var _distance:Number;// = 4 private var rightShadow:BitmapData; private var _alpha:Number;// = 0.4 private var shadow:BitmapData; private var _brRadius:Number;// = 0 private var _blRadius:Number;// = 0 private var _color:int;// = 0 private var bottomShadow:BitmapData; private var changed:Boolean;// = true mx_internal static const VERSION:String = "3.4.0.6955"; 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 227
//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.x\frameworks\projects\framework\src;mx\managers;IFocusManager.as:IButton):void; function set focusPane(C:\autobuild\3.x\frameworks\projects\framework\src;mx\managers;IFocusManager.as:Sprite):void; function set showFocusIndicator(C:\autobuild\3.x\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.x\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.x\frameworks\projects\framework\src;mx\managers;IFocusManager.as:IFocusManagerComponent):void; function activate():void; function showFocus():void; function set defaultButtonEnabled(C:\autobuild\3.x\frameworks\projects\framework\src;mx\managers;IFocusManager.as:Boolean):void; function hideFocus():void; function getNextFocusManagerComponent(value:Boolean=false):IFocusManagerComponent; } }//package mx.managers
Section 228
//IFocusManagerComponent (mx.managers.IFocusManagerComponent) package mx.managers { public interface IFocusManagerComponent { function set focusEnabled(C:\autobuild\3.x\frameworks\projects\framework\src;mx\managers;IFocusManagerComponent.as:Boolean):void; function drawFocus(C:\autobuild\3.x\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 229
//IFocusManagerContainer (mx.managers.IFocusManagerContainer) package mx.managers { import flash.events.*; import flash.display.*; public interface IFocusManagerContainer extends IEventDispatcher { function set focusManager(C:\autobuild\3.x\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 230
//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.x\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:ILayoutManagerClient):void; function set usePhasedInstantiation(C:\autobuild\3.x\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:Boolean):void; function invalidateSize(C:\autobuild\3.x\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:ILayoutManagerClient):void; function get usePhasedInstantiation():Boolean; function invalidateProperties(C:\autobuild\3.x\frameworks\projects\framework\src;mx\managers;ILayoutManager.as:ILayoutManagerClient):void; } }//package mx.managers
Section 231
//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.x\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean):void; function set initialized(C:\autobuild\3.x\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.x\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean=false):void; function set nestLevel(C:\autobuild\3.x\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:int):void; function set processedDescriptors(C:\autobuild\3.x\frameworks\projects\framework\src;mx\managers;ILayoutManagerClient.as:Boolean):void; } }//package mx.managers
Section 232
//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.x\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 233
//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 234
//IModuleInfo (mx.modules.IModuleInfo) package mx.modules { import flash.events.*; import mx.core.*; import flash.utils.*; import flash.system.*; public interface IModuleInfo extends IEventDispatcher { function get ready():Boolean; function get loaded():Boolean; function load(_arg1:ApplicationDomain=null, _arg2:SecurityDomain=null, _arg3:ByteArray=null):void; function release():void; function get error():Boolean; function get data():Object; function publish(C:\autobuild\3.x\frameworks\projects\framework\src;mx\modules;IModuleInfo.as:IFlexModuleFactory):void; function get factory():IFlexModuleFactory; function set data(C:\autobuild\3.x\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 235
//ModuleManager (mx.modules.ModuleManager) package mx.modules { import mx.core.*; public class ModuleManager { mx_internal static const VERSION:String = "3.4.0.6955"; 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.utils.*; import flash.system.*; import mx.events.*; import flash.net.*; class ModuleInfoProxy extends EventDispatcher implements IModuleInfo { private var _data:Object; private var info:ModuleInfo; private var referenced:Boolean;// = false private function ModuleInfoProxy(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; var moduleEvent:ModuleEvent = new ModuleEvent(ModuleEvent.READY); moduleEvent.bytesLoaded = loader.contentLoaderInfo.bytesLoaded; moduleEvent.bytesTotal = loader.contentLoaderInfo.bytesTotal; clearLoader(); dispatchEvent(moduleEvent); } 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 236
//ModuleManagerGlobals (mx.modules.ModuleManagerGlobals) package mx.modules { public class ModuleManagerGlobals { public static var managerSingleton:Object = null; public function ModuleManagerGlobals(){ super(); } } }//package mx.modules
Section 237
//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 238
//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.x\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.x\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.x\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.x\frameworks\projects\framework\src;mx\resources;IResourceManager.as:Array):void; function getNumber(_arg1:String, _arg2:String, _arg3:String=null):Number; } }//package mx.resources
Section 239
//IResourceModule (mx.resources.IResourceModule) package mx.resources { public interface IResourceModule { function get resourceBundles():Array; } }//package mx.resources
Section 240
//LocaleSorter (mx.resources.LocaleSorter) package mx.resources { public class LocaleSorter { mx_internal static const VERSION:String = "3.4.0.6955"; 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 241
//ResourceBundle (mx.resources.ResourceBundle) package mx.resources { import mx.core.*; import flash.system.*; import mx.utils.*; public class ResourceBundle implements IResourceBundle { mx_internal var _locale:String; private var _content:Object; mx_internal var _bundleName:String; mx_internal static const VERSION:String = "3.4.0.6955"; 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 242
//ResourceManager (mx.resources.ResourceManager) package mx.resources { import mx.core.*; public class ResourceManager { mx_internal static const VERSION:String = "3.4.0.6955"; 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 243
//ResourceManagerImpl (mx.resources.ResourceManagerImpl) package mx.resources { import flash.events.*; import mx.core.*; import flash.utils.*; import flash.system.*; import mx.modules.*; import mx.events.*; import mx.utils.*; public class ResourceManagerImpl extends EventDispatcher implements IResourceManager { private var resourceModules:Object; private var initializedForNonFrameworkApp:Boolean;// = false private var localeMap:Object; private var _localeChain:Array; mx_internal static const VERSION:String = "3.4.0.6955"; 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{ var bundles:Array; var n:int; var i:int; var locale:String; var bundleName:String; var rmi:ResourceModuleInfo = resourceModules[url]; if (!rmi){ return; }; if (rmi.resourceModule){ bundles = rmi.resourceModule.resourceBundles; if (bundles){ n = bundles.length; i = 0; while (i < n) { locale = bundles[i].locale; bundleName = bundles[i].bundleName; removeResourceBundle(locale, bundleName); i++; }; }; }; resourceModules[url] = null; delete resourceModules[url]; rmi.moduleInfo.unload(); if (update){ this.update(); }; } public static function getInstance():IResourceManager{ if (!instance){ instance = new (ResourceManagerImpl); }; return (instance); } } }//package mx.resources import flash.events.*; import mx.modules.*; import mx.events.*; class ResourceModuleInfo { public var resourceModule:IResourceModule; public var errorHandler:Function; public var readyHandler:Function; public var moduleInfo:IModuleInfo; private function ResourceModuleInfo(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 244
//HaloBorder (mx.skins.halo.HaloBorder) package mx.skins.halo { import mx.core.*; import flash.display.*; import mx.styles.*; import mx.skins.*; import mx.graphics.*; import mx.utils.*; public class HaloBorder extends RectangularBorder { mx_internal var radiusObj:Object; mx_internal var backgroundHole:Object; mx_internal var radius:Number; mx_internal var bRoundedCorners:Boolean; mx_internal var backgroundColor:Object; private var dropShadow:RectangularDropShadow; protected var _borderMetrics:EdgeMetrics; mx_internal var backgroundAlphaName:String; mx_internal static const VERSION:String = "3.4.0.6955"; 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 topRadius: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){ topRadius = Math.max((radius - Math.max(bm.top, bm.left, bm.right)), 0); bottomRadius = (bRoundedCorners) ? Math.max((radius - Math.max(bm.bottom, bm.left, bm.right)), 0) : 0; radiusObj = {tl:topRadius, tr:topRadius, 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 245
//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.4.0.6955"; 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 246
//Border (mx.skins.Border) package mx.skins { import mx.core.*; public class Border extends ProgrammaticSkin implements IBorder { mx_internal static const VERSION:String = "3.4.0.6955"; public function Border(){ super(); } public function get borderMetrics():EdgeMetrics{ return (EdgeMetrics.EMPTY); } } }//package mx.skins
Section 247
//ProgrammaticSkin (mx.skins.ProgrammaticSkin) package mx.skins { import mx.core.*; import flash.display.*; import flash.geom.*; import mx.styles.*; import mx.managers.*; import mx.utils.*; public class ProgrammaticSkin extends FlexShape implements IFlexDisplayObject, IInvalidating, ILayoutManagerClient, ISimpleStyleClient, IProgrammaticSkin { private var _initialized:Boolean;// = false private var _height:Number; private var invalidateDisplayListFlag:Boolean;// = false private var _styleName:IStyleClient; private var _nestLevel:int;// = 0 private var _processedDescriptors:Boolean;// = false private var _updateCompletePendingFlag:Boolean;// = true private var _width:Number; mx_internal static const VERSION:String = "3.4.0.6955"; 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 248
//RectangularBorder (mx.skins.RectangularBorder) package mx.skins { import flash.events.*; import mx.core.*; import flash.display.*; import flash.geom.*; import flash.utils.*; import mx.styles.*; import flash.system.*; import mx.resources.*; import flash.net.*; public class RectangularBorder extends Border implements IRectangularBorder { private var backgroundImage:DisplayObject; private var backgroundImageHeight:Number; private var _backgroundImageBounds:Rectangle; private var backgroundImageStyle:Object; private var backgroundImageWidth:Number; private var resourceManager:IResourceManager; mx_internal static const VERSION:String = "3.4.0.6955"; 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{ if (((((_backgroundImageBounds) && (value))) && (_backgroundImageBounds.equals(value)))){ return; }; _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 249
//CSSStyleDeclaration (mx.styles.CSSStyleDeclaration) package mx.styles { import flash.events.*; import mx.core.*; import flash.display.*; import flash.utils.*; import mx.managers.*; public class CSSStyleDeclaration extends EventDispatcher { mx_internal var effects:Array; protected var overrides:Object; public var defaultFactory:Function; public var factory:Function; mx_internal var selectorRefCount:int;// = 0 private var styleManager:IStyleManager2; private var clones:Dictionary; mx_internal static const VERSION:String = "3.4.0.6955"; 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 250
//ISimpleStyleClient (mx.styles.ISimpleStyleClient) package mx.styles { public interface ISimpleStyleClient { function set styleName(C:\autobuild\3.x\frameworks\projects\framework\src;mx\styles;ISimpleStyleClient.as:Object):void; function styleChanged(C:\autobuild\3.x\frameworks\projects\framework\src;mx\styles;ISimpleStyleClient.as:String):void; function get styleName():Object; } }//package mx.styles
Section 251
//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 252
//IStyleManager (mx.styles.IStyleManager) package mx.styles { import flash.events.*; public interface IStyleManager { function isColorName(value:String):Boolean; function registerParentDisplayListInvalidatingStyle(C:\autobuild\3.x\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void; function registerInheritingStyle(C:\autobuild\3.x\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void; function set stylesRoot(C:\autobuild\3.x\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.x\frameworks\projects\framework\src;mx\styles;IStyleManager.as:Object):void; function unloadStyleDeclarations(_arg1:String, _arg2:Boolean=true):void; function getColorNames(C:\autobuild\3.x\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.x\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.x\frameworks\projects\framework\src;mx\styles;IStyleManager.as:String):void; function registerSizeInvalidatingStyle(C:\autobuild\3.x\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 253
//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 254
//IStyleModule (mx.styles.IStyleModule) package mx.styles { public interface IStyleModule { function unload():void; } }//package mx.styles
Section 255
//StyleManager (mx.styles.StyleManager) package mx.styles { import flash.events.*; import mx.core.*; import flash.system.*; public class StyleManager { mx_internal static const VERSION:String = "3.4.0.6955"; 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 256
//StyleManagerImpl (mx.styles.StyleManagerImpl) package mx.styles { import flash.events.*; import mx.core.*; import flash.utils.*; import flash.system.*; import mx.modules.*; import mx.events.*; import mx.resources.*; import mx.managers.*; public class StyleManagerImpl implements IStyleManager2 { private var _stylesRoot:Object; private var _selectors:Object; private var styleModules:Object; private var _inheritingStyles:Object; private var resourceManager:IResourceManager; private var _typeSelectorCache:Object; mx_internal static const VERSION:String = "3.4.0.6955"; 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); styleEvent.bytesLoaded = event.bytesLoaded; styleEvent.bytesTotal = event.bytesTotal; 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 257
//ColorUtil (mx.utils.ColorUtil) package mx.utils { public class ColorUtil { mx_internal static const VERSION:String = "3.4.0.6955"; 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 258
//GraphicsUtil (mx.utils.GraphicsUtil) package mx.utils { import flash.display.*; public class GraphicsUtil { mx_internal static const VERSION:String = "3.4.0.6955"; 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 259
//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.4.0.6955"; 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 260
//StringUtil (mx.utils.StringUtil) package mx.utils { public class StringUtil { mx_internal static const VERSION:String = "3.4.0.6955"; 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 261
//_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 262
//_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 263
//_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 264
//_comboDropdownStyle (_comboDropdownStyle) package { import mx.core.*; import mx.styles.*; public class _comboDropdownStyle { public static function init(leading:IFlexModuleFactory):void{ var fbs = leading; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".comboDropdown"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".comboDropdown", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.shadowDirection = "center"; this.fontWeight = "normal"; this.dropShadowEnabled = true; this.leading = 0; this.backgroundColor = 0xFFFFFF; this.shadowDistance = 1; this.cornerRadius = 0; this.borderThickness = 0; this.paddingLeft = 5; this.paddingRight = 5; }; }; } } }//package
Section 265
//_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 266
//_dateFieldPopupStyle (_dateFieldPopupStyle) package { import mx.core.*; import mx.styles.*; public class _dateFieldPopupStyle { public static function init(_dateFieldPopupStyle.as$3:IFlexModuleFactory):void{ var fbs = _dateFieldPopupStyle.as$3; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".dateFieldPopup"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".dateFieldPopup", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.dropShadowEnabled = true; this.backgroundColor = 0xFFFFFF; this.borderThickness = 0; }; }; } } }//package
Section 267
//_errorTipStyle (_errorTipStyle) package { import mx.core.*; import mx.styles.*; public class _errorTipStyle { public static function init(borderColor:IFlexModuleFactory):void{ var fbs = borderColor; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".errorTip"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".errorTip", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.borderStyle = "errorTipRight"; this.paddingTop = 4; this.borderColor = 13510953; this.color = 0xFFFFFF; this.fontSize = 9; this.shadowColor = 0; this.paddingLeft = 4; this.paddingBottom = 4; this.paddingRight = 4; }; }; } } }//package
Section 268
//_globalStyle (_globalStyle) package { import mx.core.*; import mx.styles.*; import mx.skins.halo.*; public class _globalStyle { public static function init(horizontalGridLines:IFlexModuleFactory):void{ var fbs = horizontalGridLines; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration("global"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration("global", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fillColor = 0xFFFFFF; this.kerning = false; this.iconColor = 0x111111; this.textRollOverColor = 2831164; this.horizontalAlign = "left"; this.shadowCapColor = 14015965; this.backgroundAlpha = 1; this.filled = true; this.textDecoration = "none"; this.roundedBottomCorners = true; this.fontThickness = 0; this.focusBlendMode = "normal"; this.fillColors = [0xFFFFFF, 0xCCCCCC, 0xFFFFFF, 0xEEEEEE]; this.horizontalGap = 8; this.borderCapColor = 9542041; this.buttonColor = 7305079; this.indentation = 17; this.selectionDisabledColor = 0xDDDDDD; this.closeDuration = 250; this.embedFonts = false; this.paddingTop = 0; this.letterSpacing = 0; this.focusAlpha = 0.4; this.bevel = true; this.fontSize = 10; this.shadowColor = 0xEEEEEE; this.borderAlpha = 1; this.paddingLeft = 0; this.fontWeight = "normal"; this.indicatorGap = 14; this.focusSkin = HaloFocusRect; this.dropShadowEnabled = false; this.leading = 2; this.borderSkin = HaloBorder; this.fontSharpness = 0; this.modalTransparencyDuration = 100; this.borderThickness = 1; this.backgroundSize = "auto"; this.borderStyle = "inset"; this.borderColor = 12040892; this.fontAntiAliasType = "advanced"; this.errorColor = 0xFF0000; this.shadowDistance = 2; this.horizontalGridLineColor = 0xF7F7F7; this.stroked = false; this.modalTransparencyColor = 0xDDDDDD; this.cornerRadius = 0; this.verticalAlign = "top"; this.textIndent = 0; this.fillAlphas = [0.6, 0.4, 0.75, 0.65]; this.verticalGridLineColor = 14015965; this.themeColor = 40447; this.version = "3.0.0"; this.shadowDirection = "center"; this.modalTransparency = 0.5; this.repeatInterval = 35; this.openDuration = 250; this.textAlign = "left"; this.fontFamily = "Verdana"; this.textSelectedColor = 2831164; this.paddingBottom = 0; this.strokeWidth = 1; this.fontGridFitType = "pixel"; this.horizontalGridLines = false; this.useRollOver = true; this.verticalGridLines = true; this.repeatDelay = 500; this.fontStyle = "normal"; this.dropShadowColor = 0; this.focusThickness = 2; this.verticalGap = 6; this.disabledColor = 11187123; this.paddingRight = 0; this.focusRoundedCorners = "tl tr bl br"; this.borderSides = "left top right bottom"; this.disabledIconColor = 0x999999; this.modalTransparencyBlur = 3; this.color = 734012; this.selectionDuration = 250; this.highlightAlphas = [0.3, 0]; }; }; } } }//package
Section 269
//_headerDateTextStyle (_headerDateTextStyle) package { import mx.core.*; import mx.styles.*; public class _headerDateTextStyle { public static function init(bold:IFlexModuleFactory):void{ var fbs = bold; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".headerDateText"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".headerDateText", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//package
Section 270
//_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 271
//_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.paddingBottom = 2; this.paddingRight = 2; }; }; } } }//package
Section 272
//_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.borderColor = 0xFFFFFF; this.backgroundColor = 0xFFFFFF; this.headerColors = [0xE7E7E7, 0xD9D9D9]; this.footerColors = [0xE7E7E7, 0xC7C7C7]; this.borderAlpha = 1; }; }; } } }//package
Section 273
//_plainStyle (_plainStyle) package { import mx.core.*; import mx.styles.*; public class _plainStyle { public static function init(backgroundImage:IFlexModuleFactory):void{ var fbs = backgroundImage; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".plain"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".plain", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.paddingTop = 0; this.backgroundColor = 0xFFFFFF; this.backgroundImage = ""; this.horizontalAlign = "left"; this.paddingLeft = 0; this.paddingBottom = 0; this.paddingRight = 0; }; }; } } }//package
Section 274
//_popUpMenuStyle (_popUpMenuStyle) package { import mx.core.*; import mx.styles.*; public class _popUpMenuStyle { public static function init(normal:IFlexModuleFactory):void{ var fbs = normal; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".popUpMenu"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".popUpMenu", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "normal"; this.textAlign = "left"; }; }; } } }//package
Section 275
//_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 276
//_swatchPanelTextFieldStyle (_swatchPanelTextFieldStyle) package { import mx.core.*; import mx.styles.*; public class _swatchPanelTextFieldStyle { public static function init(shadowCapColor:IFlexModuleFactory):void{ var fbs = shadowCapColor; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".swatchPanelTextField"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".swatchPanelTextField", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.borderStyle = "inset"; this.borderColor = 14015965; this.highlightColor = 12897484; this.backgroundColor = 0xFFFFFF; this.shadowCapColor = 14015965; this.shadowColor = 14015965; this.paddingLeft = 5; this.buttonColor = 7305079; this.borderCapColor = 9542041; this.paddingRight = 5; }; }; } } }//package
Section 277
//_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 278
//_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 279
//_todayStyleStyle (_todayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _todayStyleStyle { public static function init(color:IFlexModuleFactory):void{ var fbs = color; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".todayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".todayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.color = 0xFFFFFF; this.textAlign = "center"; }; }; } } }//package
Section 280
//_weekDayStyleStyle (_weekDayStyleStyle) package { import mx.core.*; import mx.styles.*; public class _weekDayStyleStyle { public static function init(bold:IFlexModuleFactory):void{ var fbs = bold; var style:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".weekDayStyle"); if (!style){ style = new CSSStyleDeclaration(); StyleManager.setStyleDeclaration(".weekDayStyle", style, false); }; if (style.defaultFactory == null){ style.defaultFactory = function ():void{ this.fontWeight = "bold"; this.textAlign = "center"; }; }; } } }//package
Section 281
//_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 282
//_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 283
//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 284
//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 285
//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 286
//Mode (Mode) package { import flash.events.*; import flash.display.*; import com.adamatomic.flixel.*; import mochi.as3.*; import com.adamatomic.Mode.*; public dynamic class Mode extends FlxGame { private var m:MovieClip; public function Mode():void{ super(320, 250, MenuState, 2, 4279442459, true, 4285700436); m = new MovieClip(); this.addChild(m); help("Jump", "Shoot", "Nothing"); if (FlxG.mochiOn){ addEventListener(Event.ADDED_TO_STAGE, init2); }; } private function init2(e:Event):void{ MochiServices.connect("1ec2d1e79b70496c", this, onConnectError); removeEventListener(Event.ADDED_TO_STAGE, init2); } public function onConnectError(status:String):void{ trace("Error"); } } }//package
Section 287
//Preloader (Preloader) package { import com.adamatomic.flixel.data.*; public class Preloader extends FlxFactory { public function Preloader():void{ className = "Mode"; super(); } } }//package

Library Items

Symbol 1 Bitmap {com.adamatomic.flixel.data.FlxFactory_ImgBar}
Symbol 2 Bitmap {com.adamatomic.flixel.data.FlxFactory_ImgBit}
Symbol 3 Sound {com.adamatomic.flixel.FlxGame_SndFlixel} [com.adamatomic.flixel.FlxGame_SndFlixel]
Symbol 4 Sound {com.adamatomic.flixel.FlxGame_SndBeep} [com.adamatomic.flixel.FlxGame_SndBeep]
Symbol 5 Sound {com.adamatomic.Mode.MenuState_SndHit2} [com.adamatomic.Mode.MenuState_SndHit2]
Symbol 6 Sound {com.adamatomic.Mode.MenuState_SndHit} [com.adamatomic.Mode.MenuState_SndHit]
Symbol 7 Sound {com.adamatomic.Mode.LevelSelectState_SndHit2} [com.adamatomic.Mode.LevelSelectState_SndHit2]
Symbol 8 Sound {com.adamatomic.Mode.LevelSelectState_SndHit} [com.adamatomic.Mode.LevelSelectState_SndHit]
Symbol 9 Sound {com.adamatomic.Mode.LevelSelectState_SndNeg} [com.adamatomic.Mode.LevelSelectState_SndNeg]
Symbol 10 Sound {com.adamatomic.Mode.OptionsState_SndHit2} [com.adamatomic.Mode.OptionsState_SndHit2]
Symbol 11 MovieClip {com.kongregate.as3.client.KongregateAPI} [com.kongregate.as3.client.KongregateAPI]
Symbol 12 Sound {com.adamatomic.Mode.PlayStateTiles_SndMode} [com.adamatomic.Mode.PlayStateTiles_SndMode]
Symbol 13 Sound {com.adamatomic.Mode.ShopState_SndHit2} [com.adamatomic.Mode.ShopState_SndHit2]
Symbol 14 Sound {com.adamatomic.Mode.ShopState_SndHit} [com.adamatomic.Mode.ShopState_SndHit]
Symbol 15 Sound {com.adamatomic.Mode.ShopState_SndBuy} [com.adamatomic.Mode.ShopState_SndBuy]
Symbol 16 Sound {com.adamatomic.Mode.ShopState_SndNeg} [com.adamatomic.Mode.ShopState_SndNeg]
Symbol 17 Sound {com.adamatomic.Mode.Player_SndExplode2} [com.adamatomic.Mode.Player_SndExplode2]
Symbol 18 Sound {com.adamatomic.Mode.Player_SndJump} [com.adamatomic.Mode.Player_SndJump]
Symbol 19 Sound {com.adamatomic.Mode.Player_SndLand} [com.adamatomic.Mode.Player_SndLand]
Symbol 20 Sound {com.adamatomic.Mode.Player_SndExplode} [com.adamatomic.Mode.Player_SndExplode]
Symbol 21 Sound {com.adamatomic.Mode.Player_SndHurt} [com.adamatomic.Mode.Player_SndHurt]
Symbol 22 Sound {com.adamatomic.Mode.Player_SndJam} [com.adamatomic.Mode.Player_SndJam]
Symbol 23 Sound {com.adamatomic.flixel.FlxBlock_SndExplode} [com.adamatomic.flixel.FlxBlock_SndExplode]
Symbol 24 Sound {com.adamatomic.Mode.Spawner_SndExplode} [com.adamatomic.Mode.Spawner_SndExplode]
Symbol 25 Sound {com.adamatomic.Mode.Spawner_SndExplode2} [com.adamatomic.Mode.Spawner_SndExplode2]
Symbol 26 Sound {com.adamatomic.Mode.Spawner_SndHit} [com.adamatomic.Mode.Spawner_SndHit]
Symbol 27 Sound {com.adamatomic.Mode.Bot_SndJet} [com.adamatomic.Mode.Bot_SndJet]
Symbol 28 Sound {com.adamatomic.Mode.Bot_SndExplode} [com.adamatomic.Mode.Bot_SndExplode]
Symbol 29 Sound {com.adamatomic.Mode.Bot_SndHit} [com.adamatomic.Mode.Bot_SndHit]
Symbol 30 Sound {com.adamatomic.Mode.VictoryState_SndMenu} [com.adamatomic.Mode.VictoryState_SndMenu]
Symbol 31 Sound {com.adamatomic.Mode.VictoryState_SndHit} [com.adamatomic.Mode.VictoryState_SndHit]
Symbol 32 Sound {com.adamatomic.Mode.VictoryState_SndHit2} [com.adamatomic.Mode.VictoryState_SndHit2]
Symbol 33 Sound {com.adamatomic.Mode.BotBullet_SndHit} [com.adamatomic.Mode.BotBullet_SndHit]
Symbol 34 Sound {com.adamatomic.Mode.BotBullet_SndShoot} [com.adamatomic.Mode.BotBullet_SndShoot]
Symbol 35 Sound {com.adamatomic.Mode.Enemy_SndExplode} [com.adamatomic.Mode.Enemy_SndExplode]
Symbol 36 Sound {com.adamatomic.Mode.Enemy_SndHit} [com.adamatomic.Mode.Enemy_SndHit]
Symbol 37 Sound {com.adamatomic.Mode.Coin_SndLife} [com.adamatomic.Mode.Coin_SndLife]
Symbol 38 Sound {com.adamatomic.Mode.Coin_SndExtra} [com.adamatomic.Mode.Coin_SndExtra]
Symbol 39 Sound {com.adamatomic.Mode.Coin_SndCoin} [com.adamatomic.Mode.Coin_SndCoin]
Symbol 40 Sound {com.adamatomic.Mode.Bullet_SndShoot1} [com.adamatomic.Mode.Bullet_SndShoot1]
Symbol 41 Sound {com.adamatomic.Mode.Bullet_SndShoot2} [com.adamatomic.Mode.Bullet_SndShoot2]
Symbol 42 Sound {com.adamatomic.Mode.Bullet_SndHit} [com.adamatomic.Mode.Bullet_SndHit]
Symbol 43 Sound {com.adamatomic.Mode.Bullet_SndShoot4} [com.adamatomic.Mode.Bullet_SndShoot4]
Symbol 44 Sound {com.adamatomic.Mode.Bullet_SndShoot3} [com.adamatomic.Mode.Bullet_SndShoot3]
Symbol 45 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap9}
Symbol 46 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap8}
Symbol 47 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap7}
Symbol 48 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap2}
Symbol 49 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap1}
Symbol 50 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap6}
Symbol 51 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap5}
Symbol 52 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap4}
Symbol 53 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap3}
Symbol 54 Bitmap {com.adamatomic.Mode.BotBullet_ImgBullet}
Symbol 55 Bitmap {com.adamatomic.Mode.Player_ImgJet}
Symbol 56 Bitmap {com.adamatomic.flixel.FlxGame_ImgPoweredBy}
Symbol 57 Bitmap {com.adamatomic.Mode.ShopState_mLogo}
Symbol 58 Bitmap {com.adamatomic.flixel.FlxGame_ImgKeyMouse}
Symbol 59 Bitmap {com.adamatomic.Mode.MenuState_botonsp2}
Symbol 60 Bitmap {com.adamatomic.Mode.MenuState_botonsp}
Symbol 61 Bitmap {com.adamatomic.Mode.OptionsState_ImgCursor}
Symbol 62 Bitmap {com.adamatomic.Mode.Enemy_ImgGibs}
Symbol 63 Bitmap {com.adamatomic.Mode.Spawner_ImgSpawner}
Symbol 64 Bitmap {com.adamatomic.Mode.PlayStateTiles_ImgFlash}
Symbol 65 Bitmap {com.adamatomic.flixel.FlxGame_pakoL}
Symbol 66 Bitmap {com.adamatomic.Mode.Coin_ImgCoin}
Symbol 67 Bitmap {com.adamatomic.Mode.Bot_ImgBot}
Symbol 68 Bitmap {com.adamatomic.Mode.Player_ImgSpaceman}
Symbol 69 Bitmap {com.adamatomic.flixel.FlxGame_ImgKeyMinus}
Symbol 70 Bitmap {com.adamatomic.Mode.Coin_ImgLife}
Symbol 71 Bitmap {com.adamatomic.flixel.FlxGame_ImgKeyX}
Symbol 72 Bitmap {com.adamatomic.Mode.Enemy_ImgEnemy}
Symbol 73 Bitmap {com.adamatomic.Mode.LevelSelectState_But1}
Symbol 74 MovieClip {com.adamatomic.flixel.FlxGame_spon}
Symbol 75 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap10}
Symbol 76 Bitmap {com.adamatomic.Mode.ShopState_But2}
Symbol 77 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap11}
Symbol 78 Bitmap {com.adamatomic.Mode.LevelSelectState_But3}
Symbol 79 Bitmap {com.adamatomic.flixel.FlxGame_ImgKeyC}
Symbol 80 Bitmap {com.adamatomic.Mode.ShopState_But}
Symbol 81 Bitmap {com.adamatomic.Mode.VictoryState_ImgGibs}
Symbol 82 Bitmap {com.adamatomic.Mode.MenuState_mLogo}
Symbol 83 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap14}
Symbol 84 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap13}
Symbol 85 Bitmap {com.adamatomic.Mode.Coin_ImgExtra}
Symbol 86 BinaryData {com.adamatomic.Mode.PlayStateTiles_TxtMap12}
Symbol 87 Bitmap {com.adamatomic.flixel.FlxGame_ImgKey0}
Symbol 88 Bitmap {com.adamatomic.flixel.FlxGame_ImgKey1}
Symbol 89 Bitmap {com.adamatomic.Mode.Bot_ImgBot4}
Symbol 90 Bitmap {com.adamatomic.Mode.PlayStateTiles_ImgBlock}
Symbol 91 Bitmap {com.adamatomic.Mode.Bot_ImgBot2}
Symbol 92 Bitmap {com.adamatomic.Mode.Bullet_ImgBullet}
Symbol 93 Bitmap {com.adamatomic.Mode.Bot_ImgBot3}
Symbol 94 Bitmap {com.adamatomic.Mode.Bullet_ImgBullet2}
Symbol 95 Bitmap {com.adamatomic.Mode.Bullet_ImgBullet3}
Symbol 96 Bitmap {com.adamatomic.Mode.Bullet_ImgBullet4}
Symbol 97 Bitmap {com.adamatomic.Mode.Bullet_ImgBullet5}
Symbol 98 Bitmap {com.adamatomic.Mode.LevelSelectState_mLogo}
Symbol 99 Bitmap {com.adamatomic.Mode.Platform_ImgPlatform}
Symbol 100 Bitmap {com.adamatomic.Mode.PlayStateTiles_ImgTiles}
Symbol 101 Bitmap {com.adamatomic.Mode.PlayStateTiles_ImgNotch}
Symbol 102 Bitmap {com.adamatomic.flixel.FlxBlock_ImgGibs}
Symbol 103 Bitmap {com.adamatomic.Mode.OptionsState_mLogo}
Symbol 104 Font {com.adamatomic.flixel.FlxGame_junk}
Symbol 105 Bitmap {com.adamatomic.Mode.PlayStateTiles_backG}
Symbol 106 Bitmap {com.adamatomic.Mode.LevelSelectState_Butb}
Symbol 107 Bitmap {com.adamatomic.Mode.PlayStateTiles_ImgPlatform2}
Symbol 108 Bitmap {com.adamatomic.Mode.Bot_ImgJet}
Symbol 109 Bitmap {com.adamatomic.Mode.LevelSelectState_ImgExtra2}
Symbol 110 Bitmap {com.adamatomic.flixel.FlxGame_ImgKeysArrows}
Symbol 111 Bitmap {com.adamatomic.Mode.Enemy_ImgEnemy2}
Symbol 112 Bitmap {com.adamatomic.Mode.Enemy_ImgEnemy3}
Symbol 113 Bitmap {com.adamatomic.Mode.Enemy_ImgEnemy4}
Symbol 114 Bitmap {com.adamatomic.Mode.Enemy_ImgEnemy5}
Symbol 115 Bitmap {com.adamatomic.Mode.Enemy_ImgEnemy6}
Symbol 116 Bitmap {com.adamatomic.Mode.Enemy_ImgEnemy7}
Symbol 117 BinaryData {com.adamatomic.flixel.FlxGame_spon_dataClass}
Symbol 118 Bitmap {com.adamatomic.Mode.Spawner_ImgSpawnerGibs}
Symbol 119 Bitmap {com.adamatomic.Mode.PlayStateTiles_LaFlexa}
Symbol 120 Bitmap {com.adamatomic.flixel.FlxGame_ImgKeyPlus}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1459 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 2Symbol 3 as "com.adamatomic.flixel.FlxGame_SndFlixel"
ExportAssets (56)Timeline Frame 2Symbol 4 as "com.adamatomic.flixel.FlxGame_SndBeep"
ExportAssets (56)Timeline Frame 2Symbol 5 as "com.adamatomic.Mode.MenuState_SndHit2"
ExportAssets (56)Timeline Frame 2Symbol 6 as "com.adamatomic.Mode.MenuState_SndHit"
ExportAssets (56)Timeline Frame 2Symbol 7 as "com.adamatomic.Mode.LevelSelectState_SndHit2"
ExportAssets (56)Timeline Frame 2Symbol 8 as "com.adamatomic.Mode.LevelSelectState_SndHit"
ExportAssets (56)Timeline Frame 2Symbol 9 as "com.adamatomic.Mode.LevelSelectState_SndNeg"
ExportAssets (56)Timeline Frame 2Symbol 10 as "com.adamatomic.Mode.OptionsState_SndHit2"
ExportAssets (56)Timeline Frame 2Symbol 11 as "com.kongregate.as3.client.KongregateAPI"
ExportAssets (56)Timeline Frame 2Symbol 12 as "com.adamatomic.Mode.PlayStateTiles_SndMode"
ExportAssets (56)Timeline Frame 2Symbol 13 as "com.adamatomic.Mode.ShopState_SndHit2"
ExportAssets (56)Timeline Frame 2Symbol 14 as "com.adamatomic.Mode.ShopState_SndHit"
ExportAssets (56)Timeline Frame 2Symbol 15 as "com.adamatomic.Mode.ShopState_SndBuy"
ExportAssets (56)Timeline Frame 2Symbol 16 as "com.adamatomic.Mode.ShopState_SndNeg"
ExportAssets (56)Timeline Frame 2Symbol 17 as "com.adamatomic.Mode.Player_SndExplode2"
ExportAssets (56)Timeline Frame 2Symbol 18 as "com.adamatomic.Mode.Player_SndJump"
ExportAssets (56)Timeline Frame 2Symbol 19 as "com.adamatomic.Mode.Player_SndLand"
ExportAssets (56)Timeline Frame 2Symbol 20 as "com.adamatomic.Mode.Player_SndExplode"
ExportAssets (56)Timeline Frame 2Symbol 21 as "com.adamatomic.Mode.Player_SndHurt"
ExportAssets (56)Timeline Frame 2Symbol 22 as "com.adamatomic.Mode.Player_SndJam"
ExportAssets (56)Timeline Frame 2Symbol 23 as "com.adamatomic.flixel.FlxBlock_SndExplode"
ExportAssets (56)Timeline Frame 2Symbol 24 as "com.adamatomic.Mode.Spawner_SndExplode"
ExportAssets (56)Timeline Frame 2Symbol 25 as "com.adamatomic.Mode.Spawner_SndExplode2"
ExportAssets (56)Timeline Frame 2Symbol 26 as "com.adamatomic.Mode.Spawner_SndHit"
ExportAssets (56)Timeline Frame 2Symbol 27 as "com.adamatomic.Mode.Bot_SndJet"
ExportAssets (56)Timeline Frame 2Symbol 28 as "com.adamatomic.Mode.Bot_SndExplode"
ExportAssets (56)Timeline Frame 2Symbol 29 as "com.adamatomic.Mode.Bot_SndHit"
ExportAssets (56)Timeline Frame 2Symbol 30 as "com.adamatomic.Mode.VictoryState_SndMenu"
ExportAssets (56)Timeline Frame 2Symbol 31 as "com.adamatomic.Mode.VictoryState_SndHit"
ExportAssets (56)Timeline Frame 2Symbol 32 as "com.adamatomic.Mode.VictoryState_SndHit2"
ExportAssets (56)Timeline Frame 2Symbol 33 as "com.adamatomic.Mode.BotBullet_SndHit"
ExportAssets (56)Timeline Frame 2Symbol 34 as "com.adamatomic.Mode.BotBullet_SndShoot"
ExportAssets (56)Timeline Frame 2Symbol 35 as "com.adamatomic.Mode.Enemy_SndExplode"
ExportAssets (56)Timeline Frame 2Symbol 36 as "com.adamatomic.Mode.Enemy_SndHit"
ExportAssets (56)Timeline Frame 2Symbol 37 as "com.adamatomic.Mode.Coin_SndLife"
ExportAssets (56)Timeline Frame 2Symbol 38 as "com.adamatomic.Mode.Coin_SndExtra"
ExportAssets (56)Timeline Frame 2Symbol 39 as "com.adamatomic.Mode.Coin_SndCoin"
ExportAssets (56)Timeline Frame 2Symbol 40 as "com.adamatomic.Mode.Bullet_SndShoot1"
ExportAssets (56)Timeline Frame 2Symbol 41 as "com.adamatomic.Mode.Bullet_SndShoot2"
ExportAssets (56)Timeline Frame 2Symbol 42 as "com.adamatomic.Mode.Bullet_SndHit"
ExportAssets (56)Timeline Frame 2Symbol 43 as "com.adamatomic.Mode.Bullet_SndShoot4"
ExportAssets (56)Timeline Frame 2Symbol 44 as "com.adamatomic.Mode.Bullet_SndShoot3"
EnableDebugger2 (64)Timeline Frame 131 bytes "u.$1$Rz$ocl/PCk7djb86NucAIMO11."
DebugMX1 (63)Timeline Frame 1
SerialNumber (41)Timeline Frame 1

Labels

"Preloader"Frame 1
"Mode"Frame 2




http://swfchan.com/47/231382/info.shtml
Created: 1/2 -2020 09:32:40 Last modified: 1/2 -2020 09:32:40 Server time: 14/11 -2024 06:24:52