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

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

Abombinaball.swf

This is the info page for
Flash #70639

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


Text
Start Game

Instructions

Credits

More Games

Level Password

ActionScript [AS3]

Section 1
//KeyPoll (bigroom.input.KeyPoll) package bigroom.input { import flash.display.*; import flash.events.*; import flash.utils.*; public class KeyPoll { private var states:ByteArray; private var dispObj:DisplayObject; private var lastKeyCode:uint; private var isKeyDown:Boolean; public static const Z:uint = 90; public static const LEFT:uint = 37; public static const RIGHTBRACKET:uint = 221; public static const EQUAL:uint = 187; public static const COMMAND:uint = 19; public static const CONTROL:uint = 17; public static const NUMPAD_DECIMAL:uint = 110; public static const A:uint = 65; public static const B:uint = 66; public static const C:uint = 67; public static const D:uint = 68; public static const E:uint = 69; public static const F:uint = 70; public static const G:uint = 71; public static const H:uint = 72; public static const I:uint = 73; public static const J:uint = 74; public static const L:uint = 76; public static const M:uint = 77; public static const N:uint = 78; public static const O:uint = 79; public static const MINUS:uint = 189; public static const K:uint = 75; public static const S:uint = 83; public static const NUMPAD:uint = 21; public static const NUMPAD_ENTER:uint = 108; public static const P:uint = 80; public static const PAGE_DOWN:uint = 34; public static const ALTERNATE:uint = 18; public static const T:uint = 84; public static const BACKSPACE:uint = 8; public static const PAGE_UP:uint = 33; public static const X:uint = 88; public static const Y:uint = 89; public static const Q:uint = 81; public static const QUOTE:uint = 222; public static const SLASH:uint = 191; public static const U:uint = 85; public static const W:uint = 87; public static const SHIFT:uint = 16; public static const TAB:uint = 9; public static const R:uint = 82; public static const ESCAPE:uint = 27; public static const NUMPAD_ADD:uint = 107; public static const LEFTBRACKET:uint = 219; public static const DOWN:uint = 40; public static const F1:uint = 112; public static const F3:uint = 114; public static const F4:uint = 115; public static const F5:uint = 116; public static const F6:uint = 117; public static const F7:uint = 118; public static const F8:uint = 119; public static const F2:uint = 113; public static const COMMA:uint = 188; public static const ENTER:uint = 13; public static const INSERT:uint = 45; public static const DELETE:uint = 46; public static const NUMBER_1:uint = 49; public static const NUMBER_2:uint = 50; public static const NUMBER_3:uint = 51; public static const NUMBER_5:uint = 53; public static const NUMBER_6:uint = 54; public static const NUMBER_0:uint = 48; public static const END:uint = 35; public static const NUMBER_9:uint = 57; public static const NUMPAD_6:uint = 102; public static const NUMPAD_1:uint = 97; public static const NUMPAD_2:uint = 98; public static const NUMBER_7:uint = 55; public static const CAPS_LOCK:uint = 20; public static const F9:uint = 120; public static const NUMBER_4:uint = 52; public static const NUMBER_8:uint = 56; public static const BACKQUOTE:uint = 192; public static const BACKSLASH:uint = 220; public static const SEMICOLON:uint = 186; public static const NUMPAD_DIVIDE:uint = 111; public static const NUMPAD_3:uint = 99; public static const NUMPAD_4:uint = 100; public static const NUMPAD_5:uint = 101; public static const NUMPAD_7:uint = 103; public static const NUMPAD_8:uint = 104; public static const HOME:uint = 36; public static const NUMPAD_0:uint = 96; public static const PERIOD:uint = 190; public static const F10:uint = 121; public static const F11:uint = 122; public static const F12:uint = 123; public static const F13:uint = 124; public static const F14:uint = 125; public static const F15:uint = 126; public static const V:uint = 86; public static const SPACE:uint = 32; public static const NUMPAD_MULTIPLY:uint = 106; public static const NUMPAD_SUBTRACT:uint = 109; public static const NUMPAD_9:uint = 105; public static const RIGHT:uint = 39; public static const UP:uint = 38; public function KeyPoll(_arg1:DisplayObject){ states = new ByteArray(); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); dispObj = _arg1; dispObj.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener, false, 0, true); dispObj.addEventListener(KeyboardEvent.KEY_UP, keyUpListener, false, 0, true); dispObj.addEventListener(Event.ACTIVATE, resetKeyStates, false, 0, true); dispObj.addEventListener(Event.DEACTIVATE, resetKeyStates, false, 0, true); } public function isUp(_arg1:uint, _arg2:uint=0, _arg3:uint=0):Boolean{ var _local4:Boolean; _local4 = ((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0); if ((((_arg2 > 0)) && ((_local4 == true)))){ _local4 = ((states[(_arg2 >>> 3)] & (1 << (_arg2 & 7))) == 0); }; if ((((_arg3 > 0)) && ((_local4 == true)))){ _local4 = ((states[(_arg3 >>> 3)] & (1 << (_arg3 & 7))) == 0); }; return (_local4); } public function get keyIsDown():Boolean{ return (isKeyDown); } private function resetKeyStates(_arg1:Event):void{ var _local2:int; _local2 = 0; while (_local2 < 32) { states[_local2] = 0; _local2++; }; lastKeyCode = 0; } public function get keyCode():uint{ return (lastKeyCode); } public function isDown(_arg1:uint, _arg2:uint=0, _arg3:uint=0):Boolean{ var _local4:Boolean; _local4 = !(((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0)); if ((((_arg2 > 0)) && ((_local4 == true)))){ _local4 = !(((states[(_arg2 >>> 3)] & (1 << (_arg2 & 7))) == 0)); }; if ((((_arg3 > 0)) && ((_local4 == true)))){ _local4 = !(((states[(_arg3 >>> 3)] & (1 << (_arg3 & 7))) == 0)); }; return (_local4); } private function keyDownListener(_arg1:KeyboardEvent):void{ states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] | (1 << (_arg1.keyCode & 7))); lastKeyCode = _arg1.keyCode; isKeyDown = true; } private function keyUpListener(_arg1:KeyboardEvent):void{ states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] & ~((1 << (_arg1.keyCode & 7)))); lastKeyCode = 0; isKeyDown = false; } } }//package bigroom.input
Section 2
//BaseButton (fl.controls.BaseButton) package fl.controls { import flash.display.*; import flash.events.*; import fl.core.*; 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 3
//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 4
//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 5
//LabelButton (fl.controls.LabelButton) package fl.controls { import flash.display.*; import flash.events.*; import fl.core.*; import fl.managers.*; import flash.text.*; import fl.events.*; 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 6
//TextInput (fl.controls.TextInput) package fl.controls { import flash.display.*; import flash.events.*; import fl.core.*; import fl.managers.*; import flash.text.*; import fl.events.*; import flash.ui.*; public class TextInput extends UIComponent implements IFocusManagerComponent { protected var _html:Boolean;// = false protected var _savedHTML:String; protected var background:DisplayObject; protected var _editable:Boolean;// = true public var textField:TextField; private static var defaultStyles:Object = {upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:0, embedFonts:false}; public static var createAccessibilityImplementation:Function; public function TextInput(){ _editable = true; _html = false; super(); } override public function drawFocus(_arg1:Boolean):void{ if (focusTarget != null){ focusTarget.drawFocus(_arg1); return; }; super.drawFocus(_arg1); } public function set imeMode(_arg1:String):void{ _imeMode = _arg1; } override protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((((_arg1 == textField)) || (super.isOurFocus(_arg1)))); } protected function handleKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ENTER){ dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true)); }; } public function set text(_arg1:String):void{ textField.text = _arg1; _html = false; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); } protected function updateTextFieldType():void{ textField.type = (((enabled) && (editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC; textField.selectable = enabled; } public function get selectionEndIndex():int{ return (textField.selectionEndIndex); } public function get editable():Boolean{ return (_editable); } override protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (_arg1.target == this){ stage.focus = textField; }; _local2 = focusManager; if (((editable) && (_local2))){ _local2.showFocusIndicator = true; if (((textField.selectable) && ((textField.selectionBeginIndex == textField.selectionBeginIndex)))){ setSelection(0, textField.length); }; }; super.focusInHandler(_arg1); if (editable){ setIMEMode(true); }; } public function get selectionBeginIndex():int{ return (textField.selectionBeginIndex); } public function set alwaysShowSelection(_arg1:Boolean):void{ textField.alwaysShowSelection = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; updateTextFieldType(); } protected function setEmbedFont(){ var _local1:Object; _local1 = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; } public function get horizontalScrollPosition():int{ return (textField.scrollH); } public function set condenseWhite(_arg1:Boolean):void{ textField.condenseWhite = _arg1; } public function set displayAsPassword(_arg1:Boolean):void{ textField.displayAsPassword = _arg1; } public function set horizontalScrollPosition(_arg1:int):void{ textField.scrollH = _arg1; } public function get restrict():String{ return (textField.restrict); } public function get textWidth():Number{ return (textField.textWidth); } public function get textHeight():Number{ return (textField.textHeight); } public function set editable(_arg1:Boolean):void{ _editable = _arg1; updateTextFieldType(); } public function get maxChars():int{ return (textField.maxChars); } public function get length():int{ return (textField.length); } public function getLineMetrics(_arg1:int):TextLineMetrics{ return (textField.getLineMetrics(_arg1)); } public function get imeMode():String{ return (_imeMode); } override protected function focusOutHandler(_arg1:FocusEvent):void{ super.focusOutHandler(_arg1); if (editable){ setIMEMode(false); }; } public function set htmlText(_arg1:String):void{ if (_arg1 == ""){ text = ""; return; }; _html = true; _savedHTML = _arg1; textField.htmlText = _arg1; invalidate(InvalidationType.DATA); invalidate(InvalidationType.STYLES); } public function get text():String{ return (textField.text); } override public function get enabled():Boolean{ return (super.enabled); } public function get condenseWhite():Boolean{ return (textField.condenseWhite); } public function get alwaysShowSelection():Boolean{ return (textField.alwaysShowSelection); } override protected function draw():void{ var _local1:Object; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawTextFormat(); drawBackground(); _local1 = getStyleValue("embedFonts"); if (_local1 != null){ textField.embedFonts = _local1; }; invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } protected function handleTextInput(_arg1:TextEvent):void{ _arg1.stopPropagation(); dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text)); } override protected function configUI():void{ super.configUI(); tabChildren = true; textField = new TextField(); addChild(textField); updateTextFieldType(); textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true); textField.addEventListener(Event.CHANGE, handleChange, false, 0, true); textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true); } public function setSelection(_arg1:int, _arg2:int):void{ textField.setSelection(_arg1, _arg2); } public function get displayAsPassword():Boolean{ return (textField.displayAsPassword); } public function appendText(_arg1:String):void{ textField.appendText(_arg1); } public function set restrict(_arg1:String):void{ if (((componentInspectorSetting) && ((_arg1 == "")))){ _arg1 = null; }; textField.restrict = _arg1; } public function get htmlText():String{ return (textField.htmlText); } protected function drawBackground():void{ var _local1:DisplayObject; var _local2:String; _local1 = background; _local2 = (enabled) ? "upSkin" : "disabledSkin"; background = getDisplayObjectInstance(getStyleValue(_local2)); if (background == null){ return; }; addChildAt(background, 0); if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){ removeChild(_local1); }; } override public function setFocus():void{ stage.focus = textField; } protected function drawLayout():void{ var _local1:Number; _local1 = Number(getStyleValue("textPadding")); if (background != null){ background.width = width; background.height = height; }; textField.width = (width - (2 * _local1)); textField.height = (height - (2 * _local1)); textField.x = (textField.y = _local1); } public function set maxChars(_arg1:int):void{ textField.maxChars = _arg1; } public function get maxHorizontalScrollPosition():int{ return (textField.maxScrollH); } protected function drawTextFormat():void{ var _local1:Object; var _local2:TextFormat; var _local3:TextFormat; _local1 = UIComponent.getStyleDefinition(); _local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat); textField.setTextFormat(_local2); _local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat); if (_local3 != null){ textField.setTextFormat(_local3); } else { _local3 = _local2; }; textField.defaultTextFormat = _local3; setEmbedFont(); if (_html){ textField.htmlText = _savedHTML; }; } protected function handleChange(_arg1:Event):void{ _arg1.stopPropagation(); dispatchEvent(new Event(Event.CHANGE, true)); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 7
//ComponentShim (fl.core.ComponentShim) package fl.core { import flash.display.*; public dynamic class ComponentShim extends MovieClip { } }//package fl.core
Section 8
//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 9
//UIComponent (fl.core.UIComponent) package fl.core { import flash.display.*; import flash.events.*; import fl.managers.*; import flash.text.*; import flash.utils.*; import fl.events.*; 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 10
//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 11
//FocusManager (fl.managers.FocusManager) package fl.managers { import fl.controls.*; import flash.display.*; import flash.events.*; import fl.core.*; import flash.text.*; import flash.utils.*; import flash.ui.*; public class FocusManager implements IFocusManager { private var focusableObjects:Dictionary; private var _showFocusIndicator:Boolean;// = true private var defButton:Button; private var focusableCandidates:Array; private var _form:DisplayObjectContainer; private var _defaultButtonEnabled:Boolean;// = true private var activated:Boolean;// = false private var _defaultButton:Button; private var calculateCandidates:Boolean;// = true private var lastFocus:InteractiveObject; private var lastAction:String; public function FocusManager(_arg1:DisplayObjectContainer){ activated = false; calculateCandidates = true; _showFocusIndicator = true; _defaultButtonEnabled = true; super(); focusableObjects = new Dictionary(true); if (_arg1 != null){ _form = _arg1; addFocusables(DisplayObject(_arg1)); _arg1.addEventListener(Event.ADDED, addedHandler); _arg1.addEventListener(Event.REMOVED, removedHandler); activate(); }; } public function get showFocusIndicator():Boolean{ return (_showFocusIndicator); } private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{ var _local5:int; var _local6:int; var _local7:DisplayObject; var _local8:IFocusManagerGroup; var _local9:int; var _local10:DisplayObject; var _local11:IFocusManagerGroup; _local5 = focusableCandidates.length; _local6 = _arg1; while (true) { if (_arg2){ _arg1--; } else { _arg1++; }; if (_arg3){ if (((_arg2) && ((_arg1 < 0)))){ break; }; if (((!(_arg2)) && ((_arg1 == _local5)))){ break; }; } else { _arg1 = ((_arg1 + _local5) % _local5); if (_local6 == _arg1){ break; }; }; if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){ _local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1])); if ((_local7 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local7); _local9 = 0; while (_local9 < focusableCandidates.length) { _local10 = focusableCandidates[_local9]; if ((_local10 is IFocusManagerGroup)){ _local11 = IFocusManagerGroup(_local10); if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){ _arg1 = _local9; break; }; }; _local9++; }; }; return (_arg1); }; }; return (_arg1); } public function set form(_arg1:DisplayObjectContainer):void{ _form = _arg1; } private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{ var focusable:IFocusManagerComponent; var io:InteractiveObject; var doc:DisplayObjectContainer; var i:int; var child:DisplayObject; var o = _arg1; var skipTopLevel = _arg2; if (!skipTopLevel){ if ((o is IFocusManagerComponent)){ focusable = IFocusManagerComponent(o); if (focusable.focusEnabled){ if (((focusable.tabEnabled) && (isTabVisible(o)))){ focusableObjects[o] = true; calculateCandidates = true; }; o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; } else { if ((o is InteractiveObject)){ io = (o as InteractiveObject); if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){ focusableObjects[io] = true; calculateCandidates = true; }; io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; }; }; if ((o is DisplayObjectContainer)){ doc = DisplayObjectContainer(o); o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){ i = 0; while (i < doc.numChildren) { try { child = doc.getChildAt(i); if (child != null){ addFocusables(doc.getChildAt(i)); }; } catch(error:SecurityError) { }; i = (i + 1); }; }; }; } private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{ return (_arg1.getChildIndex(_arg2)); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ if ((_arg1.relatedObject is TextField)){ return; }; _arg1.preventDefault(); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; _local2 = (_arg1.target as InteractiveObject); } private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{ var _local3:IFocusManagerGroup; if (!isEnabledAndVisible(_arg1)){ return (false); }; if ((_arg1 is IFocusManagerGroup)){ _local3 = IFocusManagerGroup(_arg1); if (_arg2 == _local3.groupName){ return (false); }; }; return (true); } public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{ var _local2:InteractiveObject; _local2 = _arg1; while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (_arg1); }; _arg1 = _arg1.parent; }; return (_local2); } private function sortFocusableObjectsTabIndex():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){ focusableCandidates.push(_local2); }; }; focusableCandidates.sort(sortByTabIndex); } private function removeFocusables(_arg1:DisplayObject):void{ var _local2:Object; var _local3:DisplayObject; if ((_arg1 is DisplayObjectContainer)){ _arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); _arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); for (_local2 in focusableObjects) { _local3 = DisplayObject(_local2); if (DisplayObjectContainer(_arg1).contains(_local3)){ if (_local3 == lastFocus){ lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local2]; calculateCandidates = true; }; }; }; } private function addedHandler(_arg1:Event):void{ var _local2:DisplayObject; _local2 = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{ while (_arg1 != InteractiveObject(form)) { if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){ return (_arg1); }; _arg1 = _arg1.parent; if (_arg1 == null){ break; }; }; return (null); } private function tabChildrenChangeHandler(_arg1:Event):void{ var _local2:DisplayObjectContainer; if (_arg1.target != _arg1.currentTarget){ return; }; calculateCandidates = true; _local2 = DisplayObjectContainer(_arg1.target); if (_local2.tabChildren){ addFocusables(_local2, true); } else { removeFocusables(_local2); }; } public function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); } public function getFocus():InteractiveObject{ var _local1:InteractiveObject; _local1 = form.stage.focus; return (findFocusManagerComponent(_local1)); } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; var _local3:TextField; var _local4:SimpleButton; _local2 = DisplayObject(form).parent; while (_arg1 != _local2) { if ((_arg1 is UIComponent)){ if (!UIComponent(_arg1).enabled){ return (false); }; } else { if ((_arg1 is TextField)){ _local3 = TextField(_arg1); if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){ return (false); }; } else { if ((_arg1 is SimpleButton)){ _local4 = SimpleButton(_arg1); if (!_local4.enabled){ return (false); }; }; }; }; if (!_arg1.visible){ return (false); }; _arg1 = _arg1.parent; }; return (true); } public function set defaultButton(_arg1:Button):void{ var _local2:Button; _local2 = (_arg1) ? Button(_arg1) : null; if (_local2 != _defaultButton){ if (_defaultButton){ _defaultButton.emphasized = false; }; if (defButton){ defButton.emphasized = false; }; _defaultButton = _local2; defButton = _local2; if (_local2){ _local2.emphasized = true; }; }; } private function deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); } public function setFocus(_arg1:InteractiveObject):void{ if ((_arg1 is IFocusManagerComponent)){ IFocusManagerComponent(_arg1).setFocus(); } else { form.stage.focus = _arg1; }; } private function setFocusToNextObject(_arg1:FocusEvent):void{ var _local2:InteractiveObject; if (!hasFocusableObjects()){ return; }; _local2 = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ setFocus(_local2); }; } private function hasFocusableObjects():Boolean{ var _local1:Object; for (_local1 in focusableObjects) { return (true); }; return (false); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = true; } private function sortFocusableObjects():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){ sortFocusableObjectsTabIndex(); return; }; focusableCandidates.push(_local2); }; focusableCandidates.sort(sortByDepth); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ showFocusIndicator = true; if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){ setFocusToNextObject(_arg1); _arg1.preventDefault(); }; } private function getIndexOfFocusedObject(_arg1:DisplayObject):int{ var _local2:int; var _local3:int; _local2 = focusableCandidates.length; _local3 = 0; _local3 = 0; while (_local3 < _local2) { if (focusableCandidates[_local3] == _arg1){ return (_local3); }; _local3++; }; return (-1); } public function hideFocus():void{ } private function removedHandler(_arg1:Event):void{ var _local2:int; var _local3:DisplayObject; var _local4:InteractiveObject; _local3 = DisplayObject(_arg1.target); if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){ if (_local3 == lastFocus){ IFocusManagerComponent(lastFocus).drawFocus(false); lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local3]; calculateCandidates = true; } else { if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){ _local4 = (_local3 as InteractiveObject); if (_local4){ if (_local4 == lastFocus){ lastFocus = null; }; delete focusableObjects[_local4]; calculateCandidates = true; }; _local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); }; }; removeFocusables(_local3); } private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{ var _local3:String; var _local4:String; var _local5:int; var _local6:String; var _local7:String; var _local8:String; var _local9:DisplayObject; var _local10:DisplayObject; _local3 = ""; _local4 = ""; _local8 = "0000"; _local9 = DisplayObject(_arg1); _local10 = DisplayObject(_arg2); while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) { _local5 = getChildIndex(_local9.parent, _local9); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local3 = (_local7 + _local3); _local9 = _local9.parent; }; while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) { _local5 = getChildIndex(_local10.parent, _local10); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local4 = (_local7 + _local4); _local10 = _local10.parent; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0); } public function get defaultButton():Button{ return (_defaultButton); } private function activateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); if (lastFocus){ if ((lastFocus is IFocusManagerComponent)){ IFocusManagerComponent(lastFocus).setFocus(); } else { form.stage.focus = lastFocus; }; }; lastAction = "ACTIVATE"; } public function showFocus():void{ } public function set defaultButtonEnabled(_arg1:Boolean):void{ _defaultButtonEnabled = _arg1; } public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{ var _local2:DisplayObject; var _local3:String; var _local4:int; var _local5:Boolean; var _local6:int; var _local7:int; var _local8:IFocusManagerGroup; if (!hasFocusableObjects()){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; _local2 = form.stage.focus; _local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2))); _local3 = ""; if ((_local2 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local2); _local3 = _local8.groupName; }; _local4 = getIndexOfFocusedObject(_local2); _local5 = false; _local6 = _local4; if (_local4 == -1){ if (_arg1){ _local4 = focusableCandidates.length; }; _local5 = true; }; _local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3); return (findFocusManagerComponent(focusableCandidates[_local7])); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:InteractiveObject; if (_arg1.isDefaultPrevented()){ return; }; _local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target)); if (!_local2){ return; }; showFocusIndicator = false; if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){ setFocus(_local2); }; lastAction = "MOUSEDOWN"; } private function isTabVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; _local2 = _arg1.parent; while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) { if (!_local2.tabChildren){ return (false); }; _local2 = _local2.parent; }; return (true); } public function get nextTabIndex():int{ return (0); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.TAB){ lastAction = "KEY"; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; }; if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){ sendDefaultButtonEvent(); }; } private function focusInHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; var _local3:Button; _local2 = InteractiveObject(_arg1.target); if (form.contains(_local2)){ lastFocus = findFocusManagerComponent(InteractiveObject(_local2)); if ((lastFocus is Button)){ _local3 = Button(lastFocus); if (defButton){ defButton.emphasized = false; defButton = _local3; _local3.emphasized = true; }; } else { if (((defButton) && (!((defButton == _defaultButton))))){ defButton.emphasized = false; defButton = _defaultButton; _defaultButton.emphasized = true; }; }; }; } private function tabEnabledChangeHandler(_arg1:Event):void{ var _local2:InteractiveObject; var _local3:Boolean; calculateCandidates = true; _local2 = InteractiveObject(_arg1.target); _local3 = (focusableObjects[_local2] == true); if (_local2.tabEnabled){ if (((!(_local3)) && (isTabVisible(_local2)))){ if (!(_local2 is IFocusManagerComponent)){ _local2.focusRect = false; }; focusableObjects[_local2] = true; }; } else { if (_local3){ delete focusableObjects[_local2]; }; }; } public function set showFocusIndicator(_arg1:Boolean):void{ _showFocusIndicator = _arg1; } public function get form():DisplayObjectContainer{ return (_form); } private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{ return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2)); } public function activate():void{ if (activated){ return; }; form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true); form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true); form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true); form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = true; if (lastFocus){ setFocus(lastFocus); }; } public function deactivate():void{ form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler); form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.removeEventListener(Event.ACTIVATE, activateHandler); form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler); form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = false; } public function get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } } }//package fl.managers
Section 12
//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 13
//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 14
//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 15
//StyleManager (fl.managers.StyleManager) package fl.managers { import fl.core.*; import flash.text.*; import flash.utils.*; public class StyleManager { private var globalStyles:Object; private var classToDefaultStylesDict:Dictionary; private var styleToClassesHash:Object; private var classToStylesDict:Dictionary; private var classToInstancesDict:Dictionary; private static var _instance:StyleManager; public function StyleManager(){ styleToClassesHash = {}; classToInstancesDict = new Dictionary(true); classToStylesDict = new Dictionary(true); classToDefaultStylesDict = new Dictionary(true); globalStyles = UIComponent.getStyleDefinition(); } public static function clearComponentStyle(_arg1:Object, _arg2:String):void{ var _local3:Class; var _local4:Object; _local3 = getClassDef(_arg1); _local4 = getInstance().classToStylesDict[_local3]; if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){ delete _local4[_arg2]; invalidateComponentStyle(_local3, _arg2); }; } private static function getClassDef(_arg1:Object):Class{ var component = _arg1; if ((component is Class)){ return ((component as Class)); }; try { return ((getDefinitionByName(getQualifiedClassName(component)) as Class)); } catch(e:Error) { if ((component is UIComponent)){ try { return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class)); } catch(e:Error) { }; }; }; return (null); } public static function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Class; var _local5:Object; _local4 = getClassDef(_arg1); _local5 = getInstance().classToStylesDict[_local4]; if (_local5 == null){ _local5 = (getInstance().classToStylesDict[_local4] = {}); }; if (_local5 == _arg3){ return; }; _local5[_arg2] = _arg3; invalidateComponentStyle(_local4, _arg2); } private static function setSharedStyles(_arg1:UIComponent):void{ var _local2:StyleManager; var _local3:Class; var _local4:Object; var _local5:String; _local2 = getInstance(); _local3 = getClassDef(_arg1); _local4 = _local2.classToDefaultStylesDict[_local3]; for (_local5 in _local4) { _arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5)); }; } public static function getComponentStyle(_arg1:Object, _arg2:String):Object{ var _local3:Class; var _local4:Object; _local3 = getClassDef(_arg1); _local4 = getInstance().classToStylesDict[_local3]; return (((_local4)==null) ? null : _local4[_arg2]); } private static function getInstance(){ if (_instance == null){ _instance = new (StyleManager); }; return (_instance); } private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{ var _local3:Dictionary; var _local4:Object; var _local5:UIComponent; _local3 = getInstance().classToInstancesDict[_arg1]; if (_local3 == null){ return; }; for (_local4 in _local3) { _local5 = (_local4 as UIComponent); if (_local5 == null){ } else { _local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2)); }; }; } private static function invalidateStyle(_arg1:String):void{ var _local2:Dictionary; var _local3:Object; _local2 = getInstance().styleToClassesHash[_arg1]; if (_local2 == null){ return; }; for (_local3 in _local2) { invalidateComponentStyle(Class(_local3), _arg1); }; } public static function registerInstance(_arg1:UIComponent):void{ var inst:StyleManager; var classDef:Class; var target:Class; var defaultStyles:Object; var styleToClasses:Object; var n:String; var instance = _arg1; inst = getInstance(); classDef = getClassDef(instance); if (classDef == null){ return; }; if (inst.classToInstancesDict[classDef] == null){ inst.classToInstancesDict[classDef] = new Dictionary(true); target = classDef; while (defaultStyles == null) { if (target["getStyleDefinition"] != null){ defaultStyles = target["getStyleDefinition"](); break; }; try { target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class); } catch(err:Error) { try { target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class); } catch(e:Error) { defaultStyles = UIComponent.getStyleDefinition(); break; }; }; }; styleToClasses = inst.styleToClassesHash; for (n in defaultStyles) { if (styleToClasses[n] == null){ styleToClasses[n] = new Dictionary(true); }; styleToClasses[n][classDef] = true; }; inst.classToDefaultStylesDict[classDef] = defaultStyles; inst.classToStylesDict[classDef] = {}; }; inst.classToInstancesDict[classDef][instance] = true; setSharedStyles(instance); } public static function getStyle(_arg1:String):Object{ return (getInstance().globalStyles[_arg1]); } private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{ var _local3:Class; var _local4:StyleManager; var _local5:Object; _local3 = getClassDef(_arg1); _local4 = getInstance(); _local5 = _local4.classToStylesDict[_local3][_arg2]; if (_local5 != null){ return (_local5); }; _local5 = _local4.globalStyles[_arg2]; if (_local5 != null){ return (_local5); }; return (_local4.classToDefaultStylesDict[_local3][_arg2]); } public static function setStyle(_arg1:String, _arg2:Object):void{ var _local3:Object; _local3 = getInstance().globalStyles; if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; _local3[_arg1] = _arg2; invalidateStyle(_arg1); } } }//package fl.managers
Section 16
//Bounce (fl.motion.easing.Bounce) package fl.motion.easing { public class Bounce { public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); if (_arg1 < (1 / 2.75)){ return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2)); }; if (_arg1 < (2 / 2.75)){ _arg1 = (_arg1 - (1.5 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2)); }; if (_arg1 < (2.5 / 2.75)){ _arg1 = (_arg1 - (2.25 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2)); }; _arg1 = (_arg1 - (2.625 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 < (_arg4 / 2)){ return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2)); }; return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2)); } } }//package fl.motion.easing
Section 17
//Exponential (fl.motion.easing.Exponential) package fl.motion.easing { public class Exponential { public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg1 == _arg4)) ? (_arg2 + _arg3) : ((_arg3 * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg1 == 0)) ? _arg2 : ((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 == 0){ return (_arg2); }; if (_arg1 == _arg4){ return ((_arg2 + _arg3)); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((_arg3 / 2) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2)); }; --_arg1; return ((((_arg3 / 2) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2)); } } }//package fl.motion.easing
Section 18
//Linear (fl.motion.easing.Linear) package fl.motion.easing { public class Linear { public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } } }//package fl.motion.easing
Section 19
//Sine (fl.motion.easing.Sine) package fl.motion.easing { public class Sine { public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg3 * Math.sin(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((-(_arg3) * Math.cos(((_arg1 / _arg4) * (Math.PI / 2)))) + _arg3) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((-(_arg3) / 2) * (Math.cos(((Math.PI * _arg1) / _arg4)) - 1)) + _arg2)); } } }//package fl.motion.easing
Section 20
//TweenEvent (gs.events.TweenEvent) package gs.events { import flash.events.*; public class TweenEvent extends Event { public var info:Object; public static const UPDATE:String = "update"; public static const START:String = "start"; public static const version:Number = 0.9; public static const COMPLETE:String = "complete"; public function TweenEvent(_arg1:String, _arg2:Object=null, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.info = _arg2; } override public function clone():Event{ return (new TweenEvent(this.type, this.info, this.bubbles, this.cancelable)); } } }//package gs.events
Section 21
//TweenFilterLite (gs.TweenFilterLite) package gs { import flash.filters.*; public class TweenFilterLite extends TweenLite { private var _hf:Boolean;// = false private var _matrix:Array; private var _endMatrix:Array; private var _cmf:ColorMatrixFilter; private var _clrsa:Array; private var _filters:Array; public static var defaultEase:Function = TweenLite.defaultEase; private static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]; private static var _lumB:Number = 0.072169; public static var version:Number = 7.36; public static var delayedCall:Function = TweenLite.delayedCall; public static var killTweensOf:Function = TweenLite.killTweensOf; private static var _lumG:Number = 0.71516; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; private static var _lumR:Number = 0.212671; public function TweenFilterLite(_arg1:Object, _arg2:Number, _arg3:Object){ _hf = false; _filters = []; super(_arg1, _arg2, _arg3); if ((((TweenLite.version < 7.04)) || (isNaN(TweenLite.version)))){ }; if (_arg3.type != undefined){ }; } override public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{ var _local3:int; var _local4:Object; var _local5:Object; var _local6:Object; _clrsa = []; _filters = []; _matrix = _idMatrix.slice(); _arg2 = (_arg2 + " blurFilter glowFilter colorMatrixFilter dropShadowFilter bevelFilter "); if (_isDisplayObject){ if (this.vars.blurFilter != null){ _local4 = this.vars.blurFilter; addFilter("blur", _local4, BlurFilter, ["blurX", "blurY", "quality"], new BlurFilter(0, 0, ((_local4.quality) || (2)))); }; if (this.vars.glowFilter != null){ _local4 = this.vars.glowFilter; addFilter("glow", _local4, GlowFilter, ["alpha", "blurX", "blurY", "color", "quality", "strength", "inner", "knockout"], new GlowFilter(0xFFFFFF, 0, 0, 0, ((_local4.strength) || (1)), ((_local4.quality) || (2)), _local4.inner, _local4.knockout)); }; if (this.vars.colorMatrixFilter != null){ _local4 = this.vars.colorMatrixFilter; _local5 = addFilter("colorMatrix", _local4, ColorMatrixFilter, [], new ColorMatrixFilter(_matrix)); _cmf = _local5.filter; _matrix = ColorMatrixFilter(_cmf).matrix; if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){ _endMatrix = _local4.matrix; } else { if (_local4.relative == true){ _endMatrix = _matrix.slice(); } else { _endMatrix = _idMatrix.slice(); }; _endMatrix = setBrightness(_endMatrix, _local4.brightness); _endMatrix = setContrast(_endMatrix, _local4.contrast); _endMatrix = setHue(_endMatrix, _local4.hue); _endMatrix = setSaturation(_endMatrix, _local4.saturation); _endMatrix = setThreshold(_endMatrix, _local4.threshold); if (!isNaN(_local4.colorize)){ _endMatrix = colorize(_endMatrix, _local4.colorize, _local4.amount); } else { if (!isNaN(_local4.color)){ _endMatrix = colorize(_endMatrix, _local4.color, _local4.amount); }; }; }; _local3 = 0; while (_local3 < _endMatrix.length) { if (((!((_matrix[_local3] == _endMatrix[_local3]))) && (!((_matrix[_local3] == undefined))))){ this.tweens[this.tweens.length] = {o:_matrix, p:_local3.toString(), s:_matrix[_local3], c:(_endMatrix[_local3] - _matrix[_local3])}; }; _local3++; }; }; if (this.vars.dropShadowFilter != null){ _local4 = this.vars.dropShadowFilter; addFilter("dropShadow", _local4, DropShadowFilter, ["alpha", "angle", "blurX", "blurY", "color", "distance", "quality", "strength", "inner", "knockout", "hideObject"], new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_local4.quality) || (2)), _local4.inner, _local4.knockout, _local4.hideObject)); }; if (this.vars.bevelFilter != null){ _local4 = this.vars.bevelFilter; addFilter("bevel", _local4, BevelFilter, ["angle", "blurX", "blurY", "distance", "highlightAlpha", "highlightColor", "quality", "shadowAlpha", "shadowColor", "strength"], new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_local4.quality) || (2)))); }; if (this.vars.runBackwards == true){ _local3 = (_clrsa.length - 1); while (_local3 > -1) { _local6 = _clrsa[_local3]; _clrsa[_local3].sr = (_local6.sr + _local6.cr); _local6.cr = (_local6.cr * -1); _local6.sg = (_local6.sg + _local6.cg); _local6.cg = (_local6.cg * -1); _local6.sb = (_local6.sb + _local6.cb); _local6.cb = (_local6.cb * -1); _local6.f[_local6.p] = (((_local6.sr << 16) | (_local6.sg << 8)) | _local6.sb); _local3--; }; }; super.initTweenVals(true, _arg2); } else { super.initTweenVals(_arg1, _arg2); }; } override public function render(_arg1:uint):void{ var _local2:Number; var _local3:Number; var _local4:Object; var _local5:int; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:Array; _local2 = ((_arg1 - this.startTime) / 1000); if (_local2 >= this.duration){ _local2 = this.duration; _local3 = 1; } else { _local3 = this.vars.ease(_local2, 0, 1, this.duration); }; _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; _local4.o[_local4.p] = (_local4.s + (_local3 * _local4.c)); _local5--; }; if (_hf){ _local5 = (_clrsa.length - 1); while (_local5 > -1) { _local4 = _clrsa[_local5]; _local6 = (_local4.sr + (_local3 * _local4.cr)); _local7 = (_local4.sg + (_local3 * _local4.cg)); _local8 = (_local4.sb + (_local3 * _local4.cb)); _local4.f[_local4.p] = (((_local6 << 16) | (_local7 << 8)) | _local8); _local5--; }; if (_cmf != null){ ColorMatrixFilter(_cmf).matrix = _matrix; }; _local10 = this.target.filters; _local5 = 0; while (_local5 < _filters.length) { _local9 = (_local10.length - 1); while (_local9 > -1) { if ((_local10[_local9] is _filters[_local5].type)){ _local10.splice(_local9, 1, _filters[_local5].filter); break; }; _local9--; }; _local5++; }; this.target.filters = _local10; }; if (_hst){ _local5 = (_subTweens.length - 1); while (_local5 > -1) { _subTweens[_local5].proxy(_subTweens[_local5]); _local5--; }; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local2 == this.duration){ complete(true); }; } private function addFilter(_arg1:String, _arg2:Object, _arg3:Class, _arg4:Array, _arg5:BitmapFilter):Object{ var _local6:Object; var _local7:Array; var _local8:int; var _local9:String; var _local10:Number; var _local11:Object; var _local12:Object; _local6 = {type:_arg3}; _local7 = this.target.filters; _local8 = 0; while (_local8 < _local7.length) { if ((_local7[_local8] is _arg3)){ _local6.filter = _local7[_local8]; break; }; _local8++; }; if (_local6.filter == undefined){ _local6.filter = _arg5; _local7[_local7.length] = _local6.filter; this.target.filters = _local7; }; _local8 = 0; while (_local8 < _arg4.length) { _local9 = _arg4[_local8]; if (_arg2[_local9] != undefined){ if ((((((_local9 == "color")) || ((_local9 == "highlightColor")))) || ((_local9 == "shadowColor")))){ _local11 = HEXtoRGB(_local6.filter[_local9]); _local12 = HEXtoRGB(_arg2[_local9]); _clrsa[_clrsa.length] = {f:_local6.filter, p:_local9, sr:_local11.rb, cr:(_local12.rb - _local11.rb), sg:_local11.gb, cg:(_local12.gb - _local11.gb), sb:_local11.bb, cb:(_local12.bb - _local11.bb)}; } else { if ((((((((_local9 == "quality")) || ((_local9 == "inner")))) || ((_local9 == "knockout")))) || ((_local9 == "hideObject")))){ _local6.filter[_local9] = _arg2[_local9]; } else { if (typeof(_arg2[_local9]) == "number"){ _local10 = (_arg2[_local9] - _local6.filter[_local9]); } else { _local10 = Number(_arg2[_local9]); }; this.tweens[this.tweens.length] = {o:_local6.filter, p:_local9, s:_local6.filter[_local9], c:_local10}; }; }; }; _local8++; }; _filters[_filters.length] = _local6; _hf = true; return (_local6); } public static function setContrast(_arg1:Array, _arg2:Number):Array{ var _local3:Array; if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 + 0.01); _local3 = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Array; if (isNaN(_arg2)){ return (_arg1); }; if (isNaN(_arg3)){ _arg3 = 1; }; _local4 = (((_arg2 >> 16) & 0xFF) / 0xFF); _local5 = (((_arg2 >> 8) & 0xFF) / 0xFF); _local6 = ((_arg2 & 0xFF) / 0xFF); _local7 = (1 - _arg3); _local8 = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local8, _arg1)); } public static function setBrightness(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = ((_arg2 * 100) - 100); return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1)); } public static function setSaturation(_arg1:Array, _arg2:Number):Array{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Array; if (isNaN(_arg2)){ return (_arg1); }; _local3 = (1 - _arg2); _local4 = (_local3 * _lumR); _local5 = (_local3 * _lumG); _local6 = (_local3 * _lumB); _local7 = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local7, _arg1)); } public static function applyMatrix(_arg1:Array, _arg2:Array):Array{ var _local3:Array; var _local4:int; var _local5:int; var _local6:int; var _local7:int; if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){ return (_arg2); }; _local3 = []; _local4 = 0; _local5 = 0; _local6 = 0; while (_local6 < 4) { _local7 = 0; while (_local7 < 5) { if (_local7 == 4){ _local5 = _arg1[(_local4 + 4)]; } else { _local5 = 0; }; _local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5); _local7++; }; _local4 = (_local4 + 5); _local6++; }; return (_local3); } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenFilterLite{ _arg3.runBackwards = true; return (new TweenFilterLite(_arg1, _arg2, _arg3)); } public static function setThreshold(_arg1:Array, _arg2:Number):Array{ var _local3:Array; if (isNaN(_arg2)){ return (_arg1); }; _local3 = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } public static function setHue(_arg1:Array, _arg2:Number):Array{ var _local3:Number; var _local4:Number; var _local5:Array; if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 * (Math.PI / 180)); _local3 = Math.cos(_arg2); _local4 = Math.sin(_arg2); _local5 = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]; return (applyMatrix(_local5, _arg1)); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenFilterLite{ return (new TweenFilterLite(_arg1, _arg2, _arg3)); } public static function HEXtoRGB(_arg1:Number):Object{ return ({rb:(_arg1 >> 16), gb:((_arg1 >> 8) & 0xFF), bb:(_arg1 & 0xFF)}); } } }//package gs
Section 22
//TweenLite (gs.TweenLite) package gs { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.utils.*; public class TweenLite { public var delay:Number; protected var _hasUpdate:Boolean; protected var _subTweens:Array; protected var _initted:Boolean; public var startTime:int; public var target:Object; public var duration:Number; protected var _hst:Boolean; protected var _isDisplayObject:Boolean; protected var _active:Boolean; public var vars:Object; public var tweens:Array; public var initTime:int; private static var _timer:Timer = new Timer(2000); private static var _classInitted:Boolean; public static var defaultEase:Function = TweenLite.easeOut; public static var version:Number = 7.04; private static var _sprite:Sprite = new Sprite(); protected static var _all:Dictionary = new Dictionary(); public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; protected static var _curTime:uint; private static var _listening:Boolean; public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){ var _local4:*; super(); if (_arg1 == null){ return; }; if (((((!((_arg3.overwrite == false))) && (!((_arg1 == null))))) || ((_all[_arg1] == undefined)))){ delete _all[_arg1]; _all[_arg1] = new Dictionary(); }; _all[_arg1][this] = this; this.vars = _arg3; this.duration = ((_arg2) || (0.001)); this.delay = ((_arg3.delay) || (0)); _active = (((_arg2 == 0)) && ((this.delay == 0))); this.target = _arg1; _isDisplayObject = (_arg1 is DisplayObject); if (!(this.vars.ease is Function)){ this.vars.ease = defaultEase; }; if (this.vars.easeParams != null){ this.vars.proxiedEase = this.vars.ease; this.vars.ease = easeProxy; }; if (!isNaN(Number(this.vars.autoAlpha))){ this.vars.alpha = Number(this.vars.autoAlpha); this.vars.visible = (this.vars.alpha > 0); }; this.tweens = []; _subTweens = []; _hst = (_initted = false); if (!_classInitted){ _curTime = getTimer(); _sprite.addEventListener(Event.ENTER_FRAME, executeAll); _classInitted = true; }; this.initTime = _curTime; if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (_active))){ initTweenVals(); this.startTime = _curTime; if (_active){ render((this.startTime + 1)); } else { render(this.startTime); }; _local4 = this.vars.visible; if (this.vars.isTV == true){ _local4 = this.vars.exposedProps.visible; }; if (((((!((_local4 == null))) && ((this.vars.runBackwards == true)))) && (_isDisplayObject))){ this.target.visible = Boolean(_local4); }; }; if (((!(_listening)) && (!(_active)))){ _timer.addEventListener("timer", killGarbage); _timer.start(); _listening = true; }; } protected function addSubTween(_arg1:Function, _arg2:Object, _arg3:Object, _arg4:Object=null):void{ var _local5:Object; var _local6:String; _local5 = {proxy:_arg1, target:_arg2, info:_arg4}; _subTweens[_subTweens.length] = _local5; for (_local6 in _arg3) { if (typeof(_arg3[_local6]) == "number"){ this.tweens[this.tweens.length] = {o:_arg2, p:_local6, s:_arg2[_local6], c:(_arg3[_local6] - _arg2[_local6]), sub:_local5}; } else { this.tweens[this.tweens.length] = {o:_arg2, p:_local6, s:_arg2[_local6], c:Number(_arg3[_local6]), sub:_local5}; }; }; _hst = true; } public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{ var _local3:String; var _local4:int; var _local5:Object; var _local6:Array; var _local7:ColorTransform; var _local8:ColorTransform; var _local9:Object; _local5 = this.vars; if (_local5.isTV == true){ _local5 = _local5.exposedProps; }; if ((this.target is Array)){ _local6 = ((this.vars.endArray) || ([])); _local4 = 0; while (_local4 < _local6.length) { if (((!((this.target[_local4] == _local6[_local4]))) && (!((this.target[_local4] == undefined))))){ this.tweens[this.tweens.length] = {o:this.target, p:_local4.toString(), s:this.target[_local4], c:(_local6[_local4] - this.target[_local4])}; }; _local4++; }; } else { if (((((!((typeof(_local5.tint) == "undefined"))) || ((this.vars.removeTint == true)))) && (_isDisplayObject))){ _local7 = this.target.transform.colorTransform; _local8 = new ColorTransform(); if (_local5.alpha != undefined){ _local8.alphaMultiplier = _local5.alpha; delete _local5.alpha; } else { _local8.alphaMultiplier = this.target.alpha; }; if (((!((this.vars.removeTint == true))) && (((((!((_local5.tint == null))) && (!((_local5.tint == ""))))) || ((_local5.tint == 0)))))){ _local8.color = _local5.tint; }; addSubTween(tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local7, endColor:_local8}); }; if (((!((_local5.frame == null))) && (_isDisplayObject))){ addSubTween(frameProxy, {frame:this.target.currentFrame}, {frame:_local5.frame}, {target:this.target}); }; if (((!(isNaN(this.vars.volume))) && (this.target.hasOwnProperty("soundTransform")))){ addSubTween(volumeProxy, this.target.soundTransform, {volume:this.vars.volume}, {target:this.target}); }; for (_local3 in _local5) { if ((((((((((((((((((((((((((((((((((_local3 == "ease")) || ((_local3 == "delay")))) || ((_local3 == "overwrite")))) || ((_local3 == "onComplete")))) || ((_local3 == "onCompleteParams")))) || ((_local3 == "runBackwards")))) || ((_local3 == "visible")))) || ((_local3 == "persist")))) || ((_local3 == "onUpdate")))) || ((_local3 == "onUpdateParams")))) || ((_local3 == "autoAlpha")))) || ((_local3 == "onStart")))) || ((_local3 == "onStartParams")))) || ((_local3 == "renderOnStart")))) || ((_local3 == "proxiedEase")))) || ((_local3 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local3) + " ")) == -1))))))){ } else { if (((!(((_isDisplayObject) && ((((((_local3 == "tint")) || ((_local3 == "removeTint")))) || ((_local3 == "frame"))))))) && (!((((_local3 == "volume")) && (this.target.hasOwnProperty("soundTransform"))))))){ if (typeof(_local5[_local3]) == "number"){ this.tweens[this.tweens.length] = {o:this.target, p:_local3, s:this.target[_local3], c:(_local5[_local3] - this.target[_local3])}; } else { this.tweens[this.tweens.length] = {o:this.target, p:_local3, s:this.target[_local3], c:Number(_local5[_local3])}; }; }; }; }; }; if (this.vars.runBackwards == true){ _local4 = (this.tweens.length - 1); while (_local4 > -1) { _local9 = this.tweens[_local4]; this.tweens[_local4].s = (_local9.s + _local9.c); _local9.c = (_local9.c * -1); _local4--; }; }; if ((((_local5.visible == true)) && (_isDisplayObject))){ this.target.visible = true; }; if (this.vars.onUpdate != null){ _hasUpdate = true; }; _initted = true; } public function get active():Boolean{ if (_active){ return (true); }; if (((_curTime - this.initTime) / 1000) > this.delay){ _active = true; this.startTime = (this.initTime + (this.delay * 1000)); if (!_initted){ initTweenVals(); } else { if (((!((this.vars.visible == undefined))) && (_isDisplayObject))){ this.target.visible = true; }; }; if (this.vars.onStart != null){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (this.duration == 0.001){ this.startTime = (this.startTime - 1); }; return (true); //unresolved jump }; return (false); } public function render(_arg1:uint):void{ var _local2:Number; var _local3:Number; var _local4:Object; var _local5:int; _local2 = ((_arg1 - this.startTime) / 1000); if (_local2 >= this.duration){ _local2 = this.duration; _local3 = 1; } else { _local3 = this.vars.ease(_local2, 0, 1, this.duration); }; _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; _local4.o[_local4.p] = (_local4.s + (_local3 * _local4.c)); _local5--; }; if (_hst){ _local5 = (_subTweens.length - 1); while (_local5 > -1) { _subTweens[_local5].proxy(_subTweens[_local5]); _local5--; }; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local2 == this.duration){ complete(true); }; } protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } public function complete(_arg1:Boolean=false):void{ if (!_arg1){ if (!_initted){ initTweenVals(); }; this.startTime = (_curTime - (this.duration * 1000)); render(_curTime); return; }; if (((!((this.vars.visible == undefined))) && (_isDisplayObject))){ if (((!(isNaN(this.vars.autoAlpha))) && ((this.target.alpha == 0)))){ this.target.visible = false; } else { if (this.vars.runBackwards != true){ this.target.visible = this.vars.visible; }; }; }; if (this.vars.persist != true){ removeTween(this); }; if (this.vars.onComplete != null){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); }; } public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } public static function frameProxy(_arg1:Object):void{ _arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame)); } public static function removeTween(_arg1:TweenLite=null):void{ if (((!((_arg1 == null))) && (!((_all[_arg1.target] == undefined))))){ delete _all[_arg1.target][_arg1]; }; } public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{ var _local3:Object; var _local4:*; if (((!((_arg1 == null))) && (!((_all[_arg1] == undefined))))){ if (_arg2){ _local3 = _all[_arg1]; for (_local4 in _local3) { _local3[_local4].complete(false); }; }; delete _all[_arg1]; }; } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{ return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:false})); } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ _arg3.runBackwards = true; return (new TweenLite(_arg1, _arg2, _arg3)); } public static function executeAll(_arg1:Event=null):void{ var _local2:uint; var _local3:Dictionary; var _local4:Object; var _local5:Object; _local2 = (_curTime = getTimer()); if (_listening){ _local3 = _all; for each (_local4 in _local3) { for (_local5 in _local4) { if (((!((_local4[_local5] == undefined))) && (_local4[_local5].active))){ _local4[_local5].render(_local2); }; }; }; }; } public static function volumeProxy(_arg1:Object):void{ _arg1.info.target.soundTransform = _arg1.target; } public static function killGarbage(_arg1:TimerEvent):void{ var _local2:uint; var _local3:Boolean; var _local4:Object; var _local5:Object; var _local6:Object; _local2 = 0; for (_local4 in _all) { _local3 = false; for (_local5 in _all[_local4]) { _local3 = true; break; }; if (!_local3){ delete _all[_local4]; } else { _local2++; }; }; if (_local2 == 0){ _timer.removeEventListener("timer", killGarbage); _timer.stop(); _listening = false; }; } public static function tintProxy(_arg1:Object):void{ var _local2:Number; var _local3:Number; var _local4:Object; var _local5:Object; _local2 = _arg1.target.progress; _local3 = (1 - _local2); _local4 = _arg1.info.color; _local5 = _arg1.info.endColor; _arg1.info.target.transform.colorTransform = new ColorTransform(((_local4.redMultiplier * _local3) + (_local5.redMultiplier * _local2)), ((_local4.greenMultiplier * _local3) + (_local5.greenMultiplier * _local2)), ((_local4.blueMultiplier * _local3) + (_local5.blueMultiplier * _local2)), ((_local4.alphaMultiplier * _local3) + (_local5.alphaMultiplier * _local2)), ((_local4.redOffset * _local3) + (_local5.redOffset * _local2)), ((_local4.greenOffset * _local3) + (_local5.greenOffset * _local2)), ((_local4.blueOffset * _local3) + (_local5.blueOffset * _local2)), ((_local4.alphaOffset * _local3) + (_local5.alphaOffset * _local2))); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ return (new TweenLite(_arg1, _arg2, _arg3)); } } }//package gs
Section 23
//TweenMax (gs.TweenMax) package gs { import flash.events.*; import flash.utils.*; import gs.events.*; public class TweenMax extends TweenFilterLite implements IEventDispatcher { protected var _yoyoEase:Function; protected var _dispatcher:EventDispatcher; protected var _callbacks:Object; protected var _pauseTime:int; protected static const _RAD2DEG:Number = 57.2957795130823; public static var removeTween:Function = TweenLite.removeTween; public static var defaultEase:Function = TweenLite.defaultEase; public static var version:Number = 1.5; public static var killTweensOf:Function = TweenLite.killTweensOf; public static var killDelayedCallsTo:Function = TweenLite.killDelayedCallsTo; public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){ super(_arg1, _arg2, _arg3); _pauseTime = -1; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ initDispatcher(); if ((((_arg2 == 0)) && ((this.delay == 0)))){ onUpdateDispatcher(); onCompleteDispatcher(); }; }; if ((((this.vars.yoyo == true)) || ((this.vars.loop == true)))){ this.vars.persist = true; _yoyoEase = this.vars.ease; }; if ((((TweenFilterLite.version < 7.35)) || (isNaN(TweenFilterLite.version)))){ }; } override public function get active():Boolean{ if (_active){ return (true); }; if (_pauseTime != -1){ return (false); }; if (((_curTime - this.initTime) / 1000) > this.delay){ _active = true; this.startTime = (this.initTime + (this.delay * 1000)); if (!_initted){ initTweenVals(); } else { if (((!((this.vars.visible == undefined))) && (_isDisplayObject))){ this.target.visible = true; }; }; if (this.vars.onStart != null){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (this.duration == 0.001){ this.startTime = (this.startTime - 1); }; return (true); //unresolved jump }; return (false); } public function willTrigger(_arg1:String):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.willTrigger(_arg1)); } public function get paused():Boolean{ if (_pauseTime != -1){ return (true); }; return (false); } public function resume():void{ var _local1:Number; if (_pauseTime != -1){ _local1 = (_curTime - _pauseTime); this.initTime = (this.initTime + _local1); if (!isNaN(this.startTime)){ this.startTime = (this.startTime + _local1); }; _pauseTime = -1; if (((_curTime - this.initTime) / 1000) > this.delay){ _active = true; }; }; } override public function complete(_arg1:Boolean=false):void{ super.complete(_arg1); if ((((this.vars.yoyo == true)) || ((this.vars.loop == true)))){ if (this.vars.yoyo == true){ this.vars.ease = ((this.vars.ease)==_yoyoEase) ? reverseEase : _yoyoEase; }; this.startTime = _curTime; this.initTime = (this.startTime - (this.delay * 1000)); render(_curTime); }; } public function get progress():Number{ var _local1:Number; _local1 = (((((_curTime - this.startTime) / 1000) / this.duration)) || (0)); if (_local1 > 1){ return (1); }; return (_local1); } public function dispatchEvent(_arg1:Event):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.dispatchEvent(_arg1)); } override public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{ var _local3:String; var _local4:int; var _local5:Object; var _local6:Object; var _local7:Array; var _local8:Function; _arg2 = (_arg2 + " hexColors bezier bezierThrough orientToBezier quaternions onCompleteAll onCompleteAllParams yoyo loop "); _local8 = bezierProxy; if (this.vars.orientToBezier == true){ this.vars.orientToBezier = [["x", "y", "rotation", 0]]; _local8 = bezierProxy2; } else { if ((this.vars.orientToBezier is Array)){ _local8 = bezierProxy2; }; }; if (((!((this.vars.bezier == undefined))) && ((this.vars.bezier is Array)))){ _local6 = {}; _local7 = this.vars.bezier; _local4 = 0; while (_local4 < _local7.length) { for (_local3 in _local7[_local4]) { if (_local6[_local3] == undefined){ _local6[_local3] = [this.target[_local3]]; }; if (typeof(_local7[_local4][_local3]) == "number"){ _local6[_local3].push(_local7[_local4][_local3]); } else { _local6[_local3].push((this.target[_local3] + Number(_local7[_local4][_local3]))); }; }; _local4++; }; for (_local3 in _local6) { if (typeof(this.vars[_local3]) == "number"){ _local6[_local3].push(this.vars[_local3]); } else { _local6[_local3].push((this.target[_local3] + Number(this.vars[_local3]))); }; delete this.vars[_local3]; }; addSubTween(_local8, {t:0}, {t:1}, {props:parseBeziers(_local6, false), target:this.target, orientToBezier:this.vars.orientToBezier}); }; if (((!((this.vars.bezierThrough == undefined))) && ((this.vars.bezierThrough is Array)))){ _local6 = {}; _local7 = this.vars.bezierThrough; _local4 = 0; while (_local4 < _local7.length) { for (_local3 in _local7[_local4]) { if (_local6[_local3] == undefined){ _local6[_local3] = [this.target[_local3]]; }; if (typeof(_local7[_local4][_local3]) == "number"){ _local6[_local3].push(_local7[_local4][_local3]); } else { _local6[_local3].push((this.target[_local3] + Number(_local7[_local4][_local3]))); }; }; _local4++; }; for (_local3 in _local6) { if (typeof(this.vars[_local3]) == "number"){ _local6[_local3].push(this.vars[_local3]); } else { _local6[_local3].push((this.target[_local3] + Number(this.vars[_local3]))); }; delete this.vars[_local3]; }; addSubTween(_local8, {t:0}, {t:1}, {props:parseBeziers(_local6, true), target:this.target, orientToBezier:this.vars.orientToBezier}); }; if (((!((this.vars.hexColors == undefined))) && ((typeof(this.vars.hexColors) == "object")))){ for (_local3 in this.vars.hexColors) { addSubTween(hexColorsProxy, {r:(this.target[_local3] >> 16), g:((this.target[_local3] >> 8) & 0xFF), b:(this.target[_local3] & 0xFF)}, {r:(this.vars.hexColors[_local3] >> 16), g:((this.vars.hexColors[_local3] >> 8) & 0xFF), b:(this.vars.hexColors[_local3] & 0xFF)}, {prop:_local3, target:this.target}); }; }; super.initTweenVals(true, _arg2); } protected function onStartDispatcher(... _args):void{ if (_callbacks.onStart != null){ _callbacks.onStart.apply(null, this.vars.onStartParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START)); } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if (_dispatcher == null){ initDispatcher(); }; _dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } protected function initDispatcher():void{ var _local1:Object; var _local2:String; if (_dispatcher == null){ _dispatcher = new EventDispatcher(this); _callbacks = {onStart:this.vars.onStart, onUpdate:this.vars.onUpdate, onComplete:this.vars.onComplete}; _local1 = {}; for (_local2 in this.vars) { _local1[_local2] = this.vars[_local2]; }; this.vars = _local1; this.vars.onStart = onStartDispatcher; this.vars.onUpdate = onUpdateDispatcher; this.vars.onComplete = onCompleteDispatcher; if ((this.vars.onStartListener is Function)){ _dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true); }; if ((this.vars.onUpdateListener is Function)){ _dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true); }; if ((this.vars.onCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true); }; }; } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (_dispatcher != null){ _dispatcher.removeEventListener(_arg1, _arg2, _arg3); }; } public function set progress(_arg1:Number):void{ var _local2:Number; var _local3:Boolean; var _local4:*; _local2 = (_curTime - ((this.duration * _arg1) * 1000)); this.initTime = (_local2 - (this.delay * 1000)); _local3 = this.active; this.startTime = _local2; render(_curTime); _local4 = this.vars.visible; if (this.vars.isTV == true){ _local4 = this.vars.exposedProps.visible; }; if (((((!((_local4 == null))) && (_isDisplayObject))) && ((_arg1 < 1)))){ this.target.visible = Boolean(_local4); }; } protected function onUpdateDispatcher(... _args):void{ if (_callbacks.onUpdate != null){ _callbacks.onUpdate.apply(null, this.vars.onUpdateParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); } public function set paused(_arg1:Boolean):void{ if (_arg1){ this.pause(); } else { this.resume(); }; } public function reverseEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (_yoyoEase((_arg4 - _arg1), _arg2, _arg3, _arg4)); } public function hasEventListener(_arg1:String):Boolean{ if (_dispatcher == null){ return (false); }; return (_dispatcher.hasEventListener(_arg1)); } public function pause():void{ if (_pauseTime == -1){ _pauseTime = _curTime; _active = false; }; } protected function onCompleteDispatcher(... _args):void{ if (_callbacks.onComplete != null){ _callbacks.onComplete.apply(null, this.vars.onCompleteParams); }; _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); } public static function sequence(_arg1:Object, _arg2:Array):Array{ var _local3:uint; _local3 = 0; while (_local3 < _arg2.length) { _arg2[_local3].target = _arg1; _local3++; }; return (multiSequence(_arg2)); } public static function hexColorsProxy(_arg1:Object):void{ _arg1.info.target[_arg1.info.prop] = (((_arg1.target.r << 16) | (_arg1.target.g << 8)) | _arg1.target.b); } public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{ var _local3:int; var _local4:Array; var _local5:Object; var _local6:String; var _local7:Object; _local7 = {}; if (_arg2){ for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 2){ _local5[_local5.length] = {s:_local4[0], cp:(_local4[1] - ((_local4[2] - _local4[0]) / 4)), e:_local4[1]}; _local3 = 1; while (_local3 < (_local4.length - 1)) { _local5[_local5.length] = {s:_local4[_local3], cp:(_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)].cp)), e:_local4[(_local3 + 1)]}; _local3++; }; } else { _local5[_local5.length] = {s:_local4[0], cp:((_local4[0] + _local4[1]) / 2), e:_local4[1]}; }; }; } else { for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 3){ _local5[_local5.length] = {s:_local4[0], cp:_local4[1], e:((_local4[1] + _local4[2]) / 2)}; _local3 = 2; while (_local3 < (_local4.length - 2)) { _local5.push({s:_local5[(_local3 - 2)].e, cp:_local4[_local3], e:((_local4[_local3] + _local4[(_local3 + 1)]) / 2)}); _local3++; }; _local5[_local5.length] = {s:_local5[(_local5.length - 1)].e, cp:_local4[(_local4.length - 2)], e:_local4[(_local4.length - 1)]}; } else { if (_local4.length == 3){ _local5[_local5.length] = {s:_local4[0], cp:_local4[1], e:_local4[2]}; } else { if (_local4.length == 2){ _local5[_local5.length] = {s:_local4[0], cp:((_local4[0] + _local4[1]) / 2), e:_local4[1]}; }; }; }; }; }; return (_local7); } public static function bezierProxy2(_arg1:Object):void{ var _local2:Object; var _local3:Object; var _local4:Array; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Array; var _local9:Number; var _local10:uint; bezierProxy(_arg1); _local2 = {}; _local3 = _arg1.info.target; _arg1.info.target = _local2; _arg1.target.t = (_arg1.target.t + 0.01); bezierProxy(_arg1); _local4 = _arg1.info.orientToBezier; _local10 = 0; while (_local10 < _local4.length) { _local8 = _local4[_local10]; _local9 = ((_local8[3]) || (0)); _local6 = (_local2[_local8[0]] - _local3[_local8[0]]); _local7 = (_local2[_local8[1]] - _local3[_local8[1]]); _local3[_local8[2]] = ((Math.atan2(_local7, _local6) * _RAD2DEG) + _local9); _local10++; }; _arg1.info.target = _local3; _arg1.target.t = (_arg1.target.t - 0.01); } public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=false):void{ changePause(true, _arg1, _arg2); } public static function getTweensOf(_arg1:Object):Array{ var _local2:Dictionary; var _local3:Array; var _local4:Object; _local2 = _all[_arg1]; _local3 = []; if (_local2 != null){ for (_local4 in _local2) { if (_local2[_local4].tweens != undefined){ _local3[_local3.length] = _local2[_local4]; }; }; }; return (_local3); } public static function killAllDelayedCalls(_arg1:Boolean=false):void{ killAll(_arg1, false, true); } public static function multiSequence(_arg1:Array):Array{ var _local2:Dictionary; var _local3:Array; var _local4:Number; var _local5:Object; var _local6:Object; var _local7:Number; var _local8:Number; var _local9:uint; var _local10:Object; var _local11:String; _local2 = new Dictionary(); _local3 = []; _local4 = 0; _local9 = 0; while (_local9 < _arg1.length) { _local5 = _arg1[_local9]; _local8 = ((_local5.time) || (0)); _local10 = {}; for (_local11 in _local5) { _local10[_local11] = _local5[_local11]; }; delete _local10.time; _local7 = ((_local10.delay) || (0)); _local10.delay = (_local4 + _local7); _local6 = _local10.target; delete _local10.target; if (_local2[_local6] == undefined){ if (_local10.overwrite == undefined){ _local10.overwrite = true; }; _local2[_local6] = _local10; } else { _local10.overwrite = false; }; _local3[_local3.length] = new TweenMax(_local6, _local8, _local10); _local4 = (_local4 + (_local8 + _local7)); _local9++; }; return (_local3); } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenMax{ return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:false})); } public static function isTweening(_arg1:Object):Boolean{ var _local2:Array; var _local3:int; _local2 = getTweensOf(_arg1); _local3 = (_local2.length - 1); while (_local3 > -1) { if (_local2[_local3].active){ return (true); }; _local3--; }; return (false); } public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{ var _local4:Array; var _local5:int; _local4 = getAllTweens(); _local5 = (_local4.length - 1); while (_local5 > -1) { if (((((_local4[_local5].target is Function) == _arg3)) || (!(((_local4[_local5].target is Function) == _arg2))))){ if (_arg1){ _local4[_local5].complete(); } else { TweenLite.removeTween(_local4[_local5]); }; }; _local5--; }; } public static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{ var _local4:Array; var _local5:int; _local4 = getAllTweens(); _local5 = (_local4.length - 1); while (_local5 > -1) { if ((((_local4[_local5] is TweenMax)) && (((((_local4[_local5].target is Function) == _arg3)) || (!(((_local4[_local5].target is Function) == _arg2))))))){ _local4[_local5].paused = _arg1; }; _local5--; }; } public static function bezierProxy(_arg1:Object):void{ var _local2:Number; var _local3:Object; var _local4:Object; var _local5:int; var _local6:String; var _local7:Object; var _local8:Number; var _local9:uint; _local2 = _arg1.target.t; _local3 = _arg1.info.props; _local4 = _arg1.info.target; for (_local6 in _local3) { _local9 = _local3[_local6].length; if (_local2 < 0){ _local5 = 0; } else { if (_local2 >= 1){ _local5 = (_local9 - 1); } else { _local5 = int((_local9 * _local2)); }; }; _local8 = ((_local2 - (_local5 * (1 / _local9))) * _local9); _local7 = _local3[_local6][_local5]; _local4[_local6] = (_local7.s + (_local8 * (((2 * (1 - _local8)) * (_local7.cp - _local7.s)) + (_local8 * (_local7.e - _local7.s))))); }; } public static function callbackProxy(_arg1:Array, _arg2:Array=null):void{ var _local3:uint; _local3 = 0; while (_local3 < _arg1.length) { if (_arg1[_local3] != undefined){ _arg1[_local3].apply(null, _arg2[_local3]); }; _local3++; }; } public static function allFrom(_arg1:Array, _arg2:Number, _arg3:Object):Array{ _arg3.runBackwards = true; return (allTo(_arg1, _arg2, _arg3)); } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ _arg3.runBackwards = true; return (new TweenMax(_arg1, _arg2, _arg3)); } public static function killAllTweens(_arg1:Boolean=false):void{ killAll(_arg1, true, false); } public static function getAllTweens():Array{ var _local1:Dictionary; var _local2:Array; var _local3:Object; var _local4:Object; _local1 = _all; _local2 = []; for (_local3 in _local1) { for (_local4 in _local1[_local3]) { if (_local1[_local3][_local4] != undefined){ _local2[_local2.length] = _local1[_local3][_local4]; }; }; }; return (_local2); } public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=false):void{ changePause(false, _arg1, _arg2); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ return (new TweenMax(_arg1, _arg2, _arg3)); } public static function allTo(_arg1:Array, _arg2:Number, _arg3:Object):Array{ var _local4:int; var _local5:Object; var _local6:String; var _local7:Number; var _local8:Object; var _local9:Array; var _local10:Number; if (_arg1.length == 0){ return ([]); }; _local9 = []; _local10 = ((_arg3.delayIncrement) || (0)); delete _arg3.delayIncrement; if (_arg3.onCompleteAll == undefined){ _local8 = _arg3; } else { _local8 = {}; for (_local6 in _arg3) { _local8[_local6] = _arg3[_local6]; }; _local8.onCompleteParams = [[_arg3.onComplete, _arg3.onCompleteAll], [_arg3.onCompleteParams, _arg3.onCompleteAllParams]]; _local8.onComplete = TweenMax.callbackProxy; delete _arg3.onCompleteAll; }; delete _arg3.onCompleteAllParams; if (_local10 == 0){ _local4 = 0; while (_local4 < (_arg1.length - 1)) { _local5 = {}; for (_local6 in _arg3) { _local5[_local6] = _arg3[_local6]; }; _local9[_local9.length] = new TweenMax(_arg1[_local4], _arg2, _local5); _local4++; }; } else { _local7 = ((_arg3.delay) || (0)); _local4 = 0; while (_local4 < (_arg1.length - 1)) { _local5 = {}; for (_local6 in _arg3) { _local5[_local6] = _arg3[_local6]; }; _local5.delay = (_local7 + (_local4 * _local10)); _local9[_local9.length] = new TweenMax(_arg1[_local4], _arg2, _local5); _local4++; }; _local8.delay = (_local7 + ((_arg1.length - 1) * _local10)); }; _local9[_local9.length] = new TweenMax(_arg1[(_arg1.length - 1)], _arg2, _local8); if ((_arg3.onCompleteAllListener is Function)){ _local9[(_local9.length - 1)].addEventListener(TweenEvent.COMPLETE, _arg3.onCompleteAllListener); }; return (_local9); } } }//package gs
Section 24
//block (photonstorm.abombinaball.block) package photonstorm.abombinaball { import flash.display.*; import gs.*; import flash.geom.*; import fl.motion.easing.*; public class block extends Sprite { private var points:uint;// = 100 private var deadSpace:Boolean; private var gridHeight:uint;// = 12 private var theAction:Bitmap; private var gridWidth:uint;// = 16 private var action:uint;// = 0 private var number:uint; private var destroyable:Boolean; private var styleType:uint; private var hits:uint; private var theblock:Bitmap; private var alive:Boolean; public function block(_arg1:BitmapData, _arg2:uint, _arg3:uint):void{ gridWidth = 16; gridHeight = 12; points = 100; action = 0; super(); number = _arg2; styleType = _arg3; hits = 0; if (styleType >= 131){ destroyable = false; } else { destroyable = true; }; if (_arg3 == 0){ deadSpace = true; return; }; deadSpace = false; alive = true; theblock = makeBlock(_arg1, _arg3); theblock.x = -16; theblock.y = -16; addChild(theblock); } public function rebuild():void{ alive = true; deadSpace = false; TweenMax.to(this, 1, {scaleX:1, scaleY:1, delay:(0.25 + (Math.random() * 0.5)), ease:Bounce.easeOut}); } public function get gridXPos():uint{ var _local1:uint; if (number < gridWidth){ return (number); }; _local1 = uint((number / gridWidth)); return ((number - (_local1 * gridWidth))); } public function get blockAction():uint{ return (action); } public function addAction(_arg1:uint):void{ if ((((_arg1 >= 9)) && ((_arg1 <= 11)))){ return; }; action = _arg1; switch (action){ case 1: theAction = new Bitmap(new action01PNG(0, 0)); break; case 2: theAction = new Bitmap(new action02PNG(0, 0)); break; case 3: theAction = new Bitmap(new action03PNG(0, 0)); break; case 4: theAction = new Bitmap(new action04PNG(0, 0)); break; case 5: theAction = new Bitmap(new action05PNG(0, 0)); break; case 6: theAction = new Bitmap(new action06PNG(0, 0)); break; case 7: theAction = new Bitmap(new action07PNG(0, 0)); break; case 8: theAction = new Bitmap(new action08PNG(0, 0)); break; case 12: theAction = new Bitmap(new action12PNG(0, 0)); hits = 2; break; case 13: theAction = new Bitmap(new action13PNG(0, 0)); hits = 2; break; case 14: theAction = new Bitmap(new action14PNG(0, 0)); break; case 15: theAction = new Bitmap(new action14PNG(0, 0)); break; }; theAction.x = -16; theAction.y = -16; addChild(theAction); } private function makeBlock(_arg1:BitmapData, _arg2:uint):Bitmap{ var _local3:uint; var _local4:uint; var _local5:BitmapData; var _local6:Rectangle; if (_arg2 <= 10){ _local3 = 0; _local4 = _arg2; } else { _local3 = (Math.ceil((_arg2 / 10)) - 1); _local4 = (_arg2 - (_local3 * 10)); }; _local4--; _local5 = new BitmapData(32, 32, true, 0); _local6 = new Rectangle((_local3 * 32), (_local4 * 32), 32, 32); _local5.copyPixels(_arg1, _local6, new Point(0, 0)); return (new Bitmap(_local5)); } public function get pointsValue():uint{ return (points); } public function get hitsLeft():uint{ return (hits); } public function destroyOnLanding():void{ alive = false; deadSpace = true; action = 0; TweenMax.to(this, 1, {scaleX:0, scaleY:0, delay:0.25}); } public function get gridYPos():uint{ return (uint((number / gridWidth))); } public function get isBlocking():Boolean{ if ((((styleType >= 101)) && ((styleType <= 130)))){ return (true); }; return (false); } public function hit():void{ hits--; } public function destroy():void{ if (((destroyable) && (((!((action == 12))) && (!((action == 13))))))){ alive = false; deadSpace = true; action = 0; TweenMax.to(this, 1, {scaleX:0, scaleY:0, delay:0.25}); }; } public function get isDeadSpace():Boolean{ return (deadSpace); } } }//package photonstorm.abombinaball
Section 25
//bomb (photonstorm.abombinaball.bomb) package photonstorm.abombinaball { import flash.display.*; import flash.events.*; import flash.utils.*; public class bomb extends Sprite { private var points:uint;// = 100 private var gridHeight:uint;// = 12 private var gridWidth:uint;// = 16 private var bombWidth:uint;// = 32 private var number:uint; private var bombHeight:uint;// = 32 private var deactivated:Boolean; private var countDownTimer:uint; private var bombLocation:uint; private var bombSparks:sparks; private var fuseValue:int; private var sfx:soundFX; private var theBomb:Sprite; private var countingDown:Boolean; private var theBombBitmap:Bitmap; private var fuseTime:uint; public static const BOMB_EXPLODED:String = "bombExploded"; public function bomb(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:soundFX):void{ points = 100; gridWidth = 16; gridHeight = 12; bombWidth = 32; bombHeight = 32; super(); sfx = _arg4; bombSparks = new sparks(); theBomb = new Sprite(); number = _arg1; fuseTime = _arg2; fuseValue = fuseTime; bombLocation = _arg3; countingDown = false; deactivated = false; theBombBitmap = new Bitmap(new bombOffBD(0, 0)); theBombBitmap.x = -16; theBombBitmap.y = -16; theBomb.addChild(theBombBitmap); addChild(bombSparks); addChild(theBomb); } public function stop():void{ countingDown = false; bombSparks.stop(); removeEventListener(Event.ENTER_FRAME, mainLoop); } private function updateBomb():void{ switch (fuseValue){ case 0: theBombBitmap.bitmapData = new bomb0BD(0, 0); break; case 1: theBombBitmap.bitmapData = new bomb1BD(0, 0); break; case 2: theBombBitmap.bitmapData = new bomb2BD(0, 0); break; case 3: theBombBitmap.bitmapData = new bomb3BD(0, 0); break; case 4: theBombBitmap.bitmapData = new bomb4BD(0, 0); break; case 5: theBombBitmap.bitmapData = new bomb5BD(0, 0); break; case 6: theBombBitmap.bitmapData = new bomb6BD(0, 0); break; case 7: theBombBitmap.bitmapData = new bomb7BD(0, 0); break; case 8: theBombBitmap.bitmapData = new bomb8BD(0, 0); break; case 9: theBombBitmap.bitmapData = new bomb9BD(0, 0); break; }; } public function get gridLocation():uint{ return (bombLocation); } public function get gridXPos():uint{ var _local1:uint; if (bombLocation < gridWidth){ return (bombLocation); }; _local1 = uint((bombLocation / gridWidth)); return ((bombLocation - (_local1 * gridWidth))); } public function get pointsValue():uint{ return ((points * fuseValue)); } public function get hasBeenDeactivated():Boolean{ return (deactivated); } public function get gridYPos():uint{ return (uint((bombLocation / gridWidth))); } public function go():void{ countingDown = true; updateBomb(); bombSparks.go(theBomb.x, theBomb.y, 2); countDownTimer = (getTimer() + 1000); addEventListener(Event.ENTER_FRAME, mainLoop, false, 0, true); } public function destroy():void{ removeEventListener(Event.ENTER_FRAME, mainLoop); countingDown = false; deactivated = true; theBomb.visible = false; bombSparks.visible = false; } private function mainLoop(_arg1:Event):void{ if (getTimer() > countDownTimer){ bombSparks.go(theBomb.x, theBomb.y, 2); fuseValue--; updateBomb(); countDownTimer = (getTimer() + 1000); if (fuseValue < 4){ sfx.playEffectBombTick(); }; if (fuseValue == -1){ removeEventListener(Event.ENTER_FRAME, mainLoop); dispatchEvent(new Event(bomb.BOMB_EXPLODED)); }; }; } public function get isCountingDown():Boolean{ return (countingDown); } } }//package photonstorm.abombinaball
Section 26
//demoscreen1 (photonstorm.abombinaball.demoscreen1) package photonstorm.abombinaball { import flash.display.*; import flash.events.*; import gs.*; import pixelblitz.core.*; import pixelblitz.elements.*; import pixelblitz.layers.*; import fl.motion.easing.*; import pixelblitz.utils.*; public class demoscreen1 extends Sprite { private var scroller:Bitmap; private var raster4:Bitmap; private var raster1:Bitmap; private var raster3:Bitmap; private var raster5:Bitmap; private var balls:Array; private var font:BlitzFont; private var layer:RenderLayer; private var raster6:Bitmap; private var raster2:Bitmap; private var cos:Array; private var bMath:BlitzMath; private var sinf:uint; private var renderer:Renderer2D; private var sin:Array; public function demoscreen1():void{ bMath = new BlitzMath(); layer = new RenderLayer(); renderer = new Renderer2D(550, 432); font = new BlitzFont(); super(); } public function stop():void{ removeEventListener(Event.ENTER_FRAME, mainLoop); } public function init():void{ var _local1:PixelSprite; var _local2:uint; var _local3:String; font.init(new knighthawksFontBD(0, 0), 31, 25, BlitzFont.SET2, 10, 1, 0); _local1 = new PixelSprite(new Bitmap(new rasters1BD(0, 0))); _local1.hotspot(PixelSprite.HOTSPOT_TOP_LEFT); _local1.autoScroll(PixelSprite.SCROLL_UP, 2); layer.addItem(_local1); raster1 = new Bitmap(new rasters2BD(0, 0)); raster2 = new Bitmap(new rasters2BD(0, 0)); raster3 = new Bitmap(new rasters2BD(0, 0)); raster4 = new Bitmap(new rasters2BD(0, 0)); raster5 = new Bitmap(new rasters2BD(0, 0)); raster6 = new Bitmap(new rasters2BD(0, 0)); raster1.y = -120; raster2.y = -120; raster3.y = -120; raster4.y = -120; raster5.y = -120; raster6.y = -120; balls = new Array(); bMath.sinCosGenerator(128, 1, 1, 8); sin = bMath.getSinTable(); cos = bMath.getCosTable(); _local2 = 0; while (_local2 < 126) { balls[_local2] = new Bitmap(new rasters3BD(0, 0)); _local2++; }; _local3 = "- - - - - "; _local3 = _local3.concat("just a little easter egg for the 8-bit rocket boys :) hey jeff and steve! thought you may appreciate this mini demo effort. "); _local3 = _local3.concat("based on the classic tcb so watt intro screen with some other code candy thrown in for good measure! "); _local3 = _local3.concat("all routines my own, rasters of course are fake, everything done with pixelblitz! ok time to wrap guys, laters ... "); scroller = new Bitmap(font.defineScroller(550, 6, _local3, true, true, 2)); scroller.cacheAsBitmap = true; scroller.y = 380; } public function go():void{ var _local1:uint; init(); renderer.addLayer(layer); addChild(renderer); addChild(raster1); addChild(raster2); addChild(raster3); addChild(raster4); addChild(raster5); addChild(raster6); _local1 = 0; while (_local1 < 126) { addChild(balls[_local1]); _local1++; }; addChild(new Bitmap(new rocketBD(0, 0))); addChild(scroller); TweenMax.to(raster1, 1.5, {y:370, yoyo:true, ease:Sine.easeInOut, delay:0.1}); TweenMax.to(raster2, 1.5, {y:370, yoyo:true, ease:Sine.easeInOut, delay:0.15}); TweenMax.to(raster3, 1.5, {y:370, yoyo:true, ease:Sine.easeInOut, delay:0.2}); TweenMax.to(raster4, 1.5, {y:370, yoyo:true, ease:Sine.easeInOut, delay:0.25}); TweenMax.to(raster5, 1.5, {y:370, yoyo:true, ease:Sine.easeInOut, delay:0.3}); TweenMax.to(raster6, 1.5, {y:370, yoyo:true, ease:Sine.easeInOut, delay:0.35}); addEventListener(Event.ENTER_FRAME, mainLoop, false, 0, true); } private function mainLoop(_arg1:Event):void{ var _local2:uint; var _local3:uint; var _local4:uint; font.updateScroller(); renderer.render(); _local2 = 0; while (_local2 < 42) { balls[_local2].x = (-32 + (_local2 * 16)); balls[_local2].y = (100 + ((sin[_local2] * cos[sinf]) * 28)); _local2++; }; _local3 = 42; while (_local3 < 84) { balls[_local3].x = (-32 + ((_local3 - 42) * 16)); balls[_local3].y = (160 + ((sin[(_local3 - 42)] * cos[sinf]) * 12)); _local3++; }; _local4 = 84; while (_local4 < 126) { balls[_local4].x = (-32 + ((_local4 - 84) * 16)); balls[_local4].y = (220 + ((sin[(_local4 - 84)] * cos[sinf]) * 30)); _local4++; }; sinf++; if (sinf == sin.length){ sinf = 0; }; } } }//package photonstorm.abombinaball
Section 27
//gameEngine (photonstorm.abombinaball.gameEngine) package photonstorm.abombinaball { import flash.display.*; import flash.events.*; public class gameEngine extends Sprite { private var theGame:gameLoop; private var alreadyPlayed:Boolean;// = false private var menu:mainMenu; private var levels:levelManager; private var congratulations:gameWonScreen; private var score:gameScore; private var sfx:soundFX; private var gameover:gameOver; public function gameEngine():void{ score = new gameScore(); menu = new mainMenu(); sfx = new soundFX(); gameover = new gameOver(); congratulations = new gameWonScreen(); alreadyPlayed = false; super(); addEventListener(Event.ADDED_TO_STAGE, onStageAdded, false, 0, true); init(); } private function init():void{ levels = new levelManager(); levels.init(); addEventListener(Event.ENTER_FRAME, waitForXMLLoad, false, 0, true); } private function playMainMenu():void{ addChild(menu); if (alreadyPlayed == false){ menu.init(levels, sfx); }; menu.addEventListener(mainMenu.MAINMENU_STARTGAME, startGame, false, 0, true); menu.go(); } private function showGameOver(_arg1:Event):void{ if (alreadyPlayed == false){ gameover.init(levels, score); alreadyPlayed = true; }; theGame.removeEventListener(gameLoop.GAME_OVER, showGameOver); theGame.removeEventListener(gameLoop.GAME_WON, showCongratulations); removeChild(theGame); addChild(gameover); gameover.addEventListener(gameOver.GAMEOVER_COMPLETE, gameOverComplete, false, 0, true); gameover.go(); } private function gameOverComplete(_arg1:Event):void{ gameover.removeEventListener(gameOver.GAMEOVER_COMPLETE, gameOverComplete); removeChild(gameover); playMainMenu(); } private function startGame(_arg1:Event):void{ menu.removeEventListener(mainMenu.MAINMENU_STARTGAME, startGame); removeChild(menu); if (alreadyPlayed == false){ score.init(); } else { score.resetValues(); }; theGame = new gameLoop(levels, score, sfx); addChild(theGame); theGame.init(); theGame.go(true); theGame.addEventListener(gameLoop.GAME_OVER, showGameOver, false, 0, true); theGame.addEventListener(gameLoop.GAME_WON, showCongratulations, false, 0, true); } private function showCongratulations(_arg1:Event):void{ alreadyPlayed = true; theGame.removeEventListener(gameLoop.GAME_OVER, showGameOver); theGame.removeEventListener(gameLoop.GAME_WON, showCongratulations); removeChild(theGame); addChild(congratulations); congratulations.addEventListener(gameWonScreen.GAME_COMPLETED, congratulationsComplete, false, 0, true); congratulations.go(); } private function congratulationsComplete(_arg1:Event):void{ congratulations.removeEventListener(gameWonScreen.GAME_COMPLETED, congratulationsComplete); removeChild(congratulations); playMainMenu(); } private function onStageAdded(_arg1:Event):void{ var _local2:MovieClip; _local2 = new MovieClip(); _arg1.target.addChild(_local2); MochiBot.track(_local2, "af4e6286"); removeEventListener(Event.ADDED_TO_STAGE, onStageAdded); } private function waitForXMLLoad(_arg1:Event):void{ if (levels.loadedSuccess){ removeEventListener(Event.ENTER_FRAME, waitForXMLLoad); congratulations.init(levels, score); playMainMenu(); }; } } }//package photonstorm.abombinaball
Section 28
//gameGrid (photonstorm.abombinaball.gameGrid) package photonstorm.abombinaball { import flash.display.*; import flash.events.*; public class gameGrid extends Sprite { private var gridObjects:Array; private var topPadding:uint; private var gridHeight:uint;// = 12 private var bombs:Array; private var blockHeight:uint;// = 32 private var leftPadding:uint; private var levelTitle:String; private var gridWidth:uint;// = 16 private var allowedJumps:uint; private var usedJumps:uint; private var blockWidth:uint;// = 32 private var usedHeight:uint; private var tileSheet:BitmapData; private var playerStartX:uint; private var playerStartY:uint; private var blocks:Array; private var score:gameScore; private var grid:Sprite; private var sfx:soundFX; private var currentBomb:uint; private var bombLayer:Sprite; private var gridX:int; private var gridY:int; private var passCode:String; private var actions:Array; public static const LEVEL_COMPLETE:String = "levelComplete"; public static const BOMB_EXPLODED:String = "bombExploded"; public function gameGrid():void{ tileSheet = new tileSheetBD(0, 0); gridWidth = 16; gridHeight = 12; blockWidth = 32; blockHeight = 32; super(); } private function buildBombLayer():void{ var _local1:uint; bombLayer = new Sprite(); _local1 = 0; while (_local1 < bombs.length) { bombs[_local1].x = (bombs[_local1].gridXPos * blockWidth); bombs[_local1].y = ((bombs[_local1].gridYPos * blockHeight) - 3); bombLayer.addChild(bombs[_local1]); _local1++; }; currentBomb = 0; } public function set destX(_arg1:int):void{ gridX = _arg1; } public function get destX():int{ return (gridX); } public function checkForBombs(_arg1:uint):Boolean{ var _local2:Boolean; var _local3:uint; _local2 = false; _local3 = currentBomb; while (_local3 < bombs.length) { if (bombs[_local3].gridLocation == _arg1){ if (bombs[_local3].isCountingDown){ score.addPoints(bombs[_local3].pointsValue); bombs[_local3].removeEventListener(bomb.BOMB_EXPLODED, bombExploded); bombs[_local3].destroy(); nextBomb(); } else { _local2 = true; }; }; _local3++; }; return (_local2); } public function playerLeftThisBlock(_arg1:uint):void{ if (gridObjects[_arg1].hitsLeft == 0){ score.addPoints(gridObjects[_arg1].pointsValue); gridObjects[_arg1].destroy(); }; } public function init(_arg1:gameScore, _arg2:soundFX):void{ score = _arg1; sfx = _arg2; } public function checkForActions(_arg1:uint):uint{ return (gridObjects[_arg1].blockAction); } public function get canJump():Boolean{ if (usedJumps < allowedJumps){ return (true); }; return (false); } public function isDeadSpace(_arg1:uint):Boolean{ return (gridObjects[_arg1].isDeadSpace); } private function nextBomb():void{ if (currentBomb < (bombs.length - 1)){ currentBomb++; startBombTicking(); sfx.playEffectDeactivateBomb(); } else { dispatchEvent(new Event(gameGrid.LEVEL_COMPLETE)); }; } public function get startX():uint{ return (playerStartX); } public function get startY():uint{ return (playerStartY); } public function getGridYFromLocation(_arg1:uint):uint{ return (uint((_arg1 / gridWidth))); } public function get topOffset():uint{ return (topPadding); } public function get title():String{ return (levelTitle); } public function get destY():int{ return (gridY); } public function build(_arg1:XML):void{ var _local2:XML; if (this.numChildren > 0){ removeChild(bombLayer); removeChild(grid); }; levelTitle = _arg1.name; passCode = _arg1.passcode; allowedJumps = uint(_arg1.jumps); usedJumps = 0; blocks = new Array(); blocks = _arg1.blocks.split(","); actions = new Array(); actions = _arg1.actions.split(","); playerStartX = getGridXFromLocation(uint(_arg1.playerStart)); playerStartY = getGridYFromLocation(uint(_arg1.playerStart)); if (((!((blocks.length == 192))) || (!((actions.length == 192))))){ return; }; bombs = new Array(); for each (_local2 in _arg1.bombs.bomb) { bombs.push(new bomb(_local2.id, _local2.fuse, _local2.grid, sfx)); }; buildLevel(); buildBombLayer(); addChild(grid); addChild(bombLayer); } public function startBombTicking():void{ bombs[currentBomb].addEventListener(bomb.BOMB_EXPLODED, bombExploded, false, 0, true); bombs[currentBomb].go(); } private function bombExploded(_arg1:Event):void{ dispatchEvent(new Event(gameGrid.BOMB_EXPLODED)); } public function set destY(_arg1:int):void{ gridY = _arg1; } public function addJump():void{ usedJumps++; } public function rebuild():void{ var _local1:uint; _local1 = 0; while (_local1 < gridObjects.length) { if (gridObjects[_local1].isDeadSpace){ gridObjects[_local1].rebuild(); }; _local1++; }; } public function isBlocking(_arg1:uint):Boolean{ return (gridObjects[_arg1].isBlocking); } public function get jumpsLeft():uint{ return ((allowedJumps - usedJumps)); } public function checkForHits(_arg1:uint):uint{ return (gridObjects[_arg1].hitsLeft); } private function buildLevel():void{ var _local1:uint; var _local2:int; var _local3:int; var _local4:uint; var _local5:uint; grid = new Sprite(); gridObjects = new Array(); _local1 = 0; _local2 = gridWidth; _local3 = gridHeight; _local4 = 0; while (_local4 < gridHeight) { _local5 = 0; while (_local5 < gridWidth) { gridObjects.push(new block(tileSheet, _local1, blocks[_local1])); if (blocks[_local1] > 0){ gridObjects[_local1].x = (_local5 * blockWidth); gridObjects[_local1].y = (_local4 * blockHeight); if (_local5 < _local2){ _local2 = _local5; }; if (_local4 < _local3){ _local3 = _local4; }; }; if (actions[_local1] > 0){ gridObjects[_local1].addAction(actions[_local1]); }; grid.addChild(gridObjects[_local1]); _local1++; _local5++; }; _local4++; }; leftPadding = _local2; topPadding = _local3; } public function stopBombTicking():void{ bombs[currentBomb].stop(); bombs[currentBomb].removeEventListener(bomb.BOMB_EXPLODED, bombExploded); } public function getGridXFromLocation(_arg1:uint):uint{ var _local2:uint; if (_arg1 < gridWidth){ return (_arg1); }; _local2 = uint((_arg1 / gridWidth)); return ((_arg1 - (_local2 * gridWidth))); } public function destroyBlockOnLanding(_arg1:uint):void{ gridObjects[_arg1].destroyOnLanding(); } public function blockHit(_arg1:uint):uint{ return (gridObjects[_arg1].hit()); } public function get leftOffset():uint{ return (leftPadding); } public function get gridSizeX():uint{ return (gridWidth); } public function get gridSizeY():uint{ return (gridHeight); } public function getBlock(_arg1:uint):uint{ return (blocks[_arg1]); } public function get code():String{ return (passCode); } } }//package photonstorm.abombinaball
Section 29
//gameLoop (photonstorm.abombinaball.gameLoop) package photonstorm.abombinaball { import flash.display.*; import flash.events.*; import gs.*; import flash.filters.*; import flash.text.*; import flash.utils.*; import bigroom.input.*; import fl.motion.easing.*; import photonstorm.demofx.*; public class gameLoop extends Sprite { private var explosions:Array; private var quitGame:Sprite; private var mute:Sprite; private var explosionLayer:Sprite; private var playpause:Sprite; private var levels:levelManager; private var currentPlanet:uint; private var tutorial:Boolean;// = false private var grid:gameGrid; private var tutorial4:Bitmap; private var tutorial5:Bitmap; private var planet:Bitmap; private var score:gameScore; private var currentLevel:uint; private var sfx:soundFX; private var hitSparks:sparks; private var jumpsLeft:TextField; private var tutorial3:Bitmap; private var info:infoPanel; private var jumpTimer:uint; private var tutorialHasMoved:Boolean;// = false private var statusBar:statusText; private var gamePaused:Boolean; private var tutorialContainer:Sprite; private var tutorial1:Bitmap; private var tutorial2:Bitmap; private var cheat:Boolean;// = false private var jumpActive:Boolean; private var player:playerObject; private var starfield:starfield3D; private var keyboard:KeyPoll; private var pauseTimer:uint; private var explode:Sprite; public static const GAME_WON:String = "gameWon"; public static const GAME_OVER:String = "gameOver"; public function gameLoop(_arg1:levelManager, _arg2:gameScore, _arg3:soundFX):void{ starfield = new starfield3D(); grid = new gameGrid(); info = new infoPanel(); explode = new Sprite(); cheat = false; tutorial = false; tutorialHasMoved = false; tutorial1 = new Bitmap(new instructions1BD(0, 0)); tutorial2 = new Bitmap(new instructions2BD(0, 0)); tutorial3 = new Bitmap(new instructions3BD(0, 0)); tutorial4 = new Bitmap(new instructions4BD(0, 0)); tutorial5 = new Bitmap(new instructions5BD(0, 0)); super(); levels = _arg1; score = _arg2; sfx = _arg3; } private function rebuildGrid(_arg1:Boolean):void{ if (_arg1){ go(true); } else { grid.rebuild(); TweenMax.delayedCall(1.5, go); }; } private function resetTutorial():void{ tutorial1.visible = false; tutorial2.visible = false; tutorial3.visible = false; tutorial4.visible = false; tutorial5.visible = false; } private function pauseGame():void{ gamePaused = true; playpause.getChildAt(0).visible = false; playpause.getChildAt(1).visible = true; pauseTimer = (getTimer() + 1000); grid.stopBombTicking(); starfield.stop(); } public function init():void{ var _local1:uint; keyboard = new KeyPoll(stage); currentLevel = levels.level; if (currentLevel == 0){ tutorial = true; } else { tutorial = false; }; if (levels.text.cheat == "on"){ cheat = true; }; grid.init(score, sfx); player = new playerObject(); player.init(grid, sfx); jumpTimer = 0; hitSparks = new sparks(); statusBar = new statusText(); statusBar.init(levels); jumpsLeft = new TextField(); jumpsLeft.embedFonts = true; jumpsLeft.defaultTextFormat = new TextFormat("Candara", 36, 0xFFFF00, true, true); jumpsLeft.selectable = false; jumpsLeft.mouseEnabled = false; jumpsLeft.autoSize = TextFieldAutoSize.LEFT; jumpsLeft.visible = false; jumpsLeft.filters = [new GlowFilter(0, 1, 2, 2, 4, 1)]; explosions = new Array(); explosionLayer = new Sprite(); _local1 = 0; while (_local1 < 30) { explosions[_local1] = new explosionMC(); explosionLayer.addChild(explosions[_local1]); _local1++; }; explosionLayer.visible = false; currentPlanet = 1; planet = new Bitmap(new planet1BD(0, 0)); planet.x = -200; planet.y = 100; starfield.init(550, 432, 100, true); starfield.x = 275; starfield.y = 216; info.init(levels); info.visible = false; info.mouseEnabled = false; score.x = 370; score.y = 400; score.alpha = 1; mute = new Sprite(); mute.useHandCursor = true; mute.buttonMode = true; mute.mouseEnabled = true; mute.addChild(new Bitmap(new muteOnBD(0, 0))); mute.addChild(new Bitmap(new muteOffBD(0, 0))); if (sfx.isMuted){ mute.getChildAt(1).visible = false; } else { mute.getChildAt(0).visible = false; }; mute.x = 460; mute.y = 404; playpause = new Sprite(); playpause.useHandCursor = true; playpause.buttonMode = true; playpause.mouseEnabled = true; playpause.addChild(new Bitmap(new pauseGameBD(0, 0))); playpause.addChild(new Bitmap(new playGameBD(0, 0))); playpause.getChildAt(1).visible = false; playpause.x = 491; playpause.y = 404; quitGame = new Sprite(); quitGame.useHandCursor = true; quitGame.buttonMode = true; quitGame.mouseEnabled = true; quitGame.addChild(new Bitmap(new quitGameBD(0, 0))); quitGame.x = 522; quitGame.y = 404; explode.graphics.beginFill(0xDD0000, 1); explode.graphics.drawRect(0, 0, 550, 464); explode.graphics.endFill(); explode.mouseEnabled = false; explode.alpha = 0; explode.visible = false; tutorialContainer = new Sprite(); tutorialContainer.addChild(tutorial1); tutorialContainer.addChild(tutorial2); tutorialContainer.addChild(tutorial3); tutorialContainer.addChild(tutorial4); tutorialContainer.addChild(tutorial5); if (tutorial){ tutorialContainer.visible = true; } else { tutorialContainer.visible = false; }; addChild(starfield); addChild(planet); addChild(grid); addChild(player); addChild(hitSparks); addChild(tutorialContainer); addChild(explode); addChild(explosionLayer); addChild(jumpsLeft); addChild(score); addChild(mute); addChild(playpause); addChild(quitGame); addChild(statusBar); addChild(info); } private function userStartedLevel(_arg1):void{ _arg1.stopImmediatePropagation(); stage.removeEventListener(MouseEvent.CLICK, userStartedLevel); stage.removeEventListener(KeyboardEvent.KEY_DOWN, userStartedLevel); TweenMax.to(info, 0.25, {alpha:0}); TweenMax.to(grid, 1, {y:grid.destY, ease:Exponential.easeOut, onComplete:playLevel}); } private function wrongBomb(_arg1:Event):void{ stopGame(); player.hide(); sfx.playEffectExplode(); explodeSequence(); TweenMax.sequence(explode, [{time:1, delay:0.4, autoAlpha:1, onComplete:showInfoPanel, onCompleteParams:[3]}, {time:1.5, autoAlpha:0}]); } private function checkKeyboard():void{ if (cheat){ if (keyboard.isDown(KeyPoll.N)){ levelComplete(new Event(gameGrid.LEVEL_COMPLETE)); }; }; if (grid.jumpsLeft > 0){ if (getTimer() > jumpTimer){ if (((keyboard.isDown(KeyPoll.SPACE)) && ((jumpActive == false)))){ jumpActive = true; jumpTimer = (getTimer() + 500); } else { if (((keyboard.isDown(KeyPoll.SPACE)) && ((jumpActive == true)))){ jumpActive = false; jumpTimer = (getTimer() + 500); }; }; }; }; if (jumpActive){ hitSparks.go(player.xPos, player.yPos, 1); }; if (((keyboard.isDown(KeyPoll.UP)) && (player.isMovementAllowed))){ player.moveUp(jumpActive); }; if (((keyboard.isDown(KeyPoll.DOWN)) && (player.isMovementAllowed))){ player.moveDown(jumpActive); }; if (((keyboard.isDown(KeyPoll.LEFT)) && (player.isMovementAllowed))){ player.moveLeft(jumpActive); }; if (((keyboard.isDown(KeyPoll.RIGHT)) && (player.isMovementAllowed))){ player.moveRight(jumpActive); }; } private function stopGame():void{ grid.stopBombTicking(); removeEventListener(Event.ENTER_FRAME, mainLoop); mute.removeEventListener(MouseEvent.CLICK, muteToggle); playpause.removeEventListener(MouseEvent.CLICK, pauseToggle); quitGame.removeEventListener(MouseEvent.CLICK, gameOver); player.removeEventListener(playerObject.PLAYER_DIED, lostLife); player.removeEventListener(playerObject.PLAYER_LANDED_ON_BOMB, wrongBomb); player.removeEventListener(playerObject.PLAYER_START, startGame); grid.removeEventListener(gameGrid.LEVEL_COMPLETE, levelComplete); grid.removeEventListener(gameGrid.BOMB_EXPLODED, bombExploded); if (tutorial){ resetTutorial(); }; } private function showLevelIntro():void{ playpause.removeEventListener(MouseEvent.CLICK, pauseToggle); quitGame.removeEventListener(MouseEvent.CLICK, gameOver); statusBar.update(jumpActive, grid.jumpsLeft); info.showIntroBox(currentLevel, grid.title, grid.code, grid.jumpsLeft); info.alpha = 0; info.visible = true; TweenMax.to(info, 0.25, {alpha:1}); stage.addEventListener(MouseEvent.CLICK, userStartedLevel, false, 0, true); stage.addEventListener(KeyboardEvent.KEY_DOWN, userStartedLevel, false, 0, true); } private function showJumpsLeft(_arg1:Event):void{ var _local2:uint; _local2 = (grid.jumpsLeft - 1); jumpActive = false; if (_local2 > 1){ jumpsLeft.text = ((_local2.toString() + " ") + levels.text.jumpsleft); } else { if (_local2 == 1){ jumpsLeft.text = levels.text.onejumpleft; } else { jumpsLeft.text = levels.text.nojumpsleft; }; }; if (tutorial){ jumpsLeft.x = 80; jumpsLeft.y = -100; jumpsLeft.alpha = 1; jumpsLeft.visible = true; TweenMax.sequence(jumpsLeft, [{time:1, y:20}, {time:0.5}, {time:0.5, autoAlpha:0}]); } else { jumpsLeft.x = 280; jumpsLeft.y = -100; jumpsLeft.alpha = 1; jumpsLeft.visible = true; TweenMax.sequence(jumpsLeft, [{time:1, y:20}, {time:0.5}, {time:0.5, autoAlpha:0}]); }; } private function startPlanets():void{ TweenMax.to(planet, 120, {x:550, y:200, onComplete:newPlanet, ease:Linear.easeNone}); } private function lostLife(_arg1:Event):void{ stopGame(); showInfoPanel(1); } private function newPlanet():void{ planet.x = -450; planet.y = (-200 + (Math.random() * 200)); currentPlanet++; if (currentPlanet == 6){ currentPlanet = 1; }; switch (currentPlanet){ case 1: planet.bitmapData = new planet1BD(0, 0); break; case 2: planet.bitmapData = new planet2BD(0, 0); break; case 3: planet.bitmapData = new planet3BD(0, 0); break; case 4: planet.bitmapData = new planet4BD(0, 0); break; case 5: planet.bitmapData = new planet5BD(0, 0); break; }; startPlanets(); } private function tutorialOver():void{ tutorialContainer.visible = false; tutorial = false; } private function bombExploded(_arg1:Event):void{ stopGame(); player.hide(); sfx.playEffectExplode(); explodeSequence(); TweenMax.sequence(explode, [{time:1, delay:0.4, autoAlpha:1, onComplete:showInfoPanel, onCompleteParams:[4]}, {time:1.5, autoAlpha:0}]); } private function startGame(_arg1:Event):void{ player.removeEventListener(playerObject.PLAYER_START, startGame); grid.startBombTicking(); addEventListener(Event.ENTER_FRAME, mainLoop, false, 0, true); player.addEventListener(playerObject.PLAYER_DIED, lostLife, false, 0, true); player.addEventListener(playerObject.PLAYER_LANDED_ON_BOMB, wrongBomb, false, 0, true); grid.addEventListener(gameGrid.LEVEL_COMPLETE, levelComplete, false, 0, true); grid.addEventListener(gameGrid.BOMB_EXPLODED, bombExploded, false, 0, true); mute.addEventListener(MouseEvent.CLICK, muteToggle, false, 0, true); playpause.addEventListener(MouseEvent.CLICK, pauseToggle, false, 0, true); quitGame.addEventListener(MouseEvent.CLICK, gameOver, false, 0, true); } private function showInfoPanel(_arg1:uint, _arg2:Boolean=false):void{ if (_arg2){ if (grid.jumpsLeft > 0){ score.addPoints((1000 * grid.jumpsLeft)); info.showEndBox(_arg1, grid.jumpsLeft); } else { info.showEndBox(_arg1); }; score.startNewLevel(); } else { score.resetLevel(); info.showEndBox(_arg1); }; info.alpha = 0; info.visible = true; explosionLayer.visible = false; TweenMax.sequence(info, [{time:0.25, alpha:1}, {time:1.8}, {time:0.25, alpha:0, onComplete:rebuildGrid, onCompleteParams:[_arg2]}]); } private function checkTutorialKeyboard():void{ if (grid.jumpsLeft > 0){ if (getTimer() > jumpTimer){ if (((keyboard.isDown(KeyPoll.SPACE)) && ((jumpActive == false)))){ jumpActive = true; jumpTimer = (getTimer() + 500); if (gamePaused){ resumeGame(); }; } else { if (((keyboard.isDown(KeyPoll.SPACE)) && ((jumpActive == true)))){ jumpActive = false; jumpTimer = (getTimer() + 500); if (gamePaused){ resumeGame(); }; }; }; }; }; if (jumpActive){ hitSparks.go(player.xPos, player.yPos, 1); }; if (((keyboard.isDown(KeyPoll.UP)) && (player.isMovementAllowed))){ if (gamePaused){ resumeGame(); }; player.moveUp(jumpActive); tutorialHasMoved = true; }; if (((keyboard.isDown(KeyPoll.DOWN)) && (player.isMovementAllowed))){ if (gamePaused){ resumeGame(); }; player.moveDown(jumpActive); tutorialHasMoved = true; }; if (((keyboard.isDown(KeyPoll.LEFT)) && (player.isMovementAllowed))){ if (gamePaused){ resumeGame(); }; player.moveLeft(jumpActive); tutorialHasMoved = true; }; if (((keyboard.isDown(KeyPoll.RIGHT)) && (player.isMovementAllowed))){ if (gamePaused){ resumeGame(); }; player.moveRight(jumpActive); tutorialHasMoved = true; }; } private function playLevel():void{ player.addEventListener(playerObject.PLAYER_START, startGame, false, 0, true); player.go(); } private function sendGameOverEvent():void{ dispatchEvent(new Event(gameLoop.GAME_OVER)); } private function resumeGame():void{ gamePaused = false; playpause.getChildAt(1).visible = false; playpause.getChildAt(0).visible = true; pauseTimer = (getTimer() + 1000); grid.startBombTicking(); starfield.go(); } private function explodeSequence():void{ var _local1:Number; var _local2:uint; var _local3:uint; _local2 = 0; while (_local2 < 30) { explosions[_local2].x = (Math.random() * 550); explosions[_local2].y = (Math.random() * 432); _local1 = (Math.random() * 6); explosions[_local2].scaleX = _local1; explosions[_local2].scaleY = _local1; _local2++; }; explosionLayer.visible = true; _local3 = 0; while (_local3 < 30) { explosions[_local3].play(); _local3++; }; } private function levelComplete(_arg1:Event):void{ sfx.playEffectLevelComplete(); TweenMax.to(grid, 1.5, {y:500, ease:Exponential.easeIn, delay:0.5}); if (tutorial){ TweenMax.to(tutorialContainer, 1.5, {y:500, ease:Exponential.easeIn, delay:0.5, onComplete:tutorialOver}); }; player.levelCompleteSequence(); stopGame(); if (currentLevel == (levels.totalLevels - 1)){ dispatchEvent(new Event(gameLoop.GAME_WON)); } else { currentLevel++; showInfoPanel(2, true); }; } private function gameOver(_arg1):void{ if (player.isMovementAllowed){ stopGame(); TweenMax.to(grid, 1.5, {y:500, ease:Exponential.easeIn, delay:0.25}); TweenMax.to(player, 1.5, {y:500, ease:Exponential.easeIn, delay:0.25}); TweenMax.to(mute, 1.5, {alpha:0, delay:0.5}); TweenMax.to(playpause, 1.5, {alpha:0, delay:0.5}); TweenMax.to(quitGame, 1.5, {alpha:0, delay:0.5}); TweenMax.to(score, 1.5, {alpha:0, delay:0.5}); TweenMax.to(statusBar, 1.5, {alpha:0, delay:0.5, onComplete:sendGameOverEvent}); }; } private function pauseToggle(_arg1:MouseEvent):void{ if (gamePaused){ resumeGame(); } else { pauseGame(); }; } public function go(_arg1:Boolean=false):void{ if (tutorial){ resetTutorial(); tutorialHasMoved = false; }; info.visible = false; gamePaused = false; pauseTimer = 0; levels.level = currentLevel; grid.build(levels.getLevelData()); starfield.go(); startPlanets(); player.addEventListener(playerObject.PLAYER_JUMPED, showJumpsLeft, false, 0, true); if (grid.width == 0x0200){ grid.x = 35; grid.destX = grid.x; } else { grid.x = (16 + (((550 - grid.width) / 2) - (grid.leftOffset * 32))); grid.destX = grid.x; }; if (grid.height == 384){ grid.destY = 16; } else { grid.destY = (16 + (((400 - grid.height) / 2) - (grid.topOffset * 32))); }; if (_arg1){ grid.y = -400; showLevelIntro(); } else { grid.y = grid.destY; playLevel(); }; } private function muteToggle(_arg1:MouseEvent):void{ if (sfx.isMuted){ mute.getChildAt(0).visible = false; mute.getChildAt(1).visible = true; sfx.unMute(); } else { mute.getChildAt(1).visible = false; mute.getChildAt(0).visible = true; sfx.mute(); }; } private function mainLoop(_arg1:Event):void{ statusBar.update(jumpActive, grid.jumpsLeft); if (tutorial){ if ((((tutorialHasMoved == false)) && ((gamePaused == false)))){ resetTutorial(); tutorial1.visible = true; pauseGame(); }; if ((((((player.gridLocation == 154)) && ((gamePaused == false)))) && (player.isMovementAllowed))){ resetTutorial(); tutorial2.visible = true; pauseGame(); }; if ((((((player.gridLocation == 149)) && ((gamePaused == false)))) && (player.isMovementAllowed))){ resetTutorial(); tutorial3.visible = true; pauseGame(); }; if ((((((player.gridLocation == 145)) && ((gamePaused == false)))) && (player.isMovementAllowed))){ resetTutorial(); tutorial4.visible = true; pauseGame(); }; if ((((((player.gridLocation == 17)) && ((gamePaused == false)))) && (player.isMovementAllowed))){ resetTutorial(); tutorial5.visible = true; pauseGame(); }; if (player.isMovementAllowed){ checkTutorialKeyboard(); }; } else { if (gamePaused == false){ checkKeyboard(); }; }; } } }//package photonstorm.abombinaball
Section 30
//gameOver (photonstorm.abombinaball.gameOver) package photonstorm.abombinaball { import flash.display.*; import flash.events.*; import gs.*; import flash.filters.*; import flash.text.*; import photonstorm.demofx.*; public class gameOver extends Sprite { private var format2:TextFormat; private var gameOverText:TextField; private var levels:levelManager; private var score:gameScore; private var newHighScoreText:TextField; private var scoreText:TextField; private var starfield:starfield3D; private var format:TextFormat; public static const GAMEOVER_COMPLETE:String = "gameOverComplete"; public function gameOver():void{ starfield = new starfield3D(); super(); } public function init(_arg1:levelManager, _arg2:gameScore):void{ var _local3:Bitmap; levels = _arg1; score = _arg2; starfield.init(550, 432, 300, true); starfield.x = 275; starfield.y = 216; format = new TextFormat("Candara", int(levels.text.gameoversize), 0xFFFFFF); format.align = TextFormatAlign.CENTER; format2 = new TextFormat("Candara", int(levels.text.gameovernewsize), 0xFFFFFF); format2.align = TextFormatAlign.CENTER; gameOverText = makeTextField(format); scoreText = makeTextField(format); newHighScoreText = makeTextField(format2); gameOverText.filters = [new GlowFilter(10412024, 0.4, 12, 12)]; scoreText.filters = [new GlowFilter(10412024, 0.4, 12, 12)]; newHighScoreText.filters = [new GlowFilter(0xFF0000, 0.4, 12, 12)]; gameOverText.text = levels.text.gameover; gameOverText.x = (275 - (gameOverText.textWidth / 2)); gameOverText.y = 80; gameOverText.alpha = 0; scoreText.htmlText = (((((levels.text.score + ": ") + score.currentTotalScore) + "<font size=\"16\"><br><br>- ") + levels.text.anykey) + " -</font>"); scoreText.x = (275 - (scoreText.textWidth / 2)); scoreText.y = 180; scoreText.alpha = 0; newHighScoreText.text = levels.text.newscore; newHighScoreText.x = (275 - (newHighScoreText.textWidth / 2)); newHighScoreText.y = 340; newHighScoreText.alpha = 0; _local3 = new Bitmap(new titleBackdropBD(0, 0)); addChild(_local3); addChild(starfield); addChild(gameOverText); addChild(scoreText); addChild(newHighScoreText); } private function makeTextField(_arg1:TextFormat):TextField{ var _local2:TextField; _local2 = new TextField(); _local2.embedFonts = true; _local2.defaultTextFormat = _arg1; _local2.selectable = false; _local2.mouseEnabled = false; _local2.autoSize = TextFieldAutoSize.CENTER; _local2.multiline = true; return (_local2); } private function returnToMenu(_arg1):void{ TweenMax.killTweensOf(gameOverText); TweenMax.killTweensOf(scoreText); stage.removeEventListener(MouseEvent.CLICK, returnToMenu); stage.removeEventListener(KeyboardEvent.KEY_DOWN, returnToMenu); dispatchEvent(new Event(gameOver.GAMEOVER_COMPLETE)); } public function go():void{ scoreText.htmlText = (((((levels.text.score + ": ") + score.currentTotalScore) + "<font size=\"15\"><br><br>- ") + levels.text.anykey) + " -</font>"); stage.addEventListener(MouseEvent.CLICK, returnToMenu, false, 0, true); stage.addEventListener(KeyboardEvent.KEY_DOWN, returnToMenu, false, 0, true); gameOverText.scaleX = 8; gameOverText.scaleY = 8; scoreText.scaleX = 6; scoreText.scaleY = 6; newHighScoreText.scaleX = 6; newHighScoreText.scaleY = 6; starfield.go(); TweenMax.to(gameOverText, 2, {scaleX:1, scaleY:1, autoAlpha:1}); TweenMax.to(scoreText, 3, {scaleX:1, scaleY:1, autoAlpha:1}); if (score.isNewHighScore){ TweenMax.to(newHighScoreText, 3, {scaleX:1, scaleY:1, autoAlpha:1}); } else { newHighScoreText.alpha = 0; }; } } }//package photonstorm.abombinaball
Section 31
//gameScore (photonstorm.abombinaball.gameScore) package photonstorm.abombinaball { import flash.display.*; import flash.text.*; public final class gameScore extends Sprite { private var scoreFormat:TextFormat; private var scoreDisplay:TextField; public static const ADD_SCORE:String = "addScore"; private static var highScore:uint; private static var startOfLevelScore:uint; private static var newHighScore:Boolean; private static var totalScore:uint; public function gameScore():void{ } public function get currentTotalScore():uint{ return (totalScore); } public function init():void{ scoreFormat = new TextFormat("Candara", 20, 65526, true, true); scoreFormat.align = TextFormatAlign.LEFT; scoreDisplay = new TextField(); scoreDisplay.embedFonts = true; scoreDisplay.defaultTextFormat = scoreFormat; scoreDisplay.selectable = false; scoreDisplay.mouseEnabled = false; scoreDisplay.autoSize = TextFieldAutoSize.LEFT; addChild(scoreDisplay); resetValues(); } public function updateScore():void{ scoreDisplay.text = totalScore.toString(); } public function resetValues():void{ totalScore = 0; newHighScore = false; scoreDisplay.text = totalScore.toString(); } public function resetLevel():void{ totalScore = startOfLevelScore; updateScore(); } public function startNewLevel():void{ startOfLevelScore = totalScore; } public function get currentHighScore():uint{ return (highScore); } public function get isNewHighScore():Boolean{ return (newHighScore); } public function addPoints(_arg1:int):uint{ totalScore = (totalScore + _arg1); if (totalScore > highScore){ highScore = totalScore; newHighScore = true; }; updateScore(); return (_arg1); } } }//package photonstorm.abombinaball
Section 32
//gameWonScreen (photonstorm.abombinaball.gameWonScreen) package photonstorm.abombinaball { import flash.display.*; import flash.events.*; import gs.*; import flash.filters.*; import flash.text.*; import photonstorm.demofx.*; public class gameWonScreen extends Sprite { private var format2:TextFormat; private var format3:TextFormat; private var gameOverText:TextField; private var levels:levelManager; private var score:gameScore; private var newHighScoreText:TextField; private var scoreText:TextField; private var starfield:starfield3D; private var format:TextFormat; public static const GAME_COMPLETED:String = "gameCompleted"; public function gameWonScreen():void{ starfield = new starfield3D(); super(); } public function init(_arg1:levelManager, _arg2:gameScore):void{ var _local3:Bitmap; levels = _arg1; score = _arg2; starfield.init(550, 432, 300, true); starfield.x = 275; starfield.y = 216; format = new TextFormat("Candara", int(levels.text.won1size), 0xFFFFFF, true); format.align = TextFormatAlign.CENTER; format2 = new TextFormat("Candara", int(levels.text.won2size), 0xFFFFFF, true); format2.align = TextFormatAlign.CENTER; format3 = new TextFormat("Candara", int(levels.text.won3size), 0xFFFFFF, true); format3.align = TextFormatAlign.CENTER; gameOverText = makeTextField(format); scoreText = makeTextField(format2); newHighScoreText = makeTextField(format3); gameOverText.filters = [new GlowFilter(10412024, 0.4, 12, 12)]; scoreText.filters = [new GlowFilter(10412024, 0.4, 12, 12)]; gameOverText.htmlText = levels.text.won1; gameOverText.x = (275 - (gameOverText.textWidth / 2)); gameOverText.y = 16; gameOverText.alpha = 0; scoreText.htmlText = (((levels.text.won2 + " <font color=\"#0080FF\">") + score.currentTotalScore) + "</font>"); scoreText.x = (275 - (scoreText.textWidth / 2)); scoreText.y = 116; scoreText.alpha = 0; newHighScoreText.htmlText = (levels.text.won3 + ""); newHighScoreText.htmlText = (newHighScoreText.htmlText + (levels.text.won4 + "\n")); newHighScoreText.htmlText = (newHighScoreText.htmlText + (levels.text.won5 + "")); newHighScoreText.htmlText = (newHighScoreText.htmlText + "<font color=\"#0080FF\">www.photonstorm.com</font> &amp; <font color=\"#0080FF\">www.pixelblitz.org</font>"); newHighScoreText.htmlText = (newHighScoreText.htmlText + ("\n" + levels.text.won6)); newHighScoreText.htmlText = (newHighScoreText.htmlText + (("\n<font size=\"14\">- " + levels.text.anykey) + " -</font>")); newHighScoreText.wordWrap = true; newHighScoreText.width = 500; newHighScoreText.x = (275 - 250); newHighScoreText.y = 200; newHighScoreText.alpha = 0; _local3 = new Bitmap(new titleBackdropBD(0, 0)); addChild(_local3); addChild(starfield); addChild(gameOverText); addChild(scoreText); addChild(newHighScoreText); } private function makeTextField(_arg1:TextFormat):TextField{ var _local2:TextField; _local2 = new TextField(); _local2.embedFonts = true; _local2.defaultTextFormat = _arg1; _local2.selectable = false; _local2.mouseEnabled = false; _local2.autoSize = TextFieldAutoSize.CENTER; _local2.multiline = true; return (_local2); } private function returnToMenu(_arg1):void{ TweenMax.killTweensOf(gameOverText); TweenMax.killTweensOf(scoreText); stage.removeEventListener(MouseEvent.CLICK, returnToMenu); stage.removeEventListener(KeyboardEvent.KEY_DOWN, returnToMenu); dispatchEvent(new Event(gameWonScreen.GAME_COMPLETED)); } public function go():void{ scoreText.htmlText = (((levels.text.won2 + " <font color=\"#ffff00\">") + score.currentTotalScore) + "</font>"); stage.addEventListener(MouseEvent.CLICK, returnToMenu, false, 0, true); stage.addEventListener(KeyboardEvent.KEY_DOWN, returnToMenu, false, 0, true); gameOverText.scaleX = 8; gameOverText.scaleY = 8; scoreText.scaleX = 6; scoreText.scaleY = 6; newHighScoreText.scaleX = 6; newHighScoreText.scaleY = 6; starfield.go(); TweenMax.to(gameOverText, 2, {scaleX:1, scaleY:1, autoAlpha:1}); TweenMax.to(scoreText, 3, {delay:1, scaleX:1, scaleY:1, autoAlpha:1}); TweenMax.to(newHighScoreText, 3, {delay:2, scaleX:1, scaleY:1, autoAlpha:1}); } } }//package photonstorm.abombinaball
Section 33
//infoPanel (photonstorm.abombinaball.infoPanel) package photonstorm.abombinaball { import flash.display.*; import flash.filters.*; import flash.text.*; public class infoPanel extends Sprite { private var bonusText:TextField; private var bonusBox:Sprite; private var background:Sprite; private var levels:levelManager; private var endText:TextField; private var introText:TextField; private var introBox:Sprite; private var format:TextFormat; private var endBox:Sprite; public function infoPanel():void{ } private function hideAll():void{ introBox.visible = false; introText.visible = false; endBox.visible = false; endText.visible = false; bonusBox.visible = false; bonusText.visible = false; } public function init(_arg1:levelManager):void{ levels = _arg1; introBox = new Sprite(); endBox = new Sprite(); bonusBox = new Sprite(); introBox.cacheAsBitmap = true; endBox.cacheAsBitmap = true; bonusBox.cacheAsBitmap = true; introBox.filters = [new DropShadowFilter(4, 90, 0, 0.7, 4, 4)]; endBox.filters = [new DropShadowFilter(4, 90, 0, 0.7, 4, 4)]; bonusBox.filters = [new DropShadowFilter(4, 90, 0, 0.7, 4, 4)]; format = new TextFormat("Candara", 20, 0xFFFFFF); format.align = TextFormatAlign.CENTER; introText = makeTextField(format); endText = makeTextField(format); bonusText = makeTextField(format); introText.filters = [new GlowFilter(10412024, 0.4, 3, 3)]; endText.filters = [new GlowFilter(10412024, 0.4, 3, 3)]; bonusText.filters = [new GlowFilter(10412024, 0.4, 3, 3)]; addChild(introBox); addChild(introText); addChild(endBox); addChild(endText); addChild(bonusBox); addChild(bonusText); } private function makeTextField(_arg1:TextFormat):TextField{ var _local2:TextField; _local2 = new TextField(); _local2.embedFonts = true; _local2.defaultTextFormat = _arg1; _local2.selectable = false; _local2.mouseEnabled = false; _local2.autoSize = TextFieldAutoSize.CENTER; _local2.multiline = true; return (_local2); } public function showEndBox(_arg1:uint, _arg2:uint=0):void{ var _local3:String; hideAll(); _local3 = new String(); switch (_arg1){ case 1: _local3 = levels.text.watchstep; break; case 2: _local3 = levels.text.welldone; break; case 3: _local3 = levels.text.whoops; break; case 4: _local3 = levels.text.newroute; break; case 5: _local3 = levels.text.toolong; break; }; endText.htmlText = _local3; endText.x = (275 - (endText.textWidth / 2)); endText.y = (240 - (endText.textHeight / 2)); endBox.graphics.clear(); endBox.graphics.beginFill(4761805, 1); endBox.graphics.drawRect((endText.x - 64), (endText.y - 16), (endText.textWidth + 128), (endText.textHeight + 32)); endBox.graphics.beginFill(1255729, 1); endBox.graphics.drawRect((endText.x - 63), (endText.y - 15), (endText.textWidth + 126), (endText.textHeight + 30)); if (_arg2 > 0){ bonusText.htmlText = ((levels.text.sparejumps + ": ") + (_arg2 * 1000).toString()); bonusText.x = (275 - (bonusText.textWidth / 2)); bonusText.y = (100 - (bonusText.textHeight / 2)); bonusBox.graphics.clear(); bonusBox.graphics.beginFill(4761805, 1); bonusBox.graphics.drawRect((bonusText.x - 64), (bonusText.y - 16), (bonusText.textWidth + 128), (bonusText.textHeight + 32)); bonusBox.graphics.beginFill(1255729, 1); bonusBox.graphics.drawRect((bonusText.x - 63), (bonusText.y - 15), (bonusText.textWidth + 126), (bonusText.textHeight + 30)); bonusBox.visible = true; bonusText.visible = true; }; endBox.visible = true; endText.visible = true; } public function showIntroBox(_arg1:uint, _arg2:String, _arg3:String, _arg4:uint):void{ var _local5:String; hideAll(); _local5 = new String(); if ((((_arg1 > 0)) && ((_arg1 < 10)))){ _local5 = (((levels.text.level + " <font color=\"#ffff00\">0") + _arg1.toString()) + "</font><br><br>"); } else { _local5 = (((levels.text.level + " <font color=\"#ffff00\">") + _arg1.toString()) + "</font><br><br>"); }; _local5 = (_local5 + (("<font color=\"#ffff00\">" + _arg2) + "</font><br><br>")); _local5 = (_local5 + (((levels.text.jumpsallowed + ": <font color=\"#ffff00\">") + _arg4.toString()) + "</font><br><br>")); _local5 = (_local5 + (((levels.text.password + " <font color=\"#ffff00\">") + _arg3) + "</font><br><br>")); _local5 = (_local5 + (("<font size=\"14\">- " + levels.text.anykey) + " -</font>")); introText.htmlText = _local5; introText.x = (275 - (introText.textWidth / 2)); introText.y = 100; introBox.graphics.clear(); introBox.graphics.beginFill(4761805, 1); introBox.graphics.drawRect((introText.x - 64), (introText.y - 16), (introText.textWidth + 128), (introText.textHeight + 32)); introBox.graphics.beginFill(1255729, 1); introBox.graphics.drawRect((introText.x - 63), (introText.y - 15), (introText.textWidth + 126), (introText.textHeight + 30)); introBox.visible = true; introText.visible = true; } } }//package photonstorm.abombinaball
Section 34
//levelManager (photonstorm.abombinaball.levelManager) package photonstorm.abombinaball { import flash.events.*; import flash.net.*; public class levelManager { private var currentLevel:uint; private var dataLoadedSuccessfully:Boolean; public var menuData:XML; public var text:XML; private var currentLevelPasscode:String; public var gameData:XML; public function levelManager():void{ } public function get level():uint{ return (currentLevel); } public function get passcode():String{ return (currentLevelPasscode); } public function set level(_arg1:uint):void{ currentLevel = _arg1; } private function loadDataFile():void{ var _local1:URLLoader; _local1 = new URLLoader(); _local1.dataFormat = URLLoaderDataFormat.TEXT; _local1.addEventListener(Event.COMPLETE, dataFileLoaded, false, 0, true); _local1.load(new URLRequest("http://www.photonstorm.com/gamedata/abombinaball.php")); } public function init():void{ dataLoadedSuccessfully = false; loadDataFile(); } public function get totalLevels():uint{ return (gameData.levels.level.length()); } public function checkLevelPassword(_arg1:String):void{ var _local2:XML; _arg1 = _arg1.toUpperCase(); for each (_local2 in gameData.levels.level) { if (_local2.passcode == _arg1){ currentLevel = int(_local2.id); break; }; }; } public function getLevelData():XML{ var _local1:XML; for each (_local1 in gameData.levels.level) { if (int(_local1.id) == currentLevel){ break; }; }; currentLevelPasscode = _local1.passcode; return (_local1); } private function dataFileLoaded(_arg1:Event):void{ var event = _arg1; try { gameData = new XML(event.target.data); menuData = new XML(gameData.menu); text = new XML(gameData.game); dataLoadedSuccessfully = true; currentLevel = 0; } catch(e:TypeError) { }; } public function get loadedSuccess():Boolean{ return (dataLoadedSuccessfully); } } }//package photonstorm.abombinaball
Section 35
//mainMenu (photonstorm.abombinaball.mainMenu) package photonstorm.abombinaball { import fl.controls.*; import flash.display.*; import flash.events.*; import gs.*; import flash.filters.*; import flash.text.*; import flash.utils.*; import bigroom.input.*; import fl.motion.easing.*; import photonstorm.demofx.*; import flash.net.*; public class mainMenu extends Sprite { private var currentHelpPage:uint;// = 1 private var mouseActive:Boolean; private var titlePage:Sprite; private var format2:TextFormat; private var menuOptionStartGame:TextField; private var menuHighlight:Sprite; private var keyTimer:uint; private var menuOptionMoreGames:TextField; private var menuTA:MovieClip; private var backdrop:Sprite; private var menuActive:Boolean; private var man:Sprite; private var levels:levelManager; private var menuOptionCredits:TextField; private var menuOptionInstructions:TextField; private var menuPage:Sprite; private var menuOverSection:uint; private var credits:Bitmap; private var sfx:soundFX; private var clickTimer:int; private var blocks:Sprite; private var demo1:demoscreen1; private var logo:Sprite; private var helpPage1:Bitmap; private var helpPage2:Bitmap; private var helpPage3:Bitmap; private var gameVersion:TextField; private var levelPasswordInput:TextInput; private var starfield:starfield3D; private var menuOptionLevelPassword:TextField; private var configPage:Sprite; private var format:TextFormat; private var keyboard:KeyPoll; public static const MAINMENU_STARTGAME:String = "mainmenuHighlight"; public function mainMenu():void{ demo1 = new demoscreen1(); starfield = new starfield3D(); currentHelpPage = 1; menuTA = new myTextArea(); super(); } private function openMoreGamesPage(_arg1):void{ navigateToURL(new URLRequest(levels.menuData.moregamesurl), "_blank"); } public function init(_arg1:levelManager, _arg2:soundFX):void{ levels = _arg1; sfx = _arg2; initTitlePage(); initMenu(); initInstructions(); menuPage.alpha = 0; menuPage.visible = false; credits = new Bitmap(new creditsBD(0, 0)); credits.alpha = 0; credits.visible = false; addChild(titlePage); addChild(menuPage); addChild(credits); addChild(helpPage1); addChild(helpPage2); addChild(helpPage3); } private function runDemo():void{ addChild(demo1); demo1.go(); addEventListener(MouseEvent.CLICK, demoOver, false, 0, true); addEventListener(KeyboardEvent.KEY_DOWN, demoOver, false, 0, true); } private function checkMenuClick(_arg1:Event):void{ switch (menuOverSection){ case 1: menuActive = false; menuOverSection = 0; startGame(); break; case 2: menuActive = false; menuOverSection = 0; showInstructions(); break; case 3: menuActive = false; menuOverSection = 0; showCredits(); break; case 4: menuActive = true; menuOverSection = 0; openMoreGamesPage(false); break; default: menuActive = true; menuOverSection = 0; }; } private function showInstructions():void{ menuHighlight.removeEventListener(MouseEvent.CLICK, checkMenuClick); removeEventListener(Event.ENTER_FRAME, mainLoop); currentHelpPage = 1; TweenMax.to(menuPage, 0.25, {autoAlpha:0}); TweenMax.to(helpPage1, 0.25, {autoAlpha:1, onComplete:createHelpPageEvents}); clickTimer = (getTimer() + 4000); } private function sendStartGameEvent():void{ if (levelPasswordInput.text != ""){ if (levelPasswordInput.text == "8bitrocket"){ runDemo(); } else { levels.checkLevelPassword(levelPasswordInput.text); dispatchEvent(new Event(mainMenu.MAINMENU_STARTGAME)); }; } else { dispatchEvent(new Event(mainMenu.MAINMENU_STARTGAME)); }; } private function demoOver(_arg1):void{ removeEventListener(MouseEvent.CLICK, demoOver); removeEventListener(KeyboardEvent.KEY_DOWN, demoOver); TweenMax.to(demo1, 0.25, {autoAlpha:0, onComplete:demo1.stop}); TweenMax.to(titlePage, 0.5, {autoAlpha:1, onComplete:restoreMenuEvents}); TweenMax.to(menuPage, 0.5, {autoAlpha:1}); } private function mouseMoved(_arg1:MouseEvent):void{ mouseActive = true; } private function createMenuEvents():void{ menuActive = true; menuHighlight.addEventListener(MouseEvent.CLICK, checkMenuClick, false, 0, true); addEventListener(Event.ENTER_FRAME, mainLoop, false, 0, true); } private function nextHelpPage(_arg1):void{ if (getTimer() > clickTimer){ }; switch (currentHelpPage){ case 1: clickTimer = (getTimer() + 1000); TweenMax.to(helpPage1, 0.25, {autoAlpha:0}); TweenMax.to(helpPage2, 0.25, {autoAlpha:1}); currentHelpPage = 2; break; case 2: clickTimer = (getTimer() + 1000); TweenMax.to(helpPage2, 0.25, {autoAlpha:0}); TweenMax.to(helpPage3, 0.25, {autoAlpha:1}); currentHelpPage = 3; break; case 3: clickTimer = (getTimer() + 1000); TweenMax.to(helpPage3, 0.25, {autoAlpha:0, onComplete:closeInstructions}); break; }; } private function makeTextField(_arg1:TextFormat):TextField{ var _local2:TextField; _local2 = new TextField(); _local2.embedFonts = true; _local2.defaultTextFormat = _arg1; _local2.selectable = false; _local2.mouseEnabled = false; _local2.autoSize = TextFieldAutoSize.CENTER; _local2.multiline = false; return (_local2); } private function pulsateLogo():void{ TweenMax.to(logo, 1, {yoyo:true, glowFilter:{blurX:10, blurY:10, color:0xFFFFFF}}); } private function startGame():void{ menuHighlight.removeEventListener(MouseEvent.CLICK, checkMenuClick); stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoved); removeEventListener(Event.ENTER_FRAME, mainLoop); TweenMax.to(titlePage, 0.25, {autoAlpha:0, onComplete:sendStartGameEvent}); TweenMax.to(menuPage, 0.25, {autoAlpha:0}); } private function initMenu():void{ var _local1:uint; var _local2:TextFormat; menuPage = new Sprite(); menuOverSection = 0; format = new TextFormat("Candara", 28, 65526, true, true); format.align = TextFormatAlign.CENTER; format2 = new TextFormat("Candara", 18, 65526, true, true); format2.align = TextFormatAlign.CENTER; menuHighlight = new Sprite(); menuHighlight.graphics.beginFill(0xFFFFFF, 0.2); menuHighlight.graphics.drawRect(0, 0, 550, 50); menuHighlight.graphics.endFill(); menuHighlight.x = 0; menuHighlight.y = -100; menuHighlight.mouseEnabled = true; menuHighlight.buttonMode = true; _local1 = 120; menuOptionStartGame = TextField(menuTA.getChildAt(0)); menuOptionStartGame.filters = [new GlowFilter(42656, 0.6, 4, 4)]; menuOptionStartGame.text = levels.menuData.startgame; menuOptionStartGame.x = (275 - (menuOptionStartGame.textWidth / 2)); menuOptionStartGame.y = _local1; menuOptionStartGame.mouseEnabled = false; menuOptionInstructions = TextField(menuTA.getChildAt(1)); menuOptionInstructions.filters = [new GlowFilter(42656, 0.6, 4, 4)]; menuOptionInstructions.text = levels.menuData.howtoplay; menuOptionInstructions.x = (275 - (menuOptionInstructions.textWidth / 2)); menuOptionInstructions.y = (_local1 + 120); menuOptionInstructions.mouseEnabled = false; menuOptionCredits = TextField(menuTA.getChildAt(2)); menuOptionCredits.filters = [new GlowFilter(42656, 0.6, 4, 4)]; menuOptionCredits.text = levels.menuData.credits; menuOptionCredits.x = (275 - (menuOptionCredits.textWidth / 2)); menuOptionCredits.y = (_local1 + 170); menuOptionCredits.mouseEnabled = false; menuOptionMoreGames = TextField(menuTA.getChildAt(3)); menuOptionMoreGames.filters = [new GlowFilter(42656, 0.6, 4, 4)]; menuOptionMoreGames.text = levels.menuData.moregames; menuOptionMoreGames.x = (275 - (menuOptionMoreGames.textWidth / 2)); menuOptionMoreGames.y = (_local1 + 220); menuOptionMoreGames.mouseEnabled = false; menuOptionLevelPassword = TextField(menuTA.getChildAt(4)); menuOptionLevelPassword.text = levels.menuData.levelpassword; menuOptionLevelPassword.x = (275 - (menuOptionLevelPassword.textWidth / 2)); menuOptionLevelPassword.y = (_local1 + 42); menuOptionLevelPassword.mouseEnabled = false; _local2 = new TextFormat("Candara", 14, 12189695); _local2.align = TextFormatAlign.LEFT; _local2.indent = 10; levelPasswordInput = new TextInput(); levelPasswordInput.width = 140; levelPasswordInput.text = ""; levelPasswordInput.maxChars = 14; levelPasswordInput.x = 208; levelPasswordInput.y = (_local1 + 68); levelPasswordInput.restrict = "a-zA-Z0-9"; levelPasswordInput.setStyle("textFormat", _local2); gameVersion = makeTextField(new TextFormat("Candara", 12, 65526, true)); gameVersion.text = ("v" + levels.menuData.version); gameVersion.x = 516; gameVersion.y = 408; menuPage.addChild(menuHighlight); menuPage.addChild(menuOptionStartGame); menuPage.addChild(menuOptionCredits); menuPage.addChild(menuOptionInstructions); menuPage.addChild(menuOptionMoreGames); menuPage.addChild(menuOptionLevelPassword); menuPage.addChild(levelPasswordInput); menuPage.addChild(gameVersion); } private function closeCredits(_arg1:Event):void{ stage.removeEventListener(MouseEvent.CLICK, closeCredits); stage.removeEventListener(KeyboardEvent.KEY_DOWN, closeCredits); TweenMax.to(credits, 0.5, {autoAlpha:0}); TweenMax.to(menuPage, 0.5, {autoAlpha:1, onComplete:createMenuEvents}); } private function createCreditsEvents():void{ stage.addEventListener(MouseEvent.CLICK, closeCredits, false, 0, true); stage.addEventListener(KeyboardEvent.KEY_DOWN, closeCredits, false, 0, true); } private function closeInstructions():void{ stage.removeEventListener(MouseEvent.CLICK, nextHelpPage); stage.removeEventListener(KeyboardEvent.KEY_DOWN, nextHelpPage); TweenMax.to(menuPage, 0.25, {autoAlpha:1, onComplete:createMenuEvents}); } private function createHelpPageEvents():void{ stage.addEventListener(MouseEvent.CLICK, nextHelpPage, false, 0, true); stage.addEventListener(KeyboardEvent.KEY_DOWN, nextHelpPage, false, 0, true); } private function initInstructions():void{ helpPage1 = new Bitmap(new helpPage1BD(0, 0)); helpPage2 = new Bitmap(new helpPage2BD(0, 0)); helpPage3 = new Bitmap(new helpPage3BD(0, 0)); helpPage1.visible = false; helpPage2.visible = false; helpPage3.visible = false; helpPage1.alpha = 0; helpPage2.alpha = 0; helpPage3.alpha = 0; } private function initTitlePage():void{ titlePage = new Sprite(); backdrop = new Sprite(); backdrop.addChild(new Bitmap(new titleBackdropBD(0, 0))); blocks = new Sprite(); blocks.addChild(new Bitmap(new titleBlocksBD(0, 0))); man = new Sprite(); man.addChild(new Bitmap(new titleManBD(0, 0))); logo = new Sprite(); logo.addChild(new Bitmap(new titleLogoBD(0, 0))); logo.filters = [new GlowFilter(16774261, 0.7, 6, 6, 2, 1)]; titlePage.alpha = 0; blocks.x = -550; man.x = 550; logo.y = 500; starfield.init(550, 432, 300, true); starfield.x = 275; starfield.y = 216; starfield.alpha = 0.7; titlePage.addChild(backdrop); titlePage.addChild(starfield); titlePage.addChild(blocks); titlePage.addChild(logo); titlePage.addChild(man); } private function restoreMenuEvents():void{ menuActive = true; menuOverSection = 0; menuHighlight.addEventListener(MouseEvent.CLICK, checkMenuClick, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoved, false, 0, true); addEventListener(Event.ENTER_FRAME, mainLoop, false, 0, true); } private function showCredits():void{ menuHighlight.removeEventListener(MouseEvent.CLICK, checkMenuClick); removeEventListener(Event.ENTER_FRAME, mainLoop); TweenMax.to(menuPage, 0.5, {autoAlpha:0}); TweenMax.to(credits, 0.5, {autoAlpha:1, onComplete:createCreditsEvents}); } private function showOptions(_arg1):void{ stage.removeEventListener(MouseEvent.CLICK, showOptions); stage.removeEventListener(KeyboardEvent.KEY_DOWN, showOptions); TweenMax.to(blocks, 0.5, {x:550, ease:Sine.easeIn}); TweenMax.to(man, 0.5, {x:-550, ease:Sine.easeIn}); TweenMax.to(menuPage, 0.25, {autoAlpha:1, onComplete:createMenuEvents}); } public function go():void{ keyboard = new KeyPoll(stage); mouseActive = true; starfield.go(); if (levels.level > 1){ levelPasswordInput.text = levels.passcode; }; TweenMax.to(titlePage, 0.25, {autoAlpha:1}); TweenMax.to(blocks, 0.5, {x:0, ease:Sine.easeIn, delay:0.25}); TweenMax.to(man, 0.5, {x:0, ease:Sine.easeIn, delay:0.25}); TweenMax.to(logo, 0.5, {y:0, delay:0.25, onComplete:pulsateLogo}); stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoved, false, 0, true); stage.addEventListener(MouseEvent.CLICK, showOptions, false, 0, true); stage.addEventListener(KeyboardEvent.KEY_DOWN, showOptions, false, 0, true); } private function mainLoop(_arg1:Event):void{ if (menuActive){ if (keyboard.isDown(KeyPoll.ENTER)){ startGame(); }; if (((((keyboard.isDown(KeyPoll.DOWN)) && ((getTimer() > keyTimer)))) && ((menuOverSection < 3)))){ keyTimer = (getTimer() + 100); menuOverSection++; mouseActive = false; }; if (((((keyboard.isDown(KeyPoll.UP)) && ((getTimer() > keyTimer)))) && ((menuOverSection > 1)))){ keyTimer = (getTimer() + 100); menuOverSection--; mouseActive = false; }; if (mouseActive){ if ((((mouseY >= 116)) && ((mouseY <= 180)))){ menuOverSection = 1; } else { if ((((mouseY >= 238)) && ((mouseY <= 288)))){ menuOverSection = 2; } else { if ((((mouseY >= 289)) && ((mouseY <= 338)))){ menuOverSection = 3; } else { if ((((mouseY >= 339)) && ((mouseY <= 388)))){ menuOverSection = 4; } else { menuOverSection = 0; }; }; }; }; }; switch (menuOverSection){ case 1: menuHighlight.y = 116; break; case 2: menuHighlight.y = 238; break; case 3: menuHighlight.y = 288; break; case 4: menuHighlight.y = 338; break; default: menuHighlight.y = -100; }; }; } } }//package photonstorm.abombinaball
Section 36
//particle (photonstorm.abombinaball.particle) package photonstorm.abombinaball { import flash.display.*; public class particle { public var fade:Number; public var xVel:Number; public var shrink:Number; public var gravity:Number; public var clip:Bitmap; public var yVel:Number; public var drag:Number; public var directionRotate:Boolean; public var disabled:Boolean; public function particle(_arg1:DisplayObjectContainer, _arg2:Number, _arg3:Number, _arg4:uint=1){ if (_arg4 == 1){ clip = new Bitmap(new theSparkBD(0, 0)); } else { clip = new Bitmap(new theBombSparkBD(0, 0)); }; _arg1.addChild(clip); setPos(_arg2, _arg3); initDefaults(); } public function destroy(){ if (clip.parent){ clip.parent.removeChild(clip); }; clip = null; } public function initDefaults(){ drag = 1; fade = 1; shrink = 1; gravity = 0; directionRotate = false; } public function restart(_arg1:Number, _arg2:Number){ initDefaults(); clip.visible = true; disabled = false; setPos(_arg1, _arg2); } public function setScale(_arg1:Number){ clip.scaleX = (clip.scaleY = _arg1); } public function update(){ if (disabled == false){ clip.x = (clip.x + xVel); clip.y = (clip.y + yVel); xVel = (xVel * drag); yVel = (yVel * drag); clip.alpha = (((clip.alpha * 1000) * fade) / 1000); clip.scaleX = (clip.scaleY = (clip.scaleY * shrink)); yVel = (yVel + gravity); if (directionRotate){ updateRotation(); }; if ((((((((clip.x < -32)) || ((clip.x > 632)))) || ((clip.y > 432)))) || ((clip.y < -32)))){ disable(); }; }; } public function setPos(_arg1:Number, _arg2:Number){ clip.x = _arg1; clip.y = _arg2; } public function setVel(_arg1:Number, _arg2:Number){ xVel = _arg1; yVel = _arg2; } public function updateRotation(){ clip.rotation = (Math.atan2(yVel, xVel) * (180 / Math.PI)); } public function disable(){ clip.visible = false; disabled = true; } } }//package photonstorm.abombinaball
Section 37
//playerObject (photonstorm.abombinaball.playerObject) package photonstorm.abombinaball { import flash.display.*; import flash.events.*; import gs.*; import flash.utils.*; import fl.motion.easing.*; public class playerObject extends Sprite { private var playerAnimV:Array; private var gridHeight:uint;// = 12 private var currentLoc:uint; private var animVFrame:int; private var autoMove:uint; private var moveSpeed:Number;// = 0.15 private var gridWidth:uint;// = 16 private var animHFrame:int; private var forceMove:Boolean; private var playerBitmap:Bitmap; private var grid:gameGrid; private var moveAllowed:Boolean; private var sfx:soundFX; private var direction:uint; private var jumpSpeed:Number;// = 0.25 private var animFrameTimer:uint; private var currentGridX:uint; private var currentGridY:uint; private var player:Sprite; private var playerAnimH:Array; public static const PLAYER_DIED:String = "playerDied"; public static const PLAYER_START:String = "playerStart"; public static const PLAYER_LANDED_ON_BOMB:String = "playerLandedOnBomb"; public static const PLAYER_JUMPED:String = "playerJumped"; public function playerObject():void{ gridWidth = 16; gridHeight = 12; moveSpeed = 0.15; jumpSpeed = 0.25; super(); } public function moveDown(_arg1:Boolean):void{ var _local2:Number; var _local3:int; var _local4:int; if (((((moveAllowed) || (forceMove))) && ((currentGridY < (gridHeight - 1))))){ direction = 2; if (_arg1){ if ((((grid.canJump == false)) && ((autoMove == 0)))){ _arg1 = false; }; if (currentGridY == 11){ _arg1 = false; } else { if (isBlocked(2, (currentLoc + gridWidth))){ _arg1 = false; }; }; }; if (((isBlocked(2, currentLoc)) && ((_arg1 == false)))){ return; }; disablePlayerMovement(); grid.playerLeftThisBlock(currentLoc); if (_arg1){ _local3 = (player.y + 32); _local4 = (player.y + 64); _local2 = jumpSpeed; sfx.playEffectPlayerJump(); if (forceMove == false){ dispatchEvent(new Event(playerObject.PLAYER_JUMPED)); }; } else { _local3 = (player.y + 16); _local4 = (player.y + 32); _local2 = moveSpeed; sfx.playEffectPlayerMove(); }; TweenMax.sequence(player, [{time:_local2, y:_local3, scaleX:1.5, scaleY:1.5, ease:Sine.easeIn}, {time:_local2, y:_local4, scaleX:1, scaleY:1, ease:Sine.easeOut, onComplete:allowMovement, onCompleteParams:[2, _arg1]}]); }; } public function get yPos():uint{ return (player.y); } private function checkForActions():void{ var _local1:uint; _local1 = grid.checkForActions(currentLoc); if ((((_local1 > 0)) && ((_local1 <= 8)))){ forceMove = true; autoMove = _local1; } else { if ((((_local1 >= 12)) && ((_local1 <= 15)))){ forceMove = false; autoMove = 0; if ((((_local1 == 12)) || ((_local1 == 13)))){ if (grid.checkForHits(currentLoc) > 0){ grid.blockHit(currentLoc); allowPlayerMovement(); } else { grid.destroyBlockOnLanding(currentLoc); checkDeath(); }; } else { grid.destroyBlockOnLanding(currentLoc); checkDeath(); }; } else { forceMove = false; autoMove = 0; allowPlayerMovement(); }; }; switch (_local1){ case 1: moveLeft(false); break; case 2: moveUp(false); break; case 3: moveRight(false); break; case 4: moveDown(false); break; case 5: moveLeft(true); break; case 6: moveUp(true); break; case 7: moveRight(true); break; case 8: moveDown(true); break; }; } public function get gridLocation():uint{ return ((currentGridX + (currentGridY * gridWidth))); } public function init(_arg1:gameGrid, _arg2:soundFX):void{ sfx = _arg2; grid = _arg1; player = new Sprite(); initBall(); direction = 0; animVFrame = 0; animHFrame = 0; playerBitmap = new Bitmap(playerAnimV[0]); playerBitmap.x = -16; playerBitmap.y = -16; player.addChild(playerBitmap); player.x = 600; player.y = 200; addChild(player); } private function initBall():void{ playerAnimH = new Array(); playerAnimH.push(new horiz01BD(0, 0)); playerAnimH.push(new horiz02BD(0, 0)); playerAnimH.push(new horiz03BD(0, 0)); playerAnimH.push(new horiz04BD(0, 0)); playerAnimH.push(new horiz05BD(0, 0)); playerAnimH.push(new horiz06BD(0, 0)); playerAnimH.push(new horiz07BD(0, 0)); playerAnimH.push(new horiz08BD(0, 0)); playerAnimH.push(new horiz09BD(0, 0)); playerAnimH.push(new horiz10BD(0, 0)); playerAnimH.push(new horiz11BD(0, 0)); playerAnimH.push(new horiz12BD(0, 0)); playerAnimH.push(new horiz13BD(0, 0)); playerAnimH.push(new horiz14BD(0, 0)); playerAnimH.push(new horiz15BD(0, 0)); playerAnimH.push(new horiz16BD(0, 0)); playerAnimH.push(new horiz17BD(0, 0)); playerAnimH.push(new horiz18BD(0, 0)); playerAnimH.push(new horiz19BD(0, 0)); playerAnimV = new Array(); playerAnimV.push(new vertical01BD(0, 0)); playerAnimV.push(new vertical02BD(0, 0)); playerAnimV.push(new vertical03BD(0, 0)); playerAnimV.push(new vertical04BD(0, 0)); playerAnimV.push(new vertical05BD(0, 0)); playerAnimV.push(new vertical06BD(0, 0)); playerAnimV.push(new vertical07BD(0, 0)); playerAnimV.push(new vertical08BD(0, 0)); playerAnimV.push(new vertical09BD(0, 0)); playerAnimV.push(new vertical10BD(0, 0)); playerAnimV.push(new vertical11BD(0, 0)); playerAnimV.push(new vertical12BD(0, 0)); playerAnimV.push(new vertical13BD(0, 0)); playerAnimV.push(new vertical14BD(0, 0)); playerAnimV.push(new vertical15BD(0, 0)); playerAnimV.push(new vertical16BD(0, 0)); playerAnimV.push(new vertical17BD(0, 0)); playerAnimV.push(new vertical18BD(0, 0)); playerAnimV.push(new vertical19BD(0, 0)); } private function mainLoop(_arg1:Event):void{ if (moveAllowed == false){ if (getTimer() > animFrameTimer){ animFrameTimer = (getTimer() + 25); switch (direction){ case 1: animVFrame++; break; case 2: animVFrame--; break; case 3: animHFrame++; break; case 4: animHFrame--; break; }; if (animVFrame == 19){ animVFrame = 0; }; if (animVFrame == -1){ animVFrame = 18; }; if (animHFrame == 19){ animHFrame = 0; }; if (animHFrame == -1){ animHFrame = 18; }; if ((((direction == 1)) || ((direction == 2)))){ playerBitmap.bitmapData = playerAnimV[animVFrame]; } else { if ((((direction == 3)) || ((direction == 4)))){ playerBitmap.bitmapData = playerAnimH[animHFrame]; } else { playerBitmap.bitmapData = playerAnimV[0]; }; }; }; }; } private function allowMovement(_arg1:uint, _arg2:Boolean):void{ switch (_arg1){ case 1: currentGridY--; if (((_arg2) && ((currentGridY > 0)))){ currentGridY--; }; break; case 2: currentGridY++; if (((_arg2) && ((currentGridY < gridHeight)))){ currentGridY++; }; break; case 3: currentGridX--; if (((_arg2) && ((currentGridX > 0)))){ currentGridX--; }; break; case 4: currentGridX++; if (((_arg2) && ((currentGridX < gridWidth)))){ currentGridX++; }; break; }; currentLoc = this.gridLocation; if (((_arg2) && ((forceMove == false)))){ grid.addJump(); }; checkDeath(); checkForBombs(); checkForActions(); } public function hide():void{ player.x = 600; player.y = 200; } public function moveUp(_arg1:Boolean):void{ var _local2:Number; var _local3:int; var _local4:int; if (((((moveAllowed) || (forceMove))) && ((currentGridY > 0)))){ direction = 1; if (_arg1){ if ((((grid.canJump == false)) && ((autoMove == 0)))){ _arg1 = false; }; if (currentGridY == 1){ _arg1 = false; } else { if (isBlocked(1, (currentLoc - gridWidth))){ _arg1 = false; }; }; }; if (((isBlocked(1, currentLoc)) && ((_arg1 == false)))){ return; }; disablePlayerMovement(); grid.playerLeftThisBlock(currentLoc); if (_arg1){ _local3 = (player.y - 32); _local4 = (player.y - 64); _local2 = jumpSpeed; sfx.playEffectPlayerJump(); if (forceMove == false){ dispatchEvent(new Event(playerObject.PLAYER_JUMPED)); }; } else { _local3 = (player.y - 16); _local4 = (player.y - 32); _local2 = moveSpeed; sfx.playEffectPlayerMove(); }; TweenMax.sequence(player, [{time:_local2, y:_local3, scaleX:1.5, scaleY:1.5, ease:Sine.easeIn}, {time:_local2, y:_local4, scaleX:1, scaleY:1, ease:Sine.easeOut, onComplete:allowMovement, onCompleteParams:[1, _arg1]}]); }; } private function checkDeath():void{ if (grid.isDeadSpace(currentLoc)){ sfx.playEffectPlayerDeath(); TweenMax.killTweensOf(player); TweenMax.to(player, 1, {scaleX:0, scaleY:0}); dispatchEvent(new Event(playerObject.PLAYER_DIED)); }; } private function isBlocked(_arg1:uint, _arg2:uint):Boolean{ var _local3:Boolean; _local3 = false; switch (_arg1){ case 1: if (currentGridY > 0){ _local3 = grid.isBlocking((_arg2 - gridWidth)); }; break; case 2: if (currentGridY < gridHeight){ _local3 = grid.isBlocking((_arg2 + gridWidth)); }; break; case 3: if (currentGridX > 0){ _local3 = grid.isBlocking((_arg2 - 1)); }; break; case 4: if (currentGridX < gridWidth){ _local3 = grid.isBlocking((_arg2 + 1)); }; break; }; return (_local3); } private function playerReady():void{ moveAllowed = true; dispatchEvent(new Event(playerObject.PLAYER_START)); addEventListener(Event.ENTER_FRAME, mainLoop, false, 0, true); } private function allowPlayerMovement():void{ moveAllowed = true; direction = 0; } public function get isMovementAllowed():Boolean{ return (moveAllowed); } public function moveLeft(_arg1:Boolean):void{ var _local2:Number; var _local3:int; var _local4:int; if (((((moveAllowed) || (forceMove))) && ((currentGridX > 0)))){ direction = 3; if (_arg1){ if ((((grid.canJump == false)) && ((autoMove == 0)))){ _arg1 = false; }; if (currentGridX == 1){ _arg1 = false; } else { if (isBlocked(3, (currentLoc - 1))){ _arg1 = false; }; }; }; if (((isBlocked(3, currentLoc)) && ((_arg1 == false)))){ return; }; disablePlayerMovement(); grid.playerLeftThisBlock(currentLoc); if (_arg1){ _local3 = (player.x - 32); _local4 = (player.x - 64); _local2 = jumpSpeed; sfx.playEffectPlayerJump(); if (forceMove == false){ dispatchEvent(new Event(playerObject.PLAYER_JUMPED)); }; } else { _local3 = (player.x - 16); _local4 = (player.x - 32); _local2 = moveSpeed; sfx.playEffectPlayerMove(); }; TweenMax.sequence(player, [{time:_local2, x:_local3, scaleX:1.5, scaleY:1.5, ease:Sine.easeIn}, {time:_local2, x:_local4, scaleX:1, scaleY:1, ease:Sine.easeOut, onComplete:allowMovement, onCompleteParams:[3, _arg1]}]); }; } public function levelCompleteSequence():void{ TweenMax.to(player, 1.5, {y:-100, scaleX:4, scaleY:4, ease:Exponential.easeIn, delay:0.5}); } public function get xPos():uint{ return (player.x); } private function disablePlayerMovement():void{ moveAllowed = false; } public function moveRight(_arg1:Boolean):void{ var _local2:Number; var _local3:int; var _local4:int; if (((((moveAllowed) || (forceMove))) && ((currentGridX < gridWidth)))){ direction = 4; if (_arg1){ if ((((grid.canJump == false)) && ((autoMove == 0)))){ _arg1 = false; }; if (currentGridX == 15){ _arg1 = false; } else { if (isBlocked(4, (currentLoc + 1))){ _arg1 = false; }; }; }; if (((isBlocked(4, currentLoc)) && ((_arg1 == false)))){ return; }; disablePlayerMovement(); grid.playerLeftThisBlock(currentLoc); if (_arg1){ _local3 = (player.x + 32); _local4 = (player.x + 64); _local2 = jumpSpeed; sfx.playEffectPlayerJump(); if (forceMove == false){ dispatchEvent(new Event(playerObject.PLAYER_JUMPED)); }; } else { _local3 = (player.x + 16); _local4 = (player.x + 32); _local2 = moveSpeed; sfx.playEffectPlayerMove(); }; TweenMax.sequence(player, [{time:_local2, x:_local3, scaleX:1.5, scaleY:1.5, ease:Sine.easeIn}, {time:_local2, x:_local4, scaleX:1, scaleY:1, ease:Sine.easeOut, onComplete:allowMovement, onCompleteParams:[4, _arg1]}]); }; } public function get gridY():uint{ return (currentGridY); } public function go():void{ var _local1:int; var _local2:int; currentGridX = grid.startX; currentGridY = grid.startY; currentLoc = this.gridLocation; player.x = 600; player.y = 200; player.scaleX = 3; player.scaleY = 3; _local1 = (grid.x + (currentGridX * 32)); _local2 = (grid.y + (currentGridY * 32)); moveAllowed = false; forceMove = false; TweenMax.to(player, 1, {x:_local1, y:_local2, scaleX:1, scaleY:1, onComplete:playerReady}); } private function checkForBombs():void{ if (grid.checkForBombs(currentLoc)){ dispatchEvent(new Event(playerObject.PLAYER_LANDED_ON_BOMB)); }; } public function get gridX():uint{ return (currentGridX); } } }//package photonstorm.abombinaball
Section 38
//soundFX (photonstorm.abombinaball.soundFX) package photonstorm.abombinaball { import flash.display.*; import flash.media.*; public class soundFX extends Sprite { private var effectMove:Sound; private var effectExplode:Sound; private var musicChannel:SoundChannel; private var effectJump:Sound; private var effectDeath:Sound; private var effectTick:Sound; private var effectDeactivate:Sound; private var effectComplete:Sound; private static var soundMuted:Boolean = false; private static var musicMuted:Boolean = false; public function soundFX(){ effectDeactivate = new deactivateWAV(); effectComplete = new completeWAV(); effectExplode = new explodeWAV(); effectTick = new tickWAV(); effectMove = new moveWAV(); effectJump = new jumpWAV(); effectDeath = new deathWAV(); super(); } public function playEffectPlayerMove():void{ var _local1:SoundChannel; if (soundMuted == false){ _local1 = effectMove.play(); }; } public function mute():void{ soundMuted = true; SoundMixer.stopAll(); } public function playEffectExplode():void{ var _local1:SoundChannel; if (soundMuted == false){ _local1 = effectExplode.play(); }; } public function unMute():void{ soundMuted = false; } public function playEffectBombTick():void{ var _local1:SoundChannel; if (soundMuted == false){ _local1 = effectTick.play(); }; } public function get isMuted():Boolean{ return (soundMuted); } public function playEffectPlayerJump():void{ var _local1:SoundChannel; if (soundMuted == false){ _local1 = effectJump.play(); }; } public function playEffectDeactivateBomb():void{ var _local1:SoundChannel; if (soundMuted == false){ _local1 = effectDeactivate.play(); }; } public function playEffectPlayerDeath():void{ var _local1:SoundChannel; if (soundMuted == false){ _local1 = effectDeath.play(); }; } public function playEffectLevelComplete():void{ var _local1:SoundChannel; if (soundMuted == false){ _local1 = effectComplete.play(); }; } } }//package photonstorm.abombinaball
Section 39
//sparks (photonstorm.abombinaball.sparks) package photonstorm.abombinaball { import flash.display.*; import flash.events.*; public class sparks extends Sprite { private var counter:Number;// = 0 private var ypos:int; private var spareParticles:Array; private var hitSparks:Array; private var sparkType:uint; private var bursting:Boolean;// = false private var spark:Object; private var xpos:int; public function sparks():void{ hitSparks = new Array(); spareParticles = new Array(); counter = 0; bursting = false; super(); } private function updateParticles():void{ var _local1:particle; var _local2:int; while (hitSparks.length > 40) { _local1 = hitSparks.shift(); _local1.disable(); spareParticles.push(_local1); }; _local2 = 0; while (_local2 < hitSparks.length) { hitSparks[_local2].update(); _local2++; }; } public function stop():void{ removeEventListener(Event.ENTER_FRAME, mainLoop); destroyAllSparks(); } private function randRange(_arg1:Number, _arg2:Number):Number{ return (((Math.random() * (_arg2 - _arg1)) + _arg1)); } private function destroyAllSparks():void{ var _local1:int; _local1 = 0; while (_local1 < hitSparks.length) { hitSparks[_local1].disable(); _local1++; }; } private function addSparkParticle(_arg1:Number, _arg2:Number, _arg3:int):void{ var _local4:int; _local4 = 0; while (_local4 < _arg3) { if (spareParticles.length > 0){ spark = spareParticles.shift(); spark.restart(_arg1, _arg2); } else { spark = new particle(this, _arg1, _arg2, sparkType); }; switch (sparkType){ case 1: spark.setVel(randRange(-3, 3), randRange(-5, 5)); spark.setScale(randRange(1, 1)); spark.shrink = 0.9; spark.gravity = -0.1; spark.directionRotate = true; spark.updateRotation(); break; case 2: spark.setVel(randRange(-10, 10), randRange(-10, 10)); spark.setScale(randRange(1, 2)); spark.shrink = 0.9; spark.gravity = 1; spark.drag = 0.99; spark.directionRotate = true; spark.updateRotation(); break; }; hitSparks.push(spark); _local4++; }; } public function go(_arg1:int, _arg2:int, _arg3:uint):void{ counter = 0; xpos = _arg1; ypos = _arg2; sparkType = _arg3; addEventListener(Event.ENTER_FRAME, mainLoop, false, 0, true); } private function mainLoop(_arg1:Event):void{ updateParticles(); switch (sparkType){ case 1: if (counter < 10){ counter++; addSparkParticle(xpos, ypos, 1); }; break; case 2: if (counter < 50){ counter++; addSparkParticle(xpos, ypos, 1); }; break; }; } } }//package photonstorm.abombinaball
Section 40
//statusText (photonstorm.abombinaball.statusText) package photonstorm.abombinaball { import flash.display.*; import flash.text.*; public class statusText extends Sprite { private var strJumpMode:String; private var strJumpsLeft:String; private var strJumpModeOn:String; private var strJumpModeOff:String; private var statusText1:TextField; private var statusText2:TextField; private var strNoJumpsLeft:String; public function statusText():void{ } public function init(_arg1:levelManager):void{ strJumpsLeft = _arg1.text.jumpsleft; strNoJumpsLeft = _arg1.text.nojumpsleft; strJumpMode = _arg1.text.jumpmode; strJumpModeOn = _arg1.text.on; strJumpModeOff = _arg1.text.off; statusText1 = new TextField(); statusText1.embedFonts = true; statusText1.defaultTextFormat = new TextFormat("Candara", int(_arg1.text.status1size), 65526, true, true); statusText1.selectable = false; statusText1.mouseEnabled = false; statusText1.autoSize = TextFieldAutoSize.LEFT; statusText1.x = _arg1.text.status1x; statusText1.y = _arg1.text.statusy; statusText2 = new TextField(); statusText2.embedFonts = true; statusText2.defaultTextFormat = new TextFormat("Candara", int(_arg1.text.status2size), 65526, true, true); statusText2.selectable = false; statusText2.mouseEnabled = false; statusText2.autoSize = TextFieldAutoSize.LEFT; statusText2.x = _arg1.text.status2x; statusText2.y = _arg1.text.statusy; addChild(statusText1); addChild(statusText2); } public function update(_arg1:Boolean, _arg2:int):void{ if (_arg1){ statusText1.htmlText = (((strJumpsLeft + ": <font color=\"#ffff00\">") + _arg2) + "</font>"); statusText2.htmlText = (((strJumpMode + ": <font color=\"#ffff00\">") + strJumpModeOn) + "</font>"); } else { if (_arg2 == 0){ statusText1.htmlText = (strJumpsLeft + ": <font color=\"#ff0000\">0</font>"); statusText2.htmlText = (("<font color=\"#ababab\">" + strNoJumpsLeft) + "</font>"); } else { statusText1.htmlText = (((strJumpsLeft + ": <font color=\"#ffff00\">") + _arg2) + "</font>"); statusText2.htmlText = (((strJumpMode + ": <font color=\"#ffff00\">") + strJumpModeOff) + "</font>"); }; }; } } }//package photonstorm.abombinaball
Section 41
//starfield3D (photonstorm.demofx.starfield3D) package photonstorm.demofx { import flash.display.*; import flash.events.*; import flash.geom.*; public class starfield3D extends Sprite { private var output:Bitmap; private var powerXSeed:int; private var powerY:int;// = 2000 private var cls:BitmapData; private var stars:Array; private var clsRectangle:Rectangle; private var starMinSpeed:uint;// = 1 private var clsPoint:Point; private var powerYSeed:int; private var centerY:int; private var starMaxSpeed:uint;// = 4 private var centerX:int; private var running:Boolean; private var powerX:int;// = 2000 private var starQuantity:uint; public function starfield3D():void{ starMinSpeed = 1; starMaxSpeed = 4; powerX = 2000; powerY = 2000; super(); } public function init(_arg1:uint, _arg2:uint, _arg3:uint=500, _arg4:Boolean=true, _arg5:int=30, _arg6:int=30):void{ var _local7:uint; if (_arg4){ output = new Bitmap(new BitmapData(_arg1, _arg2, true, 0)); cls = new BitmapData(_arg1, _arg2, true, 0); } else { output = new Bitmap(new BitmapData(_arg1, _arg2, false, 0)); cls = new BitmapData(_arg1, _arg2, false, 0); }; clsRectangle = new Rectangle(0, 0, output.width, output.height); clsPoint = new Point(0, 0); starQuantity = _arg3; centerX = (output.width >> 1); centerY = (output.height >> 1); powerXSeed = _arg5; powerYSeed = _arg6; starMinSpeed = minSpeed; starMaxSpeed = maxSpeed; stars = new Array(); _local7 = 0; while (_local7 < starQuantity) { initStar(_local7); _local7++; }; addChild(output); output.x = -((output.width / 2)); output.y = -((output.height / 2)); running = false; } public function stop():void{ if (running){ running = false; removeEventListener(Event.ENTER_FRAME, mainLoop); }; } public function get yPower():int{ return (powerY); } public function get minSpeed():int{ return (starMinSpeed); } private function combineRGB(_arg1:Number, _arg2:Number, _arg3:Number):Number{ var _local4:Number; if (_arg1 > 0xFF){ _arg1 = 0xFF; }; if (_arg2 > 0xFF){ _arg2 = 0xFF; }; if (_arg3 > 0xFF){ _arg3 = 0xFF; }; if (_arg1 < 0){ _arg1 = 0; }; if (_arg2 < 0){ _arg2 = 0; }; if (_arg3 < 0){ _arg3 = 0; }; _local4 = (((_arg1 << 16) | (_arg2 << 8)) | _arg3); return (_local4); } public function get yCenter():int{ return (centerY); } public function get isRunning():Boolean{ return (running); } private function mainLoop(_arg1:Event):void{ var _local2:uint; var _local3:*; var _local4:*; output.bitmapData.lock(); output.bitmapData.copyPixels(cls, clsRectangle, clsPoint); _local2 = 0; while (_local2 < starQuantity) { stars[_local2][2] = (stars[_local2][2] - stars[_local2][3]); if (stars[_local2][2] <= 0){ initStar(_local2); }; _local3 = ((stars[_local2][0] / stars[_local2][2]) + centerX); _local4 = ((stars[_local2][1] / stars[_local2][2]) + centerY); if ((((((((_local3 < 0)) || ((_local3 > (output.width - 1))))) || ((_local4 < 0)))) || ((_local4 > (output.height - 1))))){ initStar(_local2); } else { output.bitmapData.setPixel32(_local3, _local4, 4294967295); }; _local2++; }; output.bitmapData.unlock(); } public function get maxSpeed():int{ return (starMaxSpeed); } public function set yPower(_arg1:int):void{ powerY = _arg1; } public function set minSpeed(_arg1:int):void{ starMinSpeed = _arg1; } public function set yCenter(_arg1:int):void{ centerY = _arg1; } public function get xPower():int{ return (powerX); } private function initStar(_arg1:uint):void{ if (!stars[_arg1]){ stars[_arg1] = [0, 0, 0, 0]; }; stars[_arg1][0] = (-((powerXSeed / 2)) + (Math.random() * powerXSeed)); stars[_arg1][0] = (stars[_arg1][0] * powerX); stars[_arg1][1] = (-((powerYSeed / 2)) + (Math.random() * powerYSeed)); stars[_arg1][1] = (stars[_arg1][1] * powerY); stars[_arg1][2] = _arg1; stars[_arg1][3] = (starMinSpeed + int((Math.random() * starMaxSpeed))); } public function set maxSpeed(_arg1:int):void{ starMaxSpeed = _arg1; } private function calculateColour(_arg1:uint):int{ var _local2:Number; var _local3:int; _local2 = (250 / starQuantity); _local2 = (_local2 * (starQuantity - stars[_arg1][2])); _local3 = int(_local2); return (combineRGB(_local3, _local3, _local3)); } public function set xPower(_arg1:int):void{ powerX = _arg1; } public function set xCenter(_arg1:int):void{ centerX = _arg1; } public function get xCenter():int{ return (centerX); } public function go():void{ if (running == false){ running = true; addEventListener(Event.ENTER_FRAME, mainLoop, false, 0, true); }; } } }//package photonstorm.demofx
Section 42
//BitmapDataCollection (pixelblitz.core.BitmapDataCollection) package pixelblitz.core { import flash.display.*; public final class BitmapDataCollection { public var collection:Object; public static var instance:BitmapDataCollection; public static var allowInstance:Boolean; public function BitmapDataCollection(){ collection = {}; super(); if (!allowInstance){ throw (new Error(("BitmapDataCollection is a singleton. " + "Use the getInstance method to create an instance."))); }; } public function dispose():void{ var _local1:BitmapData; for each (_local1 in collection) { _local1.dispose(); _local1 = null; }; collection = {}; } public function search(_arg1:String):Boolean{ if (collection[_arg1]){ return (true); }; return (false); } public function addBitmapData(_arg1:String, _arg2:BitmapData):BitmapData{ collection[_arg1] = _arg2; return (collection[_arg1]); } public function removeBitmapData(_arg1:BitmapData):Boolean{ var _local2:BitmapData; for each (_local2 in collection) { if (_local2 === _arg1){ _local2.dispose(); _local2 = null; return (true); }; }; return (false); } public static function getInstance():BitmapDataCollection{ if (!instance){ allowInstance = true; instance = new (BitmapDataCollection); allowInstance = false; }; return (instance); } } }//package pixelblitz.core
Section 43
//Camera2D (pixelblitz.core.Camera2D) package pixelblitz.core { import flash.geom.*; public class Camera2D { public var boundary:Rectangle; public var ease:Number;// = 0.1 public var target:Point; private var distX:int; private var distY:int; public var basePoint:Point; private static var instance:Camera2D; private static var allowInstance:Boolean; public function Camera2D(){ ease = 0.1; basePoint = new Point(); boundary = new Rectangle(); super(); if (!allowInstance){ throw (new Error("Camera2D is instantiated internally")); }; } private function scrollTarget():void{ if ((((target.x < boundary.right)) && ((target.x > boundary.left)))){ distX = ((boundary.left - target.x) - basePoint.x); basePoint.x = (basePoint.x + (distX * ease)); } else { if (target.x > boundary.right){ distX = (boundary.left - (boundary.right + basePoint.x)); basePoint.x = (basePoint.x + (distX * ease)); }; if (target.x < boundary.left){ distX = (boundary.left - (boundary.left + basePoint.x)); basePoint.x = (basePoint.x + (distX * ease)); }; }; if ((((target.y < boundary.bottom)) && ((target.y > boundary.top)))){ distY = ((boundary.top - target.y) - basePoint.y); basePoint.y = (basePoint.y + (distY * ease)); } else { if (target.y > boundary.bottom){ distY = (boundary.top - (boundary.bottom + basePoint.y)); basePoint.y = (basePoint.y + (distY * ease)); }; if (target.y < boundary.top){ distY = (boundary.top - (boundary.top + basePoint.y)); basePoint.y = (basePoint.y + (distY * ease)); }; }; } public function scroll():void{ if (target){ scrollTarget(); }; } public static function getInstance():Camera2D{ if (!instance){ allowInstance = true; instance = new (Camera2D); allowInstance = false; }; return (instance); } } }//package pixelblitz.core
Section 44
//Renderer2D (pixelblitz.core.Renderer2D) package pixelblitz.core { import flash.display.*; import flash.geom.*; import pixelblitz.layers.*; import pixelblitz.*; public class Renderer2D extends Bitmap { private const ZERO_POINT:Point; private var rect:Rectangle; private var layerLength:int; private var layers:Array; public var hasBG:Boolean;// = false private var _parallaxLayers:Array; public function Renderer2D(_arg1:int, _arg2:int){ layers = []; _parallaxLayers = []; hasBG = false; ZERO_POINT = new Point(); super(); bitmapData = new BitmapData(_arg1, _arg2); rect = bitmapData.rect; } public function get cameraTarget():Point{ return (PixelBlitz.camera2D.target); } public function getLayerDepth(_arg1:IRenderLayer):int{ return (layers.indexOf(_arg1)); } public function set cameraTarget(_arg1:Point):void{ PixelBlitz.camera2D.target = _arg1; } public function removeLayer(_arg1:RenderLayer):Boolean{ var _local2:int; _local2 = 0; while (_local2 < layers.length) { if (layers[_local2] == _arg1){ layers.splice(_local2, 1); return (true); }; _local2++; }; return (false); } public function get cameraBoundary():Rectangle{ return (PixelBlitz.camera2D.boundary); } public function addLayer(_arg1:RenderLayer):void{ layers.push(_arg1); _arg1.renderer = this; _arg1.setSize(bitmapData.width, bitmapData.height); } public function render():void{ var _local1:int; var _local2:RenderLayer; PixelBlitz.camera2D.scroll(); bitmapData.lock(); if (!hasBG){ bitmapData.fillRect(rect, 0); }; layerLength = layers.length; _local1 = 0; while (_local1 < layerLength) { _local2 = layers[int(_local1)]; _local2.render(); bitmapData.copyPixels(_local2.bitmapData, rect, ZERO_POINT, null, null, true); _local1++; }; bitmapData.unlock(); } public function get cameraEase():Number{ return (PixelBlitz.camera2D.ease); } public function get numLayers():int{ return (layers.length); } public function swapLayers(_arg1:IRenderLayer, _arg2:IRenderLayer):void{ var _local3:int; var _local4:int; _local3 = layers.indexOf(_arg1); _local4 = layers.indexOf(_arg2); layers[_local3] = _arg1; layers[_local4] = _arg2; } public function get parallaxLayers():Array{ _parallaxLayers = layers.filter(findParallax); return (_parallaxLayers.reverse()); } public function set cameraBoundary(_arg1:Rectangle):void{ _arg1.x = (bitmapData.width >> 1); _arg1.y = (bitmapData.height >> 1); _arg1.width = (_arg1.width - bitmapData.width); _arg1.height = (_arg1.height - bitmapData.height); PixelBlitz.camera2D.boundary = _arg1; } public function set cameraEase(_arg1:Number):void{ PixelBlitz.camera2D.ease = _arg1; } private function findParallax(_arg1:RenderLayer, _arg2:int, _arg3:Array):Boolean{ return ((_arg1.useParallax == true)); } } }//package pixelblitz.core
Section 45
//DefaultEffect (pixelblitz.effects.DefaultEffect) package pixelblitz.effects { import flash.display.*; import flash.geom.*; public class DefaultEffect implements IEffect { protected const ZERO_POINT:Point; protected var rect:Rectangle; protected var width:int; protected var height:int; public function DefaultEffect(){ ZERO_POINT = new Point(); super(); } public function preRender(_arg1:BitmapData):void{ _arg1.fillRect(rect, 0); } public function init(_arg1:Rectangle):void{ this.rect = _arg1; width = _arg1.width; height = _arg1.height; } public function postRender(_arg1:BitmapData):void{ } } }//package pixelblitz.effects
Section 46
//IEffect (pixelblitz.effects.IEffect) package pixelblitz.effects { import flash.display.*; import flash.geom.*; public interface IEffect { function init(_arg1:Rectangle):void; function postRender(_arg1:BitmapData):void; function preRender(_arg1:BitmapData):void; } }//package pixelblitz.effects
Section 47
//PixelSprite (pixelblitz.elements.PixelSprite) package pixelblitz.elements { import flash.display.*; import flash.events.*; import flash.geom.*; import flash.filters.*; import pixelblitz.layers.*; import flash.utils.*; import pixelblitz.utils.*; import pixelblitz.*; public dynamic class PixelSprite extends EventDispatcher { protected const ZERO_POINT:Point; private var limitY2:int; private var limitEnabled:Boolean;// = false protected var left:int; protected var right:int; public var height:int; protected var bottom:int; protected var collisionRect:Rectangle; private var scrollDirection:uint;// = 0 protected var _layer:RenderLayer; protected var top:int; private var _alpha:Number;// = 1 private var bitmapDataAlpha:BitmapData; public var hotspotX:int;// = 0 public var hotspotY:int;// = 0 private var _scaleX:Number;// = 0 private var _scaleY:Number;// = 0 public var visible:Boolean;// = true public var bitmapData:BitmapData; private var scrollSpeed:int;// = 0 public var smoothing:Boolean;// = false private var bMath:BlitzMath; private var hotspotType:String; private var scrollBlock:BitmapData; public var width:int; private var scrollPasteRect:Rectangle; private var scrollPoint:Point; private var limitX2:int; private var limitX1:int; private var _autoscroll:Boolean;// = false public var rect:Rectangle; private var scrollCopyRect:Rectangle; private var limitY1:int; private var _x:int; private var _y:int; public static const HOTSPOT_CUSTOM:String = "hotspotCustom"; public static const HOTSPOT_RIGHT_MIDDLE:String = "hotspotRightMiddle"; public static const SCROLL_RIGHT:String = "autoScrollRight"; public static const HOTSPOT_BOTTOM_LEFT:String = "hotspotBottomLeft"; public static const SCROLL_UP:String = "autoScrollUp"; public static const HOTSPOT_BOTTOM_CENTER:String = "hotspotBottomCenter"; public static const SCROLL_DOWN:String = "autoScrollDown"; public static const HOTSPOT_TOP_LEFT:String = "hotspotTopLeft"; public static const HOTSPOT_CENTER:String = "hotspotCenter"; public static const HOTSPOT_TOP_RIGHT:String = "hotspotTopRight"; public static const HOTSPOT_TOP_CENTER:String = "hotspotTopCenter"; public static const HOTSPOT_BOTTOM_RIGHT:String = "hotspotBottomRight"; public static const SCROLL_LEFT:String = "autoScrollLeft"; public static const HOTSPOT_LEFT_MIDDLE:String = "hotspotLeftMiddle"; public function PixelSprite(_arg1:DisplayObject){ ZERO_POINT = new Point(); bMath = new BlitzMath(); collisionRect = new Rectangle(); smoothing = false; _scaleX = 0; _scaleY = 0; visible = true; _alpha = 1; hotspotX = 0; hotspotY = 0; limitEnabled = false; _autoscroll = false; scrollSpeed = 0; scrollDirection = 0; super(); parseClip(_arg1); rect = bitmapData.rect; width = bitmapData.width; height = bitmapData.height; x = _arg1.x; y = _arg1.y; top = y; bottom = (top + height); left = x; right = (left + width); hotspot(PixelSprite.HOTSPOT_CENTER); } public function set y(_arg1:int):void{ if ((((limitEnabled == false)) || ((((((limitEnabled == true)) && ((_arg1 >= limitY1)))) && ((_arg1 <= limitY2)))))){ _y = _arg1; }; } public function tint(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint):void{ var _local5:ColorTransform; var _local6:Number; _local5 = new ColorTransform(); _local6 = (_arg4 / 100); _local5.redMultiplier = (1 - _local6); _local5.greenMultiplier = (1 - _local6); _local5.blueMultiplier = (1 - _local6); _local5.redOffset = (_arg1 * _local6); _local5.greenOffset = (_arg2 * _local6); _local5.blueOffset = (_arg3 * _local6); bitmapData.colorTransform(rect, _local5); } public function get globalX():int{ if (hotspotX >= 0){ return ((x + hotspotX)); }; return ((x - Math.abs(hotspotX))); } public function get globalY():int{ if (hotspotY >= 0){ return ((y + hotspotY)); }; return ((y - Math.abs(hotspotY))); } public function dispose():void{ bitmapData = null; _layer.removeItem(this); } public function getBoxCollision(_arg1:PixelSprite):Boolean{ if (!(((((((top > _arg1.bottom)) || ((bottom < _arg1.top)))) || ((left > _arg1.right)))) || ((right < _arg1.left)))){ return (true); }; return (false); } public function get scaleY():Number{ return (_scaleY); } public function autoScroll(_arg1:String, _arg2:uint){ switch (_arg1){ case SCROLL_UP: scrollDirection = 1; scrollSpeed = -(_arg2); scrollBlock = new BitmapData(width, _arg2, true, 0); scrollCopyRect = new Rectangle(0, 0, width, _arg2); scrollPasteRect = scrollBlock.rect; scrollPoint = new Point(0, (height - _arg2)); _autoscroll = true; break; case SCROLL_DOWN: scrollDirection = 2; scrollSpeed = _arg2; scrollBlock = new BitmapData(width, _arg2, true, 0); scrollCopyRect = new Rectangle(0, (height - _arg2), width, _arg2); scrollPasteRect = scrollBlock.rect; scrollPoint = new Point(0, 0); _autoscroll = true; break; case SCROLL_LEFT: scrollDirection = 3; scrollSpeed = -(_arg2); scrollBlock = new BitmapData(_arg2, height, true, 0); scrollCopyRect = new Rectangle(0, 0, _arg2, height); scrollPasteRect = scrollBlock.rect; scrollPoint = new Point((width - _arg2), 0); _autoscroll = true; break; case SCROLL_RIGHT: scrollDirection = 4; scrollSpeed = _arg2; scrollBlock = new BitmapData(_arg2, height, true, 0); scrollCopyRect = new Rectangle((width - _arg2), 0, _arg2, height); scrollPasteRect = scrollBlock.rect; scrollPoint = new Point(0, 0); _autoscroll = true; break; default: _autoscroll = false; return; }; } public function get scaleX():Number{ return (_scaleX); } public function get alpha():Number{ return (_alpha); } public function scale(_arg1:Number, _arg2:Number):void{ var _local3:Matrix; var _local4:BitmapData; if ((((_arg1 <= 0)) || ((_arg2 <= 0)))){ return; }; _local3 = new Matrix(); _local3.scale(_arg1, _arg2); _local4 = new BitmapData((width * _arg1), (height * _arg2), true, 0); _local4.draw(bitmapData, _local3, null, null, null, smoothing); bitmapData = _local4.clone(); if (bitmapDataAlpha !== null){ _local4.draw(bitmapDataAlpha, _local3, null, null, null, smoothing); bitmapDataAlpha = _local4.clone(); }; _local4.dispose(); _scaleX = _arg1; _scaleY = _arg2; update(); hotspotX = (hotspotX * _arg1); hotspotY = (hotspotY * _arg2); } public function getDistance(_arg1:PixelSprite, _arg2:Boolean=true, _arg3:Boolean=true):Number{ var _local4:Number; var _local5:Number; var _local6:Number; if (_arg3){ _local4 = (_arg1.globalX - globalX); _local5 = (_arg1.globalY - globalY); } else { _local4 = (_arg1.x - x); _local5 = (_arg1.y - y); }; _local6 = bMath.sqrt(((_local4 * _local4) + (_local5 * _local5))); if (_arg2){ return (Math.round(_local6)); }; return (_local6); } public function getCollisionPoint(_arg1:Point):Boolean{ collisionRect.x = ((x + PixelBlitz.camera2D.basePoint.x) * _layer.parallax); collisionRect.y = ((y + PixelBlitz.camera2D.basePoint.y) * _layer.parallax); collisionRect.width = width; collisionRect.height = height; if (collisionRect.containsPoint(_arg1)){ return (true); }; return (false); } public function get x():int{ return (_x); } public function getCollision(_arg1:PixelSprite):Boolean{ if (bitmapData.hitTest(new Point(x, y), 1, _arg1.bitmapData, new Point(_arg1.x, _arg1.y), 1)){ return (true); }; return (false); } public function get y():int{ return (_y); } public function removeLimit():void{ limitEnabled = false; } public function addLimit(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Boolean{ if ((((_arg1 == _arg3)) || ((_arg2 == _arg4)))){ return (false); }; if (_arg1 > _arg3){ limitX1 = _arg3; limitX2 = _arg1; } else { limitX1 = _arg1; limitX2 = _arg3; }; if (_arg2 > _arg4){ limitY1 = _arg4; limitY2 = _arg2; } else { limitY1 = _arg2; limitY2 = _arg4; }; limitEnabled = true; return (true); } public function set scaleX(_arg1:Number):void{ if (_arg1 > 0.1){ scale(_arg1, 1); }; } public function set scaleY(_arg1:Number):void{ if (_arg1 > 0.1){ scale(1, _arg1); }; } public function set layer(_arg1:RenderLayer):void{ _layer = _arg1; } protected function parseClip(_arg1:DisplayObject):void{ var _local2:String; var _local3:BitmapData; var _local4:Matrix; _local2 = ((getQualifiedClassName(_arg1) + "_") + 1); if (((PixelBlitz.bmdCollection.search(_local2)) && ((!(_arg1) is Bitmap)))){ bitmapData = PixelBlitz.bmdCollection.collection[_local2]; } else { _local3 = new BitmapData(_arg1.width, _arg1.height, true, 0); if (((((!((_arg1.scaleX == 1))) || (!((_arg1.scaleY == 1))))) || (!((_arg1.rotation == 0))))){ _local4 = new Matrix(); _local4.scale(_arg1.scaleX, _arg1.scaleY); _local3.draw(_arg1, _local4); } else { _local3.draw(_arg1); }; bitmapData = PixelBlitz.bmdCollection.addBitmapData(_local2, _local3); }; } public function set alpha(_arg1:Number):void{ if ((((_arg1 >= 0)) && ((_arg1 <= 1)))){ _alpha = _arg1; if (bitmapDataAlpha === null){ bitmapDataAlpha = new BitmapData(width, height, true, 0); bitmapDataAlpha = bitmapData.clone(); }; bitmapData = bitmapDataAlpha.clone(); bitmapData.applyFilter(bitmapData, rect, ZERO_POINT, new ColorMatrixFilter([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, _arg1, 0])); }; } public function get depth():int{ return (_layer.getDepth(this)); } public function update():void{ rect = bitmapData.rect; width = bitmapData.width; height = bitmapData.height; top = y; bottom = (y + height); left = x; right = (x + width); if (_autoscroll){ scrollBlock.copyPixels(bitmapData, scrollCopyRect, ZERO_POINT); if (scrollDirection <= 2){ bitmapData.scroll(0, scrollSpeed); } else { bitmapData.scroll(scrollSpeed, 0); }; bitmapData.copyPixels(scrollBlock, scrollPasteRect, scrollPoint); }; } public function hotspot(_arg1:String):void{ hotspotType = _arg1; switch (_arg1){ case HOTSPOT_TOP_LEFT: hotspotX = left; hotspotY = top; break; case HOTSPOT_TOP_CENTER: hotspotX = (left + (width / 2)); hotspotY = top; break; case HOTSPOT_TOP_RIGHT: hotspotX = right; hotspotY = top; break; case HOTSPOT_LEFT_MIDDLE: hotspotX = left; hotspotY = (top + (height / 2)); break; case HOTSPOT_CENTER: hotspotX = -((left + (width / 2))); hotspotY = -((top + (height / 2))); break; case HOTSPOT_RIGHT_MIDDLE: hotspotX = right; hotspotY = (top + (height / 2)); break; case HOTSPOT_BOTTOM_LEFT: hotspotX = left; hotspotY = bottom; break; case HOTSPOT_BOTTOM_CENTER: hotspotX = (left + (width / 2)); hotspotY = bottom; break; case HOTSPOT_BOTTOM_RIGHT: hotspotX = right; hotspotY = bottom; break; default: hotspotType = HOTSPOT_CUSTOM; }; } public function set x(_arg1:int):void{ if ((((limitEnabled == false)) || ((((((limitEnabled == true)) && ((_arg1 >= limitX1)))) && ((_arg1 <= limitX2)))))){ _x = _arg1; }; } public function stopAutoScroll():void{ _autoscroll = false; } } }//package pixelblitz.elements
Section 48
//IRenderLayer (pixelblitz.layers.IRenderLayer) package pixelblitz.layers { import pixelblitz.core.*; public interface IRenderLayer { function setSize(_arg1:int, _arg2:int):void; function set renderer(_arg1:Renderer2D):void; function get renderer():Renderer2D; function render():void; } }//package pixelblitz.layers
Section 49
//RenderLayer (pixelblitz.layers.RenderLayer) package pixelblitz.layers { import flash.display.*; import pixelblitz.core.*; import flash.geom.*; import pixelblitz.effects.*; import pixelblitz.elements.*; import pixelblitz.*; public class RenderLayer implements IRenderLayer { private var items:Array; private var width:int; private var camPoint:Point; private var pos:Point; public var parallax:Number;// = 1 private var _renderer:Renderer2D; public var rect:Rectangle; private var height:int; private var _effect:IEffect; public var bitmapData:BitmapData; private var _useParallax:Boolean; public function RenderLayer(_arg1:Boolean=false){ items = new Array(); pos = new Point(); _effect = new DefaultEffect(); camPoint = PixelBlitz.camera2D.basePoint; parallax = 1; super(); _useParallax = _arg1; } public function get renderer():Renderer2D{ return (_renderer); } public function get useParallax():Boolean{ return (_useParallax); } public function set renderer(_arg1:Renderer2D):void{ _renderer = _arg1; } public function get effect():IEffect{ return (_effect); } public function setSize(_arg1:int, _arg2:int):void{ bitmapData = new BitmapData(_arg1, _arg2, true, 0); rect = bitmapData.rect; this.width = bitmapData.width; this.height = bitmapData.height; _effect.init(rect); } public function render():void{ var _local1:int; var _local2:int; var _local3:Array; var _local4:int; var _local5:int; var _local6:PixelSprite; if (_useParallax){ _local3 = _renderer.parallaxLayers; _local4 = _local3.indexOf(this); parallax = 1; _local5 = 0; while (_local5 < _local4) { parallax = (parallax * 0.5); _local5++; }; }; _effect.preRender(bitmapData); bitmapData.lock(); _local1 = items.length; _local2 = 0; while (_local2 < _local1) { _local6 = items[int(_local2)]; if (((_local6.visible) && ((_local6.alpha > 0)))){ pos.x = Math.ceil((_local6.globalX + (camPoint.x * parallax))); pos.y = Math.ceil((_local6.globalY + (camPoint.y * parallax))); if ((((((pos.x > -(_local6.width))) && ((pos.x < (width + _local6.width))))) && ((((pos.y > -(_local6.height))) && ((pos.y < (height + _local6.height))))))){ _local6.update(); bitmapData.copyPixels(_local6.bitmapData, _local6.rect, pos, null, null, true); }; }; _local2++; }; bitmapData.unlock(); _effect.postRender(bitmapData); } public function getDepth(_arg1:PixelSprite):int{ return (items.indexOf(_arg1)); } public function addItem(_arg1:PixelSprite):void{ items.push(_arg1); _arg1.layer = this; } public function swapDepths(_arg1:PixelSprite, _arg2:PixelSprite):void{ var _local3:int; var _local4:int; _local3 = items.indexOf(_arg1); _local4 = items.indexOf(_arg2); items[_local3] = _arg2; items[_local4] = _arg1; } public function set effect(_arg1:IEffect):void{ _effect = _arg1; if (_renderer){ _effect.init(rect); }; } public function get numChildren():int{ return (items.length); } public function removeItem(_arg1:PixelSprite):Boolean{ var _local2:int; while (_local2 < items.length) { if (items[_local2] == _arg1){ items.splice(_local2, 1); return (true); }; _local2++; }; return (false); } public function set useParallax(_arg1:Boolean):void{ _useParallax = _arg1; } } }//package pixelblitz.layers
Section 50
//BlitzFont (pixelblitz.utils.BlitzFont) package pixelblitz.utils { import flash.display.*; import flash.events.*; import flash.geom.*; public class BlitzFont extends EventDispatcher { private var fontSet:BitmapData; private var characterPerRow:uint; private var grabData:Array; private var scrollerBuffer:BitmapData; private var characterWidth:uint; private var offsetX:uint; private var scrollComplete:Boolean; private var scrollText:String; private var characterHeight:uint; private var scrollerCleanRect:Rectangle; private var offsetY:uint; private var scrollWrap:Boolean; private var scroller:BitmapData; private var scrollSpacing:uint; private var characterSpacingX:uint; private var characterSpacingY:uint; private var scrollRects:Array; private var scrollEventChar:uint; private var scrollPos:uint; private var scrollCharWidth:uint; private var scrollPaused:Boolean; private var scrollEvent:Event; private var scrollChar:uint; private var scrollPoint:Point; private var scrollWidth:uint; private var scrollSpeed:uint; public static const SCROLLER_COMPLETE:String = "scrollerComplete"; public static const SET11:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789"; public static const ALIGN_LEFT:uint = 0; public static const ALIGN_RIGHT:uint = 1; public static const SCROLLER_WRAP:String = "scrollerWrap"; public static const SET2:String = " !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"; public static const SET3:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "; public static const SET4:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789"; public static const SET5:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789"; public static const SET6:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.' "; public static const SET7:String = "AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39"; public static const ALIGN_CENTER:uint = 2; public static const SET9:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!"; public static const SET10:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; public static const SET8:String = "0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ"; public static const SET1:String = " !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"; public function BlitzFont():void{ } public function getCharacter(_arg1:String):BitmapData{ var _local2:BitmapData; _local2 = new BitmapData(characterWidth, characterHeight, true, 15); if ((((grabData[_arg1.charCodeAt(0)] is Rectangle)) && (!((_arg1.charCodeAt(0) == 32))))){ _local2.copyPixels(fontSet, grabData[_arg1.charCodeAt(0)], new Point(0, 0)); }; return (_local2); } public function init(_arg1:BitmapData, _arg2:uint, _arg3:uint, _arg4:String, _arg5:uint, _arg6:uint=0, _arg7:uint=0, _arg8:uint=0, _arg9:uint=0):void{ var _local10:uint; var _local11:uint; var _local12:uint; var _local13:uint; fontSet = _arg1.clone(); characterWidth = _arg2; characterHeight = _arg3; characterSpacingX = _arg6; characterSpacingY = _arg7; characterPerRow = _arg5; offsetX = _arg8; offsetY = _arg9; grabData = new Array(); _local10 = offsetX; _local11 = offsetY; _local12 = 0; _local13 = 0; while (_local13 < _arg4.length) { grabData[_arg4.charCodeAt(_local13)] = new Rectangle(_local10, _local11, characterWidth, characterHeight); ++_local12; if (_local12 == characterPerRow){ _local12 = 0; _local10 = offsetX; _local11 = (_local11 + (characterHeight + characterSpacingY)); } else { _local10 = (_local10 + (characterWidth + characterSpacingX)); }; _local13++; }; } public function getMultiLine(_arg1:String, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0, _arg5:Boolean=true):BitmapData{ var _local6:Array; var _local7:uint; var _local8:uint; var _local9:int; var _local10:int; var _local11:BitmapData; var _local12:uint; if (_arg5){ _arg1 = _arg1.toUpperCase(); }; _arg1 = removeUnsupportedCharacters(_arg1, false); _local6 = _arg1.split("\n"); _local7 = _local6.length; _local8 = getLongestLine(_arg1); if (((((_local8 * (characterWidth + _arg2)) > 2880)) || ((((_local7 * (characterHeight + _arg3)) - _arg3) > 2880)))){ throw (Error("Text is too long when converted to bitmap (maximum width is 2880 pixels)")); }; _local9 = 0; _local10 = 0; _local11 = new BitmapData((_local8 * (characterWidth + _arg2)), ((_local7 * (characterHeight + _arg3)) - _arg3), true, 15); _local12 = 0; while (_local12 < _local6.length) { switch (_arg4){ case ALIGN_LEFT: _local9 = 0; break; case ALIGN_RIGHT: _local9 = (_local11.width - (_local6[_local12].length * (characterWidth + _arg2))); break; case ALIGN_CENTER: _local9 = ((_local11.width / 2) - ((_local6[_local12].length * (characterWidth + _arg2)) / 2)); _local9 = (_local9 + (_arg2 / 2)); break; }; pasteLine(_local11, _local6[_local12], _local9, _local10, _arg2); _local10 = (_local10 + (characterHeight + _arg3)); _local12++; }; return (_local11); } public function defineScroller(_arg1:uint, _arg2:uint, _arg3:String, _arg4:Boolean=true, _arg5:Boolean=true, _arg6:uint=0):BitmapData{ var _local7:uint; if (_arg1 < characterWidth){ throw (Error("Scroll text width cannot be less than the width of the font")); }; if (_arg1 > 2880){ throw (Error("Scroll text width cannot be larger than 2880")); }; if (_arg4){ _arg3 = _arg3.toUpperCase(); }; scrollText = removeUnsupportedCharacters(_arg3); scrollWidth = _arg1; scrollCharWidth = (characterWidth + _arg6); scrollSpacing = _arg6; scrollSpeed = _arg2; scrollWrap = _arg5; scrollPos = 0; scrollComplete = false; scrollPaused = false; scroller = new BitmapData(_arg1, characterHeight, true, 15); scrollerBuffer = new BitmapData((scrollCharWidth * 10), characterHeight, true, 15); if (scrollSpacing > 0){ scrollerCleanRect = new Rectangle((scrollWidth - scrollSpacing), 0, scrollSpacing, scroller.height); } else { scrollerCleanRect = new Rectangle((scrollWidth - 1), 0, 1, scroller.height); }; scrollRects = new Array(); _local7 = 0; while (_local7 <= scrollerBuffer.width) { scrollRects.push(new Rectangle(_local7, 0, scrollSpeed, characterHeight)); _local7++; }; scrollPoint = new Point((_arg1 - scrollSpeed), 0); scrollerBuffer = getLine(scrollText.substr(0, 10), scrollSpacing, false); scrollChar = 10; return (scroller); } public function updateScroller():void{ var _local1:BitmapData; if ((((scrollComplete == false)) && ((scrollPaused == false)))){ scroller.lock(); scroller.scroll(-(scrollSpeed), 0); scroller.fillRect(scrollerCleanRect, 15); scroller.copyPixels(scrollerBuffer, scrollRects[scrollPos], scrollPoint); scroller.unlock(); scrollPos = (scrollPos + scrollSpeed); if (scrollRects[scrollPos].right > scrollerBuffer.width){ scrollPos = 0; scrollerBuffer.lock(); scrollerBuffer.fillRect(new Rectangle(0, 0, scrollerBuffer.width, scrollerBuffer.height), 15); _local1 = getLine(scrollText.substr(scrollChar, 10), scrollSpacing, false); scrollerBuffer.copyPixels(_local1, new Rectangle(0, 0, _local1.width, _local1.height), new Point(0, 0)); scrollerBuffer.unlock(); if ((scrollChar + 10) >= scrollText.length){ if (scrollWrap == false){ scrollComplete = true; dispatchEvent(new Event(BlitzFont.SCROLLER_COMPLETE)); } else { scrollChar = 0; dispatchEvent(new Event(BlitzFont.SCROLLER_WRAP)); }; } else { scrollChar = (scrollChar + 10); }; }; }; } private function pasteLine(_arg1:BitmapData, _arg2:String, _arg3:uint=0, _arg4:uint=0, _arg5:uint=0){ var _local6:uint; _local6 = 0; while (_local6 < _arg2.length) { if (_arg2.charCodeAt(_local6) == scrollEventChar){ dispatchEvent(scrollEvent); }; if (_arg2.charAt(_local6) == " "){ _arg3 = (_arg3 + (characterWidth + _arg5)); } else { if ((grabData[_arg2.charCodeAt(_local6)] is Rectangle)){ _arg1.copyPixels(fontSet, grabData[_arg2.charCodeAt(_local6)], new Point(_arg3, _arg4)); _arg3 = (_arg3 + (characterWidth + _arg5)); }; }; _local6++; }; } public function addScrollerEvent(_arg1:String, _arg2:Event):void{ scrollEventChar = _arg1.charCodeAt(0); scrollEvent = _arg2; } private function removeUnsupportedCharacters(_arg1:String, _arg2:Boolean=true):String{ var _local3:String; var _local4:uint; _local3 = ""; _local4 = 0; while (_local4 < _arg1.length) { if ((((((grabData[_arg1.charCodeAt(_local4)] is Rectangle)) || ((_arg1.charCodeAt(_local4) == 32)))) || ((((_arg2 == false)) && ((_arg1.charAt(_local4) == "\n")))))){ _local3 = _local3.concat(_arg1.charAt(_local4)); }; _local4++; }; return (_local3); } public function removeScrollerEvent():void{ scrollEvent = null; scrollEventChar = NaN; } private function getLongestLine(_arg1:String):uint{ var _local2:Array; var _local3:uint; var _local4:uint; _local2 = _arg1.split("\n"); _local3 = 0; _local4 = 0; while (_local4 < _local2.length) { if (_local2[_local4].length > _local3){ _local3 = _local2[_local4].length; }; _local4++; }; return (_local3); } public function getLine(_arg1:String, _arg2:uint=0, _arg3:Boolean=true):BitmapData{ var _local4:int; var _local5:BitmapData; if (_arg3){ _arg1 = _arg1.toUpperCase(); }; _arg1 = removeUnsupportedCharacters(_arg1); if ((_arg1.length * (characterWidth + _arg2)) > 2880){ throw (Error("Text is too long when converted to bitmap (maximum width is 2880 pixels)")); }; _local4 = 0; _local5 = new BitmapData((_arg1.length * (characterWidth + _arg2)), characterHeight, true, 15); pasteLine(_local5, _arg1, 0, 0, _arg2); return (_local5); } } }//package pixelblitz.utils
Section 51
//BlitzMath (pixelblitz.utils.BlitzMath) package pixelblitz.utils { public class BlitzMath { public var getrandmax:int;// = 2147483647 private var sinTable:Array; private var cosTable:Array; private var mr:uint;// = 0 private static const DEGTORAD:Number = 0.0174532925199433; private static const RADTODEG:Number = 57.2957795130823; private static var coefficient1:Number = 0.785398163397448; public function BlitzMath(){ getrandmax = int.MAX_VALUE; mr = 0; super(); } public function sinCosGenerator(_arg1:uint, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1):void{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:uint; _local5 = _arg2; _local6 = _arg3; _local7 = ((_arg4 * Math.PI) / _arg1); cosTable = new Array(); sinTable = new Array(); _local8 = 0; while (_local8 < _arg1) { _local6 = (_local6 - (_local5 * _local7)); _local5 = (_local5 + (_local6 * _local7)); cosTable.push(_local6); sinTable.push(_local5); _local8++; }; } public function getSinTable():Array{ return (sinTable); } public function chanceRoll(_arg1:uint=50):Boolean{ if (_arg1 <= 0){ return (false); }; if (_arg1 >= 100){ return (true); }; if ((Math.random() * 100) >= _arg1){ return (true); }; return (false); } public function powerOf2mod(_arg1:uint, _arg2:uint):uint{ return ((_arg1 & (_arg2 - 1))); } public function asDegrees(_arg1:Number):Number{ return ((_arg1 * RADTODEG)); } public function atan2(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; _local3 = _arg1; _local4 = (3 * coefficient1); if (_local3 < 0){ _local3 = -(_local3); }; if (_arg2 >= 0){ _local5 = ((_arg2 - _local3) / (_arg2 + _local3)); _local6 = (coefficient1 - (coefficient1 * _local5)); } else { _local5 = ((_arg2 + _local3) / (_local3 - _arg2)); _local6 = (_local4 - (coefficient1 * _local5)); }; return (((_arg1 < 0)) ? -(_local6) : _local6); } public function miniRand():int{ var _local1:uint; _local1 = mr; _local1++; _local1 = (_local1 * 75); _local1 = (_local1 % 65537); _local1--; mr++; if (mr == 65536){ mr = 0; }; return (_local1); } public function sqrt(_arg1:Number):Number{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; if (isNaN(_arg1)){ return (NaN); }; _local2 = 0.002; _local3 = (_arg1 * 0.25); if (_arg1 == 0){ return (0); }; do { _local5 = (_arg1 / _local3); _local3 = ((_local3 + _local5) * 0.5); _local4 = (_local3 - _local5); if (_local4 < 0){ _local4 = -(_local4); }; } while (_local4 > _local2); return (_local3); } public function isEven(_arg1:Number):Boolean{ return (((_arg1 & 1) == 0)); } public function asRadians(_arg1:Number):Number{ return ((_arg1 * DEGTORAD)); } public function abs(_arg1:int):int{ return (((_arg1 ^ (_arg1 >> 31)) - (_arg1 >> 31))); } public function rand(_arg1:Number=NaN, _arg2:Number=NaN):int{ if (isNaN(_arg1)){ _arg1 = 0; }; if (isNaN(_arg2)){ _arg2 = getrandmax; }; if (_arg1 === _arg2){ return (_arg1); }; if (_arg1 < _arg2){ return ((_arg1 + (Math.random() * _arg2))); }; return ((_arg2 + (Math.random() * _arg1))); } public function randFloat(_arg1:Number=NaN, _arg2:Number=NaN):Number{ if (isNaN(_arg1)){ _arg1 = 0; }; if (isNaN(_arg2)){ _arg2 = getrandmax; }; if (_arg1 === _arg2){ return (_arg1); }; if (_arg1 < _arg2){ return ((_arg1 + (Math.random() * _arg2))); }; return ((_arg2 + (Math.random() * _arg1))); } public function getCosTable():Array{ return (cosTable); } } }//package pixelblitz.utils
Section 52
//PixelBlitz (pixelblitz.PixelBlitz) package pixelblitz { import pixelblitz.core.*; public final class PixelBlitz { public static var AUTHOR:String = "(c) 2008 Copyright Norm Soule | Richard Davey"; public static var NAME:String = "PixelBlitz"; public static var DATE:String = "02.09.08"; public static var camera2D:Camera2D = Camera2D.getInstance(); public static var VERSION:String = "Public Alpha 1.1"; public static var bmdCollection:BitmapDataCollection = BitmapDataCollection.getInstance(); } }//package pixelblitz
Section 53
//abombinaball (abombinaball) package { import flash.display.*; import photonstorm.abombinaball.*; import flash.utils.*; public class abombinaball extends Sprite { private var pretimer:Timer; public function abombinaball():void{ var _local1:String; var _local2:MovieClip; super(); _local1 = "f576986092cedad0"; stage.scaleMode = StageScaleMode.NO_BORDER; stage.align = StageAlign.TOP_LEFT; stage.focus = null; _local2 = new MovieClip(); addChild(_local2); MochiAd.showPreGameAd({id:"f576986092cedad0", res:"550x432", clip:_local2, ad_finished:go, ad_skipped:go}); } private function go():void{ var _local1:gameEngine; _local1 = new gameEngine(); addChild(_local1); } } }//package
Section 54
//action01PNG (action01PNG) package { import flash.display.*; public dynamic class action01PNG extends BitmapData { public function action01PNG(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 55
//action02PNG (action02PNG) package { import flash.display.*; public dynamic class action02PNG extends BitmapData { public function action02PNG(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 56
//action03PNG (action03PNG) package { import flash.display.*; public dynamic class action03PNG extends BitmapData { public function action03PNG(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 57
//action04PNG (action04PNG) package { import flash.display.*; public dynamic class action04PNG extends BitmapData { public function action04PNG(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 58
//action05PNG (action05PNG) package { import flash.display.*; public dynamic class action05PNG extends BitmapData { public function action05PNG(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 59
//action06PNG (action06PNG) package { import flash.display.*; public dynamic class action06PNG extends BitmapData { public function action06PNG(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 60
//action07PNG (action07PNG) package { import flash.display.*; public dynamic class action07PNG extends BitmapData { public function action07PNG(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 61
//action08PNG (action08PNG) package { import flash.display.*; public dynamic class action08PNG extends BitmapData { public function action08PNG(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 62
//action12PNG (action12PNG) package { import flash.display.*; public dynamic class action12PNG extends BitmapData { public function action12PNG(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 63
//action13PNG (action13PNG) package { import flash.display.*; public dynamic class action13PNG extends BitmapData { public function action13PNG(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 64
//action14PNG (action14PNG) package { import flash.display.*; public dynamic class action14PNG extends BitmapData { public function action14PNG(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 65
//action15PNG (action15PNG) package { import flash.display.*; public dynamic class action15PNG extends BitmapData { public function action15PNG(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 66
//bomb0BD (bomb0BD) package { import flash.display.*; public dynamic class bomb0BD extends BitmapData { public function bomb0BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 67
//bomb1BD (bomb1BD) package { import flash.display.*; public dynamic class bomb1BD extends BitmapData { public function bomb1BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 68
//bomb2BD (bomb2BD) package { import flash.display.*; public dynamic class bomb2BD extends BitmapData { public function bomb2BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 69
//bomb3BD (bomb3BD) package { import flash.display.*; public dynamic class bomb3BD extends BitmapData { public function bomb3BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 70
//bomb4BD (bomb4BD) package { import flash.display.*; public dynamic class bomb4BD extends BitmapData { public function bomb4BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 71
//bomb5BD (bomb5BD) package { import flash.display.*; public dynamic class bomb5BD extends BitmapData { public function bomb5BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 72
//bomb6BD (bomb6BD) package { import flash.display.*; public dynamic class bomb6BD extends BitmapData { public function bomb6BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 73
//bomb7BD (bomb7BD) package { import flash.display.*; public dynamic class bomb7BD extends BitmapData { public function bomb7BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 74
//bomb8BD (bomb8BD) package { import flash.display.*; public dynamic class bomb8BD extends BitmapData { public function bomb8BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 75
//bomb9BD (bomb9BD) package { import flash.display.*; public dynamic class bomb9BD extends BitmapData { public function bomb9BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 76
//bombOffBD (bombOffBD) package { import flash.display.*; public dynamic class bombOffBD extends BitmapData { public function bombOffBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 77
//bubbleBD (bubbleBD) package { import flash.display.*; public dynamic class bubbleBD extends BitmapData { public function bubbleBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 78
//Candara (Candara) package { import flash.text.*; public dynamic class Candara extends Font { } }//package
Section 79
//completeWAV (completeWAV) package { import flash.media.*; public dynamic class completeWAV extends Sound { } }//package
Section 80
//creditsBD (creditsBD) package { import flash.display.*; public dynamic class creditsBD extends BitmapData { public function creditsBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 81
//deactivateWAV (deactivateWAV) package { import flash.media.*; public dynamic class deactivateWAV extends Sound { } }//package
Section 82
//deathWAV (deathWAV) package { import flash.media.*; public dynamic class deathWAV extends Sound { } }//package
Section 83
//explodeWAV (explodeWAV) package { import flash.media.*; public dynamic class explodeWAV extends Sound { } }//package
Section 84
//explosionMC (explosionMC) package { import flash.display.*; public dynamic class explosionMC extends MovieClip { public function explosionMC(){ addFrameScript(22, frame23); } function frame23(){ stop(); } } }//package
Section 85
//focusRectSkin (focusRectSkin) package { import flash.display.*; public dynamic class focusRectSkin extends MovieClip { } }//package
Section 86
//helpPage1BD (helpPage1BD) package { import flash.display.*; public dynamic class helpPage1BD extends BitmapData { public function helpPage1BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 87
//helpPage2BD (helpPage2BD) package { import flash.display.*; public dynamic class helpPage2BD extends BitmapData { public function helpPage2BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 88
//helpPage3BD (helpPage3BD) package { import flash.display.*; public dynamic class helpPage3BD extends BitmapData { public function helpPage3BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 89
//horiz01BD (horiz01BD) package { import flash.display.*; public dynamic class horiz01BD extends BitmapData { public function horiz01BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 90
//horiz02BD (horiz02BD) package { import flash.display.*; public dynamic class horiz02BD extends BitmapData { public function horiz02BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 91
//horiz03BD (horiz03BD) package { import flash.display.*; public dynamic class horiz03BD extends BitmapData { public function horiz03BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 92
//horiz04BD (horiz04BD) package { import flash.display.*; public dynamic class horiz04BD extends BitmapData { public function horiz04BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 93
//horiz05BD (horiz05BD) package { import flash.display.*; public dynamic class horiz05BD extends BitmapData { public function horiz05BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 94
//horiz06BD (horiz06BD) package { import flash.display.*; public dynamic class horiz06BD extends BitmapData { public function horiz06BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 95
//horiz07BD (horiz07BD) package { import flash.display.*; public dynamic class horiz07BD extends BitmapData { public function horiz07BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 96
//horiz08BD (horiz08BD) package { import flash.display.*; public dynamic class horiz08BD extends BitmapData { public function horiz08BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 97
//horiz09BD (horiz09BD) package { import flash.display.*; public dynamic class horiz09BD extends BitmapData { public function horiz09BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 98
//horiz10BD (horiz10BD) package { import flash.display.*; public dynamic class horiz10BD extends BitmapData { public function horiz10BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 99
//horiz11BD (horiz11BD) package { import flash.display.*; public dynamic class horiz11BD extends BitmapData { public function horiz11BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 100
//horiz12BD (horiz12BD) package { import flash.display.*; public dynamic class horiz12BD extends BitmapData { public function horiz12BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 101
//horiz13BD (horiz13BD) package { import flash.display.*; public dynamic class horiz13BD extends BitmapData { public function horiz13BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 102
//horiz14BD (horiz14BD) package { import flash.display.*; public dynamic class horiz14BD extends BitmapData { public function horiz14BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 103
//horiz15BD (horiz15BD) package { import flash.display.*; public dynamic class horiz15BD extends BitmapData { public function horiz15BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 104
//horiz16BD (horiz16BD) package { import flash.display.*; public dynamic class horiz16BD extends BitmapData { public function horiz16BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 105
//horiz17BD (horiz17BD) package { import flash.display.*; public dynamic class horiz17BD extends BitmapData { public function horiz17BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 106
//horiz18BD (horiz18BD) package { import flash.display.*; public dynamic class horiz18BD extends BitmapData { public function horiz18BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 107
//horiz19BD (horiz19BD) package { import flash.display.*; public dynamic class horiz19BD extends BitmapData { public function horiz19BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 108
//instructions1BD (instructions1BD) package { import flash.display.*; public dynamic class instructions1BD extends BitmapData { public function instructions1BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 109
//instructions2BD (instructions2BD) package { import flash.display.*; public dynamic class instructions2BD extends BitmapData { public function instructions2BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 110
//instructions3BD (instructions3BD) package { import flash.display.*; public dynamic class instructions3BD extends BitmapData { public function instructions3BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 111
//instructions4BD (instructions4BD) package { import flash.display.*; public dynamic class instructions4BD extends BitmapData { public function instructions4BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 112
//instructions5BD (instructions5BD) package { import flash.display.*; public dynamic class instructions5BD extends BitmapData { public function instructions5BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 113
//jumpWAV (jumpWAV) package { import flash.media.*; public dynamic class jumpWAV extends Sound { } }//package
Section 114
//knighthawksFontBD (knighthawksFontBD) package { import flash.display.*; public dynamic class knighthawksFontBD extends BitmapData { public function knighthawksFontBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 115
//MochiAd (MochiAd) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.system.*; import flash.net.*; public class MochiAd { public static function getVersion():String{ return ("2.7"); } public static function showClickAwayAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_timeout:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var sendHostProgress:Boolean; var options = _arg1; DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{ }, ad_finished:function ():void{ }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_timeout = options.ad_timeout; delete options.ad_timeout; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; sendHostProgress = false; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; if (!this.parent){ delete this.onEnterFrame; return; }; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; _local3 = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.root == null){ _local3 = true; }; if (_local3){ delete this.onEnterFrame; }; }; doOnEnterFrame(chk); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _allowDomains(_arg1:String):String{ var _local2:String; _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (_arg1.origFrameRate != undefined){ _arg1.stage.frameRate = _arg1.origFrameRate; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad._containerLCName != undefined){ _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"}); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (_local2 > chk.ad_msec){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local3:Object; var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ }; return (_local3); } public static function _cleanup(_arg1:Object):void{ var idx:Number; var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; setTimeout(f, 0); }; idx = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function load(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var depth:Number; var mc:MovieClip; var wh:Array; var lv:URLVariables; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); wh = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; }; lv = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; mc.lcName = name; lv.lc = name; lv.st = getTimer(); loader = new Loader(); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime())); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{ var _local4:Array; var _local5:Number; _local4 = _arg2.split("."); _local5 = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return (undefined); }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; if (typeof(_arg1[_local4[_local5]]) == "function"){ return (_arg1[_local4[_local5]].apply(_arg1, _arg3)); }; return (undefined); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip; _local4 = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local3:Object; var _local4:Number; var _local5:Number; var _local6:Array; _local3 = _arg2.getBounds(_arg2.root); _local4 = 0; _local5 = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function adShowing(_arg1:Object):void{ _arg1.origFrameRate = _arg1.stage.frameRate; _arg1.stage.frameRate = 30; } public static function getValue(_arg1:Object, _arg2:String):Object{ var _local3:Array; var _local4:Number; _local3 = _arg2.split("."); _local4 = 0; while (_local4 < (_local3.length - 1)) { if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){ return (undefined); }; _arg1 = _arg1[_local3[_local4]]; _local4++; }; return (_arg1[_local3[_local4]]); } public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{ var _local4:Object; var _local5:Object; switch (_arg3.id){ case "setValue": MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value); break; case "getValue": _local4 = MochiAd.getValue(_arg1, _arg3.objectName); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4); break; case "runMethod": _local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5); break; }; } public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Array; var _local5:Number; _local4 = _arg2.split("."); _local5 = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return; }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; _arg1[_local4[_local5]] = _arg3; } public static function showPreGameAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var bar:MovieClip; var bar_color:Number; var bar_background:Number; var bar_outline:Number; var backing_mc:MovieClip; var backing:Object; var inside_mc:MovieClip; var inside:Object; var outline_mc:MovieClip; var outline:Object; var complete:Boolean; var unloaded:Boolean; var f:Function; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ }, ad_skipped:function ():void{ }, ad_progress:function (_arg1:Number):void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){ options.ad_started(); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); return; }; clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ var fn:Function; MochiAd._cleanup(mc); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); bar = createEmptyMovieClip(chk, "_mochiad_bar", 4); if (options.no_progress_bar){ bar.visible = false; delete options.no_progress_bar; } else { bar.x = 10; bar.y = (h - 20); }; bar_color = options.color; delete options.color; bar_background = options.background; delete options.background; bar_outline = options.outline; delete options.outline; backing_mc = createEmptyMovieClip(bar, "_outline", 1); backing = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); inside_mc = createEmptyMovieClip(bar, "_inside", 2); inside = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; outline_mc = createEmptyMovieClip(bar, "_outline", 3); outline = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; f = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; mc.rpcTestFn = function (_arg1:String):Object{ return (_arg1); }; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; sendHostProgress = false; mc.sendHostLoadProgress = function (_arg1:String):void{ sendHostProgress = true; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Object; var _local3:Number; var _local4:Boolean; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Object; var _local10:Number; var _local11:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; _local1 = this.parent.parent.root; _local2 = this.parent._mochiad_ctr; _local3 = (getTimer() - this.started); _local4 = false; _local5 = _local1.loaderInfo.bytesTotal; _local6 = _local1.loaderInfo.bytesLoaded; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; _local7 = ((100 * _local6) / _local5); _local8 = ((100 * _local3) / chk.ad_msec); _local9 = this._mochiad_bar._inside; _local10 = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); options.ad_progress(_local10); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7}); if (_local7 == 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local11 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ MochiAd.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ MochiAd.showInterLevelAd(_arg1); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var f:Function; var mc = _arg1; f = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package
Section 116
//MochiBot (MochiBot) package { import flash.display.*; import flash.system.*; import flash.net.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ var _local3:MochiBot; var _local4:String; var _local5:URLVariables; var _local6:String; var _local7:URLRequest; var _local8:Loader; if (Security.sandboxType == "localWithFile"){ return (null); }; _local3 = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); _local4 = "http://core.mochibot.com/my/core.swf"; _local5 = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; _local6 = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; _local7 = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; _local8 = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 117
//moveWAV (moveWAV) package { import flash.media.*; public dynamic class moveWAV extends Sound { } }//package
Section 118
//muteOffBD (muteOffBD) package { import flash.display.*; public dynamic class muteOffBD extends BitmapData { public function muteOffBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 119
//muteOnBD (muteOnBD) package { import flash.display.*; public dynamic class muteOnBD extends BitmapData { public function muteOnBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 120
//myTextArea (myTextArea) package { import flash.display.*; import flash.text.*; public dynamic class myTextArea extends MovieClip { public var textBox:TextField; } }//package
Section 121
//pauseGameBD (pauseGameBD) package { import flash.display.*; public dynamic class pauseGameBD extends BitmapData { public function pauseGameBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 122
//planet1BD (planet1BD) package { import flash.display.*; public dynamic class planet1BD extends BitmapData { public function planet1BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 123
//planet2BD (planet2BD) package { import flash.display.*; public dynamic class planet2BD extends BitmapData { public function planet2BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 124
//planet3BD (planet3BD) package { import flash.display.*; public dynamic class planet3BD extends BitmapData { public function planet3BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 125
//planet4BD (planet4BD) package { import flash.display.*; public dynamic class planet4BD extends BitmapData { public function planet4BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 126
//planet5BD (planet5BD) package { import flash.display.*; public dynamic class planet5BD extends BitmapData { public function planet5BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 127
//playGameBD (playGameBD) package { import flash.display.*; public dynamic class playGameBD extends BitmapData { public function playGameBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 128
//quitGameBD (quitGameBD) package { import flash.display.*; public dynamic class quitGameBD extends BitmapData { public function quitGameBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 129
//rasters1BD (rasters1BD) package { import flash.display.*; public dynamic class rasters1BD extends BitmapData { public function rasters1BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 130
//rasters2BD (rasters2BD) package { import flash.display.*; public dynamic class rasters2BD extends BitmapData { public function rasters2BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 131
//rasters3BD (rasters3BD) package { import flash.display.*; public dynamic class rasters3BD extends BitmapData { public function rasters3BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 132
//rocketBD (rocketBD) package { import flash.display.*; public dynamic class rocketBD extends BitmapData { public function rocketBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 133
//TextInput_disabledSkin (TextInput_disabledSkin) package { import flash.display.*; public dynamic class TextInput_disabledSkin extends MovieClip { } }//package
Section 134
//TextInput_upSkin (TextInput_upSkin) package { import flash.display.*; public dynamic class TextInput_upSkin extends MovieClip { } }//package
Section 135
//theBombSparkBD (theBombSparkBD) package { import flash.display.*; public dynamic class theBombSparkBD extends BitmapData { public function theBombSparkBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 136
//theSparkBD (theSparkBD) package { import flash.display.*; public dynamic class theSparkBD extends BitmapData { public function theSparkBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 137
//tickWAV (tickWAV) package { import flash.media.*; public dynamic class tickWAV extends Sound { } }//package
Section 138
//tileSheetBD (tileSheetBD) package { import flash.display.*; public dynamic class tileSheetBD extends BitmapData { public function tileSheetBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 139
//titleBackdropBD (titleBackdropBD) package { import flash.display.*; public dynamic class titleBackdropBD extends BitmapData { public function titleBackdropBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 140
//titleBlocksBD (titleBlocksBD) package { import flash.display.*; public dynamic class titleBlocksBD extends BitmapData { public function titleBlocksBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 141
//titleLogoBD (titleLogoBD) package { import flash.display.*; public dynamic class titleLogoBD extends BitmapData { public function titleLogoBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 142
//titleManBD (titleManBD) package { import flash.display.*; public dynamic class titleManBD extends BitmapData { public function titleManBD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 143
//vertical01BD (vertical01BD) package { import flash.display.*; public dynamic class vertical01BD extends BitmapData { public function vertical01BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 144
//vertical02BD (vertical02BD) package { import flash.display.*; public dynamic class vertical02BD extends BitmapData { public function vertical02BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 145
//vertical03BD (vertical03BD) package { import flash.display.*; public dynamic class vertical03BD extends BitmapData { public function vertical03BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 146
//vertical04BD (vertical04BD) package { import flash.display.*; public dynamic class vertical04BD extends BitmapData { public function vertical04BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 147
//vertical05BD (vertical05BD) package { import flash.display.*; public dynamic class vertical05BD extends BitmapData { public function vertical05BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 148
//vertical06BD (vertical06BD) package { import flash.display.*; public dynamic class vertical06BD extends BitmapData { public function vertical06BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 149
//vertical07BD (vertical07BD) package { import flash.display.*; public dynamic class vertical07BD extends BitmapData { public function vertical07BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 150
//vertical08BD (vertical08BD) package { import flash.display.*; public dynamic class vertical08BD extends BitmapData { public function vertical08BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 151
//vertical09BD (vertical09BD) package { import flash.display.*; public dynamic class vertical09BD extends BitmapData { public function vertical09BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 152
//vertical10BD (vertical10BD) package { import flash.display.*; public dynamic class vertical10BD extends BitmapData { public function vertical10BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 153
//vertical11BD (vertical11BD) package { import flash.display.*; public dynamic class vertical11BD extends BitmapData { public function vertical11BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 154
//vertical12BD (vertical12BD) package { import flash.display.*; public dynamic class vertical12BD extends BitmapData { public function vertical12BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 155
//vertical13BD (vertical13BD) package { import flash.display.*; public dynamic class vertical13BD extends BitmapData { public function vertical13BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 156
//vertical14BD (vertical14BD) package { import flash.display.*; public dynamic class vertical14BD extends BitmapData { public function vertical14BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 157
//vertical15BD (vertical15BD) package { import flash.display.*; public dynamic class vertical15BD extends BitmapData { public function vertical15BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 158
//vertical16BD (vertical16BD) package { import flash.display.*; public dynamic class vertical16BD extends BitmapData { public function vertical16BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 159
//vertical17BD (vertical17BD) package { import flash.display.*; public dynamic class vertical17BD extends BitmapData { public function vertical17BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 160
//vertical18BD (vertical18BD) package { import flash.display.*; public dynamic class vertical18BD extends BitmapData { public function vertical18BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 161
//vertical19BD (vertical19BD) package { import flash.display.*; public dynamic class vertical19BD extends BitmapData { public function vertical19BD(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package

Library Items

Symbol 1 Font {Candara}
Symbol 2 Sound {tickWAV}
Symbol 3 Sound {moveWAV}
Symbol 4 Sound {jumpWAV}
Symbol 5 Sound {explodeWAV}
Symbol 6 Sound {deathWAV}
Symbol 7 Sound {deactivateWAV}
Symbol 8 Sound {completeWAV}
Symbol 9 Bitmap {vertical19BD}
Symbol 10 Bitmap {vertical18BD}
Symbol 11 Bitmap {vertical17BD}
Symbol 12 Bitmap {vertical16BD}
Symbol 13 Bitmap {vertical15BD}
Symbol 14 Bitmap {vertical14BD}
Symbol 15 Bitmap {vertical13BD}
Symbol 16 Bitmap {vertical12BD}
Symbol 17 Bitmap {vertical11BD}
Symbol 18 Bitmap {vertical10BD}
Symbol 19 Bitmap {vertical09BD}
Symbol 20 Bitmap {vertical08BD}
Symbol 21 Bitmap {vertical07BD}
Symbol 22 Bitmap {vertical06BD}
Symbol 23 Bitmap {vertical05BD}
Symbol 24 Bitmap {vertical04BD}
Symbol 25 Bitmap {vertical03BD}
Symbol 26 Bitmap {vertical02BD}
Symbol 27 Bitmap {vertical01BD}
Symbol 28 Bitmap {tileSheetBD}
Symbol 29 Bitmap {quitGameBD}
Symbol 30 Bitmap {theBombSparkBD}
Symbol 31 Bitmap {theSparkBD}
Symbol 32 Bitmap {rasters3BD}
Symbol 33 Bitmap {rasters2BD}
Symbol 34 Bitmap {rasters1BD}
Symbol 35 Bitmap {playGameBD}
Symbol 36 Bitmap {planet5BD}
Symbol 37 Bitmap {planet4BD}
Symbol 38 Bitmap {planet3BD}
Symbol 39 Bitmap {planet2BD}
Symbol 40 Bitmap {planet1BD}
Symbol 41 Bitmap {pauseGameBD}
Symbol 42 Bitmap {titleManBD}
Symbol 43 Bitmap {titleLogoBD}
Symbol 44 Bitmap {knighthawksFontBD}
Symbol 45 Bitmap {instructions5BD}
Symbol 46 Bitmap {instructions4BD}
Symbol 47 Bitmap {instructions3BD}
Symbol 48 Bitmap {instructions2BD}
Symbol 49 Bitmap {instructions1BD}
Symbol 50 Bitmap {horiz19BD}
Symbol 51 Bitmap {horiz18BD}
Symbol 52 Bitmap {horiz17BD}
Symbol 53 Bitmap {horiz16BD}
Symbol 54 Bitmap {horiz15BD}
Symbol 55 Bitmap {horiz14BD}
Symbol 56 Bitmap {horiz13BD}
Symbol 57 Bitmap {horiz12BD}
Symbol 58 Bitmap {horiz11BD}
Symbol 59 Bitmap {horiz10BD}
Symbol 60 Bitmap {horiz09BD}
Symbol 61 Bitmap {horiz08BD}
Symbol 62 Bitmap {horiz07BD}
Symbol 63 Bitmap {horiz06BD}
Symbol 64 Bitmap {horiz05BD}
Symbol 65 Bitmap {horiz04BD}
Symbol 66 Bitmap {horiz03BD}
Symbol 67 Bitmap {horiz02BD}
Symbol 68 Bitmap {horiz01BD}
Symbol 69 Bitmap {helpPage3BD}
Symbol 70 Bitmap {helpPage2BD}
Symbol 71 Bitmap {helpPage1BD}
Symbol 72 Bitmap {creditsBD}
Symbol 73 Bitmap {bubbleBD}
Symbol 74 Bitmap {bomb9BD}
Symbol 75 Bitmap {bomb8BD}
Symbol 76 Bitmap {bomb7BD}
Symbol 77 Bitmap {bomb6BD}
Symbol 78 Bitmap {bomb5BD}
Symbol 79 Bitmap {bomb4BD}
Symbol 80 Bitmap {bomb3BD}
Symbol 81 Bitmap {bomb2BD}
Symbol 82 Bitmap {bomb1BD}
Symbol 83 Bitmap {bomb0BD}
Symbol 84 Bitmap {bombOffBD}
Symbol 85 Bitmap {titleBlocksBD}
Symbol 86 Bitmap {titleBackdropBD}
Symbol 87 Bitmap {muteOffBD}
Symbol 88 Bitmap {muteOnBD}
Symbol 89 Bitmap {action15PNG}
Symbol 90 Bitmap {action14PNG}
Symbol 91 Bitmap {action13PNG}
Symbol 92 Bitmap {action12PNG}
Symbol 93 Bitmap {action08PNG}
Symbol 94 Bitmap {action07PNG}
Symbol 95 Bitmap {action06PNG}
Symbol 96 Bitmap {action05PNG}
Symbol 97 Bitmap {action04PNG}
Symbol 98 Bitmap {action03PNG}
Symbol 99 Bitmap {action02PNG}
Symbol 100 Bitmap {action01PNG}
Symbol 101 Bitmap {rocketBD}
Symbol 102 FontUsed by:103 104 105 106 107
Symbol 103 EditableTextUses:102Used by:108
Symbol 104 EditableTextUses:102Used by:108
Symbol 105 EditableTextUses:102Used by:108
Symbol 106 EditableTextUses:102Used by:108
Symbol 107 EditableTextUses:102Used by:108
Symbol 108 MovieClip {myTextArea}Uses:103 104 105 106 107
Symbol 109 GraphicUsed by:110
Symbol 110 MovieClipUses:109Used by:117
Symbol 111 MovieClip {fl.core.ComponentShim}Used by:117
Symbol 112 GraphicUsed by:113
Symbol 113 MovieClip {TextInput_disabledSkin}Uses:112Used by:117
Symbol 114 GraphicUsed by:115
Symbol 115 MovieClip {TextInput_upSkin}Uses:114Used by:117
Symbol 116 MovieClip {focusRectSkin}Used by:117
Symbol 117 MovieClip {fl.controls.TextInput}Uses:110 111 113 115 116
Symbol 118 BitmapUsed by:119
Symbol 119 GraphicUses:118Used by:140
Symbol 120 BitmapUsed by:121
Symbol 121 GraphicUses:120Used by:140
Symbol 122 BitmapUsed by:123
Symbol 123 GraphicUses:122Used by:140
Symbol 124 BitmapUsed by:125
Symbol 125 GraphicUses:124Used by:140
Symbol 126 BitmapUsed by:127
Symbol 127 GraphicUses:126Used by:140
Symbol 128 BitmapUsed by:129
Symbol 129 GraphicUses:128Used by:140
Symbol 130 BitmapUsed by:131
Symbol 131 GraphicUses:130Used by:140
Symbol 132 BitmapUsed by:133
Symbol 133 GraphicUses:132Used by:140
Symbol 134 BitmapUsed by:135
Symbol 135 GraphicUses:134Used by:140
Symbol 136 BitmapUsed by:137
Symbol 137 GraphicUses:136Used by:140
Symbol 138 BitmapUsed by:139
Symbol 139 GraphicUses:138Used by:140
Symbol 140 MovieClip {explosionMC}Uses:119 121 123 125 127 129 131 133 135 137 139

Instance Names

"textBox"Symbol 108 MovieClip {myTextArea} Frame 1Symbol 103 EditableText
"textBox"Symbol 108 MovieClip {myTextArea} Frame 1Symbol 104 EditableText
"textBox"Symbol 108 MovieClip {myTextArea} Frame 1Symbol 105 EditableText
"textBox"Symbol 108 MovieClip {myTextArea} Frame 1Symbol 106 EditableText
"textBox"Symbol 108 MovieClip {myTextArea} Frame 1Symbol 107 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1201 bytes "<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns ..."




http://swfchan.com/15/70639/info.shtml
Created: 9/4 -2019 18:15:16 Last modified: 9/4 -2019 18:15:16 Server time: 05/11 -2024 06:42:13