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

<div style="position:absolute;top:-99px;left:-99px;"><img src="https://tools.swfchan.com/stathit.asp?noj=FRM34576169-22DC&rnd=34576169" width="1" height="1"></div>

armorgames dont-save-the-prince-5614.swf

This is the info page for
Flash #267460

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


Text
<p align="center"><font face="uni 05_53_24pt_st" size="24" color="#ffffff" letterSpacing="0.000000" kerning="1">100%</font></p>

<p align="center"></p><p align="center"></p><p align="center"><font face="Arial" size="29" color="#ffffff" letterSpacing="0.000000" kerning="1">Sorry, it appears that you tried to steal this game. &nbsp;</font></p><p align="center"></p><p align="center"></p><p align="center"><font face="Arial" size="29" color="#ffffff" letterSpacing="0.000000" kerning="1">Please purchase a license if you want to put it on your own site.</font></p>

<p align="center"><font face="Digital-7" size="16" color="#ffffff" letterSpacing="0.000000" kerning="1">TEST</font></p>

<p align="center"><font face="Digital-7" size="16" color="#ffffff" letterSpacing="0.000000" kerning="1">CLEAR</font></p>

<p align="center"><font face="Digital-7" size="16" color="#ffffff" letterSpacing="0.000000" kerning="1">TRASH</font></p>

<p align="center"><font face="Digital-7" size="16" color="#ffffff" letterSpacing="0.000000" kerning="1">EDIT</font></p>

<p align="center"><font face="Digital-7" size="16" color="#ffffff" letterSpacing="0.000000" kerning="1">SAVE</font></p>

<p align="center"><font face="Digital-7" size="16" color="#ffffff" letterSpacing="0.000000" kerning="1">MAIN MENU</font></p>

<p align="left"><font face="Digital-7" size="16" color="#ffffff" letterSpacing="0.000000" kerning="1">Distance: 0 feet</font></p><p align="left"><font face="Digital-7" size="16" color="#ffffff" letterSpacing="0.000000" kerning="1">Damage: 0</font></p>

<p align="left"><font face="Digital-7" size="16" color="#000000" letterSpacing="0.000000" kerning="1">Level 1: there&apos;s something in the air</font></p>

<p align="center"><font face="Digital-7" size="16" color="#ffffff" letterSpacing="0.000000" kerning="1"><b>X1</b></font></p>

ActionScript [AS3]

Section 1
//SHA1 (com.adobe.crypto.SHA1) package com.adobe.crypto { import flash.utils.*; import mx.utils.*; import com.adobe.utils.*; public class SHA1 { public static var digest:ByteArray; private static function createBlocksFromByteArray(_arg1:ByteArray):Array{ var _local2:int = _arg1.position; _arg1.position = 0; var _local3:Array = new Array(); var _local4:int = (_arg1.length * 8); var _local5 = 0xFF; var _local6:int; while (_local6 < _local4) { _local3[(_local6 >> 5)] = (_local3[(_local6 >> 5)] | ((_arg1.readByte() & _local5) << (24 - (_local6 % 32)))); _local6 = (_local6 + 8); }; _local3[(_local4 >> 5)] = (_local3[(_local4 >> 5)] | (128 << (24 - (_local4 % 32)))); _local3[((((_local4 + 64) >> 9) << 4) + 15)] = _local4; _arg1.position = _local2; return (_local3); } private static function f(_arg1:int, _arg2:int, _arg3:int, _arg4:int):int{ if (_arg1 < 20){ return (((_arg2 & _arg3) | (~(_arg2) & _arg4))); }; if (_arg1 < 40){ return (((_arg2 ^ _arg3) ^ _arg4)); }; if (_arg1 < 60){ return ((((_arg2 & _arg3) | (_arg2 & _arg4)) | (_arg3 & _arg4))); }; return (((_arg2 ^ _arg3) ^ _arg4)); } private static function k(_arg1:int):int{ if (_arg1 < 20){ return (1518500249); }; if (_arg1 < 40){ return (1859775393); }; if (_arg1 < 60){ return (2400959708); }; return (3395469782); } private static function hashBlocks(_arg1:Array):ByteArray{ var _local11:int; var _local12:int; var _local13:int; var _local14:int; var _local15:int; var _local16:int; var _local17:int; var _local2 = 1732584193; var _local3:int = 4023233417; var _local4:int = 2562383102; var _local5 = 271733878; var _local6:int = 3285377520; var _local7:int = _arg1.length; var _local8:Array = new Array(80); var _local9:int; while (_local9 < _local7) { _local11 = _local2; _local12 = _local3; _local13 = _local4; _local14 = _local5; _local15 = _local6; _local16 = 0; while (_local16 < 80) { if (_local16 < 16){ _local8[_local16] = _arg1[(_local9 + _local16)]; } else { _local8[_local16] = IntUtil.rol((((_local8[(_local16 - 3)] ^ _local8[(_local16 - 8)]) ^ _local8[(_local16 - 14)]) ^ _local8[(_local16 - 16)]), 1); }; _local17 = ((((IntUtil.rol(_local11, 5) + f(_local16, _local12, _local13, _local14)) + _local15) + int(_local8[_local16])) + k(_local16)); _local15 = _local14; _local14 = _local13; _local13 = IntUtil.rol(_local12, 30); _local12 = _local11; _local11 = _local17; _local16++; }; _local2 = (_local2 + _local11); _local3 = (_local3 + _local12); _local4 = (_local4 + _local13); _local5 = (_local5 + _local14); _local6 = (_local6 + _local15); _local9 = (_local9 + 16); }; var _local10:ByteArray = new ByteArray(); _local10.writeInt(_local2); _local10.writeInt(_local3); _local10.writeInt(_local4); _local10.writeInt(_local5); _local10.writeInt(_local6); _local10.position = 0; digest = new ByteArray(); digest.writeBytes(_local10); digest.position = 0; return (_local10); } private static function createBlocksFromString(_arg1:String):Array{ var _local2:Array = new Array(); var _local3:int = (_arg1.length * 8); var _local4 = 0xFF; var _local5:int; while (_local5 < _local3) { _local2[(_local5 >> 5)] = (_local2[(_local5 >> 5)] | ((_arg1.charCodeAt((_local5 / 8)) & _local4) << (24 - (_local5 % 32)))); _local5 = (_local5 + 8); }; _local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | (128 << (24 - (_local3 % 32)))); _local2[((((_local3 + 64) >> 9) << 4) + 15)] = _local3; return (_local2); } public static function hashBytes(_arg1:ByteArray):String{ var _local2:Array = SHA1.createBlocksFromByteArray(_arg1); var _local3:ByteArray = hashBlocks(_local2); return (((((IntUtil.toHex(_local3.readInt(), true) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true))); } public static function hash(_arg1:String):String{ var _local2:Array = createBlocksFromString(_arg1); var _local3:ByteArray = hashBlocks(_local2); return (((((IntUtil.toHex(_local3.readInt(), true) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true)) + IntUtil.toHex(_local3.readInt(), true))); } public static function hashToBase64(_arg1:String):String{ var _local7:uint; var _local2:Array = SHA1.createBlocksFromString(_arg1); var _local3:ByteArray = hashBlocks(_local2); var _local4 = ""; _local3.position = 0; var _local5:int; while (_local5 < _local3.length) { _local7 = _local3.readUnsignedByte(); _local4 = (_local4 + String.fromCharCode(_local7)); _local5++; }; var _local6:Base64Encoder = new Base64Encoder(); _local6.encode(_local4); return (_local6.flush()); } } }//package com.adobe.crypto
Section 2
//IntUtil (com.adobe.utils.IntUtil) package com.adobe.utils { public class IntUtil { private static var hexChars:String = "0123456789abcdef"; public static function toHex(_arg1:int, _arg2:Boolean=false):String{ var _local4:int; var _local5:int; var _local3 = ""; if (_arg2){ _local4 = 0; while (_local4 < 4) { _local3 = (_local3 + (hexChars.charAt(((_arg1 >> (((3 - _local4) * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> ((3 - _local4) * 8)) & 15)))); _local4++; }; } else { _local5 = 0; while (_local5 < 4) { _local3 = (_local3 + (hexChars.charAt(((_arg1 >> ((_local5 * 8) + 4)) & 15)) + hexChars.charAt(((_arg1 >> (_local5 * 8)) & 15)))); _local5++; }; }; return (_local3); } public static function ror(_arg1:int, _arg2:int):uint{ var _local3:int = (32 - _arg2); return (((_arg1 << _local3) | (_arg1 >>> (32 - _local3)))); } public static function rol(_arg1:int, _arg2:int):int{ return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2)))); } } }//package com.adobe.utils
Section 3
//Base64 (com.dynamicflash.util.Base64) package com.dynamicflash.util { import flash.utils.*; public class Base64 { public static const version:String = "1.1.0"; private static const BASE64_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; public function Base64(){ throw (new Error("Base64 class is static container only")); } public static function encode(_arg1:String):String{ var _local2:ByteArray = new ByteArray(); _local2.writeUTFBytes(_arg1); return (encodeByteArray(_local2)); } public static function encodeByteArray(_arg1:ByteArray):String{ var _local3:Array; var _local5:uint; var _local6:uint; var _local7:uint; var _local2 = ""; var _local4:Array = new Array(4); _arg1.position = 0; while (_arg1.bytesAvailable > 0) { _local3 = new Array(); _local5 = 0; while ((((_local5 < 3)) && ((_arg1.bytesAvailable > 0)))) { _local3[_local5] = _arg1.readUnsignedByte(); _local5++; }; _local4[0] = ((_local3[0] & 252) >> 2); _local4[1] = (((_local3[0] & 3) << 4) | (_local3[1] >> 4)); _local4[2] = (((_local3[1] & 15) << 2) | (_local3[2] >> 6)); _local4[3] = (_local3[2] & 63); _local6 = _local3.length; while (_local6 < 3) { _local4[(_local6 + 1)] = 64; _local6++; }; _local7 = 0; while (_local7 < _local4.length) { _local2 = (_local2 + BASE64_CHARS.charAt(_local4[_local7])); _local7++; }; }; return (_local2); } public static function decode(_arg1:String):String{ var _local2:ByteArray = decodeToByteArray(_arg1); return (_local2.readUTFBytes(_local2.length)); } public static function decodeToByteArray(_arg1:String):ByteArray{ var _local6:uint; var _local7:uint; var _local2:ByteArray = new ByteArray(); var _local3:Array = new Array(4); var _local4:Array = new Array(3); var _local5:uint; while (_local5 < _arg1.length) { _local6 = 0; while ((((_local6 < 4)) && (((_local5 + _local6) < _arg1.length)))) { _local3[_local6] = BASE64_CHARS.indexOf(_arg1.charAt((_local5 + _local6))); _local6++; }; _local4[0] = ((_local3[0] << 2) + ((_local3[1] & 48) >> 4)); _local4[1] = (((_local3[1] & 15) << 4) + ((_local3[2] & 60) >> 2)); _local4[2] = (((_local3[2] & 3) << 6) + _local3[3]); _local7 = 0; while (_local7 < _local4.length) { if (_local3[(_local7 + 1)] == 64){ break; }; _local2.writeByte(_local4[_local7]); _local7++; }; _local5 = (_local5 + 4); }; _local2.position = 0; return (_local2); } } }//package com.dynamicflash.util
Section 4
//KnightDrawer (Drawer.KnightDrawer) package Drawer { import flash.display.*; import flash.geom.*; import Game.*; public class KnightDrawer extends Sprite { private var knight_:Knight; private var knightGraphic_:MovieClip; private var ourState_:int;// = -1 private static const STATE_FRAMES:Array = []; public function KnightDrawer(_arg1:Knight){ knight_ = _arg1; addChild((knightGraphic_ = new KNIGHT())); } public function draw():void{ var _local1:Matrix = new Matrix(); var _local2:int = Math.round((knight_.x - 16)); var _local3:int = Math.round((knight_.y - 16)); if (knight_.state != Knight.STATE_SAVING){ _local1.translate(-16, -16); _local1.rotate(Math.atan2(knight_.verDir, knight_.horDir)); _local1.translate(16, 16); }; _local1.translate(_local2, _local3); knightGraphic_.transform.matrix = _local1; if (ourState_ != knight_.state){ ourState_ = knight_.state; knightGraphic_.gotoAndPlay(STATE_FRAMES[ourState_]); }; knightGraphic_.visible = knight_.alive; } STATE_FRAMES[Knight.STATE_RUNNING] = "running"; STATE_FRAMES[Knight.STATE_FLYING] = "flying"; STATE_FRAMES[Knight.STATE_SAVING] = "saving"; } }//package Drawer
Section 5
//MapDrawer (Drawer.MapDrawer) package Drawer { import flash.events.*; import flash.display.*; import flash.geom.*; import Map.*; public class MapDrawer extends EventDispatcher { private var animFrame_:uint;// = 0 private var sparkleLayer_:Sprite; private var map_:Array; private var editorMode_:Boolean;// = false private var holder_:Sprite; private var sparkleMask_:DisplayObject; public static const SPARKLE_MAP:Array = []; public static const TILE_GRAPHICS:Array = []; public function MapDrawer(_arg1:Sprite=null){ sparkleMask_ = new SPARKLE_MASK(); super(); holder_ = new Sprite(); map_ = []; holder_.addChild(sparkleMask_).visible = false; sparkleLayer_ = _arg1; holder_.addEventListener(Event.ENTER_FRAME, enterFrame, false, 0, true); } public function set editorMode(_arg1:Boolean):void{ editorMode_ = _arg1; holder_.mouseChildren = _arg1; holder_.mouseEnabled = false; } public function plot(_arg1:int, _arg2:int, _arg3:int):void{ var _local5:Class; var _local6:Sprite; var _local7:MovieClip; var _local8:Entry; var _local9:Sprite; var _local4:Entry = getEntry(_arg1, _arg2); if (_local4){ holder_.removeChild(_local4.graphic); if (_local4.extra){ _local4.extra.parent.removeChild(_local4.extra); }; clearEntry(_local4); }; if (TileTypes.EMPTY != _arg3){ _local5 = TILE_GRAPHICS[_arg3]; if (_local5){ _local6 = new Sprite(); _local7 = new (_local5); _local6.addChild(_local7); _local7.gotoAndPlay((1 + (animFrame_ % _local7.totalFrames))); holder_.addChild(_local6); PositionAt(_local6, _arg1, _arg2); _local8 = new Entry(_arg3, _arg1, _arg2, _local6); if (TileTypes.BLOCK_FIXED != _arg3){ _local6.addEventListener(MouseEvent.CLICK, itemClicked, false, 0, true); }; if (((editorMode_) && (!((_arg3 == TileTypes.BLOCK_FIXED))))){ _local8.setButtonMode(); }; map_.push(_local8); if (SPARKLE_MAP[_arg3]){ _local9 = (sparkleLayer_) ? sparkleLayer_ : holder_; _local8.extra = new (SPARKLE_MAP[_arg3]); _local9.addChild(_local8.extra); _local9.setChildIndex(_local8.extra, 0); PositionAt(_local8.extra, _arg1, _arg2); sparkleMask_.visible = true; _local9.mask = sparkleMask_; }; }; }; } private function clearEntry(_arg1:Entry):void{ var _local2:int = map_.indexOf(_arg1); if (-1 != _local2){ map_.splice(_local2, 1); }; } public function get graphic():DisplayObject{ return (holder_); } public function plotEntireMap(_arg1:Map):void{ var _local3:int; var _local4:int; var _local2:int; while (_local2 < _arg1.height) { _local3 = 0; while (_local3 < _arg1.width) { _local4 = _arg1.getSquare(_local3, _local2); if (TileTypes.EMPTY != _local4){ plot(_local3, _local2, _local4); }; _local3++; }; _local2++; }; } private function itemClicked(_arg1:MouseEvent):void{ var _local2:Point = holder_.globalToLocal(new Point(_arg1.stageX, _arg1.stageY)); var _local3:int = RealToGrid(_local2.x); var _local4:int = RealToGrid(_local2.y); dispatchEvent(new MapEvent(_local3, _local4, MapEvent.CLICKED)); } private function enterFrame(_arg1:Event):void{ animFrame_++; } public function get bridges():Array{ var _local2:Entry; var _local1:Array = []; for each (_local2 in map_) { if (_local2.type == TileTypes.BRIDGE){ _local1.push(_local2.graphic); clearEntry(_local2); }; }; return (_local1); } private function getEntry(_arg1:int, _arg2:int):Entry{ var _local3:Entry; for each (_local3 in map_) { if ((((_local3.x == _arg1)) && ((_local3.y == _arg2)))){ return (_local3); }; }; return (null); } public static function PositionAt(_arg1:DisplayObject, _arg2:int, _arg3:int):DisplayObject{ _arg1.x = GridToReal(_arg2); _arg1.y = GridToReal(_arg3); return (_arg1); } public static function RealToGrid(_arg1:int):int{ return (Math.round((_arg1 / 32))); } public static function GridToReal(_arg1:int):int{ return ((-16 + (_arg1 * 32))); } TILE_GRAPHICS[TileTypes.BLOCK] = BLOCK_GRAY; TILE_GRAPHICS[TileTypes.BLOCK_FIXED] = BLOCK_GRAY; TILE_GRAPHICS[TileTypes.PERMANENT_UP] = LAUNCHER_PERM_UP; TILE_GRAPHICS[TileTypes.PERMANENT_DOWN] = LAUNCHER_PERM_DOWN; TILE_GRAPHICS[TileTypes.PERMANENT_LEFT] = LAUNCHER_PERM_LEFT; TILE_GRAPHICS[TileTypes.PERMANENT_RIGHT] = LAUNCHER_PERM_RIGHT; TILE_GRAPHICS[TileTypes.PERMANENT_UP_DISABLED] = LAUNCHER_PERM_UP; TILE_GRAPHICS[TileTypes.PERMANENT_DOWN_DISABLED] = LAUNCHER_PERM_DOWN; TILE_GRAPHICS[TileTypes.PERMANENT_LEFT_DISABLED] = LAUNCHER_PERM_LEFT; TILE_GRAPHICS[TileTypes.PERMANENT_RIGHT_DISABLED] = LAUNCHER_PERM_RIGHT; TILE_GRAPHICS[TileTypes.UP] = LAUNCHER_UP; TILE_GRAPHICS[TileTypes.DOWN] = LAUNCHER_DOWN; TILE_GRAPHICS[TileTypes.LEFT] = LAUNCHER_LEFT; TILE_GRAPHICS[TileTypes.RIGHT] = LAUNCHER_RIGHT; TILE_GRAPHICS[TileTypes.UP_DISABLED] = LAUNCHER_UP; TILE_GRAPHICS[TileTypes.DOWN_DISABLED] = LAUNCHER_DOWN; TILE_GRAPHICS[TileTypes.LEFT_DISABLED] = LAUNCHER_LEFT; TILE_GRAPHICS[TileTypes.RIGHT_DISABLED] = LAUNCHER_RIGHT; TILE_GRAPHICS[TileTypes.BRIDGE] = BRIDGE; TILE_GRAPHICS[TileTypes.MONSTER] = MONSTER; TILE_GRAPHICS[TileTypes.INVISIBLE_GREEN] = INVISIBLE_GREEN; TILE_GRAPHICS[TileTypes.INVISIBLE_RED] = INVISIBLE_RED; TILE_GRAPHICS[TileTypes.BUTTON_GREEN] = BUTTON_GREEN; TILE_GRAPHICS[TileTypes.BUTTON_RED] = BUTTON_RED; TILE_GRAPHICS[TileTypes.BUTTON_GREEN_DISABLED] = BUTTON_GREEN_DISABLED; TILE_GRAPHICS[TileTypes.BUTTON_RED_DISABLED] = BUTTON_RED_DISABLED; TILE_GRAPHICS[TileTypes.MONSTER_SHIFTED] = MONSTER_SHIFTED; SPARKLE_MAP[TileTypes.PERMANENT_UP] = SPARKLE_UP; SPARKLE_MAP[TileTypes.PERMANENT_DOWN] = SPARKLE_DOWN; SPARKLE_MAP[TileTypes.PERMANENT_LEFT] = SPARKLE_LEFT; SPARKLE_MAP[TileTypes.PERMANENT_RIGHT] = SPARKLE_RIGHT; SPARKLE_MAP[TileTypes.UP] = SPARKLE_UP; SPARKLE_MAP[TileTypes.DOWN] = SPARKLE_DOWN; SPARKLE_MAP[TileTypes.LEFT] = SPARKLE_LEFT; SPARKLE_MAP[TileTypes.RIGHT] = SPARKLE_RIGHT; } }//package Drawer import flash.display.*; class Entry { public var graphic:Sprite; public var x:int; public var y:int; public var type:int; public var extra:Sprite; private function Entry(_arg1:int, _arg2:int, _arg3:int, _arg4:Sprite, _arg5:Sprite=null){ this.type = _arg1; this.x = _arg2; this.y = _arg3; this.graphic = _arg4; } public function unsetButtonMode():void{ graphic.useHandCursor = (graphic.buttonMode = false); } public function setButtonMode():void{ graphic.useHandCursor = (graphic.buttonMode = true); } }
Section 6
//EditSection (Editor.EditSection) package Editor { import flash.events.*; import flash.display.*; import flash.geom.*; import Map.*; import Drawer.*; import Game.*; import Menu.*; import flash.ui.*; import flash.filters.*; public class EditSection implements IGameSection { private var map_:Map; private var princessAnim_:DisplayObject; private var drawer_:MapDrawer; private var fixedMap_:Map; private var itemsStart_:int; private var selected_:int; private var nextSection_:IGameSection; private var selectedGraphic_:BitmapData; private var holder_:Sprite; private var interface_:EDITOR_INTERFACE; private var limits_:Array; private var tutorialIndex_:int; private var hideButtons_:Boolean; private var gateAnim_:DisplayObject; private var gateStart_:GATE_START; private var sparkleLayer_:Sprite; private var background_:BACKGROUND; private var fixedDrawer_:MapDrawer; private static const rightKeys:Array = [String("4").charCodeAt(0), Keyboard.NUMPAD_4, Keyboard.RIGHT]; private static const downKeys:Array = [String("2").charCodeAt(0), Keyboard.NUMPAD_2, Keyboard.DOWN]; private static const leftKeys:Array = [String("3").charCodeAt(0), Keyboard.NUMPAD_3, Keyboard.LEFT]; private static const upKeys:Array = [String("1").charCodeAt(0), Keyboard.NUMPAD_1, Keyboard.UP]; public function EditSection(_arg1:Map=null, _arg2:MapDrawer=null, _arg3:Map=null, _arg4:MapDrawer=null, _arg5:int=1, _arg6:Array=null, _arg7:int=0, _arg8:Boolean=false){ var _local10:Sprite; var _local11:int; var _local12:int; var _local13:int; var _local14:DisplayObject; var _local15:GATE_START; background_ = new BACKGROUND(); sparkleLayer_ = new Sprite(); super(); tutorialIndex_ = _arg7; holder_ = new Sprite(); holder_.addChild(background_); interface_ = new EDITOR_INTERFACE(); holder_.addChild(interface_); var _local9:TUTORIALS = new TUTORIALS(); background_.addChild(_local9); _local9.gotoAndPlay(("t" + tutorialIndex_.toString())); limits_ = (_arg6) ? _arg6 : []; background_.gotoAndStop(_arg5); hideButtons_ = _arg8; if (_arg8){ interface_.coverup.addChild(new COVER_UP()); }; interface_.overlay.mouseEnabled = (interface_.drawerLayer.mouseEnabled = false); interface_.report.visible = (interface_.playerPanel.visible = !((_arg3 == null))); nextSection_ = this; itemsStart_ = interface_.items.y; selected_ = -1; selectedGraphic_ = new BitmapData(32, 32, true, 0); map_ = _arg1; drawer_ = _arg2; fixedMap_ = _arg3; fixedDrawer_ = _arg4; if (!map_){ map_ = new Map(); }; if (((fixedMap_) && (!(fixedDrawer_)))){ fixedDrawer_ = new MapDrawer(); fixedDrawer_.plotEntireMap(fixedMap_); }; if (!drawer_){ if (fixedDrawer_){ drawer_ = new MapDrawer(sparkleLayer_); } else { drawer_ = new MapDrawer(); drawer_.plotEntireMap(map_); }; }; drawer_.editorMode = true; drawer_.plotEntireMap(map_); map_.addEventListener(MapEvent.CHANGED, mapChanged, false, 0, true); princessAnim_ = MapDrawer.PositionAt(interface_.overlay.addChild(new PRINCESS_ANIM()), 19, 8); gateAnim_ = MapDrawer.PositionAt(interface_.drawerLayer.addChild(new GATE_ANIM()), 1, 8); interface_.drawerLayer.addChild(sparkleLayer_); if (fixedDrawer_){ interface_.drawerLayer.addChild(fixedDrawer_.graphic); _local10 = new Sprite(); _local10.mouseChildren = false; _local10.mouseEnabled = false; _local12 = 0; while (_local12 < fixedMap_.height) { _local11 = 0; while (_local11 < fixedMap_.width) { _local13 = fixedMap_.getSquare(_local11, _local12); if (_local13 == TileTypes.BRIDGE){ _local14 = new BRIDGE(); _local10.addChild(_local14); MapDrawer.PositionAt(_local14, _local11, _local12); }; _local11++; }; _local12++; }; }; interface_.drawerLayer.addChild(drawer_.graphic); if (_local10){ interface_.drawerLayer.addChild(_local10); }; interface_.buttonUp.addEventListener(MouseEvent.CLICK, upClick, false, 0, true); interface_.buttonDown.addEventListener(MouseEvent.CLICK, downClick, false, 0, true); interface_.items.up.addEventListener(MouseEvent.CLICK, launcherUpClick, false, 0, true); interface_.items.down.addEventListener(MouseEvent.CLICK, launcherDownClick, false, 0, true); interface_.items.left.addEventListener(MouseEvent.CLICK, launcherLeftClick, false, 0, true); interface_.items.right.addEventListener(MouseEvent.CLICK, launcherRightClick, false, 0, true); interface_.items.block.addEventListener(MouseEvent.CLICK, blockClick, false, 0, true); interface_.items.bridge.addEventListener(MouseEvent.CLICK, bridgeClick, false, 0, true); interface_.items.monster.addEventListener(MouseEvent.CLICK, monsterClick, false, 0, true); interface_.items.invisible.addEventListener(MouseEvent.CLICK, invisibleClick, false, 0, true); interface_.items.buttonRed.addEventListener(MouseEvent.CLICK, buttonRedClick, false, 0, true); interface_.items.buttonGreen.addEventListener(MouseEvent.CLICK, buttonGreenClick, false, 0, true); interface_.items.invisibleRed.addEventListener(MouseEvent.CLICK, invisibleRedClick, false, 0, true); interface_.playerPanel.up.addEventListener(MouseEvent.CLICK, playerLauncherUpClick, false, 0, true); interface_.playerPanel.down.addEventListener(MouseEvent.CLICK, playerLauncherDownClick, false, 0, true); interface_.playerPanel.left.addEventListener(MouseEvent.CLICK, playerLauncherLeftClick, false, 0, true); interface_.playerPanel.right.addEventListener(MouseEvent.CLICK, playerLauncherRightClick, false, 0, true); interface_.test.addEventListener(MouseEvent.CLICK, playLevel, false, 0, true); interface_.clear.addEventListener(MouseEvent.CLICK, clearLevel, false, 0, true); interface_.bg1.addEventListener(MouseEvent.CLICK, changeBg1, false, 0, true); interface_.bg2.addEventListener(MouseEvent.CLICK, changeBg2, false, 0, true); interface_.bg3.addEventListener(MouseEvent.CLICK, changeBg3, false, 0, true); interface_.bg4.addEventListener(MouseEvent.CLICK, changeBg4, false, 0, true); interface_.playerPanel.save.addEventListener(MouseEvent.CLICK, saveLevel, false, 0, true); interface_.playerPanel.edit.addEventListener(MouseEvent.CLICK, editLevel, false, 0, true); interface_.playerPanel.trash.addEventListener(MouseEvent.CLICK, clearLevel, false, 0, true); interface_.mainMenuButton.addEventListener(MouseEvent.CLICK, mainMenu, false, 0, true); holder_.addEventListener(MouseEvent.CLICK, generalClick, false, 0, true); map_.setFixed(); if (_arg3 != null){ _local15 = new GATE_START(); _local15.x = MapDrawer.GridToReal(1); _local15.y = MapDrawer.GridToReal(8); interface_.drawerLayer.addChild(_local15); _local15.addEventListener(MouseEvent.CLICK, testLevel, false, 0, true); gateStart_ = _local15; }; drawer_.addEventListener(MapEvent.CLICKED, mapItemClicked, false, 0, true); } private function generalClick(_arg1:MouseEvent):void{ var _local2:Point; var _local3:Boolean; var _local4:int; var _local5:int; if (selected_ != -1){ _local2 = RealToGriddy(holder_.stage.mouseX, holder_.stage.mouseY); _local2.x = Math.round((_local2.x / 32)); _local2.y = Math.round((_local2.y / 32)); _local3 = true; if (fixedMap_){ _local4 = fixedMap_.getSquare(_local2.x, _local2.y); _local3 = (((_local4 == TileTypes.BRIDGE)) || ((_local4 == TileTypes.EMPTY))); }; if (_local3){ if (map_.getSquare(_local2.x, _local2.y) == TileTypes.EMPTY){ map_.setSquare(_local2.x, _local2.y, selected_); Main.audio.playFX("Blip"); _local5 = selected_; selected_ = TileTypes.EMPTY; if (_local5 != TileTypes.EMPTY){ selectItem(_local5); }; } else { map_.setSquare(_local2.x, _local2.y, TileTypes.EMPTY); }; }; }; } private function launcherLeftClick(_arg1:MouseEvent):void{ selectItem(TileTypes.PERMANENT_LEFT); } private function saveLevel(_arg1:Event):void{ var _local2:int = (map_.countType(TileTypes.UP) + map_.countType(TileTypes.UP_DISABLED)); var _local3:int = (map_.countType(TileTypes.DOWN) + map_.countType(TileTypes.DOWN_DISABLED)); var _local4:int = (map_.countType(TileTypes.LEFT) + map_.countType(TileTypes.LEFT_DISABLED)); var _local5:int = (map_.countType(TileTypes.RIGHT) + map_.countType(TileTypes.RIGHT_DISABLED)); nextSection_ = new SaveSection(this, fixedMap_, _local2, _local3, _local4, _local5, background_.currentFrame); } private function downClick(_arg1:MouseEvent):void{ var _local2:int = (itemsScroll + 1); if (_local2 > 2){ _local2 = 0; }; itemsScroll = _local2; Main.audio.playFX("Blip"); } private function testLevel(_arg1:Event):void{ drawer_.editorMode = false; interface_.report.visible = false; interface_.playerPanel.save.removeEventListener(MouseEvent.CLICK, saveLevel, false); interface_.playerPanel.edit.removeEventListener(MouseEvent.CLICK, editLevel, false); interface_.playerPanel.trash.removeEventListener(MouseEvent.CLICK, clearLevel, false); interface_.playerPanel.up.mouseEnabled = false; interface_.playerPanel.left.mouseEnabled = false; interface_.playerPanel.right.mouseEnabled = false; interface_.playerPanel.down.mouseEnabled = false; interface_.playerPanel.trash.mouseEnabled = false; interface_.overlay.graphics.clear(); princessAnim_.visible = (gateAnim_.visible = false); nextSection_ = new GameSection(fixedMap_, map_, fixedDrawer_, drawer_, interface_, background_.currentFrame, hideButtons_, tutorialIndex_); holder_.addChild(nextSection_.graphic); nextSection_.draw(); trace("i've got a soul if you get down to the roots"); } private function launcherRightClick(_arg1:MouseEvent):void{ selectItem(TileTypes.PERMANENT_RIGHT); } private function mapItemClicked(_arg1:MapEvent):void{ var _local2:int = map_.getSquare(_arg1.x, _arg1.y); map_.setSquare(_arg1.x, _arg1.y, selected_); Main.audio.playFX("Blip"); } private function editLevel(_arg1:Event):void{ princessAnim_.visible = (gateAnim_.visible = false); nextSection_ = new EditSection(fixedMap_, fixedDrawer_, null, null, background_.currentFrame, null, 0, hideButtons_); } private function buttonGreenClick(_arg1:MouseEvent):void{ selectItem(TileTypes.BUTTON_GREEN); } private function playerLauncherLeftClick(_arg1:MouseEvent):void{ selectItem(TileTypes.LEFT); } private function selectItem(_arg1:int):Boolean{ var _local3:ColorMatrixFilter; calcLimits(); var _local2:Boolean; if ((limits_[_arg1] is Object)){ if (limits_[_arg1].val <= 0){ _local2 = false; }; }; if (_local2){ selected_ = _arg1; selectedGraphic_.fillRect(selectedGraphic_.rect, 0); selectedGraphic_.draw(new (MapDrawer.TILE_GRAPHICS[selected_]), null, new ColorTransform(1, 1, 1, 0.6)); _local3 = new ColorMatrixFilter([(2 / 3), (1 / 6), (1 / 6), 0, 0, (1 / 6), (2 / 3), (1 / 6), 0, 0, (1 / 6), (1 / 6), (2 / 3), 0, 0, 0, 0, 0, 1, 0]); selectedGraphic_.applyFilter(selectedGraphic_, selectedGraphic_.rect, new Point(), _local3); }; return (_local2); } private function playLevel(_arg1:Event):void{ drawer_.editorMode = false; princessAnim_.visible = (gateAnim_.visible = false); nextSection_ = new EditSection(null, null, map_, drawer_, background_.currentFrame, null, 0, hideButtons_); holder_.addChild(nextSection_.graphic); trace("you ain't got that certain glow that I get a kick out of"); nextSection_.draw(); } private function get itemsScroll():int{ return ((Math.abs((interface_.items.y - itemsStart_)) / 53)); } private function clearLevel(_arg1:Event):void{ map_.clear(); } private function mainMenu(_arg1:Event):void{ if (!hideButtons_){ nextSection_ = new FadeSection(this, new MenuSection()); } else { holder_.dispatchEvent(new Event("mainMenu", true, false)); }; } private function changeBg1(_arg1:Event):void{ background_.gotoAndStop(1); } private function changeBg2(_arg1:Event):void{ background_.gotoAndStop(2); } private function changeBg3(_arg1:Event):void{ background_.gotoAndStop(3); } private function changeBg4(_arg1:Event):void{ background_.gotoAndStop(4); } private function invisibleRedClick(_arg1:MouseEvent):void{ selectItem(TileTypes.INVISIBLE_RED); } private function upClick(_arg1:MouseEvent):void{ var _local2:int = (itemsScroll - 1); if (_local2 < 0){ _local2 = 2; }; itemsScroll = _local2; Main.audio.playFX("Blip"); } private function buttonRedClick(_arg1:MouseEvent):void{ selectItem(TileTypes.BUTTON_RED); } private function playerLauncherUpClick(_arg1:MouseEvent):void{ selectItem(TileTypes.UP); } private function monsterClick(_arg1:MouseEvent):void{ selectItem(TileTypes.MONSTER); } public function draw():void{ var _local1:Graphics; var _local2:Point; var _local3:int; var _local4:int; if (holder_.stage){ _local1 = interface_.overlay.graphics; _local1.clear(); if (TileTypes.EMPTY != selected_){ _local2 = RealToGriddy(holder_.stage.mouseX, holder_.stage.mouseY); _local3 = Math.round((_local2.x / 32)); _local4 = Math.round((_local2.y / 32)); if (((((!((((_local3 == 1)) && ((_local4 == 8))))) && ((_local2.y < 400)))) && ((map_.getSquare(_local3, _local4) == TileTypes.EMPTY)))){ _local1.beginBitmapFill(selectedGraphic_, new Matrix(1, 0, 0, 1, _local2.x, _local2.y), false, false); _local1.drawRect(_local2.x, _local2.y, 32, 32); }; }; }; if (gateStart_){ gateStart_.mouseEnabled = true; }; } private function playerLauncherRightClick(_arg1:MouseEvent):void{ selectItem(TileTypes.RIGHT); } private function launcherDownClick(_arg1:MouseEvent):void{ selectItem(TileTypes.PERMANENT_DOWN); } public function update():IGameSection{ var _local1:IGameSection = nextSection_; nextSection_ = this; if (Input.IsPressed(Keyboard.ESCAPE)){ selected_ = -1; }; if (Input.IsAnyPressed(upKeys)){ Input.ResetKeys(upKeys); if (selectItem((fixedMap_) ? TileTypes.UP : TileTypes.PERMANENT_UP)){ Main.audio.playFX("Blip"); }; }; if (Input.IsAnyPressed(downKeys)){ Input.ResetKeys(downKeys); if (selectItem((fixedMap_) ? TileTypes.DOWN : TileTypes.PERMANENT_DOWN)){ Main.audio.playFX("Blip"); }; }; if (Input.IsAnyPressed(leftKeys)){ Input.ResetKeys(leftKeys); if (selectItem((fixedMap_) ? TileTypes.LEFT : TileTypes.PERMANENT_LEFT)){ Main.audio.playFX("Blip"); }; }; if (Input.IsAnyPressed(rightKeys)){ Input.ResetKeys(rightKeys); if (selectItem((fixedMap_) ? TileTypes.RIGHT : TileTypes.PERMANENT_RIGHT)){ Main.audio.playFX("Blip"); }; }; calcLimits(); return (_local1); } private function invisibleClick(_arg1:MouseEvent):void{ selectItem(TileTypes.INVISIBLE_GREEN); } private function calcLimits():void{ var _local1:String; var _local2:int; var _local3:int; for (_local1 in limits_) { _local2 = int(_local1); _local3 = 0; _local3 = (_local3 + map_.countType(_local2)); limits_[_local1].val = (limits_[_local1].max - _local3); }; } private function set itemsScroll(_arg1:int):void{ interface_.items.y = (itemsStart_ - (53 * (_arg1 % 3))); } private function playerLauncherDownClick(_arg1:MouseEvent):void{ selectItem(TileTypes.DOWN); } private function launcherUpClick(_arg1:MouseEvent):void{ selectItem(TileTypes.PERMANENT_UP); } public function get graphic():DisplayObject{ return (holder_); } private function blockClick(_arg1:MouseEvent):void{ selectItem(TileTypes.BLOCK); } private function mapChanged(_arg1:MapEvent):void{ drawer_.plot(_arg1.x, _arg1.y, map_.getSquare(_arg1.x, _arg1.y)); } private function bridgeClick(_arg1:MouseEvent):void{ selectItem(TileTypes.BRIDGE); } public static function RealToGriddy(_arg1:int, _arg2:int):Point{ return (new Point(((32 * Math.floor(((_arg1 - 16) / 32))) + 16), ((32 * Math.floor(((_arg2 - 16) / 32))) + 16))); } } }//package Editor
Section 7
//SaveSection (Editor.SaveSection) package Editor { import flash.events.*; import flash.display.*; import Map.*; import fl.events.*; public class SaveSection implements IGameSection { private var editorSection_:IGameSection; private var nextSection_:IGameSection; private var iface_:SAVE_INTERFACE; private var holder_:Sprite; private var level_:Level; public function SaveSection(_arg1:IGameSection, _arg2:Map, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int){ holder_ = new Sprite(); super(); nextSection_ = this; drawBg(_arg1.graphic); editorSection_ = _arg1; iface_ = new SAVE_INTERFACE(); holder_.addChild(iface_); var _local8:Level = new Level("Untitled Level", "Joe Bloggs", _arg2); level_ = _local8; level_.backgroundIndex = _arg7; iface_.title.text = _local8.title; iface_.author.text = _local8.author; iface_.up.value = _arg3; iface_.down.value = _arg4; iface_.left.value = _arg5; iface_.right.value = _arg6; setIfaceGoal(level_.goal); genData(null); iface_.title.addEventListener(Event.CHANGE, genData, false, 0, true); iface_.author.addEventListener(Event.CHANGE, genData, false, 0, true); iface_.up.addEventListener(Event.CHANGE, genData, false, 0, true); iface_.down.addEventListener(Event.CHANGE, genData, false, 0, true); iface_.left.addEventListener(Event.CHANGE, genData, false, 0, true); iface_.right.addEventListener(Event.CHANGE, genData, false, 0, true); iface_.goalFeed.addEventListener(Event.CHANGE, genData, false, 0, true); iface_.goalFire.addEventListener(Event.CHANGE, genData, false, 0, true); iface_.goalSave.addEventListener(Event.CHANGE, genData, false, 0, true); iface_.quit.addEventListener(ComponentEvent.BUTTON_DOWN, quit, false, 0, true); } private function drawBg(_arg1:DisplayObject):void{ var _local2:BitmapData = new BitmapData(_arg1.width, _arg1.height, false, 0); _local2.draw(_arg1); holder_.addChild(new Bitmap(_local2)); } private function getIfaceGoal():int{ if (iface_.goalFeed.selected){ return (Level.GOAL_FEED_MONSTER); }; if (iface_.goalFire.selected){ return (Level.GOAL_KILL_KNIGHT); }; if (iface_.goalSave.selected){ return (Level.GOAL_SAVE_PRINCESS); }; return (Level.GOAL_FEED_MONSTER); } public function draw():void{ } public function get graphic():DisplayObject{ return (holder_); } private function genData(_arg1:Event):void{ level_.title = iface_.title.text; level_.author = iface_.author.text; level_.upLimit = iface_.up.value; level_.downLimit = iface_.down.value; level_.leftLimit = iface_.left.value; level_.rightLimit = iface_.right.value; level_.goal = getIfaceGoal(); iface_.base64.text = level_.toData(); } private function quit(_arg1:Event):void{ nextSection_ = editorSection_; } public function update():IGameSection{ return (nextSection_); } private function setIfaceGoal(_arg1:int):void{ if (_arg1 == Level.GOAL_FEED_MONSTER){ iface_.goalFeed.selected = true; }; if (_arg1 == Level.GOAL_KILL_KNIGHT){ iface_.goalFire.selected = true; }; if (_arg1 == Level.GOAL_SAVE_PRINCESS){ iface_.goalSave.selected = true; }; } } }//package Editor
Section 8
//BaseScrollPane (fl.containers.BaseScrollPane) package fl.containers { import flash.events.*; import flash.display.*; import flash.geom.*; import fl.core.*; import fl.controls.*; import fl.events.*; public class BaseScrollPane extends UIComponent { protected var contentHeight:Number;// = 0 protected var _horizontalScrollBar:ScrollBar; protected var _horizontalPageScrollSize:Number;// = 0 protected var _verticalPageScrollSize:Number;// = 0 protected var _maxHorizontalScrollPosition:Number;// = 0 protected var defaultLineScrollSize:Number;// = 4 protected var vOffset:Number;// = 0 protected var contentScrollRect:Rectangle; protected var background:DisplayObject; protected var _verticalScrollBar:ScrollBar; protected var disabledOverlay:Shape; protected var vScrollBar:Boolean; protected var _horizontalScrollPolicy:String; protected var useFixedHorizontalScrolling:Boolean;// = false protected var contentWidth:Number;// = 0 protected var availableHeight:Number; protected var _verticalScrollPolicy:String; protected var contentPadding:Number;// = 0 protected var _useBitmpScrolling:Boolean;// = false protected var availableWidth:Number; protected var hScrollBar:Boolean; protected static const SCROLL_BAR_STYLES:Object = {upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; private static var defaultStyles:Object = {repeatDelay:500, repeatInterval:35, skin:"ScrollPane_upSkin", contentPadding:0, disabledAlpha:0.5}; override public function set enabled(_arg1:Boolean):void{ if (enabled == _arg1){ return; }; _verticalScrollBar.enabled = _arg1; _horizontalScrollBar.enabled = _arg1; super.enabled = _arg1; } public function set useBitmapScrolling(_arg1:Boolean):void{ _useBitmpScrolling = _arg1; invalidate(InvalidationType.STATE); } public function set horizontalLineScrollSize(_arg1:Number):void{ _horizontalScrollBar.lineScrollSize = _arg1; } protected function drawLayout():void{ calculateAvailableSize(); calculateContentWidth(); background.width = width; background.height = height; if (vScrollBar){ _verticalScrollBar.visible = true; _verticalScrollBar.x = ((width - ScrollBar.WIDTH) - contentPadding); _verticalScrollBar.y = contentPadding; _verticalScrollBar.height = availableHeight; } else { _verticalScrollBar.visible = false; }; _verticalScrollBar.setScrollProperties(availableHeight, 0, (contentHeight - availableHeight), verticalPageScrollSize); setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false); if (hScrollBar){ _horizontalScrollBar.visible = true; _horizontalScrollBar.x = contentPadding; _horizontalScrollBar.y = ((height - ScrollBar.WIDTH) - contentPadding); _horizontalScrollBar.width = availableWidth; } else { _horizontalScrollBar.visible = false; }; _horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), horizontalPageScrollSize); setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false); drawDisabledOverlay(); } protected function handleWheel(_arg1:MouseEvent):void{ if (((((!(enabled)) || (!(_verticalScrollBar.visible)))) || ((contentHeight <= availableHeight)))){ return; }; _verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * verticalLineScrollSize)); setVerticalScrollPosition(_verticalScrollBar.scrollPosition); dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _arg1.delta, horizontalScrollPosition)); } protected function handleScroll(_arg1:ScrollEvent):void{ if (_arg1.target == _verticalScrollBar){ setVerticalScrollPosition(_arg1.position); } else { setHorizontalScrollPosition(_arg1.position); }; } public function get verticalLineScrollSize():Number{ return (_verticalScrollBar.lineScrollSize); } protected function drawBackground():void{ var _local1:DisplayObject = background; background = getDisplayObjectInstance(getStyleValue("skin")); background.width = width; background.height = height; addChildAt(background, 0); if (((!((_local1 == null))) && (!((_local1 == background))))){ removeChild(_local1); }; } protected function calculateAvailableSize():void{ var _local1:Number = ScrollBar.WIDTH; var _local2:Number = (contentPadding = Number(getStyleValue("contentPadding"))); var _local3:Number = ((height - (2 * _local2)) - vOffset); vScrollBar = (((_verticalScrollPolicy == ScrollPolicy.ON)) || ((((_verticalScrollPolicy == ScrollPolicy.AUTO)) && ((contentHeight > _local3))))); var _local4:Number = ((width - (vScrollBar) ? _local1 : 0) - (2 * _local2)); var _local5:Number = (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - _local4); hScrollBar = (((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_local5 > 0))))); if (hScrollBar){ _local3 = (_local3 - _local1); }; if (((((((hScrollBar) && (!(vScrollBar)))) && ((_verticalScrollPolicy == ScrollPolicy.AUTO)))) && ((contentHeight > _local3)))){ vScrollBar = true; _local4 = (_local4 - _local1); }; availableHeight = (_local3 + vOffset); availableWidth = _local4; } public function get verticalScrollPosition():Number{ return (_verticalScrollBar.scrollPosition); } public function get horizontalScrollPolicy():String{ return (_horizontalScrollPolicy); } protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ } public function get horizontalPageScrollSize():Number{ if (isNaN(availableWidth)){ drawNow(); }; return (((((_horizontalPageScrollSize == 0)) && (!(isNaN(availableWidth))))) ? availableWidth : _horizontalPageScrollSize); } public function set horizontalScrollPosition(_arg1:Number):void{ drawNow(); _horizontalScrollBar.scrollPosition = _arg1; setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false); } public function set verticalLineScrollSize(_arg1:Number):void{ _verticalScrollBar.lineScrollSize = _arg1; } public function get maxVerticalScrollPosition():Number{ drawNow(); return (Math.max(0, (contentHeight - availableHeight))); } public function set horizontalPageScrollSize(_arg1:Number):void{ _horizontalPageScrollSize = _arg1; invalidate(InvalidationType.SIZE); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES)){ setStyles(); drawBackground(); if (contentPadding != getStyleValue("contentPadding")){ invalidate(InvalidationType.SIZE, false); }; }; if (isInvalid(InvalidationType.SIZE, InvalidationType.STATE)){ drawLayout(); }; updateChildren(); super.draw(); } public function get horizontalScrollBar():ScrollBar{ return (_horizontalScrollBar); } protected function calculateContentWidth():void{ } public function set horizontalScrollPolicy(_arg1:String):void{ _horizontalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } override protected function configUI():void{ super.configUI(); contentScrollRect = new Rectangle(0, 0, 85, 85); _verticalScrollBar = new ScrollBar(); _verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true); _verticalScrollBar.visible = false; _verticalScrollBar.lineScrollSize = defaultLineScrollSize; addChild(_verticalScrollBar); copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); _horizontalScrollBar = new ScrollBar(); _horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL; _horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true); _horizontalScrollBar.visible = false; _horizontalScrollBar.lineScrollSize = defaultLineScrollSize; addChild(_horizontalScrollBar); copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); disabledOverlay = new Shape(); var _local1:Graphics = disabledOverlay.graphics; _local1.beginFill(0xFFFFFF); _local1.drawRect(0, 0, width, height); _local1.endFill(); addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true); } protected function drawDisabledOverlay():void{ if (enabled){ if (contains(disabledOverlay)){ removeChild(disabledOverlay); }; } else { disabledOverlay.x = (disabledOverlay.y = contentPadding); disabledOverlay.width = availableWidth; disabledOverlay.height = availableHeight; disabledOverlay.alpha = (getStyleValue("disabledAlpha") as Number); addChild(disabledOverlay); }; } public function get horizontalScrollPosition():Number{ return (_horizontalScrollBar.scrollPosition); } public function get verticalScrollBar():ScrollBar{ return (_verticalScrollBar); } public function get horizontalLineScrollSize():Number{ return (_horizontalScrollBar.lineScrollSize); } public function set verticalScrollPosition(_arg1:Number):void{ drawNow(); _verticalScrollBar.scrollPosition = _arg1; setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false); } protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ } protected function setStyles():void{ copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); } public function set verticalPageScrollSize(_arg1:Number):void{ _verticalPageScrollSize = _arg1; invalidate(InvalidationType.SIZE); } protected function setContentSize(_arg1:Number, _arg2:Number):void{ if ((((((contentWidth == _arg1)) || (useFixedHorizontalScrolling))) && ((contentHeight == _arg2)))){ return; }; contentWidth = _arg1; contentHeight = _arg2; invalidate(InvalidationType.SIZE); } public function set verticalScrollPolicy(_arg1:String):void{ _verticalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } public function get maxHorizontalScrollPosition():Number{ drawNow(); return (Math.max(0, (contentWidth - availableWidth))); } protected function updateChildren():void{ _verticalScrollBar.enabled = (_horizontalScrollBar.enabled = enabled); _verticalScrollBar.drawNow(); _horizontalScrollBar.drawNow(); } public function get verticalPageScrollSize():Number{ if (isNaN(availableHeight)){ drawNow(); }; return (((((_verticalPageScrollSize == 0)) && (!(isNaN(availableHeight))))) ? availableHeight : _verticalPageScrollSize); } public function get verticalScrollPolicy():String{ return (_verticalScrollPolicy); } public function get useBitmapScrolling():Boolean{ return (_useBitmpScrolling); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, ScrollBar.getStyleDefinition())); } } }//package fl.containers
Section 9
//ScrollPane (fl.containers.ScrollPane) package fl.containers { import flash.events.*; import flash.display.*; import fl.managers.*; import fl.core.*; import fl.controls.*; import fl.events.*; import flash.net.*; import flash.system.*; import flash.ui.*; public class ScrollPane extends BaseScrollPane implements IFocusManagerComponent { protected var scrollDragHPos:Number; protected var loader:Loader; protected var xOffset:Number; protected var _source:Object;// = "" protected var scrollDragVPos:Number; protected var _scrollDrag:Boolean;// = false protected var currentContent:Object; protected var contentClip:Sprite; protected var yOffset:Number; private static var defaultStyles:Object = {upSkin:"ScrollPane_upSkin", disabledSkin:"ScrollPane_disabledSkin", focusRectSkin:null, focusRectPadding:null, contentPadding:0}; protected function clearContent():void{ if (contentClip.numChildren == 0){ return; }; contentClip.removeChildAt(0); currentContent = null; if (loader != null){ try { loader.close(); } catch(e) { }; try { loader.unload(); } catch(e) { }; loader = null; }; } protected function passEvent(_arg1:Event):void{ dispatchEvent(_arg1); } protected function calculateAvailableHeight():Number{ var _local1:Number = Number(getStyleValue("contentPadding")); return (((height - (_local1 * 2)) - ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0)); } override protected function drawLayout():void{ super.drawLayout(); contentScrollRect = contentClip.scrollRect; contentScrollRect.width = availableWidth; contentScrollRect.height = availableHeight; contentClip.cacheAsBitmap = useBitmapScrolling; contentClip.scrollRect = contentScrollRect; contentClip.x = (contentClip.y = contentPadding); } public function get bytesTotal():Number{ return (((((loader == null)) || ((loader.contentLoaderInfo == null)))) ? 0 : loader.contentLoaderInfo.bytesTotal); } public function get source():Object{ return (_source); } override protected function handleScroll(_arg1:ScrollEvent):void{ passEvent(_arg1); super.handleScroll(_arg1); } protected function onContentLoad(_arg1:Event):void{ update(); var _local2:* = calculateAvailableHeight(); calculateAvailableSize(); horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), availableWidth); verticalScrollBar.setScrollProperties(_local2, 0, (contentHeight - _local2), _local2); passEvent(_arg1); } public function get scrollDrag():Boolean{ return (_scrollDrag); } protected function setScrollDrag():void{ if (_scrollDrag){ contentClip.addEventListener(MouseEvent.MOUSE_DOWN, doStartDrag, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, endDrag, false, 0, true); } else { contentClip.removeEventListener(MouseEvent.MOUSE_DOWN, doStartDrag); stage.removeEventListener(MouseEvent.MOUSE_UP, endDrag); removeEventListener(MouseEvent.MOUSE_MOVE, doDrag); }; contentClip.buttonMode = _scrollDrag; } public function get percentLoaded():Number{ if (loader != null){ return (Math.round(((bytesLoaded / bytesTotal) * 100))); }; return (0); } override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ var _local3:* = contentClip.scrollRect; _local3.y = _arg1; contentClip.scrollRect = _local3; } protected function endDrag(_arg1:MouseEvent):void{ stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag); } override protected function drawBackground():void{ var _local1:DisplayObject = background; background = getDisplayObjectInstance(getStyleValue((enabled) ? "upSkin" : "disabledSkin")); background.width = width; background.height = height; addChildAt(background, 0); if (((!((_local1 == null))) && (!((_local1 == background))))){ removeChild(_local1); }; } public function set source(_arg1:Object):void{ var _local2:*; clearContent(); if (isLivePreview){ return; }; _source = _arg1; if ((((_source == "")) || ((_source == null)))){ return; }; currentContent = getDisplayObjectInstance(_arg1); if (currentContent != null){ _local2 = contentClip.addChild((currentContent as DisplayObject)); dispatchEvent(new Event(Event.INIT)); update(); } else { load(new URLRequest(_source.toString())); }; } public function set scrollDrag(_arg1:Boolean):void{ _scrollDrag = _arg1; invalidate(InvalidationType.STATE); } protected function initLoader():void{ loader = new Loader(); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleError, false, 0, true); loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handleError, false, 0, true); loader.contentLoaderInfo.addEventListener(Event.OPEN, passEvent, false, 0, true); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, passEvent, false, 0, true); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onContentLoad, false, 0, true); loader.contentLoaderInfo.addEventListener(Event.INIT, passEvent, false, 0, true); loader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, passEvent, false, 0, true); contentClip.addChild(loader); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES)){ drawBackground(); }; if (isInvalid(InvalidationType.STATE)){ setScrollDrag(); }; super.draw(); } protected function clearLoadEvents():void{ loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, handleError); loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, handleError); loader.contentLoaderInfo.removeEventListener(Event.OPEN, passEvent); loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, passEvent); loader.contentLoaderInfo.removeEventListener(HTTPStatusEvent.HTTP_STATUS, passEvent); loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onContentLoad); } protected function handleError(_arg1:Event):void{ passEvent(_arg1); clearLoadEvents(); loader.contentLoaderInfo.removeEventListener(Event.INIT, handleInit); } public function get bytesLoaded():Number{ return (((((loader == null)) || ((loader.contentLoaderInfo == null)))) ? 0 : loader.contentLoaderInfo.bytesLoaded); } override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ var _local3:* = contentClip.scrollRect; _local3.x = _arg1; contentClip.scrollRect = _local3; } override protected function configUI():void{ super.configUI(); contentClip = new Sprite(); addChild(contentClip); contentClip.scrollRect = contentScrollRect; _horizontalScrollPolicy = ScrollPolicy.AUTO; _verticalScrollPolicy = ScrollPolicy.AUTO; } protected function handleInit(_arg1:Event):void{ loader.contentLoaderInfo.removeEventListener(Event.INIT, handleInit); passEvent(_arg1); invalidate(InvalidationType.SIZE); } public function update():void{ var _local1:DisplayObject = contentClip.getChildAt(0); setContentSize(_local1.width, _local1.height); } public function refreshPane():void{ if ((_source is URLRequest)){ _source = _source.url; }; source = _source; } public function load(_arg1:URLRequest, _arg2:LoaderContext=null):void{ if (_arg2 == null){ _arg2 = new LoaderContext(false, ApplicationDomain.currentDomain); }; clearContent(); initLoader(); currentContent = (_source = _arg1); loader.load(_arg1, _arg2); } protected function doStartDrag(_arg1:MouseEvent):void{ if (!enabled){ return; }; xOffset = mouseX; yOffset = mouseY; scrollDragHPos = horizontalScrollPosition; scrollDragVPos = verticalScrollPosition; stage.addEventListener(MouseEvent.MOUSE_MOVE, doDrag, false, 0, true); } protected function doDrag(_arg1:MouseEvent):void{ var _local2:* = (scrollDragVPos - (mouseY - yOffset)); _verticalScrollBar.setScrollPosition(_local2); setVerticalScrollPosition(_verticalScrollBar.scrollPosition, true); var _local3:* = (scrollDragHPos - (mouseX - xOffset)); _horizontalScrollBar.setScrollPosition(_local3); setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, true); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:int = calculateAvailableHeight(); switch (_arg1.keyCode){ case Keyboard.DOWN: verticalScrollPosition++; break; case Keyboard.UP: verticalScrollPosition--; break; case Keyboard.RIGHT: horizontalScrollPosition++; break; case Keyboard.LEFT: horizontalScrollPosition--; break; case Keyboard.END: verticalScrollPosition = maxVerticalScrollPosition; break; case Keyboard.HOME: verticalScrollPosition = 0; break; case Keyboard.PAGE_UP: verticalScrollPosition = (verticalScrollPosition - _local2); break; case Keyboard.PAGE_DOWN: verticalScrollPosition = (verticalScrollPosition + _local2); break; }; } public function get content():DisplayObject{ var _local1:Object = currentContent; if ((_local1 is URLRequest)){ _local1 = loader.content; }; return ((_local1 as DisplayObject)); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseScrollPane.getStyleDefinition())); } } }//package fl.containers
Section 10
//BaseButton (fl.controls.BaseButton) package fl.controls { import flash.events.*; import flash.display.*; import fl.core.*; import fl.events.*; import flash.utils.*; public class BaseButton extends UIComponent { protected var pressTimer:Timer; protected var _autoRepeat:Boolean;// = false protected var _selected:Boolean;// = false protected var background:DisplayObject; private var unlockedMouseState:String; protected var mouseState:String; private var _mouseStateLocked:Boolean;// = false private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35}; public function BaseButton(){ buttonMode = true; mouseChildren = false; useHandCursor = false; setupMouseEvents(); setMouseState("up"); pressTimer = new Timer(1, 0); pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true); } override public function get enabled():Boolean{ return (super.enabled); } protected function startPress():void{ if (_autoRepeat){ pressTimer.delay = Number(getStyleValue("repeatDelay")); pressTimer.start(); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } protected function drawLayout():void{ background.width = width; background.height = height; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; mouseEnabled = _arg1; } public function set autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; } protected function mouseEventHandler(_arg1:MouseEvent):void{ if (_arg1.type == MouseEvent.MOUSE_DOWN){ setMouseState("down"); startPress(); } else { if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){ setMouseState("over"); endPress(); } else { if (_arg1.type == MouseEvent.ROLL_OUT){ setMouseState("up"); endPress(); }; }; }; } protected function drawBackground():void{ var _local1:String = (enabled) ? mouseState : "disabled"; if (selected){ _local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1)); }; _local1 = (_local1 + "Skin"); var _local2:DisplayObject = background; background = getDisplayObjectInstance(getStyleValue(_local1)); addChildAt(background, 0); if (((!((_local2 == null))) && (!((_local2 == background))))){ removeChild(_local2); }; } public function get selected():Boolean{ return (_selected); } protected function setupMouseEvents():void{ addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true); } protected function endPress():void{ pressTimer.reset(); } public function set mouseStateLocked(_arg1:Boolean):void{ _mouseStateLocked = _arg1; if (_arg1 == false){ setMouseState(unlockedMouseState); } else { unlockedMouseState = mouseState; }; } public function get autoRepeat():Boolean{ return (_autoRepeat); } public function set selected(_arg1:Boolean):void{ if (_selected == _arg1){ return; }; _selected = _arg1; invalidate(InvalidationType.STATE); } protected function buttonDown(_arg1:TimerEvent):void{ if (!_autoRepeat){ endPress(); return; }; if (pressTimer.currentCount == 1){ pressTimer.delay = Number(getStyleValue("repeatInterval")); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } public function setMouseState(_arg1:String):void{ if (_mouseStateLocked){ unlockedMouseState = _arg1; return; }; if (mouseState == _arg1){ return; }; mouseState = _arg1; invalidate(InvalidationType.STATE); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 11
//Button (fl.controls.Button) package fl.controls { import flash.display.*; import fl.managers.*; import fl.core.*; public class Button extends LabelButton implements IFocusManagerComponent { protected var _emphasized:Boolean;// = false protected var emphasizedBorder:DisplayObject; private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2}; public static var createAccessibilityImplementation:Function; public function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; invalidate(InvalidationType.STYLES); } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } protected function drawEmphasized():void{ var _local2:Number; if (emphasizedBorder != null){ removeChild(emphasizedBorder); }; emphasizedBorder = null; if (!_emphasized){ return; }; var _local1:Object = getStyleValue("emphasizedSkin"); if (_local1 != null){ emphasizedBorder = getDisplayObjectInstance(_local1); }; if (emphasizedBorder != null){ addChildAt(emphasizedBorder, 0); _local2 = Number(getStyleValue("emphasizedPadding")); emphasizedBorder.x = (emphasizedBorder.y = -(_local2)); emphasizedBorder.width = (width + (_local2 * 2)); emphasizedBorder.height = (height + (_local2 * 2)); }; } public function get emphasized():Boolean{ return (_emphasized); } override protected function draw():void{ if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){ drawEmphasized(); }; super.draw(); if (emphasizedBorder != null){ setChildIndex(emphasizedBorder, (numChildren - 1)); }; } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; var _local3:*; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("emphasizedPadding")); if ((((_local2 < 0)) || (!(_emphasized)))){ _local2 = 0; }; _local3 = getStyleValue("focusRectPadding"); _local3 = ((_local3)==null) ? 2 : _local3; _local3 = (_local3 + _local2); uiFocusRect.x = -(_local3); uiFocusRect.y = -(_local3); uiFocusRect.width = (width + (_local3 * 2)); uiFocusRect.height = (height + (_local3 * 2)); }; } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles)); } } }//package fl.controls
Section 12
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement) package fl.controls { public class ButtonLabelPlacement { public static const TOP:String = "top"; public static const LEFT:String = "left"; public static const BOTTOM:String = "bottom"; public static const RIGHT:String = "right"; } }//package fl.controls
Section 13
//Label (fl.controls.Label) package fl.controls { import fl.core.*; import flash.text.*; import fl.events.*; public class Label extends UIComponent { protected var _savedHTML:String; protected var _html:Boolean;// = false public var textField:TextField; protected var actualHeight:Number; protected var actualWidth:Number; protected var defaultLabel:String;// = "Label" private static var defaultStyles:Object = {textFormat:null, embedFonts:false}; public function Label(){ text = defaultLabel; actualWidth = _width; actualHeight = _height; } override public function setSize(_arg1:Number, _arg2:Number):void{ actualWidth = _arg1; actualHeight = _arg2; super.setSize(_arg1, _arg2); } override protected function draw():void{ var _local1:Object; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawTextFormat(); _local1 = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; if (textField.autoSize != TextFieldAutoSize.NONE){ invalidate(InvalidationType.SIZE, false); }; }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } override public function get width():Number{ if (((!((textField.autoSize == TextFieldAutoSize.NONE))) && (!(wordWrap)))){ return (_width); }; return (actualWidth); } public function get condenseWhite():Boolean{ return (textField.condenseWhite); } protected function drawLayout():void{ var _local2:Number; var _local3:Number; var _local1:Boolean; textField.width = width; textField.height = height; if (textField.autoSize != TextFieldAutoSize.NONE){ _local2 = textField.width; _local3 = textField.height; _local1 = ((!((_width == _local2))) || (!((_height == _local3)))); _width = _local2; _height = _local3; switch (textField.autoSize){ case TextFieldAutoSize.CENTER: textField.x = ((actualWidth / 2) - (textField.width / 2)); break; case TextFieldAutoSize.LEFT: textField.x = 0; break; case TextFieldAutoSize.RIGHT: textField.x = -((textField.width - actualWidth)); break; }; } else { textField.width = actualWidth; textField.height = actualHeight; textField.x = 0; }; if (_local1){ dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, true)); }; } public function get autoSize():String{ return (textField.autoSize); } override public function set width(_arg1:Number):void{ actualWidth = _arg1; super.width = _arg1; } public function get selectable():Boolean{ return (textField.selectable); } public function set condenseWhite(_arg1:Boolean):void{ textField.condenseWhite = _arg1; if (textField.autoSize != TextFieldAutoSize.NONE){ invalidate(InvalidationType.SIZE); }; } public function set text(_arg1:String):void{ if (_arg1 == text){ return; }; if (((componentInspectorSetting) && ((_arg1 == defaultLabel)))){ return; }; _html = false; textField.text = _arg1; if (textField.autoSize != TextFieldAutoSize.NONE){ invalidate(InvalidationType.SIZE); }; } override protected function configUI():void{ super.configUI(); textField = new TextField(); addChild(textField); textField.type = TextFieldType.DYNAMIC; textField.selectable = false; textField.wordWrap = false; } public function set autoSize(_arg1:String):void{ textField.autoSize = _arg1; invalidate(InvalidationType.SIZE); } override public function get height():Number{ if (((!((textField.autoSize == TextFieldAutoSize.NONE))) && (wordWrap))){ return (_height); }; return (actualHeight); } public function set wordWrap(_arg1:Boolean):void{ textField.wordWrap = _arg1; if (textField.autoSize != TextFieldAutoSize.NONE){ invalidate(InvalidationType.SIZE); }; } public function set selectable(_arg1:Boolean):void{ textField.selectable = _arg1; } public function get text():String{ return (textField.text); } protected function drawTextFormat():void{ var _local2:Object; var _local1:TextFormat = (getStyleValue("textFormat") as TextFormat); if (_local1 == null){ _local2 = UIComponent.getStyleDefinition(); _local1 = (enabled) ? (_local2.defaultTextFormat as TextFormat) : (_local2.defaultDisabledTextFormat as TextFormat); }; textField.defaultTextFormat = _local1; textField.setTextFormat(_local1); if (((_html) && (!((_savedHTML == null))))){ htmlText = _savedHTML; }; } public function get wordWrap():Boolean{ return (textField.wordWrap); } public function set htmlText(_arg1:String):void{ if (_arg1 == htmlText){ return; }; if (((componentInspectorSetting) && ((_arg1 == "")))){ return; }; _html = true; _savedHTML = _arg1; textField.htmlText = _arg1; if (textField.autoSize != TextFieldAutoSize.NONE){ invalidate(InvalidationType.SIZE); }; } public function get htmlText():String{ return (textField.htmlText); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 14
//LabelButton (fl.controls.LabelButton) package fl.controls { import flash.events.*; import flash.display.*; import fl.managers.*; import fl.core.*; import flash.text.*; import fl.events.*; import flash.ui.*; public class LabelButton extends BaseButton implements IFocusManagerComponent { protected var _toggle:Boolean;// = false public var textField:TextField; protected var mode:String;// = "center" protected var _labelPlacement:String;// = "right" protected var oldMouseState:String; protected var _label:String;// = "Label" protected var icon:DisplayObject; private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false}; public static var createAccessibilityImplementation:Function; override protected function draw():void{ if (textField.text != _label){ label = _label; }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); drawIcon(); drawTextFormat(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } override protected function drawLayout():void{ var _local7:Number; var _local8:Number; var _local1:Number = Number(getStyleValue("textPadding")); var _local2:String = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement; textField.height = (textField.textHeight + 4); var _local3:Number = (textField.textWidth + 4); var _local4:Number = (textField.textHeight + 4); var _local5:Number = ((icon)==null) ? 0 : (icon.width + _local1); var _local6:Number = ((icon)==null) ? 0 : (icon.height + _local1); textField.visible = (label.length > 0); if (icon != null){ icon.x = Math.round(((width - icon.width) / 2)); icon.y = Math.round(((height - icon.height) / 2)); }; if (textField.visible == false){ textField.width = 0; textField.height = 0; } else { if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){ _local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1)))); if ((height - 2) > _local4){ _local8 = _local4; } else { _local8 = (height - 2); }; _local3 = _local7; textField.width = _local3; _local4 = _local8; textField.height = _local4; textField.x = Math.round(((width - _local3) / 2)); textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0)); if (icon != null){ icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1)); }; } else { _local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1)))); _local3 = _local7; textField.width = _local3; textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0)); textField.y = Math.round(((height - textField.height) / 2)); if (icon != null){ icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1)); }; }; }; super.drawLayout(); } protected function toggleSelected(_arg1:MouseEvent):void{ selected = !(selected); dispatchEvent(new Event(Event.CHANGE, true)); } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ setMouseState(oldMouseState); oldMouseState = null; endPress(); dispatchEvent(new MouseEvent(MouseEvent.CLICK)); }; } public function get labelPlacement():String{ return (_labelPlacement); } public function get toggle():Boolean{ return (_toggle); } protected function setEmbedFont(){ var _local1:Object = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } override public function get selected():Boolean{ return ((_toggle) ? _selected : false); } override protected function configUI():void{ super.configUI(); textField = new TextField(); textField.type = TextFieldType.DYNAMIC; textField.selectable = false; addChild(textField); } override protected function initializeAccessibility():void{ if (LabelButton.createAccessibilityImplementation != null){ LabelButton.createAccessibilityImplementation(this); }; } public function set labelPlacement(_arg1:String):void{ _labelPlacement = _arg1; invalidate(InvalidationType.SIZE); } protected function drawIcon():void{ var _local1:DisplayObject = icon; var _local2:String = (enabled) ? mouseState : "disabled"; if (selected){ _local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1)); }; _local2 = (_local2 + "Icon"); var _local3:Object = getStyleValue(_local2); if (_local3 == null){ _local3 = getStyleValue("icon"); }; if (_local3 != null){ icon = getDisplayObjectInstance(_local3); }; if (icon != null){ addChildAt(icon, 1); }; if (((!((_local1 == null))) && (!((_local1 == icon))))){ removeChild(_local1); }; } public function set label(_arg1:String):void{ _label = _arg1; if (textField.text != _label){ textField.text = _label; dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE)); }; invalidate(InvalidationType.SIZE); invalidate(InvalidationType.STYLES); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ if (oldMouseState == null){ oldMouseState = mouseState; }; setMouseState("down"); startPress(); }; } public function set toggle(_arg1:Boolean):void{ if (((!(_arg1)) && (super.selected))){ selected = false; }; _toggle = _arg1; if (_toggle){ addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true); } else { removeEventListener(MouseEvent.CLICK, toggleSelected); }; invalidate(InvalidationType.STATE); } override public function set selected(_arg1:Boolean):void{ _selected = _arg1; if (_toggle){ invalidate(InvalidationType.STATE); }; } protected function drawTextFormat():void{ var _local1:Object = UIComponent.getStyleDefinition(); var _local2:TextFormat = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); var _local3:TextFormat = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); } public function get label():String{ return (_label); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition())); } } }//package fl.controls
Section 15
//NumericStepper (fl.controls.NumericStepper) package fl.controls { import flash.events.*; import flash.display.*; import fl.managers.*; import fl.core.*; import fl.events.*; import flash.ui.*; public class NumericStepper extends UIComponent implements IFocusManagerComponent { protected var downArrow:BaseButton; protected var upArrow:BaseButton; protected var _stepSize:Number;// = 1 protected var _minimum:Number;// = 0 protected var inputField:TextInput; protected var _maximum:Number;// = 10 protected var _value:Number;// = 1 protected var _precision:Number; protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; protected static const TEXT_INPUT_STYLES:Object = {upSkin:"upSkin", disabledSkin:"disabledSkin", textPadding:"textPadding", textFormat:"textFormat", disabledTextFormat:"disabledTextFormat", embedFonts:"embedFonts"}; protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; private static var defaultStyles:Object = {downArrowDisabledSkin:"NumericStepperDownArrow_disabledSkin", downArrowDownSkin:"NumericStepperDownArrow_downSkin", downArrowOverSkin:"NumericStepperDownArrow_overSkin", downArrowUpSkin:"NumericStepperDownArrow_upSkin", upArrowDisabledSkin:"NumericStepperUpArrow_disabledSkin", upArrowDownSkin:"NumericStepperUpArrow_downSkin", upArrowOverSkin:"NumericStepperUpArrow_overSkin", upArrowUpSkin:"NumericStepperUpArrow_upSkin", upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRect:null, focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35, embedFonts:false}; public function NumericStepper(){ setStyles(); stepSize = _stepSize; } override public function set enabled(_arg1:Boolean):void{ if (_arg1 == enabled){ return; }; super.enabled = _arg1; upArrow.enabled = (downArrow.enabled = (inputField.enabled = _arg1)); } public function get imeMode():String{ return (inputField.imeMode); } public function set imeMode(_arg1:String):void{ inputField.imeMode = _arg1; } protected function passEvent(_arg1:Event):void{ dispatchEvent(_arg1); } protected function inStep(_arg1:Number):Boolean{ return ((((_arg1 - _minimum) % _stepSize) == 0)); } override protected function focusOutHandler(_arg1:FocusEvent):void{ if (_arg1.eventPhase == 3){ setValue(Number(inputField.text)); }; super.focusOutHandler(_arg1); } override public function setFocus():void{ if (stage){ stage.focus = inputField.textField; }; } public function set minimum(_arg1:Number):void{ _minimum = _arg1; if (_value < _minimum){ setValue(_minimum, false); }; } protected function inRange(_arg1:Number):Boolean{ return ((((_arg1 >= _minimum)) && ((_arg1 <= _maximum)))); } public function get minimum():Number{ return (_minimum); } public function get maximum():Number{ return (_maximum); } protected function setValue(_arg1:Number, _arg2:Boolean=true):void{ if (_arg1 == _value){ return; }; var _local3:Number = _value; _value = getValidValue(_arg1); inputField.text = _value.toString(); if (_arg2){ dispatchEvent(new Event(Event.CHANGE, true)); }; } protected function drawLayout():void{ var _local1:Number; _local1 = (width - upArrow.width); var _local2:Number = (height / 2); inputField.setSize(_local1, height); upArrow.height = _local2; downArrow.height = Math.floor(_local2); downArrow.move(_local1, _local2); upArrow.move(_local1, 0); downArrow.drawNow(); upArrow.drawNow(); inputField.drawNow(); } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == inputField)) || (super.isOurFocus(_arg1)))); } public function get previousValue():Number{ var _local1:Number = (_value - _stepSize); return ((inRange(_local1)) ? _local1 : _value); } public function get nextValue():Number{ var _local1:Number = (_value + _stepSize); return ((inRange(_local1)) ? _local1 : _value); } public function set maximum(_arg1:Number):void{ _maximum = _arg1; if (_value > _maximum){ setValue(_maximum, false); }; } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ setStyles(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; validate(); } protected function getPrecision():Number{ var _local1:String = _stepSize.toString(); if (_local1.indexOf(".") == -1){ return (0); }; return (_local1.split(".").pop().length); } protected function getValidValue(_arg1:Number):Number{ if (isNaN(_arg1)){ return (_value); }; var _local2:Number = Number((_stepSize * Math.round((_arg1 / _stepSize))).toFixed(_precision)); if (_local2 > maximum){ return (maximum); }; if (_local2 < minimum){ return (minimum); }; return (_local2); } public function get textField():TextInput{ return (inputField); } override protected function configUI():void{ super.configUI(); upArrow = new BaseButton(); copyStylesToChild(upArrow, UP_ARROW_STYLES); upArrow.autoRepeat = true; upArrow.setSize(21, 12); upArrow.focusEnabled = false; addChild(upArrow); downArrow = new BaseButton(); copyStylesToChild(downArrow, DOWN_ARROW_STYLES); downArrow.autoRepeat = true; downArrow.setSize(21, 12); downArrow.focusEnabled = false; addChild(downArrow); inputField = new TextInput(); copyStylesToChild(inputField, TEXT_INPUT_STYLES); inputField.restrict = "0-9\\-\\.\\,"; inputField.text = _value.toString(); inputField.setSize(21, 24); inputField.focusTarget = (this as IFocusManagerComponent); inputField.focusEnabled = false; inputField.addEventListener(FocusEvent.FOCUS_IN, passEvent); inputField.addEventListener(FocusEvent.FOCUS_OUT, passEvent); addChild(inputField); inputField.addEventListener(Event.CHANGE, onTextChange, false, 0, true); upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, stepperPressHandler, false, 0, true); downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, stepperPressHandler, false, 0, true); } public function set stepSize(_arg1:Number):void{ _stepSize = _arg1; _precision = getPrecision(); setValue(_value); } public function set value(_arg1:Number):void{ setValue(_arg1, false); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; _arg1.stopImmediatePropagation(); var _local2:Number = Number(inputField.text); switch (_arg1.keyCode){ case Keyboard.END: setValue(maximum); break; case Keyboard.HOME: setValue(minimum); break; case Keyboard.UP: setValue(nextValue); break; case Keyboard.DOWN: setValue(previousValue); break; case Keyboard.ENTER: setValue(_local2); break; }; } protected function setStyles():void{ copyStylesToChild(downArrow, DOWN_ARROW_STYLES); copyStylesToChild(upArrow, UP_ARROW_STYLES); copyStylesToChild(inputField, TEXT_INPUT_STYLES); } public function get stepSize():Number{ return (_stepSize); } public function get value():Number{ return (_value); } protected function stepperPressHandler(_arg1:ComponentEvent):void{ setValue(Number(inputField.text), false); switch (_arg1.currentTarget){ case upArrow: setValue(nextValue); break; case downArrow: setValue(previousValue); }; inputField.setFocus(); inputField.textField.setSelection(0, 0); } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.width = (width + (_local2 * 2)); uiFocusRect.height = (height + (_local2 * 2)); }; } protected function onTextChange(_arg1:Event):void{ _arg1.stopImmediatePropagation(); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 16
//RadioButton (fl.controls.RadioButton) package fl.controls { import flash.events.*; import flash.display.*; import fl.managers.*; import flash.ui.*; public class RadioButton extends LabelButton implements IFocusManagerGroup { protected var _group:RadioButtonGroup; protected var defaultGroupName:String;// = "RadioButtonGroup" protected var _value:Object; private static var defaultStyles:Object = {icon:null, upIcon:"RadioButton_upIcon", downIcon:"RadioButton_downIcon", overIcon:"RadioButton_overIcon", disabledIcon:"RadioButton_disabledIcon", selectedDisabledIcon:"RadioButton_selectedDisabledIcon", selectedUpIcon:"RadioButton_selectedUpIcon", selectedDownIcon:"RadioButton_selectedDownIcon", selectedOverIcon:"RadioButton_selectedOverIcon", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5}; public static var createAccessibilityImplementation:Function; public function RadioButton(){ mode = "border"; groupName = defaultGroupName; } override protected function draw():void{ super.draw(); } override public function set selected(_arg1:Boolean):void{ if ((((_arg1 == false)) || (selected))){ return; }; if (_group != null){ _group.selection = this; } else { super.selected = _arg1; }; } override protected function drawLayout():void{ super.drawLayout(); var _local1:Number = Number(getStyleValue("textPadding")); switch (_labelPlacement){ case ButtonLabelPlacement.RIGHT: icon.x = _local1; textField.x = (icon.x + (icon.width + _local1)); background.width = ((textField.x + textField.width) + _local1); background.height = (Math.max(textField.height, icon.height) + (_local1 * 2)); break; case ButtonLabelPlacement.LEFT: icon.x = ((width - icon.width) - _local1); textField.x = (((width - icon.width) - (_local1 * 2)) - textField.width); background.width = ((textField.width + icon.width) + (_local1 * 3)); background.height = (Math.max(textField.height, icon.height) + (_local1 * 2)); break; case ButtonLabelPlacement.TOP: case ButtonLabelPlacement.BOTTOM: background.width = (Math.max(textField.width, icon.width) + (_local1 * 2)); background.height = ((textField.height + icon.height) + (_local1 * 3)); break; }; background.x = Math.min((icon.x - _local1), (textField.x - _local1)); background.y = Math.min((icon.y - _local1), (textField.y - _local1)); } protected function handleClick(_arg1:MouseEvent):void{ if (_group == null){ return; }; _group.dispatchEvent(new MouseEvent(MouseEvent.CLICK, true)); } protected function handleChange(_arg1:Event):void{ super.selected = (_group.selection == this); dispatchEvent(new Event(Event.CHANGE, true)); } public function set groupName(_arg1:String):void{ if (_group != null){ _group.removeRadioButton(this); _group.removeEventListener(Event.CHANGE, handleChange); }; _group = ((_arg1)==null) ? null : RadioButtonGroup.getGroup(_arg1); if (_group != null){ _group.addRadioButton(this); _group.addEventListener(Event.CHANGE, handleChange, false, 0, true); }; } override protected function configUI():void{ super.configUI(); super.toggle = true; var _local1:Shape = new Shape(); var _local2:Graphics = _local1.graphics; _local2.beginFill(0, 0); _local2.drawRect(0, 0, 100, 100); _local2.endFill(); background = (_local1 as DisplayObject); addChildAt(background, 0); addEventListener(MouseEvent.CLICK, handleClick, false, 0, true); } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ super.keyUpHandler(_arg1); if ((((_arg1.keyCode == Keyboard.SPACE)) && (!(_toggle)))){ _toggle = true; }; } override protected function drawBackground():void{ } override public function get selected():Boolean{ return (super.selected); } override protected function initializeAccessibility():void{ if (RadioButton.createAccessibilityImplementation != null){ RadioButton.createAccessibilityImplementation(this); }; } private function setThis():void{ var _local1:RadioButtonGroup = _group; if (_local1 != null){ if (_local1.selection != this){ _local1.selection = this; }; } else { super.selected = true; }; } public function set value(_arg1:Object):void{ _value = _arg1; } override public function set autoRepeat(_arg1:Boolean):void{ } override public function set toggle(_arg1:Boolean):void{ throw (new Error("Warning: You cannot change a RadioButtons toggle.")); } override public function get autoRepeat():Boolean{ return (false); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case Keyboard.DOWN: setNext(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.UP: setPrev(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.LEFT: setPrev(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.RIGHT: setNext(!(_arg1.ctrlKey)); _arg1.stopPropagation(); break; case Keyboard.SPACE: setThis(); _toggle = false; default: super.keyDownHandler(_arg1); break; }; } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.x = (background.x - _local2); uiFocusRect.y = (background.y - _local2); uiFocusRect.width = (background.width + (_local2 * 2)); uiFocusRect.height = (background.height + (_local2 * 2)); }; } private function setPrev(_arg1:Boolean=true):void{ var _local6:*; var _local2:RadioButtonGroup = _group; if (_local2 == null){ return; }; var _local3:IFocusManager = focusManager; if (_local3){ _local3.showFocusIndicator = true; }; var _local4:int = _local2.getRadioButtonIndex(this); var _local5:int = _local4; if (_local4 != -1){ do { --_local5; _local5 = ((_local5)==-1) ? (_local2.numRadioButtons - 1) : _local5; _local6 = _local2.getRadioButtonAt(_local5); if (((_local6) && (_local6.enabled))){ if (_arg1){ _local2.selection = _local6; }; _local6.setFocus(); return; }; if (((_arg1) && (!((_local2.getRadioButtonAt(_local5) == _local2.selection))))){ _local2.selection = this; }; this.drawFocus(true); } while (_local5 != _local4); }; } override public function get toggle():Boolean{ return (true); } public function get value():Object{ return (_value); } public function get groupName():String{ return (((_group)==null) ? null : _group.name); } private function setNext(_arg1:Boolean=true):void{ var _local7:*; var _local2:RadioButtonGroup = _group; if (_local2 == null){ return; }; var _local3:IFocusManager = focusManager; if (_local3){ _local3.showFocusIndicator = true; }; var _local4:int = _local2.getRadioButtonIndex(this); var _local5:Number = _local2.numRadioButtons; var _local6:int = _local4; if (_local4 != -1){ do { _local6++; _local6 = ((_local6)>(_local2.numRadioButtons - 1)) ? 0 : _local6; _local7 = _local2.getRadioButtonAt(_local6); if (((_local7) && (_local7.enabled))){ if (_arg1){ _local2.selection = _local7; }; _local7.setFocus(); return; }; if (((_arg1) && (!((_local2.getRadioButtonAt(_local6) == _local2.selection))))){ _local2.selection = this; }; this.drawFocus(true); } while (_local6 != _local4); }; } public function set group(_arg1:RadioButtonGroup):void{ groupName = _arg1.name; } public function get group():RadioButtonGroup{ return (_group); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 17
//RadioButtonGroup (fl.controls.RadioButtonGroup) package fl.controls { import flash.events.*; public class RadioButtonGroup extends EventDispatcher { protected var radioButtons:Array; protected var _name:String; protected var _selection:RadioButton; private static var groups:Object; private static var groupCount:uint = 0; public function RadioButtonGroup(_arg1:String){ _name = _arg1; radioButtons = []; registerGroup(this); } public function getRadioButtonIndex(_arg1:RadioButton):int{ var _local3:RadioButton; var _local2:int; while (_local2 < radioButtons.length) { _local3 = (radioButtons[_local2] as RadioButton); if (_local3 == _arg1){ return (_local2); }; _local2++; }; return (-1); } public function addRadioButton(_arg1:RadioButton):void{ if (_arg1.groupName != name){ _arg1.groupName = name; return; }; radioButtons.push(_arg1); if (_arg1.selected){ selection = _arg1; }; } public function get selectedData():Object{ var _local1:RadioButton = _selection; return (((_local1)==null) ? null : _local1.value); } public function removeRadioButton(_arg1:RadioButton):void{ var _local2:int = getRadioButtonIndex(_arg1); if (_local2 != -1){ radioButtons.splice(_local2, 1); }; if (_selection == _arg1){ _selection = null; }; } public function get name():String{ return (_name); } public function get selection():RadioButton{ return (_selection); } public function get numRadioButtons():int{ return (radioButtons.length); } public function set selectedData(_arg1:Object):void{ var _local3:RadioButton; var _local2:int; while (_local2 < radioButtons.length) { _local3 = (radioButtons[_local2] as RadioButton); if (_local3.value == _arg1){ selection = _local3; return; }; _local2++; }; } public function set selection(_arg1:RadioButton):void{ if ((((((_selection == _arg1)) || ((_arg1 == null)))) || ((getRadioButtonIndex(_arg1) == -1)))){ return; }; _selection = _arg1; dispatchEvent(new Event(Event.CHANGE, true)); } public function getRadioButtonAt(_arg1:int):RadioButton{ return (RadioButton(radioButtons[_arg1])); } public static function getGroup(_arg1:String):RadioButtonGroup{ if (groups == null){ groups = {}; }; var _local2:RadioButtonGroup = (groups[_arg1] as RadioButtonGroup); if (_local2 == null){ _local2 = new RadioButtonGroup(_arg1); if ((++groupCount % 20) == 0){ cleanUpGroups(); }; }; return (_local2); } private static function registerGroup(_arg1:RadioButtonGroup):void{ if (groups == null){ groups = {}; }; groups[_arg1.name] = _arg1; } private static function cleanUpGroups():void{ var _local1:String; var _local2:RadioButtonGroup; for (_local1 in groups) { _local2 = (groups[_local1] as RadioButtonGroup); if (_local2.radioButtons.length == 0){ delete groups[_local1]; }; }; } } }//package fl.controls
Section 18
//ScrollBar (fl.controls.ScrollBar) package fl.controls { import flash.events.*; import fl.core.*; import fl.events.*; public class ScrollBar extends UIComponent { private var _direction:String;// = "vertical" private var _minScrollPosition:Number;// = 0 private var _pageSize:Number;// = 10 private var _maxScrollPosition:Number;// = 0 protected var downArrow:BaseButton; private var _lineScrollSize:Number;// = 1 protected var upArrow:BaseButton; private var _scrollPosition:Number;// = 0 private var thumbScrollOffset:Number; protected var track:BaseButton; protected var thumb:LabelButton; protected var inDrag:Boolean;// = false private var _pageScrollSize:Number;// = 0 protected static const THUMB_STYLES:Object = {disabledSkin:"thumbDisabledSkin", downSkin:"thumbDownSkin", overSkin:"thumbOverSkin", upSkin:"thumbUpSkin", icon:"thumbIcon", textPadding:0}; public static const WIDTH:Number = 15; protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; protected static const TRACK_STYLES:Object = {disabledSkin:"trackDisabledSkin", downSkin:"trackDownSkin", overSkin:"trackOverSkin", upSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; private static var defaultStyles:Object = {downArrowDisabledSkin:"ScrollArrowDown_disabledSkin", downArrowDownSkin:"ScrollArrowDown_downSkin", downArrowOverSkin:"ScrollArrowDown_overSkin", downArrowUpSkin:"ScrollArrowDown_upSkin", thumbDisabledSkin:"ScrollThumb_upSkin", thumbDownSkin:"ScrollThumb_downSkin", thumbOverSkin:"ScrollThumb_overSkin", thumbUpSkin:"ScrollThumb_upSkin", trackDisabledSkin:"ScrollTrack_skin", trackDownSkin:"ScrollTrack_skin", trackOverSkin:"ScrollTrack_skin", trackUpSkin:"ScrollTrack_skin", upArrowDisabledSkin:"ScrollArrowUp_disabledSkin", upArrowDownSkin:"ScrollArrowUp_downSkin", upArrowOverSkin:"ScrollArrowUp_overSkin", upArrowUpSkin:"ScrollArrowUp_upSkin", thumbIcon:"ScrollBar_thumbIcon", repeatDelay:500, repeatInterval:35}; public function ScrollBar(){ setStyles(); focusEnabled = false; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; downArrow.enabled = (track.enabled = (thumb.enabled = (upArrow.enabled = ((enabled) && ((_maxScrollPosition > _minScrollPosition)))))); updateThumb(); } override public function setSize(_arg1:Number, _arg2:Number):void{ if (_direction == ScrollBarDirection.HORIZONTAL){ super.setSize(_arg2, _arg1); } else { super.setSize(_arg1, _arg2); }; } public function set lineScrollSize(_arg1:Number):void{ if (_arg1 > 0){ _lineScrollSize = _arg1; }; } public function get minScrollPosition():Number{ return (_minScrollPosition); } protected function updateThumb():void{ var _local1:Number = ((_maxScrollPosition - _minScrollPosition) + _pageSize); if ((((((track.height <= 12)) || ((_maxScrollPosition <= _minScrollPosition)))) || ((((_local1 == 0)) || (isNaN(_local1)))))){ thumb.height = 12; thumb.visible = false; } else { thumb.height = Math.max(13, ((_pageSize / _local1) * track.height)); thumb.y = (track.y + ((track.height - thumb.height) * ((_scrollPosition - _minScrollPosition) / (_maxScrollPosition - _minScrollPosition)))); thumb.visible = enabled; }; } public function set minScrollPosition(_arg1:Number):void{ setScrollProperties(_pageSize, _arg1, _maxScrollPosition); } public function get lineScrollSize():Number{ return (_lineScrollSize); } public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{ var _local3:Number = scrollPosition; _scrollPosition = Math.max(_minScrollPosition, Math.min(_maxScrollPosition, _arg1)); if (_local3 == _scrollPosition){ return; }; if (_arg2){ dispatchEvent(new ScrollEvent(_direction, (scrollPosition - _local3), scrollPosition)); }; updateThumb(); } public function get maxScrollPosition():Number{ return (_maxScrollPosition); } public function get scrollPosition():Number{ return (_scrollPosition); } override public function get height():Number{ return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.width : super.height); } public function get pageSize():Number{ return (_pageSize); } public function set maxScrollPosition(_arg1:Number):void{ setScrollProperties(_pageSize, _minScrollPosition, _arg1); } protected function thumbReleaseHandler(_arg1:MouseEvent):void{ inDrag = false; mouseChildren = true; thumb.mouseStateLocked = false; stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag); stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler); } public function set pageScrollSize(_arg1:Number):void{ if (_arg1 >= 0){ _pageScrollSize = _arg1; }; } public function set scrollPosition(_arg1:Number):void{ setScrollPosition(_arg1, true); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ var _local1:Number; if (isInvalid(InvalidationType.SIZE)){ _local1 = super.height; downArrow.move(0, Math.max(upArrow.height, (_local1 - downArrow.height))); track.setSize(WIDTH, Math.max(0, (_local1 - (downArrow.height + upArrow.height)))); updateThumb(); }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ setStyles(); }; downArrow.drawNow(); upArrow.drawNow(); track.drawNow(); thumb.drawNow(); validate(); } override public function get width():Number{ return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.height : super.width); } override protected function configUI():void{ super.configUI(); track = new BaseButton(); track.move(0, 14); track.useHandCursor = false; track.autoRepeat = true; track.focusEnabled = false; addChild(track); thumb = new LabelButton(); thumb.label = ""; thumb.setSize(WIDTH, 15); thumb.move(0, 15); thumb.focusEnabled = false; addChild(thumb); downArrow = new BaseButton(); downArrow.setSize(WIDTH, 14); downArrow.autoRepeat = true; downArrow.focusEnabled = false; addChild(downArrow); upArrow = new BaseButton(); upArrow.setSize(WIDTH, 14); upArrow.move(0, 0); upArrow.autoRepeat = true; upArrow.focusEnabled = false; addChild(upArrow); upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true); downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true); track.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true); thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true); enabled = false; } public function set pageSize(_arg1:Number):void{ if (_arg1 > 0){ _pageSize = _arg1; }; } public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{ this.pageSize = _arg1; _minScrollPosition = _arg2; _maxScrollPosition = _arg3; if (_arg4 >= 0){ _pageScrollSize = _arg4; }; enabled = (_maxScrollPosition > _minScrollPosition); setScrollPosition(_scrollPosition, false); updateThumb(); } public function get pageScrollSize():Number{ return (((_pageScrollSize)==0) ? _pageSize : _pageScrollSize); } protected function handleThumbDrag(_arg1:MouseEvent):void{ var _local2:Number = Math.max(0, Math.min((track.height - thumb.height), ((mouseY - track.y) - thumbScrollOffset))); setScrollPosition((((_local2 / (track.height - thumb.height)) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition)); } protected function setStyles():void{ copyStylesToChild(downArrow, DOWN_ARROW_STYLES); copyStylesToChild(thumb, THUMB_STYLES); copyStylesToChild(track, TRACK_STYLES); copyStylesToChild(upArrow, UP_ARROW_STYLES); } protected function scrollPressHandler(_arg1:ComponentEvent):void{ var _local2:Number; var _local3:Number; _arg1.stopImmediatePropagation(); if (_arg1.currentTarget == upArrow){ setScrollPosition((_scrollPosition - _lineScrollSize)); } else { if (_arg1.currentTarget == downArrow){ setScrollPosition((_scrollPosition + _lineScrollSize)); } else { _local2 = (((track.mouseY / track.height) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition); _local3 = ((pageScrollSize)==0) ? pageSize : pageScrollSize; if (_scrollPosition < _local2){ setScrollPosition(Math.min(_local2, (_scrollPosition + _local3))); } else { if (_scrollPosition > _local2){ setScrollPosition(Math.max(_local2, (_scrollPosition - _local3))); }; }; }; }; } protected function thumbPressHandler(_arg1:MouseEvent):void{ inDrag = true; thumbScrollOffset = (mouseY - thumb.y); thumb.mouseStateLocked = true; mouseChildren = false; stage.addEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true); } public function set direction(_arg1:String):void{ if (_direction == _arg1){ return; }; _direction = _arg1; if (isLivePreview){ return; }; setScaleY(1); var _local2 = (_direction == ScrollBarDirection.HORIZONTAL); if (((_local2) && (componentInspectorSetting))){ if (rotation == 90){ return; }; setScaleX(-1); rotation = -90; }; if (!componentInspectorSetting){ if (((_local2) && ((rotation == 0)))){ rotation = -90; setScaleX(-1); } else { if (((!(_local2)) && ((rotation == -90)))){ rotation = 0; setScaleX(1); }; }; }; invalidate(InvalidationType.SIZE); } public function get direction():String{ return (_direction); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 19
//ScrollBarDirection (fl.controls.ScrollBarDirection) package fl.controls { public class ScrollBarDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; } }//package fl.controls
Section 20
//ScrollPolicy (fl.controls.ScrollPolicy) package fl.controls { public class ScrollPolicy { public static const OFF:String = "off"; public static const ON:String = "on"; public static const AUTO:String = "auto"; } }//package fl.controls
Section 21
//TextArea (fl.controls.TextArea) package fl.controls { import flash.events.*; import flash.display.*; import fl.managers.*; import fl.core.*; import flash.text.*; import fl.events.*; import flash.system.*; import flash.ui.*; public class TextArea extends UIComponent implements IFocusManagerComponent { protected var _horizontalScrollBar:UIScrollBar; protected var _html:Boolean;// = false protected var background:DisplayObject; protected var _verticalScrollBar:UIScrollBar; protected var _savedHTML:String; protected var _horizontalScrollPolicy:String;// = "auto" protected var _editable:Boolean;// = true protected var textHasChanged:Boolean;// = false public var textField:TextField; protected var _wordWrap:Boolean;// = true protected var _verticalScrollPolicy:String;// = "auto" protected static const SCROLL_BAR_STYLES:Object = {downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; private static var defaultStyles:Object = {upSkin:"TextArea_upSkin", disabledSkin:"TextArea_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:3, embedFonts:false}; public static var createAccessibilityImplementation:Function; public function set alwaysShowSelection(_arg1:Boolean):void{ textField.alwaysShowSelection = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; mouseChildren = enabled; invalidate(InvalidationType.STATE); } override protected function focusInHandler(_arg1:FocusEvent):void{ setIMEMode(true); if (_arg1.target == this){ stage.focus = textField; }; var _local2:IFocusManager = focusManager; if (_local2){ if (editable){ _local2.showFocusIndicator = true; }; _local2.defaultButtonEnabled = false; }; super.focusInHandler(_arg1); if (editable){ setIMEMode(true); }; } protected function handleChange(_arg1:Event):void{ _arg1.stopPropagation(); dispatchEvent(new Event(Event.CHANGE, true)); invalidate(InvalidationType.DATA); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } public function get imeMode():String{ return (IME.conversionMode); } override public function drawFocus(_arg1:Boolean):void{ if (focusTarget != null){ focusTarget.drawFocus(_arg1); return; }; super.drawFocus(_arg1); } protected function handleWheel(_arg1:MouseEvent):void{ if (((!(enabled)) || (!(_verticalScrollBar.visible)))){ return; }; _verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * _verticalScrollBar.lineScrollSize)); dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, (_arg1.delta * _verticalScrollBar.lineScrollSize), _verticalScrollBar.scrollPosition)); } public function set condenseWhite(_arg1:Boolean):void{ textField.condenseWhite = _arg1; invalidate(InvalidationType.DATA); } public function get textWidth():Number{ drawNow(); return (textField.textWidth); } override protected function focusOutHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager = focusManager; if (_local2){ _local2.defaultButtonEnabled = true; }; setSelection(0, 0); super.focusOutHandler(_arg1); if (editable){ setIMEMode(false); }; } protected function handleScroll(_arg1:ScrollEvent):void{ dispatchEvent(_arg1); } protected function drawLayout():void{ var _local1:Number = Number(getStyleValue("textPadding")); textField.x = (textField.y = _local1); background.width = width; background.height = height; var _local2:Number = height; var _local3:Boolean = needVScroll(); var _local4:Number = (width - (_local3) ? _verticalScrollBar.width : 0); var _local5:Boolean = needHScroll(); if (_local5){ _local2 = (_local2 - _horizontalScrollBar.height); }; setTextSize(_local4, _local2, _local1); if (((((_local5) && (!(_local3)))) && (needVScroll()))){ _local3 = true; _local4 = (_local4 - _verticalScrollBar.width); setTextSize(_local4, _local2, _local1); }; if (_local3){ _verticalScrollBar.visible = true; _verticalScrollBar.x = (width - _verticalScrollBar.width); _verticalScrollBar.height = _local2; _verticalScrollBar.visible = true; _verticalScrollBar.enabled = enabled; } else { _verticalScrollBar.visible = false; }; if (_local5){ _horizontalScrollBar.visible = true; _horizontalScrollBar.y = (height - _horizontalScrollBar.height); _horizontalScrollBar.width = _local4; _horizontalScrollBar.visible = true; _horizontalScrollBar.enabled = enabled; } else { _horizontalScrollBar.visible = false; }; updateScrollBars(); addEventListener(Event.ENTER_FRAME, delayedLayoutUpdate, false, 0, true); } public function set displayAsPassword(_arg1:Boolean):void{ textField.displayAsPassword = _arg1; } protected function drawBackground():void{ var _local1:DisplayObject = background; var _local2:String = (enabled) ? "upSkin" : "disabledSkin"; background = getDisplayObjectInstance(getStyleValue(_local2)); if (background != null){ addChildAt(background, 0); }; if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){ removeChild(_local1); }; } public function get horizontalScrollPolicy():String{ return (_horizontalScrollPolicy); } protected function delayedLayoutUpdate(_arg1:Event):void{ if (textHasChanged){ textHasChanged = false; drawLayout(); return; }; removeEventListener(Event.ENTER_FRAME, delayedLayoutUpdate); } public function get verticalScrollPosition():Number{ return (textField.scrollV); } public function get text():String{ return (textField.text); } public function get verticalScrollBar():UIScrollBar{ return (_verticalScrollBar); } public function set maxChars(_arg1:int):void{ textField.maxChars = _arg1; } public function get textHeight():Number{ drawNow(); return (textField.textHeight); } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == textField)) || (super.isOurFocus(_arg1)))); } public function get maxVerticalScrollPosition():int{ return (textField.maxScrollV); } public function set horizontalScrollPosition(_arg1:Number):void{ drawNow(); textField.scrollH = _arg1; } public function get restrict():String{ return (textField.restrict); } protected function setEmbedFont(){ var _local1:Object = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } public function get alwaysShowSelection():Boolean{ return (textField.alwaysShowSelection); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ if (isInvalid(InvalidationType.STATE)){ updateTextFieldType(); }; if (isInvalid(InvalidationType.STYLES)){ setStyles(); setEmbedFont(); }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawTextFormat(); drawBackground(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.DATA)){ drawLayout(); }; super.draw(); } public function set horizontalScrollPolicy(_arg1:String):void{ _horizontalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } public function set editable(_arg1:Boolean):void{ _editable = _arg1; invalidate(InvalidationType.STATE); } public function setSelection(_arg1:int, _arg2:int):void{ textField.setSelection(_arg1, _arg2); } public function get condenseWhite():Boolean{ return (textField.condenseWhite); } public function get displayAsPassword():Boolean{ return (textField.displayAsPassword); } protected function setTextSize(_arg1:Number, _arg2:Number, _arg3:Number):void{ var _local4:Number = (_arg1 - (_arg3 * 2)); var _local5:Number = (_arg2 - (_arg3 * 2)); if (_local4 != textField.width){ textField.width = _local4; }; if (_local5 != textField.height){ textField.height = _local5; }; } public function get horizontalScrollBar():UIScrollBar{ return (_horizontalScrollBar); } public function get selectionBeginIndex():int{ return (textField.selectionBeginIndex); } override protected function configUI():void{ super.configUI(); tabChildren = true; textField = new TextField(); addChild(textField); updateTextFieldType(); _verticalScrollBar = new UIScrollBar(); _verticalScrollBar.name = "V"; _verticalScrollBar.visible = false; _verticalScrollBar.focusEnabled = false; copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); _verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true); addChild(_verticalScrollBar); _horizontalScrollBar = new UIScrollBar(); _horizontalScrollBar.name = "H"; _horizontalScrollBar.visible = false; _horizontalScrollBar.focusEnabled = false; _horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL; copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); _horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true); addChild(_horizontalScrollBar); textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true); textField.addEventListener(Event.CHANGE, handleChange, false, 0, true); textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true); _horizontalScrollBar.scrollTarget = textField; _verticalScrollBar.scrollTarget = textField; addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true); } public function set verticalScrollPosition(_arg1:Number):void{ drawNow(); textField.scrollV = _arg1; } public function get maxChars():int{ return (textField.maxChars); } public function set text(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ return; }; textField.text = _arg1; _html = false; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); textHasChanged = true; } protected function updateScrollBars(){ _horizontalScrollBar.update(); _verticalScrollBar.update(); _verticalScrollBar.enabled = enabled; _horizontalScrollBar.enabled = enabled; _horizontalScrollBar.drawNow(); _verticalScrollBar.drawNow(); } public function get maxHorizontalScrollPosition():int{ return (textField.maxScrollH); } protected function needHScroll():Boolean{ if (_horizontalScrollPolicy == ScrollPolicy.OFF){ return (false); }; if (_horizontalScrollPolicy == ScrollPolicy.ON){ return (true); }; return ((textField.maxScrollH > 0)); } protected function handleKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ENTER){ dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true)); }; } public function get horizontalScrollPosition():Number{ return (textField.scrollH); } public function get selectionEndIndex():int{ return (textField.selectionEndIndex); } public function get editable():Boolean{ return (_editable); } protected function updateTextFieldType():void{ textField.type = (((enabled) && (_editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; textField.selectable = enabled; textField.wordWrap = _wordWrap; textField.multiline = true; } public function appendText(_arg1:String):void{ textField.appendText(_arg1); invalidate(InvalidationType.DATA); } public function set wordWrap(_arg1:Boolean):void{ _wordWrap = _arg1; invalidate(InvalidationType.STATE); } public function set verticalScrollPolicy(_arg1:String):void{ _verticalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } protected function setStyles():void{ copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); } public function get length():Number{ return (textField.text.length); } protected function drawTextFormat():void{ var _local1:Object = UIComponent.getStyleDefinition(); var _local2:TextFormat = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); var _local3:TextFormat = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); if (_html){ textField.htmlText = _savedHTML; }; } public function set htmlText(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ return; }; if (_arg1 == ""){ text = ""; return; }; _html = true; _savedHTML = _arg1; textField.htmlText = _arg1; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); textHasChanged = true; } public function get verticalScrollPolicy():String{ return (_verticalScrollPolicy); } protected function handleTextInput(_arg1:TextEvent):void{ _arg1.stopPropagation(); dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text)); } public function get htmlText():String{ return (textField.htmlText); } public function getLineMetrics(_arg1:int):TextLineMetrics{ return (textField.getLineMetrics(_arg1)); } public function get wordWrap():Boolean{ return (_wordWrap); } protected function needVScroll():Boolean{ if (_verticalScrollPolicy == ScrollPolicy.OFF){ return (false); }; if (_verticalScrollPolicy == ScrollPolicy.ON){ return (true); }; return ((textField.maxScrollV > 1)); } public function set restrict(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ _arg1 = null; }; textField.restrict = _arg1; } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(defaultStyles, ScrollBar.getStyleDefinition())); } } }//package fl.controls
Section 22
//TextInput (fl.controls.TextInput) package fl.controls { import flash.events.*; import flash.display.*; import fl.managers.*; import fl.core.*; import flash.text.*; import fl.events.*; import flash.ui.*; public class TextInput extends UIComponent implements IFocusManagerComponent { protected var _html:Boolean;// = false protected var background:DisplayObject; protected var _savedHTML:String; protected var _editable:Boolean;// = true public var textField:TextField; private static var defaultStyles:Object = {upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:0, embedFonts:false}; public static var createAccessibilityImplementation:Function; public function set alwaysShowSelection(_arg1:Boolean):void{ textField.alwaysShowSelection = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; updateTextFieldType(); } public function get imeMode():String{ return (_imeMode); } protected function handleChange(_arg1:Event):void{ _arg1.stopPropagation(); dispatchEvent(new Event(Event.CHANGE, true)); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } protected function setEmbedFont(){ var _local1:Object = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } protected function drawLayout():void{ var _local1:Number = Number(getStyleValue("textPadding")); if (background != null){ background.width = width; background.height = height; }; textField.width = (width - (2 * _local1)); textField.height = (height - (2 * _local1)); textField.x = (textField.y = _local1); } public function set condenseWhite(_arg1:Boolean):void{ textField.condenseWhite = _arg1; } public function get textWidth():Number{ return (textField.textWidth); } override protected function focusOutHandler(_arg1:FocusEvent):void{ super.focusOutHandler(_arg1); if (editable){ setIMEMode(false); }; } override public function setFocus():void{ stage.focus = textField; } public function set displayAsPassword(_arg1:Boolean):void{ textField.displayAsPassword = _arg1; } protected function drawBackground():void{ var _local1:DisplayObject = background; var _local2:String = (enabled) ? "upSkin" : "disabledSkin"; background = getDisplayObjectInstance(getStyleValue(_local2)); if (background == null){ return; }; addChildAt(background, 0); if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){ removeChild(_local1); }; } public function get text():String{ return (textField.text); } public function set maxChars(_arg1:int):void{ textField.maxChars = _arg1; } public function set horizontalScrollPosition(_arg1:int):void{ textField.scrollH = _arg1; } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == textField)) || (super.isOurFocus(_arg1)))); } public function get textHeight():Number{ return (textField.textHeight); } public function get restrict():String{ return (textField.restrict); } public function get alwaysShowSelection():Boolean{ return (textField.alwaysShowSelection); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ var _local1:Object; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawTextFormat(); drawBackground(); _local1 = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } public function set editable(_arg1:Boolean):void{ _editable = _arg1; updateTextFieldType(); } public function setSelection(_arg1:int, _arg2:int):void{ textField.setSelection(_arg1, _arg2); } public function get condenseWhite():Boolean{ return (textField.condenseWhite); } public function get displayAsPassword():Boolean{ return (textField.displayAsPassword); } public function get selectionBeginIndex():int{ return (textField.selectionBeginIndex); } override protected function configUI():void{ super.configUI(); tabChildren = true; textField = new TextField(); addChild(textField); updateTextFieldType(); textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true); textField.addEventListener(Event.CHANGE, handleChange, false, 0, true); textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true); } public function get maxChars():int{ return (textField.maxChars); } public function set text(_arg1:String):void{ textField.text = _arg1; _html = false; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); } protected function updateTextFieldType():void{ textField.type = (((enabled) && (editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; textField.selectable = enabled; } protected function handleKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ENTER){ dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true)); }; } public function get horizontalScrollPosition():int{ return (textField.scrollH); } public function get selectionEndIndex():int{ return (textField.selectionEndIndex); } public function get editable():Boolean{ return (_editable); } public function get maxHorizontalScrollPosition():int{ return (textField.maxScrollH); } public function appendText(_arg1:String):void{ textField.appendText(_arg1); } protected function drawTextFormat():void{ var _local1:Object = UIComponent.getStyleDefinition(); var _local2:TextFormat = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); var _local3:TextFormat = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); if (_html){ textField.htmlText = _savedHTML; }; } public function get length():int{ return (textField.length); } public function set htmlText(_arg1:String):void{ if (_arg1 == ""){ text = ""; return; }; _html = true; _savedHTML = _arg1; textField.htmlText = _arg1; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); } protected function handleTextInput(_arg1:TextEvent):void{ _arg1.stopPropagation(); dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text)); } public function set restrict(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ _arg1 = null; }; textField.restrict = _arg1; } public function getLineMetrics(_arg1:int):TextLineMetrics{ return (textField.getLineMetrics(_arg1)); } override public function drawFocus(_arg1:Boolean):void{ if (focusTarget != null){ focusTarget.drawFocus(_arg1); return; }; super.drawFocus(_arg1); } override protected function focusInHandler(_arg1:FocusEvent):void{ if (_arg1.target == this){ stage.focus = textField; }; var _local2:IFocusManager = focusManager; if (((editable) && (_local2))){ _local2.showFocusIndicator = true; if (((textField.selectable) && ((textField.selectionBeginIndex == textField.selectionBeginIndex)))){ setSelection(0, textField.length); }; }; super.focusInHandler(_arg1); if (editable){ setIMEMode(true); }; } public function get htmlText():String{ return (textField.htmlText); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 23
//UIScrollBar (fl.controls.UIScrollBar) package fl.controls { import flash.events.*; import fl.core.*; import flash.text.*; import fl.events.*; public class UIScrollBar extends ScrollBar { protected var inEdit:Boolean;// = false protected var inScroll:Boolean;// = false protected var _scrollTarget:TextField; private static var defaultStyles:Object = {}; protected function updateScrollTargetProperties():void{ var _local1:Boolean; var _local2:Number; if (_scrollTarget == null){ setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, pageScrollSize); scrollPosition = 0; } else { _local1 = (direction == ScrollBarDirection.HORIZONTAL); _local2 = (_local1) ? _scrollTarget.width : 10; setScrollProperties(_local2, (_local1) ? 0 : 1, (_local1) ? _scrollTarget.maxScrollH : _scrollTarget.maxScrollV, pageScrollSize); scrollPosition = (_local1) ? _scrollTarget.scrollH : _scrollTarget.scrollV; }; } override public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{ var _local5:Number = _arg3; var _local6:Number = ((_arg2)<0) ? 0 : _arg2; if (_scrollTarget != null){ if (direction == ScrollBarDirection.HORIZONTAL){ _local5 = ((_arg3)>_scrollTarget.maxScrollH) ? _scrollTarget.maxScrollH : _local5; } else { _local5 = ((_arg3)>_scrollTarget.maxScrollV) ? _scrollTarget.maxScrollV : _local5; }; }; super.setScrollProperties(_arg1, _local6, _local5, _arg4); } protected function handleTargetScroll(_arg1:Event):void{ if (inDrag){ return; }; if (!enabled){ return; }; inEdit = true; updateScrollTargetProperties(); scrollPosition = ((direction)==ScrollBarDirection.HORIZONTAL) ? _scrollTarget.scrollH : _scrollTarget.scrollV; inEdit = false; } override public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{ super.setScrollPosition(_arg1, _arg2); if (!_scrollTarget){ inScroll = false; return; }; updateTargetScroll(); } public function get scrollTargetName():String{ return (_scrollTarget.name); } override protected function draw():void{ if (isInvalid(InvalidationType.DATA)){ updateScrollTargetProperties(); }; super.draw(); } override public function set direction(_arg1:String):void{ if (isLivePreview){ return; }; super.direction = _arg1; updateScrollTargetProperties(); } protected function updateTargetScroll(_arg1:ScrollEvent=null):void{ if (inEdit){ return; }; if (direction == ScrollBarDirection.HORIZONTAL){ _scrollTarget.scrollH = scrollPosition; } else { _scrollTarget.scrollV = scrollPosition; }; } override public function set minScrollPosition(_arg1:Number):void{ super.minScrollPosition = ((_arg1)<0) ? 0 : _arg1; } override public function set maxScrollPosition(_arg1:Number):void{ var _local2:Number = _arg1; if (_scrollTarget != null){ if (direction == ScrollBarDirection.HORIZONTAL){ _local2 = ((_local2)>_scrollTarget.maxScrollH) ? _scrollTarget.maxScrollH : _local2; } else { _local2 = ((_local2)>_scrollTarget.maxScrollV) ? _scrollTarget.maxScrollV : _local2; }; }; super.maxScrollPosition = _local2; } protected function handleTargetChange(_arg1:Event):void{ inEdit = true; setScrollPosition(((direction)==ScrollBarDirection.HORIZONTAL) ? _scrollTarget.scrollH : _scrollTarget.scrollV, true); updateScrollTargetProperties(); inEdit = false; } public function update():void{ inEdit = true; updateScrollTargetProperties(); inEdit = false; } public function set scrollTargetName(_arg1:String):void{ var target = _arg1; try { scrollTarget = (parent.getChildByName(target) as TextField); } catch(error:Error) { throw (new Error("ScrollTarget not found, or is not a TextField")); }; } public function set scrollTarget(_arg1:TextField):void{ if (_scrollTarget != null){ _scrollTarget.removeEventListener(Event.CHANGE, handleTargetChange, false); _scrollTarget.removeEventListener(TextEvent.TEXT_INPUT, handleTargetChange, false); _scrollTarget.removeEventListener(Event.SCROLL, handleTargetScroll, false); removeEventListener(ScrollEvent.SCROLL, updateTargetScroll, false); }; _scrollTarget = _arg1; if (_scrollTarget != null){ _scrollTarget.addEventListener(Event.CHANGE, handleTargetChange, false, 0, true); _scrollTarget.addEventListener(TextEvent.TEXT_INPUT, handleTargetChange, false, 0, true); _scrollTarget.addEventListener(Event.SCROLL, handleTargetScroll, false, 0, true); addEventListener(ScrollEvent.SCROLL, updateTargetScroll, false, 0, true); }; invalidate(InvalidationType.DATA); } public function get scrollTarget():TextField{ return (_scrollTarget); } override public function get direction():String{ return (super.direction); } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(defaultStyles, ScrollBar.getStyleDefinition())); } } }//package fl.controls
Section 24
//ComponentShim (fl.core.ComponentShim) package fl.core { import flash.display.*; public dynamic class ComponentShim extends MovieClip { } }//package fl.core
Section 25
//InvalidationType (fl.core.InvalidationType) package fl.core { public class InvalidationType { public static const SIZE:String = "size"; public static const ALL:String = "all"; public static const DATA:String = "data"; public static const SCROLL:String = "scroll"; public static const STATE:String = "state"; public static const STYLES:String = "styles"; public static const SELECTED:String = "selected"; public static const RENDERER_STYLES:String = "rendererStyles"; } }//package fl.core
Section 26
//UIComponent (fl.core.UIComponent) package fl.core { import flash.events.*; import flash.display.*; import fl.managers.*; import flash.text.*; import fl.events.*; import flash.system.*; import flash.utils.*; public class UIComponent extends Sprite { protected var _x:Number; protected var _enabled:Boolean;// = true protected var callLaterMethods:Dictionary; private var _mouseFocusEnabled:Boolean;// = true private var tempText:TextField; private var _focusEnabled:Boolean;// = true protected var startHeight:Number; protected var _height:Number; protected var invalidateFlag:Boolean;// = false protected var _oldIMEMode:String;// = null protected var _inspector:Boolean;// = false protected var startWidth:Number; public var focusTarget:IFocusManagerComponent; protected var errorCaught:Boolean;// = false protected var invalidHash:Object; protected var sharedStyles:Object; protected var uiFocusRect:DisplayObject; protected var isLivePreview:Boolean;// = false protected var _imeMode:String;// = null protected var _width:Number; protected var instanceStyles:Object; public var version:String;// = "3.0.0.16" protected var isFocused:Boolean;// = false protected var _y:Number; public static var inCallLaterPhase:Boolean = false; private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)}; public static var createAccessibilityImplementation:Function; private static var focusManagers:Dictionary = new Dictionary(false); public function UIComponent(){ instanceStyles = {}; sharedStyles = {}; invalidHash = {}; callLaterMethods = new Dictionary(); StyleManager.registerInstance(this); configUI(); invalidate(InvalidationType.ALL); tabEnabled = (this is IFocusManagerComponent); focusRect = false; if (tabEnabled){ addEventListener(FocusEvent.FOCUS_IN, focusInHandler); addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler); addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); }; initializeFocusManager(); addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true); } public function getStyle(_arg1:String):Object{ return (instanceStyles[_arg1]); } protected function checkLivePreview():Boolean{ var className:String; if (parent == null){ return (false); }; try { className = getQualifiedClassName(parent); } catch(e:Error) { }; return ((className == "fl.livepreview::LivePreviewParent")); } private function callLaterDispatcher(_arg1:Event):void{ var _local3:Object; if (_arg1.type == Event.ADDED_TO_STAGE){ removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher); stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); return; }; _arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher); if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); return; }; inCallLaterPhase = true; var _local2:Dictionary = callLaterMethods; for (_local3 in _local2) { _local3(); delete _local2[_local3]; }; inCallLaterPhase = false; } protected function validate():void{ invalidHash = {}; } protected function focusOutHandler(_arg1:FocusEvent):void{ if (isOurFocus((_arg1.target as DisplayObject))){ drawFocus(false); isFocused = false; }; } public function set mouseFocusEnabled(_arg1:Boolean):void{ _mouseFocusEnabled = _arg1; } public function getFocus():InteractiveObject{ if (stage){ return (stage.focus); }; return (null); } override public function get height():Number{ return (_height); } private function addedHandler(_arg1:Event):void{ removeEventListener("addedToStage", addedHandler); initializeFocusManager(); } protected function getStyleValue(_arg1:String):Object{ return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]); } public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{ invalidHash[_arg1] = true; if (_arg2){ this.callLater(draw); }; } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } public function get enabled():Boolean{ return (_enabled); } protected function getScaleX():Number{ return (super.scaleX); } protected function getScaleY():Number{ return (super.scaleY); } public function get focusEnabled():Boolean{ return (_focusEnabled); } protected function afterComponentParameters():void{ } override public function get scaleY():Number{ return ((height / startHeight)); } protected function setIMEMode(_arg1:Boolean){ var enabled = _arg1; if (_imeMode != null){ if (enabled){ IME.enabled = true; _oldIMEMode = IME.conversionMode; try { if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _imeMode; }; errorCaught = false; } catch(e:Error) { errorCaught = true; throw (new Error(("IME mode not supported: " + _imeMode))); }; } else { if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _oldIMEMode; }; IME.enabled = false; }; }; } protected function draw():void{ if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } override public function set height(_arg1:Number):void{ if (_height == _arg1){ return; }; setSize(width, _arg1); } protected function configUI():void{ isLivePreview = checkLivePreview(); var _local1:Number = rotation; rotation = 0; var _local2:Number = super.width; var _local3:Number = super.height; var _local4 = 1; super.scaleY = _local4; super.scaleX = _local4; setSize(_local2, _local3); move(super.x, super.y); rotation = _local1; startWidth = _local2; startHeight = _local3; if (numChildren > 0){ removeChildAt(0); }; } protected function setScaleY(_arg1:Number):void{ super.scaleY = _arg1; } override public function get scaleX():Number{ return ((width / startWidth)); } protected function setScaleX(_arg1:Number):void{ super.scaleX = _arg1; } private function initializeFocusManager():void{ if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true); } else { createFocusManager(); }; } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } public function set focusManager(_arg1:IFocusManager):void{ UIComponent.focusManagers[this] = _arg1; } public function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } protected function isInvalid(_arg1:String, ... _args):Boolean{ if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){ return (true); }; while (_args.length > 0) { if (invalidHash[_args.pop()]){ return (true); }; }; return (false); } public function setStyle(_arg1:String, _arg2:Object):void{ if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; instanceStyles[_arg1] = _arg2; invalidate(InvalidationType.STYLES); } override public function get visible():Boolean{ return (super.visible); } protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (isOurFocus((_arg1.target as DisplayObject))){ _local2 = focusManager; if (((_local2) && (_local2.showFocusIndicator))){ drawFocus(true); isFocused = true; }; }; } public function get componentInspectorSetting():Boolean{ return (_inspector); } override public function get x():Number{ return ((isNaN(_x)) ? super.x : _x); } override public function get y():Number{ return ((isNaN(_y)) ? super.y : _y); } public function set enabled(_arg1:Boolean):void{ if (_arg1 == _enabled){ return; }; _enabled = _arg1; invalidate(InvalidationType.STATE); } public function setSize(_arg1:Number, _arg2:Number):void{ _width = _arg1; _height = _arg2; invalidate(InvalidationType.SIZE); dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false)); } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } public function setSharedStyle(_arg1:String, _arg2:Object):void{ if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; sharedStyles[_arg1] = _arg2; if (instanceStyles[_arg1] == null){ invalidate(InvalidationType.STYLES); }; } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } override public function set width(_arg1:Number):void{ if (_width == _arg1){ return; }; setSize(_arg1, height); } public function setFocus():void{ if (stage){ stage.focus = this; }; } override public function set scaleX(_arg1:Number):void{ setSize((startWidth * _arg1), height); } public function get mouseFocusEnabled():Boolean{ return (_mouseFocusEnabled); } override public function set scaleY(_arg1:Number):void{ setSize(width, (startHeight * _arg1)); } protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{ var skin = _arg1; var classDef:Object; if ((skin is Class)){ return ((new (skin) as DisplayObject)); }; if ((skin is DisplayObject)){ (skin as DisplayObject).x = 0; (skin as DisplayObject).y = 0; return ((skin as DisplayObject)); }; try { classDef = getDefinitionByName(skin.toString()); } catch(e:Error) { try { classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object); } catch(e:Error) { }; }; if (classDef == null){ return (null); }; return ((new (classDef) as DisplayObject)); } protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{ var _local3:String; for (_local3 in _arg2) { _arg1.setStyle(_local3, getStyleValue(_arg2[_local3])); }; } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } public function get focusManager():IFocusManager{ var _local1:DisplayObject = this; while (_local1) { if (UIComponent.focusManagers[_local1] != null){ return (IFocusManager(UIComponent.focusManagers[_local1])); }; _local1 = _local1.parent; }; return (null); } override public function get width():Number{ return (_width); } protected function beforeComponentParameters():void{ } protected function callLater(_arg1:Function):void{ if (inCallLaterPhase){ return; }; callLaterMethods[_arg1] = true; if (stage != null){ stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); } else { addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); }; } public function move(_arg1:Number, _arg2:Number):void{ _x = _arg1; _y = _arg2; super.x = Math.round(_arg1); super.y = Math.round(_arg2); dispatchEvent(new ComponentEvent(ComponentEvent.MOVE)); } public function validateNow():void{ invalidate(InvalidationType.ALL, false); draw(); } override public function set visible(_arg1:Boolean):void{ if (super.visible == _arg1){ return; }; super.visible = _arg1; var _local2:String = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE; dispatchEvent(new ComponentEvent(_local2, true)); } protected function createFocusManager():void{ if (focusManagers[stage] == null){ focusManagers[stage] = new FocusManager(stage); }; } protected function hookAccessibility(_arg1:Event):void{ removeEventListener(Event.ENTER_FRAME, hookAccessibility); initializeAccessibility(); } public function set componentInspectorSetting(_arg1:Boolean):void{ _inspector = _arg1; if (_inspector){ beforeComponentParameters(); } else { afterComponentParameters(); }; } override public function set y(_arg1:Number):void{ move(_x, _arg1); } public function drawFocus(_arg1:Boolean):void{ var _local2:Number; isFocused = _arg1; if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){ removeChild(uiFocusRect); uiFocusRect = null; }; if (_arg1){ uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite); if (uiFocusRect == null){ return; }; _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.x = -(_local2); uiFocusRect.y = -(_local2); uiFocusRect.width = (width + (_local2 * 2)); uiFocusRect.height = (height + (_local2 * 2)); addChildAt(uiFocusRect, 0); }; } override public function set x(_arg1:Number):void{ move(_arg1, _y); } public function drawNow():void{ draw(); } public static function getStyleDefinition():Object{ return (defaultStyles); } public static function mergeStyles(... _args):Object{ var _local5:Object; var _local6:String; var _local2:Object = {}; var _local3:uint = _args.length; var _local4:uint; while (_local4 < _local3) { _local5 = _args[_local4]; for (_local6 in _local5) { if (_local2[_local6] != null){ } else { _local2[_local6] = _args[_local4][_local6]; }; }; _local4++; }; return (_local2); } } }//package fl.core
Section 27
//ComponentEvent (fl.events.ComponentEvent) package fl.events { import flash.events.*; public class ComponentEvent extends Event { public static const HIDE:String = "hide"; public static const BUTTON_DOWN:String = "buttonDown"; public static const MOVE:String = "move"; public static const RESIZE:String = "resize"; public static const ENTER:String = "enter"; public static const LABEL_CHANGE:String = "labelChange"; public static const SHOW:String = "show"; public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("ComponentEvent", "type", "bubbles", "cancelable")); } override public function clone():Event{ return (new ComponentEvent(type, bubbles, cancelable)); } } }//package fl.events
Section 28
//ScrollEvent (fl.events.ScrollEvent) package fl.events { import flash.events.*; public class ScrollEvent extends Event { private var _direction:String; private var _position:Number; private var _delta:Number; public static const SCROLL:String = "scroll"; public function ScrollEvent(_arg1:String, _arg2:Number, _arg3:Number){ super(ScrollEvent.SCROLL, false, false); _direction = _arg1; _delta = _arg2; _position = _arg3; } public function get position():Number{ return (_position); } public function get direction():String{ return (_direction); } public function get delta():Number{ return (_delta); } override public function toString():String{ return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position")); } override public function clone():Event{ return (new ScrollEvent(_direction, _delta, _position)); } } }//package fl.events
Section 29
//FocusManager (fl.managers.FocusManager) package fl.managers { import flash.events.*; import flash.display.*; import fl.core.*; import fl.controls.*; import flash.text.*; import flash.utils.*; import flash.ui.*; public class FocusManager implements IFocusManager { private var focusableObjects:Dictionary; private var _showFocusIndicator:Boolean;// = true private var defButton:Button; private var focusableCandidates:Array; private var _form:DisplayObjectContainer; private var _defaultButtonEnabled:Boolean;// = true private var activated:Boolean;// = false private var _defaultButton:Button; private var calculateCandidates:Boolean;// = true private var lastFocus:InteractiveObject; private var lastAction:String; public function FocusManager(_arg1:DisplayObjectContainer){ focusableObjects = new Dictionary(true); if (_arg1 != null){ _form = _arg1; addFocusables(DisplayObject(_arg1)); _arg1.addEventListener(Event.ADDED, addedHandler); _arg1.addEventListener(Event.REMOVED, removedHandler); activate(); }; } public function get showFocusIndicator():Boolean{ return (_showFocusIndicator); } private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{ var _local7:DisplayObject; var _local8:IFocusManagerGroup; var _local9:int; var _local10:DisplayObject; var _local11:IFocusManagerGroup; var _local5:int = focusableCandidates.length; var _local6:int = _arg1; while (true) { if (_arg2){ _arg1--; } else { _arg1++; }; if (_arg3){ if (((_arg2) && ((_arg1 < 0)))){ break; }; if (((!(_arg2)) && ((_arg1 == _local5)))){ break; }; } else { _arg1 = ((_arg1 + _local5) % _local5); if (_local6 == _arg1){ break; }; }; if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){ _local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1])); if ((_local7 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local7); _local9 = 0; while (_local9 < focusableCandidates.length) { _local10 = focusableCandidates[_local9]; if ((_local10 is IFocusManagerGroup)){ _local11 = IFocusManagerGroup(_local10); if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){ _arg1 = _local9; break; }; }; _local9++; }; }; return (_arg1); }; }; return (_arg1); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ if ((_arg1.relatedObject is TextField)){ return; }; _arg1.preventDefault(); } public function set form(_arg1:DisplayObjectContainer):void{ _form = _arg1; } private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{ var focusable:IFocusManagerComponent; var io:InteractiveObject; var doc:DisplayObjectContainer; var i:int; var child:DisplayObject; var o = _arg1; var skipTopLevel = _arg2; if (!skipTopLevel){ if ((o is IFocusManagerComponent)){ focusable = IFocusManagerComponent(o); if (focusable.focusEnabled){ if (((focusable.tabEnabled) && (isTabVisible(o)))){ focusableObjects[o] = true; calculateCandidates = true; }; o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; } else { if ((o is InteractiveObject)){ io = (o as InteractiveObject); if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){ focusableObjects[io] = true; calculateCandidates = true; }; io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; }; }; if ((o is DisplayObjectContainer)){ doc = DisplayObjectContainer(o); o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){ i = 0; while (i < doc.numChildren) { try { child = doc.getChildAt(i); if (child != null){ addFocusables(doc.getChildAt(i)); }; } catch(error:SecurityError) { }; i = (i + 1); }; }; }; } private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{ return (_arg1.getChildIndex(_arg2)); } public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{ var _local2:InteractiveObject = _arg1; while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (_arg1); }; _arg1 = _arg1.parent; }; return (_local2); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject = (_arg1.target as InteractiveObject); } private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{ var _local3:IFocusManagerGroup; if (!isEnabledAndVisible(_arg1)){ return (false); }; if ((_arg1 is IFocusManagerGroup)){ _local3 = IFocusManagerGroup(_arg1); if (_arg2 == _local3.groupName){ return (false); }; }; return (true); } private function setFocusToNextObject(_arg1:FocusEvent):void{ if (!hasFocusableObjects()){ return; }; var _local2:InteractiveObject = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ setFocus(_local2); }; } private function sortFocusableObjectsTabIndex():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){ focusableCandidates.push(_local2); }; }; focusableCandidates.sort(sortByTabIndex); } private function removeFocusables(_arg1:DisplayObject):void{ var _local2:Object; var _local3:DisplayObject; if ((_arg1 is DisplayObjectContainer)){ _arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); _arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); for (_local2 in focusableObjects) { _local3 = DisplayObject(_local2); if (DisplayObjectContainer(_arg1).contains(_local3)){ if (_local3 == lastFocus){ lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local2]; calculateCandidates = true; }; }; }; } private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{ while (_arg1 != InteractiveObject(form)) { if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){ return (_arg1); }; _arg1 = _arg1.parent; if (_arg1 == null){ break; }; }; return (null); } public function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); } private function addedHandler(_arg1:Event):void{ var _local2:DisplayObject = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local3:TextField; var _local4:SimpleButton; var _local2:DisplayObjectContainer = DisplayObject(form).parent; while (_arg1 != _local2) { if ((_arg1 is UIComponent)){ if (!UIComponent(_arg1).enabled){ return (false); }; } else { if ((_arg1 is TextField)){ _local3 = TextField(_arg1); if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){ return (false); }; } else { if ((_arg1 is SimpleButton)){ _local4 = SimpleButton(_arg1); if (!_local4.enabled){ return (false); }; }; }; }; if (!_arg1.visible){ return (false); }; _arg1 = _arg1.parent; }; return (true); } private function tabChildrenChangeHandler(_arg1:Event):void{ if (_arg1.target != _arg1.currentTarget){ return; }; calculateCandidates = true; var _local2:DisplayObjectContainer = DisplayObjectContainer(_arg1.target); if (_local2.tabChildren){ addFocusables(_local2, true); } else { removeFocusables(_local2); }; } private function deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject = InteractiveObject(_arg1.target); } public function setFocus(_arg1:InteractiveObject):void{ if ((_arg1 is IFocusManagerComponent)){ IFocusManagerComponent(_arg1).setFocus(); } else { form.stage.focus = _arg1; }; } public function getFocus():InteractiveObject{ var _local1:InteractiveObject = form.stage.focus; return (findFocusManagerComponent(_local1)); } private function hasFocusableObjects():Boolean{ var _local1:Object; for (_local1 in focusableObjects) { return (true); }; return (false); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = true; } public function set defaultButton(_arg1:Button):void{ var _local2:Button = (_arg1) ? Button(_arg1) : null; if (_local2 != _defaultButton){ if (_defaultButton){ _defaultButton.emphasized = false; }; if (defButton){ defButton.emphasized = false; }; _defaultButton = _local2; defButton = _local2; if (_local2){ _local2.emphasized = true; }; }; } private function sortFocusableObjects():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){ sortFocusableObjectsTabIndex(); return; }; focusableCandidates.push(_local2); }; focusableCandidates.sort(sortByDepth); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ showFocusIndicator = true; if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){ setFocusToNextObject(_arg1); _arg1.preventDefault(); }; } private function getIndexOfFocusedObject(_arg1:DisplayObject):int{ var _local2:int = focusableCandidates.length; var _local3:int; _local3 = 0; while (_local3 < _local2) { if (focusableCandidates[_local3] == _arg1){ return (_local3); }; _local3++; }; return (-1); } public function hideFocus():void{ } private function removedHandler(_arg1:Event):void{ var _local2:int; var _local4:InteractiveObject; var _local3:DisplayObject = DisplayObject(_arg1.target); if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){ if (_local3 == lastFocus){ IFocusManagerComponent(lastFocus).drawFocus(false); lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local3]; calculateCandidates = true; } else { if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){ _local4 = (_local3 as InteractiveObject); if (_local4){ if (_local4 == lastFocus){ lastFocus = null; }; delete focusableObjects[_local4]; calculateCandidates = true; }; _local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); }; }; removeFocusables(_local3); } private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{ var _local5:int; var _local6:String; var _local7:String; var _local3 = ""; var _local4 = ""; var _local8 = "0000"; var _local9:DisplayObject = DisplayObject(_arg1); var _local10:DisplayObject = DisplayObject(_arg2); while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) { _local5 = getChildIndex(_local9.parent, _local9); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local3 = (_local7 + _local3); _local9 = _local9.parent; }; while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) { _local5 = getChildIndex(_local10.parent, _local10); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local4 = (_local7 + _local4); _local10 = _local10.parent; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0); } public function get defaultButton():Button{ return (_defaultButton); } private function activateHandler(_arg1:Event):void{ var _local2:InteractiveObject = InteractiveObject(_arg1.target); if (lastFocus){ if ((lastFocus is IFocusManagerComponent)){ IFocusManagerComponent(lastFocus).setFocus(); } else { form.stage.focus = lastFocus; }; }; lastAction = "ACTIVATE"; } public function showFocus():void{ } public function set defaultButtonEnabled(_arg1:Boolean):void{ _defaultButtonEnabled = _arg1; } public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{ var _local8:IFocusManagerGroup; if (!hasFocusableObjects()){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; var _local2:DisplayObject = form.stage.focus; _local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2))); var _local3 = ""; if ((_local2 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local2); _local3 = _local8.groupName; }; var _local4:int = getIndexOfFocusedObject(_local2); var _local5:Boolean; var _local6:int = _local4; if (_local4 == -1){ if (_arg1){ _local4 = focusableCandidates.length; }; _local5 = true; }; var _local7:int = getIndexOfNextObject(_local4, _arg1, _local5, _local3); return (findFocusManagerComponent(focusableCandidates[_local7])); } private function mouseDownHandler(_arg1:MouseEvent):void{ if (_arg1.isDefaultPrevented()){ return; }; var _local2:InteractiveObject = getTopLevelFocusTarget(InteractiveObject(_arg1.target)); if (!_local2){ return; }; showFocusIndicator = false; if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){ setFocus(_local2); }; lastAction = "MOUSEDOWN"; } private function isTabVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer = _arg1.parent; while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) { if (!_local2.tabChildren){ return (false); }; _local2 = _local2.parent; }; return (true); } public function get nextTabIndex():int{ return (0); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.TAB){ lastAction = "KEY"; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; }; if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){ sendDefaultButtonEvent(); }; } private function focusInHandler(_arg1:FocusEvent):void{ var _local3:Button; var _local2:InteractiveObject = InteractiveObject(_arg1.target); if (form.contains(_local2)){ lastFocus = findFocusManagerComponent(InteractiveObject(_local2)); if ((lastFocus is Button)){ _local3 = Button(lastFocus); if (defButton){ defButton.emphasized = false; defButton = _local3; _local3.emphasized = true; }; } else { if (((defButton) && (!((defButton == _defaultButton))))){ defButton.emphasized = false; defButton = _defaultButton; _defaultButton.emphasized = true; }; }; }; } private function tabEnabledChangeHandler(_arg1:Event):void{ calculateCandidates = true; var _local2:InteractiveObject = InteractiveObject(_arg1.target); var _local3 = (focusableObjects[_local2] == true); if (_local2.tabEnabled){ if (((!(_local3)) && (isTabVisible(_local2)))){ if (!(_local2 is IFocusManagerComponent)){ _local2.focusRect = false; }; focusableObjects[_local2] = true; }; } else { if (_local3){ delete focusableObjects[_local2]; }; }; } public function set showFocusIndicator(_arg1:Boolean):void{ _showFocusIndicator = _arg1; } public function get form():DisplayObjectContainer{ return (_form); } private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{ return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2)); } public function get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } public function activate():void{ if (activated){ return; }; form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true); form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true); form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true); form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = true; if (lastFocus){ setFocus(lastFocus); }; } public function deactivate():void{ form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler); form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.removeEventListener(Event.ACTIVATE, activateHandler); form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler); form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = false; } } }//package fl.managers
Section 30
//IFocusManager (fl.managers.IFocusManager) package fl.managers { import flash.display.*; import fl.controls.*; public interface IFocusManager { function getFocus():InteractiveObject; function deactivate():void; function set defaultButton(_arg1:Button):void; function set showFocusIndicator(_arg1:Boolean):void; function get defaultButtonEnabled():Boolean; function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject; function get nextTabIndex():int; function get defaultButton():Button; function get showFocusIndicator():Boolean; function hideFocus():void; function activate():void; function showFocus():void; function set defaultButtonEnabled(_arg1:Boolean):void; function setFocus(_arg1:InteractiveObject):void; function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject; } }//package fl.managers
Section 31
//IFocusManagerComponent (fl.managers.IFocusManagerComponent) package fl.managers { public interface IFocusManagerComponent { function set focusEnabled(_arg1:Boolean):void; function drawFocus(_arg1:Boolean):void; function setFocus():void; function get focusEnabled():Boolean; function get tabEnabled():Boolean; function get tabIndex():int; function get mouseFocusEnabled():Boolean; } }//package fl.managers
Section 32
//IFocusManagerGroup (fl.managers.IFocusManagerGroup) package fl.managers { public interface IFocusManagerGroup { function get groupName():String; function get selected():Boolean; function set groupName(_arg1:String):void; function set selected(_arg1:Boolean):void; } }//package fl.managers
Section 33
//StyleManager (fl.managers.StyleManager) package fl.managers { import fl.core.*; import flash.text.*; import flash.utils.*; public class StyleManager { private var classToInstancesDict:Dictionary; private var globalStyles:Object; private var styleToClassesHash:Object; private var classToStylesDict:Dictionary; private var classToDefaultStylesDict:Dictionary; private static var _instance:StyleManager; public function StyleManager(){ styleToClassesHash = {}; classToInstancesDict = new Dictionary(true); classToStylesDict = new Dictionary(true); classToDefaultStylesDict = new Dictionary(true); globalStyles = UIComponent.getStyleDefinition(); } public static function clearComponentStyle(_arg1:Object, _arg2:String):void{ var _local3:Class = getClassDef(_arg1); var _local4:Object = getInstance().classToStylesDict[_local3]; if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){ delete _local4[_arg2]; invalidateComponentStyle(_local3, _arg2); }; } private static function getClassDef(_arg1:Object):Class{ var component = _arg1; if ((component is Class)){ return ((component as Class)); }; try { return ((getDefinitionByName(getQualifiedClassName(component)) as Class)); } catch(e:Error) { if ((component is UIComponent)){ try { return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class)); } catch(e:Error) { }; }; }; return (null); } public static function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Class = getClassDef(_arg1); var _local5:Object = getInstance().classToStylesDict[_local4]; if (_local5 == null){ _local5 = (getInstance().classToStylesDict[_local4] = {}); }; if (_local5 == _arg3){ return; }; _local5[_arg2] = _arg3; invalidateComponentStyle(_local4, _arg2); } private static function setSharedStyles(_arg1:UIComponent):void{ var _local5:String; var _local2:StyleManager = getInstance(); var _local3:Class = getClassDef(_arg1); var _local4:Object = _local2.classToDefaultStylesDict[_local3]; for (_local5 in _local4) { _arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5)); }; } public static function getComponentStyle(_arg1:Object, _arg2:String):Object{ var _local3:Class = getClassDef(_arg1); var _local4:Object = getInstance().classToStylesDict[_local3]; return (((_local4)==null) ? null : _local4[_arg2]); } private static function getInstance(){ if (_instance == null){ _instance = new (StyleManager); }; return (_instance); } private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{ var _local4:Object; var _local5:UIComponent; var _local3:Dictionary = getInstance().classToInstancesDict[_arg1]; if (_local3 == null){ return; }; for (_local4 in _local3) { _local5 = (_local4 as UIComponent); if (_local5 == null){ } else { _local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2)); }; }; } private static function invalidateStyle(_arg1:String):void{ var _local3:Object; var _local2:Dictionary = getInstance().styleToClassesHash[_arg1]; if (_local2 == null){ return; }; for (_local3 in _local2) { invalidateComponentStyle(Class(_local3), _arg1); }; } public static function registerInstance(_arg1:UIComponent):void{ var target:Class; var defaultStyles:Object; var styleToClasses:Object; var n:String; var instance = _arg1; var inst:StyleManager = getInstance(); var classDef:Class = getClassDef(instance); if (classDef == null){ return; }; if (inst.classToInstancesDict[classDef] == null){ inst.classToInstancesDict[classDef] = new Dictionary(true); target = classDef; while (defaultStyles == null) { if (target["getStyleDefinition"] != null){ defaultStyles = target["getStyleDefinition"](); break; }; try { target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class); } catch(err:Error) { try { target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class); } catch(e:Error) { defaultStyles = UIComponent.getStyleDefinition(); break; }; }; }; styleToClasses = inst.styleToClassesHash; for (n in defaultStyles) { if (styleToClasses[n] == null){ styleToClasses[n] = new Dictionary(true); }; styleToClasses[n][classDef] = true; }; inst.classToDefaultStylesDict[classDef] = defaultStyles; if (inst.classToStylesDict[classDef] == null){ inst.classToStylesDict[classDef] = {}; }; }; inst.classToInstancesDict[classDef][instance] = true; setSharedStyles(instance); } public static function getStyle(_arg1:String):Object{ return (getInstance().globalStyles[_arg1]); } private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{ var _local3:Class = getClassDef(_arg1); var _local4:StyleManager = getInstance(); var _local5:Object = _local4.classToStylesDict[_local3][_arg2]; if (_local5 != null){ return (_local5); }; _local5 = _local4.globalStyles[_arg2]; if (_local5 != null){ return (_local5); }; return (_local4.classToDefaultStylesDict[_local3][_arg2]); } public static function setStyle(_arg1:String, _arg2:Object):void{ var _local3:Object = getInstance().globalStyles; if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; _local3[_arg1] = _arg2; invalidateStyle(_arg1); } } }//package fl.managers
Section 34
//GameEvent (Game.GameEvent) package Game { import flash.events.*; public class GameEvent extends Event { public static const END_LEVEL:String = "GameEventEND_LEVEL"; public function GameEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("GameEvent", "type", "bubbles", "cancelable", "eventPhase")); } override public function clone():Event{ return (new GameEvent(type, bubbles, cancelable)); } } }//package Game
Section 35
//GameSection (Game.GameSection) package Game { import flash.events.*; import flash.display.*; import flash.geom.*; import Map.*; import Drawer.*; import Particles.*; import Menu.*; import Editor.*; public class GameSection extends EventDispatcher implements IGameSection { private var knight_:Knight; private var map_:Map; private var princessAnim_:PRINCESS_ANIM; private var levelEnded_:Boolean;// = false private var levelSrc_:Map; private var report_:GAME_REPORT; private var nextSection_:IGameSection; private var holder_:Sprite; private var endReason_:int;// = -1 private var knightDrawer_:KnightDrawer; private var damage_:int;// = 0 private var particles_:ParticleController; private var iface_:EDITOR_INTERFACE; private var hideButtons_:Boolean; private var playerDrawer_:MapDrawer; private var background_:BACKGROUND; private var gate_:MovieClip; private var ranThrough_:Boolean;// = false private var fixedDrawer_:MapDrawer; private var playerSrc_:Map; public function GameSection(_arg1:Map, _arg2:Map, _arg3:MapDrawer, _arg4:MapDrawer, _arg5:EDITOR_INTERFACE, _arg6:int, _arg7:Boolean=false, _arg8:int=0){ var _local12:DisplayObject; var _local13:MovieClip; holder_ = new Sprite(); background_ = new BACKGROUND(); particles_ = new ParticleController(); report_ = new GAME_REPORT(); super(); levelSrc_ = _arg1; playerSrc_ = _arg2; fixedDrawer_ = _arg3; playerDrawer_ = _arg4; iface_ = _arg5; background_.gotoAndStop(_arg6); var _local9:TUTORIALS = new TUTORIALS(); background_.addChild(_local9); _local9.gotoAndPlay(("t" + _arg8.toString())); var _local10:Sprite = new Sprite(); _local10.mouseChildren = false; var _local11:Array = fixedDrawer_.bridges; for each (_local12 in _local11) { _local10.addChild(_local12); }; iface_.drawerLayer.addChild(_local10); map_ = _arg1.clone(); map_.combineWith(playerSrc_); map_.setFixed(); map_.addEventListener(MapEvent.CHANGED, mapChanged, false, 0, true); nextSection_ = this; iface_.playerPanel.edit.addEventListener(MouseEvent.MOUSE_DOWN, backToEditor, false, 0, true); knight_ = new Knight((MapDrawer.GridToReal(1) + 16), (MapDrawer.GridToReal(8) + 16), new Point(1, 0)); knightDrawer_ = new KnightDrawer(knight_); holder_.addChild(background_); holder_.addChild(iface_); _local13 = new GATE_ANIM(); _local13.x = MapDrawer.GridToReal(1); _local13.y = MapDrawer.GridToReal(8); holder_.addChild(_local13); _local13.gotoAndPlay(2); gate_ = _local13; holder_.addChild(knightDrawer_); princessAnim_ = (MapDrawer.PositionAt(holder_.addChild(new PRINCESS_ANIM()), 19, 8) as PRINCESS_ANIM); if (iface_.mainMenuButton){ iface_.mainMenuButton.addEventListener(MouseEvent.CLICK, mainMenu, false, 0, true); }; if (_arg7){ iface_.addChild(new COVER_UP()); }; hideButtons_ = _arg7; var _local14:Sprite = new SPARKLE_MASK(); holder_.addChild(_local14); knightDrawer_.mask = _local14; var _local15:Sprite = new SPARKLE_MASK(); holder_.addChild(_local15); particles_.mask = _local15; holder_.addChild(particles_); report_.mouseEnabled = (report_.mouseChildren = false); holder_.addChild(report_); } public function get levelSrc():Map{ return (levelSrc_); } public function addDeathParticles(_arg1:int, _arg2:int):void{ var _local4:MovieClip; var _local5:Particle; var _local3:int; while (_local3 < 50) { _local4 = new (((Math.random() > 0.5)) ? BLOOD : BONE); _local4.x = _arg1; _local4.y = _arg2; _local5 = new TimedClipParticle(_local4, 5); particles_.add(new FireworkParticle(_local5)); _local3++; }; } public function get ranThrough():Boolean{ return (ranThrough_); } private function mapChanged(_arg1:MapEvent):void{ fixedDrawer_.plot(_arg1.x, _arg1.y, map_.getSquare(_arg1.x, _arg1.y)); playerDrawer_.plot(_arg1.x, _arg1.y, map_.getSquare(_arg1.x, _arg1.y)); } private function mainMenu(_arg1:Event):void{ if (!hideButtons_){ nextSection_ = new FadeSection(this, new MenuSection()); } else { holder_.dispatchEvent(new Event("mainMenu", true, false)); }; } public function get playerSrc():Map{ return (playerSrc_); } public function draw():void{ knightDrawer_.draw(); var _local1:String = ((("Distance: " + String(knight_.distance)) + " feet\nDamage: ") + String(damage_)); report_.report.text = _local1; } public function update():IGameSection{ var _local7:MovieClip; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; var _local13:Array; var _local14:Array; var _local15:int; var _local16:MovieClip; var _local17:Particle; var _local1:Number = (1 / 50); var _local2 = !(knight_.alive); particles_.update(_local1); knight_.update(_local1); if (((gate_) && ((gate_.currentFrame == 18)))){ gate_ = null; Main.audio.playFX("Gateclose"); trace("OK"); }; var _local3:int = MapDrawer.RealToGrid(knight_.x); var _local4:int = MapDrawer.RealToGrid(knight_.y); var _local5:int = MapDrawer.RealToGrid((knight_.x - (16 * knight_.horDir))); var _local6:int = MapDrawer.RealToGrid((knight_.y - (16 * knight_.verDir))); if (knight_.state == Knight.STATE_SAVING){ if ((((1 == _local3)) && (knight_.alive))){ _local7 = new STAR(); _local7.x = knight_.x; _local7.y = knight_.y; knight_.kill(); particles_.add(new MovieClipParticle(_local7)); Main.audio.playFX("KnightEscape"); }; } else { _local8 = map_.getSquare((_local5 + 1), _local6); _local9 = map_.getSquare((_local5 - 1), _local6); _local10 = map_.getSquare(_local5, (_local6 + 1)); _local11 = map_.getSquare(_local5, (_local6 - 1)); if (TileTypes.IsLauncherUp(_local10)){ knight_.up(); knight_.x = (MapDrawer.GridToReal(_local5) + 16); map_.disableLauncher(_local5, (_local6 + 1)); addClouds(_local3, _local4); }; if (TileTypes.IsLauncherDown(_local11)){ knight_.down(); knight_.x = (MapDrawer.GridToReal(_local5) + 16); map_.disableLauncher(_local5, (_local6 - 1)); addClouds(_local3, _local4); }; if (TileTypes.IsLauncherLeft(_local8)){ knight_.left(); knight_.y = (MapDrawer.GridToReal(_local6) + 16); map_.disableLauncher((_local5 + 1), _local6); addClouds(_local3, _local4); }; if (TileTypes.IsLauncherRight(_local9)){ knight_.right(); knight_.y = (MapDrawer.GridToReal(_local6) + 16); map_.disableLauncher((_local5 - 1), _local6); addClouds(_local3, _local4); }; _local12 = map_.getSquare(_local3, _local4); if ((((((((_local3 > map_.width)) || ((_local3 < 0)))) || ((_local4 > map_.height)))) || ((_local4 < 0)))){ if (knight_.alive){ damage_ = (damage_ + 100); }; knight_.kill(); endReason = Level.GOAL_KILL_KNIGHT; }; if (TileTypes.IsSolid(_local12)){ if (knight_.alive){ damage_ = (damage_ + 100); }; knight_.kill(); endReason = Level.GOAL_KILL_KNIGHT; if (TileTypes.INVISIBLE_GREEN == _local12){ map_.setSquare(_local3, _local4, TileTypes.BLOCK); }; }; if ((((TileTypes.MONSTER == _local12)) || ((TileTypes.MONSTER_SHIFTED == _local12)))){ if (knight_.alive){ damage_ = (damage_ + 100); }; knight_.kill(); endReason = Level.GOAL_FEED_MONSTER; }; if (TileTypes.IsDestroyable(_local12)){ map_.setSquare(_local3, _local4, TileTypes.EMPTY); explodeSquare(_local3, _local4); damage_ = (damage_ + 25); ranThrough_ = true; }; if (TileTypes.BUTTON_GREEN == _local12){ _local13 = map_.replaceAll(TileTypes.INVISIBLE_GREEN, TileTypes.EMPTY); map_.replaceAll(TileTypes.BUTTON_GREEN, TileTypes.BUTTON_GREEN_DISABLED); for each (_local14 in _local13) { explodeSquare(_local14[0], _local14[1]); }; }; if (TileTypes.BUTTON_RED == _local12){ map_.replaceAll(TileTypes.INVISIBLE_RED, TileTypes.BLOCK); map_.replaceAll(TileTypes.BUTTON_RED, TileTypes.BUTTON_RED_DISABLED); }; if ((((((_local3 == 19)) && ((_local4 == 8)))) && ((knight_.state == Knight.STATE_RUNNING)))){ princessAnim_.gotoAndPlay("saved"); knight_.save(); endReason = Level.GOAL_SAVE_PRINCESS; }; }; if (((!(levelEnded_)) && (((!(knight_.alive)) || ((knight_.state == Knight.STATE_SAVING)))))){ dispatchEvent(new GameEvent(GameEvent.END_LEVEL)); levelEnded_ = true; }; if (((((!(_local2)) && (!(knight_.alive)))) && (!((endReason == Level.GOAL_SAVE_PRINCESS))))){ _local15 = 0; while (_local15 < 50) { _local16 = new (((Math.random() > 0.5)) ? BLOOD : BONE); _local16.x = knight_.x; _local16.y = knight_.y; _local17 = new TimedClipParticle(_local16, 5); particles_.add(new FireworkParticle(_local17)); _local15++; }; Main.audio.playFX("Explode"); }; return (nextSection_); } public function hidePrincess():void{ if (princessAnim_){ princessAnim_.visible = false; }; } private function backToEditor(_arg1:Event):void{ nextSection_ = new EditSection(playerSrc_, null, levelSrc_, null, background_.currentFrame); } private function explodeSquare(_arg1:int, _arg2:int):void{ Main.audio.playFX("LauncherExplode"); var _local3:MovieClip = new EXPLODE(); _local3.x = (MapDrawer.GridToReal(_arg1) + 16); _local3.y = (MapDrawer.GridToReal(_arg2) + 16); particles_.add(new MovieClipParticle(_local3)); } private function addClouds(_arg1:int, _arg2:int):void{ var _local4:MovieClip; var _local5:Number; var _local3:int; while (_local3 < 4) { _local4 = new CLOUD_PARTICLE(); _local5 = ((Math.random() * 2) * Math.PI); _local4.x = Math.round(((MapDrawer.GridToReal(_arg1) + 16) + (8 * Math.cos(_local5)))); _local4.y = Math.round(((MapDrawer.GridToReal(_arg2) + 16) + (8 * Math.sin(_local5)))); _local4.scaleX = ((Math.random() > 0.5)) ? 1 : -1; _local4.scaleY = ((Math.random() > 0.5)) ? 1 : -1; particles_.add(new MovieClipParticle(_local4)); _local3++; }; Main.audio.playFX("Launch"); } public function get graphic():DisplayObject{ return (holder_); } public function set endReason(_arg1:int):void{ if (!levelEnded_){ endReason_ = _arg1; }; } public function get endReason():int{ return (endReason_); } } }//package Game
Section 36
//Knight (Game.Knight) package Game { import flash.geom.*; public class Knight { private var alive_:Boolean;// = true private var distance_:Number;// = 0 private var pos_:Point; private var dir_:Point; private var state_:int;// = 0 public static const STATE_RUNNING:int = 0; public static const STATE_SAVING:int = 2; private static const STATE_SPEEDS:Array = []; public static const STATE_FLYING:int = 1; public function Knight(_arg1:Number, _arg2:Number, _arg3:Point){ pos_ = new Point(_arg1, _arg2); dir_ = _arg3.clone(); } public function get horDir():int{ return (Math.round(dir_.x)); } public function left(_arg1:int=1):void{ dir_.x = -1; dir_.y = 0; state_ = _arg1; } public function update(_arg1:Number):void{ var _local3:Point; var _local4:Number; var _local5:Number; var _local2:Number = STATE_SPEEDS[state_]; if (alive_){ _local3 = dir_.clone(); _local3.normalize(_local2); _local4 = (_local3.x * _arg1); _local5 = (_local3.y * _arg1); pos_.x = (pos_.x + _local4); pos_.y = (pos_.y + _local5); distance_ = (distance_ + (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))) / (1106 / 136))); }; } public function get alive():Boolean{ return (alive_); } public function get state():int{ return (state_); } public function up(_arg1:int=1):void{ dir_.x = 0; dir_.y = -1; state_ = _arg1; } public function right(_arg1:int=1):void{ dir_.x = 1; dir_.y = 0; state_ = _arg1; } public function kill():void{ alive_ = false; } public function down(_arg1:int=1):void{ dir_.x = 0; dir_.y = 1; state_ = _arg1; } public function get verDir():int{ return (Math.round(dir_.y)); } public function set x(_arg1:int):void{ pos_.x = _arg1; } public function set y(_arg1:int):void{ pos_.y = _arg1; } public function get distance():int{ return (Math.round(distance_)); } public function get x():int{ return (Math.round(pos_.x)); } public function get y():int{ return (Math.round(pos_.y)); } public function save():void{ state_ = STATE_SAVING; dir_.x = -1; dir_.y = 0; } STATE_SPEEDS[STATE_RUNNING] = 100; STATE_SPEEDS[STATE_FLYING] = 300; STATE_SPEEDS[STATE_SAVING] = 100; } }//package Game
Section 37
//LevelSelectSection (LevelSelect.LevelSelectSection) package LevelSelect { import flash.events.*; import flash.display.*; import Menu.*; import Puzzle.*; import flash.ui.*; public class LevelSelectSection implements IGameSection { private var nextSection_:IGameSection; private var holder_:Sprite; private var iface_:LEVEL_SELECT; private var buttons_:Array; public function LevelSelectSection(){ var _local3:String; var _local4:MEDAL; var _local5:LOCKED; holder_ = new Sprite(); iface_ = new LEVEL_SELECT(); buttons_ = []; super(); nextSection_ = this; var _local1:int; while (_local1 < 24) { _local3 = ("l" + int((_local1 + 1)).toString()); buttons_[_local1] = iface_[_local3]; if (State.LevelComplete(_local1)){ _local4 = new MEDAL(); new MEDAL().mouseEnabled = (_local4.mouseChildren = false); _local4.x = buttons_[_local1].x; _local4.y = buttons_[_local1].y; iface_.addChild(_local4); }; _local1++; }; var _local2:Boolean; _local1 = 0; while (_local1 < 23) { if (!State.LevelComplete(_local1)){ _local2 = true; break; }; _local1++; }; if (_local2){ _local5 = new LOCKED(); _local5.x = buttons_[23].x; _local5.y = buttons_[23].y; iface_.addChild(_local5); }; holder_.addChild(iface_); holder_.addEventListener(MouseEvent.CLICK, clicked, false, 0, true); } public function draw():void{ } private function clicked(_arg1:MouseEvent):void{ var _local2:int; while (_local2 < buttons_.length) { if (_arg1.target == buttons_[_local2]){ Main.audio.playTheme("Marsh"); nextSection_ = new FadeSection(this, new PuzzleSection(MenuSection.LEVELS, _local2)); }; _local2++; }; } public function get graphic():DisplayObject{ return (holder_); } public function update():IGameSection{ if (Input.IsPressed(Keyboard.ESCAPE)){ nextSection_ = new MenuSection(false); }; return (nextSection_); } } }//package LevelSelect
Section 38
//Map (Map.Map) package Map { import flash.events.*; import flash.geom.*; public class Map extends EventDispatcher { private var width_:int; private var data_:Array; private var height_:int; public static const FIXED:Array = [new Point(1, 9), new Point(19, 9), new Point(1, 8), new Point(19, 8)]; public static const DEFAULT_HEIGHT:int = 13; public static const DEFAULT_WIDTH:int = 21; public function Map(_arg1:int=21, _arg2:int=13){ width_ = _arg1; height_ = _arg2; data_ = new Array((width_ * height_)); var _local3:int; while (_local3 < (width_ * height_)) { data_[_local3] = TileTypes.EMPTY; _local3++; }; } private function canReplace(_arg1:int, _arg2:int, _arg3:Boolean):Boolean{ return (((_arg3) || (((!(isInFixed(new Point(_arg1, _arg2)))) && (checkBounds(_arg1, _arg2)))))); } public function combineWith(_arg1:Map):void{ var _local3:int; var _local4:int; if (((!((_arg1.width == width))) || (!((_arg1.height == height))))){ throw (new Error("Maps must be of the same dimension")); }; var _local2:int; while (_local2 < height_) { _local3 = 0; while (_local3 < width_) { _local4 = _arg1.getSquare(_local3, _local2); if (TileTypes.EMPTY != _local4){ setSquare(_local3, _local2, _local4); }; _local3++; }; _local2++; }; } public function get width():int{ return (width_); } public function get height():int{ return (height_); } public function disableLauncher(_arg1:int, _arg2:int):void{ var _local3:int = getSquare(_arg1, _arg2); if (TileTypes.PERMANENT_UP == _local3){ setSquare(_arg1, _arg2, TileTypes.PERMANENT_UP_DISABLED); }; if (TileTypes.PERMANENT_DOWN == _local3){ setSquare(_arg1, _arg2, TileTypes.PERMANENT_DOWN_DISABLED); }; if (TileTypes.PERMANENT_LEFT == _local3){ setSquare(_arg1, _arg2, TileTypes.PERMANENT_LEFT_DISABLED); }; if (TileTypes.PERMANENT_RIGHT == _local3){ setSquare(_arg1, _arg2, TileTypes.PERMANENT_RIGHT_DISABLED); }; if (TileTypes.UP == _local3){ setSquare(_arg1, _arg2, TileTypes.UP_DISABLED); }; if (TileTypes.DOWN == _local3){ setSquare(_arg1, _arg2, TileTypes.DOWN_DISABLED); }; if (TileTypes.LEFT == _local3){ setSquare(_arg1, _arg2, TileTypes.LEFT_DISABLED); }; if (TileTypes.RIGHT == _local3){ setSquare(_arg1, _arg2, TileTypes.RIGHT_DISABLED); }; } public function countType(_arg1:int):int{ var _local3:int; var _local2:int; for each (_local3 in data_) { if (_local3 == _arg1){ _local2++; }; }; return (_local2); } private function isInFixed(_arg1:Point):Boolean{ var _local2:Point; for each (_local2 in FIXED) { if ((((Math.abs((_local2.x - _arg1.x)) < 0.01)) && ((Math.abs((_local2.y - _arg1.y)) < 0.01)))){ return (true); }; }; return (false); } public function clear(_arg1:Boolean=false):void{ var _local3:int; var _local2:int; while (_local2 < height_) { _local3 = 0; while (_local3 < width_) { setSquare(_local3, _local2, TileTypes.EMPTY, _arg1); _local3++; }; _local2++; }; } public function setFixed():void{ setSquare(Math.round(FIXED[0].x), Math.round(FIXED[0].y), TileTypes.BLOCK_FIXED, true); setSquare(Math.round(FIXED[1].x), Math.round(FIXED[1].y), TileTypes.BLOCK_FIXED, true); } public function replaceAll(_arg1:int, _arg2:int):Array{ var _local5:int; var _local3:Array = []; var _local4:int; while (_local4 < height_) { _local5 = 0; while (_local5 < width_) { if (_arg1 == getSquare(_local5, _local4)){ _local3.push([_local5, _local4]); setSquare(_local5, _local4, _arg2); }; _local5++; }; _local4++; }; return (_local3); } public function clone():Map{ var _local1:Map = new Map(width_, height_); _local1.data_ = []; var _local2:uint; while (_local2 < data_.length) { _local1.data_.push(data_[_local2]); _local2++; }; return (_local1); } public function getSquare(_arg1:int, _arg2:int):int{ if (!checkBounds(_arg1, _arg2)){ return (-1); }; return (data_[(_arg1 + (_arg2 * width_))]); } public function checkBounds(_arg1:int, _arg2:int):Boolean{ return ((((((((_arg1 >= 0)) && ((_arg1 < width_)))) && ((_arg2 >= 0)))) && ((_arg2 < height_)))); } public function setSquare(_arg1:int, _arg2:int, _arg3:int, _arg4:Boolean=false):void{ var _local5:int; if (canReplace(_arg1, _arg2, _arg4)){ _local5 = data_[(_arg1 + (_arg2 * width_))]; data_[(_arg1 + (_arg2 * width_))] = _arg3; if (_local5 != _arg3){ dispatchEvent(new MapEvent(_arg1, _arg2, MapEvent.CHANGED, false, false, _local5)); }; }; } } }//package Map
Section 39
//MapEvent (Map.MapEvent) package Map { import flash.events.*; public class MapEvent extends Event { public var oldSquare:int; public var x:int; public var y:int; public static const CHANGED:String = "MapEventCHANGED"; public static const CLICKED:String = "MapEventCLICKED"; public function MapEvent(_arg1:int, _arg2:int, _arg3:String, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:int=-1){ super(_arg3, _arg4, _arg5); this.x = _arg1; this.y = _arg2; this.oldSquare = _arg6; } override public function clone():Event{ return (new MapEvent(x, y, type, bubbles, cancelable)); } } }//package Map
Section 40
//TileTypes (Map.TileTypes) package Map { public final class TileTypes { public static const BLOCK_FIXED:int = 25; public static const MONSTER_SHIFTED:int = 26; public static const BUTTON_GREEN_DISABLED:int = 23; public static const LEFT:int = 7; public static const PERMANENT_DOWN_DISABLED:int = 14; public static const BRIDGE:int = 17; public static const PERMANENT_RIGHT:int = 4; public static const PERMANENT_LEFT:int = 3; public static const UP:int = 5; public static const BUTTON_GREEN:int = 21; public static const UP_DISABLED:int = 9; public static const DOWN:int = 6; public static const EMPTY:int = -1; public static const INVISIBLE_GREEN:int = 19; public static const PERMANENT_DOWN:int = 2; public static const LEFT_DISABLED:int = 11; public static const PERMANENT_RIGHT_DISABLED:int = 16; public static const MONSTER:int = 18; public static const INVISIBLE_RED:int = 20; public static const PERMANENT_LEFT_DISABLED:int = 15; public static const RIGHT_DISABLED:int = 12; public static const BUTTON_RED:int = 22; public static const PERMANENT_UP:int = 1; public static const BLOCK:int = 0; public static const PERMANENT_UP_DISABLED:int = 13; public static const BUTTON_RED_DISABLED:int = 24; public static const DOWN_DISABLED:int = 10; public static const RIGHT:int = 8; public static function IsDisabledLauncherDown(_arg1:int):Boolean{ return ((((PERMANENT_DOWN_DISABLED == _arg1)) || ((DOWN_DISABLED == _arg1)))); } public static function IsSolid(_arg1:int):Boolean{ if (BLOCK == _arg1){ return (true); }; if (BLOCK_FIXED == _arg1){ return (true); }; if (INVISIBLE_GREEN == _arg1){ return (true); }; return (false); } public static function IsDisabledLauncherRight(_arg1:int):Boolean{ return ((((PERMANENT_RIGHT_DISABLED == _arg1)) || ((RIGHT_DISABLED == _arg1)))); } public static function IsDestroyable(_arg1:int):Boolean{ if (IsLauncherLeft(_arg1)){ return (true); }; if (IsLauncherRight(_arg1)){ return (true); }; if (IsLauncherUp(_arg1)){ return (true); }; if (IsLauncherDown(_arg1)){ return (true); }; if (IsDisabledLauncherLeft(_arg1)){ return (true); }; if (IsDisabledLauncherRight(_arg1)){ return (true); }; if (IsDisabledLauncherUp(_arg1)){ return (true); }; if (IsDisabledLauncherDown(_arg1)){ return (true); }; return (false); } public static function IsLauncherRight(_arg1:int):Boolean{ return ((((PERMANENT_RIGHT == _arg1)) || ((RIGHT == _arg1)))); } public static function IsLauncherLeft(_arg1:int):Boolean{ return ((((PERMANENT_LEFT == _arg1)) || ((LEFT == _arg1)))); } public static function IsLauncherUp(_arg1:int):Boolean{ return ((((PERMANENT_UP == _arg1)) || ((UP == _arg1)))); } public static function IsLauncherDown(_arg1:int):Boolean{ return ((((PERMANENT_DOWN == _arg1)) || ((DOWN == _arg1)))); } public static function IsDisabledLauncherLeft(_arg1:int):Boolean{ return ((((PERMANENT_LEFT_DISABLED == _arg1)) || ((LEFT_DISABLED == _arg1)))); } public static function IsDisabledLauncherUp(_arg1:int):Boolean{ return ((((PERMANENT_UP_DISABLED == _arg1)) || ((UP_DISABLED == _arg1)))); } } }//package Map
Section 41
//MenuSection (Menu.MenuSection) package Menu { import flash.events.*; import flash.display.*; import flash.media.*; import flash.net.*; import Editor.*; import LevelSelect.*; public class MenuSection implements IGameSection { private var nextSection_:IGameSection; private var holder_:Sprite; private var soundButton_:MovieClip; public static const LEVELS:Array = ["6bfE5517ea969c0fc4DcFF2F0Fa2525392614376eNoTYghOLEtVKMlIVSgoysxLTi0uVuRi8MpPVXDKyU9PLxZlYGDgZcAEjEiY4f/QBhieo9hEAPhMCYU=", "40f75Dd767B6B1B66833f1dA88809477486D3ED0eNqTYfBILEtVKMlIVfDOy0zPKFEIKs1TCMkoyi9Nz1DkYvDKT1VwyslPTy8WZWBg4AViRgZUwAQVYwXR/4ciEIKzGNABxWYDACthC/I=", "3e33286E22535cA3800e5aDaae45b94D6adF44C6eNrTZvBJLM1LzlAoyUhV8M7LTM8oUVRwyc9TL1EoTixLBQsXFGXmJacWFytyMXjlpyo45eSnpxeLMjAw8AIxIwMmAIkxgRj/hzaA+UcQxqDYRADegRIu", "141Ef24A15dcfDeD68D1A46940A850BcF34bCFb5eNoTYHBLTU1RKMlIVfDNzysuSS3iYvDKT1VwyslPTy8WZWBg4AViRihmgNJMSHyG/0MKwJ0rBKEkgT4QZEAGkpRaAQDIvgUk", "310474Ebc677eBe4175afD61f1B7afA696F63cfEeNqTYnBLTU1RKMlIVcjNzysuSS3S09NTSExPzMxT5GLwyk9VcMrJT08vFmVgYOAFYkY0zASlweA/FQEDsYJY7WUQIqySAUrCBCWB8oIMyECSUk8AANNP/RY=", "CBB4a65627CB4fe561c9F908a779792f5cA90505eNoTZwguScwsKk+sVCjJVyjJSCxRKMhJTE7V42Lwyk9VcMrJT08vFmVgYOAFYnYGBACxmYCYESbwHyvAlBWCC2JTCWahCUIZKIIokkgKUI1GEUOxEMknYL4kA4MgAwqQ/E8hAAAGTsIL", "8D912301eAfbA1fF841CdDdA6393047657a0Ae13eNoTZnAuyi8uLspPTClW0FUISCwqUfDkYvDKT1VwyslPTy8WZWBg4AViJiTMiESDwX+sACYJIyGC/1FVM8AEsarEIoiqGaJdiAEB4CrRXMWA5CxUMyUZGAQZUIDkfwoBANQwwBU=", "Ba027243A274641bd60914Add544E0a9cCA348D7eNoTYXAuyi8uLspPTClW0FUISCwqUfD05GLwyk9VcMrJT08vFmVgYOAFYiYoZoRiGBsM/mMFDCDIAMZgEioIASxQmhlJJQOaSqzaWVCMAdMMQthUojkLzsNQKcnAIMiAAiT/UwgAYKvBaA==", "a4F56dB4E6f5137F904b1E8Aad10313223278121eNrjZnDLL0pOTVHwSMxL4WLwyk9VcMrJT08vFmVgYOAFYmYgZkTCTFAxMPiPE4ClhVAUgZhgHpjGoxcGmBgwTcW0CGoekhDLfyawOKZyBqgzIECSgUGQAQVI/qcQAAAFIN5T", "1718332c1f852ce18f237B88f94D092159a32fB9eNoTYgjNS0ktSi/KL81LUQgpzctLzeFi8MpPVXDKyU9PLxZlYGDgBWJGKGaA0kxAzAzlM/wnHzDAKCRDGIQYMASBlkDsIVMQwcAQlGRkEGRAAoIMksg6UFzL8p8RCeD0FQAsG9us", "BA8091b49880F67fcc8b0e2f7d4c9439Db113DB2eNoTZvDMK8sszkzKSVVwyslPzk5MTy3mYvDKB3PT04tFGRgYeIGYBYiZgZgRiNmAmAnKB4P/uIAwjBQGU8IwjjBUBkQJISsXRtKGrEoYoRvJRBSLUNT+/w9XLoyhQRjOBROSEF8hAcn/FAIAyQzmVw==", "BDcFE013d9D5560adB10Eb869Ca46BaE70662417eNoTZQgpSk0sLi1KVcjMUyjJSFXwyC8tTuVi8MpPVXDKyU9PLxZlYGDgBWImIGYGYkYoDeODwX+iABMhBXDDhBFiLFApVHUgFcL/kSxG6ECIMQgLg3ggVQxwYaCgMERQCCYoKQi2VxBGCDJIIgwTBkFUDwoT9ioAnNbgZA==", "B2c1Ae6505e2f2f0f0371A7E6Dd88b891a0Dfe72eNqTZHDJz1MvUQhJzclR8E1VCM9ILUpVCMlXcM/nYvDKT1VwyslPTy8WZWBg4AViRiBmYoAAZiibGcpn+I8fCGMTw6qL4T9IlFmIEVkv83+wKBNe8/7/ZwErYxBkgMkLgxHIeRBjcQlKAv0mCEZADGZIojgJqzv//2dEFWKEqQSJAwAAteKQ", "d7c08Ef28D25b91582Ae8bc1f04a5f721fB714fFeNpjZQhPzMkp5mLwyk9VcMrJT08vFmVgYOAFYkYgZgZiJiibCcoHg/+4AAMECf8XBpMwIMwAk0JWiawFSRm6YgYkhGkXmlH/YSYgKRMGISGQeyDikoIMDBAExGCGJC7/CP8nDgAAeH3ahA==", "62a84c1221c3D53a84aF6A078A99E4769527784aeNrjZfBUz1XIz1PIrVQoT6zkYvDKT1VwyslPTy8WZWBg4AViZiQMAkxIbIb/WAETiGAQhvMhTOH/zECSGaEMxkSYIgxjskD5QMiCZDBIWlgYJA7RJAS1Q1gYySUMDIwMDMJg5wnDXYMVSILUCDLAgSCDJMweBphjGP4z/McHGFG5AAPf2P8=", "Df2A1eE42A4c8dAf63F9b77D4C6c0Aa2278c4238eNpjYwhJzS3ISeVi8MpPVXDKyU9PLxZlYGDgBWJmIGYCYkYgZoGyQWJg8B8nEAYRQlAaVRSdiSkIMlcYbIEwlIegoMoYIGoZEOIIJkgXgyBQtyADkj5hdMv+SwqiA0m4GpB3GTGcCfEyqp/+I4cDALtb00Y=", "F1D2AE8c316176902Bc13bf28d0D09eF3BDb9782eNrjZwjILFFIzEtRcM7Iz0xOLeZi8MpPVXDKyU9PLxZlYGDgZUAARiBmQsJg8B8rEIYxhJAEWRCywqiqGeFMZiS1wqhCcB4LshWMyBoR5gCZTGi2IMvB9EuCvCAIFRYEcSQhbAa4QiQfMkCFhFEEEQDMBwBaA+aS", "6bD91B818530D12Ae0D8D2cbe02c0247fCe45358eNptTzEOwjAMvDgMCImlFkO3vKUjCwtfQCkSaiRK3x8cO2kBccolyuVytjsMy/y6TzFcpnAdn2mJ4wHndAvDI8U4nwAchTuhg2EvpEpF/guQ21AEL0Zk2qA2r16sS/N+I1G3cnIm+9Khiq0DkAne7rTGOHxnsdC1194K2ihceuhrRTSLbwKboBOBLQIf0F6Q3zGCqeY=", "e18afdD86d5Ef7e3D42Ed8b46Ab386Dc05DA8bE3eNptTu0KAiEQHKMIgqBSF+6fzxJB0O9eIEiug+Cgote3/fCQg2Yd1NlxnR2uj5zOr3z7pNPwHe55g8uY0/E59v07Atgyl8wV0zHXzEWlovwHtLwceIV5y1BFQiE7SMdEePWRWRHmL3UkVWdUt3Z8c5qHB1D7SIRIZuVIB9m7vd2qHIDOshcN5VskgZuKppxSDU60HxS8yIw=", "a85Ba52aE14b0914C31c6FFBa451B45D157429A4eNp1jsEKwjAQRKfbm+DBxgR6y7d47F9YLUEQAk39/rExSRuEDrvLMGTfxmD4hMXe7Ti/nm6yi7eP2YdwwuAne3t754IGcF5bkNTklioDjwUpJr8CBVSM9VObwiTRYORhz5B9CuPQO10KM20obOfinskk0ijK4Rd74FIL6MnuqtjWVZjRbZWvN//IL4Tly6E=", "fc49265EbE837EFE3826715Ea8814b551cbF93E1eNp9T8sOgkAMHNGTxMPa7ibc+Ba58RcekIMkJKDfv7QLi7ua2EnTdDLTR4lmeM+vbnpM9+cZ7djVt2Hs+9kCuEgWksevesIW/n+Q5I+Isg4kYxisOkWkBcRrzQYomdpNALugwscsYCZdHkkHq7Tz3m4zKhOV4U4DVKk9aJiu6X6500jkr/Nh7xbJ48KF", "2f1DEe2baf336fd2BcAf4F850f4010E58f920FC2eNoTYghKTVFIzEtRcC9KTc1TCEgsyeBi8MpPVXDKyU9PLxZlYGDgBWIWIGZGwkxQMTD4jxWAxRngLKggGIMgmCkCBFBFUHkWICEsLATRBFbNCGIyiAjDVTLATQIKYpr5XxhqJ8x1UO0gUZH/YOq/iJgIWDuILckkCNHNIAhWL8gg+R9ijChYNTOKr4RRKBwAAGKHxR8=", "325272311c93815906B6b6f539c9849F3d8615a7eNp1j88KwjAMxj9UPIgearLAbnsVPXr2Fco8TArO949ZU+gqGhqS/vLnI0dcpmea38P9EV/xgFuKw3VK4zh3AE7mW/Md3Pbmm9Uf+s9yhZAjKhSDnFM0vYQ6VaIYxDdU2DhZygWKdvxDSFx90eP1eCvUBzsh1BfQtwewkGXngsh3eYXbToeqH7kQzYk=", "4A03D6Da2A4551F60a2E3016D78b3C4fed3b31A5eNoTYgh2DHNVCPFwVQgI8vRzdg0OVuRi8MpPVXDKyU9PLxZlYGDgBWImKGYEYmYom4UBCv7jAAxw+F+YBciXAouK/RcVBlIiQMggwoCuEggZIYJiDCB5MZAaBvwqgSaBjBURAyvAq5JBGAhhJkJVCiKpA/sQ7gExMGaAWAAEjCzI3mPE5e//ANbWvEc="]; public function MenuSection(_arg1:Boolean=true){ holder_ = new Sprite(); super(); nextSection_ = this; var _local2:TITLES = new TITLES(); holder_.addChild(_local2); _local2.puzzle.addEventListener(MouseEvent.CLICK, puzzleClick, false, 0, true); _local2.editor.addEventListener(MouseEvent.CLICK, editorClick, false, 0, true); _local2.loadCustom.addEventListener(MouseEvent.CLICK, loadCustomClick, false, 0, true); _local2.shenGames.addEventListener(MouseEvent.CLICK, shenClick, false, 0, true); _local2.marsh.addEventListener(MouseEvent.CLICK, marshClick, false, 0, true); _local2.armor.addEventListener(MouseEvent.CLICK, armorClick, false, 0, true); _local2.sound.buttonMode = (_local2.sound.useHandCursor = true); soundButton_ = _local2.sound; soundButton_.addEventListener(MouseEvent.CLICK, soundClick, false, 0, true); if (_arg1){ Main.audio.playTheme("Gameshow"); }; } public function draw():void{ var _local1:int = Math.round(SoundMixer.soundTransform.volume); soundButton_.gotoAndStop((2 - _local1)); } public function get graphic():DisplayObject{ return (holder_); } private function armorClick(_arg1:Event):void{ navigateToURL(new URLRequest("http://armorgames.com/"), "_blank"); } private function shenClick(_arg1:Event):void{ navigateToURL(new URLRequest("http://shengames.com/"), "_blank"); } public function update():IGameSection{ return (nextSection_); } private function puzzleClick(_arg1:Event):void{ nextSection_ = new LevelSelectSection(); } private function marshClick(_arg1:Event):void{ navigateToURL(new URLRequest("http://marshgames.com/"), "_blank"); } private function loadCustomClick(_arg1:Event):void{ nextSection_ = new LoadSection(this); } private function soundClick(_arg1:Event):void{ var _local2:int = Math.round(SoundMixer.soundTransform.volume); SoundMixer.soundTransform = new SoundTransform(((_local2 + 1) % 2)); } private function editorClick(_arg1:Event):void{ Main.audio.playTheme("Marsh"); nextSection_ = new FadeSection(this, new EditSection()); } } }//package Menu
Section 42
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.4.1.10084"; } }//package mx.core
Section 43
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 44
//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 45
//Base64Encoder (mx.utils.Base64Encoder) package mx.utils { import flash.utils.*; public class Base64Encoder { private var _line:uint; private var _count:uint; private var _buffers:Array; public var insertNewLines:Boolean;// = true private var _work:Array; private static const MAX_BUFFER_SIZE:uint = 0xFFFF; private static const ALPHABET_CHAR_CODES:Array = [65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47]; public static const CHARSET_UTF_8:String = "UTF-8"; private static const ESCAPE_CHAR_CODE:Number = 61; public static var newLine:int = 10; public function Base64Encoder(){ _work = [0, 0, 0]; super(); reset(); } public function flush():String{ if (_count > 0){ encodeBlock(); }; var _local1:String = drain(); reset(); return (_local1); } public function toString():String{ return (flush()); } public function reset():void{ _buffers = []; _buffers.push([]); _count = 0; _line = 0; _work[0] = 0; _work[1] = 0; _work[2] = 0; } public function encodeBytes(_arg1:ByteArray, _arg2:uint=0, _arg3:uint=0):void{ if (_arg3 == 0){ _arg3 = _arg1.length; }; var _local4:uint = _arg1.position; _arg1.position = _arg2; var _local5:uint = _arg2; while (_local5 < _arg3) { _work[_count] = _arg1[_local5]; _count++; if ((((_count == _work.length)) || ((((_arg2 + _arg3) - _local5) == 1)))){ encodeBlock(); _count = 0; _work[0] = 0; _work[1] = 0; _work[2] = 0; }; _local5++; }; _arg1.position = _local4; } public function encode(_arg1:String, _arg2:uint=0, _arg3:uint=0):void{ if (_arg3 == 0){ _arg3 = _arg1.length; }; var _local4:uint = _arg2; while (_local4 < (_arg2 + _arg3)) { _work[_count] = _arg1.charCodeAt(_local4); _count++; if ((((_count == _work.length)) || ((((_arg2 + _arg3) - _local4) == 1)))){ encodeBlock(); _count = 0; _work[0] = 0; _work[1] = 0; _work[2] = 0; }; _local4++; }; } private function encodeBlock():void{ var _local1:Array = (_buffers[(_buffers.length - 1)] as Array); if (_local1.length >= MAX_BUFFER_SIZE){ _local1 = []; _buffers.push(_local1); }; _local1.push(ALPHABET_CHAR_CODES[((_work[0] & 0xFF) >> 2)]); _local1.push(ALPHABET_CHAR_CODES[(((_work[0] & 3) << 4) | ((_work[1] & 240) >> 4))]); if (_count > 1){ _local1.push(ALPHABET_CHAR_CODES[(((_work[1] & 15) << 2) | ((_work[2] & 192) >> 6))]); } else { _local1.push(ESCAPE_CHAR_CODE); }; if (_count > 2){ _local1.push(ALPHABET_CHAR_CODES[(_work[2] & 63)]); } else { _local1.push(ESCAPE_CHAR_CODE); }; if (insertNewLines){ if ((_line = (_line + 4)) == 76){ _local1.push(newLine); _line = 0; }; }; } public function encodeUTFBytes(_arg1:String):void{ var _local2:ByteArray = new ByteArray(); _local2.writeUTFBytes(_arg1); _local2.position = 0; encodeBytes(_local2); } public function drain():String{ var _local3:Array; var _local1 = ""; var _local2:uint; while (_local2 < _buffers.length) { _local3 = (_buffers[_local2] as Array); _local1 = (_local1 + String.fromCharCode.apply(null, _local3)); _local2++; }; _buffers = []; _buffers.push([]); return (_local1); } } }//package mx.utils
Section 46
//FireworkParticle (Particles.FireworkParticle) package Particles { public class FireworkParticle extends Particle { private var y_:Number; private var x_:Number; private var inner_:Particle; private var gravity_:Number; private var ly_:Number; private var lx_:Number; public function FireworkParticle(_arg1:Particle, _arg2:Number=900){ inner_ = _arg1; addChild(inner_); gravity_ = _arg2; x_ = (lx_ = inner_.x); y_ = (ly_ = inner_.y); inner_.x = (inner_.y = 0); x = x_; y = y_; lx_ = (lx_ + (((0.01 * _arg2) * 2) * (Math.random() - 0.5))); ly_ = (ly_ + (((0.01 * _arg2) * 2) * (Math.random() - 0.5))); ly_ = (ly_ + (0.0004 * _arg2)); } override public function get dead():Boolean{ return (inner_.dead); } override public function update(_arg1:Number):void{ inner_.update(_arg1); var _local2:Number = ((2 * x_) - lx_); var _local3:Number = (((2 * y_) - ly_) + ((gravity_ * _arg1) * _arg1)); lx_ = x_; ly_ = y_; x_ = _local2; y_ = _local3; x = x_; y = y_; } } }//package Particles
Section 47
//MovieClipParticle (Particles.MovieClipParticle) package Particles { import flash.events.*; import flash.display.*; public class MovieClipParticle extends Particle { private var dead_:Boolean;// = false private var clip_:MovieClip; public function MovieClipParticle(_arg1:MovieClip){ this.x = _arg1.x; this.y = _arg1.y; _arg1.x = (_arg1.y = 0); _arg1.addEventListener(Event.ENTER_FRAME, enterFrame, false, 0, true); clip_ = _arg1; addChild(clip_); } override public function get dead():Boolean{ return (dead_); } private function enterFrame(_arg1:Event):void{ if (clip_.currentFrame == clip_.totalFrames){ clip_.removeEventListener(Event.ENTER_FRAME, enterFrame, false); removeChild(clip_); dead_ = true; }; } } }//package Particles
Section 48
//Particle (Particles.Particle) package Particles { import flash.display.*; public class Particle extends Sprite { public function update(_arg1:Number):void{ } public function get dead():Boolean{ return (true); } } }//package Particles
Section 49
//ParticleController (Particles.ParticleController) package Particles { import flash.display.*; public class ParticleController extends Sprite { private var particles_:Array; private var scale_:Number; public function ParticleController(_arg1:Number=1){ particles_ = []; scale_ = _arg1; } public function add(_arg1:Particle):void{ _arg1.x = (_arg1.x * scale_); _arg1.y = (_arg1.y * scale_); addChild(_arg1); particles_.push(_arg1); } public function update(_arg1:Number):void{ var _local2:int = (particles_.length - 1); while (_local2 >= 0) { if (particles_[_local2].dead){ removeChild(particles_[_local2]); particles_.splice(_local2, 1); } else { particles_[_local2].update(_arg1); }; _local2--; }; } } }//package Particles
Section 50
//TimedClipParticle (Particles.TimedClipParticle) package Particles { import flash.display.*; public class TimedClipParticle extends Particle { private var time_:Number; public function TimedClipParticle(_arg1:MovieClip, _arg2:Number){ this.x = _arg1.x; this.y = _arg1.y; time_ = _arg2; _arg1.x = (_arg1.y = 0); addChild(_arg1); } override public function update(_arg1:Number):void{ time_ = (time_ - _arg1); } override public function get dead():Boolean{ return ((time_ <= 0)); } } }//package Particles
Section 51
//KNIGHT_2 (preloader_fla.KNIGHT_2) package preloader_fla { import flash.display.*; public dynamic class KNIGHT_2 extends MovieClip { public function KNIGHT_2(){ addFrameScript(0, frame1); } function frame1(){ gotoAndPlay("running"); } } }//package preloader_fla
Section 52
//Symbol3_191 (PrincessAssets_fla.Symbol3_191) package PrincessAssets_fla { import flash.events.*; import flash.display.*; import flash.media.*; import flash.geom.*; import fl.controls.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.utils.*; import flash.ui.*; import flash.filters.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.xml.*; public dynamic class Symbol3_191 extends MovieClip { public var __id1_:Label; public function Symbol3_191(){ __setProp___id1__Symbol3_Layer1_0(); } function __setProp___id1__Symbol3_Layer1_0(){ try { __id1_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id1_.autoSize = "center"; __id1_.condenseWhite = false; __id1_.enabled = true; __id1_.htmlText = ""; __id1_.selectable = false; __id1_.text = "Invalid level!"; __id1_.visible = true; __id1_.wordWrap = false; try { __id1_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package PrincessAssets_fla
Section 53
//Firework (Puzzle.Firework) package Puzzle { import flash.display.*; import flash.geom.*; import flash.filters.*; public class Firework extends Sprite { private var _bmp:BitmapData; private var _fireworks:Array; private var _sinceLast:Number;// = 70 private var _blendMode:String; private var _burstCounter:Number;// = 1 private var _workBmp:BitmapData; private static const PARTICLE_GFX:BitmapData = new FIREWORK_PARTICLE(0, 0); public function Firework(){ _fireworks = new Array(500); _blendMode = BlendMode.ADD; super(); _workBmp = new BitmapData(640, 480, true, 0); _bmp = new BitmapData(640, 480, true, 0); addChild(new Bitmap(_bmp, PixelSnapping.ALWAYS, false)); var _local1:int; while (_local1 < _fireworks.length) { _fireworks[_local1] = new F(); _local1++; }; } public function burst(_arg1:Boolean):void{ var _local7:int; var _local2:Number = ((2 * Math.random()) * Math.PI); var _local3:Number = (320 + (200 * Math.cos(_local2))); var _local4:Number = (150 + (100 * Math.sin(_local2))); var _local5:int; var _local6:int; while (_local6 < 300) { _local7 = _local5; while (_local7 < _fireworks.length) { if (_fireworks[_local7].life <= 0){ _fireworks[_local7].setAlive(_local3, _local4); break; }; _local7++; }; _local5 = _local7; _local6++; }; Main.audio.playFX("Fireworks"); _blendMode = (_arg1) ? BlendMode.ADD : BlendMode.SUBTRACT; } public function draw():void{ var _local2:F; var _local3:Point; var _local4:int; var _local1:BitmapData = PARTICLE_GFX; if (_sinceLast < 0.3){ _workBmp.colorTransform(_bmp.rect, new ColorTransform(1, 1, 1, 0.5)); _local3 = new Point(); _local4 = 0; while (_local4 < _fireworks.length) { _local2 = _fireworks[_local4]; if (_local2.life <= 0){ } else { _local3.x = int((_local2.x - (0.5 * _local1.width))); _local3.y = int((_local2.y - (0.5 * _local1.height))); _workBmp.copyPixels(_local1, _local1.rect, _local3, null, null, true); }; _local4++; }; _bmp.lock(); _bmp.fillRect(_bmp.rect, 0); _bmp.draw(_workBmp, null, null, _blendMode); _bmp.unlock(); }; } public function update(_arg1:Number):void{ var _local3:F; var _local4:Number; var _local5:Number; var _local2:Number = (_arg1 * _arg1); _sinceLast = (_sinceLast + _arg1); var _local6:int = (_fireworks.length - 1); while (_local6 >= 0) { _local3 = _fireworks[_local6]; _local4 = ((1.98 * _local3.x) - (0.98 * _local3.lx)); _local5 = (((1.98 * _local3.y) - (0.98 * _local3.ly)) + (200 * _local2)); _local3.lx = _local3.x; _local3.ly = _local3.y; _local3.x = _local4; _local3.y = _local5; _local3.life = (_local3.life - _arg1); _sinceLast = 0; _local6--; }; } } }//package Puzzle class F { public var y:Number; public var b:Number; public var r:Number; public var lx:Number; public var ly:Number; public var g:Number; public var totalLife:Number;// = 1 public var gfx:int; public var life:Number;// = -1 public var x:Number; private function F(){ } public function setAlive(_arg1:Number, _arg2:Number):void{ var _local5:Number; life = (totalLife - (0.5 * Math.random())); r = ((Math.random() > 0.5)) ? 1 : 0; g = ((Math.random() > 0.5)) ? 1 : 0; b = ((Math.random() > 0.5)) ? 1 : 0; if ((((((0 == r)) && ((0 == b)))) && ((0 == g)))){ _local5 = Math.random(); if (_local5 < 0.3){ r = 1; } else { if (_local5 < 0.6){ g = 1; } else { b = 1; }; }; }; this.x = (lx = _arg1); this.y = (ly = _arg2); this.gfx = gfx; var _local3:Number = ((2 * Math.PI) * Math.random()); var _local4:Number = (Math.random() * 6); life = (Math.random() * totalLife); lx = (lx + (_local4 * Math.cos(_local3))); ly = (ly + (_local4 * Math.sin(_local3))); } }
Section 54
//PuzzleSection (Puzzle.PuzzleSection) package Puzzle { import flash.events.*; import flash.display.*; import flash.geom.*; import Map.*; import Game.*; import Particles.*; import flash.net.*; import Menu.*; import Editor.*; import flash.filters.*; public class PuzzleSection implements IGameSection { private var fail_:FAIL_SCREEN; private var editor_:IGameSection; private var fireworksQueue_:Array; private var customMode_:Boolean; private var nextSection_:IGameSection; private var holder_:Sprite; private var crusher_:Boolean; private var limits_:Array; private var crusherGfx_:CRUSHER; private var fireworks_:Firework; private var iface_:PUZZLE_INTERFACE; private var fireworksLayer_:Sprite; private var level_:Level; private var succeed_:SUCCESS_SCREEN; private var fallingCrusher_:CRUSHER_FALL; private var levelSet_:Array; private var levelIndex_:int; private var crusherLayer_:Sprite; private var editorLayer_:Sprite; public function PuzzleSection(_arg1:Array, _arg2:int, _arg3:Boolean=false){ holder_ = new Sprite(); iface_ = new PUZZLE_INTERFACE(); editorLayer_ = new Sprite(); fail_ = new FAIL_SCREEN(); succeed_ = new SUCCESS_SCREEN(); fireworksLayer_ = new Sprite(); fireworksQueue_ = []; crusherLayer_ = new Sprite(); super(); levelSet_ = _arg1; levelIndex_ = _arg2; customMode_ = _arg3; nextSection_ = this; holder_.addChild(editorLayer_); holder_.addChild(iface_); iface_.mouseEnabled = false; iface_.mouseChildren = false; fail_.visible = (succeed_.visible = false); holder_.addChild(fail_); holder_.addChild(succeed_); fail_.button.addEventListener(MouseEvent.CLICK, retry, false, 0, true); succeed_.button.addEventListener(MouseEvent.CLICK, next, false, 0, true); succeed_.button2.addEventListener(MouseEvent.CLICK, mainMenu, false, 0, true); succeed_.button2.visible = (levelIndex_ == (_arg1.length - 1)); editorLayer_.addEventListener("mainMenu", mainMenu, false, 0, true); startLevel(Level.LoadLevel(_arg1[_arg2])); crusherLayer_.mouseChildren = (crusherLayer_.mouseEnabled = false); holder_.addChild(crusherLayer_); holder_.addChild(fireworksLayer_); fireworks_ = new Firework(); fireworksLayer_.mouseEnabled = (fireworksLayer_.mouseChildren = false); fireworksLayer_.addChild(fireworks_); crusher_ = (((levelIndex_ == (_arg1.length - 1))) && (!(customMode_))); if (crusher_){ crusherGfx_ = new CRUSHER(); crusherLayer_.addChild(crusherGfx_); crusherGfx_.x = 576; crusherGfx_.y = 48; }; } private function replaceSection(_arg1:IGameSection):void{ var _local2:IGameSection = editor_; editorLayer_.removeChild(editor_.graphic); editorLayer_.addChild(_arg1.graphic); editor_ = _arg1; if ((_arg1 is GameSection)){ GameSection(_arg1).addEventListener(GameEvent.END_LEVEL, levelEnd, false, 0, true); }; if ((_local2 is GameSection)){ GameSection(_local2).removeEventListener(GameEvent.END_LEVEL, levelEnd, false); }; } private function retry(_arg1:Event):void{ var _local5:Array; var _local6:String; fireworksQueue_ = []; fail_.visible = (succeed_.visible = false); var _local2:Map = new Map(); var _local3:Map = new Map(); var _local4:GameSection = (editor_ as GameSection); if (_local4){ _local2 = _local4.playerSrc; _local3 = _local4.levelSrc; _local5 = []; for (_local6 in limits_) { _local5[_local6] = {max:limits_[_local6].max, val:limits_[_local6].val}; }; limits_ = _local5; }; replaceSection(new EditSection(_local2, null, _local3, null, level_.backgroundIndex, limits_, level_.tutorialIndex, true)); } private function levelEnd(_arg1:GameEvent):void{ var _local3:Boolean; var _local4:Number; var _local5:int; var _local2:GameSection = (editor_ as GameSection); if (_local2){ _local3 = (_local2.endReason == level_.goal); if (((_local3) && (!(customMode_)))){ State.SetLevelComplete(levelIndex_); }; if (((level_.mustDestroyBlock) && (!(_local2.ranThrough)))){ _local3 = false; }; fail_.visible = !(_local3); succeed_.visible = _local3; Main.audio.playMusic((_local3) ? "Win" : "Fail"); _local4 = 0.4; _local5 = 0; while (_local5 < 5) { fireworksQueue_.push(new Point(_local4, (_local3) ? 1 : -1)); _local4 = (_local4 + (0.4 + (Math.random() * 0.5))); _local5++; }; if (((_local3) && (crusher_))){ crusherGfx_.visible = false; fallingCrusher_ = new CRUSHER_FALL(); fallingCrusher_.x = crusherGfx_.x; fallingCrusher_.y = crusherGfx_.y; crusherLayer_.addChild(fallingCrusher_); }; }; } private function mainMenu(_arg1:Event):void{ Main.audio.playMusic("Silence"); nextSection_ = new FadeSection(this, new MenuSection()); } public function draw():void{ fireworks_.draw(); editor_.draw(); if (!customMode_){ iface_.levelName.text = ((("Level " + (levelIndex_ + 1).toString()) + ": ") + level_.title); } else { iface_.levelName.text = ((("\"" + level_.title) + "\" by ") + level_.author); }; iface_.upCount.text = ("X" + String(limits_[TileTypes.UP].val)); iface_.downCount.text = ("X" + String(limits_[TileTypes.DOWN].val)); iface_.leftCount.text = ("X" + String(limits_[TileTypes.LEFT].val)); iface_.rightCount.text = ("X" + String(limits_[TileTypes.RIGHT].val)); } public function update():IGameSection{ var _local3:GameSection; var _local4:*; var _local1:Boolean; fireworks_.update((1 / 50)); if (fallingCrusher_){ fallingCrusher_.y = (fallingCrusher_.y + 3); if (fallingCrusher_.y >= 235){ fallingCrusher_.parent.removeChild(fallingCrusher_); fallingCrusher_ = null; _local3 = (editor_ as GameSection); if (_local3){ _local3.hidePrincess(); _local3.addDeathParticles(592, 261); Main.audio.playFX("Explode"); }; }; }; do { _local1 = false; _local4 = editor_.update(); if (_local4 != editor_){ replaceSection(_local4); _local1 = true; }; } while (_local1); var _local2:int = (fireworksQueue_.length - 1); while (_local2 >= 0) { fireworksQueue_[_local2].x = (fireworksQueue_[_local2].x - (1 / 50)); if (fireworksQueue_[_local2].x <= 0){ fireworks_.burst((fireworksQueue_[_local2].y > 0)); fireworksQueue_.splice(_local2, 1); }; _local2--; }; return (nextSection_); } private function startLevel(_arg1:Level, _arg2:Map=null):void{ level_ = _arg1; limits_ = []; limits_[TileTypes.UP] = {max:_arg1.upLimit, val:_arg1.upLimit}; limits_[TileTypes.DOWN] = {max:_arg1.downLimit, val:_arg1.downLimit}; limits_[TileTypes.LEFT] = {max:_arg1.leftLimit, val:_arg1.leftLimit}; limits_[TileTypes.RIGHT] = {max:_arg1.rightLimit, val:_arg1.rightLimit}; editor_ = new EditSection(new Map(), null, _arg1.map, null, _arg1.backgroundIndex, limits_, _arg1.tutorialIndex, true); editorLayer_.addChild(editor_.graphic); } public function get graphic():DisplayObject{ return (holder_); } private function moreGames(_arg1:MouseEvent):void{ var _local2:URLRequest = new URLRequest("http://www.ninjakiwi.com/"); navigateToURL(_local2, "_blank"); } private function next(_arg1:Event):void{ Main.audio.playMusic("Silence"); nextSection_ = new PuzzleSection(levelSet_, (levelIndex_ + 1)); } } }//package Puzzle
Section 55
//SiteLockSection (SiteLock.SiteLockSection) package SiteLock { import flash.display.*; public class SiteLockSection implements IGameSection { private var _holder:Sprite; private var _first:Boolean;// = true private var _proxyStart:Function; private var _allowed:Array; public function SiteLockSection(_arg1:Function, _arg2:Array){ _holder = new Sprite(); super(); _allowed = _arg2; _proxyStart = _arg1; } public function draw():void{ } public function get graphic():DisplayObject{ return (_holder); } public function update():IGameSection{ var _local1:SITELOCK; if (Check(_allowed, getMainLoaderInfo())){ return (_proxyStart()); }; if (_first){ _first = false; _local1 = new SITELOCK(); _holder.addChild(_local1); }; return (this); } public function getMainLoaderInfo():LoaderInfo{ var _local1:LoaderInfo = _holder.root.loaderInfo; if (_local1.loader != null){ _local1 = _local1.loader.loaderInfo; }; return (_local1); } public function cleanup():void{ } private static function Check(_arg1:Array, _arg2:LoaderInfo):Boolean{ var _local5:String; var _local3:String = _arg2.loaderURL; var _local4:String = GetDomainFromUrl(_local3); if (_local3.indexOf("file:///") == 0){ return (true); }; for each (_local5 in _arg1) { if (_local4.indexOf(_local5) != -1){ if (_local4.indexOf(_local5) == (_local4.length - _local5.length)){ return (true); }; }; }; return (false); } public static function GetDomainFromUrl(_arg1:String):String{ return (_arg1.split("/")[2]); } } }//package SiteLock
Section 56
//AGSplash (AGSplash) package { import flash.events.*; import flash.display.*; import Menu.*; public class AGSplash implements IGameSection { public const AG:Class; private var _frameCount:int;// = 0 private var _holder:Sprite; private var _first:Boolean;// = true private var _loader:Loader; private var _nextSection:IGameSection; public function AGSplash(){ AG = AGSplash_AG; super(); _holder = new Sprite(); _nextSection = this; _holder.graphics.beginFill(0); _holder.graphics.drawRect(0, 0, 640, 480); _holder.graphics.endFill(); _loader = new Loader(); _loader.loadBytes(new AG()); _holder.addChild(_loader); _loader.x = (0.5 * (640 - 550)); _loader.y = (0.5 * (480 - 400)); _holder.addEventListener(Event.ENTER_FRAME, enterFrame); } public function get graphic():DisplayObject{ return (_holder); } public function update():IGameSection{ if (((_holder.stage) && (_first))){ _first = false; _holder.stage.frameRate = 45; }; return (_nextSection); } private function enterFrame(_arg1:Event):void{ _frameCount++; if (_frameCount >= 218){ _holder.removeEventListener(Event.ENTER_FRAME, enterFrame); _nextSection = new MenuSection(); _holder.stage.frameRate = 55; }; } public function draw():void{ } } }//package
Section 57
//AGSplash_AG (AGSplash_AG) package { import mx.core.*; public class AGSplash_AG extends ByteArrayAsset { } }//package
Section 58
//Audio (Audio) package { import flash.events.*; import flash.media.*; import flash.utils.*; public class Audio { private var volumeSettings_:Array; private var disabled_:Array; private var channels_:Object; private var sounds_:Array; private static const AUDIO_DATA:Array = [["Blip", 1, 100, 100], ["Explode", 1, 100, 100], ["Fail", 1, 100, 100], ["Fireworks", 1, 100, 100], ["Gameshow", 1, 100, 100], ["Gateclose", 1, 100, 100], ["KnightEscape", 1, 100, 100], ["Launch", 1, 100, 100], ["Marsh", 1, 100, 100], ["Step", 1, 100, 100], ["LauncherExplode", 1, 100, 100], ["Win", 1, 100, 100], ["Silence", 1, 100, 0]]; public function Audio(){ var _local2:Array; var _local3:String; var _local4:int; var _local5:int; var _local6:Class; volumeSettings_ = [{FX:1, MUSIC:1, THEME:1}, {FX:1, MUSIC:0, THEME:0}, {FX:0, MUSIC:0, THEME:0}]; sounds_ = []; disabled_ = []; channels_ = {FX:new AudioChannel(12), MUSIC:new AudioChannel(1), THEME:new AudioChannel(1)}; super(); var _local1:int; while (_local1 < AUDIO_DATA.length) { _local2 = AUDIO_DATA[_local1]; _local3 = _local2[0]; _local4 = _local2[1]; sounds_[_local3] = []; _local5 = 0; while (_local5 < _local4) { _local6 = Class(getDefinitionByName((_local3 + String((_local5 + 1))))); sounds_[_local3].push(new (_local6)); _local5++; }; _local1++; }; } public function enableChannel(_arg1:String):void{ var _local2:int = disabled_.indexOf(_arg1); if (-1 != _local2){ disabled_.splice(_local2, 1); }; } public function playChannel(_arg1:String, _arg2:String, _arg3:int=0):SoundChannel{ if (-1 != disabled_.indexOf(_arg2)){ return (null); }; var _local4:Sound = getSound(_arg1); var _local5:Number = getVolume(_arg1); var _local6:SoundChannel = channels_[_arg2].play(_local4, 0, _local5, _arg3); if (!_local6){ trace(_arg2, "ran out of sound channels"); }; return (_local6); } public function disableChannel(_arg1:String):void{ if (-1 == disabled_.indexOf(_arg1)){ disabled_.push(_arg1); }; } public function playFX(_arg1:String):SoundChannel{ return (playChannel(_arg1, "FX")); } public function toggleVolume():void{ var _local2:String; var _local1:* = volumeSettings_.shift(); volumeSettings_.push(_local1); for (_local2 in channels_) { channels_[_local2].volume = volumeSettings_[0][_local2]; }; } private function getVolume(_arg1:String):Number{ var _local2:Number = 1; var _local3:int; while (_local3 < AUDIO_DATA.length) { if (AUDIO_DATA[_local3][0] == _arg1){ _local2 = (Number(AUDIO_DATA[_local3][3]) / 100); break; }; _local3++; }; return (_local2); } public function playMusic(_arg1:String):void{ channels_["MUSIC"].stopAll(); playChannel(_arg1, "MUSIC"); } public function getChannel(_arg1:String):AudioChannel{ return (channels_[_arg1]); } public function playTheme(_arg1:String):void{ channels_["THEME"].stopAll(); playChannel(_arg1, "THEME", int.MAX_VALUE); } private function getSound(_arg1:String):Sound{ var _local2:int = sounds_[_arg1].length; return (sounds_[_arg1][Math.floor((Math.random() * _local2))]); } public function set paused(_arg1:Boolean):void{ var _local2:AudioChannel; for each (_local2 in channels_) { _local2.paused = _arg1; }; } } }//package
Section 59
//AudioChannel (AudioChannel) package { import flash.events.*; import flash.media.*; public class AudioChannel { private var volumes_:Array; private var pausePositions_:Array; private var channels_:Array; private var paused_:Boolean;// = false private var baseVolume_:Number;// = 1 private var sounds_:Array; public function AudioChannel(_arg1:int){ channels_ = []; sounds_ = []; pausePositions_ = []; volumes_ = []; super(); var _local2:int; while (_local2 < _arg1) { channels_.push(null); sounds_.push(null); pausePositions_.push(0); volumes_.push(1); _local2++; }; } public function set volume(_arg1:Number):void{ var _local2:int; var _local3:SoundChannel; if (baseVolume_ != _arg1){ baseVolume_ = _arg1; _local2 = 0; while (_local2 < channels_.length) { _local3 = channels_[_local2]; if (_local3){ _local3.soundTransform = new SoundTransform((baseVolume_ * volumes_[_local2])); }; _local2++; }; }; } public function play(_arg1:Sound, _arg2:Number=0, _arg3:Number=1, _arg4:int=0):SoundChannel{ var _local5:int = getFreeChannelIndex(); if (_local5 == -1){ return (null); }; channels_[_local5] = null; var _local6:SoundChannel = _arg1.play(_arg2, _arg4, new SoundTransform((_arg3 * baseVolume_))); if (_local6){ channels_[_local5] = _local6; sounds_[_local5] = _arg1; volumes_[_local5] = _arg3; channels_[_local5].addEventListener(Event.SOUND_COMPLETE, channelComplete); }; return (channels_[_local5]); } private function channelComplete(_arg1:Event):void{ var _local3:int; var _local2:SoundChannel = (_arg1.target as SoundChannel); if (_local2){ _local3 = channels_.indexOf(_local2); if (-1 != _local3){ channels_[_local3].removeEventListener(Event.SOUND_COMPLETE, channelComplete); channels_[_local3] = null; }; }; } private function getFreeChannelIndex():int{ var _local1:int; while (_local1 < channels_.length) { if (channels_[_local1] == null){ return (_local1); }; _local1++; }; return (-1); } public function get volume():Number{ return (baseVolume_); } public function set paused(_arg1:Boolean):void{ var _local2:int; var _local3:Number; if (_arg1){ _local2 = 0; while (_local2 < channels_.length) { if (channels_[_local2]){ pausePositions_[_local2] = channels_[_local2].position; channels_[_local2].stop(); channels_[_local2].removeEventListener(Event.SOUND_COMPLETE, channelComplete); }; _local2++; }; } else { _local2 = 0; while (_local2 < channels_.length) { if (channels_[_local2]){ _local3 = pausePositions_[_local2]; channels_[_local2] = null; play(sounds_[_local2], _local3, volumes_[_local2]); }; _local2++; }; }; } public function stopAll():void{ var _local1:int; while (_local1 < channels_.length) { if (channels_[_local1]){ channels_[_local1].stop(); channels_[_local1].removeEventListener(Event.SOUND_COMPLETE, channelComplete); channels_[_local1] = null; }; _local1++; }; } } }//package
Section 60
//BACKGROUND (BACKGROUND) package { import flash.display.*; public dynamic class BACKGROUND extends MovieClip { public function BACKGROUND(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame1(){ stop(); } function frame2(){ stop(); } function frame3(){ stop(); } function frame4(){ stop(); } } }//package
Section 61
//BANNER_FAILURE (BANNER_FAILURE) package { import flash.display.*; public dynamic class BANNER_FAILURE extends MovieClip { } }//package
Section 62
//BANNER_SUCCESS (BANNER_SUCCESS) package { import flash.display.*; public dynamic class BANNER_SUCCESS extends MovieClip { } }//package
Section 63
//Blip1 (Blip1) package { import flash.media.*; public dynamic class Blip1 extends Sound { } }//package
Section 64
//BLOCK_GRAY (BLOCK_GRAY) package { import flash.display.*; public dynamic class BLOCK_GRAY extends MovieClip { } }//package
Section 65
//BLOOD (BLOOD) package { import flash.display.*; public dynamic class BLOOD extends MovieClip { } }//package
Section 66
//BONE (BONE) package { import flash.display.*; public dynamic class BONE extends MovieClip { } }//package
Section 67
//BRIDGE (BRIDGE) package { import flash.display.*; public dynamic class BRIDGE extends MovieClip { } }//package
Section 68
//Button_disabledSkin (Button_disabledSkin) package { import flash.display.*; public dynamic class Button_disabledSkin extends MovieClip { } }//package
Section 69
//Button_downSkin (Button_downSkin) package { import flash.display.*; public dynamic class Button_downSkin extends MovieClip { } }//package
Section 70
//Button_emphasizedSkin (Button_emphasizedSkin) package { import flash.display.*; public dynamic class Button_emphasizedSkin extends MovieClip { } }//package
Section 71
//BUTTON_GREEN (BUTTON_GREEN) package { import flash.display.*; public dynamic class BUTTON_GREEN extends MovieClip { } }//package
Section 72
//BUTTON_GREEN_DISABLED (BUTTON_GREEN_DISABLED) package { import flash.display.*; public dynamic class BUTTON_GREEN_DISABLED extends MovieClip { } }//package
Section 73
//BUTTON_MENU (BUTTON_MENU) package { import flash.display.*; public dynamic class BUTTON_MENU extends SimpleButton { } }//package
Section 74
//BUTTON_NEXT (BUTTON_NEXT) package { import flash.display.*; public dynamic class BUTTON_NEXT extends SimpleButton { } }//package
Section 75
//Button_overSkin (Button_overSkin) package { import flash.display.*; public dynamic class Button_overSkin extends MovieClip { } }//package
Section 76
//BUTTON_RED (BUTTON_RED) package { import flash.display.*; public dynamic class BUTTON_RED extends MovieClip { } }//package
Section 77
//BUTTON_RED_DISABLED (BUTTON_RED_DISABLED) package { import flash.display.*; public dynamic class BUTTON_RED_DISABLED extends MovieClip { } }//package
Section 78
//BUTTON_RETRY (BUTTON_RETRY) package { import flash.display.*; public dynamic class BUTTON_RETRY extends SimpleButton { } }//package
Section 79
//Button_selectedDisabledSkin (Button_selectedDisabledSkin) package { import flash.display.*; public dynamic class Button_selectedDisabledSkin extends MovieClip { } }//package
Section 80
//Button_selectedDownSkin (Button_selectedDownSkin) package { import flash.display.*; public dynamic class Button_selectedDownSkin extends MovieClip { } }//package
Section 81
//Button_selectedOverSkin (Button_selectedOverSkin) package { import flash.display.*; public dynamic class Button_selectedOverSkin extends MovieClip { } }//package
Section 82
//Button_selectedUpSkin (Button_selectedUpSkin) package { import flash.display.*; public dynamic class Button_selectedUpSkin extends MovieClip { } }//package
Section 83
//Button_upSkin (Button_upSkin) package { import flash.display.*; public dynamic class Button_upSkin extends MovieClip { } }//package
Section 84
//CLOUD (CLOUD) package { import flash.display.*; public dynamic class CLOUD extends MovieClip { } }//package
Section 85
//CLOUD_PARTICLE (CLOUD_PARTICLE) package { import flash.display.*; public dynamic class CLOUD_PARTICLE extends MovieClip { } }//package
Section 86
//COVER_UP (COVER_UP) package { import flash.display.*; public dynamic class COVER_UP extends MovieClip { } }//package
Section 87
//CRUSHER (CRUSHER) package { import flash.display.*; public dynamic class CRUSHER extends MovieClip { } }//package
Section 88
//CRUSHER_FALL (CRUSHER_FALL) package { import flash.display.*; public dynamic class CRUSHER_FALL extends MovieClip { } }//package
Section 89
//EDITOR_INTERFACE (EDITOR_INTERFACE) package { import flash.display.*; public dynamic class EDITOR_INTERFACE extends MovieClip { public var items:MovieClip; public var mainMenuButton:MAIN_MENU_BUTTON; public var bg1:SimpleButton; public var bg2:SimpleButton; public var bg3:SimpleButton; public var overlay:MovieClip; public var test:SimpleButton; public var bg4:SimpleButton; public var coverup:MovieClip; public var clear:SimpleButton; public var drawerLayer:MovieClip; public var playerPanel:PLAYER_PANEL; public var buttonUp:SimpleButton; public var buttonDown:SimpleButton; public var report:GAME_REPORT; public function EDITOR_INTERFACE(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 90
//EXPLODE (EXPLODE) package { import flash.display.*; public dynamic class EXPLODE extends MovieClip { } }//package
Section 91
//Explode1 (Explode1) package { import flash.media.*; public dynamic class Explode1 extends Sound { } }//package
Section 92
//FadeSection (FadeSection) package { import flash.display.*; public class FadeSection implements IGameSection { private var counter_:Number; private var bmp2_:Bitmap; private var bmp1_:Bitmap; private var nextSection_:IGameSection; private var counterTotal_:Number; private var holder_:Sprite; private var sec2_:IGameSection; private var sec1_:IGameSection; public function FadeSection(_arg1:IGameSection, _arg2:IGameSection, _arg3:Number=1){ holder_ = new Sprite(); super(); nextSection_ = this; sec1_ = _arg1; sec2_ = _arg2; counter_ = (counterTotal_ = _arg3); sec1_.draw(); sec2_.draw(); bmp1_ = new Bitmap(new BitmapData(Main.GAME_DIMENSIONS.x, Main.GAME_DIMENSIONS.y, false, 0)); bmp2_ = new Bitmap(new BitmapData(Main.GAME_DIMENSIONS.x, Main.GAME_DIMENSIONS.y, false, 0)); bmp1_.bitmapData.draw(sec1_.graphic); bmp2_.bitmapData.draw(sec2_.graphic); holder_.addChild(bmp2_); holder_.addChild(bmp1_); } public function get graphic():DisplayObject{ return (holder_); } public function update():IGameSection{ counter_ = (counter_ - (1 / Main.GAME_FPS)); if (counter_ <= 0){ nextSection_ = sec2_; bmp1_.bitmapData.dispose(); bmp2_.bitmapData.dispose(); }; return (nextSection_); } public function draw():void{ bmp1_.alpha = (counter_ / counterTotal_); } } }//package
Section 93
//FAIL_SCREEN (FAIL_SCREEN) package { import flash.display.*; public dynamic class FAIL_SCREEN extends MovieClip { public var button:BUTTON_RETRY; } }//package
Section 94
//Fail1 (Fail1) package { import flash.media.*; public dynamic class Fail1 extends Sound { } }//package
Section 95
//FIREWORK_PARTICLE (FIREWORK_PARTICLE) package { import flash.display.*; public dynamic class FIREWORK_PARTICLE extends BitmapData { public function FIREWORK_PARTICLE(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 96
//Fireworks1 (Fireworks1) package { import flash.media.*; public dynamic class Fireworks1 extends Sound { } }//package
Section 97
//focusRectSkin (focusRectSkin) package { import flash.display.*; public dynamic class focusRectSkin extends MovieClip { } }//package
Section 98
//FrameTimer (FrameTimer) package { import flash.utils.*; public class FrameTimer { private var fps_:int; private var maxDelta_:int; private var timeBank_:int; private var frameLen_:int; private var lastTime_:int; public function FrameTimer(_arg1:int, _arg2:int=350){ fps_ = _arg1; maxDelta_ = _arg2; lastTime_ = -1; frameLen_ = Math.round((1000 / _arg1)); timeBank_ = frameLen_; } public function set maxDelta(_arg1:int):void{ maxDelta_ = _arg1; } public function update():int{ var _local3:int; var _local1:int = getTimer(); if (-1 != lastTime_){ _local3 = (_local1 - lastTime_); if (_local3 > maxDelta){ _local3 = maxDelta; }; timeBank_ = (timeBank_ + _local3); }; lastTime_ = _local1; var _local2:int; while (timeBank_ >= frameLen_) { timeBank_ = (timeBank_ - frameLen_); _local2++; }; return (_local2); } public function get fps():int{ return (fps_); } public function set fps(_arg1:int):void{ fps_ = _arg1; } public function get maxDelta():int{ return (maxDelta_); } } }//package
Section 99
//GAME_REPORT (GAME_REPORT) package { import flash.display.*; import flash.text.*; public dynamic class GAME_REPORT extends MovieClip { public var report:TextField; } }//package
Section 100
//Gameshow1 (Gameshow1) package { import flash.media.*; public dynamic class Gameshow1 extends Sound { } }//package
Section 101
//GATE_ANIM (GATE_ANIM) package { import flash.display.*; public dynamic class GATE_ANIM extends MovieClip { public function GATE_ANIM(){ addFrameScript(0, frame1, 17, frame18); } function frame18(){ stop(); } function frame1(){ stop(); } } }//package
Section 102
//GATE_START (GATE_START) package { import flash.display.*; public dynamic class GATE_START extends SimpleButton { } }//package
Section 103
//Gateclose1 (Gateclose1) package { import flash.media.*; public dynamic class Gateclose1 extends Sound { } }//package
Section 104
//IGameSection (IGameSection) package { import flash.display.*; public interface IGameSection { function get graphic():DisplayObject; function update():IGameSection; function draw():void; } }//package
Section 105
//Input (Input) package { import flash.events.*; import flash.display.*; public final class Input { private static var keys:Array; public static function Initialize(_arg1:Stage):void{ keys = new Array(0xFF); var _local2:int; while (_local2 < keys.length) { keys[_local2] = false; _local2++; }; _arg1.addEventListener(KeyboardEvent.KEY_DOWN, KeyPressed, false, 0, true); _arg1.addEventListener(KeyboardEvent.KEY_UP, KeyReleased, false, 0, true); } private static function KeyPressed(_arg1:KeyboardEvent):void{ keys[_arg1.keyCode] = true; } public static function IsAnyPressed(_arg1:Array):Boolean{ var _local2:int; for each (_local2 in _arg1) { if (keys[_local2]){ return (true); }; }; return (false); } public static function ResetKeys(_arg1:Array):void{ var _local2:int; for each (_local2 in _arg1) { keys[_local2] = false; }; } private static function KeyReleased(_arg1:KeyboardEvent):void{ keys[_arg1.keyCode] = false; } public static function IsPressed(_arg1:int):Boolean{ return (keys[_arg1]); } } }//package
Section 106
//INVISIBLE_GREEN (INVISIBLE_GREEN) package { import flash.display.*; public dynamic class INVISIBLE_GREEN extends MovieClip { } }//package
Section 107
//INVISIBLE_RED (INVISIBLE_RED) package { import flash.display.*; public dynamic class INVISIBLE_RED extends MovieClip { } }//package
Section 108
//KNIGHT (KNIGHT) package { import flash.display.*; public dynamic class KNIGHT extends MovieClip { public function KNIGHT(){ addFrameScript(31, frame32, 79, frame80, 112, frame113); } function frame32(){ gotoAndPlay("running"); } function frame80(){ gotoAndPlay("flying"); } function frame113(){ gotoAndPlay("saving"); } } }//package
Section 109
//KnightEscape1 (KnightEscape1) package { import flash.media.*; public dynamic class KnightEscape1 extends Sound { } }//package
Section 110
//Launch1 (Launch1) package { import flash.media.*; public dynamic class Launch1 extends Sound { } }//package
Section 111
//LAUNCHER_DOWN (LAUNCHER_DOWN) package { import flash.display.*; public dynamic class LAUNCHER_DOWN extends MovieClip { } }//package
Section 112
//LAUNCHER_LEFT (LAUNCHER_LEFT) package { import flash.display.*; public dynamic class LAUNCHER_LEFT extends MovieClip { } }//package
Section 113
//LAUNCHER_PERM_DOWN (LAUNCHER_PERM_DOWN) package { import flash.display.*; public dynamic class LAUNCHER_PERM_DOWN extends MovieClip { } }//package
Section 114
//LAUNCHER_PERM_LEFT (LAUNCHER_PERM_LEFT) package { import flash.display.*; public dynamic class LAUNCHER_PERM_LEFT extends MovieClip { } }//package
Section 115
//LAUNCHER_PERM_RIGHT (LAUNCHER_PERM_RIGHT) package { import flash.display.*; public dynamic class LAUNCHER_PERM_RIGHT extends MovieClip { } }//package
Section 116
//LAUNCHER_PERM_UP (LAUNCHER_PERM_UP) package { import flash.display.*; public dynamic class LAUNCHER_PERM_UP extends MovieClip { } }//package
Section 117
//LAUNCHER_RIGHT (LAUNCHER_RIGHT) package { import flash.display.*; public dynamic class LAUNCHER_RIGHT extends MovieClip { } }//package
Section 118
//LAUNCHER_UP (LAUNCHER_UP) package { import flash.display.*; public dynamic class LAUNCHER_UP extends MovieClip { } }//package
Section 119
//LauncherExplode1 (LauncherExplode1) package { import flash.media.*; public dynamic class LauncherExplode1 extends Sound { } }//package
Section 120
//Level (Level) package { import Map.*; import flash.utils.*; import com.adobe.crypto.*; import com.dynamicflash.util.*; public final class Level { private var rightLimit_:int;// = 0 private var map_:Map; private var title_:String; private var mustDestroyBlock_:Boolean;// = false private var tutorialIndex_:int;// = 0 private var downLimit_:int;// = 0 private var backgroundIndex_:int;// = 1 private var leftLimit_:int;// = 0 private var goal_:int;// = 2 private var author_:String; private var upLimit_:int;// = 0 public static const GOAL_KILL_KNIGHT:int = 0; public static const GOAL_FEED_MONSTER:int = 2; public static const GOAL_SAVE_PRINCESS:int = 1; public function Level(_arg1:String, _arg2:String, _arg3:Map){ title_ = _arg1; author_ = _arg2; map_ = _arg3; } public function get backgroundIndex():int{ return (backgroundIndex_); } public function toData():String{ var _local5:int; var _local1:ByteArray = new ByteArray(); _local1.endian = Endian.LITTLE_ENDIAN; _local1.writeUTF(title_); _local1.writeUTF(author_); _local1.writeUnsignedInt(map_.width); _local1.writeUnsignedInt(map_.height); _local1.writeInt(upLimit); _local1.writeInt(downLimit); _local1.writeInt(leftLimit); _local1.writeInt(rightLimit); _local1.writeInt(goal); _local1.writeInt(backgroundIndex); _local1.writeInt(tutorialIndex); _local1.writeBoolean(mustDestroyBlock); var _local2:int; while (_local2 < map_.height) { _local5 = 0; while (_local5 < map_.width) { _local1.writeByte(map_.getSquare(_local5, _local2)); _local5++; }; _local2++; }; _local1.compress(); var _local3:String = SHA1.hashBytes(_local1); var _local4 = ""; _local5 = 0; while (_local5 < _local3.length) { _local4 = (_local4 + ((Math.random() > 0.5)) ? _local3.charAt(_local5).toUpperCase() : _local3.charAt(_local5).toLowerCase()); _local5++; }; return ((_local4 + Base64.encodeByteArray(_local1))); } public function set backgroundIndex(_arg1:int):void{ backgroundIndex_ = _arg1; } public function get author():String{ return (author_); } public function get goal():int{ return (goal_); } public function get tutorialIndex():int{ return (tutorialIndex_); } public function get rightLimit():int{ return (rightLimit_); } public function get map():Map{ return (map_); } public function get title():String{ return (title_); } public function get upLimit():int{ return (upLimit_); } public function set tutorialIndex(_arg1:int):void{ tutorialIndex_ = _arg1; } public function set upLimit(_arg1:int):void{ upLimit_ = _arg1; } public function get mustDestroyBlock():Boolean{ return (mustDestroyBlock_); } public function set author(_arg1:String):void{ author_ = _arg1; } public function set goal(_arg1:int):void{ goal_ = _arg1; } public function set leftLimit(_arg1:int):void{ leftLimit_ = _arg1; } public function set title(_arg1:String):void{ title_ = _arg1; } public function set downLimit(_arg1:int):void{ downLimit_ = _arg1; } public function set rightLimit(_arg1:int):void{ rightLimit_ = _arg1; } public function set mustDestroyBlock(_arg1:Boolean):void{ mustDestroyBlock_ = _arg1; } public function get downLimit():int{ return (downLimit_); } public function get leftLimit():int{ return (leftLimit_); } public static function LoadLevel(_arg1:String):Level{ var _local20:int; var _local21:int; var _local2:String = _arg1.substr(0, 40).toUpperCase(); var _local3:ByteArray = Base64.decodeToByteArray(_arg1.substr(40)); var _local4:String = SHA1.hashBytes(_local3).toUpperCase(); if (_local2 !== _local4){ throw (new Error("Invalid level")); }; _local3.uncompress(); _local3.endian = Endian.LITTLE_ENDIAN; var _local5:String = _local3.readUTF(); var _local6:String = _local3.readUTF(); var _local7:uint = _local3.readUnsignedInt(); var _local8:uint = _local3.readUnsignedInt(); var _local9:int = _local3.readInt(); var _local10:int = _local3.readInt(); var _local11:int = _local3.readInt(); var _local12:int = _local3.readInt(); var _local13:int = _local3.readInt(); var _local14:int = _local3.readInt(); var _local15:int = _local3.readInt(); var _local16:Boolean = _local3.readBoolean(); if (_local7 != Map.DEFAULT_WIDTH){ throw (new Error("Invalid map")); }; if (_local8 != Map.DEFAULT_HEIGHT){ throw (new Error("Invalid map")); }; var _local17:Map = new Map(_local7, _local8); var _local18:int; while (_local18 < _local8) { _local20 = 0; while (_local20 < _local7) { _local21 = _local3.readByte(); _local17.setSquare(_local20, _local18, _local21); _local20++; }; _local18++; }; var _local19:Level = new Level(_local5, _local6, _local17); _local19.upLimit = _local9; _local19.downLimit = _local10; _local19.leftLimit = _local11; _local19.rightLimit = _local12; _local19.goal = _local13; _local19.backgroundIndex = _local14; _local19.tutorialIndex = _local15; _local19.mustDestroyBlock = _local16; return (_local19); } } }//package
Section 121
//LEVEL_SELECT (LEVEL_SELECT) package { import flash.display.*; public dynamic class LEVEL_SELECT extends MovieClip { public var l1:SimpleButton; public var l2:SimpleButton; public var l3:SimpleButton; public var l4:SimpleButton; public var l5:SimpleButton; public var l10:SimpleButton; public var l11:SimpleButton; public var l9:SimpleButton; public var l13:SimpleButton; public var l14:SimpleButton; public var l15:SimpleButton; public var l16:SimpleButton; public var l17:SimpleButton; public var l12:SimpleButton; public var l20:SimpleButton; public var l21:SimpleButton; public var l22:SimpleButton; public var l23:SimpleButton; public var l24:SimpleButton; public var l18:SimpleButton; public var l19:SimpleButton; public var l6:SimpleButton; public var l7:SimpleButton; public var l8:SimpleButton; } }//package
Section 122
//LOAD_INTERFACE (LOAD_INTERFACE) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.geom.*; import fl.controls.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.utils.*; import flash.ui.*; import flash.filters.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.xml.*; public dynamic class LOAD_INTERFACE extends MovieClip { public var __id4_:Label; public var cancelButton:Button; public var invalidLevel:MovieClip; public var base64:TextArea; public var loadButton:Button; public function LOAD_INTERFACE(){ __setProp_base64_LOAD_INTERFACE_controls_0(); __setProp___id4__LOAD_INTERFACE_controls_0(); __setProp_cancelButton_LOAD_INTERFACE_controls_0(); __setProp_loadButton_LOAD_INTERFACE_controls_0(); } function __setProp___id4__LOAD_INTERFACE_controls_0(){ try { __id4_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id4_.autoSize = "center"; __id4_.condenseWhite = false; __id4_.enabled = true; __id4_.htmlText = ""; __id4_.selectable = false; __id4_.text = "Paste the level code below to play the custom level."; __id4_.visible = true; __id4_.wordWrap = false; try { __id4_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_cancelButton_LOAD_INTERFACE_controls_0(){ try { cancelButton["componentInspectorSetting"] = true; } catch(e:Error) { }; cancelButton.emphasized = false; cancelButton.enabled = true; cancelButton.label = "Cancel"; cancelButton.labelPlacement = "right"; cancelButton.selected = false; cancelButton.toggle = false; cancelButton.visible = true; try { cancelButton["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_base64_LOAD_INTERFACE_controls_0(){ try { base64["componentInspectorSetting"] = true; } catch(e:Error) { }; base64.condenseWhite = false; base64.editable = true; base64.enabled = true; base64.horizontalScrollPolicy = "off"; base64.htmlText = ""; base64.maxChars = 0; base64.restrict = ""; base64.text = ""; base64.verticalScrollPolicy = "auto"; base64.visible = true; base64.wordWrap = true; try { base64["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_loadButton_LOAD_INTERFACE_controls_0(){ try { loadButton["componentInspectorSetting"] = true; } catch(e:Error) { }; loadButton.emphasized = false; loadButton.enabled = true; loadButton.label = "Load"; loadButton.labelPlacement = "right"; loadButton.selected = false; loadButton.toggle = false; loadButton.visible = true; try { loadButton["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 123
//LoadSection (LoadSection) package { import flash.events.*; import flash.display.*; import fl.events.*; import Menu.*; import Puzzle.*; public class LoadSection implements IGameSection { private var invalid_:Boolean;// = false private var nextSection_:IGameSection; private var holder_:Sprite; private var iface_:LOAD_INTERFACE; private var level_:Level; public function LoadSection(_arg1:IGameSection){ holder_ = new Sprite(); iface_ = new LOAD_INTERFACE(); super(); nextSection_ = this; drawBg(_arg1.graphic); holder_.addChild(iface_); iface_.base64.addEventListener(Event.CHANGE, base64Changed, false, 0, true); iface_.cancelButton.addEventListener(ComponentEvent.BUTTON_DOWN, quit, false, 0, true); iface_.loadButton.addEventListener(ComponentEvent.BUTTON_DOWN, load, false, 0, true); } public function draw():void{ iface_.invalidLevel.visible = invalid_; iface_.loadButton.enabled = !((level_ == null)); } private function base64Changed(_arg1:Event):void{ var e = _arg1; invalid_ = false; try { level_ = Level.LoadLevel(trim(iface_.base64.text)); } catch(e:Error) { invalid_ = true; level_ = null; }; } private function trim(_arg1:String):String{ while ((((_arg1.length > 0)) && ((_arg1.charAt(0) == " ")))) { _arg1 = _arg1.substring(1); }; while ((((_arg1.length > 0)) && ((_arg1.charAt((_arg1.length - 1)) == " ")))) { _arg1 = _arg1.substring(0, (_arg1.length - 1)); }; return (_arg1); } private function quit(_arg1:Event):void{ nextSection_ = new MenuSection(false); } private function load(_arg1:Event):void{ nextSection_ = new PuzzleSection([trim(iface_.base64.text)], 0, true); Main.audio.playTheme("Marsh"); } public function get graphic():DisplayObject{ return (holder_); } public function update():IGameSection{ return (nextSection_); } private function drawBg(_arg1:DisplayObject):void{ var _local2:BitmapData = new BitmapData(_arg1.width, _arg1.height, false, 0); _local2.draw(_arg1); holder_.addChild(new Bitmap(_local2)); } } }//package
Section 124
//LOCKED (LOCKED) package { import flash.display.*; public dynamic class LOCKED extends MovieClip { } }//package
Section 125
//Main (Main) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.system.*; import SiteLock.*; public class Main extends Sprite { private var frameProducer_:FrameTimer; private var section_:IGameSection; public static const GAME_DIMENSIONS:Point = new Point(640, 480); public static const GAME_FPS:int = 50; public static var audio:Audio = new Audio(); public static var stage:Stage; public function Main(){ addEventListener(Event.ADDED_TO_STAGE, addedToStage); } private function replaceSection(_arg1:IGameSection):void{ if (section_){ removeChild(section_.graphic); }; section_ = _arg1; addChild(section_.graphic); } private function addedToStage(_arg1:Event):void{ Main.stage = stage; Input.Initialize(stage); removeEventListener(Event.ADDED_TO_STAGE, addedToStage); init(); addEventListener(Event.ENTER_FRAME, enterFrame); } private function enterFrame(_arg1:Event):void{ var _local2:int; var _local3:Boolean; var _local4:IGameSection; if (stage.focus){ if (stage != stage.focus){ if (!stage.focus.root){ stage.focus = stage; }; }; }; if (frameProducer_){ _local2 = frameProducer_.update(); if (section_){ _local3 = false; while (0 != _local2) { _local3 = true; _local4 = section_.update(); if (_local4 != section_){ replaceSection(_local4); } else { _local2--; }; }; if (_local3){ section_.draw(); }; }; }; } private function proxyStart():IGameSection{ return (new AGSplash()); } private function init():void{ stage.stageFocusRect = false; stage.quality = StageQuality.HIGH; stage.scaleMode = StageScaleMode.NO_SCALE; frameProducer_ = new FrameTimer(GAME_FPS); replaceSection(new SiteLockSection(proxyStart, ["armorgames.com", "wayne-marsh.com"])); var _local1:Shape = new Shape(); _local1.graphics.beginFill(0xFF00FF); _local1.graphics.drawRect(0, 0, GAME_DIMENSIONS.x, GAME_DIMENSIONS.y); addChild(_local1); this.mask = _local1; trace("Player version:", Capabilities.version); var _local2:MemoryReport = new MemoryReport(); } } }//package
Section 126
//MAIN_MENU_BUTTON (MAIN_MENU_BUTTON) package { import flash.display.*; public dynamic class MAIN_MENU_BUTTON extends SimpleButton { } }//package
Section 127
//Marsh1 (Marsh1) package { import flash.media.*; public dynamic class Marsh1 extends Sound { } }//package
Section 128
//MEDAL (MEDAL) package { import flash.display.*; public dynamic class MEDAL extends MovieClip { } }//package
Section 129
//MemoryReport (MemoryReport) package { import flash.events.*; import flash.system.*; import flash.utils.*; public class MemoryReport { private var timer_:Timer; private var max_:Number; public static const DEFAULT_UPDATE_PERIOD:int = 10000; public function MemoryReport(_arg1:int=10000){ max_ = Number.NEGATIVE_INFINITY; timer_ = new Timer(_arg1); timer_.addEventListener(TimerEvent.TIMER, onTimer); timer_.start(); onTimer(null); } private function onTimer(_arg1:TimerEvent):void{ var _local2:Number = (System.totalMemory / (0x0400 * 0x0400)); max_ = Math.max(max_, _local2); var _local3:Date = new Date(); var _local4:String = ((((pad(_local3.getHours()) + ":") + pad(_local3.getMinutes())) + ":") + pad(_local3.getSeconds())); trace("Memory used:", (((((((_local2.toPrecision(2) + "MB\t") + "(max ") + max_.toPrecision(2)) + ")") + "\t(") + _local4) + ")")); } private static function pad(_arg1:int, _arg2:int=2):String{ var _local3:String = String(_arg1); while (_local3.length < _arg2) { _local3 = ("0" + _local3); }; return (_local3); } } }//package
Section 130
//MONSTER (MONSTER) package { import flash.display.*; public dynamic class MONSTER extends MovieClip { } }//package
Section 131
//MONSTER_SHIFTED (MONSTER_SHIFTED) package { import flash.display.*; public dynamic class MONSTER_SHIFTED extends MovieClip { } }//package
Section 132
//NumericStepperDownArrow_disabledSkin (NumericStepperDownArrow_disabledSkin) package { import flash.display.*; public dynamic class NumericStepperDownArrow_disabledSkin extends MovieClip { } }//package
Section 133
//NumericStepperDownArrow_downSkin (NumericStepperDownArrow_downSkin) package { import flash.display.*; public dynamic class NumericStepperDownArrow_downSkin extends MovieClip { } }//package
Section 134
//NumericStepperDownArrow_overSkin (NumericStepperDownArrow_overSkin) package { import flash.display.*; public dynamic class NumericStepperDownArrow_overSkin extends MovieClip { } }//package
Section 135
//NumericStepperDownArrow_upSkin (NumericStepperDownArrow_upSkin) package { import flash.display.*; public dynamic class NumericStepperDownArrow_upSkin extends MovieClip { } }//package
Section 136
//NumericStepperUpArrow_disabledSkin (NumericStepperUpArrow_disabledSkin) package { import flash.display.*; public dynamic class NumericStepperUpArrow_disabledSkin extends MovieClip { } }//package
Section 137
//NumericStepperUpArrow_downSkin (NumericStepperUpArrow_downSkin) package { import flash.display.*; public dynamic class NumericStepperUpArrow_downSkin extends MovieClip { } }//package
Section 138
//NumericStepperUpArrow_overSkin (NumericStepperUpArrow_overSkin) package { import flash.display.*; public dynamic class NumericStepperUpArrow_overSkin extends MovieClip { } }//package
Section 139
//NumericStepperUpArrow_upSkin (NumericStepperUpArrow_upSkin) package { import flash.display.*; public dynamic class NumericStepperUpArrow_upSkin extends MovieClip { } }//package
Section 140
//PLAYER_PANEL (PLAYER_PANEL) package { import flash.display.*; public dynamic class PLAYER_PANEL extends MovieClip { public var down:SimpleButton; public var left:SimpleButton; public var edit:SimpleButton; public var editText:MovieClip; public var trash:SimpleButton; public var up:SimpleButton; public var right:SimpleButton; public var save:SimpleButton; } }//package
Section 141
//PRELOADER (PRELOADER) package { import flash.display.*; import flash.text.*; public dynamic class PRELOADER extends MovieClip { public var percent:TextField; public var knight:MovieClip; } }//package
Section 142
//Preloader (Preloader) package { import flash.events.*; import flash.display.*; import flash.utils.*; public class Preloader extends MovieClip { private var inited_:Boolean;// = false private var l_:PRELOADER; public function Preloader(){ l_ = new PRELOADER(); super(); stop(); addChild(l_); graphics.beginFill(0xFFFFFF); graphics.drawRect(0, 0, 640, 480); addEventListener(Event.ENTER_FRAME, enterFrame); } private function enterFrame(_arg1:Event):void{ var _local2:Number = (loaderInfo.bytesLoaded / loaderInfo.bytesTotal); if (!inited_){ l_.percent.text = (String(Math.round((_local2 * 100))) + "%"); l_.knight.x = Math.round((-100 + (790 * _local2))); }; if ((((framesLoaded == totalFrames)) && (!(inited_)))){ nextFrame(); init(); inited_ = true; }; } private function init():void{ var _local1:Class = Class(getDefinitionByName("Main")); if (_local1){ addChild(new (_local1)); }; } } }//package
Section 143
//PRINCESS_ANIM (PRINCESS_ANIM) package { import flash.display.*; public dynamic class PRINCESS_ANIM extends MovieClip { public function PRINCESS_ANIM(){ addFrameScript(92, frame93, 93, frame94); } function frame94(){ stop(); } function frame93(){ gotoAndPlay(1); } } }//package
Section 144
//PUZZLE_INTERFACE (PUZZLE_INTERFACE) package { import flash.display.*; import flash.text.*; public dynamic class PUZZLE_INTERFACE extends MovieClip { public var rightCount:TextField; public var upCount:TextField; public var leftCount:TextField; public var downCount:TextField; public var levelName:TextField; } }//package
Section 145
//RadioButton_disabledIcon (RadioButton_disabledIcon) package { import flash.display.*; public dynamic class RadioButton_disabledIcon extends MovieClip { } }//package
Section 146
//RadioButton_downIcon (RadioButton_downIcon) package { import flash.display.*; public dynamic class RadioButton_downIcon extends MovieClip { } }//package
Section 147
//RadioButton_overIcon (RadioButton_overIcon) package { import flash.display.*; public dynamic class RadioButton_overIcon extends MovieClip { } }//package
Section 148
//RadioButton_selectedDisabledIcon (RadioButton_selectedDisabledIcon) package { import flash.display.*; public dynamic class RadioButton_selectedDisabledIcon extends MovieClip { } }//package
Section 149
//RadioButton_selectedDownIcon (RadioButton_selectedDownIcon) package { import flash.display.*; public dynamic class RadioButton_selectedDownIcon extends MovieClip { } }//package
Section 150
//RadioButton_selectedOverIcon (RadioButton_selectedOverIcon) package { import flash.display.*; public dynamic class RadioButton_selectedOverIcon extends MovieClip { } }//package
Section 151
//RadioButton_selectedUpIcon (RadioButton_selectedUpIcon) package { import flash.display.*; public dynamic class RadioButton_selectedUpIcon extends MovieClip { } }//package
Section 152
//RadioButton_upIcon (RadioButton_upIcon) package { import flash.display.*; public dynamic class RadioButton_upIcon extends MovieClip { } }//package
Section 153
//SAVE_INTERFACE (SAVE_INTERFACE) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.geom.*; import fl.controls.*; import flash.text.*; import flash.net.*; import flash.system.*; import flash.utils.*; import flash.ui.*; import flash.filters.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.xml.*; public dynamic class SAVE_INTERFACE extends MovieClip { public var __id9_:Label; public var __id12_:Label; public var left:NumericStepper; public var author:TextInput; public var up:NumericStepper; public var right:NumericStepper; public var down:NumericStepper; public var goalSave:RadioButton; public var __id7_:Label; public var __id10_:Label; public var base64:TextArea; public var goalFeed:RadioButton; public var quit:Button; public var title:TextInput; public var __id8_:Label; public var __id11_:Label; public var goalFire:RadioButton; public function SAVE_INTERFACE(){ __setProp_quit_SAVE_INTERFACE_controls_0(); __setProp_base64_SAVE_INTERFACE_controls_0(); __setProp___id7__SAVE_INTERFACE_controls_0(); __setProp___id8__SAVE_INTERFACE_controls_0(); __setProp___id9__SAVE_INTERFACE_controls_0(); __setProp_title_SAVE_INTERFACE_controls_0(); __setProp___id10__SAVE_INTERFACE_controls_0(); __setProp_author_SAVE_INTERFACE_controls_0(); __setProp_up_SAVE_INTERFACE_controls_0(); __setProp_goalSave_SAVE_INTERFACE_controls_0(); __setProp_goalFeed_SAVE_INTERFACE_controls_0(); __setProp_goalFire_SAVE_INTERFACE_controls_0(); __setProp___id11__SAVE_INTERFACE_controls_0(); __setProp___id12__SAVE_INTERFACE_controls_0(); __setProp_down_SAVE_INTERFACE_controls_0(); __setProp_left_SAVE_INTERFACE_controls_0(); __setProp_right_SAVE_INTERFACE_controls_0(); } function __setProp_goalSave_SAVE_INTERFACE_controls_0(){ try { goalSave["componentInspectorSetting"] = true; } catch(e:Error) { }; goalSave.enabled = true; goalSave.groupName = "winStyle"; goalSave.label = "Saving the princess"; goalSave.labelPlacement = "right"; goalSave.selected = false; goalSave.value = ""; goalSave.visible = true; try { goalSave["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_left_SAVE_INTERFACE_controls_0(){ try { left["componentInspectorSetting"] = true; } catch(e:Error) { }; left.enabled = true; left.maximum = 99; left.minimum = 0; left.stepSize = 1; left.value = 99; left.visible = true; try { left["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id9__SAVE_INTERFACE_controls_0(){ try { __id9_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id9_.autoSize = "none"; __id9_.condenseWhite = false; __id9_.enabled = true; __id9_.htmlText = ""; __id9_.selectable = false; __id9_.text = "Level title:"; __id9_.visible = true; __id9_.wordWrap = false; try { __id9_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_author_SAVE_INTERFACE_controls_0(){ try { author["componentInspectorSetting"] = true; } catch(e:Error) { }; author.displayAsPassword = false; author.editable = true; author.enabled = true; author.maxChars = 128; author.restrict = ""; author.text = ""; author.visible = true; try { author["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id10__SAVE_INTERFACE_controls_0(){ try { __id10_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id10_.autoSize = "none"; __id10_.condenseWhite = false; __id10_.enabled = true; __id10_.htmlText = ""; __id10_.selectable = false; __id10_.text = "Level author:"; __id10_.visible = true; __id10_.wordWrap = false; try { __id10_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id8__SAVE_INTERFACE_controls_0(){ try { __id8_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id8_.autoSize = "center"; __id8_.condenseWhite = false; __id8_.enabled = true; __id8_.htmlText = ""; __id8_.selectable = false; __id8_.text = "Paste it on the web to share your creation!"; __id8_.visible = true; __id8_.wordWrap = false; try { __id8_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_right_SAVE_INTERFACE_controls_0(){ try { right["componentInspectorSetting"] = true; } catch(e:Error) { }; right.enabled = true; right.maximum = 99; right.minimum = 0; right.stepSize = 1; right.value = 99; right.visible = true; try { right["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_up_SAVE_INTERFACE_controls_0(){ try { up["componentInspectorSetting"] = true; } catch(e:Error) { }; up.enabled = true; up.maximum = 99; up.minimum = 0; up.stepSize = 1; up.value = 99; up.visible = true; try { up["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id7__SAVE_INTERFACE_controls_0(){ try { __id7_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id7_.autoSize = "center"; __id7_.condenseWhite = false; __id7_.enabled = true; __id7_.htmlText = ""; __id7_.selectable = false; __id7_.text = "This text represents your saved level data."; __id7_.visible = true; __id7_.wordWrap = false; try { __id7_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id12__SAVE_INTERFACE_controls_0(){ try { __id12_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id12_.autoSize = "none"; __id12_.condenseWhite = false; __id12_.enabled = true; __id12_.htmlText = ""; __id12_.selectable = false; __id12_.text = "Launchers allowed:"; __id12_.visible = true; __id12_.wordWrap = false; try { __id12_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_goalFeed_SAVE_INTERFACE_controls_0(){ try { goalFeed["componentInspectorSetting"] = true; } catch(e:Error) { }; goalFeed.enabled = true; goalFeed.groupName = "winStyle"; goalFeed.label = "Feeding the monster"; goalFeed.labelPlacement = "right"; goalFeed.selected = false; goalFeed.value = ""; goalFeed.visible = true; try { goalFeed["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_quit_SAVE_INTERFACE_controls_0(){ try { quit["componentInspectorSetting"] = true; } catch(e:Error) { }; quit.emphasized = false; quit.enabled = true; quit.label = "Return to editor"; quit.labelPlacement = "right"; quit.selected = false; quit.toggle = false; quit.visible = true; try { quit["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_down_SAVE_INTERFACE_controls_0(){ try { down["componentInspectorSetting"] = true; } catch(e:Error) { }; down.enabled = true; down.maximum = 99; down.minimum = 0; down.stepSize = 1; down.value = 99; down.visible = true; try { down["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_title_SAVE_INTERFACE_controls_0(){ try { title["componentInspectorSetting"] = true; } catch(e:Error) { }; title.displayAsPassword = false; title.editable = true; title.enabled = true; title.maxChars = 128; title.restrict = ""; title.text = ""; title.visible = true; try { title["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_base64_SAVE_INTERFACE_controls_0(){ try { base64["componentInspectorSetting"] = true; } catch(e:Error) { }; base64.condenseWhite = false; base64.editable = false; base64.enabled = true; base64.horizontalScrollPolicy = "off"; base64.htmlText = ""; base64.maxChars = 0; base64.restrict = ""; base64.text = ""; base64.verticalScrollPolicy = "auto"; base64.visible = true; base64.wordWrap = true; try { base64["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp_goalFire_SAVE_INTERFACE_controls_0(){ try { goalFire["componentInspectorSetting"] = true; } catch(e:Error) { }; goalFire.enabled = true; goalFire.groupName = "winStyle"; goalFire.label = "Firing the knight off-screen"; goalFire.labelPlacement = "right"; goalFire.selected = false; goalFire.value = ""; goalFire.visible = true; try { goalFire["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id11__SAVE_INTERFACE_controls_0(){ try { __id11_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id11_.autoSize = "none"; __id11_.condenseWhite = false; __id11_.enabled = true; __id11_.htmlText = ""; __id11_.selectable = false; __id11_.text = "Win by:"; __id11_.visible = true; __id11_.wordWrap = false; try { __id11_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 154
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_disabledSkin extends MovieClip { } }//package
Section 155
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_downSkin extends MovieClip { } }//package
Section 156
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_overSkin extends MovieClip { } }//package
Section 157
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_upSkin extends MovieClip { } }//package
Section 158
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_disabledSkin extends MovieClip { } }//package
Section 159
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_downSkin extends MovieClip { } }//package
Section 160
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_overSkin extends MovieClip { } }//package
Section 161
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_upSkin extends MovieClip { } }//package
Section 162
//ScrollBar_thumbIcon (ScrollBar_thumbIcon) package { import flash.display.*; public dynamic class ScrollBar_thumbIcon extends MovieClip { } }//package
Section 163
//ScrollPane_disabledSkin (ScrollPane_disabledSkin) package { import flash.display.*; public dynamic class ScrollPane_disabledSkin extends MovieClip { } }//package
Section 164
//ScrollPane_upSkin (ScrollPane_upSkin) package { import flash.display.*; public dynamic class ScrollPane_upSkin extends MovieClip { } }//package
Section 165
//ScrollThumb_downSkin (ScrollThumb_downSkin) package { import flash.display.*; public dynamic class ScrollThumb_downSkin extends MovieClip { } }//package
Section 166
//ScrollThumb_overSkin (ScrollThumb_overSkin) package { import flash.display.*; public dynamic class ScrollThumb_overSkin extends MovieClip { } }//package
Section 167
//ScrollThumb_upSkin (ScrollThumb_upSkin) package { import flash.display.*; public dynamic class ScrollThumb_upSkin extends MovieClip { } }//package
Section 168
//ScrollTrack_skin (ScrollTrack_skin) package { import flash.display.*; public dynamic class ScrollTrack_skin extends MovieClip { } }//package
Section 169
//Silence1 (Silence1) package { import flash.media.*; public dynamic class Silence1 extends Sound { } }//package
Section 170
//SITELOCK (SITELOCK) package { import flash.display.*; public dynamic class SITELOCK extends MovieClip { } }//package
Section 171
//SOUND_TOGGLE (SOUND_TOGGLE) package { import flash.display.*; public dynamic class SOUND_TOGGLE extends MovieClip { public function SOUND_TOGGLE(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 172
//SPARKLE_DOWN (SPARKLE_DOWN) package { import flash.display.*; public dynamic class SPARKLE_DOWN extends MovieClip { } }//package
Section 173
//SPARKLE_LEFT (SPARKLE_LEFT) package { import flash.display.*; public dynamic class SPARKLE_LEFT extends MovieClip { } }//package
Section 174
//SPARKLE_MASK (SPARKLE_MASK) package { import flash.display.*; public dynamic class SPARKLE_MASK extends MovieClip { } }//package
Section 175
//SPARKLE_RIGHT (SPARKLE_RIGHT) package { import flash.display.*; public dynamic class SPARKLE_RIGHT extends MovieClip { } }//package
Section 176
//SPARKLE_UP (SPARKLE_UP) package { import flash.display.*; public dynamic class SPARKLE_UP extends MovieClip { } }//package
Section 177
//STAR (STAR) package { import flash.display.*; public dynamic class STAR extends MovieClip { } }//package
Section 178
//State (State) package { import flash.net.*; import flash.utils.*; public final class State { private static var levels_:Array; private static function LoadSO():void{ var so:SharedObject; var bytearray:ByteArray; levels_ = []; try { so = SharedObject.getLocal("saves"); if (so.data.serial){ bytearray = so.data.serial; levels_ = bytearray.readObject(); } else { trace("No data saved"); }; } catch(e:Error) { trace(e); }; } private static function SaveSO():void{ var so:SharedObject; var bytearray:ByteArray; try { so = SharedObject.getLocal("saves"); bytearray = new ByteArray(); bytearray.writeObject(levels_); so.data.serial = bytearray; so.flush(); } catch(e:Error) { trace(e); }; } public static function SetLevelComplete(_arg1:int):void{ if (!levels_){ LoadSO(); }; levels_[_arg1] = true; SaveSO(); } public static function LevelComplete(_arg1:int):Boolean{ if (!levels_){ LoadSO(); }; return (levels_[_arg1]); } } }//package
Section 179
//Step1 (Step1) package { import flash.media.*; public dynamic class Step1 extends Sound { } }//package
Section 180
//SUCCESS_SCREEN (SUCCESS_SCREEN) package { import flash.display.*; public dynamic class SUCCESS_SCREEN extends MovieClip { public var button2:BUTTON_MENU; public var button:BUTTON_NEXT; } }//package
Section 181
//TextArea_disabledSkin (TextArea_disabledSkin) package { import flash.display.*; public dynamic class TextArea_disabledSkin extends MovieClip { } }//package
Section 182
//TextArea_upSkin (TextArea_upSkin) package { import flash.display.*; public dynamic class TextArea_upSkin extends MovieClip { } }//package
Section 183
//TextInput_disabledSkin (TextInput_disabledSkin) package { import flash.display.*; public dynamic class TextInput_disabledSkin extends MovieClip { } }//package
Section 184
//TextInput_upSkin (TextInput_upSkin) package { import flash.display.*; public dynamic class TextInput_upSkin extends MovieClip { } }//package
Section 185
//TITLES (TITLES) package { import flash.display.*; public dynamic class TITLES extends MovieClip { public var shenGames:SimpleButton; public var sound:SOUND_TOGGLE; public var marsh:SimpleButton; public var editor:SimpleButton; public var puzzle:SimpleButton; public var loadCustom:SimpleButton; public var armor:SimpleButton; } }//package
Section 186
//TUTORIALS (TUTORIALS) package { import flash.display.*; public dynamic class TUTORIALS extends MovieClip { public function TUTORIALS(){ addFrameScript(0, frame1, 15, frame16, 22, frame23, 29, frame30); } function frame30(){ gotoAndPlay("t5"); } function frame16(){ gotoAndPlay("t1"); } function frame1(){ stop(); } function frame23(){ gotoAndPlay("t2"); } } }//package
Section 187
//Win1 (Win1) package { import flash.media.*; public dynamic class Win1 extends Sound { } }//package

Library Items

Symbol 1 GraphicUsed by:11
Symbol 2 GraphicUsed by:8
Symbol 3 GraphicUsed by:8
Symbol 4 GraphicUsed by:8
Symbol 5 GraphicUsed by:8
Symbol 6 GraphicUsed by:8
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClip {preloader_fla.KNIGHT_2} [preloader_fla.KNIGHT_2]Uses:2 3 4 5 6 7Used by:11
Symbol 9 FontUsed by:10
Symbol 10 EditableTextUses:9Used by:11
Symbol 11 MovieClip {PRELOADER} [PRELOADER]Uses:1 8 10
Symbol 12 Sound {Silence1} [Silence1]
Symbol 13 Sound {Gateclose1} [Gateclose1]
Symbol 14 Sound {Step1} [Step1]
Symbol 15 Sound {Marsh1} [Marsh1]
Symbol 16 Sound {Launch1} [Launch1]
Symbol 17 Sound {Fail1} [Fail1]
Symbol 18 Sound {Explode1} [Explode1]
Symbol 19 Sound {Blip1} [Blip1]
Symbol 20 Sound {Fireworks1} [Fireworks1]
Symbol 21 Sound {Gameshow1} [Gameshow1]
Symbol 22 Sound {Win1} [Win1]
Symbol 23 Sound {LauncherExplode1} [LauncherExplode1]
Symbol 24 Sound {KnightEscape1} [KnightEscape1]
Symbol 25 FontUsed by:26
Symbol 26 EditableTextUses:25Used by:27
Symbol 27 MovieClip {SITELOCK} [SITELOCK]Uses:26
Symbol 28 BitmapUsed by:29 252
Symbol 29 GraphicUses:28Used by:52
Symbol 30 GraphicUsed by:31
Symbol 31 ButtonUses:30Used by:52
Symbol 32 GraphicUsed by:33
Symbol 33 ButtonUses:32Used by:52
Symbol 34 GraphicUsed by:35
Symbol 35 ButtonUses:34Used by:52
Symbol 36 GraphicUsed by:41
Symbol 37 GraphicUsed by:38
Symbol 38 MovieClipUses:37Used by:41 171
Symbol 39 BitmapUsed by:40 69
Symbol 40 GraphicUses:39Used by:41
Symbol 41 MovieClip {SOUND_TOGGLE} [SOUND_TOGGLE]Uses:36 38 40Used by:52
Symbol 42 GraphicUsed by:43 44
Symbol 43 MovieClipUses:42Used by:44
Symbol 44 ButtonUses:43 42Used by:52
Symbol 45 BitmapUsed by:47
Symbol 46 BitmapUsed by:47
Symbol 47 GraphicUses:46 45Used by:48
Symbol 48 ButtonUses:47Used by:52
Symbol 49 BitmapUsed by:50
Symbol 50 GraphicUses:49Used by:51
Symbol 51 ButtonUses:50Used by:52
Symbol 52 MovieClip {TITLES} [TITLES]Uses:29 31 33 35 41 44 48 51
Symbol 53 GraphicUsed by:54
Symbol 54 MovieClip {COVER_UP} [COVER_UP]Uses:53
Symbol 55 BitmapUsed by:56 124
Symbol 56 GraphicUses:55Used by:57
Symbol 57 MovieClip {BRIDGE} [BRIDGE]Uses:56
Symbol 58 GraphicUsed by:59
Symbol 59 Button {GATE_START} [GATE_START]Uses:58
Symbol 60 BitmapUsed by:61
Symbol 61 GraphicUses:60Used by:68
Symbol 62 BitmapUsed by:63
Symbol 63 GraphicUses:62Used by:68
Symbol 64 BitmapUsed by:65
Symbol 65 GraphicUses:64Used by:68
Symbol 66 BitmapUsed by:67
Symbol 67 GraphicUses:66Used by:68
Symbol 68 MovieClip {BACKGROUND} [BACKGROUND]Uses:61 63 65 67
Symbol 69 GraphicUses:39Used by:74
Symbol 70 BitmapUsed by:71
Symbol 71 GraphicUses:70Used by:74
Symbol 72 BitmapUsed by:73
Symbol 73 GraphicUses:72Used by:74
Symbol 74 MovieClip {PRINCESS_ANIM} [PRINCESS_ANIM]Uses:69 71 73
Symbol 75 BitmapUsed by:76 165
Symbol 76 GraphicUses:75Used by:87
Symbol 77 BitmapUsed by:78
Symbol 78 GraphicUses:77Used by:87
Symbol 79 BitmapUsed by:80
Symbol 80 GraphicUses:79Used by:87
Symbol 81 BitmapUsed by:82
Symbol 82 GraphicUses:81Used by:87
Symbol 83 BitmapUsed by:84
Symbol 84 GraphicUses:83Used by:87
Symbol 85 BitmapUsed by:86
Symbol 86 GraphicUses:85Used by:87
Symbol 87 MovieClip {GATE_ANIM} [GATE_ANIM]Uses:76 78 80 82 84 86
Symbol 88 BitmapUsed by:89
Symbol 89 GraphicUses:88Used by:164 171
Symbol 90 BitmapUsed by:91
Symbol 91 GraphicUses:90Used by:92
Symbol 92 ButtonUses:91Used by:171
Symbol 93 BitmapUsed by:94
Symbol 94 GraphicUses:93Used by:95
Symbol 95 ButtonUses:94Used by:171
Symbol 96 GraphicUsed by:97
Symbol 97 ButtonUses:96Used by:171
Symbol 98 GraphicUsed by:99
Symbol 99 ButtonUses:98Used by:171
Symbol 100 GraphicUsed by:101
Symbol 101 ButtonUses:100Used by:171
Symbol 102 GraphicUsed by:103
Symbol 103 ButtonUses:102Used by:171
Symbol 104 FontUsed by:105 106 155 158 162 167 169 458 460
Symbol 105 EditableTextUses:104 459Used by:171
Symbol 106 EditableTextUses:104 459Used by:171
Symbol 107 GraphicUsed by:108
Symbol 108 ButtonUses:107Used by:171
Symbol 109 GraphicUsed by:110
Symbol 110 ButtonUses:109Used by:164 171
Symbol 111 GraphicUsed by:171 372
Symbol 112 BitmapUsed by:113 330
Symbol 113 GraphicUses:112Used by:114
Symbol 114 ButtonUses:113Used by:146
Symbol 115 BitmapUsed by:116 364
Symbol 116 GraphicUses:115Used by:117
Symbol 117 ButtonUses:116Used by:146
Symbol 118 BitmapUsed by:119 360
Symbol 119 GraphicUses:118Used by:120
Symbol 120 ButtonUses:119Used by:146
Symbol 121 BitmapUsed by:122 332
Symbol 122 GraphicUses:121Used by:123
Symbol 123 ButtonUses:122Used by:146
Symbol 124 GraphicUses:55Used by:127
Symbol 125 GraphicUsed by:126 127 133 136 139 142
Symbol 126 MovieClipUses:125Used by:127 133 136 139 142
Symbol 127 ButtonUses:124 126 125Used by:146
Symbol 128 BitmapUsed by:129 350
Symbol 129 GraphicUses:128Used by:130
Symbol 130 ButtonUses:129Used by:146
Symbol 131 BitmapUsed by:132 373
Symbol 132 GraphicUses:131Used by:133
Symbol 133 ButtonUses:132 126 125Used by:146
Symbol 134 BitmapUsed by:135 362
Symbol 135 GraphicUses:134Used by:136
Symbol 136 ButtonUses:135 126 125Used by:146
Symbol 137 BitmapUsed by:138 376
Symbol 138 GraphicUses:137Used by:139
Symbol 139 ButtonUses:138 126 125Used by:146
Symbol 140 BitmapUsed by:141 381
Symbol 141 GraphicUses:140Used by:142
Symbol 142 ButtonUses:141 126 125Used by:146
Symbol 143 BitmapUsed by:144 379
Symbol 144 GraphicUses:143Used by:145
Symbol 145 ButtonUses:144Used by:146
Symbol 146 MovieClipUses:114 117 120 123 127 130 133 136 139 142 145Used by:171
Symbol 147 GraphicUsed by:148 349
Symbol 148 ButtonUses:147Used by:164
Symbol 149 GraphicUsed by:150 378
Symbol 150 ButtonUses:149Used by:164
Symbol 151 GraphicUsed by:152 334
Symbol 152 ButtonUses:151Used by:164
Symbol 153 GraphicUsed by:154 329
Symbol 154 ButtonUses:153Used by:164
Symbol 155 EditableTextUses:104 459Used by:164
Symbol 156 GraphicUsed by:157
Symbol 157 ButtonUses:156Used by:164
Symbol 158 EditableTextUses:104 459Used by:159
Symbol 159 MovieClipUses:158Used by:164
Symbol 160 GraphicUsed by:161
Symbol 161 ButtonUses:160Used by:164
Symbol 162 EditableTextUses:104 459Used by:163
Symbol 163 MovieClipUses:162Used by:164
Symbol 164 MovieClip {PLAYER_PANEL} [PLAYER_PANEL]Uses:89 148 150 152 154 110 155 157 159 161 163Used by:171
Symbol 165 GraphicUses:75Used by:166
Symbol 166 Button {MAIN_MENU_BUTTON} [MAIN_MENU_BUTTON]Uses:165Used by:171
Symbol 167 EditableTextUses:104 459Used by:171
Symbol 168 MovieClipUsed by:171
Symbol 169 EditableTextUses:104 459Used by:170
Symbol 170 MovieClip {GAME_REPORT} [GAME_REPORT]Uses:169Used by:171
Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE]Uses:89 92 95 97 99 101 103 105 106 108 110 111 146 164 166 167 168 170 38
Symbol 172 GraphicUsed by:180
Symbol 173 GraphicUsed by:180
Symbol 174 BitmapUsed by:176 177
Symbol 175 BitmapUsed by:176 177
Symbol 176 GraphicUses:174 175Used by:180
Symbol 177 GraphicUses:174 175Used by:180
Symbol 178 GraphicUsed by:180
Symbol 179 GraphicUsed by:180
Symbol 180 MovieClip {TUTORIALS} [TUTORIALS]Uses:172 173 176 177 178 179
Symbol 181 GraphicUsed by:182
Symbol 182 MovieClipUses:181Used by:221 226 227 228 247 387 404 420
Symbol 183 MovieClip {fl.core.ComponentShim} [fl.core.ComponentShim]Used by:220 221 226 227 228 247 387 404 420
Symbol 184 GraphicUsed by:185
Symbol 185 MovieClipUses:184Used by:188 189
Symbol 186 GraphicUsed by:187
Symbol 187 MovieClipUses:186Used by:188 189
Symbol 188 MovieClip {ScrollPane_disabledSkin} [ScrollPane_disabledSkin]Uses:185 187Used by:221
Symbol 189 MovieClip {ScrollPane_upSkin} [ScrollPane_upSkin]Uses:185 187Used by:221
Symbol 190 GraphicUsed by:191
Symbol 191 MovieClip {ScrollTrack_skin} [ScrollTrack_skin]Uses:190Used by:220 226
Symbol 192 GraphicUsed by:193
Symbol 193 MovieClip {focusRectSkin} [focusRectSkin]Uses:192Used by:220 226 227 247 387 404 420
Symbol 194 GraphicUsed by:197
Symbol 195 GraphicUsed by:196 199 203 213 389 391 393 395 397 399 401 403
Symbol 196 MovieClipUses:195Used by:197 207 209
Symbol 197 MovieClip {ScrollArrowUp_downSkin} [ScrollArrowUp_downSkin]Uses:194 196Used by:220 226
Symbol 198 GraphicUsed by:199
Symbol 199 MovieClip {ScrollArrowDown_downSkin} [ScrollArrowDown_downSkin]Uses:198 195Used by:220 226
Symbol 200 GraphicUsed by:201
Symbol 201 MovieClip {ScrollThumb_downSkin} [ScrollThumb_downSkin]Uses:200Used by:220 226
Symbol 202 GraphicUsed by:203
Symbol 203 MovieClip {ScrollArrowDown_overSkin} [ScrollArrowDown_overSkin]Uses:202 195Used by:220 226
Symbol 204 GraphicUsed by:205
Symbol 205 MovieClip {ScrollThumb_overSkin} [ScrollThumb_overSkin]Uses:204Used by:220 226
Symbol 206 GraphicUsed by:207
Symbol 207 MovieClip {ScrollArrowUp_overSkin} [ScrollArrowUp_overSkin]Uses:206 196Used by:220 226
Symbol 208 GraphicUsed by:209
Symbol 209 MovieClip {ScrollArrowUp_upSkin} [ScrollArrowUp_upSkin]Uses:208 196Used by:220 226
Symbol 210 GraphicUsed by:211
Symbol 211 MovieClip {ScrollThumb_upSkin} [ScrollThumb_upSkin]Uses:210Used by:220 226
Symbol 212 GraphicUsed by:213
Symbol 213 MovieClip {ScrollArrowDown_upSkin} [ScrollArrowDown_upSkin]Uses:212 195Used by:220 226
Symbol 214 GraphicUsed by:215
Symbol 215 MovieClip {ScrollArrowDown_disabledSkin} [ScrollArrowDown_disabledSkin]Uses:214Used by:220 226
Symbol 216 GraphicUsed by:217
Symbol 217 MovieClip {ScrollArrowUp_disabledSkin} [ScrollArrowUp_disabledSkin]Uses:216Used by:220 226
Symbol 218 GraphicUsed by:219
Symbol 219 MovieClip {ScrollBar_thumbIcon} [ScrollBar_thumbIcon]Uses:218Used by:220 226
Symbol 220 MovieClip {fl.controls.ScrollBar} [fl.controls.ScrollBar]Uses:191 183 193 197 199 201 203 205 207 209 211 213 215 217 219Used by:221
Symbol 221 MovieClip {fl.containers.ScrollPane} [fl.containers.ScrollPane]Uses:182 183 188 189 220Used by:249 421
Symbol 222 GraphicUsed by:223 385
Symbol 223 MovieClip {TextArea_disabledSkin} [TextArea_disabledSkin]Uses:222Used by:227
Symbol 224 GraphicUsed by:225 386
Symbol 225 MovieClip {TextArea_upSkin} [TextArea_upSkin]Uses:224Used by:227
Symbol 226 MovieClip {fl.controls.UIScrollBar} [fl.controls.UIScrollBar]Uses:182 183 193 191 197 199 201 203 205 207 209 211 213 215 217 219Used by:227
Symbol 227 MovieClip {fl.controls.TextArea} [fl.controls.TextArea]Uses:182 183 223 225 193 226Used by:249 421
Symbol 228 MovieClip {fl.controls.Label} [fl.controls.Label]Uses:182 183Used by:248 249 421
Symbol 229 GraphicUsed by:230
Symbol 230 MovieClip {Button_disabledSkin} [Button_disabledSkin]Uses:229Used by:247
Symbol 231 GraphicUsed by:232
Symbol 232 MovieClip {Button_downSkin} [Button_downSkin]Uses:231Used by:247
Symbol 233 GraphicUsed by:234
Symbol 234 MovieClip {Button_emphasizedSkin} [Button_emphasizedSkin]Uses:233Used by:247
Symbol 235 GraphicUsed by:236
Symbol 236 MovieClip {Button_overSkin} [Button_overSkin]Uses:235Used by:247
Symbol 237 GraphicUsed by:238
Symbol 238 MovieClip {Button_selectedDisabledSkin} [Button_selectedDisabledSkin]Uses:237Used by:247
Symbol 239 GraphicUsed by:240
Symbol 240 MovieClip {Button_selectedDownSkin} [Button_selectedDownSkin]Uses:239Used by:247
Symbol 241 GraphicUsed by:242
Symbol 242 MovieClip {Button_selectedOverSkin} [Button_selectedOverSkin]Uses:241Used by:247
Symbol 243 GraphicUsed by:244
Symbol 244 MovieClip {Button_selectedUpSkin} [Button_selectedUpSkin]Uses:243Used by:247
Symbol 245 GraphicUsed by:246
Symbol 246 MovieClip {Button_upSkin} [Button_upSkin]Uses:245Used by:247
Symbol 247 MovieClip {fl.controls.Button} [fl.controls.Button]Uses:182 183 230 232 234 236 238 240 242 244 246 193Used by:249 421
Symbol 248 MovieClip {PrincessAssets_fla.Symbol3_191} [PrincessAssets_fla.Symbol3_191]Uses:228Used by:249
Symbol 249 MovieClip {LOAD_INTERFACE} [LOAD_INTERFACE]Uses:221 227 228 247 248
Symbol 250 GraphicUsed by:251
Symbol 251 MovieClip {MEDAL} [MEDAL]Uses:250
Symbol 252 GraphicUses:28Used by:325
Symbol 253 BitmapUsed by:254
Symbol 254 GraphicUses:253Used by:255
Symbol 255 ButtonUses:254Used by:325
Symbol 256 BitmapUsed by:257
Symbol 257 GraphicUses:256Used by:258
Symbol 258 ButtonUses:257Used by:325
Symbol 259 BitmapUsed by:260
Symbol 260 GraphicUses:259Used by:261
Symbol 261 ButtonUses:260Used by:325
Symbol 262 BitmapUsed by:263
Symbol 263 GraphicUses:262Used by:264
Symbol 264 ButtonUses:263Used by:325
Symbol 265 BitmapUsed by:266
Symbol 266 GraphicUses:265Used by:267
Symbol 267 ButtonUses:266Used by:325
Symbol 268 BitmapUsed by:269
Symbol 269 GraphicUses:268Used by:270
Symbol 270 ButtonUses:269Used by:325
Symbol 271 BitmapUsed by:272
Symbol 272 GraphicUses:271Used by:273
Symbol 273 ButtonUses:272Used by:325
Symbol 274 BitmapUsed by:275
Symbol 275 GraphicUses:274Used by:276
Symbol 276 ButtonUses:275Used by:325
Symbol 277 BitmapUsed by:278
Symbol 278 GraphicUses:277Used by:279
Symbol 279 ButtonUses:278Used by:325
Symbol 280 BitmapUsed by:281
Symbol 281 GraphicUses:280Used by:282
Symbol 282 ButtonUses:281Used by:325
Symbol 283 BitmapUsed by:284
Symbol 284 GraphicUses:283Used by:285
Symbol 285 ButtonUses:284Used by:325
Symbol 286 BitmapUsed by:287
Symbol 287 GraphicUses:286Used by:288
Symbol 288 ButtonUses:287Used by:325
Symbol 289 BitmapUsed by:290
Symbol 290 GraphicUses:289Used by:291
Symbol 291 ButtonUses:290Used by:325
Symbol 292 BitmapUsed by:293
Symbol 293 GraphicUses:292Used by:294
Symbol 294 ButtonUses:293Used by:325
Symbol 295 BitmapUsed by:296
Symbol 296 GraphicUses:295Used by:297
Symbol 297 ButtonUses:296Used by:325
Symbol 298 BitmapUsed by:299
Symbol 299 GraphicUses:298Used by:300
Symbol 300 ButtonUses:299Used by:325
Symbol 301 BitmapUsed by:302
Symbol 302 GraphicUses:301Used by:303
Symbol 303 ButtonUses:302Used by:325
Symbol 304 BitmapUsed by:305
Symbol 305 GraphicUses:304Used by:306
Symbol 306 ButtonUses:305Used by:325
Symbol 307 BitmapUsed by:308
Symbol 308 GraphicUses:307Used by:309
Symbol 309 ButtonUses:308Used by:325
Symbol 310 BitmapUsed by:311
Symbol 311 GraphicUses:310Used by:312
Symbol 312 ButtonUses:311Used by:325
Symbol 313 BitmapUsed by:314
Symbol 314 GraphicUses:313Used by:315
Symbol 315 ButtonUses:314Used by:325
Symbol 316 BitmapUsed by:317
Symbol 317 GraphicUses:316Used by:318
Symbol 318 ButtonUses:317Used by:325
Symbol 319 BitmapUsed by:320
Symbol 320 GraphicUses:319Used by:321
Symbol 321 ButtonUses:320Used by:325
Symbol 322 BitmapUsed by:323
Symbol 323 GraphicUses:322Used by:324
Symbol 324 ButtonUses:323Used by:325
Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT]Uses:252 255 258 261 264 267 270 273 276 279 282 285 288 291 294 297 300 303 306 309 312 315 318 321 324
Symbol 326 BitmapUsed by:327
Symbol 327 GraphicUses:326Used by:328
Symbol 328 MovieClip {LOCKED} [LOCKED]Uses:327
Symbol 329 MovieClip {LAUNCHER_RIGHT} [LAUNCHER_RIGHT]Uses:153Used by:421
Symbol 330 GraphicUses:112Used by:331
Symbol 331 MovieClip {LAUNCHER_PERM_DOWN} [LAUNCHER_PERM_DOWN]Uses:330
Symbol 332 GraphicUses:121Used by:333
Symbol 333 MovieClip {BLOCK_GRAY} [BLOCK_GRAY]Uses:332
Symbol 334 MovieClip {LAUNCHER_LEFT} [LAUNCHER_LEFT]Uses:151Used by:421
Symbol 335 BitmapUsed by:336
Symbol 336 GraphicUses:335Used by:347
Symbol 337 BitmapUsed by:338
Symbol 338 GraphicUses:337Used by:347
Symbol 339 BitmapUsed by:340
Symbol 340 GraphicUses:339Used by:347
Symbol 341 BitmapUsed by:342
Symbol 342 GraphicUses:341Used by:347
Symbol 343 BitmapUsed by:344
Symbol 344 GraphicUses:343Used by:347
Symbol 345 BitmapUsed by:346
Symbol 346 GraphicUses:345Used by:347
Symbol 347 MovieClip {SPARKLE_UP} [SPARKLE_UP]Uses:336 338 340 342 344 346Used by:348 366 384
Symbol 348 MovieClip {SPARKLE_LEFT} [SPARKLE_LEFT]Uses:347
Symbol 349 MovieClip {LAUNCHER_UP} [LAUNCHER_UP]Uses:147Used by:421
Symbol 350 GraphicUses:128Used by:359
Symbol 351 BitmapUsed by:352
Symbol 352 GraphicUses:351Used by:359
Symbol 353 BitmapUsed by:354
Symbol 354 GraphicUses:353Used by:359
Symbol 355 BitmapUsed by:356
Symbol 356 GraphicUses:355Used by:359
Symbol 357 BitmapUsed by:358
Symbol 358 GraphicUses:357Used by:359
Symbol 359 MovieClip {MONSTER} [MONSTER]Uses:350 352 354 356 358Used by:371
Symbol 360 GraphicUses:118Used by:361
Symbol 361 MovieClip {LAUNCHER_PERM_RIGHT} [LAUNCHER_PERM_RIGHT]Uses:360
Symbol 362 GraphicUses:134Used by:363
Symbol 363 MovieClip {BUTTON_RED} [BUTTON_RED]Uses:362
Symbol 364 GraphicUses:115Used by:365
Symbol 365 MovieClip {LAUNCHER_PERM_LEFT} [LAUNCHER_PERM_LEFT]Uses:364
Symbol 366 MovieClip {SPARKLE_DOWN} [SPARKLE_DOWN]Uses:347
Symbol 367 GraphicUsed by:368
Symbol 368 MovieClip {BUTTON_RED_DISABLED} [BUTTON_RED_DISABLED]Uses:367
Symbol 369 GraphicUsed by:370
Symbol 370 MovieClip {BUTTON_GREEN_DISABLED} [BUTTON_GREEN_DISABLED]Uses:369
Symbol 371 MovieClip {MONSTER_SHIFTED} [MONSTER_SHIFTED]Uses:359
Symbol 372 MovieClip {SPARKLE_MASK} [SPARKLE_MASK]Uses:111
Symbol 373 GraphicUses:131Used by:374
Symbol 374 MovieClipUses:373Used by:375
Symbol 375 MovieClip {INVISIBLE_GREEN} [INVISIBLE_GREEN]Uses:374
Symbol 376 GraphicUses:137Used by:377
Symbol 377 MovieClip {BUTTON_GREEN} [BUTTON_GREEN]Uses:376
Symbol 378 MovieClip {LAUNCHER_DOWN} [LAUNCHER_DOWN]Uses:149Used by:421
Symbol 379 GraphicUses:143Used by:380
Symbol 380 MovieClip {LAUNCHER_PERM_UP} [LAUNCHER_PERM_UP]Uses:379
Symbol 381 GraphicUses:140Used by:382
Symbol 382 MovieClipUses:381Used by:383
Symbol 383 MovieClip {INVISIBLE_RED} [INVISIBLE_RED]Uses:382
Symbol 384 MovieClip {SPARKLE_RIGHT} [SPARKLE_RIGHT]Uses:347
Symbol 385 MovieClip {TextInput_disabledSkin} [TextInput_disabledSkin]Uses:222Used by:387
Symbol 386 MovieClip {TextInput_upSkin} [TextInput_upSkin]Uses:224Used by:387
Symbol 387 MovieClip {fl.controls.TextInput} [fl.controls.TextInput]Uses:182 183 385 386 193Used by:404 421
Symbol 388 GraphicUsed by:389
Symbol 389 MovieClip {NumericStepperDownArrow_disabledSkin} [NumericStepperDownArrow_disabledSkin]Uses:388 195Used by:404
Symbol 390 GraphicUsed by:391
Symbol 391 MovieClip {NumericStepperDownArrow_downSkin} [NumericStepperDownArrow_downSkin]Uses:390 195Used by:404
Symbol 392 GraphicUsed by:393
Symbol 393 MovieClip {NumericStepperDownArrow_overSkin} [NumericStepperDownArrow_overSkin]Uses:392 195Used by:404
Symbol 394 GraphicUsed by:395
Symbol 395 MovieClip {NumericStepperDownArrow_upSkin} [NumericStepperDownArrow_upSkin]Uses:394 195Used by:404
Symbol 396 GraphicUsed by:397
Symbol 397 MovieClip {NumericStepperUpArrow_disabledSkin} [NumericStepperUpArrow_disabledSkin]Uses:396 195Used by:404
Symbol 398 GraphicUsed by:399
Symbol 399 MovieClip {NumericStepperUpArrow_downSkin} [NumericStepperUpArrow_downSkin]Uses:398 195Used by:404
Symbol 400 GraphicUsed by:401
Symbol 401 MovieClip {NumericStepperUpArrow_overSkin} [NumericStepperUpArrow_overSkin]Uses:400 195Used by:404
Symbol 402 GraphicUsed by:403
Symbol 403 MovieClip {NumericStepperUpArrow_upSkin} [NumericStepperUpArrow_upSkin]Uses:402 195Used by:404
Symbol 404 MovieClip {fl.controls.NumericStepper} [fl.controls.NumericStepper]Uses:182 183 193 389 391 393 395 397 399 401 403 387Used by:421
Symbol 405 GraphicUsed by:406
Symbol 406 MovieClip {RadioButton_upIcon} [RadioButton_upIcon]Uses:405Used by:420
Symbol 407 GraphicUsed by:408 417
Symbol 408 MovieClip {RadioButton_overIcon} [RadioButton_overIcon]Uses:407Used by:420
Symbol 409 GraphicUsed by:410 418
Symbol 410 MovieClip {RadioButton_downIcon} [RadioButton_downIcon]Uses:409Used by:420
Symbol 411 GraphicUsed by:412 419
Symbol 412 MovieClip {RadioButton_disabledIcon} [RadioButton_disabledIcon]Uses:411Used by:420
Symbol 413 GraphicUsed by:416
Symbol 414 GraphicUsed by:415
Symbol 415 MovieClipUses:414Used by:416 417 418 419
Symbol 416 MovieClip {RadioButton_selectedUpIcon} [RadioButton_selectedUpIcon]Uses:413 415Used by:420
Symbol 417 MovieClip {RadioButton_selectedOverIcon} [RadioButton_selectedOverIcon]Uses:407 415Used by:420
Symbol 418 MovieClip {RadioButton_selectedDownIcon} [RadioButton_selectedDownIcon]Uses:409 415Used by:420
Symbol 419 MovieClip {RadioButton_selectedDisabledIcon} [RadioButton_selectedDisabledIcon]Uses:411 415Used by:420
Symbol 420 MovieClip {fl.controls.RadioButton} [fl.controls.RadioButton]Uses:182 183 406 408 410 412 416 417 418 419 193Used by:421
Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE]Uses:221 247 227 228 387 349 404 420 378 334 329
Symbol 422 GraphicUsed by:423
Symbol 423 MovieClip {BLOOD} [BLOOD]Uses:422
Symbol 424 BitmapUsed by:425
Symbol 425 GraphicUses:424Used by:426
Symbol 426 MovieClipUses:425Used by:427
Symbol 427 MovieClip {STAR} [STAR]Uses:426
Symbol 428 GraphicUsed by:429
Symbol 429 MovieClipUses:428Used by:430
Symbol 430 MovieClip {BONE} [BONE]Uses:429
Symbol 431 BitmapUsed by:432
Symbol 432 GraphicUses:431Used by:433
Symbol 433 MovieClip {CLOUD} [CLOUD]Uses:432Used by:434
Symbol 434 MovieClip {CLOUD_PARTICLE} [CLOUD_PARTICLE]Uses:433
Symbol 435 GraphicUsed by:445
Symbol 436 GraphicUsed by:445
Symbol 437 GraphicUsed by:445
Symbol 438 GraphicUsed by:445
Symbol 439 GraphicUsed by:445
Symbol 440 GraphicUsed by:445
Symbol 441 GraphicUsed by:445
Symbol 442 GraphicUsed by:445
Symbol 443 GraphicUsed by:445
Symbol 444 GraphicUsed by:445
Symbol 445 MovieClip {EXPLODE} [EXPLODE]Uses:435 436 437 438 439 440 441 442 443 444
Symbol 446 GraphicUsed by:447
Symbol 447 MovieClip {BANNER_SUCCESS} [BANNER_SUCCESS]Uses:446Used by:452
Symbol 448 GraphicUsed by:449
Symbol 449 Button {BUTTON_NEXT} [BUTTON_NEXT]Uses:448Used by:452
Symbol 450 GraphicUsed by:451
Symbol 451 Button {BUTTON_MENU} [BUTTON_MENU]Uses:450Used by:452
Symbol 452 MovieClip {SUCCESS_SCREEN} [SUCCESS_SCREEN]Uses:447 449 451
Symbol 453 GraphicUsed by:457
Symbol 454 GraphicUsed by:457
Symbol 455 GraphicUsed by:457
Symbol 456 GraphicUsed by:457
Symbol 457 MovieClip {CRUSHER_FALL} [CRUSHER_FALL]Uses:453 454 455 456
Symbol 458 EditableTextUses:104 459Used by:461
Symbol 459 FontUsed by:105 106 155 158 162 167 169 458 460
Symbol 460 EditableTextUses:104 459Used by:461
Symbol 461 MovieClip {PUZZLE_INTERFACE} [PUZZLE_INTERFACE]Uses:458 460
Symbol 462 GraphicUsed by:469
Symbol 463 GraphicUsed by:469
Symbol 464 GraphicUsed by:469
Symbol 465 GraphicUsed by:469
Symbol 466 GraphicUsed by:469
Symbol 467 GraphicUsed by:469
Symbol 468 GraphicUsed by:469
Symbol 469 MovieClip {CRUSHER} [CRUSHER]Uses:462 463 464 465 466 467 468
Symbol 470 GraphicUsed by:471
Symbol 471 MovieClip {BANNER_FAILURE} [BANNER_FAILURE]Uses:470Used by:474
Symbol 472 GraphicUsed by:473
Symbol 473 Button {BUTTON_RETRY} [BUTTON_RETRY]Uses:472Used by:474
Symbol 474 MovieClip {FAIL_SCREEN} [FAIL_SCREEN]Uses:471 473
Symbol 475 GraphicUsed by:487
Symbol 476 GraphicUsed by:487
Symbol 477 GraphicUsed by:487
Symbol 478 GraphicUsed by:487
Symbol 479 GraphicUsed by:487
Symbol 480 GraphicUsed by:487
Symbol 481 GraphicUsed by:487
Symbol 482 GraphicUsed by:487
Symbol 483 GraphicUsed by:487
Symbol 484 GraphicUsed by:487
Symbol 485 GraphicUsed by:487
Symbol 486 GraphicUsed by:487
Symbol 487 MovieClip {KNIGHT} [KNIGHT]Uses:475 476 477 478 479 480 481 482 483 484 485 486
Symbol 488 Bitmap {FIREWORK_PARTICLE} [FIREWORK_PARTICLE]
Symbol 489 BinaryData {AGSplash_AG}

Instance Names

"knight"Symbol 11 MovieClip {PRELOADER} [PRELOADER] Frame 1Symbol 8 MovieClip {preloader_fla.KNIGHT_2} [preloader_fla.KNIGHT_2]
"percent"Symbol 11 MovieClip {PRELOADER} [PRELOADER] Frame 1Symbol 10 EditableText
"puzzle"Symbol 52 MovieClip {TITLES} [TITLES] Frame 1Symbol 31 Button
"editor"Symbol 52 MovieClip {TITLES} [TITLES] Frame 1Symbol 33 Button
"loadCustom"Symbol 52 MovieClip {TITLES} [TITLES] Frame 1Symbol 35 Button
"sound"Symbol 52 MovieClip {TITLES} [TITLES] Frame 1Symbol 41 MovieClip {SOUND_TOGGLE} [SOUND_TOGGLE]
"shenGames"Symbol 52 MovieClip {TITLES} [TITLES] Frame 1Symbol 44 Button
"marsh"Symbol 52 MovieClip {TITLES} [TITLES] Frame 1Symbol 48 Button
"armor"Symbol 52 MovieClip {TITLES} [TITLES] Frame 1Symbol 51 Button
"down"Symbol 146 MovieClip Frame 1Symbol 114 Button
"left"Symbol 146 MovieClip Frame 1Symbol 117 Button
"right"Symbol 146 MovieClip Frame 1Symbol 120 Button
"block"Symbol 146 MovieClip Frame 1Symbol 123 Button
"bridge"Symbol 146 MovieClip Frame 1Symbol 127 Button
"monster"Symbol 146 MovieClip Frame 1Symbol 130 Button
"invisible"Symbol 146 MovieClip Frame 1Symbol 133 Button
"buttonRed"Symbol 146 MovieClip Frame 1Symbol 136 Button
"buttonGreen"Symbol 146 MovieClip Frame 1Symbol 139 Button
"invisibleRed"Symbol 146 MovieClip Frame 1Symbol 142 Button
"up"Symbol 146 MovieClip Frame 1Symbol 145 Button
"up"Symbol 164 MovieClip {PLAYER_PANEL} [PLAYER_PANEL] Frame 1Symbol 148 Button
"down"Symbol 164 MovieClip {PLAYER_PANEL} [PLAYER_PANEL] Frame 1Symbol 150 Button
"left"Symbol 164 MovieClip {PLAYER_PANEL} [PLAYER_PANEL] Frame 1Symbol 152 Button
"right"Symbol 164 MovieClip {PLAYER_PANEL} [PLAYER_PANEL] Frame 1Symbol 154 Button
"trash"Symbol 164 MovieClip {PLAYER_PANEL} [PLAYER_PANEL] Frame 1Symbol 110 Button
"edit"Symbol 164 MovieClip {PLAYER_PANEL} [PLAYER_PANEL] Frame 1Symbol 157 Button
"editText"Symbol 164 MovieClip {PLAYER_PANEL} [PLAYER_PANEL] Frame 1Symbol 159 MovieClip
"save"Symbol 164 MovieClip {PLAYER_PANEL} [PLAYER_PANEL] Frame 1Symbol 161 Button
"report"Symbol 170 MovieClip {GAME_REPORT} [GAME_REPORT] Frame 1Symbol 169 EditableText
"buttonDown"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 92 Button
"buttonUp"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 95 Button
"bg1"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 97 Button
"bg2"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 99 Button
"bg4"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 101 Button
"bg3"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 103 Button
"test"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 108 Button
"clear"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 110 Button
"items"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 146 MovieClip
"playerPanel"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 164 MovieClip {PLAYER_PANEL} [PLAYER_PANEL]
"mainMenuButton"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 166 Button {MAIN_MENU_BUTTON} [MAIN_MENU_BUTTON]
"coverup"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 168 MovieClip
"report"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 170 MovieClip {GAME_REPORT} [GAME_REPORT]
"drawerLayer"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 38 MovieClip
"overlay"Symbol 171 MovieClip {EDITOR_INTERFACE} [EDITOR_INTERFACE] Frame 1Symbol 38 MovieClip
"__id1_"Symbol 248 MovieClip {PrincessAssets_fla.Symbol3_191} [PrincessAssets_fla.Symbol3_191] Frame 1Symbol 228 MovieClip {fl.controls.Label} [fl.controls.Label]
"base64"Symbol 249 MovieClip {LOAD_INTERFACE} [LOAD_INTERFACE] Frame 1Symbol 227 MovieClip {fl.controls.TextArea} [fl.controls.TextArea]
"__id4_"Symbol 249 MovieClip {LOAD_INTERFACE} [LOAD_INTERFACE] Frame 1Symbol 228 MovieClip {fl.controls.Label} [fl.controls.Label]
"cancelButton"Symbol 249 MovieClip {LOAD_INTERFACE} [LOAD_INTERFACE] Frame 1Symbol 247 MovieClip {fl.controls.Button} [fl.controls.Button]
"loadButton"Symbol 249 MovieClip {LOAD_INTERFACE} [LOAD_INTERFACE] Frame 1Symbol 247 MovieClip {fl.controls.Button} [fl.controls.Button]
"invalidLevel"Symbol 249 MovieClip {LOAD_INTERFACE} [LOAD_INTERFACE] Frame 1Symbol 248 MovieClip {PrincessAssets_fla.Symbol3_191} [PrincessAssets_fla.Symbol3_191]
"l1"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 255 Button
"l2"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 258 Button
"l3"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 261 Button
"l4"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 264 Button
"l5"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 267 Button
"l6"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 270 Button
"l7"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 273 Button
"l8"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 276 Button
"l9"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 279 Button
"l10"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 282 Button
"l11"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 285 Button
"l12"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 288 Button
"l13"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 291 Button
"l14"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 294 Button
"l15"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 297 Button
"l16"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 300 Button
"l17"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 303 Button
"l18"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 306 Button
"l19"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 309 Button
"l20"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 312 Button
"l21"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 315 Button
"l22"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 318 Button
"l23"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 321 Button
"l24"Symbol 325 MovieClip {LEVEL_SELECT} [LEVEL_SELECT] Frame 1Symbol 324 Button
"quit"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 247 MovieClip {fl.controls.Button} [fl.controls.Button]
"base64"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 227 MovieClip {fl.controls.TextArea} [fl.controls.TextArea]
"__id7_"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 228 MovieClip {fl.controls.Label} [fl.controls.Label]
"__id8_"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 228 MovieClip {fl.controls.Label} [fl.controls.Label]
"__id9_"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 228 MovieClip {fl.controls.Label} [fl.controls.Label]
"title"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 387 MovieClip {fl.controls.TextInput} [fl.controls.TextInput]
"__id10_"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 228 MovieClip {fl.controls.Label} [fl.controls.Label]
"author"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 387 MovieClip {fl.controls.TextInput} [fl.controls.TextInput]
"up"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 404 MovieClip {fl.controls.NumericStepper} [fl.controls.NumericStepper]
"goalSave"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 420 MovieClip {fl.controls.RadioButton} [fl.controls.RadioButton]
"goalFeed"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 420 MovieClip {fl.controls.RadioButton} [fl.controls.RadioButton]
"goalFire"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 420 MovieClip {fl.controls.RadioButton} [fl.controls.RadioButton]
"__id11_"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 228 MovieClip {fl.controls.Label} [fl.controls.Label]
"__id12_"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 228 MovieClip {fl.controls.Label} [fl.controls.Label]
"down"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 404 MovieClip {fl.controls.NumericStepper} [fl.controls.NumericStepper]
"left"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 404 MovieClip {fl.controls.NumericStepper} [fl.controls.NumericStepper]
"right"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1Symbol 404 MovieClip {fl.controls.NumericStepper} [fl.controls.NumericStepper]
"button"Symbol 452 MovieClip {SUCCESS_SCREEN} [SUCCESS_SCREEN] Frame 1Symbol 449 Button {BUTTON_NEXT} [BUTTON_NEXT]
"button2"Symbol 452 MovieClip {SUCCESS_SCREEN} [SUCCESS_SCREEN] Frame 1Symbol 451 Button {BUTTON_MENU} [BUTTON_MENU]
"levelName"Symbol 461 MovieClip {PUZZLE_INTERFACE} [PUZZLE_INTERFACE] Frame 1Symbol 458 EditableText
"upCount"Symbol 461 MovieClip {PUZZLE_INTERFACE} [PUZZLE_INTERFACE] Frame 1Symbol 460 EditableText
"downCount"Symbol 461 MovieClip {PUZZLE_INTERFACE} [PUZZLE_INTERFACE] Frame 1Symbol 460 EditableText
"leftCount"Symbol 461 MovieClip {PUZZLE_INTERFACE} [PUZZLE_INTERFACE] Frame 1Symbol 460 EditableText
"rightCount"Symbol 461 MovieClip {PUZZLE_INTERFACE} [PUZZLE_INTERFACE] Frame 1Symbol 460 EditableText
"button"Symbol 474 MovieClip {FAIL_SCREEN} [FAIL_SCREEN] Frame 1Symbol 473 Button {BUTTON_RETRY} [BUTTON_RETRY]

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 1Symbol 11 as "PRELOADER"
ExportAssets (56)Timeline Frame 1Symbol 8 as "preloader_fla.KNIGHT_2"
ExportAssets (56)Timeline Frame 2Symbol 12 as "Silence1"
ExportAssets (56)Timeline Frame 2Symbol 13 as "Gateclose1"
ExportAssets (56)Timeline Frame 2Symbol 14 as "Step1"
ExportAssets (56)Timeline Frame 2Symbol 15 as "Marsh1"
ExportAssets (56)Timeline Frame 2Symbol 16 as "Launch1"
ExportAssets (56)Timeline Frame 2Symbol 17 as "Fail1"
ExportAssets (56)Timeline Frame 2Symbol 18 as "Explode1"
ExportAssets (56)Timeline Frame 2Symbol 19 as "Blip1"
ExportAssets (56)Timeline Frame 2Symbol 20 as "Fireworks1"
ExportAssets (56)Timeline Frame 2Symbol 21 as "Gameshow1"
ExportAssets (56)Timeline Frame 2Symbol 22 as "Win1"
ExportAssets (56)Timeline Frame 2Symbol 23 as "LauncherExplode1"
ExportAssets (56)Timeline Frame 2Symbol 24 as "KnightEscape1"
ExportAssets (56)Timeline Frame 2Symbol 27 as "SITELOCK"
ExportAssets (56)Timeline Frame 2Symbol 52 as "TITLES"
ExportAssets (56)Timeline Frame 2Symbol 54 as "COVER_UP"
ExportAssets (56)Timeline Frame 2Symbol 57 as "BRIDGE"
ExportAssets (56)Timeline Frame 2Symbol 59 as "GATE_START"
ExportAssets (56)Timeline Frame 2Symbol 68 as "BACKGROUND"
ExportAssets (56)Timeline Frame 2Symbol 74 as "PRINCESS_ANIM"
ExportAssets (56)Timeline Frame 2Symbol 87 as "GATE_ANIM"
ExportAssets (56)Timeline Frame 2Symbol 171 as "EDITOR_INTERFACE"
ExportAssets (56)Timeline Frame 2Symbol 180 as "TUTORIALS"
ExportAssets (56)Timeline Frame 2Symbol 249 as "LOAD_INTERFACE"
ExportAssets (56)Timeline Frame 2Symbol 41 as "SOUND_TOGGLE"
ExportAssets (56)Timeline Frame 2Symbol 251 as "MEDAL"
ExportAssets (56)Timeline Frame 2Symbol 325 as "LEVEL_SELECT"
ExportAssets (56)Timeline Frame 2Symbol 328 as "LOCKED"
ExportAssets (56)Timeline Frame 2Symbol 329 as "LAUNCHER_RIGHT"
ExportAssets (56)Timeline Frame 2Symbol 331 as "LAUNCHER_PERM_DOWN"
ExportAssets (56)Timeline Frame 2Symbol 333 as "BLOCK_GRAY"
ExportAssets (56)Timeline Frame 2Symbol 334 as "LAUNCHER_LEFT"
ExportAssets (56)Timeline Frame 2Symbol 348 as "SPARKLE_LEFT"
ExportAssets (56)Timeline Frame 2Symbol 349 as "LAUNCHER_UP"
ExportAssets (56)Timeline Frame 2Symbol 359 as "MONSTER"
ExportAssets (56)Timeline Frame 2Symbol 361 as "LAUNCHER_PERM_RIGHT"
ExportAssets (56)Timeline Frame 2Symbol 363 as "BUTTON_RED"
ExportAssets (56)Timeline Frame 2Symbol 365 as "LAUNCHER_PERM_LEFT"
ExportAssets (56)Timeline Frame 2Symbol 366 as "SPARKLE_DOWN"
ExportAssets (56)Timeline Frame 2Symbol 368 as "BUTTON_RED_DISABLED"
ExportAssets (56)Timeline Frame 2Symbol 370 as "BUTTON_GREEN_DISABLED"
ExportAssets (56)Timeline Frame 2Symbol 371 as "MONSTER_SHIFTED"
ExportAssets (56)Timeline Frame 2Symbol 372 as "SPARKLE_MASK"
ExportAssets (56)Timeline Frame 2Symbol 375 as "INVISIBLE_GREEN"
ExportAssets (56)Timeline Frame 2Symbol 347 as "SPARKLE_UP"
ExportAssets (56)Timeline Frame 2Symbol 377 as "BUTTON_GREEN"
ExportAssets (56)Timeline Frame 2Symbol 378 as "LAUNCHER_DOWN"
ExportAssets (56)Timeline Frame 2Symbol 380 as "LAUNCHER_PERM_UP"
ExportAssets (56)Timeline Frame 2Symbol 383 as "INVISIBLE_RED"
ExportAssets (56)Timeline Frame 2Symbol 384 as "SPARKLE_RIGHT"
ExportAssets (56)Timeline Frame 2Symbol 421 as "SAVE_INTERFACE"
ExportAssets (56)Timeline Frame 2Symbol 423 as "BLOOD"
ExportAssets (56)Timeline Frame 2Symbol 427 as "STAR"
ExportAssets (56)Timeline Frame 2Symbol 430 as "BONE"
ExportAssets (56)Timeline Frame 2Symbol 434 as "CLOUD_PARTICLE"
ExportAssets (56)Timeline Frame 2Symbol 445 as "EXPLODE"
ExportAssets (56)Timeline Frame 2Symbol 170 as "GAME_REPORT"
ExportAssets (56)Timeline Frame 2Symbol 164 as "PLAYER_PANEL"
ExportAssets (56)Timeline Frame 2Symbol 166 as "MAIN_MENU_BUTTON"
ExportAssets (56)Timeline Frame 2Symbol 227 as "fl.controls.TextArea"
ExportAssets (56)Timeline Frame 2Symbol 221 as "fl.containers.ScrollPane"
ExportAssets (56)Timeline Frame 2Symbol 248 as "PrincessAssets_fla.Symbol3_191"
ExportAssets (56)Timeline Frame 2Symbol 228 as "fl.controls.Label"
ExportAssets (56)Timeline Frame 2Symbol 247 as "fl.controls.Button"
ExportAssets (56)Timeline Frame 2Symbol 452 as "SUCCESS_SCREEN"
ExportAssets (56)Timeline Frame 2Symbol 457 as "CRUSHER_FALL"
ExportAssets (56)Timeline Frame 2Symbol 461 as "PUZZLE_INTERFACE"
ExportAssets (56)Timeline Frame 2Symbol 469 as "CRUSHER"
ExportAssets (56)Timeline Frame 2Symbol 474 as "FAIL_SCREEN"
ExportAssets (56)Timeline Frame 2Symbol 404 as "fl.controls.NumericStepper"
ExportAssets (56)Timeline Frame 2Symbol 420 as "fl.controls.RadioButton"
ExportAssets (56)Timeline Frame 2Symbol 387 as "fl.controls.TextInput"
ExportAssets (56)Timeline Frame 2Symbol 487 as "KNIGHT"
ExportAssets (56)Timeline Frame 2Symbol 433 as "CLOUD"
ExportAssets (56)Timeline Frame 2Symbol 193 as "focusRectSkin"
ExportAssets (56)Timeline Frame 2Symbol 220 as "fl.controls.ScrollBar"
ExportAssets (56)Timeline Frame 2Symbol 225 as "TextArea_upSkin"
ExportAssets (56)Timeline Frame 2Symbol 223 as "TextArea_disabledSkin"
ExportAssets (56)Timeline Frame 2Symbol 183 as "fl.core.ComponentShim"
ExportAssets (56)Timeline Frame 2Symbol 226 as "fl.controls.UIScrollBar"
ExportAssets (56)Timeline Frame 2Symbol 188 as "ScrollPane_disabledSkin"
ExportAssets (56)Timeline Frame 2Symbol 189 as "ScrollPane_upSkin"
ExportAssets (56)Timeline Frame 2Symbol 230 as "Button_disabledSkin"
ExportAssets (56)Timeline Frame 2Symbol 246 as "Button_upSkin"
ExportAssets (56)Timeline Frame 2Symbol 240 as "Button_selectedDownSkin"
ExportAssets (56)Timeline Frame 2Symbol 244 as "Button_selectedUpSkin"
ExportAssets (56)Timeline Frame 2Symbol 234 as "Button_emphasizedSkin"
ExportAssets (56)Timeline Frame 2Symbol 238 as "Button_selectedDisabledSkin"
ExportAssets (56)Timeline Frame 2Symbol 236 as "Button_overSkin"
ExportAssets (56)Timeline Frame 2Symbol 232 as "Button_downSkin"
ExportAssets (56)Timeline Frame 2Symbol 242 as "Button_selectedOverSkin"
ExportAssets (56)Timeline Frame 2Symbol 488 as "FIREWORK_PARTICLE"
ExportAssets (56)Timeline Frame 2Symbol 447 as "BANNER_SUCCESS"
ExportAssets (56)Timeline Frame 2Symbol 451 as "BUTTON_MENU"
ExportAssets (56)Timeline Frame 2Symbol 449 as "BUTTON_NEXT"
ExportAssets (56)Timeline Frame 2Symbol 471 as "BANNER_FAILURE"
ExportAssets (56)Timeline Frame 2Symbol 473 as "BUTTON_RETRY"
ExportAssets (56)Timeline Frame 2Symbol 389 as "NumericStepperDownArrow_disabledSkin"
ExportAssets (56)Timeline Frame 2Symbol 391 as "NumericStepperDownArrow_downSkin"
ExportAssets (56)Timeline Frame 2Symbol 401 as "NumericStepperUpArrow_overSkin"
ExportAssets (56)Timeline Frame 2Symbol 397 as "NumericStepperUpArrow_disabledSkin"
ExportAssets (56)Timeline Frame 2Symbol 395 as "NumericStepperDownArrow_upSkin"
ExportAssets (56)Timeline Frame 2Symbol 403 as "NumericStepperUpArrow_upSkin"
ExportAssets (56)Timeline Frame 2Symbol 393 as "NumericStepperDownArrow_overSkin"
ExportAssets (56)Timeline Frame 2Symbol 399 as "NumericStepperUpArrow_downSkin"
ExportAssets (56)Timeline Frame 2Symbol 406 as "RadioButton_upIcon"
ExportAssets (56)Timeline Frame 2Symbol 418 as "RadioButton_selectedDownIcon"
ExportAssets (56)Timeline Frame 2Symbol 412 as "RadioButton_disabledIcon"
ExportAssets (56)Timeline Frame 2Symbol 419 as "RadioButton_selectedDisabledIcon"
ExportAssets (56)Timeline Frame 2Symbol 408 as "RadioButton_overIcon"
ExportAssets (56)Timeline Frame 2Symbol 416 as "RadioButton_selectedUpIcon"
ExportAssets (56)Timeline Frame 2Symbol 417 as "RadioButton_selectedOverIcon"
ExportAssets (56)Timeline Frame 2Symbol 410 as "RadioButton_downIcon"
ExportAssets (56)Timeline Frame 2Symbol 386 as "TextInput_upSkin"
ExportAssets (56)Timeline Frame 2Symbol 385 as "TextInput_disabledSkin"
ExportAssets (56)Timeline Frame 2Symbol 217 as "ScrollArrowUp_disabledSkin"
ExportAssets (56)Timeline Frame 2Symbol 205 as "ScrollThumb_overSkin"
ExportAssets (56)Timeline Frame 2Symbol 211 as "ScrollThumb_upSkin"
ExportAssets (56)Timeline Frame 2Symbol 201 as "ScrollThumb_downSkin"
ExportAssets (56)Timeline Frame 2Symbol 209 as "ScrollArrowUp_upSkin"
ExportAssets (56)Timeline Frame 2Symbol 199 as "ScrollArrowDown_downSkin"
ExportAssets (56)Timeline Frame 2Symbol 215 as "ScrollArrowDown_disabledSkin"
ExportAssets (56)Timeline Frame 2Symbol 207 as "ScrollArrowUp_overSkin"
ExportAssets (56)Timeline Frame 2Symbol 213 as "ScrollArrowDown_upSkin"
ExportAssets (56)Timeline Frame 2Symbol 219 as "ScrollBar_thumbIcon"
ExportAssets (56)Timeline Frame 2Symbol 203 as "ScrollArrowDown_overSkin"
ExportAssets (56)Timeline Frame 2Symbol 197 as "ScrollArrowUp_downSkin"
ExportAssets (56)Timeline Frame 2Symbol 191 as "ScrollTrack_skin"
SerialNumber (41)Timeline Frame 1

Labels

"Preloader"Frame 1
"Main"Frame 2
"flying"Symbol 8 MovieClip {preloader_fla.KNIGHT_2} [preloader_fla.KNIGHT_2] Frame 1
"saved"Symbol 74 MovieClip {PRINCESS_ANIM} [PRINCESS_ANIM] Frame 94
"t0"Symbol 180 MovieClip {TUTORIALS} [TUTORIALS] Frame 1
"t1"Symbol 180 MovieClip {TUTORIALS} [TUTORIALS] Frame 10
"t2"Symbol 180 MovieClip {TUTORIALS} [TUTORIALS] Frame 17
"t5"Symbol 180 MovieClip {TUTORIALS} [TUTORIALS] Frame 24
"savePrincess"Symbol 249 MovieClip {LOAD_INTERFACE} [LOAD_INTERFACE] Frame 1
"savePrincess"Symbol 421 MovieClip {SAVE_INTERFACE} [SAVE_INTERFACE] Frame 1
"running"Symbol 487 MovieClip {KNIGHT} [KNIGHT] Frame 1
"flying"Symbol 487 MovieClip {KNIGHT} [KNIGHT] Frame 33
"saving"Symbol 487 MovieClip {KNIGHT} [KNIGHT] Frame 81




https://swfchan.com/54/267460/info.shtml
Created: 1/6 -2026 19:28:49 Last modified: 1/6 -2026 19:28:49 Server time: 22/06 -2026 12:21:56