Section 1
//BaseScrollPane (fl.containers.BaseScrollPane)
package fl.containers {
import fl.core.*;
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import fl.events.*;
public class BaseScrollPane extends UIComponent {
protected var defaultLineScrollSize:Number;// = 4
protected var _maxHorizontalScrollPosition:Number;// = 0
protected var vScrollBar:Boolean;
protected var disabledOverlay:Shape;
protected var hScrollBar:Boolean;
protected var availableWidth:Number;
protected var _verticalPageScrollSize:Number;// = 0
protected var vOffset:Number;// = 0
protected var _verticalScrollBar:ScrollBar;
protected var useFixedHorizontalScrolling:Boolean;// = false
protected var contentWidth:Number;// = 0
protected var contentHeight:Number;// = 0
protected var _horizontalPageScrollSize:Number;// = 0
protected var background:DisplayObject;
protected var _useBitmpScrolling:Boolean;// = false
protected var contentPadding:Number;// = 0
protected var availableHeight:Number;
protected var _horizontalScrollBar:ScrollBar;
protected var contentScrollRect:Rectangle;
protected var _horizontalScrollPolicy:String;
protected var _verticalScrollPolicy:String;
protected static const SCROLL_BAR_STYLES:Object = {upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {repeatDelay:500, repeatInterval:35, skin:"ScrollPane_upSkin", contentPadding:0, disabledAlpha:0.5};
public function BaseScrollPane(){
contentWidth = 0;
contentHeight = 0;
contentPadding = 0;
vOffset = 0;
_maxHorizontalScrollPosition = 0;
_horizontalPageScrollSize = 0;
_verticalPageScrollSize = 0;
defaultLineScrollSize = 4;
useFixedHorizontalScrolling = false;
_useBitmpScrolling = false;
super();
}
protected function handleWheel(_arg1:MouseEvent):void{
if (((((!(enabled)) || (!(_verticalScrollBar.visible)))) || ((contentHeight <= availableHeight)))){
return;
};
_verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * verticalLineScrollSize));
setVerticalScrollPosition(_verticalScrollBar.scrollPosition);
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _arg1.delta, horizontalScrollPosition));
}
public function get verticalScrollPosition():Number{
return (_verticalScrollBar.scrollPosition);
}
protected function drawDisabledOverlay():void{
if (enabled){
if (contains(disabledOverlay)){
removeChild(disabledOverlay);
};
} else {
disabledOverlay.x = (disabledOverlay.y = contentPadding);
disabledOverlay.width = availableWidth;
disabledOverlay.height = availableHeight;
disabledOverlay.alpha = (getStyleValue("disabledAlpha") as Number);
addChild(disabledOverlay);
};
}
public function set verticalScrollPosition(_arg1:Number):void{
drawNow();
_verticalScrollBar.scrollPosition = _arg1;
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false);
}
protected function setContentSize(_arg1:Number, _arg2:Number):void{
if ((((((contentWidth == _arg1)) || (useFixedHorizontalScrolling))) && ((contentHeight == _arg2)))){
return;
};
contentWidth = _arg1;
contentHeight = _arg2;
invalidate(InvalidationType.SIZE);
}
public function get horizontalScrollPosition():Number{
return (_horizontalScrollBar.scrollPosition);
}
public function get horizontalScrollBar():ScrollBar{
return (_horizontalScrollBar);
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
_verticalScrollBar.enabled = _arg1;
_horizontalScrollBar.enabled = _arg1;
super.enabled = _arg1;
}
public function get verticalLineScrollSize():Number{
return (_verticalScrollBar.lineScrollSize);
}
public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
protected function calculateAvailableSize():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = ScrollBar.WIDTH;
_local2 = (contentPadding = Number(getStyleValue("contentPadding")));
_local3 = ((height - (2 * _local2)) - vOffset);
vScrollBar = (((_verticalScrollPolicy == ScrollPolicy.ON)) || ((((_verticalScrollPolicy == ScrollPolicy.AUTO)) && ((contentHeight > _local3)))));
_local4 = ((width - (vScrollBar) ? _local1 : 0) - (2 * _local2));
_local5 = (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - _local4);
hScrollBar = (((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_local5 > 0)))));
if (hScrollBar){
_local3 = (_local3 - _local1);
};
if (((((((hScrollBar) && (!(vScrollBar)))) && ((_verticalScrollPolicy == ScrollPolicy.AUTO)))) && ((contentHeight > _local3)))){
vScrollBar = true;
_local4 = (_local4 - _local1);
};
availableHeight = (_local3 + vOffset);
availableWidth = _local4;
}
public function get maxVerticalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentHeight - availableHeight)));
}
public function set horizontalScrollPosition(_arg1:Number):void{
drawNow();
_horizontalScrollBar.scrollPosition = _arg1;
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false);
}
public function get horizontalLineScrollSize():Number{
return (_horizontalScrollBar.lineScrollSize);
}
public function set verticalPageScrollSize(_arg1:Number):void{
_verticalPageScrollSize = _arg1;
invalidate(InvalidationType.SIZE);
}
public function get verticalScrollPolicy():String{
return (_verticalScrollPolicy);
}
protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function get useBitmapScrolling():Boolean{
return (_useBitmpScrolling);
}
protected function handleScroll(_arg1:ScrollEvent):void{
if (_arg1.target == _verticalScrollBar){
setVerticalScrollPosition(_arg1.position);
} else {
setHorizontalScrollPosition(_arg1.position);
};
}
public function set verticalLineScrollSize(_arg1:Number):void{
_verticalScrollBar.lineScrollSize = _arg1;
}
public function get verticalScrollBar():ScrollBar{
return (_verticalScrollBar);
}
protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function set horizontalPageScrollSize(_arg1:Number):void{
_horizontalPageScrollSize = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
setStyles();
drawBackground();
if (contentPadding != getStyleValue("contentPadding")){
invalidate(InvalidationType.SIZE, false);
};
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STATE)){
drawLayout();
};
updateChildren();
super.draw();
}
public function set horizontalScrollPolicy(_arg1:String):void{
_horizontalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function configUI():void{
var _local1:Graphics;
super.configUI();
contentScrollRect = new Rectangle(0, 0, 85, 85);
_verticalScrollBar = new ScrollBar();
_verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
_verticalScrollBar.visible = false;
_verticalScrollBar.lineScrollSize = defaultLineScrollSize;
addChild(_verticalScrollBar);
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
_horizontalScrollBar = new ScrollBar();
_horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL;
_horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
_horizontalScrollBar.visible = false;
_horizontalScrollBar.lineScrollSize = defaultLineScrollSize;
addChild(_horizontalScrollBar);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
disabledOverlay = new Shape();
_local1 = disabledOverlay.graphics;
_local1.beginFill(0xFFFFFF);
_local1.drawRect(0, 0, width, height);
_local1.endFill();
addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true);
}
protected function calculateContentWidth():void{
}
public function get verticalPageScrollSize():Number{
if (isNaN(availableHeight)){
drawNow();
};
return (((((_verticalPageScrollSize == 0)) && (!(isNaN(availableHeight))))) ? availableHeight : _verticalPageScrollSize);
}
protected function drawLayout():void{
calculateAvailableSize();
calculateContentWidth();
background.width = width;
background.height = height;
if (vScrollBar){
_verticalScrollBar.visible = true;
_verticalScrollBar.x = ((width - ScrollBar.WIDTH) - contentPadding);
_verticalScrollBar.y = contentPadding;
_verticalScrollBar.height = availableHeight;
} else {
_verticalScrollBar.visible = false;
};
_verticalScrollBar.setScrollProperties(availableHeight, 0, (contentHeight - availableHeight), verticalPageScrollSize);
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false);
if (hScrollBar){
_horizontalScrollBar.visible = true;
_horizontalScrollBar.x = contentPadding;
_horizontalScrollBar.y = ((height - ScrollBar.WIDTH) - contentPadding);
_horizontalScrollBar.width = availableWidth;
} else {
_horizontalScrollBar.visible = false;
};
_horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), horizontalPageScrollSize);
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false);
drawDisabledOverlay();
}
protected function drawBackground():void{
var _local1:DisplayObject;
_local1 = background;
background = getDisplayObjectInstance(getStyleValue("skin"));
background.width = width;
background.height = height;
addChildAt(background, 0);
if (((!((_local1 == null))) && (!((_local1 == background))))){
removeChild(_local1);
};
}
public function set horizontalLineScrollSize(_arg1:Number):void{
_horizontalScrollBar.lineScrollSize = _arg1;
}
public function get horizontalPageScrollSize():Number{
if (isNaN(availableWidth)){
drawNow();
};
return (((((_horizontalPageScrollSize == 0)) && (!(isNaN(availableWidth))))) ? availableWidth : _horizontalPageScrollSize);
}
public function get maxHorizontalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentWidth - availableWidth)));
}
protected function setStyles():void{
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
}
protected function updateChildren():void{
_verticalScrollBar.enabled = (_horizontalScrollBar.enabled = enabled);
_verticalScrollBar.drawNow();
_horizontalScrollBar.drawNow();
}
public function set verticalScrollPolicy(_arg1:String):void{
_verticalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set useBitmapScrolling(_arg1:Boolean):void{
_useBitmpScrolling = _arg1;
invalidate(InvalidationType.STATE);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, ScrollBar.getStyleDefinition()));
}
}
}//package fl.containers
Section 2
//CellRenderer (fl.controls.listClasses.CellRenderer)
package fl.controls.listClasses {
import fl.controls.*;
import flash.events.*;
public class CellRenderer extends LabelButton implements ICellRenderer {
protected var _data:Object;
protected var _listData:ListData;
private static var defaultStyles:Object = {upSkin:"CellRenderer_upSkin", downSkin:"CellRenderer_downSkin", overSkin:"CellRenderer_overSkin", disabledSkin:"CellRenderer_disabledSkin", selectedDisabledSkin:"CellRenderer_selectedDisabledSkin", selectedUpSkin:"CellRenderer_selectedUpSkin", selectedDownSkin:"CellRenderer_selectedDownSkin", selectedOverSkin:"CellRenderer_selectedOverSkin", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5};
public function CellRenderer():void{
toggle = true;
focusEnabled = false;
}
override protected function toggleSelected(_arg1:MouseEvent):void{
}
override public function get selected():Boolean{
return (super.selected);
}
public function set listData(_arg1:ListData):void{
_listData = _arg1;
label = _listData.label;
setStyle("icon", _listData.icon);
}
override public function set selected(_arg1:Boolean):void{
super.selected = _arg1;
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get listData():ListData{
return (_listData);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
super.setSize(_arg1, _arg2);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = 0;
if (icon != null){
icon.x = _local1;
icon.y = Math.round(((height - icon.height) >> 1));
_local2 = (icon.width + _local1);
};
if (label.length > 0){
textField.visible = true;
_local3 = Math.max(0, ((width - _local2) - (_local1 * 2)));
textField.width = _local3;
textField.height = (textField.textHeight + 4);
textField.x = (_local2 + _local1);
textField.y = Math.round(((height - textField.height) >> 1));
} else {
textField.visible = false;
};
background.width = width;
background.height = height;
}
public function get data():Object{
return (_data);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.listClasses
Section 3
//ICellRenderer (fl.controls.listClasses.ICellRenderer)
package fl.controls.listClasses {
public interface ICellRenderer {
function setSize(_arg1:Number, _arg2:Number):void;
function get listData():ListData;
function get data():Object;
function setMouseState(_arg1:String):void;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function set data(_arg1:Object):void;
function set selected(_arg1:Boolean):void;
function set listData(_arg1:ListData):void;
function get selected():Boolean;
}
}//package fl.controls.listClasses
Section 4
//ListData (fl.controls.listClasses.ListData)
package fl.controls.listClasses {
import fl.core.*;
public class ListData {
protected var _index:uint;
protected var _owner:UIComponent;
protected var _label:String;
protected var _icon:Object;// = null
protected var _row:uint;
protected var _column:uint;
public function ListData(_arg1:String, _arg2:Object, _arg3:UIComponent, _arg4:uint, _arg5:uint, _arg6:uint=0){
_icon = null;
super();
_label = _arg1;
_icon = _arg2;
_owner = _arg3;
_index = _arg4;
_row = _arg5;
_column = _arg6;
}
public function get owner():UIComponent{
return (_owner);
}
public function get label():String{
return (_label);
}
public function get row():uint{
return (_row);
}
public function get index():uint{
return (_index);
}
public function get icon():Object{
return (_icon);
}
public function get column():uint{
return (_column);
}
}
}//package fl.controls.listClasses
Section 5
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.events.*;
import flash.utils.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 6
//Button (fl.controls.Button)
package fl.controls {
import fl.core.*;
import flash.display.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 7
//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 8
//CheckBox (fl.controls.CheckBox)
package fl.controls {
import flash.display.*;
public class CheckBox extends LabelButton {
private static var defaultStyles:Object = {icon:null, upIcon:"CheckBox_upIcon", downIcon:"CheckBox_downIcon", overIcon:"CheckBox_overIcon", disabledIcon:"CheckBox_disabledIcon", selectedDisabledIcon:"CheckBox_selectedDisabledIcon", focusRectSkin:null, focusRectPadding:null, selectedUpIcon:"CheckBox_selectedUpIcon", selectedDownIcon:"CheckBox_selectedDownIcon", selectedOverIcon:"CheckBox_selectedOverIcon", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5};
public static var createAccessibilityImplementation:Function;
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = (background.x - _local2);
uiFocusRect.y = (background.y - _local2);
uiFocusRect.width = (background.width + (_local2 << 1));
uiFocusRect.height = (background.height + (_local2 << 1));
};
}
override public function get autoRepeat():Boolean{
return (false);
}
override public function set autoRepeat(_arg1:Boolean):void{
}
override public function set toggle(_arg1:Boolean):void{
throw (new Error("Warning: You cannot change a CheckBox's toggle."));
}
override public function get toggle():Boolean{
return (true);
}
override protected function configUI():void{
var _local1:Shape;
var _local2:Graphics;
super.configUI();
super.toggle = true;
_local1 = new Shape();
_local2 = _local1.graphics;
_local2.beginFill(0, 0);
_local2.drawRect(0, 0, 100, 100);
_local2.endFill();
background = (_local1 as DisplayObject);
addChildAt(background, 0);
}
override protected function drawLayout():void{
var _local1:Number;
super.drawLayout();
_local1 = Number(getStyleValue("textPadding"));
switch (_labelPlacement){
case ButtonLabelPlacement.RIGHT:
icon.x = _local1;
textField.x = (icon.x + (icon.width + _local1));
background.width = ((textField.x + textField.width) + _local1);
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.LEFT:
icon.x = ((width - icon.width) - _local1);
textField.x = (((width - icon.width) - (_local1 * 2)) - textField.width);
background.width = ((textField.width + icon.width) + (_local1 * 3));
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.TOP:
case ButtonLabelPlacement.BOTTOM:
background.width = (Math.max(textField.width, icon.width) + (_local1 * 2));
background.height = ((textField.height + icon.height) + (_local1 * 3));
break;
};
background.x = Math.min((icon.x - _local1), (textField.x - _local1));
background.y = Math.min((icon.y - _local1), (textField.y - _local1));
}
override protected function drawBackground():void{
}
override protected function initializeAccessibility():void{
if (CheckBox.createAccessibilityImplementation != null){
CheckBox.createAccessibilityImplementation(this);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 9
//Label (fl.controls.Label)
package fl.controls {
import fl.core.*;
import fl.events.*;
import flash.text.*;
public class Label extends UIComponent {
protected var actualHeight:Number;
protected var _html:Boolean;// = false
protected var actualWidth:Number;
protected var defaultLabel:String;// = "Label"
protected var _savedHTML:String;
public var textField:TextField;
private static var defaultStyles:Object = {textFormat:null, embedFonts:false};
public function Label(){
defaultLabel = "Label";
_html = false;
super();
text = defaultLabel;
actualWidth = _width;
actualHeight = _height;
}
public function get autoSize():String{
return (textField.autoSize);
}
public function get selectable():Boolean{
return (textField.selectable);
}
public function set text(_arg1:String):void{
if (_arg1 == text){
return;
};
if (((componentInspectorSetting) && ((_arg1 == defaultLabel)))){
return;
};
_html = false;
textField.text = _arg1;
if (textField.autoSize != TextFieldAutoSize.NONE){
invalidate(InvalidationType.SIZE);
};
}
public function get wordWrap():Boolean{
return (textField.wordWrap);
}
public function set condenseWhite(_arg1:Boolean):void{
textField.condenseWhite = _arg1;
if (textField.autoSize != TextFieldAutoSize.NONE){
invalidate(InvalidationType.SIZE);
};
}
public function set selectable(_arg1:Boolean):void{
textField.selectable = _arg1;
}
public function set autoSize(_arg1:String):void{
textField.autoSize = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set wordWrap(_arg1:Boolean):void{
textField.wordWrap = _arg1;
if (textField.autoSize != TextFieldAutoSize.NONE){
invalidate(InvalidationType.SIZE);
};
}
override public function get height():Number{
if (((!((textField.autoSize == TextFieldAutoSize.NONE))) && (wordWrap))){
return (_height);
};
return (actualHeight);
}
public function set htmlText(_arg1:String):void{
if (_arg1 == htmlText){
return;
};
if (((componentInspectorSetting) && ((_arg1 == "")))){
return;
};
_html = true;
_savedHTML = _arg1;
textField.htmlText = _arg1;
if (textField.autoSize != TextFieldAutoSize.NONE){
invalidate(InvalidationType.SIZE);
};
}
public function get text():String{
return (textField.text);
}
public function get condenseWhite():Boolean{
return (textField.condenseWhite);
}
override protected function draw():void{
var _local1:Object;
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawTextFormat();
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
if (textField.autoSize != TextFieldAutoSize.NONE){
invalidate(InvalidationType.SIZE, false);
};
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
addChild(textField);
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
textField.wordWrap = false;
}
public function get htmlText():String{
return (textField.htmlText);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
actualWidth = _arg1;
actualHeight = _arg2;
super.setSize(_arg1, _arg2);
}
override public function set width(_arg1:Number):void{
actualWidth = _arg1;
super.width = _arg1;
}
protected function drawLayout():void{
var _local1:Boolean;
var _local2:Number;
var _local3:Number;
_local1 = false;
textField.width = width;
textField.height = height;
if (textField.autoSize != TextFieldAutoSize.NONE){
_local2 = textField.width;
_local3 = textField.height;
_local1 = ((!((_width == _local2))) || (!((_height == _local3))));
_width = _local2;
_height = _local3;
switch (textField.autoSize){
case TextFieldAutoSize.CENTER:
textField.x = ((actualWidth / 2) - (textField.width / 2));
break;
case TextFieldAutoSize.LEFT:
textField.x = 0;
break;
case TextFieldAutoSize.RIGHT:
textField.x = -((textField.width - actualWidth));
break;
};
} else {
textField.width = actualWidth;
textField.height = actualHeight;
textField.x = 0;
};
if (_local1){
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, true));
};
}
override public function get width():Number{
if (((!((textField.autoSize == TextFieldAutoSize.NONE))) && (!(wordWrap)))){
return (_width);
};
return (actualWidth);
}
protected function drawTextFormat():void{
var _local1:TextFormat;
var _local2:Object;
_local1 = (getStyleValue("textFormat") as TextFormat);
if (_local1 == null){
_local2 = UIComponent.getStyleDefinition();
_local1 = (enabled) ? (_local2.defaultTextFormat as TextFormat) : (_local2.defaultDisabledTextFormat as TextFormat);
};
textField.defaultTextFormat = _local1;
textField.setTextFormat(_local1);
if (((_html) && (!((_savedHTML == null))))){
htmlText = _savedHTML;
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 10
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 11
//List (fl.controls.List)
package fl.controls {
import fl.controls.listClasses.*;
import fl.core.*;
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import fl.managers.*;
import flash.utils.*;
import flash.ui.*;
public class List extends SelectableList implements IFocusManagerComponent {
protected var _labelField:String;// = "label"
protected var _rowHeight:Number;// = 20
protected var _cellRenderer:Object;
protected var _iconField:String;// = "icon"
protected var _labelFunction:Function;
protected var _iconFunction:Function;
private static var defaultStyles:Object = {focusRectSkin:null, focusRectPadding:null};
public static var createAccessibilityImplementation:Function;
public function List(){
_rowHeight = 20;
_labelField = "label";
_iconField = "icon";
super();
}
public function get iconField():String{
return (_iconField);
}
protected function doKeySelection(_arg1:int, _arg2:Boolean, _arg3:Boolean):void{
var _local4:Boolean;
var _local5:int;
var _local6:Array;
var _local7:int;
var _local8:int;
_local4 = false;
if (_arg2){
_local6 = [];
_local7 = lastCaretIndex;
_local8 = _arg1;
if (_local7 == -1){
_local7 = ((caretIndex)!=-1) ? caretIndex : _arg1;
};
if (_local7 > _local8){
_local8 = _local7;
_local7 = _arg1;
};
_local5 = _local7;
while (_local5 <= _local8) {
_local6.push(_local5);
_local5++;
};
selectedIndices = _local6;
caretIndex = _arg1;
_local4 = true;
} else {
selectedIndex = _arg1;
caretIndex = (lastCaretIndex = _arg1);
_local4 = true;
};
if (_local4){
dispatchEvent(new Event(Event.CHANGE));
};
invalidate(InvalidationType.DATA);
}
override protected function drawList():void{
var _local1:Rectangle;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:ICellRenderer;
var _local7:Dictionary;
var _local8:Dictionary;
var _local9:Boolean;
var _local10:String;
var _local11:Object;
var _local12:Sprite;
var _local13:String;
listHolder.x = (listHolder.y = contentPadding);
_local1 = listHolder.scrollRect;
_local1.x = _horizontalScrollPosition;
_local1.y = (Math.floor(_verticalScrollPosition) % rowHeight);
listHolder.scrollRect = _local1;
listHolder.cacheAsBitmap = useBitmapScrolling;
_local2 = Math.floor((_verticalScrollPosition / rowHeight));
_local3 = Math.min(length, ((_local2 + rowCount) + 1));
_local7 = (renderedItems = new Dictionary(true));
_local4 = _local2;
while (_local4 < _local3) {
_local7[_dataProvider.getItemAt(_local4)] = true;
_local4++;
};
_local8 = new Dictionary(true);
while (activeCellRenderers.length > 0) {
_local6 = (activeCellRenderers.pop() as ICellRenderer);
_local5 = _local6.data;
if ((((_local7[_local5] == null)) || ((invalidItems[_local5] == true)))){
availableCellRenderers.push(_local6);
} else {
_local8[_local5] = _local6;
invalidItems[_local5] = true;
};
list.removeChild((_local6 as DisplayObject));
};
invalidItems = new Dictionary(true);
_local4 = _local2;
while (_local4 < _local3) {
_local9 = false;
_local5 = _dataProvider.getItemAt(_local4);
if (_local8[_local5] != null){
_local9 = true;
_local6 = _local8[_local5];
delete _local8[_local5];
} else {
if (availableCellRenderers.length > 0){
_local6 = (availableCellRenderers.pop() as ICellRenderer);
} else {
_local6 = (getDisplayObjectInstance(getStyleValue("cellRenderer")) as ICellRenderer);
_local12 = (_local6 as Sprite);
if (_local12 != null){
_local12.addEventListener(MouseEvent.CLICK, handleCellRendererClick, false, 0, true);
_local12.addEventListener(MouseEvent.ROLL_OVER, handleCellRendererMouseEvent, false, 0, true);
_local12.addEventListener(MouseEvent.ROLL_OUT, handleCellRendererMouseEvent, false, 0, true);
_local12.addEventListener(Event.CHANGE, handleCellRendererChange, false, 0, true);
_local12.doubleClickEnabled = true;
_local12.addEventListener(MouseEvent.DOUBLE_CLICK, handleCellRendererDoubleClick, false, 0, true);
if (_local12["setStyle"] != null){
for (_local13 in rendererStyles) {
var _local16 = _local12;
_local16["setStyle"](_local13, rendererStyles[_local13]);
};
};
};
};
};
list.addChild((_local6 as Sprite));
activeCellRenderers.push(_local6);
_local6.y = (rowHeight * (_local4 - _local2));
_local6.setSize((availableWidth + _maxHorizontalScrollPosition), rowHeight);
_local10 = itemToLabel(_local5);
_local11 = null;
if (_iconFunction != null){
_local11 = _iconFunction(_local5);
} else {
if (_iconField != null){
_local11 = _local5[_iconField];
};
};
if (!_local9){
_local6.data = _local5;
};
_local6.listData = new ListData(_local10, _local11, this, _local4, _local4, 0);
_local6.selected = !((_selectedIndices.indexOf(_local4) == -1));
if ((_local6 is UIComponent)){
(_local6 as UIComponent).drawNow();
};
_local4++;
};
}
public function get iconFunction():Function{
return (_iconFunction);
}
public function set iconField(_arg1:String):void{
if (_arg1 == _iconField){
return;
};
_iconField = _arg1;
invalidate(InvalidationType.DATA);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:int;
if (!selectable){
return;
};
switch (_arg1.keyCode){
case Keyboard.UP:
case Keyboard.DOWN:
case Keyboard.END:
case Keyboard.HOME:
case Keyboard.PAGE_UP:
case Keyboard.PAGE_DOWN:
moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
break;
case Keyboard.LEFT:
case Keyboard.RIGHT:
moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
break;
case Keyboard.SPACE:
if (caretIndex == -1){
caretIndex = 0;
};
doKeySelection(caretIndex, _arg1.shiftKey, _arg1.ctrlKey);
scrollToSelected();
break;
default:
_local2 = getNextIndexAtLetter(String.fromCharCode(_arg1.keyCode), selectedIndex);
if (_local2 > -1){
selectedIndex = _local2;
scrollToSelected();
};
break;
};
_arg1.stopPropagation();
}
override public function itemToLabel(_arg1:Object):String{
if (_labelFunction != null){
return (String(_labelFunction(_arg1)));
};
return (((_arg1[_labelField])!=null) ? String(_arg1[_labelField]) : "");
}
public function get labelField():String{
return (_labelField);
}
override protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
var _local4:int;
var _local5:int;
var _local6:int;
_local4 = Math.max(Math.floor((calculateAvailableHeight() / rowHeight)), 1);
_local5 = -1;
_local6 = 0;
switch (_arg1){
case Keyboard.UP:
if (caretIndex > 0){
_local5 = (caretIndex - 1);
};
break;
case Keyboard.DOWN:
if (caretIndex < (length - 1)){
_local5 = (caretIndex + 1);
};
break;
case Keyboard.PAGE_UP:
if (caretIndex > 0){
_local5 = Math.max((caretIndex - _local4), 0);
};
break;
case Keyboard.PAGE_DOWN:
if (caretIndex < (length - 1)){
_local5 = Math.min((caretIndex + _local4), (length - 1));
};
break;
case Keyboard.HOME:
if (caretIndex > 0){
_local5 = 0;
};
break;
case Keyboard.END:
if (caretIndex < (length - 1)){
_local5 = (length - 1);
};
break;
};
if (_local5 >= 0){
doKeySelection(_local5, _arg2, _arg3);
scrollToSelected();
};
}
public function set labelField(_arg1:String):void{
if (_arg1 == _labelField){
return;
};
_labelField = _arg1;
invalidate(InvalidationType.DATA);
}
public function set rowCount(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
_local2 = Number(getStyleValue("contentPadding"));
_local3 = ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0;
height = (((rowHeight * _arg1) + (2 * _local2)) + _local3);
}
override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
list.x = -(_arg1);
super.setHorizontalScrollPosition(_arg1, true);
}
public function set iconFunction(_arg1:Function):void{
if (_iconFunction == _arg1){
return;
};
_iconFunction = _arg1;
invalidate(InvalidationType.DATA);
}
public function get labelFunction():Function{
return (_labelFunction);
}
override protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
}
override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
invalidate(InvalidationType.SCROLL);
super.setVerticalScrollPosition(_arg1, true);
}
protected function calculateAvailableHeight():Number{
var _local1:Number;
_local1 = Number(getStyleValue("contentPadding"));
return (((height - (_local1 * 2)) - ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0));
}
override protected function draw():void{
var _local1:Boolean;
_local1 = !((contentHeight == (rowHeight * length)));
contentHeight = (rowHeight * length);
if (isInvalid(InvalidationType.STYLES)){
setStyles();
drawBackground();
if (contentPadding != getStyleValue("contentPadding")){
invalidate(InvalidationType.SIZE, false);
};
if (_cellRenderer != getStyleValue("cellRenderer")){
_invalidateList();
_cellRenderer = getStyleValue("cellRenderer");
};
};
if (((isInvalid(InvalidationType.SIZE, InvalidationType.STATE)) || (_local1))){
drawLayout();
};
if (isInvalid(InvalidationType.RENDERER_STYLES)){
updateRendererStyles();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.SCROLL, InvalidationType.SELECTED)){
drawList();
};
updateChildren();
validate();
}
override protected function configUI():void{
useFixedHorizontalScrolling = true;
_horizontalScrollPolicy = ScrollPolicy.AUTO;
_verticalScrollPolicy = ScrollPolicy.AUTO;
super.configUI();
}
override public function get rowCount():uint{
return (Math.ceil((calculateAvailableHeight() / rowHeight)));
}
override protected function initializeAccessibility():void{
if (List.createAccessibilityImplementation != null){
List.createAccessibilityImplementation(this);
};
}
override public function scrollToIndex(_arg1:int):void{
var _local2:uint;
var _local3:uint;
drawNow();
_local2 = (Math.floor(((_verticalScrollPosition + availableHeight) / rowHeight)) - 1);
_local3 = Math.ceil((_verticalScrollPosition / rowHeight));
if (_arg1 < _local3){
verticalScrollPosition = (_arg1 * rowHeight);
} else {
if (_arg1 > _local2){
verticalScrollPosition = (((_arg1 + 1) * rowHeight) - availableHeight);
};
};
}
public function get rowHeight():Number{
return (_rowHeight);
}
public function set labelFunction(_arg1:Function):void{
if (_labelFunction == _arg1){
return;
};
_labelFunction = _arg1;
invalidate(InvalidationType.DATA);
}
public function set rowHeight(_arg1:Number):void{
_rowHeight = _arg1;
invalidate(InvalidationType.SIZE);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, SelectableList.getStyleDefinition()));
}
}
}//package fl.controls
Section 12
//NumericStepper (fl.controls.NumericStepper)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class NumericStepper extends UIComponent implements IFocusManagerComponent {
protected var upArrow:BaseButton;
protected var _stepSize:Number;// = 1
protected var downArrow:BaseButton;
protected var _value:Number;// = 1
protected var _minimum:Number;// = 0
protected var _maximum:Number;// = 10
protected var _precision:Number;
protected var inputField:TextInput;
protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const TEXT_INPUT_STYLES:Object = {upSkin:"upSkin", disabledSkin:"disabledSkin", textPadding:"textPadding", textFormat:"textFormat", disabledTextFormat:"disabledTextFormat", embedFonts:"embedFonts"};
protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {downArrowDisabledSkin:"NumericStepperDownArrow_disabledSkin", downArrowDownSkin:"NumericStepperDownArrow_downSkin", downArrowOverSkin:"NumericStepperDownArrow_overSkin", downArrowUpSkin:"NumericStepperDownArrow_upSkin", upArrowDisabledSkin:"NumericStepperUpArrow_disabledSkin", upArrowDownSkin:"NumericStepperUpArrow_downSkin", upArrowOverSkin:"NumericStepperUpArrow_overSkin", upArrowUpSkin:"NumericStepperUpArrow_upSkin", upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRect:null, focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35, embedFonts:false};
public function NumericStepper(){
_maximum = 10;
_minimum = 0;
_value = 1;
_stepSize = 1;
super();
setStyles();
stepSize = _stepSize;
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
};
}
public function get minimum():Number{
return (_minimum);
}
public function set imeMode(_arg1:String):void{
inputField.imeMode = _arg1;
}
public function set minimum(_arg1:Number):void{
_minimum = _arg1;
if (_value < _minimum){
setValue(_minimum, false);
};
}
public function get maximum():Number{
return (_maximum);
}
override protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((((_arg1 == inputField)) || (super.isOurFocus(_arg1))));
}
public function get nextValue():Number{
var _local1:Number;
_local1 = (_value + _stepSize);
return ((inRange(_local1)) ? _local1 : _value);
}
public function set maximum(_arg1:Number):void{
_maximum = _arg1;
if (_value > _maximum){
setValue(_maximum, false);
};
}
protected function setValue(_arg1:Number, _arg2:Boolean=true):void{
var _local3:Number;
if (_arg1 == _value){
return;
};
_local3 = _value;
_value = getValidValue(_arg1);
inputField.text = _value.toString();
if (_arg2){
dispatchEvent(new Event(Event.CHANGE, true));
};
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:Number;
if (!enabled){
return;
};
_arg1.stopImmediatePropagation();
_local2 = Number(inputField.text);
switch (_arg1.keyCode){
case Keyboard.END:
setValue(maximum);
break;
case Keyboard.HOME:
setValue(minimum);
break;
case Keyboard.UP:
setValue(nextValue);
break;
case Keyboard.DOWN:
setValue(previousValue);
break;
case Keyboard.ENTER:
setValue(_local2);
break;
};
}
override public function set enabled(_arg1:Boolean):void{
if (_arg1 == enabled){
return;
};
super.enabled = _arg1;
upArrow.enabled = (downArrow.enabled = (inputField.enabled = _arg1));
}
protected function onTextChange(_arg1:Event):void{
_arg1.stopImmediatePropagation();
}
public function get previousValue():Number{
var _local1:Number;
_local1 = (_value - _stepSize);
return ((inRange(_local1)) ? _local1 : _value);
}
protected function getValidValue(_arg1:Number):Number{
var _local2:Number;
if (isNaN(_arg1)){
return (_value);
};
_local2 = Number((_stepSize * Math.round((_arg1 / _stepSize))).toFixed(_precision));
if (_local2 > maximum){
return (maximum);
};
if (_local2 < minimum){
return (minimum);
};
return (_local2);
}
public function set value(_arg1:Number):void{
setValue(_arg1, false);
}
public function get stepSize():Number{
return (_stepSize);
}
protected function passEvent(_arg1:Event):void{
dispatchEvent(_arg1);
}
public function get imeMode():String{
return (inputField.imeMode);
}
protected function stepperPressHandler(_arg1:ComponentEvent):void{
setValue(Number(inputField.text), false);
switch (_arg1.currentTarget){
case upArrow:
setValue(nextValue);
break;
case downArrow:
setValue(previousValue);
};
inputField.setFocus();
inputField.textField.setSelection(0, 0);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
if (_arg1.eventPhase == 3){
setValue(Number(inputField.text));
};
super.focusOutHandler(_arg1);
}
protected function inRange(_arg1:Number):Boolean{
return ((((_arg1 >= _minimum)) && ((_arg1 <= _maximum))));
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
setStyles();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
validate();
}
override protected function configUI():void{
super.configUI();
upArrow = new BaseButton();
copyStylesToChild(upArrow, UP_ARROW_STYLES);
upArrow.autoRepeat = true;
upArrow.setSize(21, 12);
upArrow.focusEnabled = false;
addChild(upArrow);
downArrow = new BaseButton();
copyStylesToChild(downArrow, DOWN_ARROW_STYLES);
downArrow.autoRepeat = true;
downArrow.setSize(21, 12);
downArrow.focusEnabled = false;
addChild(downArrow);
inputField = new TextInput();
copyStylesToChild(inputField, TEXT_INPUT_STYLES);
inputField.restrict = "0-9\\-\\.\\,";
inputField.text = _value.toString();
inputField.setSize(21, 24);
inputField.focusTarget = (this as IFocusManagerComponent);
inputField.focusEnabled = false;
inputField.addEventListener(FocusEvent.FOCUS_IN, passEvent);
inputField.addEventListener(FocusEvent.FOCUS_OUT, passEvent);
addChild(inputField);
inputField.addEventListener(Event.CHANGE, onTextChange, false, 0, true);
upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, stepperPressHandler, false, 0, true);
downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, stepperPressHandler, false, 0, true);
}
public function get value():Number{
return (_value);
}
protected function inStep(_arg1:Number):Boolean{
return ((((_arg1 - _minimum) % _stepSize) == 0));
}
protected function drawLayout():void{
var _local1:Number;
var _local2:Number;
_local1 = (width - upArrow.width);
_local2 = (height / 2);
inputField.setSize(_local1, height);
upArrow.height = _local2;
downArrow.height = Math.floor(_local2);
downArrow.move(_local1, _local2);
upArrow.move(_local1, 0);
downArrow.drawNow();
upArrow.drawNow();
inputField.drawNow();
}
override public function setFocus():void{
if (stage){
stage.focus = inputField.textField;
};
}
protected function getPrecision():Number{
var _local1:String;
_local1 = _stepSize.toString();
if (_local1.indexOf(".") == -1){
return (0);
};
return (_local1.split(".").pop().length);
}
public function get textField():TextInput{
return (inputField);
}
public function set stepSize(_arg1:Number):void{
_stepSize = _arg1;
_precision = getPrecision();
setValue(_value);
}
protected function setStyles():void{
copyStylesToChild(downArrow, DOWN_ARROW_STYLES);
copyStylesToChild(upArrow, UP_ARROW_STYLES);
copyStylesToChild(inputField, TEXT_INPUT_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 13
//RadioButton (fl.controls.RadioButton)
package fl.controls {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.ui.*;
public class RadioButton extends LabelButton implements IFocusManagerGroup {
protected var _value:Object;
protected var defaultGroupName:String;// = "RadioButtonGroup"
protected var _group:RadioButtonGroup;
private static var defaultStyles:Object = {icon:null, upIcon:"RadioButton_upIcon", downIcon:"RadioButton_downIcon", overIcon:"RadioButton_overIcon", disabledIcon:"RadioButton_disabledIcon", selectedDisabledIcon:"RadioButton_selectedDisabledIcon", selectedUpIcon:"RadioButton_selectedUpIcon", selectedDownIcon:"RadioButton_selectedDownIcon", selectedOverIcon:"RadioButton_selectedOverIcon", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5};
public static var createAccessibilityImplementation:Function;
public function RadioButton(){
defaultGroupName = "RadioButtonGroup";
super();
mode = "border";
groupName = defaultGroupName;
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = (background.x - _local2);
uiFocusRect.y = (background.y - _local2);
uiFocusRect.width = (background.width + (_local2 * 2));
uiFocusRect.height = (background.height + (_local2 * 2));
};
}
private function setThis():void{
var _local1:RadioButtonGroup;
_local1 = _group;
if (_local1 != null){
if (_local1.selection != this){
_local1.selection = this;
};
} else {
super.selected = true;
};
}
override public function get autoRepeat():Boolean{
return (false);
}
override public function set autoRepeat(_arg1:Boolean):void{
}
protected function handleClick(_arg1:MouseEvent):void{
if (_group == null){
return;
};
_group.dispatchEvent(new MouseEvent(MouseEvent.CLICK, true));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Keyboard.DOWN:
setNext(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.UP:
setPrev(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.LEFT:
setPrev(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.RIGHT:
setNext(!(_arg1.ctrlKey));
_arg1.stopPropagation();
break;
case Keyboard.SPACE:
setThis();
_toggle = false;
default:
super.keyDownHandler(_arg1);
break;
};
}
private function setNext(_arg1:Boolean=true):void{
var _local2:RadioButtonGroup;
var _local3:IFocusManager;
var _local4:int;
var _local5:Number;
var _local6:int;
var _local7:*;
_local2 = _group;
if (_local2 == null){
return;
};
_local3 = focusManager;
if (_local3){
_local3.showFocusIndicator = true;
};
_local4 = _local2.getRadioButtonIndex(this);
_local5 = _local2.numRadioButtons;
_local6 = _local4;
if (_local4 != -1){
do {
_local6++;
_local6 = ((_local6)>(_local2.numRadioButtons - 1)) ? 0 : _local6;
_local7 = _local2.getRadioButtonAt(_local6);
if (((_local7) && (_local7.enabled))){
if (_arg1){
_local2.selection = _local7;
};
_local7.setFocus();
return;
};
if (((_arg1) && (!((_local2.getRadioButtonAt(_local6) == _local2.selection))))){
_local2.selection = this;
};
this.drawFocus(true);
} while (_local6 != _local4);
};
}
public function get group():RadioButtonGroup{
return (_group);
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
super.keyUpHandler(_arg1);
if ((((_arg1.keyCode == Keyboard.SPACE)) && (!(_toggle)))){
_toggle = true;
};
}
override public function get selected():Boolean{
return (super.selected);
}
override public function set toggle(_arg1:Boolean):void{
throw (new Error("Warning: You cannot change a RadioButtons toggle."));
}
public function set value(_arg1:Object):void{
_value = _arg1;
}
public function set group(_arg1:RadioButtonGroup):void{
groupName = _arg1.name;
}
override public function set selected(_arg1:Boolean):void{
if ((((_arg1 == false)) || (selected))){
return;
};
if (_group != null){
_group.selection = this;
} else {
super.selected = _arg1;
};
}
override protected function draw():void{
super.draw();
}
override public function get toggle():Boolean{
return (true);
}
override protected function configUI():void{
var _local1:Shape;
var _local2:Graphics;
super.configUI();
super.toggle = true;
_local1 = new Shape();
_local2 = _local1.graphics;
_local2.beginFill(0, 0);
_local2.drawRect(0, 0, 100, 100);
_local2.endFill();
background = (_local1 as DisplayObject);
addChildAt(background, 0);
addEventListener(MouseEvent.CLICK, handleClick, false, 0, true);
}
public function set groupName(_arg1:String):void{
if (_group != null){
_group.removeRadioButton(this);
_group.removeEventListener(Event.CHANGE, handleChange);
};
_group = ((_arg1)==null) ? null : RadioButtonGroup.getGroup(_arg1);
if (_group != null){
_group.addRadioButton(this);
_group.addEventListener(Event.CHANGE, handleChange, false, 0, true);
};
}
public function get value():Object{
return (_value);
}
override protected function drawLayout():void{
var _local1:Number;
super.drawLayout();
_local1 = Number(getStyleValue("textPadding"));
switch (_labelPlacement){
case ButtonLabelPlacement.RIGHT:
icon.x = _local1;
textField.x = (icon.x + (icon.width + _local1));
background.width = ((textField.x + textField.width) + _local1);
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.LEFT:
icon.x = ((width - icon.width) - _local1);
textField.x = (((width - icon.width) - (_local1 * 2)) - textField.width);
background.width = ((textField.width + icon.width) + (_local1 * 3));
background.height = (Math.max(textField.height, icon.height) + (_local1 * 2));
break;
case ButtonLabelPlacement.TOP:
case ButtonLabelPlacement.BOTTOM:
background.width = (Math.max(textField.width, icon.width) + (_local1 * 2));
background.height = ((textField.height + icon.height) + (_local1 * 3));
break;
};
background.x = Math.min((icon.x - _local1), (textField.x - _local1));
background.y = Math.min((icon.y - _local1), (textField.y - _local1));
}
override protected function drawBackground():void{
}
override protected function initializeAccessibility():void{
if (RadioButton.createAccessibilityImplementation != null){
RadioButton.createAccessibilityImplementation(this);
};
}
public function get groupName():String{
return (((_group)==null) ? null : _group.name);
}
private function setPrev(_arg1:Boolean=true):void{
var _local2:RadioButtonGroup;
var _local3:IFocusManager;
var _local4:int;
var _local5:int;
var _local6:*;
_local2 = _group;
if (_local2 == null){
return;
};
_local3 = focusManager;
if (_local3){
_local3.showFocusIndicator = true;
};
_local4 = _local2.getRadioButtonIndex(this);
_local5 = _local4;
if (_local4 != -1){
do {
--_local5;
_local5 = ((_local5)==-1) ? (_local2.numRadioButtons - 1) : _local5;
_local6 = _local2.getRadioButtonAt(_local5);
if (((_local6) && (_local6.enabled))){
if (_arg1){
_local2.selection = _local6;
};
_local6.setFocus();
return;
};
if (((_arg1) && (!((_local2.getRadioButtonAt(_local5) == _local2.selection))))){
_local2.selection = this;
};
this.drawFocus(true);
} while (_local5 != _local4);
};
}
protected function handleChange(_arg1:Event):void{
super.selected = (_group.selection == this);
dispatchEvent(new Event(Event.CHANGE, true));
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 14
//RadioButtonGroup (fl.controls.RadioButtonGroup)
package fl.controls {
import flash.events.*;
public class RadioButtonGroup extends EventDispatcher {
protected var _selection:RadioButton;
protected var radioButtons:Array;
protected var _name:String;
private static var groups:Object;
private static var groupCount:uint = 0;
public function RadioButtonGroup(_arg1:String){
_name = _arg1;
radioButtons = [];
registerGroup(this);
}
public function getRadioButtonIndex(_arg1:RadioButton):int{
var _local2:int;
var _local3:RadioButton;
_local2 = 0;
while (_local2 < radioButtons.length) {
_local3 = (radioButtons[_local2] as RadioButton);
if (_local3 == _arg1){
return (_local2);
};
_local2++;
};
return (-1);
}
public function get numRadioButtons():int{
return (radioButtons.length);
}
public function get name():String{
return (_name);
}
public function get selection():RadioButton{
return (_selection);
}
public function set selection(_arg1:RadioButton):void{
if ((((((_selection == _arg1)) || ((_arg1 == null)))) || ((getRadioButtonIndex(_arg1) == -1)))){
return;
};
_selection = _arg1;
dispatchEvent(new Event(Event.CHANGE, true));
}
public function set selectedData(_arg1:Object):void{
var _local2:int;
var _local3:RadioButton;
_local2 = 0;
while (_local2 < radioButtons.length) {
_local3 = (radioButtons[_local2] as RadioButton);
if (_local3.value == _arg1){
selection = _local3;
return;
};
_local2++;
};
}
public function removeRadioButton(_arg1:RadioButton):void{
var _local2:int;
_local2 = getRadioButtonIndex(_arg1);
if (_local2 != -1){
radioButtons.splice(_local2, 1);
};
if (_selection == _arg1){
_selection = null;
};
}
public function addRadioButton(_arg1:RadioButton):void{
if (_arg1.groupName != name){
_arg1.groupName = name;
return;
};
radioButtons.push(_arg1);
if (_arg1.selected){
selection = _arg1;
};
}
public function getRadioButtonAt(_arg1:int):RadioButton{
return (RadioButton(radioButtons[_arg1]));
}
public function get selectedData():Object{
var _local1:RadioButton;
_local1 = _selection;
return (((_local1)==null) ? null : _local1.value);
}
public static function getGroup(_arg1:String):RadioButtonGroup{
var _local2:RadioButtonGroup;
if (groups == null){
groups = {};
};
_local2 = (groups[_arg1] as RadioButtonGroup);
if (_local2 == null){
_local2 = new RadioButtonGroup(_arg1);
if ((++groupCount % 20) == 0){
cleanUpGroups();
};
};
return (_local2);
}
private static function registerGroup(_arg1:RadioButtonGroup):void{
if (groups == null){
groups = {};
};
groups[_arg1.name] = _arg1;
}
private static function cleanUpGroups():void{
var _local1:String;
var _local2:RadioButtonGroup;
for (_local1 in groups) {
_local2 = (groups[_local1] as RadioButtonGroup);
if (_local2.radioButtons.length == 0){
delete groups[_local1];
};
};
}
}
}//package fl.controls
Section 15
//ScrollBar (fl.controls.ScrollBar)
package fl.controls {
import fl.core.*;
import flash.events.*;
import fl.events.*;
public class ScrollBar extends UIComponent {
private var _direction:String;// = "vertical"
protected var inDrag:Boolean;// = false
protected var upArrow:BaseButton;
private var _pageScrollSize:Number;// = 0
protected var downArrow:BaseButton;
private var _pageSize:Number;// = 10
private var thumbScrollOffset:Number;
private var _maxScrollPosition:Number;// = 0
private var _scrollPosition:Number;// = 0
protected var track:BaseButton;
private var _minScrollPosition:Number;// = 0
private var _lineScrollSize:Number;// = 1
protected var thumb:LabelButton;
protected static const THUMB_STYLES:Object = {disabledSkin:"thumbDisabledSkin", downSkin:"thumbDownSkin", overSkin:"thumbOverSkin", upSkin:"thumbUpSkin", icon:"thumbIcon", textPadding:0};
public static const WIDTH:Number = 15;
protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const TRACK_STYLES:Object = {disabledSkin:"trackDisabledSkin", downSkin:"trackDownSkin", overSkin:"trackOverSkin", upSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {downArrowDisabledSkin:"ScrollArrowDown_disabledSkin", downArrowDownSkin:"ScrollArrowDown_downSkin", downArrowOverSkin:"ScrollArrowDown_overSkin", downArrowUpSkin:"ScrollArrowDown_upSkin", thumbDisabledSkin:"ScrollThumb_upSkin", thumbDownSkin:"ScrollThumb_downSkin", thumbOverSkin:"ScrollThumb_overSkin", thumbUpSkin:"ScrollThumb_upSkin", trackDisabledSkin:"ScrollTrack_skin", trackDownSkin:"ScrollTrack_skin", trackOverSkin:"ScrollTrack_skin", trackUpSkin:"ScrollTrack_skin", upArrowDisabledSkin:"ScrollArrowUp_disabledSkin", upArrowDownSkin:"ScrollArrowUp_downSkin", upArrowOverSkin:"ScrollArrowUp_overSkin", upArrowUpSkin:"ScrollArrowUp_upSkin", thumbIcon:"ScrollBar_thumbIcon", repeatDelay:500, repeatInterval:35};
public function ScrollBar(){
_pageSize = 10;
_pageScrollSize = 0;
_lineScrollSize = 1;
_minScrollPosition = 0;
_maxScrollPosition = 0;
_scrollPosition = 0;
_direction = ScrollBarDirection.VERTICAL;
inDrag = false;
super();
setStyles();
focusEnabled = false;
}
public function get minScrollPosition():Number{
return (_minScrollPosition);
}
public function set minScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _arg1, _maxScrollPosition);
}
public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{
var _local3:Number;
_local3 = scrollPosition;
_scrollPosition = Math.max(_minScrollPosition, Math.min(_maxScrollPosition, _arg1));
if (_local3 == _scrollPosition){
return;
};
if (_arg2){
dispatchEvent(new ScrollEvent(_direction, (scrollPosition - _local3), scrollPosition));
};
updateThumb();
}
public function set scrollPosition(_arg1:Number):void{
setScrollPosition(_arg1, true);
}
public function get pageScrollSize():Number{
return (((_pageScrollSize)==0) ? _pageSize : _pageScrollSize);
}
public function set pageSize(_arg1:Number):void{
if (_arg1 > 0){
_pageSize = _arg1;
};
}
public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
this.pageSize = _arg1;
_minScrollPosition = _arg2;
_maxScrollPosition = _arg3;
if (_arg4 >= 0){
_pageScrollSize = _arg4;
};
enabled = (_maxScrollPosition > _minScrollPosition);
setScrollPosition(_scrollPosition, false);
updateThumb();
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
downArrow.enabled = (track.enabled = (thumb.enabled = (upArrow.enabled = ((enabled) && ((_maxScrollPosition > _minScrollPosition))))));
updateThumb();
}
protected function updateThumb():void{
var _local1:Number;
_local1 = ((_maxScrollPosition - _minScrollPosition) + _pageSize);
if ((((((track.height <= 12)) || ((_maxScrollPosition <= _minScrollPosition)))) || ((((_local1 == 0)) || (isNaN(_local1)))))){
thumb.height = 12;
thumb.visible = false;
} else {
thumb.height = Math.max(13, ((_pageSize / _local1) * track.height));
thumb.y = (track.y + ((track.height - thumb.height) * ((_scrollPosition - _minScrollPosition) / (_maxScrollPosition - _minScrollPosition))));
thumb.visible = enabled;
};
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
inDrag = true;
thumbScrollOffset = (mouseY - thumb.y);
thumb.mouseStateLocked = true;
mouseChildren = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
inDrag = false;
mouseChildren = true;
thumb.mouseStateLocked = false;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
}
public function set pageScrollSize(_arg1:Number):void{
if (_arg1 >= 0){
_pageScrollSize = _arg1;
};
}
protected function handleThumbDrag(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = Math.max(0, Math.min((track.height - thumb.height), ((mouseY - track.y) - thumbScrollOffset)));
setScrollPosition((((_local2 / (track.height - thumb.height)) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition));
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
if (_direction == _arg1){
return;
};
_direction = _arg1;
if (isLivePreview){
return;
};
setScaleY(1);
_local2 = (_direction == ScrollBarDirection.HORIZONTAL);
if (((_local2) && (componentInspectorSetting))){
if (rotation == 90){
return;
};
setScaleX(-1);
rotation = -90;
};
if (!componentInspectorSetting){
if (((_local2) && ((rotation == 0)))){
rotation = -90;
setScaleX(-1);
} else {
if (((!(_local2)) && ((rotation == -90)))){
rotation = 0;
setScaleX(1);
};
};
};
invalidate(InvalidationType.SIZE);
}
public function set lineScrollSize(_arg1:Number):void{
if (_arg1 > 0){
_lineScrollSize = _arg1;
};
}
override public function get height():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.width : super.height);
}
protected function scrollPressHandler(_arg1:ComponentEvent):void{
var _local2:Number;
var _local3:Number;
_arg1.stopImmediatePropagation();
if (_arg1.currentTarget == upArrow){
setScrollPosition((_scrollPosition - _lineScrollSize));
} else {
if (_arg1.currentTarget == downArrow){
setScrollPosition((_scrollPosition + _lineScrollSize));
} else {
_local2 = (((track.mouseY / track.height) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition);
_local3 = ((pageScrollSize)==0) ? pageSize : pageScrollSize;
if (_scrollPosition < _local2){
setScrollPosition(Math.min(_local2, (_scrollPosition + _local3)));
} else {
if (_scrollPosition > _local2){
setScrollPosition(Math.max(_local2, (_scrollPosition - _local3)));
};
};
};
};
}
public function get pageSize():Number{
return (_pageSize);
}
public function set maxScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _minScrollPosition, _arg1);
}
public function get scrollPosition():Number{
return (_scrollPosition);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
var _local1:Number;
if (isInvalid(InvalidationType.SIZE)){
_local1 = super.height;
downArrow.move(0, Math.max(upArrow.height, (_local1 - downArrow.height)));
track.setSize(WIDTH, Math.max(0, (_local1 - (downArrow.height + upArrow.height))));
updateThumb();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
setStyles();
};
downArrow.drawNow();
upArrow.drawNow();
track.drawNow();
thumb.drawNow();
validate();
}
override protected function configUI():void{
super.configUI();
track = new BaseButton();
track.move(0, 14);
track.useHandCursor = false;
track.autoRepeat = true;
track.focusEnabled = false;
addChild(track);
thumb = new LabelButton();
thumb.label = "";
thumb.setSize(WIDTH, 15);
thumb.move(0, 15);
thumb.focusEnabled = false;
addChild(thumb);
downArrow = new BaseButton();
downArrow.setSize(WIDTH, 14);
downArrow.autoRepeat = true;
downArrow.focusEnabled = false;
addChild(downArrow);
upArrow = new BaseButton();
upArrow.setSize(WIDTH, 14);
upArrow.move(0, 0);
upArrow.autoRepeat = true;
upArrow.focusEnabled = false;
addChild(upArrow);
upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
track.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
enabled = false;
}
public function get direction():String{
return (_direction);
}
public function get lineScrollSize():Number{
return (_lineScrollSize);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if (_direction == ScrollBarDirection.HORIZONTAL){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
}
public function get maxScrollPosition():Number{
return (_maxScrollPosition);
}
override public function get width():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.height : super.width);
}
protected function setStyles():void{
copyStylesToChild(downArrow, DOWN_ARROW_STYLES);
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
copyStylesToChild(upArrow, UP_ARROW_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 16
//ScrollBarDirection (fl.controls.ScrollBarDirection)
package fl.controls {
public class ScrollBarDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
}
}//package fl.controls
Section 17
//ScrollPolicy (fl.controls.ScrollPolicy)
package fl.controls {
public class ScrollPolicy {
public static const OFF:String = "off";
public static const ON:String = "on";
public static const AUTO:String = "auto";
}
}//package fl.controls
Section 18
//SelectableList (fl.controls.SelectableList)
package fl.controls {
import fl.controls.listClasses.*;
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.data.*;
import fl.managers.*;
import fl.events.*;
import flash.utils.*;
import flash.ui.*;
import fl.containers.*;
public class SelectableList extends BaseScrollPane implements IFocusManagerComponent {
protected var invalidItems:Dictionary;
protected var renderedItems:Dictionary;
protected var listHolder:Sprite;
protected var _allowMultipleSelection:Boolean;// = false
protected var lastCaretIndex:int;// = -1
protected var _selectedIndices:Array;
protected var availableCellRenderers:Array;
protected var list:Sprite;
protected var caretIndex:int;// = -1
protected var updatedRendererStyles:Object;
protected var preChangeItems:Array;
protected var activeCellRenderers:Array;
protected var rendererStyles:Object;
protected var _verticalScrollPosition:Number;
protected var _dataProvider:DataProvider;
protected var _horizontalScrollPosition:Number;
private var collectionItemImport:SimpleCollectionItem;
protected var _selectable:Boolean;// = true
private static var defaultStyles:Object = {skin:"List_skin", cellRenderer:CellRenderer, contentPadding:null, disabledAlpha:null};
public static var createAccessibilityImplementation:Function;
public function SelectableList(){
_allowMultipleSelection = false;
_selectable = true;
caretIndex = -1;
lastCaretIndex = -1;
super();
activeCellRenderers = [];
availableCellRenderers = [];
invalidItems = new Dictionary(true);
renderedItems = new Dictionary(true);
_selectedIndices = [];
if (dataProvider == null){
dataProvider = new DataProvider();
};
verticalScrollPolicy = ScrollPolicy.AUTO;
rendererStyles = {};
updatedRendererStyles = {};
}
protected function drawList():void{
}
public function set allowMultipleSelection(_arg1:Boolean):void{
if (_arg1 == _allowMultipleSelection){
return;
};
_allowMultipleSelection = _arg1;
if (((!(_arg1)) && ((_selectedIndices.length > 1)))){
_selectedIndices = [_selectedIndices.pop()];
invalidate(InvalidationType.DATA);
};
}
public function sortItemsOn(_arg1:String, _arg2:Object=null){
return (_dataProvider.sortOn(_arg1, _arg2));
}
public function removeItemAt(_arg1:uint):Object{
return (_dataProvider.removeItemAt(_arg1));
}
public function get selectedItem():Object{
return (((_selectedIndices.length)==0) ? null : _dataProvider.getItemAt(selectedIndex));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!selectable){
return;
};
switch (_arg1.keyCode){
case Keyboard.UP:
case Keyboard.DOWN:
case Keyboard.END:
case Keyboard.HOME:
case Keyboard.PAGE_UP:
case Keyboard.PAGE_DOWN:
moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
_arg1.stopPropagation();
break;
case Keyboard.LEFT:
case Keyboard.RIGHT:
moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
_arg1.stopPropagation();
break;
};
}
public function get selectable():Boolean{
return (_selectable);
}
public function itemToCellRenderer(_arg1:Object):ICellRenderer{
var _local2:*;
var _local3:ICellRenderer;
if (_arg1 != null){
for (_local2 in activeCellRenderers) {
_local3 = (activeCellRenderers[_local2] as ICellRenderer);
if (_local3.data == _arg1){
return (_local3);
};
};
};
return (null);
}
public function getNextIndexAtLetter(_arg1:String, _arg2:int=-1):int{
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:Object;
var _local7:String;
if (length == 0){
return (-1);
};
_arg1 = _arg1.toUpperCase();
_local3 = (length - 1);
_local4 = 0;
while (_local4 < _local3) {
_local5 = ((_arg2 + 1) + _local4);
if (_local5 > (length - 1)){
_local5 = (_local5 - length);
};
_local6 = getItemAt(_local5);
if (_local6 == null){
break;
};
_local7 = itemToLabel(_local6);
if (_local7 == null){
} else {
if (_local7.charAt(0).toUpperCase() == _arg1){
return (_local5);
};
};
_local4++;
};
return (-1);
}
public function invalidateList():void{
_invalidateList();
invalidate(InvalidationType.DATA);
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
list.mouseChildren = _enabled;
}
public function get selectedIndices():Array{
return (_selectedIndices.concat());
}
public function set selectable(_arg1:Boolean):void{
if (_arg1 == _selectable){
return;
};
if (!_arg1){
selectedIndices = [];
};
_selectable = _arg1;
}
public function itemToLabel(_arg1:Object):String{
return (_arg1["label"]);
}
public function addItemAt(_arg1:Object, _arg2:uint):void{
_dataProvider.addItemAt(_arg1, _arg2);
invalidateList();
}
public function replaceItemAt(_arg1:Object, _arg2:uint):Object{
return (_dataProvider.replaceItemAt(_arg1, _arg2));
}
protected function handleDataChange(_arg1:DataChangeEvent):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:uint;
_local2 = _arg1.startIndex;
_local3 = _arg1.endIndex;
_local4 = _arg1.changeType;
if (_local4 == DataChangeType.INVALIDATE_ALL){
clearSelection();
invalidateList();
} else {
if (_local4 == DataChangeType.INVALIDATE){
_local5 = 0;
while (_local5 < _arg1.items.length) {
invalidateItem(_arg1.items[_local5]);
_local5++;
};
} else {
if (_local4 == DataChangeType.ADD){
_local5 = 0;
while (_local5 < _selectedIndices.length) {
if (_selectedIndices[_local5] >= _local2){
_selectedIndices[_local5] = (_selectedIndices[_local5] + (_local2 - _local3));
};
_local5++;
};
} else {
if (_local4 == DataChangeType.REMOVE){
_local5 = 0;
while (_local5 < _selectedIndices.length) {
if (_selectedIndices[_local5] >= _local2){
if (_selectedIndices[_local5] <= _local3){
delete _selectedIndices[_local5];
} else {
_selectedIndices[_local5] = (_selectedIndices[_local5] - ((_local2 - _local3) + 1));
};
};
_local5++;
};
} else {
if (_local4 == DataChangeType.REMOVE_ALL){
clearSelection();
} else {
if (_local4 == DataChangeType.REPLACE){
} else {
selectedItems = preChangeItems;
preChangeItems = null;
};
};
};
};
};
};
invalidate(InvalidationType.DATA);
}
protected function _invalidateList():void{
availableCellRenderers = [];
while (activeCellRenderers.length > 0) {
list.removeChild((activeCellRenderers.pop() as DisplayObject));
};
}
protected function updateRendererStyles():void{
var _local1:Array;
var _local2:uint;
var _local3:uint;
var _local4:String;
_local1 = availableCellRenderers.concat(activeCellRenderers);
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
if (_local1[_local3].setStyle == null){
} else {
for (_local4 in updatedRendererStyles) {
_local1[_local3].setStyle(_local4, updatedRendererStyles[_local4]);
};
_local1[_local3].drawNow();
};
_local3++;
};
updatedRendererStyles = {};
}
public function set selectedItem(_arg1:Object):void{
var _local2:int;
_local2 = _dataProvider.getItemIndex(_arg1);
selectedIndex = _local2;
}
public function sortItems(... _args){
return (_dataProvider.sort.apply(_dataProvider, _args));
}
public function removeAll():void{
_dataProvider.removeAll();
}
protected function handleCellRendererChange(_arg1:Event):void{
var _local2:ICellRenderer;
var _local3:uint;
_local2 = (_arg1.currentTarget as ICellRenderer);
_local3 = _local2.listData.index;
_dataProvider.invalidateItemAt(_local3);
}
protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
}
override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
if (_arg1 == _horizontalScrollPosition){
return;
};
_local3 = (_arg1 - _horizontalScrollPosition);
_horizontalScrollPosition = _arg1;
if (_arg2){
dispatchEvent(new ScrollEvent(ScrollBarDirection.HORIZONTAL, _local3, _arg1));
};
}
public function scrollToSelected():void{
scrollToIndex(selectedIndex);
}
public function invalidateItem(_arg1:Object):void{
if (renderedItems[_arg1] == null){
return;
};
invalidItems[_arg1] = true;
invalidate(InvalidationType.DATA);
}
protected function handleCellRendererClick(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:uint;
var _local4:int;
var _local5:int;
var _local6:uint;
if (!_enabled){
return;
};
_local2 = (_arg1.currentTarget as ICellRenderer);
_local3 = _local2.listData.index;
if (((!(dispatchEvent(new ListEvent(ListEvent.ITEM_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data)))) || (!(_selectable)))){
return;
};
_local4 = selectedIndices.indexOf(_local3);
if (!_allowMultipleSelection){
if (_local4 != -1){
return;
};
_local2.selected = true;
_selectedIndices = [_local3];
lastCaretIndex = (caretIndex = _local3);
} else {
if (_arg1.shiftKey){
_local6 = ((_selectedIndices.length)>0) ? _selectedIndices[0] : _local3;
_selectedIndices = [];
if (_local6 > _local3){
_local5 = _local6;
while (_local5 >= _local3) {
_selectedIndices.push(_local5);
_local5--;
};
} else {
_local5 = _local6;
while (_local5 <= _local3) {
_selectedIndices.push(_local5);
_local5++;
};
};
caretIndex = _local3;
} else {
if (_arg1.ctrlKey){
if (_local4 != -1){
_local2.selected = false;
_selectedIndices.splice(_local4, 1);
} else {
_local2.selected = true;
_selectedIndices.push(_local3);
};
caretIndex = _local3;
} else {
_selectedIndices = [_local3];
lastCaretIndex = (caretIndex = _local3);
};
};
};
dispatchEvent(new Event(Event.CHANGE));
invalidate(InvalidationType.DATA);
}
public function get length():uint{
return (_dataProvider.length);
}
public function get allowMultipleSelection():Boolean{
return (_allowMultipleSelection);
}
protected function onPreChange(_arg1:DataChangeEvent):void{
switch (_arg1.changeType){
case DataChangeType.REMOVE:
case DataChangeType.ADD:
case DataChangeType.INVALIDATE:
case DataChangeType.REMOVE_ALL:
case DataChangeType.REPLACE:
case DataChangeType.INVALIDATE_ALL:
break;
default:
preChangeItems = selectedItems;
break;
};
}
public function getRendererStyle(_arg1:String, _arg2:int=-1):Object{
return (rendererStyles[_arg1]);
}
override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
if (_arg1 == _verticalScrollPosition){
return;
};
_local3 = (_arg1 - _verticalScrollPosition);
_verticalScrollPosition = _arg1;
if (_arg2){
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _local3, _arg1));
};
}
protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
}
public function set selectedIndices(_arg1:Array):void{
if (!_selectable){
return;
};
_selectedIndices = ((_arg1)==null) ? [] : _arg1.concat();
invalidate(InvalidationType.SELECTED);
}
public function get selectedIndex():int{
return (((_selectedIndices.length)==0) ? -1 : _selectedIndices[(_selectedIndices.length - 1)]);
}
override protected function draw():void{
super.draw();
}
override protected function configUI():void{
super.configUI();
listHolder = new Sprite();
addChild(listHolder);
listHolder.scrollRect = contentScrollRect;
list = new Sprite();
listHolder.addChild(list);
}
public function addItem(_arg1:Object):void{
_dataProvider.addItem(_arg1);
invalidateList();
}
protected function handleCellRendererMouseEvent(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:String;
_local2 = (_arg1.target as ICellRenderer);
_local3 = ((_arg1.type)==MouseEvent.ROLL_OVER) ? ListEvent.ITEM_ROLL_OVER : ListEvent.ITEM_ROLL_OUT;
dispatchEvent(new ListEvent(_local3, false, false, _local2.listData.column, _local2.listData.row, _local2.listData.index, _local2.data));
}
public function clearRendererStyle(_arg1:String, _arg2:int=-1):void{
delete rendererStyles[_arg1];
updatedRendererStyles[_arg1] = null;
invalidate(InvalidationType.RENDERER_STYLES);
}
protected function handleCellRendererDoubleClick(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:uint;
if (!_enabled){
return;
};
_local2 = (_arg1.currentTarget as ICellRenderer);
_local3 = _local2.listData.index;
dispatchEvent(new ListEvent(ListEvent.ITEM_DOUBLE_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data));
}
public function get rowCount():uint{
return (0);
}
public function isItemSelected(_arg1:Object):Boolean{
return ((selectedItems.indexOf(_arg1) > -1));
}
public function set dataProvider(_arg1:DataProvider):void{
if (_dataProvider != null){
_dataProvider.removeEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange);
_dataProvider.removeEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange);
};
_dataProvider = _arg1;
_dataProvider.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true);
_dataProvider.addEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange, false, 0, true);
clearSelection();
invalidateList();
}
override protected function drawLayout():void{
super.drawLayout();
contentScrollRect = listHolder.scrollRect;
contentScrollRect.width = availableWidth;
contentScrollRect.height = availableHeight;
listHolder.scrollRect = contentScrollRect;
}
public function getItemAt(_arg1:uint):Object{
return (_dataProvider.getItemAt(_arg1));
}
override protected function initializeAccessibility():void{
if (SelectableList.createAccessibilityImplementation != null){
SelectableList.createAccessibilityImplementation(this);
};
}
public function scrollToIndex(_arg1:int):void{
}
public function removeItem(_arg1:Object):Object{
return (_dataProvider.removeItem(_arg1));
}
public function get dataProvider():DataProvider{
return (_dataProvider);
}
public function set maxHorizontalScrollPosition(_arg1:Number):void{
_maxHorizontalScrollPosition = _arg1;
invalidate(InvalidationType.SIZE);
}
public function setRendererStyle(_arg1:String, _arg2:Object, _arg3:uint=0):void{
if (rendererStyles[_arg1] == _arg2){
return;
};
updatedRendererStyles[_arg1] = _arg2;
rendererStyles[_arg1] = _arg2;
invalidate(InvalidationType.RENDERER_STYLES);
}
public function invalidateItemAt(_arg1:uint):void{
var _local2:Object;
_local2 = _dataProvider.getItemAt(_arg1);
if (_local2 != null){
invalidateItem(_local2);
};
}
public function set selectedItems(_arg1:Array):void{
var _local2:Array;
var _local3:uint;
var _local4:int;
if (_arg1 == null){
selectedIndices = null;
return;
};
_local2 = [];
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _dataProvider.getItemIndex(_arg1[_local3]);
if (_local4 != -1){
_local2.push(_local4);
};
_local3++;
};
selectedIndices = _local2;
}
public function clearSelection():void{
selectedIndex = -1;
}
override public function get maxHorizontalScrollPosition():Number{
return (_maxHorizontalScrollPosition);
}
public function get selectedItems():Array{
var _local1:Array;
var _local2:uint;
_local1 = [];
_local2 = 0;
while (_local2 < _selectedIndices.length) {
_local1.push(_dataProvider.getItemAt(_selectedIndices[_local2]));
_local2++;
};
return (_local1);
}
public function set selectedIndex(_arg1:int):void{
selectedIndices = ((_arg1)==-1) ? null : [_arg1];
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseScrollPane.getStyleDefinition()));
}
}
}//package fl.controls
Section 19
//Slider (fl.controls.Slider)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class Slider extends UIComponent implements IFocusManagerComponent {
protected var _direction:String;
protected var _liveDragging:Boolean;// = false
protected var _value:Number;// = 0
protected var _snapInterval:Number;// = 0
protected var _minimum:Number;// = 0
protected var _maximum:Number;// = 10
protected var track:BaseButton;
protected var _tickInterval:Number;// = 0
protected var tickContainer:Sprite;
protected var thumb:BaseButton;
protected static const TICK_STYLES:Object = {upSkin:"tickSkin"};
protected static const TRACK_STYLES:Object = {upSkin:"sliderTrackSkin", overSkin:"sliderTrackSkin", downSkin:"sliderTrackSkin", disabledSkin:"sliderTrackDisabledSkin"};
protected static const THUMB_STYLES:Object = {upSkin:"thumbUpSkin", overSkin:"thumbOverSkin", downSkin:"thumbDownSkin", disabledSkin:"thumbDisabledSkin"};
protected static var defaultStyles:Object = {thumbUpSkin:"SliderThumb_upSkin", thumbOverSkin:"SliderThumb_overSkin", thumbDownSkin:"SliderThumb_downSkin", thumbDisabledSkin:"SliderThumb_disabledSkin", sliderTrackSkin:"SliderTrack_skin", sliderTrackDisabledSkin:"SliderTrack_disabledSkin", tickSkin:"SliderTick_skin", focusRectSkin:null, focusRectPadding:null};
public function Slider(){
_direction = SliderDirection.HORIZONTAL;
_minimum = 0;
_maximum = 10;
_value = 0;
_tickInterval = 0;
_snapInterval = 0;
_liveDragging = false;
super();
setStyles();
}
public function get minimum():Number{
return (_minimum);
}
public function set minimum(_arg1:Number):void{
_minimum = _arg1;
this.value = Math.max(_arg1, this.value);
invalidate(InvalidationType.DATA);
}
public function get maximum():Number{
return (_maximum);
}
protected function positionThumb():void{
thumb.x = ((((_direction)==SliderDirection.VERTICAL) ? ((maximum - minimum) - value) : (value - minimum) / (maximum - minimum)) * _width);
}
protected function clearTicks():void{
if (((!(tickContainer)) || (!(tickContainer.parent)))){
return;
};
removeChild(tickContainer);
}
protected function onTrackClick(_arg1:MouseEvent):void{
calculateValue(track.mouseX, InteractionInputType.MOUSE, SliderEventClickTarget.TRACK);
if (!liveDragging){
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.TRACK, InteractionInputType.MOUSE));
};
}
public function set maximum(_arg1:Number):void{
_maximum = _arg1;
this.value = Math.min(_arg1, this.value);
invalidate(InvalidationType.DATA);
}
public function get liveDragging():Boolean{
return (_liveDragging);
}
protected function doDrag(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Number;
_local2 = (_width / snapInterval);
_local3 = track.mouseX;
calculateValue(_local3, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_DRAG, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
var _local2:uint;
var _local3:Number;
var _local4:Boolean;
if (!enabled){
return;
};
_local2 = ((snapInterval)>0) ? snapInterval : 1;
_local4 = (direction == SliderDirection.HORIZONTAL);
if ((((((_arg1.keyCode == Keyboard.DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.LEFT)) && (_local4))))){
_local3 = (value - _local2);
} else {
if ((((((_arg1.keyCode == Keyboard.UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.RIGHT)) && (_local4))))){
_local3 = (value + _local2);
} else {
if ((((((_arg1.keyCode == Keyboard.PAGE_DOWN)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.HOME)) && (_local4))))){
_local3 = minimum;
} else {
if ((((((_arg1.keyCode == Keyboard.PAGE_UP)) && (!(_local4)))) || ((((_arg1.keyCode == Keyboard.END)) && (_local4))))){
_local3 = maximum;
};
};
};
};
if (!isNaN(_local3)){
_arg1.stopPropagation();
doSetValue(_local3, InteractionInputType.KEYBOARD, null, _arg1.keyCode);
};
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
super.enabled = _arg1;
track.enabled = (thumb.enabled = _arg1);
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, doDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_PRESS, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB));
}
public function get snapInterval():Number{
return (_snapInterval);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, doDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
dispatchEvent(new SliderEvent(SliderEvent.THUMB_RELEASE, value, InteractionInputType.MOUSE, SliderEventClickTarget.THUMB));
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, SliderEventClickTarget.THUMB, InteractionInputType.MOUSE));
}
public function set liveDragging(_arg1:Boolean):void{
_liveDragging = _arg1;
}
public function set value(_arg1:Number):void{
doSetValue(_arg1);
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
_direction = _arg1;
_local2 = (_direction == SliderDirection.VERTICAL);
if (isLivePreview){
if (_local2){
setScaleY(-1);
y = track.height;
} else {
setScaleY(1);
y = 0;
};
positionThumb();
return;
};
if (((_local2) && (componentInspectorSetting))){
if ((rotation % 90) == 0){
setScaleY(-1);
};
};
if (!componentInspectorSetting){
rotation = (_local2) ? 90 : 0;
};
}
public function set tickInterval(_arg1:Number):void{
_tickInterval = _arg1;
invalidate(InvalidationType.SIZE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
setStyles();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
track.setSize(_width, track.height);
track.drawNow();
thumb.drawNow();
};
if (tickInterval > 0){
drawTicks();
} else {
clearTicks();
};
positionThumb();
super.draw();
}
override protected function configUI():void{
super.configUI();
thumb = new BaseButton();
thumb.setSize(13, 13);
thumb.autoRepeat = false;
addChild(thumb);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
track = new BaseButton();
track.move(0, 0);
track.setSize(80, 4);
track.autoRepeat = false;
track.useHandCursor = false;
track.addEventListener(MouseEvent.CLICK, onTrackClick, false, 0, true);
addChildAt(track, 0);
}
public function set snapInterval(_arg1:Number):void{
_snapInterval = _arg1;
}
public function get value():Number{
return (_value);
}
public function get direction():String{
return (_direction);
}
public function get tickInterval():Number{
return (_tickInterval);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if ((((_direction == SliderDirection.VERTICAL)) && (!(isLivePreview)))){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
invalidate(InvalidationType.SIZE);
}
protected function drawTicks():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:uint;
var _local5:DisplayObject;
clearTicks();
tickContainer = new Sprite();
_local1 = ((maximum)<1) ? (tickInterval / 100) : tickInterval;
_local2 = ((maximum - minimum) / _local1);
_local3 = (_width / _local2);
_local4 = 0;
while (_local4 <= _local2) {
_local5 = getDisplayObjectInstance(getStyleValue("tickSkin"));
_local5.x = (_local3 * _local4);
_local5.y = ((track.y - _local5.height) - 2);
tickContainer.addChild(_local5);
_local4++;
};
addChild(tickContainer);
}
protected function calculateValue(_arg1:Number, _arg2:String, _arg3:String, _arg4:int=undefined):void{
var _local5:Number;
_local5 = ((_arg1 / _width) * (maximum - minimum));
if (_direction == SliderDirection.VERTICAL){
_local5 = (maximum - _local5);
} else {
_local5 = (minimum + _local5);
};
doSetValue(_local5, _arg2, _arg3, _arg4);
}
protected function getPrecision(_arg1:Number):Number{
var _local2:String;
_local2 = _arg1.toString();
if (_local2.indexOf(".") == -1){
return (0);
};
return (_local2.split(".").pop().length);
}
protected function doSetValue(_arg1:Number, _arg2:String=null, _arg3:String=null, _arg4:int=undefined):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local5 = _value;
if (((!((_snapInterval == 0))) && (!((_snapInterval == 1))))){
_local6 = Math.pow(10, getPrecision(snapInterval));
_local7 = (_snapInterval * _local6);
_local8 = Math.round((_arg1 * _local6));
_local9 = (Math.round((_local8 / _local7)) * _local7);
_arg1 = (_local9 / _local6);
_value = Math.max(minimum, Math.min(maximum, _arg1));
} else {
_value = Math.max(minimum, Math.min(maximum, Math.round(_arg1)));
};
if (((!((_local5 == _value))) && (((((liveDragging) && (!((_arg3 == null))))) || ((_arg2 == InteractionInputType.KEYBOARD)))))){
dispatchEvent(new SliderEvent(SliderEvent.CHANGE, value, _arg3, _arg2, _arg4));
};
positionThumb();
}
protected function setStyles():void{
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 20
//SliderDirection (fl.controls.SliderDirection)
package fl.controls {
public class SliderDirection {
public static var HORIZONTAL:String = "horizontal";
public static var VERTICAL:String = "vertical";
}
}//package fl.controls
Section 21
//TextInput (fl.controls.TextInput)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class TextInput extends UIComponent implements IFocusManagerComponent {
protected var _html:Boolean;// = false
protected var _savedHTML:String;
protected var background:DisplayObject;
protected var _editable:Boolean;// = true
public var textField:TextField;
private static var defaultStyles:Object = {upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:0, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function TextInput(){
_editable = true;
_html = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
if (focusTarget != null){
focusTarget.drawFocus(_arg1);
return;
};
super.drawFocus(_arg1);
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
override protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((((_arg1 == textField)) || (super.isOurFocus(_arg1))));
}
protected function handleKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true));
};
}
public function set text(_arg1:String):void{
textField.text = _arg1;
_html = false;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
protected function updateTextFieldType():void{
textField.type = (((enabled) && (editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC;
textField.selectable = enabled;
}
public function get selectionEndIndex():int{
return (textField.selectionEndIndex);
}
public function get editable():Boolean{
return (_editable);
}
override protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (_arg1.target == this){
stage.focus = textField;
};
_local2 = focusManager;
if (((editable) && (_local2))){
_local2.showFocusIndicator = true;
if (((textField.selectable) && ((textField.selectionBeginIndex == textField.selectionBeginIndex)))){
setSelection(0, textField.length);
};
};
super.focusInHandler(_arg1);
if (editable){
setIMEMode(true);
};
}
public function get selectionBeginIndex():int{
return (textField.selectionBeginIndex);
}
public function set alwaysShowSelection(_arg1:Boolean):void{
textField.alwaysShowSelection = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
updateTextFieldType();
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
public function get horizontalScrollPosition():int{
return (textField.scrollH);
}
public function set condenseWhite(_arg1:Boolean):void{
textField.condenseWhite = _arg1;
}
public function set displayAsPassword(_arg1:Boolean):void{
textField.displayAsPassword = _arg1;
}
public function set horizontalScrollPosition(_arg1:int):void{
textField.scrollH = _arg1;
}
public function get restrict():String{
return (textField.restrict);
}
public function get textWidth():Number{
return (textField.textWidth);
}
public function get textHeight():Number{
return (textField.textHeight);
}
public function set editable(_arg1:Boolean):void{
_editable = _arg1;
updateTextFieldType();
}
public function get maxChars():int{
return (textField.maxChars);
}
public function get length():int{
return (textField.length);
}
public function getLineMetrics(_arg1:int):TextLineMetrics{
return (textField.getLineMetrics(_arg1));
}
public function get imeMode():String{
return (_imeMode);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
super.focusOutHandler(_arg1);
if (editable){
setIMEMode(false);
};
}
public function set htmlText(_arg1:String):void{
if (_arg1 == ""){
text = "";
return;
};
_html = true;
_savedHTML = _arg1;
textField.htmlText = _arg1;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
public function get text():String{
return (textField.text);
}
override public function get enabled():Boolean{
return (super.enabled);
}
public function get condenseWhite():Boolean{
return (textField.condenseWhite);
}
public function get alwaysShowSelection():Boolean{
return (textField.alwaysShowSelection);
}
override protected function draw():void{
var _local1:Object;
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawTextFormat();
drawBackground();
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function handleTextInput(_arg1:TextEvent):void{
_arg1.stopPropagation();
dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text));
}
override protected function configUI():void{
super.configUI();
tabChildren = true;
textField = new TextField();
addChild(textField);
updateTextFieldType();
textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true);
textField.addEventListener(Event.CHANGE, handleChange, false, 0, true);
textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true);
}
public function setSelection(_arg1:int, _arg2:int):void{
textField.setSelection(_arg1, _arg2);
}
public function get displayAsPassword():Boolean{
return (textField.displayAsPassword);
}
public function appendText(_arg1:String):void{
textField.appendText(_arg1);
}
public function set restrict(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
_arg1 = null;
};
textField.restrict = _arg1;
}
public function get htmlText():String{
return (textField.htmlText);
}
protected function drawBackground():void{
var _local1:DisplayObject;
var _local2:String;
_local1 = background;
_local2 = (enabled) ? "upSkin" : "disabledSkin";
background = getDisplayObjectInstance(getStyleValue(_local2));
if (background == null){
return;
};
addChildAt(background, 0);
if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){
removeChild(_local1);
};
}
override public function setFocus():void{
stage.focus = textField;
}
protected function drawLayout():void{
var _local1:Number;
_local1 = Number(getStyleValue("textPadding"));
if (background != null){
background.width = width;
background.height = height;
};
textField.width = (width - (2 * _local1));
textField.height = (height - (2 * _local1));
textField.x = (textField.y = _local1);
}
public function set maxChars(_arg1:int):void{
textField.maxChars = _arg1;
}
public function get maxHorizontalScrollPosition():int{
return (textField.maxScrollH);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
if (_html){
textField.htmlText = _savedHTML;
};
}
protected function handleChange(_arg1:Event):void{
_arg1.stopPropagation();
dispatchEvent(new Event(Event.CHANGE, true));
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 22
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 23
//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 24
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 25
//DataProvider (fl.data.DataProvider)
package fl.data {
import flash.events.*;
import fl.events.*;
public class DataProvider extends EventDispatcher {
protected var data:Array;
public function DataProvider(_arg1:Object=null){
if (_arg1 == null){
data = [];
} else {
data = getDataFromObject(_arg1);
};
}
protected function dispatchPreChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.PRE_DATA_CHANGE, _arg1, _arg2, _arg3, _arg4));
}
public function invalidateItemAt(_arg1:int):void{
checkIndex(_arg1, (data.length - 1));
dispatchChangeEvent(DataChangeType.INVALIDATE, [data[_arg1]], _arg1, _arg1);
}
public function getItemIndex(_arg1:Object):int{
return (data.indexOf(_arg1));
}
protected function getDataFromObject(_arg1:Object):Array{
var _local2:Array;
var _local3:Array;
var _local4:uint;
var _local5:Object;
var _local6:XML;
var _local7:XMLList;
var _local8:XML;
var _local9:XMLList;
var _local10:XML;
var _local11:XMLList;
var _local12:XML;
if ((_arg1 is Array)){
_local3 = (_arg1 as Array);
if (_local3.length > 0){
if ((((_local3[0] is String)) || ((_local3[0] is Number)))){
_local2 = [];
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = {label:String(_local3[_local4]), data:_local3[_local4]};
_local2.push(_local5);
_local4++;
};
return (_local2);
};
};
return (_arg1.concat());
} else {
if ((_arg1 is DataProvider)){
return (_arg1.toArray());
};
if ((_arg1 is XML)){
_local6 = (_arg1 as XML);
_local2 = [];
_local7 = _local6.*;
for each (_local8 in _local7) {
_arg1 = {};
_local9 = _local8.attributes();
for each (_local10 in _local9) {
_arg1[_local10.localName()] = _local10.toString();
};
_local11 = _local8.*;
for each (_local12 in _local11) {
if (_local12.hasSimpleContent()){
_arg1[_local12.localName()] = _local12.toString();
};
};
_local2.push(_arg1);
};
return (_local2);
//unresolved jump
};
};
throw (new ((!NULL! + !NULL!) + " to Array or DataProvider.").TypeError(!NULL!));
}
public function removeItemAt(_arg1:uint):Object{
var _local2:Array;
checkIndex(_arg1, (data.length - 1));
dispatchPreChangeEvent(DataChangeType.REMOVE, data.slice(_arg1, (_arg1 + 1)), _arg1, _arg1);
_local2 = data.splice(_arg1, 1);
dispatchChangeEvent(DataChangeType.REMOVE, _local2, _arg1, _arg1);
return (_local2[0]);
}
public function addItem(_arg1:Object):void{
dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1));
data.push(_arg1);
dispatchChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1));
}
public function sortOn(_arg1:Object, _arg2:Object=null){
var _local3:Array;
dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
_local3 = data.sortOn(_arg1, _arg2);
dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
return (_local3);
}
public function sort(... _args){
var _local2:Array;
dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
_local2 = data.sort.apply(data, _args);
dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
return (_local2);
}
public function addItems(_arg1:Object):void{
addItemsAt(_arg1, data.length);
}
public function concat(_arg1:Object):void{
addItems(_arg1);
}
public function clone():DataProvider{
return (new DataProvider(data));
}
public function toArray():Array{
return (data.concat());
}
public function get length():uint{
return (data.length);
}
public function addItemAt(_arg1:Object, _arg2:uint):void{
checkIndex(_arg2, data.length);
dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2);
data.splice(_arg2, 0, _arg1);
dispatchChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2);
}
public function getItemAt(_arg1:uint):Object{
checkIndex(_arg1, (data.length - 1));
return (data[_arg1]);
}
override public function toString():String{
return ((("DataProvider [" + data.join(" , ")) + "]"));
}
public function invalidateItem(_arg1:Object):void{
var _local2:uint;
_local2 = getItemIndex(_arg1);
if (_local2 == -1){
return;
};
invalidateItemAt(_local2);
}
protected function dispatchChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, _arg1, _arg2, _arg3, _arg4));
}
protected function checkIndex(_arg1:int, _arg2:int):void{
if ((((_arg1 > _arg2)) || ((_arg1 < 0)))){
throw (new RangeError((((("DataProvider index (" + _arg1) + ") is not in acceptable range (0 - ") + _arg2) + ")")));
};
}
public function addItemsAt(_arg1:Object, _arg2:uint):void{
var _local3:Array;
checkIndex(_arg2, data.length);
_local3 = getDataFromObject(_arg1);
dispatchPreChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1));
data.splice.apply(data, [_arg2, 0].concat(_local3));
dispatchChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1));
}
public function replaceItem(_arg1:Object, _arg2:Object):Object{
var _local3:int;
_local3 = getItemIndex(_arg2);
if (_local3 != -1){
return (replaceItemAt(_arg1, _local3));
};
return (null);
}
public function removeItem(_arg1:Object):Object{
var _local2:int;
_local2 = getItemIndex(_arg1);
if (_local2 != -1){
return (removeItemAt(_local2));
};
return (null);
}
public function merge(_arg1:Object):void{
var _local2:Array;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Object;
_local2 = getDataFromObject(_arg1);
_local3 = _local2.length;
_local4 = data.length;
dispatchPreChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1));
_local5 = 0;
while (_local5 < _local3) {
_local6 = _local2[_local5];
if (getItemIndex(_local6) == -1){
data.push(_local6);
};
_local5++;
};
if (data.length > _local4){
dispatchChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1));
} else {
dispatchChangeEvent(DataChangeType.ADD, [], -1, -1);
};
}
public function replaceItemAt(_arg1:Object, _arg2:uint):Object{
var _local3:Array;
checkIndex(_arg2, (data.length - 1));
_local3 = [data[_arg2]];
dispatchPreChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2);
data[_arg2] = _arg1;
dispatchChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2);
return (_local3[0]);
}
public function invalidate():void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, DataChangeType.INVALIDATE_ALL, data.concat(), 0, data.length));
}
public function removeAll():void{
var _local1:Array;
_local1 = data.concat();
dispatchPreChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length);
data = [];
dispatchChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length);
}
}
}//package fl.data
Section 26
//SimpleCollectionItem (fl.data.SimpleCollectionItem)
package fl.data {
public dynamic class SimpleCollectionItem {
public var label:String;
public var data:String;
public function toString():String{
return ((((("[SimpleCollectionItem: " + label) + ",") + data) + "]"));
}
}
}//package fl.data
Section 27
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 28
//DataChangeEvent (fl.events.DataChangeEvent)
package fl.events {
import flash.events.*;
public class DataChangeEvent extends Event {
protected var _items:Array;
protected var _endIndex:uint;
protected var _changeType:String;
protected var _startIndex:uint;
public static const PRE_DATA_CHANGE:String = "preDataChange";
public static const DATA_CHANGE:String = "dataChange";
public function DataChangeEvent(_arg1:String, _arg2:String, _arg3:Array, _arg4:int=-1, _arg5:int=-1):void{
super(_arg1);
_changeType = _arg2;
_startIndex = _arg4;
_items = _arg3;
_endIndex = ((_arg5)==-1) ? _startIndex : _arg5;
}
public function get changeType():String{
return (_changeType);
}
public function get startIndex():uint{
return (_startIndex);
}
public function get items():Array{
return (_items);
}
override public function clone():Event{
return (new DataChangeEvent(type, _changeType, _items, _startIndex, _endIndex));
}
override public function toString():String{
return (formatToString("DataChangeEvent", "type", "changeType", "startIndex", "endIndex", "bubbles", "cancelable"));
}
public function get endIndex():uint{
return (_endIndex);
}
}
}//package fl.events
Section 29
//DataChangeType (fl.events.DataChangeType)
package fl.events {
public class DataChangeType {
public static const ADD:String = "add";
public static const REMOVE:String = "remove";
public static const REMOVE_ALL:String = "removeAll";
public static const CHANGE:String = "change";
public static const REPLACE:String = "replace";
public static const INVALIDATE:String = "invalidate";
public static const INVALIDATE_ALL:String = "invalidateAll";
public static const SORT:String = "sort";
}
}//package fl.events
Section 30
//InteractionInputType (fl.events.InteractionInputType)
package fl.events {
public class InteractionInputType {
public static const MOUSE:String = "mouse";
public static const KEYBOARD:String = "keyboard";
}
}//package fl.events
Section 31
//ListEvent (fl.events.ListEvent)
package fl.events {
import flash.events.*;
public class ListEvent extends Event {
protected var _index:int;
protected var _item:Object;
protected var _columnIndex:int;
protected var _rowIndex:int;
public static const ITEM_DOUBLE_CLICK:String = "itemDoubleClick";
public static const ITEM_ROLL_OUT:String = "itemRollOut";
public static const ITEM_ROLL_OVER:String = "itemRollOver";
public static const ITEM_CLICK:String = "itemClick";
public function ListEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:Object=null){
super(_arg1, _arg2, _arg3);
_rowIndex = _arg5;
_columnIndex = _arg4;
_index = _arg6;
_item = _arg7;
}
public function get rowIndex():Object{
return (_rowIndex);
}
public function get index():int{
return (_index);
}
public function get item():Object{
return (_item);
}
public function get columnIndex():int{
return (_columnIndex);
}
override public function clone():Event{
return (new ListEvent(type, bubbles, cancelable, _columnIndex, _rowIndex));
}
override public function toString():String{
return (formatToString("ListEvent", "type", "bubbles", "cancelable", "columnIndex", "rowIndex", "index", "item"));
}
}
}//package fl.events
Section 32
//ScrollEvent (fl.events.ScrollEvent)
package fl.events {
import flash.events.*;
public class ScrollEvent extends Event {
private var _position:Number;
private var _direction:String;
private var _delta:Number;
public static const SCROLL:String = "scroll";
public function ScrollEvent(_arg1:String, _arg2:Number, _arg3:Number){
super(ScrollEvent.SCROLL, false, false);
_direction = _arg1;
_delta = _arg2;
_position = _arg3;
}
override public function clone():Event{
return (new ScrollEvent(_direction, _delta, _position));
}
public function get position():Number{
return (_position);
}
override public function toString():String{
return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position"));
}
public function get delta():Number{
return (_delta);
}
public function get direction():String{
return (_direction);
}
}
}//package fl.events
Section 33
//SliderEvent (fl.events.SliderEvent)
package fl.events {
import flash.events.*;
public class SliderEvent extends Event {
protected var _triggerEvent:String;
protected var _keyCode:Number;
protected var _value:Number;
protected var _clickTarget:String;
public static const CHANGE:String = "change";
public static const THUMB_PRESS:String = "thumbPress";
public static const THUMB_DRAG:String = "thumbDrag";
public static const THUMB_RELEASE:String = "thumbRelease";
public function SliderEvent(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:int=0){
_value = _arg2;
_keyCode = _arg5;
_triggerEvent = _arg4;
_clickTarget = _arg3;
super(_arg1);
}
public function get clickTarget():String{
return (_clickTarget);
}
override public function clone():Event{
return (new SliderEvent(type, _value, _clickTarget, _triggerEvent, _keyCode));
}
override public function toString():String{
return (formatToString("SliderEvent", "type", "value", "bubbles", "cancelable", "keyCode", "triggerEvent", "clickTarget"));
}
public function get triggerEvent():String{
return (_triggerEvent);
}
public function get value():Number{
return (_value);
}
public function get keyCode():Number{
return (_keyCode);
}
}
}//package fl.events
Section 34
//SliderEventClickTarget (fl.events.SliderEventClickTarget)
package fl.events {
public class SliderEventClickTarget {
public static const TRACK:String = "track";
public static const THUMB:String = "thumb";
}
}//package fl.events
Section 35
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.core.*;
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 36
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 37
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 38
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 39
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.text.*;
import flash.utils.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 40
//Color (fl.motion.Color)
package fl.motion {
import flash.display.*;
import flash.geom.*;
public class Color extends ColorTransform {
private var _tintMultiplier:Number;// = 0
private var _tintColor:Number;// = 0
public function Color(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){
_tintColor = 0;
_tintMultiplier = 0;
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
public function setTint(_arg1:uint, _arg2:Number):void{
var _local3:uint;
var _local4:uint;
var _local5:uint;
this._tintColor = _arg1;
this._tintMultiplier = _arg2;
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - _arg2)));
_local3 = ((_arg1 >> 16) & 0xFF);
_local4 = ((_arg1 >> 8) & 0xFF);
_local5 = (_arg1 & 0xFF);
this.redOffset = Math.round((_local3 * _arg2));
this.greenOffset = Math.round((_local4 * _arg2));
this.blueOffset = Math.round((_local5 * _arg2));
}
public function set tintColor(_arg1:uint):void{
this.setTint(_arg1, this.tintMultiplier);
}
public function get brightness():Number{
return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1));
}
private function deriveTintColor():uint{
var _local1:Number;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
_local1 = (1 / this.tintMultiplier);
_local2 = Math.round((this.redOffset * _local1));
_local3 = Math.round((this.greenOffset * _local1));
_local4 = Math.round((this.blueOffset * _local1));
_local5 = (((_local2 << 16) | (_local3 << 8)) | _local4);
return (_local5);
}
public function get tintMultiplier():Number{
return (this._tintMultiplier);
}
public function get tintColor():uint{
return (this._tintColor);
}
public function set brightness(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < -1){
_arg1 = -1;
};
};
_local2 = (1 - Math.abs(_arg1));
_local3 = 0;
if (_arg1 > 0){
_local3 = (_arg1 * 0xFF);
};
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = _local2));
this.redOffset = (this.greenOffset = (this.blueOffset = _local3));
}
public function set tintMultiplier(_arg1:Number):void{
this.setTint(this.tintColor, _arg1);
}
private function parseXML(_arg1:XML=null):Color{
var _local2:XML;
var _local3:XML;
var _local4:String;
var _local5:uint;
if (!_arg1){
return (this);
};
_local2 = _arg1.elements()[0];
if (!_local2){
return (this);
};
for each (_local3 in _local2.attributes()) {
_local4 = _local3.localName();
if (_local4 == "tintColor"){
_local5 = (Number(_local3.toString()) as uint);
this.tintColor = _local5;
} else {
this[_local4] = Number(_local3.toString());
};
};
return (this);
}
public static function interpolateColor(_arg1:uint, _arg2:uint, _arg3:Number):uint{
var _local4:Number;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:uint;
var _local16:uint;
var _local17:uint;
_local4 = (1 - _arg3);
_local5 = ((_arg1 >> 24) & 0xFF);
_local6 = ((_arg1 >> 16) & 0xFF);
_local7 = ((_arg1 >> 8) & 0xFF);
_local8 = (_arg1 & 0xFF);
_local9 = ((_arg2 >> 24) & 0xFF);
_local10 = ((_arg2 >> 16) & 0xFF);
_local11 = ((_arg2 >> 8) & 0xFF);
_local12 = (_arg2 & 0xFF);
_local13 = ((_local5 * _local4) + (_local9 * _arg3));
_local14 = ((_local6 * _local4) + (_local10 * _arg3));
_local15 = ((_local7 * _local4) + (_local11 * _arg3));
_local16 = ((_local8 * _local4) + (_local12 * _arg3));
_local17 = ((((_local13 << 24) | (_local14 << 16)) | (_local15 << 8)) | _local16);
return (_local17);
}
public static function interpolateTransform(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{
var _local4:Number;
var _local5:ColorTransform;
_local4 = (1 - _arg3);
_local5 = new ColorTransform(((_arg1.redMultiplier * _local4) + (_arg2.redMultiplier * _arg3)), ((_arg1.greenMultiplier * _local4) + (_arg2.greenMultiplier * _arg3)), ((_arg1.blueMultiplier * _local4) + (_arg2.blueMultiplier * _arg3)), ((_arg1.alphaMultiplier * _local4) + (_arg2.alphaMultiplier * _arg3)), ((_arg1.redOffset * _local4) + (_arg2.redOffset * _arg3)), ((_arg1.greenOffset * _local4) + (_arg2.greenOffset * _arg3)), ((_arg1.blueOffset * _local4) + (_arg2.blueOffset * _arg3)), ((_arg1.alphaOffset * _local4) + (_arg2.alphaOffset * _arg3)));
return (_local5);
}
public static function fromXML(_arg1:XML):Color{
return (Color(new (Color).parseXML(_arg1)));
}
}
}//package fl.motion
Section 41
//ag_intro_mc_10 (TentaDrillGame9_fla.ag_intro_mc_10)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class ag_intro_mc_10 extends MovieClip {
public function ag_intro_mc_10(){
addFrameScript(0, frame1, 160, frame161);
}
function frame161(){
MovieClip(parent).gotoFrame("TITLE");
stop();
}
function frame1(){
MovieClip(parent).stop();
gotoAndPlay(2);
}
}
}//package TentaDrillGame9_fla
Section 42
//BG_SeaNim_17 (TentaDrillGame9_fla.BG_SeaNim_17)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class BG_SeaNim_17 extends MovieClip {
public function BG_SeaNim_17(){
addFrameScript(0, frame1, 59, frame60);
}
function frame1(){
gotoAndPlay((Math.round((Math.random() * 55)) + 1));
}
function frame60(){
gotoAndPlay(2);
}
}
}//package TentaDrillGame9_fla
Section 43
//BGGrid_143 (TentaDrillGame9_fla.BGGrid_143)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class BGGrid_143 extends MovieClip {
public var BGCOL:MovieClip;
}
}//package TentaDrillGame9_fla
Section 44
//BGGrid_Menu_13 (TentaDrillGame9_fla.BGGrid_Menu_13)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class BGGrid_Menu_13 extends MovieClip {
public var _targetCont:BitmapData;
public var arenaHeight:int;
public var water_colourTransform:ColorTransform;
public var water_defData:BitmapData;
public var water_fullRect:Rectangle;
public var water_source:DisplayObject;
public var BG:MovieClip;
public var water_origin:Point;
public var water_drawRect:Rectangle;
public var water_scaleInv:Number;
public var minuteTimer:Timer;
public var trans_m:Matrix;
public var bmpScaler:Number;
public var water_filter:DisplacementMapFilter;
public var _target:Bitmap;
public var water_buffer1:BitmapData;
public var water_buffer2:BitmapData;
public var water_expandFilter:ConvolutionFilter;
public var _targetContT:BitmapData;
public var water_matrix:Matrix;
public var arenaWidth:int;
public function BGGrid_Menu_13(){
addFrameScript(0, frame1);
}
public function updateRippler(){
var _local1:BitmapData;
_local1 = water_buffer2.clone();
water_buffer2.applyFilter(water_buffer1, water_fullRect, water_origin, water_expandFilter);
water_buffer2.draw(_local1, null, null, BlendMode.SUBTRACT, null, false);
water_defData.draw(water_buffer2, water_matrix, water_colourTransform, null, null, true);
water_filter.mapBitmap = water_defData;
water_source.filters = [water_filter];
_local1.dispose();
switchBuffers();
}
public function convertSceneToBitmap(){
BG.alpha = 1;
_target.scaleX = bmpScaler;
_target.scaleY = bmpScaler;
_targetCont = new BitmapData((arenaWidth / bmpScaler), (arenaHeight / bmpScaler), true, 0x333333);
_targetCont.draw(BG, trans_m, null, null);
_target.bitmapData = _targetCont;
BG.alpha = 0;
}
public function switchBuffers():void{
var _local1:BitmapData;
_local1 = water_buffer1;
water_buffer1 = water_buffer2;
water_buffer2 = _local1;
}
function frame1(){
arenaWidth = 600;
arenaHeight = 350;
bmpScaler = 1.5;
trans_m = new Matrix();
water_origin = new Point();
_targetContT = new BitmapData(arenaWidth, arenaHeight, true, 0x333333);
_target = new Bitmap(_targetContT);
addChild(_target);
newRippler(_target, 60, 6);
convertSceneToBitmap();
addEventListener(MouseEvent.MOUSE_MOVE, BGEF);
addEventListener(MouseEvent.MOUSE_DOWN, BGEC);
minuteTimer = new Timer(20);
minuteTimer.addEventListener(TimerEvent.TIMER, REF);
minuteTimer.start();
_targetCont = new BitmapData((arenaWidth / bmpScaler), (arenaHeight / bmpScaler), true, 0x333333);
BG.BG.scaleX = (1 / bmpScaler);
BG.BG.scaleY = (1 / bmpScaler);
}
public function newRippler(_arg1:DisplayObject, _arg2:Number, _arg3:Number=2){
var _local4:Number;
var _local5:Number;
water_source = _arg1;
water_scaleInv = (1 / _arg3);
water_buffer1 = new BitmapData((_arg1.width * water_scaleInv), (_arg1.height * water_scaleInv), false, 0);
water_buffer2 = new BitmapData(water_buffer1.width, water_buffer1.height, false, 0);
water_defData = new BitmapData(_arg1.width, _arg1.height, false, 0x7F7F7F);
_local4 = (water_defData.width / water_buffer1.width);
_local5 = (water_defData.height / water_buffer1.height);
water_fullRect = new Rectangle(0, 0, water_buffer1.width, water_buffer1.height);
water_drawRect = new Rectangle();
water_filter = new DisplacementMapFilter(water_defData, water_origin, BitmapDataChannel.BLUE, BitmapDataChannel.BLUE, _arg2, _arg2, "wrap");
water_source.filters = [water_filter];
water_expandFilter = new ConvolutionFilter(3, 3, [0.5, 1, 0.5, 1, 0, 1, 0.5, 1, 0.5], 3);
water_colourTransform = new ColorTransform(1, 1, 1, 1, 127, 127, 127);
water_matrix = new Matrix(_local4, 0, 0, _local5);
}
public function BGEF(_arg1){
drawRipple(mouseX, mouseY, ((Math.random() * 10) + 5), 1);
}
public function REF(_arg1){
updateRippler();
convertSceneToBitmap();
}
public function drawRipple(_arg1:int, _arg2:int, _arg3:int, _arg4:Number):void{
var _local5:int;
var _local6:int;
_local5 = (_arg3 >> 1);
_local6 = (((_arg4 * 0xFF) & 0xFF) * _arg4);
water_drawRect.x = ((-(_local5) + _arg1) * water_scaleInv);
water_drawRect.y = ((-(_local5) + _arg2) * water_scaleInv);
water_drawRect.width = (water_drawRect.height = (_arg3 * water_scaleInv));
water_buffer1.fillRect(water_drawRect, _local6);
}
public function BGEC(_arg1){
drawRipple(mouseX, mouseY, 60, 1);
}
public function destroyBG(){
minuteTimer.removeEventListener(TimerEvent.TIMER, REF);
minuteTimer = null;
removeEventListener(MouseEvent.MOUSE_MOVE, BGEF);
removeEventListener(MouseEvent.MOUSE_DOWN, BGEC);
destroyRipple();
_targetCont.dispose();
_targetContT.dispose();
_targetCont = null;
_targetContT = null;
removeChild(_target);
_target = null;
}
public function destroyRipple():void{
water_buffer1.dispose();
water_buffer2.dispose();
water_defData.dispose();
}
public function getRippleImage():BitmapData{
return (water_defData);
}
}
}//package TentaDrillGame9_fla
Section 45
//Boss1_Spike_full_309 (TentaDrillGame9_fla.Boss1_Spike_full_309)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class Boss1_Spike_full_309 extends MovieClip {
public function Boss1_Spike_full_309(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TentaDrillGame9_fla
Section 46
//Boss1Claw_Whole_298 (TentaDrillGame9_fla.Boss1Claw_Whole_298)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class Boss1Claw_Whole_298 extends MovieClip {
public function Boss1Claw_Whole_298(){
addFrameScript(0, frame1, 176, frame177);
}
function frame177(){
stop();
}
function frame1(){
stop();
}
}
}//package TentaDrillGame9_fla
Section 47
//Boss1Eye_321 (TentaDrillGame9_fla.Boss1Eye_321)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class Boss1Eye_321 extends MovieClip {
public var skipFrame:int;
public function Boss1Eye_321(){
addFrameScript(24, frame25);
}
function frame25(){
skipFrame = (Math.round((Math.random() * 80)) + 25);
this.gotoAndPlay(skipFrame);
}
}
}//package TentaDrillGame9_fla
Section 48
//Boss1EyeHit_324 (TentaDrillGame9_fla.Boss1EyeHit_324)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class Boss1EyeHit_324 extends MovieClip {
public function Boss1EyeHit_324(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TentaDrillGame9_fla
Section 49
//boss1flagwhole_304 (TentaDrillGame9_fla.boss1flagwhole_304)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class boss1flagwhole_304 extends MovieClip {
public function boss1flagwhole_304(){
addFrameScript(0, frame1, 39, frame40);
}
function frame1(){
stop();
}
function frame40(){
gotoAndPlay(2);
}
}
}//package TentaDrillGame9_fla
Section 50
//BOss1MainBody_316 (TentaDrillGame9_fla.BOss1MainBody_316)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class BOss1MainBody_316 extends MovieClip {
public var hit:MovieClip;
}
}//package TentaDrillGame9_fla
Section 51
//Boss2_deathbeam_326 (TentaDrillGame9_fla.Boss2_deathbeam_326)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class Boss2_deathbeam_326 extends MovieClip {
public function Boss2_deathbeam_326(){
addFrameScript(0, frame1);
}
function frame1(){
scaleX = 0;
scaleY = 0;
}
}
}//package TentaDrillGame9_fla
Section 52
//Cursor_154 (TentaDrillGame9_fla.Cursor_154)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class Cursor_154 extends MovieClip {
public function Cursor_154(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TentaDrillGame9_fla
Section 53
//DummyMusic_26 (TentaDrillGame9_fla.DummyMusic_26)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class DummyMusic_26 extends MovieClip {
public function DummyMusic_26(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TentaDrillGame9_fla
Section 54
//GAME_ENGINE_142 (TentaDrillGame9_fla.GAME_ENGINE_142)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class GAME_ENGINE_142 extends MovieClip {
public var terrainArray:Array;
public var shootPower:int;
public var bossHealth:Number;
public var BA:Array;
public var cursorPause:Boolean;
public var water_source:DisplayObject;
public var BG:MovieClip;
public var bossType:int;
public var SPAWNL:MovieClip;
public var agility;
public var BA_E:Array;
public var BA_T:Array;
public var levelStarted:Boolean;
public var ShA:Array;
public var water_scaleInv:Number;
public var bossHealthMax:Number;
public var bossStateTimer:int;
public var BedBG1:MovieClip;
public var BedBG2:MovieClip;
public var BedBG3:MovieClip;
public var trans_m:Matrix;
public var EA:Array;
public var water_buffer1:BitmapData;
public var pauseSwitch:Boolean;
public var water_buffer2:BitmapData;
public var HUD:MovieClip;
public var drillPoint0:Point;
public var drillPoint1:Point;
public var drillPoint2:Point;
public var water_expandFilter:ConvolutionFilter;
public var bossActive:Boolean;
public var bossSpeed:Point;
public var lives:int;
public var stageExpPrev:int;
public var bossState:int;
public var gameFreeze:Boolean;
public var deathTimer:int;
public var levelArray:Array;
public var TENTPAY:Array;
public var levelOffset:Number;
public var TENTPAX:Array;
public var BUBBLES:MovieClip;
public var CAMERA_SHAKE:Point;
public var EA_B:Array;
public var EA_H:Array;
public var drillPower:int;
public var shotSpeed:int;
public var EA_C:Array;
public var deathTimerSet:int;
public var keyPressed_SHOOT:Boolean;
public var keyPressed_DRILL:Boolean;
public var invTimer;
public var pauseBuffer:Boolean;
public var drillReload:Boolean;
public var hudPot:int;
public var invTimerSet;
public var PA:Array;
public var keyPressed_LEFT:Boolean;
public var expMax:int;
public var exp:int;
public var water_defData:BitmapData;
public var RA:Array;
public var stageExp:int;
public var levelSpeedSet:Number;
public var SA:Array;
public var bmpScaler:Number;
public var shotCharge:Number;
public var tentSpeed:Point;
public var _targetContT:BitmapData;
public var keyPressed_DOWN:Boolean;
public var NOTES:MovieClip;
public var stageExpMax:int;
public var _target:Bitmap;
public var levelEnd:Boolean;
public var WaveBG1:MovieClip;
public var evolveActive:Boolean;
public var _keys:Array;
public var arenaWidth:int;
public var arenaHeight:int;
public var evolveSwitch:Boolean;
public var TERRAIN:MovieClip;
public var levelSpeed:Number;
public var CAMERA:Point;
public var tentLast:Point;
public var water_fullRect:Rectangle;
public var bossRot:Number;
public var triShot;
public var drillActive:Boolean;
public var water_origin:Point;
public var CURSOR:MovieClip;
public var SPAWN:MovieClip;
public var ENEMY:MovieClip;
public var keyPressed_PAUSE:Boolean;
public var boss:MovieClip;
public var drillSwitch:Boolean;
public var water_drawRect:Rectangle;
public var keyPressed_RIGHT:Boolean;
public var level:Number;
public var evolveFlip:Boolean;
public var BULLETS:MovieClip;
public var bossHitActive:Boolean;
public var keyPressed_UP:Boolean;
public var spawnArray:Array;
public var water_filter:DisplacementMapFilter;
public var bossPos:Point;
public var drillLen;
public var mousePressed:Boolean;
public var gamePaused:Boolean;
public var TERRAINL:MovieClip;
public var water_colourTransform:ColorTransform;
public var shotCharger:Number;
public var water_matrix:Matrix;
public var TENT:MovieClip;
public function GAME_ENGINE_142(){
addFrameScript(0, frame1);
}
public function handleKeyUp(_arg1:KeyboardEvent):void{
var _local2:int;
_local2 = _keys.indexOf(_arg1.keyCode);
if (_local2 > -1){
_keys.splice(_local2, 1);
};
}
public function drillPointCheck(){
var _local1:int;
var _local2:Point;
var _local3:Point;
var _local4:int;
var _local5:MovieClip;
if ((((drillSwitch == false)) && ((TENT.Head.x > 60)))){
drillPoint0 = rotatedXY((TENT.Head.x - 25), 0, TENT);
drillPoint1 = rotatedXY((TENT.Head.x - 50), 0, TENT);
drillPoint2 = rotatedXY((TENT.Head.x - 75), 0, TENT);
_local1 = 0;
while (_local1 < 3) {
_local2 = this[("drillPoint" + _local1)];
if (TENT.Head.x > 60){
_local3 = new Point(CURSOR.x, CURSOR.y);
CURSOR.x = _local2.x;
CURSOR.y = _local2.y;
CURSOR.scaleX = 0.3;
CURSOR.scaleY = 0.3;
_local4 = 0;
while (_local4 < terrainArray.length) {
_local5 = terrainArray[_local4];
if (_local5.hitTestObject(CURSOR)){
drillReload = true;
if (_local5.rockType < drillPower){
drawRipple((_local5.x + TERRAIN.x), (_local5.y + y), 6, 1);
addExperience(5, _local5.x, _local5.y);
newRocks((_local5.x + TERRAIN.x), _local5.y, 3, 0.5, _local5.rockType);
_local5.y = (_local5.y - 1000);
};
};
_local4++;
};
CURSOR.scaleX = 1;
CURSOR.scaleY = 1;
CURSOR.x = _local3.x;
CURSOR.y = _local3.y;
};
_local1++;
};
};
}
public function rand(_arg1:int, _arg2:int){
return (Math.round(((Math.random() * _arg2) + _arg1)));
}
public function pythagPoint(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int){
var _local6:Point;
var _local7:Point;
_local6 = new Point(_arg1, _arg3);
_local7 = new Point(_arg1, _arg3);
return (pythag(_local6, _local7, _arg5));
}
public function handleKeyDown(_arg1:KeyboardEvent):void{
if (_keys.indexOf(_arg1.keyCode) == -1){
_keys.push(_arg1.keyCode);
};
}
function frame1(){
BG.BGCOL.gotoAndStop((MovieClip(root).activeLevel + 1));
drillLen = 1;
agility = 1;
triShot = false;
levelArray = new Array(2, 1);
lives = 3;
if ((MovieClip(root).activeLevel + 1) == 1){
MovieClip(root).playGameMusic(2);
SPAWN = new LS1();
TERRAIN = new LT1();
} else {
if ((MovieClip(root).activeLevel + 1) == 2){
MovieClip(root).playGameMusic(2);
SPAWN = new LS2();
TERRAIN = new LT2();
} else {
if ((MovieClip(root).activeLevel + 1) == 3){
lives = 2;
MovieClip(root).playGameMusic(1);
SPAWN = new LS3();
TERRAIN = new LT3();
} else {
if ((MovieClip(root).activeLevel + 1) == 4){
MovieClip(root).playGameMusic(2);
SPAWN = new LS4();
TERRAIN = new LT4();
} else {
if ((MovieClip(root).activeLevel + 1) == 5){
MovieClip(root).playGameMusic(2);
SPAWN = new LS5();
TERRAIN = new LT5();
} else {
if ((MovieClip(root).activeLevel + 1) == 6){
lives = 2;
MovieClip(root).playGameMusic(1);
SPAWN = new LS6();
TERRAIN = new LT6();
} else {
if ((MovieClip(root).activeLevel + 1) == 7){
MovieClip(root).playGameMusic(2);
SPAWN = new LS7();
TERRAIN = new LT7();
} else {
if ((MovieClip(root).activeLevel + 1) == 8){
MovieClip(root).playGameMusic(2);
SPAWN = new LS8();
TERRAIN = new LT8();
} else {
if ((MovieClip(root).activeLevel + 1) == 9){
lives = 2;
MovieClip(root).playGameMusic(1);
SPAWN = new LS9();
TERRAIN = new LT9();
};
};
};
};
};
};
};
};
};
TERRAINL.addChild(TERRAIN);
SPAWNL.addChild(SPAWN);
NOTES.gotoAndStop((MovieClip(root).activeLevel + 1));
level = MovieClip(root).savefile.data.tentLevel;
if ((((level > 0)) && ((level < 10)))){
} else {
level = 9;
};
shootPower = 0;
drillPower = 0;
setEvolveState(level);
exp = MovieClip(root).savefile.data.tentExp;
expMax = MovieClip(root).expMaxArray[level];
hudPot = 0;
stageExp = 0;
stageExpPrev = MovieClip(root).savefile.data.medalsT[MovieClip(root).activeLevel];
stageExpMax = 1000;
if (lives == 2){
stageExpPrev = 0;
stageExpMax = 0;
};
SPAWN.visible = false;
BA_T = new Array();
BA_E = new Array();
RA = new Array();
BA = new Array();
SA = new Array();
PA = new Array();
ShA = new Array();
EA_B = new Array();
EA_H = new Array();
EA_C = new Array();
invTimer = 0;
invTimerSet = 90;
deathTimerSet = 110;
deathTimer = 0;
shotSpeed = 0;
shotCharge = 0;
shotCharger = 0;
levelOffset = 0;
levelSpeedSet = 4;
levelSpeed = 0;
CAMERA_SHAKE = new Point(1, 1.1);
cursorPause = false;
levelEnd = false;
_keys = new Array();
stage.addEventListener(KeyboardEvent.KEY_DOWN, this.handleKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, this.handleKeyUp);
CAMERA = new Point(TENT.x, TENT.y);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.addEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
stage.addEventListener(MouseEvent.MOUSE_UP, MouseUp);
mousePressed = false;
spawnArray = new Array();
terrainArray = new Array();
organiseLevel();
levelStarted = false;
tentSpeed = new Point();
tentLast = new Point();
drillSwitch = false;
drillActive = false;
drillReload = false;
pauseSwitch = false;
evolveActive = false;
evolveSwitch = false;
gameFreeze = false;
evolveFlip = false;
TENTPAX = new Array(20, -20, 0, 0);
TENTPAY = new Array(0, 0, -20, -20);
EA = new Array(EA_B, EA_C, EA_H);
keyPressed_UP = false;
keyPressed_DOWN = false;
keyPressed_LEFT = false;
keyPressed_RIGHT = false;
keyPressed_SHOOT = false;
keyPressed_DRILL = false;
keyPressed_PAUSE = false;
pauseBuffer = false;
gamePaused = false;
arenaWidth = 650;
arenaHeight = 350;
bmpScaler = MovieClip(root).ripplesComplexity;
trans_m = new Matrix();
trans_m.scale((1 / bmpScaler), (1 / bmpScaler));
water_origin = new Point();
_targetContT = new BitmapData(arenaWidth, arenaHeight, true, 0x333333);
_target = new Bitmap(_targetContT);
MovieClip(parent.parent).BG.addChild(_target);
newRippler(_target, 60, 6);
bossActive = false;
HUD = MovieClip(root).HUD;
HUD.prevBar.scaleX = (stageExpPrev / stageExpMax);
bossType = 0;
bossPos = new Point(0, 0);
bossState = 0;
bossStateTimer = 100;
bossHitActive = false;
bossHealth = 100;
bossHealthMax = 100;
HUD.bossBar.visible = false;
}
public function updateBubbles(){
var _local1:int;
_local1 = 0;
while (_local1 < BA.length) {
BA[_local1].scaleX = (BA[_local1].scaleX - 0.04);
BA[_local1].scaleY = BA[_local1].scaleX;
BA[_local1].x = (BA[_local1].x + BA[_local1].speed.x);
BA[_local1].y = (BA[_local1].y + (BA[_local1].speed.y / 2));
BA[_local1].speed.y--;
BA[_local1].speed.x = (BA[_local1].speed.x / 1.1);
if (BA[_local1].scaleX < 0.05){
BUBBLES.removeChild(BA[_local1]);
delete BA[_local1];
BA.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function newShell(_arg1:int, _arg2:int){
var _local3:MovieClip;
_local3 = new Seashell();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.hit = false;
BUBBLES.addChild(_local3);
ShA.push(_local3);
return (_local3);
}
public function HUDControl(){
var _local1:int;
if (lives > 5){
HUD.MultiLife.lifeText.text = lives;
HUD.MultiLife.visible = true;
} else {
HUD.MultiLife.visible = false;
_local1 = 0;
while (_local1 < 5) {
HUD[("H" + _local1)].visible = false;
_local1++;
};
_local1 = 0;
while (_local1 < lives) {
HUD[("H" + _local1)].visible = true;
_local1++;
};
};
if (hudPot > 0){
hudPot = (hudPot - level);
exp = (exp + level);
if (hudPot < 0){
exp = (exp + hudPot);
};
};
if (exp > expMax){
exp = (exp - expMax);
evolve();
expMax = (expMax + (10 * level));
};
HUD.expBar.scaleX = ((exp / expMax) * 2);
HUD.XPLEVEL.text = (level + " /8");
HUD.stageBar.scaleX = (stageExp / stageExpMax);
}
public function drawRipple(_arg1:int, _arg2:int, _arg3:int, _arg4:Number):void{
var _local5:int;
var _local6:int;
_local5 = (_arg3 >> 1);
_local6 = (((_arg4 * 0xFF) & 0xFF) * _arg4);
water_drawRect.x = ((-(_local5) + _arg1) * water_scaleInv);
water_drawRect.y = ((-(_local5) + _arg2) * water_scaleInv);
water_drawRect.width = (water_drawRect.height = (_arg3 * water_scaleInv));
water_buffer1.fillRect(water_drawRect, _local6);
}
public function onEnterFrame(_arg1:Event){
var _local2:int;
var _local3:int;
var _local4:Point;
keyPressed_PAUSE = isKeyPressed(32);
if ((((keyPressed_PAUSE == true)) && ((pauseSwitch == false)))){
pauseSwitch = true;
if (gamePaused == true){
HUD.PAUSE.y = 10000;
gamePaused = false;
} else {
HUD.PAUSE.y = -160;
gamePaused = true;
};
} else {
if (keyPressed_PAUSE == false){
pauseSwitch = false;
};
};
if (gamePaused == true){
if (isKeyPressed(81)){
HUD.PAUSE.y = 10000;
lives = 1;
gamePaused = false;
hitTent(TENT.x, TENT.y, 100);
};
};
if (gamePaused == false){
levelStarted = true;
updateEvolve();
HUDControl();
spawnControl();
checkKeys();
if (levelEnd == true){
if (lives > 0){
if (rand(0, 3) == 1){
drawRipple(rand(0, 600), rand(0, 300), rand(6, 10), 1);
};
MovieClip(root).savefile.data.medals[MovieClip(root).activeLevel] = true;
if (bossActive == false){
MovieClip(root).savefile.data.tentLevel = level;
MovieClip(root).savefile.data.tentExp = exp;
if ((((MovieClip(root).savefile.data.medalsT[MovieClip(root).activeLevel] == undefined)) || ((stageExp > MovieClip(root).savefile.data.medalsT[MovieClip(root).activeLevel])))){
MovieClip(root).savefile.data.medalsT[MovieClip(root).activeLevel] = stageExp;
};
};
};
TENT.x = (TENT.x + tentSpeed.x);
tentSpeed.x = (tentSpeed.x + 0.5);
TENT.rotation = (TENT.rotation / 1.1);
BULLETS.alpha = (BULLETS.alpha / 1.1);
ENEMY.alpha = (ENEMY.alpha / 1.1);
CURSOR.alpha = (CURSOR.alpha / 1.2);
updateBubbles();
gameFreeze = true;
};
if (gameFreeze == false){
TENT.scaleX = (TENT.scaleX + ((1 - TENT.scaleX) / 10));
TENT.scaleY = (TENT.scaleY + ((1 - TENT.scaleY) / 10));
if (TENT.Head.scaleY > 1){
TENT.Head.scaleY = (TENT.Head.scaleY - 0.2);
};
TENT.rotation = (angle(TENT.x, TENT.y, CURSOR.x, CURSOR.y) - 90);
TENT.rotation = (TENT.rotation / 1.1);
tentSpeed.x = (((CURSOR.x - TENT.x) - 200) / (10 / agility));
tentSpeed.y = ((CURSOR.y - TENT.y) / (20 / agility));
TENT.y = (TENT.y + tentSpeed.y);
CAMERA.y = TENT.y;
if (CAMERA.y > 300){
CAMERA.y = 300;
TENT.y = (TENT.y + ((300 - TENT.y) / 30));
} else {
if (CAMERA.y < 0){
CAMERA.y = 0;
TENT.y = (TENT.y / 1.025);
};
};
attackControl();
levelSpeed = (levelSpeed + ((levelSpeedSet - levelSpeed) / 20));
TENT.x = (TENT.x + tentSpeed.x);
y = (y - ((((CAMERA.y + y) - 150) + CAMERA_SHAKE.x) / 5));
deathTimer--;
if ((((deathTimer > 0)) && (!((deathTimer == (deathTimerSet - 1)))))){
if (bossActive == false){
if (deathTimer < Math.round((32 + ((600 - TENT.x) / 35)))){
TERRAIN.x = (TERRAIN.x + deathTimer);
SPAWN.x = (SPAWN.x + deathTimer);
NOTES.x = (NOTES.x + deathTimer);
_local2 = 0;
while (_local2 < EA.length) {
_local3 = 0;
while (_local3 < EA[_local2].length) {
EA[_local2][_local3].x = (EA[_local2][_local3].x + deathTimer);
_local3++;
};
_local2++;
};
_local2 = 0;
while (_local2 < PA.length) {
PA[_local2].x = (PA[_local2].x + deathTimer);
_local2++;
};
_local2 = 0;
while (_local2 < BA_T.length) {
BA_T[_local2].x = (BA_T[_local2].x + deathTimer);
_local2++;
};
_local2 = 0;
while (_local2 < ShA.length) {
ShA[_local2].x = (ShA[_local2].x + deathTimer);
_local2++;
};
layerScrollGroup(-(deathTimer));
} else {
levelSpeed = 0;
};
};
if (deathTimer == 1){
tentSpeed = new Point(0, 0);
TENT.visible = true;
TENT.x = 150;
TENT.scaleY = 0;
TENT.scaleX = 0;
CURSOR.x = (TENT.x + 200);
CURSOR.y = TENT.y;
TENT.rotation = 0;
invTimer = invTimerSet;
CURSOR.visible = true;
drawRipple(TENT.x, (TENT.y + y), 10, 3);
} else {
CURSOR.x = (TENT.x + 200);
CURSOR.y = TENT.y;
TENT.visible = false;
CURSOR.visible = false;
};
} else {
TERRAIN.x = (TERRAIN.x - levelSpeed);
SPAWN.x = (SPAWN.x - levelSpeed);
NOTES.x = (NOTES.x - levelSpeed);
if (invTimer > 0){
invTimer--;
if (invTimer == 0){
TENT.alpha = 1;
} else {
TENT.alpha = (TENT.alpha * -1);
};
};
if (rand(0, 1) == 0){
_local4 = rotatedXY(-50, 0, TENT);
newBubble(_local4.x, _local4.y, new Point(-5, -(rand(0, 5))), 1);
if (keyPressed_RIGHT){
drawRipple((_local4.x - 20), (_local4.y + y), 10, 0.8);
} else {
drawRipple((_local4.x - 20), (_local4.y + y), 10, 0.5);
};
};
updateCursor();
updatePowerRings();
updateTentBullet();
updateEnemy_Bomber();
updateEnemy_Chomper();
updateEnemy_Hooker();
updateShells();
layerScrollGroup(levelSpeed);
terrainCheck();
};
updateBoss();
updateRocks();
updateShockwaves();
updateBubbles();
updateShake();
updateEnemyBullet();
};
convertSceneToBitmap();
updateRippler();
if (TENT.x > 7000){
if (lives == 0){
MovieClip(root).activeLevel--;
};
MovieClip(root).WHITEFADE.alpha = 1;
exitLevel();
};
};
}
public function spawnEnemy(_arg1:Number=0, _arg2:Number=0, _arg3:int=-1, _arg4:int=0){
var _local5:MovieClip;
if (_arg3 == 0){
_local5 = newPowerRing(_arg1, _arg2);
_local5.rotation = _arg4;
} else {
if (_arg3 == 1){
_local5 = newEnemy_Bomber(_arg1, _arg2);
} else {
if (_arg3 == 2){
_local5 = newEnemy_Chomper(_arg1, _arg2, _arg4);
} else {
if (_arg3 == 3){
_local5 = newEnemy_Hooker(_arg1, _arg2);
} else {
if (_arg3 == 5){
newBoss(1, _arg1, _arg2);
} else {
if (_arg3 == 6){
_local5 = newShell(_arg1, _arg2);
} else {
if (_arg3 == 7){
invTimer = 2;
newBoss(2, _arg1, _arg2);
} else {
if (_arg3 == 8){
invTimer = 2;
newBoss(3, _arg1, _arg2);
} else {
if (_arg3 == 9){
levelEnd = true;
};
};
};
};
};
};
};
};
};
}
public function angle(_arg1:int, _arg2:int, _arg3:int, _arg4:int){
return ((Math.round(((Math.atan2((_arg4 - _arg2), (_arg3 - _arg1)) / 3.141593) * 180)) + 90));
}
public function organiseLevel(){
var _local1:*;
_local1 = 0;
while (_local1 < terrainArray.length) {
terrainArray[_local1].rotation = rand(0, 360);
_local1++;
};
}
public function destroyAS3Key(){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, this.handleKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, this.handleKeyUp);
}
public function updateShockwaves(){
var _local1:int;
_local1 = 0;
while (_local1 < SA.length) {
SA[_local1].scaleX = (SA[_local1].scaleX * 1.2);
SA[_local1].scaleY = SA[_local1].scaleX;
SA[_local1].alpha = (SA[_local1].alpha - 0.1);
if (SA[_local1].alpha < 0){
BUBBLES.removeChild(SA[_local1]);
delete SA[_local1];
SA.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function newEnemyBullet(_arg1:int, _arg2:int, _arg3:int){
var _local4:MovieClip;
_local4 = new bullet_ENEMY();
_local4.x = _arg1;
_local4.y = _arg2;
_local4.rotation = _arg3;
_local4.lifeTimer = 100;
_local4.dead = false;
_local4.speed = calcSpeed(_arg3, 7);
BA_E.push(_local4);
BULLETS.addChild(_local4);
return (_local4);
}
public function addExperience(_arg1:int=0, _arg2:Number=0, _arg3:Number=0){
if (bossActive == false){
stageExp = (stageExp + _arg1);
if (stageExpPrev > 0){
stageExpPrev = (stageExpPrev - _arg1);
};
if (stageExpPrev < 0){
_arg1 = (_arg1 + stageExpPrev);
stageExpPrev = 0;
};
if (stageExpPrev == 0){
hudPot = (hudPot + _arg1);
};
};
}
public function exitLevel(){
var _local1:int;
var _local2:int;
TERRAINL.removeChild(TERRAIN);
SPAWNL.removeChild(SPAWN);
TERRAIN = null;
SPAWN = null;
destroyAS3Key();
_local1 = 0;
while (_local1 < EA.length) {
_local2 = 0;
while (_local2 < EA[_local1].length) {
ENEMY.removeChild(EA[_local1][_local2]);
delete EA[_local1][_local2];
_local2++;
};
_local1++;
};
_local1 = 0;
while (_local1 < PA.length) {
BUBBLES.removeChild(PA[_local1]);
delete PA[_local1];
_local1++;
};
_local1 = 0;
while (_local1 < RA.length) {
BUBBLES.removeChild(RA[_local1]);
delete RA[_local1];
_local1++;
};
_local1 = 0;
while (_local1 < ShA.length) {
BUBBLES.removeChild(ShA[_local1]);
delete ShA[_local1];
_local1++;
};
_local1 = 0;
while (_local1 < BA_T.length) {
BULLETS.removeChild(BA_T[_local1]);
delete BA_T[_local1];
_local1++;
};
_local1 = 0;
while (_local1 < BA_E.length) {
BULLETS.removeChild(BA_E[_local1]);
delete BA_E[_local1];
_local1++;
};
BA_T = new Array();
RA = new Array();
BA = new Array();
SA = new Array();
PA = new Array();
ShA = new Array();
EA_B = new Array();
EA_H = new Array();
EA_C = new Array();
EA = new Array();
spawnArray = new Array();
terrainArray = new Array();
destroyRipple();
HUD = null;
_targetContT.dispose();
MovieClip(parent.parent).BG.removeChild(_target);
_target = null;
_targetContT = null;
boss = null;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, MouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, MouseUp);
MovieClip(root).deleteEngine();
}
public function updateEnemy_Chomper(){
var _local1:int;
var _local2:Number;
var _local3:Number;
_local1 = 0;
while (_local1 < EA_C.length) {
if (EA_C[_local1].health > 0){
EA_C[_local1].x = (EA_C[_local1].x - levelSpeed);
if (EA_C[_local1].hit[0] > 0){
EA_C[_local1].health = (EA_C[_local1].health - EA_C[_local1].hit[0]);
EA_C[_local1].xSpeed = (EA_C[_local1].xSpeed + EA_C[_local1].hit[1]);
EA_C[_local1].ySpeed = (EA_C[_local1].ySpeed + EA_C[_local1].hit[2]);
EA_C[_local1].hit[0] = 0;
};
EA_C[_local1].alpha = (EA_C[_local1].alpha + ((1 - EA_C[_local1].alpha) / 10));
EA_C[_local1].x = (EA_C[_local1].x + EA_C[_local1].speed.x);
EA_C[_local1].y = (EA_C[_local1].y + EA_C[_local1].speed.y);
EA_C[_local1].speed.y = (EA_C[_local1].speed.y * 1.02);
if (EA_C[_local1].y > 340){
EA_C[_local1].y = 340;
EA_C[_local1].speed.y = (EA_C[_local1].speed.y * -0.3);
} else {
if (EA_C[_local1].y < (0 - 100)){
EA_C[_local1].y = (0 - 100);
EA_C[_local1].speed.y = (EA_C[_local1].speed.y * -0.3);
};
};
_local2 = (90 + calcAngle(EA_C[_local1].speed.x, EA_C[_local1].speed.y));
if (_local2 > 180){
_local2 = (_local2 - 360);
};
_local3 = EA_C[_local1].rotation;
if (_local3 > 180){
_local3 = (_local3 - 360);
};
EA_C[_local1].rotation = (EA_C[_local1].rotation + ((_local2 - _local3) / 10));
if (EA_C[_local1].x < (0 - 50)){
EA_C[_local1].x = -400;
EA_C[_local1].health = 0;
};
} else {
newExplosion(EA_C[_local1].x, EA_C[_local1].y, 40);
removeEnemy(_local1, EA_C);
_local1--;
};
_local1++;
};
}
public function newBoss(_arg1, _arg2, _arg3){
bossHealthMax = ((50 * _arg1) + 50);
bossHealth = bossHealthMax;
HUD.bossBar.visible = true;
levelSpeedSet = 0;
if (_arg1 == 1){
bossType = 1;
boss = new BOSS1();
} else {
if (_arg1 == 2){
bossType = 2;
boss = new boss2();
} else {
if (_arg1 == 3){
bossType = 3;
boss = new boss3();
boss.hit.x = (boss.hit.x - 10000);
};
};
};
boss.alpha = -1;
ENEMY.addChild(boss);
boss.x = _arg2;
boss.y = _arg3;
bossPos.x = boss.x;
bossActive = true;
}
public function convertSceneToBitmap(){
var _local1:BitmapData;
if (MovieClip(root).ripplesActive == true){
visible = true;
_target.scaleX = bmpScaler;
_target.scaleY = bmpScaler;
_local1 = new BitmapData((arenaWidth / bmpScaler), (arenaHeight / bmpScaler), true, 0x333333);
_local1.draw(MovieClip(parent), trans_m, null, null);
_target.bitmapData = _local1;
visible = false;
};
}
public function hitCheck(_arg1, _arg2){
return (_arg1.hitTestPoint(_arg2.x, (_arg2.y + y), true));
}
public function newEnemy_Bomber(_arg1:int, _arg2:int){
var _local3:MovieClip;
_local3 = new ENEMY_BOMBER();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.health = 1.5;
_local3.xSpeed = 0;
_local3.ySpeed = 0;
_local3.hit = new Array();
_local3.xp = 10;
_local3.splash = false;
_local3.expSize = 50;
ENEMY.addChild(_local3);
EA_B.push(_local3);
return (_local3);
}
public function updateEnemy_Hooker(){
var _local1:int;
_local1 = 0;
while (_local1 < EA_H.length) {
if (EA_H[_local1].health > 0){
EA_H[_local1].x = (EA_H[_local1].x - levelSpeed);
if (EA_H[_local1].hit[0] > 0){
EA_H[_local1].health = 0;
};
EA_H[_local1].alpha = (EA_H[_local1].alpha + ((1 - EA_H[_local1].alpha) / 10));
EA_H[_local1].x = (EA_H[_local1].x + EA_H[_local1].speed.x);
EA_H[_local1].y = (EA_H[_local1].y + EA_H[_local1].speed.y);
if (EA_H[_local1].x > (TENT.x + 50)){
EA_H[_local1].rotation = (angle((TENT.x + 50), TENT.y, EA_H[_local1].x, EA_H[_local1].y) + 90);
EA_H[_local1].speed = calcSpeed(EA_H[_local1].rotation, 5);
} else {
EA_H[_local1].rotation = (angle((TENT.x - 500), TENT.y, EA_H[_local1].x, EA_H[_local1].y) + 90);
EA_H[_local1].speed = calcSpeed(EA_H[_local1].rotation, 5);
};
if (EA_H[_local1].x < (0 - 50)){
EA_H[_local1].x = -400;
EA_H[_local1].health = 0;
};
} else {
newExplosion(EA_H[_local1].x, EA_H[_local1].y, 20);
removeEnemy(_local1, EA_H);
_local1--;
};
_local1++;
};
}
public function newExplosion(_arg1, _arg2, _arg3){
var _local4:Number;
var _local5:int;
if (_arg1 > 0){
_local4 = _arg3;
_local5 = 0;
while (_local5 < (_arg3 / 2)) {
newBubble(_arg1, _arg2, new Point((rand(0, _local4) - (_local4 / 3)), (rand(0, _local4) - (_local4 / 3))), (rand(50, 100) / 100));
_local5++;
};
};
}
public function spawnControl(){
var _local1:Number;
var _local2:int;
_local1 = 650;
_local2 = 0;
while (_local2 < spawnArray.length) {
if (spawnArray[_local2].x < (-(SPAWN.x) + _local1)){
if (spawnArray[_local2].enemyType != null){
spawnEnemy((spawnArray[_local2].x + SPAWN.x), spawnArray[_local2].y, spawnArray[_local2].enemyType, spawnArray[_local2].rotation);
};
spawnArray.splice(_local2, 1);
};
_local2++;
};
}
public function removeEnemy(_arg1, _arg2){
ENEMY.removeChild(_arg2[_arg1]);
delete _arg2[_arg1];
_arg2.splice(_arg1, 1);
}
public function evolve(){
HUD.EVOLVE.gotoAndStop(level);
level++;
setEvolveState(level);
gameFreeze = true;
evolveActive = true;
evolveFlip = true;
HUD.EVOLVE.scaleX = 0;
HUD.EVOLVE.scaleY = 0;
HUD.EVOLVE.y = -160;
HUD.EVOLVE.CONT.alpha = -5;
}
public function updateCursor(){
if (cursorPause == false){
if (keyPressed_UP){
CURSOR.y = (CURSOR.y - (15 * agility));
};
if (keyPressed_RIGHT){
CURSOR.x = (CURSOR.x + (15 * agility));
};
if (keyPressed_LEFT){
CURSOR.x = (CURSOR.x - (15 * agility));
};
if (keyPressed_DOWN){
CURSOR.y = (CURSOR.y + (15 * agility));
};
CURSOR.y = (CURSOR.y + ((TENT.y - CURSOR.y) / 20));
if (CURSOR.x < 250){
CURSOR.x = (CURSOR.x + ((250 - CURSOR.x) / 3));
};
if (CURSOR.x < 150){
CURSOR.x = 150;
} else {
if (CURSOR.x > 750){
CURSOR.x = 750;
};
};
if (CURSOR.y < (0 - 150)){
CURSOR.y = -150;
} else {
if (CURSOR.y > 400){
CURSOR.y = 400;
};
};
} else {
cursorPause = false;
};
}
public function updateTentBullet(){
var _local1:int;
var _local2:Boolean;
_local1 = 0;
while (_local1 < BA_T.length) {
if (BA_T[_local1].dead == false){
if ((((shootPower > 2)) && ((BA_T[_local1].power > 2)))){
} else {
if (hitCheck(TERRAIN, BA_T[_local1])){
BA_T[_local1].lifeTimer = -1;
};
};
BA_T[_local1].S1.rotation = (BA_T[_local1].S1.rotation + 20);
BA_T[_local1].S2.rotation = (BA_T[_local1].S2.rotation - 20);
if (rand(0, 3) == 1){
newBubble(BA_T[_local1].x, BA_T[_local1].y, new Point((-(levelSpeed) / 3), -(rand(0, 5))), (BA_T[_local1].scaleX / 2));
};
BA_T[_local1].scaleX = (BA_T[_local1].scaleX + (((1 + (BA_T[_local1].power / 10)) - BA_T[_local1].scaleY) / 5));
BA_T[_local1].scaleY = BA_T[_local1].scaleX;
BA_T[_local1].lifeTimer--;
BA_T[_local1].x = (BA_T[_local1].x + BA_T[_local1].speed.x);
BA_T[_local1].y = (BA_T[_local1].y + BA_T[_local1].speed.y);
drawRipple(BA_T[_local1].x, (BA_T[_local1].y + y), 5, 0.5);
if (BA_T[_local1].lifeTimer < 0){
setDead(BA_T[_local1], true);
};
_local2 = cycleEnemyHit(BA_T[_local1]);
if ((((BA_T[_local1].power < 3)) && ((shootPower < 3)))){
setDead(BA_T[_local1], _local2);
};
} else {
BULLETS.removeChild(BA_T[_local1]);
delete BA_T[_local1];
BA_T.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function newTentBullet(_arg1:int, _arg2:int, _arg3:int){
var _local4:int;
var _local5:Number;
var _local6:int;
var _local7:MovieClip;
var _local8:Number;
_local4 = 1;
_local5 = 0;
if ((((triShot == true)) && ((shotCharger < 3)))){
_local4 = 3;
_local5 = -20;
};
MovieClip(root).playSound("SHOOT");
TENT.Head.scaleY = 1.5;
_local6 = 0;
while (_local6 < _local4) {
_local7 = new bullet_TENT();
_local7.x = _arg1;
_local7.y = _arg2;
_local7.power = (1 + (shotCharger / 2));
if (shootPower > 2){
MovieClip(root).changeColour(_local7, 0, 1);
};
_local7.lifeTimer = 50;
_local7.scaleX = 0.1;
_local7.dead = false;
_local7.scaleY = _local7.scaleX;
_local7.rotation = _arg3;
_local8 = 0;
if (tentSpeed.x > 0){
_local8 = (tentSpeed.x / 2);
};
_local7.speed = calcSpeed((_arg3 + _local5), (15 + _local8));
_local5 = (_local5 + 20);
BA_T.push(_local7);
BULLETS.addChild(_local7);
_local6++;
};
}
public function isKeyPressed(_arg1:int):Boolean{
return ((_keys.indexOf(_arg1) > -1));
}
public function layerScrollGroup(_arg1){
layerScroll(BedBG1, (_arg1 / 2));
layerScroll(BedBG2, _arg1);
layerScroll(BedBG3, (_arg1 * 2));
layerScroll(WaveBG1, _arg1);
}
public function newEnemy_Chomper(_arg1:int, _arg2:int, _arg3:int){
var _local4:MovieClip;
_local4 = new ENEMY_CHOMPER();
_local4.x = _arg1;
_local4.y = _arg2;
_local4.health = 0.5;
_local4.xp = 8;
_local4.speed = calcSpeed((_arg3 + 180), 5);
_local4.xSpeed = 0;
_local4.ySpeed = 0;
_local4.hit = new Array();
_local4.expSize = 50;
ENEMY.addChild(_local4);
EA_C.push(_local4);
return (_local4);
}
public function attackControl(){
var _local1:Point;
if (((((keyPressed_DRILL) && ((drillSwitch == true)))) && ((drillPower > 0)))){
drillSwitch = false;
MovieClip(root).playSound("SMASH");
} else {
if (!keyPressed_DRILL){
drillSwitch = true;
drillReload = false;
};
};
TENT.graphics.clear();
TENT.graphics.lineStyle(4, 15782628, 1);
if ((((drillSwitch == false)) && ((drillReload == false)))){
TENT.Head.x = (TENT.Head.x + (((200 * drillLen) - TENT.Head.x) / 3));
TENT.graphics.moveTo((TENT.Head.x - 50), TENT.Head.y);
TENT.graphics.lineTo(0, 0);
if (TENT.Head.x > (190 * drillLen)){
drillReload = true;
};
} else {
TENT.Head.x = (TENT.Head.x + ((50 - TENT.Head.x) / 5));
TENT.graphics.moveTo((TENT.Head.x - 50), TENT.Head.y);
TENT.graphics.lineTo(0, 0);
};
drillPointCheck();
_local1 = rotatedXY(50, 0, TENT);
if ((((keyPressed_SHOOT == true)) && ((shootPower > 0)))){
if (shootPower > 1){
shotCharge = (shotCharge + 2);
};
if (shotCharge == 10){
MovieClip(root).playSound("CHARGE");
};
if (shotCharge < 25){
shotCharger = 0;
shotSpeed--;
if (shotSpeed <= 0){
shotSpeed = 8;
newTentBullet(_local1.x, _local1.y, TENT.rotation);
};
} else {
if (shotCharger < 30){
shotCharger = (shotCharger + 2);
if (shotCharger == 30){
MovieClip(root).setFlash(0.15);
};
};
};
} else {
if (shotCharger == 30){
MovieClip(root).setFlash(0.5);
newTentBullet(_local1.x, _local1.y, TENT.rotation);
} else {
if (shotCharger > 10){
shotCharger = 1;
newTentBullet(_local1.x, _local1.y, TENT.rotation);
};
};
if (shotCharger > 0){
shotCharger--;
};
shotSpeed = 0;
CURSOR.gotoAndStop(1);
shotCharge = 0;
};
CURSOR.gotoAndStop(Math.floor(shotCharger));
TENT.Head.gotoAndStop(Math.round(shotCharger));
}
public function cycleEnemyHit(_arg1){
var _local2:Number;
var _local3:Boolean;
var _local4:int;
var _local5:int;
_local2 = _arg1.power;
if (_local2 > 4){
_local2 = 4;
};
_local3 = false;
_local4 = 0;
while (_local4 < EA.length) {
_local5 = 0;
while (_local5 < EA[_local4].length) {
if (pythag(_arg1, EA[_local4][_local5], (_arg1.width * 1.4))){
newExplosion(EA[_local4][_local5].x, EA[_local4][_local5].y, 10);
EA[_local4][_local5].hit = [(_local2 / 2), _arg1.speed.x, _arg1.speed.y];
addExperience(EA[_local4][_local5].xp, _arg1.x, _arg1.y);
MovieClip(root).playSound("ENEMY");
newShockwave(EA[_local4][_local5].x, EA[_local4][_local5].y, (_arg1.power / 2));
EA[_local4][_local5].alpha = 0.5;
_local3 = true;
};
_local5++;
};
_local4++;
};
if (bossActive == true){
if (_arg1.hitTestObject(boss.hit)){
newExplosion(_arg1.x, _arg1.y, 10);
_local3 = true;
boss.hit.gotoAndPlay(2);
bossHealth = (bossHealth - _local2);
if (bossType == 3){
boss.alpha = (rand(3, 8) / 10);
};
};
};
return (_local3);
}
public function MouseUp(_arg1:Event){
mousePressed = false;
}
public function updateEnemyBullet(){
var _local1:int;
_local1 = 0;
while (_local1 < BA_E.length) {
if (BA_E[_local1].dead == false){
if (hitCheck(TERRAIN, BA_E[_local1])){
BA_E[_local1].lifeTimer = -1;
};
BA_E[_local1].lifeTimer--;
BA_E[_local1].x = (BA_E[_local1].x + BA_E[_local1].speed.x);
BA_E[_local1].y = (BA_E[_local1].y + BA_E[_local1].speed.y);
if (BA_E[_local1].lifeTimer < 0){
setDead(BA_E[_local1], true);
};
if (((pythag(BA_E[_local1], TENT, 15)) && ((deathTimer <= 0)))){
hitTent(TENT.x, TENT.y, 100);
setDead(BA_E[_local1], true);
};
} else {
BULLETS.removeChild(BA_E[_local1]);
delete BA_E[_local1];
BA_E.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function hitTent(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0){
var _local4:int;
var _local5:int;
_local4 = 0;
while (_local4 < EA.length) {
_local5 = 0;
while (_local5 < EA[_local4].length) {
if (pythag(TENT, EA[_local4][_local5], 40)){
EA[_local4][_local5].health = 0;
};
_local5++;
};
_local4++;
};
if (invTimer == 0){
MovieClip(root).playSound("ENEMY");
MovieClip(root).playSound("EXP");
MovieClip(root).setFlash(0.6);
shakeCam((_arg3 * 2), 2);
drawRipple(_arg1, (_arg2 + y), _arg3, (_arg3 / 8));
drawRipple(TENT.x, (TENT.y + y), 30, 4);
newExplosion(_arg1, _arg2, 80);
lives--;
if (lives == 0){
TENT.visible = false;
levelEnd = true;
deathTimer = 1000000;
} else {
deathTimer = deathTimerSet;
};
};
}
public function newBubble(_arg1:int, _arg2:int, _arg3:Point, _arg4:Number){
var _local5:MovieClip;
if ((((levelEnd == false)) && ((BA.length < 150)))){
_local5 = new Effect_Bubble();
_local5.x = ((_arg1 + rand(0, 20)) - 10);
_local5.y = ((_arg2 + rand(0, 20)) - 10);
_local5.speed = _arg3;
_local5.scaleX = (_arg4 + (rand(0, 5) / 100));
_local5.scaleY = _local5.scaleX;
_local5.alpha = 0.5;
BUBBLES.addChild(_local5);
BA.push(_local5);
return (_local5);
};
}
public function switchBuffers():void{
var _local1:BitmapData;
_local1 = water_buffer1;
water_buffer1 = water_buffer2;
water_buffer2 = _local1;
}
public function updateRocks(){
var _local1:int;
_local1 = 0;
while (_local1 < RA.length) {
RA[_local1].x = (RA[_local1].x + RA[_local1].speed.x);
RA[_local1].y = (RA[_local1].y + RA[_local1].speed.y);
RA[_local1].rotation = (RA[_local1].rotation + RA[_local1].rotSpeed);
RA[_local1].speed.x = (RA[_local1].speed.x / 1.015);
RA[_local1].speed.y = (RA[_local1].speed.y / 1.015);
RA[_local1].speed.y = (RA[_local1].speed.y + 0.25);
RA[_local1].rotSpeed = (RA[_local1].rotSpeed / 1.05);
RA[_local1].x = (RA[_local1].x - levelSpeed);
if (RA[_local1].x < (0 - 50)){
BUBBLES.removeChild(RA[_local1]);
delete RA[_local1];
RA.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function updateShells(){
var _local1:int;
_local1 = 0;
while (_local1 < ShA.length) {
if (ShA[_local1].hit == false){
ShA[_local1].rotation = (ShA[_local1].rotation + 5);
ShA[_local1].x = (ShA[_local1].x - levelSpeed);
ShA[_local1].hit = pythag(ShA[_local1], TENT, 35);
if (ShA[_local1].hit == true){
MovieClip(root).playSound("SHELL");
addExperience(10, ShA[_local1].x, ShA[_local1].y);
};
} else {
ShA[_local1].scaleX = (ShA[_local1].scaleX / 1.1);
ShA[_local1].scaleY = (ShA[_local1].scaleY / 1.1);
ShA[_local1].x = (ShA[_local1].x + (((TENT.x - ShA[_local1].x) - 20) / 5));
ShA[_local1].y = (ShA[_local1].y + ((TENT.y - ShA[_local1].y) / 5));
ShA[_local1].alpha = (ShA[_local1].alpha - 0.1);
if (ShA[_local1].alpha < 0){
ShA[_local1].x = -400;
};
};
if (ShA[_local1].x < -100){
BUBBLES.removeChild(ShA[_local1]);
delete ShA[_local1];
ShA.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function newRippler(_arg1:DisplayObject, _arg2:Number, _arg3:Number=2){
var _local4:Number;
var _local5:Number;
water_source = _arg1;
water_scaleInv = (1 / _arg3);
water_buffer1 = new BitmapData((_arg1.width * water_scaleInv), (_arg1.height * water_scaleInv), false, 0);
water_buffer2 = new BitmapData(water_buffer1.width, water_buffer1.height, false, 0);
water_defData = new BitmapData(_arg1.width, _arg1.height, false, 0x7F7F7F);
_local4 = (water_defData.width / water_buffer1.width);
_local5 = (water_defData.height / water_buffer1.height);
water_fullRect = new Rectangle(0, 0, water_buffer1.width, water_buffer1.height);
water_drawRect = new Rectangle();
water_filter = new DisplacementMapFilter(water_defData, water_origin, BitmapDataChannel.BLUE, BitmapDataChannel.BLUE, _arg2, _arg2, "wrap");
water_source.filters = [water_filter];
water_expandFilter = new ConvolutionFilter(3, 3, [0.5, 1, 0.5, 1, 0, 1, 0.5, 1, 0.5], 3);
water_colourTransform = new ColorTransform(1, 1, 1, 1, 127, 127, 127);
water_matrix = new Matrix(_local4, 0, 0, _local5);
}
public function MouseDown(_arg1:Event){
mousePressed = true;
}
public function destroyRipple():void{
water_buffer1.dispose();
water_buffer2.dispose();
water_defData.dispose();
}
public function newShockwave(_arg1:int, _arg2:int, _arg3:Number){
drawRipple(_arg1, (_arg2 + y), 10, 0.8);
}
public function shakeCam(_arg1:Number, _arg2:Number){
CAMERA_SHAKE.x = _arg1;
CAMERA_SHAKE.y = _arg2;
}
public function updateEnemy_Bomber(){
var _local1:int;
_local1 = 0;
while (_local1 < EA_B.length) {
if (EA_B[_local1].health > 0){
EA_B[_local1].x = (EA_B[_local1].x - levelSpeed);
if (EA_B[_local1].hit[0] > 0){
EA_B[_local1].health = (EA_B[_local1].health - EA_B[_local1].hit[0]);
EA_B[_local1].xSpeed = (EA_B[_local1].xSpeed + (EA_B[_local1].hit[1] / 2));
EA_B[_local1].ySpeed = (EA_B[_local1].ySpeed + (EA_B[_local1].hit[2] / 2));
EA_B[_local1].hit[0] = 0;
};
EA_B[_local1].alpha = (EA_B[_local1].alpha + ((1 - EA_B[_local1].alpha) / 10));
EA_B[_local1].x = (EA_B[_local1].x + EA_B[_local1].xSpeed);
EA_B[_local1].y = (EA_B[_local1].y + EA_B[_local1].ySpeed);
if (EA_B[_local1].splash == false){
if (EA_B[_local1].y < -100){
EA_B[_local1].ySpeed++;
} else {
EA_B[_local1].splash = true;
newExplosion(EA_B[_local1].x, EA_B[_local1].y, 40);
};
} else {
EA_B[_local1].ySpeed = (EA_B[_local1].ySpeed / 1.1);
EA_B[_local1].xSpeed = (EA_B[_local1].xSpeed / 1.1);
};
if (EA_B[_local1].x < (0 - 50)){
EA_B[_local1].x = -400;
EA_B[_local1].health = 0;
};
} else {
newExplosion(EA_B[_local1].x, EA_B[_local1].y, 50);
removeEnemy(_local1, EA_B);
_local1--;
};
_local1++;
};
}
public function calcSpeed(_arg1:int, _arg2:int){
var _local3:Number;
var _local4:Point;
_local3 = (_arg1 * 0.01745329);
_local4 = new Point();
_local4.x = (_arg2 * Math.cos(_local3));
_local4.y = (_arg2 * Math.sin(_local3));
return (_local4);
}
public function terrainCheck(){
if (deathTimer <= 0){
if (ENEMY.hitTestPoint(TENT.x, (TENT.y + y), true)){
hitTent(TENT.x, TENT.y, 100);
};
if (hitCheck(TERRAIN, TENT)){
hitTent(TENT.x, TENT.y, 100);
};
};
}
public function newPowerRing(_arg1:int, _arg2:int){
var _local3:MovieClip;
_local3 = new PR();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.hit = false;
BUBBLES.addChild(_local3);
PA.push(_local3);
return (_local3);
}
public function pythag(_arg1:Object, _arg2:Object, _arg3:int){
return ((Math.sqrt((Math.pow((_arg1.y - _arg2.y), 2) + Math.pow((_arg1.x - _arg2.x), 2))) < _arg3));
}
public function checkKeys(){
keyPressed_UP = ((isKeyPressed(38)) || (isKeyPressed(87)));
keyPressed_DOWN = ((isKeyPressed(40)) || (isKeyPressed(83)));
keyPressed_LEFT = ((isKeyPressed(37)) || (isKeyPressed(65)));
keyPressed_RIGHT = ((isKeyPressed(39)) || (isKeyPressed(68)));
keyPressed_SHOOT = ((isKeyPressed(90)) || (isKeyPressed(76)));
keyPressed_DRILL = ((isKeyPressed(88)) || (isKeyPressed(75)));
}
public function rotatedXY(_arg1, _arg2, _arg3){
var _local4:Point;
var _local5:*;
var _local6:*;
var _local7:*;
_local4 = new Point();
_local5 = ((6.28 / 360) * _arg3.rotation);
_local6 = Math.sin(_local5);
_local7 = Math.cos(_local5);
_local4.x = (((_arg1 * _local7) - (_arg2 * _local6)) + _arg3.x);
_local4.y = (((_arg1 * _local6) + (_arg2 * _local7)) + _arg3.y);
return (_local4);
}
public function updateRippler(){
var _local1:BitmapData;
_local1 = water_buffer2.clone();
water_buffer2.applyFilter(water_buffer1, water_fullRect, water_origin, water_expandFilter);
water_buffer2.draw(_local1, null, null, BlendMode.SUBTRACT, null, false);
water_defData.draw(water_buffer2, water_matrix, water_colourTransform, null, null, true);
water_filter.mapBitmap = water_defData;
water_source.filters = [water_filter];
_local1.dispose();
switchBuffers();
}
public function setEvolveState(_arg1){
if ((((_arg1 > 0)) && ((_arg1 < 10)))){
} else {
_arg1 = 9;
};
if (_arg1 > 9){
(_arg1 == 9);
};
if (_arg1 == 1){
CURSOR.alpha = 0.3;
TENT.Head.visible = false;
MovieClip(root).changeColour(TENT.Head, 0, 0);
} else {
if (_arg1 == 2){
CURSOR.alpha = 1;
TENT.Head.visible = true;
shootPower = 1;
MovieClip(root).changeColour(TENT.Head, 0, 0);
} else {
if (_arg1 == 3){
shootPower = 1;
drillPower = 1;
MovieClip(root).changeColour(TENT.Head, 0x6600, 1);
} else {
if (_arg1 == 4){
shootPower = 2;
drillPower = 1;
MovieClip(root).changeColour(TENT.Head, 0xFFFFFF, 1);
} else {
if (_arg1 == 5){
drillPower = 2;
shootPower = 2;
MovieClip(root).changeColour(TENT.Head, 0, 0.6);
} else {
if (_arg1 == 6){
agility = 1.5;
drillPower = 2;
shootPower = 2;
MovieClip(root).changeColour(TENT.Head, 0, 0.6);
} else {
if (_arg1 == 7){
agility = 1.5;
drillLen = 1.5;
drillPower = 2;
shootPower = 2;
MovieClip(root).changeColour(TENT.Head, 0, 0.6);
} else {
if (_arg1 == 8){
agility = 1.5;
drillLen = 1.5;
triShot = true;
drillPower = 2;
shootPower = 2;
MovieClip(root).changeColour(TENT.Head, 0, 0.6);
} else {
if (level == 9){
drillLen = 1.5;
agility = 1.5;
triShot = true;
drillPower = 2;
shootPower = 3;
MovieClip(root).changeColour(CURSOR, 0, 1);
MovieClip(root).changeColour(TENT.Head, 0, 1);
};
};
};
};
};
};
};
};
};
}
public function addSpawn(_arg1=0, _arg2=1){
spawnArray.push(_arg1);
}
public function calcAngle(_arg1:int, _arg2:int){
return (angle(0, 0, _arg1, _arg2));
}
public function newEnemy_Hooker(_arg1:int, _arg2:int){
var _local3:MovieClip;
_local3 = new ENEMY_HOOKER();
_local3.x = _arg1;
_local3.y = _arg2;
_local3.xp = 8;
_local3.health = 0.5;
_local3.speed = new Point(0, 0);
_local3.hit = new Array();
_local3.expSize = 50;
ENEMY.addChild(_local3);
EA_H.push(_local3);
return (_local3);
}
public function layerScroll(_arg1:MovieClip, _arg2:Number){
_arg1.x = (_arg1.x - _arg2);
if (_arg1.x < (-(_arg1.width) / 2)){
_arg1.x = (_arg1.x + (_arg1.width / 2));
} else {
if (_arg1.x > 0){
_arg1.x = (_arg1.x - (_arg1.width / 2));
};
};
}
public function addRock(_arg1){
if (levelStarted == false){
terrainArray.push(_arg1);
_arg1.rotation = rand(0, 360);
};
}
public function updateEvolve(){
if (evolveActive == true){
if (evolveFlip == true){
drawRipple(rand(0, 600), rand(0, 350), rand(1, 15), 1);
if (HUD.EVOLVE.scaleX < 1){
HUD.EVOLVE.scaleX = (HUD.EVOLVE.scaleX + 0.05);
HUD.EVOLVE.scaleY = (HUD.EVOLVE.scaleY + 0.05);
};
if (HUD.EVOLVE.CONT.alpha < 1){
HUD.EVOLVE.CONT.alpha = (HUD.EVOLVE.CONT.alpha + 0.1);
evolveSwitch = true;
} else {
if (keyPressed_SHOOT == false){
evolveSwitch = false;
};
if ((((evolveSwitch == false)) && ((keyPressed_SHOOT == true)))){
evolveFlip = false;
};
};
} else {
if (HUD.EVOLVE.scaleX > 0){
HUD.EVOLVE.scaleX = (HUD.EVOLVE.scaleX - 0.05);
HUD.EVOLVE.scaleY = (HUD.EVOLVE.scaleY - 0.05);
} else {
gameFreeze = false;
HUD.EVOLVE.y = 400;
};
};
};
}
public function updateShake(){
x = (x + (rand(0, CAMERA_SHAKE.x) - (CAMERA_SHAKE.x / 2)));
x = (x / 1.1);
CAMERA_SHAKE.x = (CAMERA_SHAKE.x / CAMERA_SHAKE.y);
}
public function getRippleImage():BitmapData{
return (water_defData);
}
public function updateBoss(){
var _local1:Point;
var _local2:int;
if (bossActive == true){
if (boss.alpha < 1){
boss.alpha = (boss.alpha + 0.1);
};
if (bossType == 1){
if (bossHealth <= 0){
bossHealth = 0;
boss.rotation = (boss.rotation + ((-90 - boss.rotation) / 20));
boss.flag.x = (boss.flag.x + ((75 - boss.flag.x) / 20));
if (boss.flag.x > 70){
boss.flag.play();
};
boss.y = (boss.y + 2);
boss.CLAW.gotoAndStop(1);
boss.PROPS.gotoAndStop(1);
if (boss.y > 600){
levelEnd = true;
};
} else {
if (bossState == 0){
boss.flag.stop();
boss.CLAW.gotoAndStop(1);
boss.y = (boss.y + (((TENT.y - 100) - boss.y) / 50));
boss.x = (boss.x + (((bossPos.x - 150) - boss.x) / 40));
if (boss.y < 0){
boss.y = 0;
};
if (deathTimer <= 0){
bossStateTimer--;
if (bossStateTimer < 0){
if (rand(0, 100) == 1){
bossState = 1;
bossStateTimer = 175;
boss.CLAW.gotoAndPlay(1);
};
if (rand(0, 100) == 1){
bossState = 3;
bossStateTimer = 175;
boss.PROPS.gotoAndPlay(2);
};
if (rand(0, 100) == 2){
bossState = 2;
bossStateTimer = 100;
};
};
};
boss.rotation = (boss.rotation + ((120 - boss.rotation) / 10));
} else {
if (bossState == 1){
boss.PROPS.gotoAndStop(1);
bossStateTimer--;
if (bossStateTimer == 0){
bossState = 0;
bossStateTimer = 50;
} else {
if (bossStateTimer > 80){
boss.y = (boss.y + (((TENT.y - 100) - boss.y) / 50));
boss.x = (boss.x + (((TENT.x + 180) - boss.x) / 50));
} else {
boss.rotation = (boss.rotation + 1);
};
};
if (boss.y < 0){
boss.y = 0;
};
} else {
if (bossState == 2){
boss.CLAW.gotoAndStop(1);
boss.PROPS.gotoAndStop(1);
bossRot = (angle(TENT.x, TENT.y, boss.x, boss.y) + 90);
boss.rotation = bossRot;
bossHitActive = true;
bossStateTimer--;
if (deathTimer <= 0){
if (rand(0, 12) == 1){
_local1 = rotatedXY(110, 0, boss);
if (rand(0, 1) == 0){
newEnemy_Chomper(_local1.x, _local1.y, (((boss.rotation + 180) + rand(0, 80)) - 40));
} else {
newEnemy_Hooker(_local1.x, _local1.y);
};
};
};
if (boss.y < 0){
boss.y = 0;
};
if (bossStateTimer == 0){
bossState = 0;
bossStateTimer = 50;
} else {
if (bossStateTimer > 80){
boss.y = (boss.y + (((TENT.y - 100) - boss.y) / 50));
boss.x = (boss.x + (((TENT.x + 180) - boss.x) / 50));
} else {
boss.rotation = (boss.rotation + 1);
};
};
} else {
if (bossState == 3){
boss.CLAW.gotoAndStop(1);
bossStateTimer--;
if (bossStateTimer == 0){
bossState = 0;
bossStateTimer = 100;
} else {
if (bossStateTimer > 80){
boss.y = (boss.y + (((TENT.y - 100) - boss.y) / 100));
boss.x = (boss.x + (((TENT.x + 180) - boss.x) / 100));
if (bossStateTimer > 120){
bossRot = (angle(TENT.x, TENT.y, boss.x, boss.y) + 90);
bossSpeed = calcSpeed(boss.rotation, 15);
};
boss.rotation = bossRot;
} else {
boss.x = (boss.x + bossSpeed.x);
boss.y = (boss.y + bossSpeed.y);
};
};
if (boss.y < 0){
boss.y = 0;
};
};
};
};
};
};
};
if (bossType == 2){
boss.scaleX = 0.5;
boss.scaleY = 0.5;
if (bossHealth <= 0){
bossHealth = 0;
boss.rotation = (boss.rotation + ((90 - boss.rotation) / 20));
boss.flag.x = (boss.flag.x + ((-65 - boss.flag.x) / 20));
if (boss.flag.x < -50){
boss.flag.play();
};
boss.y = (boss.y + 2);
boss.head.scaleX = (boss.head.scaleX + ((0 - boss.head.scaleX) / 5));
boss.tail.scaleX = (boss.tail.scaleX + ((0 - boss.head.scaleX) / 5));
boss.leg1.scaleX = (boss.leg1.scaleX + ((0 - boss.head.scaleX) / 5));
boss.leg2.scaleX = (boss.leg2.scaleX + ((0 - boss.head.scaleX) / 5));
boss.leg3.scaleX = (boss.leg3.scaleX + ((0 - boss.head.scaleX) / 5));
boss.leg4.scaleX = (boss.leg4.scaleX + ((0 - boss.head.scaleX) / 5));
boss.head.scaleY = boss.head.scaleX;
boss.tail.scaleY = boss.head.scaleX;
boss.leg1.scaleY = boss.head.scaleX;
boss.leg2.scaleY = boss.head.scaleX;
boss.leg3.scaleY = boss.head.scaleX;
boss.leg4.scaleY = boss.head.scaleX;
if (boss.y > 600){
levelEnd = true;
};
} else {
if (rand(0, 20) == 1){
newEnemy_Chomper(600, rand(-100, 300), (rand(0, 20) - 10));
};
if (bossState == 0){
boss.head.scaleX = (boss.head.scaleX + ((1 - boss.head.scaleX) / 10));
boss.tail.scaleX = (boss.tail.scaleX + ((1 - boss.head.scaleX) / 10));
boss.leg1.scaleX = (boss.leg1.scaleX + ((1 - boss.head.scaleX) / 10));
boss.leg2.scaleX = (boss.leg2.scaleX + ((1 - boss.head.scaleX) / 10));
boss.leg3.scaleX = (boss.leg3.scaleX + ((1 - boss.head.scaleX) / 10));
boss.leg4.scaleX = (boss.leg4.scaleX + ((1 - boss.head.scaleX) / 10));
boss.head.scaleY = boss.head.scaleX;
boss.tail.scaleY = boss.head.scaleX;
boss.leg1.scaleY = boss.head.scaleX;
boss.leg2.scaleY = boss.head.scaleX;
boss.leg3.scaleY = boss.head.scaleX;
boss.leg4.scaleY = boss.head.scaleX;
boss.DB.scaleX = 0;
boss.DBF1.scaleX = 0;
boss.DBF2.scaleX = 0;
boss.DB.scaleY = 0;
boss.DBF1.scaleY = 0;
boss.DBF2.scaleY = 0;
boss.flag.stop();
boss.y = (boss.y + (((TENT.y - 60) - boss.y) / 20));
boss.x = (boss.x + (((TENT.x + 200) - boss.x) / 20));
if (boss.y < 0){
boss.y = 0;
};
if (deathTimer <= 0){
bossStateTimer--;
if (bossStateTimer < 0){
if (rand(0, 100) == 1){
boss.rotation = rand(0, 360);
boss.hit.x = (boss.hit.x - 10000);
bossState = 1;
bossStateTimer = 300;
};
};
};
boss.rotation = (boss.rotation + ((120 - boss.rotation) / 10));
} else {
if (bossState == 1){
boss.head.scaleX = (boss.head.scaleX + ((0 - boss.head.scaleX) / 5));
boss.tail.scaleX = (boss.tail.scaleX + ((0 - boss.head.scaleX) / 5));
boss.leg1.scaleX = (boss.leg1.scaleX + ((0 - boss.head.scaleX) / 5));
boss.leg2.scaleX = (boss.leg2.scaleX + ((0 - boss.head.scaleX) / 5));
boss.leg3.scaleX = (boss.leg3.scaleX + ((0 - boss.head.scaleX) / 5));
boss.leg4.scaleX = (boss.leg4.scaleX + ((0 - boss.head.scaleX) / 5));
boss.head.scaleY = boss.head.scaleX;
boss.tail.scaleY = boss.head.scaleX;
boss.leg1.scaleY = boss.head.scaleX;
boss.leg2.scaleY = boss.head.scaleX;
boss.leg3.scaleY = boss.head.scaleX;
boss.leg4.scaleY = boss.head.scaleX;
bossStateTimer--;
if (bossStateTimer == 0){
bossState = 0;
boss.hit.x = (boss.hit.x + 10000);
bossStateTimer = 50;
} else {
if (bossStateTimer > 200){
boss.DBF1.scaleX = (boss.DBF1.scaleX + ((0.5 - boss.DBF1.scaleX) / 5));
boss.DBF2.scaleX = (boss.DBF2.scaleX + ((0.5 - boss.DBF2.scaleX) / 5));
boss.DBF1.scaleY = (boss.DBF1.scaleY + ((0.5 - boss.DBF1.scaleX) / 5));
boss.DBF2.scaleY = (boss.DBF2.scaleY + ((0.5 - boss.DBF2.scaleX) / 5));
boss.y = (boss.y + ((150 - boss.y) / 20));
boss.x = (boss.x + ((300 - boss.x) / 20));
} else {
if (bossStateTimer > 50){
boss.DB.scaleX = (boss.DB.scaleX + ((1 - boss.DB.scaleX) / 5));
boss.DBF1.scaleX = (boss.DBF1.scaleX + ((1 - boss.DBF1.scaleX) / 5));
boss.DBF2.scaleX = (boss.DBF2.scaleX + ((1 - boss.DBF2.scaleX) / 5));
boss.DB.scaleY = (boss.DB.scaleY + ((1 - boss.DB.scaleX) / 5));
boss.DBF1.scaleY = (boss.DBF1.scaleY + ((1 - boss.DBF1.scaleX) / 5));
boss.DBF2.scaleY = (boss.DBF2.scaleY + ((1 - boss.DBF2.scaleX) / 5));
boss.rotation = (boss.rotation + 1.5);
} else {
boss.DB.scaleX = (boss.DB.scaleX + ((0 - boss.DB.scaleX) / 5));
boss.DBF1.scaleX = (boss.DBF1.scaleX + ((0 - boss.DBF1.scaleX) / 5));
boss.DBF2.scaleX = (boss.DBF2.scaleX + ((0 - boss.DBF2.scaleX) / 5));
boss.DB.scaleY = (boss.DB.scaleY + ((0 - boss.DB.scaleX) / 5));
boss.DBF1.scaleY = (boss.DBF1.scaleY + ((0 - boss.DBF1.scaleX) / 5));
boss.DBF2.scaleY = (boss.DBF2.scaleY + ((0 - boss.DBF2.scaleX) / 5));
};
};
};
if (boss.y < 0){
boss.y = 0;
};
};
};
};
};
if (bossType == 3){
if (bossHealth <= 0){
boss.hit.x = -10000;
bossHealth = 0;
boss.rotation = (boss.rotation + ((-90 - boss.rotation) / 20));
boss.flag.x = (boss.flag.x + ((-65 - boss.flag.x) / 20));
if (boss.flag.x < -50){
boss.flag.play();
};
boss.y = (boss.y + 2);
if (boss.y > 600){
levelEnd = true;
};
} else {
if (bossState == 0){
boss.flag.stop();
boss.y = (boss.y + (((TENT.y - 60) - boss.y) / 20));
boss.x = (boss.x + (((TENT.x + 300) - boss.x) / 20));
if (boss.y < 0){
boss.y = 0;
};
if (deathTimer <= 0){
bossStateTimer--;
if (bossStateTimer < 0){
if (rand(0, 100) == 1){
boss.mouth.play();
bossState = 1;
bossStateTimer = 100;
};
if (rand(0, 100) == 2){
boss.mouth.play();
bossState = 2;
bossRot = 0;
bossStateTimer = 100;
};
if (rand(0, 100) == 3){
boss.mouth.play();
bossState = 3;
boss.hit.x = (boss.hit.x + 10000);
bossRot = 0;
bossStateTimer = 100;
};
};
};
boss.rotation = (boss.rotation + ((180 - boss.rotation) / 10));
} else {
if (bossState == 1){
boss.rotation = (boss.rotation + ((180 - boss.rotation) / 10));
bossStateTimer--;
if (bossStateTimer == 0){
boss.mouth.gotoAndStop(1);
bossState = 0;
bossStateTimer = 50;
} else {
if (bossStateTimer == 70){
_local2 = 0;
while (_local2 < 5) {
newEnemyBullet(boss.x, boss.y, ((80 + boss.rotation) + (20 * (_local2 - 5))));
_local2++;
};
} else {
if (bossStateTimer == 60){
_local2 = 0;
while (_local2 < 5) {
newEnemyBullet(boss.x, boss.y, ((65 + boss.rotation) + (20 * (_local2 - 5))));
_local2++;
};
} else {
if (bossStateTimer == 50){
_local2 = 0;
while (_local2 < 5) {
newEnemyBullet(boss.x, boss.y, ((80 + boss.rotation) + (20 * (_local2 - 5))));
_local2++;
};
} else {
if (bossStateTimer == 40){
_local2 = 0;
while (_local2 < 5) {
newEnemyBullet(boss.x, boss.y, ((15 + boss.rotation) + (20 * (_local2 - 5))));
_local2++;
};
} else {
if (bossStateTimer == 30){
_local2 = 0;
while (_local2 < 5) {
newEnemyBullet(boss.x, boss.y, ((5 + boss.rotation) + (20 * (_local2 - 5))));
_local2++;
};
};
};
};
};
};
};
if (boss.y < 0){
boss.y = 0;
};
} else {
if (bossState == 2){
bossStateTimer--;
boss.rotation = (boss.rotation + 20);
bossRot++;
if (bossRot > 1){
bossRot = 0;
newEnemyBullet(boss.x, boss.y, (((5 + boss.rotation) + rand(0, 10)) - 5));
};
if (bossStateTimer == 0){
boss.mouth.gotoAndStop(1);
bossState = 0;
};
} else {
if (bossState == 3){
boss.rotation = (boss.rotation + ((180 - boss.rotation) / 10));
if (rand(0, 10) == 1){
newEnemy_Hooker(600, rand(-100, 300));
};
bossStateTimer--;
if (bossStateTimer == 0){
boss.mouth.gotoAndStop(1);
bossState = 0;
bossStateTimer = 50;
boss.hit.x = (boss.hit.x - 10000);
};
};
};
};
};
};
};
HUD.bossBar.bossBar.scaleX = ((bossHealth / bossHealthMax) * 2);
};
}
public function setDead(_arg1:MovieClip, _arg2:Boolean){
if (_arg1.dead == false){
_arg1.dead = _arg2;
};
}
public function updatePowerRings(){
var _local1:int;
_local1 = 0;
while (_local1 < PA.length) {
if (PA[_local1].hit == false){
PA[_local1].x = (PA[_local1].x - levelSpeed);
PA[_local1].hit = pythag(PA[_local1], TENT, 35);
if (PA[_local1].hit == true){
MovieClip(root).playSound("SHELL");
addExperience(25, TENT.x, TENT.y);
};
} else {
PA[_local1].scaleY = (PA[_local1].scaleY * 1.2);
PA[_local1].x = (PA[_local1].x + (((TENT.x - PA[_local1].x) - 60) / 10));
PA[_local1].y = TENT.y;
PA[_local1].alpha = (PA[_local1].alpha - 0.2);
if (PA[_local1].alpha < 0){
PA[_local1].x = -400;
};
};
if (PA[_local1].x < -100){
BUBBLES.removeChild(PA[_local1]);
delete PA[_local1];
PA.splice(_local1, 1);
_local1--;
};
_local1++;
};
}
public function newRocks(_arg1:int, _arg2:int, _arg3:int, _arg4:Number, _arg5:int){
var _local6:int;
var _local7:MovieClip;
if (levelEnd == false){
MovieClip(root).playSound("ROCK");
while (_local6 < (_arg3 / 2)) {
if (_arg5 == 1){
_local7 = new Rock_Small();
} else {
if (_arg5 == 0){
_local7 = new Rock_Small_red();
};
};
_local7.x = ((_arg1 + rand(0, 20)) - 10);
_local7.y = ((_arg2 + rand(0, 20)) - 10);
_local7.rotSpeed = (rand(0, 40) - 20);
_local7.speed = new Point((rand(0, 10) - 5), (rand(0, 10) - 7));
_local7.scaleX = (Number(rand(30, 60)) / 100);
_local7.scaleY = _local7.scaleX;
_local7.alpha = 0.6;
BUBBLES.addChild(_local7);
RA.push(_local7);
_local6++;
};
};
}
}
}//package TentaDrillGame9_fla
Section 55
//GAME_ENGINE_CONTAINER_141 (TentaDrillGame9_fla.GAME_ENGINE_CONTAINER_141)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class GAME_ENGINE_CONTAINER_141 extends MovieClip {
public var GAME:MovieClip;
}
}//package TentaDrillGame9_fla
Section 56
//GameMap_46 (TentaDrillGame9_fla.GameMap_46)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class GameMap_46 extends MovieClip {
public var backBut:SimpleButton;
public var activeLevel:Number;
public var leftKeyPressed:Boolean;
public var buttonArray:Array;
public var sfT;
public var i:Number;
public var sf;
public var levelStartSpaceBuffer:Boolean;
public var _keys:Array;
public var downKeyPressed:Boolean;
public var curLevel:Number;
public var level0:MovieClip;
public var level1:MovieClip;
public var level2:MovieClip;
public var level3:MovieClip;
public var level4:MovieClip;
public var level5:MovieClip;
public var level6:MovieClip;
public var level7:MovieClip;
public var level8:MovieClip;
public var selectedMapButton;
public var arrowMC:MovieClip;
public var keyBuffer:Number;
public var upKeyPressed:Boolean;
public var rightKeyPressed:Boolean;
public function GameMap_46(){
addFrameScript(0, frame1);
}
public function mapEnterFrame(_arg1){
checkKeyPresses();
keyBuffer--;
if ((((rightKeyPressed == false)) && ((leftKeyPressed == false)))){
keyBuffer = -5;
};
if (keyBuffer < 0){
if (leftKeyPressed == true){
if (((!((this[("level" + (curLevel + 1))] == undefined))) && ((this[("level" + (curLevel + 1))].fader.alpha == 0)))){
curLevel++;
selectMapButton(curLevel);
};
keyBuffer = 5;
} else {
if (rightKeyPressed == true){
if (((!((this[("level" + (curLevel - 1))] == undefined))) && ((this[("level" + (curLevel - 1))].fader.alpha == 0)))){
curLevel--;
selectMapButton(curLevel);
};
keyBuffer = 5;
};
};
};
arrowMC.x = (arrowMC.x + ((this[("level" + curLevel)].x - arrowMC.x) / 5));
arrowMC.y = (arrowMC.y + ((this[("level" + curLevel)].y - arrowMC.y) / 5));
if (selectedMapButton != undefined){
selectedMapButton.gotoAndPlay(2);
} else {
selectedMapButton = this[("level" + MovieClip(parent).curLevel)];
};
if (upKeyPressed == false){
levelStartSpaceBuffer = true;
} else {
if ((((upKeyPressed == true)) && ((levelStartSpaceBuffer == true)))){
loadLevelSet(curLevel);
};
};
}
public function OL7(_arg1){
selectMapButton(7);
}
public function removeButtonListeners(_arg1){
var _local2:*;
if (_arg1.sprite != undefined){
_local2 = _arg1.sprite;
} else {
_local2 = _arg1;
};
if (_arg1.pressVar != ""){
_local2.removeEventListener(MouseEvent.MOUSE_DOWN, this[_arg1.pressVar]);
};
if (_arg1.releaseVar != ""){
_local2.removeEventListener(MouseEvent.MOUSE_UP, this[_arg1.releaseVar]);
};
if (_arg1.rollVar != ""){
_local2.removeEventListener(MouseEvent.MOUSE_OVER, this[_arg1.rollVar]);
};
if (_arg1.outVar != ""){
_local2.removeEventListener(MouseEvent.MOUSE_OUT, this[_arg1.outVar]);
};
}
public function OL0(_arg1){
selectMapButton(0);
}
public function handleKeyUp(_arg1:KeyboardEvent):void{
var _local2:int;
_local2 = _keys.indexOf(_arg1.keyCode);
if (_local2 > -1){
_keys.splice(_local2, 1);
};
}
public function OL8(_arg1){
selectMapButton(8);
}
public function removeListeners(){
removeAllButtons();
removeEventListener(Event.ENTER_FRAME, mapEnterFrame);
backBut.removeEventListener(MouseEvent.MOUSE_UP, backButC);
}
public function selectMapButton(_arg1){
if (this[("level" + _arg1)].fader.alpha == 0){
curLevel = _arg1;
selectedMapButton = this[("level" + _arg1)];
MovieClip(root).BG.BG.BG.BGCOL.gotoAndStop((_arg1 + 1));
};
}
public function removeAllButtons(){
var _local1:Number;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < buttonArray.length) {
_local2 = buttonArray[_local1];
removeButtonListeners(_local2);
buttonArray.splice(_local1, 1);
_local1--;
_local1++;
};
}
public function handleKeyDown(_arg1:KeyboardEvent):void{
if (_keys.indexOf(_arg1.keyCode) == -1){
_keys.push(_arg1.keyCode);
};
}
function frame1(){
if (MovieClip(root).activeLevel < 0){
MovieClip(root).activeLevel = 0;
};
buttonArray = new Array();
_keys = new Array();
stage.addEventListener(KeyboardEvent.KEY_DOWN, this.handleKeyDown);
stage.addEventListener(KeyboardEvent.KEY_UP, this.handleKeyUp);
curLevel = 0;
activeLevel = 0;
rightKeyPressed = false;
leftKeyPressed = false;
upKeyPressed = false;
downKeyPressed = false;
levelStartSpaceBuffer = false;
MovieClip(parent).previewMode = false;
sf = MovieClip(parent).savefile.data.medals;
sfT = MovieClip(parent).savefile.data.medalsT;
arrowMC.x = level0.x;
arrowMC.y = level0.y;
i = 0;
while (i < 9) {
this[("level" + i)].BOSS.visible = false;
this[("level" + i)].fader.alpha = 1;
this[("level" + i)].alpha = 0.5;
this[("level" + i)].exp.scaleX = 0;
if ((((((i == 2)) || ((i == 5)))) || ((i == 8)))){
this[("level" + i)].BOSS.visible = true;
this[("level" + i)].expBlack.scaleX = 0;
this[("level" + i)].expText.text = "BOSS";
};
if ((((i == 0)) || (!((sf[(i - 1)] == undefined))))){
this[("level" + i)].fader.alpha = 0;
this[("level" + i)].exp.scaleX = ((sfT[i] / 1000) / 3);
if (this[("level" + i)].exp.scaleX > 1){
this[("level" + i)].exp.scaleX = 1;
};
if ((((((i == 2)) || ((i == 5)))) || ((i == 8)))){
this[("level" + i)].expBlack.scaleX = 0;
this[("level" + i)].expText.text = "";
};
this[("level" + i)].alpha = 1;
curLevel++;
};
addButton(this[("level" + i)], "", ("GL" + i), ("OL" + i), "");
i++;
};
level0.fader.alpha = 0;
trace(("CURLEVEL" + curLevel));
trace(("ACTLEVEL" + MovieClip(root).activeLevel));
if (curLevel == 1){
selectMapButton(MovieClip(root).activeLevel);
} else {
if (curLevel == 9){
curLevel = 8;
trace("JIMJAMJOLIES!");
} else {
selectMapButton((MovieClip(root).activeLevel + 1));
};
};
addEventListener(Event.ENTER_FRAME, mapEnterFrame);
keyBuffer = 0;
backBut.addEventListener(MouseEvent.MOUSE_UP, backButC);
if (MovieClip(root).activeLevel == 8){
MovieClip(root).activeLevel = 0;
removeListeners();
MovieClip(root).gotoFrame("END");
};
}
public function angle(_arg1, _arg2, _arg3, _arg4){
return ((Math.round(((Math.atan2((_arg4 - _arg2), (_arg3 - _arg1)) / 3.141593) * 180)) + 90));
}
public function destroyAS3Key(){
stage.removeEventListener(KeyboardEvent.KEY_DOWN, this.handleKeyDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, this.handleKeyUp);
}
public function calcSpeed(_arg1, _arg2){
var _local3:Number;
var _local4:Object;
_local3 = (_arg1 * 0.01745329);
_local4 = new Object();
_local4.x = (_arg2 * Math.cos(_local3));
_local4.y = (_arg2 * Math.sin(_local3));
return (_local4);
}
public function pythag(_arg1, _arg2, _arg3, _arg4){
return (Math.sqrt((Math.pow((_arg2 - _arg4), 2) + Math.pow((_arg1 - _arg3), 2))));
}
public function rotatedXY(_arg1, _arg2, _arg3){
var _local4:Object;
var _local5:*;
var _local6:*;
var _local7:*;
_local4 = new Object();
_local5 = ((6.28 / 360) * _arg3);
_local6 = Math.sin(_local5);
_local7 = Math.cos(_local5);
_local4.x = ((_arg1 * _local7) - (_arg2 * _local6));
_local4.y = ((_arg1 * _local6) + (_arg2 * _local7));
return (_local4);
}
public function addButton(_arg1, _arg2:String, _arg3:String, _arg4:String, _arg5:String){
var _local6:*;
_arg1.pressVar = _arg2;
_arg1.releaseVar = _arg3;
_arg1.rollVar = _arg4;
_arg1.outVar = _arg5;
_local6 = _arg1;
if (_arg1.pressVar != ""){
_local6.addEventListener(MouseEvent.MOUSE_DOWN, this[_arg2]);
};
if (_arg1.releaseVar != ""){
_local6.addEventListener(MouseEvent.MOUSE_UP, this[_arg3]);
};
if (_arg1.rollVar != ""){
_local6.addEventListener(MouseEvent.MOUSE_OVER, this[_arg4]);
};
if (_arg1.outVar != ""){
_local6.addEventListener(MouseEvent.MOUSE_OUT, this[_arg5]);
};
buttonArray.push(_arg1);
}
public function loadLevelSet(_arg1){
activeLevel = _arg1;
if (this[("level" + _arg1)].fader.alpha == 0){
removeListeners();
MovieClip(root).activeLevel = _arg1;
MovieClip(root).BG.destroyBG();
MovieClip(root).gotoFrame("GAME");
};
}
public function backButC(_arg1){
rotation = (rotation + 10);
trace("INDUBITABLY");
removeListeners();
MovieClip(root).BG.BG.BG.gotoAndStop(1);
MovieClip(root).gotoFrame("TITLE");
}
public function isKeyPressed(_arg1:int):Boolean{
return ((_keys.indexOf(_arg1) > -1));
}
public function addRock(_arg1){
}
public function GL0(_arg1){
loadLevelSet(0);
}
public function GL1(_arg1){
loadLevelSet(1);
}
public function GL2(_arg1){
loadLevelSet(2);
}
public function GL3(_arg1){
loadLevelSet(3);
}
public function GL4(_arg1){
loadLevelSet(4);
}
public function GL5(_arg1){
loadLevelSet(5);
}
public function GL6(_arg1){
loadLevelSet(6);
}
public function GL7(_arg1){
loadLevelSet(7);
}
public function GL8(_arg1){
loadLevelSet(8);
}
public function OL1(_arg1){
selectMapButton(1);
}
public function OL2(_arg1){
selectMapButton(2);
}
public function OL4(_arg1){
selectMapButton(4);
}
public function OL5(_arg1){
selectMapButton(5);
}
public function OL6(_arg1){
selectMapButton(6);
}
public function checkKeyPresses(){
rightKeyPressed = ((isKeyPressed(65)) || (isKeyPressed(37)));
leftKeyPressed = ((isKeyPressed(68)) || (isKeyPressed(39)));
upKeyPressed = ((isKeyPressed(32)) || (isKeyPressed(13)));
downKeyPressed = isKeyPressed(16);
}
public function OL3(_arg1){
selectMapButton(3);
}
}
}//package TentaDrillGame9_fla
Section 57
//GameStory_72 (TentaDrillGame9_fla.GameStory_72)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class GameStory_72 extends MovieClip {
public function GameStory_72(){
addFrameScript(438, frame439);
}
function frame439(){
stop();
MovieClip(parent).cont();
}
}
}//package TentaDrillGame9_fla
Section 58
//GameStoryEND_113 (TentaDrillGame9_fla.GameStoryEND_113)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class GameStoryEND_113 extends MovieClip {
public var MM:SimpleButton;
public var PMG:SimpleButton;
public function GameStoryEND_113(){
addFrameScript(135, frame136);
}
public function PMGCode(_arg1){
MovieClip(root).gotoLink("http://www.armorgames.com");
}
public function MMCode(_arg1){
MM.removeEventListener(MouseEvent.CLICK, MMCode);
PMG.removeEventListener(MouseEvent.CLICK, PMGCode);
MovieClip(root).gotoFrame("TITLE");
}
function frame136(){
stop();
PMG.addEventListener(MouseEvent.CLICK, PMGCode);
MM.addEventListener(MouseEvent.CLICK, MMCode);
}
}
}//package TentaDrillGame9_fla
Section 59
//HUD_157 (TentaDrillGame9_fla.HUD_157)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class HUD_157 extends MovieClip {
public var H4:MovieClip;
public var H3:MovieClip;
public var stageBar:MovieClip;
public var ii:Number;
public var bossBar:MovieClip;
public var i:Number;
public var XPLEVEL:TextField;
public var EVOLVE:MovieClip;
public var PBC:MovieClip;
public var HBM:MovieClip;
public var PBM:MovieClip;
public var MultiLife:MovieClip;
public var expBar:MovieClip;
public var PAUSE:MovieClip;
public var prevBar:MovieClip;
public var H0:MovieClip;
public var H1:MovieClip;
public var H2:MovieClip;
public function HUD_157(){
addFrameScript(0, frame1);
}
function frame1(){
i = 0;
while (i < 5) {
ii = 0;
while (ii < 4) {
this[("H" + i)][("L" + ii)].gotoAndPlay((i * 4));
ii++;
};
i++;
};
HBM.mask = expBar;
PBM.mask = prevBar;
PBC.mask = stageBar;
}
}
}//package TentaDrillGame9_fla
Section 60
//HUD_Bssbar_173 (TentaDrillGame9_fla.HUD_Bssbar_173)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class HUD_Bssbar_173 extends MovieClip {
public var bossBar:MovieClip;
}
}//package TentaDrillGame9_fla
Section 61
//HUD_Evolve_158 (TentaDrillGame9_fla.HUD_Evolve_158)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class HUD_Evolve_158 extends MovieClip {
public var Head:MovieClip;
public var Head1:MovieClip;
public var CONT:MovieClip;
public var Head3:MovieClip;
public var Head2:MovieClip;
public function HUD_Evolve_158(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
Head1.stop();
Head2.stop();
Head3.stop();
Head2.gotoAndStop(30);
}
}
}//package TentaDrillGame9_fla
Section 62
//HUD_Health_174 (TentaDrillGame9_fla.HUD_Health_174)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class HUD_Health_174 extends MovieClip {
public var L2:MovieClip;
public var L0:MovieClip;
public var L3:MovieClip;
public var L1:MovieClip;
}
}//package TentaDrillGame9_fla
Section 63
//HUD_Multilife_177 (TentaDrillGame9_fla.HUD_Multilife_177)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HUD_Multilife_177 extends MovieClip {
public var H:MovieClip;
public var lifeText:TextField;
}
}//package TentaDrillGame9_fla
Section 64
//MainTimeline (TentaDrillGame9_fla.MainTimeline)
package TentaDrillGame9_fla {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import fl.motion.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var WHITEFADE:MovieClip;
public var backBut:SimpleButton;
public var activeLevel:int;
public var BG:MovieClip;
public var creditsActive:Boolean;
public var __setPropDict:Dictionary;
public var myContextMenu:ContextMenu;
public var CompCredits:SimpleButton;
public var CompOptions:Button;
public var CompEraseN:Button;
public var audioActive:Boolean;
public var ERASE:MovieClip;
public var skipBut:SimpleButton;
public var expMaxArray:Array;
public var CompEraseY:Button;
public var savefile:SharedObject;
public var ripplesComplexity:Number;
public var CompErase:SimpleButton;
public var AAQuality:int;
public var HUD:MovieClip;
public var GSE:MovieClip;
public var GS:MovieClip;
public var CompExit:SimpleButton;
public var CompPlay:SimpleButton;
public var ripplesActive:Boolean;
public var CompArmor:SimpleButton;
public var playB:MovieClip;
public var plb:MovieClip;
public var GAME:MovieClip;
public function MainTimeline(){
__setPropDict = new Dictionary(true);
super();
addFrameScript(0, frame1, 1, frame2, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12);
}
public function skipButC(_arg1){
cont();
}
function __setProp_CompOptions_Scene1_Layer3_8(){
try {
CompOptions["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompOptions.emphasized = false;
CompOptions.enabled = true;
CompOptions.label = "Graphics Options";
CompOptions.labelPlacement = "right";
CompOptions.selected = false;
CompOptions.toggle = false;
CompOptions.visible = true;
try {
CompOptions["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function eraseBut(_arg1){
ERASE.y = (ERASE.y - 10000);
CompEraseY.y = (CompEraseY.y - 10000);
CompEraseN.y = (CompEraseN.y - 10000);
}
public function constantFrame(_arg1){
if (WHITEFADE.alpha > 0){
WHITEFADE.scaleX = 1;
WHITEFADE.alpha = (WHITEFADE.alpha - 0.05);
} else {
WHITEFADE.scaleX = 0;
};
}
public function playSound(_arg1){
var _local2:Sound;
var _local3:SoundTransform;
var _local4:SoundChannel;
var _local5:Number;
if (audioActive == true){
_local3 = new SoundTransform();
_local3.volume = 0.5;
if (_arg1 == "EXP"){
_local2 = new SND_EXP();
} else {
if (_arg1 == "SHOOT"){
_local5 = (Math.random() * 3);
if (_local5 < 1){
_local2 = new SND_SHOT1();
} else {
if (_local5 < 2){
_local2 = new SND_SHOT2();
} else {
if (_local5 < 3){
_local2 = new SND_SHOT3();
};
};
};
} else {
if (_arg1 == "ROCK"){
_local5 = (Math.random() * 3);
if (_local5 < 1){
_local2 = new SND_ROCK();
} else {
if (_local5 < 2){
_local2 = new SND_ROCK1();
} else {
if (_local5 < 3){
_local2 = new SND_ROCK2();
};
};
};
} else {
if (_arg1 == "SHELL"){
_local3.volume = 0.75;
_local2 = new SND_SHELL();
} else {
if (_arg1 == "ENEMY"){
_local2 = new SND_ENEMY();
} else {
if (_arg1 == "CHARGE"){
_local2 = new SND_CHARGE();
_local3.volume = 1;
} else {
if (_arg1 == "SMASH"){
_local3.volume = 1;
_local2 = new SND_SMASH();
};
};
};
};
};
};
};
_local4 = new SoundChannel();
_local4.soundTransform = _local3;
_local4 = _local2.play();
};
}
function frame10(){
playGameMusic(4);
BG.BG.BG.gotoAndStop(4);
backBut.addEventListener(MouseEvent.MOUSE_UP, backButC);
skipBut.addEventListener(MouseEvent.MOUSE_UP, skipButC);
}
function frame12(){
stage.quality = StageQuality.MEDIUM;
}
function frame2(){
stop();
}
function frame1(){
addEventListener(Event.ENTER_FRAME, constantFrame);
savefile = SharedObject.getLocal("TENTADRILL8");
newSave();
if (savefile.data.AA == true){
audioActive = true;
} else {
audioActive = false;
};
stop();
playB.visible = false;
addEventListener(Event.ENTER_FRAME, preLoader);
myContextMenu = new ContextMenu();
myContextMenu.hideBuiltInItems();
contextMenu = myContextMenu;
}
function frame9(){
BG.BG.BG.gotoAndStop(5);
playGameMusic(3);
}
public function playGameMusic(_arg1){
var _local2:Sound;
var _local3:SoundChannel;
var _local4:SoundTransform;
if (audioActive == true){
SoundMixer.stopAll();
if (_arg1 == 1){
_local2 = new SND_BOSS();
} else {
if (_arg1 == 2){
_local2 = new SND_LEVEL();
} else {
if (_arg1 == 3){
_local2 = new SND_MENU();
} else {
if (_arg1 == 4){
_local2 = new SND_INTRO();
};
};
};
};
_local3 = new SoundChannel();
_local4 = new SoundTransform();
_local4.volume = 0.25;
_local3.soundTransform = _local4;
_local3 = _local2.play(0, 999);
};
}
function frame8(){
if ((((__setPropDict[CompEraseY] == undefined)) || (!((int(__setPropDict[CompEraseY]) == 8))))){
__setPropDict[CompEraseY] = currentFrame;
__setProp_CompEraseY_Scene1_Layer6_8();
};
if ((((__setPropDict[CompEraseN] == undefined)) || (!((int(__setPropDict[CompEraseN]) == 8))))){
__setPropDict[CompEraseN] = currentFrame;
__setProp_CompEraseN_Scene1_Layer6_8();
};
if ((((__setPropDict[CompOptions] == undefined)) || (!((int(__setPropDict[CompOptions]) == 8))))){
__setPropDict[CompOptions] = currentFrame;
__setProp_CompOptions_Scene1_Layer3_8();
};
activeLevel = 0;
playGameMusic(3);
BG.BG.BG.gotoAndStop(1);
stage.quality = StageQuality.HIGH;
stop();
activeLevel = 0;
expMaxArray = new Array(80, 160, 300, 350, 400, 400, 400, 400, 99999, 99999, 99999, 99999, 99999);
ripplesActive = true;
ripplesComplexity = 1;
AAQuality = 1;
creditsActive = false;
CompPlay.addEventListener(MouseEvent.CLICK, playBut);
CompOptions.addEventListener(MouseEvent.CLICK, optionsBut);
CompCredits.addEventListener(MouseEvent.CLICK, creditsBut);
CompExit.addEventListener(MouseEvent.CLICK, MU);
CompExit.x = (CompExit.x - 1000);
CompArmor.addEventListener(MouseEvent.CLICK, armorBut);
CompErase.addEventListener(MouseEvent.CLICK, eraseBut);
CompEraseY.addEventListener(MouseEvent.CLICK, eraseYBut);
CompEraseN.addEventListener(MouseEvent.CLICK, eraseNBut);
ERASE.y = (ERASE.y + 10000);
CompEraseY.y = (CompEraseY.y + 10000);
CompEraseN.y = (CompEraseN.y + 10000);
}
public function preLoader(_arg1:Event){
var _local2:*;
var _local3:*;
_local2 = stage.loaderInfo.bytesTotal;
_local3 = stage.loaderInfo.bytesLoaded;
plb.scaleX = ((1 / _local2) * _local3);
if (_local3 >= _local2){
removeEventListener(Event.ENTER_FRAME, preLoader);
play();
};
}
public function playBut(_arg1){
CompArmor.removeEventListener(MouseEvent.CLICK, playBut);
stage.removeEventListener(MouseEvent.MOUSE_UP, MU);
CompPlay.removeEventListener(MouseEvent.CLICK, playBut);
CompOptions.removeEventListener(MouseEvent.CLICK, optionsBut);
CompCredits.removeEventListener(MouseEvent.CLICK, creditsBut);
CompErase.removeEventListener(MouseEvent.CLICK, eraseBut);
CompEraseY.removeEventListener(MouseEvent.CLICK, eraseYBut);
CompEraseN.removeEventListener(MouseEvent.CLICK, eraseNBut);
BG.BG.BG.gotoAndStop(2);
gotoFrame("START");
}
public function setFlash(_arg1:Number=1, _arg2=1){
if (_arg2 == 1){
_arg2 = WHITEFADE;
};
_arg2.scaleX = 1;
_arg2.alpha = _arg1;
}
function frame11(){
playGameMusic(4);
}
public function armorBut(_arg1){
gotoLink("http://www.armorgames.com");
}
public function eraseNBut(_arg1){
ERASE.y = (ERASE.y + 10000);
CompEraseY.y = (CompEraseY.y + 10000);
CompEraseN.y = (CompEraseN.y + 10000);
}
public function eraseYBut(_arg1){
ERASE.y = (ERASE.y + 10000);
CompEraseY.y = (CompEraseY.y + 10000);
CompEraseN.y = (CompEraseN.y + 10000);
savefile.data.medals = undefined;
newSave();
}
public function optionsBut(_arg1){
var _local2:MovieClip;
_local2 = new OPTIONS();
addChild(_local2);
}
function __setProp_CompEraseY_Scene1_Layer6_8(){
try {
CompEraseY["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompEraseY.emphasized = false;
CompEraseY.enabled = true;
CompEraseY.label = "Erase Data";
CompEraseY.labelPlacement = "right";
CompEraseY.selected = false;
CompEraseY.toggle = false;
CompEraseY.visible = true;
try {
CompEraseY["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_CompEraseN_Scene1_Layer6_8(){
try {
CompEraseN["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompEraseN.emphasized = false;
CompEraseN.enabled = true;
CompEraseN.label = "Cancel";
CompEraseN.labelPlacement = "right";
CompEraseN.selected = false;
CompEraseN.toggle = false;
CompEraseN.visible = true;
try {
CompEraseN["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function cont(){
backBut.removeEventListener(MouseEvent.MOUSE_UP, backButC);
skipBut.removeEventListener(MouseEvent.MOUSE_UP, skipButC);
MovieClip(root).gotoFrame("MAP");
}
public function newSave(){
if (savefile.data.medals == undefined){
savefile.data.AA = true;
savefile.data.tentExp = 0;
savefile.data.tentLevel = 1;
savefile.data.medals = new Array();
savefile.data.medalsT = new Array();
savefile.data.medalsL = new Array();
savefile.data.medalsP = new Array();
};
}
public function backButC(_arg1){
backBut.removeEventListener(MouseEvent.MOUSE_UP, backButC);
skipBut.removeEventListener(MouseEvent.MOUSE_UP, skipButC);
MovieClip(root).gotoFrame("TITLE");
}
public function creditsBut(_arg1){
BG.BG.BG.gotoAndStop(3);
creditsActive = true;
CompExit.x = (CompExit.x + 1000);
CompArmor.x = (CompArmor.x - 1000);
CompErase.x = (CompErase.x - 1000);
CompCredits.x = (CompCredits.x - 1000);
CompPlay.x = (CompPlay.x - 1000);
CompOptions.x = (CompOptions.x - 1000);
}
public function changeColour(_arg1, _arg2, _arg3){
var _local4:Color;
_local4 = new Color();
_local4.setTint(_arg2, _arg3);
_arg1.transform.colorTransform = _local4;
}
public function addRock(_arg1){
trace("HERE");
}
public function MU(_arg1){
BG.BG.BG.gotoAndStop(1);
CompExit.x = (CompExit.x - 1000);
CompCredits.x = (CompCredits.x + 1000);
CompPlay.x = (CompPlay.x + 1000);
CompArmor.x = (CompArmor.x + 1000);
CompOptions.x = (CompOptions.x + 1000);
CompErase.x = (CompErase.x + 1000);
}
public function gotoFrame(_arg1){
WHITEFADE.alpha = 1.2;
WHITEFADE.scaleX = 1;
gotoAndStop(_arg1);
}
public function deleteEngine(){
removeChild(GAME);
GAME = null;
trace((System.totalMemory / 1000));
gotoFrame("MAP");
}
public function flipAudioActive(){
if (audioActive == false){
audioActive = true;
savefile.data.AA = true;
} else {
savefile.data.AA = false;
audioActive = false;
};
}
public function gotoLink(_arg1){
var url:String;
var request:URLRequest;
var targ = _arg1;
url = targ;
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
};
}
}
}//package TentaDrillGame9_fla
Section 65
//MAP_Button_small_56 (TentaDrillGame9_fla.MAP_Button_small_56)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.text.*;
public dynamic class MAP_Button_small_56 extends MovieClip {
public var exp:MovieClip;
public var nameText:TextField;
public var BOSS:MovieClip;
public var fader:MovieClip;
public var num:String;
public var sprite:MovieClip;
public var expBlack:MovieClip;
public var expText:TextField;
public function MAP_Button_small_56(){
addFrameScript(0, frame1);
}
function frame1(){
num = this.name.charAt(5);
nameText.text = ("Stage " + num);
stop();
}
}
}//package TentaDrillGame9_fla
Section 66
//MENU_Arrow_Sprite_63 (TentaDrillGame9_fla.MENU_Arrow_Sprite_63)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class MENU_Arrow_Sprite_63 extends MovieClip {
public var Head:MovieClip;
}
}//package TentaDrillGame9_fla
Section 67
//MenuscreenBG_15 (TentaDrillGame9_fla.MenuscreenBG_15)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.text.*;
public dynamic class MenuscreenBG_15 extends MovieClip {
public var luText:TextField;
public var dateString:String;
public var BGCOL:MovieClip;
public var date:Date;
public function MenuscreenBG_15(){
addFrameScript(0, frame1, 2, frame3);
}
function frame3(){
date = new Date();
dateString = "";
dateString = (dateString + date.fullYear);
if (date.month < 10){
dateString = (dateString + "0");
};
dateString = (dateString + date.month);
if (Number(dateString) > 200902){
luText.text = "LUCY LAVELLE";
};
}
function frame1(){
stop();
}
}
}//package TentaDrillGame9_fla
Section 68
//MenuScreenBGContainer_14 (TentaDrillGame9_fla.MenuScreenBGContainer_14)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class MenuScreenBGContainer_14 extends MovieClip {
public var BG:MovieClip;
}
}//package TentaDrillGame9_fla
Section 69
//Notes_Layer_149 (TentaDrillGame9_fla.Notes_Layer_149)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class Notes_Layer_149 extends MovieClip {
public function Notes_Layer_149(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TentaDrillGame9_fla
Section 70
//playB_7 (TentaDrillGame9_fla.playB_7)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class playB_7 extends MovieClip {
public var playB:SimpleButton;
}
}//package TentaDrillGame9_fla
Section 71
//Rock_Large_170 (TentaDrillGame9_fla.Rock_Large_170)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Rock_Large_170 extends MovieClip {
public var rockType:int;
public function Rock_Large_170(){
addFrameScript(0, frame1);
}
function frame1(){
rockType = 1;
MovieClip(root).GAME.GAME.addRock(this);
}
}
}//package TentaDrillGame9_fla
Section 72
//Rock_Large_black_234 (TentaDrillGame9_fla.Rock_Large_black_234)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Rock_Large_black_234 extends MovieClip {
public var rockType:int;
public function Rock_Large_black_234(){
addFrameScript(0, frame1);
}
function frame1(){
rockType = 2;
MovieClip(root).GAME.GAME.addRock(this);
}
}
}//package TentaDrillGame9_fla
Section 73
//Rock_Large_Red_168 (TentaDrillGame9_fla.Rock_Large_Red_168)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Rock_Large_Red_168 extends MovieClip {
public var rockType:int;
public function Rock_Large_Red_168(){
addFrameScript(0, frame1);
}
function frame1(){
rockType = 0;
MovieClip(root).GAME.GAME.addRock(this);
}
}
}//package TentaDrillGame9_fla
Section 74
//Rock_Medium_231 (TentaDrillGame9_fla.Rock_Medium_231)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Rock_Medium_231 extends MovieClip {
public var rockType:int;
public function Rock_Medium_231(){
addFrameScript(0, frame1);
}
function frame1(){
rockType = 1;
MovieClip(root).GAME.GAME.addRock(this);
}
}
}//package TentaDrillGame9_fla
Section 75
//Rock_Medium_black_238 (TentaDrillGame9_fla.Rock_Medium_black_238)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Rock_Medium_black_238 extends MovieClip {
public var rockType:int;
public function Rock_Medium_black_238(){
addFrameScript(0, frame1);
}
function frame1(){
rockType = 2;
MovieClip(root).GAME.GAME.addRock(this);
}
}
}//package TentaDrillGame9_fla
Section 76
//Rock_Medium_Red_230 (TentaDrillGame9_fla.Rock_Medium_Red_230)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Rock_Medium_Red_230 extends MovieClip {
public var rockType:int;
public function Rock_Medium_Red_230(){
addFrameScript(0, frame1);
}
function frame1(){
rockType = 0;
MovieClip(root).GAME.GAME.addRock(this);
}
}
}//package TentaDrillGame9_fla
Section 77
//Rock_Small_black_235 (TentaDrillGame9_fla.Rock_Small_black_235)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Rock_Small_black_235 extends MovieClip {
public var rockType:int;
public function Rock_Small_black_235(){
addFrameScript(0, frame1);
}
function frame1(){
rockType = 2;
MovieClip(root).GAME.GAME.addRock(this);
}
}
}//package TentaDrillGame9_fla
Section 78
//Spawner_Boss1_202 (TentaDrillGame9_fla.Spawner_Boss1_202)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Spawner_Boss1_202 extends MovieClip {
public var enemyType:int;
public function Spawner_Boss1_202(){
addFrameScript(0, frame1);
}
function frame1(){
enemyType = 5;
MovieClip(root).GAME.GAME.addSpawn(this);
}
}
}//package TentaDrillGame9_fla
Section 79
//Spawner_Boss2_206 (TentaDrillGame9_fla.Spawner_Boss2_206)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Spawner_Boss2_206 extends MovieClip {
public var enemyType:int;
public function Spawner_Boss2_206(){
addFrameScript(0, frame1);
}
function frame1(){
enemyType = 7;
MovieClip(root).GAME.GAME.addSpawn(this);
}
}
}//package TentaDrillGame9_fla
Section 80
//Spawner_Boss3_204 (TentaDrillGame9_fla.Spawner_Boss3_204)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Spawner_Boss3_204 extends MovieClip {
public var enemyType:int;
public function Spawner_Boss3_204(){
addFrameScript(0, frame1);
}
function frame1(){
enemyType = 8;
MovieClip(root).GAME.GAME.addSpawn(this);
}
}
}//package TentaDrillGame9_fla
Section 81
//Spawner_Chomper_191 (TentaDrillGame9_fla.Spawner_Chomper_191)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Spawner_Chomper_191 extends MovieClip {
public var enemyType:int;
public function Spawner_Chomper_191(){
addFrameScript(0, frame1);
}
function frame1(){
enemyType = 2;
MovieClip(root).GAME.GAME.addSpawn(this);
}
}
}//package TentaDrillGame9_fla
Section 82
//Spawner_EOL_194 (TentaDrillGame9_fla.Spawner_EOL_194)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Spawner_EOL_194 extends MovieClip {
public var enemyType:int;
public function Spawner_EOL_194(){
addFrameScript(0, frame1);
}
function frame1(){
enemyType = 9;
MovieClip(root).GAME.GAME.addSpawn(this);
}
}
}//package TentaDrillGame9_fla
Section 83
//Spawner_Hooker_196 (TentaDrillGame9_fla.Spawner_Hooker_196)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Spawner_Hooker_196 extends MovieClip {
public var enemyType:int;
public function Spawner_Hooker_196(){
addFrameScript(0, frame1);
}
function frame1(){
enemyType = 3;
MovieClip(root).GAME.GAME.addSpawn(this, MovieClip(parent).currentFrame);
}
}
}//package TentaDrillGame9_fla
Section 84
//Spawner_Mine_192 (TentaDrillGame9_fla.Spawner_Mine_192)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Spawner_Mine_192 extends MovieClip {
public var enemyType:int;
public function Spawner_Mine_192(){
addFrameScript(0, frame1);
}
function frame1(){
enemyType = 1;
MovieClip(root).GAME.GAME.addSpawn(this);
}
}
}//package TentaDrillGame9_fla
Section 85
//Spawner_Ring_183 (TentaDrillGame9_fla.Spawner_Ring_183)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Spawner_Ring_183 extends MovieClip {
public var enemyType:int;
public function Spawner_Ring_183(){
addFrameScript(0, frame1);
}
function frame1(){
enemyType = 0;
MovieClip(root).GAME.GAME.addSpawn(this);
}
}
}//package TentaDrillGame9_fla
Section 86
//Spawner_Shell_180 (TentaDrillGame9_fla.Spawner_Shell_180)
package TentaDrillGame9_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Spawner_Shell_180 extends MovieClip {
public var enemyType:int;
public function Spawner_Shell_180(){
addFrameScript(0, frame1);
}
function frame1(){
enemyType = 6;
MovieClip(root).GAME.GAME.addSpawn(this, MovieClip(parent).currentFrame);
}
}
}//package TentaDrillGame9_fla
Section 87
//Symbol299_337 (TentaDrillGame9_fla.Symbol299_337)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class Symbol299_337 extends MovieClip {
public function Symbol299_337(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TentaDrillGame9_fla
Section 88
//Symbol376_73 (TentaDrillGame9_fla.Symbol376_73)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class Symbol376_73 extends MovieClip {
public function Symbol376_73(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package TentaDrillGame9_fla
Section 89
//System_BGCOlourgame_16 (TentaDrillGame9_fla.System_BGCOlourgame_16)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class System_BGCOlourgame_16 extends MovieClip {
public function System_BGCOlourgame_16(){
addFrameScript(0, frame1, 4, frame5, 8, frame9);
}
function frame1(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
}
}//package TentaDrillGame9_fla
Section 90
//SystemSquare_147 (TentaDrillGame9_fla.SystemSquare_147)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class SystemSquare_147 extends MovieClip {
public function SystemSquare_147(){
addFrameScript(0, frame1);
}
function frame1(){
alpha = 0;
}
}
}//package TentaDrillGame9_fla
Section 91
//TENT_148 (TentaDrillGame9_fla.TENT_148)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class TENT_148 extends MovieClip {
public var Head:MovieClip;
}
}//package TentaDrillGame9_fla
Section 92
//TENT_head_64 (TentaDrillGame9_fla.TENT_head_64)
package TentaDrillGame9_fla {
import flash.display.*;
public dynamic class TENT_head_64 extends MovieClip {
public var THP_L:MovieClip;
public function TENT_head_64(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package TentaDrillGame9_fla
Section 93
//BOSS1 (BOSS1)
package {
import flash.display.*;
public dynamic class BOSS1 extends MovieClip {
public var PROPS:MovieClip;
public var CLAW:MovieClip;
public var flag:MovieClip;
public var hit:MovieClip;
}
}//package
Section 94
//boss2 (boss2)
package {
import flash.display.*;
public dynamic class boss2 extends MovieClip {
public var leg1:MovieClip;
public var leg2:MovieClip;
public var tail:MovieClip;
public var flag:MovieClip;
public var hit:MovieClip;
public var DBF1:MovieClip;
public var DBF2:MovieClip;
public var DB:MovieClip;
public var head:MovieClip;
public var leg3:MovieClip;
public var leg4:MovieClip;
}
}//package
Section 95
//boss3 (boss3)
package {
import flash.display.*;
public dynamic class boss3 extends MovieClip {
public var flag:MovieClip;
public var hit:MovieClip;
public var mouth:MovieClip;
}
}//package
Section 96
//bullet_ENEMY (bullet_ENEMY)
package {
import flash.display.*;
public dynamic class bullet_ENEMY extends MovieClip {
}
}//package
Section 97
//bullet_TENT (bullet_TENT)
package {
import flash.display.*;
public dynamic class bullet_TENT extends MovieClip {
public var S1:MovieClip;
public var S2:MovieClip;
}
}//package
Section 98
//Button_disabledSkin (Button_disabledSkin)
package {
import flash.display.*;
public dynamic class Button_disabledSkin extends MovieClip {
}
}//package
Section 99
//Button_downSkin (Button_downSkin)
package {
import flash.display.*;
public dynamic class Button_downSkin extends MovieClip {
}
}//package
Section 100
//Button_emphasizedSkin (Button_emphasizedSkin)
package {
import flash.display.*;
public dynamic class Button_emphasizedSkin extends MovieClip {
}
}//package
Section 101
//Button_overSkin (Button_overSkin)
package {
import flash.display.*;
public dynamic class Button_overSkin extends MovieClip {
}
}//package
Section 102
//Button_selectedDisabledSkin (Button_selectedDisabledSkin)
package {
import flash.display.*;
public dynamic class Button_selectedDisabledSkin extends MovieClip {
}
}//package
Section 103
//Button_selectedDownSkin (Button_selectedDownSkin)
package {
import flash.display.*;
public dynamic class Button_selectedDownSkin extends MovieClip {
}
}//package
Section 104
//Button_selectedOverSkin (Button_selectedOverSkin)
package {
import flash.display.*;
public dynamic class Button_selectedOverSkin extends MovieClip {
}
}//package
Section 105
//Button_selectedUpSkin (Button_selectedUpSkin)
package {
import flash.display.*;
public dynamic class Button_selectedUpSkin extends MovieClip {
}
}//package
Section 106
//Button_upSkin (Button_upSkin)
package {
import flash.display.*;
public dynamic class Button_upSkin extends MovieClip {
}
}//package
Section 107
//CellRenderer_disabledSkin (CellRenderer_disabledSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_disabledSkin extends MovieClip {
}
}//package
Section 108
//CellRenderer_downSkin (CellRenderer_downSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_downSkin extends MovieClip {
}
}//package
Section 109
//CellRenderer_overSkin (CellRenderer_overSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_overSkin extends MovieClip {
}
}//package
Section 110
//CellRenderer_selectedDisabledSkin (CellRenderer_selectedDisabledSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedDisabledSkin extends MovieClip {
}
}//package
Section 111
//CellRenderer_selectedDownSkin (CellRenderer_selectedDownSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedDownSkin extends MovieClip {
}
}//package
Section 112
//CellRenderer_selectedOverSkin (CellRenderer_selectedOverSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedOverSkin extends MovieClip {
}
}//package
Section 113
//CellRenderer_selectedUpSkin (CellRenderer_selectedUpSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedUpSkin extends MovieClip {
}
}//package
Section 114
//CellRenderer_upSkin (CellRenderer_upSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_upSkin extends MovieClip {
}
}//package
Section 115
//CheckBox_disabledIcon (CheckBox_disabledIcon)
package {
import flash.display.*;
public dynamic class CheckBox_disabledIcon extends MovieClip {
}
}//package
Section 116
//CheckBox_downIcon (CheckBox_downIcon)
package {
import flash.display.*;
public dynamic class CheckBox_downIcon extends MovieClip {
}
}//package
Section 117
//CheckBox_overIcon (CheckBox_overIcon)
package {
import flash.display.*;
public dynamic class CheckBox_overIcon extends MovieClip {
}
}//package
Section 118
//CheckBox_selectedDisabledIcon (CheckBox_selectedDisabledIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedDisabledIcon extends MovieClip {
}
}//package
Section 119
//CheckBox_selectedDownIcon (CheckBox_selectedDownIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedDownIcon extends MovieClip {
}
}//package
Section 120
//CheckBox_selectedOverIcon (CheckBox_selectedOverIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedOverIcon extends MovieClip {
}
}//package
Section 121
//CheckBox_selectedUpIcon (CheckBox_selectedUpIcon)
package {
import flash.display.*;
public dynamic class CheckBox_selectedUpIcon extends MovieClip {
}
}//package
Section 122
//CheckBox_upIcon (CheckBox_upIcon)
package {
import flash.display.*;
public dynamic class CheckBox_upIcon extends MovieClip {
}
}//package
Section 123
//Effect_Bubble (Effect_Bubble)
package {
import flash.display.*;
public dynamic class Effect_Bubble extends MovieClip {
}
}//package
Section 124
//Effect_Shockwave (Effect_Shockwave)
package {
import flash.display.*;
public dynamic class Effect_Shockwave extends MovieClip {
}
}//package
Section 125
//ENEMY_BOMBER (ENEMY_BOMBER)
package {
import flash.display.*;
public dynamic class ENEMY_BOMBER extends MovieClip {
}
}//package
Section 126
//ENEMY_CHOMPER (ENEMY_CHOMPER)
package {
import flash.display.*;
public dynamic class ENEMY_CHOMPER extends MovieClip {
}
}//package
Section 127
//ENEMY_HOOKER (ENEMY_HOOKER)
package {
import flash.display.*;
public dynamic class ENEMY_HOOKER extends MovieClip {
}
}//package
Section 128
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 129
//List_skin (List_skin)
package {
import flash.display.*;
public dynamic class List_skin extends MovieClip {
}
}//package
Section 130
//LS1 (LS1)
package {
import flash.display.*;
public dynamic class LS1 extends MovieClip {
}
}//package
Section 131
//LS2 (LS2)
package {
import flash.display.*;
public dynamic class LS2 extends MovieClip {
}
}//package
Section 132
//LS3 (LS3)
package {
import flash.display.*;
public dynamic class LS3 extends MovieClip {
}
}//package
Section 133
//LS4 (LS4)
package {
import flash.display.*;
public dynamic class LS4 extends MovieClip {
}
}//package
Section 134
//LS5 (LS5)
package {
import flash.display.*;
public dynamic class LS5 extends MovieClip {
}
}//package
Section 135
//LS6 (LS6)
package {
import flash.display.*;
public dynamic class LS6 extends MovieClip {
}
}//package
Section 136
//LS7 (LS7)
package {
import flash.display.*;
public dynamic class LS7 extends MovieClip {
}
}//package
Section 137
//LS8 (LS8)
package {
import flash.display.*;
public dynamic class LS8 extends MovieClip {
}
}//package
Section 138
//LS9 (LS9)
package {
import flash.display.*;
public dynamic class LS9 extends MovieClip {
}
}//package
Section 139
//LT1 (LT1)
package {
import flash.display.*;
public dynamic class LT1 extends MovieClip {
}
}//package
Section 140
//LT2 (LT2)
package {
import flash.display.*;
public dynamic class LT2 extends MovieClip {
}
}//package
Section 141
//LT3 (LT3)
package {
import flash.display.*;
public dynamic class LT3 extends MovieClip {
}
}//package
Section 142
//LT4 (LT4)
package {
import flash.display.*;
public dynamic class LT4 extends MovieClip {
}
}//package
Section 143
//LT5 (LT5)
package {
import flash.display.*;
public dynamic class LT5 extends MovieClip {
}
}//package
Section 144
//LT6 (LT6)
package {
import flash.display.*;
public dynamic class LT6 extends MovieClip {
}
}//package
Section 145
//LT7 (LT7)
package {
import flash.display.*;
public dynamic class LT7 extends MovieClip {
}
}//package
Section 146
//LT8 (LT8)
package {
import flash.display.*;
public dynamic class LT8 extends MovieClip {
}
}//package
Section 147
//LT9 (LT9)
package {
import flash.display.*;
public dynamic class LT9 extends MovieClip {
}
}//package
Section 148
//NumericStepperDownArrow_disabledSkin (NumericStepperDownArrow_disabledSkin)
package {
import flash.display.*;
public dynamic class NumericStepperDownArrow_disabledSkin extends MovieClip {
}
}//package
Section 149
//NumericStepperDownArrow_downSkin (NumericStepperDownArrow_downSkin)
package {
import flash.display.*;
public dynamic class NumericStepperDownArrow_downSkin extends MovieClip {
}
}//package
Section 150
//NumericStepperDownArrow_overSkin (NumericStepperDownArrow_overSkin)
package {
import flash.display.*;
public dynamic class NumericStepperDownArrow_overSkin extends MovieClip {
}
}//package
Section 151
//NumericStepperDownArrow_upSkin (NumericStepperDownArrow_upSkin)
package {
import flash.display.*;
public dynamic class NumericStepperDownArrow_upSkin extends MovieClip {
}
}//package
Section 152
//NumericStepperUpArrow_disabledSkin (NumericStepperUpArrow_disabledSkin)
package {
import flash.display.*;
public dynamic class NumericStepperUpArrow_disabledSkin extends MovieClip {
}
}//package
Section 153
//NumericStepperUpArrow_downSkin (NumericStepperUpArrow_downSkin)
package {
import flash.display.*;
public dynamic class NumericStepperUpArrow_downSkin extends MovieClip {
}
}//package
Section 154
//NumericStepperUpArrow_overSkin (NumericStepperUpArrow_overSkin)
package {
import flash.display.*;
public dynamic class NumericStepperUpArrow_overSkin extends MovieClip {
}
}//package
Section 155
//NumericStepperUpArrow_upSkin (NumericStepperUpArrow_upSkin)
package {
import flash.display.*;
public dynamic class NumericStepperUpArrow_upSkin extends MovieClip {
}
}//package
Section 156
//OPTIONS (OPTIONS)
package {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class OPTIONS extends MovieClip {
public var CompPlay:Button;
public var CompGrid:CheckBox;
public var CompRipples:CheckBox;
public var CompBubbles:CheckBox;
public var CompQL:RadioButton;
public var __id1_:Label;
public var CompQH:RadioButton;
public var CompQM:RadioButton;
public var __id2_:Label;
public var CompRL:RadioButton;
public var CompRH:RadioButton;
public var CompRM:RadioButton;
public var CompRG:RadioButton;
public function OPTIONS(){
addFrameScript(0, frame1);
__setProp_CompPlay_SYSTEM_Options_Layer1_1();
__setProp___id2__SYSTEM_Options_Layer1_1();
__setProp_CompRG_SYSTEM_Options_Layer1_1();
__setProp_CompBubbles_SYSTEM_Options_Layer1_1();
__setProp_CompGrid_SYSTEM_Options_Layer1_1();
__setProp___id1__SYSTEM_Options_Layer1_1();
__setProp_CompRM_SYSTEM_Options_Layer1_1();
__setProp_CompRipples_SYSTEM_Options_Layer1_1();
__setProp_CompQL_SYSTEM_Options_Layer1_1();
__setProp_CompQH_SYSTEM_Options_Layer1_1();
__setProp_CompQM_SYSTEM_Options_Layer1_1();
__setProp_CompRL_SYSTEM_Options_Layer1_1();
__setProp_CompRH_SYSTEM_Options_Layer1_1();
}
public function okBut(_arg1){
removeEventListener(Event.ENTER_FRAME, EF);
CompPlay.removeEventListener(MouseEvent.CLICK, okBut);
parent.removeChild(this);
delete ??getglobalscope
[this];
}
public function cycleOptions(){
if (CompRipples.selected == false){
CompRH.enabled = false;
CompRM.enabled = false;
CompRL.enabled = false;
CompRG.enabled = false;
} else {
CompRH.enabled = true;
CompRM.enabled = true;
CompRL.enabled = true;
CompRG.enabled = true;
};
MovieClip(root).ripplesActive = CompRipples.selected;
if (CompRG.selected){
MovieClip(root).ripplesComplexity = CompRG.value;
} else {
if (CompRL.selected){
MovieClip(root).ripplesComplexity = CompRL.value;
} else {
if (CompRM.selected){
MovieClip(root).ripplesComplexity = CompRM.value;
} else {
if (CompRH.selected){
MovieClip(root).ripplesComplexity = CompRH.value;
};
};
};
};
if (CompQL.selected){
stage.quality = StageQuality.LOW;
MovieClip(root).AAQuality = 3;
} else {
if (CompQM.selected){
stage.quality = StageQuality.MEDIUM;
MovieClip(root).AAQuality = 2;
} else {
if (CompQH.selected){
stage.quality = StageQuality.HIGH;
MovieClip(root).AAQuality = 1;
};
};
};
}
function __setProp_CompRipples_SYSTEM_Options_Layer1_1(){
try {
CompRipples["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompRipples.enabled = true;
CompRipples.label = "3D Ripples";
CompRipples.labelPlacement = "right";
CompRipples.selected = true;
CompRipples.visible = true;
try {
CompRipples["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_CompQH_SYSTEM_Options_Layer1_1(){
try {
CompQH["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompQH.enabled = true;
CompQH.groupName = "QualityGroup";
CompQH.label = "High";
CompQH.labelPlacement = "right";
CompQH.selected = true;
CompQH.value = "1";
CompQH.visible = true;
try {
CompQH["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_CompQL_SYSTEM_Options_Layer1_1(){
try {
CompQL["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompQL.enabled = true;
CompQL.groupName = "QualityGroup";
CompQL.label = "Low";
CompQL.labelPlacement = "right";
CompQL.selected = false;
CompQL.value = "3";
CompQL.visible = true;
try {
CompQL["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id1__SYSTEM_Options_Layer1_1(){
try {
__id1_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id1_.autoSize = "none";
__id1_.condenseWhite = false;
__id1_.enabled = true;
__id1_.htmlText = "";
__id1_.selectable = false;
__id1_.text = "Graphics Options";
__id1_.visible = true;
__id1_.wordWrap = false;
try {
__id1_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_CompPlay_SYSTEM_Options_Layer1_1(){
try {
CompPlay["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompPlay.emphasized = false;
CompPlay.enabled = true;
CompPlay.label = "Done";
CompPlay.labelPlacement = "right";
CompPlay.selected = false;
CompPlay.toggle = false;
CompPlay.visible = true;
try {
CompPlay["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp___id2__SYSTEM_Options_Layer1_1(){
try {
__id2_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id2_.autoSize = "none";
__id2_.condenseWhite = false;
__id2_.enabled = true;
__id2_.htmlText = "";
__id2_.selectable = false;
__id2_.text = "AA Quality";
__id2_.visible = true;
__id2_.wordWrap = false;
try {
__id2_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_CompRG_SYSTEM_Options_Layer1_1(){
try {
CompRG["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompRG.enabled = true;
CompRG.groupName = "RipplesGroup";
CompRG.label = "Gameboy";
CompRG.labelPlacement = "right";
CompRG.selected = false;
CompRG.value = "2.5";
CompRG.visible = true;
try {
CompRG["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_CompGrid_SYSTEM_Options_Layer1_1(){
try {
CompGrid["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompGrid.enabled = true;
CompGrid.label = "Grid";
CompGrid.labelPlacement = "right";
CompGrid.selected = true;
CompGrid.visible = true;
try {
CompGrid["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_CompQM_SYSTEM_Options_Layer1_1(){
try {
CompQM["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompQM.enabled = true;
CompQM.groupName = "QualityGroup";
CompQM.label = "Med";
CompQM.labelPlacement = "right";
CompQM.selected = false;
CompQM.value = "2";
CompQM.visible = true;
try {
CompQM["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_CompBubbles_SYSTEM_Options_Layer1_1(){
try {
CompBubbles["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompBubbles.enabled = true;
CompBubbles.label = "Bubbles";
CompBubbles.labelPlacement = "right";
CompBubbles.selected = true;
CompBubbles.visible = true;
try {
CompBubbles["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_CompRL_SYSTEM_Options_Layer1_1(){
try {
CompRL["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompRL.enabled = true;
CompRL.groupName = "RipplesGroup";
CompRL.label = "Low";
CompRL.labelPlacement = "right";
CompRL.selected = false;
CompRL.value = "2";
CompRL.visible = true;
try {
CompRL["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function frame1(){
if (MovieClip(root).ripplesComplexity == 1){
CompRH.selected = true;
} else {
if (MovieClip(root).ripplesComplexity == 1.5){
CompRM.selected = true;
} else {
if (MovieClip(root).ripplesComplexity == 2){
CompRL.selected = true;
} else {
if (MovieClip(root).ripplesComplexity == 2.5){
CompRG.selected = true;
};
};
};
};
if (MovieClip(root).AAQuality == 3){
CompQL.selected = true;
} else {
if (MovieClip(root).AAQuality == 2){
CompQM.selected = true;
} else {
if (MovieClip(root).AAQuality == 1){
CompQH.selected = true;
};
};
};
stop();
cycleOptions();
addEventListener(Event.ENTER_FRAME, EF);
CompPlay.addEventListener(MouseEvent.CLICK, okBut);
}
public function EF(_arg1){
cycleOptions();
}
function __setProp_CompRH_SYSTEM_Options_Layer1_1(){
try {
CompRH["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompRH.enabled = true;
CompRH.groupName = "RipplesGroup";
CompRH.label = "High";
CompRH.labelPlacement = "right";
CompRH.selected = false;
CompRH.value = "1";
CompRH.visible = true;
try {
CompRH["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
function __setProp_CompRM_SYSTEM_Options_Layer1_1(){
try {
CompRM["componentInspectorSetting"] = true;
} catch(e:Error) {
};
CompRM.enabled = true;
CompRM.groupName = "RipplesGroup";
CompRM.label = "Med";
CompRM.labelPlacement = "right";
CompRM.selected = true;
CompRM.value = "1.5";
CompRM.visible = true;
try {
CompRM["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 157
//PR (PR)
package {
import flash.display.*;
public dynamic class PR extends MovieClip {
}
}//package
Section 158
//RadioButton_disabledIcon (RadioButton_disabledIcon)
package {
import flash.display.*;
public dynamic class RadioButton_disabledIcon extends MovieClip {
}
}//package
Section 159
//RadioButton_downIcon (RadioButton_downIcon)
package {
import flash.display.*;
public dynamic class RadioButton_downIcon extends MovieClip {
}
}//package
Section 160
//RadioButton_overIcon (RadioButton_overIcon)
package {
import flash.display.*;
public dynamic class RadioButton_overIcon extends MovieClip {
}
}//package
Section 161
//RadioButton_selectedDisabledIcon (RadioButton_selectedDisabledIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedDisabledIcon extends MovieClip {
}
}//package
Section 162
//RadioButton_selectedDownIcon (RadioButton_selectedDownIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedDownIcon extends MovieClip {
}
}//package
Section 163
//RadioButton_selectedOverIcon (RadioButton_selectedOverIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedOverIcon extends MovieClip {
}
}//package
Section 164
//RadioButton_selectedUpIcon (RadioButton_selectedUpIcon)
package {
import flash.display.*;
public dynamic class RadioButton_selectedUpIcon extends MovieClip {
}
}//package
Section 165
//RadioButton_upIcon (RadioButton_upIcon)
package {
import flash.display.*;
public dynamic class RadioButton_upIcon extends MovieClip {
}
}//package
Section 166
//Rock_Small (Rock_Small)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Rock_Small extends MovieClip {
public var rockType:int;
public function Rock_Small(){
addFrameScript(0, frame1);
}
function frame1(){
rockType = 1;
MovieClip(root).GAME.GAME.addRock(this);
}
}
}//package
Section 167
//Rock_Small_red (Rock_Small_red)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
import flash.media.*;
import flash.filters.*;
import flash.ui.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class Rock_Small_red extends MovieClip {
public var rockType:int;
public function Rock_Small_red(){
addFrameScript(0, frame1);
}
function frame1(){
rockType = 0;
MovieClip(root).GAME.GAME.addRock(this);
}
}
}//package
Section 168
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_disabledSkin extends MovieClip {
}
}//package
Section 169
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_downSkin extends MovieClip {
}
}//package
Section 170
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_overSkin extends MovieClip {
}
}//package
Section 171
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_upSkin extends MovieClip {
}
}//package
Section 172
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_disabledSkin extends MovieClip {
}
}//package
Section 173
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_downSkin extends MovieClip {
}
}//package
Section 174
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_overSkin extends MovieClip {
}
}//package
Section 175
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_upSkin extends MovieClip {
}
}//package
Section 176
//ScrollBar_thumbIcon (ScrollBar_thumbIcon)
package {
import flash.display.*;
public dynamic class ScrollBar_thumbIcon extends MovieClip {
}
}//package
Section 177
//ScrollThumb_downSkin (ScrollThumb_downSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_downSkin extends MovieClip {
}
}//package
Section 178
//ScrollThumb_overSkin (ScrollThumb_overSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_overSkin extends MovieClip {
}
}//package
Section 179
//ScrollThumb_upSkin (ScrollThumb_upSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_upSkin extends MovieClip {
}
}//package
Section 180
//ScrollTrack_skin (ScrollTrack_skin)
package {
import flash.display.*;
public dynamic class ScrollTrack_skin extends MovieClip {
}
}//package
Section 181
//Seashell (Seashell)
package {
import flash.display.*;
public dynamic class Seashell extends MovieClip {
}
}//package
Section 182
//SliderThumb_disabledSkin (SliderThumb_disabledSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_disabledSkin extends MovieClip {
}
}//package
Section 183
//SliderThumb_downSkin (SliderThumb_downSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_downSkin extends MovieClip {
}
}//package
Section 184
//SliderThumb_overSkin (SliderThumb_overSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_overSkin extends MovieClip {
}
}//package
Section 185
//SliderThumb_upSkin (SliderThumb_upSkin)
package {
import flash.display.*;
public dynamic class SliderThumb_upSkin extends MovieClip {
}
}//package
Section 186
//SliderTick_skin (SliderTick_skin)
package {
import flash.display.*;
public dynamic class SliderTick_skin extends MovieClip {
}
}//package
Section 187
//SliderTrack_disabledSkin (SliderTrack_disabledSkin)
package {
import flash.display.*;
public dynamic class SliderTrack_disabledSkin extends MovieClip {
}
}//package
Section 188
//SliderTrack_skin (SliderTrack_skin)
package {
import flash.display.*;
public dynamic class SliderTrack_skin extends MovieClip {
}
}//package
Section 189
//SND_BOSS (SND_BOSS)
package {
import flash.media.*;
public dynamic class SND_BOSS extends Sound {
}
}//package
Section 190
//SND_CHARGE (SND_CHARGE)
package {
import flash.media.*;
public dynamic class SND_CHARGE extends Sound {
}
}//package
Section 191
//SND_ENEMY (SND_ENEMY)
package {
import flash.media.*;
public dynamic class SND_ENEMY extends Sound {
}
}//package
Section 192
//SND_EXP (SND_EXP)
package {
import flash.media.*;
public dynamic class SND_EXP extends Sound {
}
}//package
Section 193
//SND_INTRO (SND_INTRO)
package {
import flash.media.*;
public dynamic class SND_INTRO extends Sound {
}
}//package
Section 194
//SND_LEVEL (SND_LEVEL)
package {
import flash.media.*;
public dynamic class SND_LEVEL extends Sound {
}
}//package
Section 195
//SND_MENU (SND_MENU)
package {
import flash.media.*;
public dynamic class SND_MENU extends Sound {
}
}//package
Section 196
//SND_ROCK (SND_ROCK)
package {
import flash.media.*;
public dynamic class SND_ROCK extends Sound {
}
}//package
Section 197
//SND_ROCK1 (SND_ROCK1)
package {
import flash.media.*;
public dynamic class SND_ROCK1 extends Sound {
}
}//package
Section 198
//SND_ROCK2 (SND_ROCK2)
package {
import flash.media.*;
public dynamic class SND_ROCK2 extends Sound {
}
}//package
Section 199
//SND_SHELL (SND_SHELL)
package {
import flash.media.*;
public dynamic class SND_SHELL extends Sound {
}
}//package
Section 200
//SND_SHOT1 (SND_SHOT1)
package {
import flash.media.*;
public dynamic class SND_SHOT1 extends Sound {
}
}//package
Section 201
//SND_SHOT2 (SND_SHOT2)
package {
import flash.media.*;
public dynamic class SND_SHOT2 extends Sound {
}
}//package
Section 202
//SND_SHOT3 (SND_SHOT3)
package {
import flash.media.*;
public dynamic class SND_SHOT3 extends Sound {
}
}//package
Section 203
//SND_SMASH (SND_SMASH)
package {
import flash.media.*;
public dynamic class SND_SMASH extends Sound {
}
}//package
Section 204
//SND_SPLASH (SND_SPLASH)
package {
import flash.media.*;
public dynamic class SND_SPLASH extends Sound {
}
}//package
Section 205
//TextInput_disabledSkin (TextInput_disabledSkin)
package {
import flash.display.*;
public dynamic class TextInput_disabledSkin extends MovieClip {
}
}//package
Section 206
//TextInput_upSkin (TextInput_upSkin)
package {
import flash.display.*;
public dynamic class TextInput_upSkin extends MovieClip {
}
}//package