Section 1
//IndeterminateBar (fl.controls.progressBarClasses.IndeterminateBar)
package fl.controls.progressBarClasses {
import flash.display.*;
import fl.core.*;
import flash.events.*;
public class IndeterminateBar extends UIComponent {
protected var bar:Sprite;
protected var barMask:Sprite;
protected var patternBmp:BitmapData;
protected var animationCount:uint;// = 0
private static var defaultStyles:Object = {indeterminateSkin:"ProgressBar_indeterminateSkin"};
public function IndeterminateBar(){
animationCount = 0;
super();
setSize(0, 0);
startAnimation();
}
protected function drawBar():void{
var _local1:Graphics;
if (patternBmp == null){
return;
};
_local1 = bar.graphics;
_local1.clear();
_local1.beginBitmapFill(patternBmp);
_local1.drawRect(0, 0, (_width + patternBmp.width), _height);
_local1.endFill();
}
protected function drawMask():void{
var _local1:Graphics;
_local1 = barMask.graphics;
_local1.clear();
_local1.beginFill(0, 0);
_local1.drawRect(0, 0, _width, _height);
_local1.endFill();
}
override public function get visible():Boolean{
return (super.visible);
}
override public function set visible(_arg1:Boolean):void{
if (_arg1){
startAnimation();
} else {
stopAnimation();
};
super.visible = _arg1;
}
protected function startAnimation():void{
addEventListener(Event.ENTER_FRAME, handleEnterFrame, false, 0, true);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawPattern();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawBar();
drawMask();
};
super.draw();
}
override protected function configUI():void{
bar = new Sprite();
addChild(bar);
barMask = new Sprite();
addChild(barMask);
bar.mask = barMask;
}
protected function stopAnimation():void{
removeEventListener(Event.ENTER_FRAME, handleEnterFrame);
}
protected function drawPattern():void{
var _local1:DisplayObject;
_local1 = getDisplayObjectInstance(getStyleValue("indeterminateSkin"));
if (patternBmp){
patternBmp.dispose();
};
patternBmp = new BitmapData((_local1.width << 0), (_local1.height << 0), true, 0);
patternBmp.draw(_local1);
}
protected function handleEnterFrame(_arg1:Event):void{
if (patternBmp == null){
return;
};
animationCount = ((animationCount + 2) % patternBmp.width);
bar.x = -(animationCount);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.progressBarClasses
Section 2
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import fl.events.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 3
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 4
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 5
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 6
//ProgressBar (fl.controls.ProgressBar)
package fl.controls {
import flash.display.*;
import fl.core.*;
import flash.events.*;
import fl.controls.progressBarClasses.*;
public class ProgressBar extends UIComponent {
protected var _direction:String;// = "right"
protected var _mode:String;// = "event"
protected var _value:Number;// = 0
protected var _indeterminate:Boolean;// = true
protected var _minimum:Number;// = 0
protected var _maximum:Number;// = 0
protected var determinateBar:DisplayObject;
protected var _loaded:Number;
protected var _source:Object;
protected var track:DisplayObject;
protected var indeterminateBar:UIComponent;
private static var defaultStyles:Object = {trackSkin:"ProgressBar_trackSkin", barSkin:"ProgressBar_barSkin", indeterminateSkin:"ProgressBar_indeterminateSkin", indeterminateBar:IndeterminateBar, barPadding:0};
public function ProgressBar(){
_direction = ProgressBarDirection.RIGHT;
_indeterminate = true;
_mode = ProgressBarMode.EVENT;
_minimum = 0;
_maximum = 0;
_value = 0;
super();
}
public function get minimum():Number{
return (_minimum);
}
public function get source():Object{
return (_source);
}
public function set minimum(_arg1:Number):void{
if (_mode != ProgressBarMode.MANUAL){
return;
};
_minimum = _arg1;
invalidate(InvalidationType.DATA);
}
public function get maximum():Number{
return (_maximum);
}
protected function drawBars():void{
var _local1:DisplayObject;
var _local2:DisplayObject;
_local1 = determinateBar;
_local2 = indeterminateBar;
determinateBar = getDisplayObjectInstance(getStyleValue("barSkin"));
addChild(determinateBar);
indeterminateBar = (getDisplayObjectInstance(getStyleValue("indeterminateBar")) as UIComponent);
indeterminateBar.setStyle("indeterminateSkin", getStyleValue("indeterminateSkin"));
addChild(indeterminateBar);
if (((!((_local1 == null))) && (!((_local1 == determinateBar))))){
removeChild(_local1);
};
if (((!((_local2 == null))) && (!((_local2 == determinateBar))))){
removeChild(_local2);
};
}
protected function setupSourceEvents():void{
_source.addEventListener(ProgressEvent.PROGRESS, handleProgress, false, 0, true);
_source.addEventListener(Event.COMPLETE, handleComplete, false, 0, true);
}
public function set maximum(_arg1:Number):void{
setProgress(_value, _arg1);
}
public function set source(_arg1:Object):void{
if (_source == _arg1){
return;
};
if (_mode != ProgressBarMode.MANUAL){
resetProgress();
};
_source = _arg1;
if (_source == null){
return;
};
if (_mode == ProgressBarMode.EVENT){
setupSourceEvents();
} else {
if (_mode == ProgressBarMode.POLLED){
addEventListener(Event.ENTER_FRAME, pollSource, false, 0, true);
};
};
}
protected function drawTrack():void{
var _local1:DisplayObject;
_local1 = track;
track = getDisplayObjectInstance(getStyleValue("trackSkin"));
addChildAt(track, 0);
if (((!((_local1 == null))) && (!((_local1 == track))))){
removeChild(_local1);
};
}
protected function handleProgress(_arg1:ProgressEvent):void{
_setProgress(_arg1.bytesLoaded, _arg1.bytesTotal, true);
}
public function set sourceName(_arg1:String):void{
var _local2:DisplayObject;
if (!componentInspectorSetting){
return;
};
if (_arg1 == ""){
return;
};
_local2 = (parent.getChildByName(_arg1) as DisplayObject);
if (_local2 == null){
throw (new Error((("Source clip '" + _arg1) + "' not found on parent.")));
};
source = _local2;
}
protected function resetProgress():void{
if ((((_mode == ProgressBarMode.EVENT)) && (!((_source == null))))){
cleanupSourceEvents();
} else {
if (_mode == ProgressBarMode.POLLED){
removeEventListener(Event.ENTER_FRAME, pollSource);
} else {
if (_source != null){
_source = null;
};
};
};
_minimum = (_maximum = (_value = 0));
}
public function get percentComplete():Number{
return (((((_maximum <= _minimum)) || ((_value <= _minimum)))) ? 0 : Math.max(0, Math.min(100, (((_value - _minimum) / (_maximum - _minimum)) * 100))));
}
public function setProgress(_arg1:Number, _arg2:Number):void{
if (_mode != ProgressBarMode.MANUAL){
return;
};
_setProgress(_arg1, _arg2);
}
protected function pollSource(_arg1:Event):void{
if (_source == null){
return;
};
_setProgress(_source.bytesLoaded, _source.bytesTotal, true);
if ((((_maximum > 0)) && ((_maximum == _value)))){
removeEventListener(Event.ENTER_FRAME, pollSource);
dispatchEvent(new Event(Event.COMPLETE));
};
}
public function get indeterminate():Boolean{
return (_indeterminate);
}
public function set value(_arg1:Number):void{
setProgress(_arg1, _maximum);
}
public function set direction(_arg1:String):void{
_direction = _arg1;
invalidate(InvalidationType.DATA);
}
protected function _setProgress(_arg1:Number, _arg2:Number, _arg3:Boolean=false):void{
if ((((_arg1 == _value)) && ((_arg2 == _maximum)))){
return;
};
_value = _arg1;
_maximum = _arg2;
if (((!((_value == _loaded))) && (_arg3))){
dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _value, _maximum));
_loaded = _value;
};
if (_mode != ProgressBarMode.MANUAL){
setIndeterminate((_arg2 == 0));
};
invalidate(InvalidationType.DATA);
}
public function set mode(_arg1:String):void{
if (_mode == _arg1){
return;
};
resetProgress();
_mode = _arg1;
if ((((_arg1 == ProgressBarMode.EVENT)) && (!((_source == null))))){
setupSourceEvents();
} else {
if (_arg1 == ProgressBarMode.POLLED){
addEventListener(Event.ENTER_FRAME, pollSource, false, 0, true);
};
};
setIndeterminate(!((_mode == ProgressBarMode.MANUAL)));
}
public function reset():void{
var _local1:Object;
_setProgress(0, 0);
_local1 = _source;
_source = null;
source = _local1;
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawTrack();
drawBars();
invalidate(InvalidationType.STATE, false);
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.STATE)){
indeterminateBar.visible = _indeterminate;
determinateBar.visible = !(_indeterminate);
invalidate(InvalidationType.DATA, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
invalidate(InvalidationType.DATA, false);
};
if (((isInvalid(InvalidationType.DATA)) && (!(_indeterminate)))){
drawDeterminateBar();
};
super.draw();
}
override protected function configUI():void{
super.configUI();
}
protected function drawDeterminateBar():void{
var _local1:Number;
var _local2:Number;
_local1 = (percentComplete / 100);
_local2 = Number(getStyleValue("barPadding"));
determinateBar.width = Math.round(((width - (_local2 * 2)) * _local1));
determinateBar.x = ((_direction)==ProgressBarDirection.LEFT) ? ((width - _local2) - determinateBar.width) : _local2;
}
public function get value():Number{
return (_value);
}
public function set indeterminate(_arg1:Boolean):void{
if (((!((_mode == ProgressBarMode.MANUAL))) || ((_indeterminate == _arg1)))){
return;
};
setIndeterminate(_arg1);
}
protected function setIndeterminate(_arg1:Boolean):void{
if (_indeterminate == _arg1){
return;
};
_indeterminate = _arg1;
invalidate(InvalidationType.STATE);
}
protected function handleComplete(_arg1:Event):void{
_setProgress(_maximum, _maximum, true);
dispatchEvent(_arg1);
}
protected function drawLayout():void{
var _local1:Number;
_local1 = Number(getStyleValue("barPadding"));
track.width = width;
track.height = height;
indeterminateBar.setSize((width - (_local1 * 2)), (height - (_local1 * 2)));
indeterminateBar.move(_local1, _local1);
indeterminateBar.drawNow();
determinateBar.height = (height - (_local1 * 2));
determinateBar.y = _local1;
}
public function get direction():String{
return (_direction);
}
public function get mode():String{
return (_mode);
}
protected function cleanupSourceEvents():void{
_source.removeEventListener(ProgressEvent.PROGRESS, handleProgress);
_source.removeEventListener(Event.COMPLETE, handleComplete);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 7
//ProgressBarDirection (fl.controls.ProgressBarDirection)
package fl.controls {
public class ProgressBarDirection {
public static const RIGHT:String = "right";
public static const LEFT:String = "left";
}
}//package fl.controls
Section 8
//ProgressBarMode (fl.controls.ProgressBarMode)
package fl.controls {
public class ProgressBarMode {
public static const MANUAL:String = "manual";
public static const EVENT:String = "event";
public static const POLLED:String = "polled";
}
}//package fl.controls
Section 9
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 10
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 11
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import flash.utils.*;
import fl.events.*;
import flash.text.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 12
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 13
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
import fl.core.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 14
//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 15
//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 16
//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 17
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.utils.*;
import flash.text.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 18
//gameendpopup_67 (ranchu_new_fla.gameendpopup_67)
package ranchu_new_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
public dynamic class gameendpopup_67 extends MovieClip {
public var submitscore_btn:SimpleButton;
public var distance_txt:TextField;
public var level_txt:TextField;
public var score_txt:TextField;
public var playagain_btn:SimpleButton;
public var coins_txt:TextField;
public var name_txt:TextField;
public var moregamesin_btn:SimpleButton;
public function gameendpopup_67(){
addFrameScript(0, frame1);
}
function frame1(){
moregamesin_btn.addEventListener(MouseEvent.CLICK, geniLink2);
name_txt.restrict = "a-z A-Z";
moregamesin_btn.addEventListener(MouseEvent.CLICK, geniLink2);
}
public function geniLink2(_arg1:MouseEvent){
var url:String;
var request:URLRequest;
var evt = _arg1;
url = "http://www.gamesgeni.com/";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
}
}
}//package ranchu_new_fla
Section 19
//geniepart_07_7 (ranchu_new_fla.geniepart_07_7)
package ranchu_new_fla {
import flash.display.*;
public dynamic class geniepart_07_7 extends MovieClip {
public function geniepart_07_7(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package ranchu_new_fla
Section 20
//geniepart_13_4 (ranchu_new_fla.geniepart_13_4)
package ranchu_new_fla {
import flash.display.*;
public dynamic class geniepart_13_4 extends MovieClip {
public function geniepart_13_4(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package ranchu_new_fla
Section 21
//geniepart_14_15 (ranchu_new_fla.geniepart_14_15)
package ranchu_new_fla {
import flash.display.*;
public dynamic class geniepart_14_15 extends MovieClip {
public function geniepart_14_15(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package ranchu_new_fla
Section 22
//geniepart_16_8 (ranchu_new_fla.geniepart_16_8)
package ranchu_new_fla {
import flash.display.*;
public dynamic class geniepart_16_8 extends MovieClip {
public function geniepart_16_8(){
addFrameScript(54, frame55);
}
function frame55(){
stop();
}
}
}//package ranchu_new_fla
Section 23
//geniepart_23_11 (ranchu_new_fla.geniepart_23_11)
package ranchu_new_fla {
import flash.display.*;
public dynamic class geniepart_23_11 extends MovieClip {
public function geniepart_23_11(){
addFrameScript(48, frame49);
}
function frame49(){
stop();
}
}
}//package ranchu_new_fla
Section 24
//logo_3 (ranchu_new_fla.logo_3)
package ranchu_new_fla {
import flash.display.*;
public dynamic class logo_3 extends MovieClip {
public function logo_3(){
addFrameScript(116, frame117);
}
function frame117(){
stop();
}
}
}//package ranchu_new_fla
Section 25
//MainTimeline (ranchu_new_fla.MainTimeline)
package ranchu_new_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.ui.*;
import flash.system.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var bglvl2_mc:MovieClip;
public var coin_mc:MovieClip;
public var score1_txt:TextField;
public var _playerHitFireJump:int;
public var _playerHitIce:Boolean;
public var _highPlatform:Number;
public var path:String;
public var moregames_btn:SimpleButton;
public var _playerSpeed:Number;
public var _lowPlatform:Number;
public var loader_txt:TextField;
public var _playerRunFastFrame:int;
public var _playerHitFire:Boolean;
public var _platformIndex:int;
public var oheight:Number;
public var _stepSoundLeft:Boolean;
public var help_btn:SimpleButton;
public var _debrisIndex:int;
public var _timer:Timer;
public var i:int;
public var _frame:Number;
public var _playerJump:int;
public var _playerState:int;
public var startinhelp_btn:SimpleButton;
public var max_snowsize:Number;
public var moregamesinplay_btn:SimpleButton;
public var muteBool;
public var _playerAcceleration:Number;
public var _decal:MC_decal;
public var _fallSnd:SND_fall;
public var coins_txt:TextField;
public var textanim_mc:MovieClip;
public var owidth:Number;
public var _obstacleChance:Number;
public var _coinArray:Array;
public var _coinChance:Number;
public var _indexA:int;
public var _indexB:int;
public var play_btn:SimpleButton;
public var _stageInitPosX:int;
public var _stageInitPosY:int;
public var _nextLevel:int;
public var temp1;
public var step1:steps;
public var _longPlatform:int;
public var _readyGo:MC_readyGo;
public var _stepSoundRight:Boolean;
public var SnowFlake2s:Array;
public var _shortPlatform:int;
public var geni:MovieClip;
public var _jumpSnd:SND_jump;
public var distance_txt:TextField;
public var _debrisdelay:int;
public var _lvlUpSnd:SND_LVLUP;
public var level_txt:TextField;
public var numFlakes:int;
public var _coinIndex:int;
public var gamepause:Boolean;
public var SnowFlake2sCnt:Number;
public var _playerJumpPower:int;
public var sndChannel:SoundChannel;
public var _distance:int;
public var _bannerChance:Number;
public var _totalScore:int;
public var _playerMaxSpeed:int;
public var _currentLevel:int;
public var _playerHit:Boolean;
public var mute_mc:MovieClip;
public var _coinCount:int;
public var _dustArray:Array;
public var _playerInitialSpeed:int;
public var level:Number;
public var num;
public var timer1:Timer;
public var bglvl1_mc:MovieClip;
public var _platformArray:Array;
public var stageArea_mc:MovieClip;
public var logohit_btn:SimpleButton;
public var _levelUpEffect:MC_levelUpEffect;
public var _platformGap:int;
public var player_mc:MovieClip;
public var _decal_step:steps;
public var skip_btn:SimpleButton;
public var _dustIndex:int;
public var _playerRunFrame:int;
public var _hurtSnd:SND_hurt;
public var highscore_btn:SimpleButton;
public var endscreen_mc:MovieClip;
public var bg_mc:MovieClip;
public var temp;
public var _coinSnd:SND_coin;
public var _bgSnd:SND_bg;
public var _debrisArray:Array;
public var loader_bar:MovieClip;
public var gameplay2_mc:MovieClip;
public var SnowFlake2Props:Dictionary;
public var _bannerDelay:int;
public var _quake:Number;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17);
}
public function clickToStart(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_UP, clickToStart);
removeChild(MovieClip(getChildByName("clickToStart_mc")));
}
public function gamePauseFunc(_arg1:Boolean){
if (_arg1){
gamepause = false;
stage.addEventListener(Event.ENTER_FRAME, gameAnimation);
SoundMixer.soundTransform = new SoundTransform(1);
stage.addEventListener(MouseEvent.MOUSE_DOWN, startJump);
stage.addEventListener(MouseEvent.MOUSE_UP, clickToStart);
} else {
stage.removeEventListener(Event.ENTER_FRAME, gameAnimation);
gamepause = true;
SoundMixer.soundTransform = new SoundTransform(0);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, startJump);
stage.removeEventListener(MouseEvent.MOUSE_UP, clickToStart);
player_mc.idle_mc.stop();
player_mc.run_mc.stop();
player_mc.runFast_mc.stop();
player_mc.jump_mc.stop();
player_mc.fall_mc.stop();
player_mc.hit_mc.stop();
player_mc.hitFire_mc.stop();
player_mc.hitIce_mc.stop();
};
}
public function _play(_arg1:MouseEvent){
gotoAndPlay(15);
}
public function mute(_arg1:MouseEvent):void{
mute_mc.removeEventListener(MouseEvent.MOUSE_UP, mute);
mute_mc.addEventListener(MouseEvent.MOUSE_UP, unmute);
mute_mc.gotoAndStop(2);
muteBool = true;
SoundMixer.soundTransform = new SoundTransform(0);
}
public function createDust(_arg1:int=0, _arg2:int=0, _arg3:Number=1, _arg4:Number=1, _arg5:Number=1, _arg6:Number=10){
var _local7:MC_dust;
_local7 = new MC_dust();
addChild(_local7);
_local7.x = _arg1;
_local7.y = _arg2;
_local7.scaleX = _arg3;
_local7._speedX = _arg4;
_local7._speedY = _arg5;
_dustArray.push(_local7);
}
public function levelUpEffect(){
level++;
level_txt.text = level.toString();
_levelUpEffect = new MC_levelUpEffect();
addChild(_levelUpEffect);
_levelUpEffect.levelup_txt.text = ("Level " + level.toString());
_levelUpEffect.x = (stageArea_mc.width * 0.5);
_levelUpEffect.y = (stageArea_mc.height * 0.5);
_levelUpEffect.flash_mc.width = stageArea_mc.width;
_levelUpEffect.flash_mc.height = stageArea_mc.height;
_levelUpEffect.addEventListener(Event.ENTER_FRAME, levelUpEffectFade);
}
public function _help(_arg1:MouseEvent){
gotoAndStop(14);
}
public function BGcolor(_arg1:Number, _arg2:Number, _arg3:Number){
}
public function submit(_arg1:MouseEvent):void{
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:URLVariables;
var _local6:URLRequest;
_local2 = endscreen_mc.name_txt.text;
_local3 = endscreen_mc.score_txt.text;
_local4 = "";
if (_local3 == ""){
_local4 = (_local4 + "The score is required\n");
};
if (_local4 != ""){
return;
};
_local5 = new URLVariables();
_local5.name = _local2;
_local5.score = _local3;
_local6 = new URLRequest(path);
_local6.method = URLRequestMethod.POST;
_local6.data = _local5;
navigateToURL(_local6, "_blank");
distance_txt.text = "";
coins_txt.text = "";
coin_mc.visible = false;
gotoAndStop(13);
}
public function shakeUp():void{
var _local1:int;
var _local2:MovieClip;
_local1 = 0;
while (_local1 < SnowFlake2s.length) {
_local2 = (SnowFlake2s[_local1] as MovieClip);
_local2.x = (-((owidth / 2)) + (Math.random() * (1.5 * owidth)));
_local2.y = (-((oheight / 2)) + (Math.random() * (1.5 * oheight)));
_local1++;
};
}
public function createFlakes():void{
var _local1:SnowFlake;
_local1 = new SnowFlake();
addChild(_local1);
}
public function unmute(_arg1:MouseEvent):void{
muteBool = false;
mute_mc.removeEventListener(MouseEvent.MOUSE_UP, unmute);
mute_mc.addEventListener(MouseEvent.MOUSE_UP, mute);
mute_mc.gotoAndStop(1);
SoundMixer.soundTransform = new SoundTransform(1);
}
public function levelUpEffectFade(_arg1:Event):void{
addChild(MovieClip(_arg1.target));
if (_arg1.target.flash_mc.alpha > 0){
_arg1.target.flash_mc.alpha = (_arg1.target.flash_mc.alpha - 0.05);
} else {
if (_arg1.target.alpha > 0){
_arg1.target.alpha = (_arg1.target.alpha - 0.01);
} else {
_arg1.target.removeEventListener(Event.ENTER_FRAME, levelUpEffectFade);
removeChild(MovieClip(_arg1.target));
};
};
}
public function makeBig(_arg1:MouseEvent){
gameplay2_mc.x = 80;
gameplay2_mc.y = 570;
gameplay2_mc.scaleX = (gameplay2_mc.scaleY = 40);
}
function frame15(){
mute_mc.addEventListener(MouseEvent.MOUSE_UP, mute);
mute_mc.buttonMode = true;
}
function frame1(){
stop();
this.addEventListener("enterFrame", onEnterFrame);
}
public function _skip(_arg1:MouseEvent){
this.removeEventListener(Event.ENTER_FRAME, autoSkip);
gotoAndStop(3);
}
function frame17(){
stop();
endscreen_mc.distance_txt.text = Math.round((_distance * 0.1)).toString();
endscreen_mc.coins_txt.text = _coinCount.toString();
endscreen_mc.level_txt.text = (1 + (0.2 * (_currentLevel - 1))).toString();
num = (Number(endscreen_mc.coins_txt.text) * 10);
temp1 = Math.round((_distance / 100));
trace((temp1 + " temp"));
_totalScore = (num + temp1);
trace(((("num : - " + num) + " ") + _totalScore));
endscreen_mc.score_txt.text = temp.toString();
endscreen_mc.submitscore_btn.addEventListener(MouseEvent.CLICK, submit);
path = "http://www.gamesgeni.com/Scores/RanchoIceAdventure/submit.php";
endscreen_mc.playagain_btn.addEventListener(MouseEvent.CLICK, playAgain);
}
function frame12(){
stop();
skip_btn.addEventListener(MouseEvent.CLICK, _skip);
this.addEventListener(Event.ENTER_FRAME, autoSkip);
}
function frame13(){
stop();
geni.buttonMode = true;
geni.addEventListener(MouseEvent.ROLL_OVER, geniBig);
geni.addEventListener(MouseEvent.ROLL_OUT, geniSmall);
geni.addEventListener(MouseEvent.CLICK, geniLink);
play_btn.addEventListener(MouseEvent.CLICK, _play);
help_btn.addEventListener(MouseEvent.CLICK, _help);
highscore_btn.addEventListener(MouseEvent.CLICK, _highscore);
moregames_btn.addEventListener(MouseEvent.CLICK, geniLink);
muteBool = false;
mute_mc.buttonMode = true;
mute_mc.addEventListener(MouseEvent.MOUSE_UP, mute);
mute_mc.gotoAndStop(1);
}
function frame2(){
stop();
geni.buttonMode = true;
play_btn.addEventListener(MouseEvent.CLICK, startGameMain);
geni.addEventListener(MouseEvent.CLICK, geniLink);
}
function frame16(){
SnowFlake2s = new Array();
SnowFlake2Props = new Dictionary(true);
max_snowsize = 0.04;
SnowFlake2sCnt = 150;
init();
stop();
numFlakes = 1000;
while (i < numFlakes) {
createFlakes();
i++;
};
timer1 = new Timer(1000, 180);
timer1.addEventListener(TimerEvent.TIMER, blah);
timer1.start();
moregamesinplay_btn.addEventListener(MouseEvent.CLICK, geniLink);
logohit_btn.addEventListener(MouseEvent.MOUSE_OVER, makeBig);
logohit_btn.addEventListener(MouseEvent.MOUSE_OUT, makeSmall);
logohit_btn.addEventListener(MouseEvent.CLICK, geniLink);
level = 1;
level_txt.text = level.toString();
_stageInitPosX = this.x;
_stageInitPosY = this.y;
_playerInitialSpeed = 5;
_playerSpeed = _playerInitialSpeed;
_playerMaxSpeed = 50;
_playerAcceleration = 0.05;
_playerJump = 0;
_playerJumpPower = 25;
_playerState = 0;
_playerRunFrame = 31;
_playerRunFastFrame = 190;
_playerHit = false;
_playerHitFire = false;
_playerHitFireJump = 0;
_playerHitIce = false;
_distance = 0;
_coinCount = 0;
_coinChance = 0.5;
_coinArray = new Array();
_coinIndex = 0;
_currentLevel = 1;
_nextLevel = 10;
_totalScore = 0;
_platformArray = new Array();
_platformGap = 200;
_platformIndex = 0;
_highPlatform = (0.9 * stageArea_mc.height);
_lowPlatform = (0.1 * stageArea_mc.height);
_shortPlatform = 5;
_longPlatform = 10;
_quake = 0;
_indexA = 0;
_indexB = 0;
_debrisArray = new Array();
_debrisIndex = 0;
_debrisdelay = 0;
_dustArray = new Array();
_dustIndex = 0;
_obstacleChance = 0.5;
_bannerChance = 0.5;
_bannerDelay = 100;
_timer = new Timer(1000);
_frame = 0;
_stepSoundLeft = false;
_stepSoundRight = false;
_jumpSnd = new SND_jump();
_coinSnd = new SND_coin();
_fallSnd = new SND_fall();
_hurtSnd = new SND_hurt();
_lvlUpSnd = new SND_LVLUP();
_bgSnd = new SND_bg();
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener);
gamepause = false;
initialization();
_readyGo = new MC_readyGo();
addChild(_readyGo);
_readyGo.x = (stageArea_mc.width * 0.5);
_readyGo.y = (stageArea_mc.height * 0.5);
_readyGo.name = "readyGo_mc";
_readyGo.addEventListener(Event.ENTER_FRAME, readyGoAnim);
_timer.addEventListener(TimerEvent.TIMER, timer);
_timer.start();
addEventListener(Event.ENTER_FRAME, frameRate);
}
public function playAgain(_arg1:MouseEvent){
trace("fdf");
gotoAndPlay(15);
distance_txt.text = "";
coins_txt.text = "";
coin_mc.visible = false;
}
public function _highscore(_arg1:MouseEvent){
var url1:String;
var request1:URLRequest;
var evt = _arg1;
url1 = "http://www.gamesgeni.com/Scores/RanchoIceAdventure/";
request1 = new URLRequest(url1);
try {
navigateToURL(request1, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
}
public function initialization(){
stageArea_mc.visible = false;
player_mc.hitArea_mc.visible = false;
player_mc.idle_mc.visible = true;
player_mc.run_mc.visible = false;
player_mc.runFast_mc.visible = false;
player_mc.jump_mc.visible = false;
player_mc.fall_mc.visible = false;
player_mc.hit_mc.visible = false;
player_mc.hitFire_mc.visible = false;
player_mc.hitIce_mc.visible = false;
distance_txt.selectable = false;
_playerState = 0;
_playerJump = 0;
_distance = 0;
_coinCount = 0;
coin_mc.visible = true;
coin_mc.coinShadow_mc.visible = false;
coins_txt.text = _coinCount.toString();
coins_txt.selectable = false;
score1_txt.text = _totalScore.toString();
checkLevel();
distance_txt.text = _distance.toString();
_playerSpeed = _playerInitialSpeed;
player_mc.x = ((stageArea_mc.width * 0.1) + (_playerSpeed * 3));
createPlatform((player_mc.x - (player_mc.width / 2)), (_lowPlatform + (Math.random() * (_highPlatform - _lowPlatform))), (_shortPlatform + int(((Math.random() * (_longPlatform - _shortPlatform)) + 0.5))));
player_mc.y = _platformArray[(_platformArray.length - 1)].y;
_indexB = 0;
while (_indexB < _platformArray[(_platformArray.length - 1)].numChildren) {
_platformArray[(_platformArray.length - 1)].getChildAt(_indexB).visible = true;
_indexB++;
};
addChild(player_mc);
}
public function geniLink(_arg1:MouseEvent){
var url:String;
var request:URLRequest;
var evt = _arg1;
url = "http://www.gamesgeni.com/";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
}
public function onEnterFrame(_arg1:Event):void{
var _local2:int;
_local2 = Math.ceil(((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100));
UpdatePreloader(_local2);
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
this.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
gotoAndStop(2);
};
}
public function readyGoAnim(_arg1:Event):void{
this.addChild(MovieClip(_arg1.target));
if (_arg1.target.currentFrame == 111){
gameStart();
player_mc.idle_mc.visible = false;
player_mc.run_mc.visible = true;
player_mc.run_mc.gotoAndPlay(_playerRunFrame);
_quake = 10;
};
if (_arg1.target.currentFrame == _arg1.target.totalFrames){
_arg1.target.removeEventListener(Event.ENTER_FRAME, readyGoAnim);
this.removeChild(MovieClip(_arg1.target));
};
}
public function retry(_arg1:MouseEvent):void{
var _readyGo:MC_readyGo;
var event = _arg1;
try {
event.currentTarget.removeEventListener(MouseEvent.MOUSE_UP, retry);
removeChild(MovieClip(event.currentTarget));
_platformIndex = 0;
while (_platformIndex < _platformArray.length) {
removeChild(_platformArray[_platformIndex]);
_platformIndex++;
};
_platformArray = [];
initialization();
_readyGo = new MC_readyGo();
addChild(_readyGo);
_readyGo.x = (stageArea_mc.width * 0.5);
_readyGo.y = (stageArea_mc.height * 0.5);
_readyGo.cacheAsBitmap = true;
_readyGo.name = "readyGo_mc";
_readyGo.addEventListener(Event.ENTER_FRAME, readyGoAnim);
} catch(err:Error) {
trace("catch error 1009 on retry");
};
}
function frame14(){
startinhelp_btn.addEventListener(MouseEvent.CLICK, startGame);
}
public function controlStop(){
stage.removeEventListener(MouseEvent.MOUSE_DOWN, startJump);
stage.addEventListener(MouseEvent.MOUSE_UP, stopJump);
}
public function init():void{
var _local1:int;
var _local2:MovieClip;
var _local3:Object;
owidth = 700;
oheight = 500;
_local1 = 0;
while (_local1 < SnowFlake2sCnt) {
_local2 = new SnowFlake2();
_local2.name = ("SnowFlake2" + _local1);
_local2.alpha = (20 + (Math.random() * 60));
_local2.x = (-((owidth / 2)) + (Math.random() * (1.5 * owidth)));
_local2.y = (-((oheight / 2)) + (Math.random() * (1.5 * oheight)));
_local2.scaleX = (_local2.scaleY = (0.5 + (Math.random() * (max_snowsize * 10))));
_local3 = new Object();
_local3.k = (1 + (Math.random() * 2));
_local3.wind = (-1.5 + (Math.random() * (1.4 * 3)));
SnowFlake2Props[_local2] = _local3;
addChild(_local2);
SnowFlake2s.push(_local2);
_local1++;
};
addEventListener(Event.ENTER_FRAME, SnowFlake2Mover);
}
public function gameStop(){
stage.removeEventListener(Event.ENTER_FRAME, gameAnimation);
controlStop();
}
public function geniBig(_arg1:MouseEvent){
_arg1.target.gotoAndStop(2);
}
public function controlStart(){
stage.addEventListener(MouseEvent.MOUSE_DOWN, startJump);
stage.addEventListener(MouseEvent.MOUSE_UP, stopJump);
}
public function timer(_arg1:TimerEvent){
if (_frame < 23){
stage.quality = "low";
};
if (_frame > 31){
stage.quality = "medium";
};
_frame = 0;
}
public function SnowFlake2Mover(_arg1:Event):void{
var _local2:MovieClip;
var _local3:Object;
var _local4:int;
if (((visible) && (parent.visible))){
_local4 = 0;
while (_local4 < SnowFlake2s.length) {
_local2 = (SnowFlake2s[_local4] as MovieClip);
_local3 = SnowFlake2Props[_local2];
_local2.y = (_local2.y + _local3.k);
_local2.x = (_local2.x + _local3.wind);
if (_local2.y > (oheight + 10)){
_local2.y = -20;
};
if (_local2.x > (owidth + 20)){
_local2.x = (-((owidth / 2)) + (Math.random() * (1.5 * owidth)));
_local2.y = -20;
} else {
if (_local2.x < -20){
_local2.x = (-((owidth / 2)) + (Math.random() * (1.5 * owidth)));
_local2.y = -20;
};
};
_local4++;
};
};
}
public function startGameMain(_arg1:MouseEvent){
gotoAndStop(13);
}
public function stopJump(_arg1:MouseEvent):void{
if ((((((_playerState == 1)) && (!(_playerHit)))) && (!(_playerHitFire)))){
_playerJump = (_playerJump * 0.25);
player_mc.jump_mc.visible = false;
player_mc.fall_mc.visible = true;
player_mc.fall_mc.gotoAndPlay(1);
};
}
public function checkLevel(){
if (_coinCount == 0){
_currentLevel = 1;
_nextLevel = 20;
_playerMaxSpeed = 10;
_highPlatform = (0.3 * stageArea_mc.height);
_lowPlatform = (0.2 * stageArea_mc.height);
_shortPlatform = 12;
_longPlatform = 16;
_platformGap = 50;
_obstacleChance = 0;
_bannerChance = 0.01;
_coinChance = 0.5;
} else {
if (_coinCount == 20){
_currentLevel = 2;
_nextLevel = 50;
_playerMaxSpeed = 15;
_highPlatform = (0.4 * stageArea_mc.height);
_lowPlatform = (0.2 * stageArea_mc.height);
_shortPlatform = 11;
_longPlatform = 15;
_platformGap = 100;
_obstacleChance = 0.02;
_bannerChance = 0.01;
_coinChance = 0.55;
} else {
if (_coinCount == 50){
_currentLevel = 3;
_nextLevel = 100;
_playerMaxSpeed = 20;
_highPlatform = (0.5 * stageArea_mc.height);
_lowPlatform = (0.2 * stageArea_mc.height);
_shortPlatform = 10;
_longPlatform = 14;
_platformGap = 150;
_obstacleChance = 0.04;
_bannerChance = 0.01;
_coinChance = 0.6;
} else {
if (_coinCount == 100){
_currentLevel = 4;
_nextLevel = 200;
_playerMaxSpeed = 25;
_highPlatform = (0.8 * stageArea_mc.height);
_lowPlatform = (0.3 * stageArea_mc.height);
_shortPlatform = 9;
_longPlatform = 12;
_platformGap = 200;
_obstacleChance = 0.06;
_bannerChance = 0.01;
_coinChance = 0.65;
} else {
if (_coinCount == 200){
_currentLevel = 5;
_nextLevel = 300;
_playerMaxSpeed = 30;
_highPlatform = (0.7 * stageArea_mc.height);
_lowPlatform = (0.2 * stageArea_mc.height);
_shortPlatform = 8;
_longPlatform = 10;
_platformGap = 300;
_obstacleChance = 0.08;
_bannerChance = 0.01;
_coinChance = 0.7;
} else {
if (_coinCount == 300){
_currentLevel = 6;
_nextLevel = 400;
_playerMaxSpeed = 35;
_highPlatform = (0.7 * stageArea_mc.height);
_lowPlatform = (0.1 * stageArea_mc.height);
_shortPlatform = 7;
_longPlatform = 9;
_platformGap = 400;
_obstacleChance = 0.1;
_bannerChance = 0.01;
_coinChance = 0.75;
} else {
if (_coinCount == 400){
_currentLevel = 7;
_nextLevel = 500;
_playerMaxSpeed = 40;
_highPlatform = (0.8 * stageArea_mc.height);
_lowPlatform = (0.1 * stageArea_mc.height);
_shortPlatform = 6;
_longPlatform = 8;
_platformGap = 500;
_obstacleChance = 0.12;
_bannerChance = 0.01;
_coinChance = 0.8;
} else {
if (_coinCount == 500){
_currentLevel = 8;
_nextLevel = 600;
_playerMaxSpeed = 45;
_highPlatform = (0.9 * stageArea_mc.height);
_lowPlatform = (0.1 * stageArea_mc.height);
_shortPlatform = 5;
_longPlatform = 7;
_platformGap = 600;
_obstacleChance = 0.14;
_bannerChance = 0.01;
_coinChance = 0.85;
} else {
if (_coinCount == 600){
_currentLevel = 9;
_nextLevel = 700;
_playerMaxSpeed = 50;
_highPlatform = (0.9 * stageArea_mc.height);
_lowPlatform = (0.1 * stageArea_mc.height);
_shortPlatform = 4;
_longPlatform = 6;
_platformGap = 700;
_obstacleChance = 0.16;
_bannerChance = 0.01;
_coinChance = 0.9;
} else {
if ((_coinCount % 100) == 0){
_currentLevel++;
_nextLevel = (_nextLevel + 100);
_playerMaxSpeed = (_playerMaxSpeed + 5);
_highPlatform = (0.9 * stageArea_mc.height);
_lowPlatform = (0.1 * stageArea_mc.height);
_shortPlatform = 3;
_longPlatform = 5;
_platformGap = 800;
_obstacleChance = (_obstacleChance + 0.02);
_bannerChance = 0.01;
_coinChance = 0.95;
};
};
};
};
};
};
};
};
};
};
if (_coinCount > 0){
_quake = 15;
_lvlUpSnd.play();
levelUpEffect();
};
BGcolor((Math.random() + 0.5), (Math.random() + 0.5), (Math.random() + 0.5));
}
public function geniSmall(_arg1:MouseEvent){
_arg1.target.gotoAndStop(1);
}
public function startGame(_arg1:MouseEvent){
gotoAndPlay(15);
}
public function gameStart(){
sndChannel = _bgSnd.play();
stage.addEventListener(Event.ENTER_FRAME, gameAnimation);
controlStart();
}
public function keyDownListener(_arg1:KeyboardEvent){
trace(_arg1.keyCode.toString());
if (_arg1.keyCode.toString() == "80"){
gamePauseFunc(gamepause);
};
}
public function UpdatePreloader(_arg1:int):void{
trace((_arg1 + "% Loaded"));
loader_txt.text = (_arg1.toString() + "%");
loader_bar.gotoAndStop(_arg1);
}
public function crashAnimation(_arg1:Event):void{
var _local2:int;
var _local3:MovieClip;
if (_quake > 0){
_quake--;
this.y = ((Math.random() * _quake) - (_quake * 0.5));
} else {
this.y = _stageInitPosY;
removeEventListener(Event.ENTER_FRAME, crashAnimation);
sndChannel.stop();
mute_mc.stop();
_local2 = 0;
while (_local2 < SnowFlake2s.length) {
_local3 = (SnowFlake2s[_local2] as MovieClip);
removeChild(_local3);
_local2++;
};
_platformIndex = 0;
while (_platformIndex < _platformArray.length) {
removeChild(_platformArray[_platformIndex]);
_platformIndex++;
};
_platformArray = [];
_totalScore = Math.ceil(((1 + (0.2 * (_currentLevel - 1))) * ((_distance * 0.1) + (_coinCount * 10))));
gotoAndStop(17);
};
}
public function startJump(_arg1:MouseEvent):void{
if ((((((_playerState == 0)) && (!(_playerHit)))) && (!(_playerHitFire)))){
_playerHitIce = false;
_playerJump = _playerJumpPower;
_playerState = 1;
player_mc.run_mc.visible = false;
player_mc.runFast_mc.visible = false;
player_mc.jump_mc.visible = true;
player_mc.hitIce_mc.visible = false;
player_mc.jump_mc.gotoAndPlay(1);
_jumpSnd.play();
};
}
public function makeSmall(_arg1:MouseEvent){
gameplay2_mc.x = 59;
gameplay2_mc.y = 594.1;
gameplay2_mc.scaleX = (gameplay2_mc.scaleY = 27.5);
}
public function createPlatform(_arg1:int=0, _arg2:int=0, _arg3:int=20):void{
var _local4:MovieClip;
var _local5:MC_banner;
var _local6:MC_obstacle;
var _local7:MC_coin;
var _local8:Number;
_local4 = new MovieClip();
_local4.x = _arg1;
_local4.y = (stageArea_mc.height - _arg2);
addChild(_local4);
_local4._state = 0;
_platformArray.push(_local4);
_indexA = 0;
while (_indexA < _arg3) {
_decal = new MC_decal();
_platformArray[(_platformArray.length - 1)].addChild(_decal);
if (_indexA == 0){
_decal.gotoAndStop(1);
} else {
_decal.gotoAndStop((Math.ceil((Math.random() * (_decal.totalFrames - 2))) + 1));
};
_decal.x = (_indexA * _decal.width);
_decal.cacheAsBitmap = true;
_decal.visible = false;
_indexA++;
};
_decal.gotoAndStop(_decal.totalFrames);
_decal.visible = true;
_decal.cacheAsBitmap = true;
_indexB = _platformArray[(_platformArray.length - 1)].numChildren;
_indexA = 0;
while (_indexA < _indexB) {
if ((((Math.random() < _bannerChance)) && ((_bannerDelay == 0)))){
_local5 = new MC_banner();
_platformArray[(_platformArray.length - 1)].addChild(_local5);
_local5.x = (_platformArray[(_platformArray.length - 1)].getChildAt(_indexA).x + (_platformArray[(_platformArray.length - 1)].getChildAt(_indexA).width * 0.5));
_local5.gotoAndStop(Math.ceil((Math.random() * _local5.totalFrames)));
_local5.rotation = (int(((Math.random() * 4) + 0.5)) - 2);
_local5.cacheAsBitmap = true;
_bannerDelay = 100;
} else {
if (Math.random() < _obstacleChance){
_local6 = new MC_obstacle();
_platformArray[(_platformArray.length - 1)].addChild(_local6);
_local6.x = (_platformArray[(_platformArray.length - 1)].getChildAt(_indexA).x + (_platformArray[(_platformArray.length - 1)].getChildAt(_indexA).width * 0.5));
_local6.gotoAndStop(Math.ceil((Math.random() * _local6.totalFrames)));
_local6._state = 0;
} else {
if (Math.random() < _coinChance){
_local7 = new MC_coin();
_local8 = Math.round((Math.random() * 2));
trace(("rand " + _local8));
_local7.gotoAndStop(_local8);
_platformArray[(_platformArray.length - 1)].addChild(_local7);
_local7.x = (_platformArray[(_platformArray.length - 1)].getChildAt(_indexA).x + (_platformArray[(_platformArray.length - 1)].getChildAt(_indexA).width * 0.5));
_local7.visible = false;
_coinArray.push(_local7);
};
};
};
_indexA++;
};
}
public function autoSkip(_arg1:Event){
if (textanim_mc.currentFrame == (textanim_mc.totalFrames - 2)){
this.removeEventListener(Event.ENTER_FRAME, autoSkip);
gotoAndStop(3);
};
}
public function gameAnimation(_arg1:Event):void{
var _local2:MC_debris;
var _local3:MC_debris;
step1.x = (step1.x - 10);
bglvl1_mc.x = (bglvl1_mc.x - (_playerSpeed * 0.25));
if (bglvl1_mc.x < -(stageArea_mc.width)){
bglvl1_mc.x = 0;
};
bglvl2_mc.x = (bglvl2_mc.x - (_playerSpeed * 0.125));
if (bglvl2_mc.x < -(stageArea_mc.width)){
bglvl2_mc.x = 0;
};
if (player_mc.run_mc.visible){
if ((player_mc.run_mc.totalFrames - (player_mc.run_mc.currentFrame + Math.ceil((_playerSpeed * 0.1)))) > 0){
_playerRunFrame = (_playerRunFrame + Math.ceil((_playerSpeed * 0.1)));
} else {
_playerRunFrame = 1;
_stepSoundLeft = false;
_stepSoundRight = false;
};
player_mc.run_mc.gotoAndStop(_playerRunFrame);
if ((((_stepSoundLeft == false)) && ((player_mc.run_mc.currentFrame > 5)))){
_stepSoundLeft = true;
};
if ((((_stepSoundRight == false)) && ((player_mc.run_mc.currentFrame > 25)))){
_stepSoundRight = true;
};
};
if (player_mc.runFast_mc.visible){
if ((player_mc.runFast_mc.totalFrames - (player_mc.runFast_mc.currentFrame + Math.ceil((_playerSpeed * 0.5)))) > 0){
_playerRunFastFrame = (_playerRunFastFrame + Math.ceil((_playerSpeed * 0.5)));
if (Math.random() > 0.8){
createDust(player_mc.x, (player_mc.y - (Math.random() * 10)), ((Math.random() * 0.5) + 0.3), (-(_playerSpeed) * 0.5), ((-(Math.random()) * 0.5) + 0.3), ((Math.random() * 20) - 10));
};
} else {
_playerRunFastFrame = 1;
_stepSoundLeft = false;
_stepSoundRight = false;
};
if ((((_stepSoundLeft == false)) && ((player_mc.runFast_mc.currentFrame > 60)))){
_stepSoundLeft = true;
};
if ((((_stepSoundRight == false)) && ((player_mc.runFast_mc.currentFrame > 180)))){
_stepSoundRight = true;
};
};
if (((player_mc.fall_mc.visible) && ((player_mc.fall_mc.currentFrame == player_mc.fall_mc.totalFrames)))){
trace("fall sound");
_fallSnd.play();
};
if (_playerState == 0){
if (_playerSpeed < 20){
player_mc.run_mc.visible = true;
player_mc.runFast_mc.visible = false;
player_mc.jump_mc.visible = false;
player_mc.fall_mc.visible = false;
} else {
player_mc.run_mc.visible = false;
player_mc.runFast_mc.visible = true;
player_mc.jump_mc.visible = false;
player_mc.fall_mc.visible = false;
};
};
if (_playerSpeed < _playerMaxSpeed){
_playerSpeed = (_playerSpeed + _playerAcceleration);
};
_distance = (_distance + _playerSpeed);
distance_txt.text = Math.round((_distance * 0.1)).toString();
player_mc.x = ((stageArea_mc.width * 0.1) + (_playerSpeed * 3));
if ((((_playerState == 1)) && ((_playerJump > 0)))){
player_mc.y = (player_mc.y - _playerJump);
_playerJump--;
} else {
if (_playerState != 0){
_playerState = 2;
player_mc.jump_mc.visible = false;
player_mc.fall_mc.visible = true;
};
};
if (_playerState == 2){
player_mc.y = (player_mc.y - _playerJump);
_playerJump--;
trace("not hit");
};
if (_quake > 0){
_quake = (_quake - 0.1);
this.x = ((Math.random() * _quake) - (_quake * 0.5));
if (_debrisdelay){
_debrisdelay--;
} else {
_debrisdelay = 2;
_local2 = new MC_debris();
bglvl1_mc.addChildAt(_local2, 0);
_local2.x = (Math.random() * bglvl1_mc.width);
_local2.scaleX = (_local2.scaleY = ((_quake * 0.04) * (Math.random() + 0.8)));
_local2._speed = (Math.random() + 0.4);
_debrisArray.push(_local2);
_local3 = new MC_debris();
bglvl2_mc.addChildAt(_local3, 0);
_local3.x = (Math.random() * bglvl2_mc.width);
_local3.scaleX = (_local3.scaleY = ((_quake * 0.02) * (Math.random() + 0.6)));
_local3._speed = (Math.random() + 0.2);
_debrisArray.push(_local3);
};
} else {
if (this.x != 0){
this.x = _stageInitPosX;
};
};
_debrisIndex = 0;
while (_debrisIndex < _debrisArray.length) {
_debrisArray[_debrisIndex].y = (_debrisArray[_debrisIndex].y + _debrisArray[_debrisIndex]._speed);
_debrisArray[_debrisIndex]._speed = (_debrisArray[_debrisIndex]._speed + 0.8);
_debrisArray[_debrisIndex].rotation = (_debrisArray[_debrisIndex].rotation + _debrisArray[_debrisIndex]._speed);
if (_debrisArray[_debrisIndex].y > stageArea_mc.height){
this.addChild(_debrisArray[_debrisIndex]);
removeChild(_debrisArray[_debrisIndex]);
_debrisArray.splice(_debrisIndex, 1);
};
_debrisIndex++;
};
_platformIndex = 0;
while (_platformIndex < _platformArray.length) {
_platformArray[_platformIndex].x = (_platformArray[_platformIndex].x - int((_playerSpeed + 0.5)));
_indexA = 0;
while (_indexA < _platformArray[_platformIndex].numChildren) {
if ((_platformArray[_platformIndex].x - stageArea_mc.width) < (-(_platformArray[_platformIndex].getChildAt(_indexA).width) * _indexA)){
_platformArray[_platformIndex].getChildAt(_indexA).visible = true;
};
if (_platformArray[_platformIndex].x < (-(_platformArray[_platformIndex].getChildAt(_indexA).width) * (_indexA + 1))){
_platformArray[_platformIndex].getChildAt(_indexA).visible = false;
};
if (getQualifiedClassName(_platformArray[_platformIndex].getChildAt(_indexA)) == "MC_coin"){
_platformArray[_platformIndex].getChildAt(_indexA).visible = true;
};
_indexA++;
};
if (_platformArray[_platformIndex].x < -(((_platformArray[_platformIndex].width - stageArea_mc.width) + _platformGap))){
if (_platformArray[_platformIndex]._state == 0){
_platformArray[_platformIndex]._state = 1;
createPlatform(stageArea_mc.width, (_lowPlatform + (Math.random() * (_highPlatform - _lowPlatform))), (_shortPlatform + int(((Math.random() * (_longPlatform - _shortPlatform)) + 0.5))));
};
};
if (_platformArray[_platformIndex].x < -(_platformArray[_platformIndex].width)){
removeChild(_platformArray[_platformIndex]);
_platformArray.splice(_platformIndex, 1);
};
if (_playerState != 0){
if ((((player_mc.x >= _platformArray[_platformIndex].x)) && ((player_mc.x <= (_platformArray[_platformIndex].x + _platformArray[_platformIndex].width))))){
if ((((player_mc.y >= _platformArray[_platformIndex].y)) && ((player_mc.y <= (_platformArray[_platformIndex].y - _playerJump))))){
player_mc.y = _platformArray[_platformIndex].y;
_playerState = 0;
_playerJump = 0;
};
};
};
if (_playerState == 0){
if (player_mc.x > (_platformArray[_platformIndex].x + _platformArray[_platformIndex].width)){
player_mc.run_mc.visible = false;
player_mc.runFast_mc.visible = false;
player_mc.fall_mc.visible = true;
_playerState = 2;
};
};
_indexA = 1;
while (_indexA < _platformArray[_platformIndex].numChildren) {
if (_platformArray[_platformIndex].getChildAt(_indexA).hitTestObject(player_mc.hitArea_mc)){
if (_platformArray[_platformIndex].getChildAt(_indexA)._state == 0){
if (_platformArray[_platformIndex].getChildAt(_indexA).currentLabel == "water"){
_playerSpeed = (_playerSpeed * 0.8);
_platformArray[_platformIndex].getChildAt(_indexA)._state = 1;
} else {
if (_platformArray[_platformIndex].getChildAt(_indexA).currentLabel == "ice"){
_playerSpeed = (_playerSpeed * 1.1);
_platformArray[_platformIndex].getChildAt(_indexA)._state = 1;
_playerHitIce = true;
player_mc.hitIce_mc.gotoAndPlay(1);
} else {
if (_platformArray[_platformIndex].getChildAt(_indexA).currentLabel == "fire"){
_playerSpeed = (_playerSpeed * 0.8);
_platformArray[_platformIndex].getChildAt(_indexA)._state = 1;
_playerHitFire = true;
_playerHitFireJump = 20;
} else {
_playerSpeed = (_playerSpeed * 0.5);
_platformArray[_platformIndex].getChildAt(_indexA)._state = 1;
_playerHit = true;
player_mc.hit_mc.gotoAndPlay(1);
_hurtSnd.play();
};
};
};
};
};
_indexA++;
};
_platformIndex++;
};
if (player_mc.hit_mc.currentFrame == 5){
player_mc.hit_mc.visible = false;
_playerHit = false;
};
if (player_mc.hitIce_mc.currentFrame == player_mc.hitIce_mc.totalFrames){
player_mc.hitIce_mc.visible = false;
_playerHitIce = false;
};
if (_playerHit){
player_mc.run_mc.visible = false;
player_mc.runFast_mc.visible = false;
player_mc.jump_mc.visible = false;
player_mc.fall_mc.visible = false;
player_mc.hit_mc.visible = true;
player_mc.hitFire_mc.visible = false;
player_mc.hitIce_mc.visible = false;
};
if (_playerHitIce){
player_mc.run_mc.visible = false;
player_mc.runFast_mc.visible = false;
player_mc.jump_mc.visible = false;
player_mc.fall_mc.visible = false;
player_mc.hit_mc.visible = false;
player_mc.hitFire_mc.visible = false;
player_mc.hitIce_mc.visible = true;
};
if (_playerHitFire){
player_mc.run_mc.visible = false;
player_mc.runFast_mc.visible = false;
player_mc.jump_mc.visible = false;
player_mc.fall_mc.visible = false;
player_mc.hit_mc.visible = false;
player_mc.hitFire_mc.visible = true;
player_mc.hitIce_mc.visible = false;
player_mc.y = (player_mc.y - _playerHitFireJump);
_playerHitFireJump = (_playerHitFireJump - 0.1);
if (Math.random() > 0.5){
createDust((player_mc.x + player_mc.hitFire_mc.x), ((player_mc.y + player_mc.hitFire_mc.y) - (Math.random() * 10)), ((Math.random() * 0.5) + 0.3), (-(_playerSpeed) * 0.5), ((-(Math.random()) * 0.5) + 0.3), ((Math.random() * 20) - 10));
};
};
if ((((_playerHitFireJump <= 0)) && (_playerHitFire))){
_playerHitFire = false;
player_mc.run_mc.visible = false;
player_mc.runFast_mc.visible = false;
player_mc.hitFire_mc.visible = false;
player_mc.fall_mc.visible = true;
_playerState = 2;
};
_coinIndex = 0;
while (_coinIndex < _coinArray.length) {
if (_coinArray[_coinIndex].hitTestObject(player_mc)){
_coinSnd.play();
_coinCount++;
coins_txt.text = _coinCount.toString();
temp = ((_coinCount * 10) + (Math.round((Number(distance_txt.text) / 100)) * 10));
score1_txt.text = temp.toString();
this.addChild(_coinArray[_coinIndex]);
this.removeChild(_coinArray[_coinIndex]);
_coinArray.splice(_coinIndex, 1);
if (_coinCount == _nextLevel){
checkLevel();
};
};
_coinIndex++;
};
addChild(player_mc);
_dustIndex = 0;
while (_dustIndex < _dustArray.length) {
_dustArray[_dustIndex].x = (_dustArray[_dustIndex].x + _dustArray[_dustIndex]._speedX);
_dustArray[_dustIndex].y = (_dustArray[_dustIndex].y + _dustArray[_dustIndex]._speedY);
_dustArray[_dustIndex]._speedY = (_dustArray[_dustIndex]._speedY - 0.1);
_dustArray[_dustIndex].scaleX = (_dustArray[_dustIndex].scaleY = (_dustArray[_dustIndex].scaleY - ((int((Math.random() + 0.5)) * 0.02) + 0.02)));
addChild(_dustArray[_dustIndex]);
if (_dustArray[_dustIndex].scaleX <= 0){
removeChild(_dustArray[_dustIndex]);
_dustArray.splice(_dustIndex, 1);
};
_dustIndex++;
};
addChild(coin_mc);
addChild(coins_txt);
addChild(distance_txt);
addChild(mute_mc);
if (muteBool){
mute_mc.gotoAndStop(2);
} else {
mute_mc.gotoAndStop(1);
};
if (_bannerDelay > 0){
_bannerDelay--;
};
if (player_mc.y > stageArea_mc.height){
if (_playerSpeed > 0){
_playerSpeed--;
} else {
gameStop();
_quake = 15;
addEventListener(Event.ENTER_FRAME, crashAnimation);
};
};
}
public function frameRate(_arg1:Event):void{
_frame++;
}
public function blah(_arg1:TimerEvent):void{
if (_arg1.currentTarget.currentCount == 180){
timer1.reset();
timer1.start();
step1.x = Math.round((700 + (Math.random() * 700)));
};
}
}
}//package ranchu_new_fla
Section 26
//MC_coin_58 (ranchu_new_fla.MC_coin_58)
package ranchu_new_fla {
import flash.display.*;
public dynamic class MC_coin_58 extends MovieClip {
public var coinShadow_mc:MovieClip;
public function MC_coin_58(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package ranchu_new_fla
Section 27
//MC_player_49 (ranchu_new_fla.MC_player_49)
package ranchu_new_fla {
import flash.display.*;
public dynamic class MC_player_49 extends MovieClip {
public var hitFire_mc:MovieClip;
public var hitIce_mc:MovieClip;
public var runFast_mc:MovieClip;
public var jump_mc:MovieClip;
public var hitArea_mc:MovieClip;
public var hit_mc:MovieClip;
public var run_mc:MovieClip;
public var fall_mc:MovieClip;
public var idle_mc:MovieClip;
}
}//package ranchu_new_fla
Section 28
//Symbol1_logochar_1 (ranchu_new_fla.Symbol1_logochar_1)
package ranchu_new_fla {
import flash.display.*;
public dynamic class Symbol1_logochar_1 extends MovieClip {
public var gameplay_logo:MovieClip;
public function Symbol1_logochar_1(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package ranchu_new_fla
Section 29
//lib_snow (lib_snow)
package {
import flash.display.*;
public dynamic class lib_snow extends MovieClip {
}
}//package
Section 30
//MC_backgroundLvl1 (MC_backgroundLvl1)
package {
import flash.display.*;
public dynamic class MC_backgroundLvl1 extends MovieClip {
}
}//package
Section 31
//MC_backgroundLvl2 (MC_backgroundLvl2)
package {
import flash.display.*;
public dynamic class MC_backgroundLvl2 extends MovieClip {
}
}//package
Section 32
//MC_banner (MC_banner)
package {
import flash.display.*;
public dynamic class MC_banner extends MovieClip {
}
}//package
Section 33
//MC_clickToStart (MC_clickToStart)
package {
import flash.display.*;
public dynamic class MC_clickToStart extends MovieClip {
}
}//package
Section 34
//MC_coin (MC_coin)
package {
import flash.display.*;
public dynamic class MC_coin extends MovieClip {
public var coinShadow_mc:MovieClip;
public function MC_coin(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 35
//MC_debris (MC_debris)
package {
import flash.display.*;
public dynamic class MC_debris extends Sprite {
}
}//package
Section 36
//MC_decal (MC_decal)
package {
import flash.display.*;
public dynamic class MC_decal extends MovieClip {
}
}//package
Section 37
//MC_dust (MC_dust)
package {
import flash.display.*;
public dynamic class MC_dust extends MovieClip {
}
}//package
Section 38
//MC_levelUpEffect (MC_levelUpEffect)
package {
import flash.display.*;
import flash.text.*;
public dynamic class MC_levelUpEffect extends MovieClip {
public var flash_mc:MovieClip;
public var levelup_txt:TextField;
public function MC_levelUpEffect(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package
Section 39
//MC_obstacle (MC_obstacle)
package {
import flash.display.*;
public dynamic class MC_obstacle extends MovieClip {
}
}//package
Section 40
//MC_readyGo (MC_readyGo)
package {
import flash.display.*;
public dynamic class MC_readyGo extends MovieClip {
}
}//package
Section 41
//MC_retry (MC_retry)
package {
import flash.display.*;
import flash.text.*;
public dynamic class MC_retry extends MovieClip {
public var distance_txt:TextField;
public var level_txt:TextField;
public var score_txt:TextField;
public var coins_txt:TextField;
}
}//package
Section 42
//ProgressBar_barSkin (ProgressBar_barSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_barSkin extends MovieClip {
}
}//package
Section 43
//ProgressBar_indeterminateSkin (ProgressBar_indeterminateSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_indeterminateSkin extends MovieClip {
}
}//package
Section 44
//ProgressBar_trackSkin (ProgressBar_trackSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_trackSkin extends MovieClip {
}
}//package
Section 45
//SND_bg (SND_bg)
package {
import flash.media.*;
public dynamic class SND_bg extends Sound {
}
}//package
Section 46
//SND_coin (SND_coin)
package {
import flash.media.*;
public dynamic class SND_coin extends Sound {
}
}//package
Section 47
//SND_fall (SND_fall)
package {
import flash.media.*;
public dynamic class SND_fall extends Sound {
}
}//package
Section 48
//SND_hurt (SND_hurt)
package {
import flash.media.*;
public dynamic class SND_hurt extends Sound {
}
}//package
Section 49
//SND_jump (SND_jump)
package {
import flash.media.*;
public dynamic class SND_jump extends Sound {
}
}//package
Section 50
//SND_LVLUP (SND_LVLUP)
package {
import flash.media.*;
public dynamic class SND_LVLUP extends Sound {
}
}//package
Section 51
//SnowFlake (SnowFlake)
package {
import flash.display.*;
public dynamic class SnowFlake extends MovieClip {
}
}//package
Section 52
//SnowFlake2 (SnowFlake2)
package {
import flash.display.*;
public dynamic class SnowFlake2 extends MovieClip {
}
}//package
Section 53
//steps (steps)
package {
import flash.display.*;
public dynamic class steps extends MovieClip {
public var step:MovieClip;
}
}//package