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

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

Artillery Defense.swf

This is the info page for
Flash #133479

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


Text
LOADING...

<p align="center"><font face="Myriad Pro" size="20" color="#ffffff" letterSpacing="3.000000" kerning="0"><b>100</b></font></p>

&

Presents

PLAY

PLAY

PLAY

MORE GAMES

$100

$150

$200

$300

$250

$150

$150

$800

$500

$900

$10

<p align="center"><font face="Arial" size="13" color="#ffcc00" letterSpacing="0.000000" kerning="1"><b>123456</b></font></p>

<p align="center"><font face="Arial" size="12" color="#ffffff" letterSpacing="0.000000" kerning="1"><b>100</b></font></p>

<p align="center"><font face="Arial" size="13" color="#ffffff" letterSpacing="0.000000" kerning="1"><b>00:00</b></font></p>

<p align="center"><font face="Arial" size="11" color="#ffffff" letterSpacing="0.000000" kerning="1"><b>------</b></font></p>

<p align="center"><font face="Arial" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">------</font></p>

<p align="center"><font face="Arial" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">------</font></p>

<p align="center"><font face="Arial" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">------</font></p>

<p align="center"><font face="Arial" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">------</font></p>

<p align="center"><font face="Arial" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">------</font></p>

<p align="center"><font face="Arial" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">------</font></p>

<p align="center"><font face="Arial" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">------</font></p>

<p align="center"><font face="Arial" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">------</font></p>

<p align="center"><font face="Arial" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">------</font></p>

<p align="center"><font face="Arial" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">------</font></p>

<p align="center"><font face="Arial" size="11" color="#ffcc00" letterSpacing="0.000000" kerning="1"><b>$ 0</b></font></p>

<p align="center"><font face="Arial" size="11" color="#ffcc00" letterSpacing="0.000000" kerning="1"><b>0</b></font></p>

INSTRUCTIONS

1

2

3

4

SPACEBAR to cancel the currently selected objects

5

6

7

1. You have to choose and arrange some of the turrets before the appearance of the enemy.
The arranged turrets will resist the enemy’s attack.

2. Some of weapon’s parameter like Aim, Damage, Range, Reloading Time etc will be
displayed in a window on the right once you tick any of the turrets.

3. You can upgrade the arranged turrets’ damage by ticking the “Upgrade”.

4. Displaying how many times of attack from the enemy.

5. You can sell the the turret or the wall by ticking the “$ “ and then choosing the turret
or the wall you wanna sell.

6. Showing the time left from the next attack. beginning.

7. Ticking it will make the enemy out without timing.

PLAY NOW

HIGHSCORES

HIGHSCORES

INSTRUCTIONS

INSTRUCTIONS

MAP AND MODE

PLAY MORE

PLAY MORE

PLAY FREE BUSTED GAMES

HIGHSCORES

MAP                                                   MODEL

S

R

E

T

L

I

F

RANK           NAME              SCORE              DATE

1

2

3

4

5

6

7

8

9

10

<p align="center"><font face="Arial" size="15" color="#ffcc00" letterSpacing="0.000000" kerning="1">Gamer</font></p>

<p align="center"><font face="Arial" size="15" color="#ffcc00" letterSpacing="0.000000" kerning="1">Gamer</font></p>

<p align="center"><font face="Arial" size="15" color="#ffcc00" letterSpacing="0.000000" kerning="1">Gamer</font></p>

<p align="center"><font face="Arial" size="15" color="#ffcc00" letterSpacing="0.000000" kerning="1">Gamer</font></p>

<p align="center"><font face="Arial" size="15" color="#ffcc00" letterSpacing="0.000000" kerning="1">Gamer</font></p>

<p align="center"><font face="Arial" size="15" color="#ffcc00" letterSpacing="0.000000" kerning="1">Gamer</font></p>

<p align="center"><font face="Arial" size="15" color="#ffcc00" letterSpacing="0.000000" kerning="1">Gamer</font></p>

<p align="center"><font face="Arial" size="15" color="#ffcc00" letterSpacing="0.000000" kerning="1">Gamer</font></p>

<p align="center"><font face="Arial" size="15" color="#ffcc00" letterSpacing="0.000000" kerning="1">Gamer</font></p>

<p align="center"><font face="Arial" size="15" color="#ffcc00" letterSpacing="0.000000" kerning="1">Gamer</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">1000000</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">9000000</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">9999999</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">9999999</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">9999999</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">9999999</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">9999999</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">9999999</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">9999999</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">9999999</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">01-01-09</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">01-01-09</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">01-01-09</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">01-01-09</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">01-01-09</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">01-01-09</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">01-01-09</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">01-01-09</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">01-01-09</font></p>

<p align="center"><font face="Arial" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">01-01-09</font></p>

GAME OVER

RETRY

RETRY

BACK TO MENU

BACK TO MENU

HIGHSCORES

HIGHSCORES

MORE GAMES

MORE GAMES

FREE TOWER DEFENSE GAMES

FREE TOWER DEFENSE GAMES

<p align="center"><font face="OCR A Std" size="18" color="#990000" letterSpacing="0.000000" kerning="1">00000000</font></p>

SUBMIT

SUBMIT

<p align="center"><font face="OCR A Std" size="15" color="#ffffff" letterSpacing="0.000000" kerning="1">Gamer</font></p>

GAME MENU

RETURN TO GAME

RETURN TO GAME

RESET LEVEL

RESET LEVEL

SELECT MAP

disuse base

quietude jungle

fervent Gobi

broken encampment

jungle fortress

danger desert

There are 5 different
gameplay modes, which
you can choose to
challenge yourself.

GAME MODE

default

2x cash 2x difficulty

30 tower limite

50K fixed

challenge

MAP AND MODE

START GAME

START GAME

ActionScript [AS3]

Section 1
//moregames_btn_mc_163 (ArtilleryDefense_fla.moregames_btn_mc_163) package ArtilleryDefense_fla { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class moregames_btn_mc_163 extends MovieClip { public var mc_btn:SimpleButton; public function moregames_btn_mc_163(){ addFrameScript(0, frame1); } function frame1(){ mc_btn.addEventListener(MouseEvent.CLICK, gotoURL2); } public function gotoURL2(_arg1:MouseEvent){ navigateToURL(new URLRequest("http://www.gamebusted.com/"), "_blank"); } } }//package ArtilleryDefense_fla
Section 2
//Timeline_20 (ArtilleryDefense_fla.Timeline_20) package ArtilleryDefense_fla { import flash.display.*; public dynamic class Timeline_20 extends MovieClip { public function Timeline_20(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package ArtilleryDefense_fla
Section 3
//BaseScrollPane (fl.containers.BaseScrollPane) package fl.containers { import fl.core.*; import fl.controls.*; import flash.display.*; import flash.events.*; import flash.geom.*; import fl.events.*; public class BaseScrollPane extends UIComponent { protected var defaultLineScrollSize:Number;// = 4 protected var _maxHorizontalScrollPosition:Number;// = 0 protected var vScrollBar:Boolean; protected var disabledOverlay:Shape; protected var hScrollBar:Boolean; protected var availableWidth:Number; protected var _verticalPageScrollSize:Number;// = 0 protected var vOffset:Number;// = 0 protected var _verticalScrollBar:ScrollBar; protected var useFixedHorizontalScrolling:Boolean;// = false protected var contentWidth:Number;// = 0 protected var contentHeight:Number;// = 0 protected var _horizontalPageScrollSize:Number;// = 0 protected var background:DisplayObject; protected var _useBitmpScrolling:Boolean;// = false protected var contentPadding:Number;// = 0 protected var availableHeight:Number; protected var _horizontalScrollBar:ScrollBar; protected var contentScrollRect:Rectangle; protected var _horizontalScrollPolicy:String; protected var _verticalScrollPolicy:String; 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}; public function BaseScrollPane(){ contentWidth = 0; contentHeight = 0; contentPadding = 0; vOffset = 0; _maxHorizontalScrollPosition = 0; _horizontalPageScrollSize = 0; _verticalPageScrollSize = 0; defaultLineScrollSize = 4; useFixedHorizontalScrolling = false; _useBitmpScrolling = false; super(); } 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)); } public function get verticalScrollPosition():Number{ return (_verticalScrollBar.scrollPosition); } 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 set verticalScrollPosition(_arg1:Number):void{ drawNow(); _verticalScrollBar.scrollPosition = _arg1; setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false); } protected function setContentSize(_arg1:Number, _arg2:Number):void{ if ((((((contentWidth == _arg1)) || (useFixedHorizontalScrolling))) && ((contentHeight == _arg2)))){ return; }; contentWidth = _arg1; contentHeight = _arg2; invalidate(InvalidationType.SIZE); } public function get horizontalScrollPosition():Number{ return (_horizontalScrollBar.scrollPosition); } public function get horizontalScrollBar():ScrollBar{ return (_horizontalScrollBar); } override public function set enabled(_arg1:Boolean):void{ if (enabled == _arg1){ return; }; _verticalScrollBar.enabled = _arg1; _horizontalScrollBar.enabled = _arg1; super.enabled = _arg1; } public function get verticalLineScrollSize():Number{ return (_verticalScrollBar.lineScrollSize); } public function get horizontalScrollPolicy():String{ return (_horizontalScrollPolicy); } protected function calculateAvailableSize():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; _local1 = ScrollBar.WIDTH; _local2 = (contentPadding = Number(getStyleValue("contentPadding"))); _local3 = ((height - (2 * _local2)) - vOffset); vScrollBar = (((_verticalScrollPolicy == ScrollPolicy.ON)) || ((((_verticalScrollPolicy == ScrollPolicy.AUTO)) && ((contentHeight > _local3))))); _local4 = ((width - (vScrollBar) ? _local1 : 0) - (2 * _local2)); _local5 = (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 maxVerticalScrollPosition():Number{ drawNow(); return (Math.max(0, (contentHeight - availableHeight))); } public function set horizontalScrollPosition(_arg1:Number):void{ drawNow(); _horizontalScrollBar.scrollPosition = _arg1; setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false); } public function get horizontalLineScrollSize():Number{ return (_horizontalScrollBar.lineScrollSize); } public function set verticalPageScrollSize(_arg1:Number):void{ _verticalPageScrollSize = _arg1; invalidate(InvalidationType.SIZE); } public function get verticalScrollPolicy():String{ return (_verticalScrollPolicy); } protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ } public function get useBitmapScrolling():Boolean{ return (_useBitmpScrolling); } protected function handleScroll(_arg1:ScrollEvent):void{ if (_arg1.target == _verticalScrollBar){ setVerticalScrollPosition(_arg1.position); } else { setHorizontalScrollPosition(_arg1.position); }; } public function set verticalLineScrollSize(_arg1:Number):void{ _verticalScrollBar.lineScrollSize = _arg1; } public function get verticalScrollBar():ScrollBar{ return (_verticalScrollBar); } protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ } 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 set horizontalScrollPolicy(_arg1:String):void{ _horizontalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } override protected function configUI():void{ var _local1:Graphics; 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(); _local1 = disabledOverlay.graphics; _local1.beginFill(0xFFFFFF); _local1.drawRect(0, 0, width, height); _local1.endFill(); addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true); } protected function calculateContentWidth():void{ } public function get verticalPageScrollSize():Number{ if (isNaN(availableHeight)){ drawNow(); }; return (((((_verticalPageScrollSize == 0)) && (!(isNaN(availableHeight))))) ? availableHeight : _verticalPageScrollSize); } 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 drawBackground():void{ var _local1:DisplayObject; _local1 = background; background = getDisplayObjectInstance(getStyleValue("skin")); background.width = width; background.height = height; addChildAt(background, 0); if (((!((_local1 == null))) && (!((_local1 == background))))){ removeChild(_local1); }; } public function set horizontalLineScrollSize(_arg1:Number):void{ _horizontalScrollBar.lineScrollSize = _arg1; } public function get horizontalPageScrollSize():Number{ if (isNaN(availableWidth)){ drawNow(); }; return (((((_horizontalPageScrollSize == 0)) && (!(isNaN(availableWidth))))) ? availableWidth : _horizontalPageScrollSize); } public function get maxHorizontalScrollPosition():Number{ drawNow(); return (Math.max(0, (contentWidth - availableWidth))); } protected function setStyles():void{ copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES); copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES); } protected function updateChildren():void{ _verticalScrollBar.enabled = (_horizontalScrollBar.enabled = enabled); _verticalScrollBar.drawNow(); _horizontalScrollBar.drawNow(); } public function set verticalScrollPolicy(_arg1:String):void{ _verticalScrollPolicy = _arg1; invalidate(InvalidationType.SIZE); } public function set useBitmapScrolling(_arg1:Boolean):void{ _useBitmpScrolling = _arg1; invalidate(InvalidationType.STATE); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, ScrollBar.getStyleDefinition())); } } }//package fl.containers
Section 4
//UILoader (fl.containers.UILoader) package fl.containers { import fl.core.*; import flash.events.*; import flash.utils.*; import flash.system.*; import flash.display.*; import flash.net.*; import fl.events.*; public class UILoader extends UIComponent { protected var loader:Loader; protected var _autoLoad:Boolean;// = true protected var _source:Object; protected var contentClip:Sprite; protected var _maintainAspectRatio:Boolean;// = true protected var contentInited:Boolean;// = false protected var _scaleContent:Boolean;// = true private static var defaultStyles:Object = {}; public function UILoader(){ _scaleContent = true; _autoLoad = true; contentInited = false; _maintainAspectRatio = true; super(); } public function get maintainAspectRatio():Boolean{ return (_maintainAspectRatio); } public function set maintainAspectRatio(_arg1:Boolean):void{ _maintainAspectRatio = _arg1; invalidate(InvalidationType.SIZE); } public function get source():Object{ return (_source); } protected function _unload(_arg1:Boolean=false):void{ var throwError = _arg1; if (loader != null){ clearLoadEvents(); contentClip.removeChild(loader); try { loader.close(); } catch(e:Error) { }; try { loader.unload(); } catch(e) { if (throwError){ throw (e); }; }; loader = null; return; }; contentInited = false; if (contentClip.numChildren){ contentClip.removeChildAt(0); }; } public function get bytesLoaded():uint{ return (((((loader == null)) || ((loader.contentLoaderInfo == null)))) ? 0 : loader.contentLoaderInfo.bytesLoaded); } public function set source(_arg1:Object):void{ if (_arg1 == ""){ return; }; _source = _arg1; _unload(); if (((_autoLoad) && (!((_source == null))))){ load(); }; } public function set autoLoad(_arg1:Boolean):void{ _autoLoad = _arg1; if (((((((_autoLoad) && ((loader == null)))) && (!((_source == null))))) && (!((_source == ""))))){ load(); }; } public function get content():DisplayObject{ if (loader != null){ return (loader.content); }; if (contentClip.numChildren){ return (contentClip.getChildAt(0)); }; return (null); } public function get percentLoaded():Number{ return (((bytesTotal)<=0) ? 0 : ((bytesLoaded / bytesTotal) * 100)); } protected function handleError(_arg1:Event):void{ passEvent(_arg1); clearLoadEvents(); loader.contentLoaderInfo.removeEventListener(Event.INIT, handleInit); } public function load(_arg1:URLRequest=null, _arg2:LoaderContext=null):void{ var _local3:DisplayObject; _unload(); if ((((((_arg1 == null)) || ((_arg1.url == null)))) && ((((_source == null)) || ((_source == "")))))){ return; }; _local3 = getDisplayObjectInstance(source); if (_local3 != null){ contentClip.addChild(_local3); contentInited = true; invalidate(InvalidationType.SIZE); return; }; if (_arg1 == null){ _arg1 = new URLRequest(_source.toString()); }; if (_arg2 == null){ _arg2 = new LoaderContext(false, ApplicationDomain.currentDomain); }; initLoader(); 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, handleComplete, false, 0, true); loader.contentLoaderInfo.addEventListener(Event.INIT, handleInit, false, 0, true); loader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, passEvent, false, 0, true); loader.load(_arg1, _arg2); } public function unload():void{ _source = null; _unload(true); } protected function passEvent(_arg1:Event):void{ dispatchEvent(_arg1); } public function loadBytes(_arg1:ByteArray, _arg2:LoaderContext=null):void{ var bytes = _arg1; var context = _arg2; _unload(); initLoader(); try { loader.loadBytes(bytes, context); } catch(error) { throw (error); }; } public function get autoLoad():Boolean{ return (_autoLoad); } protected function sizeContent(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{ var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; _local6 = _arg4; _local7 = _arg5; if (_maintainAspectRatio){ _local8 = (_arg4 / _arg5); _local9 = (_arg2 / _arg3); if (_local8 < _local9){ _local7 = (_local6 / _local9); } else { _local6 = (_local7 * _local9); }; }; _arg1.width = _local6; _arg1.height = _local7; _arg1.x = ((_arg4 / 2) - (_local6 / 2)); _arg1.y = ((_arg5 / 2) - (_local7 / 2)); } protected function initLoader():void{ loader = new Loader(); contentClip.addChild(loader); } override protected function draw():void{ if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } override protected function configUI():void{ super.configUI(); contentClip = new Sprite(); addChild(contentClip); } protected function handleInit(_arg1:Event):void{ loader.contentLoaderInfo.removeEventListener(Event.INIT, handleInit); contentInited = true; passEvent(_arg1); invalidate(InvalidationType.SIZE); } protected function handleComplete(_arg1:Event):void{ clearLoadEvents(); passEvent(_arg1); } override public function setSize(_arg1:Number, _arg2:Number):void{ if (((!(_scaleContent)) && ((_width > 0)))){ return; }; super.setSize(_arg1, _arg2); } protected function drawLayout():void{ var _local1:Boolean; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:LoaderInfo; if (!contentInited){ return; }; _local1 = false; if (loader){ _local6 = loader.contentLoaderInfo; _local2 = _local6.width; _local3 = _local6.height; } else { _local2 = contentClip.width; _local3 = contentClip.height; }; _local4 = _width; _local5 = _height; if (!_scaleContent){ _width = contentClip.width; _height = contentClip.height; } else { sizeContent(contentClip, _local2, _local3, _width, _height); }; if (((!((_local4 == _width))) || (!((_local5 == _height))))){ dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, true)); }; } public function get bytesTotal():uint{ return (((((loader == null)) || ((loader.contentLoaderInfo == null)))) ? 0 : loader.contentLoaderInfo.bytesTotal); } public function set scaleContent(_arg1:Boolean):void{ if (_scaleContent == _arg1){ return; }; _scaleContent = _arg1; invalidate(InvalidationType.SIZE); } 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, handleComplete); } public function get scaleContent():Boolean{ return (_scaleContent); } public function close():void{ try { loader.close(); } catch(error) { throw (error); }; } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.containers
Section 5
//CellRenderer (fl.controls.listClasses.CellRenderer) package fl.controls.listClasses { import fl.controls.*; import flash.events.*; public class CellRenderer extends LabelButton implements ICellRenderer { protected var _data:Object; protected var _listData:ListData; private static var defaultStyles:Object = {upSkin:"CellRenderer_upSkin", downSkin:"CellRenderer_downSkin", overSkin:"CellRenderer_overSkin", disabledSkin:"CellRenderer_disabledSkin", selectedDisabledSkin:"CellRenderer_selectedDisabledSkin", selectedUpSkin:"CellRenderer_selectedUpSkin", selectedDownSkin:"CellRenderer_selectedDownSkin", selectedOverSkin:"CellRenderer_selectedOverSkin", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5}; public function CellRenderer():void{ toggle = true; focusEnabled = false; } override protected function toggleSelected(_arg1:MouseEvent):void{ } override public function get selected():Boolean{ return (super.selected); } public function set listData(_arg1:ListData):void{ _listData = _arg1; label = _listData.label; setStyle("icon", _listData.icon); } override public function set selected(_arg1:Boolean):void{ super.selected = _arg1; } public function set data(_arg1:Object):void{ _data = _arg1; } public function get listData():ListData{ return (_listData); } override public function setSize(_arg1:Number, _arg2:Number):void{ super.setSize(_arg1, _arg2); } override protected function drawLayout():void{ var _local1:Number; var _local2:Number; var _local3:Number; _local1 = Number(getStyleValue("textPadding")); _local2 = 0; if (icon != null){ icon.x = _local1; icon.y = Math.round(((height - icon.height) >> 1)); _local2 = (icon.width + _local1); }; if (label.length > 0){ textField.visible = true; _local3 = Math.max(0, ((width - _local2) - (_local1 * 2))); textField.width = _local3; textField.height = (textField.textHeight + 4); textField.x = (_local2 + _local1); textField.y = Math.round(((height - textField.height) >> 1)); } else { textField.visible = false; }; background.width = width; background.height = height; } public function get data():Object{ return (_data); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls.listClasses
Section 6
//ICellRenderer (fl.controls.listClasses.ICellRenderer) package fl.controls.listClasses { public interface ICellRenderer { function setSize(_arg1:Number, _arg2:Number):void; function get listData():ListData; function get data():Object; function setMouseState(_arg1:String):void; function set x(_arg1:Number):void; function set y(_arg1:Number):void; function set data(_arg1:Object):void; function set selected(_arg1:Boolean):void; function set listData(_arg1:ListData):void; function get selected():Boolean; } }//package fl.controls.listClasses
Section 7
//ImageCell (fl.controls.listClasses.ImageCell) package fl.controls.listClasses { import flash.events.*; import flash.display.*; import fl.containers.*; public class ImageCell extends CellRenderer implements ICellRenderer { protected var loader:UILoader; protected var textOverlay:Shape; private static var defaultStyles:Object = {imagePadding:1, textOverlayAlpha:0.7}; public function ImageCell(){ loader = new UILoader(); loader.addEventListener(IOErrorEvent.IO_ERROR, handleErrorEvent, false, 0, true); loader.autoLoad = true; loader.scaleContent = true; addChild(loader); } public function get source():Object{ return (loader.source); } public function set source(_arg1:Object):void{ loader.source = _arg1; } override public function set listData(_arg1:ListData):void{ var _local2:Object; _listData = _arg1; label = _listData.label; _local2 = (_listData as TileListData).source; if (source != _local2){ source = _local2; }; } override protected function draw():void{ super.draw(); } override protected function configUI():void{ var _local1:Graphics; super.configUI(); textOverlay = new Shape(); _local1 = textOverlay.graphics; _local1.beginFill(0xFFFFFF); _local1.drawRect(0, 0, 100, 100); _local1.endFill(); } override public function get listData():ListData{ return (_listData); } override protected function drawLayout():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; _local1 = (getStyleValue("imagePadding") as Number); loader.move(_local1, _local1); _local2 = (width - (_local1 * 2)); _local3 = (height - (_local1 * 2)); if (((!((loader.width == _local2))) && (!((loader.height == _local3))))){ loader.setSize(_local2, _local3); }; loader.drawNow(); if ((((_label == "")) || ((_label == null)))){ if (contains(textField)){ removeChild(textField); }; if (contains(textOverlay)){ removeChild(textOverlay); }; } else { _local4 = (getStyleValue("textPadding") as Number); textField.width = Math.min((width - (_local4 * 2)), (textField.textWidth + 5)); textField.height = (textField.textHeight + 5); textField.x = Math.max(_local4, ((width / 2) - (textField.width / 2))); textField.y = ((height - textField.height) - _local4); textOverlay.x = _local1; textOverlay.height = (textField.height + (_local4 * 2)); textOverlay.y = ((height - textOverlay.height) - _local1); textOverlay.width = (width - (_local1 * 2)); textOverlay.alpha = (getStyleValue("textOverlayAlpha") as Number); addChild(textOverlay); addChild(textField); }; background.width = width; background.height = height; } protected function handleErrorEvent(_arg1:IOErrorEvent):void{ dispatchEvent(_arg1); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, CellRenderer.getStyleDefinition())); } } }//package fl.controls.listClasses
Section 8
//ListData (fl.controls.listClasses.ListData) package fl.controls.listClasses { import fl.core.*; public class ListData { protected var _index:uint; protected var _owner:UIComponent; protected var _label:String; protected var _icon:Object;// = null protected var _row:uint; protected var _column:uint; public function ListData(_arg1:String, _arg2:Object, _arg3:UIComponent, _arg4:uint, _arg5:uint, _arg6:uint=0){ _icon = null; super(); _label = _arg1; _icon = _arg2; _owner = _arg3; _index = _arg4; _row = _arg5; _column = _arg6; } public function get owner():UIComponent{ return (_owner); } public function get label():String{ return (_label); } public function get row():uint{ return (_row); } public function get index():uint{ return (_index); } public function get icon():Object{ return (_icon); } public function get column():uint{ return (_column); } } }//package fl.controls.listClasses
Section 9
//TileListData (fl.controls.listClasses.TileListData) package fl.controls.listClasses { import fl.core.*; public class TileListData extends ListData { protected var _source:Object; public function TileListData(_arg1:String, _arg2:Object, _arg3:Object, _arg4:UIComponent, _arg5:uint, _arg6:uint, _arg7:uint=0){ super(_arg1, _arg2, _arg4, _arg5, _arg6, _arg7); _source = _arg3; } public function get source():Object{ return (_source); } } }//package fl.controls.listClasses
Section 10
//BaseButton (fl.controls.BaseButton) package fl.controls { import fl.core.*; import flash.display.*; import flash.events.*; import fl.events.*; import flash.utils.*; public class BaseButton extends UIComponent { protected var _selected:Boolean;// = false private var unlockedMouseState:String; protected var pressTimer:Timer; protected var mouseState:String; protected var background:DisplayObject; private var _mouseStateLocked:Boolean;// = false protected var _autoRepeat: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(){ _selected = false; _autoRepeat = false; _mouseStateLocked = false; super(); buttonMode = true; mouseChildren = false; useHandCursor = false; setupMouseEvents(); setMouseState("up"); pressTimer = new Timer(1, 0); pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, 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 autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; mouseEnabled = _arg1; } public function get selected():Boolean{ return (_selected); } 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(); }; }; }; } public function setMouseState(_arg1:String):void{ if (_mouseStateLocked){ unlockedMouseState = _arg1; return; }; if (mouseState == _arg1){ return; }; mouseState = _arg1; invalidate(InvalidationType.STATE); } protected function startPress():void{ if (_autoRepeat){ pressTimer.delay = Number(getStyleValue("repeatDelay")); pressTimer.start(); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } 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 set selected(_arg1:Boolean):void{ if (_selected == _arg1){ return; }; _selected = _arg1; invalidate(InvalidationType.STATE); } override public function get enabled():Boolean{ return (super.enabled); } 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 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 drawLayout():void{ background.width = width; background.height = height; } protected function drawBackground():void{ var _local1:String; var _local2:DisplayObject; _local1 = (enabled) ? mouseState : "disabled"; if (selected){ _local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1)); }; _local1 = (_local1 + "Skin"); _local2 = background; background = getDisplayObjectInstance(getStyleValue(_local1)); addChildAt(background, 0); if (((!((_local2 == null))) && (!((_local2 == background))))){ removeChild(_local2); }; } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 11
//Button (fl.controls.Button) package fl.controls { import fl.core.*; import flash.display.*; import fl.managers.*; public class Button extends LabelButton implements IFocusManagerComponent { protected var emphasizedBorder:DisplayObject; protected var _emphasized:Boolean;// = false private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2}; public static var createAccessibilityImplementation:Function; public function Button(){ _emphasized = false; super(); } 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 function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; invalidate(InvalidationType.STYLES); } override protected function draw():void{ if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){ drawEmphasized(); }; super.draw(); if (emphasizedBorder != null){ setChildIndex(emphasizedBorder, (numChildren - 1)); }; } public function get emphasized():Boolean{ return (_emphasized); } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } protected function drawEmphasized():void{ var _local1:Object; var _local2:Number; if (emphasizedBorder != null){ removeChild(emphasizedBorder); }; emphasizedBorder = null; if (!_emphasized){ return; }; _local1 = 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 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
//ComboBox (fl.controls.ComboBox) package fl.controls { import fl.controls.listClasses.*; import fl.core.*; import flash.display.*; import flash.events.*; import flash.geom.*; import fl.data.*; import fl.managers.*; import fl.events.*; import flash.text.*; import flash.ui.*; public class ComboBox extends UIComponent implements IFocusManagerComponent { protected var _dropdownWidth:Number; protected var highlightedCell:int;// = -1 protected var _prompt:String; protected var isOpen:Boolean;// = false protected var list:List; protected var _rowCount:uint;// = 5 protected var currentIndex:int; protected var isKeyDown:Boolean;// = false protected var _labels:Array; protected var background:BaseButton; protected var inputField:TextInput; protected var listOverIndex:uint; protected var editableValue:String; protected var _editable:Boolean;// = false private var collectionItemImport:SimpleCollectionItem; protected static const BACKGROUND_STYLES:Object = {overSkin:"overSkin", downSkin:"downSkin", upSkin:"upSkin", disabledSkin:"disabledSkin", repeatInterval:"repeatInterval"}; protected static const LIST_STYLES:Object = {upSkin:"comboListUpSkin", overSkin:"comboListOverSkin", downSkin:"comobListDownSkin", disabledSkin:"comboListDisabledSkin", 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", textFormat:"textFormat", disabledAlpha:"disabledAlpha", skin:"listSkin"}; private static var defaultStyles:Object = {upSkin:"ComboBox_upSkin", downSkin:"ComboBox_downSkin", overSkin:"ComboBox_overSkin", disabledSkin:"ComboBox_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:3, buttonWidth:24, disabledAlpha:null, listSkin:null}; public static var createAccessibilityImplementation:Function; public function ComboBox(){ _rowCount = 5; _editable = false; isOpen = false; highlightedCell = -1; isKeyDown = false; super(); } protected function drawList():void{ list.rowCount = Math.max(0, Math.min(_rowCount, list.dataProvider.length)); } public function set imeMode(_arg1:String):void{ inputField.imeMode = _arg1; } public function get dropdown():List{ return (list); } public function get dropdownWidth():Number{ return (list.width); } public function sortItemsOn(_arg1:String, _arg2:Object=null){ return (list.sortItemsOn(_arg1, _arg2)); } protected function onEnter(_arg1:ComponentEvent):void{ _arg1.stopPropagation(); } public function removeItemAt(_arg1:uint):void{ list.removeItemAt(_arg1); invalidate(InvalidationType.DATA); } public function open():void{ currentIndex = selectedIndex; if (((isOpen) || ((length == 0)))){ return; }; dispatchEvent(new Event(Event.OPEN)); isOpen = true; addEventListener(Event.ENTER_FRAME, addCloseListener, false, 0, true); positionList(); list.scrollToSelected(); stage.addChild(list); } public function get selectedItem():Object{ return (list.selectedItem); } public function set text(_arg1:String):void{ if (!editable){ return; }; inputField.text = _arg1; } public function get labelField():String{ return (list.labelField); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:int; var _local3:uint; var _local4:Number; var _local5:int; isKeyDown = true; if (_arg1.ctrlKey){ switch (_arg1.keyCode){ case Keyboard.UP: if (highlightedCell > -1){ selectedIndex = highlightedCell; dispatchEvent(new Event(Event.CHANGE)); }; close(); break; case Keyboard.DOWN: open(); break; }; return; }; _arg1.stopPropagation(); _local2 = Math.max(((calculateAvailableHeight() / list.rowHeight) << 0), 1); _local3 = selectedIndex; _local4 = ((highlightedCell)==-1) ? selectedIndex : highlightedCell; _local5 = -1; switch (_arg1.keyCode){ case Keyboard.SPACE: if (isOpen){ close(); } else { open(); }; return; case Keyboard.ESCAPE: if (isOpen){ if (highlightedCell > -1){ selectedIndex = selectedIndex; }; close(); }; return; case Keyboard.UP: _local5 = Math.max(0, (_local4 - 1)); break; case Keyboard.DOWN: _local5 = Math.min((length - 1), (_local4 + 1)); break; case Keyboard.PAGE_UP: _local5 = Math.max((_local4 - _local2), 0); break; case Keyboard.PAGE_DOWN: _local5 = Math.min((_local4 + _local2), (length - 1)); break; case Keyboard.HOME: _local5 = 0; break; case Keyboard.END: _local5 = (length - 1); break; case Keyboard.ENTER: if (((_editable) && ((highlightedCell == -1)))){ editableValue = inputField.text; selectedIndex = -1; } else { if (((isOpen) && ((highlightedCell > -1)))){ editableValue = null; selectedIndex = highlightedCell; dispatchEvent(new Event(Event.CHANGE)); }; }; dispatchEvent(new ComponentEvent(ComponentEvent.ENTER)); close(); return; default: if (editable){ break; }; _local5 = list.getNextIndexAtLetter(String.fromCharCode(_arg1.keyCode), _local4); break; }; if (_local5 > -1){ if (isOpen){ highlightCell(_local5); inputField.text = list.itemToLabel(getItemAt(_local5)); } else { highlightCell(); selectedIndex = _local5; dispatchEvent(new Event(Event.CHANGE)); }; }; } public function set dropdownWidth(_arg1:Number):void{ _dropdownWidth = _arg1; invalidate(InvalidationType.SIZE); } public function get editable():Boolean{ return (_editable); } override protected function focusInHandler(_arg1:FocusEvent):void{ super.focusInHandler(_arg1); if (editable){ stage.focus = inputField.textField; }; } protected function onStageClick(_arg1:MouseEvent):void{ if (!isOpen){ return; }; if (((!(contains((_arg1.target as DisplayObject)))) && (!(list.contains((_arg1.target as DisplayObject)))))){ if (highlightedCell != -1){ selectedIndex = highlightedCell; dispatchEvent(new Event(Event.CHANGE)); }; close(); }; } protected function handleDataChange(_arg1:DataChangeEvent):void{ invalidate(InvalidationType.DATA); } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ isKeyDown = false; } protected function onListItemUp(_arg1:MouseEvent):void{ var _local2:*; stage.removeEventListener(MouseEvent.MOUSE_UP, onListItemUp); if (((!((_arg1.target is ICellRenderer))) || (!(list.contains((_arg1.target as DisplayObject)))))){ return; }; editableValue = null; _local2 = selectedIndex; selectedIndex = _arg1.target.listData.index; if (_local2 != selectedIndex){ dispatchEvent(new Event(Event.CHANGE)); }; close(); } public function removeAll():void{ list.removeAll(); inputField.text = ""; invalidate(InvalidationType.DATA); } public function set selectedItem(_arg1:Object):void{ list.selectedItem = _arg1; invalidate(InvalidationType.SELECTED); } protected function highlightCell(_arg1:int=-1):void{ var _local2:ICellRenderer; if (highlightedCell > -1){ _local2 = list.itemToCellRenderer(getItemAt(highlightedCell)); if (_local2 != null){ _local2.setMouseState("up"); }; }; if (_arg1 == -1){ return; }; list.scrollToIndex(_arg1); list.drawNow(); _local2 = list.itemToCellRenderer(getItemAt(_arg1)); if (_local2 != null){ _local2.setMouseState("over"); highlightedCell = _arg1; }; } public function itemToLabel(_arg1:Object):String{ if (_arg1 == null){ return (""); }; return (list.itemToLabel(_arg1)); } public function addItemAt(_arg1:Object, _arg2:uint):void{ list.addItemAt(_arg1, _arg2); invalidate(InvalidationType.DATA); } public function replaceItemAt(_arg1:Object, _arg2:uint):Object{ return (list.replaceItemAt(_arg1, _arg2)); } protected function showPrompt():void{ inputField.text = _prompt; } public function set rowCount(_arg1:uint):void{ _rowCount = _arg1; invalidate(InvalidationType.SIZE); } public function get restrict():String{ return (inputField.restrict); } protected function setEmbedFonts():void{ var _local1:Object; _local1 = getStyleValue("embedFonts"); if (_local1 != null){ inputField.textField.embedFonts = _local1; }; } public function sortItems(... _args){ return (list.sortItems.apply(list, _args)); } public function set labelField(_arg1:String):void{ list.labelField = _arg1; invalidate(InvalidationType.DATA); } public function set editable(_arg1:Boolean):void{ _editable = _arg1; drawTextField(); } public function set prompt(_arg1:String):void{ if (_arg1 == ""){ _prompt = null; } else { _prompt = _arg1; }; invalidate(InvalidationType.STATE); } public function get length():int{ return (list.length); } protected function drawTextField():void{ inputField.setStyle("upSkin", ""); inputField.setStyle("disabledSkin", ""); inputField.enabled = enabled; inputField.editable = _editable; inputField.textField.selectable = ((enabled) && (_editable)); inputField.mouseEnabled = (inputField.mouseChildren = ((enabled) && (_editable))); inputField.focusEnabled = false; if (_editable){ inputField.addEventListener(FocusEvent.FOCUS_IN, onInputFieldFocus, false, 0, true); inputField.addEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut, false, 0, true); } else { inputField.removeEventListener(FocusEvent.FOCUS_IN, onInputFieldFocus); inputField.removeEventListener(FocusEvent.FOCUS_OUT, onInputFieldFocusOut); }; } protected function onInputFieldFocusOut(_arg1:FocusEvent):void{ inputField.removeEventListener(ComponentEvent.ENTER, onEnter); selectedIndex = selectedIndex; } protected function passEvent(_arg1:Event):void{ dispatchEvent(_arg1); } public function get imeMode():String{ return (inputField.imeMode); } public function get labelFunction():Function{ return (list.labelFunction); } protected function calculateAvailableHeight():Number{ var _local1:Number; _local1 = Number(getStyleValue("contentPadding")); return ((list.height - (_local1 * 2))); } public function get selectedIndex():int{ return (list.selectedIndex); } override protected function focusOutHandler(_arg1:FocusEvent):void{ isKeyDown = false; if (isOpen){ if (((!(_arg1.relatedObject)) || (!(list.contains(_arg1.relatedObject))))){ if (((!((highlightedCell == -1))) && (!((highlightedCell == selectedIndex))))){ selectedIndex = highlightedCell; dispatchEvent(new Event(Event.CHANGE)); }; close(); }; }; super.focusOutHandler(_arg1); } public function get selectedLabel():String{ if (editableValue != null){ return (editableValue); }; if (selectedIndex == -1){ return (null); }; return (itemToLabel(selectedItem)); } public function get text():String{ return (inputField.text); } protected function onListChange(_arg1:Event):void{ editableValue = null; dispatchEvent(_arg1); invalidate(InvalidationType.SELECTED); if (isKeyDown){ return; }; close(); } protected function onToggleListVisibility(_arg1:MouseEvent):void{ _arg1.stopPropagation(); dispatchEvent(_arg1); if (isOpen){ close(); } else { open(); stage.addEventListener(MouseEvent.MOUSE_UP, onListItemUp, false, 0, true); }; } override protected function draw():void{ var _local1:*; _local1 = selectedIndex; if ((((_local1 == -1)) && (((((!((prompt == null))) || (editable))) || ((length == 0)))))){ _local1 = Math.max(-1, Math.min(_local1, (length - 1))); } else { editableValue = null; _local1 = Math.max(0, Math.min(_local1, (length - 1))); }; if (list.selectedIndex != _local1){ list.selectedIndex = _local1; invalidate(InvalidationType.SELECTED, false); }; if (isInvalid(InvalidationType.STYLES)){ setStyles(); setEmbedFonts(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.STATE)){ drawTextFormat(); drawLayout(); invalidate(InvalidationType.DATA); }; if (isInvalid(InvalidationType.DATA)){ drawList(); invalidate(InvalidationType.SELECTED, true); }; if (isInvalid(InvalidationType.SELECTED)){ if ((((_local1 == -1)) && (!((editableValue == null))))){ inputField.text = editableValue; } else { if (_local1 > -1){ if (length > 0){ inputField.horizontalScrollPosition = 0; inputField.text = itemToLabel(list.selectedItem); }; } else { if ((((_local1 == -1)) && (!((_prompt == null))))){ showPrompt(); } else { inputField.text = ""; }; }; }; if (((((editable) && ((selectedIndex > -1)))) && ((stage.focus == inputField.textField)))){ inputField.setSelection(0, inputField.length); }; }; drawTextField(); super.draw(); } public function addItem(_arg1:Object):void{ list.addItem(_arg1); invalidate(InvalidationType.DATA); } public function get rowCount():uint{ return (_rowCount); } override protected function configUI():void{ super.configUI(); background = new BaseButton(); background.focusEnabled = false; copyStylesToChild(background, BACKGROUND_STYLES); background.addEventListener(MouseEvent.MOUSE_DOWN, onToggleListVisibility, false, 0, true); addChild(background); inputField = new TextInput(); inputField.focusTarget = (this as IFocusManagerComponent); inputField.focusEnabled = false; inputField.addEventListener(Event.CHANGE, onTextInput, false, 0, true); addChild(inputField); list = new List(); list.focusEnabled = false; copyStylesToChild(list, LIST_STYLES); list.addEventListener(Event.CHANGE, onListChange, false, 0, true); list.addEventListener(ListEvent.ITEM_CLICK, onListChange, false, 0, true); list.addEventListener(ListEvent.ITEM_ROLL_OUT, passEvent, false, 0, true); list.addEventListener(ListEvent.ITEM_ROLL_OVER, passEvent, false, 0, true); list.verticalScrollBar.addEventListener(Event.SCROLL, passEvent, false, 0, true); } protected function positionList():void{ var _local1:Point; _local1 = localToGlobal(new Point(0, 0)); list.x = _local1.x; if (((_local1.y + height) + list.height) > stage.stageHeight){ list.y = (_local1.y - list.height); } else { list.y = (_local1.y + height); }; } public function get value():String{ var _local1:Object; if (editableValue != null){ return (editableValue); }; _local1 = selectedItem; if (((!(_editable)) && (!((_local1.data == null))))){ return (_local1.data); }; return (itemToLabel(_local1)); } public function get prompt():String{ return (_prompt); } public function set dataProvider(_arg1:DataProvider):void{ _arg1.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true); list.dataProvider = _arg1; invalidate(InvalidationType.DATA); } public function set restrict(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ _arg1 = null; }; if (!_editable){ return; }; inputField.restrict = _arg1; } protected function onTextInput(_arg1:Event):void{ _arg1.stopPropagation(); if (!_editable){ return; }; editableValue = inputField.text; selectedIndex = -1; dispatchEvent(new Event(Event.CHANGE)); } protected function onInputFieldFocus(_arg1:FocusEvent):void{ inputField.addEventListener(ComponentEvent.ENTER, onEnter, false, 0, true); close(); } public function getItemAt(_arg1:uint):Object{ return (list.getItemAt(_arg1)); } override protected function initializeAccessibility():void{ if (ComboBox.createAccessibilityImplementation != null){ ComboBox.createAccessibilityImplementation(this); }; } protected function drawLayout():void{ var _local1:Number; var _local2:Number; _local1 = (getStyleValue("buttonWidth") as Number); _local2 = (getStyleValue("textPadding") as Number); background.setSize(width, height); inputField.x = (inputField.y = _local2); inputField.setSize(((width - _local1) - _local2), (height - _local2)); list.width = (isNaN(_dropdownWidth)) ? width : _dropdownWidth; background.enabled = enabled; background.drawNow(); } public function removeItem(_arg1:Object):Object{ return (list.removeItem(_arg1)); } private function addCloseListener(_arg1:Event){ removeEventListener(Event.ENTER_FRAME, addCloseListener); if (!isOpen){ return; }; stage.addEventListener(MouseEvent.MOUSE_DOWN, onStageClick, false, 0, true); } public function get dataProvider():DataProvider{ return (list.dataProvider); } public function get textField():TextInput{ return (inputField); } protected function setStyles():void{ copyStylesToChild(background, BACKGROUND_STYLES); copyStylesToChild(list, LIST_STYLES); } public function set labelFunction(_arg1:Function):void{ list.labelFunction = _arg1; invalidate(InvalidationType.DATA); } protected function drawTextFormat():void{ var _local1:TextFormat; _local1 = (getStyleValue((_enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local1 == null){ _local1 = new TextFormat(); }; inputField.textField.defaultTextFormat = _local1; inputField.textField.setTextFormat(_local1); setEmbedFonts(); } public function set selectedIndex(_arg1:int):void{ list.selectedIndex = _arg1; highlightCell(); invalidate(InvalidationType.SELECTED); } public function close():void{ highlightCell(); highlightedCell = -1; if (!isOpen){ return; }; dispatchEvent(new Event(Event.CLOSE)); stage.removeEventListener(MouseEvent.MOUSE_DOWN, onStageClick); isOpen = false; stage.removeChild(list); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, List.getStyleDefinition())); } } }//package fl.controls
Section 14
//LabelButton (fl.controls.LabelButton) package fl.controls { import fl.core.*; import flash.display.*; import flash.events.*; import fl.managers.*; import fl.events.*; import flash.text.*; import flash.ui.*; public class LabelButton extends BaseButton implements IFocusManagerComponent { protected var _labelPlacement:String;// = "right" protected var _toggle:Boolean;// = false protected var icon:DisplayObject; protected var oldMouseState:String; protected var mode:String;// = "center" public var textField:TextField; protected var _label:String;// = "Label" 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; public function LabelButton(){ _labelPlacement = ButtonLabelPlacement.RIGHT; _toggle = false; _label = "Label"; mode = "center"; super(); } protected function toggleSelected(_arg1:MouseEvent):void{ selected = !(selected); dispatchEvent(new Event(Event.CHANGE, true)); } public function get labelPlacement():String{ return (_labelPlacement); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!enabled){ return; }; if (_arg1.keyCode == Keyboard.SPACE){ if (oldMouseState == null){ oldMouseState = mouseState; }; setMouseState("down"); startPress(); }; } protected function setEmbedFont(){ var _local1:Object; _local1 = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } 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)); }; } override public function get selected():Boolean{ return ((_toggle) ? _selected : false); } public function set labelPlacement(_arg1:String):void{ _labelPlacement = _arg1; invalidate(InvalidationType.SIZE); } 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); } public function get label():String{ return (_label); } override public function set selected(_arg1:Boolean):void{ _selected = _arg1; if (_toggle){ invalidate(InvalidationType.STATE); }; } 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(); } public function get toggle():Boolean{ return (_toggle); } override protected function configUI():void{ super.configUI(); textField = new TextField(); textField.type = TextFieldType.DYNAMIC; textField.selectable = false; addChild(textField); } override protected function drawLayout():void{ var _local1:Number; var _local2:String; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local1 = Number(getStyleValue("textPadding")); _local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement; textField.height = (textField.textHeight + 4); _local3 = (textField.textWidth + 4); _local4 = (textField.textHeight + 4); _local5 = ((icon)==null) ? 0 : (icon.width + _local1); _local6 = ((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(); } override protected function initializeAccessibility():void{ if (LabelButton.createAccessibilityImplementation != null){ LabelButton.createAccessibilityImplementation(this); }; } protected function drawIcon():void{ var _local1:DisplayObject; var _local2:String; var _local3:Object; _local1 = icon; _local2 = (enabled) ? mouseState : "disabled"; if (selected){ _local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1)); }; _local2 = (_local2 + "Icon"); _local3 = 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); } protected function drawTextFormat():void{ var _local1:Object; var _local2:TextFormat; var _local3:TextFormat; _local1 = UIComponent.getStyleDefinition(); _local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); _local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition())); } } }//package fl.controls
Section 15
//List (fl.controls.List) package fl.controls { import fl.controls.listClasses.*; import fl.core.*; import flash.display.*; import flash.events.*; import flash.geom.*; import fl.managers.*; import flash.utils.*; import flash.ui.*; public class List extends SelectableList implements IFocusManagerComponent { protected var _labelField:String;// = "label" protected var _rowHeight:Number;// = 20 protected var _cellRenderer:Object; protected var _iconField:String;// = "icon" protected var _labelFunction:Function; protected var _iconFunction:Function; private static var defaultStyles:Object = {focusRectSkin:null, focusRectPadding:null}; public static var createAccessibilityImplementation:Function; public function List(){ _rowHeight = 20; _labelField = "label"; _iconField = "icon"; super(); } public function get iconField():String{ return (_iconField); } protected function doKeySelection(_arg1:int, _arg2:Boolean, _arg3:Boolean):void{ var _local4:Boolean; var _local5:int; var _local6:Array; var _local7:int; var _local8:int; _local4 = false; if (_arg2){ _local6 = []; _local7 = lastCaretIndex; _local8 = _arg1; if (_local7 == -1){ _local7 = ((caretIndex)!=-1) ? caretIndex : _arg1; }; if (_local7 > _local8){ _local8 = _local7; _local7 = _arg1; }; _local5 = _local7; while (_local5 <= _local8) { _local6.push(_local5); _local5++; }; selectedIndices = _local6; caretIndex = _arg1; _local4 = true; } else { selectedIndex = _arg1; caretIndex = (lastCaretIndex = _arg1); _local4 = true; }; if (_local4){ dispatchEvent(new Event(Event.CHANGE)); }; invalidate(InvalidationType.DATA); } override protected function drawList():void{ var _local1:Rectangle; var _local2:uint; var _local3:uint; var _local4:uint; var _local5:Object; var _local6:ICellRenderer; var _local7:Dictionary; var _local8:Dictionary; var _local9:Boolean; var _local10:String; var _local11:Object; var _local12:Sprite; var _local13:String; listHolder.x = (listHolder.y = contentPadding); _local1 = listHolder.scrollRect; _local1.x = _horizontalScrollPosition; _local1.y = (Math.floor(_verticalScrollPosition) % rowHeight); listHolder.scrollRect = _local1; listHolder.cacheAsBitmap = useBitmapScrolling; _local2 = Math.floor((_verticalScrollPosition / rowHeight)); _local3 = Math.min(length, ((_local2 + rowCount) + 1)); _local7 = (renderedItems = new Dictionary(true)); _local4 = _local2; while (_local4 < _local3) { _local7[_dataProvider.getItemAt(_local4)] = true; _local4++; }; _local8 = new Dictionary(true); while (activeCellRenderers.length > 0) { _local6 = (activeCellRenderers.pop() as ICellRenderer); _local5 = _local6.data; if ((((_local7[_local5] == null)) || ((invalidItems[_local5] == true)))){ availableCellRenderers.push(_local6); } else { _local8[_local5] = _local6; invalidItems[_local5] = true; }; list.removeChild((_local6 as DisplayObject)); }; invalidItems = new Dictionary(true); _local4 = _local2; while (_local4 < _local3) { _local9 = false; _local5 = _dataProvider.getItemAt(_local4); if (_local8[_local5] != null){ _local9 = true; _local6 = _local8[_local5]; delete _local8[_local5]; } else { if (availableCellRenderers.length > 0){ _local6 = (availableCellRenderers.pop() as ICellRenderer); } else { _local6 = (getDisplayObjectInstance(getStyleValue("cellRenderer")) as ICellRenderer); _local12 = (_local6 as Sprite); if (_local12 != null){ _local12.addEventListener(MouseEvent.CLICK, handleCellRendererClick, false, 0, true); _local12.addEventListener(MouseEvent.ROLL_OVER, handleCellRendererMouseEvent, false, 0, true); _local12.addEventListener(MouseEvent.ROLL_OUT, handleCellRendererMouseEvent, false, 0, true); _local12.addEventListener(Event.CHANGE, handleCellRendererChange, false, 0, true); _local12.doubleClickEnabled = true; _local12.addEventListener(MouseEvent.DOUBLE_CLICK, handleCellRendererDoubleClick, false, 0, true); if (_local12["setStyle"] != null){ for (_local13 in rendererStyles) { var _local16 = _local12; _local16["setStyle"](_local13, rendererStyles[_local13]); }; }; }; }; }; list.addChild((_local6 as Sprite)); activeCellRenderers.push(_local6); _local6.y = (rowHeight * (_local4 - _local2)); _local6.setSize((availableWidth + _maxHorizontalScrollPosition), rowHeight); _local10 = itemToLabel(_local5); _local11 = null; if (_iconFunction != null){ _local11 = _iconFunction(_local5); } else { if (_iconField != null){ _local11 = _local5[_iconField]; }; }; if (!_local9){ _local6.data = _local5; }; _local6.listData = new ListData(_local10, _local11, this, _local4, _local4, 0); _local6.selected = !((_selectedIndices.indexOf(_local4) == -1)); if ((_local6 is UIComponent)){ (_local6 as UIComponent).drawNow(); }; _local4++; }; } public function get iconFunction():Function{ return (_iconFunction); } public function set iconField(_arg1:String):void{ if (_arg1 == _iconField){ return; }; _iconField = _arg1; invalidate(InvalidationType.DATA); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:int; if (!selectable){ return; }; switch (_arg1.keyCode){ case Keyboard.UP: case Keyboard.DOWN: case Keyboard.END: case Keyboard.HOME: case Keyboard.PAGE_UP: case Keyboard.PAGE_DOWN: moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); break; case Keyboard.LEFT: case Keyboard.RIGHT: moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); break; case Keyboard.SPACE: if (caretIndex == -1){ caretIndex = 0; }; doKeySelection(caretIndex, _arg1.shiftKey, _arg1.ctrlKey); scrollToSelected(); break; default: _local2 = getNextIndexAtLetter(String.fromCharCode(_arg1.keyCode), selectedIndex); if (_local2 > -1){ selectedIndex = _local2; scrollToSelected(); }; break; }; _arg1.stopPropagation(); } override public function itemToLabel(_arg1:Object):String{ if (_labelFunction != null){ return (String(_labelFunction(_arg1))); }; return (((_arg1[_labelField])!=null) ? String(_arg1[_labelField]) : ""); } public function get labelField():String{ return (_labelField); } override protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ var _local4:int; var _local5:int; var _local6:int; _local4 = Math.max(Math.floor((calculateAvailableHeight() / rowHeight)), 1); _local5 = -1; _local6 = 0; switch (_arg1){ case Keyboard.UP: if (caretIndex > 0){ _local5 = (caretIndex - 1); }; break; case Keyboard.DOWN: if (caretIndex < (length - 1)){ _local5 = (caretIndex + 1); }; break; case Keyboard.PAGE_UP: if (caretIndex > 0){ _local5 = Math.max((caretIndex - _local4), 0); }; break; case Keyboard.PAGE_DOWN: if (caretIndex < (length - 1)){ _local5 = Math.min((caretIndex + _local4), (length - 1)); }; break; case Keyboard.HOME: if (caretIndex > 0){ _local5 = 0; }; break; case Keyboard.END: if (caretIndex < (length - 1)){ _local5 = (length - 1); }; break; }; if (_local5 >= 0){ doKeySelection(_local5, _arg2, _arg3); scrollToSelected(); }; } public function set labelField(_arg1:String):void{ if (_arg1 == _labelField){ return; }; _labelField = _arg1; invalidate(InvalidationType.DATA); } public function set rowCount(_arg1:uint):void{ var _local2:Number; var _local3:Number; _local2 = Number(getStyleValue("contentPadding")); _local3 = ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0; height = (((rowHeight * _arg1) + (2 * _local2)) + _local3); } override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ list.x = -(_arg1); super.setHorizontalScrollPosition(_arg1, true); } public function set iconFunction(_arg1:Function):void{ if (_iconFunction == _arg1){ return; }; _iconFunction = _arg1; invalidate(InvalidationType.DATA); } public function get labelFunction():Function{ return (_labelFunction); } override protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ } override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ invalidate(InvalidationType.SCROLL); super.setVerticalScrollPosition(_arg1, true); } protected function calculateAvailableHeight():Number{ var _local1:Number; _local1 = Number(getStyleValue("contentPadding")); return (((height - (_local1 * 2)) - ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0)); } override protected function draw():void{ var _local1:Boolean; _local1 = !((contentHeight == (rowHeight * length))); contentHeight = (rowHeight * length); if (isInvalid(InvalidationType.STYLES)){ setStyles(); drawBackground(); if (contentPadding != getStyleValue("contentPadding")){ invalidate(InvalidationType.SIZE, false); }; if (_cellRenderer != getStyleValue("cellRenderer")){ _invalidateList(); _cellRenderer = getStyleValue("cellRenderer"); }; }; if (((isInvalid(InvalidationType.SIZE, InvalidationType.STATE)) || (_local1))){ drawLayout(); }; if (isInvalid(InvalidationType.RENDERER_STYLES)){ updateRendererStyles(); }; if (isInvalid(InvalidationType.STYLES, InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.SCROLL, InvalidationType.SELECTED)){ drawList(); }; updateChildren(); validate(); } override protected function configUI():void{ useFixedHorizontalScrolling = true; _horizontalScrollPolicy = ScrollPolicy.AUTO; _verticalScrollPolicy = ScrollPolicy.AUTO; super.configUI(); } override public function get rowCount():uint{ return (Math.ceil((calculateAvailableHeight() / rowHeight))); } override protected function initializeAccessibility():void{ if (List.createAccessibilityImplementation != null){ List.createAccessibilityImplementation(this); }; } override public function scrollToIndex(_arg1:int):void{ var _local2:uint; var _local3:uint; drawNow(); _local2 = (Math.floor(((_verticalScrollPosition + availableHeight) / rowHeight)) - 1); _local3 = Math.ceil((_verticalScrollPosition / rowHeight)); if (_arg1 < _local3){ verticalScrollPosition = (_arg1 * rowHeight); } else { if (_arg1 > _local2){ verticalScrollPosition = (((_arg1 + 1) * rowHeight) - availableHeight); }; }; } public function get rowHeight():Number{ return (_rowHeight); } public function set labelFunction(_arg1:Function):void{ if (_labelFunction == _arg1){ return; }; _labelFunction = _arg1; invalidate(InvalidationType.DATA); } public function set rowHeight(_arg1:Number):void{ _rowHeight = _arg1; invalidate(InvalidationType.SIZE); } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, SelectableList.getStyleDefinition())); } } }//package fl.controls
Section 16
//RadioButton (fl.controls.RadioButton) package fl.controls { import flash.display.*; import flash.events.*; import fl.managers.*; import flash.ui.*; public class RadioButton extends LabelButton implements IFocusManagerGroup { protected var _value:Object; protected var defaultGroupName:String;// = "RadioButtonGroup" protected var _group:RadioButtonGroup; 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(){ defaultGroupName = "RadioButtonGroup"; super(); mode = "border"; groupName = defaultGroupName; } 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 setThis():void{ var _local1:RadioButtonGroup; _local1 = _group; if (_local1 != null){ if (_local1.selection != this){ _local1.selection = this; }; } else { super.selected = true; }; } override public function get autoRepeat():Boolean{ return (false); } override public function set autoRepeat(_arg1:Boolean):void{ } protected function handleClick(_arg1:MouseEvent):void{ if (_group == null){ return; }; _group.dispatchEvent(new MouseEvent(MouseEvent.CLICK, true)); } 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; }; } private function setNext(_arg1:Boolean=true):void{ var _local2:RadioButtonGroup; var _local3:IFocusManager; var _local4:int; var _local5:Number; var _local6:int; var _local7:*; _local2 = _group; if (_local2 == null){ return; }; _local3 = focusManager; if (_local3){ _local3.showFocusIndicator = true; }; _local4 = _local2.getRadioButtonIndex(this); _local5 = _local2.numRadioButtons; _local6 = _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 get group():RadioButtonGroup{ return (_group); } override protected function keyUpHandler(_arg1:KeyboardEvent):void{ super.keyUpHandler(_arg1); if ((((_arg1.keyCode == Keyboard.SPACE)) && (!(_toggle)))){ _toggle = true; }; } override public function get selected():Boolean{ return (super.selected); } override public function set toggle(_arg1:Boolean):void{ throw (new Error("Warning: You cannot change a RadioButtons toggle.")); } public function set value(_arg1:Object):void{ _value = _arg1; } public function set group(_arg1:RadioButtonGroup):void{ groupName = _arg1.name; } 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 draw():void{ super.draw(); } override public function get toggle():Boolean{ return (true); } override protected function configUI():void{ var _local1:Shape; var _local2:Graphics; super.configUI(); super.toggle = true; _local1 = new Shape(); _local2 = _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); } 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); }; } public function get value():Object{ return (_value); } override protected function drawLayout():void{ var _local1:Number; super.drawLayout(); _local1 = 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)); } override protected function drawBackground():void{ } override protected function initializeAccessibility():void{ if (RadioButton.createAccessibilityImplementation != null){ RadioButton.createAccessibilityImplementation(this); }; } public function get groupName():String{ return (((_group)==null) ? null : _group.name); } private function setPrev(_arg1:Boolean=true):void{ var _local2:RadioButtonGroup; var _local3:IFocusManager; var _local4:int; var _local5:int; var _local6:*; _local2 = _group; if (_local2 == null){ return; }; _local3 = focusManager; if (_local3){ _local3.showFocusIndicator = true; }; _local4 = _local2.getRadioButtonIndex(this); _local5 = _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); }; } protected function handleChange(_arg1:Event):void{ super.selected = (_group.selection == this); dispatchEvent(new Event(Event.CHANGE, true)); } 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 _selection:RadioButton; protected var radioButtons:Array; protected var _name:String; 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 _local2:int; var _local3:RadioButton; _local2 = 0; while (_local2 < radioButtons.length) { _local3 = (radioButtons[_local2] as RadioButton); if (_local3 == _arg1){ return (_local2); }; _local2++; }; return (-1); } public function get numRadioButtons():int{ return (radioButtons.length); } public function get name():String{ return (_name); } public function get selection():RadioButton{ return (_selection); } 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 set selectedData(_arg1:Object):void{ var _local2:int; var _local3:RadioButton; _local2 = 0; while (_local2 < radioButtons.length) { _local3 = (radioButtons[_local2] as RadioButton); if (_local3.value == _arg1){ selection = _local3; return; }; _local2++; }; } public function removeRadioButton(_arg1:RadioButton):void{ var _local2:int; _local2 = getRadioButtonIndex(_arg1); if (_local2 != -1){ radioButtons.splice(_local2, 1); }; if (_selection == _arg1){ _selection = null; }; } public function addRadioButton(_arg1:RadioButton):void{ if (_arg1.groupName != name){ _arg1.groupName = name; return; }; radioButtons.push(_arg1); if (_arg1.selected){ selection = _arg1; }; } public function getRadioButtonAt(_arg1:int):RadioButton{ return (RadioButton(radioButtons[_arg1])); } public function get selectedData():Object{ var _local1:RadioButton; _local1 = _selection; return (((_local1)==null) ? null : _local1.value); } public static function getGroup(_arg1:String):RadioButtonGroup{ var _local2:RadioButtonGroup; if (groups == null){ groups = {}; }; _local2 = (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 fl.core.*; import flash.events.*; import fl.events.*; public class ScrollBar extends UIComponent { private var _direction:String;// = "vertical" protected var inDrag:Boolean;// = false protected var upArrow:BaseButton; private var _pageScrollSize:Number;// = 0 protected var downArrow:BaseButton; private var _pageSize:Number;// = 10 private var thumbScrollOffset:Number; private var _maxScrollPosition:Number;// = 0 private var _scrollPosition:Number;// = 0 protected var track:BaseButton; private var _minScrollPosition:Number;// = 0 private var _lineScrollSize:Number;// = 1 protected var thumb:LabelButton; 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(){ _pageSize = 10; _pageScrollSize = 0; _lineScrollSize = 1; _minScrollPosition = 0; _maxScrollPosition = 0; _scrollPosition = 0; _direction = ScrollBarDirection.VERTICAL; inDrag = false; super(); setStyles(); focusEnabled = false; } public function get minScrollPosition():Number{ return (_minScrollPosition); } public function set minScrollPosition(_arg1:Number):void{ setScrollProperties(_pageSize, _arg1, _maxScrollPosition); } public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{ var _local3:Number; _local3 = 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 set scrollPosition(_arg1:Number):void{ setScrollPosition(_arg1, true); } public function get pageScrollSize():Number{ return (((_pageScrollSize)==0) ? _pageSize : _pageScrollSize); } 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(); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; downArrow.enabled = (track.enabled = (thumb.enabled = (upArrow.enabled = ((enabled) && ((_maxScrollPosition > _minScrollPosition)))))); updateThumb(); } protected function updateThumb():void{ var _local1:Number; _local1 = ((_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; }; } 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); } 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; }; } protected function handleThumbDrag(_arg1:MouseEvent):void{ var _local2:Number; _local2 = Math.max(0, Math.min((track.height - thumb.height), ((mouseY - track.y) - thumbScrollOffset))); setScrollPosition((((_local2 / (track.height - thumb.height)) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition)); } public function set direction(_arg1:String):void{ var _local2:Boolean; if (_direction == _arg1){ return; }; _direction = _arg1; if (isLivePreview){ return; }; setScaleY(1); _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 set lineScrollSize(_arg1:Number):void{ if (_arg1 > 0){ _lineScrollSize = _arg1; }; } override public function get height():Number{ return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.width : super.height); } 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))); }; }; }; }; } public function get pageSize():Number{ return (_pageSize); } public function set maxScrollPosition(_arg1:Number):void{ setScrollProperties(_pageSize, _minScrollPosition, _arg1); } public function get scrollPosition():Number{ return (_scrollPosition); } 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 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 get direction():String{ return (_direction); } public function get lineScrollSize():Number{ return (_lineScrollSize); } override public function setSize(_arg1:Number, _arg2:Number):void{ if (_direction == ScrollBarDirection.HORIZONTAL){ super.setSize(_arg2, _arg1); } else { super.setSize(_arg1, _arg2); }; } public function get maxScrollPosition():Number{ return (_maxScrollPosition); } override public function get width():Number{ return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.height : super.width); } protected function setStyles():void{ copyStylesToChild(downArrow, DOWN_ARROW_STYLES); copyStylesToChild(thumb, THUMB_STYLES); copyStylesToChild(track, TRACK_STYLES); copyStylesToChild(upArrow, UP_ARROW_STYLES); } 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
//SelectableList (fl.controls.SelectableList) package fl.controls { import fl.controls.listClasses.*; import fl.core.*; import flash.display.*; import flash.events.*; import fl.data.*; import fl.managers.*; import fl.events.*; import flash.utils.*; import fl.containers.*; import flash.ui.*; public class SelectableList extends BaseScrollPane implements IFocusManagerComponent { protected var invalidItems:Dictionary; protected var renderedItems:Dictionary; protected var listHolder:Sprite; protected var _allowMultipleSelection:Boolean;// = false protected var lastCaretIndex:int;// = -1 protected var _selectedIndices:Array; protected var availableCellRenderers:Array; protected var list:Sprite; protected var caretIndex:int;// = -1 protected var updatedRendererStyles:Object; protected var preChangeItems:Array; protected var activeCellRenderers:Array; protected var rendererStyles:Object; protected var _verticalScrollPosition:Number; protected var _dataProvider:DataProvider; protected var _horizontalScrollPosition:Number; private var collectionItemImport:SimpleCollectionItem; protected var _selectable:Boolean;// = true private static var defaultStyles:Object = {skin:"List_skin", cellRenderer:CellRenderer, contentPadding:null, disabledAlpha:null}; public static var createAccessibilityImplementation:Function; public function SelectableList(){ _allowMultipleSelection = false; _selectable = true; caretIndex = -1; lastCaretIndex = -1; super(); activeCellRenderers = []; availableCellRenderers = []; invalidItems = new Dictionary(true); renderedItems = new Dictionary(true); _selectedIndices = []; if (dataProvider == null){ dataProvider = new DataProvider(); }; verticalScrollPolicy = ScrollPolicy.AUTO; rendererStyles = {}; updatedRendererStyles = {}; } protected function drawList():void{ } public function set allowMultipleSelection(_arg1:Boolean):void{ if (_arg1 == _allowMultipleSelection){ return; }; _allowMultipleSelection = _arg1; if (((!(_arg1)) && ((_selectedIndices.length > 1)))){ _selectedIndices = [_selectedIndices.pop()]; invalidate(InvalidationType.DATA); }; } public function sortItemsOn(_arg1:String, _arg2:Object=null){ return (_dataProvider.sortOn(_arg1, _arg2)); } public function removeItemAt(_arg1:uint):Object{ return (_dataProvider.removeItemAt(_arg1)); } public function get selectedItem():Object{ return (((_selectedIndices.length)==0) ? null : _dataProvider.getItemAt(selectedIndex)); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ if (!selectable){ return; }; switch (_arg1.keyCode){ case Keyboard.UP: case Keyboard.DOWN: case Keyboard.END: case Keyboard.HOME: case Keyboard.PAGE_UP: case Keyboard.PAGE_DOWN: moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); _arg1.stopPropagation(); break; case Keyboard.LEFT: case Keyboard.RIGHT: moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); _arg1.stopPropagation(); break; }; } public function get selectable():Boolean{ return (_selectable); } public function itemToCellRenderer(_arg1:Object):ICellRenderer{ var _local2:*; var _local3:ICellRenderer; if (_arg1 != null){ for (_local2 in activeCellRenderers) { _local3 = (activeCellRenderers[_local2] as ICellRenderer); if (_local3.data == _arg1){ return (_local3); }; }; }; return (null); } public function getNextIndexAtLetter(_arg1:String, _arg2:int=-1):int{ var _local3:int; var _local4:Number; var _local5:Number; var _local6:Object; var _local7:String; if (length == 0){ return (-1); }; _arg1 = _arg1.toUpperCase(); _local3 = (length - 1); _local4 = 0; while (_local4 < _local3) { _local5 = ((_arg2 + 1) + _local4); if (_local5 > (length - 1)){ _local5 = (_local5 - length); }; _local6 = getItemAt(_local5); if (_local6 == null){ break; }; _local7 = itemToLabel(_local6); if (_local7 == null){ } else { if (_local7.charAt(0).toUpperCase() == _arg1){ return (_local5); }; }; _local4++; }; return (-1); } public function invalidateList():void{ _invalidateList(); invalidate(InvalidationType.DATA); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; list.mouseChildren = _enabled; } public function get selectedIndices():Array{ return (_selectedIndices.concat()); } public function set selectable(_arg1:Boolean):void{ if (_arg1 == _selectable){ return; }; if (!_arg1){ selectedIndices = []; }; _selectable = _arg1; } public function itemToLabel(_arg1:Object):String{ return (_arg1["label"]); } public function addItemAt(_arg1:Object, _arg2:uint):void{ _dataProvider.addItemAt(_arg1, _arg2); invalidateList(); } public function replaceItemAt(_arg1:Object, _arg2:uint):Object{ return (_dataProvider.replaceItemAt(_arg1, _arg2)); } protected function handleDataChange(_arg1:DataChangeEvent):void{ var _local2:int; var _local3:int; var _local4:String; var _local5:uint; _local2 = _arg1.startIndex; _local3 = _arg1.endIndex; _local4 = _arg1.changeType; if (_local4 == DataChangeType.INVALIDATE_ALL){ clearSelection(); invalidateList(); } else { if (_local4 == DataChangeType.INVALIDATE){ _local5 = 0; while (_local5 < _arg1.items.length) { invalidateItem(_arg1.items[_local5]); _local5++; }; } else { if (_local4 == DataChangeType.ADD){ _local5 = 0; while (_local5 < _selectedIndices.length) { if (_selectedIndices[_local5] >= _local2){ _selectedIndices[_local5] = (_selectedIndices[_local5] + (_local2 - _local3)); }; _local5++; }; } else { if (_local4 == DataChangeType.REMOVE){ _local5 = 0; while (_local5 < _selectedIndices.length) { if (_selectedIndices[_local5] >= _local2){ if (_selectedIndices[_local5] <= _local3){ delete _selectedIndices[_local5]; } else { _selectedIndices[_local5] = (_selectedIndices[_local5] - ((_local2 - _local3) + 1)); }; }; _local5++; }; } else { if (_local4 == DataChangeType.REMOVE_ALL){ clearSelection(); } else { if (_local4 == DataChangeType.REPLACE){ } else { selectedItems = preChangeItems; preChangeItems = null; }; }; }; }; }; }; invalidate(InvalidationType.DATA); } protected function _invalidateList():void{ availableCellRenderers = []; while (activeCellRenderers.length > 0) { list.removeChild((activeCellRenderers.pop() as DisplayObject)); }; } protected function updateRendererStyles():void{ var _local1:Array; var _local2:uint; var _local3:uint; var _local4:String; _local1 = availableCellRenderers.concat(activeCellRenderers); _local2 = _local1.length; _local3 = 0; while (_local3 < _local2) { if (_local1[_local3].setStyle == null){ } else { for (_local4 in updatedRendererStyles) { _local1[_local3].setStyle(_local4, updatedRendererStyles[_local4]); }; _local1[_local3].drawNow(); }; _local3++; }; updatedRendererStyles = {}; } public function set selectedItem(_arg1:Object):void{ var _local2:int; _local2 = _dataProvider.getItemIndex(_arg1); selectedIndex = _local2; } public function sortItems(... _args){ return (_dataProvider.sort.apply(_dataProvider, _args)); } public function removeAll():void{ _dataProvider.removeAll(); } protected function handleCellRendererChange(_arg1:Event):void{ var _local2:ICellRenderer; var _local3:uint; _local2 = (_arg1.currentTarget as ICellRenderer); _local3 = _local2.listData.index; _dataProvider.invalidateItemAt(_local3); } protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ } override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ var _local3:Number; if (_arg1 == _horizontalScrollPosition){ return; }; _local3 = (_arg1 - _horizontalScrollPosition); _horizontalScrollPosition = _arg1; if (_arg2){ dispatchEvent(new ScrollEvent(ScrollBarDirection.HORIZONTAL, _local3, _arg1)); }; } public function scrollToSelected():void{ scrollToIndex(selectedIndex); } public function invalidateItem(_arg1:Object):void{ if (renderedItems[_arg1] == null){ return; }; invalidItems[_arg1] = true; invalidate(InvalidationType.DATA); } protected function handleCellRendererClick(_arg1:MouseEvent):void{ var _local2:ICellRenderer; var _local3:uint; var _local4:int; var _local5:int; var _local6:uint; if (!_enabled){ return; }; _local2 = (_arg1.currentTarget as ICellRenderer); _local3 = _local2.listData.index; if (((!(dispatchEvent(new ListEvent(ListEvent.ITEM_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data)))) || (!(_selectable)))){ return; }; _local4 = selectedIndices.indexOf(_local3); if (!_allowMultipleSelection){ if (_local4 != -1){ return; }; _local2.selected = true; _selectedIndices = [_local3]; lastCaretIndex = (caretIndex = _local3); } else { if (_arg1.shiftKey){ _local6 = ((_selectedIndices.length)>0) ? _selectedIndices[0] : _local3; _selectedIndices = []; if (_local6 > _local3){ _local5 = _local6; while (_local5 >= _local3) { _selectedIndices.push(_local5); _local5--; }; } else { _local5 = _local6; while (_local5 <= _local3) { _selectedIndices.push(_local5); _local5++; }; }; caretIndex = _local3; } else { if (_arg1.ctrlKey){ if (_local4 != -1){ _local2.selected = false; _selectedIndices.splice(_local4, 1); } else { _local2.selected = true; _selectedIndices.push(_local3); }; caretIndex = _local3; } else { _selectedIndices = [_local3]; lastCaretIndex = (caretIndex = _local3); }; }; }; dispatchEvent(new Event(Event.CHANGE)); invalidate(InvalidationType.DATA); } public function get length():uint{ return (_dataProvider.length); } public function get allowMultipleSelection():Boolean{ return (_allowMultipleSelection); } protected function onPreChange(_arg1:DataChangeEvent):void{ switch (_arg1.changeType){ case DataChangeType.REMOVE: case DataChangeType.ADD: case DataChangeType.INVALIDATE: case DataChangeType.REMOVE_ALL: case DataChangeType.REPLACE: case DataChangeType.INVALIDATE_ALL: break; default: preChangeItems = selectedItems; break; }; } public function getRendererStyle(_arg1:String, _arg2:int=-1):Object{ return (rendererStyles[_arg1]); } override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ var _local3:Number; if (_arg1 == _verticalScrollPosition){ return; }; _local3 = (_arg1 - _verticalScrollPosition); _verticalScrollPosition = _arg1; if (_arg2){ dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _local3, _arg1)); }; } protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ } public function set selectedIndices(_arg1:Array):void{ if (!_selectable){ return; }; _selectedIndices = ((_arg1)==null) ? [] : _arg1.concat(); invalidate(InvalidationType.SELECTED); } public function get selectedIndex():int{ return (((_selectedIndices.length)==0) ? -1 : _selectedIndices[(_selectedIndices.length - 1)]); } override protected function draw():void{ super.draw(); } override protected function configUI():void{ super.configUI(); listHolder = new Sprite(); addChild(listHolder); listHolder.scrollRect = contentScrollRect; list = new Sprite(); listHolder.addChild(list); } public function addItem(_arg1:Object):void{ _dataProvider.addItem(_arg1); invalidateList(); } protected function handleCellRendererMouseEvent(_arg1:MouseEvent):void{ var _local2:ICellRenderer; var _local3:String; _local2 = (_arg1.target as ICellRenderer); _local3 = ((_arg1.type)==MouseEvent.ROLL_OVER) ? ListEvent.ITEM_ROLL_OVER : ListEvent.ITEM_ROLL_OUT; dispatchEvent(new ListEvent(_local3, false, false, _local2.listData.column, _local2.listData.row, _local2.listData.index, _local2.data)); } public function clearRendererStyle(_arg1:String, _arg2:int=-1):void{ delete rendererStyles[_arg1]; updatedRendererStyles[_arg1] = null; invalidate(InvalidationType.RENDERER_STYLES); } protected function handleCellRendererDoubleClick(_arg1:MouseEvent):void{ var _local2:ICellRenderer; var _local3:uint; if (!_enabled){ return; }; _local2 = (_arg1.currentTarget as ICellRenderer); _local3 = _local2.listData.index; dispatchEvent(new ListEvent(ListEvent.ITEM_DOUBLE_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data)); } public function get rowCount():uint{ return (0); } public function isItemSelected(_arg1:Object):Boolean{ return ((selectedItems.indexOf(_arg1) > -1)); } public function set dataProvider(_arg1:DataProvider):void{ if (_dataProvider != null){ _dataProvider.removeEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange); _dataProvider.removeEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange); }; _dataProvider = _arg1; _dataProvider.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true); _dataProvider.addEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange, false, 0, true); clearSelection(); invalidateList(); } override protected function drawLayout():void{ super.drawLayout(); contentScrollRect = listHolder.scrollRect; contentScrollRect.width = availableWidth; contentScrollRect.height = availableHeight; listHolder.scrollRect = contentScrollRect; } public function getItemAt(_arg1:uint):Object{ return (_dataProvider.getItemAt(_arg1)); } override protected function initializeAccessibility():void{ if (SelectableList.createAccessibilityImplementation != null){ SelectableList.createAccessibilityImplementation(this); }; } public function scrollToIndex(_arg1:int):void{ } public function removeItem(_arg1:Object):Object{ return (_dataProvider.removeItem(_arg1)); } public function get dataProvider():DataProvider{ return (_dataProvider); } public function set maxHorizontalScrollPosition(_arg1:Number):void{ _maxHorizontalScrollPosition = _arg1; invalidate(InvalidationType.SIZE); } public function setRendererStyle(_arg1:String, _arg2:Object, _arg3:uint=0):void{ if (rendererStyles[_arg1] == _arg2){ return; }; updatedRendererStyles[_arg1] = _arg2; rendererStyles[_arg1] = _arg2; invalidate(InvalidationType.RENDERER_STYLES); } public function invalidateItemAt(_arg1:uint):void{ var _local2:Object; _local2 = _dataProvider.getItemAt(_arg1); if (_local2 != null){ invalidateItem(_local2); }; } public function set selectedItems(_arg1:Array):void{ var _local2:Array; var _local3:uint; var _local4:int; if (_arg1 == null){ selectedIndices = null; return; }; _local2 = []; _local3 = 0; while (_local3 < _arg1.length) { _local4 = _dataProvider.getItemIndex(_arg1[_local3]); if (_local4 != -1){ _local2.push(_local4); }; _local3++; }; selectedIndices = _local2; } public function clearSelection():void{ selectedIndex = -1; } override public function get maxHorizontalScrollPosition():Number{ return (_maxHorizontalScrollPosition); } public function get selectedItems():Array{ var _local1:Array; var _local2:uint; _local1 = []; _local2 = 0; while (_local2 < _selectedIndices.length) { _local1.push(_dataProvider.getItemAt(_selectedIndices[_local2])); _local2++; }; return (_local1); } public function set selectedIndex(_arg1:int):void{ selectedIndices = ((_arg1)==-1) ? null : [_arg1]; } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, BaseScrollPane.getStyleDefinition())); } } }//package fl.controls
Section 22
//TextInput (fl.controls.TextInput) package fl.controls { import fl.core.*; import flash.display.*; import flash.events.*; import fl.managers.*; import fl.events.*; import flash.text.*; import flash.ui.*; public class TextInput extends UIComponent implements IFocusManagerComponent { protected var _html:Boolean;// = false protected var _savedHTML:String; protected var background:DisplayObject; 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 TextInput(){ _editable = true; _html = false; super(); } override public function drawFocus(_arg1:Boolean):void{ if (focusTarget != null){ focusTarget.drawFocus(_arg1); return; }; super.drawFocus(_arg1); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == textField)) || (super.isOurFocus(_arg1)))); } protected function handleKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ENTER){ dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true)); }; } 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; } public function get selectionEndIndex():int{ return (textField.selectionEndIndex); } public function get editable():Boolean{ return (_editable); } override protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (_arg1.target == this){ stage.focus = textField; }; _local2 = 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 selectionBeginIndex():int{ return (textField.selectionBeginIndex); } public function set alwaysShowSelection(_arg1:Boolean):void{ textField.alwaysShowSelection = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; updateTextFieldType(); } protected function setEmbedFont(){ var _local1:Object; _local1 = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } public function get horizontalScrollPosition():int{ return (textField.scrollH); } public function set condenseWhite(_arg1:Boolean):void{ textField.condenseWhite = _arg1; } public function set displayAsPassword(_arg1:Boolean):void{ textField.displayAsPassword = _arg1; } public function set horizontalScrollPosition(_arg1:int):void{ textField.scrollH = _arg1; } public function get restrict():String{ return (textField.restrict); } public function get textWidth():Number{ return (textField.textWidth); } public function get textHeight():Number{ return (textField.textHeight); } public function set editable(_arg1:Boolean):void{ _editable = _arg1; updateTextFieldType(); } public function get maxChars():int{ return (textField.maxChars); } public function get length():int{ return (textField.length); } public function getLineMetrics(_arg1:int):TextLineMetrics{ return (textField.getLineMetrics(_arg1)); } public function get imeMode():String{ return (_imeMode); } override protected function focusOutHandler(_arg1:FocusEvent):void{ super.focusOutHandler(_arg1); if (editable){ setIMEMode(false); }; } public function set htmlText(_arg1:String):void{ if (_arg1 == ""){ text = ""; return; }; _html = true; _savedHTML = _arg1; textField.htmlText = _arg1; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); } public function get text():String{ return (textField.text); } override public function get enabled():Boolean{ return (super.enabled); } public function get condenseWhite():Boolean{ return (textField.condenseWhite); } public function get alwaysShowSelection():Boolean{ return (textField.alwaysShowSelection); } 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(); } protected function handleTextInput(_arg1:TextEvent):void{ _arg1.stopPropagation(); dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text)); } 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 setSelection(_arg1:int, _arg2:int):void{ textField.setSelection(_arg1, _arg2); } public function get displayAsPassword():Boolean{ return (textField.displayAsPassword); } public function appendText(_arg1:String):void{ textField.appendText(_arg1); } public function set restrict(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ _arg1 = null; }; textField.restrict = _arg1; } public function get htmlText():String{ return (textField.htmlText); } protected function drawBackground():void{ var _local1:DisplayObject; var _local2:String; _local1 = background; _local2 = (enabled) ? "upSkin" : "disabledSkin"; background = getDisplayObjectInstance(getStyleValue(_local2)); if (background == null){ return; }; addChildAt(background, 0); if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){ removeChild(_local1); }; } override public function setFocus():void{ stage.focus = textField; } protected function drawLayout():void{ var _local1:Number; _local1 = 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 maxChars(_arg1:int):void{ textField.maxChars = _arg1; } public function get maxHorizontalScrollPosition():int{ return (textField.maxScrollH); } protected function drawTextFormat():void{ var _local1:Object; var _local2:TextFormat; var _local3:TextFormat; _local1 = UIComponent.getStyleDefinition(); _local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); _local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); if (_html){ textField.htmlText = _savedHTML; }; } protected function handleChange(_arg1:Event):void{ _arg1.stopPropagation(); dispatchEvent(new Event(Event.CHANGE, true)); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 23
//TileList (fl.controls.TileList) package fl.controls { import fl.core.*; import flash.events.*; import flash.utils.*; import flash.display.*; import fl.data.*; import fl.controls.listClasses.*; import fl.managers.*; import flash.ui.*; public class TileList extends SelectableList implements IFocusManagerComponent { protected var _labelField:String;// = "label" protected var _scrollPolicy:String;// = "auto" protected var _labelFunction:Function; protected var _scrollDirection:String;// = "horizontal" protected var _iconFunction:Function; private var collectionItemImport:TileListCollectionItem; protected var _rowHeight:Number;// = 50 protected var _cellRenderer:Object; protected var _columnWidth:Number;// = 50 protected var _iconField:String;// = "icon" protected var _sourceFunction:Function; protected var __rowCount:uint;// = 0 protected var __columnCount:uint;// = 0 protected var _sourceField:String;// = "source" protected var oldLength:uint;// = 0 private static var defaultStyles:Object = {cellRenderer:ImageCell, focusRectSkin:null, focusRectPadding:null, skin:"TileList_skin"}; public static var createAccessibilityImplementation:Function; public function TileList(){ _rowHeight = 50; _columnWidth = 50; _scrollDirection = ScrollBarDirection.HORIZONTAL; _scrollPolicy = ScrollPolicy.AUTO; oldLength = 0; _labelField = "label"; _iconField = "icon"; _sourceField = "source"; __rowCount = 0; __columnCount = 0; super(); } public function get iconField():String{ return (_iconField); } override protected function drawList():void{ var _local1:uint; var _local2:uint; var _local3:Object; var _local4:ICellRenderer; var _local5:uint; var _local6:uint; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:uint; var _local12:uint; var _local13:Array; var _local14:Dictionary; var _local15:Dictionary; var _local16:uint; var _local17:uint; var _local18:uint; var _local19:uint; var _local20:Boolean; var _local21:String; var _local22:Object; var _local23:Object; var _local24:Sprite; var _local25:String; var _local26:UIComponent; _local5 = rowCount; _local6 = columnCount; _local7 = columnWidth; _local8 = rowHeight; _local9 = 0; _local10 = 0; listHolder.x = (listHolder.y = contentPadding); contentScrollRect = listHolder.scrollRect; contentScrollRect.x = (Math.floor(_horizontalScrollPosition) % _local7); contentScrollRect.y = (Math.floor(_verticalScrollPosition) % _local8); listHolder.scrollRect = contentScrollRect; listHolder.cacheAsBitmap = useBitmapScrolling; _local13 = []; if (_scrollDirection == ScrollBarDirection.HORIZONTAL){ _local16 = ((availableWidth / _local7) << 0); _local17 = Math.max(_local16, Math.ceil((length / _local5))); _local9 = ((_horizontalScrollPosition / _local7) << 0); _local6 = Math.max(_local16, Math.min((_local17 - _local9), (_local6 + 1))); _local12 = 0; while (_local12 < _local5) { _local11 = 0; while (_local11 < _local6) { _local2 = (((_local12 * _local17) + _local9) + _local11); if (_local2 >= length){ break; }; _local13.push(_local2); _local11++; }; _local12++; }; } else { _local5++; _local10 = ((_verticalScrollPosition / _local8) << 0); _local18 = Math.floor((_local10 * _local6)); _local19 = Math.min(length, (_local18 + (_local5 * _local6))); _local1 = _local18; while (_local1 < _local19) { _local13.push(_local1); _local1++; }; }; _local14 = (renderedItems = new Dictionary(true)); for each (_local2 in _local13) { _local14[_dataProvider.getItemAt(_local2)] = true; }; _local15 = new Dictionary(true); while (activeCellRenderers.length > 0) { _local4 = activeCellRenderers.pop(); _local3 = _local4.data; if ((((_local14[_local3] == null)) || ((invalidItems[_local3] == true)))){ availableCellRenderers.push(_local4); } else { _local15[_local3] = _local4; invalidItems[_local3] = true; }; list.removeChild((_local4 as DisplayObject)); }; invalidItems = new Dictionary(true); _local1 = 0; for each (_local2 in _local13) { _local11 = (_local1 % _local6); _local12 = ((_local1 / _local6) << 0); _local20 = false; _local3 = _dataProvider.getItemAt(_local2); if (_local15[_local3] != null){ _local20 = true; _local4 = _local15[_local3]; delete _local15[_local3]; } else { if (availableCellRenderers.length > 0){ _local4 = (availableCellRenderers.pop() as ICellRenderer); } else { _local4 = (getDisplayObjectInstance(getStyleValue("cellRenderer")) as ICellRenderer); _local24 = (_local4 as Sprite); if (_local24 != null){ _local24.addEventListener(MouseEvent.CLICK, handleCellRendererClick, false, 0, true); _local24.addEventListener(MouseEvent.ROLL_OVER, handleCellRendererMouseEvent, false, 0, true); _local24.addEventListener(MouseEvent.ROLL_OUT, handleCellRendererMouseEvent, false, 0, true); _local24.addEventListener(Event.CHANGE, handleCellRendererChange, false, 0, true); _local24.doubleClickEnabled = true; _local24.addEventListener(MouseEvent.DOUBLE_CLICK, handleCellRendererDoubleClick, false, 0, true); if (_local24["setStyle"] != null){ for (_local25 in rendererStyles) { var _local31 = _local24; _local31["setStyle"](_local25, rendererStyles[_local25]); }; }; }; }; }; list.addChild((_local4 as Sprite)); activeCellRenderers.push(_local4); _local4.y = (_local8 * _local12); _local4.x = (_local7 * _local11); _local4.setSize(columnWidth, rowHeight); _local21 = itemToLabel(_local3); _local22 = null; if (_iconFunction != null){ _local22 = _iconFunction(_local3); } else { if (_iconField != null){ _local22 = _local3[_iconField]; }; }; _local23 = null; if (_sourceFunction != null){ _local23 = _sourceFunction(_local3); } else { if (_sourceField != null){ _local23 = _local3[_sourceField]; }; }; if (!_local20){ _local4.data = _local3; }; _local4.listData = (new TileListData(_local21, _local22, _local23, this, _local2, (_local10 + _local12), (_local9 + _local11)) as ListData); _local4.selected = !((_selectedIndices.indexOf(_local2) == -1)); if ((_local4 is UIComponent)){ _local26 = (_local4 as UIComponent); _local26.drawNow(); }; _local1++; }; } public function get columnWidth():Number{ return (_columnWidth); } public function set iconField(_arg1:String):void{ if (_arg1 == _iconField){ return; }; _iconField = _arg1; invalidate(InvalidationType.DATA); } public function set columnWidth(_arg1:Number):void{ if (_columnWidth == _arg1){ return; }; _columnWidth = _arg1; invalidate(InvalidationType.SIZE); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:int; _arg1.stopPropagation(); if (!selectable){ return; }; switch (_arg1.keyCode){ case Keyboard.UP: case Keyboard.DOWN: moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); break; case Keyboard.PAGE_UP: case Keyboard.PAGE_DOWN: case Keyboard.END: case Keyboard.HOME: if (_scrollDirection == ScrollBarDirection.HORIZONTAL){ moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); } else { moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); }; break; case Keyboard.LEFT: case Keyboard.RIGHT: moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection))); break; default: _local2 = getNextIndexAtLetter(String.fromCharCode(_arg1.keyCode), selectedIndex); if (_local2 > -1){ selectedIndex = _local2; scrollToSelected(); }; break; }; } override public function get horizontalScrollPolicy():String{ return (null); } public function set scrollPolicy(_arg1:String):void{ if (((!(componentInspectorSetting)) && ((_scrollPolicy == _arg1)))){ return; }; _scrollPolicy = _arg1; if (direction == ScrollBarDirection.HORIZONTAL){ _horizontalScrollPolicy = _arg1; _verticalScrollPolicy = ScrollPolicy.OFF; } else { _verticalScrollPolicy = _arg1; _horizontalScrollPolicy = ScrollPolicy.OFF; }; invalidate(InvalidationType.SIZE); } public function set labelField(_arg1:String):void{ if (_arg1 == _labelField){ return; }; _labelField = _arg1; invalidate(InvalidationType.DATA); } override public function get verticalScrollPolicy():String{ return (null); } public function get innerWidth():Number{ var _local1:Number; drawNow(); _local1 = (getStyleValue("contentPadding") as Number); return (((width - (_local1 * 2)) - (_verticalScrollBar.visible) ? _verticalScrollBar.width : 0)); } protected function calculateAvailableHeight():Number{ var _local1:Number; _local1 = Number(getStyleValue("contentPadding")); return (((height - (_local1 * 2)) - ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0)); } public function get sourceFunction():Function{ return (_sourceFunction); } override protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ var _local4:uint; var _local5:int; var _local6:int; var _local7:*; _local4 = Math.ceil((Math.max((rowCount * columnCount), length) / rowCount)); switch (_arg1){ case Keyboard.LEFT: _local5 = Math.max(0, (selectedIndex - 1)); break; case Keyboard.RIGHT: _local5 = Math.min((length - 1), (selectedIndex + 1)); break; case Keyboard.HOME: _local5 = 0; break; case Keyboard.END: _local5 = (length - 1); break; case Keyboard.PAGE_UP: _local6 = (selectedIndex - (selectedIndex % _local4)); _local5 = Math.max(0, Math.max(_local6, (selectedIndex - columnCount))); break; case Keyboard.PAGE_DOWN: _local7 = (((selectedIndex - (selectedIndex % _local4)) + _local4) - 1); _local5 = Math.min((length - 1), Math.min(_local7, (selectedIndex + _local4))); break; }; doKeySelection(_local5, _arg2, _arg3); scrollToSelected(); } override protected function draw():void{ var _local1:Boolean; if (direction == ScrollBarDirection.VERTICAL){ if (__rowCount > 0){ rowCount = __rowCount; }; if (__columnCount > 0){ columnCount = __columnCount; }; } else { if (__columnCount > 0){ columnCount = __columnCount; }; if (__rowCount > 0){ rowCount = __rowCount; }; }; _local1 = !((oldLength == length)); oldLength = length; if (isInvalid(InvalidationType.STYLES)){ setStyles(); drawBackground(); if (contentPadding != getStyleValue("contentPadding")){ invalidate(InvalidationType.SIZE, false); }; if (_cellRenderer != getStyleValue("cellRenderer")){ _invalidateList(); _cellRenderer = getStyleValue("cellRenderer"); }; }; if (((isInvalid(InvalidationType.SIZE, InvalidationType.STATE)) || (_local1))){ drawLayout(); }; if (isInvalid(InvalidationType.RENDERER_STYLES)){ updateRendererStyles(); }; if (isInvalid(InvalidationType.STYLES, InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.SCROLL, InvalidationType.SELECTED)){ drawList(); _maxHorizontalScrollPosition = Math.max(0, (contentWidth - availableWidth)); }; updateChildren(); validate(); } override public function set horizontalScrollPolicy(_arg1:String):void{ } override protected function configUI():void{ super.configUI(); _horizontalScrollPolicy = scrollPolicy; _verticalScrollPolicy = ScrollPolicy.OFF; } override protected function drawLayout():void{ var _local1:uint; var _local2:uint; _horizontalScrollPolicy = ((_scrollDirection)==ScrollBarDirection.HORIZONTAL) ? _scrollPolicy : ScrollPolicy.OFF; _verticalScrollPolicy = ((_scrollDirection)!=ScrollBarDirection.HORIZONTAL) ? _scrollPolicy : ScrollPolicy.OFF; if (_scrollDirection == ScrollBarDirection.HORIZONTAL){ _local1 = rowCount; contentHeight = (_local1 * _rowHeight); contentWidth = (_columnWidth * Math.ceil((length / _local1))); } else { _local2 = columnCount; contentWidth = (_local2 * _columnWidth); contentHeight = (_rowHeight * Math.ceil((length / _local2))); }; super.drawLayout(); } public function get sourceField():String{ return (_sourceField); } override public function get maxHorizontalScrollPosition():Number{ drawNow(); return (_maxHorizontalScrollPosition); } public function set labelFunction(_arg1:Function):void{ if (_labelFunction == _arg1){ return; }; _labelFunction = _arg1; invalidate(InvalidationType.DATA); } override public function set verticalScrollPolicy(_arg1:String):void{ } protected function doKeySelection(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ var _local4:Array; var _local5:Boolean; var _local6:uint; var _local7:int; _local4 = selectedIndices; _local5 = false; if ((((_arg1 < 0)) || ((_arg1 > (length - 1))))){ } else { if (((((_arg2) && ((_local4.length > 0)))) && (!((_arg1 == _local4[0]))))){ _local6 = _local4[0]; _local4 = []; if (_arg1 < _local6){ _local7 = _local6; while (_local7 >= _arg1) { _local4.push(_local7); _local7--; }; } else { _local7 = _local6; while (_local7 <= _arg1) { _local4.push(_local7); _local7++; }; }; _local5 = true; } else { _local4 = [_arg1]; caretIndex = _arg1; _local5 = true; }; }; selectedIndices = _local4; if (_local5){ dispatchEvent(new Event(Event.CHANGE)); }; invalidate(InvalidationType.DATA); } public function set sourceFunction(_arg1:Function):void{ _sourceFunction = _arg1; invalidate(InvalidationType.DATA); } public function get scrollPolicy():String{ return (_scrollPolicy); } public function get labelField():String{ return (_labelField); } override protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{ var _local4:uint; var _local5:uint; var _local6:uint; var _local7:int; var _local8:int; _local4 = Math.max(1, ((Math.max(contentHeight, availableHeight) / _rowHeight) << 0)); _local5 = Math.ceil((Math.max((columnCount * rowCount), length) / _local4)); _local6 = Math.ceil((length / _local5)); switch (_arg1){ case Keyboard.UP: _local7 = (selectedIndex - _local5); break; case Keyboard.DOWN: _local7 = (selectedIndex + _local5); break; case Keyboard.HOME: _local7 = 0; break; case Keyboard.END: _local7 = (length - 1); break; case Keyboard.PAGE_DOWN: _local8 = (selectedIndex + (_local5 * (_local6 - 1))); if (_local8 >= length){ _local8 = (_local8 - _local5); }; _local7 = Math.min((length - 1), _local8); break; case Keyboard.PAGE_UP: _local8 = (selectedIndex - (_local5 * (_local6 - 1))); if (_local8 < 0){ _local8 = (_local8 + _local5); }; _local7 = Math.max(0, _local8); break; }; doKeySelection(_local7, _arg2, _arg3); scrollToSelected(); } override public function itemToLabel(_arg1:Object):String{ if (_labelFunction != null){ return (String(_labelFunction(_arg1))); }; if (_arg1[_labelField] == null){ return (""); }; return (String(_arg1[_labelField])); } public function set rowCount(_arg1:uint):void{ var _local2:Number; var _local3:*; if (_arg1 == 0){ return; }; if (componentInspectorSetting){ __rowCount = _arg1; return; }; __rowCount = 0; _local2 = Number(getStyleValue("contentPadding")); _local3 = (((((Math.ceil((length / _arg1)) > ((width / columnWidth) >> 0))) && ((_scrollPolicy == ScrollPolicy.AUTO)))) || ((_scrollPolicy == ScrollPolicy.ON))); height = (((rowHeight * _arg1) + (2 * _local2)) + ((((_scrollDirection == ScrollBarDirection.HORIZONTAL)) && (_local3))) ? ScrollBar.WIDTH : 0); } public function set columnCount(_arg1:uint):void{ var _local2:Number; var _local3:Boolean; if (_arg1 == 0){ return; }; if (componentInspectorSetting){ __columnCount = _arg1; return; }; __columnCount = 0; _local2 = Number(getStyleValue("contentPadding")); _local3 = (((((Math.ceil((length / _arg1)) > ((height / rowHeight) >> 0))) && ((_scrollPolicy == ScrollPolicy.AUTO)))) || ((_scrollPolicy == ScrollPolicy.ON))); width = (((columnWidth * _arg1) + (2 * _local2)) + ((((_scrollDirection == ScrollBarDirection.VERTICAL)) && (_local3))) ? 15 : 0); } override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ invalidate(InvalidationType.SCROLL); super.setHorizontalScrollPosition(_arg1, true); } public function set iconFunction(_arg1:Function):void{ if (_iconFunction == _arg1){ return; }; _iconFunction = _arg1; invalidate(InvalidationType.DATA); } public function get labelFunction():Function{ return (_labelFunction); } public function set direction(_arg1:String):void{ if (_scrollDirection == _arg1){ return; }; _scrollDirection = _arg1; invalidate(InvalidationType.SIZE); } public function get innerHeight():Number{ var _local1:Number; drawNow(); _local1 = (getStyleValue("contentPadding") as Number); return (((height - (_local1 * 2)) - (_horizontalScrollBar.visible) ? _horizontalScrollBar.height : 0)); } override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{ invalidate(InvalidationType.SCROLL); super.setVerticalScrollPosition(_arg1, true); } public function set sourceField(_arg1:String):void{ _sourceField = _arg1; invalidate(InvalidationType.DATA); } override public function get rowCount():uint{ var _local1:Number; var _local2:uint; var _local3:uint; _local1 = Number(getStyleValue("contentPadding")); _local2 = Math.max(1, (((_width - (2 * _local1)) / _columnWidth) << 0)); _local3 = Math.max(1, (((_height - (2 * _local1)) / _rowHeight) << 0)); if (_scrollDirection == ScrollBarDirection.HORIZONTAL){ if ((((_scrollPolicy == ScrollPolicy.ON)) || ((((_scrollPolicy == ScrollPolicy.AUTO)) && ((length > (_local2 * _local3))))))){ _local3 = Math.max(1, ((((_height - (2 * _local1)) - 15) / _rowHeight) << 0)); }; } else { _local3 = Math.max(1, Math.ceil(((_height - (2 * _local1)) / _rowHeight))); }; return (_local3); } public function set rowHeight(_arg1:Number):void{ if (_rowHeight == _arg1){ return; }; _rowHeight = _arg1; invalidate(InvalidationType.SIZE); } public function get columnCount():uint{ var _local1:Number; var _local2:uint; var _local3:uint; _local1 = Number(getStyleValue("contentPadding")); _local2 = Math.max(1, (((_width - (2 * _local1)) / _columnWidth) << 0)); _local3 = Math.max(1, (((_height - (2 * _local1)) / _rowHeight) << 0)); if (_scrollDirection != ScrollBarDirection.HORIZONTAL){ if ((((_scrollPolicy == ScrollPolicy.ON)) || ((((_scrollPolicy == ScrollPolicy.AUTO)) && ((length > (_local2 * _local3))))))){ _local2 = Math.max(1, ((((_width - (2 * _local1)) - 15) / _columnWidth) << 0)); }; } else { _local2 = Math.max(1, Math.ceil(((_width - (2 * _local1)) / _columnWidth))); }; return (_local2); } public function get iconFunction():Function{ return (_iconFunction); } override public function set dataProvider(_arg1:DataProvider):void{ super.dataProvider = _arg1; } public function get direction():String{ return (_scrollDirection); } override public function scrollToIndex(_arg1:int):void{ var _local2:uint; var _local3:Number; var _local4:Number; drawNow(); _local2 = Math.max(1, ((contentWidth / _columnWidth) << 0)); if (_scrollDirection == ScrollBarDirection.VERTICAL){ if (rowHeight > availableHeight){ return; }; _local3 = (((_arg1 / _local2) >> 0) * rowHeight); if (_local3 < verticalScrollPosition){ verticalScrollPosition = _local3; } else { if (_local3 > ((verticalScrollPosition + availableHeight) - rowHeight)){ verticalScrollPosition = ((_local3 + rowHeight) - availableHeight); }; }; } else { if (columnWidth > availableWidth){ return; }; _local4 = ((_arg1 % _local2) * columnWidth); if (_local4 < horizontalScrollPosition){ horizontalScrollPosition = _local4; } else { if (_local4 > ((horizontalScrollPosition + availableWidth) - columnWidth)){ horizontalScrollPosition = ((_local4 + columnWidth) - availableWidth); }; }; }; } override protected function initializeAccessibility():void{ if (TileList.createAccessibilityImplementation != null){ TileList.createAccessibilityImplementation(this); }; } public function get rowHeight():Number{ return (_rowHeight); } override public function get dataProvider():DataProvider{ return (super.dataProvider); } override public function set maxHorizontalScrollPosition(_arg1:Number):void{ } public static function getStyleDefinition():Object{ return (mergeStyles(defaultStyles, SelectableList.getStyleDefinition(), 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.display.*; import flash.events.*; import fl.managers.*; import fl.events.*; import flash.text.*; import flash.utils.*; import flash.system.*; public class UIComponent extends Sprite { protected var _enabled:Boolean;// = true private var _mouseFocusEnabled:Boolean;// = true protected var startHeight:Number; protected var _height:Number; protected var _oldIMEMode:String;// = null protected var startWidth:Number; public var focusTarget:IFocusManagerComponent; protected var errorCaught:Boolean;// = false protected var uiFocusRect:DisplayObject; protected var _width:Number; public var version:String;// = "3.0.0.15" protected var isFocused:Boolean;// = false protected var callLaterMethods:Dictionary; private var _focusEnabled:Boolean;// = true private var tempText:TextField; protected var invalidateFlag:Boolean;// = false protected var _inspector:Boolean;// = false protected var sharedStyles:Object; protected var invalidHash:Object; protected var isLivePreview:Boolean;// = false protected var _imeMode:String;// = null protected var instanceStyles:Object; protected var _x:Number; 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(){ version = "3.0.0.15"; isLivePreview = false; invalidateFlag = false; _enabled = true; isFocused = false; _focusEnabled = true; _mouseFocusEnabled = true; _imeMode = null; _oldIMEMode = null; errorCaught = false; _inspector = false; super(); 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 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); }; } private function callLaterDispatcher(_arg1:Event):void{ var _local2:Dictionary; 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; _local2 = callLaterMethods; for (_local3 in _local2) { _local3(); delete _local2[_local3]; }; inCallLaterPhase = false; } private function addedHandler(_arg1:Event):void{ removeEventListener("addedToStage", addedHandler); initializeFocusManager(); } protected function getStyleValue(_arg1:String):Object{ return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]); } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } override public function get scaleX():Number{ return ((width / startWidth)); } override public function get scaleY():Number{ return ((height / startHeight)); } override public function set height(_arg1:Number):void{ if (_height == _arg1){ return; }; setSize(width, _arg1); } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } 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 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); } 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); } 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; }; }; } public function set enabled(_arg1:Boolean):void{ if (_arg1 == _enabled){ return; }; _enabled = _arg1; invalidate(InvalidationType.STATE); } 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); }; } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } 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 classDef:Object; var skin = _arg1; classDef = null; 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 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); }; } protected function createFocusManager():void{ if (focusManagers[stage] == null){ focusManagers[stage] = new FocusManager(stage); }; } override public function set visible(_arg1:Boolean):void{ var _local2:String; if (super.visible == _arg1){ return; }; super.visible = _arg1; _local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE; dispatchEvent(new ComponentEvent(_local2, true)); } 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 x(_arg1:Number):void{ move(_arg1, _y); } public function drawNow():void{ draw(); } override public function set y(_arg1:Number):void{ move(_x, _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")); } 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); } protected function validate():void{ invalidHash = {}; } override public function get height():Number{ return (_height); } public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{ invalidHash[_arg1] = true; if (_arg2){ this.callLater(draw); }; } 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{ } protected function draw():void{ if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } protected function configUI():void{ var _local1:Number; var _local2:Number; var _local3:Number; isLivePreview = checkLivePreview(); _local1 = rotation; rotation = 0; _local2 = super.width; _local3 = 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 setScaleX(_arg1:Number):void{ super.scaleX = _arg1; } protected function setScaleY(_arg1:Number):void{ super.scaleY = _arg1; } private function initializeFocusManager():void{ if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true); } else { createFocusManager(); }; } 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 setSize(_arg1:Number, _arg2:Number):void{ _width = _arg1; _height = _arg2; invalidate(InvalidationType.SIZE); dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false)); } override public function set width(_arg1:Number):void{ if (_width == _arg1){ return; }; setSize(_arg1, height); } public function setFocus():void{ if (stage){ stage.focus = this; }; } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } public function get focusManager():IFocusManager{ var _local1:DisplayObject; _local1 = 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); } 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(); } public function getStyle(_arg1:String):Object{ return (instanceStyles[_arg1]); } public static function getStyleDefinition():Object{ return (defaultStyles); } public static function mergeStyles(... _args):Object{ var _local2:Object; var _local3:uint; var _local4:uint; var _local5:Object; var _local6:String; _local2 = {}; _local3 = _args.length; _local4 = 0; 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
//DataProvider (fl.data.DataProvider) package fl.data { import flash.events.*; import fl.events.*; public class DataProvider extends EventDispatcher { protected var data:Array; public function DataProvider(_arg1:Object=null){ if (_arg1 == null){ data = []; } else { data = getDataFromObject(_arg1); }; } protected function dispatchPreChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{ dispatchEvent(new DataChangeEvent(DataChangeEvent.PRE_DATA_CHANGE, _arg1, _arg2, _arg3, _arg4)); } public function invalidateItemAt(_arg1:int):void{ checkIndex(_arg1, (data.length - 1)); dispatchChangeEvent(DataChangeType.INVALIDATE, [data[_arg1]], _arg1, _arg1); } public function getItemIndex(_arg1:Object):int{ return (data.indexOf(_arg1)); } protected function getDataFromObject(_arg1:Object):Array{ var _local2:Array; var _local3:Array; var _local4:uint; var _local5:Object; var _local6:XML; var _local7:XMLList; var _local8:XML; var _local9:XMLList; var _local10:XML; var _local11:XMLList; var _local12:XML; if ((_arg1 is Array)){ _local3 = (_arg1 as Array); if (_local3.length > 0){ if ((((_local3[0] is String)) || ((_local3[0] is Number)))){ _local2 = []; _local4 = 0; while (_local4 < _local3.length) { _local5 = {label:String(_local3[_local4]), data:_local3[_local4]}; _local2.push(_local5); _local4++; }; return (_local2); }; }; return (_arg1.concat()); //unresolved jump }; if ((_arg1 is DataProvider)){ return (_arg1.toArray()); }; if ((_arg1 is XML)){ _local6 = (_arg1 as XML); _local2 = []; _local7 = _local6.*; for each (_local8 in _local7) { _arg1 = {}; _local9 = _local8.attributes(); for each (_local10 in _local9) { _arg1[_local10.localName()] = _local10.toString(); }; _local11 = _local8.*; for each (_local12 in _local11) { if (_local12.hasSimpleContent()){ _arg1[_local12.localName()] = _local12.toString(); }; }; _local2.push(_arg1); }; return (_local2); //unresolved jump }; throw (new TypeError((("Error: Type Coercion failed: cannot convert " + _arg1) + " to Array or DataProvider."))); } public function removeItemAt(_arg1:uint):Object{ var _local2:Array; checkIndex(_arg1, (data.length - 1)); dispatchPreChangeEvent(DataChangeType.REMOVE, data.slice(_arg1, (_arg1 + 1)), _arg1, _arg1); _local2 = data.splice(_arg1, 1); dispatchChangeEvent(DataChangeType.REMOVE, _local2, _arg1, _arg1); return (_local2[0]); } public function addItem(_arg1:Object):void{ dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1)); data.push(_arg1); dispatchChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1)); } public function sortOn(_arg1:Object, _arg2:Object=null){ var _local3:Array; dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1)); _local3 = data.sortOn(_arg1, _arg2); dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1)); return (_local3); } public function sort(... _args){ var _local2:Array; dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1)); _local2 = data.sort.apply(data, _args); dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1)); return (_local2); } public function addItems(_arg1:Object):void{ addItemsAt(_arg1, data.length); } public function concat(_arg1:Object):void{ addItems(_arg1); } public function clone():DataProvider{ return (new DataProvider(data)); } public function toArray():Array{ return (data.concat()); } public function get length():uint{ return (data.length); } public function addItemAt(_arg1:Object, _arg2:uint):void{ checkIndex(_arg2, data.length); dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2); data.splice(_arg2, 0, _arg1); dispatchChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2); } public function getItemAt(_arg1:uint):Object{ checkIndex(_arg1, (data.length - 1)); return (data[_arg1]); } override public function toString():String{ return ((("DataProvider [" + data.join(" , ")) + "]")); } public function invalidateItem(_arg1:Object):void{ var _local2:uint; _local2 = getItemIndex(_arg1); if (_local2 == -1){ return; }; invalidateItemAt(_local2); } protected function dispatchChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{ dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, _arg1, _arg2, _arg3, _arg4)); } protected function checkIndex(_arg1:int, _arg2:int):void{ if ((((_arg1 > _arg2)) || ((_arg1 < 0)))){ throw (new RangeError((((("DataProvider index (" + _arg1) + ") is not in acceptable range (0 - ") + _arg2) + ")"))); }; } public function addItemsAt(_arg1:Object, _arg2:uint):void{ var _local3:Array; checkIndex(_arg2, data.length); _local3 = getDataFromObject(_arg1); dispatchPreChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1)); data.splice.apply(data, [_arg2, 0].concat(_local3)); dispatchChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1)); } public function replaceItem(_arg1:Object, _arg2:Object):Object{ var _local3:int; _local3 = getItemIndex(_arg2); if (_local3 != -1){ return (replaceItemAt(_arg1, _local3)); }; return (null); } public function removeItem(_arg1:Object):Object{ var _local2:int; _local2 = getItemIndex(_arg1); if (_local2 != -1){ return (removeItemAt(_local2)); }; return (null); } public function merge(_arg1:Object):void{ var _local2:Array; var _local3:uint; var _local4:uint; var _local5:uint; var _local6:Object; _local2 = getDataFromObject(_arg1); _local3 = _local2.length; _local4 = data.length; dispatchPreChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1)); _local5 = 0; while (_local5 < _local3) { _local6 = _local2[_local5]; if (getItemIndex(_local6) == -1){ data.push(_local6); }; _local5++; }; if (data.length > _local4){ dispatchChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1)); } else { dispatchChangeEvent(DataChangeType.ADD, [], -1, -1); }; } public function replaceItemAt(_arg1:Object, _arg2:uint):Object{ var _local3:Array; checkIndex(_arg2, (data.length - 1)); _local3 = [data[_arg2]]; dispatchPreChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2); data[_arg2] = _arg1; dispatchChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2); return (_local3[0]); } public function invalidate():void{ dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, DataChangeType.INVALIDATE_ALL, data.concat(), 0, data.length)); } public function removeAll():void{ var _local1:Array; _local1 = data.concat(); dispatchPreChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length); data = []; dispatchChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length); } } }//package fl.data
Section 28
//SimpleCollectionItem (fl.data.SimpleCollectionItem) package fl.data { public dynamic class SimpleCollectionItem { public var label:String; public var data:String; public function toString():String{ return ((((("[SimpleCollectionItem: " + label) + ",") + data) + "]")); } } }//package fl.data
Section 29
//TileListCollectionItem (fl.data.TileListCollectionItem) package fl.data { public dynamic class TileListCollectionItem { public var label:String; public var source:String; public function toString():String{ return ((((("[TileListCollectionItem: " + label) + ",") + source) + "]")); } } }//package fl.data
Section 30
//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 31
//DataChangeEvent (fl.events.DataChangeEvent) package fl.events { import flash.events.*; public class DataChangeEvent extends Event { protected var _items:Array; protected var _endIndex:uint; protected var _changeType:String; protected var _startIndex:uint; public static const PRE_DATA_CHANGE:String = "preDataChange"; public static const DATA_CHANGE:String = "dataChange"; public function DataChangeEvent(_arg1:String, _arg2:String, _arg3:Array, _arg4:int=-1, _arg5:int=-1):void{ super(_arg1); _changeType = _arg2; _startIndex = _arg4; _items = _arg3; _endIndex = ((_arg5)==-1) ? _startIndex : _arg5; } public function get changeType():String{ return (_changeType); } public function get startIndex():uint{ return (_startIndex); } public function get items():Array{ return (_items); } override public function clone():Event{ return (new DataChangeEvent(type, _changeType, _items, _startIndex, _endIndex)); } override public function toString():String{ return (formatToString("DataChangeEvent", "type", "changeType", "startIndex", "endIndex", "bubbles", "cancelable")); } public function get endIndex():uint{ return (_endIndex); } } }//package fl.events
Section 32
//DataChangeType (fl.events.DataChangeType) package fl.events { public class DataChangeType { public static const ADD:String = "add"; public static const REMOVE:String = "remove"; public static const REMOVE_ALL:String = "removeAll"; public static const CHANGE:String = "change"; public static const REPLACE:String = "replace"; public static const INVALIDATE:String = "invalidate"; public static const INVALIDATE_ALL:String = "invalidateAll"; public static const SORT:String = "sort"; } }//package fl.events
Section 33
//ListEvent (fl.events.ListEvent) package fl.events { import flash.events.*; public class ListEvent extends Event { protected var _index:int; protected var _item:Object; protected var _columnIndex:int; protected var _rowIndex:int; public static const ITEM_DOUBLE_CLICK:String = "itemDoubleClick"; public static const ITEM_ROLL_OUT:String = "itemRollOut"; public static const ITEM_ROLL_OVER:String = "itemRollOver"; public static const ITEM_CLICK:String = "itemClick"; public function ListEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:Object=null){ super(_arg1, _arg2, _arg3); _rowIndex = _arg5; _columnIndex = _arg4; _index = _arg6; _item = _arg7; } public function get rowIndex():Object{ return (_rowIndex); } public function get index():int{ return (_index); } public function get item():Object{ return (_item); } public function get columnIndex():int{ return (_columnIndex); } override public function clone():Event{ return (new ListEvent(type, bubbles, cancelable, _columnIndex, _rowIndex)); } override public function toString():String{ return (formatToString("ListEvent", "type", "bubbles", "cancelable", "columnIndex", "rowIndex", "index", "item")); } } }//package fl.events
Section 34
//ScrollEvent (fl.events.ScrollEvent) package fl.events { import flash.events.*; public class ScrollEvent extends Event { private var _position:Number; private var _direction:String; 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; } override public function clone():Event{ return (new ScrollEvent(_direction, _delta, _position)); } public function get position():Number{ return (_position); } override public function toString():String{ return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position")); } public function get delta():Number{ return (_delta); } public function get direction():String{ return (_direction); } } }//package fl.events
Section 35
//FocusManager (fl.managers.FocusManager) package fl.managers { import fl.core.*; import fl.controls.*; import flash.display.*; import flash.events.*; 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){ activated = false; calculateCandidates = true; _showFocusIndicator = true; _defaultButtonEnabled = true; super(); 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 _local5:int; var _local6:int; var _local7:DisplayObject; var _local8:IFocusManagerGroup; var _local9:int; var _local10:DisplayObject; var _local11:IFocusManagerGroup; _local5 = focusableCandidates.length; _local6 = _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); } 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)); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ if ((_arg1.relatedObject is TextField)){ return; }; _arg1.preventDefault(); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; _local2 = (_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); } public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{ var _local2:InteractiveObject; _local2 = _arg1; while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (_arg1); }; _arg1 = _arg1.parent; }; return (_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 addedHandler(_arg1:Event):void{ var _local2:DisplayObject; _local2 = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } 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); } private function tabChildrenChangeHandler(_arg1:Event):void{ var _local2:DisplayObjectContainer; if (_arg1.target != _arg1.currentTarget){ return; }; calculateCandidates = true; _local2 = DisplayObjectContainer(_arg1.target); if (_local2.tabChildren){ addFocusables(_local2, true); } else { removeFocusables(_local2); }; } public function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); } public function getFocus():InteractiveObject{ var _local1:InteractiveObject; _local1 = form.stage.focus; return (findFocusManagerComponent(_local1)); } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; var _local3:TextField; var _local4:SimpleButton; _local2 = 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); } public function set defaultButton(_arg1:Button):void{ var _local2:Button; _local2 = (_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 deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); } public function setFocus(_arg1:InteractiveObject):void{ if ((_arg1 is IFocusManagerComponent)){ IFocusManagerComponent(_arg1).setFocus(); } else { form.stage.focus = _arg1; }; } private function setFocusToNextObject(_arg1:FocusEvent):void{ var _local2:InteractiveObject; if (!hasFocusableObjects()){ return; }; _local2 = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ setFocus(_local2); }; } private function hasFocusableObjects():Boolean{ var _local1:Object; for (_local1 in focusableObjects) { return (true); }; return (false); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = 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; var _local3:int; _local2 = focusableCandidates.length; _local3 = 0; _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 _local3:DisplayObject; var _local4:InteractiveObject; _local3 = 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 _local3:String; var _local4:String; var _local5:int; var _local6:String; var _local7:String; var _local8:String; var _local9:DisplayObject; var _local10:DisplayObject; _local3 = ""; _local4 = ""; _local8 = "0000"; _local9 = DisplayObject(_arg1); _local10 = 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; _local2 = 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 _local2:DisplayObject; var _local3:String; var _local4:int; var _local5:Boolean; var _local6:int; var _local7:int; var _local8:IFocusManagerGroup; if (!hasFocusableObjects()){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; _local2 = form.stage.focus; _local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2))); _local3 = ""; if ((_local2 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local2); _local3 = _local8.groupName; }; _local4 = getIndexOfFocusedObject(_local2); _local5 = false; _local6 = _local4; if (_local4 == -1){ if (_arg1){ _local4 = focusableCandidates.length; }; _local5 = true; }; _local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3); return (findFocusManagerComponent(focusableCandidates[_local7])); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:InteractiveObject; if (_arg1.isDefaultPrevented()){ return; }; _local2 = 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; _local2 = _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 _local2:InteractiveObject; var _local3:Button; _local2 = 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{ var _local2:InteractiveObject; var _local3:Boolean; calculateCandidates = true; _local2 = InteractiveObject(_arg1.target); _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 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; } public function get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } } }//package fl.managers
Section 36
//IFocusManager (fl.managers.IFocusManager) package fl.managers { import fl.controls.*; import flash.display.*; 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 get nextTabIndex():int; function get defaultButton():Button; function get showFocusIndicator():Boolean; function setFocus(_arg1:InteractiveObject):void; function activate():void; function showFocus():void; function set defaultButtonEnabled(_arg1:Boolean):void; function hideFocus():void; function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject; function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject; } }//package fl.managers
Section 37
//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 38
//IFocusManagerGroup (fl.managers.IFocusManagerGroup) package fl.managers { public interface IFocusManagerGroup { function set groupName(_arg1:String):void; function set selected(_arg1:Boolean):void; function get groupName():String; function get selected():Boolean; } }//package fl.managers
Section 39
//StyleManager (fl.managers.StyleManager) package fl.managers { import fl.core.*; import flash.text.*; import flash.utils.*; public class StyleManager { private var globalStyles:Object; private var classToDefaultStylesDict:Dictionary; private var styleToClassesHash:Object; private var classToStylesDict:Dictionary; private var classToInstancesDict: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; var _local4:Object; _local3 = getClassDef(_arg1); _local4 = 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; var _local5:Object; _local4 = getClassDef(_arg1); _local5 = 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 _local2:StyleManager; var _local3:Class; var _local4:Object; var _local5:String; _local2 = getInstance(); _local3 = getClassDef(_arg1); _local4 = _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; var _local4:Object; _local3 = getClassDef(_arg1); _local4 = 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 _local3:Dictionary; var _local4:Object; var _local5:UIComponent; _local3 = 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 _local2:Dictionary; var _local3:Object; _local2 = getInstance().styleToClassesHash[_arg1]; if (_local2 == null){ return; }; for (_local3 in _local2) { invalidateComponentStyle(Class(_local3), _arg1); }; } public static function registerInstance(_arg1:UIComponent):void{ var inst:StyleManager; var classDef:Class; var target:Class; var defaultStyles:Object; var styleToClasses:Object; var n:String; var instance = _arg1; inst = getInstance(); classDef = 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; 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; var _local4:StyleManager; var _local5:Object; _local3 = getClassDef(_arg1); _local4 = getInstance(); _local5 = _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; _local3 = getInstance().globalStyles; if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; _local3[_arg1] = _arg2; invalidateStyle(_arg1); } } }//package fl.managers
Section 40
//Blowout (Gamer.Defense.Bullet.Blowout) package Gamer.Defense.Bullet { import flash.display.*; import flash.events.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; public class Blowout extends Bullet { private var left:Number;// = 0 private var target:DisplayObjectContainer;// = null private var top:Number;// = 0 private var place:Point;// = null private var right:Number;// = 0 private var speed:Number;// = 0 private var patchCount:int;// = 0 private var Patch:Class;// = null private var patchs:Array; private var patchsSpare:Array; private var bottom:Number;// = 0 private var shareAngle:Number;// = 0 private var velocitys:Array; private static var reclaim:Array = new Array(); public function Blowout(){ patchs = new Array(); patchsSpare = new Array(); velocitys = new Array(); super(); } private function createPatchs(){ var _local1:int; if (patchsSpare.length == 0){ _local1 = 0; while (_local1 < patchCount) { patchsSpare.push(new Patch()); patchsSpare[(patchsSpare.length - 1)].x = place.x; patchsSpare[(patchsSpare.length - 1)].y = place.y; _local1++; }; }; patchs = patchsSpare.slice(); var _local2:int = patchs.length; _local1 = 0; while (_local1 < _local2) { patchs[_local1].x = place.x; patchs[_local1].y = place.y; patchs[_local1].rotation = 0; _local1++; }; } override public function Start(){ createPatchs(); displayPatchs(); setAngles(); getVelocity(); target.addEventListener(Event.ENTER_FRAME, frameHandle); } private function checkHit(){ var _local3:int; var _local4:int; var _local5:DamageInfo; var _local1:Array = GameInfo.Instance().GroundEnemys; var _local2:int; while (_local2 < patchs.length) { _local3 = _local1.length; _local4 = 0; while (_local4 < _local3) { if (patchs[_local2].hitTestObject(_local1[_local4].HitArea)){ if (patchs[_local2].parent != null){ patchs[_local2].parent.removeChild(patchs[_local2]); patchs.splice(_local2, 1); velocitys.splice(_local2, 1); }; _local5 = new DamageInfo(); _local5.Damage = Damage; _local1[_local4].MakeDamage(_local5); break; }; _local4++; }; _local2++; }; } private function setAngles(){ var _local1:int = patchs.length; var _local2:int; while (_local2 < _local1) { patchs[_local2].rotation = (_local2 * shareAngle); _local2++; }; } private function checkOverSide(){ var _local2:Point; var _local1:int; while (_local1 < patchs.length) { _local2 = PlaceConversion.GetGlobal(patchs[_local1]); if ((((((((_local2.x < left)) || ((_local2.x > right)))) || ((_local2.y < top)))) || ((_local2.y > bottom)))){ patchs[_local1].parent.removeChild(patchs[_local1]); patchs.splice(_local1, 1); velocitys.splice(_local1, 1); break; }; _local1++; }; if (patchs.length != 0){ return; }; Destroy(); } private function displayPatchs(){ var _local1:int; while (_local1 < patchCount) { target.addChild(patchs[_local1]); _local1++; }; } private function getVelocity(){ var _local1:int = patchs.length; var _local2:int; while (_local2 < _local1) { velocitys[_local2] = new Array(); velocitys[_local2][0] = (speed * Math.cos((patchs[_local2].rotation * 0.0174532925199433))); velocitys[_local2][1] = (speed * Math.sin((patchs[_local2].rotation * 0.0174532925199433))); _local2++; }; } override public function Destroy(){ reclaim.push(this); target.removeEventListener(Event.ENTER_FRAME, frameHandle); var _local1:int; while (_local1 < patchCount) { if (((!((patchs[_local1] == null))) && (!((patchs[_local1].parent == null))))){ patchs[_local1].parent.removeChild(patchs[_local1]); }; _local1++; }; } override public function Stop(){ target.removeEventListener(Event.ENTER_FRAME, frameHandle); } private function frameHandle(_arg1:Event){ var _local2:int; while (_local2 < patchs.length) { patchs[_local2].x = (patchs[_local2].x - velocitys[_local2][0]); patchs[_local2].y = (patchs[_local2].y - velocitys[_local2][1]); _local2++; }; checkOverSide(); checkHit(); } public function Initialize(_arg1:DisplayObjectContainer, _arg2:Class, _arg3:int, _arg4:Number, _arg5:Number, _arg6:Point){ if (target != null){ target.removeEventListener(Event.ENTER_FRAME, frameHandle); }; var _local7:int; while (_local7 < patchs.length) { patchs[_local7].x = 0; patchs[_local7].y = 0; _local7++; }; target = _arg1; Patch = _arg2; patchCount = _arg3; Damage = _arg4; speed = _arg5; place = _arg6; shareAngle = (360 / patchCount); left = -50; right = (GameInfo.Instance().StageObject.stageWidth + 50); top = -50; bottom = (GameInfo.Instance().StageObject.stageHeight + 50); } public static function getInstance():Blowout{ if (reclaim.length > 0){ return (reclaim.shift()); }; return (new (Blowout)); } } }//package Gamer.Defense.Bullet
Section 41
//BlowoutBullet (Gamer.Defense.Bullet.BlowoutBullet) package Gamer.Defense.Bullet { import flash.geom.*; import Gamer.Defense.*; public class BlowoutBullet extends LaserBullet { private var blowout:Blowout;// = null private static var reclaim:Array = new Array(); override public function Destroy(){ super.Destroy(); reclaim.push(this); } override protected function hitDispose(){ blowout = Blowout.getInstance(); blowout.Initialize(GameInfo.Instance().EC, Patch, 13, (Damage / 13), 10, new Point(this.x, this.y)); blowout.Start(); } public static function getInstance():BlowoutBullet{ if (reclaim.length > 0){ return (reclaim.shift()); }; return (new (BlowoutBullet)); } } }//package Gamer.Defense.Bullet
Section 42
//Bullet (Gamer.Defense.Bullet.Bullet) package Gamer.Defense.Bullet { import Gamer.Defense.*; public class Bullet extends MyMovieClip { protected var damage:Number;// = 0 public function Start(){ } public function Stop(){ } public function Destroy(){ } public function set Damage(_arg1:Number){ damage = _arg1; } public function get Damage():Number{ return (damage); } } }//package Gamer.Defense.Bullet
Section 43
//FlackBullet (Gamer.Defense.Bullet.FlackBullet) package Gamer.Defense.Bullet { import flash.display.*; import flash.events.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; public class FlackBullet { private var shootPlace:Point;// = null private var objectivePlace:Point;// = null private var damage:Number;// = 0 private var target:DisplayObjectContainer;// = null private var beam:FlackBeam; private var objective:Enemy;// = null private static var reclaim:Array = new Array(); public function FlackBullet(){ beam = new FlackBeam(); super(); } private function endHandle(_arg1:Event){ reclaim.push(this); } private function getRotation(_arg1:Point, _arg2:Point):Number{ var _local3:* = (_arg1.x - _arg2.x); var _local4:* = (_arg1.y - _arg2.y); return ((Math.atan2(_local4, _local3) * 57.2957795130823)); } public function Initialize(_arg1:DisplayObjectContainer, _arg2:Enemy, _arg3:Number, _arg4:Point, _arg5:Point){ beam.gotoAndPlay(1); beam.rotation = 0; beam.width = 100; beam.x = 0; beam.y = 0; target = _arg1; objective = _arg2; damage = _arg3; shootPlace = _arg4; objectivePlace = _arg5; beam.addEventListener("end", endHandle); } public function Shoot(){ beam.x = shootPlace.x; beam.y = shootPlace.y; beam.width = PointDistance.GetDistance(shootPlace, objectivePlace); beam.rotation = getRotation(shootPlace, objectivePlace); target.addChild(beam); var _local1:DamageInfo = new DamageInfo(); _local1.Damage = damage; objective.MakeDamage(_local1); } public static function getInstance():FlackBullet{ if (reclaim.length > 0){ return (reclaim.shift()); }; return (new (FlackBullet)); } } }//package Gamer.Defense.Bullet
Section 44
//FollowBullet (Gamer.Defense.Bullet.FollowBullet) package Gamer.Defense.Bullet { import flash.display.*; import flash.events.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; public class FollowBullet extends Bullet { private var left:Number;// = 0 private var objective:DisplayObject;// = null private var xspeed:Number;// = 0 private var top:Number;// = 0 private var speed:Number;// = 0 private var right:Number;// = 0 private var bottom:Number;// = 0 private var yspeed:Number;// = 0 private static var reclaim:Array = new Array(); public function FollowBullet(){ addFrameScript(0, frame1, 4, frame5); } private function setRotation(_arg1:DisplayObject){ if ((((_arg1.parent == null)) || ((this.parent == null)))){ return; }; var _local2:Point = PlaceConversion.GetGlobal(_arg1); var _local3:Point = PlaceConversion.GetGlobal(this); var _local4:* = (_local3.x - _local2.x); var _local5:* = (_local3.y - _local2.y); this.rotation = (Math.atan2(_local5, _local4) * 57.2957795130823); } override public function Start(){ setRotation(objective); this.addEventListener(Event.ENTER_FRAME, frameHandle); } override public function Destroy(){ this.removeEventListener(Event.ENTER_FRAME, frameHandle); reclaim.push(this); } override public function Stop(){ this.removeEventListener(Event.ENTER_FRAME, frameHandle); } function frame1(){ stop(); } function frame5(){ stop(); if (this.parent != null){ this.parent.removeChild(this); }; } public function Initialize(_arg1:DisplayObject, _arg2:Number){ this.gotoAndPlay(1); objective = _arg1; speed = _arg2; left = -50; right = (GameInfo.Instance().StageObject.stageWidth + 50); top = -50; bottom = (GameInfo.Instance().StageObject.stageHeight + 50); } private function checkHit(){ var _local4:DamageInfo; var _local1:Array = GameInfo.Instance().GroundEnemys; var _local2:int = _local1.length; var _local3:int; while (_local3 < _local2) { if (((((!((_local1[_local3] == null))) && (!(_local1[_local3].IsBlast)))) && (this.hitTestObject(_local1[_local3].HitArea)))){ _local4 = new DamageInfo(); _local4.Damage = Damage; _local1[_local3].MakeDamage(_local4); this.play(); Destroy(); return; }; _local3++; }; } private function checkOverSide(){ if (this.parent == null){ return; }; var _local1:Point = PlaceConversion.GetGlobal(this); if ((((((((_local1.x < left)) || ((_local1.x > right)))) || ((_local1.y < top)))) || ((_local1.y > bottom)))){ Destroy(); }; } private function frameHandle(_arg1:Event){ setRotation(objective); xspeed = (speed * Math.cos((this.rotation * 0.0174532925199433))); yspeed = (speed * Math.sin((this.rotation * 0.0174532925199433))); this.x = (this.x - xspeed); this.y = (this.y - yspeed); checkOverSide(); checkHit(); } public static function getInstance():FollowBullet{ if (reclaim.length > 0){ return (reclaim.shift()); }; trace("created a FollowBullet!@!"); return (new (FollowBullet)); } } }//package Gamer.Defense.Bullet
Section 45
//LaserBullet (Gamer.Defense.Bullet.LaserBullet) package Gamer.Defense.Bullet { import flash.display.*; import flash.events.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; public class LaserBullet extends Bullet { private var speed:Number;// = 0 private var xspeed:Number;// = 0 private var top:Number;// = 0 private var right:Number;// = 0 private var objectivePlace:Point;// = null private var left:Number;// = 0 private var yspeed:Number;// = 0 private var bottom:Number;// = 0 private function setRotation(_arg1:Point){ var _local2:Point = PlaceConversion.GetGlobal(this); var _local3:* = (_local2.x - _arg1.x); var _local4:* = (_local2.y - _arg1.y); this.rotation = (Math.atan2(_local4, _local3) * 57.2957795130823); } override public function Start(){ this.addEventListener(Event.ENTER_FRAME, frameHandle); } protected function hitDispose(){ } override public function Destroy(){ this.removeEventListener(Event.ENTER_FRAME, frameHandle); if (this.parent != null){ this.parent.removeChild(this); }; } override public function Stop(){ this.removeEventListener(Event.ENTER_FRAME, frameHandle); } private function checkHit(){ var _local4:DamageInfo; var _local1:Array = GameInfo.Instance().GroundEnemys; var _local2:int = _local1.length; var _local3:int; while (_local3 < _local2) { if (((((!((_local1[_local3] == null))) && (!(_local1[_local3].IsBlast)))) && (this.hitTestObject(_local1[_local3].HitArea)))){ _local4 = new DamageInfo(); _local4.Damage = Damage; _local1[_local3].MakeDamage(_local4); hitDispose(); Destroy(); return; }; _local3++; }; } public function Initialize(_arg1:Point, _arg2:Point, _arg3:Number){ this.removeEventListener(Event.ENTER_FRAME, frameHandle); this.x = _arg1.x; this.y = _arg1.y; speed = _arg3; objectivePlace = _arg2; left = -50; right = (GameInfo.Instance().StageObject.stageWidth + 50); top = -50; bottom = (GameInfo.Instance().StageObject.stageHeight + 50); setRotation(objectivePlace); xspeed = (speed * Math.cos((this.rotation * 0.0174532925199433))); yspeed = (speed * Math.sin((this.rotation * 0.0174532925199433))); } private function frameHandle(_arg1:Event){ this.x = (this.x - xspeed); this.y = (this.y - yspeed); checkOverSide(); checkHit(); } private function checkOverSide(){ var _local1:Point = PlaceConversion.GetGlobal(this); if ((((((((_local1.x < left)) || ((_local1.x > right)))) || ((_local1.y < top)))) || ((_local1.y > bottom)))){ Destroy(); }; } } }//package Gamer.Defense.Bullet
Section 46
//LightEdgeBullet (Gamer.Defense.Bullet.LightEdgeBullet) package Gamer.Defense.Bullet { import flash.display.*; import flash.events.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; public class LightEdgeBullet extends Bullet { private var timer:MyTimer;// = null private var lgpsSpare:Array; private var timer2:MyTimer;// = null private var attackEnemys:Array;// = null private var lgs:Array;// = null private var lightEdges:Array; private var trails:Array;// = null private var objective:DisplayObject;// = null private var lg:LightEdge;// = null private var lgps:Array; private static var reclaim:Array = new Array(); public function LightEdgeBullet(){ lgps = new Array(); lgpsSpare = new Array(); lightEdges = new Array(); super(); } override public function Start(){ joinAllEnemys(); refractionEnemys(); damageEnemys(); clearTrail(); } private function getLightEdgeLength(_arg1:DisplayObject, _arg2:DisplayObject):Number{ var _local3:Point = PlaceConversion.GetGlobal(_arg1); var _local4:Point = PlaceConversion.GetGlobal(_arg2); return (PointDistance.GetDistance(_local3, _local4)); } private function setRotation(_arg1:DisplayObject, _arg2:DisplayObject){ var _local3:Point = PlaceConversion.GetGlobal(_arg1); var _local4:Point = PlaceConversion.GetGlobal(_arg2); var _local5:* = (_local3.x - _local4.x); var _local6:* = (_local3.y - _local4.y); _arg1.rotation = (Math.atan2(_local6, _local5) * 57.2957795130823); } private function getCurrentEnemy(_arg1:DisplayObject, _arg2:Array):Array{ var _local4:DisplayObject; var _local3:Array = new Array(); var _local5:int = _arg2.length; var _local6:* = 0; while (_local6 < _local5) { _local3[_local6] = PointDistance.GetDistanceB(_arg1, _arg2[_local6]); _local6++; }; var _local7:Array = _local3.slice(); _local7.sort(Array.NUMERIC); return ([_arg2[_local3.indexOf(_local7[0])], _local7[0]]); } private function refractionEnemys(){ var _local1:Array = attackEnemys; var _local2:int = _local1.length; var _local3:int; while (_local3 < _local2) { refraction(PlaceConversion.GetGlobal(_local1[_local3])); _local3++; }; } private function clearTrail(){ timer = new MyTimer(200, 1); timer.addEventListener(TimerEvent.TIMER, timerHandle); timer.start(); } private function timerHandle(_arg1:TimerEvent){ lgs = new Array(); var _local2:int = trails.length; var _local3:int; while (_local3 < _local2) { if ((trails[_local3] is LightEdge)){ lgs.push(trails[_local3]); } else { if (trails[_local3].parent != null){ trails[_local3].parent.removeChild(trails[_local3]); }; }; _local3++; }; timer2 = new MyTimer((1000 / GameInfo.Instance().FrameRate), 0); timer2.addEventListener(TimerEvent.TIMER, timer2Handle); timer2.start(); _arg1.currentTarget.stop(); _arg1.currentTarget.removeEventListener(TimerEvent.TIMER, timerHandle); } private function timer2Handle(_arg1:TimerEvent){ var _local2:int = lgs.length; var _local3:int; while (_local3 < _local2) { lgs[_local3].alpha = (lgs[_local3].alpha - 0.12); _local3++; }; if (lgs[0].alpha <= 0){ lightEdges = lightEdges.concat(lgs); Destroy(); }; } override public function Destroy(){ if (timer != null){ timer.stop(); timer.removeEventListener(TimerEvent.TIMER, timerHandle); }; if (timer2 != null){ timer2.stop(); timer2.removeEventListener(TimerEvent.TIMER, timer2Handle); }; var _local1:int = trails.length; var _local2:int; while (_local2 < _local1) { if (trails[_local2].parent != null){ trails[_local2].parent.removeChild(trails[_local2]); }; _local2++; }; if (this.parent != null){ this.parent.removeChild(this); }; reclaim.push(this); } override public function Stop(){ } private function getEnemys():Array{ var _local1:Array = GameInfo.Instance().GroundEnemys.slice(); var _local2:Array = [objective]; var _local3:Array = leach(_local1, _local2); var _local4:Array = getCurrentEnemy(_local2[(_local2.length - 1)], _local3); while (_local4[1] < 60) { _local2.push(_local4[0]); _local3 = leach(_local1, _local2); if (_local3.length == 0){ return (_local2); }; _local4 = getCurrentEnemy(_local2[(_local2.length - 1)], _local3); }; return (_local2); } public function Initialize(_arg1:DisplayObject){ objective = _arg1; trails = new Array(); attackEnemys = getEnemys(); } private function joinAllEnemys(){ var _local1:int = attackEnemys.length; var _local2:Array = attackEnemys.slice(); _local2.unshift(this); var _local3:int; while (_local3 < _local1) { joinLightEdge(_local2[_local3], _local2[(_local3 + 1)]); _local3++; }; } private function leach(_arg1:Array, _arg2:Array):Array{ var _local3:Array = _arg1.slice(); var _local4:Array = _arg2.slice(); var _local5:int = _local4.length; var _local6:int; while (_local6 < _local5) { _local3.splice(_local3.indexOf(_local4[_local6]), 1); _local6++; }; return (_local3); } private function refraction(_arg1:Point){ var _local6:LightEdgePatch1; var _local7:LightEdgePatch2; var _local8:LightEdgePatch3; var _local9:LightEdgePatch4; var _local10:LightEdgePatch5; if (lgpsSpare.length == 0){ _local6 = new LightEdgePatch1(); _local7 = new LightEdgePatch2(); _local8 = new LightEdgePatch3(); _local9 = new LightEdgePatch4(); _local10 = new LightEdgePatch5(); lgpsSpare = new Array(_local6, _local7, _local8, _local9, _local10); }; lgps = lgpsSpare.slice(); var _local2:Array = new Array(); var _local3:int = lgps.length; var _local4:int; while (_local4 < _local3) { _local2.push(lgps.splice(Math.floor((Math.random() * lgps.length)), 1)[0]); _local4++; }; lgps = _local2; _local4 = 0; while (_local4 < _local3) { lgps[_local4].x = _arg1.x; lgps[_local4].y = _arg1.y; _local4++; }; var _local5:Number = (360 / _local3); _local4 = 0; while (_local4 < _local3) { lgps[_local4].rotation = (_local5 * _local4); _local4++; }; GameInfo.Instance().EC.addChild(lgpsSpare[0]); GameInfo.Instance().EC.addChild(lgpsSpare[1]); GameInfo.Instance().EC.addChild(lgpsSpare[2]); GameInfo.Instance().EC.addChild(lgpsSpare[3]); GameInfo.Instance().EC.addChild(lgpsSpare[4]); trails.push(lgpsSpare[0]); trails.push(lgpsSpare[1]); trails.push(lgpsSpare[2]); trails.push(lgpsSpare[3]); trails.push(lgpsSpare[4]); } private function joinLightEdge(_arg1:DisplayObject, _arg2:DisplayObject){ lg = getLightEdge(); lg.alpha = 1; lg.rotation = 0; lg.width = 100; lg.x = 0; lg.y = 0; lg.width = getLightEdgeLength(_arg1, _arg2); var _local3:Point = PlaceConversion.GetGlobal(_arg1); lg.x = _local3.x; lg.y = _local3.y; GameInfo.Instance().EC.addChild(lg); setRotation(lg, _arg2); trails.push(lg); } private function damageEnemys(){ var _local1:int = attackEnemys.length; var _local2:DamageInfo = new DamageInfo(); _local2.Damage = Damage; var _local3:int; while (_local3 < _local1) { attackEnemys[_local3].MakeDamage(_local2); _local3++; }; } private function getLightEdge():LightEdge{ if (lightEdges.length == 0){ return (new LightEdge()); }; return (lightEdges.shift()); } public static function getInstance():LightEdgeBullet{ if (reclaim.length > 0){ return (reclaim.shift()); }; return (new (LightEdgeBullet)); } } }//package Gamer.Defense.Bullet
Section 47
//Shotgun (Gamer.Defense.Bullet.Shotgun) package Gamer.Defense.Bullet { import flash.display.*; import flash.events.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import flash.utils.*; public class Shotgun { private var shootPoint:Point;// = null private var speed:Number;// = 0 private var target:DisplayObjectContainer;// = null private var objectivePoint:Point;// = null private var bulletsSpare:Array; private var bulletCount:int;// = 0 private var bulletClip:Class;// = null private var velocitys:Array;// = null private var bullets:Array; private static var reclaim:Array = new Array(); public function Shotgun(){ bullets = new Array(); bulletsSpare = new Array(); super(); } private function initialize(){ createBullets(); setBulletsAngle(); setVelocitys(); } private function createBullets(){ var _local1:int; if (bulletsSpare.length == 0){ _local1 = 0; while (_local1 < bulletCount) { bulletsSpare[_local1] = new bulletClip(); target.addChild(bulletsSpare[_local1]); bulletsSpare[_local1].x = shootPoint.x; bulletsSpare[_local1].y = shootPoint.y; _local1++; }; }; bullets = bulletsSpare.slice(); var _local2:int = bullets.length; _local1 = 0; while (_local1 < _local2) { target.addChild(bullets[_local1]); bullets[_local1].x = shootPoint.x; bullets[_local1].y = shootPoint.y; bullets[_local1].rotation = 0; _local1++; }; } public function get Bullets():Array{ return (bullets); } public function Destroy(){ reclaim.push(this); target.removeEventListener(Event.ENTER_FRAME, frameHandle); } private function shoot(){ target.addEventListener(Event.ENTER_FRAME, frameHandle); } public function DestroyAll(){ Destroy(); var _local1:int; while (_local1 < bulletCount) { if (bullets[_local1].parent != null){ bullets[_local1].parent.removeChild(bullets[_local1]); }; _local1++; }; } private function setBulletsAngle(){ var _local1:Number = getRotation(shootPoint, objectivePoint); bullets[Math.floor((bullets.length / 2))].rotation = _local1; var _local2:int = Math.floor((bullets.length / 2)); var _local3:int; while (_local3 < _local2) { bullets[_local3].rotation = (_local1 - (15 * (_local3 + 1))); _local3++; }; _local3 = 0; while (_local3 < _local2) { bullets[((bullets.length - 1) - _local3)].rotation = (_local1 + (15 * (_local3 + 1))); _local3++; }; } public function Initialize(_arg1:Class, _arg2:int, _arg3:DisplayObjectContainer, _arg4:Point, _arg5:Point, _arg6:Number){ shootPoint = _arg4; objectivePoint = _arg5; bulletCount = _arg2; velocitys = new Array(); bulletClip = _arg1; target = _arg3; speed = _arg6; initialize(); } private function getRotation(_arg1:Point, _arg2:Point){ var _local3:* = (_arg1.x - _arg2.x); var _local4:* = (_arg1.y - _arg2.y); return ((Math.atan2(_local4, _local3) * 57.2957795130823)); } private function frameHandle(_arg1:Event){ var _local2:int = bullets.length; var _local3:int; while (_local3 < _local2) { bullets[_local3].x = (bullets[_local3].x - velocitys[_local3][0]); bullets[_local3].y = (bullets[_local3].y - velocitys[_local3][1]); _local3++; }; } private function setVelocitys(){ var _local1:int; while (_local1 < bulletCount) { velocitys[_local1] = new Array(); velocitys[_local1][0] = (speed * Math.cos((bullets[_local1].rotation * 0.0174532925199433))); velocitys[_local1][1] = (speed * Math.sin((bullets[_local1].rotation * 0.0174532925199433))); _local1++; }; } public function DestroyBullet(_arg1:Sprite){ var _local2:int = bullets.indexOf(_arg1); bullets.splice(_local2, 1); velocitys.splice(_local2, 1); if (_arg1.parent != null){ _arg1.parent.removeChild(_arg1); }; } public function Shoot(){ shoot(); } public static function getInstance():Shotgun{ if (reclaim.length > 0){ return (reclaim.shift()); }; return (new (Shotgun)); } } }//package Gamer.Defense.Bullet
Section 48
//ShotgunBullet (Gamer.Defense.Bullet.ShotgunBullet) package Gamer.Defense.Bullet { import flash.display.*; import flash.events.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; public class ShotgunBullet { private var shotgun:Shotgun;// = null private var left:Number;// = 0 private var target:DisplayObjectContainer;// = null private var top:Number;// = 0 private var right:Number;// = 0 private var enemys:Array;// = null private var damage:Number;// = 0 private var bullets:Array;// = null private var bottom:Number;// = 0 private static var reclaim:Array = new Array(); public function get Damage():Number{ return (damage); } public function Destroy(){ reclaim.push(this); target.removeEventListener(Event.ENTER_FRAME, frameHandle); shotgun.Destroy(); } public function set Damage(_arg1:Number){ damage = _arg1; } public function DestroyAll(){ Destroy(); } public function Initialize(_arg1:Class, _arg2:int, _arg3:DisplayObjectContainer, _arg4:Point, _arg5:Point, _arg6:Number){ target = _arg3; shotgun = Shotgun.getInstance(); shotgun.Initialize(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); enemys = GameInfo.Instance().Enemys; bullets = shotgun.Bullets; left = -50; right = (GameInfo.Instance().StageObject.stageWidth + 50); top = -50; bottom = (GameInfo.Instance().StageObject.stageHeight + 50); target.addEventListener(Event.ENTER_FRAME, frameHandle); } private function frameHandle(_arg1:Event){ var _local4:int; var _local5:int; var _local6:DamageInfo; var _local2:int = bullets.length; var _local3:int; while (_local3 < _local2) { _local4 = enemys.length; _local5 = 0; while (_local5 < _local4) { if (bullets[_local3].hitTestObject(enemys[_local5].HitArea)){ _local6 = new DamageInfo(); _local6.Damage = Damage; enemys[_local5].MakeDamage(_local6); shotgun.DestroyBullet(bullets[_local3]); return; }; _local5++; }; _local3++; }; checkOverSide(); } private function checkOverSide(){ var _local2:Point; var _local1:int; while (_local1 < bullets.length) { _local2 = PlaceConversion.GetGlobal(bullets[_local1]); if ((((((((_local2.x < left)) || ((_local2.x > right)))) || ((_local2.y < top)))) || ((_local2.y > bottom)))){ shotgun.DestroyBullet(bullets[_local1]); break; }; _local1++; }; if (bullets.length != 0){ return; }; DestroyAll(); } public function Shoot(){ shotgun.Shoot(); } public static function getInstance():ShotgunBullet{ if (reclaim.length > 0){ return (reclaim.shift()); }; return (new (ShotgunBullet)); } } }//package Gamer.Defense.Bullet
Section 49
//TowBullet (Gamer.Defense.Bullet.TowBullet) package Gamer.Defense.Bullet { import flash.display.*; import flash.events.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; public class TowBullet extends MyEventDispatcher { private var shootPlace:DisplayObject;// = null private var gps:MyMovieClip;// = null private var beam:MyMovieClip;// = null private var target:DisplayObjectContainer;// = null private var attackRange:Number;// = 0 private var objective:DisplayObject;// = null private static var gpss:Array = new Array(); private static var beams:Array = new Array(); private static var reclaim:Array = new Array(); private function setRotation(_arg1:DisplayObject, _arg2:DisplayObject){ var _local3:Point = PlaceConversion.GetGlobal(_arg1); var _local4:Point = PlaceConversion.GetGlobal(_arg2); var _local5:* = (_local3.x - _local4.x); var _local6:* = (_local3.y - _local4.y); _arg1.rotation = (Math.atan2(_local6, _local5) * 57.2957795130823); } private function getLightEdgeLength(_arg1:DisplayObject, _arg2:DisplayObject):Number{ var _local3:Point = PlaceConversion.GetGlobal(_arg1); var _local4:Point = PlaceConversion.GetGlobal(_arg2); return (PointDistance.GetDistance(_local3, _local4)); } private function shootHandle(_arg1:Event){ if (beam.parent != null){ beam.parent.removeChild(beam); }; beam = new Beam(); var _local2:Point = PlaceConversion.GetGlobal(shootPlace); var _local3:Number = getLightEdgeLength(shootPlace, objective); beam.width = _local3; beam.x = _local2.x; beam.y = _local2.y; target.addChild(beam); setRotation(beam, objective); _local2 = PlaceConversion.GetGlobal(objective); gps.x = _local2.x; gps.y = _local2.y; target.addChild(gps); if (_local3 >= attackRange){ DestroyAll(); }; if (Enemy(objective).IsBlast){ DestroyAll(); }; } public function DestroyAll(){ Enemy(objective).CancelTow(); Destroy(); if (gps.parent != null){ gps.parent.removeChild(gps); }; if (beam.parent != null){ beam.parent.removeChild(beam); }; beams.push(beam); gpss.push(gps); this.dispatchEvent(new Event("Destroy")); } public function Initialize(_arg1:DisplayObject, _arg2:DisplayObject, _arg3:Number){ target = GameInfo.Instance().BC; shootPlace = _arg1; objective = _arg2; attackRange = _arg3; beam = getBeam(); gps = getGatherPowerSign(); } public function Destroy(){ reclaim.push(this); target.removeEventListener(Event.ENTER_FRAME, shootHandle); } public function Shoot(){ Enemy(objective).Tow(); target.addEventListener(Event.ENTER_FRAME, shootHandle); } public static function getGatherPowerSign():GatherPowerSign{ if (gpss.length > 0){ return (gpss.shift()); }; return (new GatherPowerSign()); } public static function getBeam():Beam{ if (beams.length > 0){ return (beams.shift()); }; return (new Beam()); } public static function getInstance():TowBullet{ if (reclaim.length > 0){ return (reclaim.shift()); }; return (new (TowBullet)); } } }//package Gamer.Defense.Bullet
Section 50
//AirEnemy (Gamer.Defense.Enemy.AirEnemy) package Gamer.Defense.Enemy { import flash.display.*; import flash.events.*; import flash.geom.*; import Gamer.Defense.*; public class AirEnemy extends Enemy { private var timer:MyTimer;// = null private var fac:FrostAimClip;// = null private var xspeed:Number;// = 0 public var healthIndicator:HealthIndicator; private var yspeed:Number;// = 0 public var hitTestArea:MovieClip; private function setRotation(_arg1:Point){ var _local2:* = (this.x - _arg1.x); var _local3:* = (this.y - _arg1.y); this.rotation = (Math.atan2(_local3, _local2) * 57.2957795130823); } private function setSpeed(){ if ((this is AirEnemyF)){ Speed = 2.3; } else { if ((this is AirEnemyG)){ Speed = 2.3; }; }; } private function timerHandle(_arg1:TimerEvent){ DispelFrost(); } override public function set Speed(_arg1:Number){ speed = _arg1; xspeed = (speed * Math.cos((this.rotation * 0.0174532925199433))); yspeed = (speed * Math.sin((this.rotation * 0.0174532925199433))); } override public function Aggression(){ this.addEventListener(Event.ENTER_FRAME, frameHandle); } override public function Blast(){ this.play(); IsBlast = true; var _local1:int = GameInfo.Instance().Enemys.indexOf(this); var _local2:int = GameInfo.Instance().AirEnemys.indexOf(this); GameInfo.Instance().Enemys.splice(_local1, 1); GameInfo.Instance().AirEnemys.splice(_local2, 1); this.addEventListener("blastFinish", blastFinishHandle); this.removeEventListener(Event.ENTER_FRAME, frameHandle); SoundManager.PlaySound("敌人爆炸声"); } override public function Destroy(){ if (timer != null){ timer.stop(); timer.removeEventListener(TimerEvent.TIMER, timerHandle); }; this.removeEventListener(Event.ENTER_FRAME, frameHandle); this.removeEventListener("blastFinish", blastFinishHandle); } override public function DispelFrost(){ if (fac.parent != null){ fac.parent.removeChild(fac); }; this.addEventListener(Event.ENTER_FRAME, frameHandle); } override public function MakeDamage(_arg1:DamageInfo){ Health = (Health - _arg1.Damage); if (Health <= 0){ Blast(); }; } override public function get HitArea():Sprite{ return (enemyHitArea); } override public function get Speed():Number{ return (speed); } override public function Frost(){ this.removeEventListener(Event.ENTER_FRAME, frameHandle); if (fac.parent != null){ fac.parent.removeChild(fac); }; fac.scaleX = (fac.scaleY = 0.1); this.addChild(fac); timer.stop(); timer.removeEventListener(TimerEvent.TIMER, timerHandle); timer.addEventListener(TimerEvent.TIMER, timerHandle); timer.start(); SoundManager.PlaySound("冰冻声"); } public function Initialize(_arg1:Number){ GameInfo.Instance().Enemys.push(this); GameInfo.Instance().AirEnemys.push(this); setSpeed(); enemyHitArea = Sprite(this.getChildByName("hitTestArea")); guage = Sprite(DisplayObjectContainer(this.getChildByName("healthIndicator")).getChildByName("denote")); guageWidth = guage.width; setHealth(); hq = GameInfo.Instance().HQ; timer = new MyTimer(3000, 1); fac = new FrostAimClip(); setRotation(hq.CentrePlace); xspeed = (speed * Math.cos((this.rotation * 0.0174532925199433))); yspeed = (speed * Math.sin((this.rotation * 0.0174532925199433))); } private function frameHandle(_arg1:Event){ this.x = (this.x - xspeed); this.y = (this.y - yspeed); } override public function DestroyAll(){ Destroy(); if (this.parent != null){ this.parent.removeChild(this); }; if (((!((fac == null))) && (!((fac.parent == null))))){ fac.parent.removeChild(fac); }; } private function blastFinishHandle(_arg1:Event){ DestroyAll(); } } }//package Gamer.Defense.Enemy
Section 51
//BeelineSport (Gamer.Defense.Enemy.BeelineSport) package Gamer.Defense.Enemy { import flash.display.*; import flash.events.*; import flash.geom.*; import Gamer.Defense.*; public class BeelineSport extends MyEventDispatcher { private var xx:Number;// = 0 private var r:Number;// = 0 private var yy:Number;// = 0 private var yspeed:Number;// = 0 private var xspeed:Number;// = 0 private var speed:Number;// = 0 private var objectivePoint:Point;// = null private var objective:DisplayObject;// = null private var po:Point;// = null public function BeelineSport(_arg1:DisplayObject, _arg2:Number){ objective = _arg1; speed = _arg2; } public function Start(_arg1:Point){ objectivePoint = _arg1; objective.addEventListener(Event.ENTER_FRAME, frameHandle); } public function get Speed():Number{ return (speed); } public function Stop(){ objective.removeEventListener(Event.ENTER_FRAME, frameHandle); } private function frameHandle(_arg1:Event){ xx = (objective.x - objectivePoint.x); yy = (objective.y - objectivePoint.y); r = (-(Math.atan2(xx, yy)) / 0.0174532925199433); if (Math.sqrt(((xx * xx) + (yy * yy))) > Speed){ objective.y = (objective.y - (Speed * Math.cos((r * 0.0174532925199433)))); objective.x = (objective.x + (Speed * Math.sin((r * 0.0174532925199433)))); this.dispatchEvent(new Event("move")); } else { objective.x = objectivePoint.x; objective.y = objectivePoint.y; this.dispatchEvent(new Event("arrive")); }; } public function set Speed(_arg1:Number){ speed = _arg1; } } }//package Gamer.Defense.Enemy
Section 52
//DamageInfo (Gamer.Defense.Enemy.DamageInfo) package Gamer.Defense.Enemy { public class DamageInfo { private var effect:String;// = "" private var damage:Number;// = 0 public function get Effect():String{ return (effect); } public function set Effect(_arg1:String){ effect = _arg1; } public function set Damage(_arg1:Number){ damage = _arg1; } public function get Damage():Number{ return (damage); } } }//package Gamer.Defense.Enemy
Section 53
//Enemy (Gamer.Defense.Enemy.Enemy) package Gamer.Defense.Enemy { import flash.display.*; import Gamer.Defense.*; public class Enemy extends MyMovieClip { protected var healthUpperLimit:Number;// = -1 protected var speed:Number;// = 0 protected var hq:Headquarters;// = null protected var guage:Sprite;// = null protected var enemyHitArea:Sprite;// = null protected var prizeScore:Number;// = 0 protected var health:Number;// = -1 protected var guageWidth:Number;// = 0 protected var isBlast:Boolean;// = false public function Enemy(){ GameInfo.Instance().DestroyObjects.push(this); } public function get PrizeScore():Number{ return (Math.floor((healthUpperLimit / 10))); } public function Tow(){ Speed = (Speed * 0.5); } public function Frost(){ } protected function updateHealthIndicator(){ var _local1:Number = ((health / healthUpperLimit) * guageWidth); if (_local1 <= 0){ guage.width = 0; return; }; guage.width = _local1; } public function Aggression(){ } public function get IsBlast():Boolean{ return (isBlast); } public function Destroy(){ } public function DispelFrost(){ } public function set Speed(_arg1:Number){ speed = _arg1; } protected function setHealth(){ var _local1:int = GameInfo.Instance().BoutCount; var _local2 = 1; if (GameInfo.Instance().ChooseMode == 2){ _local2 = 2; }; if ((this is GroundEnemyA)){ healthUpperLimit = ((1500 * _local2) * Math.pow(4, _local1)); Health = healthUpperLimit; } else { if ((this is GroundEnemyB)){ healthUpperLimit = ((800 * _local2) * Math.pow(4, _local1)); Health = healthUpperLimit; } else { if ((this is GroundEnemyC)){ healthUpperLimit = ((900 * _local2) * Math.pow(4, _local1)); Health = healthUpperLimit; } else { if ((this is GroundEnemyD)){ healthUpperLimit = ((700 * _local2) * Math.pow(4, _local1)); Health = healthUpperLimit; } else { if ((this is GroundEnemyE)){ healthUpperLimit = ((140 * _local2) * Math.pow(4, _local1)); Health = healthUpperLimit; } else { if ((this is AirEnemyF)){ healthUpperLimit = ((260 * _local2) * Math.pow(4, _local1)); Health = healthUpperLimit; } else { if ((this is AirEnemyG)){ healthUpperLimit = ((140 * _local2) * Math.pow(4, _local1)); Health = healthUpperLimit; } else { if ((this is GroundEnemyH)){ healthUpperLimit = ((300 * _local2) * Math.pow(4, _local1)); Health = healthUpperLimit; } else { if ((this is GroundEnemyI)){ healthUpperLimit = ((160 * _local2) * Math.pow(4, _local1)); Health = healthUpperLimit; } else { if ((this is GroundEnemyJ)){ healthUpperLimit = ((480 * _local2) * Math.pow(4, _local1)); Health = healthUpperLimit; }; }; }; }; }; }; }; }; }; }; } public function Blast(){ } public function set IsBlast(_arg1:Boolean){ isBlast = _arg1; } public function MakeDamage(_arg1:DamageInfo){ } public function get Speed():Number{ return (speed); } public function CancelTow(){ Speed = (Speed * 2); } public function get PrizeMoney():Number{ return (Math.floor((healthUpperLimit / 100))); } public function get HitArea():Sprite{ return (enemyHitArea); } public function DestroyAll(){ Destroy(); } public function get Health():Number{ return (health); } public function set Health(_arg1:Number){ health = _arg1; if ((((Health <= 0)) && (!((GameInfo.Instance().ChooseMode == 4))))){ GameInfo.Instance().Money = ((GameInfo.Instance().Money + PrizeMoney) + 20); }; if (Health <= 0){ GameInfo.Instance().Score = (GameInfo.Instance().Score + PrizeScore); }; updateHealthIndicator(); } } }//package Gamer.Defense.Enemy
Section 54
//EnemyTactic (Gamer.Defense.Enemy.EnemyTactic) package Gamer.Defense.Enemy { import flash.display.*; import flash.events.*; import Gamer.Defense.*; import flash.utils.*; public class EnemyTactic extends MyEventDispatcher { private var timer:MyTimer;// = null private var wavesTime:Array;// = null private var mission:Array;// = null private var et:ExactTimer;// = null private var pass:Pass;// = null private var waveCount:int;// = 0 public function EnemyTactic(_arg1:Array){ GameInfo.Instance().DestroyObjects.push(this); wavesTime = _arg1; waveCount = wavesTime.length; et = new ExactTimer(); pass = new Pass(); } public function Destroy(){ timer.stop(); timer.removeEventListener(TimerEvent.TIMER, timerHandle); } public function get WaveCount():int{ return (waveCount); } private function assault(){ var _local7:int; var _local1:Array = pass.Bout.shift(); var _local2:int = Math.floor((GameInfo.Instance().TrafficAreas.length * Math.random())); var _local3:int = GameInfo.Instance().TrafficAreas[_local2].slice().shift(); var _local4:Array = GameInfo.Instance().TrafficAreas[_local2]; var _local5:int = _local1.length; var _local6:* = null; switch (_local3){ case 0: _local7 = 0; while (_local7 < _local5) { _local6 = _local1.shift(); if ((_local6 is GroundEnemy)){ GameInfo.Instance().EC.addChild(_local6); _local6.Initialize(_local4[(Math.floor((Math.random() * (_local4.length - 1))) + 1)], 4, 2); _local6.x = (_local6.x - (Math.random() * 300)); _local6.Aggression(); } else { if ((_local6 is AirEnemy)){ _local6.x = ((Math.random() * 100) - 200); _local6.y = (Math.random() * 200); GameInfo.Instance().AC.addChild(_local6); _local6.Initialize(3); _local6.Aggression(); }; }; _local7++; }; break; case 1: _local7 = 0; while (_local7 < _local5) { _local6 = _local1.shift(); if ((_local6 is GroundEnemy)){ GameInfo.Instance().EC.addChild(_local6); _local6.Initialize(_local4[(Math.floor((Math.random() * (_local4.length - 1))) + 1)], 6, 2); _local6.y = (_local6.y - (Math.random() * 320)); _local6.Aggression(); } else { if ((_local6 is AirEnemy)){ _local6.x = ((Math.random() * 100) + 250); _local6.y = (Math.random() * -200); GameInfo.Instance().AC.addChild(_local6); _local6.Initialize(3); _local6.Aggression(); }; }; _local7++; }; break; case 2: _local7 = 0; while (_local7 < _local5) { _local6 = _local1.shift(); if ((_local6 is GroundEnemy)){ GameInfo.Instance().EC.addChild(_local6); _local6.Initialize(_local4[(Math.floor((Math.random() * (_local4.length - 1))) + 1)], 0, 2); _local6.x = (_local6.x + (Math.random() * 320)); _local6.Aggression(); } else { if ((_local6 is AirEnemy)){ _local6.x = ((Math.random() * 100) + 700); _local6.y = (Math.random() * 100); GameInfo.Instance().AC.addChild(_local6); _local6.Initialize(3); _local6.Aggression(); }; }; _local7++; }; break; case 3: _local7 = 0; while (_local7 < _local5) { _local6 = _local1.shift(); if ((_local6 is GroundEnemy)){ GameInfo.Instance().EC.addChild(_local6); _local6.Initialize(_local4[(Math.floor((Math.random() * (_local4.length - 1))) + 1)], 2, 2); _local6.y = (_local6.y + (Math.random() * 320)); _local6.Aggression(); } else { if ((_local6 is AirEnemy)){ _local6.x = ((Math.random() * 100) + 250); _local6.y = ((Math.random() * 120) + 400); GameInfo.Instance().AC.addChild(_local6); _local6.Initialize(3); _local6.Aggression(); }; }; _local7++; }; break; }; } public function Start(){ et.AllTime = wavesTime[0]; et.CreateTimePoint(); timer = new MyTimer(2000, 0); timer.addEventListener(TimerEvent.TIMER, timerHandle); timer.start(); } private function timerHandle(_arg1:TimerEvent){ if (wavesTime.length == 0){ DestroyAll(); }; if (NextWaveRemainTime <= 0){ Subtract(); }; } public function get NextWaveRemainTime():int{ return (Math.floor(et.Second)); } public function get RemainWaveCount():int{ return (wavesTime.length); } public function Subtract(){ if (wavesTime.length == 0){ this.dispatchEvent(new Event("FinishBout")); return; }; wavesTime.shift(); et.AllTime = wavesTime[0]; et.CreateTimePoint(); assault(); this.dispatchEvent(new Event("Assault")); } public function get NextWaveRemainTimeString():String{ if (NextWaveRemainTime <= 9){ return (("00:0" + NextWaveRemainTime)); }; return (("00:" + NextWaveRemainTime)); } public function DestroyAll(){ Destroy(); } } }//package Gamer.Defense.Enemy
Section 55
//ExactTimer (Gamer.Defense.Enemy.ExactTimer) package Gamer.Defense.Enemy { import flash.utils.*; public class ExactTimer { private static var st:Number = NAN; private static var pauseTime:Number = 0; private static var allTime:Number = 0; public function get Millisecond():Number{ return (Math.abs((AllTime - (getTimer() - st)))); } public function get Second():Number{ return ((Math.abs((AllTime - (getTimer() - st))) / 1000)); } public function CreateTimePoint(){ st = getTimer(); } public function get CarryTime():Object{ var _local1:int = Math.floor(Minute); var _local2:int = Math.floor(Second); var _local3:int = Millisecond; var _local4:Object = new Object(); _local4.minute = (_local1 % 60); _local4.second = (_local2 % 60); _local4.millisecond = (_local3 % 1000); return (_local4); } public function get Minute():Number{ return ((Math.abs((AllTime - (getTimer() - st))) / 60000)); } public function set AllTime(_arg1:Number){ allTime = _arg1; } public function get AllTime():Number{ return (allTime); } public static function CancelPause(){ st = (st + (getTimer() - pauseTime)); } public static function Pause(){ pauseTime = getTimer(); } } }//package Gamer.Defense.Enemy
Section 56
//GroundEnemy (Gamer.Defense.Enemy.GroundEnemy) package Gamer.Defense.Enemy { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; public class GroundEnemy extends Enemy { private var timer:MyTimer;// = null private var pathGrids:Array;// = null private var fac:FrostAimClip;// = null private var startIndex:int;// = 0 private var objectiveIndex:int;// = 0 public var healthIndicator:HealthIndicator; private var travel:Travel;// = null private var path:Path;// = null private var gm:GridsMatrix;// = null public var hitTestArea:MovieClip; private var isFrost:Boolean;// = false private function blastFinishHandle(_arg1:Event){ DestroyAll(); } public function AdjustPath(){ travel.Stop(); path = new Path(PlaceIndex, objectiveIndex); pathGrids = path.GetGrids(); if (pathGrids.length == 0){ trace("找不到合适的路径!!"); return; }; travel = new Travel(this, pathGrids, Speed, TowardsWay); travel.Start(); } override public function Frost(){ travel.Stop(); isFrost = true; if (((!((fac == null))) && (!((fac.parent == null))))){ fac.parent.removeChild(fac); }; fac = new FrostAimClip(); fac.scaleX = (fac.scaleY = 0.1); this.addChild(fac); if (timer != null){ timer.stop(); timer.removeEventListener(TimerEvent.TIMER, timerHandle); }; timer = new MyTimer(3000, 1); timer.addEventListener(TimerEvent.TIMER, timerHandle); timer.start(); SoundManager.PlaySound("冰冻声"); } private function setSpeed(){ if ((this is GroundEnemyA)){ Speed = 2; } else { if ((this is GroundEnemyB)){ Speed = 2.1; } else { if ((this is GroundEnemyC)){ Speed = 2.4; } else { if ((this is GroundEnemyD)){ Speed = 2.2; } else { if ((this is GroundEnemyE)){ Speed = 2.6; } else { if ((this is GroundEnemyH)){ Speed = 2.1; } else { if ((this is GroundEnemyI)){ Speed = 2.4; } else { if ((this is GroundEnemyJ)){ Speed = 2; }; }; }; }; }; }; }; }; } private function timerHandle(_arg1:TimerEvent){ DispelFrost(); } override public function set Speed(_arg1:Number){ travel.Speed = _arg1; } public function get TowardsWay():int{ return (travel.TowardsWay); } override public function Aggression(){ if (pathGrids.length == 0){ trace("找不到合适的路径!!"); return; }; travel.Start(); } override public function Blast(){ this.play(); if (((!((fac == null))) && (!((fac.parent == null))))){ fac.parent.removeChild(fac); }; IsBlast = true; var _local1:int = GameInfo.Instance().Enemys.indexOf(this); var _local2:int = GameInfo.Instance().GroundEnemys.indexOf(this); if (_local1 != -1){ GameInfo.Instance().Enemys.splice(_local1, 1); }; if (_local2 != -1){ GameInfo.Instance().GroundEnemys.splice(_local2, 1); }; this.addEventListener("blastFinish", blastFinishHandle); travel.Stop(); SoundManager.PlaySound("敌人爆炸声"); } override public function DispelFrost(){ AdjustPath(); isFrost = false; if (((!((fac == null))) && (!((fac.parent == null))))){ fac.parent.removeChild(fac); }; } override public function MakeDamage(_arg1:DamageInfo){ Health = (Health - _arg1.Damage); if (Health <= 0){ Blast(); }; } override public function get Speed():Number{ return (travel.Speed); } override public function Destroy(){ if (timer != null){ timer.stop(); timer.removeEventListener(TimerEvent.TIMER, timerHandle); }; if (travel != null){ travel.Stop(); }; this.removeEventListener("blastFinish", blastFinishHandle); } private function UpdateHealthIndicator(){ guage.width = ((health / healthUpperLimit) * guageWidth); } public function get PlaceIndex():int{ return (travel.PlaceIndex); } override public function DestroyAll(){ Destroy(); var _local1:int = GameInfo.Instance().Enemys.indexOf(this); var _local2:int = GameInfo.Instance().GroundEnemys.indexOf(this); if (_local1 != -1){ GameInfo.Instance().Enemys.splice(_local1, 1); }; if (_local2 != -1){ GameInfo.Instance().GroundEnemys.splice(_local2, 1); }; if (this.parent != null){ this.parent.removeChild(this); }; if (((!((fac == null))) && (!((fac.parent == null))))){ fac.parent.removeChild(fac); }; } public function Initialize(_arg1:int, _arg2:int, _arg3:Number){ GameInfo.Instance().Enemys.push(this); GameInfo.Instance().GroundEnemys.push(this); isFrost = false; startIndex = _arg1; enemyHitArea = Sprite(this.getChildByName("hitTestArea")); guage = Sprite(DisplayObjectContainer(this.getChildByName("healthIndicator")).getChildByName("denote")); guageWidth = guage.width; setHealth(); gm = GameInfo.Instance().GM; hq = GameInfo.Instance().HQ; objectiveIndex = hq.AreaIndex[Math.floor((Math.random() * hq.AreaIndex.length))]; path = new Path(startIndex, objectiveIndex); pathGrids = path.GetGrids(); travel = new Travel(this, pathGrids, speed, _arg2); setSpeed(); setPlace(); } public function CheckPath(_arg1:Array):Boolean{ var _local2:FindPath4 = new FindPath4(_arg1, gm.Line); var _local3:Array = _local2.Search(PlaceIndex, objectiveIndex); if (_local3.length == 0){ return (false); }; return (true); } private function setPlace(){ this.x = (gm.Grids[startIndex].x + (gm.GridWidth / 2)); this.y = (gm.Grids[startIndex].y + (gm.GridWidth / 2)); } } }//package Gamer.Defense.Enemy
Section 57
//Pass (Gamer.Defense.Enemy.Pass) package Gamer.Defense.Enemy { public class Pass { private var mission:Array;// = null public function Pass(){ mission = new Array(); createMission(); } public function get Bout():Array{ return (mission); } private function createMission(){ mission[0] = [new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE()]; mission[1] = [new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE()]; mission[2] = [new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyI()]; mission[3] = [new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI()]; mission[4] = [new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI()]; mission[5] = [new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyH()]; mission[6] = [new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyH(), new GroundEnemyH(), new GroundEnemyH()]; mission[7] = [new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG()]; mission[8] = [new GroundEnemyH(), new GroundEnemyH(), new GroundEnemyH(), new GroundEnemyH(), new GroundEnemyH(), new GroundEnemyH(), new GroundEnemyJ()]; mission[9] = [new GroundEnemyH(), new GroundEnemyH(), new GroundEnemyH(), new GroundEnemyJ(), new GroundEnemyJ(), new GroundEnemyJ(), new AirEnemyG(), new AirEnemyG()]; mission[10] = [new GroundEnemyJ(), new GroundEnemyJ(), new GroundEnemyJ(), new GroundEnemyJ(), new GroundEnemyJ(), new GroundEnemyJ()]; mission[11] = [new GroundEnemyJ(), new GroundEnemyJ(), new GroundEnemyJ(), new GroundEnemyJ(), new GroundEnemyJ(), new GroundEnemyJ(), new GroundEnemyD(), new GroundEnemyD()]; mission[12] = [new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE(), new GroundEnemyE()]; mission[13] = [new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD()]; mission[14] = [new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyB(), new GroundEnemyB()]; mission[15] = [new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI()]; mission[16] = [new GroundEnemyH(), new GroundEnemyH(), new GroundEnemyH(), new GroundEnemyH(), new GroundEnemyH(), new AirEnemyG(), new GroundEnemyH(), new GroundEnemyH(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG()]; mission[17] = [new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyC()]; mission[18] = [new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyD()]; mission[19] = [new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG()]; mission[20] = [new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyC()]; mission[21] = [new AirEnemyF(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new AirEnemyG(), new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyC()]; mission[22] = [new GroundEnemyA(), new GroundEnemyA()]; mission[23] = [new AirEnemyF(), new AirEnemyF(), new AirEnemyF()]; mission[24] = [new GroundEnemyB(), new GroundEnemyB(), new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyD(), new GroundEnemyD(), new GroundEnemyE(), new GroundEnemyE(), new AirEnemyF(), new AirEnemyF(), new AirEnemyG(), new AirEnemyG(), new GroundEnemyA()]; mission[25] = [new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI(), new GroundEnemyI()]; mission[26] = [new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyC(), new AirEnemyF(), new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyC(), new AirEnemyF()]; mission[27] = [new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyC(), new GroundEnemyA(), new GroundEnemyA(), new AirEnemyF(), new AirEnemyF(), new AirEnemyF(), new AirEnemyF()]; mission[28] = [new GroundEnemyA(), new GroundEnemyA(), new GroundEnemyA(), new GroundEnemyA(), new GroundEnemyA()]; mission[29] = [new GroundEnemyA(), new GroundEnemyA(), new GroundEnemyA(), new GroundEnemyA(), new GroundEnemyA(), new AirEnemyF(), new AirEnemyF(), new AirEnemyF(), new AirEnemyF(), new AirEnemyF()]; } } }//package Gamer.Defense.Enemy
Section 58
//Path (Gamer.Defense.Enemy.Path) package Gamer.Defense.Enemy { import flash.display.*; import flash.events.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; public class Path { private var startIndex:int;// = 0 private var gm:GridsMatrix;// = null private var endIndex:int;// = 0 public function Path(_arg1:int, _arg2:int){ gm = GameInfo.Instance().GM; startIndex = _arg1; endIndex = _arg2; } private function getPathGrid():Array{ var _local1:FindPath4 = new FindPath4(getFindPathMap(), gm.Line); var _local2:Array = _local1.Search(startIndex, endIndex); _local2.reverse(); var _local3:Array = new Array(); var _local4:int = _local2.length; var _local5:int; while (_local5 < _local4) { _local3.push(gm.Grids[_local2[_local5]]); _local5++; }; return (_local3); } private function getFindPathMap():Array{ var _local1:Array = new Array(); var _local2:int = gm.Grids.length; var _local3:int; while (_local3 < _local2) { _local1[_local3] = gm.Grids[_local3].IsMove; _local3++; }; return (_local1); } public function GetGrids():Array{ return (getPathGrid()); } } }//package Gamer.Defense.Enemy
Section 59
//Travel (Gamer.Defense.Enemy.Travel) package Gamer.Defense.Enemy { import flash.display.*; import flash.events.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; public class Travel extends MyEventDispatcher { private var ways:Array;// = null private var speed:Number;// = 0 private var placeIndex:int;// = 0 private var gs:Array;// = null private var bs:BeelineSport; private var towardsWay:int;// = 0 private var objective:DisplayObject;// = null public function Travel(_arg1:DisplayObject, _arg2:Array, _arg3:Number, _arg4:int){ objective = _arg1; gs = _arg2.slice(); speed = _arg3; TowardsWay = _arg4; ways = getWays(); bs = new BeelineSport(objective, speed); bs.addEventListener("arrive", arriveHandle); } private function getWays():Array{ var _local1:Array = new Array(); var _local2:Array = new Array(); var _local3:int = gs.length; var _local4:int; while (_local4 < _local3) { _local2[_local4] = gs[_local4].Index; _local4++; }; _local1.push(TowardsWay); _local4 = 0; while (_local4 < (_local3 - 1)) { _local1.push(queryWay(_local2[_local4], _local2[(_local4 + 1)], GameInfo.Instance().GM.Line)); _local4++; }; return (_local1); } public function get PlaceIndex():int{ return (placeIndex); } public function Start(){ var _local1:Grid = gs.shift(); placeIndex = _local1.Index; TowardsWay = ways.shift(); bs.Start(new Point((_local1.x + (_local1.width / 2)), (_local1.y + (_local1.height / 2)))); } public function set TowardsWay(_arg1:int){ towardsWay = _arg1; switch (towardsWay){ case 0: objective.rotation = 0; break; case 1: objective.rotation = 45; break; case 2: objective.rotation = 90; break; case 3: objective.rotation = 135; break; case 4: objective.rotation = 180; break; case 5: objective.rotation = 225; break; case 6: objective.rotation = 270; break; case 7: objective.rotation = 315; break; }; } public function Stop(){ bs.Stop(); bs.removeEventListener("arrive", arriveHandle); bs.removeEventListener("arrive", arriveHandle2); } public function set Speed(_arg1:Number){ bs.Speed = _arg1; } private function arriveHandle(_arg1:Event){ var _local2:Grid = gs.shift(); placeIndex = _local2.Index; TowardsWay = ways.shift(); bs.Start(new Point((_local2.x + (_local2.width / 2)), (_local2.y + (_local2.height / 2)))); if (gs.length <= 0){ bs.removeEventListener("arrive", arriveHandle); bs.addEventListener("arrive", arriveHandle2); }; } public function get TowardsWay():int{ return (towardsWay); } private function arriveHandle2(_arg1:Event){ Stop(); this.dispatchEvent(new Event("travelArrive")); } public function get Speed():Number{ return (bs.Speed); } private static function queryWay(_arg1:int, _arg2:int, _arg3:int):int{ var _local4:Array = new Array(); _local4[0] = (_arg1 - 1); _local4[1] = ((_arg1 - _arg3) - 1); _local4[2] = (_arg1 - _arg3); _local4[3] = ((_arg1 - _arg3) + 1); _local4[4] = (_arg1 + 1); _local4[5] = ((_arg1 + _arg3) + 1); _local4[6] = (_arg1 + _arg3); _local4[7] = ((_arg1 + _arg3) - 1); var _local5:int = _local4.length; var _local6:int; while (_local6 < _local5) { if (_local4[_local6] == _arg2){ return (_local6); }; _local6++; }; return (-1); } } }//package Gamer.Defense.Enemy
Section 60
//FindPath4 (Gamer.Defense.Tool.FindPath4) package Gamer.Defense.Tool { import flash.utils.*; public class FindPath4 { private var matrix:Array;// = null private var path:Array;// = null private var sum:int;// = 0 private var line:int;// = 0 private var signs:Array;// = null public function FindPath4(_arg1:Array, _arg2:int){ signs = _arg1; line = _arg2; sum = signs.length; path = new Array(); createMatrix(); } private function createMatrix(){ matrix = new Array(); var _local1:int; while (_local1 < sum) { matrix[_local1] = new Grid(); matrix[_local1].Index = _local1; matrix[_local1].IsSearch = signs[_local1]; _local1++; }; _local1 = 0; while (_local1 < sum) { matrix[_local1].Brink = -1; _local1 = (_local1 + line); }; _local1 = (line - 1); while (_local1 <= sum) { matrix[_local1].Brink = 1; _local1 = (_local1 + line); }; } private function getAllParentNote(_arg1:Grid){ path = new Array(_arg1); while (path[(path.length - 1)].ParentNote != null) { path.push(path[(path.length - 1)].ParentNote); }; } public function Search(_arg1:int, _arg2:int):Array{ search(_arg1, _arg2); var _local3:Array = new Array(); var _local4:int = path.length; var _local5:int; while (_local5 < _local4) { _local3.push(path[_local5].Index); _local5++; }; return (_local3); } private function search(_arg1:int, _arg2:int){ var _local4:Grid; var _local5:Array; var _local6:int; var _local7:Grid; var _local8:Grid; var _local9:Grid; var _local10:Grid; if (((!(matrix[_arg1].IsSearch)) || (!(matrix[_arg2].IsSearch)))){ trace("起点和终点不能在障碍物上!"); return; }; if (_arg1 == _arg2){ trace("起点和终点发生了重合!"); return; }; var _local3:Array = new Array(); _local3[0] = matrix[_arg1]; _local3[0].IsSearch = false; while (_local3.length != 0) { _local4 = _local3.shift(); _local5 = new Array(); _local6 = _local4.Index; _local7 = matrix[(_local6 - line)]; _local8 = matrix[(_local6 + line)]; _local9 = matrix[(_local6 - 1)]; _local10 = matrix[(_local6 + 1)]; if (_local4.Brink == 0){ if (((_local9) && (_local9.IsSearch))){ _local9.ParentNote = _local4; _local9.IsSearch = false; _local3.push(_local9); if (_local9.Index == _arg2){ getAllParentNote(_local9); return; }; }; if (((_local7) && (_local7.IsSearch))){ _local7.ParentNote = _local4; _local7.IsSearch = false; _local3.push(_local7); if (_local7.Index == _arg2){ getAllParentNote(_local7); return; }; }; if (((_local10) && (_local10.IsSearch))){ _local10.ParentNote = _local4; _local10.IsSearch = false; _local3.push(_local10); if (_local10.Index == _arg2){ getAllParentNote(_local10); return; }; }; if (((_local8) && (_local8.IsSearch))){ _local8.ParentNote = _local4; _local8.IsSearch = false; _local3.push(_local8); if (_local8.Index == _arg2){ getAllParentNote(_local8); return; }; }; } else { if (_local4.Brink == -1){ if (((_local7) && (_local7.IsSearch))){ _local7.ParentNote = _local4; _local7.IsSearch = false; _local3.push(_local7); if (_local7.Index == _arg2){ getAllParentNote(_local7); return; }; }; if (((_local10) && (_local10.IsSearch))){ _local10.ParentNote = _local4; _local10.IsSearch = false; _local3.push(_local10); if (_local10.Index == _arg2){ getAllParentNote(_local10); return; }; }; if (((_local8) && (_local8.IsSearch))){ _local8.ParentNote = _local4; _local8.IsSearch = false; _local3.push(_local8); if (_local8.Index == _arg2){ getAllParentNote(_local8); return; }; }; } else { if (_local4.Brink == 1){ if (((_local9) && (_local9.IsSearch))){ _local9.ParentNote = _local4; _local9.IsSearch = false; _local3.push(_local9); if (_local9.Index == _arg2){ getAllParentNote(_local9); return; }; }; if (((_local7) && (_local7.IsSearch))){ _local7.ParentNote = _local4; _local7.IsSearch = false; _local3.push(_local7); if (_local7.Index == _arg2){ getAllParentNote(_local7); return; }; }; if (((_local8) && (_local8.IsSearch))){ _local8.ParentNote = _local4; _local8.IsSearch = false; _local3.push(_local8); if (_local8.Index == _arg2){ getAllParentNote(_local8); return; }; }; }; }; }; }; } } }//package Gamer.Defense.Tool
Section 61
//Grid (Gamer.Defense.Tool.Grid) package Gamer.Defense.Tool { public class Grid { public var IsSearch:Boolean;// = true public var Brink:int;// = 0 public var Index:uint;// = 0 public var ParentNote:Grid;// = null } }//package Gamer.Defense.Tool
Section 62
//PlaceConversion (Gamer.Defense.Tool.PlaceConversion) package Gamer.Defense.Tool { import flash.display.*; import flash.geom.*; public class PlaceConversion { public static function GetGlobal(_arg1:DisplayObject):Point{ return (_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y))); } public static function Shift(_arg1:DisplayObject, _arg2:DisplayObjectContainer){ var _local3:Point = GetLocal(_arg1, _arg2); _arg1.x = _local3.x; _arg1.y = _local3.y; _arg2.addChild(_arg1); } public static function GetLocal(_arg1:DisplayObject, _arg2:DisplayObject):Point{ return (_arg2.globalToLocal(GetGlobal(_arg1))); } } }//package Gamer.Defense.Tool
Section 63
//PointDistance (Gamer.Defense.Tool.PointDistance) package Gamer.Defense.Tool { import flash.display.*; import flash.geom.*; public class PointDistance { public static function GetDistance(_arg1:Point, _arg2:Point):Number{ var _local3:Number = (_arg1.x - _arg2.x); var _local4:Number = (_arg1.y - _arg2.y); return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4)))); } public static function JudgePointThreadPlace(_arg1:Point, _arg2:Point, _arg3:Point):int{ var _local4:Number = _arg1.x; var _local5:Number = _arg1.y; var _local6:Number = _arg2.x; var _local7:Number = _arg2.y; var _local8:Number = _arg3.x; var _local9:Number = ((((_local5 - _local7) / (_local4 - _local6)) * _local8) + (((_local4 * _local7) - (_local6 * _local5)) / (_local4 - _local6))); if (_arg3.y > _local9){ return (-1); }; if (_arg3.y < _local9){ return (1); }; return (0); } public static function GetDistanceB(_arg1:DisplayObject, _arg2:DisplayObject):Number{ var _local3:Number = (_arg1.x - _arg2.x); var _local4:Number = (_arg1.y - _arg2.y); return (Math.sqrt(((_local3 * _local3) + (_local4 * _local4)))); } } }//package Gamer.Defense.Tool
Section 64
//SlowdownSport (Gamer.Defense.Tool.SlowdownSport) package Gamer.Defense.Tool { import flash.display.*; import flash.events.*; import Gamer.Defense.*; public class SlowdownSport extends MyEventDispatcher { private var objective:DisplayObject; private var speed:Number;// = 0 private var dotX:Number;// = 0 private var dotY:Number;// = 0 private var note:Boolean;// = true public function SlowdownSport(_arg1:DisplayObject, _arg2:Number){ objective = _arg1; speed = _arg2; } public function get Note():Boolean{ return (note); } public function start(_arg1:Number, _arg2:Number){ if (note){ note = false; dotX = _arg1; dotY = _arg2; Objective.addEventListener(Event.ENTER_FRAME, frameHandle); }; } public function get Objective():DisplayObject{ return (objective); } public function stop(){ Objective.removeEventListener(Event.ENTER_FRAME, frameHandle); } public function set Objective(_arg1:DisplayObject){ objective = _arg1; } public function set Note(_arg1:Boolean){ note = _arg1; } private function move(){ Objective.x = (Objective.x + ((dotX - Objective.x) * Speed)); Objective.y = (Objective.y + ((dotY - Objective.y) * Speed)); if ((((Math.abs((dotX - Objective.x)) < 1)) && ((Math.abs((dotY - Objective.y)) < 1)))){ Objective.x = dotX; Objective.y = dotY; Objective.removeEventListener(Event.ENTER_FRAME, frameHandle); note = true; }; } public function set Speed(_arg1:Number){ speed = _arg1; } public function get Speed():Number{ return (speed); } private function frameHandle(_arg1:Event){ move(); } } }//package Gamer.Defense.Tool
Section 65
//Tool (Gamer.Defense.Tool.Tool) package Gamer.Defense.Tool { import flash.display.*; import flash.events.*; import flash.geom.*; import Gamer.Defense.*; import flash.utils.*; public class Tool { public static function ClearDisplayList(_arg1:DisplayObjectContainer){ var _local2:Array = getAllChildren(_arg1); _local2.shift(); _local2.reverse(); var _local3:int = _local2.length; var _local4:int; while (_local4 < _local3) { _local2[_local4].parent.removeChild(_local2[_local4]); _local4++; }; } public static function checkDisplayType(_arg1:DisplayObject){ } public static function PointToPoint(_arg1:DisplayObject, _arg2:Point){ var _local3:Point = PlaceConversion.GetGlobal(_arg1); var _local4:Number = (_local3.x - _arg2.x); var _local5:Number = (_local3.y - _arg2.y); _arg1.rotation = (-(Math.atan2(_local4, _local5)) / 0.0174532925199433); } public static function OscillateEffect(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number):Function{ var xx:Number; var yy:Number; var attenuation:Number; var timer:MyTimer; var timerHandle:Function; var timerCompleteHandle:Function; var stopEffect:Function; var obj = _arg1; var frequency = _arg2; var scope = _arg3; var time = _arg4; timerHandle = function (_arg1:TimerEvent){ obj.x = ((Math.random() * scope) + xx); obj.y = ((Math.random() * scope) + yy); scope = (scope - attenuation); }; timerCompleteHandle = function (_arg1:TimerEvent){ stopEffect(); }; stopEffect = function (){ obj.x = xx; obj.y = yy; timer.stop(); timer.removeEventListener(TimerEvent.TIMER, timerHandle); }; xx = obj.x; yy = obj.y; var delay:Number = (1000 / frequency); var times:uint = (time / delay); attenuation = (scope / times); timer = new MyTimer(delay, times); timer.addEventListener(TimerEvent.TIMER, timerHandle); timer.addEventListener(TimerEvent.TIMER_COMPLETE, timerCompleteHandle); timer.start(); return (stopEffect); } public static function getAllChildren(_arg1:DisplayObjectContainer):Array{ var _local2:Array = new Array(); var _local3:Array = [_arg1]; var _local4:* = null; while (_local3.length != 0) { _local4 = _local3.shift(); _local2.push(_local4); if ((_local4 is DisplayObjectContainer)){ _local3 = _local3.concat(getChildren(_local4)); }; }; return (_local2); } public static function OverstepScreen(_arg1:DisplayObject, _arg2:Number):Boolean{ var _local3:Point = PlaceConversion.GetGlobal(_arg1); if ((((((((_local3.x < -(_arg2))) || ((_local3.x > (_arg1.stage.stageWidth + _arg2))))) || ((_local3.y < -(_arg2))))) || ((_local3.y > (_arg1.stage.stageHeight + _arg2))))){ return (true); }; return (false); } public static function getChildren(_arg1:DisplayObjectContainer):Array{ var _local2:Array = new Array(); var _local3:int = _arg1.numChildren; var _local4:int; while (_local4 < _local3) { _local2.push(_arg1.getChildAt(_local4)); _local4++; }; return (_local2); } } }//package Gamer.Defense.Tool
Section 66
//Vector (Gamer.Defense.Tool.Vector) package Gamer.Defense.Tool { public class Vector { private var _numX:Number; private var _numY:Number; private var MIN_LENGTH:Number;// = 0.001 public function Vector(_arg1, _arg2){ _numX = _arg1; _numY = _arg2; } public function makeCopy(){ return (new Vector(_numX, _numY)); } public function set numRotation(_arg1){ var _local2:* = numLength; _numX = 0; _numY = 1; rotate(((-3.141592 * _arg1) / 180)); numLength = _local2; } public function getAngleWith(_arg1){ return (Math.acos((((_numX * _arg1.numX) + (_numY * _arg1.numY)) / (numLength * _arg1.numLength)))); } public function set numX(_arg1){ _numX = _arg1; } public function get numLength(){ return (Math.sqrt(((_numX * _numX) + (_numY * _numY)))); } public function set numY(_arg1){ _numY = _arg1; } public function toString(){ return (new String((((("(" + _numX) + ",") + _numY) + ")"))); } public function getWayTo(_arg1){ return (((_numX * _arg1.numY) - (_numY * _arg1.numX))); } public function set numLength(_arg1){ var _local2:*; if (_arg1 < MIN_LENGTH){ _arg1 = MIN_LENGTH; }; if (numLength){ _local2 = (_arg1 / numLength); _numX = (_numX * _local2); _numY = (_numY * _local2); }; } public function get numX(){ return (_numX); } public function get numY(){ return (_numY); } public function rotate(_arg1){ var _local2:*; var _local3:*; if (_arg1){ _local2 = (Math.atan2(_numX, _numY) + _arg1); _local3 = numLength; _numX = (_local3 * Math.sin(_local2)); _numY = (_local3 * Math.cos(_local2)); }; } public function get numRotation(){ var _local1:* = ((180 * getAngleWith(new Vector(0, -1))) / Math.PI); if (_numX < 0){ _local1 = (_local1 * -1); }; return (_local1); } } }//package Gamer.Defense.Tool
Section 67
//BombSupport (Gamer.Defense.Weapon.BombSupport) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; import flash.media.*; public class BombSupport { private var bac:BombAimClip;// = null private var damage:Number;// = 0 private var rangeEnemys:Array;// = null private var radiusRange:Number;// = 0 private var target:DisplayObjectContainer;// = null private var rangeEnemysDamage:Array;// = null public function BombSupport(){ target = GameInfo.Instance().UC; bac = new BombAimClip(); target.addChild(bac); radiusRange = (bac.width / 2); damage = 500; rangeEnemys = new Array(); rangeEnemysDamage = new Array(); drag(); bac.addEventListener(MouseEvent.CLICK, clickHandle); } private function bomb(){ var _local3:DamageInfo; SoundManager.PlaySound("核弹爆炸声"); getRangeEnemys(); if (rangeEnemys.length == 0){ return; }; var _local1:int = rangeEnemys.length; var _local2:int; while (_local2 < _local1) { _local3 = new DamageInfo(); _local3.Damage = rangeEnemysDamage[_local2]; rangeEnemys[_local2].MakeDamage(_local3); _local2++; }; } private function clickHandle(_arg1:MouseEvent){ bomb(); GameInfo.Instance().Money = (GameInfo.Instance().Money - GameInfo.Instance().WeaponPriceList.BombSupportID); Tool.OscillateEffect(GameInfo.Instance().EC, GameInfo.Instance().FrameRate, 7, 800); Tool.OscillateEffect(GameInfo.Instance().BC, GameInfo.Instance().FrameRate, 5, 800); Tool.OscillateEffect(GameInfo.Instance().SFC, GameInfo.Instance().FrameRate, 3, 800); Tool.OscillateEffect(GameInfo.Instance().BGC, GameInfo.Instance().FrameRate, 4, 800); DestroyAll(); } private function drag(){ bac.addEventListener(Event.ENTER_FRAME, dragHandle); } private function escDrag(){ bac.removeEventListener(Event.ENTER_FRAME, dragHandle); } private function getRangeEnemys(){ var _local1:Array = GameInfo.Instance().Enemys; var _local2:Array = new Array(); var _local3:Array = new Array(); var _local4:int = _local1.length; var _local5:int; while (_local5 < _local4) { _local3[_local5] = PointDistance.GetDistance(PlaceConversion.GetGlobal(_local1[_local5]), PlaceConversion.GetGlobal(bac)); _local5++; }; _local5 = 0; while (_local5 < _local4) { if (_local3[_local5] <= radiusRange){ rangeEnemysDamage.push((damage - ((_local3[_local5] / radiusRange) * damage))); rangeEnemys.push(_local1[_local5]); }; _local5++; }; } public function Destroy(){ escDrag(); bac.removeEventListener(MouseEvent.CLICK, clickHandle); } private function dragHandle(_arg1:Event){ bac.x = target.mouseX; bac.y = target.mouseY; } public function DestroyAll(){ Destroy(); if (bac.parent != null){ bac.parent.removeChild(bac); }; } } }//package Gamer.Defense.Weapon
Section 68
//CoolingTimer (Gamer.Defense.Weapon.CoolingTimer) package Gamer.Defense.Weapon { import flash.events.*; import Gamer.Defense.*; public class CoolingTimer { private var delay:Number;// = 0 private var timer:MyTimer;// = null private var isCooling:Boolean;// = false private var timer2:MyTimer;// = null public function CoolingTimer(_arg1:Number){ delay = _arg1; timer = new MyTimer((1000 / GameInfo.Instance().FrameRate), 0); timer.addEventListener(TimerEvent.TIMER, timerHandle); timer.start(); } public function destroy(){ timer.stop(); timer.removeEventListener(TimerEvent.TIMER, timerHandle); timer2.stop(); timer2.removeEventListener(TimerEvent.TIMER, timer2Handle); } private function timerHandle(_arg1:TimerEvent){ if (IsCooling){ timer.stop(); timer2 = new MyTimer(delay, 1); timer2.addEventListener(TimerEvent.TIMER, timer2Handle); timer2.start(); }; } public function get IsCooling():Boolean{ return (isCooling); } private function timer2Handle(_arg1:TimerEvent){ IsCooling = false; timer.start(); timer2.stop(); timer2.removeEventListener(TimerEvent.TIMER, timer2Handle); } public function set IsCooling(_arg1:Boolean){ isCooling = _arg1; } } }//package Gamer.Defense.Weapon
Section 69
//FlackWeapon (Gamer.Defense.Weapon.FlackWeapon) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; public class FlackWeapon extends Weapon { public var levelSign:武器等级标记; public var head:MovieClip; public var circleRange:MovieClip; public var chooseSign:MovieClip; private var fb:FlackBullet;// = null override public function Level1(){ super.Level1(); } override public function attack(){ var _local1:Point = PlaceConversion.GetGlobal(Locality); fb = FlackBullet.getInstance(); fb.Initialize(GameInfo.Instance().BC, Enemy(Objective), Damage, PlaceConversion.GetGlobal(Locality), PlaceConversion.GetGlobal(Objective)); fb.Shoot(); SoundManager.PlaySound("高射光声"); } override public function Level2(){ super.Level2(); } override public function Initialize(){ level0Info = {target:"Air", damage:120, range:120, br:"N/A", rt:1.5, uc:0}; level1Info = {target:"Air", damage:130, range:130, br:"N/A", rt:1, uc:200}; level2Info = {target:"Air", damage:150, range:140, br:"N/A", rt:1, uc:300}; level3Info = {target:"Air", damage:160, range:150, br:"N/A", rt:0.7, uc:400}; super.Initialize(); price = GameInfo.Instance().WeaponPriceList.FlackWeaponID; weaponName = "Laser Emitter"; } override public function Level3(){ super.Level3(); } } }//package Gamer.Defense.Weapon
Section 70
//FollowWeapon (Gamer.Defense.Weapon.FollowWeapon) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; public class FollowWeapon extends Weapon { public var levelSign:武器等级标记; public var head:MovieClip; public var circleRange:MovieClip; public var chooseSign:MovieClip; private var fb:FollowBullet;// = null override public function Level1(){ super.Level1(); } override public function attack(){ fb = FollowBullet.getInstance(); fb.Damage = this.Damage; GameInfo.Instance().EC.addChild(fb); fb.Initialize(Objective, 5); var _local1:Point = PlaceConversion.GetGlobal(Locality); fb.x = _local1.x; fb.y = _local1.y; fb.Start(); SoundManager.PlaySound("导弹声"); } override public function Level2(){ super.Level2(); } override public function Initialize(){ level0Info = {target:"Ground", damage:150, range:100, br:"N/A", rt:1.5, uc:0}; level1Info = {target:"Ground", damage:160, range:110, br:"N/A", rt:1, uc:300}; level2Info = {target:"Ground", damage:180, range:120, br:"N/A", rt:1, uc:400}; level3Info = {target:"Ground", damage:200, range:135, br:"N/A", rt:1, uc:600}; super.Initialize(); price = GameInfo.Instance().WeaponPriceList.FollowWeaponID; weaponName = "Missile Emitter"; } override public function Level3(){ super.Level3(); } } }//package Gamer.Defense.Weapon
Section 71
//FrostSupport (Gamer.Defense.Weapon.FrostSupport) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; public class FrostSupport { private var fac:FrostAimClip;// = null private var radiusRange:Number;// = 0 private var rangeEnemys:Array;// = null private var target:DisplayObjectContainer;// = null private var enemysSpeed:Array;// = null public function FrostSupport(){ fac = new FrostAimClip(); target = GameInfo.Instance().UC; target.addChild(fac); radiusRange = (fac.width / 2); rangeEnemys = new Array(); enemysSpeed = new Array(); drag(); fac.addEventListener(MouseEvent.CLICK, clickHandle); } private function dragHandle(_arg1:Event){ fac.x = target.mouseX; fac.y = target.mouseY; } private function frost(){ getRangeEnemys(); if (rangeEnemys.length == 0){ return; }; var _local1:int = rangeEnemys.length; var _local2:int; while (_local2 < _local1) { rangeEnemys[_local2].Frost(); _local2++; }; } private function renewEnemys(){ var _local1:int = rangeEnemys.length; var _local2:int; while (_local2 < _local1) { rangeEnemys[_local2].DispelFrost(); _local2++; }; } public function DestroyAll(){ Destroy(); if (fac.parent != null){ fac.parent.removeChild(fac); }; } private function escDrag(){ fac.removeEventListener(Event.ENTER_FRAME, dragHandle); } private function getRangeEnemys(){ var _local1:Array = GameInfo.Instance().Enemys; var _local2:Array = new Array(); var _local3:Array = new Array(); var _local4:int = _local1.length; var _local5:int; while (_local5 < _local4) { _local3[_local5] = PointDistance.GetDistance(PlaceConversion.GetGlobal(_local1[_local5]), PlaceConversion.GetGlobal(fac)); _local5++; }; _local5 = 0; while (_local5 < _local4) { if (_local3[_local5] <= radiusRange){ rangeEnemys.push(_local1[_local5]); }; _local5++; }; } private function drag(){ fac.addEventListener(Event.ENTER_FRAME, dragHandle); } public function Destroy(){ escDrag(); fac.removeEventListener(MouseEvent.CLICK, clickHandle); } private function clickHandle(_arg1:MouseEvent){ frost(); GameInfo.Instance().Money = (GameInfo.Instance().Money - GameInfo.Instance().WeaponPriceList.FrostSupportID); DestroyAll(); } } }//package Gamer.Defense.Weapon
Section 72
//LaserWeapon (Gamer.Defense.Weapon.LaserWeapon) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; public class LaserWeapon extends Weapon { public var levelSign:武器等级标记; public var head:MovieClip; public var circleRange:MovieClip; public var chooseSign:MovieClip; private var lb:LaserBullet;// = null override public function attack(){ GameInfo.Instance().EC.addChild(lb); lb.Damage = this.Damage; lb.Initialize(PlaceConversion.GetGlobal(Locality), PlaceConversion.GetGlobal(Objective), 36); lb.Start(); SoundManager.PlaySound("激光声"); } override public function Level2(){ super.Level2(); } override public function Initialize(){ level0Info = {target:"Ground", damage:100, range:100, br:"N/A", rt:1.5, uc:0}; level1Info = {target:"Ground", damage:130, range:110, br:"N/A", rt:1, uc:200}; level2Info = {target:"Ground", damage:150, range:120, br:"N/A", rt:1, uc:300}; level3Info = {target:"Ground", damage:190, range:130, br:"N/A", rt:0.8, uc:500}; super.Initialize(); price = GameInfo.Instance().WeaponPriceList.LaserWeaponID; weaponName = "Laser Cannon"; if (lb == null){ lb = new LaserBullet(); }; } override public function Level1(){ super.Level1(); } override public function Level3(){ super.Level3(); } } }//package Gamer.Defense.Weapon
Section 73
//LightEdgeWeapon (Gamer.Defense.Weapon.LightEdgeWeapon) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; public class LightEdgeWeapon extends Weapon { public var levelSign:武器等级标记; public var head:MovieClip; private var leb:LightEdgeBullet;// = null public var circleRange:MovieClip; public var chooseSign:MovieClip; override public function attack(){ leb = LightEdgeBullet.getInstance(); leb.Damage = this.Damage; GameInfo.Instance().EC.addChild(leb); leb.Initialize(Objective); var _local1:Point = PlaceConversion.GetGlobal(Locality); leb.x = _local1.x; leb.y = _local1.y; leb.Start(); SoundManager.PlaySound("光棱声"); } override public function Level2(){ super.Level2(); } override public function Initialize(){ level0Info = {target:"Ground", damage:110, range:100, br:"N/A", rt:4, uc:0}; level1Info = {target:"Ground", damage:120, range:105, br:"N/A", rt:3.5, uc:400}; level2Info = {target:"Ground", damage:130, range:110, br:"N/A", rt:3, uc:500}; level3Info = {target:"Ground", damage:140, range:115, br:"N/A", rt:3, uc:600}; super.Initialize(); price = GameInfo.Instance().WeaponPriceList.LightEdgeWeaponID; weaponName = "Prism Cannon"; } override public function Level3(){ super.Level3(); } override public function Level1(){ super.Level1(); } } }//package Gamer.Defense.Weapon
Section 74
//LightParticleWeapon (Gamer.Defense.Weapon.LightParticleWeapon) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; import flash.media.*; public class LightParticleWeapon extends Weapon { public var levelSign:武器等级标记; private var channel:SoundChannel;// = null public var head:MovieClip; public var circleRange:MovieClip; private var sound:Sound;// = null public var chooseSign:MovieClip; private var lb:BlowoutBullet;// = null override public function Level2(){ super.Level2(); } override public function Initialize(){ level0Info = {target:"Ground", damage:300, range:180, br:"N/A", rt:3, uc:0}; level1Info = {target:"Ground", damage:350, range:190, br:"N/A", rt:2.5, uc:800}; level2Info = {target:"Ground", damage:400, range:200, br:"N/A", rt:2, uc:1000}; level3Info = {target:"Ground", damage:600, range:220, br:"N/A", rt:1.8, uc:1200}; super.Initialize(); price = GameInfo.Instance().WeaponPriceList.LightParticleWeaponID; weaponName = "Crack Cannon"; } override public function Level3(){ super.Level3(); } override public function attack(){ lb = BlowoutBullet.getInstance(); GameInfo.Instance().EC.addChild(lb); lb.Damage = this.Damage; lb.Initialize(PlaceConversion.GetGlobal(Locality), PlaceConversion.GetGlobal(Objective), 20); lb.Start(); SoundManager.PlaySound("粒子炮声"); } override public function Level1(){ super.Level1(); } } }//package Gamer.Defense.Weapon
Section 75
//RadiateWeapon (Gamer.Defense.Weapon.RadiateWeapon) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; public class RadiateWeapon extends Weapon { public var levelSign:武器等级标记; private var rw:RadiateWave;// = null public var head:MovieClip; public var circleRange:MovieClip; public var chooseSign:MovieClip; private static var rws:Array = new Array(); private function endHandle(_arg1:Event){ rws.push(rw); } private function damageEnemys(){ var _local4:DamageInfo; var _local1:Array = getRangeEnemys(); var _local2:int = _local1.length; var _local3:int; while (_local3 < _local2) { _local4 = new DamageInfo(); _local4.Damage = Damage; _local1[_local3].MakeDamage(_local4); _local3++; }; } override public function Level2(){ super.Level2(); } override public function attack(){ var _local1:Point = PlaceConversion.GetGlobal(Head); rw = getRadiateWave(); rw.gotoAndPlay(1); rw.width = (rw.height = (AttackRange * 2)); rw.x = _local1.x; rw.y = _local1.y; GameInfo.Instance().EC.addChild(rw); damageEnemys(); rw.addEventListener("end", endHandle); SoundManager.PlaySound("辐射声"); } override public function Initialize(){ level0Info = {target:"Ground/Air", damage:100, range:80, br:"N/A", rt:5, uc:0}; level1Info = {target:"Ground/Air", damage:140, range:90, br:"N/A", rt:4.5, uc:400}; level2Info = {target:"Ground/Air", damage:180, range:95, br:"N/A", rt:4, uc:600}; level3Info = {target:"Ground/Air", damage:200, range:100, br:"N/A", rt:4, uc:700}; super.Initialize(); price = GameInfo.Instance().WeaponPriceList.RadiateWeaponID; weaponName = "Shockwave"; } private function getRangeEnemys():Array{ var _local1:Array = GameInfo.Instance().Enemys; var _local2:Array = new Array(); var _local3:Array = new Array(); var _local4:int = _local1.length; var _local5:int; while (_local5 < _local4) { _local3[_local5] = PointDistance.GetDistance(PlaceConversion.GetGlobal(_local1[_local5]), PlaceConversion.GetGlobal(Head)); _local5++; }; _local5 = 0; while (_local5 < _local4) { if (_local3[_local5] <= AttackRange){ _local2.push(_local1[_local5]); }; _local5++; }; return (_local2); } override public function Level3(){ super.Level3(); } override public function Level1(){ super.Level1(); } private static function getRadiateWave():RadiateWave{ if (rws.length > 0){ return (rws.shift()); }; return (new RadiateWave()); } } }//package Gamer.Defense.Weapon
Section 76
//ScattergunWeapon (Gamer.Defense.Weapon.ScattergunWeapon) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; public class ScattergunWeapon extends Weapon { public var levelSign:武器等级标记; public var head:MovieClip; public var circleRange:MovieClip; public var chooseSign:MovieClip; private var gb:GunBlaze;// = null private static var gbs:Array = new Array(); private function endHandle(_arg1:Event){ gbs.push(gb); } override public function attack(){ var _local1:DamageInfo = new DamageInfo(); _local1.Damage = Damage; Enemy(Objective).MakeDamage(_local1); var _local2:Point = PlaceConversion.GetGlobal(Locality); gb = getGBInstance(); gb.gotoAndPlay(1); gb.x = _local2.x; gb.y = _local2.y; gb.rotation = Head.rotation; GameInfo.Instance().BC.addChild(gb); gb.addEventListener("end", endHandle); SoundManager.PlaySound("机枪声"); } override public function Level2(){ super.Level2(); } override public function Initialize(){ level0Info = {target:"Ground/Air", damage:80, range:80, br:"N/A", rt:1.5, uc:0}; level1Info = {target:"Ground/Air", damage:90, range:90, br:"N/A", rt:1, uc:100}; level2Info = {target:"Ground/Air", damage:100, range:95, br:"N/A", rt:1, uc:150}; level3Info = {target:"Ground/Air", damage:110, range:100, br:"N/A", rt:0.5, uc:200}; super.Initialize(); price = GameInfo.Instance().WeaponPriceList.ScattergunWeaponID; weaponName = "MachineGun Pillbox"; } override public function Level1(){ super.Level1(); } override public function Level3(){ super.Level3(); } public static function getGBInstance():GunBlaze{ if (gbs.length > 0){ return (gbs.shift()); }; return (new GunBlaze()); } } }//package Gamer.Defense.Weapon
Section 77
//ShotgunWeapon (Gamer.Defense.Weapon.ShotgunWeapon) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; import flash.media.*; public class ShotgunWeapon extends Weapon { public var levelSign:武器等级标记; public var head:MovieClip; public var circleRange:MovieClip; public var chooseSign:MovieClip; private var sb:ShotgunBullet;// = null override public function attack(){ var _local1:Point = PlaceConversion.GetGlobal(Locality); var _local2:Point = PlaceConversion.GetGlobal(Objective); sb = ShotgunBullet.getInstance(); sb.Initialize(ShotgunPatch, 5, GameInfo.Instance().EC, _local1, _local2, 10); sb.Damage = this.Damage; sb.Shoot(); SoundManager.PlaySound("霰弹声"); } override public function Level2(){ super.Level2(); } override public function Initialize(){ level0Info = {target:"Ground/Air", damage:50, range:90, br:"N/A", rt:3, uc:0}; level1Info = {target:"Ground/Air", damage:60, range:95, br:"N/A", rt:3, uc:300}; level2Info = {target:"Ground/Air", damage:70, range:100, br:"N/A", rt:2.7, uc:400}; level3Info = {target:"Ground/Air", damage:80, range:100, br:"N/A", rt:2.4, uc:500}; super.Initialize(); price = GameInfo.Instance().WeaponPriceList.ShotgunWeaponID; weaponName = "Diffuse Gun"; } override public function Level3(){ super.Level3(); } override public function Level1(){ super.Level1(); } } }//package Gamer.Defense.Weapon
Section 78
//TowWeapon (Gamer.Defense.Weapon.TowWeapon) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; import flash.media.*; public class TowWeapon extends Weapon { private var channel:SoundChannel;// = null private var sound:Sound;// = null public var circleRange:MovieClip; private var attacking:Boolean;// = false public var head:MovieClip; public var levelSign:武器等级标记; private var gps:GatherPowerSign;// = null private var tb:TowBullet;// = null public var chooseSign:MovieClip; private static var gpss:Array = new Array(); override public function attack(){ if (attacking){ return; }; attacking = true; tb = TowBullet.getInstance(); tb.Initialize(Locality, Objective, AttackRange); tb.Shoot(); tb.addEventListener("Destroy", destroyHandle); SoundManager.PlaySound("拖拽声"); } private function destroyHandle(_arg1:Event){ attacking = false; } override protected function nothingEnemyHandle(){ GameInfo.Instance().BC.removeChild(gps); gpss.push(gps); } override public function Level1(){ super.Level1(); } override public function Level2(){ super.Level2(); } override public function Level3(){ super.Level3(); } override protected function haveEnemyHandle(){ gps = getGatherPowerSign(); var _local1:Point = PlaceConversion.GetGlobal(this); gps.x = (_local1.x + (GameInfo.Instance().GridWidth / 2)); gps.y = (_local1.y + (GameInfo.Instance().GridWidth / 2)); GameInfo.Instance().BC.addChild(gps); } override public function DestroyAll(){ super.DestroyAll(); Destroy(); if (tb != null){ tb.DestroyAll(); }; if (((!((gps == null))) && (!((gps.parent == null))))){ gps.parent.removeChild(gps); }; } override public function Destroy(){ super.Destroy(); if (tb != null){ tb.Destroy(); tb.removeEventListener("Destroy", destroyHandle); }; if (channel != null){ channel.stop(); }; } override public function Initialize(){ level0Info = {target:"Ground/Air", damage:0, range:90, br:"N/A", rt:2.5, uc:0}; level1Info = {target:"Ground/Air", damage:0, range:100, br:"N/A", rt:2.5, uc:200}; level2Info = {target:"Ground/Air", damage:0, range:100, br:"N/A", rt:2, uc:300}; level3Info = {target:"Ground/Air", damage:0, range:110, br:"N/A", rt:2, uc:400}; super.Initialize(); price = GameInfo.Instance().WeaponPriceList.TowWeaponID; weaponName = "Retarder Cannon"; } private static function getGatherPowerSign(){ if (gpss.length > 0){ return (gpss.shift()); }; return (new GatherPowerSign()); } } }//package Gamer.Defense.Weapon
Section 79
//Wall (Gamer.Defense.Weapon.Wall) package Gamer.Defense.Weapon { import flash.events.*; import Gamer.Defense.*; public class Wall extends Weapon { override public function Initialize(){ price = 10; weaponName = "Wall"; SoundManager.PlaySound("铺墙声"); this.addEventListener(MouseEvent.CLICK, clickHandle); } override public function Destroy(){ this.removeEventListener(MouseEvent.CLICK, clickHandle); } private function clickHandle(_arg1:MouseEvent){ if (GameInfo.Instance().Sale){ Sell(); }; } override public function DestroyAll(){ Destroy(); if (this.parent != null){ this.parent.removeChild(this); }; } } }//package Gamer.Defense.Weapon
Section 80
//Weapon (Gamer.Defense.Weapon.Weapon) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.*; import flash.utils.*; public class Weapon extends Building { protected var level0Info:Object;// = null protected var attackKind:int;// = 0 protected var level:int;// = 0 protected var circleRangeVal:Sprite;// = null protected var rotateSpeed:Number;// = 6 private var tempPoint:Point;// = null protected var objective:DisplayObject;// = null protected var vector:Vector;// = null protected var weaponName:String;// = "" protected var rangeEnemy:Boolean;// = false protected var attackRange:Number;// = 150 protected var coolingTime:Number;// = 1000 protected var damage:Number;// = 0 protected var ct:CoolingTimer;// = null protected var level1Info:Object;// = null protected var level2Info:Object;// = null protected var level3Info:Object;// = null public function Weapon(){ circleRangeVal = (this.getChildByName("circleRange") as Sprite); GameInfo.Instance().Buildings.push(this); } public function get Head():Sprite{ return ((this.getChildByName("head") as Sprite)); } public function GetNextLevelInfo():Object{ switch (Level){ case 0: return (Level1Info); case 1: return (Level2Info); case 2: return (Level3Info); }; return (null); } public function get Locality():Sprite{ return ((Head.getChildByName("locality") as Sprite)); } public function Upgrade(){ if (Level >= 3){ return; }; switch (Level){ case 0: Level1(); break; case 1: Level2(); break; case 2: Level3(); break; }; } public function get RotateSpeed():Number{ return (rotateSpeed); } private function getFrontObjective(){ var _local1:Array; if (AttackKind == 0){ _local1 = GameInfo.Instance().GroundEnemys; } else { if (AttackKind == 1){ _local1 = GameInfo.Instance().AirEnemys; } else { _local1 = GameInfo.Instance().Enemys; }; }; var _local2:int = _local1.length; var _local3:int; while (_local3 < _local2) { if (_local1[_local3] != null){ if (PointDistance.GetDistance(PlaceConversion.GetGlobal(_local1[_local3]), PlaceConversion.GetGlobal(Head)) <= AttackRange){ return (_local1[_local3]); }; }; _local3++; }; return (null); } public function get Damage():Number{ return (damage); } public function showCircleRange(){ this.addChild(CircleRange); } public function set CoolingTime(_arg1:Number){ coolingTime = _arg1; ct = new CoolingTimer(coolingTime); } public function Level3(){ Level = 3; LevelSign.gotoAndStop((level + 1)); GameInfo.Instance().Money = (GameInfo.Instance().Money - level1Info.uc); switch (level3Info.target){ case "Ground": AttackKind = 0; break; case "Air": AttackKind = 1; break; default: AttackKind = -1; }; Damage = level3Info.damage; AttackRange = level3Info.range; CoolingTime = (level3Info.rt * 1000); } private function getFrailObjective(){ } public function set RotateSpeed(_arg1:Number){ rotateSpeed = _arg1; } public function get Objective():DisplayObject{ return (objective); } public function get Level0Info():Object{ return (level0Info); } public function get Level1Info():Object{ return (level1Info); } public function get Level2Info():Object{ return (level2Info); } public function get Level3Info():Object{ return (level3Info); } public function set Damage(_arg1:Number){ damage = _arg1; } public function updateLevelSign(){ LevelSign.gotoAndStop(Level); } public function DestroyAll(){ Destroy(); if (GameInfo.Instance().ChooseWeapon == this){ GameInfo.Instance().ChooseWeapon = null; }; if (this.parent != null){ this.parent.removeChild(this); }; } public function aimObjective(){ this.addEventListener(Event.ENTER_FRAME, aimObjectiveHandle); } public function get AttackKind():int{ return (attackKind); } private function outHandle(_arg1:MouseEvent){ hideCircleRange(); } public function cancelAimObjective(){ this.removeEventListener(Event.ENTER_FRAME, aimObjectiveHandle); } private function overHandle(_arg1:MouseEvent){ showCircleRange(); } public function get CircleRange():Sprite{ return (circleRangeVal); } public function Sell(){ var _local1:int = Areas.length; var _local2:int; while (_local2 < _local1) { Areas[_local2].IsMove = true; Areas[_local2].IsBuild = true; _local2++; }; GameInfo.Instance().Money = (GameInfo.Instance().Money + (Price * 0.5)); DestroyAll(); GameInfo.Instance().Buildings.splice(GameInfo.Instance().Buildings.indexOf(this), 1); } public function Initialize(){ GameInfo.Instance().DestroyObjects.push(this); vector = new Vector(0, -1); ct = new CoolingTimer(coolingTime); ChooseSign.alpha = 0; LevelSign.stop(); hideCircleRange(); CircleRange.width = (CircleRange.height = (AttackRange * 2)); aimObjective(); this.addEventListener(MouseEvent.MOUSE_OVER, overHandle); this.addEventListener(MouseEvent.MOUSE_OUT, outHandle); this.addEventListener(MouseEvent.CLICK, clickHandle); this.addEventListener("AimComplete", aimCompleteHandle); Level0(); } public function set Objective(_arg1:DisplayObject){ objective = _arg1; } public function get AttackRange():Number{ return (attackRange); } public function get ChooseSign():Sprite{ return ((this.getChildByName("chooseSign") as Sprite)); } public function set AttackKind(_arg1:int){ attackKind = _arg1; } public function hideCircleRange(){ this.removeChild(CircleRange); } private function getNearObjective(){ } private function aimObjectiveHandle(_arg1:Event){ judgeRangeEnemy(); if (objective == null){ Objective = getFrontObjective(); return; }; if ((((objective.parent == null)) || (Enemy(objective).IsBlast))){ Objective = null; return; }; if (checkObjectiveOverRange()){ objective = null; return; }; var _local2:Point = PlaceConversion.GetGlobal(objective); var _local3:Point = PlaceConversion.GetGlobal(Head); var _local4:Vector = new Vector((_local2.x - _local3.x), (_local2.y - _local3.y)); if (Math.abs((_local4.numRotation - Head.rotation)) > rotateSpeed){ if (vector.getWayTo(_local4) > 0){ vector.rotate(((-(rotateSpeed) * Math.PI) / 180)); } else { vector.rotate(((rotateSpeed * Math.PI) / 180)); }; Head.rotation = vector.numRotation; } else { if (!ct.IsCooling){ this.dispatchEvent(new Event("AimComplete")); ct.IsCooling = true; }; }; } public function get AreaLine():int{ return (areaLine); } private function judgeRangeEnemy(){ var _local1:Array = GameInfo.Instance().Enemys.slice(); var _local2:int = _local1.length; var _local3:int; while (_local3 < _local2) { if (PointDistance.GetDistance(PlaceConversion.GetGlobal(_local1[_local3]), PlaceConversion.GetGlobal(Head)) < attackRange){ RangeEnemy = true; return; }; _local3++; }; RangeEnemy = false; } public function get CoolingTime():Number{ return (coolingTime); } public function set Level(_arg1:int){ level = _arg1; updateLevelSign(); } protected function nothingEnemyHandle(){ } public function get AttackKindString():String{ if (AttackKind == 0){ return ("Ground"); }; if (AttackKind == 1){ return ("Air"); }; return ("Ground/Air"); } public function set WeaponName(_arg1:String){ weaponName = _arg1; } protected function haveEnemyHandle(){ } public function get LevelSign():MyMovieClip{ return ((this.getChildByName("levelSign") as MyMovieClip)); } public function showChooseSign(){ ChooseSign.alpha = 1; } public function aimPoint(_arg1:Point){ tempPoint = _arg1; this.addEventListener(Event.ENTER_FRAME, aimPointHandle); } public function Level0(){ Level = 0; switch (level0Info.target){ case "Ground": AttackKind = 0; break; case "Air": AttackKind = 1; break; default: AttackKind = -1; }; Damage = level0Info.damage; AttackRange = level0Info.range; CoolingTime = (level0Info.rt * 1000); } public function Level1(){ Level = 1; LevelSign.gotoAndStop((level + 1)); GameInfo.Instance().Money = (GameInfo.Instance().Money - level1Info.uc); switch (level1Info.target){ case "Ground": AttackKind = 0; break; case "Air": AttackKind = 1; break; default: AttackKind = -1; }; Damage = level1Info.damage; AttackRange = level1Info.range; CoolingTime = (level1Info.rt * 1000); } public function set RangeEnemy(_arg1:Boolean){ if (((rangeEnemy) && (!((_arg1 == rangeEnemy))))){ nothingEnemyHandle(); this.dispatchEvent(new Event("haveEnemy")); } else { if (((!(rangeEnemy)) && (!((_arg1 == rangeEnemy))))){ haveEnemyHandle(); this.dispatchEvent(new Event("nothingEnemy")); }; }; rangeEnemy = _arg1; } private function clickHandle(_arg1:MouseEvent){ if (GameInfo.Instance().Sale){ Sell(); return; }; GameInfo.Instance().CP.UpdateWeaponInfo(this); var _local2:Weapon = GameInfo.Instance().ChooseWeapon; if (_local2 == null){ GameInfo.Instance().ChooseWeapon = this; showChooseSign(); return; }; if (((!((_local2 == null))) && (!((_local2 == this))))){ GameInfo.Instance().ChooseWeapon.hideChooseSign(); GameInfo.Instance().ChooseWeapon = this; showChooseSign(); }; } private function aimPointHandle(_arg1:Event){ var _local2:Point = tempPoint; var _local3:Point = PlaceConversion.GetGlobal(Head); var _local4:Vector = new Vector((_local2.x - _local3.x), (_local2.y - _local3.y)); if (Math.abs((_local4.numRotation - Head.rotation)) > rotateSpeed){ if (vector.getWayTo(_local4) > 0){ vector.rotate(((-(RotateSpeed) * Math.PI) / 180)); } else { vector.rotate(((RotateSpeed * Math.PI) / 180)); }; Head.rotation = vector.numRotation; return; }; this.removeEventListener(Event.ENTER_FRAME, aimPointHandle); } public function Level2(){ Level = 2; LevelSign.gotoAndStop((level + 1)); GameInfo.Instance().Money = (GameInfo.Instance().Money - level1Info.uc); switch (level2Info.target){ case "Ground": AttackKind = 0; break; case "Air": AttackKind = 1; break; default: AttackKind = -1; }; Damage = level2Info.damage; AttackRange = level2Info.range; CoolingTime = (level2Info.rt * 1000); } public function attack(){ } public function Destroy(){ this.removeEventListener(MouseEvent.MOUSE_OVER, overHandle); this.removeEventListener(MouseEvent.MOUSE_OUT, outHandle); this.removeEventListener(MouseEvent.CLICK, clickHandle); this.removeEventListener("AimComplete", aimCompleteHandle); this.removeEventListener(Event.ENTER_FRAME, aimPointHandle); this.removeEventListener(Event.ENTER_FRAME, aimObjectiveHandle); } public function get Level():int{ return (level); } public function get AreaAmount():int{ return (areaAmount); } public function get WeaponName():String{ return (weaponName); } public function set AttackRange(_arg1:Number){ attackRange = _arg1; CircleRange.width = (CircleRange.height = (attackRange * 2)); } public function get RangeEnemy():Boolean{ return (rangeEnemy); } public function cancelAimPoint(){ this.removeEventListener(Event.ENTER_FRAME, aimPointHandle); } private function aimCompleteHandle(_arg1:Event){ attack(); } public function hideChooseSign(){ ChooseSign.alpha = 0; } public function GetNowLevelInfo():Object{ switch (Level){ case 0: return (Level0Info); case 1: return (Level1Info); case 2: return (Level2Info); case 3: return (Level3Info); }; return (null); } private function checkObjectiveOverRange():Boolean{ if (PointDistance.GetDistance(PlaceConversion.GetGlobal(objective), PlaceConversion.GetGlobal(Head)) > attackRange){ return (true); }; return (false); } } }//package Gamer.Defense.Weapon
Section 81
//WeaponFactory (Gamer.Defense.Weapon.WeaponFactory) package Gamer.Defense.Weapon { import flash.display.*; import flash.events.*; import flash.geom.*; import Gamer.Defense.*; import flash.utils.*; public class WeaponFactory { public static function BuildWeapon(_arg1:String, _arg2:Point, _arg3:Number, _arg4:Array){ var _local5:Weapon; switch (_arg1){ case "LaserWeapon": if (GameInfo.Instance().Money < GameInfo.Instance().WeaponPriceList.LaserWeaponID){ return (null); }; _local5 = new LaserWeapon(); _local5.x = _arg2.x; _local5.y = _arg2.y; GameInfo.Instance().BC.addChild(_local5); _local5.Areas = _arg4; _local5.Initialize(); GameInfo.Instance().Money = (GameInfo.Instance().Money - _local5.Price); return (_local5); case "FollowWeapon": if (GameInfo.Instance().Money < GameInfo.Instance().WeaponPriceList.FollowWeaponID){ return (null); }; _local5 = new FollowWeapon(); _local5.x = _arg2.x; _local5.y = _arg2.y; GameInfo.Instance().BC.addChild(_local5); _local5.Areas = _arg4; _local5.Initialize(); GameInfo.Instance().Money = (GameInfo.Instance().Money - _local5.Price); return (_local5); case "Wall": if (GameInfo.Instance().Money < GameInfo.Instance().WeaponPriceList.WallID){ return (null); }; _local5 = new Wall(); _local5.x = _arg2.x; _local5.y = _arg2.y; GameInfo.Instance().SFC.addChild(_local5); _local5.Areas = _arg4; _local5.Initialize(); GameInfo.Instance().Money = (GameInfo.Instance().Money - _local5.Price); return (_local5); case "LightParticleWeapon": if (GameInfo.Instance().Money < GameInfo.Instance().WeaponPriceList.LightParticleWeaponID){ return (null); }; _local5 = new LightParticleWeapon(); _local5.x = _arg2.x; _local5.y = _arg2.y; GameInfo.Instance().BC.addChild(_local5); _local5.Areas = _arg4; _local5.Initialize(); GameInfo.Instance().Money = (GameInfo.Instance().Money - _local5.Price); return (_local5); case "LightEdgeWeapon": if (GameInfo.Instance().Money < GameInfo.Instance().WeaponPriceList.LightEdgeWeaponID){ return (null); }; _local5 = new LightEdgeWeapon(); _local5.x = _arg2.x; _local5.y = _arg2.y; GameInfo.Instance().BC.addChild(_local5); _local5.Areas = _arg4; _local5.Initialize(); GameInfo.Instance().Money = (GameInfo.Instance().Money - _local5.Price); return (_local5); case "TowWeapon": if (GameInfo.Instance().Money < GameInfo.Instance().WeaponPriceList.TowWeaponID){ return (null); }; _local5 = new TowWeapon(); _local5.x = _arg2.x; _local5.y = _arg2.y; GameInfo.Instance().BC.addChild(_local5); _local5.Areas = _arg4; _local5.Initialize(); GameInfo.Instance().Money = (GameInfo.Instance().Money - _local5.Price); return (_local5); case "ScattergunWeapon": if (GameInfo.Instance().Money < GameInfo.Instance().WeaponPriceList.ScattergunWeaponID){ return (null); }; _local5 = new ScattergunWeapon(); _local5.x = _arg2.x; _local5.y = _arg2.y; GameInfo.Instance().BC.addChild(_local5); _local5.Areas = _arg4; _local5.Initialize(); GameInfo.Instance().Money = (GameInfo.Instance().Money - _local5.Price); return (_local5); case "RadiateWeapon": if (GameInfo.Instance().Money < GameInfo.Instance().WeaponPriceList.RadiateWeaponID){ return (null); }; _local5 = new RadiateWeapon(); _local5.x = _arg2.x; _local5.y = _arg2.y; GameInfo.Instance().BC.addChild(_local5); _local5.Areas = _arg4; _local5.Initialize(); GameInfo.Instance().Money = (GameInfo.Instance().Money - _local5.Price); return (_local5); case "ShotgunWeapon": if (GameInfo.Instance().Money < GameInfo.Instance().WeaponPriceList.ShotgunWeaponID){ return (null); }; _local5 = new ShotgunWeapon(); _local5.x = _arg2.x; _local5.y = _arg2.y; GameInfo.Instance().BC.addChild(_local5); _local5.Areas = _arg4; _local5.Initialize(); GameInfo.Instance().Money = (GameInfo.Instance().Money - _local5.Price); return (_local5); case "FlackWeapon": if (GameInfo.Instance().Money < GameInfo.Instance().WeaponPriceList.FlackWeaponID){ return (null); }; _local5 = new FlackWeapon(); _local5.x = _arg2.x; _local5.y = _arg2.y; GameInfo.Instance().BC.addChild(_local5); _local5.Areas = _arg4; _local5.Initialize(); GameInfo.Instance().Money = (GameInfo.Instance().Money - _local5.Price); return (_local5); }; return (null); } } }//package Gamer.Defense.Weapon
Section 82
//Building (Gamer.Defense.Building) package Gamer.Defense { public class Building extends MyMovieClip { protected var areaLine:int;// = 0 protected var areaAmount:int;// = 0 protected var areas:Array;// = null protected var price:Number;// = 0 protected var gm:GridsMatrix;// = null protected var areaIndex:Array;// = null public function Building(){ gm = GameInfo.Instance().GM; } public function get Price():Number{ return (price); } public function get Areas():Array{ return (areas); } public function set AreaIndex(_arg1:Array){ areaIndex = _arg1; } public function set Areas(_arg1:Array){ areas = _arg1; } public function get AreaIndex():Array{ return (areaIndex); } public function set Price(_arg1:Number){ price = _arg1; } } }//package Gamer.Defense
Section 83
//BuildingArea (Gamer.Defense.BuildingArea) package Gamer.Defense { import flash.display.*; import flash.events.*; import flash.geom.*; import Gamer.Defense.Tool.*; import Gamer.Defense.Weapon.*; public class BuildingArea extends MySprite { private var areaCount:int;// = 0 private var areas:Array;// = null private var weaponName:String;// = "" private var scopeRadius:Number;// = 0 private var hq:Headquarters;// = null private var grid:Grid;// = null private var aureole:MyMovieClip;// = null private var areasContainer:MySprite;// = null private var gm:GridsMatrix;// = null private var line:int;// = 0 private var canBuild:Boolean;// = true public function BuildingArea(){ GameInfo.Instance().DestroyObjects.push(this); GameInfo.Instance().PauseObjects.push(this); } public function CancelPause(){ this.addEventListener(MouseEvent.CLICK, clickHandle); GameInfo.Instance().StageObject.addEventListener(MouseEvent.MOUSE_MOVE, moveHandle); } private function updatePlace(){ var _local1:int = Math.floor((gm.mouseX / gm.GridWidth)); var _local2:int = Math.floor((gm.mouseY / gm.GridWidth)); if ((((((((_local1 < 0)) || ((_local1 >= gm.Line)))) || ((_local2 < 0)))) || ((_local2 >= gm.Row)))){ this.alpha = 0; return; }; this.alpha = 1; grid = gm.PlanarGrids[_local2][_local1]; var _local3:Point = PlaceConversion.GetGlobal(grid); this.x = _local3.x; this.y = _local3.y; checkCanBuild(); } private function formatAreas(){ formatMatrix(areas, line); } private function queryPath(_arg1:Array, _arg2:int, _arg3:int):Boolean{ var _local4:FindPath4 = new FindPath4(_arg1, gm.Line); var _local5:Array = _local4.Search(_arg2, _arg3); if (_local5.length == 0){ return (false); }; return (true); } public function Pause(){ this.removeEventListener(MouseEvent.CLICK, clickHandle); GameInfo.Instance().StageObject.removeEventListener(MouseEvent.MOUSE_MOVE, moveHandle); } private function clickHandle(_arg1:MouseEvent){ var _local6:int; if ((((GameInfo.Instance().ChooseMode == 3)) && ((GameInfo.Instance().Buildings.length >= 30)))){ return; }; judgeCanBuild(); if (!canBuild){ return; }; var _local2:Array = new Array(); var _local3:Point = PlaceConversion.GetGlobal(areas[0]); var _local4:Weapon = WeaponFactory.BuildWeapon(weaponName, new Point(_local3.x, _local3.y), scopeRadius, _local2); if (_local4 == null){ return; }; if (areas.length == 1){ _local2[0] = grid; _local2[0].IsMove = false; _local2[0].IsBuild = false; } else { if (areas.length == 4){ _local2[0] = gm.Grids[grid.Index]; _local2[1] = gm.Grids[(grid.Index + 1)]; _local2[2] = gm.Grids[(grid.Index + gm.Line)]; _local2[3] = gm.Grids[((grid.Index + gm.Line) + 1)]; _local6 = 0; while (_local6 < 4) { _local2[_local6].IsMove = false; _local2[_local6].IsBuild = false; _local6++; }; }; }; var _local5:int = GameInfo.Instance().GroundEnemys.length; _local6 = 0; while (_local6 < _local5) { GameInfo.Instance().GroundEnemys[_local6].AdjustPath(); _local6++; }; checkCanBuild(); } private function moveHandle(_arg1:MouseEvent){ updatePlace(); } public function Destroy(){ this.removeEventListener(MouseEvent.CLICK, clickHandle); GameInfo.Instance().StageObject.removeEventListener(MouseEvent.MOUSE_MOVE, moveHandle); } private function checkEnemyPath():Boolean{ var _local1:Array = new Array(); var _local2:int = gm.Grids.length; var _local3:int; while (_local3 < _local2) { _local1[_local3] = gm.Grids[_local3].IsMove; _local3++; }; var _local4:Array = getGrids(); _local2 = _local4.length; _local3 = 0; while (_local3 < _local2) { _local1[_local4[_local3].Index] = false; _local3++; }; var _local5:Array = GameInfo.Instance().GroundEnemys; _local2 = _local5.length; _local3 = 0; while (_local3 < _local2) { if (!_local5[_local3].CheckPath(_local1)){ return (false); }; _local3++; }; var _local6:Array = new Array(); var _local7:Array = GameInfo.Instance().TrafficAreas; _local2 = _local7.length; _local3 = 0; while (_local3 < _local2) { _local6[_local3] = _local7[_local3][1]; _local3++; }; _local3 = 0; while (_local3 < _local2) { if (!queryPath(_local1, _local6[_local3], hq.AreaIndex[0])){ return (false); }; _local3++; }; return (true); } public function DestroyAll(){ Destroy(); if (this.parent != null){ this.parent.removeChild(this); }; GameInfo.Instance().DestroyObjects.splice(GameInfo.Instance().DestroyObjects.indexOf(this), 1); GameInfo.Instance().PauseObjects.splice(GameInfo.Instance().PauseObjects.indexOf(this), 1); } public function Display(_arg1:Boolean){ var _local2:int; if (_arg1){ aureole.gotoAndStop(1); _local2 = 0; while (_local2 < areas.length) { areas[_local2].gotoAndStop(1); _local2++; }; } else { aureole.gotoAndStop(2); _local2 = 0; while (_local2 < areas.length) { areas[_local2].gotoAndStop(2); _local2++; }; }; } private function createAreas(){ var _local1:int; while (_local1 < areaCount) { areas.push(new Area()); _local1++; }; } private function displayAreas(){ var _local1:int; while (_local1 < areaCount) { areasContainer.addChild(areas[_local1]); _local1++; }; } private function checkCanBuild(){ var _local1:Array; var _local2:int; var _local3:int; var _local4:int; if (areaCount == 1){ if (!grid.IsBuild){ canBuild = false; areas[0].gotoAndStop(2); aureole.gotoAndStop(2); return; }; } else { if (areaCount == 4){ _local1 = new Array(); _local1[0] = gm.Grids[grid.Index]; _local1[1] = gm.Grids[(grid.Index + 1)]; _local1[2] = gm.Grids[(grid.Index + gm.Line)]; _local1[3] = gm.Grids[((grid.Index + gm.Line) + 1)]; if (_local1[3] == null){ canBuild = false; _local3 = 0; while (_local3 < areaCount) { areas[_local3].gotoAndStop(2); _local3++; }; aureole.gotoAndStop(2); return; }; _local2 = 0; while (_local2 < areaCount) { if (((!((_local1[_local2] == null))) && (!(_local1[_local2].IsBuild)))){ canBuild = false; _local4 = 0; while (_local4 < areaCount) { areas[_local4].gotoAndStop(2); _local4++; }; aureole.gotoAndStop(2); return; }; _local2++; }; }; }; canBuild = true; _local2 = 0; while (_local2 < areaCount) { areas[_local2].gotoAndStop(1); _local2++; }; aureole.gotoAndStop(1); } public function Initialize(_arg1:int, _arg2:Number, _arg3:int, _arg4:String){ line = _arg3; areaCount = _arg1; scopeRadius = _arg2; weaponName = _arg4; areas = new Array(); areasContainer = new MySprite(); this.addChild(areasContainer); aureole = new Aureole(); this.addChild(aureole); gm = GameInfo.Instance().GM; hq = GameInfo.Instance().HQ; createAreas(); displayAreas(); formatAreas(); aureole.width = (aureole.height = (_arg2 * 2)); aureole.x = (aureole.x + (areasContainer.width / 2)); aureole.y = (aureole.y + (areasContainer.height / 2)); updatePlace(); this.addEventListener(MouseEvent.CLICK, clickHandle); GameInfo.Instance().StageObject.addEventListener(MouseEvent.MOUSE_MOVE, moveHandle); EventCollect.Collect(GameInfo.Instance().StageObject, MouseEvent.MOUSE_MOVE, moveHandle); } private function judgeCanBuild(){ var _local4:int; var _local5:Array; var _local6:int; var _local7:int; var _local8:int; var _local1:Array = GameInfo.Instance().GroundEnemys; var _local2:int = _local1.length; var _local3:Array = new Array(); if (areaCount == 1){ if (!grid.IsBuild){ canBuild = false; return; }; _local4 = 0; while (_local4 < _local2) { if (_local1[_local4].PlaceIndex == grid.Index){ canBuild = false; return; }; _local4++; }; } else { if (areaCount == 4){ _local5 = new Array(); _local5[0] = gm.Grids[grid.Index]; _local5[1] = gm.Grids[(grid.Index + 1)]; _local5[2] = gm.Grids[(grid.Index + gm.Line)]; _local5[3] = gm.Grids[((grid.Index + gm.Line) + 1)]; if (_local5[3] == null){ canBuild = false; return; }; _local6 = 0; while (_local6 < areaCount) { if (((!((_local5[_local6] == null))) && (!(_local5[_local6].IsBuild)))){ canBuild = false; return; }; _local6++; }; _local3[0] = grid.Index; _local3[1] = (grid.Index + 1); _local3[2] = (grid.Index + gm.Line); _local3[3] = ((grid.Index + gm.Line) + 1); _local7 = 0; while (_local7 < _local2) { _local8 = 0; while (_local8 < areaCount) { if (_local1[_local7].PlaceIndex == _local3[_local8]){ canBuild = false; return; }; _local8++; }; _local7++; }; }; }; if (!checkEnemyPath()){ canBuild = false; return; }; canBuild = true; } private function getGrids():Array{ var _local1:Array = new Array(); if (areaCount == 1){ _local1[0] = grid; } else { if (areaCount == 4){ _local1[0] = gm.Grids[grid.Index]; _local1[1] = gm.Grids[(grid.Index + 1)]; _local1[2] = gm.Grids[(grid.Index + gm.Line)]; _local1[3] = gm.Grids[((grid.Index + gm.Line) + 1)]; }; }; return (_local1); } private static function formatMatrix(_arg1:Array, _arg2:int){ var _local9:int; var _local3:Array = _arg1.slice(); var _local4:Array = new Array(); var _local5:int = (_arg1.length / _arg2); var _local6:Number = _arg1[0].width; var _local7:int; while (_local7 < _local5) { _local4.push(_local3.splice(0, _arg2)); _local7++; }; var _local8:int; while (_local8 < _local5) { _local9 = 0; while (_local9 < _arg2) { _local4[_local8][_local9].x = (_local6 * _local9); _local4[_local8][_local9].y = (_local6 * _local8); _local9++; }; _local8++; }; } } }//package Gamer.Defense
Section 84
//ControlPanel (Gamer.Defense.ControlPanel) package Gamer.Defense { import flash.display.*; import flash.events.*; import Gamer.Defense.Enemy.*; import flash.text.*; import Gamer.Defense.Weapon.*; public class ControlPanel extends MyMovieClip { public var rangeNextTxt:TextField; private var buttons:Object; public var damageNowTxt:TextField; public var brNextTxt:TextField; public var damageNextTxt:TextField; public var moneyTxt:TextField; private var pw:PauseWindow;// = null public var rtNowTxt:TextField; public var weaponNameTxt:TextField; public var targetNowTxt:TextField; public var targetNextTxt:TextField; public var waveTxt:TextField; public var brNowTxt:TextField; public var saleBut:美元符号基建; private var ba;// = null public var upgradeBut:升级按钮; public var but0:机枪; public var but1:重炮; public var onOffBut:SoundOnOffClip; public var but4:核辐射; public var but5:跟踪导弹; public var but6:激光; public var but7:小炮; public var rangeNowTxt:TextField; public var but9:炸弹; public var but3:霰弹; public var nextWaveBut:SENDNOW; public var but8:巨炮; public var but10:冷冻; public var but11:围墙; public var rtNextTxt:TextField; public var timeTxt:TextField; public var mpBut:MENUPAUSE; public var but2:重机枪; public var costTxt:TextField; public var scoreTxt:TextField; public function ControlPanel(){ buttons = new Object(); super(); } public function Destroy(){ var _local1:MyMovieClip; this.removeEventListener(MouseEvent.CLICK, clickHandle); if (upgradeBut != null){ upgradeBut.removeEventListener(MouseEvent.CLICK, UpgradeButHandle); }; if (nextWaveBut != null){ nextWaveBut.removeEventListener(MouseEvent.CLICK, nextWaveButHandle); }; if (onOffBut != null){ onOffBut.addEventListener(MouseEvent.CLICK, onOffButHandle); }; this.removeEventListener(Event.ENTER_FRAME, frameHandle); if (buttons != null){ for each (_local1 in buttons) { if (_local1 != null){ _local1.buttonMode = false; _local1.removeEventListener(MouseEvent.CLICK, clickHandle); }; }; }; GameInfo.Instance().StageObject.removeEventListener(KeyboardEvent.KEY_UP, keyUpHandle); } private function pwBackButHandle(_arg1:MouseEvent){ GameInfo.Instance().DestroyGame(); GameInfo.Instance().RootObject.createStartInterface(); } private function keyUpHandle(_arg1:KeyboardEvent){ if (_arg1.keyCode == 32){ if (ba != null){ ba.DestroyAll(); ba = null; }; }; } private function mpButHandle(_arg1:MouseEvent){ createPauseWindow(); GameInfo.Instance().Pause(); } private function pwReturnButHandle(_arg1:MouseEvent){ removePauseWindow(); GameInfo.Instance().CancelPause(); } private function clickHandle(_arg1:MouseEvent){ var _local3:MyMovieClip; SoundManager.PlaySound("点击声"); var _local2:Weapon = GameInfo.Instance().ChooseWeapon; if (_local2 != null){ GameInfo.Instance().ChooseWeapon.hideChooseSign(); GameInfo.Instance().ChooseWeapon = null; }; for each (_local3 in buttons) { _local3.gotoAndStop("default"); }; _arg1.currentTarget.gotoAndStop("choose"); switch (_arg1.currentTarget.name){ case "but0": if (ba != null){ ba.DestroyAll(); }; weaponNameTxt.text = "MachineGun Pillbox"; targetNowTxt.text = "Ground/Air"; damageNowTxt.text = "80"; rangeNowTxt.text = "80"; brNowTxt.text = "N/A"; rtNowTxt.text = "1.5"; targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; ba = new BuildingArea(); GameInfo.Instance().GS.addChild(ba); ba.Initialize(1, 80, 1, "ScattergunWeapon"); break; case "but1": if (ba != null){ ba.DestroyAll(); }; weaponNameTxt.text = "Laser Emitter"; targetNowTxt.text = "Air"; damageNowTxt.text = "120"; rangeNowTxt.text = "120"; brNowTxt.text = "N/A"; rtNowTxt.text = "1.5"; targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; ba = new BuildingArea(); GameInfo.Instance().GS.addChild(ba); ba.Initialize(1, 120, 1, "FlackWeapon"); break; case "but2": if (ba != null){ ba.DestroyAll(); }; weaponNameTxt.text = "Diffuse Gun"; targetNowTxt.text = "Ground/Air"; damageNowTxt.text = "50"; rangeNowTxt.text = "90"; brNowTxt.text = "N/A"; rtNowTxt.text = "3"; targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; ba = new BuildingArea(); GameInfo.Instance().GS.addChild(ba); ba.Initialize(1, 90, 1, "ShotgunWeapon"); break; case "but3": if (ba != null){ ba.DestroyAll(); }; weaponNameTxt.text = "Prism Cannon"; targetNowTxt.text = "Ground"; damageNowTxt.text = "110"; rangeNowTxt.text = "100"; brNowTxt.text = "N/A"; rtNowTxt.text = "4"; targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; ba = new BuildingArea(); GameInfo.Instance().GS.addChild(ba); ba.Initialize(1, 90, 1, "LightEdgeWeapon"); break; case "but4": if (ba != null){ ba.DestroyAll(); }; weaponNameTxt.text = "Shockwave"; targetNowTxt.text = "Ground/Air"; damageNowTxt.text = "100"; rangeNowTxt.text = "80"; brNowTxt.text = "N/A"; rtNowTxt.text = "5"; targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; ba = new BuildingArea(); GameInfo.Instance().GS.addChild(ba); ba.Initialize(1, 80, 1, "RadiateWeapon"); break; case "but5": if (ba != null){ ba.DestroyAll(); }; weaponNameTxt.text = "Missile Emitter"; targetNowTxt.text = "Ground"; damageNowTxt.text = "150"; rangeNowTxt.text = "100"; brNowTxt.text = "N/A"; rtNowTxt.text = "1.5"; targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; ba = new BuildingArea(); GameInfo.Instance().GS.addChild(ba); ba.Initialize(1, 100, 1, "FollowWeapon"); break; case "but6": if (ba != null){ ba.DestroyAll(); }; weaponNameTxt.text = "Retarder Cannon"; targetNowTxt.text = "Ground/Air"; damageNowTxt.text = "0"; rangeNowTxt.text = "90"; brNowTxt.text = "N/A"; rtNowTxt.text = "2.5"; targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; ba = new BuildingArea(); GameInfo.Instance().GS.addChild(ba); ba.Initialize(1, 90, 1, "TowWeapon"); break; case "but7": if (ba != null){ ba.DestroyAll(); }; weaponNameTxt.text = "Laser Cannon"; targetNowTxt.text = "Ground"; damageNowTxt.text = "100"; rangeNowTxt.text = "100"; brNowTxt.text = "N/A"; rtNowTxt.text = "1.5"; targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; ba = new BuildingArea(); GameInfo.Instance().GS.addChild(ba); ba.Initialize(1, 100, 1, "LaserWeapon"); break; case "but8": if (ba != null){ ba.DestroyAll(); }; weaponNameTxt.text = "Crack Cannon"; targetNowTxt.text = "Ground"; damageNowTxt.text = "300"; rangeNowTxt.text = "180"; brNowTxt.text = "N/A"; rtNowTxt.text = "3"; targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; ba = new BuildingArea(); GameInfo.Instance().GS.addChild(ba); ba.Initialize(4, 180, 2, "LightParticleWeapon"); break; case "but9": if (ba != null){ ba.DestroyAll(); }; weaponNameTxt.text = "Nuclear Bomb"; targetNowTxt.text = "Ground/Air"; damageNowTxt.text = "200"; rangeNowTxt.text = "100"; brNowTxt.text = "N/A"; rtNowTxt.text = "2.5"; targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; if (GameInfo.Instance().Money < GameInfo.Instance().WeaponPriceList.BombSupportID){ return; }; ba = new BombSupport(); break; case "but10": if (ba != null){ ba.DestroyAll(); }; weaponNameTxt.text = "Refrigerant Winding"; targetNowTxt.text = "Ground/Air"; damageNowTxt.text = "0"; rangeNowTxt.text = "100"; brNowTxt.text = "N/A"; rtNowTxt.text = "N/A"; targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; if (GameInfo.Instance().Money < GameInfo.Instance().WeaponPriceList.FrostSupportID){ return; }; ba = new FrostSupport(); break; case "but11": if (ba != null){ ba.DestroyAll(); }; weaponNameTxt.text = "Wall"; targetNowTxt.text = "N/A"; damageNowTxt.text = "N/A"; rangeNowTxt.text = "N/A"; brNowTxt.text = "N/A"; rtNowTxt.text = "N/A"; targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; ba = new BuildingArea(); GameInfo.Instance().GS.addChild(ba); ba.Initialize(1, 0, 1, "Wall"); break; case "saleBut": if (ba != null){ ba.DestroyAll(); }; ba = new SaleBuilding(); break; }; } public function Initialize(){ GameInfo.Instance().DestroyObjects.push(this); getButtons(); setState(); registerButtons(); UpdateMoneyAndScore(); upgradeBut.buttonMode = true; upgradeBut.addEventListener(MouseEvent.CLICK, UpgradeButHandle); onOffBut.buttonMode = true; if (GameInfo.Instance().SoundOnOff){ onOffBut.gotoAndStop(1); } else { onOffBut.gotoAndStop(2); }; onOffBut.addEventListener(MouseEvent.CLICK, onOffButHandle); nextWaveBut.addEventListener(MouseEvent.CLICK, nextWaveButHandle); mpBut.addEventListener(MouseEvent.CLICK, mpButHandle); this.addEventListener(Event.ENTER_FRAME, frameHandle); } private function pwRestButHandle(_arg1:MouseEvent){ var _local2:int = GameInfo.Instance().ChooseMap; var _local3:int = GameInfo.Instance().ChooseMode; GameInfo.Instance().DestroyGame(); GameInfo.Instance().ChooseMap = _local2; GameInfo.Instance().ChooseMode = _local3; GameInfo.Instance().RootObject.createGameInterface(); } private function getButtons(){ buttons["but0"] = (this.getChildByName("but0") as MyMovieClip); buttons["but1"] = (this.getChildByName("but1") as MyMovieClip); buttons["but2"] = (this.getChildByName("but2") as MyMovieClip); buttons["but3"] = (this.getChildByName("but3") as MyMovieClip); buttons["but4"] = (this.getChildByName("but4") as MyMovieClip); buttons["but5"] = (this.getChildByName("but5") as MyMovieClip); buttons["but6"] = (this.getChildByName("but6") as MyMovieClip); buttons["but7"] = (this.getChildByName("but7") as MyMovieClip); buttons["but8"] = (this.getChildByName("but8") as MyMovieClip); buttons["but9"] = (this.getChildByName("but9") as MyMovieClip); buttons["but10"] = (this.getChildByName("but10") as MyMovieClip); buttons["but11"] = (this.getChildByName("but11") as MyMovieClip); buttons["saleBut"] = (this.getChildByName("saleBut") as MyMovieClip); } private function nextWaveButHandle(_arg1:MouseEvent){ if (GameInfo.Instance().ET.NextWaveRemainTime < 10){ GameInfo.Instance().ET.Subtract(); }; } private function setState(){ var _local1:MyMovieClip; for each (_local1 in buttons) { _local1.gotoAndStop("default"); }; } private function onOffButHandle(_arg1:MouseEvent){ if (GameInfo.Instance().SoundOnOff){ SoundManager.StopBGSound(); onOffBut.gotoAndStop(2); GameInfo.Instance().SoundOnOff = !(GameInfo.Instance().SoundOnOff); } else { SoundManager.PlayBGSound(); onOffBut.gotoAndStop(1); GameInfo.Instance().SoundOnOff = !(GameInfo.Instance().SoundOnOff); }; } public function UpdateWeaponInfo(_arg1:Weapon){ weaponNameTxt.text = _arg1.WeaponName; var _local2:Object = _arg1.GetNowLevelInfo(); if (_local2 != null){ targetNowTxt.text = _local2.target; damageNowTxt.text = String(_local2.damage); rangeNowTxt.text = String(_local2.range); brNowTxt.text = String(_local2.br); rtNowTxt.text = String(_local2.rt); }; var _local3:Object = _arg1.GetNextLevelInfo(); if (_local3 == null){ targetNextTxt.text = "N/A"; damageNextTxt.text = "N/A"; rangeNextTxt.text = "N/A"; brNextTxt.text = "N/A"; rtNextTxt.text = "N/A"; costTxt.text = "N/A"; } else { targetNextTxt.text = _local3.target; damageNextTxt.text = String(_local3.damage); rangeNextTxt.text = String(_local3.range); brNextTxt.text = String(_local3.br); rtNextTxt.text = String(_local3.rt); costTxt.text = ("$ " + _local3.uc); }; } private function UpgradeButHandle(_arg1:MouseEvent){ var _local2:Weapon = GameInfo.Instance().ChooseWeapon; if (_local2 == null){ return; }; var _local3:Object = _local2.GetNextLevelInfo(); if (_local3 == null){ return; }; if (GameInfo.Instance().Money < _local3.uc){ return; }; _local2.Upgrade(); UpdateWeaponInfo(_local2); SoundManager.PlaySound("点击声"); } private function createPauseWindow(){ pw = new PauseWindow(); pw.x = ((this.parent.stage.stageWidth / 2) - (pw.width / 2)); pw.y = (((this.parent.stage.stageHeight / 2) - (pw.height / 2)) - 50); this.addChild(pw); pw.pwReturnBut.addEventListener(MouseEvent.CLICK, pwReturnButHandle); pw.pwRestBut.addEventListener(MouseEvent.CLICK, pwRestButHandle); pw.pwBackBut.addEventListener(MouseEvent.CLICK, pwBackButHandle); } public function UpdateMoneyAndScore(){ moneyTxt.text = ("$ " + GameInfo.Instance().Money); scoreTxt.text = String(GameInfo.Instance().Score); } private function frameHandle(_arg1:Event){ if (GameInfo.Instance().ET.NextWaveRemainTime >= 10){ nextWaveBut.enabled = false; } else { nextWaveBut.enabled = true; }; if (GameInfo.Instance().ET.NextWaveRemainTime > 20){ GameInfo.Instance().ET.Subtract(); trace("时间出现了递增!!"); }; timeTxt.text = GameInfo.Instance().ET.NextWaveRemainTimeString; } private function registerButtons(){ var _local1:MyMovieClip; for each (_local1 in buttons) { _local1.buttonMode = true; _local1.addEventListener(MouseEvent.CLICK, clickHandle); }; GameInfo.Instance().StageObject.addEventListener(KeyboardEvent.KEY_UP, keyUpHandle); EventCollect.Collect(GameInfo.Instance().StageObject, KeyboardEvent.KEY_UP, keyUpHandle); } private function removePauseWindow(){ pw.pwReturnBut.removeEventListener(MouseEvent.CLICK, pwReturnButHandle); pw.pwRestBut.removeEventListener(MouseEvent.CLICK, pwRestButHandle); pw.pwBackBut.removeEventListener(MouseEvent.CLICK, pwBackButHandle); if (pw.parent != null){ pw.parent.removeChild(pw); }; } public function UpdateWaveInfo(){ waveTxt.text = String(GameInfo.Instance().WaveCount); } public function DestroyAll(){ Destroy(); if (this.parent != null){ this.parent.removeChild(this); }; GameInfo.Instance().DestroyObjects.splice(GameInfo.Instance().DestroyObjects.indexOf(this), 1); GameInfo.Instance().PauseObjects.splice(GameInfo.Instance().PauseObjects.indexOf(this), 1); } } }//package Gamer.Defense
Section 85
//EventCollect (Gamer.Defense.EventCollect) package Gamer.Defense { import flash.events.*; public class EventCollect { private static var collects:Array = new Array(); private static var tempCollects:Array = new Array(); public static function ResumeDestroyAllEventDispatcher(){ var _local1:int = collects.length; var _local2:int; while (_local2 < _local1) { collects[_local2][0].addEventListener(collects[_local2][1], collects[_local2][2], collects[_local2][3]); _local2++; }; } public static function TempDestroyAllEventDispatcher(){ tempCollects = collects.slice(); DestroyAllEventDispatcher(); collects = tempCollects; } public static function DestroyAllEventDispatcher(){ var _local1:int = collects.length; var _local2:int; while (_local2 < _local1) { collects[_local2][0].removeEventListener(collects[_local2][1], collects[_local2][2], collects[_local2][3]); _local2++; }; collects = new Array(); } public static function Collect(_arg1:EventDispatcher, _arg2:String, _arg3:Function, _arg4:Boolean=false, _arg5:int=0, _arg6:Boolean=false){ var _local7:int = collects.length; var _local8:int; while (_local8 < _local7) { if (((((((((!((collects[_local8] == null))) && ((collects[_local8][0] == _arg1)))) && ((collects[_local8][1] == _arg2)))) && ((collects[_local8][2] == _arg3)))) && ((collects[_local8][3] == _arg4)))){ return; }; _local8++; }; collects.push([_arg1, _arg2, _arg3, _arg4, _arg5, _arg6]); } } }//package Gamer.Defense
Section 86
//GameInfo (Gamer.Defense.GameInfo) package Gamer.Defense { import flash.display.*; import Gamer.Defense.Enemy.*; import Gamer.Defense.Tool.*; import Gamer.Defense.Weapon.*; import flash.net.*; public class GameInfo extends MyEventDispatcher { public var GridWidth:Number;// = 30 public var ChooseMode:int;// = 1 public var PlayerInfos:Array; public var HQ:Headquarters;// = null public var Enemys:Array; public var UC:MyMovieClip;// = null private var score:Number;// = 0 public var MC:MyMovieClip;// = null public var EC:MyMovieClip;// = null public var Buildings:Array; public var AC:MyMovieClip;// = null public var BGC:MyMovieClip;// = null public var TrafficAreas:Array; public var WeaponPriceList:Object; public var ET:EnemyTactic;// = null public var ChooseWeapon:Weapon;// = null public var AirEnemys:Array; public var StageObject:Stage;// = null private var money:Number;// = 1000 public var BC:MyMovieClip;// = null public var ChooseMap:int;// = 1 private var boutCount:int;// = 0 public var FrameRate:Number;// = 24 public var SFC:MyMovieClip;// = null public var DestroyObjects:Array; public var PauseObjects:Array; public var RootObject:Main;// = null public var GM:GridsMatrix;// = null public var Sale:Boolean;// = false public var SoundOnOff:Boolean;// = true public var GS:MyMovieClip;// = null public var GroundEnemys:Array; public var CP:ControlPanel;// = null public var CPC:MyMovieClip;// = null public var WaveCount:int;// = 0 private static var instance:GameInfo = null; public function GameInfo(){ DestroyObjects = new Array(); PauseObjects = new Array(); TrafficAreas = new Array(); Buildings = new Array(); Enemys = new Array(); GroundEnemys = new Array(); AirEnemys = new Array(); PlayerInfos = new Array(); super(); } public function DestroyGameEvent(){ MyMovieClip.PauseAll(); EventCollect.DestroyAllEventDispatcher(); MyTimer.DestroyAllEventDispatcher(); MySprite.DestroyAllEventDispatcher(); MyMovieClip.DestroyAllEventDispatcher(); MyEventDispatcher.DestroyAllEventDispatcher(); MySimpleButton.DestroyAllEventDispatcher(); } public function get BoutCount():int{ return (Math.floor((WaveCount / 30))); } public function get Money():Number{ return (money); } public function Initialize(){ FrameRate = 24; GridWidth = 30; DestroyObjects = new Array(); PauseObjects = new Array(); TrafficAreas = new Array(); Buildings = new Array(); GM = null; Enemys = new Array(); GroundEnemys = new Array(); AirEnemys = new Array(); HQ = null; ChooseWeapon = null; CPC = null; UC = null; AC = null; MC = null; EC = null; BC = null; BGC = null; SFC = null; money = 1000; score = 0; Sale = false; CP = null; ET = null; WeaponPriceList = {LaserWeaponID:150, FollowWeaponID:250, WallID:10, LightParticleWeaponID:800, LightEdgeWeaponID:200, TowWeaponID:150, ScattergunWeaponID:100, RadiateWeaponID:300, ShotgunWeaponID:200, FlackWeaponID:150, BombSupportID:500, FrostSupportID:900}; WaveCount = 0; boutCount = 0; ChooseMap = 1; ChooseMode = 1; SoundOnOff = true; } public function DestroyGame(){ SoundManager.StopBGSound(); MyTimer.DestroyAll(); MySprite.DestroyAll(); MyMovieClip.DestroyAll(); MyEventDispatcher.DestroyAll(); MySimpleButton.DestroyAll(); EventCollect.DestroyAllEventDispatcher(); Tool.ClearDisplayList(RootObject); Initialize(); GC(); SoundManager.PlayBGSound(); } public function set Money(_arg1:Number){ money = _arg1; CP.UpdateMoneyAndScore(); } public function GC(){ try { new LocalConnection().connect("foo"); new LocalConnection().connect("foo"); } catch(e:Error) { }; } public function Pause(){ SoundManager.StopBGSound(); ExactTimer.Pause(); MyTimer.TempDestroyAllEventDispatcher(); MySprite.TempDestroyAllEventDispatcher(); MyMovieClip.PauseAll(); MyMovieClip.TempDestroyAllEventDispatcher(); MyEventDispatcher.TempDestroyAllEventDispatcher(); MySimpleButton.TempDestroyAllEventDispatcher(); EventCollect.TempDestroyAllEventDispatcher(); } public function set Score(_arg1:Number){ score = _arg1; CP.UpdateMoneyAndScore(); } public function get Score():Number{ return (score); } public function CancelPause(){ SoundManager.PlayBGSound(); ExactTimer.CancelPause(); MyTimer.ResumeDestroyAllEventDispatcher(); MySprite.ResumeDestroyAllEventDispatcher(); MyMovieClip.CancelPauseAll(); MyMovieClip.ResumeDestroyAllEventDispatcher(); MyEventDispatcher.ResumeDestroyAllEventDispatcher(); MySimpleButton.ResumeDestroyAllEventDispatcher(); EventCollect.ResumeDestroyAllEventDispatcher(); } public static function Instance():GameInfo{ if (instance == null){ instance = new (GameInfo); }; return (instance); } } }//package Gamer.Defense
Section 87
//GameScene (Gamer.Defense.GameScene) package Gamer.Defense { import flash.display.*; import flash.events.*; import Gamer.Defense.Enemy.*; import flash.geom.*; import Gamer.Defense.Weapon.*; import flash.utils.*; import flash.net.*; public class GameScene extends MyMovieClip { public var staticFraiseContainer:静态障碍物容器; private var uc:MyMovieClip;// = null private var gow:GameOverWindow;// = null private var cpc:MyMovieClip;// = null private var mc:MyMovieClip;// = null private var ec:MyMovieClip;// = null public var controlPanelContainer:操作面板容器; private var ac:MyMovieClip;// = null public var buildingContainer:建筑容器; private var et:EnemyTactic;// = null public var matrixContainer:矩阵容器; private var bc:MyMovieClip;// = null public var universeContainer:宇宙容器; private var gbLogo2:bustedsymbolcompletes; private var bgc:MyMovieClip;// = null public var airContainer:天空容器; public var enemyContainer:敌人容器; private var sfc:MyMovieClip;// = null public var backgroundContainer:背景容器; private function disposePlayerInfos(){ var _local1:Array = GameInfo.Instance().PlayerInfos; var _local2:Array = _local1.sortOn("score", Array.NUMERIC); _local2.reverse(); GameInfo.Instance().PlayerInfos = _local2; } private function notMoveAreasFactory():Array{ var _local1:int = GameInfo.Instance().ChooseMap; switch (_local1){ case 1: return ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 147, 146, 169, 83, 84, 106, 105, 104, 82, 168, 219, 218, 217, 239, 240, 241, 197, 196, 195, 174, 175, 153, 152, 151, 173, 210, 209, 231, 232, 181, 159, 137, 136, 158, 180, 182, 160, 138, 77, 76, 98, 120, 142, 143, 144, 122, 99, 121, 100, 78]); case 2: return ([0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 54, 75, 76, 157, 158, 159, 179, 180, 181, 201, 202, 203, 281, 259, 237, 236, 235, 0x0101, 258, 280, 279, 278, 0x0100, 277, 282, 260, 238, 214, 215]); case 3: return ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 92, 93, 114, 115, 96, 142, 143, 164, 165, 125, 126, 147, 148, 128, 129, 150, 151]); case 4: return ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 77, 78, 99, 100, 121, 122, 123, 145, 144, 143, 147, 148, 169, 170, 83, 84, 85, 105, 106, 107, 129, 130, 152, 151, 173, 174, 196, 195, 194, 172, 205, 206, 227, 228, 229, 249, 250, 251, 252, 253, 254, 232, 231, 230, 208, 209]); case 5: return ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 60, 61, 62, 82, 83, 84, 104, 105, 106, 98, 99, 100, 120, 121, 122, 142, 143, 144, 277, 278, 279, 280, 281, 282, 260, 259, 258, 0x0101, 0x0100, 0xFF, 234, 235, 236, 237, 238, 216, 215, 214, 261, 283]); case 6: return ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 54, 55, 75, 76, 77, 92, 93, 114, 115, 162, 81, 82, 103, 104, 146, 147, 168, 169, 145, 167]); }; return (null); } private function createGameOverWindow(){ var _local1:Stage = GameInfo.Instance().StageObject; gow.x = ((_local1.stageWidth / 2) - (gow.width / 2)); gow.y = ((_local1.stageHeight / 2) - (gow.height / 2)); this.addChild(gow); gow.scoreTxt.text = String(GameInfo.Instance().Score); gow.playerNameTxt.text = "Player"; gow.submitBut.addEventListener(MouseEvent.CLICK, submitButHandle); gow.hsBut.addEventListener(MouseEvent.CLICK, hsButHandle); gow.retryBut.addEventListener(MouseEvent.CLICK, retryButHandle); gow.btmBut.addEventListener(MouseEvent.CLICK, btmButHandle); gow.freeTower.addEventListener(MouseEvent.CLICK, moreGamesHandle); gow.moreGames.addEventListener(MouseEvent.CLICK, moreGamesHandle); } private function mapFactory():Sprite{ var _local1:int = GameInfo.Instance().ChooseMap; switch (_local1){ case 1: return (new BGImage1()); case 2: return (new BGImage2()); case 3: return (new BGImage3()); case 4: return (new BGImage4()); case 5: return (new BGImage5()); case 6: return (new BGImage6()); }; return (null); } private function notBuildAreasFactory():Array{ var _local1:int = GameInfo.Instance().ChooseMap; switch (_local1){ case 1: return ([221, 222, 244, 243, 43, 65, 87, 109, 131, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 147, 146, 169, 83, 84, 106, 105, 104, 82, 168, 219, 218, 217, 239, 240, 241, 197, 196, 195, 174, 175, 153, 152, 151, 173, 210, 209, 231, 232, 181, 159, 137, 136, 158, 180, 182, 160, 138, 77, 76, 98, 120, 142, 143, 144, 122, 99, 121, 100, 78]); case 2: return ([63, 64, 85, 86, 44, 66, 88, 110, 132, 269, 270, 271, 272, 273, 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 54, 75, 76, 157, 158, 159, 179, 180, 181, 201, 202, 203, 281, 259, 237, 236, 235, 0x0101, 258, 280, 279, 278, 0x0100, 277, 282, 260, 238, 214, 215]); case 3: return ([45, 46, 67, 68, 175, 197, 219, 241, 263, 285, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 92, 93, 114, 115, 96, 142, 143, 164, 165, 125, 126, 147, 148, 128, 129, 150, 151]); case 4: return ([44, 66, 88, 110, 132, 154, 261, 262, 283, 284, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 77, 78, 99, 100, 121, 122, 123, 145, 144, 143, 147, 148, 169, 170, 83, 84, 85, 105, 106, 107, 129, 130, 152, 151, 173, 174, 196, 195, 194, 172, 205, 206, 227, 228, 229, 249, 250, 251, 252, 253, 254, 232, 231, 230, 208, 209]); case 5: return ([151, 152, 173, 174, 44, 66, 88, 110, 132, 269, 270, 271, 272, 273, 274, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 60, 61, 62, 82, 83, 84, 104, 105, 106, 98, 99, 100, 120, 121, 122, 142, 143, 144, 277, 278, 279, 280, 281, 282, 260, 259, 258, 0x0101, 0x0100, 0xFF, 234, 235, 236, 237, 238, 216, 215, 214, 261, 283]); case 6: return ([120, 121, 142, 143, 44, 66, 88, 110, 132, 65, 87, 109, 131, 153, 265, 266, 267, 268, 269, 280, 281, 282, 283, 284, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 53, 54, 55, 75, 76, 77, 92, 93, 114, 115, 162, 81, 82, 103, 104, 146, 147, 168, 169, 145, 167]); }; return (null); } private function markStaticNotMove(){ var _local1:GridsMatrix = GameInfo.Instance().GM; var _local2:Array = notMoveAreasFactory(); var _local3:int; while (_local3 < _local2.length) { _local1.Grids[_local2[_local3]].IsMove = false; _local3++; }; } private function getFormatDateString():String{ var _local1:Date = new Date(); var _local2:String = ((_local1.date < 10)) ? ("0" + _local1.date) : String(_local1.date); var _local3:String = (((_local1.month + 1) < 10)) ? ("0" + (_local1.month + 1)) : String((_local1.month + 1)); var _local4:String = String(_local1.fullYear).substr(-2); return (((((_local2 + "-") + _local3) + "-") + _local4)); } public function Initialize(){ GameInfo.Instance().DestroyObjects.push(this); gbLogo2 = new bustedsymbolcompletes(); gbLogo2.name = "gbLogo2"; gbLogo2.buttonMode = true; cpc = (this.getChildByName("controlPanelContainer") as MyMovieClip); uc = (this.getChildByName("universeContainer") as MyMovieClip); ac = (this.getChildByName("airContainer") as MyMovieClip); bc = (this.getChildByName("buildingContainer") as MyMovieClip); ec = (this.getChildByName("enemyContainer") as MyMovieClip); sfc = (this.getChildByName("staticFraiseContainer") as MyMovieClip); bgc = (this.getChildByName("backgroundContainer") as MyMovieClip); mc = (this.getChildByName("matrixContainer") as MyMovieClip); gow = new GameOverWindow(); GameInfo.Instance().GS = this; GameInfo.Instance().BC = bc; GameInfo.Instance().CPC = cpc; GameInfo.Instance().UC = uc; GameInfo.Instance().AC = ac; GameInfo.Instance().EC = ec; GameInfo.Instance().MC = mc; GameInfo.Instance().BGC = bgc; GameInfo.Instance().SFC = sfc; createGridsMatrix(); markStaticNotMove(); markNotBuild(); createBackgroundImage(); createControlPanel(); createStaticFraise(); createHeadquarters(); GameInfo.Instance().TrafficAreas = trafficAreasFactory(); createAggression(); GameInfo.Instance().addEventListener("GameOver", gameOverHandle); if (GameInfo.Instance().ChooseMode == 2){ GameInfo.Instance().Money = (GameInfo.Instance().Money * 2); } else { if (GameInfo.Instance().ChooseMode == 4){ GameInfo.Instance().Money = 50000; }; }; gbLogo2.addEventListener(Event.ENTER_FRAME, enterFrameHandler2); } private function createBackgroundImage(){ var _local1:Sprite = mapFactory(); bgc.addChild(_local1); } private function moreGamesHandle(_arg1:MouseEvent){ navigateToURL(new URLRequest("http://www.gamesbusted.com"), "_blank"); } private function gameOverHandle(_arg1:Event){ GameInfo.Instance().DestroyGameEvent(); createGameOverWindow(); } private function enterFrameHandler2(_arg1:Event){ if (this.getChildByName("gbLogo2") == null){ this.addChild(gbLogo2); }; this.setChildIndex(gbLogo2, (this.numChildren - 1)); } private function hsButHandle(_arg1:MouseEvent){ GameInfo.Instance().DestroyGame(); GameInfo.Instance().RootObject.createScoreInterface(); } private function assaultHandle(_arg1:Event){ GameInfo.Instance().WaveCount = (GameInfo.Instance().WaveCount + 1); GameInfo.Instance().CP.UpdateWaveInfo(); } private function retryButHandle(_arg1:MouseEvent){ var _local2:int = GameInfo.Instance().ChooseMap; var _local3:int = GameInfo.Instance().ChooseMode; GameInfo.Instance().DestroyGame(); GameInfo.Instance().ChooseMap = _local2; GameInfo.Instance().ChooseMode = _local3; GameInfo.Instance().RootObject.createGameInterface(); } private function playNowHandle(_arg1:MouseEvent){ navigateToURL(new URLRequest("http://www.gamebusted.com"), "_blank"); } private function markNotBuild(){ var _local1:GridsMatrix = GameInfo.Instance().GM; var _local2:Array = notBuildAreasFactory(); var _local3:int; while (_local3 < _local2.length) { _local1.Grids[_local2[_local3]].IsBuild = false; _local3++; }; } private function createAggression(){ et = new EnemyTactic([20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000]); GameInfo.Instance().ET = et; et.Start(); et.addEventListener("Assault", assaultHandle); et.addEventListener("FinishBout", finishBoutHandle); } private function submitButHandle(_arg1:MouseEvent){ var _local2:Object = new Object(); _local2.id = gow.playerNameTxt.text; _local2.score = GameInfo.Instance().Score; _local2.date = getFormatDateString(); GameInfo.Instance().PlayerInfos.push(_local2); disposePlayerInfos(); GameInfo.Instance().DestroyGame(); GameInfo.Instance().RootObject.createScoreInterface(); } private function createControlPanel(){ var _local1:ControlPanel = new ControlPanel(); cpc.addChild(_local1); _local1.Initialize(); GameInfo.Instance().CP = _local1; } private function createHeadquarters(){ headquartersFactory(); } public function Destroy(){ if (et != null){ et.removeEventListener("Assault", assaultHandle); et.removeEventListener("FinishBout", finishBoutHandle); }; if (gow != null){ gow.submitBut.removeEventListener(MouseEvent.CLICK, submitButHandle); gow.hsBut.removeEventListener(MouseEvent.CLICK, hsButHandle); gow.retryBut.removeEventListener(MouseEvent.CLICK, retryButHandle); gow.btmBut.removeEventListener(MouseEvent.CLICK, btmButHandle); }; GameInfo.Instance().removeEventListener("GameOver", gameOverHandle); } private function trafficAreasFactory():Array{ var _local1:int = GameInfo.Instance().ChooseMap; switch (_local1){ case 1: return ([[2, 43, 65, 87, 109, 131]]); case 2: return ([[0, 44, 66, 88, 110, 132], [3, 269, 270, 271, 272, 273]]); case 3: return ([[2, 175, 197, 219, 241, 263, 285]]); case 4: return ([[0, 44, 66, 88, 110, 132, 154]]); case 5: return ([[0, 44, 66, 88, 110, 132], [3, 269, 270, 271, 272, 273, 274]]); case 6: return ([[0, 44, 66, 88, 110, 132], [2, 65, 87, 109, 131, 153], [3, 265, 266, 267, 268, 269], [3, 280, 281, 282, 283, 284]]); }; return (null); } private function fraiseFactory():Sprite{ var _local1:int = GameInfo.Instance().ChooseMap; switch (_local1){ case 1: return (new StaticFraise1()); case 2: return (new StaticFraise2()); case 3: return (new StaticFraise3()); case 4: return (new StaticFraise4()); case 5: return (new StaticFraise5()); case 6: return (new StaticFraise6()); }; return (null); } private function finishBoutHandle(_arg1:Event){ et.DestroyAll(); createAggression(); } private function headquartersFactory(){ var _local1:int = GameInfo.Instance().ChooseMap; var _local2:Headquarters = new Headquarters(); GameInfo.Instance().HQ = _local2; bc.addChild(_local2); var _local3:Number = 1500; if (GameInfo.Instance().ChooseMode == 5){ _local3 = 1; }; switch (_local1){ case 1: _local2.Initialize(_local3, 221); break; case 2: _local2.Initialize(_local3, 63); break; case 3: _local2.Initialize(_local3, 45); break; case 4: _local2.Initialize(_local3, 261); break; case 5: _local2.Initialize(_local3, 151); break; case 6: _local2.Initialize(_local3, 120); break; }; } private function btmButHandle(_arg1:MouseEvent){ GameInfo.Instance().DestroyGame(); gbLogo2.buttonMode = false; gbLogo2.removeEventListener(Event.ENTER_FRAME, enterFrameHandler2); GameInfo.Instance().RootObject.createStartInterface(); } private function createGridsMatrix(){ var _local1:GridsMatrix = new GridsMatrix(); GameInfo.Instance().GM = _local1; mc.addChild(_local1); _local1.Initialize(); } public function DestroyAll(){ Destroy(); if (this.parent != null){ this.parent.removeChild(this); }; } private function createStaticFraise(){ var _local1:Sprite = fraiseFactory(); sfc.addChild(_local1); } } }//package Gamer.Defense
Section 88
//Grid (Gamer.Defense.Grid) package Gamer.Defense { import flash.events.*; public class Grid extends MySprite { private var isMove:Boolean;// = true private var isBuild:Boolean;// = true private var index:int;// = -1 private function cc(_arg1:MouseEvent){ trace(this.Index); if (IsMove){ IsMove = false; } else { IsMove = true; }; } public function set Index(_arg1:int){ index = _arg1; } public function set IsBuild(_arg1:Boolean){ isBuild = _arg1; } public function get Index():int{ return (index); } public function get IsMove():Boolean{ return (isMove); } public function get IsBuild():Boolean{ return (isBuild); } public function set IsMove(_arg1:Boolean){ isMove = _arg1; if (isMove){ this.alpha = 1; } else { this.alpha = 0; }; } } }//package Gamer.Defense
Section 89
//GridsMatrix (Gamer.Defense.GridsMatrix) package Gamer.Defense { import flash.display.*; import flash.events.*; public class GridsMatrix extends MySprite { private var gridWidth:Number;// = 30 private var sum:int; private var grids:Array;// = null private var planarGrids:Array;// = null private var line:int;// = 22 private var row:int;// = 13 public function GridsMatrix(){ sum = (line * row); super(); } public function get PlanarGrids():Array{ return (planarGrids); } public function get Line():int{ return (line); } public function get Row():int{ return (row); } private function assignIndex(){ var _local1:int; while (_local1 < sum) { grids[_local1].Index = _local1; _local1++; }; } public function get GridWidth():Number{ return (gridWidth); } public function Initialize(){ grids = new Array(); planarGrids = new Array(); createGrids(); displayGrids(); createPlanarGrids(); format(); assignIndex(); setAlpha(); } private function createGrids(){ var _local1:int; while (_local1 < sum) { grids.push(new Grid()); _local1++; }; } private function displayGrids(){ var _local1:int; while (_local1 < sum) { this.addChild(grids[_local1]); _local1++; }; } private function createPlanarGrids(){ var _local1:Array = grids.slice(); var _local2:int; while (_local2 < row) { planarGrids.push(_local1.splice(0, line)); _local2++; }; } public function get Grids():Array{ return (grids); } private function format(){ var _local2:int; var _local1:int; while (_local1 < row) { _local2 = 0; while (_local2 < line) { planarGrids[_local1][_local2].x = (GridWidth * _local2); planarGrids[_local1][_local2].y = (GridWidth * _local1); _local2++; }; _local1++; }; } private function setAlpha(){ var _local1:int; while (_local1 < sum) { grids[_local1].alpha = 0.5; _local1++; }; } } }//package Gamer.Defense
Section 90
//Headquarters (Gamer.Defense.Headquarters) package Gamer.Defense { import flash.display.*; import flash.events.*; import Gamer.Defense.Enemy.*; import flash.geom.*; public class Headquarters extends Building { private var placeIndex:int;// = 0 private var guage:Sprite;// = null public var healthIndicator:HealthIndicator; private var health:Number;// = 0 private var healthUpper:Number;// = 0 public var hitTestArea:MovieClip; private var guageWidth:Number;// = 0 public function Headquarters(){ addFrameScript(0, frame1, 10, frame11); this.stop(); } private function frameHandle(_arg1:Event){ var _local2:Array = GameInfo.Instance().Enemys; var _local3:int; while (_local3 < _local2.length) { if (((((!((this.hitTestArea == null))) && (this.hitTestArea.hitTestObject(_local2[_local3].HitArea)))) && (!(_local2[_local3].IsBlast)))){ MakeDamage(_local2[_local3]); _local2[_local3].Blast(); }; _local3++; }; } private function setPlace(){ this.x = gm.Grids[placeIndex].x; this.y = gm.Grids[placeIndex].y; } private function updateHealthIndicator(){ var _local1:Number = ((Health / healthUpper) * guageWidth); if (_local1 <= 0){ guage.width = 0; return; }; guage.width = _local1; } function frame11(){ stop(); this.dispatchEvent(new Event("blastFinish")); } public function Destroy(){ this.removeEventListener(Event.ENTER_FRAME, frameHandle); this.removeEventListener("blastFinish", blastFinishHandle); if (this.parent != null){ this.parent.removeChild(this); }; } public function get CentrePlace():Point{ var _local1:Point = new Point(); _local1.x = (this.x + gm.GridWidth); _local1.y = (this.y + gm.GridWidth); return (_local1); } private function MakeDamage(_arg1:Enemy){ if (Health <= 0){ mar(); }; Health = (Health - _arg1.Health); } private function mar(){ this.gotoAndPlay(2); this.removeEventListener(Event.ENTER_FRAME, frameHandle); GameInfo.Instance().dispatchEvent(new Event("GameOver")); } function frame1(){ stop(); } public function Initialize(_arg1:Number, _arg2:int){ healthUpper = _arg1; placeIndex = _arg2; guage = this.healthIndicator.denote; guageWidth = guage.width; areaAmount = 4; areaLine = 2; areaIndex = new Array(placeIndex, (placeIndex + 1), (placeIndex + gm.Line), ((placeIndex + gm.Line) + 1)); Health = healthUpper; setPlace(); this.addEventListener(Event.ENTER_FRAME, frameHandle); this.addEventListener("blastFinish", blastFinishHandle); } private function blastFinishHandle(_arg1:Event){ Destroy(); } public function get Health():Number{ return (health); } public function set Health(_arg1:Number){ health = _arg1; updateHealthIndicator(); } } }//package Gamer.Defense
Section 91
//HealthIndicator (Gamer.Defense.HealthIndicator) package Gamer.Defense { import flash.display.*; public dynamic class HealthIndicator extends Sprite { public var denote:MovieClip; } }//package Gamer.Defense
Section 92
//Main (Gamer.Defense.Main) package Gamer.Defense { import flash.display.*; import flash.events.*; import Gamer.Defense.Bullet.*; import flash.geom.*; import flash.text.*; import flash.net.*; public class Main extends MyMovieClip { private var enterFrameObj:MovieClip; private var hi:HelpInterface;// = null private var si:StartInterface;// = null public var gbLogo:bustedsymbolcomplete; public var temploader; private var scoreInterface:ScoreInterface;// = null private var tf:TextFormat;// = null private var gbLogoPresent:Boolean;// = false private var mmsi:MapModeSelectInterface;// = null private var gs:GameScene;// = null public function Main(){ enterFrameObj = new MovieClip(); super(); addFrameScript(0, frame1, 9, frame10); } public function completeHandle(){ GameInfo.Instance().Initialize(); createStartInterface(); SoundManager.PlayBGSound(); } private function iniInterfaceInfo(){ if (tf == null){ tf = new TextFormat(); }; tf.bold = true; var _local1 = 1; while (_local1 <= 10) { scoreInterface[(("player" + _local1) + "NameTxt")].defaultTextFormat = tf; scoreInterface[(("player" + _local1) + "ScoreTxt")].defaultTextFormat = tf; scoreInterface[(("player" + _local1) + "DateTxt")].defaultTextFormat = tf; scoreInterface[(("player" + _local1) + "NameTxt")].text = ""; scoreInterface[(("player" + _local1) + "ScoreTxt")].text = ""; scoreInterface[(("player" + _local1) + "DateTxt")].text = ""; _local1++; }; } private function setInterfaceInfo(){ var _local1:Array = GameInfo.Instance().PlayerInfos.slice().splice(0, 10); var _local2:int = _local1.length; iniInterfaceInfo(); var _local3:int; while (_local3 < _local2) { scoreInterface[(("player" + (_local3 + 1)) + "NameTxt")].text = _local1[_local3].id; scoreInterface[(("player" + (_local3 + 1)) + "ScoreTxt")].text = String(_local1[_local3].score); scoreInterface[(("player" + (_local3 + 1)) + "DateTxt")].text = _local1[_local3].date; _local3++; }; } private function startButHandle(_arg1:MouseEvent){ destroyStartInterface(); gbLogo.buttonMode = false; gbLogo.removeEventListener(MouseEvent.CLICK, playNowHandle); enterFrameObj.removeEventListener(Event.ENTER_FRAME, enterFrameHandler); this.removeChild(gbLogo); gbLogoPresent = false; createGameInterface(); SoundManager.PlaySound("点击声"); } private function helpButHandle(_arg1:MouseEvent){ destroyStartInterface(); createHelpInterface(); SoundManager.PlaySound("点击声"); } private function mmButHandle(_arg1:MouseEvent){ destroyStartInterface(); createMapModeSelectInterface(); SoundManager.PlaySound("点击声"); } private function playNowHandle(_arg1:MouseEvent){ navigateToURL(new URLRequest("http://www.gamebusted.com"), "_blank"); } private function mmsiBtmButHandle(_arg1:MouseEvent){ destroyMapModeSelectInterface(); createStartInterface(); } private function destroyStartInterface(){ si.startBut.removeEventListener(MouseEvent.CLICK, startButHandle); si.scoreBut.removeEventListener(MouseEvent.CLICK, scoreButHandle); si.helpBut.removeEventListener(MouseEvent.CLICK, helpButHandle); si.playNow.removeEventListener(MouseEvent.CLICK, playNowHandle); si.playMore.removeEventListener(MouseEvent.CLICK, playNowHandle); if (si.parent != null){ si.parent.removeChild(si); }; } public function createGameInterface(){ gs = new GameScene(); this.addChild(gs); gs.Initialize(); } public function createStartInterface(){ GameInfo.Instance().StageObject = stage; GameInfo.Instance().RootObject = this; if (si == null){ si = new StartInterface(); }; this.addChild(si); si.startBut.addEventListener(MouseEvent.CLICK, startButHandle); si.mmBut.addEventListener(MouseEvent.CLICK, mmButHandle); si.scoreBut.addEventListener(MouseEvent.CLICK, scoreButHandle); si.helpBut.addEventListener(MouseEvent.CLICK, helpButHandle); si.playNow.addEventListener(MouseEvent.CLICK, playNowHandle); si.playMore.addEventListener(MouseEvent.CLICK, playNowHandle); if (gbLogoPresent == false){ gbLogo = new bustedsymbolcomplete(); trace("E"); gbLogo.buttonMode = true; gbLogo.name = "gbLogo"; gbLogo.addEventListener(MouseEvent.CLICK, playNowHandle); enterFrameObj.addEventListener(Event.ENTER_FRAME, enterFrameHandler); gbLogoPresent = true; }; } private function scoreButHandle(_arg1:MouseEvent){ destroyStartInterface(); createScoreInterface(); SoundManager.PlaySound("点击声"); } private function destroyMapModeSelectInterface(){ mmsi.mapSelectBox.DestroyAll(); mmsi.modeSelectBox.DestroyAll(); mmsi.startBut.removeEventListener(MouseEvent.CLICK, mmsiStartButHandle); mmsi.btmBut.removeEventListener(MouseEvent.CLICK, mmsiBtmButHandle); if (mmsi.parent != null){ mmsi.parent.removeChild(mmsi); }; } public function createMapModeSelectInterface(){ if (mmsi == null){ mmsi = new MapModeSelectInterface(); }; this.addChild(mmsi); mmsi.startBut.addEventListener(MouseEvent.CLICK, mmsiStartButHandle); mmsi.btmBut.addEventListener(MouseEvent.CLICK, mmsiBtmButHandle); mmsi.mapSelectBox.Initialize(); mmsi.modeSelectBox.Initialize(); } function frame10(){ completeHandle(); stop(); } private function createHelpInterface(){ if (hi == null){ hi = new HelpInterface(); }; this.addChild(hi); hi.closeBut.addEventListener(MouseEvent.CLICK, closeButHandle); } private function mmsiStartButHandle(_arg1:MouseEvent){ destroyMapModeSelectInterface(); createGameInterface(); } private function destroyHelpInterface(){ hi.closeBut.removeEventListener(MouseEvent.CLICK, closeButHandle); if (hi.parent != null){ hi.parent.removeChild(hi); }; } private function destroyScoreInterface(){ scoreInterface.closeBut.removeEventListener(MouseEvent.CLICK, scoreInterfaceCloseButHandle); if (scoreInterface.parent != null){ scoreInterface.parent.removeChild(scoreInterface); }; } public function createScoreInterface(){ if (scoreInterface == null){ scoreInterface = new ScoreInterface(); }; this.addChild(scoreInterface); setInterfaceInfo(); scoreInterface.closeBut.addEventListener(MouseEvent.CLICK, scoreInterfaceCloseButHandle); } public function enterFrameHandler(_arg1:Event){ if (this.getChildByName("gbLogo") == null){ this.addChild(gbLogo); }; this.setChildIndex(gbLogo, (this.numChildren - 1)); } private function scoreInterfaceCloseButHandle(_arg1:MouseEvent){ destroyScoreInterface(); createStartInterface(); } private function closeButHandle(_arg1:MouseEvent){ destroyHelpInterface(); createStartInterface(); } function frame1(){ stop(); temploader = new gbloader(); addChild(temploader); temploader.x = 323; temploader.y = 230; temploader.width = 1005; temploader.height = 645; } } }//package Gamer.Defense
Section 93
//MapSelectInterface (Gamer.Defense.MapSelectInterface) package Gamer.Defense { import flash.display.*; import flash.events.*; import Gamer.Defense.Tool.*; public class MapSelectInterface extends MyMovieClip { public var selectRight:MovieClip; private var sds:SlowdownSport;// = null public var selectLeft:MovieClip; private var speed:Number;// = 0.4 public var mapSelect:MovieClip; private var placeNote:int;// = 1 private function selectRightHandle(_arg1:MouseEvent){ if (placeNote >= 6){ return; }; if (sds.Note){ placeNote++; }; sds.start((mapSelect.x - 120), mapSelect.y); GameInfo.Instance().ChooseMap = placeNote; } private function selectLeftHandle(_arg1:MouseEvent){ if (placeNote <= 1){ return; }; if (sds.Note){ placeNote--; }; sds.start((mapSelect.x + 120), mapSelect.y); GameInfo.Instance().ChooseMap = placeNote; } public function DestroyAll(){ Destroy(); } public function Initialize(){ sds = new SlowdownSport(mapSelect, speed); GameInfo.Instance().ChooseMap = placeNote; selectLeft.buttonMode = true; selectRight.buttonMode = true; selectLeft.addEventListener(MouseEvent.CLICK, selectLeftHandle); selectRight.addEventListener(MouseEvent.CLICK, selectRightHandle); } public function Destroy(){ selectLeft.removeEventListener(MouseEvent.CLICK, selectLeftHandle); selectRight.removeEventListener(MouseEvent.CLICK, selectRightHandle); } } }//package Gamer.Defense
Section 94
//ModeSelectInterface (Gamer.Defense.ModeSelectInterface) package Gamer.Defense { import flash.display.*; import flash.events.*; import Gamer.Defense.Tool.*; public class ModeSelectInterface extends MyMovieClip { public var selectRight:MovieClip; private var sds:SlowdownSport;// = null public var selectLeft:MovieClip; private var speed:Number;// = 0.4 public var explain:MovieClip; private var placeNote:int;// = 1 public var modeSelect:MovieClip; private function selectRightHandle(_arg1:MouseEvent){ if (placeNote >= 5){ return; }; if (sds.Note){ placeNote++; explain.gotoAndStop(placeNote); }; sds.start((modeSelect.x - 120), modeSelect.y); GameInfo.Instance().ChooseMode = placeNote; } public function DestroyAll(){ Destroy(); } private function selectLeftHandle(_arg1:MouseEvent){ if (placeNote <= 1){ return; }; if (sds.Note){ placeNote--; explain.gotoAndStop(placeNote); }; sds.start((modeSelect.x + 120), modeSelect.y); GameInfo.Instance().ChooseMode = placeNote; } public function Initialize(){ explain.stop(); sds = new SlowdownSport(modeSelect, speed); GameInfo.Instance().ChooseMode = placeNote; selectLeft.buttonMode = true; selectRight.buttonMode = true; selectLeft.addEventListener(MouseEvent.CLICK, selectLeftHandle); selectRight.addEventListener(MouseEvent.CLICK, selectRightHandle); } public function Destroy(){ selectLeft.removeEventListener(MouseEvent.CLICK, selectLeftHandle); selectRight.removeEventListener(MouseEvent.CLICK, selectRightHandle); } } }//package Gamer.Defense
Section 95
//MyEventDispatcher (Gamer.Defense.MyEventDispatcher) package Gamer.Defense { import flash.events.*; public class MyEventDispatcher extends EventDispatcher { private static var tempCollect:Array = new Array(); private static var collect:Array = new Array(); override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ super.removeEventListener(_arg1, _arg2, _arg3); var _local4:int = collect.length; var _local5:int; while (_local5 < _local4) { if ((((((collect[_local5][1] == _arg1)) && ((collect[_local5][2] == _arg2)))) && ((collect[_local5][3] == _arg3)))){ collect.splice(collect.indexOf(collect[_local5]), 1); return; }; _local5++; }; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); var _local6:int = collect.length; var _local7:int; while (_local7 < _local6) { if (((((((!((collect[_local7] == null))) && ((collect[_local7][1] == _arg1)))) && ((collect[_local7][2] == _arg2)))) && ((collect[_local7][3] == _arg3)))){ return; }; _local7++; }; collect.push([this, _arg1, _arg2, _arg3]); } public static function DestroyAllEventDispatcher(){ var _local1:int = collect.length; while (collect.length != 0) { collect[0][0].removeEventListener(collect[0][1], collect[0][2], collect[0][3]); }; } public static function ResumeDestroyAllEventDispatcher(){ var _local1:int = tempCollect.length; var _local2:int; while (_local2 < _local1) { tempCollect[_local2][0].addEventListener(tempCollect[_local2][1], tempCollect[_local2][2], tempCollect[_local2][3]); _local2++; }; } public static function DestroyAll(){ DestroyAllEventDispatcher(); collect = new Array(); tempCollect = new Array(); } public static function TempDestroyAllEventDispatcher(){ tempCollect = collect.slice(); DestroyAllEventDispatcher(); } } }//package Gamer.Defense
Section 96
//MyMovieClip (Gamer.Defense.MyMovieClip) package Gamer.Defense { import flash.display.*; public class MyMovieClip extends MovieClip { private var foregoneState:Boolean;// = true private var nowState:Boolean;// = true private static var collect:Array = new Array(); private static var collectSelf:Array = new Array(); private static var tempCollect:Array = new Array(); public function MyMovieClip(){ collectSelf.push(this); } override public function nextScene():void{ super.nextScene(); nowState = false; } override public function prevFrame():void{ super.prevFrame(); nowState = false; } override public function stop():void{ super.stop(); nowState = false; } override public function gotoAndPlay(_arg1:Object, _arg2:String=null):void{ super.gotoAndPlay(_arg1, _arg2); nowState = true; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); var _local6:int = collect.length; var _local7:int; while (_local7 < _local6) { if (((((((((!((collect[_local7] == null))) && ((collect[_local7][0] == this)))) && ((collect[_local7][1] == _arg1)))) && ((collect[_local7][2] == _arg2)))) && ((collect[_local7][3] == _arg3)))){ return; }; _local7++; }; collect.push([this, _arg1, _arg2, _arg3]); } override public function gotoAndStop(_arg1:Object, _arg2:String=null):void{ super.gotoAndStop(_arg1, _arg2); nowState = false; } override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ super.removeEventListener(_arg1, _arg2, _arg3); var _local4:int = collect.length; var _local5:int; while (_local5 < _local4) { if ((((((collect[_local5][1] == _arg1)) && ((collect[_local5][2] == _arg2)))) && ((collect[_local5][3] == _arg3)))){ collect.splice(collect.indexOf(collect[_local5]), 1); return; }; _local5++; }; } public function Pause(){ foregoneState = nowState; stop(); } override public function prevScene():void{ super.prevScene(); nowState = false; } override public function nextFrame():void{ super.nextFrame(); nowState = false; } override public function play():void{ super.play(); nowState = true; } public function CancelPause(){ if (foregoneState){ play(); }; } public static function CancelPauseAll(){ var _local1:int = collectSelf.length; var _local2:int; while (_local2 < _local1) { collectSelf[_local2].CancelPause(); _local2++; }; } public static function TempDestroyAllEventDispatcher(){ tempCollect = collect.slice(); DestroyAllEventDispatcher(); } public static function DestroyAll(){ PauseAll(); collect = new Array(); tempCollect = new Array(); collectSelf = new Array(); } public static function PauseAll(){ var _local1:int = collectSelf.length; var _local2:int; while (_local2 < _local1) { collectSelf[_local2].Pause(); _local2++; }; } public static function ResumeDestroyAllEventDispatcher(){ var _local1:int = tempCollect.length; var _local2:int; while (_local2 < _local1) { tempCollect[_local2][0].addEventListener(tempCollect[_local2][1], tempCollect[_local2][2], tempCollect[_local2][3]); _local2++; }; } public static function DestroyAllEventDispatcher(){ var _local1:int = collect.length; while (collect.length != 0) { collect[0][0].removeEventListener(collect[0][1], collect[0][2], collect[0][3]); }; } } }//package Gamer.Defense
Section 97
//MySimpleButton (Gamer.Defense.MySimpleButton) package Gamer.Defense { import flash.display.*; public class MySimpleButton extends SimpleButton { private static var tempCollect:Array = new Array(); private static var collect:Array = new Array(); override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ super.removeEventListener(_arg1, _arg2, _arg3); var _local4:int = collect.length; var _local5:int; while (_local5 < _local4) { if ((((((collect[_local5][1] == _arg1)) && ((collect[_local5][2] == _arg2)))) && ((collect[_local5][3] == _arg3)))){ collect.splice(collect.indexOf(collect[_local5]), 1); return; }; _local5++; }; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); var _local6:int = collect.length; var _local7:int; while (_local7 < _local6) { if (((((((!((collect[_local7] == null))) && ((collect[_local7][1] == _arg1)))) && ((collect[_local7][2] == _arg2)))) && ((collect[_local7][3] == _arg3)))){ return; }; _local7++; }; collect.push([this, _arg1, _arg2, _arg3]); } public static function DestroyAllEventDispatcher(){ var _local1:int = collect.length; while (collect.length != 0) { collect[0][0].removeEventListener(collect[0][1], collect[0][2], collect[0][3]); }; } public static function ResumeDestroyAllEventDispatcher(){ var _local1:int = tempCollect.length; var _local2:int; while (_local2 < _local1) { tempCollect[_local2][0].addEventListener(tempCollect[_local2][1], tempCollect[_local2][2], tempCollect[_local2][3]); _local2++; }; } public static function DestroyAll(){ DestroyAllEventDispatcher(); collect = new Array(); tempCollect = new Array(); } public static function TempDestroyAllEventDispatcher(){ tempCollect = collect.slice(); DestroyAllEventDispatcher(); } } }//package Gamer.Defense
Section 98
//MySprite (Gamer.Defense.MySprite) package Gamer.Defense { import flash.display.*; import flash.text.*; public class MySprite extends Sprite { public var playerNameTxt:TextField; public var pwRestBut:SimpleButton; public var submitBut:SimpleButton; public var pwBackBut:SimpleButton; public var pwReturnBut:SimpleButton; public var btmBut:SimpleButton; public var hsBut:SimpleButton; public var retryBut:SimpleButton; public var moreGames:SimpleButton; public var freeTower:SimpleButton; public var scoreTxt:TextField; private static var tempCollect:Array = new Array(); private static var collect:Array = new Array(); override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ super.removeEventListener(_arg1, _arg2, _arg3); var _local4:int = collect.length; var _local5:int; while (_local5 < _local4) { if ((((((collect[_local5][1] == _arg1)) && ((collect[_local5][2] == _arg2)))) && ((collect[_local5][3] == _arg3)))){ collect.splice(collect.indexOf(collect[_local5]), 1); return; }; _local5++; }; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); var _local6:int = collect.length; var _local7:int; while (_local7 < _local6) { if (((((((!((collect[_local7] == null))) && ((collect[_local7][1] == _arg1)))) && ((collect[_local7][2] == _arg2)))) && ((collect[_local7][3] == _arg3)))){ return; }; _local7++; }; collect.push([this, _arg1, _arg2, _arg3]); } public static function DestroyAllEventDispatcher(){ var _local1:int = collect.length; while (collect.length != 0) { collect[0][0].removeEventListener(collect[0][1], collect[0][2], collect[0][3]); }; } public static function ResumeDestroyAllEventDispatcher(){ var _local1:int = tempCollect.length; var _local2:int; while (_local2 < _local1) { tempCollect[_local2][0].addEventListener(tempCollect[_local2][1], tempCollect[_local2][2], tempCollect[_local2][3]); _local2++; }; } public static function DestroyAll(){ DestroyAllEventDispatcher(); collect = new Array(); tempCollect = new Array(); } public static function TempDestroyAllEventDispatcher(){ tempCollect = collect.slice(); DestroyAllEventDispatcher(); } } }//package Gamer.Defense
Section 99
//MyTimer (Gamer.Defense.MyTimer) package Gamer.Defense { import flash.utils.*; public class MyTimer extends Timer { private static var tempCollect:Array = new Array(); private static var collect:Array = new Array(); public function MyTimer(_arg1:Number, _arg2:int=0){ super(_arg1, _arg2); } override public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ super.removeEventListener(_arg1, _arg2, _arg3); var _local4:int = collect.length; var _local5:int; while (_local5 < _local4) { if ((((((collect[_local5][1] == _arg1)) && ((collect[_local5][2] == _arg2)))) && ((collect[_local5][3] == _arg3)))){ collect.splice(collect.indexOf(collect[_local5]), 1); return; }; _local5++; }; } override public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ super.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); var _local6:int = collect.length; var _local7:int; while (_local7 < _local6) { if (((((((!((collect[_local7] == null))) && ((collect[_local7][1] == _arg1)))) && ((collect[_local7][2] == _arg2)))) && ((collect[_local7][3] == _arg3)))){ return; }; _local7++; }; collect.push([this, _arg1, _arg2, _arg3]); } public static function DestroyAllEventDispatcher(){ var _local1:int = collect.length; while (collect.length != 0) { collect[0][0].removeEventListener(collect[0][1], collect[0][2], collect[0][3]); }; } public static function ResumeDestroyAllEventDispatcher(){ var _local1:int = collect.length; var _local2:int; while (_local2 < _local1) { collect[_local2][0].start(); _local2++; }; } public static function DestroyAll(){ DestroyAllEventDispatcher(); collect = new Array(); tempCollect = new Array(); } public static function TempDestroyAllEventDispatcher(){ var _local1:int = collect.length; var _local2:int; while (_local2 < _local1) { collect[_local2][0].stop(); _local2++; }; } } }//package Gamer.Defense
Section 100
//SaleBuilding (Gamer.Defense.SaleBuilding) package Gamer.Defense { import flash.display.*; import flash.events.*; public class SaleBuilding { private var target:DisplayObjectContainer;// = null private var dollarSign:Dollar;// = null public function SaleBuilding(){ target = GameInfo.Instance().AC; dollarSign = new Dollar(); target.mouseEnabled = false; target.mouseChildren = false; target.addChild(dollarSign); drag(); GameInfo.Instance().Sale = true; } private function escDrag(){ dollarSign.removeEventListener(Event.ENTER_FRAME, dragHandle); } private function drag(){ dollarSign.addEventListener(Event.ENTER_FRAME, dragHandle); } public function DestroyAll(){ target.mouseEnabled = true; target.mouseChildren = true; GameInfo.Instance().Sale = false; Destroy(); if (dollarSign.parent != null){ dollarSign.parent.removeChild(dollarSign); }; } private function dragHandle(_arg1:Event){ dollarSign.x = target.mouseX; dollarSign.y = target.mouseY; } public function Destroy(){ dollarSign.removeEventListener(Event.ENTER_FRAME, dragHandle); } } }//package Gamer.Defense
Section 101
//SoundManager (Gamer.Defense.SoundManager) package Gamer.Defense { import flash.media.*; public class SoundManager { private static var bgsChannel:SoundChannel = null; public static function StopBGSound(){ bgsChannel.stop(); } public static function PlaySound(_arg1:String){ if (!GameInfo.Instance().SoundOnOff){ return; }; var _local2:Sound; switch (_arg1){ case "机枪声": _local2 = new ScattergunSound(); break; case "导弹声": _local2 = new MissileSound(); break; case "敌人爆炸声": _local2 = new EnemyBlastSound(); break; case "粒子炮声": _local2 = new ParticleSound(); break; case "激光声": _local2 = new LaserSound(); break; case "高射光声": _local2 = new FlackSound(); break; case "光棱声": _local2 = new LightEdgeSound(); break; case "霰弹声": _local2 = new ShotgunSound(); break; case "核弹爆炸声": _local2 = new AtomicWarheadSound(); break; case "冰冻声": _local2 = new FrostSound(); break; case "辐射声": _local2 = new RadiateSound(); break; case "铺墙声": _local2 = new WallSound(); break; case "点击声": _local2 = new ClickSound(); break; case "拖拽声": _local2 = new TowSound(); break; }; _local2.play(); } public static function PlayBGSound(){ var _local1:BGSound = new BGSound(); bgsChannel = _local1.play(0, 10000); } } }//package Gamer.Defense
Section 102
//AirEnemyF (AirEnemyF) package { import flash.events.*; import Gamer.Defense.Enemy.*; public dynamic class AirEnemyF extends AirEnemy { public function AirEnemyF(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); this.dispatchEvent(new Event("blastFinish")); } } }//package
Section 103
//AirEnemyG (AirEnemyG) package { import flash.events.*; import Gamer.Defense.Enemy.*; public dynamic class AirEnemyG extends AirEnemy { public function AirEnemyG(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); this.dispatchEvent(new Event("blastFinish")); } } }//package
Section 104
//Area (Area) package { import flash.display.*; public dynamic class Area extends MovieClip { public function Area(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 105
//AtomicWarheadSound (AtomicWarheadSound) package { import flash.media.*; public dynamic class AtomicWarheadSound extends Sound { } }//package
Section 106
//Aureole (Aureole) package { import Gamer.Defense.*; public dynamic class Aureole extends MyMovieClip { public function Aureole(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 107
//BackgroundImage (BackgroundImage) package { import flash.display.*; public dynamic class BackgroundImage extends Sprite { } }//package
Section 108
//Beam (Beam) package { import Gamer.Defense.*; public dynamic class Beam extends MyMovieClip { } }//package
Section 109
//BGImage1 (BGImage1) package { import flash.display.*; public dynamic class BGImage1 extends Sprite { } }//package
Section 110
//BGImage2 (BGImage2) package { import flash.display.*; public dynamic class BGImage2 extends Sprite { } }//package
Section 111
//BGImage3 (BGImage3) package { import flash.display.*; public dynamic class BGImage3 extends Sprite { } }//package
Section 112
//BGImage4 (BGImage4) package { import flash.display.*; public dynamic class BGImage4 extends Sprite { } }//package
Section 113
//BGImage5 (BGImage5) package { import flash.display.*; public dynamic class BGImage5 extends Sprite { } }//package
Section 114
//BGImage6 (BGImage6) package { import flash.display.*; public dynamic class BGImage6 extends Sprite { } }//package
Section 115
//BGSound (BGSound) package { import flash.media.*; public dynamic class BGSound extends Sound { } }//package
Section 116
//BombAimClip (BombAimClip) package { import Gamer.Defense.*; public dynamic class BombAimClip extends MySprite { } }//package
Section 117
//bustedsymbolcomplete (bustedsymbolcomplete) package { import flash.display.*; public dynamic class bustedsymbolcomplete extends MovieClip { } }//package
Section 118
//bustedsymbolcompletes (bustedsymbolcompletes) package { import flash.display.*; import flash.events.*; import flash.net.*; public dynamic class bustedsymbolcompletes extends MovieClip { public var dailygames:MovieClip; public function bustedsymbolcompletes(){ addFrameScript(0, frame1); } function frame1(){ dailygames.addEventListener(MouseEvent.CLICK, gotoURL2); } public function gotoURL2(_arg1:MouseEvent){ navigateToURL(new URLRequest("http://www.dailygames.com/"), "_blank"); } } }//package
Section 119
//CellRenderer_disabledSkin (CellRenderer_disabledSkin) package { import flash.display.*; public dynamic class CellRenderer_disabledSkin extends MovieClip { } }//package
Section 120
//CellRenderer_downSkin (CellRenderer_downSkin) package { import flash.display.*; public dynamic class CellRenderer_downSkin extends MovieClip { } }//package
Section 121
//CellRenderer_overSkin (CellRenderer_overSkin) package { import flash.display.*; public dynamic class CellRenderer_overSkin extends MovieClip { } }//package
Section 122
//CellRenderer_selectedDisabledSkin (CellRenderer_selectedDisabledSkin) package { import flash.display.*; public dynamic class CellRenderer_selectedDisabledSkin extends MovieClip { } }//package
Section 123
//CellRenderer_selectedDownSkin (CellRenderer_selectedDownSkin) package { import flash.display.*; public dynamic class CellRenderer_selectedDownSkin extends MovieClip { } }//package
Section 124
//CellRenderer_selectedOverSkin (CellRenderer_selectedOverSkin) package { import flash.display.*; public dynamic class CellRenderer_selectedOverSkin extends MovieClip { } }//package
Section 125
//CellRenderer_selectedUpSkin (CellRenderer_selectedUpSkin) package { import flash.display.*; public dynamic class CellRenderer_selectedUpSkin extends MovieClip { } }//package
Section 126
//CellRenderer_upSkin (CellRenderer_upSkin) package { import flash.display.*; public dynamic class CellRenderer_upSkin extends MovieClip { } }//package
Section 127
//ClickSound (ClickSound) package { import flash.media.*; public dynamic class ClickSound extends Sound { } }//package
Section 128
//ComboBox_disabledSkin (ComboBox_disabledSkin) package { import flash.display.*; public dynamic class ComboBox_disabledSkin extends MovieClip { } }//package
Section 129
//ComboBox_downSkin (ComboBox_downSkin) package { import flash.display.*; public dynamic class ComboBox_downSkin extends MovieClip { } }//package
Section 130
//ComboBox_overSkin (ComboBox_overSkin) package { import flash.display.*; public dynamic class ComboBox_overSkin extends MovieClip { } }//package
Section 131
//ComboBox_upSkin (ComboBox_upSkin) package { import flash.display.*; public dynamic class ComboBox_upSkin extends MovieClip { } }//package
Section 132
//Dollar (Dollar) package { import flash.display.*; public dynamic class Dollar extends MovieClip { } }//package
Section 133
//EnemyBlastSound (EnemyBlastSound) package { import flash.media.*; public dynamic class EnemyBlastSound extends Sound { } }//package
Section 134
//FlackBeam (FlackBeam) package { import flash.display.*; import flash.events.*; public dynamic class FlackBeam extends MovieClip { public function FlackBeam(){ addFrameScript(4, frame5); } function frame5(){ stop(); if (this.parent != null){ this.parent.removeChild(this); }; this.dispatchEvent(new Event("end")); } } }//package
Section 135
//FlackSound (FlackSound) package { import flash.media.*; public dynamic class FlackSound extends Sound { } }//package
Section 136
//focusRectSkin (focusRectSkin) package { import flash.display.*; public dynamic class focusRectSkin extends MovieClip { } }//package
Section 137
//FrostAimClip (FrostAimClip) package { import Gamer.Defense.*; public dynamic class FrostAimClip extends MySprite { } }//package
Section 138
//FrostSound (FrostSound) package { import flash.media.*; public dynamic class FrostSound extends Sound { } }//package
Section 139
//GameOverWindow (GameOverWindow) package { import Gamer.Defense.*; public dynamic class GameOverWindow extends MySprite { } }//package
Section 140
//GatherPowerSign (GatherPowerSign) package { import Gamer.Defense.*; public dynamic class GatherPowerSign extends MyMovieClip { } }//package
Section 141
//gbloader (gbloader) package { import flash.display.*; import flash.events.*; import flash.text.*; import flash.net.*; public dynamic class gbloader extends MovieClip { public var PercentLoaded; public var per_txt:TextField; public var play_btn:SimpleButton; public var bar:MovieClip; public var btn1:SimpleButton; public var btn2:SimpleButton; public function gbloader(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 74, frame75); } public function loadpgrss(_arg1:ProgressEvent){ PercentLoaded = Math.ceil(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100)); bar.width = (PercentLoaded * 1.93); per_txt.text = PercentLoaded; } function frame2(){ gotoAndPlay(1); } public function goooo(_arg1:MouseEvent){ play(); } public function loadermc(_arg1:Event){ gotoAndStop("loaded"); } function frame1(){ stop(); PercentLoaded = 0; root.loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadpgrss); root.loaderInfo.addEventListener(Event.COMPLETE, loadermc); btn2.addEventListener(MouseEvent.CLICK, gotoURL2); } public function gotoURL2(_arg1:MouseEvent){ navigateToURL(new URLRequest("http://www.gamebusted.com/"), "_blank"); } function frame75(){ MovieClip(root).gotoAndStop(10); } public function gotoURL(_arg1:MouseEvent){ navigateToURL(new URLRequest("http://www.gamebusted.com/"), "_blank"); } function frame3(){ play_btn.addEventListener(MouseEvent.CLICK, goooo); } function frame4(){ btn1.addEventListener(MouseEvent.CLICK, gotoURL); } } }//package
Section 142
//GroundEnemyA (GroundEnemyA) package { import flash.events.*; import Gamer.Defense.Enemy.*; public dynamic class GroundEnemyA extends GroundEnemy { public function GroundEnemyA(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); this.dispatchEvent(new Event("blastFinish")); } } }//package
Section 143
//GroundEnemyB (GroundEnemyB) package { import flash.events.*; import Gamer.Defense.Enemy.*; public dynamic class GroundEnemyB extends GroundEnemy { public function GroundEnemyB(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); this.dispatchEvent(new Event("blastFinish")); } } }//package
Section 144
//GroundEnemyC (GroundEnemyC) package { import flash.events.*; import Gamer.Defense.Enemy.*; public dynamic class GroundEnemyC extends GroundEnemy { public function GroundEnemyC(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); this.dispatchEvent(new Event("blastFinish")); } } }//package
Section 145
//GroundEnemyD (GroundEnemyD) package { import flash.events.*; import Gamer.Defense.Enemy.*; public dynamic class GroundEnemyD extends GroundEnemy { public function GroundEnemyD(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); this.dispatchEvent(new Event("blastFinish")); } } }//package
Section 146
//GroundEnemyE (GroundEnemyE) package { import flash.events.*; import Gamer.Defense.Enemy.*; public dynamic class GroundEnemyE extends GroundEnemy { public function GroundEnemyE(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); this.dispatchEvent(new Event("blastFinish")); } } }//package
Section 147
//GroundEnemyH (GroundEnemyH) package { import flash.events.*; import Gamer.Defense.Enemy.*; public dynamic class GroundEnemyH extends GroundEnemy { public function GroundEnemyH(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); this.dispatchEvent(new Event("blastFinish")); } } }//package
Section 148
//GroundEnemyI (GroundEnemyI) package { import flash.events.*; import Gamer.Defense.Enemy.*; public dynamic class GroundEnemyI extends GroundEnemy { public function GroundEnemyI(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); this.dispatchEvent(new Event("blastFinish")); } } }//package
Section 149
//GroundEnemyJ (GroundEnemyJ) package { import flash.events.*; import Gamer.Defense.Enemy.*; public dynamic class GroundEnemyJ extends GroundEnemy { public function GroundEnemyJ(){ addFrameScript(0, frame1, 10, frame11); } function frame1(){ stop(); } function frame11(){ stop(); this.dispatchEvent(new Event("blastFinish")); } } }//package
Section 150
//GunBlaze (GunBlaze) package { import flash.display.*; import flash.events.*; public dynamic class GunBlaze extends MovieClip { public function GunBlaze(){ addFrameScript(2, frame3); } function frame3(){ stop(); if (this.parent != null){ this.parent.removeChild(this); }; this.dispatchEvent(new Event("end")); } } }//package
Section 151
//HelpInterface (HelpInterface) package { import flash.display.*; public dynamic class HelpInterface extends MovieClip { public var closeBut:SimpleButton; } }//package
Section 152
//LaserSound (LaserSound) package { import flash.media.*; public dynamic class LaserSound extends Sound { } }//package
Section 153
//LightEdge (LightEdge) package { import flash.display.*; public dynamic class LightEdge extends Sprite { } }//package
Section 154
//LightEdgePatch1 (LightEdgePatch1) package { import flash.display.*; public dynamic class LightEdgePatch1 extends Sprite { } }//package
Section 155
//LightEdgePatch2 (LightEdgePatch2) package { import flash.display.*; public dynamic class LightEdgePatch2 extends Sprite { } }//package
Section 156
//LightEdgePatch3 (LightEdgePatch3) package { import flash.display.*; public dynamic class LightEdgePatch3 extends Sprite { } }//package
Section 157
//LightEdgePatch4 (LightEdgePatch4) package { import flash.display.*; public dynamic class LightEdgePatch4 extends Sprite { } }//package
Section 158
//LightEdgePatch5 (LightEdgePatch5) package { import flash.display.*; public dynamic class LightEdgePatch5 extends Sprite { } }//package
Section 159
//LightEdgeSound (LightEdgeSound) package { import flash.media.*; public dynamic class LightEdgeSound extends Sound { } }//package
Section 160
//List_skin (List_skin) package { import flash.display.*; public dynamic class List_skin extends MovieClip { } }//package
Section 161
//MapModeSelectInterface (MapModeSelectInterface) package { import flash.display.*; import Gamer.Defense.*; public dynamic class MapModeSelectInterface extends MovieClip { public var btmBut:SimpleButton; public var mapSelectBox:MapSelectInterface; public var modeSelectBox:ModeSelectInterface; public var startBut:SimpleButton; } }//package
Section 162
//MENUPAUSE (MENUPAUSE) package { import Gamer.Defense.*; public dynamic class MENUPAUSE extends MySimpleButton { } }//package
Section 163
//MissileSound (MissileSound) package { import flash.media.*; public dynamic class MissileSound extends Sound { } }//package
Section 164
//ParticleSound (ParticleSound) package { import flash.media.*; public dynamic class ParticleSound extends Sound { } }//package
Section 165
//Patch (Patch) package { import flash.display.*; public dynamic class Patch extends Sprite { } }//package
Section 166
//PauseWindow (PauseWindow) package { import Gamer.Defense.*; public dynamic class PauseWindow extends MySprite { } }//package
Section 167
//RadiateSound (RadiateSound) package { import flash.media.*; public dynamic class RadiateSound extends Sound { } }//package
Section 168
//RadiateWave (RadiateWave) package { import flash.display.*; import flash.events.*; public dynamic class RadiateWave extends MovieClip { public function RadiateWave(){ addFrameScript(6, frame7); } function frame7(){ stop(); if (this.parent != null){ this.parent.removeChild(this); }; this.dispatchEvent(new Event("end")); } } }//package
Section 169
//RadioButton_disabledIcon (RadioButton_disabledIcon) package { import flash.display.*; public dynamic class RadioButton_disabledIcon extends MovieClip { } }//package
Section 170
//RadioButton_downIcon (RadioButton_downIcon) package { import flash.display.*; public dynamic class RadioButton_downIcon extends MovieClip { } }//package
Section 171
//RadioButton_overIcon (RadioButton_overIcon) package { import flash.display.*; public dynamic class RadioButton_overIcon extends MovieClip { } }//package
Section 172
//RadioButton_selectedDisabledIcon (RadioButton_selectedDisabledIcon) package { import flash.display.*; public dynamic class RadioButton_selectedDisabledIcon extends MovieClip { } }//package
Section 173
//RadioButton_selectedDownIcon (RadioButton_selectedDownIcon) package { import flash.display.*; public dynamic class RadioButton_selectedDownIcon extends MovieClip { } }//package
Section 174
//RadioButton_selectedOverIcon (RadioButton_selectedOverIcon) package { import flash.display.*; public dynamic class RadioButton_selectedOverIcon extends MovieClip { } }//package
Section 175
//RadioButton_selectedUpIcon (RadioButton_selectedUpIcon) package { import flash.display.*; public dynamic class RadioButton_selectedUpIcon extends MovieClip { } }//package
Section 176
//RadioButton_upIcon (RadioButton_upIcon) package { import flash.display.*; public dynamic class RadioButton_upIcon extends MovieClip { } }//package
Section 177
//ScattergunSound (ScattergunSound) package { import flash.media.*; public dynamic class ScattergunSound extends Sound { } }//package
Section 178
//ScoreInterface (ScoreInterface) package { import fl.controls.*; import flash.display.*; import flash.events.*; import flash.geom.*; import fl.data.*; import flash.text.*; import flash.utils.*; import flash.media.*; import flash.ui.*; import flash.net.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.xml.*; public dynamic class ScoreInterface extends MovieClip { public var player10DateTxt:TextField; public var player10NameTxt:TextField; public var j1; public var j2; public var player7DateTxt:TextField; public var player1ScoreTxt:TextField; public var player2ScoreTxt:TextField; public var player3DateTxt:TextField; public var player4ScoreTxt:TextField; public var player5ScoreTxt:TextField; public var player3NameTxt:TextField; public var player7ScoreTxt:TextField; public var player7NameTxt:TextField; public var player3ScoreTxt:TextField; public var player6ScoreTxt:TextField; public var player9ScoreTxt:TextField; public var __id2_:ComboBox; public var player6DateTxt:TextField; public var collObj2:DataProvider; public var player6NameTxt:TextField; public var player2DateTxt:TextField; public var __id5_:RadioButton; public var player2NameTxt:TextField; public var player8ScoreTxt:TextField; public var collProp1:Object; public var collObj1:DataProvider; public var collProp2:Object; public var __id3_:ComboBox; public var player9DateTxt:TextField; public var player9NameTxt:TextField; public var player5DateTxt:TextField; public var player5NameTxt:TextField; public var player1DateTxt:TextField; public var itemObj1:SimpleCollectionItem; public var player1NameTxt:TextField; public var player10ScoreTxt:TextField; public var __id4_:RadioButton; public var closeBut:MovieClip; public var player8DateTxt:TextField; public var player8NameTxt:TextField; public var player4DateTxt:TextField; public var itemObj2:SimpleCollectionItem; public var player4NameTxt:TextField; public var i1:int; public var i2:int; public var collProps1:Array; public var collProps2:Array; public function ScoreInterface(){ __setProp___id2__(); __setProp___id3__(); __setProp___id4__(); __setProp___id5__(); } function __setProp___id4__(){ try { __id4_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id4_.enabled = true; __id4_.groupName = "RadioButtonGroup"; __id4_.label = "Today"; __id4_.labelPlacement = "right"; __id4_.selected = true; __id4_.value = ""; __id4_.visible = true; try { __id4_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id2__(){ try { __id2_["componentInspectorSetting"] = true; } catch(e:Error) { }; collObj1 = new DataProvider(); collProps1 = [{label:"disuse base", data:"map1"}, {label:"quietude jungle", data:"map2"}, {label:"fervent Gobi", data:"map3"}, {label:"broken encampment", data:"map4"}, {label:"jungle fortress", data:"map5"}, {label:"danger desert", data:"map6"}]; i1 = 0; while (i1 < collProps1.length) { itemObj1 = new SimpleCollectionItem(); collProp1 = collProps1[i1]; for (j1 in collProp1) { itemObj1[j1] = collProp1[j1]; }; collObj1.addItem(itemObj1); i1++; }; __id2_.dataProvider = collObj1; __id2_.editable = false; __id2_.enabled = true; __id2_.prompt = ""; __id2_.restrict = ""; __id2_.rowCount = 10; __id2_.visible = true; try { __id2_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id5__(){ try { __id5_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id5_.enabled = true; __id5_.groupName = "RadioButtonGroup"; __id5_.label = "All Time"; __id5_.labelPlacement = "right"; __id5_.selected = false; __id5_.value = ""; __id5_.visible = true; try { __id5_["componentInspectorSetting"] = false; } catch(e:Error) { }; } function __setProp___id3__(){ try { __id3_["componentInspectorSetting"] = true; } catch(e:Error) { }; collObj2 = new DataProvider(); collProps2 = [{label:"default", data:""}, {label:"2x cash 2x difficulty", data:""}, {label:"30 tower limite", data:""}, {label:"50K fixed", data:""}, {label:"challenge", data:""}]; i2 = 0; while (i2 < collProps2.length) { itemObj2 = new SimpleCollectionItem(); collProp2 = collProps2[i2]; for (j2 in collProp2) { itemObj2[j2] = collProp2[j2]; }; collObj2.addItem(itemObj2); i2++; }; __id3_.dataProvider = collObj2; __id3_.editable = false; __id3_.enabled = true; __id3_.prompt = ""; __id3_.restrict = ""; __id3_.rowCount = 5; __id3_.visible = true; try { __id3_["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package
Section 179
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_disabledSkin extends MovieClip { } }//package
Section 180
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_downSkin extends MovieClip { } }//package
Section 181
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_overSkin extends MovieClip { } }//package
Section 182
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_upSkin extends MovieClip { } }//package
Section 183
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_disabledSkin extends MovieClip { } }//package
Section 184
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_downSkin extends MovieClip { } }//package
Section 185
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_overSkin extends MovieClip { } }//package
Section 186
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_upSkin extends MovieClip { } }//package
Section 187
//ScrollBar_thumbIcon (ScrollBar_thumbIcon) package { import flash.display.*; public dynamic class ScrollBar_thumbIcon extends MovieClip { } }//package
Section 188
//ScrollThumb_downSkin (ScrollThumb_downSkin) package { import flash.display.*; public dynamic class ScrollThumb_downSkin extends MovieClip { } }//package
Section 189
//ScrollThumb_overSkin (ScrollThumb_overSkin) package { import flash.display.*; public dynamic class ScrollThumb_overSkin extends MovieClip { } }//package
Section 190
//ScrollThumb_upSkin (ScrollThumb_upSkin) package { import flash.display.*; public dynamic class ScrollThumb_upSkin extends MovieClip { } }//package
Section 191
//ScrollTrack_skin (ScrollTrack_skin) package { import flash.display.*; public dynamic class ScrollTrack_skin extends MovieClip { } }//package
Section 192
//SENDNOW (SENDNOW) package { import Gamer.Defense.*; public dynamic class SENDNOW extends MySimpleButton { } }//package
Section 193
//ShotgunPatch (ShotgunPatch) package { import flash.display.*; public dynamic class ShotgunPatch extends MovieClip { } }//package
Section 194
//ShotgunSound (ShotgunSound) package { import flash.media.*; public dynamic class ShotgunSound extends Sound { } }//package
Section 195
//SoundOnOffClip (SoundOnOffClip) package { import Gamer.Defense.*; public dynamic class SoundOnOffClip extends MyMovieClip { public function SoundOnOffClip(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 196
//StartInterface (StartInterface) package { import flash.display.*; public dynamic class StartInterface extends MovieClip { public var helpBut:SimpleButton; public var mmBut:SimpleButton; public var playMore:SimpleButton; public var scoreBut:SimpleButton; public var playNow:SimpleButton; public var startBut:SimpleButton; } }//package
Section 197
//StaticFraise (StaticFraise) package { import flash.display.*; public dynamic class StaticFraise extends Sprite { } }//package
Section 198
//StaticFraise1 (StaticFraise1) package { import flash.display.*; public dynamic class StaticFraise1 extends Sprite { } }//package
Section 199
//StaticFraise2 (StaticFraise2) package { import flash.display.*; public dynamic class StaticFraise2 extends Sprite { } }//package
Section 200
//StaticFraise3 (StaticFraise3) package { import flash.display.*; public dynamic class StaticFraise3 extends Sprite { } }//package
Section 201
//StaticFraise4 (StaticFraise4) package { import flash.display.*; public dynamic class StaticFraise4 extends Sprite { } }//package
Section 202
//StaticFraise5 (StaticFraise5) package { import flash.display.*; public dynamic class StaticFraise5 extends Sprite { } }//package
Section 203
//StaticFraise6 (StaticFraise6) package { import flash.display.*; public dynamic class StaticFraise6 extends Sprite { } }//package
Section 204
//TextInput_disabledSkin (TextInput_disabledSkin) package { import flash.display.*; public dynamic class TextInput_disabledSkin extends MovieClip { } }//package
Section 205
//TextInput_upSkin (TextInput_upSkin) package { import flash.display.*; public dynamic class TextInput_upSkin extends MovieClip { } }//package
Section 206
//TileList_skin (TileList_skin) package { import flash.display.*; public dynamic class TileList_skin extends MovieClip { } }//package
Section 207
//TowSound (TowSound) package { import flash.media.*; public dynamic class TowSound extends Sound { } }//package
Section 208
//WallSound (WallSound) package { import flash.media.*; public dynamic class WallSound extends Sound { } }//package
Section 209
//冷冻 (冷冻) package { import Gamer.Defense.*; public dynamic class 冷冻 extends MyMovieClip { public function 冷冻(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 210
//升级按钮 (升级按钮) package { import Gamer.Defense.*; public dynamic class 升级按钮 extends MyMovieClip { } }//package
Section 211
//围墙 (围墙) package { import Gamer.Defense.*; public dynamic class 围墙 extends MyMovieClip { public function 围墙(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 212
//天空容器 (天空容器) package { import Gamer.Defense.*; public dynamic class 天空容器 extends MyMovieClip { } }//package
Section 213
//宇宙容器 (宇宙容器) package { import Gamer.Defense.*; public dynamic class 宇宙容器 extends MyMovieClip { } }//package
Section 214
//小炮 (小炮) package { import Gamer.Defense.*; public dynamic class 小炮 extends MyMovieClip { public function 小炮(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 215
//巨炮 (巨炮) package { import Gamer.Defense.*; public dynamic class 巨炮 extends MyMovieClip { public function 巨炮(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 216
//建筑容器 (建筑容器) package { import Gamer.Defense.*; public dynamic class 建筑容器 extends MyMovieClip { } }//package
Section 217
//指挥部动画效果 (指挥部动画效果) package { import Gamer.Defense.*; public dynamic class 指挥部动画效果 extends MyMovieClip { } }//package
Section 218
//操作面板容器 (操作面板容器) package { import Gamer.Defense.*; public dynamic class 操作面板容器 extends MyMovieClip { } }//package
Section 219
//敌人容器 (敌人容器) package { import Gamer.Defense.*; public dynamic class 敌人容器 extends MyMovieClip { } }//package
Section 220
//机枪 (机枪) package { import Gamer.Defense.*; public dynamic class 机枪 extends MyMovieClip { public function 机枪(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 221
//核辐射 (核辐射) package { import Gamer.Defense.*; public dynamic class 核辐射 extends MyMovieClip { public function 核辐射(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 222
//武器等级标记 (武器等级标记) package { import Gamer.Defense.*; public dynamic class 武器等级标记 extends MyMovieClip { public function 武器等级标记(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 223
//激光 (激光) package { import Gamer.Defense.*; public dynamic class 激光 extends MyMovieClip { public function 激光(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 224
//炸弹 (炸弹) package { import Gamer.Defense.*; public dynamic class 炸弹 extends MyMovieClip { public function 炸弹(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 225
//矩阵容器 (矩阵容器) package { import Gamer.Defense.*; public dynamic class 矩阵容器 extends MyMovieClip { } }//package
Section 226
//美元符号基建 (美元符号基建) package { import Gamer.Defense.*; public dynamic class 美元符号基建 extends MyMovieClip { } }//package
Section 227
//背景容器 (背景容器) package { import Gamer.Defense.*; public dynamic class 背景容器 extends MyMovieClip { } }//package
Section 228
//虫子1 (虫子1) package { import Gamer.Defense.*; public dynamic class 虫子1 extends MyMovieClip { } }//package
Section 229
//虫子2 (虫子2) package { import Gamer.Defense.*; public dynamic class 虫子2 extends MyMovieClip { } }//package
Section 230
//虫子3 (虫子3) package { import Gamer.Defense.*; public dynamic class 虫子3 extends MyMovieClip { } }//package
Section 231
//虫子4 (虫子4) package { import Gamer.Defense.*; public dynamic class 虫子4 extends MyMovieClip { } }//package
Section 232
//跟踪导弹 (跟踪导弹) package { import Gamer.Defense.*; public dynamic class 跟踪导弹 extends MyMovieClip { public function 跟踪导弹(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 233
//重机枪 (重机枪) package { import Gamer.Defense.*; public dynamic class 重机枪 extends MyMovieClip { public function 重机枪(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 234
//重炮 (重炮) package { import Gamer.Defense.*; public dynamic class 重炮 extends MyMovieClip { public function 重炮(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 235
//霰弹 (霰弹) package { import Gamer.Defense.*; public dynamic class 霰弹 extends MyMovieClip { public function 霰弹(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 236
//静态障碍物容器 (静态障碍物容器) package { import Gamer.Defense.*; public dynamic class 静态障碍物容器 extends MyMovieClip { } }//package

Library Items

Symbol 1 GraphicUsed by:35
Symbol 2 GraphicUsed by:35
Symbol 3 GraphicUsed by:35
Symbol 4 GraphicUsed by:35 164
Symbol 5 GraphicUsed by:35 164
Symbol 6 GraphicUsed by:35 164
Symbol 7 GraphicUsed by:35 164
Symbol 8 GraphicUsed by:35
Symbol 9 GraphicUsed by:35 164
Symbol 10 GraphicUsed by:35 164
Symbol 11 GraphicUsed by:35
Symbol 12 GraphicUsed by:35 164
Symbol 13 GraphicUsed by:35 164
Symbol 14 GraphicUsed by:35 164
Symbol 15 GraphicUsed by:35
Symbol 16 GraphicUsed by:35 164
Symbol 17 GraphicUsed by:35
Symbol 18 GraphicUsed by:35
Symbol 19 GraphicUsed by:35
Symbol 20 GraphicUsed by:35
Symbol 21 GraphicUsed by:35
Symbol 22 GraphicUsed by:35
Symbol 23 GraphicUsed by:35
Symbol 24 GraphicUsed by:35
Symbol 25 GraphicUsed by:35
Symbol 26 GraphicUsed by:35 164
Symbol 27 GraphicUsed by:35
Symbol 28 GraphicUsed by:35
Symbol 29 GraphicUsed by:35
Symbol 30 GraphicUsed by:35
Symbol 31 GraphicUsed by:35
Symbol 32 GraphicUsed by:35
Symbol 33 GraphicUsed by:35 164
Symbol 34 GraphicUsed by:35 164
Symbol 35 MovieClipUses:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34Used by:36
Symbol 36 MovieClipUses:35Used by:82
Symbol 37 BitmapUsed by:38
Symbol 38 GraphicUses:37Used by:77 166
Symbol 39 BitmapUsed by:40
Symbol 40 GraphicUses:39Used by:77 166
Symbol 41 BitmapUsed by:42
Symbol 42 GraphicUses:41Used by:77 166
Symbol 43 BitmapUsed by:44
Symbol 44 GraphicUses:43Used by:77 166
Symbol 45 BitmapUsed by:46
Symbol 46 GraphicUses:45Used by:77 166
Symbol 47 BitmapUsed by:48
Symbol 48 GraphicUses:47Used by:77 166
Symbol 49 BitmapUsed by:50
Symbol 50 GraphicUses:49Used by:77 166
Symbol 51 BitmapUsed by:52
Symbol 52 GraphicUses:51Used by:77 166
Symbol 53 BitmapUsed by:54
Symbol 54 GraphicUses:53Used by:77 166
Symbol 55 BitmapUsed by:56
Symbol 56 GraphicUses:55Used by:77 166
Symbol 57 BitmapUsed by:58
Symbol 58 GraphicUses:57Used by:77 166
Symbol 59 BitmapUsed by:60
Symbol 60 GraphicUses:59Used by:77 166
Symbol 61 BitmapUsed by:62
Symbol 62 GraphicUses:61Used by:77 166
Symbol 63 BitmapUsed by:64
Symbol 64 GraphicUses:63Used by:77 166
Symbol 65 BitmapUsed by:66
Symbol 66 GraphicUses:65Used by:77 166
Symbol 67 BitmapUsed by:68
Symbol 68 GraphicUses:67Used by:77 166
Symbol 69 BitmapUsed by:70
Symbol 70 GraphicUses:69Used by:77 166
Symbol 71 BitmapUsed by:72
Symbol 72 GraphicUses:71Used by:77 166
Symbol 73 BitmapUsed by:74
Symbol 74 GraphicUses:73Used by:77 166
Symbol 75 BitmapUsed by:76
Symbol 76 GraphicUses:75Used by:77 166
Symbol 77 MovieClipUses:38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76Used by:82
Symbol 78 GraphicUsed by:79 167
Symbol 79 MovieClipUses:78Used by:82
Symbol 80 GraphicUsed by:81 168
Symbol 81 MovieClipUses:80Used by:82
Symbol 82 MovieClipUses:36 77 79 81Used by:119
Symbol 83 BitmapUsed by:84
Symbol 84 GraphicUses:83Used by:85
Symbol 85 MovieClipUses:84Used by:119
Symbol 86 GraphicUsed by:87
Symbol 87 ButtonUses:86Used by:119
Symbol 88 GraphicUsed by:119
Symbol 89 GraphicUsed by:90
Symbol 90 MovieClipUses:89Used by:119
Symbol 91 GraphicUsed by:94
Symbol 92 GraphicUsed by:94
Symbol 93 GraphicUsed by:94
Symbol 94 MovieClipUses:91 92 93Used by:119
Symbol 95 GraphicUsed by:119
Symbol 96 FontUsed by:97 98
Symbol 97 TextUses:96Used by:119
Symbol 98 EditableTextUses:96Used by:119
Symbol 99 FontUsed by:100 101
Symbol 100 TextUses:99Used by:119
Symbol 101 TextUses:99Used by:119
Symbol 102 GraphicUsed by:103 114
Symbol 103 MovieClipUses:102Used by:114
Symbol 104 FontUsed by:105 109 111
Symbol 105 TextUses:104Used by:114
Symbol 106 GraphicUsed by:107 114
Symbol 107 MovieClipUses:106Used by:114
Symbol 108 GraphicUsed by:114
Symbol 109 TextUses:104Used by:114
Symbol 110 GraphicUsed by:114
Symbol 111 TextUses:104Used by:114
Symbol 112 SoundUsed by:114
Symbol 113 SoundUsed by:114
Symbol 114 ButtonUses:103 105 107 108 109 110 111 102 106 112 113Used by:119
Symbol 115 GraphicUsed by:116
Symbol 116 ButtonUses:115Used by:119
Symbol 117 SoundUsed by:119
Symbol 118 SoundUsed by:119
Symbol 119 MovieClip {gbloader}Uses:82 85 87 88 90 94 95 97 98 100 101 114 116 117 118Used by:Timeline
Symbol 120 MovieClip {fl.controls.Button}
Symbol 121 Sound {FlackSound}
Symbol 122 Sound {ShotgunSound}
Symbol 123 Sound {WallSound}
Symbol 124 Sound {BGSound}
Symbol 125 Sound {LaserSound}
Symbol 126 Sound {MissileSound}
Symbol 127 Sound {AtomicWarheadSound}
Symbol 128 Sound {ScattergunSound}
Symbol 129 Sound {EnemyBlastSound}
Symbol 130 Sound {RadiateSound}
Symbol 131 Sound {ClickSound}
Symbol 132 Sound {TowSound}
Symbol 133 Sound {ParticleSound}
Symbol 134 Sound {FrostSound}
Symbol 135 Sound {LightEdgeSound}
Symbol 136 BitmapUsed by:137
Symbol 137 GraphicUses:136Used by:140
Symbol 138 GraphicUsed by:139
Symbol 139 ButtonUses:138Used by:140
Symbol 140 MovieClipUses:137 139Used by:141
Symbol 141 MovieClip {bustedsymbolcompletes}Uses:140
Symbol 142 GraphicUsed by:170
Symbol 143 GraphicUsed by:164
Symbol 144 GraphicUsed by:164
Symbol 145 GraphicUsed by:164
Symbol 146 GraphicUsed by:164
Symbol 147 GraphicUsed by:164
Symbol 148 GraphicUsed by:164
Symbol 149 GraphicUsed by:164
Symbol 150 GraphicUsed by:164
Symbol 151 GraphicUsed by:164
Symbol 152 GraphicUsed by:164
Symbol 153 GraphicUsed by:164
Symbol 154 GraphicUsed by:164
Symbol 155 GraphicUsed by:164
Symbol 156 GraphicUsed by:164
Symbol 157 GraphicUsed by:164
Symbol 158 GraphicUsed by:164
Symbol 159 GraphicUsed by:164
Symbol 160 GraphicUsed by:164
Symbol 161 GraphicUsed by:164
Symbol 162 GraphicUsed by:164
Symbol 163 GraphicUsed by:164
Symbol 164 MovieClipUses:143 144 145 4 5 6 7 146 9 10 147 12 13 14 148 16 149 150 151 152 153 154 155 156 157 26 158 159 160 161 162 163 33 34Used by:165
Symbol 165 MovieClipUses:164Used by:170
Symbol 166 MovieClipUses:38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76Used by:170
Symbol 167 MovieClipUses:78Used by:170
Symbol 168 MovieClipUses:80Used by:170
Symbol 169 GraphicUsed by:170
Symbol 170 MovieClip {bustedsymbolcomplete}Uses:142 165 166 167 168 169
Symbol 171 BitmapUsed by:172
Symbol 172 GraphicUses:171Used by:205
Symbol 173 BitmapUsed by:174
Symbol 174 GraphicUses:173Used by:205
Symbol 175 BitmapUsed by:176
Symbol 176 GraphicUses:175Used by:205
Symbol 177 BitmapUsed by:178
Symbol 178 GraphicUses:177Used by:205
Symbol 179 BitmapUsed by:180
Symbol 180 GraphicUses:179Used by:205
Symbol 181 BitmapUsed by:182
Symbol 182 GraphicUses:181Used by:205
Symbol 183 BitmapUsed by:184
Symbol 184 GraphicUses:183Used by:205
Symbol 185 BitmapUsed by:186
Symbol 186 GraphicUses:185Used by:205
Symbol 187 BitmapUsed by:188
Symbol 188 GraphicUses:187Used by:205
Symbol 189 BitmapUsed by:190
Symbol 190 GraphicUses:189Used by:205
Symbol 191 BitmapUsed by:192
Symbol 192 GraphicUses:191Used by:205
Symbol 193 BitmapUsed by:194
Symbol 194 GraphicUses:193Used by:205
Symbol 195 BitmapUsed by:196
Symbol 196 GraphicUses:195Used by:205
Symbol 197 BitmapUsed by:198
Symbol 198 GraphicUses:197Used by:205
Symbol 199 BitmapUsed by:200
Symbol 200 GraphicUses:199Used by:205
Symbol 201 BitmapUsed by:202
Symbol 202 GraphicUses:201Used by:205
Symbol 203 BitmapUsed by:204
Symbol 204 GraphicUses:203Used by:205
Symbol 205 MovieClip {虫子3}Uses:172 174 176 178 180 182 184 186 188 190 192 194 196 198 200 202 204
Symbol 206 BitmapUsed by:207
Symbol 207 GraphicUses:206Used by:236
Symbol 208 BitmapUsed by:209
Symbol 209 GraphicUses:208Used by:236
Symbol 210 BitmapUsed by:211
Symbol 211 GraphicUses:210Used by:236
Symbol 212 BitmapUsed by:213
Symbol 213 GraphicUses:212Used by:236
Symbol 214 BitmapUsed by:215
Symbol 215 GraphicUses:214Used by:236
Symbol 216 BitmapUsed by:217
Symbol 217 GraphicUses:216Used by:236
Symbol 218 BitmapUsed by:219
Symbol 219 GraphicUses:218Used by:236
Symbol 220 BitmapUsed by:221
Symbol 221 GraphicUses:220Used by:236
Symbol 222 BitmapUsed by:223
Symbol 223 GraphicUses:222Used by:236
Symbol 224 BitmapUsed by:225
Symbol 225 GraphicUses:224Used by:236
Symbol 226 BitmapUsed by:227
Symbol 227 GraphicUses:226Used by:236
Symbol 228 BitmapUsed by:229
Symbol 229 GraphicUses:228Used by:236
Symbol 230 BitmapUsed by:231
Symbol 231 GraphicUses:230Used by:236
Symbol 232 BitmapUsed by:233
Symbol 233 GraphicUses:232Used by:236
Symbol 234 BitmapUsed by:235
Symbol 235 GraphicUses:234Used by:236
Symbol 236 MovieClip {虫子2}Uses:207 209 211 213 215 217 219 221 223 225 227 229 231 233 235
Symbol 237 BitmapUsed by:238
Symbol 238 GraphicUses:237Used by:267
Symbol 239 BitmapUsed by:240
Symbol 240 GraphicUses:239Used by:267
Symbol 241 BitmapUsed by:242
Symbol 242 GraphicUses:241Used by:267
Symbol 243 BitmapUsed by:244
Symbol 244 GraphicUses:243Used by:267
Symbol 245 BitmapUsed by:246
Symbol 246 GraphicUses:245Used by:267
Symbol 247 BitmapUsed by:248
Symbol 248 GraphicUses:247Used by:267
Symbol 249 BitmapUsed by:250
Symbol 250 GraphicUses:249Used by:267
Symbol 251 BitmapUsed by:252
Symbol 252 GraphicUses:251Used by:267
Symbol 253 BitmapUsed by:254
Symbol 254 GraphicUses:253Used by:267
Symbol 255 BitmapUsed by:256
Symbol 256 GraphicUses:255Used by:267
Symbol 257 BitmapUsed by:258
Symbol 258 GraphicUses:257Used by:267
Symbol 259 BitmapUsed by:260
Symbol 260 GraphicUses:259Used by:267
Symbol 261 BitmapUsed by:262
Symbol 262 GraphicUses:261Used by:267
Symbol 263 BitmapUsed by:264
Symbol 264 GraphicUses:263Used by:267
Symbol 265 BitmapUsed by:266
Symbol 266 GraphicUses:265Used by:267
Symbol 267 MovieClip {虫子1}Uses:238 240 242 244 246 248 250 252 254 256 258 260 262 264 266
Symbol 268 BitmapUsed by:269
Symbol 269 GraphicUses:268Used by:300
Symbol 270 BitmapUsed by:271
Symbol 271 GraphicUses:270Used by:300
Symbol 272 BitmapUsed by:273
Symbol 273 GraphicUses:272Used by:300
Symbol 274 BitmapUsed by:275
Symbol 275 GraphicUses:274Used by:300
Symbol 276 BitmapUsed by:277
Symbol 277 GraphicUses:276Used by:300
Symbol 278 BitmapUsed by:279
Symbol 279 GraphicUses:278Used by:300
Symbol 280 BitmapUsed by:281
Symbol 281 GraphicUses:280Used by:300
Symbol 282 BitmapUsed by:283
Symbol 283 GraphicUses:282Used by:300
Symbol 284 BitmapUsed by:285
Symbol 285 GraphicUses:284Used by:300
Symbol 286 BitmapUsed by:287
Symbol 287 GraphicUses:286Used by:300
Symbol 288 BitmapUsed by:289
Symbol 289 GraphicUses:288Used by:300
Symbol 290 BitmapUsed by:291
Symbol 291 GraphicUses:290Used by:300
Symbol 292 BitmapUsed by:293
Symbol 293 GraphicUses:292Used by:300
Symbol 294 BitmapUsed by:295
Symbol 295 GraphicUses:294Used by:300
Symbol 296 BitmapUsed by:297
Symbol 297 GraphicUses:296Used by:300
Symbol 298 BitmapUsed by:299
Symbol 299 GraphicUses:298Used by:300
Symbol 300 MovieClip {虫子4}Uses:269 271 273 275 277 279 281 283 285 287 289 291 293 295 297 299
Symbol 301 GraphicUsed by:302
Symbol 302 MovieClipUses:301Used by:354 721 724 729 738
Symbol 303 MovieClip {fl.core.ComponentShim}Used by:334 351 354 721 724 729 738
Symbol 304 GraphicUsed by:305
Symbol 305 MovieClip {ScrollTrack_skin}Uses:304Used by:334
Symbol 306 GraphicUsed by:307
Symbol 307 MovieClip {focusRectSkin}Uses:306Used by:334 354 721 724 729 738
Symbol 308 GraphicUsed by:311
Symbol 309 GraphicUsed by:310 313 317 327
Symbol 310 MovieClipUses:309Used by:311 321 323
Symbol 311 MovieClip {ScrollArrowUp_downSkin}Uses:308 310Used by:334
Symbol 312 GraphicUsed by:313
Symbol 313 MovieClip {ScrollArrowDown_downSkin}Uses:312 309Used by:334
Symbol 314 GraphicUsed by:315
Symbol 315 MovieClip {ScrollThumb_downSkin}Uses:314Used by:334
Symbol 316 GraphicUsed by:317
Symbol 317 MovieClip {ScrollArrowDown_overSkin}Uses:316 309Used by:334
Symbol 318 GraphicUsed by:319
Symbol 319 MovieClip {ScrollThumb_overSkin}Uses:318Used by:334
Symbol 320 GraphicUsed by:321
Symbol 321 MovieClip {ScrollArrowUp_overSkin}Uses:320 310Used by:334
Symbol 322 GraphicUsed by:323
Symbol 323 MovieClip {ScrollArrowUp_upSkin}Uses:322 310Used by:334
Symbol 324 GraphicUsed by:325
Symbol 325 MovieClip {ScrollThumb_upSkin}Uses:324Used by:334
Symbol 326 GraphicUsed by:327
Symbol 327 MovieClip {ScrollArrowDown_upSkin}Uses:326 309Used by:334
Symbol 328 GraphicUsed by:329
Symbol 329 MovieClip {ScrollArrowDown_disabledSkin}Uses:328Used by:334
Symbol 330 GraphicUsed by:331
Symbol 331 MovieClip {ScrollArrowUp_disabledSkin}Uses:330Used by:334
Symbol 332 GraphicUsed by:333
Symbol 333 MovieClip {ScrollBar_thumbIcon}Uses:332Used by:334
Symbol 334 MovieClip {fl.controls.ScrollBar}Uses:305 303 307 311 313 315 317 319 321 323 325 327 329 331 333Used by:354 724
Symbol 335 GraphicUsed by:336
Symbol 336 MovieClip {CellRenderer_upSkin}Uses:335Used by:351
Symbol 337 GraphicUsed by:338
Symbol 338 MovieClip {CellRenderer_disabledSkin}Uses:337Used by:351
Symbol 339 GraphicUsed by:340
Symbol 340 MovieClip {CellRenderer_downSkin}Uses:339Used by:351
Symbol 341 GraphicUsed by:342
Symbol 342 MovieClip {CellRenderer_overSkin}Uses:341Used by:351
Symbol 343 GraphicUsed by:344
Symbol 344 MovieClip {CellRenderer_selectedDisabledSkin}Uses:343Used by:351
Symbol 345 GraphicUsed by:346
Symbol 346 MovieClip {CellRenderer_selectedDownSkin}Uses:345Used by:351
Symbol 347 GraphicUsed by:348
Symbol 348 MovieClip {CellRenderer_selectedOverSkin}Uses:347Used by:351
Symbol 349 GraphicUsed by:350
Symbol 350 MovieClip {CellRenderer_selectedUpSkin}Uses:349Used by:351
Symbol 351 MovieClip {fl.controls.listClasses.CellRenderer}Uses:336 303 338 340 342 344 346 348 350Used by:354 724
Symbol 352 GraphicUsed by:353
Symbol 353 MovieClip {TileList_skin}Uses:352Used by:354
Symbol 354 MovieClip {fl.controls.TileList}Uses:302 303 334 351 307 353
Symbol 355 GraphicUsed by:356
Symbol 356 MovieClip {美元符号基建}Uses:355Used by:357 588
Symbol 357 MovieClip {Dollar}Uses:356
Symbol 358 GraphicUsed by:359
Symbol 359 MovieClip {GunBlaze}Uses:358
Symbol 360 GraphicUsed by:363
Symbol 361 GraphicUsed by:363
Symbol 362 GraphicUsed by:363
Symbol 363 MovieClip {武器等级标记}Uses:360 361 362Used by:371 390 393 397 409 430 444 447 627
Symbol 364 GraphicUsed by:366
Symbol 365 MovieClipUsed by:366 389 392 408 429 443 446 626
Symbol 366 MovieClipUses:364 365Used by:371
Symbol 367 GraphicUsed by:368
Symbol 368 MovieClipUses:367Used by:371 390 393 397 409 430 444 447 627
Symbol 369 GraphicUsed by:370
Symbol 370 MovieClipUses:369Used by:371 390 393 397 409 430 444 447 627
Symbol 371 MovieClip {Gamer.Defense.Weapon.ShotgunWeapon}Uses:363 366 368 370
Symbol 372 GraphicUsed by:373
Symbol 373 MovieClipUses:372Used by:376
Symbol 374 GraphicUsed by:375
Symbol 375 MovieClipUses:374Used by:376
Symbol 376 MovieClip {FrostAimClip}Uses:373 375
Symbol 377 GraphicUsed by:378
Symbol 378 MovieClipUses:377Used by:384
Symbol 379 GraphicUsed by:380
Symbol 380 MovieClipUses:379Used by:384
Symbol 381 GraphicUsed by:382
Symbol 382 MovieClipUses:381Used by:384
Symbol 383 GraphicUsed by:384
Symbol 384 MovieClip {BombAimClip}Uses:378 380 382 383
Symbol 385 GraphicUsed by:386 899
Symbol 386 MovieClipUses:385Used by:387
Symbol 387 MovieClip {FlackBeam}Uses:386
Symbol 388 GraphicUsed by:389
Symbol 389 MovieClipUses:388 365Used by:390
Symbol 390 MovieClip {Gamer.Defense.Weapon.LaserWeapon}Uses:389 363 368 370
Symbol 391 GraphicUsed by:392
Symbol 392 MovieClipUses:391 365Used by:393
Symbol 393 MovieClip {Gamer.Defense.Weapon.ScattergunWeapon}Uses:392 363 368 370
Symbol 394 GraphicUsed by:395
Symbol 395 MovieClipUses:394Used by:397
Symbol 396 MovieClipUsed by:397
Symbol 397 MovieClip {Gamer.Defense.Weapon.RadiateWeapon}Uses:395 396 363 368 370
Symbol 398 GraphicUsed by:399
Symbol 399 MovieClipUses:398Used by:400
Symbol 400 MovieClip {RadiateWave}Uses:399
Symbol 401 GraphicUsed by:406
Symbol 402 GraphicUsed by:406
Symbol 403 GraphicUsed by:406
Symbol 404 GraphicUsed by:406
Symbol 405 GraphicUsed by:406
Symbol 406 MovieClip {GatherPowerSign}Uses:401 402 403 404 405
Symbol 407 GraphicUsed by:408
Symbol 408 MovieClipUses:407 365Used by:409
Symbol 409 MovieClip {Gamer.Defense.Weapon.TowWeapon}Uses:408 363 368 370
Symbol 410 GraphicUsed by:411
Symbol 411 MovieClipUses:410Used by:412
Symbol 412 MovieClip {Beam}Uses:411
Symbol 413 GraphicUsed by:414 419 421 426 857
Symbol 414 MovieClipUses:413Used by:415
Symbol 415 MovieClip {LightEdgePatch5}Uses:414
Symbol 416 GraphicUsed by:417
Symbol 417 MovieClipUses:416Used by:418
Symbol 418 MovieClip {LightEdgePatch4}Uses:417
Symbol 419 MovieClipUses:413Used by:420
Symbol 420 MovieClip {LightEdgePatch3}Uses:419
Symbol 421 MovieClipUses:413Used by:422
Symbol 422 MovieClip {LightEdgePatch2}Uses:421
Symbol 423 GraphicUsed by:424
Symbol 424 MovieClipUses:423Used by:425
Symbol 425 MovieClip {LightEdgePatch1}Uses:424
Symbol 426 MovieClipUses:413Used by:427
Symbol 427 MovieClip {LightEdge}Uses:426
Symbol 428 GraphicUsed by:429
Symbol 429 MovieClipUses:428 365Used by:430
Symbol 430 MovieClip {Gamer.Defense.Weapon.LightEdgeWeapon}Uses:429 363 368 370
Symbol 431 GraphicUsed by:432
Symbol 432 MovieClipUses:431Used by:433
Symbol 433 MovieClip {Gamer.Defense.Bullet.LaserBullet}Uses:432
Symbol 434 GraphicUsed by:436
Symbol 435 GraphicUsed by:436
Symbol 436 MovieClip {Area}Uses:434 435
Symbol 437 GraphicUsed by:438
Symbol 438 MovieClip {Gamer.Defense.Grid}Uses:437
Symbol 439 GraphicUsed by:441
Symbol 440 GraphicUsed by:441
Symbol 441 MovieClip {Aureole}Uses:439 440
Symbol 442 GraphicUsed by:443
Symbol 443 MovieClipUses:442 365Used by:444
Symbol 444 MovieClip {Gamer.Defense.Weapon.FlackWeapon}Uses:443 363 368 370
Symbol 445 GraphicUsed by:446
Symbol 446 MovieClipUses:445 365Used by:447
Symbol 447 MovieClip {Gamer.Defense.Weapon.FollowWeapon}Uses:446 363 368 370
Symbol 448 GraphicUsed by:449
Symbol 449 MovieClipUses:448Used by:465
Symbol 450 GraphicUsed by:451
Symbol 451 MovieClipUses:450Used by:465 474 591 594 597 600 603 610 613 616 619
Symbol 452 GraphicUsed by:456
Symbol 453 GraphicUsed by:454
Symbol 454 MovieClipUses:453Used by:456
Symbol 455 GraphicUsed by:456
Symbol 456 MovieClip {Gamer.Defense.HealthIndicator}Uses:452 454 455Used by:465 474 591 594 597 600 603 610 613 616 619
Symbol 457 BitmapUsed by:458
Symbol 458 GraphicUses:457Used by:465 474 492 591 594 597 600 603 610 613 616 619
Symbol 459 BitmapUsed by:460
Symbol 460 GraphicUses:459Used by:465 474 492 591 594 597 600 603 610 613 616 619
Symbol 461 BitmapUsed by:462
Symbol 462 GraphicUses:461Used by:465 474 492 591 594 597 600 603 610 613 616 619
Symbol 463 BitmapUsed by:464
Symbol 464 GraphicUses:463Used by:465 474 492 591 594 597 600 603 610 613 616 619
Symbol 465 MovieClip {GroundEnemyA}Uses:449 451 456 458 460 462 464
Symbol 466 GraphicUsed by:473
Symbol 467 GraphicUsed by:468
Symbol 468 MovieClipUses:467Used by:469
Symbol 469 MovieClipUses:468Used by:473
Symbol 470 GraphicUsed by:471
Symbol 471 MovieClipUses:470Used by:472
Symbol 472 MovieClipUses:471Used by:473
Symbol 473 MovieClip {指挥部动画效果}Uses:466 469 472Used by:474
Symbol 474 MovieClip {Gamer.Defense.Headquarters}Uses:473 451 456 458 460 462 464
Symbol 475 MovieClip {矩阵容器}Used by:485
Symbol 476 MovieClip {背景容器}Used by:485
Symbol 477 MovieClip {静态障碍物容器}Used by:485
Symbol 478 MovieClip {敌人容器}Used by:485
Symbol 479 MovieClip {建筑容器}Used by:485
Symbol 480 MovieClip {天空容器}Used by:485
Symbol 481 MovieClip {宇宙容器}Used by:485
Symbol 482 MovieClip {操作面板容器}Used by:485
Symbol 483 GraphicUsed by:484
Symbol 484 MovieClipUses:483Used by:485
Symbol 485 MovieClip {Gamer.Defense.GameScene}Uses:475 476 477 478 479 480 481 482 484
Symbol 486 BitmapUsed by:487
Symbol 487 GraphicUses:486Used by:488
Symbol 488 MovieClipUses:487Used by:489
Symbol 489 MovieClip {StaticFraise}Uses:488
Symbol 490 GraphicUsed by:491
Symbol 491 MovieClipUses:490Used by:492
Symbol 492 MovieClip {Gamer.Defense.Bullet.FollowBullet}Uses:491 458 460 462 464
Symbol 493 BitmapUsed by:494
Symbol 494 GraphicUses:493Used by:498 807
Symbol 495 GraphicUsed by:496
Symbol 496 MovieClipUses:495Used by:497
Symbol 497 MovieClipUses:496Used by:498 499 794 797 807 808 809
Symbol 498 MovieClip {BGImage1}Uses:494 497Used by:499
Symbol 499 MovieClip {BackgroundImage}Uses:498 497
Symbol 500 GraphicUsed by:503
Symbol 501 GraphicUsed by:503
Symbol 502 GraphicUsed by:503
Symbol 503 Button {MENUPAUSE}Uses:500 501 502Used by:588
Symbol 504 GraphicUsed by:507
Symbol 505 GraphicUsed by:507
Symbol 506 GraphicUsed by:507
Symbol 507 Button {SENDNOW}Uses:504 505 506Used by:588
Symbol 508 GraphicUsed by:510
Symbol 509 GraphicUsed by:510
Symbol 510 MovieClip {SoundOnOffClip}Uses:508 509Used by:588
Symbol 511 GraphicUsed by:513
Symbol 512 GraphicUsed by:513
Symbol 513 MovieClip {重机枪}Uses:511 512Used by:588
Symbol 514 GraphicUsed by:516
Symbol 515 GraphicUsed by:516
Symbol 516 MovieClip {霰弹}Uses:514 515Used by:588
Symbol 517 GraphicUsed by:519
Symbol 518 GraphicUsed by:519
Symbol 519 MovieClip {重炮}Uses:517 518Used by:588
Symbol 520 GraphicUsed by:522
Symbol 521 GraphicUsed by:522
Symbol 522 MovieClip {机枪}Uses:520 521Used by:588
Symbol 523 GraphicUsed by:525
Symbol 524 GraphicUsed by:525
Symbol 525 MovieClip {炸弹}Uses:523 524Used by:588
Symbol 526 GraphicUsed by:528
Symbol 527 GraphicUsed by:528
Symbol 528 MovieClip {小炮}Uses:526 527Used by:588
Symbol 529 BitmapUsed by:530 531
Symbol 530 GraphicUses:529Used by:532
Symbol 531 GraphicUses:529Used by:532
Symbol 532 MovieClip {围墙}Uses:530 531Used by:588
Symbol 533 GraphicUsed by:535
Symbol 534 GraphicUsed by:535
Symbol 535 MovieClip {冷冻}Uses:533 534Used by:588
Symbol 536 GraphicUsed by:538
Symbol 537 GraphicUsed by:538
Symbol 538 MovieClip {巨炮}Uses:536 537Used by:588
Symbol 539 GraphicUsed by:541
Symbol 540 GraphicUsed by:541
Symbol 541 MovieClip {激光}Uses:539 540Used by:588
Symbol 542 GraphicUsed by:544
Symbol 543 GraphicUsed by:544
Symbol 544 MovieClip {核辐射}Uses:542 543Used by:588
Symbol 545 GraphicUsed by:547
Symbol 546 GraphicUsed by:547
Symbol 547 MovieClip {跟踪导弹}Uses:545 546Used by:588
Symbol 548 BitmapUsed by:549
Symbol 549 GraphicUses:548Used by:588
Symbol 550 FontUsed by:551 672 678 681 684 686 691 696 698 702 818 835 837 843 846 850 851 855 876 878 895
Symbol 551 TextUses:550Used by:553
Symbol 552 GraphicUsed by:553
Symbol 553 ButtonUses:551 552Used by:554
Symbol 554 MovieClip {ArtilleryDefense_fla.moregames_btn_mc_163}Uses:553Used by:588
Symbol 555 FontUsed by:556 557 558 559 560 561 562 563 564 565 566 574 575 576 577 578 579 580 581 582 583 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790
Symbol 556 TextUses:555Used by:588
Symbol 557 TextUses:555Used by:588
Symbol 558 TextUses:555Used by:588
Symbol 559 TextUses:555Used by:588
Symbol 560 TextUses:555Used by:588
Symbol 561 TextUses:555Used by:588
Symbol 562 TextUses:555Used by:588
Symbol 563 TextUses:555Used by:588
Symbol 564 TextUses:555Used by:588
Symbol 565 TextUses:555Used by:588
Symbol 566 TextUses:555Used by:588
Symbol 567 TextUsed by:588
Symbol 568 GraphicUsed by:588
Symbol 569 FontUsed by:570 571 572 573 586 587
Symbol 570 EditableTextUses:569Used by:588
Symbol 571 EditableTextUses:569Used by:588
Symbol 572 EditableTextUses:569Used by:588
Symbol 573 EditableTextUses:569Used by:588
Symbol 574 EditableTextUses:555Used by:588
Symbol 575 EditableTextUses:555Used by:588
Symbol 576 EditableTextUses:555Used by:588
Symbol 577 EditableTextUses:555Used by:588
Symbol 578 EditableTextUses:555Used by:588
Symbol 579 EditableTextUses:555Used by:588
Symbol 580 EditableTextUses:555Used by:588
Symbol 581 EditableTextUses:555Used by:588
Symbol 582 EditableTextUses:555Used by:588
Symbol 583 EditableTextUses:555Used by:588
Symbol 584 GraphicUsed by:585
Symbol 585 MovieClip {升级按钮}Uses:584Used by:588
Symbol 586 EditableTextUses:569Used by:588
Symbol 587 EditableTextUses:569Used by:588
Symbol 588 MovieClip {Gamer.Defense.ControlPanel}Uses:549 554 556 557 558 559 560 561 562 563 564 565 566 567 547 544 541 538 535 532 528 525 522 519 516 513 510 568 570 571 507 503 572 573 574 575 576 577 578 579 580 581 582 583 356 585 586 587
Symbol 589 GraphicUsed by:590
Symbol 590 MovieClipUses:589Used by:591
Symbol 591 MovieClip {GroundEnemyB}Uses:590 451 456 458 460 462 464
Symbol 592 GraphicUsed by:593
Symbol 593 MovieClipUses:592Used by:594
Symbol 594 MovieClip {GroundEnemyC}Uses:593 451 456 458 460 462 464
Symbol 595 GraphicUsed by:596
Symbol 596 MovieClipUses:595Used by:597
Symbol 597 MovieClip {GroundEnemyD}Uses:596 451 456 458 460 462 464
Symbol 598 GraphicUsed by:599
Symbol 599 MovieClipUses:598Used by:600
Symbol 600 MovieClip {GroundEnemyE}Uses:599 451 456 458 460 462 464
Symbol 601 BitmapUsed by:602
Symbol 602 GraphicUses:601Used by:603
Symbol 603 MovieClip {AirEnemyF}Uses:602 451 456 458 460 462 464
Symbol 604 GraphicUsed by:605
Symbol 605 MovieClipUses:604Used by:610
Symbol 606 GraphicUsed by:609
Symbol 607 GraphicUsed by:609
Symbol 608 GraphicUsed by:609
Symbol 609 MovieClipUses:606 607 608Used by:610
Symbol 610 MovieClip {AirEnemyG}Uses:605 609 451 456 458 460 462 464
Symbol 611 GraphicUsed by:612
Symbol 612 MovieClipUses:611Used by:613
Symbol 613 MovieClip {GroundEnemyH}Uses:612 451 456 458 460 462 464
Symbol 614 GraphicUsed by:615
Symbol 615 MovieClipUses:614Used by:616
Symbol 616 MovieClip {GroundEnemyI}Uses:615 451 456 458 460 462 464
Symbol 617 GraphicUsed by:618
Symbol 618 MovieClipUses:617Used by:619
Symbol 619 MovieClip {GroundEnemyJ}Uses:618 451 456 458 460 462 464
Symbol 620 BitmapUsed by:621
Symbol 621 GraphicUses:620Used by:622
Symbol 622 MovieClip {Gamer.Defense.Weapon.Wall}Uses:621
Symbol 623 GraphicUsed by:624
Symbol 624 MovieClipUses:623Used by:627
Symbol 625 GraphicUsed by:626
Symbol 626 MovieClipUses:365 625Used by:627
Symbol 627 MovieClip {Gamer.Defense.Weapon.LightParticleWeapon}Uses:624 626 363 368 370
Symbol 628 GraphicUsed by:629 631
Symbol 629 MovieClipUses:628Used by:630
Symbol 630 MovieClip {Gamer.Defense.Bullet.BlowoutBullet}Uses:629
Symbol 631 MovieClipUses:628Used by:632
Symbol 632 MovieClip {Patch}Uses:631
Symbol 633 GraphicUsed by:634
Symbol 634 MovieClipUses:633Used by:635
Symbol 635 MovieClip {ShotgunPatch}Uses:634
Symbol 636 BitmapUsed by:637 670 894
Symbol 637 GraphicUses:636Used by:667 791
Symbol 638 FontUsed by:639 642 644 646 647 648 649 650 651 653 655 657 659 660 661 662 739 740 741 742 743 744 745 746 747 748
Symbol 639 TextUses:638Used by:667
Symbol 640 BitmapUsed by:641
Symbol 641 GraphicUses:640Used by:667
Symbol 642 TextUses:638Used by:667
Symbol 643 GraphicUsed by:667
Symbol 644 TextUses:638Used by:667
Symbol 645 GraphicUsed by:667
Symbol 646 TextUses:638Used by:667
Symbol 647 TextUses:638Used by:667
Symbol 648 TextUses:638Used by:667
Symbol 649 TextUses:638Used by:667
Symbol 650 TextUses:638Used by:667
Symbol 651 TextUses:638Used by:667
Symbol 652 GraphicUsed by:667
Symbol 653 TextUses:638Used by:667
Symbol 654 GraphicUsed by:667
Symbol 655 TextUses:638Used by:667
Symbol 656 GraphicUsed by:667
Symbol 657 TextUses:638Used by:667
Symbol 658 GraphicUsed by:667
Symbol 659 TextUses:638Used by:667
Symbol 660 TextUses:638Used by:667
Symbol 661 TextUses:638Used by:667
Symbol 662 TextUses:638Used by:667
Symbol 663 GraphicUsed by:664
Symbol 664 MovieClipUses:663Used by:666
Symbol 665 GraphicUsed by:666
Symbol 666 ButtonUses:664 665Used by:667 750
Symbol 667 MovieClip {HelpInterface}Uses:637 639 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 666
Symbol 668 BitmapUsed by:670
Symbol 669 BitmapUsed by:670 671 673 674 677 679 680 683 685 687 690 692 693 695 697 699 701 749 854 877 894
Symbol 670 GraphicUses:668 669 636Used by:705
Symbol 671 GraphicUses:669Used by:676
Symbol 672 TextUses:550Used by:676
Symbol 673 GraphicUses:669Used by:676
Symbol 674 GraphicUses:669Used by:676
Symbol 675 GraphicUsed by:676 682 694
Symbol 676 ButtonUses:671 672 673 674 675Used by:705
Symbol 677 GraphicUses:669Used by:682
Symbol 678 TextUses:550Used by:682
Symbol 679 GraphicUses:669Used by:682
Symbol 680 GraphicUses:669Used by:682
Symbol 681 TextUses:550Used by:682
Symbol 682 ButtonUses:677 678 679 680 681 675Used by:705
Symbol 683 GraphicUses:669Used by:689
Symbol 684 TextUses:550Used by:689
Symbol 685 GraphicUses:669Used by:689
Symbol 686 TextUses:550Used by:689
Symbol 687 GraphicUses:669Used by:689
Symbol 688 GraphicUsed by:689 700
Symbol 689 ButtonUses:683 684 685 686 687 688Used by:705
Symbol 690 GraphicUses:669Used by:694
Symbol 691 TextUses:550Used by:694
Symbol 692 GraphicUses:669Used by:694
Symbol 693 GraphicUses:669Used by:694
Symbol 694 ButtonUses:690 691 692 693 675Used by:705
Symbol 695 GraphicUses:669Used by:700
Symbol 696 TextUses:550Used by:700
Symbol 697 GraphicUses:669Used by:700
Symbol 698 TextUses:550Used by:700
Symbol 699 GraphicUses:669Used by:700
Symbol 700 ButtonUses:695 696 697 698 699 688Used by:705
Symbol 701 GraphicUses:669Used by:704
Symbol 702 TextUses:550Used by:704
Symbol 703 GraphicUsed by:704
Symbol 704 ButtonUses:701 702 703Used by:705
Symbol 705 MovieClip {StartInterface}Uses:670 676 682 689 694 700 704
Symbol 706 GraphicUsed by:709 716
Symbol 707 GraphicUsed by:708
Symbol 708 MovieClipUses:707Used by:709 711 713 715
Symbol 709 MovieClip {RadioButton_selectedDisabledIcon}Uses:706 708Used by:721
Symbol 710 GraphicUsed by:711 717
Symbol 711 MovieClip {RadioButton_selectedDownIcon}Uses:710 708Used by:721
Symbol 712 GraphicUsed by:713 718
Symbol 713 MovieClip {RadioButton_selectedOverIcon}Uses:712 708Used by:721
Symbol 714 GraphicUsed by:715
Symbol 715 MovieClip {RadioButton_selectedUpIcon}Uses:714 708Used by:721
Symbol 716 MovieClip {RadioButton_disabledIcon}Uses:706Used by:721
Symbol 717 MovieClip {RadioButton_downIcon}Uses:710Used by:721
Symbol 718 MovieClip {RadioButton_overIcon}Uses:712Used by:721
Symbol 719 GraphicUsed by:720
Symbol 720 MovieClip {RadioButton_upIcon}Uses:719Used by:721
Symbol 721 MovieClip {fl.controls.RadioButton}Uses:302 303 720 718 717 716 715 713 711 709 307Used by:791
Symbol 722 GraphicUsed by:723
Symbol 723 MovieClip {List_skin}Uses:722Used by:724
Symbol 724 MovieClip {fl.controls.List}Uses:302 303 723 351 307 334Used by:738
Symbol 725 GraphicUsed by:726
Symbol 726 MovieClip {TextInput_upSkin}Uses:725Used by:729
Symbol 727 GraphicUsed by:728
Symbol 728 MovieClip {TextInput_disabledSkin}Uses:727Used by:729
Symbol 729 MovieClip {fl.controls.TextInput}Uses:302 303 728 726 307Used by:738
Symbol 730 GraphicUsed by:731
Symbol 731 MovieClip {ComboBox_downSkin}Uses:730Used by:738
Symbol 732 GraphicUsed by:733
Symbol 733 MovieClip {ComboBox_overSkin}Uses:732Used by:738
Symbol 734 GraphicUsed by:735
Symbol 735 MovieClip {ComboBox_disabledSkin}Uses:734Used by:738
Symbol 736 GraphicUsed by:737
Symbol 737 MovieClip {ComboBox_upSkin}Uses:736Used by:738
Symbol 738 MovieClip {fl.controls.ComboBox}Uses:302 303 307 737 735 733 731 729 724Used by:791
Symbol 739 TextUses:638Used by:791
Symbol 740 TextUses:638Used by:791
Symbol 741 TextUses:638Used by:791
Symbol 742 TextUses:638Used by:791
Symbol 743 TextUses:638Used by:791
Symbol 744 TextUses:638Used by:791
Symbol 745 TextUses:638Used by:791
Symbol 746 TextUses:638Used by:791
Symbol 747 TextUses:638Used by:791
Symbol 748 TextUses:638Used by:791
Symbol 749 GraphicUses:669Used by:791
Symbol 750 MovieClipUses:666Used by:791
Symbol 751 TextUses:555Used by:791
Symbol 752 TextUses:555Used by:791
Symbol 753 TextUses:555Used by:791
Symbol 754 TextUses:555Used by:791
Symbol 755 TextUses:555Used by:791
Symbol 756 TextUses:555Used by:791
Symbol 757 TextUses:555Used by:791
Symbol 758 TextUses:555Used by:791
Symbol 759 TextUses:555Used by:791
Symbol 760 TextUses:555Used by:791
Symbol 761 EditableTextUses:555Used by:791
Symbol 762 EditableTextUses:555Used by:791
Symbol 763 EditableTextUses:555Used by:791
Symbol 764 EditableTextUses:555Used by:791
Symbol 765 EditableTextUses:555Used by:791
Symbol 766 EditableTextUses:555Used by:791
Symbol 767 EditableTextUses:555Used by:791
Symbol 768 EditableTextUses:555Used by:791
Symbol 769 EditableTextUses:555Used by:791
Symbol 770 EditableTextUses:555Used by:791
Symbol 771 EditableTextUses:555Used by:791
Symbol 772 EditableTextUses:555Used by:791
Symbol 773 EditableTextUses:555Used by:791
Symbol 774 EditableTextUses:555Used by:791
Symbol 775 EditableTextUses:555Used by:791
Symbol 776 EditableTextUses:555Used by:791
Symbol 777 EditableTextUses:555Used by:791
Symbol 778 EditableTextUses:555Used by:791
Symbol 779 EditableTextUses:555Used by:791
Symbol 780 EditableTextUses:555Used by:791
Symbol 781 EditableTextUses:555Used by:791
Symbol 782 EditableTextUses:555Used by:791
Symbol 783 EditableTextUses:555Used by:791
Symbol 784 EditableTextUses:555Used by:791
Symbol 785 EditableTextUses:555Used by:791
Symbol 786 EditableTextUses:555Used by:791
Symbol 787 EditableTextUses:555Used by:791
Symbol 788 EditableTextUses:555Used by:791
Symbol 789 EditableTextUses:555Used by:791
Symbol 790 EditableTextUses:555Used by:791
Symbol 791 MovieClip {ScoreInterface}Uses:637 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 738 721
Symbol 792 BitmapUsed by:793
Symbol 793 GraphicUses:792Used by:794 808
Symbol 794 MovieClip {BGImage2}Uses:793 497
Symbol 795 BitmapUsed by:796
Symbol 796 GraphicUses:795Used by:797 809
Symbol 797 MovieClip {BGImage3}Uses:796 497
Symbol 798 BitmapUsed by:799 810
Symbol 799 GraphicUses:798Used by:800
Symbol 800 MovieClip {StaticFraise1}Uses:799
Symbol 801 BitmapUsed by:802 812
Symbol 802 GraphicUses:801Used by:803
Symbol 803 MovieClip {StaticFraise2}Uses:802
Symbol 804 BitmapUsed by:805 814
Symbol 805 GraphicUses:804Used by:806
Symbol 806 MovieClip {StaticFraise3}Uses:805
Symbol 807 MovieClip {BGImage4}Uses:494 497
Symbol 808 MovieClip {BGImage5}Uses:793 497
Symbol 809 MovieClip {BGImage6}Uses:796 497
Symbol 810 GraphicUses:798Used by:811
Symbol 811 MovieClip {StaticFraise4}Uses:810
Symbol 812 GraphicUses:801Used by:813
Symbol 813 MovieClip {StaticFraise5}Uses:812
Symbol 814 GraphicUses:804Used by:815
Symbol 815 MovieClip {StaticFraise6}Uses:814
Symbol 816 BitmapUsed by:817 845 894 896
Symbol 817 GraphicUses:816Used by:844
Symbol 818 TextUses:550Used by:844
Symbol 819 FontUsed by:820 822 824 825 827 829 831 832 834 837 839 840 843 847 848 897 898
Symbol 820 TextUses:819Used by:823
Symbol 821 GraphicUsed by:823 826 841 849 852
Symbol 822 TextUses:819Used by:823
Symbol 823 ButtonUses:820 821 822Used by:844
Symbol 824 TextUses:819Used by:826
Symbol 825 TextUses:819Used by:826
Symbol 826 ButtonUses:824 825 821Used by:844 853 900
Symbol 827 TextUses:819Used by:830
Symbol 828 GraphicUsed by:830 833 836
Symbol 829 TextUses:819Used by:830
Symbol 830 ButtonUses:827 828 829Used by:844
Symbol 831 TextUses:819Used by:833
Symbol 832 TextUses:819Used by:833
Symbol 833 ButtonUses:831 832 828Used by:844
Symbol 834 TextUses:819Used by:836
Symbol 835 TextUses:550Used by:836
Symbol 836 ButtonUses:834 835 828Used by:844
Symbol 837 EditableTextUses:550 819Used by:844
Symbol 838 GraphicUsed by:844
Symbol 839 TextUses:819Used by:841
Symbol 840 TextUses:819Used by:841
Symbol 841 ButtonUses:839 821 840Used by:844
Symbol 842 GraphicUsed by:844
Symbol 843 EditableTextUses:550 819Used by:844
Symbol 844 MovieClip {GameOverWindow}Uses:817 818 823 826 830 833 836 837 838 841 842 843
Symbol 845 GraphicUses:816Used by:853
Symbol 846 TextUses:550Used by:853
Symbol 847 TextUses:819Used by:849
Symbol 848 TextUses:819Used by:849
Symbol 849 ButtonUses:847 821 848Used by:853
Symbol 850 TextUses:550Used by:852
Symbol 851 TextUses:550Used by:852
Symbol 852 ButtonUses:850 851 821Used by:853
Symbol 853 MovieClip {PauseWindow}Uses:845 846 849 852 826
Symbol 854 GraphicUses:669Used by:874
Symbol 855 TextUses:550Used by:874
Symbol 856 GraphicUsed by:874 893
Symbol 857 MovieClipUses:413Used by:874 893
Symbol 858 GraphicUsed by:859
Symbol 859 MovieClipUses:858Used by:862 864 866 868 870 872 874 881 883 885 887 889 891 893
Symbol 860 FontUsed by:861 863 865 867 869 871 880 882 884 886 888
Symbol 861 TextUses:860Used by:862
Symbol 862 MovieClipUses:859 861Used by:873
Symbol 863 TextUses:860Used by:864
Symbol 864 MovieClipUses:859 863Used by:873
Symbol 865 TextUses:860Used by:866
Symbol 866 MovieClipUses:859 865Used by:873
Symbol 867 TextUses:860Used by:868
Symbol 868 MovieClipUses:859 867Used by:873
Symbol 869 TextUses:860Used by:870
Symbol 870 MovieClipUses:859 869Used by:873
Symbol 871 TextUses:860Used by:872
Symbol 872 MovieClipUses:859 871Used by:873
Symbol 873 MovieClipUses:862 864 866 868 870 872Used by:874
Symbol 874 MovieClip {Gamer.Defense.MapSelectInterface}Uses:854 855 856 857 859 873Used by:900
Symbol 875 GraphicUsed by:893
Symbol 876 TextUses:550Used by:893
Symbol 877 GraphicUses:669Used by:893
Symbol 878 TextUses:550Used by:893
Symbol 879 MovieClip {ArtilleryDefense_fla.Timeline_20}Used by:893
Symbol 880 TextUses:860Used by:881
Symbol 881 MovieClipUses:859 880Used by:892
Symbol 882 TextUses:860Used by:883
Symbol 883 MovieClipUses:859 882Used by:892
Symbol 884 TextUses:860Used by:885
Symbol 885 MovieClipUses:859 884Used by:892
Symbol 886 TextUses:860Used by:887
Symbol 887 MovieClipUses:859 886Used by:892
Symbol 888 TextUses:860Used by:889
Symbol 889 MovieClipUses:859 888Used by:892
Symbol 890 GraphicUsed by:891
Symbol 891 MovieClipUses:859 890Used by:892
Symbol 892 MovieClipUses:881 883 885 887 889 891Used by:893
Symbol 893 MovieClip {Gamer.Defense.ModeSelectInterface}Uses:875 876 877 878 856 879 857 859 892Used by:900
Symbol 894 GraphicUses:816 669 636Used by:900
Symbol 895 TextUses:550Used by:900
Symbol 896 GraphicUses:816Used by:900
Symbol 897 TextUses:819Used by:899
Symbol 898 TextUses:819Used by:899
Symbol 899 ButtonUses:897 898 385Used by:900
Symbol 900 MovieClip {MapModeSelectInterface}Uses:894 895 896 899 826 893 874
Symbol 901 MovieClip {fl.containers.UILoader}

Instance Names

"btn2"Symbol 119 MovieClip {gbloader} Frame 1Symbol 87 Button
"bar"Symbol 119 MovieClip {gbloader} Frame 1Symbol 90 MovieClip
"per_txt"Symbol 119 MovieClip {gbloader} Frame 1Symbol 98 EditableText
"play_btn"Symbol 119 MovieClip {gbloader} Frame 3Symbol 114 Button
"btn2"Symbol 119 MovieClip {gbloader} Frame 3Symbol 116 Button
"btn1"Symbol 119 MovieClip {gbloader} Frame 4Symbol 87 Button
"dailygames"Symbol 141 MovieClip {bustedsymbolcompletes} Frame 1Symbol 140 MovieClip
"locality"Symbol 366 MovieClip Frame 1Symbol 365 MovieClip
"levelSign"Symbol 371 MovieClip {Gamer.Defense.Weapon.ShotgunWeapon} Frame 1Symbol 363 MovieClip {武器等级标记}
"head"Symbol 371 MovieClip {Gamer.Defense.Weapon.ShotgunWeapon} Frame 1Symbol 366 MovieClip
"chooseSign"Symbol 371 MovieClip {Gamer.Defense.Weapon.ShotgunWeapon} Frame 1Symbol 368 MovieClip
"circleRange"Symbol 371 MovieClip {Gamer.Defense.Weapon.ShotgunWeapon} Frame 1Symbol 370 MovieClip
"locality"Symbol 389 MovieClip Frame 1Symbol 365 MovieClip
"head"Symbol 390 MovieClip {Gamer.Defense.Weapon.LaserWeapon} Frame 1Symbol 389 MovieClip
"levelSign"Symbol 390 MovieClip {Gamer.Defense.Weapon.LaserWeapon} Frame 1Symbol 363 MovieClip {武器等级标记}
"chooseSign"Symbol 390 MovieClip {Gamer.Defense.Weapon.LaserWeapon} Frame 1Symbol 368 MovieClip
"circleRange"Symbol 390 MovieClip {Gamer.Defense.Weapon.LaserWeapon} Frame 1Symbol 370 MovieClip
"locality"Symbol 392 MovieClip Frame 1Symbol 365 MovieClip
"head"Symbol 393 MovieClip {Gamer.Defense.Weapon.ScattergunWeapon} Frame 1Symbol 392 MovieClip
"levelSign"Symbol 393 MovieClip {Gamer.Defense.Weapon.ScattergunWeapon} Frame 1Symbol 363 MovieClip {武器等级标记}
"chooseSign"Symbol 393 MovieClip {Gamer.Defense.Weapon.ScattergunWeapon} Frame 1Symbol 368 MovieClip
"circleRange"Symbol 393 MovieClip {Gamer.Defense.Weapon.ScattergunWeapon} Frame 1Symbol 370 MovieClip
"head"Symbol 397 MovieClip {Gamer.Defense.Weapon.RadiateWeapon} Frame 1Symbol 396 MovieClip
"levelSign"Symbol 397 MovieClip {Gamer.Defense.Weapon.RadiateWeapon} Frame 1Symbol 363 MovieClip {武器等级标记}
"chooseSign"Symbol 397 MovieClip {Gamer.Defense.Weapon.RadiateWeapon} Frame 1Symbol 368 MovieClip
"circleRange"Symbol 397 MovieClip {Gamer.Defense.Weapon.RadiateWeapon} Frame 1Symbol 370 MovieClip
"locality"Symbol 408 MovieClip Frame 1Symbol 365 MovieClip
"head"Symbol 409 MovieClip {Gamer.Defense.Weapon.TowWeapon} Frame 1Symbol 408 MovieClip
"levelSign"Symbol 409 MovieClip {Gamer.Defense.Weapon.TowWeapon} Frame 1Symbol 363 MovieClip {武器等级标记}
"chooseSign"Symbol 409 MovieClip {Gamer.Defense.Weapon.TowWeapon} Frame 1Symbol 368 MovieClip
"circleRange"Symbol 409 MovieClip {Gamer.Defense.Weapon.TowWeapon} Frame 1Symbol 370 MovieClip
"locality"Symbol 429 MovieClip Frame 1Symbol 365 MovieClip
"head"Symbol 430 MovieClip {Gamer.Defense.Weapon.LightEdgeWeapon} Frame 1Symbol 429 MovieClip
"levelSign"Symbol 430 MovieClip {Gamer.Defense.Weapon.LightEdgeWeapon} Frame 1Symbol 363 MovieClip {武器等级标记}
"chooseSign"Symbol 430 MovieClip {Gamer.Defense.Weapon.LightEdgeWeapon} Frame 1Symbol 368 MovieClip
"circleRange"Symbol 430 MovieClip {Gamer.Defense.Weapon.LightEdgeWeapon} Frame 1Symbol 370 MovieClip
"locality"Symbol 443 MovieClip Frame 1Symbol 365 MovieClip
"head"Symbol 444 MovieClip {Gamer.Defense.Weapon.FlackWeapon} Frame 1Symbol 443 MovieClip
"levelSign"Symbol 444 MovieClip {Gamer.Defense.Weapon.FlackWeapon} Frame 1Symbol 363 MovieClip {武器等级标记}
"chooseSign"Symbol 444 MovieClip {Gamer.Defense.Weapon.FlackWeapon} Frame 1Symbol 368 MovieClip
"circleRange"Symbol 444 MovieClip {Gamer.Defense.Weapon.FlackWeapon} Frame 1Symbol 370 MovieClip
"locality"Symbol 446 MovieClip Frame 1Symbol 365 MovieClip
"head"Symbol 447 MovieClip {Gamer.Defense.Weapon.FollowWeapon} Frame 1Symbol 446 MovieClip
"levelSign"Symbol 447 MovieClip {Gamer.Defense.Weapon.FollowWeapon} Frame 1Symbol 363 MovieClip {武器等级标记}
"chooseSign"Symbol 447 MovieClip {Gamer.Defense.Weapon.FollowWeapon} Frame 1Symbol 368 MovieClip
"circleRange"Symbol 447 MovieClip {Gamer.Defense.Weapon.FollowWeapon} Frame 1Symbol 370 MovieClip
"denote"Symbol 456 MovieClip {Gamer.Defense.HealthIndicator} Frame 1Symbol 454 MovieClip
"hitTestArea"Symbol 465 MovieClip {GroundEnemyA} Frame 1Symbol 451 MovieClip
"healthIndicator"Symbol 465 MovieClip {GroundEnemyA} Frame 1Symbol 456 MovieClip {Gamer.Defense.HealthIndicator}
"hitTestArea"Symbol 474 MovieClip {Gamer.Defense.Headquarters} Frame 1Symbol 451 MovieClip
"healthIndicator"Symbol 474 MovieClip {Gamer.Defense.Headquarters} Frame 1Symbol 456 MovieClip {Gamer.Defense.HealthIndicator}
"matrixContainer"Symbol 485 MovieClip {Gamer.Defense.GameScene} Frame 1Symbol 475 MovieClip {矩阵容器}
"backgroundContainer"Symbol 485 MovieClip {Gamer.Defense.GameScene} Frame 1Symbol 476 MovieClip {背景容器}
"staticFraiseContainer"Symbol 485 MovieClip {Gamer.Defense.GameScene} Frame 1Symbol 477 MovieClip {静态障碍物容器}
"enemyContainer"Symbol 485 MovieClip {Gamer.Defense.GameScene} Frame 1Symbol 478 MovieClip {敌人容器}
"buildingContainer"Symbol 485 MovieClip {Gamer.Defense.GameScene} Frame 1Symbol 479 MovieClip {建筑容器}
"airContainer"Symbol 485 MovieClip {Gamer.Defense.GameScene} Frame 1Symbol 480 MovieClip {天空容器}
"universeContainer"Symbol 485 MovieClip {Gamer.Defense.GameScene} Frame 1Symbol 481 MovieClip {宇宙容器}
"controlPanelContainer"Symbol 485 MovieClip {Gamer.Defense.GameScene} Frame 1Symbol 482 MovieClip {操作面板容器}
"mc_btn"Symbol 554 MovieClip {ArtilleryDefense_fla.moregames_btn_mc_163} Frame 1Symbol 553 Button
"but5"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 547 MovieClip {跟踪导弹}
"but4"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 544 MovieClip {核辐射}
"but6"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 541 MovieClip {激光}
"but8"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 538 MovieClip {巨炮}
"but10"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 535 MovieClip {冷冻}
"but11"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 532 MovieClip {围墙}
"but7"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 528 MovieClip {小炮}
"but9"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 525 MovieClip {炸弹}
"but0"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 522 MovieClip {机枪}
"but1"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 519 MovieClip {重炮}
"but3"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 516 MovieClip {霰弹}
"but2"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 513 MovieClip {重机枪}
"onOffBut"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 510 MovieClip {SoundOnOffClip}
"moneyTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 570 EditableText
"scoreTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 571 EditableText
"nextWaveBut"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 507 Button {SENDNOW}
"mpBut"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 503 Button {MENUPAUSE}
"timeTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 572 EditableText
"weaponNameTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 573 EditableText
"targetNowTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 574 EditableText
"damageNowTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 575 EditableText
"rangeNowTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 576 EditableText
"brNowTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 577 EditableText
"rtNowTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 578 EditableText
"targetNextTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 579 EditableText
"damageNextTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 580 EditableText
"rangeNextTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 581 EditableText
"brNextTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 582 EditableText
"rtNextTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 583 EditableText
"saleBut"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 356 MovieClip {美元符号基建}
"upgradeBut"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 585 MovieClip {升级按钮}
"costTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 586 EditableText
"waveTxt"Symbol 588 MovieClip {Gamer.Defense.ControlPanel} Frame 1Symbol 587 EditableText
"hitTestArea"Symbol 591 MovieClip {GroundEnemyB} Frame 1Symbol 451 MovieClip
"healthIndicator"Symbol 591 MovieClip {GroundEnemyB} Frame 1Symbol 456 MovieClip {Gamer.Defense.HealthIndicator}
"hitTestArea"Symbol 594 MovieClip {GroundEnemyC} Frame 1Symbol 451 MovieClip
"healthIndicator"Symbol 594 MovieClip {GroundEnemyC} Frame 1Symbol 456 MovieClip {Gamer.Defense.HealthIndicator}
"hitTestArea"Symbol 597 MovieClip {GroundEnemyD} Frame 1Symbol 451 MovieClip
"healthIndicator"Symbol 597 MovieClip {GroundEnemyD} Frame 1Symbol 456 MovieClip {Gamer.Defense.HealthIndicator}
"hitTestArea"Symbol 600 MovieClip {GroundEnemyE} Frame 1Symbol 451 MovieClip
"healthIndicator"Symbol 600 MovieClip {GroundEnemyE} Frame 1Symbol 456 MovieClip {Gamer.Defense.HealthIndicator}
"hitTestArea"Symbol 603 MovieClip {AirEnemyF} Frame 1Symbol 451 MovieClip
"healthIndicator"Symbol 603 MovieClip {AirEnemyF} Frame 1Symbol 456 MovieClip {Gamer.Defense.HealthIndicator}
"hitTestArea"Symbol 610 MovieClip {AirEnemyG} Frame 1Symbol 451 MovieClip
"healthIndicator"Symbol 610 MovieClip {AirEnemyG} Frame 1Symbol 456 MovieClip {Gamer.Defense.HealthIndicator}
"hitTestArea"Symbol 613 MovieClip {GroundEnemyH} Frame 1Symbol 451 MovieClip
"healthIndicator"Symbol 613 MovieClip {GroundEnemyH} Frame 1Symbol 456 MovieClip {Gamer.Defense.HealthIndicator}
"hitTestArea"Symbol 616 MovieClip {GroundEnemyI} Frame 1Symbol 451 MovieClip
"healthIndicator"Symbol 616 MovieClip {GroundEnemyI} Frame 1Symbol 456 MovieClip {Gamer.Defense.HealthIndicator}
"hitTestArea"Symbol 619 MovieClip {GroundEnemyJ} Frame 1Symbol 451 MovieClip
"healthIndicator"Symbol 619 MovieClip {GroundEnemyJ} Frame 1Symbol 456 MovieClip {Gamer.Defense.HealthIndicator}
"locality"Symbol 626 MovieClip Frame 1Symbol 365 MovieClip
"head"Symbol 627 MovieClip {Gamer.Defense.Weapon.LightParticleWeapon} Frame 1Symbol 626 MovieClip
"levelSign"Symbol 627 MovieClip {Gamer.Defense.Weapon.LightParticleWeapon} Frame 1Symbol 363 MovieClip {武器等级标记}
"chooseSign"Symbol 627 MovieClip {Gamer.Defense.Weapon.LightParticleWeapon} Frame 1Symbol 368 MovieClip
"circleRange"Symbol 627 MovieClip {Gamer.Defense.Weapon.LightParticleWeapon} Frame 1Symbol 370 MovieClip
"closeBut"Symbol 667 MovieClip {HelpInterface} Frame 1Symbol 666 Button
"startBut"Symbol 705 MovieClip {StartInterface} Frame 1Symbol 676 Button
"scoreBut"Symbol 705 MovieClip {StartInterface} Frame 1Symbol 682 Button
"helpBut"Symbol 705 MovieClip {StartInterface} Frame 1Symbol 689 Button
"mmBut"Symbol 705 MovieClip {StartInterface} Frame 1Symbol 694 Button
"playMore"Symbol 705 MovieClip {StartInterface} Frame 1Symbol 700 Button
"playNow"Symbol 705 MovieClip {StartInterface} Frame 1Symbol 704 Button
"closeBut"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 750 MovieClip
"player1NameTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 761 EditableText
"player2NameTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 762 EditableText
"player3NameTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 763 EditableText
"player4NameTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 764 EditableText
"player5NameTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 765 EditableText
"player6NameTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 766 EditableText
"player7NameTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 767 EditableText
"player8NameTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 768 EditableText
"player9NameTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 769 EditableText
"player10NameTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 770 EditableText
"player1ScoreTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 771 EditableText
"player2ScoreTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 772 EditableText
"player3ScoreTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 773 EditableText
"player4ScoreTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 774 EditableText
"player5ScoreTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 775 EditableText
"player6ScoreTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 776 EditableText
"player7ScoreTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 777 EditableText
"player8ScoreTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 778 EditableText
"player9ScoreTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 779 EditableText
"player10ScoreTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 780 EditableText
"player1DateTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 781 EditableText
"player2DateTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 782 EditableText
"player3DateTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 783 EditableText
"player4DateTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 784 EditableText
"player5DateTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 785 EditableText
"player6DateTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 786 EditableText
"player7DateTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 787 EditableText
"player8DateTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 788 EditableText
"player9DateTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 789 EditableText
"player10DateTxt"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 790 EditableText
"__id2_"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 738 MovieClip {fl.controls.ComboBox}
"__id3_"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 738 MovieClip {fl.controls.ComboBox}
"__id4_"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 721 MovieClip {fl.controls.RadioButton}
"__id5_"Symbol 791 MovieClip {ScoreInterface} Frame 1Symbol 721 MovieClip {fl.controls.RadioButton}
"retryBut"Symbol 844 MovieClip {GameOverWindow} Frame 1Symbol 823 Button
"btmBut"Symbol 844 MovieClip {GameOverWindow} Frame 1Symbol 826 Button
"hsBut"Symbol 844 MovieClip {GameOverWindow} Frame 1Symbol 830 Button
"moreGames"Symbol 844 MovieClip {GameOverWindow} Frame 1Symbol 833 Button
"freeTower"Symbol 844 MovieClip {GameOverWindow} Frame 1Symbol 836 Button
"scoreTxt"Symbol 844 MovieClip {GameOverWindow} Frame 1Symbol 837 EditableText
"submitBut"Symbol 844 MovieClip {GameOverWindow} Frame 1Symbol 841 Button
"playerNameTxt"Symbol 844 MovieClip {GameOverWindow} Frame 1Symbol 843 EditableText
"pwReturnBut"Symbol 853 MovieClip {PauseWindow} Frame 1Symbol 849 Button
"pwRestBut"Symbol 853 MovieClip {PauseWindow} Frame 1Symbol 852 Button
"pwBackBut"Symbol 853 MovieClip {PauseWindow} Frame 1Symbol 826 Button
"selectLeft"Symbol 874 MovieClip {Gamer.Defense.MapSelectInterface} Frame 1Symbol 857 MovieClip
"selectRight"Symbol 874 MovieClip {Gamer.Defense.MapSelectInterface} Frame 1Symbol 857 MovieClip
"mapSelect"Symbol 874 MovieClip {Gamer.Defense.MapSelectInterface} Frame 1Symbol 873 MovieClip
"explain"Symbol 893 MovieClip {Gamer.Defense.ModeSelectInterface} Frame 1Symbol 879 MovieClip {ArtilleryDefense_fla.Timeline_20}
"selectLeft"Symbol 893 MovieClip {Gamer.Defense.ModeSelectInterface} Frame 1Symbol 857 MovieClip
"selectRight"Symbol 893 MovieClip {Gamer.Defense.ModeSelectInterface} Frame 1Symbol 857 MovieClip
"modeSelect"Symbol 893 MovieClip {Gamer.Defense.ModeSelectInterface} Frame 1Symbol 892 MovieClip
"startBut"Symbol 900 MovieClip {MapModeSelectInterface} Frame 1Symbol 899 Button
"btmBut"Symbol 900 MovieClip {MapModeSelectInterface} Frame 1Symbol 826 Button
"modeSelectBox"Symbol 900 MovieClip {MapModeSelectInterface} Frame 1Symbol 893 MovieClip {Gamer.Defense.ModeSelectInterface}
"mapSelectBox"Symbol 900 MovieClip {MapModeSelectInterface} Frame 1Symbol 874 MovieClip {Gamer.Defense.MapSelectInterface}

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.

Labels

"loaded"Symbol 119 MovieClip {gbloader} Frame 3
"default"Symbol 513 MovieClip {重机枪} Frame 1
"choose"Symbol 513 MovieClip {重机枪} Frame 2
"default"Symbol 516 MovieClip {霰弹} Frame 1
"choose"Symbol 516 MovieClip {霰弹} Frame 2
"default"Symbol 519 MovieClip {重炮} Frame 1
"choose"Symbol 519 MovieClip {重炮} Frame 2
"default"Symbol 522 MovieClip {机枪} Frame 1
"choose"Symbol 522 MovieClip {机枪} Frame 2
"default"Symbol 525 MovieClip {炸弹} Frame 1
"choose"Symbol 525 MovieClip {炸弹} Frame 2
"default"Symbol 528 MovieClip {小炮} Frame 1
"choose"Symbol 528 MovieClip {小炮} Frame 2
"default"Symbol 532 MovieClip {围墙} Frame 1
"choose"Symbol 532 MovieClip {围墙} Frame 2
"default"Symbol 535 MovieClip {冷冻} Frame 1
"choose"Symbol 535 MovieClip {冷冻} Frame 2
"default"Symbol 538 MovieClip {巨炮} Frame 1
"choose"Symbol 538 MovieClip {巨炮} Frame 2
"default"Symbol 541 MovieClip {激光} Frame 1
"choose"Symbol 541 MovieClip {激光} Frame 2
"default"Symbol 544 MovieClip {核辐射} Frame 1
"choose"Symbol 544 MovieClip {核辐射} Frame 2
"default"Symbol 547 MovieClip {跟踪导弹} Frame 1
"choose"Symbol 547 MovieClip {跟踪导弹} Frame 2




http://swfchan.com/27/133479/info.shtml
Created: 10/2 -2019 07:14:19 Last modified: 10/2 -2019 07:14:19 Server time: 29/04 -2024 00:09:04