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

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

Phreedee - avoid incoming blocks and live as long as you can.swf

This is the info page for
Flash #89143

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


Text
PHREEDEE

PHREEDEE

highscore:

press space to start

0

Music by Moolkye

<p align="right"><font face="Gill Sans MT Condensed" size="27" color="#ff0000" letterSpacing="0.000000" kerning="0"><a href="http://donitz.deviantart.com" target = "_blank">author&apos;s dA</a></font></p>

ActionScript [AS3]

Section 1
//BaseButton (fl.controls.BaseButton) package fl.controls { import flash.display.*; import fl.core.*; import flash.events.*; import flash.utils.*; import fl.events.*; 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 2
//Button (fl.controls.Button) package fl.controls { import flash.display.*; import fl.core.*; 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 3
//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 4
//CheckBox (fl.controls.CheckBox) package fl.controls { import flash.display.*; public class CheckBox extends LabelButton { private static var defaultStyles:Object = {icon:null, upIcon:"CheckBox_upIcon", downIcon:"CheckBox_downIcon", overIcon:"CheckBox_overIcon", disabledIcon:"CheckBox_disabledIcon", selectedDisabledIcon:"CheckBox_selectedDisabledIcon", focusRectSkin:null, focusRectPadding:null, selectedUpIcon:"CheckBox_selectedUpIcon", selectedDownIcon:"CheckBox_selectedDownIcon", selectedOverIcon:"CheckBox_selectedOverIcon", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5}; public static var createAccessibilityImplementation:Function; 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 << 1)); uiFocusRect.height = (background.height + (_local2 << 1)); }; } override public function get autoRepeat():Boolean{ return (false); } override public function set autoRepeat(_arg1:Boolean):void{ } override public function set toggle(_arg1:Boolean):void{ throw (new Error("Warning: You cannot change a CheckBox's toggle.")); } 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); } 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 (CheckBox.createAccessibilityImplementation != null){ CheckBox.createAccessibilityImplementation(this); }; } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 5
//Label (fl.controls.Label) package fl.controls { import fl.core.*; import fl.events.*; import flash.text.*; public class Label extends UIComponent { protected var actualHeight:Number; protected var _html:Boolean;// = false protected var actualWidth:Number; protected var defaultLabel:String;// = "Label" protected var _savedHTML:String; public var textField:TextField; private static var defaultStyles:Object = {textFormat:null, embedFonts:false}; public function Label(){ defaultLabel = "Label"; _html = false; super(); text = defaultLabel; actualWidth = _width; actualHeight = _height; } public function get autoSize():String{ return (textField.autoSize); } public function get selectable():Boolean{ return (textField.selectable); } public function set text(_arg1:String):void{ if (_arg1 == text){ return; }; if (((componentInspectorSetting) && ((_arg1 == defaultLabel)))){ return; }; _html = false; textField.text = _arg1; if (textField.autoSize != TextFieldAutoSize.NONE){ invalidate(InvalidationType.SIZE); }; } public function get wordWrap():Boolean{ return (textField.wordWrap); } public function set condenseWhite(_arg1:Boolean):void{ textField.condenseWhite = _arg1; if (textField.autoSize != TextFieldAutoSize.NONE){ invalidate(InvalidationType.SIZE); }; } public function set selectable(_arg1:Boolean):void{ textField.selectable = _arg1; } public function set autoSize(_arg1:String):void{ textField.autoSize = _arg1; invalidate(InvalidationType.SIZE); } public function set wordWrap(_arg1:Boolean):void{ textField.wordWrap = _arg1; if (textField.autoSize != TextFieldAutoSize.NONE){ invalidate(InvalidationType.SIZE); }; } override public function get height():Number{ if (((!((textField.autoSize == TextFieldAutoSize.NONE))) && (wordWrap))){ return (_height); }; return (actualHeight); } public function set htmlText(_arg1:String):void{ if (_arg1 == htmlText){ return; }; if (((componentInspectorSetting) && ((_arg1 == "")))){ return; }; _html = true; _savedHTML = _arg1; textField.htmlText = _arg1; if (textField.autoSize != TextFieldAutoSize.NONE){ invalidate(InvalidationType.SIZE); }; } public function get text():String{ return (textField.text); } public function get condenseWhite():Boolean{ return (textField.condenseWhite); } override protected function draw():void{ var _local1:Object; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawTextFormat(); _local1 = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; if (textField.autoSize != TextFieldAutoSize.NONE){ invalidate(InvalidationType.SIZE, false); }; }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } override protected function configUI():void{ super.configUI(); textField = new TextField(); addChild(textField); textField.type = TextFieldType.DYNAMIC; textField.selectable = false; textField.wordWrap = false; } public function get htmlText():String{ return (textField.htmlText); } override public function setSize(_arg1:Number, _arg2:Number):void{ actualWidth = _arg1; actualHeight = _arg2; super.setSize(_arg1, _arg2); } override public function set width(_arg1:Number):void{ actualWidth = _arg1; super.width = _arg1; } protected function drawLayout():void{ var _local1:Boolean; var _local2:Number; var _local3:Number; _local1 = false; textField.width = width; textField.height = height; if (textField.autoSize != TextFieldAutoSize.NONE){ _local2 = textField.width; _local3 = textField.height; _local1 = ((!((_width == _local2))) || (!((_height == _local3)))); _width = _local2; _height = _local3; switch (textField.autoSize){ case TextFieldAutoSize.CENTER: textField.x = ((actualWidth / 2) - (textField.width / 2)); break; case TextFieldAutoSize.LEFT: textField.x = 0; break; case TextFieldAutoSize.RIGHT: textField.x = -((textField.width - actualWidth)); break; }; } else { textField.width = actualWidth; textField.height = actualHeight; textField.x = 0; }; if (_local1){ dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, true)); }; } override public function get width():Number{ if (((!((textField.autoSize == TextFieldAutoSize.NONE))) && (!(wordWrap)))){ return (_width); }; return (actualWidth); } protected function drawTextFormat():void{ var _local1:TextFormat; var _local2:Object; _local1 = (getStyleValue("textFormat") as TextFormat); if (_local1 == null){ _local2 = UIComponent.getStyleDefinition(); _local1 = (enabled) ? (_local2.defaultTextFormat as TextFormat) : (_local2.defaultDisabledTextFormat as TextFormat); }; textField.defaultTextFormat = _local1; textField.setTextFormat(_local1); if (((_html) && (!((_savedHTML == null))))){ htmlText = _savedHTML; }; } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 6
//LabelButton (fl.controls.LabelButton) package fl.controls { import flash.display.*; import fl.core.*; 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 7
//Slider (fl.controls.Slider) package fl.controls { import flash.display.*; import fl.core.*; import flash.events.*; import fl.managers.*; import fl.events.*; import flash.ui.*; public class Slider extends UIComponent implements IFocusManagerComponent { protected var _direction:String; protected var _liveDragging:Boolean;// = false protected var _value:Number;// = 0 protected var _snapInterval:Number;// = 0 protected var _minimum:Number;// = 0 protected var _maximum:Number;// = 10 protected var track:BaseButton; protected var _tickInterval:Number;// = 0 protected var tickContainer:Sprite; protected var thumb:BaseButton; protected static const TICK_STYLES:Object = {upSkin:"tickSkin"}; protected static const TRACK_STYLES:Object = {upSkin:"sliderTrackSkin", overSkin:"sliderTrackSkin", downSkin:"sliderTrackSkin", disabledSkin:"sliderTrackDisabledSkin"}; protected static const THUMB_STYLES:Object = {upSkin:"thumbUpSkin", overSkin:"thumbOverSkin", downSkin:"thumbDownSkin", disabledSkin:"thumbDisabledSkin"}; protected static var defaultStyles:Object = {thumbUpSkin:"SliderThumb_upSkin", thumbOverSkin:"SliderThumb_overSkin", thumbDownSkin:"SliderThumb_downSkin", thumbDisabledSkin:"SliderThumb_disabledSkin", sliderTrackSkin:"SliderTrack_skin", sliderTrackDisabledSkin:"SliderTrack_disabledSkin", tickSkin:"SliderTick_skin", focusRectSkin:null, focusRectPadding:null}; public function Slider(){ _direction = SliderDirection.HORIZONTAL; _minimum = 0; _maximum = 10; _value = 0; _tickInterval = 0; _snapInterval = 0; _liveDragging = false; super(); setStyles(); } public function get minimum():Number{ return (_minimum); } public function set minimum(_arg1:Number):void{ _minimum = _arg1; this.value = Math.max(_arg1, this.value); invalidate(InvalidationType.DATA); } public function get maximum():Number{ return (_maximum); } protected function positionThumb():void{ thumb.x = ((((_direction)==SliderDirection.VERTICAL) ? ((maximum - minimum) - value) : (value - minimum) / (maximum - minimum)) * _width); } protected function clearTicks():void{ if (((!(tickContainer)) || (!(tickContainer.parent)))){ return; }; removeChild(tickContainer); } protected function onTrackClick(_arg1:MouseEvent):void{ calculateValue(track.mouseX, InteractionInputType.MOUSE, SliderEventClickTarget.TRACK); if (!liveDragging){ dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.TRACK, InteractionInputType.MOUSE)); }; } public function set maximum(_arg1:Number):void{ _maximum = _arg1; this.value = Math.min(_arg1, this.value); invalidate(InvalidationType.DATA); } public function get liveDragging():Boolean{ return (_liveDragging); } protected function doDrag(_arg1:MouseEvent):void{ var _local2:Number; var _local3:Number; _local2 = (_width / snapInterval); _local3 = track.mouseX; calculateValue(_local3, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB); dispatchEvent(new SliderEvent(SliderEvent.THUMB_DRAG, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE)); } override protected function keyDownHandler(_arg1:KeyboardEvent):void{ var _local2:uint; var _local3:Number; var _local4:Boolean; if (!enabled){ return; }; _local2 = ((snapInterval)>0) ? snapInterval : 1; _local4 = (direction == SliderDirection.HORIZONTAL); if ((((((_arg1.keyCode == Keyboard.DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.LEFT)) && (_local4))))){ _local3 = (value - _local2); } else { if ((((((_arg1.keyCode == Keyboard.UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.RIGHT)) && (_local4))))){ _local3 = (value + _local2); } else { if ((((((_arg1.keyCode == Keyboard.PAGE_DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.HOME)) && (_local4))))){ _local3 = minimum; } else { if ((((((_arg1.keyCode == Keyboard.PAGE_UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.END)) && (_local4))))){ _local3 = maximum; }; }; }; }; if (!isNaN(_local3)){ _arg1.stopPropagation(); doSetValue(_local3, InteractionInputType.KEYBOARD, null, _arg1.keyCode); }; } override public function set enabled(_arg1:Boolean):void{ if (enabled == _arg1){ return; }; super.enabled = _arg1; track.enabled = (thumb.enabled = _arg1); } protected function thumbPressHandler(_arg1:MouseEvent):void{ stage.addEventListener(MouseEvent.MOUSE_MOVE, doDrag, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true); dispatchEvent(new SliderEvent(SliderEvent.THUMB_PRESS, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB)); } public function get snapInterval():Number{ return (_snapInterval); } protected function thumbReleaseHandler(_arg1:MouseEvent):void{ stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag); stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler); dispatchEvent(new SliderEvent(SliderEvent.THUMB_RELEASE, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB)); dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE)); } public function set liveDragging(_arg1:Boolean):void{ _liveDragging = _arg1; } public function set value(_arg1:Number):void{ doSetValue(_arg1); } public function set direction(_arg1:String):void{ var _local2:Boolean; _direction = _arg1; _local2 = (_direction == SliderDirection.VERTICAL); if (isLivePreview){ if (_local2){ setScaleY(-1); y = track.height; } else { setScaleY(1); y = 0; }; positionThumb(); return; }; if (((_local2) && (componentInspectorSetting))){ if ((rotation % 90) == 0){ setScaleY(-1); }; }; if (!componentInspectorSetting){ rotation = (_local2) ? 90 : 0; }; } public function set tickInterval(_arg1:Number):void{ _tickInterval = _arg1; invalidate(InvalidationType.SIZE); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES)){ setStyles(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ track.setSize(_width, track.height); track.drawNow(); thumb.drawNow(); }; if (tickInterval > 0){ drawTicks(); } else { clearTicks(); }; positionThumb(); super.draw(); } override protected function configUI():void{ super.configUI(); thumb = new BaseButton(); thumb.setSize(13, 13); thumb.autoRepeat = false; addChild(thumb); thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true); track = new BaseButton(); track.move(0, 0); track.setSize(80, 4); track.autoRepeat = false; track.useHandCursor = false; track.addEventListener(MouseEvent.CLICK, onTrackClick, false, 0, true); addChildAt(track, 0); } public function set snapInterval(_arg1:Number):void{ _snapInterval = _arg1; } public function get value():Number{ return (_value); } public function get direction():String{ return (_direction); } public function get tickInterval():Number{ return (_tickInterval); } override public function setSize(_arg1:Number, _arg2:Number):void{ if ((((_direction == SliderDirection.VERTICAL)) && (!(isLivePreview)))){ super.setSize(_arg2, _arg1); } else { super.setSize(_arg1, _arg2); }; invalidate(InvalidationType.SIZE); } protected function drawTicks():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:uint; var _local5:DisplayObject; clearTicks(); tickContainer = new Sprite(); _local1 = ((maximum)<1) ? (tickInterval / 100) : tickInterval; _local2 = ((maximum - minimum) / _local1); _local3 = (_width / _local2); _local4 = 0; while (_local4 <= _local2) { _local5 = getDisplayObjectInstance(getStyleValue("tickSkin")); _local5.x = (_local3 * _local4); _local5.y = ((track.y - _local5.height) - 2); tickContainer.addChild(_local5); _local4++; }; addChild(tickContainer); } protected function calculateValue(_arg1:Number, _arg2:String, _arg3:String, _arg4:int=undefined):void{ var _local5:Number; _local5 = ((_arg1 / _width) * (maximum - minimum)); if (_direction == SliderDirection.VERTICAL){ _local5 = (maximum - _local5); } else { _local5 = (minimum + _local5); }; doSetValue(_local5, _arg2, _arg3, _arg4); } protected function getPrecision(_arg1:Number):Number{ var _local2:String; _local2 = _arg1.toString(); if (_local2.indexOf(".") == -1){ return (0); }; return (_local2.split(".").pop().length); } protected function doSetValue(_arg1:Number, _arg2:String=null, _arg3:String=null, _arg4:int=undefined):void{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; _local5 = _value; if (((!((_snapInterval == 0))) && (!((_snapInterval == 1))))){ _local6 = Math.pow(10, getPrecision(snapInterval)); _local7 = (_snapInterval * _local6); _local8 = Math.round((_arg1 * _local6)); _local9 = (Math.round((_local8 / _local7)) * _local7); _arg1 = (_local9 / _local6); _value = Math.max(minimum, Math.min(maximum, _arg1)); } else { _value = Math.max(minimum, Math.min(maximum, Math.round(_arg1))); }; if (((!((_local5 == _value))) && (((((liveDragging) && (!((_arg3 == null))))) || ((_arg2 == InteractionInputType.KEYBOARD)))))){ dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, _arg3, _arg2, _arg4)); }; positionThumb(); } protected function setStyles():void{ copyStylesToChild(thumb, THUMB_STYLES); copyStylesToChild(track, TRACK_STYLES); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 8
//SliderDirection (fl.controls.SliderDirection) package fl.controls { public class SliderDirection { public static var HORIZONTAL:String = "horizontal"; public static var VERTICAL:String = "vertical"; } }//package fl.controls
Section 9
//ComponentShim (fl.core.ComponentShim) package fl.core { import flash.display.*; public dynamic class ComponentShim extends MovieClip { } }//package fl.core
Section 10
//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 11
//UIComponent (fl.core.UIComponent) package fl.core { import flash.display.*; import flash.events.*; import fl.managers.*; import flash.utils.*; import fl.events.*; import flash.text.*; 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 12
//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 13
//InteractionInputType (fl.events.InteractionInputType) package fl.events { public class InteractionInputType { public static const MOUSE:String = "mouse"; public static const KEYBOARD:String = "keyboard"; } }//package fl.events
Section 14
//SliderEvent (fl.events.SliderEvent) package fl.events { import flash.events.*; public class SliderEvent extends Event { protected var _triggerEvent:String; protected var _keyCode:Number; protected var _value:Number; protected var _clickTarget:String; public static const CHANGE:String = "change"; public static const THUMB_PRESS:String = "thumbPress"; public static const THUMB_DRAG:String = "thumbDrag"; public static const THUMB_RELEASE:String = "thumbRelease"; public function SliderEvent(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:int=0){ _value = _arg2; _keyCode = _arg5; _triggerEvent = _arg4; _clickTarget = _arg3; super(_arg1); } public function get clickTarget():String{ return (_clickTarget); } override public function clone():Event{ return (new SliderEvent(type, _value, _clickTarget, _triggerEvent, _keyCode)); } override public function toString():String{ return (formatToString("SliderEvent", "type", "value", "bubbles", "cancelable", "keyCode", "triggerEvent", "clickTarget")); } public function get triggerEvent():String{ return (_triggerEvent); } public function get value():Number{ return (_value); } public function get keyCode():Number{ return (_keyCode); } } }//package fl.events
Section 15
//SliderEventClickTarget (fl.events.SliderEventClickTarget) package fl.events { public class SliderEventClickTarget { public static const TRACK:String = "track"; public static const THUMB:String = "thumb"; } }//package fl.events
Section 16
//FocusManager (fl.managers.FocusManager) package fl.managers { import fl.controls.*; import flash.display.*; import fl.core.*; import flash.events.*; import flash.utils.*; import flash.text.*; 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 17
//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 18
//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 19
//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 20
//StyleManager (fl.managers.StyleManager) package fl.managers { import fl.core.*; import flash.utils.*; import flash.text.*; 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 21
//Intro_1 (phreedee_fla.Intro_1) package phreedee_fla { import flash.display.*; import flash.text.*; public dynamic class Intro_1 extends MovieClip { public var record:TextField; public var text2:TextField; public var text1:TextField; } }//package phreedee_fla
Section 22
//MainTimeline (phreedee_fla.MainTimeline) package phreedee_fla { import fl.controls.*; import flash.display.*; import flash.events.*; import flash.geom.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.ui.*; import flash.system.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.net.*; import flash.printing.*; import flash.xml.*; public dynamic class MainTimeline extends MovieClip { public var renderLines:CheckBox; public var CrashVar; public var renderOrder; public var i; public var __id0_:Label; public var tX; public var X; public var Y; public var GameTimer:Timer; public var intro:MovieClip; public var tY; public var c; public var BonusVar; public var engine; public var stereoOffset:Slider; public var LoseVar; public var MusicVar; public function MainTimeline(){ addFrameScript(0, frame1); __setProp_stereoOffset_Scene1_Layer1_1(); __setProp___id0__Scene1_Layer1_1(); __setProp_renderLines_Scene1_Layer1_1(); } public function MouseUp(_arg1:MouseEvent){ engine.leftMouse = false; } public function GetAngleWTarget(_arg1:Point, _arg2:Point):Number{ return ((((Math.atan2((_arg1.y - _arg2.y), (_arg1.x - _arg2.x)) / Math.PI) * 180) - 90)); } public function GetY(_arg1:Number, _arg2:Number){ return ((-(_arg2) * Math.cos(((_arg1 * Math.PI) / 180)))); } function __setProp_renderLines_Scene1_Layer1_1(){ try { renderLines["componentInspectorSetting"] = true; } catch(e:Error) { }; renderLines.enabled = true; renderLines.label = "Hide lines"; renderLines.labelPlacement = "right"; renderLines.selected = false; renderLines.visible = true; try { renderLines["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function GetDistanceWTarget(_arg1:Point, _arg2:Point):Number{ return (Math.sqrt((Math.pow((_arg1.x - _arg2.x), 2) + Math.pow((_arg1.y - _arg2.y), 2)))); } function __setProp___id0__Scene1_Layer1_1(){ try { __id0_["componentInspectorSetting"] = true; } catch(e:Error) { }; __id0_.autoSize = "none"; __id0_.condenseWhite = false; __id0_.enabled = true; __id0_.htmlText = ""; __id0_.selectable = false; __id0_.text = "stereo offset"; __id0_.visible = true; __id0_.wordWrap = false; try { __id0_["componentInspectorSetting"] = false; } catch(e:Error) { }; } public function GetAngle(_arg1:Point):Number{ return ((((Math.atan2(_arg1.y, _arg1.x) / Math.PI) * 180) - 90)); } public function GetDistance(_arg1:Point):Number{ return (Math.sqrt((Math.pow(_arg1.x, 2) + Math.pow(_arg1.y, 2)))); } public function RemoveTunnelSegment(){ engine.tunnel.splice(0, 1); engine.depthOffset = (engine.depthOffset + engine.segmentLength); } function frame1(){ renderOrder = new Array(3); tX = 0; while (tX < 3) { renderOrder[tX] = new Array(3); tY = 0; while (tY < 3) { renderOrder[tX][tY] = new Array(9); c = 0; X = 0; while (X < 3) { Y = 0; while (Y < 3) { renderOrder[tX][tY][c] = new Object(); renderOrder[tX][tY][c].block = new Point(X, Y); renderOrder[tX][tY][c].distance = -(GetDistance(new Point((tX - X), (tY - Y)))); c++; Y++; }; X++; }; renderOrder[tX][tY].sortOn("distance", Array.NUMERIC); tY++; }; tX++; }; LoseVar = new Lose(); BonusVar = new Bonus(); CrashVar = new Crash(); MusicVar = new Music(); MusicVar.play(0, 9999); intro.alpha = 0; engine = new Object(); engine.rotation = 0; engine.cycle = 50; engine.leftMouse = false; engine.velocity = 5; engine.tunnel = new Array(); engine.tunnelSize = 60; engine.segmentLength = 100; engine.depthOffset = 0; engine.cameraOffset = new Point(-500, 0); engine.screenCenter = new Point(275, 200); engine.shipPosition = new Point(1, 1); engine.timeUntilBonus = 200; engine.crashed = false; engine.invulnerable = 0; engine.blurredScreen = 0; engine.mainMenu = true; engine.menuAngle = 0; engine.record = 0; engine.stereoOffset = 2; engine.secondaryColor = 0.5; engine.primaryColor = 2; engine.colorBD = new Array(); engine.colorBD[0] = new BitmapData((engine.screenCenter.x * 2), (engine.screenCenter.y * 2), true, 0); engine.colorBD[1] = new BitmapData((engine.screenCenter.x * 2), (engine.screenCenter.y * 2), true, 0); engine.colorBitmaps = new Array(); engine.colorBitmaps[0] = new Bitmap(engine.colorBD[0]); engine.colorBitmaps[1] = new Bitmap(engine.colorBD[1]); engine.colorBitmapChilds = new Array(); engine.colorBitmapChilds[1] = this.addChild(engine.colorBitmaps[1]); engine.colorBitmapChilds[0] = this.addChild(engine.colorBitmaps[0]); engine.colorBitmapChilds[0].alpha = 0.5; engine.colorBitmapChilds[1].alpha = 0.5; engine.colorChilds = new Array(); engine.colorChilds[1] = new MovieClip(); engine.colorChilds[0] = new MovieClip(); engine.backgroundChilds = new Array(); engine.backgroundChilds[0] = engine.colorChilds[1].addChild(new MovieClip()); engine.backgroundChilds[1] = engine.colorChilds[0].addChild(new MovieClip()); engine.foregroundChilds = new Array(); engine.foregroundChilds[0] = engine.colorChilds[1].addChild(new MovieClip()); engine.foregroundChilds[1] = engine.colorChilds[0].addChild(new MovieClip()); i = 0; while (i < 12) { CreateTunnelSegment(); i++; }; GameTimer = new Timer(20); GameTimer.addEventListener(TimerEvent.TIMER, GameLoop); GameTimer.start(); stage.addEventListener(MouseEvent.MOUSE_DOWN, MouseDown); stage.addEventListener(MouseEvent.MOUSE_UP, MouseUp); stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); } public function keyDownHandler(_arg1:KeyboardEvent):void{ if (engine.crashed == false){ if (_arg1.keyCode == Keyboard.LEFT){ if (engine.shipPosition.x > 0){ engine.shipPosition.x--; }; } else { if (_arg1.keyCode == Keyboard.RIGHT){ if (engine.shipPosition.x < 2){ engine.shipPosition.x++; }; } else { if (_arg1.keyCode == Keyboard.UP){ stage.focus = null; if (engine.shipPosition.y > 0){ engine.shipPosition.y--; }; } else { if (_arg1.keyCode == Keyboard.DOWN){ stage.focus = null; if (engine.shipPosition.y < 2){ engine.shipPosition.y++; }; }; }; }; }; }; if ((((((_arg1.keyCode == Keyboard.SPACE)) && ((engine.mainMenu == true)))) && ((intro.alpha >= 1)))){ stage.focus = null; BonusVar.play(); engine.mainMenu = false; engine.velocity = 10; engine.shipPosition = new Point(1, 1); engine.cycle = 53; engine.crashed = false; engine.invulnerable = 0; engine.blurredScreen = 0; engine.timeUntilBonus = 200; engine.depthOffset = 0; }; } public function RenderTunnel(){ var _local1:*; var _local2:*; var _local3:*; var _local4:*; var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:ColorMatrixFilter; var _local12:*; var _local13:*; var _local14:*; var _local15:*; var _local16:*; var _local17:*; var _local18:*; var _local19:*; var _local20:*; var _local21:*; var _local22:*; var _local23:*; var _local24:*; var _local25:Matrix; engine.foregroundChilds[0].graphics.clear(); engine.foregroundChilds[1].graphics.clear(); engine.backgroundChilds[0].graphics.clear(); engine.backgroundChilds[1].graphics.clear(); _local1 = ((engine.segmentLength * engine.tunnel.length) + engine.depthOffset); _local2 = new Point(engine.cameraOffset.x, engine.cameraOffset.y); _local3 = new Point((1 - Math.floor((_local2.x / engine.tunnelSize))), (1 - Math.floor((_local2.y / engine.tunnelSize)))); _local4 = new Array(4); _local5 = new Array(4); _local6 = new Array(4); _local7 = new Array(4); _local8 = 0; while (_local8 < 4) { _local4[_local8] = new Array(4); _local5[_local8] = new Array(4); _local8++; }; _local9 = 0; _local10 = (engine.tunnel.length - 1); while (_local10 > -1) { _local8 = 0; while (_local8 < 4) { _local19 = 0; while (_local19 < 4) { _local4[_local8][_local19] = new Point(((engine.tunnelSize * (-2 + _local8)) + _local2.x), ((engine.tunnelSize * (-2 + _local19)) + _local2.y)); _local19++; }; _local8++; }; _local12 = GetAngle(new Point(engine.tunnelSize, _local1)); _local8 = 0; while (_local8 < 4) { _local19 = 0; while (_local19 < 4) { _local4[_local8][_local19] = new Point((engine.screenCenter.x + (GetX(_local12, ((_local4[_local8][_local19].x * _local12) / 1)) * (1 - (Math.random() * engine.blurredScreen)))), (engine.screenCenter.y + (GetX(_local12, ((_local4[_local8][_local19].y * _local12) / 1)) * (1 - (Math.random() * engine.blurredScreen))))); _local19++; }; _local8++; }; _local13 = 0xDD00; _local14 = 0xBB00; _local15 = 0xFF00; _local16 = 0xBFBFBF; _local17 = 39901; _local18 = 0xDD9B00; if (_local10 < (engine.tunnel.length - 1)){ _local20 = new Point(GetX(_local12, ((engine.stereoOffset * _local12) / 1)), 0); _local21 = new Point(GetX(_local9, ((engine.stereoOffset * _local9) / 1)), 0); _local22 = 0; while (_local22 < 2) { if (renderLines.selected == true){ engine.foregroundChilds[_local22].graphics.lineStyle(0, 2237183, 0); } else { if (_local22 == 0){ engine.foregroundChilds[_local22].graphics.lineStyle(1, 2237183, 1); } else { engine.foregroundChilds[_local22].graphics.lineStyle(1, 16716049, 1); }; }; if (_local22 == 1){ _local20.x = (_local20.x * -1); _local20.y = (_local20.y * -1); _local21.x = (_local21.x * -1); _local21.y = (_local21.y * -1); }; if (renderLines.selected == false){ engine.foregroundChilds[_local22].graphics.moveTo((_local4[0][0].x + _local20.x), (_local4[0][0].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[3][0].x + _local20.x), (_local4[3][0].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[3][3].x + _local20.x), (_local4[3][3].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[0][3].x + _local20.x), (_local4[0][3].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[0][0].x + _local20.x), (_local4[0][0].y + _local20.y)); _local8 = 0; while (_local8 < 4) { _local19 = 0; while (_local19 < 4) { if ((((((((_local8 == 0)) || ((_local8 == 3)))) || ((_local19 == 0)))) || ((_local19 == 3)))){ engine.foregroundChilds[_local22].graphics.moveTo((_local5[_local8][_local19].x + _local21.x), (_local5[_local8][_local19].y + _local21.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[_local8][_local19].x + _local20.x), (_local4[_local8][_local19].y + _local20.y)); }; _local19++; }; _local8++; }; }; _local23 = 1; if (engine.invulnerable > 0){ _local23 = 0.4; }; _local24 = 0; while (_local24 < 9) { if ((((((((_local3.x > -1)) && ((_local3.x < 3)))) && ((_local3.y > -1)))) && ((_local3.y < 3)))){ _local8 = renderOrder[_local3.x][_local3.y][_local24].block.x; _local19 = renderOrder[_local3.x][_local3.y][_local24].block.y; if (engine.tunnel[_local10].blocks[_local8][_local19] == true){ if ((((((_local4[_local8][_local19].y > engine.screenCenter.y)) && ((_local19 > 0)))) && ((engine.tunnel[_local10].blocks[_local8][(_local19 - 1)] == false)))){ engine.foregroundChilds[_local22].graphics.moveTo((_local4[_local8][_local19].x + _local20.x), (_local4[_local8][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.beginFill(_local13, _local23); engine.foregroundChilds[_local22].graphics.lineTo((_local5[_local8][_local19].x + _local21.x), (_local5[_local8][_local19].y + _local21.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local5[(_local8 + 1)][_local19].x + _local21.x), (_local5[(_local8 + 1)][_local19].y + _local21.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[(_local8 + 1)][_local19].x + _local20.x), (_local4[(_local8 + 1)][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[_local8][_local19].x + _local20.x), (_local4[_local8][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.endFill(); }; if ((((((_local4[_local8][(_local19 + 1)].y < engine.screenCenter.y)) && ((_local19 < 2)))) && ((engine.tunnel[_local10].blocks[_local8][(_local19 + 1)] == false)))){ engine.foregroundChilds[_local22].graphics.moveTo((_local4[_local8][(_local19 + 1)].x + _local20.x), (_local4[_local8][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.beginFill(_local13, _local23); engine.foregroundChilds[_local22].graphics.lineTo((_local5[_local8][(_local19 + 1)].x + _local21.x), (_local5[_local8][(_local19 + 1)].y + _local21.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local5[(_local8 + 1)][(_local19 + 1)].x + _local21.x), (_local5[(_local8 + 1)][(_local19 + 1)].y + _local21.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[(_local8 + 1)][(_local19 + 1)].x + _local20.x), (_local4[(_local8 + 1)][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[_local8][(_local19 + 1)].x + _local20.x), (_local4[_local8][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.endFill(); }; if ((((((_local4[_local8][_local19].x > engine.screenCenter.x)) && ((_local8 > 0)))) && ((engine.tunnel[_local10].blocks[(_local8 - 1)][_local19] == false)))){ engine.foregroundChilds[_local22].graphics.moveTo((_local4[_local8][_local19].x + _local20.x), _local4[_local8][_local19].y); engine.foregroundChilds[_local22].graphics.beginFill(_local14, _local23); engine.foregroundChilds[_local22].graphics.lineTo((_local5[_local8][_local19].x + _local21.x), (_local5[_local8][_local19].y + _local21.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local5[_local8][(_local19 + 1)].x + _local21.x), (_local5[_local8][(_local19 + 1)].y + _local21.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[_local8][(_local19 + 1)].x + _local20.x), (_local4[_local8][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[_local8][_local19].x + _local20.x), (_local4[_local8][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.endFill(); }; if ((((((_local4[(_local8 + 1)][_local19].x < engine.screenCenter.x)) && ((_local8 < 2)))) && ((engine.tunnel[_local10].blocks[(_local8 + 1)][_local19] == false)))){ engine.foregroundChilds[_local22].graphics.moveTo((_local4[(_local8 + 1)][_local19].x + _local20.x), (_local4[(_local8 + 1)][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.beginFill(_local14, _local23); engine.foregroundChilds[_local22].graphics.lineTo((_local5[(_local8 + 1)][_local19].x + _local21.x), (_local5[(_local8 + 1)][_local19].y + _local21.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local5[(_local8 + 1)][(_local19 + 1)].x + _local21.x), (_local5[(_local8 + 1)][(_local19 + 1)].y + _local21.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[(_local8 + 1)][(_local19 + 1)].x + _local20.x), (_local4[(_local8 + 1)][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[(_local8 + 1)][_local19].x + _local20.x), (_local4[(_local8 + 1)][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.endFill(); }; if (_local1 > 10){ engine.foregroundChilds[_local22].graphics.moveTo((_local4[_local8][_local19].x + _local20.x), (_local4[_local8][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.beginFill(_local15, _local23); engine.foregroundChilds[_local22].graphics.lineTo((_local4[(_local8 + 1)][_local19].x + _local20.x), (_local4[(_local8 + 1)][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[(_local8 + 1)][(_local19 + 1)].x + _local20.x), (_local4[(_local8 + 1)][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[_local8][(_local19 + 1)].x + _local20.x), (_local4[_local8][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[_local8][_local19].x + _local20.x), (_local4[_local8][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.endFill(); engine.foregroundChilds[_local22].graphics.moveTo((_local4[_local8][_local19].x + _local20.x), (_local4[_local8][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[(_local8 + 1)][(_local19 + 1)].x + _local20.x), (_local4[(_local8 + 1)][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.moveTo((_local4[_local8][(_local19 + 1)].x + _local20.x), (_local4[_local8][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[(_local8 + 1)][_local19].x + _local20.x), (_local4[(_local8 + 1)][_local19].y + _local20.y)); }; } else { if (engine.tunnel[_local10].blocks[_local8][_local19] == 2){ if (_local1 > 10){ engine.foregroundChilds[_local22].graphics.moveTo((_local4[_local8][_local19].x + _local20.x), (_local4[_local8][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.beginFill(_local17, 0.3); engine.foregroundChilds[_local22].graphics.lineTo((_local4[(_local8 + 1)][_local19].x + _local20.x), (_local4[(_local8 + 1)][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[(_local8 + 1)][(_local19 + 1)].x + _local20.x), (_local4[(_local8 + 1)][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[_local8][(_local19 + 1)].x + _local20.x), (_local4[_local8][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[_local8][_local19].x + _local20.x), (_local4[_local8][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.endFill(); }; } else { if (engine.tunnel[_local10].blocks[_local8][_local19] == 3){ if (_local1 > 10){ engine.foregroundChilds[_local22].graphics.moveTo((_local4[_local8][_local19].x + _local20.x), (_local4[_local8][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.beginFill(_local18, 0.6); engine.foregroundChilds[_local22].graphics.lineTo((_local4[(_local8 + 1)][(_local19 + 1)].x + _local20.x), (_local4[(_local8 + 1)][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[_local8][(_local19 + 1)].x + _local20.x), (_local4[_local8][(_local19 + 1)].y + _local20.y)); engine.foregroundChilds[_local22].graphics.lineTo((_local4[(_local8 + 1)][_local19].x + _local20.x), (_local4[(_local8 + 1)][_local19].y + _local20.y)); engine.foregroundChilds[_local22].graphics.endFill(); }; }; }; }; }; _local24++; }; if (_local10 == 0){ _local25 = new Matrix(); _local25.createGradientBox((engine.screenCenter.x * 2), (engine.screenCenter.y * 2), (90 * (Math.PI / 180)), 0, 0); engine.backgroundChilds[_local22].graphics.moveTo((_local4[0][3].x + _local20.x), (_local4[0][3].y + _local20.y)); engine.backgroundChilds[_local22].graphics.beginGradientFill("linear", [0, _local16], [1, 1], [0, 0xFF], _local25, SpreadMethod.PAD); engine.backgroundChilds[_local22].graphics.lineTo(engine.screenCenter.x, engine.screenCenter.y); engine.backgroundChilds[_local22].graphics.lineTo((_local4[3][3].x + _local20.x), (_local4[3][3].y + _local20.y)); engine.backgroundChilds[_local22].graphics.moveTo((_local4[0][3].x + _local20.x), (_local4[0][3].y + _local20.y)); engine.backgroundChilds[_local22].graphics.endFill(); _local25.createGradientBox((engine.screenCenter.x * 2), (engine.screenCenter.y * 2), (270 * (Math.PI / 180)), 0, 0); engine.backgroundChilds[_local22].graphics.moveTo((_local4[0][0].x + _local20.x), (_local4[0][0].y + _local20.y)); engine.backgroundChilds[_local22].graphics.beginGradientFill("linear", [0, _local16], [1, 1], [0, 0xFF], _local25, SpreadMethod.PAD); engine.backgroundChilds[_local22].graphics.lineTo(engine.screenCenter.x, engine.screenCenter.y); engine.backgroundChilds[_local22].graphics.lineTo((_local4[3][0].x + _local20.x), (_local4[3][0].y + _local20.y)); engine.backgroundChilds[_local22].graphics.moveTo((_local4[0][0].x + _local20.x), (_local4[0][0].y + _local20.y)); engine.backgroundChilds[_local22].graphics.endFill(); _local25.createGradientBox((engine.screenCenter.x * 2), (engine.screenCenter.y * 2), 0, 0, 0); engine.backgroundChilds[_local22].graphics.moveTo((_local4[3][0].x + _local20.x), (_local4[3][0].y + _local20.y)); engine.backgroundChilds[_local22].graphics.beginGradientFill("linear", [0, _local16], [1, 1], [0, 0xFF], _local25, SpreadMethod.PAD); engine.backgroundChilds[_local22].graphics.lineTo(engine.screenCenter.x, engine.screenCenter.y); engine.backgroundChilds[_local22].graphics.lineTo((_local4[3][3].x + _local20.x), (_local4[3][3].y + _local20.y)); engine.backgroundChilds[_local22].graphics.moveTo((_local4[3][0].x + _local20.x), (_local4[3][0].y + _local20.y)); engine.backgroundChilds[_local22].graphics.endFill(); _local25.createGradientBox((engine.screenCenter.x * 2), (engine.screenCenter.y * 2), (180 * (Math.PI / 180)), 0, 0); engine.backgroundChilds[_local22].graphics.moveTo((_local4[0][0].x + _local20.x), (_local4[0][0].y + _local20.y)); engine.backgroundChilds[_local22].graphics.beginGradientFill("linear", [0, _local16], [1, 1], [0, 0xFF], _local25, SpreadMethod.PAD); engine.backgroundChilds[_local22].graphics.lineTo(engine.screenCenter.x, engine.screenCenter.y); engine.backgroundChilds[_local22].graphics.lineTo((_local4[0][3].x + _local20.x), (_local4[0][3].y + _local20.y)); engine.backgroundChilds[_local22].graphics.moveTo((_local4[0][0].x + _local20.x), (_local4[0][0].y + _local20.y)); engine.backgroundChilds[_local22].graphics.endFill(); }; _local22++; }; }; _local8 = 0; while (_local8 < 4) { _local19 = 0; while (_local19 < 4) { _local5[_local8][_local19] = new Point(_local4[_local8][_local19].x, _local4[_local8][_local19].y); _local19++; }; _local8++; }; _local9 = _local12; _local1 = (_local1 - engine.segmentLength); _local10--; }; engine.colorBD[0].colorTransform(new Rectangle(0, 0, (engine.screenCenter.x * 2), (engine.screenCenter.y * 2)), new ColorTransform(0, 0, 0, 0, 0, 0, 0)); engine.colorBD[1].colorTransform(new Rectangle(0, 0, (engine.screenCenter.x * 2), (engine.screenCenter.y * 2)), new ColorTransform(0, 0, 0, 0, 0, 0, 0)); engine.colorBD[0].draw(engine.colorChilds[0]); engine.colorBD[1].draw(engine.colorChilds[1]); _local11 = new ColorMatrixFilter([engine.secondaryColor, 0, 0, 0, 0, 0, engine.secondaryColor, 0, 0, 0, 0, 0, (engine.primaryColor * 1), 0, 0, 0, 0, 0, 1, 0]); engine.colorBD[0].applyFilter(engine.colorBD[0], engine.colorBD[0].rect, new Point(), _local11); _local11 = new ColorMatrixFilter([engine.primaryColor, 0, 0, 0, 0, 0, engine.secondaryColor, 0, 0, 0, 0, 0, engine.secondaryColor, 0, 0, 0, 0, 0, 1, 0]); engine.colorBD[1].applyFilter(engine.colorBD[1], engine.colorBD[1].rect, new Point(), _local11); } public function MouseDown(_arg1:MouseEvent){ engine.leftMouse = true; } public function GameLoop(_arg1:TimerEvent){ var _local2:*; var _local3:*; var _local4:*; RenderTunnel(); engine.stereoOffset = stereoOffset.value; if (engine.mainMenu == true){ intro.visible = true; if (intro.alpha < 1){ intro.alpha = (intro.alpha + 0.05); }; intro.record.text = Math.floor(engine.record); engine.menuAngle = ((engine.menuAngle + 5) % 360); intro.text1.alpha = (0.5 - GetX(engine.menuAngle, 0.3)); intro.text2.alpha = (0.5 - GetX(engine.menuAngle, 0.3)); intro.text1.x = GetX(engine.menuAngle, 10); intro.text2.x = (-20 + GetX(engine.menuAngle, -10)); _local2 = new Point(-160, 25); engine.cameraOffset.x = ((_local2.x + (engine.cameraOffset.x * 30)) / 31); engine.cameraOffset.y = ((_local2.y + (engine.cameraOffset.y * 30)) / 31); engine.depthOffset = (engine.depthOffset - 10); while (engine.depthOffset < (-(engine.segmentLength) * 1.5)) { RemoveTunnelSegment(); CreateTunnelSegment(); }; } else { if (engine.timeUntilBonus > 0){ engine.timeUntilBonus--; }; if (intro.alpha > 0){ intro.alpha = (intro.alpha - 0.05); } else { intro.visible = false; }; engine.depthOffset = (engine.depthOffset - engine.velocity); while (engine.depthOffset < (-(engine.segmentLength) * 1.5)) { RemoveTunnelSegment(); CreateTunnelSegment(); }; _local3 = new Point(((2 - Math.floor((engine.cameraOffset.x / 50))) - 1), ((2 - Math.floor((engine.cameraOffset.y / 50))) - 1)); if ((((((((_local3.x > -1)) && ((_local3.x < 3)))) && ((_local3.y > -1)))) && ((_local3.y < 3)))){ if ((((((engine.invulnerable == 0)) && ((engine.tunnel[1].blocks[_local3.x][_local3.y] == 1)))) && ((((((engine.depthOffset < -100)) && ((engine.depthOffset > -150)))) && ((engine.crashed == false)))))){ engine.crashed = true; LoseVar.play(); engine.tunnel[1].blocks[_local3.x][_local3.y] = 0; } else { if ((((engine.tunnel[1].blocks[_local3.x][_local3.y] == 3)) && ((((((engine.depthOffset < -100)) && ((engine.depthOffset > -150)))) && ((engine.crashed == false)))))){ engine.invulnerable = 70; BonusVar.play(); engine.tunnel[1].blocks[_local3.x][_local3.y] = 0; } else { if ((((engine.tunnel[1].blocks[_local3.x][_local3.y] == 2)) && ((((((engine.depthOffset < -100)) && ((engine.depthOffset > -150)))) && ((engine.crashed == false)))))){ engine.blurredScreen = 1; CrashVar.play(); engine.tunnel[1].blocks[_local3.x][_local3.y] = 0; }; }; }; }; if (engine.invulnerable > 0){ engine.invulnerable--; engine.colorBitmapChilds[0].alpha = 1; engine.colorBitmapChilds[1].alpha = 0; if (engine.invulnerable == 0){ engine.colorBitmapChilds[0].alpha = 0.5; engine.colorBitmapChilds[1].alpha = 0.5; }; }; if ((((engine.blurredScreen > 0)) && ((engine.crashed == false)))){ engine.blurredScreen = (engine.blurredScreen - 0.05); }; engine.cycle = (engine.cycle + 0.005); _local2 = new Point(((150 - (engine.shipPosition.x * 60)) - 55), ((150 - (engine.shipPosition.y * 60)) - 60)); engine.cameraOffset.x = ((_local2.x + (engine.cameraOffset.x * 3)) / 4); engine.cameraOffset.y = ((_local2.y + (engine.cameraOffset.y * 3)) / 4); _local4 = 100; engine.velocity = (((engine.velocity * 4000) + _local4) / 4001); if (engine.crashed == true){ if (engine.cycle > engine.record){ engine.record = engine.cycle; }; engine.depthOffset = (engine.depthOffset + 20); engine.velocity = 0; engine.blurredScreen = (engine.blurredScreen + 0.025); engine.colorBitmapChilds[0].alpha = (engine.colorBitmapChilds[0].alpha - 0.1); engine.colorBitmapChilds[1].alpha = (engine.colorBitmapChilds[1].alpha + 0.1); if (engine.blurredScreen > 1){ engine.mainMenu = true; engine.cameraOffset = new Point(-500, 0); engine.cycle = 0; engine.blurredScreen = 0; engine.colorBitmapChilds[0].alpha = 0.5; engine.colorBitmapChilds[1].alpha = 0.5; i = 0; while (i < 12) { RemoveTunnelSegment(); CreateTunnelSegment(); i++; }; engine.depthOffset = 0; }; }; }; } public function GetX(_arg1:Number, _arg2:Number){ return ((_arg2 * Math.sin(((_arg1 * Math.PI) / 180)))); } public function CreateTunnelSegment(){ var _local1:*; _local1 = engine.tunnel.length; engine.tunnel[_local1] = new Object(); engine.tunnel[_local1].blocks = new Array(3); engine.tunnel[_local1].blocks[0] = new Array(Math.round(((Math.random() * engine.cycle) * 0.01)), Math.round(((Math.random() * engine.cycle) * 0.01)), Math.round(((Math.random() * engine.cycle) * 0.01))); engine.tunnel[_local1].blocks[1] = new Array(Math.round(((Math.random() * engine.cycle) * 0.01)), Math.round(((Math.random() * engine.cycle) * 0.01)), Math.round(((Math.random() * engine.cycle) * 0.01))); engine.tunnel[_local1].blocks[2] = new Array(Math.round(((Math.random() * engine.cycle) * 0.01)), Math.round(((Math.random() * engine.cycle) * 0.01)), Math.round(((Math.random() * engine.cycle) * 0.01))); if (engine.timeUntilBonus == 0){ engine.timeUntilBonus = 200; engine.tunnel[_local1].blocks[Math.floor((Math.random() * 2.99))][Math.floor((Math.random() * 2.99))] = 3; }; while (Math.random() < 0.2) { engine.tunnel[_local1].blocks[Math.floor((Math.random() * 2.99))][Math.floor((Math.random() * 2.99))] = 2; }; } function __setProp_stereoOffset_Scene1_Layer1_1(){ try { stereoOffset["componentInspectorSetting"] = true; } catch(e:Error) { }; stereoOffset.direction = "horizontal"; stereoOffset.enabled = true; stereoOffset.liveDragging = false; stereoOffset.maximum = 50; stereoOffset.minimum = 0; stereoOffset.snapInterval = 0; stereoOffset.tickInterval = 0; stereoOffset.value = 5; stereoOffset.visible = true; try { stereoOffset["componentInspectorSetting"] = false; } catch(e:Error) { }; } } }//package phreedee_fla
Section 23
//Bonus (Bonus) package { import flash.media.*; public dynamic class Bonus extends Sound { } }//package
Section 24
//CheckBox_disabledIcon (CheckBox_disabledIcon) package { import flash.display.*; public dynamic class CheckBox_disabledIcon extends MovieClip { } }//package
Section 25
//CheckBox_downIcon (CheckBox_downIcon) package { import flash.display.*; public dynamic class CheckBox_downIcon extends MovieClip { } }//package
Section 26
//CheckBox_overIcon (CheckBox_overIcon) package { import flash.display.*; public dynamic class CheckBox_overIcon extends MovieClip { } }//package
Section 27
//CheckBox_selectedDisabledIcon (CheckBox_selectedDisabledIcon) package { import flash.display.*; public dynamic class CheckBox_selectedDisabledIcon extends MovieClip { } }//package
Section 28
//CheckBox_selectedDownIcon (CheckBox_selectedDownIcon) package { import flash.display.*; public dynamic class CheckBox_selectedDownIcon extends MovieClip { } }//package
Section 29
//CheckBox_selectedOverIcon (CheckBox_selectedOverIcon) package { import flash.display.*; public dynamic class CheckBox_selectedOverIcon extends MovieClip { } }//package
Section 30
//CheckBox_selectedUpIcon (CheckBox_selectedUpIcon) package { import flash.display.*; public dynamic class CheckBox_selectedUpIcon extends MovieClip { } }//package
Section 31
//CheckBox_upIcon (CheckBox_upIcon) package { import flash.display.*; public dynamic class CheckBox_upIcon extends MovieClip { } }//package
Section 32
//Crash (Crash) package { import flash.media.*; public dynamic class Crash extends Sound { } }//package
Section 33
//focusRectSkin (focusRectSkin) package { import flash.display.*; public dynamic class focusRectSkin extends MovieClip { } }//package
Section 34
//Lose (Lose) package { import flash.media.*; public dynamic class Lose extends Sound { } }//package
Section 35
//Music (Music) package { import flash.media.*; public dynamic class Music extends Sound { } }//package
Section 36
//SliderThumb_disabledSkin (SliderThumb_disabledSkin) package { import flash.display.*; public dynamic class SliderThumb_disabledSkin extends MovieClip { } }//package
Section 37
//SliderThumb_downSkin (SliderThumb_downSkin) package { import flash.display.*; public dynamic class SliderThumb_downSkin extends MovieClip { } }//package
Section 38
//SliderThumb_overSkin (SliderThumb_overSkin) package { import flash.display.*; public dynamic class SliderThumb_overSkin extends MovieClip { } }//package
Section 39
//SliderThumb_upSkin (SliderThumb_upSkin) package { import flash.display.*; public dynamic class SliderThumb_upSkin extends MovieClip { } }//package
Section 40
//SliderTick_skin (SliderTick_skin) package { import flash.display.*; public dynamic class SliderTick_skin extends MovieClip { } }//package
Section 41
//SliderTrack_disabledSkin (SliderTrack_disabledSkin) package { import flash.display.*; public dynamic class SliderTrack_disabledSkin extends MovieClip { } }//package
Section 42
//SliderTrack_skin (SliderTrack_skin) package { import flash.display.*; public dynamic class SliderTrack_skin extends MovieClip { } }//package

Library Items

Symbol 1 Sound {Music}
Symbol 2 Sound {Lose}
Symbol 3 Sound {Crash}
Symbol 4 Sound {Bonus}
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClipUses:5Used by:8 25 41
Symbol 7 MovieClip {fl.core.ComponentShim}Used by:8 25 41
Symbol 8 MovieClip {fl.controls.Label}Uses:6 7Used by:Timeline
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClip {SliderThumb_upSkin}Uses:9Used by:25
Symbol 11 GraphicUsed by:12
Symbol 12 MovieClip {SliderThumb_overSkin}Uses:11Used by:25
Symbol 13 GraphicUsed by:14
Symbol 14 MovieClip {SliderThumb_downSkin}Uses:13Used by:25
Symbol 15 GraphicUsed by:16
Symbol 16 MovieClip {SliderThumb_disabledSkin}Uses:15Used by:25
Symbol 17 GraphicUsed by:18
Symbol 18 MovieClip {SliderTrack_skin}Uses:17Used by:25
Symbol 19 GraphicUsed by:20
Symbol 20 MovieClip {SliderTick_skin}Uses:19Used by:25
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClip {SliderTrack_disabledSkin}Uses:21Used by:25
Symbol 23 GraphicUsed by:24
Symbol 24 MovieClip {focusRectSkin}Uses:23Used by:25 41
Symbol 25 MovieClip {fl.controls.Slider}Uses:6 7 10 12 14 16 18 20 22 24Used by:Timeline
Symbol 26 GraphicUsed by:27 36
Symbol 27 MovieClip {CheckBox_upIcon}Uses:26Used by:41
Symbol 28 GraphicUsed by:29 37
Symbol 29 MovieClip {CheckBox_overIcon}Uses:28Used by:41
Symbol 30 GraphicUsed by:31 38
Symbol 31 MovieClip {CheckBox_downIcon}Uses:30Used by:41
Symbol 32 GraphicUsed by:33
Symbol 33 MovieClip {CheckBox_disabledIcon}Uses:32Used by:41
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClipUses:34Used by:36 37 38 40
Symbol 36 MovieClip {CheckBox_selectedUpIcon}Uses:26 35Used by:41
Symbol 37 MovieClip {CheckBox_selectedOverIcon}Uses:28 35Used by:41
Symbol 38 MovieClip {CheckBox_selectedDownIcon}Uses:30 35Used by:41
Symbol 39 GraphicUsed by:40
Symbol 40 MovieClip {CheckBox_selectedDisabledIcon}Uses:39 35Used by:41
Symbol 41 MovieClip {fl.controls.CheckBox}Uses:6 7 27 29 31 33 36 37 38 40 24Used by:Timeline
Symbol 42 GraphicUsed by:52
Symbol 43 FontUsed by:44 45
Symbol 44 EditableTextUses:43Used by:52
Symbol 45 EditableTextUses:43Used by:52
Symbol 46 FontUsed by:47 48 49 50 51
Symbol 47 EditableTextUses:46Used by:52
Symbol 48 EditableTextUses:46Used by:52
Symbol 49 EditableTextUses:46Used by:52
Symbol 50 EditableTextUses:46Used by:52
Symbol 51 EditableTextUses:46Used by:52
Symbol 52 MovieClip {phreedee_fla.Intro_1}Uses:42 44 45 47 48 49 50 51Used by:Timeline

Instance Names

"intro"Frame 1Symbol 52 MovieClip {phreedee_fla.Intro_1}
"renderLines"Frame 1Symbol 41 MovieClip {fl.controls.CheckBox}
"stereoOffset"Frame 1Symbol 25 MovieClip {fl.controls.Slider}
"__id0_"Frame 1Symbol 8 MovieClip {fl.controls.Label}
"text2"Symbol 52 MovieClip {phreedee_fla.Intro_1} Frame 1Symbol 44 EditableText
"text1"Symbol 52 MovieClip {phreedee_fla.Intro_1} Frame 1Symbol 45 EditableText
"record"Symbol 52 MovieClip {phreedee_fla.Intro_1} Frame 1Symbol 49 EditableText

Special Tags

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




http://swfchan.com/18/89143/info.shtml
Created: 29/3 -2019 04:17:35 Last modified: 29/3 -2019 04:17:35 Server time: 22/12 -2024 12:28:00