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

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

Steerwheels.swf

This is the info page for
Flash #47761

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


Text
Update?

You need to update your
current flash player and
reload the game.

TUDWAY

Press Space to return

Play them now!

www.gamesreloaded.com

You can only play the bonus levels on

Nope!

If the time reaches 0 you lose a life.

If you want a break just press space or the
pause button. This pauses time as well.

If you fall off the screen or get stuck press
the "R" key or the reset button.

The aim of the game is get the yellow ball to
the yellow exit in the least time possible!

You Need Help!

Tested By: Concept Media Team, UnionJackson, Seymour,
Finch, Stronghand, Henry, Smash, Ballard, Dibs, Mcintosh,
Capitan G, and Wragg

SteerWheels was made by Tudway
Made using Adobe Flash CS3 and APE
Sponsered by www.gamesreloaded.com

Credits

Help

Bonus Levels

More Games!

Use the arrow keys to move SteerWheels around.
Move SteerWheels onto the option you want and
press space to select.

SteerWheels

Credits

Play

Seconds Left:

Seconds Left:

Seconds Left:

Next Level?

Level 1 complete

Play More Fun Games!

Submit?

Submiting!

Replay?

You have Failed

end

Failed

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

You've completed the game!

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

Use left and right arrow keys to move

Push the yellow ball to the yellow bar

ActionScript [AS3]

Section 1
//BaseButton (fl.controls.BaseButton) package fl.controls { import flash.display.*; import fl.core.*; import flash.events.*; import fl.events.*; import flash.utils.*; public class BaseButton extends UIComponent { protected var _selected:Boolean;// = false private var unlockedMouseState:String; protected var pressTimer:Timer; protected var mouseState:String; protected var background:DisplayObject; private var _mouseStateLocked:Boolean;// = false protected var _autoRepeat:Boolean;// = false private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35}; public function BaseButton(){ _selected = false; _autoRepeat = false; _mouseStateLocked = false; super(); buttonMode = true; mouseChildren = false; useHandCursor = false; setupMouseEvents(); setMouseState("up"); pressTimer = new Timer(1, 0); pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true); } protected function endPress():void{ pressTimer.reset(); } public function set mouseStateLocked(_arg1:Boolean):void{ _mouseStateLocked = _arg1; if (_arg1 == false){ setMouseState(unlockedMouseState); } else { unlockedMouseState = mouseState; }; } public function get autoRepeat():Boolean{ return (_autoRepeat); } public function set autoRepeat(_arg1:Boolean):void{ _autoRepeat = _arg1; } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; mouseEnabled = _arg1; } public function get selected():Boolean{ return (_selected); } protected function mouseEventHandler(_arg1:MouseEvent):void{ if (_arg1.type == MouseEvent.MOUSE_DOWN){ setMouseState("down"); startPress(); } else { if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){ setMouseState("over"); endPress(); } else { if (_arg1.type == MouseEvent.ROLL_OUT){ setMouseState("up"); endPress(); }; }; }; } public function setMouseState(_arg1:String):void{ if (_mouseStateLocked){ unlockedMouseState = _arg1; return; }; if (mouseState == _arg1){ return; }; mouseState = _arg1; invalidate(InvalidationType.STATE); } protected function startPress():void{ if (_autoRepeat){ pressTimer.delay = Number(getStyleValue("repeatDelay")); pressTimer.start(); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } protected function buttonDown(_arg1:TimerEvent):void{ if (!_autoRepeat){ endPress(); return; }; if (pressTimer.currentCount == 1){ pressTimer.delay = Number(getStyleValue("repeatInterval")); }; dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true)); } public function set selected(_arg1:Boolean):void{ if (_selected == _arg1){ return; }; _selected = _arg1; invalidate(InvalidationType.STATE); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ drawBackground(); invalidate(InvalidationType.SIZE, false); }; if (isInvalid(InvalidationType.SIZE)){ drawLayout(); }; super.draw(); } protected function setupMouseEvents():void{ addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true); addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true); } protected function drawLayout():void{ background.width = width; background.height = height; } protected function drawBackground():void{ var _local1:String; var _local2:DisplayObject; _local1 = (enabled) ? mouseState : "disabled"; if (selected){ _local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1)); }; _local1 = (_local1 + "Skin"); _local2 = background; background = getDisplayObjectInstance(getStyleValue(_local1)); addChildAt(background, 0); if (((!((_local2 == null))) && (!((_local2 == background))))){ removeChild(_local2); }; } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 2
//Button (fl.controls.Button) package fl.controls { import flash.display.*; import fl.core.*; import fl.managers.*; public class Button extends LabelButton implements IFocusManagerComponent { protected var emphasizedBorder:DisplayObject; protected var _emphasized:Boolean;// = false private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2}; public static var createAccessibilityImplementation:Function; public function Button(){ _emphasized = false; super(); } override public function drawFocus(_arg1:Boolean):void{ var _local2:Number; var _local3:*; super.drawFocus(_arg1); if (_arg1){ _local2 = Number(getStyleValue("emphasizedPadding")); if ((((_local2 < 0)) || (!(_emphasized)))){ _local2 = 0; }; _local3 = getStyleValue("focusRectPadding"); _local3 = ((_local3)==null) ? 2 : _local3; _local3 = (_local3 + _local2); uiFocusRect.x = -(_local3); uiFocusRect.y = -(_local3); uiFocusRect.width = (width + (_local3 * 2)); uiFocusRect.height = (height + (_local3 * 2)); }; } public function set emphasized(_arg1:Boolean):void{ _emphasized = _arg1; invalidate(InvalidationType.STYLES); } override protected function draw():void{ if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){ drawEmphasized(); }; super.draw(); if (emphasizedBorder != null){ setChildIndex(emphasizedBorder, (numChildren - 1)); }; } public function get emphasized():Boolean{ return (_emphasized); } override protected function initializeAccessibility():void{ if (Button.createAccessibilityImplementation != null){ Button.createAccessibilityImplementation(this); }; } protected function drawEmphasized():void{ var _local1:Object; var _local2:Number; if (emphasizedBorder != null){ removeChild(emphasizedBorder); }; emphasizedBorder = null; if (!_emphasized){ return; }; _local1 = getStyleValue("emphasizedSkin"); if (_local1 != null){ emphasizedBorder = getDisplayObjectInstance(_local1); }; if (emphasizedBorder != null){ addChildAt(emphasizedBorder, 0); _local2 = Number(getStyleValue("emphasizedPadding")); emphasizedBorder.x = (emphasizedBorder.y = -(_local2)); emphasizedBorder.width = (width + (_local2 * 2)); emphasizedBorder.height = (height + (_local2 * 2)); }; } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles)); } } }//package fl.controls
Section 3
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement) package fl.controls { public class ButtonLabelPlacement { public static const TOP:String = "top"; public static const LEFT:String = "left"; public static const BOTTOM:String = "bottom"; public static const RIGHT:String = "right"; } }//package fl.controls
Section 4
//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 5
//ScrollBar (fl.controls.ScrollBar) package fl.controls { import fl.core.*; import flash.events.*; import fl.events.*; public class ScrollBar extends UIComponent { private var _direction:String;// = "vertical" protected var inDrag:Boolean;// = false protected var upArrow:BaseButton; private var _pageScrollSize:Number;// = 0 protected var downArrow:BaseButton; private var _pageSize:Number;// = 10 private var thumbScrollOffset:Number; private var _maxScrollPosition:Number;// = 0 private var _scrollPosition:Number;// = 0 protected var track:BaseButton; private var _minScrollPosition:Number;// = 0 private var _lineScrollSize:Number;// = 1 protected var thumb:LabelButton; protected static const THUMB_STYLES:Object = {disabledSkin:"thumbDisabledSkin", downSkin:"thumbDownSkin", overSkin:"thumbOverSkin", upSkin:"thumbUpSkin", icon:"thumbIcon", textPadding:0}; public static const WIDTH:Number = 15; protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; protected static const TRACK_STYLES:Object = {disabledSkin:"trackDisabledSkin", downSkin:"trackDownSkin", overSkin:"trackOverSkin", upSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"}; private static var defaultStyles:Object = {downArrowDisabledSkin:"ScrollArrowDown_disabledSkin", downArrowDownSkin:"ScrollArrowDown_downSkin", downArrowOverSkin:"ScrollArrowDown_overSkin", downArrowUpSkin:"ScrollArrowDown_upSkin", thumbDisabledSkin:"ScrollThumb_upSkin", thumbDownSkin:"ScrollThumb_downSkin", thumbOverSkin:"ScrollThumb_overSkin", thumbUpSkin:"ScrollThumb_upSkin", trackDisabledSkin:"ScrollTrack_skin", trackDownSkin:"ScrollTrack_skin", trackOverSkin:"ScrollTrack_skin", trackUpSkin:"ScrollTrack_skin", upArrowDisabledSkin:"ScrollArrowUp_disabledSkin", upArrowDownSkin:"ScrollArrowUp_downSkin", upArrowOverSkin:"ScrollArrowUp_overSkin", upArrowUpSkin:"ScrollArrowUp_upSkin", thumbIcon:"ScrollBar_thumbIcon", repeatDelay:500, repeatInterval:35}; public function ScrollBar(){ _pageSize = 10; _pageScrollSize = 0; _lineScrollSize = 1; _minScrollPosition = 0; _maxScrollPosition = 0; _scrollPosition = 0; _direction = ScrollBarDirection.VERTICAL; inDrag = false; super(); setStyles(); focusEnabled = false; } public function get minScrollPosition():Number{ return (_minScrollPosition); } public function set minScrollPosition(_arg1:Number):void{ setScrollProperties(_pageSize, _arg1, _maxScrollPosition); } public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{ var _local3:Number; _local3 = scrollPosition; _scrollPosition = Math.max(_minScrollPosition, Math.min(_maxScrollPosition, _arg1)); if (_local3 == _scrollPosition){ return; }; if (_arg2){ dispatchEvent(new ScrollEvent(_direction, (scrollPosition - _local3), scrollPosition)); }; updateThumb(); } public function set scrollPosition(_arg1:Number):void{ setScrollPosition(_arg1, true); } public function get pageScrollSize():Number{ return (((_pageScrollSize)==0) ? _pageSize : _pageScrollSize); } public function set pageSize(_arg1:Number):void{ if (_arg1 > 0){ _pageSize = _arg1; }; } public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{ this.pageSize = _arg1; _minScrollPosition = _arg2; _maxScrollPosition = _arg3; if (_arg4 >= 0){ _pageScrollSize = _arg4; }; enabled = (_maxScrollPosition > _minScrollPosition); setScrollPosition(_scrollPosition, false); updateThumb(); } override public function set enabled(_arg1:Boolean):void{ super.enabled = _arg1; downArrow.enabled = (track.enabled = (thumb.enabled = (upArrow.enabled = ((enabled) && ((_maxScrollPosition > _minScrollPosition)))))); updateThumb(); } protected function updateThumb():void{ var _local1:Number; _local1 = ((_maxScrollPosition - _minScrollPosition) + _pageSize); if ((((((track.height <= 12)) || ((_maxScrollPosition <= _minScrollPosition)))) || ((((_local1 == 0)) || (isNaN(_local1)))))){ thumb.height = 12; thumb.visible = false; } else { thumb.height = Math.max(13, ((_pageSize / _local1) * track.height)); thumb.y = (track.y + ((track.height - thumb.height) * ((_scrollPosition - _minScrollPosition) / (_maxScrollPosition - _minScrollPosition)))); thumb.visible = enabled; }; } protected function thumbPressHandler(_arg1:MouseEvent):void{ inDrag = true; thumbScrollOffset = (mouseY - thumb.y); thumb.mouseStateLocked = true; mouseChildren = false; stage.addEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag, false, 0, true); stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true); } protected function thumbReleaseHandler(_arg1:MouseEvent):void{ inDrag = false; mouseChildren = true; thumb.mouseStateLocked = false; stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag); stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler); } public function set pageScrollSize(_arg1:Number):void{ if (_arg1 >= 0){ _pageScrollSize = _arg1; }; } protected function handleThumbDrag(_arg1:MouseEvent):void{ var _local2:Number; _local2 = Math.max(0, Math.min((track.height - thumb.height), ((mouseY - track.y) - thumbScrollOffset))); setScrollPosition((((_local2 / (track.height - thumb.height)) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition)); } public function set direction(_arg1:String):void{ var _local2:Boolean; if (_direction == _arg1){ return; }; _direction = _arg1; if (isLivePreview){ return; }; setScaleY(1); _local2 = (_direction == ScrollBarDirection.HORIZONTAL); if (((_local2) && (componentInspectorSetting))){ if (rotation == 90){ return; }; setScaleX(-1); rotation = -90; }; if (!componentInspectorSetting){ if (((_local2) && ((rotation == 0)))){ rotation = -90; setScaleX(-1); } else { if (((!(_local2)) && ((rotation == -90)))){ rotation = 0; setScaleX(1); }; }; }; invalidate(InvalidationType.SIZE); } public function set lineScrollSize(_arg1:Number):void{ if (_arg1 > 0){ _lineScrollSize = _arg1; }; } override public function get height():Number{ return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.width : super.height); } protected function scrollPressHandler(_arg1:ComponentEvent):void{ var _local2:Number; var _local3:Number; _arg1.stopImmediatePropagation(); if (_arg1.currentTarget == upArrow){ setScrollPosition((_scrollPosition - _lineScrollSize)); } else { if (_arg1.currentTarget == downArrow){ setScrollPosition((_scrollPosition + _lineScrollSize)); } else { _local2 = (((track.mouseY / track.height) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition); _local3 = ((pageScrollSize)==0) ? pageSize : pageScrollSize; if (_scrollPosition < _local2){ setScrollPosition(Math.min(_local2, (_scrollPosition + _local3))); } else { if (_scrollPosition > _local2){ setScrollPosition(Math.max(_local2, (_scrollPosition - _local3))); }; }; }; }; } public function get pageSize():Number{ return (_pageSize); } public function set maxScrollPosition(_arg1:Number):void{ setScrollProperties(_pageSize, _minScrollPosition, _arg1); } public function get scrollPosition():Number{ return (_scrollPosition); } override public function get enabled():Boolean{ return (super.enabled); } override protected function draw():void{ var _local1:Number; if (isInvalid(InvalidationType.SIZE)){ _local1 = super.height; downArrow.move(0, Math.max(upArrow.height, (_local1 - downArrow.height))); track.setSize(WIDTH, Math.max(0, (_local1 - (downArrow.height + upArrow.height)))); updateThumb(); }; if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){ setStyles(); }; downArrow.drawNow(); upArrow.drawNow(); track.drawNow(); thumb.drawNow(); validate(); } override protected function configUI():void{ super.configUI(); track = new BaseButton(); track.move(0, 14); track.useHandCursor = false; track.autoRepeat = true; track.focusEnabled = false; addChild(track); thumb = new LabelButton(); thumb.label = ""; thumb.setSize(WIDTH, 15); thumb.move(0, 15); thumb.focusEnabled = false; addChild(thumb); downArrow = new BaseButton(); downArrow.setSize(WIDTH, 14); downArrow.autoRepeat = true; downArrow.focusEnabled = false; addChild(downArrow); upArrow = new BaseButton(); upArrow.setSize(WIDTH, 14); upArrow.move(0, 0); upArrow.autoRepeat = true; upArrow.focusEnabled = false; addChild(upArrow); upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true); downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true); track.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true); thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true); enabled = false; } public function get direction():String{ return (_direction); } public function get lineScrollSize():Number{ return (_lineScrollSize); } override public function setSize(_arg1:Number, _arg2:Number):void{ if (_direction == ScrollBarDirection.HORIZONTAL){ super.setSize(_arg2, _arg1); } else { super.setSize(_arg1, _arg2); }; } public function get maxScrollPosition():Number{ return (_maxScrollPosition); } override public function get width():Number{ return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.height : super.width); } protected function setStyles():void{ copyStylesToChild(downArrow, DOWN_ARROW_STYLES); copyStylesToChild(thumb, THUMB_STYLES); copyStylesToChild(track, TRACK_STYLES); copyStylesToChild(upArrow, UP_ARROW_STYLES); } public static function getStyleDefinition():Object{ return (defaultStyles); } } }//package fl.controls
Section 6
//ScrollBarDirection (fl.controls.ScrollBarDirection) package fl.controls { public class ScrollBarDirection { public static const HORIZONTAL:String = "horizontal"; public static const VERTICAL:String = "vertical"; } }//package fl.controls
Section 7
//UIScrollBar (fl.controls.UIScrollBar) package fl.controls { import fl.core.*; import flash.events.*; import fl.events.*; import flash.text.*; public class UIScrollBar extends ScrollBar { protected var inScroll:Boolean;// = false protected var _scrollTarget:TextField; protected var inEdit:Boolean;// = false private static var defaultStyles:Object = {}; public function UIScrollBar(){ inEdit = false; inScroll = false; super(); } protected function handleTargetScroll(_arg1:Event):void{ if (inDrag){ return; }; if (!enabled){ return; }; inEdit = true; updateScrollTargetProperties(); scrollPosition = ((direction)==ScrollBarDirection.HORIZONTAL) ? _scrollTarget.scrollH : _scrollTarget.scrollV; inEdit = false; } override public function set minScrollPosition(_arg1:Number):void{ super.minScrollPosition = ((_arg1)<0) ? 0 : _arg1; } override public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{ super.setScrollPosition(_arg1, _arg2); if (!_scrollTarget){ inScroll = false; return; }; updateTargetScroll(); } override public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{ var _local5:Number; var _local6:Number; _local5 = _arg3; _local6 = ((_arg2)<0) ? 0 : _arg2; if (_scrollTarget != null){ if (direction == ScrollBarDirection.HORIZONTAL){ _local5 = ((_arg3)>_scrollTarget.maxScrollH) ? _scrollTarget.maxScrollH : _local5; } else { _local5 = ((_arg3)>_scrollTarget.maxScrollV) ? _scrollTarget.maxScrollV : _local5; }; }; super.setScrollProperties(_arg1, _local6, _local5, _arg4); } public function get scrollTargetName():String{ return (_scrollTarget.name); } public function get scrollTarget():TextField{ return (_scrollTarget); } protected function updateScrollTargetProperties():void{ var _local1:Boolean; var _local2:Number; if (_scrollTarget == null){ setScrollProperties(pageSize, minScrollPosition, maxScrollPosition, pageScrollSize); scrollPosition = 0; } else { _local1 = (direction == ScrollBarDirection.HORIZONTAL); _local2 = (_local1) ? _scrollTarget.width : 10; setScrollProperties(_local2, (_local1) ? 0 : 1, (_local1) ? _scrollTarget.maxScrollH : _scrollTarget.maxScrollV, pageScrollSize); scrollPosition = (_local1) ? _scrollTarget.scrollH : _scrollTarget.scrollV; }; } public function update():void{ inEdit = true; updateScrollTargetProperties(); inEdit = false; } public function set scrollTargetName(_arg1:String):void{ var target = _arg1; try { scrollTarget = (parent.getChildByName(target) as TextField); } catch(error:Error) { throw (new Error("ScrollTarget not found, or is not a TextField")); }; } override public function set direction(_arg1:String):void{ if (isLivePreview){ return; }; super.direction = _arg1; updateScrollTargetProperties(); } protected function handleTargetChange(_arg1:Event):void{ inEdit = true; setScrollPosition(((direction)==ScrollBarDirection.HORIZONTAL) ? _scrollTarget.scrollH : _scrollTarget.scrollV, true); updateScrollTargetProperties(); inEdit = false; } override public function set maxScrollPosition(_arg1:Number):void{ var _local2:Number; _local2 = _arg1; if (_scrollTarget != null){ if (direction == ScrollBarDirection.HORIZONTAL){ _local2 = ((_local2)>_scrollTarget.maxScrollH) ? _scrollTarget.maxScrollH : _local2; } else { _local2 = ((_local2)>_scrollTarget.maxScrollV) ? _scrollTarget.maxScrollV : _local2; }; }; super.maxScrollPosition = _local2; } protected function updateTargetScroll(_arg1:ScrollEvent=null):void{ if (inEdit){ return; }; if (direction == ScrollBarDirection.HORIZONTAL){ _scrollTarget.scrollH = scrollPosition; } else { _scrollTarget.scrollV = scrollPosition; }; } override protected function draw():void{ if (isInvalid(InvalidationType.DATA)){ updateScrollTargetProperties(); }; super.draw(); } public function set scrollTarget(_arg1:TextField):void{ if (_scrollTarget != null){ _scrollTarget.removeEventListener(Event.CHANGE, handleTargetChange, false); _scrollTarget.removeEventListener(TextEvent.TEXT_INPUT, handleTargetChange, false); _scrollTarget.removeEventListener(Event.SCROLL, handleTargetScroll, false); removeEventListener(ScrollEvent.SCROLL, updateTargetScroll, false); }; _scrollTarget = _arg1; if (_scrollTarget != null){ _scrollTarget.addEventListener(Event.CHANGE, handleTargetChange, false, 0, true); _scrollTarget.addEventListener(TextEvent.TEXT_INPUT, handleTargetChange, false, 0, true); _scrollTarget.addEventListener(Event.SCROLL, handleTargetScroll, false, 0, true); addEventListener(ScrollEvent.SCROLL, updateTargetScroll, false, 0, true); }; invalidate(InvalidationType.DATA); } override public function get direction():String{ return (super.direction); } public static function getStyleDefinition():Object{ return (UIComponent.mergeStyles(defaultStyles, ScrollBar.getStyleDefinition())); } } }//package fl.controls
Section 8
//ComponentShim (fl.core.ComponentShim) package fl.core { import flash.display.*; public dynamic class ComponentShim extends MovieClip { } }//package fl.core
Section 9
//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 10
//UIComponent (fl.core.UIComponent) package fl.core { import flash.display.*; import flash.events.*; import fl.managers.*; import fl.events.*; import flash.text.*; import flash.utils.*; import flash.system.*; public class UIComponent extends Sprite { protected var _enabled:Boolean;// = true private var _mouseFocusEnabled:Boolean;// = true protected var startHeight:Number; protected var _height:Number; protected var _oldIMEMode:String;// = null protected var startWidth:Number; public var focusTarget:IFocusManagerComponent; protected var errorCaught:Boolean;// = false protected var uiFocusRect:DisplayObject; protected var _width:Number; public var version:String;// = "3.0.0.15" protected var isFocused:Boolean;// = false protected var callLaterMethods:Dictionary; private var _focusEnabled:Boolean;// = true private var tempText:TextField; protected var invalidateFlag:Boolean;// = false protected var _inspector:Boolean;// = false protected var sharedStyles:Object; protected var invalidHash:Object; protected var isLivePreview:Boolean;// = false protected var _imeMode:String;// = null protected var instanceStyles:Object; protected var _x:Number; protected var _y:Number; public static var inCallLaterPhase:Boolean = false; private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)}; public static var createAccessibilityImplementation:Function; private static var focusManagers:Dictionary = new Dictionary(false); public function UIComponent(){ version = "3.0.0.15"; isLivePreview = false; invalidateFlag = false; _enabled = true; isFocused = false; _focusEnabled = true; _mouseFocusEnabled = true; _imeMode = null; _oldIMEMode = null; errorCaught = false; _inspector = false; super(); instanceStyles = {}; sharedStyles = {}; invalidHash = {}; callLaterMethods = new Dictionary(); StyleManager.registerInstance(this); configUI(); invalidate(InvalidationType.ALL); tabEnabled = (this is IFocusManagerComponent); focusRect = false; if (tabEnabled){ addEventListener(FocusEvent.FOCUS_IN, focusInHandler); addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler); addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler); addEventListener(KeyboardEvent.KEY_UP, keyUpHandler); }; initializeFocusManager(); addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true); } public function drawFocus(_arg1:Boolean):void{ var _local2:Number; isFocused = _arg1; if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){ removeChild(uiFocusRect); uiFocusRect = null; }; if (_arg1){ uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite); if (uiFocusRect == null){ return; }; _local2 = Number(getStyleValue("focusRectPadding")); uiFocusRect.x = -(_local2); uiFocusRect.y = -(_local2); uiFocusRect.width = (width + (_local2 * 2)); uiFocusRect.height = (height + (_local2 * 2)); addChildAt(uiFocusRect, 0); }; } private function callLaterDispatcher(_arg1:Event):void{ var _local2:Dictionary; var _local3:Object; if (_arg1.type == Event.ADDED_TO_STAGE){ removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher); stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); return; }; _arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher); if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); return; }; inCallLaterPhase = true; _local2 = callLaterMethods; for (_local3 in _local2) { _local3(); delete _local2[_local3]; }; inCallLaterPhase = false; } private function addedHandler(_arg1:Event):void{ removeEventListener("addedToStage", addedHandler); initializeFocusManager(); } protected function getStyleValue(_arg1:String):Object{ return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]); } protected function isOurFocus(_arg1:DisplayObject):Boolean{ return ((_arg1 == this)); } override public function get scaleX():Number{ return ((width / startWidth)); } override public function get scaleY():Number{ return ((height / startHeight)); } override public function set height(_arg1:Number):void{ if (_height == _arg1){ return; }; setSize(width, _arg1); } protected function keyDownHandler(_arg1:KeyboardEvent):void{ } protected function focusInHandler(_arg1:FocusEvent):void{ var _local2:IFocusManager; if (isOurFocus((_arg1.target as DisplayObject))){ _local2 = focusManager; if (((_local2) && (_local2.showFocusIndicator))){ drawFocus(true); isFocused = true; }; }; } public function setStyle(_arg1:String, _arg2:Object):void{ if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; instanceStyles[_arg1] = _arg2; invalidate(InvalidationType.STYLES); } override public function get visible():Boolean{ return (super.visible); } public function get componentInspectorSetting():Boolean{ return (_inspector); } override public function get x():Number{ return ((isNaN(_x)) ? super.x : _x); } override public function get y():Number{ return ((isNaN(_y)) ? super.y : _y); } protected function setIMEMode(_arg1:Boolean){ var enabled = _arg1; if (_imeMode != null){ if (enabled){ IME.enabled = true; _oldIMEMode = IME.conversionMode; try { if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _imeMode; }; errorCaught = false; } catch(e:Error) { errorCaught = true; throw (new Error(("IME mode not supported: " + _imeMode))); }; } else { if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){ IME.conversionMode = _oldIMEMode; }; IME.enabled = false; }; }; } public function set enabled(_arg1:Boolean):void{ if (_arg1 == _enabled){ return; }; _enabled = _arg1; invalidate(InvalidationType.STATE); } public function setSharedStyle(_arg1:String, _arg2:Object):void{ if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; sharedStyles[_arg1] = _arg2; if (instanceStyles[_arg1] == null){ invalidate(InvalidationType.STYLES); }; } protected function keyUpHandler(_arg1:KeyboardEvent):void{ } public function set focusEnabled(_arg1:Boolean):void{ _focusEnabled = _arg1; } override public function set scaleX(_arg1:Number):void{ setSize((startWidth * _arg1), height); } public function get mouseFocusEnabled():Boolean{ return (_mouseFocusEnabled); } override public function set scaleY(_arg1:Number):void{ setSize(width, (startHeight * _arg1)); } protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{ var classDef:Object; var skin = _arg1; classDef = null; if ((skin is Class)){ return ((new (skin) as DisplayObject)); }; if ((skin is DisplayObject)){ (skin as DisplayObject).x = 0; (skin as DisplayObject).y = 0; return ((skin as DisplayObject)); }; try { classDef = getDefinitionByName(skin.toString()); } catch(e:Error) { try { classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object); } catch(e:Error) { }; }; if (classDef == null){ return (null); }; return ((new (classDef) as DisplayObject)); } protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{ var _local3:String; for (_local3 in _arg2) { _arg1.setStyle(_local3, getStyleValue(_arg2[_local3])); }; } protected function beforeComponentParameters():void{ } protected function callLater(_arg1:Function):void{ if (inCallLaterPhase){ return; }; callLaterMethods[_arg1] = true; if (stage != null){ stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true); stage.invalidate(); } else { addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true); }; } protected function createFocusManager():void{ if (focusManagers[stage] == null){ focusManagers[stage] = new FocusManager(stage); }; } override public function set visible(_arg1:Boolean):void{ var _local2:String; if (super.visible == _arg1){ return; }; super.visible = _arg1; _local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE; dispatchEvent(new ComponentEvent(_local2, true)); } protected function hookAccessibility(_arg1:Event):void{ removeEventListener(Event.ENTER_FRAME, hookAccessibility); initializeAccessibility(); } public function set componentInspectorSetting(_arg1:Boolean):void{ _inspector = _arg1; if (_inspector){ beforeComponentParameters(); } else { afterComponentParameters(); }; } override public function set x(_arg1:Number):void{ move(_arg1, _y); } public function drawNow():void{ draw(); } override public function set y(_arg1:Number):void{ move(_x, _arg1); } protected function checkLivePreview():Boolean{ var className:String; if (parent == null){ return (false); }; try { className = getQualifiedClassName(parent); } catch(e:Error) { }; return ((className == "fl.livepreview::LivePreviewParent")); } protected function focusOutHandler(_arg1:FocusEvent):void{ if (isOurFocus((_arg1.target as DisplayObject))){ drawFocus(false); isFocused = false; }; } public function set mouseFocusEnabled(_arg1:Boolean):void{ _mouseFocusEnabled = _arg1; } public function getFocus():InteractiveObject{ if (stage){ return (stage.focus); }; return (null); } protected function validate():void{ invalidHash = {}; } override public function get height():Number{ return (_height); } public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{ invalidHash[_arg1] = true; if (_arg2){ this.callLater(draw); }; } public function get enabled():Boolean{ return (_enabled); } protected function getScaleX():Number{ return (super.scaleX); } protected function getScaleY():Number{ return (super.scaleY); } public function get focusEnabled():Boolean{ return (_focusEnabled); } protected function afterComponentParameters():void{ } protected function draw():void{ if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){ if (((isFocused) && (focusManager.showFocusIndicator))){ drawFocus(true); }; }; validate(); } protected function configUI():void{ var _local1:Number; var _local2:Number; var _local3:Number; isLivePreview = checkLivePreview(); _local1 = rotation; rotation = 0; _local2 = super.width; _local3 = super.height; var _local4 = 1; super.scaleY = _local4; super.scaleX = _local4; setSize(_local2, _local3); move(super.x, super.y); rotation = _local1; startWidth = _local2; startHeight = _local3; if (numChildren > 0){ removeChildAt(0); }; } protected function setScaleX(_arg1:Number):void{ super.scaleX = _arg1; } protected function setScaleY(_arg1:Number):void{ super.scaleY = _arg1; } private function initializeFocusManager():void{ if (stage == null){ addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true); } else { createFocusManager(); }; } public function set focusManager(_arg1:IFocusManager):void{ UIComponent.focusManagers[this] = _arg1; } public function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } protected function isInvalid(_arg1:String, ... _args):Boolean{ if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){ return (true); }; while (_args.length > 0) { if (invalidHash[_args.pop()]){ return (true); }; }; return (false); } public function setSize(_arg1:Number, _arg2:Number):void{ _width = _arg1; _height = _arg2; invalidate(InvalidationType.SIZE); dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false)); } override public function set width(_arg1:Number):void{ if (_width == _arg1){ return; }; setSize(_arg1, height); } public function setFocus():void{ if (stage){ stage.focus = this; }; } protected function initializeAccessibility():void{ if (UIComponent.createAccessibilityImplementation != null){ UIComponent.createAccessibilityImplementation(this); }; } public function get focusManager():IFocusManager{ var _local1:DisplayObject; _local1 = this; while (_local1) { if (UIComponent.focusManagers[_local1] != null){ return (IFocusManager(UIComponent.focusManagers[_local1])); }; _local1 = _local1.parent; }; return (null); } override public function get width():Number{ return (_width); } public function move(_arg1:Number, _arg2:Number):void{ _x = _arg1; _y = _arg2; super.x = Math.round(_arg1); super.y = Math.round(_arg2); dispatchEvent(new ComponentEvent(ComponentEvent.MOVE)); } public function validateNow():void{ invalidate(InvalidationType.ALL, false); draw(); } public function getStyle(_arg1:String):Object{ return (instanceStyles[_arg1]); } public static function getStyleDefinition():Object{ return (defaultStyles); } public static function mergeStyles(... _args):Object{ var _local2:Object; var _local3:uint; var _local4:uint; var _local5:Object; var _local6:String; _local2 = {}; _local3 = _args.length; _local4 = 0; while (_local4 < _local3) { _local5 = _args[_local4]; for (_local6 in _local5) { if (_local2[_local6] != null){ } else { _local2[_local6] = _args[_local4][_local6]; }; }; _local4++; }; return (_local2); } } }//package fl.core
Section 11
//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 12
//ScrollEvent (fl.events.ScrollEvent) package fl.events { import flash.events.*; public class ScrollEvent extends Event { private var _position:Number; private var _direction:String; private var _delta:Number; public static const SCROLL:String = "scroll"; public function ScrollEvent(_arg1:String, _arg2:Number, _arg3:Number){ super(ScrollEvent.SCROLL, false, false); _direction = _arg1; _delta = _arg2; _position = _arg3; } override public function clone():Event{ return (new ScrollEvent(_direction, _delta, _position)); } public function get position():Number{ return (_position); } override public function toString():String{ return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position")); } public function get delta():Number{ return (_delta); } public function get direction():String{ return (_direction); } } }//package fl.events
Section 13
//FocusManager (fl.managers.FocusManager) package fl.managers { import fl.controls.*; import flash.display.*; import fl.core.*; import flash.events.*; import flash.text.*; import flash.utils.*; import flash.ui.*; public class FocusManager implements IFocusManager { private var focusableObjects:Dictionary; private var _showFocusIndicator:Boolean;// = true private var defButton:Button; private var focusableCandidates:Array; private var _form:DisplayObjectContainer; private var _defaultButtonEnabled:Boolean;// = true private var activated:Boolean;// = false private var _defaultButton:Button; private var calculateCandidates:Boolean;// = true private var lastFocus:InteractiveObject; private var lastAction:String; public function FocusManager(_arg1:DisplayObjectContainer){ activated = false; calculateCandidates = true; _showFocusIndicator = true; _defaultButtonEnabled = true; super(); focusableObjects = new Dictionary(true); if (_arg1 != null){ _form = _arg1; addFocusables(DisplayObject(_arg1)); _arg1.addEventListener(Event.ADDED, addedHandler); _arg1.addEventListener(Event.REMOVED, removedHandler); activate(); }; } public function get showFocusIndicator():Boolean{ return (_showFocusIndicator); } private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{ var _local5:int; var _local6:int; var _local7:DisplayObject; var _local8:IFocusManagerGroup; var _local9:int; var _local10:DisplayObject; var _local11:IFocusManagerGroup; _local5 = focusableCandidates.length; _local6 = _arg1; while (true) { if (_arg2){ _arg1--; } else { _arg1++; }; if (_arg3){ if (((_arg2) && ((_arg1 < 0)))){ break; }; if (((!(_arg2)) && ((_arg1 == _local5)))){ break; }; } else { _arg1 = ((_arg1 + _local5) % _local5); if (_local6 == _arg1){ break; }; }; if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){ _local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1])); if ((_local7 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local7); _local9 = 0; while (_local9 < focusableCandidates.length) { _local10 = focusableCandidates[_local9]; if ((_local10 is IFocusManagerGroup)){ _local11 = IFocusManagerGroup(_local10); if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){ _arg1 = _local9; break; }; }; _local9++; }; }; return (_arg1); }; }; return (_arg1); } public function set form(_arg1:DisplayObjectContainer):void{ _form = _arg1; } private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{ var focusable:IFocusManagerComponent; var io:InteractiveObject; var doc:DisplayObjectContainer; var i:int; var child:DisplayObject; var o = _arg1; var skipTopLevel = _arg2; if (!skipTopLevel){ if ((o is IFocusManagerComponent)){ focusable = IFocusManagerComponent(o); if (focusable.focusEnabled){ if (((focusable.tabEnabled) && (isTabVisible(o)))){ focusableObjects[o] = true; calculateCandidates = true; }; o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; } else { if ((o is InteractiveObject)){ io = (o as InteractiveObject); if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){ focusableObjects[io] = true; calculateCandidates = true; }; io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); }; }; }; if ((o is DisplayObjectContainer)){ doc = DisplayObjectContainer(o); o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){ i = 0; while (i < doc.numChildren) { try { child = doc.getChildAt(i); if (child != null){ addFocusables(doc.getChildAt(i)); }; } catch(error:SecurityError) { }; i = (i + 1); }; }; }; } private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{ return (_arg1.getChildIndex(_arg2)); } private function mouseFocusChangeHandler(_arg1:FocusEvent):void{ if ((_arg1.relatedObject is TextField)){ return; }; _arg1.preventDefault(); } private function focusOutHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; _local2 = (_arg1.target as InteractiveObject); } private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{ var _local3:IFocusManagerGroup; if (!isEnabledAndVisible(_arg1)){ return (false); }; if ((_arg1 is IFocusManagerGroup)){ _local3 = IFocusManagerGroup(_arg1); if (_arg2 == _local3.groupName){ return (false); }; }; return (true); } public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{ var _local2:InteractiveObject; _local2 = _arg1; while (_arg1) { if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){ return (_arg1); }; _arg1 = _arg1.parent; }; return (_local2); } private function sortFocusableObjectsTabIndex():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){ focusableCandidates.push(_local2); }; }; focusableCandidates.sort(sortByTabIndex); } private function removeFocusables(_arg1:DisplayObject):void{ var _local2:Object; var _local3:DisplayObject; if ((_arg1 is DisplayObjectContainer)){ _arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler); _arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler); for (_local2 in focusableObjects) { _local3 = DisplayObject(_local2); if (DisplayObjectContainer(_arg1).contains(_local3)){ if (_local3 == lastFocus){ lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local2]; calculateCandidates = true; }; }; }; } private function addedHandler(_arg1:Event):void{ var _local2:DisplayObject; _local2 = DisplayObject(_arg1.target); if (_local2.stage){ addFocusables(DisplayObject(_arg1.target)); }; } private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{ while (_arg1 != InteractiveObject(form)) { if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){ return (_arg1); }; _arg1 = _arg1.parent; if (_arg1 == null){ break; }; }; return (null); } private function tabChildrenChangeHandler(_arg1:Event):void{ var _local2:DisplayObjectContainer; if (_arg1.target != _arg1.currentTarget){ return; }; calculateCandidates = true; _local2 = DisplayObjectContainer(_arg1.target); if (_local2.tabChildren){ addFocusables(_local2, true); } else { removeFocusables(_local2); }; } public function sendDefaultButtonEvent():void{ defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK)); } public function getFocus():InteractiveObject{ var _local1:InteractiveObject; _local1 = form.stage.focus; return (findFocusManagerComponent(_local1)); } private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; var _local3:TextField; var _local4:SimpleButton; _local2 = DisplayObject(form).parent; while (_arg1 != _local2) { if ((_arg1 is UIComponent)){ if (!UIComponent(_arg1).enabled){ return (false); }; } else { if ((_arg1 is TextField)){ _local3 = TextField(_arg1); if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){ return (false); }; } else { if ((_arg1 is SimpleButton)){ _local4 = SimpleButton(_arg1); if (!_local4.enabled){ return (false); }; }; }; }; if (!_arg1.visible){ return (false); }; _arg1 = _arg1.parent; }; return (true); } public function set defaultButton(_arg1:Button):void{ var _local2:Button; _local2 = (_arg1) ? Button(_arg1) : null; if (_local2 != _defaultButton){ if (_defaultButton){ _defaultButton.emphasized = false; }; if (defButton){ defButton.emphasized = false; }; _defaultButton = _local2; defButton = _local2; if (_local2){ _local2.emphasized = true; }; }; } private function deactivateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); } public function setFocus(_arg1:InteractiveObject):void{ if ((_arg1 is IFocusManagerComponent)){ IFocusManagerComponent(_arg1).setFocus(); } else { form.stage.focus = _arg1; }; } private function setFocusToNextObject(_arg1:FocusEvent):void{ var _local2:InteractiveObject; if (!hasFocusableObjects()){ return; }; _local2 = getNextFocusManagerComponent(_arg1.shiftKey); if (_local2){ setFocus(_local2); }; } private function hasFocusableObjects():Boolean{ var _local1:Object; for (_local1 in focusableObjects) { return (true); }; return (false); } private function tabIndexChangeHandler(_arg1:Event):void{ calculateCandidates = true; } private function sortFocusableObjects():void{ var _local1:Object; var _local2:InteractiveObject; focusableCandidates = []; for (_local1 in focusableObjects) { _local2 = InteractiveObject(_local1); if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){ sortFocusableObjectsTabIndex(); return; }; focusableCandidates.push(_local2); }; focusableCandidates.sort(sortByDepth); } private function keyFocusChangeHandler(_arg1:FocusEvent):void{ showFocusIndicator = true; if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){ setFocusToNextObject(_arg1); _arg1.preventDefault(); }; } private function getIndexOfFocusedObject(_arg1:DisplayObject):int{ var _local2:int; var _local3:int; _local2 = focusableCandidates.length; _local3 = 0; _local3 = 0; while (_local3 < _local2) { if (focusableCandidates[_local3] == _arg1){ return (_local3); }; _local3++; }; return (-1); } public function hideFocus():void{ } private function removedHandler(_arg1:Event):void{ var _local2:int; var _local3:DisplayObject; var _local4:InteractiveObject; _local3 = DisplayObject(_arg1.target); if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){ if (_local3 == lastFocus){ IFocusManagerComponent(lastFocus).drawFocus(false); lastFocus = null; }; _local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); delete focusableObjects[_local3]; calculateCandidates = true; } else { if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){ _local4 = (_local3 as InteractiveObject); if (_local4){ if (_local4 == lastFocus){ lastFocus = null; }; delete focusableObjects[_local4]; calculateCandidates = true; }; _local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler); }; }; removeFocusables(_local3); } private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{ var _local3:String; var _local4:String; var _local5:int; var _local6:String; var _local7:String; var _local8:String; var _local9:DisplayObject; var _local10:DisplayObject; _local3 = ""; _local4 = ""; _local8 = "0000"; _local9 = DisplayObject(_arg1); _local10 = DisplayObject(_arg2); while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) { _local5 = getChildIndex(_local9.parent, _local9); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local3 = (_local7 + _local3); _local9 = _local9.parent; }; while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) { _local5 = getChildIndex(_local10.parent, _local10); _local6 = _local5.toString(16); if (_local6.length < 4){ _local7 = (_local8.substring(0, (4 - _local6.length)) + _local6); }; _local4 = (_local7 + _local4); _local10 = _local10.parent; }; return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0); } public function get defaultButton():Button{ return (_defaultButton); } private function activateHandler(_arg1:Event):void{ var _local2:InteractiveObject; _local2 = InteractiveObject(_arg1.target); if (lastFocus){ if ((lastFocus is IFocusManagerComponent)){ IFocusManagerComponent(lastFocus).setFocus(); } else { form.stage.focus = lastFocus; }; }; lastAction = "ACTIVATE"; } public function showFocus():void{ } public function set defaultButtonEnabled(_arg1:Boolean):void{ _defaultButtonEnabled = _arg1; } public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{ var _local2:DisplayObject; var _local3:String; var _local4:int; var _local5:Boolean; var _local6:int; var _local7:int; var _local8:IFocusManagerGroup; if (!hasFocusableObjects()){ return (null); }; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; _local2 = form.stage.focus; _local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2))); _local3 = ""; if ((_local2 is IFocusManagerGroup)){ _local8 = IFocusManagerGroup(_local2); _local3 = _local8.groupName; }; _local4 = getIndexOfFocusedObject(_local2); _local5 = false; _local6 = _local4; if (_local4 == -1){ if (_arg1){ _local4 = focusableCandidates.length; }; _local5 = true; }; _local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3); return (findFocusManagerComponent(focusableCandidates[_local7])); } private function mouseDownHandler(_arg1:MouseEvent):void{ var _local2:InteractiveObject; if (_arg1.isDefaultPrevented()){ return; }; _local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target)); if (!_local2){ return; }; showFocusIndicator = false; if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){ setFocus(_local2); }; lastAction = "MOUSEDOWN"; } private function isTabVisible(_arg1:DisplayObject):Boolean{ var _local2:DisplayObjectContainer; _local2 = _arg1.parent; while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) { if (!_local2.tabChildren){ return (false); }; _local2 = _local2.parent; }; return (true); } public function get nextTabIndex():int{ return (0); } private function keyDownHandler(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.TAB){ lastAction = "KEY"; if (calculateCandidates){ sortFocusableObjects(); calculateCandidates = false; }; }; if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){ sendDefaultButtonEvent(); }; } private function focusInHandler(_arg1:FocusEvent):void{ var _local2:InteractiveObject; var _local3:Button; _local2 = InteractiveObject(_arg1.target); if (form.contains(_local2)){ lastFocus = findFocusManagerComponent(InteractiveObject(_local2)); if ((lastFocus is Button)){ _local3 = Button(lastFocus); if (defButton){ defButton.emphasized = false; defButton = _local3; _local3.emphasized = true; }; } else { if (((defButton) && (!((defButton == _defaultButton))))){ defButton.emphasized = false; defButton = _defaultButton; _defaultButton.emphasized = true; }; }; }; } private function tabEnabledChangeHandler(_arg1:Event):void{ var _local2:InteractiveObject; var _local3:Boolean; calculateCandidates = true; _local2 = InteractiveObject(_arg1.target); _local3 = (focusableObjects[_local2] == true); if (_local2.tabEnabled){ if (((!(_local3)) && (isTabVisible(_local2)))){ if (!(_local2 is IFocusManagerComponent)){ _local2.focusRect = false; }; focusableObjects[_local2] = true; }; } else { if (_local3){ delete focusableObjects[_local2]; }; }; } public function set showFocusIndicator(_arg1:Boolean):void{ _showFocusIndicator = _arg1; } public function get form():DisplayObjectContainer{ return (_form); } private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{ return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2)); } public function activate():void{ if (activated){ return; }; form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true); form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true); form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true); form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true); form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = true; if (lastFocus){ setFocus(lastFocus); }; } public function deactivate():void{ form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler); form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler); form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true); form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true); form.stage.removeEventListener(Event.ACTIVATE, activateHandler); form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler); form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler); form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true); activated = false; } public function get defaultButtonEnabled():Boolean{ return (_defaultButtonEnabled); } } }//package fl.managers
Section 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.text.*; import flash.utils.*; public class StyleManager { private var globalStyles:Object; private var classToDefaultStylesDict:Dictionary; private var styleToClassesHash:Object; private var classToStylesDict:Dictionary; private var classToInstancesDict:Dictionary; private static var _instance:StyleManager; public function StyleManager(){ styleToClassesHash = {}; classToInstancesDict = new Dictionary(true); classToStylesDict = new Dictionary(true); classToDefaultStylesDict = new Dictionary(true); globalStyles = UIComponent.getStyleDefinition(); } public static function clearComponentStyle(_arg1:Object, _arg2:String):void{ var _local3:Class; var _local4:Object; _local3 = getClassDef(_arg1); _local4 = getInstance().classToStylesDict[_local3]; if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){ delete _local4[_arg2]; invalidateComponentStyle(_local3, _arg2); }; } private static function getClassDef(_arg1:Object):Class{ var component = _arg1; if ((component is Class)){ return ((component as Class)); }; try { return ((getDefinitionByName(getQualifiedClassName(component)) as Class)); } catch(e:Error) { if ((component is UIComponent)){ try { return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class)); } catch(e:Error) { }; }; }; return (null); } public static function clearStyle(_arg1:String):void{ setStyle(_arg1, null); } public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Class; var _local5:Object; _local4 = getClassDef(_arg1); _local5 = getInstance().classToStylesDict[_local4]; if (_local5 == null){ _local5 = (getInstance().classToStylesDict[_local4] = {}); }; if (_local5 == _arg3){ return; }; _local5[_arg2] = _arg3; invalidateComponentStyle(_local4, _arg2); } private static function setSharedStyles(_arg1:UIComponent):void{ var _local2:StyleManager; var _local3:Class; var _local4:Object; var _local5:String; _local2 = getInstance(); _local3 = getClassDef(_arg1); _local4 = _local2.classToDefaultStylesDict[_local3]; for (_local5 in _local4) { _arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5)); }; } public static function getComponentStyle(_arg1:Object, _arg2:String):Object{ var _local3:Class; var _local4:Object; _local3 = getClassDef(_arg1); _local4 = getInstance().classToStylesDict[_local3]; return (((_local4)==null) ? null : _local4[_arg2]); } private static function getInstance(){ if (_instance == null){ _instance = new (StyleManager); }; return (_instance); } private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{ var _local3:Dictionary; var _local4:Object; var _local5:UIComponent; _local3 = getInstance().classToInstancesDict[_arg1]; if (_local3 == null){ return; }; for (_local4 in _local3) { _local5 = (_local4 as UIComponent); if (_local5 == null){ } else { _local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2)); }; }; } private static function invalidateStyle(_arg1:String):void{ var _local2:Dictionary; var _local3:Object; _local2 = getInstance().styleToClassesHash[_arg1]; if (_local2 == null){ return; }; for (_local3 in _local2) { invalidateComponentStyle(Class(_local3), _arg1); }; } public static function registerInstance(_arg1:UIComponent):void{ var inst:StyleManager; var classDef:Class; var target:Class; var defaultStyles:Object; var styleToClasses:Object; var n:String; var instance = _arg1; inst = getInstance(); classDef = getClassDef(instance); if (classDef == null){ return; }; if (inst.classToInstancesDict[classDef] == null){ inst.classToInstancesDict[classDef] = new Dictionary(true); target = classDef; while (defaultStyles == null) { if (target["getStyleDefinition"] != null){ defaultStyles = target["getStyleDefinition"](); break; }; try { target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class); } catch(err:Error) { try { target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class); } catch(e:Error) { defaultStyles = UIComponent.getStyleDefinition(); break; }; }; }; styleToClasses = inst.styleToClassesHash; for (n in defaultStyles) { if (styleToClasses[n] == null){ styleToClasses[n] = new Dictionary(true); }; styleToClasses[n][classDef] = true; }; inst.classToDefaultStylesDict[classDef] = defaultStyles; inst.classToStylesDict[classDef] = {}; }; inst.classToInstancesDict[classDef][instance] = true; setSharedStyles(instance); } public static function getStyle(_arg1:String):Object{ return (getInstance().globalStyles[_arg1]); } private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{ var _local3:Class; var _local4:StyleManager; var _local5:Object; _local3 = getClassDef(_arg1); _local4 = getInstance(); _local5 = _local4.classToStylesDict[_local3][_arg2]; if (_local5 != null){ return (_local5); }; _local5 = _local4.globalStyles[_arg2]; if (_local5 != null){ return (_local5); }; return (_local4.classToDefaultStylesDict[_local3][_arg2]); } public static function setStyle(_arg1:String, _arg2:Object):void{ var _local3:Object; _local3 = getInstance().globalStyles; if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){ return; }; _local3[_arg1] = _arg2; invalidateStyle(_arg1); } } }//package fl.managers
Section 18
//MochiScores (mochi.MochiScores) package mochi { import flash.display.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var options = _arg1; if (options.clip != null){ if ((options.clip is Sprite)){ MochiServices.setContainer(options.clip); }; delete options.clip; } else { MochiServices.setContainer(); }; MochiServices.stayOnTop(); if (options != null){ if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.play(); } else { trace("Warning: Container is not a MovieClip, cannot call default onClose."); }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (_slot1.boardID != null){ options.boardID = _slot1.boardID; }; }; MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2); } public static function requestList(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_requestList", null, _arg1, _arg2); } public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{ MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4); } public static function onClose(_arg1:Object=null):void{ if (_arg1 != null){ if (_arg1.error != null){ if (_arg1.error == true){ if (onErrorHandler != null){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; }; }; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ _slot1.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi
Section 19
//MochiServices (mochi.MochiServices) package mochi { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; private static var _sendChannel:LocalConnection; private static var _rcvChannelName:String; private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; private static var _timer:Timer; private static var _sendChannelName:String; private static var _startTime:Number; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__mochiservices"; private static var _rcvChannel:LocalConnection; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ onError("NotConnected"); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _clip._nextcallbackID++; }; }; } public static function get connected():Boolean{ return (_connected); } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (_clip != null){ if (_clip._queue != null){ while (_clip._queue.length > 0) { _local2 = _clip._queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _clip._callbacks[_local2.callbackID]; }; delete _clip._callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; }; } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } public static function get id():String{ return (_id); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, _slot1.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function getVersion():String{ return ("1.2"); } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _listenChannel.close(); _rcvChannel.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; Security.allowDomain("*"); Security.allowInsecureDomain("*"); if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; return (_local2); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, _slot1.bringToTop); if (_clip.parent != null){ Sprite(_clip.parent).removeChild(_clip); }; } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_arg1 != null){ if ((_arg1 is Sprite)){ _container = _arg1; }; }; if (_arg2){ if ((_container is Sprite)){ Sprite(_container).addChild(_clip); }; }; } private static function onStatus(_arg1:StatusEvent):void{ switch (_arg1.level){ case "error": _connected = false; _listenChannel.connect(_listenChannelName); break; }; } private static function initComChannels():void{ if (!_connected){ _sendChannel.addEventListener(StatusEvent.STATUS, _slot1.onStatus); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion()}); _rcvChannel.addEventListener(StatusEvent.STATUS, _slot1.onStatus); _clip.onReceive = function (_arg1:Object):void{ var cb:String; var cblst:Object; var method:*; var obj:Object; var pkg = _arg1; cb = pkg.callbackID; cblst = this.client._callbacks[cb]; if (!cblst){ return; }; method = cblst.callbackMethod; obj = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { trace("Unable to invoke callback method."); }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { trace("Unable to invoke callback method on object."); }; }; }; delete this.client._callbacks[cb]; }; _clip.onError = function ():void{ _slot1.onError("IOError"); }; _rcvChannel.connect(_rcvChannelName); trace("connected!"); _connecting = false; _connected = true; _listenChannel.close(); while (_clip._queue.length > 0) { _sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function listen():void{ _listenChannel = new LocalConnection(); _listenChannel.client = _clip; _clip.handshake = function (_arg1:Object):void{ _slot1.comChannelName = _arg1.newChannel; }; _listenChannel.allowDomain("*", "localhost"); _listenChannel.allowInsecureDomain("*", "localhost"); _listenChannel.connect(_listenChannelName); trace("Waiting for MochiAds services to connect..."); } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } public static function get clip():Object{ return (_container); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); _rcvChannelName = _arg1; initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var clipname:String; var f:Function; var req:URLRequest; var id = _arg1; var clip = _arg2; clipname = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!_slot1.isNetworkAvailable()){ return (null); }; _slot1.allowDomains(_gatewayURL); _clip = createEmptyMovieClip(clip, clipname, 10337, false); _loader = new Loader(); _timer = new Timer(1000, 0); _startTime = getTimer(); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); f = function (_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); _slot1.disconnect(); _slot1.onError("IOError"); }; _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); req = new URLRequest(_gatewayURL); _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _rcvChannel = new LocalConnection(); _rcvChannel.allowDomain("*", "localhost"); _rcvChannel.allowInsecureDomain("*", "localhost"); _rcvChannel.client = _clip; _clip._nextcallbackID = 0; _clip._callbacks = {}; listen(); return (_clip); } public static function bringToTop(_arg1:Event):void{ var e = _arg1; if (_slot1.clip != null){ if (_slot1.childClip != null){ try { if (_slot1.clip.numChildren > 1){ _slot1.clip.setChildIndex(_slot1.childClip, (_slot1.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, _slot1.bringToTop); }; }; }; } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; if ((clip is DisplayObject)){ if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ _slot1.onError = onError; } else { if (_slot1.onError == null){ _slot1.onError = function (_arg1:String):void{ trace(_arg1); }; }; }; } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{ var _local5:MovieClip; _local5 = new MovieClip(); if (_arg4){ if (((false) && (_arg3))){ _arg1.addChildAt(_local5, _arg3); } else { _arg1.addChild(_local5); }; }; _arg1[_arg2] = _local5; _local5["_name"] = _arg2; return (_local5); } public static function connectWait(_arg1:TimerEvent):void{ if ((getTimer() - _startTime) > 10000){ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); _slot1.disconnect(); _slot1.onError("IOError"); }; _timer.stop(); }; } } }//package mochi
Section 20
//AbstractCollection (org.cove.ape.AbstractCollection) package org.cove.ape { import flash.display.*; import flash.utils.*; public class AbstractCollection { private var _sprite:Sprite; private var _isParented:Boolean; private var _particles:Array; private var _constraints:Array; public function AbstractCollection(){ if (getQualifiedClassName(this) == "org.cove.ape::AbstractCollection"){ throw (new ArgumentError("AbstractCollection can't be instantiated directly")); }; _isParented = false; _particles = new Array(); _constraints = new Array(); } public function getAll():Array{ return (particles.concat(constraints)); } function checkCollisionsVsCollection(_arg1:AbstractCollection):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:AbstractParticle; var _local6:int; var _local7:int; var _local8:int; var _local9:AbstractParticle; var _local10:SpringConstraint; var _local11:SpringConstraint; var _local12:int; _local2 = _particles.length; _local3 = 0; while (_local3 < _local2) { _local5 = _particles[_local3]; if ((((_local5 == null)) || (!(_local5.collidable)))){ } else { _local6 = _arg1.particles.length; _local7 = 0; while (_local7 < _local6) { _local9 = _arg1.particles[_local7]; if (((!((_local9 == null))) && (_local9.collidable))){ CollisionDetector.test(_local5, _local9); }; _local7++; }; _local8 = _arg1.constraints.length; _local7 = 0; while (_local7 < _local8) { _local10 = _arg1.constraints[_local7]; if (((((!((_local10 == null))) && (_local10.collidable))) && (!(_local10.isConnectedTo(_local5))))){ _local10.scp.updatePosition(); CollisionDetector.test(_local5, _local10.scp); }; _local7++; }; }; _local3++; }; _local4 = _constraints.length; _local3 = 0; while (_local3 < _local4) { _local11 = _constraints[_local3]; if ((((_local11 == null)) || (!(_local11.collidable)))){ } else { _local6 = _arg1.particles.length; _local12 = 0; while (_local12 < _local6) { _local9 = _arg1.particles[_local12]; if (((((!((_local9 == null))) && (_local9.collidable))) && (!(_local11.isConnectedTo(_local9))))){ _local11.scp.updatePosition(); CollisionDetector.test(_local9, _local11.scp); }; _local12++; }; }; _local3++; }; } public function get sprite():Sprite{ if (_sprite != null){ return (_sprite); }; if (APEngine.container == null){ throw (new Error("The container property of the APEngine class has not been set")); }; _sprite = new Sprite(); APEngine.container.addChild(_sprite); return (_sprite); } function checkInternalCollisions():void{ var _local1:int; var _local2:int; var _local3:AbstractParticle; var _local4:int; var _local5:int; var _local6:int; var _local7:AbstractParticle; var _local8:SpringConstraint; _local1 = _particles.length; _local2 = 0; while (_local2 < _local1) { _local3 = _particles[_local2]; if ((((_local3 == null)) || (!(_local3.collidable)))){ } else { _local4 = (_local2 + 1); while (_local4 < _local1) { _local7 = _particles[_local4]; if (((!((_local7 == null))) && (_local7.collidable))){ CollisionDetector.test(_local3, _local7); }; _local4++; }; _local5 = _constraints.length; _local6 = 0; while (_local6 < _local5) { _local8 = _constraints[_local6]; if (((((!((_local8 == null))) && (_local8.collidable))) && (!(_local8.isConnectedTo(_local3))))){ _local8.scp.updatePosition(); CollisionDetector.test(_local3, _local8.scp); }; _local6++; }; }; _local2++; }; } public function addParticle(_arg1:AbstractParticle):void{ particles.push(_arg1); if (isParented){ _arg1.init(); }; } public function removeConstraint(_arg1:AbstractConstraint):void{ var _local2:int; _local2 = constraints.indexOf(_arg1); if (_local2 == -1){ return; }; constraints.splice(_local2, 1); _arg1.cleanup(); } function get isParented():Boolean{ return (_isParented); } public function init():void{ var _local1:int; _local1 = 0; while (_local1 < particles.length) { particles[_local1].init(); _local1++; }; _local1 = 0; while (_local1 < constraints.length) { constraints[_local1].init(); _local1++; }; } function satisfyConstraints():void{ var _local1:int; var _local2:int; var _local3:AbstractConstraint; _local1 = _constraints.length; _local2 = 0; while (_local2 < _local1) { _local3 = _constraints[_local2]; _local3.resolve(); _local2++; }; } public function paint():void{ var _local1:AbstractParticle; var _local2:int; var _local3:int; var _local4:SpringConstraint; _local2 = _particles.length; _local3 = 0; while (_local3 < _local2) { _local1 = _particles[_local3]; if (((!(_local1.fixed)) || (_local1.alwaysRepaint))){ _local1.paint(); }; _local3++; }; _local2 = _constraints.length; _local3 = 0; while (_local3 < _local2) { _local4 = _constraints[_local3]; if (((!(_local4.fixed)) || (_local4.alwaysRepaint))){ _local4.paint(); }; _local3++; }; } public function addConstraint(_arg1:AbstractConstraint):void{ constraints.push(_arg1); if (isParented){ _arg1.init(); }; } function set isParented(_arg1:Boolean):void{ _isParented = _arg1; } public function removeParticle(_arg1:AbstractParticle):void{ var _local2:int; _local2 = particles.indexOf(_arg1); if (_local2 == -1){ return; }; particles.splice(_local2, 1); _arg1.cleanup(); } public function cleanup():void{ var _local1:int; _local1 = 0; while (_local1 < particles.length) { particles[_local1].cleanup(); _local1++; }; _local1 = 0; while (_local1 < constraints.length) { constraints[_local1].cleanup(); _local1++; }; } public function get particles():Array{ return (_particles); } function integrate(_arg1:Number):void{ var _local2:int; var _local3:int; var _local4:AbstractParticle; _local2 = _particles.length; _local3 = 0; while (_local3 < _local2) { _local4 = _particles[_local3]; _local4.update(_arg1); _local3++; }; } public function get constraints():Array{ return (_constraints); } } }//package org.cove.ape
Section 21
//AbstractConstraint (org.cove.ape.AbstractConstraint) package org.cove.ape { import flash.utils.*; public class AbstractConstraint extends AbstractItem { private var _stiffness:Number; public function AbstractConstraint(_arg1:Number){ if (getQualifiedClassName(this) == "org.cove.ape::AbstractConstraint"){ throw (new ArgumentError("AbstractConstraint can't be instantiated directly")); }; this.stiffness = _arg1; setStyle(); } public function get stiffness():Number{ return (_stiffness); } public function resolve():void{ } public function set stiffness(_arg1:Number):void{ _stiffness = _arg1; } } }//package org.cove.ape
Section 22
//AbstractItem (org.cove.ape.AbstractItem) package org.cove.ape { import flash.display.*; import flash.events.*; public class AbstractItem extends EventDispatcher { var displayObjectOffset:Vector; var fillColor:uint; var displayObject:DisplayObject; var fillAlpha:Number; private var _solid:Boolean; private var _visible:Boolean; var displayObjectRotation:Number; var lineColor:uint; var lineAlpha:Number; var lineThickness:Number; private var _sprite:Sprite; private var _alwaysRepaint:Boolean; public function AbstractItem(){ _solid = true; _visible = true; _alwaysRepaint = false; } public function setFill(_arg1:uint=0xFFFFFF, _arg2:Number=1):void{ fillColor = _arg1; fillAlpha = _arg2; } public function init():void{ } public function cleanup():void{ var _local1:int; sprite.graphics.clear(); _local1 = 0; while (_local1 < sprite.numChildren) { sprite.removeChildAt(_local1); _local1++; }; } public function get solid():Boolean{ return (_solid); } public function get sprite():Sprite{ if (_sprite != null){ return (_sprite); }; if (APEngine.container == null){ throw (new Error("The container property of the APEngine class has not been set")); }; _sprite = new Sprite(); APEngine.container.addChild(_sprite); return (_sprite); } public function set solid(_arg1:Boolean):void{ _solid = _arg1; } public function paint():void{ } public function set visible(_arg1:Boolean):void{ _visible = _arg1; sprite.visible = _arg1; } public function setStyle(_arg1:Number=0, _arg2:uint=0, _arg3:Number=1, _arg4:uint=0xFFFFFF, _arg5:Number=1):void{ setLine(_arg1, _arg2, _arg3); setFill(_arg4, _arg5); } public function get visible():Boolean{ return (_visible); } public function setLine(_arg1:Number=0, _arg2:uint=0, _arg3:Number=1):void{ lineThickness = _arg1; lineColor = _arg2; lineAlpha = _arg3; } final public function set alwaysRepaint(_arg1:Boolean):void{ _alwaysRepaint = _arg1; } final public function get alwaysRepaint():Boolean{ return (_alwaysRepaint); } } }//package org.cove.ape
Section 23
//AbstractParticle (org.cove.ape.AbstractParticle) package org.cove.ape { import flash.display.*; import flash.utils.*; public class AbstractParticle extends AbstractItem { private var forceList:Array; var curr:Vector; var prev:Vector; private var collision:Collision; private var _invMass:Number; private var _friction:Number; private var firstCollision:Boolean; private var _multisample:int; var samp:Vector; private var _center:Vector; private var _fixed:Boolean; private var _collidable:Boolean; private var _kfr:Number; var interval:Interval; private var _mass:Number; private var temp:Vector; private var forces:Vector; public function AbstractParticle(_arg1:Number, _arg2:Number, _arg3:Boolean, _arg4:Number, _arg5:Number, _arg6:Number){ if (getQualifiedClassName(this) == "org.cove.ape::AbstractParticle"){ throw (new ArgumentError("AbstractParticle can't be instantiated directly")); }; interval = new Interval(0, 0); curr = new Vector(_arg1, _arg2); prev = new Vector(_arg1, _arg2); samp = new Vector(); temp = new Vector(); fixed = _arg3; forces = new Vector(); forceList = new Array(); collision = new Collision(new Vector(), new Vector()); collidable = true; firstCollision = false; this.mass = _arg4; this.elasticity = _arg5; this.friction = _arg6; setStyle(); _center = new Vector(); _multisample = 0; } public function get px():Number{ return (curr.x); } public function get py():Number{ return (curr.y); } public function set py(_arg1:Number):void{ curr.y = _arg1; prev.y = _arg1; } function getComponents(_arg1:Vector):Collision{ var _local2:Vector; var _local3:Number; _local2 = velocity; _local3 = _arg1.dot(_local2); collision.vn = _arg1.mult(_local3); collision.vt = _local2.minus(collision.vn); return (collision); } public function set px(_arg1:Number):void{ curr.x = _arg1; prev.x = _arg1; } public function setDisplay(_arg1:DisplayObject, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0):void{ displayObject = _arg1; displayObjectRotation = _arg4; displayObjectOffset = new Vector(_arg2, _arg3); } public function get multisample():int{ return (_multisample); } public function get position():Vector{ return (new Vector(curr.x, curr.y)); } public function set multisample(_arg1:int):void{ _multisample = _arg1; } public function get center():Vector{ _center.setTo(px, py); return (_center); } public function set position(_arg1:Vector):void{ curr.copy(_arg1); prev.copy(_arg1); } function testParticleEvents(_arg1:AbstractParticle):void{ if (hasEventListener(CollisionEvent.COLLIDE)){ dispatchEvent(new CollisionEvent(CollisionEvent.COLLIDE, false, false, _arg1)); }; if (((hasEventListener(CollisionEvent.FIRST_COLLIDE)) && (!(firstCollision)))){ firstCollision = true; dispatchEvent(new CollisionEvent(CollisionEvent.FIRST_COLLIDE, false, false, _arg1)); }; } public function set elasticity(_arg1:Number):void{ _kfr = _arg1; } public function get fixed():Boolean{ return (_fixed); } function get invMass():Number{ return ((fixed) ? 0 : _invMass); } public function resetFirstCollision():void{ firstCollision = false; } function initDisplay():void{ displayObject.x = displayObjectOffset.x; displayObject.y = displayObjectOffset.y; displayObject.rotation = displayObjectRotation; sprite.addChild(displayObject); } private function clearForces():void{ forceList.length = 0; forces.setTo(0, 0); } function resolveCollision(_arg1:Vector, _arg2:Vector, _arg3:Vector, _arg4:Number, _arg5:int, _arg6:AbstractParticle):void{ testParticleEvents(_arg6); if (((((fixed) || (!(solid)))) || (!(_arg6.solid)))){ return; }; curr.copy(samp); curr.plusEquals(_arg1); velocity = _arg2; } public function get elasticity():Number{ return (_kfr); } public function set velocity(_arg1:Vector):void{ prev = curr.minus(_arg1); } public function set collidable(_arg1:Boolean):void{ _collidable = _arg1; } public function update(_arg1:Number):void{ var _local2:Vector; if (fixed){ return; }; accumulateForces(); temp.copy(curr); _local2 = velocity.plus(forces.multEquals(_arg1)); curr.plusEquals(_local2.multEquals(APEngine.damping)); prev.copy(temp); clearForces(); } public function addForce(_arg1:IForce):void{ forceList.push(_arg1); } public function get velocity():Vector{ return (curr.minus(prev)); } public function get collidable():Boolean{ return (_collidable); } public function set mass(_arg1:Number):void{ if (_arg1 <= 0){ throw (new ArgumentError("mass may not be set <= 0")); }; _mass = _arg1; _invMass = (1 / _mass); } public function set fixed(_arg1:Boolean):void{ _fixed = _arg1; } private function accumulateForces():void{ var _local1:IForce; var _local2:int; var _local3:int; var _local4:Array; _local2 = forceList.length; _local3 = 0; while (_local3 < _local2) { _local1 = forceList[_local3]; forces.plusEquals(_local1.getValue(_invMass)); _local3++; }; _local4 = APEngine.forces; _local2 = _local4.length; _local3 = 0; while (_local3 < _local2) { _local1 = _local4[_local3]; forces.plusEquals(_local1.getValue(_invMass)); _local3++; }; } public function get mass():Number{ return (_mass); } public function get friction():Number{ return (_friction); } public function set friction(_arg1:Number):void{ if ((((_arg1 < 0)) || ((_arg1 > 1)))){ throw (new ArgumentError("Legal friction must be >= 0 and <=1")); }; _friction = _arg1; } } }//package org.cove.ape
Section 24
//APEngine (org.cove.ape.APEngine) package org.cove.ape { import flash.display.*; public final class APEngine { private static var _damping:Number; private static var _container:DisplayObjectContainer; private static var _constraintCollisionCycles:int; private static var groups:Array; static var forces:Array; private static var _constraintCycles:int; private static var timeStep:Number; private static var numGroups:int; public static function get container():DisplayObjectContainer{ return (_container); } public static function get constraintCollisionCycles():int{ return (_constraintCollisionCycles); } public static function removeForce(_arg1:IForce):void{ var _local2:int; _local2 = forces.indexOf(_arg1); if (_local2 == -1){ return; }; forces.splice(_local2, 1); } public static function set damping(_arg1:Number):void{ _damping = _arg1; } public static function step():void{ var _local1:int; var _local2:int; integrate(); _local1 = 0; while (_local1 < _constraintCycles) { satisfyConstraints(); _local1++; }; _local2 = 0; while (_local2 < _constraintCollisionCycles) { satisfyConstraints(); checkCollisions(); _local2++; }; } public static function get constraintCycles():int{ return (_constraintCycles); } public static function set constraintCollisionCycles(_arg1:int):void{ _constraintCollisionCycles = _arg1; } public static function init(_arg1:Number=0.25):void{ timeStep = (_arg1 * _arg1); numGroups = 0; groups = new Array(); forces = new Array(); _damping = 1; _constraintCycles = 0; _constraintCollisionCycles = 1; } public static function addForce(_arg1:IForce):void{ forces.push(_arg1); } public static function get damping():Number{ return (_damping); } public static function set constraintCycles(_arg1:int):void{ _constraintCycles = _arg1; } public static function addGroup(_arg1:Group):void{ groups.push(_arg1); _arg1.isParented = true; numGroups++; _arg1.init(); } public static function set container(_arg1:DisplayObjectContainer):void{ _container = _arg1; } public static function paint():void{ var _local1:int; var _local2:Group; _local1 = 0; while (_local1 < numGroups) { _local2 = groups[_local1]; _local2.paint(); _local1++; }; } public static function removeGroup(_arg1:Group):void{ var _local2:int; _local2 = groups.indexOf(_arg1); if (_local2 == -1){ return; }; groups.splice(_local2, 1); _arg1.isParented = false; numGroups--; _arg1.cleanup(); } private static function satisfyConstraints():void{ var _local1:int; var _local2:Group; _local1 = 0; while (_local1 < numGroups) { _local2 = groups[_local1]; _local2.satisfyConstraints(); _local1++; }; } public static function removeAllForce():void{ forces = new Array(); } private static function checkCollisions():void{ var _local1:int; var _local2:Group; _local1 = 0; while (_local1 < numGroups) { _local2 = groups[_local1]; _local2.checkCollisions(); _local1++; }; } private static function integrate():void{ var _local1:int; var _local2:Group; _local1 = 0; while (_local1 < numGroups) { _local2 = groups[_local1]; _local2.integrate(timeStep); _local1++; }; } } }//package org.cove.ape
Section 25
//CircleParticle (org.cove.ape.CircleParticle) package org.cove.ape { public class CircleParticle extends AbstractParticle { private var _radius:Number; public function CircleParticle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Number=1, _arg6:Number=0.3, _arg7:Number=0){ super(_arg1, _arg2, _arg4, _arg5, _arg6, _arg7); _radius = _arg3; } function getProjection(_arg1:Vector):Interval{ var _local2:Number; _local2 = samp.dot(_arg1); interval.min = (_local2 - _radius); interval.max = (_local2 + _radius); return (interval); } override public function init():void{ cleanup(); if (displayObject != null){ initDisplay(); } else { sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.beginFill(fillColor, fillAlpha); sprite.graphics.drawCircle(0, 0, radius); sprite.graphics.endFill(); }; paint(); } public function get radius():Number{ return (_radius); } function getIntervalY():Interval{ interval.min = (samp.y - _radius); interval.max = (samp.y + _radius); return (interval); } public function set radius(_arg1:Number):void{ _radius = _arg1; } override public function paint():void{ sprite.x = curr.x; sprite.y = curr.y; } function getIntervalX():Interval{ interval.min = (samp.x - _radius); interval.max = (samp.x + _radius); return (interval); } } }//package org.cove.ape
Section 26
//Collision (org.cove.ape.Collision) package org.cove.ape { import org.cove.ape.*; final class Collision { var vn:Vector; var vt:Vector; function Collision(_arg1:Vector, _arg2:Vector){ this.vn = _arg1; this.vt = _arg2; } } }//package org.cove.ape
Section 27
//CollisionDetector (org.cove.ape.CollisionDetector) package org.cove.ape { import org.cove.ape.*; final class CollisionDetector { private static var collNormal:Vector; private static var cpa:AbstractParticle; private static var cpb:AbstractParticle; private static var collDepth:Number; private static function testIntervals(_arg1:Interval, _arg2:Interval):Number{ var _local3:Number; var _local4:Number; if (_arg1.max < _arg2.min){ return (0); }; if (_arg2.max < _arg1.min){ return (0); }; _local3 = (_arg2.max - _arg1.min); _local4 = (_arg2.min - _arg1.max); return (((Math.abs(_local3))<Math.abs(_local4)) ? _local3 : _local4); } private static function testOBBvsOBB(_arg1:RectangleParticle, _arg2:RectangleParticle):Boolean{ var _local3:int; var _local4:Vector; var _local5:Number; var _local6:Vector; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Boolean; collDepth = Number.POSITIVE_INFINITY; _local3 = 0; while (_local3 < 2) { _local4 = _arg1.axes[_local3]; _local5 = testIntervals(_arg1.getProjection(_local4), _arg2.getProjection(_local4)); if (_local5 == 0){ return (false); }; _local6 = _arg2.axes[_local3]; _local7 = testIntervals(_arg1.getProjection(_local6), _arg2.getProjection(_local6)); if (_local7 == 0){ return (false); }; _local8 = Math.abs(_local5); _local9 = Math.abs(_local7); if ((((_local8 < Math.abs(collDepth))) || ((_local9 < Math.abs(collDepth))))){ _local10 = (_local8 < _local9); collNormal = (_local10) ? _local4 : _local6; collDepth = (_local10) ? _local5 : _local7; }; _local3++; }; cpa = _arg1; cpb = _arg2; return (true); } private static function testTypes(_arg1:AbstractParticle, _arg2:AbstractParticle):Boolean{ if ((((_arg1 is RectangleParticle)) && ((_arg2 is RectangleParticle)))){ return (testOBBvsOBB((_arg1 as RectangleParticle), (_arg2 as RectangleParticle))); }; if ((((_arg1 is CircleParticle)) && ((_arg2 is CircleParticle)))){ return (testCirclevsCircle((_arg1 as CircleParticle), (_arg2 as CircleParticle))); }; if ((((_arg1 is RectangleParticle)) && ((_arg2 is CircleParticle)))){ return (testOBBvsCircle((_arg1 as RectangleParticle), (_arg2 as CircleParticle))); }; if ((((_arg1 is CircleParticle)) && ((_arg2 is RectangleParticle)))){ return (testOBBvsCircle((_arg2 as RectangleParticle), (_arg1 as CircleParticle))); }; return (false); } private static function sampVsNorm(_arg1:AbstractParticle, _arg2:AbstractParticle):void{ var _local3:Number; var _local4:Number; var _local5:int; if (normVsNorm(_arg1, _arg2)){ return; }; _local3 = (1 / (_arg1.multisample + 1)); _local4 = _local3; _local5 = 0; while (_local5 <= _arg1.multisample) { _arg1.samp.setTo((_arg1.prev.x + (_local4 * (_arg1.curr.x - _arg1.prev.x))), (_arg1.prev.y + (_local4 * (_arg1.curr.y - _arg1.prev.y)))); if (testTypes(_arg1, _arg2)){ CollisionResolver.resolve(cpa, cpb, collNormal, collDepth); return; }; _local4 = (_local4 + _local3); _local5++; }; } private static function testCirclevsCircle(_arg1:CircleParticle, _arg2:CircleParticle):Boolean{ var _local3:Number; var _local4:Number; var _local5:Number; _local3 = testIntervals(_arg1.getIntervalX(), _arg2.getIntervalX()); if (_local3 == 0){ return (false); }; _local4 = testIntervals(_arg1.getIntervalY(), _arg2.getIntervalY()); if (_local4 == 0){ return (false); }; collNormal = _arg1.samp.minus(_arg2.samp); _local5 = collNormal.magnitude(); collDepth = ((_arg1.radius + _arg2.radius) - _local5); if (collDepth > 0){ collNormal.divEquals(_local5); cpa = _arg1; cpb = _arg2; return (true); }; return (false); } static function test(_arg1:AbstractParticle, _arg2:AbstractParticle):void{ if (((_arg1.fixed) && (_arg2.fixed))){ return; }; if ((((_arg1.multisample == 0)) && ((_arg2.multisample == 0)))){ normVsNorm(_arg1, _arg2); } else { if ((((_arg1.multisample > 0)) && ((_arg2.multisample == 0)))){ sampVsNorm(_arg1, _arg2); } else { if ((((_arg2.multisample > 0)) && ((_arg1.multisample == 0)))){ sampVsNorm(_arg2, _arg1); } else { if (_arg1.multisample == _arg2.multisample){ sampVsSamp(_arg1, _arg2); } else { normVsNorm(_arg1, _arg2); }; }; }; }; } private static function testOBBvsCircle(_arg1:RectangleParticle, _arg2:CircleParticle):Boolean{ var _local3:Array; var _local4:int; var _local5:Number; var _local6:Vector; var _local7:Number; var _local8:Vector; var _local9:Number; collDepth = Number.POSITIVE_INFINITY; _local3 = new Array(2); _local4 = 0; while (_local4 < 2) { _local6 = _arg1.axes[_local4]; _local7 = testIntervals(_arg1.getProjection(_local6), _arg2.getProjection(_local6)); if (_local7 == 0){ return (false); }; if (Math.abs(_local7) < Math.abs(collDepth)){ collNormal = _local6; collDepth = _local7; }; _local3[_local4] = _local7; _local4++; }; _local5 = _arg2.radius; if ((((Math.abs(_local3[0]) < _local5)) && ((Math.abs(_local3[1]) < _local5)))){ _local8 = closestVertexOnOBB(_arg2.samp, _arg1); collNormal = _local8.minus(_arg2.samp); _local9 = collNormal.magnitude(); collDepth = (_local5 - _local9); if (collDepth > 0){ collNormal.divEquals(_local9); } else { return (false); }; }; cpa = _arg1; cpb = _arg2; return (true); } private static function closestVertexOnOBB(_arg1:Vector, _arg2:RectangleParticle):Vector{ var _local3:Vector; var _local4:Vector; var _local5:int; var _local6:Number; _local3 = _arg1.minus(_arg2.samp); _local4 = new Vector(_arg2.samp.x, _arg2.samp.y); _local5 = 0; while (_local5 < 2) { _local6 = _local3.dot(_arg2.axes[_local5]); if (_local6 >= 0){ _local6 = _arg2.extents[_local5]; } else { if (_local6 < 0){ _local6 = -(_arg2.extents[_local5]); }; }; _local4.plusEquals(_arg2.axes[_local5].mult(_local6)); _local5++; }; return (_local4); } private static function normVsNorm(_arg1:AbstractParticle, _arg2:AbstractParticle):Boolean{ _arg1.samp.copy(_arg1.curr); _arg2.samp.copy(_arg2.curr); if (testTypes(_arg1, _arg2)){ CollisionResolver.resolve(cpa, cpb, collNormal, collDepth); return (true); }; return (false); } private static function sampVsSamp(_arg1:AbstractParticle, _arg2:AbstractParticle):void{ var _local3:Number; var _local4:Number; var _local5:int; if (normVsNorm(_arg1, _arg2)){ return; }; _local3 = (1 / (_arg1.multisample + 1)); _local4 = _local3; _local5 = 0; while (_local5 <= _arg1.multisample) { _arg1.samp.setTo((_arg1.prev.x + (_local4 * (_arg1.curr.x - _arg1.prev.x))), (_arg1.prev.y + (_local4 * (_arg1.curr.y - _arg1.prev.y)))); _arg2.samp.setTo((_arg2.prev.x + (_local4 * (_arg2.curr.x - _arg2.prev.x))), (_arg2.prev.y + (_local4 * (_arg2.curr.y - _arg2.prev.y)))); if (testTypes(_arg1, _arg2)){ CollisionResolver.resolve(cpa, cpb, collNormal, collDepth); return; }; _local4 = (_local4 + _local3); _local5++; }; } } }//package org.cove.ape
Section 28
//CollisionEvent (org.cove.ape.CollisionEvent) package org.cove.ape { import flash.events.*; public class CollisionEvent extends Event { private var _collidingItem:AbstractItem; public static const COLLIDE:String = "collide"; public static const FIRST_COLLIDE:String = "firstCollide"; public function CollisionEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:AbstractItem=null){ super(_arg1, _arg2, _arg3); _collidingItem = _arg4; } public function get collidingItem():AbstractItem{ var _local1:SpringConstraintParticle; if ((_collidingItem is SpringConstraintParticle)){ _local1 = (_collidingItem as SpringConstraintParticle); return (_local1.parent); }; return (_collidingItem); } } }//package org.cove.ape
Section 29
//CollisionResolver (org.cove.ape.CollisionResolver) package org.cove.ape { import org.cove.ape.*; final class CollisionResolver { static function resolve(_arg1:AbstractParticle, _arg2:AbstractParticle, _arg3:Vector, _arg4:Number):void{ var _local5:Vector; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Collision; var _local10:Collision; var _local11:Vector; var _local12:Vector; var _local13:Vector; var _local14:Vector; _local5 = _arg3.mult(_arg4); _local6 = (_arg1.elasticity + _arg2.elasticity); _local7 = (_arg1.invMass + _arg2.invMass); _local8 = MathUtil.clamp((1 - (_arg1.friction + _arg2.friction)), 0, 1); _local9 = _arg1.getComponents(_arg3); _local10 = _arg2.getComponents(_arg3); _local11 = _local10.vn.mult(((_local6 + 1) * _arg1.invMass)).plus(_local9.vn.mult((_arg2.invMass - (_local6 * _arg1.invMass)))).divEquals(_local7); _local12 = _local9.vn.mult(((_local6 + 1) * _arg2.invMass)).plus(_local10.vn.mult((_arg1.invMass - (_local6 * _arg2.invMass)))).divEquals(_local7); _local9.vt.multEquals(_local8); _local10.vt.multEquals(_local8); _local13 = _local5.mult((_arg1.invMass / _local7)); _local14 = _local5.mult((-(_arg2.invMass) / _local7)); _local11.plusEquals(_local9.vt); _local12.plusEquals(_local10.vt); _arg1.resolveCollision(_local13, _local11, _arg3, _arg4, -1, _arg2); _arg2.resolveCollision(_local14, _local12, _arg3, _arg4, 1, _arg1); } } }//package org.cove.ape
Section 30
//Composite (org.cove.ape.Composite) package org.cove.ape { public class Composite extends AbstractCollection { private var delta:Vector; public function Composite(){ delta = new Vector(); } private function getRelativeAngle(_arg1:Vector, _arg2:Vector):Number{ delta.setTo((_arg2.x - _arg1.x), (_arg2.y - _arg1.y)); return (Math.atan2(delta.y, delta.x)); } public function rotateByRadian(_arg1:Number, _arg2:Vector):void{ var _local3:AbstractParticle; var _local4:Array; var _local5:int; var _local6:int; var _local7:Number; var _local8:Number; _local4 = particles; _local5 = _local4.length; _local6 = 0; while (_local6 < _local5) { _local3 = _local4[_local6]; _local7 = _local3.center.distance(_arg2); _local8 = (getRelativeAngle(_arg2, _local3.center) + _arg1); _local3.px = ((Math.cos(_local8) * _local7) + _arg2.x); _local3.py = ((Math.sin(_local8) * _local7) + _arg2.y); _local6++; }; } public function rotateByAngle(_arg1:Number, _arg2:Vector):void{ var _local3:Number; _local3 = (_arg1 * MathUtil.PI_OVER_ONE_EIGHTY); rotateByRadian(_local3, _arg2); } public function set fixed(_arg1:Boolean):void{ var _local2:int; _local2 = 0; while (_local2 < particles.length) { particles[_local2].fixed = _arg1; _local2++; }; } public function get fixed():Boolean{ var _local1:int; _local1 = 0; while (_local1 < particles.length) { if (!particles[_local1].fixed){ return (false); }; _local1++; }; return (true); } } }//package org.cove.ape
Section 31
//Group (org.cove.ape.Group) package org.cove.ape { public class Group extends AbstractCollection { private var _collideInternal:Boolean; private var _composites:Array; private var _collisionList:Array; public function Group(_arg1:Boolean=false){ _composites = new Array(); _collisionList = new Array(); this.collideInternal = _arg1; } function checkCollisions():void{ var _local1:int; var _local2:int; var _local3:Group; if (collideInternal){ checkCollisionGroupInternal(); }; _local1 = collisionList.length; _local2 = 0; while (_local2 < _local1) { _local3 = collisionList[_local2]; if (_local3 == null){ } else { checkCollisionVsGroup(_local3); }; _local2++; }; } public function get composites():Array{ return (_composites); } override public function init():void{ var _local1:int; super.init(); _local1 = 0; while (_local1 < composites.length) { composites[_local1].init(); _local1++; }; } public function removeCollidable(_arg1:Group):void{ var _local2:int; _local2 = collisionList.indexOf(_arg1); if (_local2 == -1){ return; }; collisionList.splice(_local2, 1); } private function checkCollisionVsGroup(_arg1:Group):void{ var _local2:Composite; var _local3:int; var _local4:int; var _local5:int; var _local6:Composite; var _local7:int; checkCollisionsVsCollection(_arg1); _local3 = _composites.length; _local4 = _arg1.composites.length; _local5 = 0; while (_local5 < _local3) { _local6 = _composites[_local5]; if (_local6 == null){ } else { _local6.checkCollisionsVsCollection(_arg1); _local7 = 0; while (_local7 < _local4) { _local2 = _arg1.composites[_local7]; if (_local2 == null){ } else { _local6.checkCollisionsVsCollection(_local2); }; _local7++; }; }; _local5++; }; _local7 = 0; while (_local7 < _local4) { _local2 = _arg1.composites[_local7]; if (_local2 == null){ } else { checkCollisionsVsCollection(_local2); }; _local7++; }; } override function satisfyConstraints():void{ var _local1:int; var _local2:int; var _local3:Composite; super.satisfyConstraints(); _local1 = _composites.length; _local2 = 0; while (_local2 < _local1) { _local3 = _composites[_local2]; _local3.satisfyConstraints(); _local2++; }; } public function get collideInternal():Boolean{ return (_collideInternal); } public function addCollidableList(_arg1:Array):void{ var _local2:int; var _local3:Group; _local2 = 0; while (_local2 < _arg1.length) { _local3 = _arg1[_local2]; collisionList.push(_local3); _local2++; }; } public function removeComposite(_arg1:Composite):void{ var _local2:int; _local2 = composites.indexOf(_arg1); if (_local2 == -1){ return; }; composites.splice(_local2, 1); _arg1.isParented = false; _arg1.cleanup(); } override public function cleanup():void{ var _local1:int; super.cleanup(); _local1 = 0; while (_local1 < composites.length) { composites[_local1].cleanup(); _local1++; }; } override public function paint():void{ var _local1:int; var _local2:int; var _local3:Composite; super.paint(); _local1 = _composites.length; _local2 = 0; while (_local2 < _local1) { _local3 = _composites[_local2]; _local3.paint(); _local2++; }; } public function addCollidable(_arg1:Group):void{ collisionList.push(_arg1); } override public function getAll():Array{ return (particles.concat(constraints).concat(composites)); } public function get collisionList():Array{ return (_collisionList); } override function integrate(_arg1:Number):void{ var _local2:int; var _local3:int; var _local4:Composite; super.integrate(_arg1); _local2 = _composites.length; _local3 = 0; while (_local3 < _local2) { _local4 = _composites[_local3]; _local4.integrate(_arg1); _local3++; }; } public function addComposite(_arg1:Composite):void{ composites.push(_arg1); _arg1.isParented = true; if (isParented){ _arg1.init(); }; } private function checkCollisionGroupInternal():void{ var _local1:int; var _local2:int; var _local3:Composite; var _local4:int; var _local5:Composite; checkInternalCollisions(); _local1 = _composites.length; _local2 = 0; while (_local2 < _local1) { _local3 = _composites[_local2]; if (_local3 == null){ } else { _local3.checkCollisionsVsCollection(this); _local4 = (_local2 + 1); while (_local4 < _local1) { _local5 = _composites[_local4]; if (_local5 != null){ _local3.checkCollisionsVsCollection(_local5); }; _local4++; }; }; _local2++; }; } public function set collideInternal(_arg1:Boolean):void{ _collideInternal = _arg1; } } }//package org.cove.ape
Section 32
//IForce (org.cove.ape.IForce) package org.cove.ape { public interface IForce { function getValue(_arg1:Number):Vector; } }//package org.cove.ape
Section 33
//Interval (org.cove.ape.Interval) package org.cove.ape { import org.cove.ape.*; final class Interval { var min:Number; var max:Number; function Interval(_arg1:Number, _arg2:Number){ this.min = _arg1; this.max = _arg2; } function toString():String{ return (((min + " : ") + max)); } } }//package org.cove.ape
Section 34
//MathUtil (org.cove.ape.MathUtil) package org.cove.ape { import org.cove.ape.*; final class MathUtil { static var ONE_EIGHTY_OVER_PI:Number = (180 / Math.PI); static var PI_OVER_ONE_EIGHTY:Number = (Math.PI / 180); static function clamp(_arg1:Number, _arg2:Number, _arg3:Number):Number{ if (_arg1 < _arg2){ return (_arg2); }; if (_arg1 > _arg3){ return (_arg3); }; return (_arg1); } static function sign(_arg1:Number):int{ if (_arg1 < 0){ return (-1); }; return (1); } } }//package org.cove.ape
Section 35
//RectangleParticle (org.cove.ape.RectangleParticle) package org.cove.ape { public class RectangleParticle extends AbstractParticle { private var _axes:Array; private var _extents:Array; private var _radian:Number; public function RectangleParticle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Boolean=false, _arg7:Number=1, _arg8:Number=0.3, _arg9:Number=0){ super(_arg1, _arg2, _arg6, _arg7, _arg8, _arg9); _extents = new Array((_arg3 / 2), (_arg4 / 2)); _axes = new Array(new Vector(0, 0), new Vector(0, 0)); radian = _arg5; } function getProjection(_arg1:Vector):Interval{ var _local2:Number; var _local3:Number; _local2 = ((extents[0] * Math.abs(_arg1.dot(axes[0]))) + (extents[1] * Math.abs(_arg1.dot(axes[1])))); _local3 = samp.dot(_arg1); interval.min = (_local3 - _local2); interval.max = (_local3 + _local2); return (interval); } override public function init():void{ var _local1:Number; var _local2:Number; cleanup(); if (displayObject != null){ initDisplay(); } else { _local1 = (extents[0] * 2); _local2 = (extents[1] * 2); sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.beginFill(fillColor, fillAlpha); sprite.graphics.drawRect((-(_local1) / 2), (-(_local2) / 2), _local1, _local2); sprite.graphics.endFill(); }; paint(); } public function set width(_arg1:Number):void{ _extents[0] = (_arg1 / 2); } function get extents():Array{ return (_extents); } function get axes():Array{ return (_axes); } public function get height():Number{ return ((_extents[1] * 2)); } private function setAxes(_arg1:Number):void{ var _local2:Number; var _local3:Number; _local2 = Math.sin(_arg1); _local3 = Math.cos(_arg1); axes[0].x = _local3; axes[0].y = _local2; axes[1].x = -(_local2); axes[1].y = _local3; } public function get radian():Number{ return (_radian); } public function set angle(_arg1:Number):void{ radian = (_arg1 * MathUtil.PI_OVER_ONE_EIGHTY); } public function set height(_arg1:Number):void{ _extents[1] = (_arg1 / 2); } public function get angle():Number{ return ((radian * MathUtil.ONE_EIGHTY_OVER_PI)); } public function set radian(_arg1:Number):void{ _radian = _arg1; setAxes(_arg1); } override public function paint():void{ sprite.x = curr.x; sprite.y = curr.y; sprite.rotation = angle; } public function get width():Number{ return ((_extents[0] * 2)); } } }//package org.cove.ape
Section 36
//RimParticle (org.cove.ape.RimParticle) package org.cove.ape { import org.cove.ape.*; class RimParticle { private var maxTorque:Number; var curr:Vector; var prev:Vector; private var av:Number; private var wr:Number; private var sp:Number; function RimParticle(_arg1:Number, _arg2:Number){ curr = new Vector(_arg1, 0); prev = new Vector(0, 0); sp = 0; av = 0; maxTorque = _arg2; wr = _arg1; } function update(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; sp = Math.max(-(maxTorque), Math.min(maxTorque, (sp + av))); _local2 = -(curr.y); _local3 = curr.x; _local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); _local2 = (_local2 / _local4); _local3 = (_local3 / _local4); curr.x = (curr.x + (sp * _local2)); curr.y = (curr.y + (sp * _local3)); _local5 = prev.x; _local6 = prev.y; _local7 = (prev.x = curr.x); _local8 = (prev.y = curr.y); curr.x = (curr.x + (APEngine.damping * (_local7 - _local5))); curr.y = (curr.y + (APEngine.damping * (_local8 - _local6))); _local9 = Math.sqrt(((curr.x * curr.x) + (curr.y * curr.y))); _local10 = ((_local9 - wr) / _local9); curr.x = (curr.x - (curr.x * _local10)); curr.y = (curr.y - (curr.y * _local10)); } function set speed(_arg1:Number):void{ sp = _arg1; } function get angularVelocity():Number{ return (av); } function set angularVelocity(_arg1:Number):void{ av = _arg1; } function get speed():Number{ return (sp); } } }//package org.cove.ape
Section 37
//SpringConstraint (org.cove.ape.SpringConstraint) package org.cove.ape { import flash.display.*; public class SpringConstraint extends AbstractConstraint { private var _collidable:Boolean; private var p1:AbstractParticle; private var p2:AbstractParticle; private var _scp:SpringConstraintParticle; private var _restLength:Number; public function SpringConstraint(_arg1:AbstractParticle, _arg2:AbstractParticle, _arg3:Number=0.5, _arg4:Boolean=false, _arg5:Number=1, _arg6:Number=1, _arg7:Boolean=false){ super(_arg3); this.p1 = _arg1; this.p2 = _arg2; checkParticlesLocation(); _restLength = currLength; setCollidable(_arg4, _arg5, _arg6, _arg7); } public function get fixed():Boolean{ return (((p1.fixed) && (p2.fixed))); } public function set rectScale(_arg1:Number):void{ if (scp == null){ return; }; scp.rectScale = _arg1; } override public function init():void{ cleanup(); if (collidable){ scp.init(); } else { if (displayObject != null){ initDisplay(); }; }; paint(); } function initDisplay():void{ if (collidable){ scp.initDisplay(); } else { displayObject.x = displayObjectOffset.x; displayObject.y = displayObjectOffset.y; displayObject.rotation = displayObjectRotation; sprite.addChild(displayObject); }; } public function isConnectedTo(_arg1:AbstractParticle):Boolean{ return ((((_arg1 == p1)) || ((_arg1 == p2)))); } public function setDisplay(_arg1:DisplayObject, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0):void{ if (collidable){ scp.setDisplay(_arg1, _arg2, _arg3, _arg4); } else { displayObject = _arg1; displayObjectRotation = _arg4; displayObjectOffset = new Vector(_arg2, _arg3); }; } function get scp():SpringConstraintParticle{ return (_scp); } private function checkParticlesLocation():void{ if ((((p1.curr.x == p2.curr.x)) && ((p1.curr.y == p2.curr.y)))){ p2.curr.x = (p2.curr.x + 0.0001); }; } public function get radian():Number{ var _local1:Vector; _local1 = delta; return (Math.atan2(_local1.y, _local1.x)); } public function get rectHeight():Number{ return (scp.rectHeight); } public function set restLength(_arg1:Number):void{ if (_arg1 <= 0){ throw (new ArgumentError("restLength must be greater than 0")); }; _restLength = _arg1; } public function get currLength():Number{ return (p1.curr.distance(p2.curr)); } public function get fixedEndLimit():Number{ return (scp.fixedEndLimit); } function get delta():Vector{ return (p1.curr.minus(p2.curr)); } public function get angle():Number{ return ((radian * MathUtil.ONE_EIGHTY_OVER_PI)); } public function get center():Vector{ return (p1.curr.plus(p2.curr).divEquals(2)); } public function set rectHeight(_arg1:Number):void{ if (scp == null){ return; }; scp.rectHeight = _arg1; } public function setCollidable(_arg1:Boolean, _arg2:Number, _arg3:Number, _arg4:Boolean=false):void{ _collidable = _arg1; _scp = null; if (_collidable){ _scp = new SpringConstraintParticle(p1, p2, this, _arg2, _arg3, _arg4); }; } override public function paint():void{ var _local1:Vector; if (collidable){ scp.paint(); } else { if (displayObject != null){ _local1 = center; sprite.x = _local1.x; sprite.y = _local1.y; sprite.rotation = angle; } else { sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.moveTo(p1.px, p1.py); sprite.graphics.lineTo(p2.px, p2.py); }; }; } public function get rectScale():Number{ return (scp.rectScale); } public function get restLength():Number{ return (_restLength); } override public function resolve():void{ var _local1:Number; var _local2:Number; var _local3:Vector; if (((p1.fixed) && (p2.fixed))){ return; }; _local1 = currLength; _local2 = ((_local1 - restLength) / (_local1 * (p1.invMass + p2.invMass))); _local3 = delta.mult((_local2 * stiffness)); p1.curr.minusEquals(_local3.mult(p1.invMass)); p2.curr.plusEquals(_local3.mult(p2.invMass)); } public function get collidable():Boolean{ return (_collidable); } public function set fixedEndLimit(_arg1:Number):void{ if (scp == null){ return; }; scp.fixedEndLimit = _arg1; } } }//package org.cove.ape
Section 38
//SpringConstraintParticle (org.cove.ape.SpringConstraintParticle) package org.cove.ape { import flash.display.*; import org.cove.ape.*; class SpringConstraintParticle extends RectangleParticle { private var _fixedEndLimit:Number; private var rca:Vector; private var rcb:Vector; private var _rectScale:Number; private var s:Number; var parent:SpringConstraint; private var scaleToLength:Boolean; private var p1:AbstractParticle; private var p2:AbstractParticle; private var lambda:Vector; private var avgVelocity:Vector; private var _rectHeight:Number; function SpringConstraintParticle(_arg1:AbstractParticle, _arg2:AbstractParticle, _arg3:SpringConstraint, _arg4:Number, _arg5:Number, _arg6:Boolean){ super(0, 0, 0, 0, 0, false); this.p1 = _arg1; this.p2 = _arg2; lambda = new Vector(0, 0); avgVelocity = new Vector(0, 0); parent = _arg3; this.rectScale = _arg5; this.rectHeight = _arg4; this.scaleToLength = _arg6; fixedEndLimit = 0; rca = new Vector(); rcb = new Vector(); } private function setCorners(_arg1:RectangleParticle, _arg2:int):void{ var _local3:Number; var _local4:Number; var _local5:Array; var _local6:Array; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; _local3 = _arg1.curr.x; _local4 = _arg1.curr.y; _local5 = _arg1.axes; _local6 = _arg1.extents; _local7 = (_local5[0].x * _local6[0]); _local8 = (_local5[0].y * _local6[0]); _local9 = (_local5[1].x * _local6[1]); _local10 = (_local5[1].y * _local6[1]); _local11 = (_local7 - _local9); _local12 = (_local8 - _local10); _local13 = (_local7 + _local9); _local14 = (_local8 + _local10); if (_arg2 == 0){ rca.x = (_local3 - _local13); rca.y = (_local4 - _local14); rcb.x = (_local3 + _local11); rcb.y = (_local4 + _local12); } else { if (_arg2 == 1){ rca.x = (_local3 + _local11); rca.y = (_local4 + _local12); rcb.x = (_local3 + _local13); rcb.y = (_local4 + _local14); } else { if (_arg2 == 2){ rca.x = (_local3 + _local13); rca.y = (_local4 + _local14); rcb.x = (_local3 - _local11); rcb.y = (_local4 - _local12); } else { if (_arg2 == 3){ rca.x = (_local3 - _local11); rca.y = (_local4 - _local12); rcb.x = (_local3 - _local13); rcb.y = (_local4 - _local14); }; }; }; }; } override public function init():void{ var _local1:Sprite; var _local2:Number; var _local3:Number; if (displayObject != null){ initDisplay(); } else { _local1 = new Sprite(); parent.sprite.addChild(_local1); _local1.name = "inner"; _local2 = (parent.currLength * rectScale); _local3 = rectHeight; _local1.graphics.clear(); _local1.graphics.lineStyle(parent.lineThickness, parent.lineColor, parent.lineAlpha); _local1.graphics.beginFill(parent.fillColor, parent.fillAlpha); _local1.graphics.drawRect((-(_local2) / 2), (-(_local3) / 2), _local2, _local3); _local1.graphics.endFill(); }; paint(); } function updatePosition():void{ var _local1:Vector; _local1 = parent.center; curr.setTo(_local1.x, _local1.y); width = (scaleToLength) ? (parent.currLength * rectScale) : (parent.restLength * rectScale); height = rectHeight; radian = parent.radian; } private function closestPtSegmentSegment():Number{ var _local1:Vector; var _local2:Vector; var _local3:Vector; var _local4:Vector; var _local5:Vector; var _local6:Vector; var _local7:Vector; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Vector; var _local16:Vector; var _local17:Vector; _local1 = p1.curr; _local2 = p2.curr; _local3 = rca; _local4 = rcb; _local5 = _local2.minus(_local1); _local6 = _local4.minus(_local3); _local7 = _local1.minus(_local3); _local9 = _local5.dot(_local5); _local10 = _local6.dot(_local6); _local11 = _local6.dot(_local7); _local12 = _local5.dot(_local7); _local13 = _local5.dot(_local6); _local14 = ((_local9 * _local10) - (_local13 * _local13)); if (_local14 != 0){ s = MathUtil.clamp((((_local13 * _local11) - (_local12 * _local10)) / _local14), 0, 1); } else { s = 0.5; }; _local8 = (((_local13 * s) + _local11) / _local10); if (_local8 < 0){ _local8 = 0; s = MathUtil.clamp((-(_local12) / _local9), 0, 1); } else { if (_local8 > 0){ _local8 = 1; s = MathUtil.clamp(((_local13 - _local12) / _local9), 0, 1); }; }; _local15 = _local1.plus(_local5.mult(s)); _local16 = _local3.plus(_local6.mult(_local8)); _local17 = _local15.minus(_local16); return (_local15.minus(_local16).dot(_local17)); } function get rectHeight():Number{ return (_rectHeight); } function get fixedEndLimit():Number{ return (_fixedEndLimit); } private function closestParamPoint(_arg1:Vector):Number{ var _local2:Vector; var _local3:Number; _local2 = p2.curr.minus(p1.curr); _local3 = (_local2.dot(_arg1.minus(p1.curr)) / _local2.dot(_local2)); return (MathUtil.clamp(_local3, 0, 1)); } override public function paint():void{ var _local1:Vector; var _local2:Sprite; _local1 = parent.center; _local2 = parent.sprite; if (scaleToLength){ _local2.getChildByName("inner").width = (parent.currLength * rectScale); } else { if (displayObject != null){ _local2.getChildByName("inner").width = (parent.restLength * rectScale); }; }; _local2.x = _local1.x; _local2.y = _local1.y; _local2.rotation = parent.angle; } function set rectHeight(_arg1:Number):void{ _rectHeight = _arg1; } private function getContactPointParam(_arg1:AbstractParticle):Number{ var _local2:Number; var _local3:Number; var _local4:Array; var _local5:Number; var _local6:int; var _local7:Number; if ((_arg1 is CircleParticle)){ _local2 = closestParamPoint(_arg1.curr); } else { if ((_arg1 is RectangleParticle)){ _local4 = new Array(4); _local5 = Number.POSITIVE_INFINITY; _local6 = 0; while (_local6 < 4) { setCorners((_arg1 as RectangleParticle), _local6); _local7 = closestPtSegmentSegment(); if (_local7 < _local5){ _local5 = _local7; _local3 = _local6; _local4[_local6] = s; }; _local6++; }; _local2 = _local4[_local3]; }; }; return (_local2); } function set fixedEndLimit(_arg1:Number):void{ _fixedEndLimit = _arg1; } override public function get fixed():Boolean{ return (parent.fixed); } override function get invMass():Number{ if (((p1.fixed) && (p2.fixed))){ return (0); }; return ((1 / ((p1.mass + p2.mass) / 2))); } override function initDisplay():void{ var _local1:Sprite; displayObject.x = displayObjectOffset.x; displayObject.y = displayObjectOffset.y; displayObject.rotation = displayObjectRotation; _local1 = new Sprite(); _local1.name = "inner"; _local1.addChild(displayObject); parent.sprite.addChild(_local1); } function set rectScale(_arg1:Number):void{ _rectScale = _arg1; } override function resolveCollision(_arg1:Vector, _arg2:Vector, _arg3:Vector, _arg4:Number, _arg5:int, _arg6:AbstractParticle):void{ var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:AbstractParticle; testParticleEvents(_arg6); if (((fixed) || (!(_arg6.solid)))){ return; }; _local7 = getContactPointParam(_arg6); _local8 = (1 - _local7); _local9 = _local7; if (p1.fixed){ if (_local9 <= fixedEndLimit){ return; }; lambda.setTo((_arg1.x / _local9), (_arg1.y / _local9)); p2.curr.plusEquals(lambda); p2.velocity = _arg2; } else { if (p2.fixed){ if (_local8 <= fixedEndLimit){ return; }; lambda.setTo((_arg1.x / _local8), (_arg1.y / _local8)); p1.curr.plusEquals(lambda); p1.velocity = _arg2; } else { _local10 = ((_local8 * _local8) + (_local9 * _local9)); if (_local10 == 0){ return; }; lambda.setTo((_arg1.x / _local10), (_arg1.y / _local10)); p1.curr.plusEquals(lambda.mult(_local8)); p2.curr.plusEquals(lambda.mult(_local9)); if (_local7 == 0.5){ p1.velocity = _arg2; p2.velocity = _arg2; } else { _local11 = ((_local7)<0.5) ? p1 : p2; _local11.velocity = _arg2; }; }; }; } override public function get elasticity():Number{ return (((p1.elasticity + p2.elasticity) / 2)); } function get rectScale():Number{ return (_rectScale); } override public function get velocity():Vector{ var _local1:Vector; var _local2:Vector; _local1 = p1.velocity; _local2 = p2.velocity; avgVelocity.setTo(((_local1.x + _local2.x) / 2), ((_local1.y + _local2.y) / 2)); return (avgVelocity); } override public function get mass():Number{ return (((p1.mass + p2.mass) / 2)); } override public function get friction():Number{ return (((p1.friction + p2.friction) / 2)); } } }//package org.cove.ape
Section 39
//Vector (org.cove.ape.Vector) package org.cove.ape { public class Vector { public var x:Number; public var y:Number; public function Vector(_arg1:Number=0, _arg2:Number=0){ x = _arg1; y = _arg2; } public function cross(_arg1:Vector):Number{ return (((x * _arg1.y) - (y * _arg1.x))); } public function magnitude():Number{ return (Math.sqrt(((x * x) + (y * y)))); } public function divEquals(_arg1:Number):Vector{ if (_arg1 == 0){ _arg1 = 0.0001; }; x = (x / _arg1); y = (y / _arg1); return (this); } public function times(_arg1:Vector):Vector{ return (new Vector((x * _arg1.x), (y * _arg1.y))); } public function plusEquals(_arg1:Vector):Vector{ x = (x + _arg1.x); y = (y + _arg1.y); return (this); } public function dot(_arg1:Vector):Number{ return (((x * _arg1.x) + (y * _arg1.y))); } public function normalizeEquals():Vector{ var _local1:Number; _local1 = magnitude(); if (_local1 == 0){ _local1 = 0.0001; }; return (multEquals((1 / _local1))); } public function normalize():Vector{ var _local1:Number; _local1 = magnitude(); if (_local1 == 0){ _local1 = 0.0001; }; return (mult((1 / _local1))); } public function copy(_arg1:Vector):void{ x = _arg1.x; y = _arg1.y; } public function minusEquals(_arg1:Vector):Vector{ x = (x - _arg1.x); y = (y - _arg1.y); return (this); } public function minus(_arg1:Vector):Vector{ return (new Vector((x - _arg1.x), (y - _arg1.y))); } public function plus(_arg1:Vector):Vector{ return (new Vector((x + _arg1.x), (y + _arg1.y))); } public function toString():String{ return (((x + " : ") + y)); } public function distance(_arg1:Vector):Number{ var _local2:Vector; _local2 = this.minus(_arg1); return (_local2.magnitude()); } public function setTo(_arg1:Number, _arg2:Number):void{ x = _arg1; y = _arg2; } public function multEquals(_arg1:Number):Vector{ x = (x * _arg1); y = (y * _arg1); return (this); } public function mult(_arg1:Number):Vector{ return (new Vector((x * _arg1), (y * _arg1))); } } }//package org.cove.ape
Section 40
//VectorForce (org.cove.ape.VectorForce) package org.cove.ape { public class VectorForce implements IForce { private var fvx:Number; private var fvy:Number; private var value:Vector; private var scaleMass:Boolean; public function VectorForce(_arg1:Boolean, _arg2:Number, _arg3:Number){ fvx = _arg2; fvy = _arg3; scaleMass = _arg1; value = new Vector(_arg2, _arg3); } public function set vx(_arg1:Number):void{ fvx = _arg1; value.x = _arg1; } public function set vy(_arg1:Number):void{ fvy = _arg1; value.y = _arg1; } public function set useMass(_arg1:Boolean):void{ scaleMass = _arg1; } public function getValue(_arg1:Number):Vector{ if (scaleMass){ value.setTo((fvx * _arg1), (fvy * _arg1)); }; return (value); } } }//package org.cove.ape
Section 41
//WheelParticle (org.cove.ape.WheelParticle) package org.cove.ape { public class WheelParticle extends CircleParticle { private var normSlip:Vector; private var rp:RimParticle; private var _traction:Number; private var tan:Vector; private var orientation:Vector; public function WheelParticle(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Number=1, _arg6:Number=0.3, _arg7:Number=0, _arg8:Number=1){ super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); tan = new Vector(0, 0); normSlip = new Vector(0, 0); rp = new RimParticle(_arg3, 2); this.traction = _arg8; orientation = new Vector(); } override public function init():void{ cleanup(); if (displayObject != null){ initDisplay(); } else { sprite.graphics.clear(); sprite.graphics.lineStyle(lineThickness, lineColor, lineAlpha); sprite.graphics.beginFill(fillColor, fillAlpha); sprite.graphics.drawCircle(0, 0, radius); sprite.graphics.endFill(); sprite.graphics.moveTo(-(radius), 0); sprite.graphics.lineTo(radius, 0); sprite.graphics.moveTo(0, -(radius)); sprite.graphics.lineTo(0, radius); }; paint(); } public function get radian():Number{ orientation.setTo(rp.curr.x, rp.curr.y); return ((Math.atan2(orientation.y, orientation.x) + Math.PI)); } public function get traction():Number{ return ((1 - _traction)); } public function get speed():Number{ return (rp.speed); } override public function paint():void{ sprite.x = curr.x; sprite.y = curr.y; sprite.rotation = angle; } public function set traction(_arg1:Number):void{ _traction = (1 - _arg1); } public function set speed(_arg1:Number):void{ rp.speed = _arg1; } override function resolveCollision(_arg1:Vector, _arg2:Vector, _arg3:Vector, _arg4:Number, _arg5:int, _arg6:AbstractParticle):void{ super.resolveCollision(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6); resolve(_arg3.mult(MathUtil.sign((_arg4 * _arg5)))); } public function set angularVelocity(_arg1:Number):void{ rp.angularVelocity = _arg1; } override public function update(_arg1:Number):void{ super.update(_arg1); rp.update(_arg1); } public function get angle():Number{ return ((radian * MathUtil.ONE_EIGHTY_OVER_PI)); } public function get angularVelocity():Number{ return (rp.angularVelocity); } private function resolve(_arg1:Vector):void{ var _local2:Vector; var _local3:Vector; var _local4:Number; var _local5:Number; tan.setTo(-(rp.curr.y), rp.curr.x); tan = tan.normalize(); _local2 = tan.mult(rp.speed); _local3 = velocity.plusEquals(_local2); _local4 = _local3.cross(_arg1); tan.multEquals(_local4); rp.prev.copy(rp.curr.minus(tan)); _local5 = ((1 - _traction) * rp.speed); normSlip.setTo((_local5 * _arg1.y), (_local5 * _arg1.x)); curr.plusEquals(normSlip); rp.speed = (rp.speed * _traction); } } }//package org.cove.ape
Section 42
//bottime_40 (SteerWheels_fla.bottime_40) package SteerWheels_fla { import flash.display.*; import flash.events.*; import flash.text.*; import flash.utils.*; import flash.ui.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.net.*; public dynamic class bottime_40 extends MovieClip { public var timetext:TextField; public function bottime_40(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package SteerWheels_fla
Section 43
//comple_55 (SteerWheels_fla.comple_55) package SteerWheels_fla { import flash.display.*; import flash.text.*; public dynamic class comple_55 extends MovieClip { public var finalscore:TextField; public var playmoregames:SimpleButton; public var livescore:TextField; public var subtext:MovieClip; public var livescorea:TextField; public var replaybut:SimpleButton; public var nfinalscore:TextField; public var subhold:MovieClip; } }//package SteerWheels_fla
Section 44
//dead_48 (SteerWheels_fla.dead_48) package SteerWheels_fla { import flash.display.*; import flash.text.*; public dynamic class dead_48 extends MovieClip { public var finalscore:TextField; public var bg:MovieClip; public var subtext:MovieClip; public var replaybut:SimpleButton; public var grcom:SimpleButton; public var subhold:MovieClip; } }//package SteerWheels_fla
Section 45
//gamesrelodedintro_8 (SteerWheels_fla.gamesrelodedintro_8) package SteerWheels_fla { import flash.display.*; import flash.events.*; import flash.text.*; import flash.utils.*; import flash.ui.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.net.*; public dynamic class gamesrelodedintro_8 extends MovieClip { public var overbut:SimpleButton; public function gamesrelodedintro_8(){ addFrameScript(0, frame1, 233, frame234, 234, frame235); } function frame1(){ overbut.addEventListener(MouseEvent.CLICK, getamesreloaded); } public function getamesreloaded(_arg1:MouseEvent):void{ var _local2:String; var _local3:URLRequest; _local2 = "http://www.gamesreloaded.com/"; _local3 = new URLRequest(_local2); navigateToURL(_local3, "_blank"); } function frame235(){ parent.gotoAndStop(4); } function frame234(){ overbut.removeEventListener(MouseEvent.CLICK, getamesreloaded); } } }//package SteerWheels_fla
Section 46
//levelcomplete_54 (SteerWheels_fla.levelcomplete_54) package SteerWheels_fla { import flash.display.*; import flash.text.*; public dynamic class levelcomplete_54 extends MovieClip { public var levelname:TextField; public var overscore:TextField; public var bg:MovieClip; public var leveltime:TextField; public var nextlev:SimpleButton; public var levelscore:TextField; public var grcom:SimpleButton; } }//package SteerWheels_fla
Section 47
//lives_46 (SteerWheels_fla.lives_46) package SteerWheels_fla { import flash.display.*; import flash.events.*; import flash.text.*; import flash.utils.*; import flash.ui.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.net.*; public dynamic class lives_46 extends MovieClip { public function lives_46(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package SteerWheels_fla
Section 48
//MainTimeline (SteerWheels_fla.MainTimeline) package SteerWheels_fla { import flash.display.*; import org.cove.ape.*; import flash.events.*; import mochi.*; import flash.media.*; import flash.ui.*; import flash.text.*; import flash.filters.*; import flash.utils.*; import flash.net.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.geom.*; public dynamic class MainTimeline extends MovieClip { public var b5g4:CircleParticle; public var b12g22:CircleParticle; public var colC10:Number; public var colC11:Number; public var colC12:Number; public var colC13:Number; public var colC14:Number; public var colC15:Number; public var colC16:Number; public var colC17:Number; public var colC19:Number; public var b102g:CircleParticle; public var startbx:Number; public var colC18:Number; public var startby:Number; public var colC20:Number; public var sb72s:CircleParticle; public var leftbox5:RectangleParticle; public var boxb12:RectangleParticle; public var bigcirc211:CircleParticle; public var i:Number; public var j:Number; public var credscreenh; public var hang:CircleParticle; public var left20:RectangleParticle; public var bridgeConnA:SpringConstraint; public var bridgeConnB:SpringConstraint; public var bridgeConnD:SpringConstraint; public var bridgeConnE:SpringConstraint; public var bridgeConnF:SpringConstraint; public var bridgeConnG:SpringConstraint; public var bridgeConnH:SpringConstraint; public var bridgeConnC:SpringConstraint; public var bridgeCons62s:SpringConstraint; public var level10:Group; public var level12:Group; public var level13:Group; public var level14:Group; public var level15:Group; public var level16:Group; public var level17:Group; public var level11:Group; public var level19:Group; public var level18:Group; public var holdercirc:CircleParticle; public var defaultGroup:Group; public var level20:Group; public var bridgePAA7:CircleParticle; public var rimt19:RectangleParticle; public var secc8b:CircleParticle; public var swingball19:WheelParticle; public var level1s:Group; public var swingball18:WheelParticle; public var level2s:Group; public var touchcred; public var bridgeCons1:SpringConstraint; public var bridgeCons3:SpringConstraint; public var bridgeCons5:SpringConstraint; public var bridgeCons7:SpringConstraint; public var bochan:SoundChannel; public var bridgeCons8:SpringConstraint; public var bridgeCons4:SpringConstraint; public var myMenu:ContextMenu; public var colC8b:Number; public var bridgeCons9:SpringConstraint; public var bridgeCons2:SpringConstraint; public var bridgeConnA7:SpringConstraint; public var level3s:Group; public var bridgeCons6:SpringConstraint; public var level4s:Group; public var sb32s:CircleParticle; public var bridgea8:CircleParticle; public var bridgeConnB7:SpringConstraint; public var sbb18:CircleParticle; public var bridgeb8:CircleParticle; public var right20:RectangleParticle; public var pistoncog:WheelParticle; public var bridgeConnC7:SpringConstraint; public var level5s:Group; public var bridgec8:CircleParticle; public var bridgeConnD7:SpringConstraint; public var piston:RectangleParticle; public var bridgeCons22s:SpringConstraint; public var bridged8:CircleParticle; public var yslope7:Number; public var bridgeConnE7:SpringConstraint; public var mpause; public var lt13:RectangleParticle; public var lt14:RectangleParticle; public var yslope8:Number; public var level8b:Group; public var a42s:CircleParticle; public var yslope9:Number; public var bridgee8:CircleParticle; public var bridgeConnF2:SpringConstraint; public var bridgeConnF7:SpringConstraint; public var bridgef8:CircleParticle; public var yslopey:Number; public var seer8b:CircleParticle; public var wc10:SpringConstraint; public var wc12:SpringConstraint; public var wc13:SpringConstraint; public var wc14:SpringConstraint; public var volc:SoundTransform; public var wc16:SpringConstraint; public var wc17:SpringConstraint; public var wc11:SpringConstraint; public var wc19:SpringConstraint; public var wc15:SpringConstraint; public var wc18:SpringConstraint; public var bridgeg8:CircleParticle; public var wc20:SpringConstraint; public var swingc18:SpringConstraint; public var swingc19:SpringConstraint; public var mute:Boolean; public var swingDoorl:SpringConstraint; public var touchbon; public var bridgeh8:CircleParticle; public var wc1s:SpringConstraint; public var helptextm:TextField; public var versionNumber:String; public var bridgei8:CircleParticle; public var wc2s:SpringConstraint; public var yslope10:Number; public var yslope11:Number; public var yslope12:Number; public var yslope13:Number; public var yslope14:Number; public var yslope15:Number; public var bigcirc11:CircleParticle; public var yslope17:Number; public var yslope18:Number; public var yslope19:Number; public var wc3s:SpringConstraint; public var yslope16:Number; public var bia8:SpringConstraint; public var fdetect:MovieClip; public var wc4s:SpringConstraint; public var swingDoorSpringl:SpringConstraint; public var yslope20:Number; public var boingm:boing; public var bib8:SpringConstraint; public var boings; public var wc5s:SpringConstraint; public var end4:CircleParticle; public var end8:RectangleParticle; public var riml19:RectangleParticle; public var end7:RectangleParticle; public var floor23s:RectangleParticle; public var bic8:SpringConstraint; public var bid8:SpringConstraint; public var floorr2s:RectangleParticle; public var swingballb18:WheelParticle; public var touchplay; public var wc8b:SpringConstraint; public var bie8:SpringConstraint; public var under16:RectangleParticle; public var under17:RectangleParticle; public var bif8:SpringConstraint; public var helpscreenh; public var big8:SpringConstraint; public var trig12:RectangleParticle; public var trig13:RectangleParticle; public var trig14:RectangleParticle; public var buildNumber:Number; public var bih8:SpringConstraint; public var rv10:RectangleParticle; public var rv11:RectangleParticle; public var rv12:RectangleParticle; public var rv13:RectangleParticle; public var rv14:RectangleParticle; public var rv16:RectangleParticle; public var rv18:RectangleParticle; public var rv19:RectangleParticle; public var rv17:RectangleParticle; public var yslope8b:Number; public var ngrscreen:MovieClip; public var pistonlside2:RectangleParticle; public var rv20:RectangleParticle; public var re15:RectangleParticle; public var floorl52s:RectangleParticle; public var rv1s:RectangleParticle; public var oend4:CircleParticle; public var b6g2:CircleParticle; public var b6g6:CircleParticle; public var b6g7:CircleParticle; public var b6g1:CircleParticle; public var b6g3:CircleParticle; public var b6g4:CircleParticle; public var b6g8:CircleParticle; public var rv2s:RectangleParticle; public var lv2:RectangleParticle; public var lv3:RectangleParticle; public var lv4:RectangleParticle; public var lv5:RectangleParticle; public var lv6:RectangleParticle; public var lv7:RectangleParticle; public var lv8:RectangleParticle; public var lv9:RectangleParticle; public var boxt14:RectangleParticle; public var rv3s:RectangleParticle; public var bota7:CircleParticle; public var floor:RectangleParticle; public var sb82s:CircleParticle; public var yhit11:RectangleParticle; public var yhit12:RectangleParticle; public var botb7:CircleParticle; public var yhit14:RectangleParticle; public var yhit15:RectangleParticle; public var yhit16:RectangleParticle; public var yhit10:RectangleParticle; public var yhit19:RectangleParticle; public var lvm:RectangleParticle; public var rv4s:RectangleParticle; public var yhit17:RectangleParticle; public var yhit13:RectangleParticle; public var bonusm:RectangleParticle; public var yhit18:RectangleParticle; public var botc7:CircleParticle; public var yhit20:RectangleParticle; public var end18:RectangleParticle; public var end19:RectangleParticle; public var b13g12:CircleParticle; public var boxl5:CircleParticle; public var swingbar:SpringConstraint; public var end20:RectangleParticle; public var botd7:CircleParticle; public var b13g22:CircleParticle; public var bridgeCons72s:SpringConstraint; public var rv8b:RectangleParticle; public var b18g2:CircleParticle; public var bote7:CircleParticle; public var yhit:RectangleParticle; public var connect4:SpringConstraint; public var boxm5:SpringConstraint; public var cols1o:Number; public var cols1i:Number; public var b202g:CircleParticle; public var botf7:CircleParticle; public var leftb13:SpringConstraint; public var b18g1:CircleParticle; public var yhit3s:RectangleParticle; public var yhit1s:RectangleParticle; public var mainfloor6:RectangleParticle; public var botg7:CircleParticle; public var yhit4s:RectangleParticle; public var domain:String; public var both7:CircleParticle; public var darkbluecol18:Number; public var darkbluecol19:Number; public var boti7:CircleParticle; public var bx11:Number; public var bx12:Number; public var bx13:Number; public var bx14:Number; public var bx15:Number; public var bx10:Number; public var bx19:Number; public var pconnect2:SpringConstraint; public var bx16:Number; public var bx17:Number; public var bx18:Number; public var yhit5s:RectangleParticle; public var darkbluecol20:Number; public var sb42s:CircleParticle; public var boxr5:CircleParticle; public var bottime:MovieClip; public var botj7:CircleParticle; public var sbc18:CircleParticle; public var yhit8b:RectangleParticle; public var bg12:CircleParticle; public var level2:Group; public var level5:Group; public var level6:Group; public var level7:Group; public var level1:Group; public var bx20:Number; public var level4:Group; public var lowfloor:RectangleParticle; public var botk7:CircleParticle; public var level8:Group; public var level9:Group; public var bg22:CircleParticle; public var end8b:RectangleParticle; public var menuItem1:ContextMenuItem; public var menuItem2:ContextMenuItem; public var touchhigh; public var bridgeCons32s:SpringConstraint; public var particleSize7:Number; public var particleSize8:Number; public var particleSize9:Number; public var floor5s2:RectangleParticle; public var floor5s3:RectangleParticle; public var floor5s4:RectangleParticle; public var b17g12:CircleParticle; public var b17g22:CircleParticle; public var radius2:Number; public var boxl12:RectangleParticle; public var boxl14:RectangleParticle; public var btri13:CircleParticle; public var bt13:CircleParticle; public var ball:CircleParticle; public var bx8b:Number; public var playtextm:TextField; public var radius19:Number; public var b2g:CircleParticle; public var b3g:CircleParticle; public var fade; public var floor33s:RectangleParticle; public var b4g:CircleParticle; public var bridgeConnF27:SpringConstraint; public var gameinstructions:TextField; public var stop8b:RectangleParticle; public var swingballc18:WheelParticle; public var mask1:MovieClip; public var b6g:CircleParticle; public var swingDoorAnchorl:CircleParticle; public var pistonrside:RectangleParticle; public var b7g:CircleParticle; public var bigcir11:CircleParticle; public var touchhelp; public var b8g:CircleParticle; public var b10g12:CircleParticle; public var floor12:RectangleParticle; public var floor13:RectangleParticle; public var pistonrside2:RectangleParticle; public var b10g22:CircleParticle; public var winscreen:MovieClip; public var underhang:CircleParticle; public var rect1s:RectangleParticle; public var swingDoorP1l:CircleParticle; public var minorVersion:Number; public var floor1s:RectangleParticle; public var b7g1:CircleParticle; public var b7g2:CircleParticle; public var swingDoorP2l:CircleParticle; public var floor3s:RectangleParticle; public var b122g:CircleParticle; public var gap1s:Number; public var sb92s:CircleParticle; public var swingDoor:SpringConstraint; public var floor4s:RectangleParticle; public var floor5s:RectangleParticle; public var fc2s:SpringConstraint; public var botbridgea7:SpringConstraint; public var particleSize11:Number; public var particleSize12:Number; public var particleSize13:Number; public var particleSize14:Number; public var particleSize15:Number; public var particleSize16:Number; public var particleSize10:Number; public var particleSize18:Number; public var particleSize19:Number; public var particleSize17:Number; public var start7:RectangleParticle; public var start8:RectangleParticle; public var start9:RectangleParticle; public var bridgeCons82s:SpringConstraint; public var botbridgeb7:SpringConstraint; public var rs15:RectangleParticle; public var b19g2:CircleParticle; public var b19g4:CircleParticle; public var bridgePA7:CircleParticle; public var b19g7:CircleParticle; public var b19g1:CircleParticle; public var botbridgec7:SpringConstraint; public var b19g3:CircleParticle; public var bridgePAA:CircleParticle; public var b19g8:CircleParticle; public var credtextm:TextField; public var scoretime; public var ball12:CircleParticle; public var ball13:CircleParticle; public var ball14:CircleParticle; public var ball16:CircleParticle; public var ball10:CircleParticle; public var ball11:CircleParticle; public var ball19:CircleParticle; public var botbridged7:SpringConstraint; public var bridgePB7:CircleParticle; public var ball17:CircleParticle; public var ball18:CircleParticle; public var ball15:CircleParticle; public var particleSize20:Number; public var b3g1:CircleParticle; public var b3g2:CircleParticle; public var b3g3:CircleParticle; public var hightextm:TextField; public var bridgePC7:CircleParticle; public var botbridgee7:SpringConstraint; public var highscoresm:RectangleParticle; public var origtime; public var ball20:CircleParticle; public var bridgePD7:CircleParticle; public var botbridgef7:SpringConstraint; public var b14g12:CircleParticle; public var pistongroup:Group; public var bridgePDD:CircleParticle; public var liveslost; public var bouncePad6:RectangleParticle; public var by10:Number; public var by11:Number; public var by12:Number; public var bridgePE7:CircleParticle; public var by14:Number; public var by15:Number; public var by16:Number; public var levelcomplete:MovieClip; public var by18:Number; public var by19:Number; public var bsize13:Number; public var botbridgeg7:SpringConstraint; public var bsize11:Number; public var bsize12:Number; public var bsize15:Number; public var bsize10:Number; public var yslope:Number; public var vol:Number; public var bsize14:Number; public var sb52s:CircleParticle; public var bsize16:Number; public var bridgePF7:CircleParticle; public var by13:Number; public var botbridgeh7:SpringConstraint; public var bsize17:Number; public var bsize18:Number; public var bsize19:Number; public var b14g22:CircleParticle; public var bsize20:Number; public var by17:Number; public var by20:Number; public var botbridgei7:SpringConstraint; public var failscreen:MovieClip; public var bridgeCons42s:SpringConstraint; public var swingcirc:CircleParticle; public var botbridgej7:SpringConstraint; public var particleSize8b:Number; public var lv10:RectangleParticle; public var lv11:RectangleParticle; public var lv12:RectangleParticle; public var lv13:RectangleParticle; public var lv14:RectangleParticle; public var lv15:RectangleParticle; public var lv16:RectangleParticle; public var lv18:RectangleParticle; public var lv19:RectangleParticle; public var lv17:RectangleParticle; public var rim:CircleParticle; public var rimr19:RectangleParticle; public var lv20:RectangleParticle; public var helpm:RectangleParticle; public var floor6s4:RectangleParticle; public var ball8b:CircleParticle; public var lv1s:RectangleParticle; public var yellowhit1:Group; public var menulevel:Group; public var lv2s:RectangleParticle; public var lv3s:RectangleParticle; public var mainb13:SpringConstraint; public var colB7:Number; public var colB8:Number; public var colB9:Number; public var by8b:Number; public var righte20:RectangleParticle; public var mutebut:MovieClip; public var lv4s:RectangleParticle; public var sb12s:CircleParticle; public var bsize8b:Number; public var colC7:Number; public var colC8:Number; public var colC9:Number; public var rim2:CircleParticle; public var start10:RectangleParticle; public var start11:RectangleParticle; public var start12:RectangleParticle; public var start13:RectangleParticle; public var start14:RectangleParticle; public var start16:RectangleParticle; public var start17:RectangleParticle; public var start15:RectangleParticle; public var bar4s:RectangleParticle; public var ball4:CircleParticle; public var ball5:CircleParticle; public var ball6:CircleParticle; public var ball7:CircleParticle; public var start19:RectangleParticle; public var ball9:CircleParticle; public var start20:RectangleParticle; public var start18:RectangleParticle; public var pistonlside:RectangleParticle; public var b11g2:CircleParticle; public var b11g3:CircleParticle; public var pausecont:MovieClip; public var hanging:SpringConstraint; public var ball8:CircleParticle; public var lv8b:RectangleParticle; public var botfloor4:RectangleParticle; public var wa10:WheelParticle; public var wa12:WheelParticle; public var wa15:WheelParticle; public var wa16:WheelParticle; public var wa11:WheelParticle; public var wa19:WheelParticle; public var wa13:WheelParticle; public var wa14:WheelParticle; public var wa17:WheelParticle; public var wa18:WheelParticle; public var pconnect:SpringConstraint; public var rv8:RectangleParticle; public var wa20:WheelParticle; public var buttest:MovieClip; public var swinga18:SpringConstraint; public var rightbar6:RectangleParticle; public var wa1:WheelParticle; public var rvm:RectangleParticle; public var wa4:WheelParticle; public var wa5:WheelParticle; public var wa6:WheelParticle; public var wa7:WheelParticle; public var wa8:WheelParticle; public var wa9:WheelParticle; public var wa3:WheelParticle; public var wa1s:WheelParticle; public var swinga19:SpringConstraint; public var bti13:CircleParticle; public var rightfloor5:RectangleParticle; public var wb1:WheelParticle; public var wb3:WheelParticle; public var wb4:WheelParticle; public var wb5:WheelParticle; public var wb6:WheelParticle; public var wb7:WheelParticle; public var wb8:WheelParticle; public var wb9:WheelParticle; public var lifeeeeleft; public var resetbut:SimpleButton; public var wa2s:WheelParticle; public var wam:WheelParticle; public var wc1:SpringConstraint; public var length:Number; public var wc3:SpringConstraint; public var wc4:SpringConstraint; public var wc5:SpringConstraint; public var wc6:SpringConstraint; public var wc7:SpringConstraint; public var wc8:SpringConstraint; public var helpscreen:MovieClip; public var wa3s:WheelParticle; public var wc9:SpringConstraint; public var bluecol:Number; public var yhit2:RectangleParticle; public var yhit4:RectangleParticle; public var yhit5:RectangleParticle; public var yhit6:RectangleParticle; public var yhit7:RectangleParticle; public var yhit8:RectangleParticle; public var yhit9:RectangleParticle; public var wbm:WheelParticle; public var leftbar6:RectangleParticle; public var start8b:RectangleParticle; public var pistoncog2:WheelParticle; public var vert17:RectangleParticle; public var wcm:SpringConstraint; public var wa4s:WheelParticle; public var wa5s:WheelParticle; public var loadText:TextField; public var topfloor4:RectangleParticle; public var bonushightextm:TextField; public var b8g1:CircleParticle; public var b8g2:CircleParticle; public var b17g:CircleParticle; public var seel8b:CircleParticle; public var wa8b:WheelParticle; public var b132g:CircleParticle; public var b18g:CircleParticle; public var oscore; public var lifebar:MovieClip; public var b19g:CircleParticle; public var playm:RectangleParticle; public var sb2:CircleParticle; public var sb4:CircleParticle; public var sb5:CircleParticle; public var sb6:CircleParticle; public var sb9:CircleParticle; public var sb3:CircleParticle; public var sb7:CircleParticle; public var sb8:CircleParticle; public var sb1:CircleParticle; public var platformAndVersion:Array; public var bridgeCons92s:SpringConstraint; public var c1:CircleParticle; public var c2:CircleParticle; public var b4g1:CircleParticle; public var b4g2:CircleParticle; public var b4g3:CircleParticle; public var ba:CircleParticle; public var bg:CircleParticle; public var apiholder:MovieClip; public var b4g4:CircleParticle; public var bouncePad15:RectangleParticle; public var bouncePad10:RectangleParticle; public var bouncePad11:RectangleParticle; public var bouncePad14:RectangleParticle; public var bx:Number; public var by:Number; public var Glowm:GlowFilter; public var versionArray:Array; public var colB11:Number; public var colB12:Number; public var colB13:Number; public var colB14:Number; public var seesaw8b:SpringConstraint; public var boxr12:RectangleParticle; public var boxr14:RectangleParticle; public var cp:CircleParticle; public var trigb13:RectangleParticle; public var leftfloor5:RectangleParticle; public var colB19:Number; public var colB15:Number; public var colB16:Number; public var bridgePDD7:CircleParticle; public var colB18:Number; public var colB10:Number; public var colB20:Number; public var btr13:CircleParticle; public var floorl2s:RectangleParticle; public var sb62s:CircleParticle; public var colB17:Number; public var bouncePad20:RectangleParticle; public var bg1:CircleParticle; public var bg2:CircleParticle; public var radius:Number; public var creditscreen:MovieClip; public var sb10:CircleParticle; public var bridgeCons52s:SpringConstraint; public var majorVersion:Number; public var pistonholders:Group; public var go; public var b16g1:CircleParticle; public var b16g2:CircleParticle; public var b16g3:CircleParticle; public var b16g4:CircleParticle; public var swingDoorSpring:SpringConstraint; public var b15g12:CircleParticle; public var channel:SoundChannel; public var b15g15:CircleParticle; public var b15g22:CircleParticle; public var bsize7:Number; public var bsize8:Number; public var bsize9:Number; public var rimb19:RectangleParticle; public var pausePosition:int; public var loadBar:MovieClip; public var colB8b:Number; public var lpira15:RectangleParticle; public var lm:SpringConstraint; public var botswing9:CircleParticle; public var ngrscreenh; public var minuteTimer:Timer; public var sb22s:CircleParticle; public var lv:RectangleParticle; public var sba19:CircleParticle; public var mk:SpringConstraint; public var sba18:CircleParticle; public var swingDoorAnchor:CircleParticle; public var slope4s:RectangleParticle; public var quarter19:Number; public var piston2:RectangleParticle; public var floorm:RectangleParticle; public var bridgeCons12s:SpringConstraint; public var r1:RectangleParticle; public var tpause; public var botbox5:RectangleParticle; public var music:theme; public var wb10:WheelParticle; public var wb11:WheelParticle; public var wb12:WheelParticle; public var wb13:WheelParticle; public var wb14:WheelParticle; public var wb15:WheelParticle; public var wb16:WheelParticle; public var wb17:WheelParticle; public var wb18:WheelParticle; public var hammer9:SpringConstraint; public var wb19:WheelParticle; public var bot15:RectangleParticle; public var wb20:WheelParticle; public var swingb18:SpringConstraint; public var swingb19:SpringConstraint; public var ofinal; public var rightb13:SpringConstraint; public var wb1s:WheelParticle; public var b19g19:CircleParticle; public var bx7:Number; public var bx8:Number; public var bx9:Number; public var wb2s:WheelParticle; public var b20g12:CircleParticle; public var wb3s:WheelParticle; public var swingDoorP1:CircleParticle; public var swingDoorP2:CircleParticle; public var by7:Number; public var by8:Number; public var colB:Number; public var colC:Number; public var b20g22:CircleParticle; public var by9:Number; public var wa:WheelParticle; public var wb:WheelParticle; public var wc:SpringConstraint; public var wb4s:WheelParticle; public var ba1s:CircleParticle; public var wb5s:WheelParticle; public var starter17:RectangleParticle; public var b9g1:CircleParticle; public var b9g2:CircleParticle; public var b9g4:CircleParticle; public var ba2s:CircleParticle; public var b9g3:CircleParticle; public var creditsm:RectangleParticle; public var ba3s:CircleParticle; public var tophold9:CircleParticle; public var bot8b:RectangleParticle; public var wb8b:WheelParticle; public var bridgePA:CircleParticle; public var bridgePB:CircleParticle; public var bridgePC:CircleParticle; public var bridgePD:CircleParticle; public var bridgePE:CircleParticle; public var bridgePF:CircleParticle; public var b142g:CircleParticle; public var ba4s:CircleParticle; public var ba5s:CircleParticle; public var bsize:Number; public var lead; public var allowed_site:String; public var bluecol17:Number; public var bluecol18:Number; public var bluecol19:Number; public var bluecol20:Number; public var particleSize:Number; public var sb102s:CircleParticle; public var b12g12:CircleParticle; public var rightbox5:RectangleParticle; public var lefte20:RectangleParticle; public var b5g1:CircleParticle; public var b5g2:CircleParticle; public var b5g3:CircleParticle; public function MainTimeline(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 4, frame5, 5, frame6, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 39, frame40); } public function key_pressed20(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa20.angularVelocity = 0.6; wb20.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa20.angularVelocity = -0.6; wb20.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed1s(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa1s.angularVelocity = 0.6; wb1s.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa1s.angularVelocity = -0.6; wb1s.angularVelocity = -0.6; }; }; } public function key_pressed2s(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa2s.angularVelocity = 0.6; wb2s.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa2s.angularVelocity = -0.6; wb2s.angularVelocity = -0.6; }; }; } public function key_pressed3s(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa3s.angularVelocity = 0.6; wb3s.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa3s.angularVelocity = -0.6; wb3s.angularVelocity = -0.6; }; }; } public function key_pressed5s(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa5s.angularVelocity = 0.6; wb5s.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa5s.angularVelocity = -0.6; wb5s.angularVelocity = -0.6; }; }; } public function key_pressed4s(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa4s.angularVelocity = 0.6; wb4s.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa4s.angularVelocity = -0.6; wb4s.angularVelocity = -0.6; }; }; } public function key_pressed8b(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa8b.angularVelocity = 0.6; wb8b.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa8b.angularVelocity = -0.6; wb8b.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function goto(_arg1:Event):void{ var _local2:String; var _local3:URLRequest; _local2 = "http://www.gamesreloaded.com/"; _local3 = new URLRequest(_local2); navigateToURL(_local3, "_blank"); } public function playgamesgrd(_arg1:MouseEvent):void{ var _local2:String; var _local3:URLRequest; _local2 = "http://www.gamesreloaded.com/"; _local3 = new URLRequest(_local2); navigateToURL(_local3, "_blank"); } public function bonusrun(_arg1:Event):void{ if (mpause == false){ APEngine.container.x = ((-(wa1s.px) + (stage.width / 2)) - (APEngine.container.width / 3)); APEngine.container.y = ((-(wa1s.py) + (stage.height / 2)) - (APEngine.container.height / 4)); APEngine.step(); APEngine.paint(); }; } public function submitscoree(_arg1:MouseEvent):void{ MochiScores.showLeaderboard({boardID:"5acc26ef28e079d6", score:ofinal}); winscreen.subhold.gotoAndStop(2); winscreen.subtext.gotoAndStop(2); } public function key_pressed(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa.angularVelocity = 0.6; wb.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa.angularVelocity = -0.6; wb.angularVelocity = -0.6; }; }; } public function replaygamee(_arg1:Event):void{ bottime.gotoAndStop(1); minuteTimer.stop(); minuteTimer.reset(); minuteTimer.removeEventListener(TimerEvent.TIMER, onTick); minuteTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete); channel.stop(); lifebar.gotoAndStop(1); liveslost = 0; oscore = 0; ofinal = 0; stage.removeEventListener(KeyboardEvent.KEY_DOWN, pausegamespace); mpause = true; go = true; gotoAndStop(5); } public function bahit2(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); bottime.gotoAndStop(2); levelcomplete.visible = true; minuteTimer.stop(); level2.removeParticle(ball); }; } public function bahit4(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); bottime.gotoAndStop(2); levelcomplete.visible = true; minuteTimer.stop(); level4.removeParticle(ball4); }; } public function bahit5(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); bottime.gotoAndStop(2); levelcomplete.visible = true; minuteTimer.stop(); level5.removeParticle(ball5); }; } public function bahit6(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); bouncePad6.elasticity = 0; levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level6.removeParticle(ball6); }; } public function bahit7(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level7.removeParticle(ball7); }; } public function bahit8(_arg1:CollisionEvent):void{ var _local2:*; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; bridgeh8.elasticity = 0; levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); bottime.gotoAndStop(2); levelcomplete.visible = true; }; } public function bahit9(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level9.removeParticle(ball9); }; } public function bahitw(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.visible = true; levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); level1.removeParticle(ba); }; } public function bahit10(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level10.removeParticle(ball10); }; } public function bahit11(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level11.removeParticle(ball11); }; } public function bahit12(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level12.removeParticle(ball12); }; } public function bahit13(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level13.removeParticle(ball13); }; } public function bahit14(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level14.removeParticle(ball14); }; } public function bahit15(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level15.removeParticle(ball15); }; } public function truckhitm(_arg1:CollisionEvent):void{ var _local2:*; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "Helpcol"){ touchhelp = true; helptextm.filters = new Array(Glowm); } else { touchhelp = false; helptextm.filters = null; }; if (_local2 == "Playcol"){ touchplay = true; playtextm.filters = new Array(Glowm); } else { touchplay = false; playtextm.filters = null; }; if (_local2 == "Credcol"){ touchcred = true; credtextm.filters = new Array(Glowm); } else { touchcred = false; credtextm.filters = null; }; if (_local2 == "Highcol"){ touchhigh = true; hightextm.filters = new Array(Glowm); } else { touchhigh = false; hightextm.filters = null; }; if (_local2 == "Bonuscol"){ touchbon = true; bonushightextm.filters = new Array(Glowm); } else { touchbon = false; bonushightextm.filters = null; }; } public function bahit17(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level17.removeParticle(ball17); }; } public function bahit16(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level16.removeParticle(ball16); }; } public function bahit18(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level18.removeParticle(ball18); }; } public function onComplete(_arg1:Event):void{ gotoAndStop(2); } public function bahit19(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level19.removeParticle(ball19); }; } public function bahit20(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level20.removeParticle(ball20); }; } public function bahit1s(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; ba1s.removeEventListener(CollisionEvent.COLLIDE, bahit1s); level1s.removeParticle(ba1s); _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete2); levelcomplete.visible = true; levelcomplete.leveltime.text = "Bonus Levels Aren't Scored"; levelcomplete.levelscore.text = ""; levelcomplete.overscore.text = ""; }; } function frame1(){ myMenu = new ContextMenu(); myMenu.hideBuiltInItems(); menuItem1 = new ContextMenuItem("Made by tudway"); menuItem2 = new ContextMenuItem("Sponsored by www.gamesreloaded.com"); menuItem2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, doSomething); menuItem1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, doSomething2); myMenu.customItems.push(menuItem1); myMenu.customItems.push(menuItem2); this.contextMenu = myMenu; stop(); this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress); this.loaderInfo.addEventListener(Event.COMPLETE, onComplete); MochiServices.connect("d8294380eefa9f26", root); MochiBot.track(this, "1258ab83"); MochiBot.track(this, "8a3233fb"); } function frame3(){ stop(); SoundMixer.soundTransform = new SoundTransform(0.8, 0); } function frame6(){ gotoAndStop(5); } public function mutesound2(_arg1:MouseEvent):void{ if (mute == false){ mutebut.fake.visible = true; SoundMixer.soundTransform = new SoundTransform(0, 0); mute = true; } else { mutebut.fake.visible = false; SoundMixer.soundTransform = new SoundTransform(0.8, 0); mute = false; }; } function frame2(){ fdetect.updatebut.addEventListener(MouseEvent.CLICK, updategame); stop(); versionNumber = Capabilities.version; versionArray = versionNumber.split(","); length = versionArray.length; i = 0; while (i < length) { i++; }; platformAndVersion = versionArray[0].split(" "); j = 0; while (j < 2) { j++; }; majorVersion = parseInt(platformAndVersion[1]); minorVersion = parseInt(versionArray[1]); buildNumber = parseInt(versionArray[2]); if (majorVersion < 9){ gotoAndStop(2); } else { gotoAndPlay(3); }; } function frame5(){ vol = 0.8; music = new theme(); volc = new SoundTransform(vol); channel = music.play(0, 999, volc); boingm = new boing(); pausePosition = channel.position; addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressedm); stage.addEventListener(KeyboardEvent.KEY_UP, key_releasedm); ngrscreen.grcom.addEventListener(MouseEvent.CLICK, goto); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); menulevel = new Group(); menulevel.collideInternal = true; mpause = false; go = true; Glowm = new GlowFilter(0xFFFFFF, 0.8, 16, 16, 8, 3, false, false); touchhelp = false; touchplay = false; touchcred = false; touchbon = false; touchhigh = false; helpscreen.visible = false; creditscreen.visible = false; ngrscreen.visible = false; lead = false; boings = false; allowed_site = "gamesreloaded.com"; domain = this.root.loaderInfo.url.split("/")[2]; if (boings == true){ bochan = boingm.play(0, 1); }; helpscreenh = false; credscreenh = false; ngrscreenh = false; lvm = new RectangleParticle(-20, 200, 20, 400, 0, true); menulevel.addParticle(lvm); lvm.visible = false; rvm = new RectangleParticle(570, 200, 20, 400, 0, true); menulevel.addParticle(rvm); rvm.visible = false; wam = new WheelParticle(10, 20, 15, false, 2); menulevel.addParticle(wam); wbm = new WheelParticle(50, 20, 15, false, 2); menulevel.addParticle(wbm); wcm = new SpringConstraint(wam, wbm, 0.5, true, 10); menulevel.addConstraint(wcm); wam.setStyle(3, 3359795, 1, 11189179, 1); wbm.setStyle(3, 3359795, 1, 11189179, 1); wcm.setStyle(3, 3359795, 1, 11189179, 1); floorm = new RectangleParticle(275, 320, 600, 10, 0, true); menulevel.addParticle(floorm); floorm.setStyle(3, 3359795, 1, 11189162, 1); helpm = new RectangleParticle(275, 310, 50, 10, 0, true); menulevel.addParticle(helpm); helpm.setStyle(3, 3359795, 1, 0xFFCC00, 1); helpm.sprite.name = "Helpcol"; playm = new RectangleParticle(25, 310, 50, 10, 0, true); menulevel.addParticle(playm); playm.setStyle(3, 3359795, 1, 0xFFCC00, 1); playm.sprite.name = "Playcol"; creditsm = new RectangleParticle(525, 310, 50, 10, 0, true); menulevel.addParticle(creditsm); creditsm.setStyle(3, 3359795, 1, 0xFFCC00, 1); creditsm.sprite.name = "Credcol"; bonusm = new RectangleParticle(150, 310, 50, 10, 0, true); menulevel.addParticle(bonusm); bonusm.setStyle(3, 3359795, 1, 0xFFCC00, 1); bonusm.sprite.name = "Bonuscol"; highscoresm = new RectangleParticle(400, 310, 50, 10, 0, true); menulevel.addParticle(highscoresm); highscoresm.setStyle(3, 3359795, 1, 0xFFCC00, 1); highscoresm.sprite.name = "Highcol"; APEngine.addGroup(menulevel); APEngine.container.x = 0; APEngine.container.y = 0; wam.addEventListener(CollisionEvent.COLLIDE, truckhitm); wbm.addEventListener(CollisionEvent.COLLIDE, truckhitm); } public function onPlaybackComplete(_arg1:Event){ if (mute == false){ if (levelcomplete.visible == true){ SoundMixer.soundTransform = new SoundTransform(0.2, 0); } else { SoundMixer.soundTransform = new SoundTransform(0.8, 0); }; } else { SoundMixer.soundTransform = new SoundTransform(0, 0); }; } public function bahit2s(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; ba2s.removeEventListener(CollisionEvent.COLLIDE, bahit2s); level2s.removeParticle(ba2s); _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete2); levelcomplete.visible = true; levelcomplete.leveltime.text = "Bonus Levels Aren't Scored"; levelcomplete.levelscore.text = ""; levelcomplete.overscore.text = ""; }; } public function bahit3s(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; ba3s.removeEventListener(CollisionEvent.COLLIDE, bahit3s); level3s.removeParticle(ba3s); _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete2); levelcomplete.visible = true; levelcomplete.leveltime.text = "Bonus Levels Aren't Scored"; levelcomplete.levelscore.text = ""; levelcomplete.overscore.text = ""; }; } public function bahit4s(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; APEngine.container.x = 0; APEngine.container.y = 0; ba4s.removeEventListener(CollisionEvent.COLLIDE, bahit4s); level4s.removeParticle(ba4s); _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete2); levelcomplete.visible = true; levelcomplete.leveltime.text = "Bonus Levels Aren't Scored"; levelcomplete.levelscore.text = ""; levelcomplete.overscore.text = ""; }; } public function bahit5s(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; APEngine.container.x = 0; APEngine.container.y = 0; ba5s.removeEventListener(CollisionEvent.COLLIDE, bahit5s); level5s.removeParticle(ba5s); _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete2); levelcomplete.visible = true; levelcomplete.leveltime.text = "Well done, you've completed all of the bonus levels"; levelcomplete.levelscore.text = "of the bonus levels!"; levelcomplete.overscore.text = ""; }; } public function trigfunk12(_arg1:CollisionEvent):void{ var _local2:*; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "trig"){ level12.removeParticle(boxb12); }; } public function trigfunk13(_arg1:CollisionEvent):void{ var _local2:*; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "trig"){ level13.removeConstraint(leftb13); }; } public function trigfunk14(_arg1:CollisionEvent):void{ var _local2:*; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "trig"){ level14.removeParticle(boxt14); }; } public function buttonFunk(_arg1:Event):void{ APEngine.removeGroup(level1); gotoAndStop(37); removeEventListener(Event.ENTER_FRAME, run); } public function bahit8b(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); minuteTimer.stop(); bottime.gotoAndStop(2); levelcomplete.visible = true; level8b.removeParticle(ball8b); }; } public function onProgress(_arg1:ProgressEvent):void{ var _local2:Number; var _local3:Number; var _local4:Number; _local2 = _arg1.target.bytesLoaded; _local3 = _arg1.target.bytesTotal; _local4 = (_local2 / _local3); loadBar.scaleX = _local4; loadText.text = (Math.round((_local4 * 100)) + "%"); } public function trigfunk1s(_arg1:CollisionEvent):void{ var _local2:*; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "bfall"){ level1s.removeConstraint(bridgeCons1); }; } public function trigfunk2s(_arg1:CollisionEvent):void{ var _local2:*; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "rtrig1"){ floorr2s.sprite.name = "fake"; level2s.removeConstraint(bridgeCons12s); level2s.addConstraint(fc2s); }; } public function bonusrun2s(_arg1:Event):void{ if (mpause == false){ APEngine.container.x = ((-(wa2s.px) + (stage.width / 2)) - (APEngine.container.width / 3)); APEngine.container.y = ((-(wa2s.py) + (stage.height / 2)) - (APEngine.container.height / 4)); APEngine.step(); APEngine.paint(); }; } public function bonusrun3s(_arg1:Event):void{ if (mpause == false){ APEngine.step(); APEngine.paint(); }; } public function playgamesgr(_arg1:MouseEvent):void{ var _local2:String; var _local3:URLRequest; _local2 = "http://www.gamesreloaded.com/"; _local3 = new URLRequest(_local2); navigateToURL(_local3, "_blank"); } public function bonusrun4s(_arg1:Event):void{ if (mpause == false){ APEngine.step(); APEngine.paint(); }; } public function bonusrun5s(_arg1:Event):void{ if (mpause == false){ APEngine.container.x = ((-(wa5s.px) + (stage.width / 2)) - (APEngine.container.width / 2.5)); APEngine.container.y = ((-(wa5s.py) + (stage.height / 2)) - (APEngine.container.height / 3)); APEngine.step(); APEngine.paint(); }; } public function key_pressed1(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa1.angularVelocity = 0.6; wb1.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa1.angularVelocity = -0.6; wb1.angularVelocity = -0.6; }; }; } public function key_pressed3(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa3.angularVelocity = 0.6; wb3.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa3.angularVelocity = -0.6; wb3.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed4(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa4.angularVelocity = 0.6; wb4.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa4.angularVelocity = -0.6; wb4.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed5(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa5.angularVelocity = 0.6; wb5.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa5.angularVelocity = -0.6; wb5.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed6(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa6.angularVelocity = 0.6; wb6.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa6.angularVelocity = -0.6; wb6.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed7(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa7.angularVelocity = 0.6; wb7.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa7.angularVelocity = -0.6; wb7.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed9(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa9.angularVelocity = 0.6; wb9.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa9.angularVelocity = -0.6; wb9.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed8(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa8.angularVelocity = 0.6; wb8.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa8.angularVelocity = -0.6; wb8.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressedm(_arg1:KeyboardEvent):void{ var _local2:SoundChannel; var _local3:String; var _local4:URLRequest; if (_arg1.keyCode == Keyboard.RIGHT){ wam.angularVelocity = 0.6; wbm.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wam.angularVelocity = -0.6; wbm.angularVelocity = -0.6; }; if (_arg1.keyCode == Keyboard.SPACE){ if (touchhelp == true){ _local2 = boingm.play(0, 1); if (helpscreenh == true){ helpscreen.visible = false; helpscreenh = false; mpause = false; } else { helpscreen.visible = true; helpscreenh = true; mpause = true; }; }; if (touchplay == true){ _local2 = boingm.play(0, 1); APEngine.removeGroup(menulevel); stage.removeEventListener(KeyboardEvent.KEY_DOWN, key_pressedm); stage.removeEventListener(KeyboardEvent.KEY_UP, key_releasedm); gotoAndStop(10); }; if (touchcred == true){ _local2 = boingm.play(0, 1); if (credscreenh == true){ creditscreen.visible = false; credscreenh = false; mpause = false; } else { creditscreen.visible = true; credscreenh = true; mpause = true; }; }; if (touchhigh == true){ _local2 = boingm.play(0, 1); _local3 = "http://www.gamesreloaded.com/"; _local4 = new URLRequest(_local3); navigateToURL(_local4, "_blank"); }; if (touchbon == true){ _local2 = boingm.play(0, 1); if (domain.indexOf(allowed_site) == (domain.length - allowed_site.length)){ stage.removeEventListener(KeyboardEvent.KEY_DOWN, key_pressedm); stage.removeEventListener(KeyboardEvent.KEY_UP, key_releasedm); APEngine.removeGroup(menulevel); go = true; gotoAndStop(33); }; if (domain.indexOf(allowed_site) != (domain.length - allowed_site.length)){ if (ngrscreenh == true){ ngrscreen.visible = false; ngrscreenh = false; mpause = false; } else { ngrscreen.visible = true; ngrscreenh = true; mpause = true; }; }; }; }; } public function pausegames(_arg1:MouseEvent):void{ var _local2:int; if (mpause == false){ mpause = true; _local2 = channel.position; channel.stop(); tpause = true; resetbut.visible = false; } else { channel = music.play(_local2, 99, volc); tpause = false; mpause = false; resetbut.visible = true; }; } public function stopgamespace(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.SPACE){ if (mpause == false){ minuteTimer.start(); } else { minuteTimer.stop(); }; }; } public function pausegame(_arg1:MouseEvent):void{ var _local2:int; if (mpause == false){ mpause = true; _local2 = channel.position; channel.stop(); tpause = true; resetbut.visible = false; } else { channel = music.play(_local2, 99, volc); tpause = false; mpause = false; resetbut.visible = true; }; } public function key_released(_arg1:KeyboardEvent):void{ wa.angularVelocity = 0; wb.angularVelocity = 0; } public function spinball19(_arg1:Event):void{ var _local2:Number; if (mpause == false){ _local2 = swingball19.radian; rimt19.px = ((-(radius19) * Math.sin(_local2)) + swingball19.px); rimt19.py = ((radius19 * Math.cos(_local2)) + swingball19.py); _local2 = (_local2 + quarter19); rimr19.px = ((-(radius19) * Math.sin(_local2)) + swingball19.px); rimr19.py = ((radius19 * Math.cos(_local2)) + swingball19.py); _local2 = (_local2 + quarter19); rimb19.px = ((-(radius19) * Math.sin(_local2)) + swingball19.px); rimb19.py = ((radius19 * Math.cos(_local2)) + swingball19.py); _local2 = (_local2 + quarter19); riml19.px = ((-(radius19) * Math.sin(_local2)) + swingball19.px); riml19.py = ((radius19 * Math.cos(_local2)) + swingball19.py); swingball19.speed = 0.005; }; } public function nextl2(_arg1:MouseEvent):void{ musicplay = true; gotoAndStop(12); bottime.gotoAndStop(1); APEngine.removeGroup(defaultGroup); levelcomplete.visible = false; mpause = false; go = true; stage.removeEventListener(KeyboardEvent.KEY_UP, key_released1); } public function nextl3(_arg1:MouseEvent):void{ gotoAndStop(13); bottime.gotoAndStop(1); APEngine.removeGroup(level2); levelcomplete.visible = false; mpause = false; go = true; } public function nextl4(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level4); levelcomplete.visible = false; mpause = false; go = true; } public function nextl5(_arg1:MouseEvent):void{ gotoAndStop(15); bottime.gotoAndStop(1); APEngine.removeGroup(level5); levelcomplete.visible = false; mpause = false; go = true; } public function nextl6(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level6); levelcomplete.visible = false; mpause = false; go = true; } public function nextl7(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level7); levelcomplete.visible = false; mpause = false; go = true; } public function nextl9(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level9); levelcomplete.visible = false; mpause = false; go = true; } public function nextl8(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level8); levelcomplete.visible = false; mpause = false; go = true; } public function nextl10(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level10); levelcomplete.visible = false; mpause = false; go = true; } public function nextl11(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level11); levelcomplete.visible = false; mpause = false; go = true; } public function nextl12(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level12); levelcomplete.visible = false; mpause = false; go = true; } public function nextl13(_arg1:MouseEvent):void{ gotoAndStop(23); bottime.gotoAndStop(1); APEngine.removeGroup(level13); levelcomplete.visible = false; mpause = false; go = true; } public function nextl14(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level14); levelcomplete.visible = false; mpause = false; go = true; } public function nextl15(_arg1:MouseEvent):void{ gotoAndStop(25); bottime.gotoAndStop(1); APEngine.removeGroup(level15); levelcomplete.visible = false; mpause = false; go = true; levelcomplete.nextlev.removeEventListener(MouseEvent.CLICK, nextl10); } public function nextlw(_arg1:Event):void{ if (mute == false){ SoundMixer.soundTransform = new SoundTransform(0.8, 0); } else { SoundMixer.soundTransform = new SoundTransform(0, 0); }; nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level1); levelcomplete.visible = false; mpause = false; go = true; } public function nextl18(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level18); levelcomplete.visible = false; mpause = false; go = true; } public function nextl19(_arg1:MouseEvent):void{ gotoAndStop(29); bottime.gotoAndStop(1); APEngine.removeGroup(level19); levelcomplete.visible = false; mpause = false; go = true; } public function check_coll(_arg1:CollisionEvent):void{ var _local2:*; var _local3:SoundChannel; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "y1"){ go = false; _local3 = boingm.play(0, 1); _local3.addEventListener(Event.SOUND_COMPLETE, onPlaybackComplete); levelcomplete.leveltime.text = ("Seconds Left = " + bottime.timetext.text); levelcomplete.levelscore.text = ("Level Score = " + (scoretime * 100)); oscore = (oscore + (scoretime * 100)); levelcomplete.overscore.text = ("Overall Score = " + oscore); bottime.gotoAndStop(2); levelcomplete.visible = true; minuteTimer.stop(); defaultGroup.removeParticle(cp); }; } public function nextl16(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level16); levelcomplete.visible = false; mpause = false; go = true; } public function nextl17(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level17); levelcomplete.visible = false; mpause = false; go = true; } public function nextl20(_arg1:MouseEvent):void{ bottime.gotoAndStop(1); APEngine.removeGroup(level20); mpause = false; go = true; gotoAndStop(30); } public function nextl1s(_arg1:Event):void{ APEngine.removeGroup(level1s); mpause = false; levelcomplete.visible = false; if (mute == false){ if (levelcomplete.visible == false){ SoundMixer.soundTransform = new SoundTransform(0.8, 0); }; }; removeEventListener(Event.ENTER_FRAME, bonusrun); go = true; APEngine.removeGroup(level1s); APEngine.container.x = 0; APEngine.container.y = 0; gotoAndStop(36); } public function nextl2s(_arg1:Event):void{ APEngine.removeGroup(level2s); mpause = false; levelcomplete.visible = false; if (mute == false){ if (levelcomplete.visible == false){ SoundMixer.soundTransform = new SoundTransform(0.8, 0); }; }; removeEventListener(Event.ENTER_FRAME, bonusrun2s); go = true; APEngine.container.x = 0; APEngine.container.y = 0; gotoAndStop(35); } public function playgames(_arg1:MouseEvent):void{ var _local2:String; var _local3:URLRequest; _local2 = "http://www.gamesreloaded.com/"; _local3 = new URLRequest(_local2); navigateToURL(_local3, "_blank"); } public function doSomething(_arg1:ContextMenuEvent):void{ var _local2:String; var _local3:URLRequest; _local2 = "http://www.gamesreloaded.com/"; _local3 = new URLRequest(_local2); navigateToURL(_local3, "_blank"); } public function nextl3s(_arg1:Event):void{ APEngine.removeGroup(level3s); APEngine.removeGroup(pistongroup); APEngine.removeGroup(pistonholders); levelcomplete.visible = false; if (mute == false){ if (levelcomplete.visible == false){ SoundMixer.soundTransform = new SoundTransform(0.8, 0); }; }; removeEventListener(Event.ENTER_FRAME, bonusrun3s); removeEventListener(Event.ENTER_FRAME, spinball); mpause = false; go = true; APEngine.container.x = 0; APEngine.container.y = 0; gotoAndStop(37); } public function updategame(_arg1:MouseEvent):void{ var _local2:String; var _local3:URLRequest; _local2 = "http://www.adobe.com/products/flashplayer/"; _local3 = new URLRequest(_local2); navigateToURL(_local3, "_blank"); } function frame10(){ stop(); levelcomplete.grcom.addEventListener(MouseEvent.CLICK, playgamesgr); levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextlw); failscreen.replaybut.addEventListener(MouseEvent.CLICK, replaygame); failscreen.subhold.submitbut.addEventListener(MouseEvent.CLICK, submitscore); failscreen.grcom.addEventListener(MouseEvent.CLICK, playgamesgrd); pausecont.pausebut.addEventListener(MouseEvent.CLICK, pausegame); stage.addEventListener(KeyboardEvent.KEY_DOWN, pausegamespace); buttest.addEventListener(MouseEvent.CLICK, buttonFunk); mute = false; mutebut.fake.visible = false; pausecont.visible = true; mutebut.soundplay.addEventListener(MouseEvent.CLICK, mutesound); addEventListener(Event.ENTER_FRAME, lpausel); resetbut.addEventListener(MouseEvent.CLICK, reset); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed); stage.addEventListener(KeyboardEvent.KEY_UP, key_released); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level1 = new Group(); yellowhit1 = new Group(); level1.collideInternal = true; bg2 = new CircleParticle(420, 280, 55, true, 2); bg2.collidable = false; bg2.setStyle(30, 12058224, 1, 13434777, 1); level1.addParticle(bg2); bg1 = new CircleParticle(300, 200, 100, true, 2); bg1.collidable = false; bg1.setStyle(30, 12058224, 1, 13434777, 1); level1.addParticle(bg1); bg = new CircleParticle(100, 400, 200, true, 2); bg.collidable = false; bg.setStyle(30, 12058224, 1, 13434777, 1); level1.addParticle(bg); ba = new CircleParticle(100, 10, 15, false, 2); level1.addParticle(ba); oscore = 0; liveslost = 0; minuteTimer = new Timer(1000, 30); failscreen.visible = false; minuteTimer.addEventListener(TimerEvent.TIMER, onTick); minuteTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete); minuteTimer.start(); levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, stoptime); stage.addEventListener(KeyboardEvent.KEY_DOWN, stopgamespace); pausecont.pausebut.addEventListener(MouseEvent.CLICK, stoptime); if (go == false){ minuteTimer.removeEventListener(TimerEvent.TIMER, onTick); minuteTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete); }; mask1.alpha = 0; mask1.visible = false; fade = false; go = true; mpause = false; origtime = 30; scoretime = 0; gameinstructions.text = "Use left and right arrow keys to move Push the yellow ball to the yellow bar"; bottime.timetext.text = "30"; tpause = false; levelcomplete.visible = false; levelcomplete.levelname.text = "level 1 complete"; lv2 = new RectangleParticle(-20, 100, 20, 200, 0, true); level1.addParticle(lv2); lv2.visible = false; wa = new WheelParticle(10, 20, 15, false, 2); level1.addParticle(wa); wb = new WheelParticle(50, 20, 15, false, 2); level1.addParticle(wb); wc = new SpringConstraint(wa, wb, 0.5, true, 10); level1.addConstraint(wc); floor = new RectangleParticle(200, 200, 450, 10, 0, true); level1.addParticle(floor); yhit = new RectangleParticle(420, 155, 10, 100, 0, true); yhit.sprite.name = "y"; yhit.setStyle(3, 16040962, 1, 0xFFCC00, 1); level1.addParticle(yhit); wa.setStyle(3, 3359795, 1, 11189179, 1); wb.setStyle(3, 3359795, 1, 11189179, 1); wc.setStyle(3, 3359795, 1, 11189179, 1); floor.setStyle(3, 3359795, 1, 11189162, 1); ba.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level1); ba.addEventListener(CollisionEvent.COLLIDE, bahitw); } function frame11(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl2); resetbut.addEventListener(MouseEvent.CLICK, reset2); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr2); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed1); stage.addEventListener(KeyboardEvent.KEY_UP, key_released1); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); defaultGroup = new Group(); defaultGroup.collideInternal = true; bg22 = new CircleParticle(220, 80, 55, true, 2); bg22.collidable = false; bg22.setStyle(30, 12058224, 1, 13434777, 1); defaultGroup.addParticle(bg22); bg12 = new CircleParticle(300, 200, 100, true, 2); bg12.collidable = false; bg12.setStyle(30, 12058224, 1, 13434777, 1); defaultGroup.addParticle(bg12); b2g = new CircleParticle(100, 400, 200, true, 2); b2g.collidable = false; b2g.setStyle(30, 12058224, 1, 13434777, 1); defaultGroup.addParticle(b2g); cp = new CircleParticle(100, 10, 15, false, 2); defaultGroup.addParticle(cp); mask1.alpha = 0; mask1.visible = false; go = true; mpause = false; fade = false; minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 2 complete"; gameinstructions.text = "same controls and instructions but you have to get across a bridge"; levelcomplete.visible = false; lv = new RectangleParticle(-20, 100, 20, 200, 0, true); defaultGroup.addParticle(lv); lv.visible = false; wa1 = new WheelParticle(10, 20, 15, false, 2); defaultGroup.addParticle(wa1); wb1 = new WheelParticle(50, 20, 15, false, 2); defaultGroup.addParticle(wb1); wc1 = new SpringConstraint(wa1, wb1, 0.5, true, 10); defaultGroup.addConstraint(wc1); wa1.setStyle(3, 3359795, 1, 11189179, 1); wb1.setStyle(3, 3359795, 1, 11189179, 1); wc1.setStyle(3, 3359795, 1, 11189179, 1); r1 = new RectangleParticle(50, 200, 100, 10, 0, true); defaultGroup.addParticle(r1); c1 = new CircleParticle(400, 100, 5, true); defaultGroup.addParticle(c1); c2 = new CircleParticle(500, 300, 5, true); defaultGroup.addParticle(c2); colC = 3359795; colB = 11189162; bx = 100; by = 200; bsize = 51.5; yslope = 2.4; particleSize = 5; c1.setStyle(3, colC, 0, colB, 0); c2.setStyle(3, colC, 0, colB, 0); bridgePAA = new CircleParticle(bx, by, particleSize, true); bridgePAA.setStyle(3, colC, 1, colB); defaultGroup.addParticle(bridgePAA); bx = (bx + bsize); by = (by + yslope); bridgePA = new CircleParticle(bx, by, particleSize); bridgePA.setStyle(3, colC, 1, colB); defaultGroup.addParticle(bridgePA); bx = (bx + bsize); by = (by + yslope); bridgePB = new CircleParticle(bx, by, particleSize); bridgePB.setStyle(3, colC, 1, colB); defaultGroup.addParticle(bridgePB); bx = (bx + bsize); by = (by + yslope); bridgePC = new CircleParticle(bx, by, particleSize); bridgePC.setStyle(3, colC, 1, colB); defaultGroup.addParticle(bridgePC); bx = (bx + bsize); by = (by + yslope); bridgePD = new CircleParticle(bx, by, particleSize); bridgePD.setStyle(3, colC, 1, colB); defaultGroup.addParticle(bridgePD); bx = (bx + bsize); by = (by + yslope); bridgePDD = new CircleParticle(bx, by, particleSize); bridgePDD.setStyle(3, colC, 1, colB); defaultGroup.addParticle(bridgePDD); bx = (bx + bsize); by = (by + yslope); bridgePE = new CircleParticle(bx, by, particleSize, false); bridgePE.setStyle(3, colC, 1, colB); defaultGroup.addParticle(bridgePE); bx = (bx + bsize); by = (by + yslope); bridgePF = new CircleParticle(bx, by, particleSize, false); bridgePF.setStyle(3, colC, 1, colB); defaultGroup.addParticle(bridgePF); bridgeConnA = new SpringConstraint(bridgePAA, bridgePA, 0.9, true, 10, 0.8); bridgeConnA.fixedEndLimit = 0.15; bridgeConnA.setStyle(3, colC, 1, colB); defaultGroup.addConstraint(bridgeConnA); bridgeConnB = new SpringConstraint(bridgePA, bridgePB, 0.9, true, 10, 0.8); bridgeConnB.setStyle(3, colC, 1, colB); defaultGroup.addConstraint(bridgeConnB); bridgeConnC = new SpringConstraint(bridgePB, bridgePC, 0.9, true, 10, 0.8); bridgeConnC.setStyle(3, colC, 1, colB); defaultGroup.addConstraint(bridgeConnC); bridgeConnD = new SpringConstraint(bridgePC, bridgePD, 0.9, true, 10, 0.8); bridgeConnD.setStyle(3, colC, 1, colB); defaultGroup.addConstraint(bridgeConnD); bridgeConnE = new SpringConstraint(bridgePD, bridgePDD, 0.9, true, 10, 0.8); bridgeConnE.fixedEndLimit = 0.25; bridgeConnE.setStyle(3, colC, 1, colB); defaultGroup.addConstraint(bridgeConnE); bridgeConnF = new SpringConstraint(bridgePDD, bridgePE, 0.9, true, 10, 0.8); bridgeConnF.fixedEndLimit = 0.25; bridgeConnF.setStyle(3, colC, 1, colB); defaultGroup.addConstraint(bridgeConnF); bridgeConnF2 = new SpringConstraint(bridgePE, bridgePF, 0.9, true, 10, 0.8); bridgeConnF2.fixedEndLimit = 0.25; bridgeConnF2.setStyle(3, colC, 1, colB); defaultGroup.addConstraint(bridgeConnF2); bridgeConnG = new SpringConstraint(bridgePF, c1, 0.9, true, 10, 0.9); bridgeConnG.fixedEndLimit = 0.25; bridgeConnG.setStyle(3, 16040962, 1, 0xFFCC00, 1); defaultGroup.addConstraint(bridgeConnG); bridgeConnH = new SpringConstraint(bridgePF, c2, 0.9, true, 10, 0.9); bridgeConnH.fixedEndLimit = 0.25; bridgeConnH.setStyle(3, colC, 0, colB, 0); defaultGroup.addConstraint(bridgeConnH); bridgeConnG.sprite.name = "y1"; wa.setStyle(3, 3359795, 1, 11189179, 1); wb.setStyle(3, 3359795, 1, 11189179, 1); wc.setStyle(3, 3359795, 1, 11189179, 1); r1.setStyle(3, 3359795, 1, 11189162, 1); cp.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(defaultGroup); cp.addEventListener(CollisionEvent.COLLIDE, check_coll); } function frame12(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl3); resetbut.addEventListener(MouseEvent.CLICK, reset3); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr3); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed3); stage.addEventListener(KeyboardEvent.KEY_UP, key_released3); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level2 = new Group(); level2.collideInternal = true; b3g3 = new CircleParticle(370, 120, 20, true, 2); b3g3.collidable = false; b3g3.setStyle(10, 12058224, 1, 13434777, 1); level2.addParticle(b3g3); b3g2 = new CircleParticle(300, 150, 55, true, 2); b3g2.collidable = false; b3g2.setStyle(30, 12058224, 1, 15125759, 1); level2.addParticle(b3g2); b3g1 = new CircleParticle(250, 300, 100, true, 2); b3g1.collidable = false; b3g1.setStyle(30, 12058224, 1, 13434777, 1); level2.addParticle(b3g1); b3g = new CircleParticle(50, 100, 200, true, 2); b3g.collidable = false; b3g.setStyle(30, 12058224, 1, 13434777, 1); level2.addParticle(b3g); ball = new CircleParticle(100, 10, 15, false, 2); level2.addParticle(ball); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 3 complete"; gameinstructions.text = "what's this? a block?? why don't you try to hit it? "; lv3 = new RectangleParticle(-20, 200, 20, 550, 0, true); level2.addParticle(lv3); lv3.visible = false; wa3 = new WheelParticle(10, 20, 15, false, 2); level2.addParticle(wa3); wb3 = new WheelParticle(50, 20, 15, false, 2); level2.addParticle(wb3); wc3 = new SpringConstraint(wa3, wb3, 0.5, true, 10); level2.addConstraint(wc3); lowfloor = new RectangleParticle(225, 300, 500, 10, 0, true); level2.addParticle(lowfloor); yhit2 = new RectangleParticle(470, 254, 10, 100, 0, true); level2.addParticle(yhit2); yhit2.sprite.name = "y"; yhit2.setStyle(3, 16040962, 1, 0xFFCC00, 1); hang = new CircleParticle(200, 150, 15, true, 2); level2.addParticle(hang); underhang = new CircleParticle(200, 280, 1, false, 2); level2.addParticle(underhang); hanging = new SpringConstraint(hang, underhang, 0.5, true, 10); level2.addConstraint(hanging); wa3.setStyle(3, 3359795, 1, 11189179, 1); wb3.setStyle(3, 3359795, 1, 11189179, 1); wc3.setStyle(3, 3359795, 1, 11189179, 1); lowfloor.setStyle(3, 3359795, 1, 11189162, 1); ball.setStyle(3, 16040962, 1, 0xFFCC00, 1); hang.setStyle(3, 16040962, 0, 0xFFCC00, 0); hanging.setStyle(0, 3368618, 1, 3368618, 1); underhang.setStyle(3, 16040962, 0, 0xFFCC00, 0); APEngine.addGroup(level2); ball.addEventListener(CollisionEvent.COLLIDE, bahit2); } function frame13(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl4); resetbut.addEventListener(MouseEvent.CLICK, reset4); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr4); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed4); stage.addEventListener(KeyboardEvent.KEY_UP, key_released4); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level4 = new Group(); level4.collideInternal = true; b4g4 = new CircleParticle(360, 60, 10, true, 2); b4g4.collidable = false; b4g4.setStyle(10, 12058224, 1, 13434777, 1); level4.addParticle(b4g4); b4g3 = new CircleParticle(340, 80, 20, true, 2); b4g3.collidable = false; b4g3.setStyle(15, 12058224, 1, 15125759, 1); level4.addParticle(b4g3); b4g2 = new CircleParticle(300, 150, 55, true, 2); b4g2.collidable = false; b4g2.setStyle(30, 12058224, 1, 13434777, 1); level4.addParticle(b4g2); b4g1 = new CircleParticle(300, 280, 100, true, 2); b4g1.collidable = false; b4g1.setStyle(30, 12058224, 1, 15125759, 1); level4.addParticle(b4g1); b4g = new CircleParticle(520, 400, 200, true, 2); b4g.collidable = false; b4g.setStyle(30, 12058224, 1, 13434777, 1); level4.addParticle(b4g); ball4 = new CircleParticle(330, 200, 15, false, 2); level4.addParticle(ball4); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 4 complete"; gameinstructions.text = "Yes, it Pivots!"; lv4 = new RectangleParticle(-20, 200, 20, 550, 0, true); level4.addParticle(lv4); lv4.visible = false; wa4 = new WheelParticle(10, 20, 15, false, 2); level4.addParticle(wa4); wb4 = new WheelParticle(50, 20, 15, false, 2); level4.addParticle(wb4); wc4 = new SpringConstraint(wa4, wb4, 0.5, true, 10); level4.addConstraint(wc4); topfloor4 = new RectangleParticle(180, 150, 400, 10, 0, true); level4.addParticle(topfloor4); botfloor4 = new RectangleParticle(180, 300, 300, 10, 0, true); level4.addParticle(botfloor4); yhit4 = new RectangleParticle(35, 225, 10, 150, 0, true); level4.addParticle(yhit4); yhit4.sprite.name = "y"; yhit4.setStyle(3, 16040962, 1, 0xFFCC00, 1); end4 = new CircleParticle(390, 200, 5, true, 2); level4.addParticle(end4); oend4 = new CircleParticle(380, 70, 5, false, 2); level4.addParticle(oend4); connect4 = new SpringConstraint(end4, oend4, 0.5, true, 10); level4.addConstraint(connect4); wa4.setStyle(3, 3359795, 1, 11189179, 1); wb4.setStyle(3, 3359795, 1, 11189179, 1); wc4.setStyle(3, 3359795, 1, 11189179, 1); topfloor4.setStyle(3, 3359795, 1, 11189162, 1); botfloor4.setStyle(3, 3359795, 1, 11189162, 1); end4.setStyle(0, 3368618, 1, 3368618, 1); oend4.setStyle(0, 3368618, 1, 3368618, 1); connect4.setStyle(0, 3368618, 1, 3368618, 1); ball4.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level4); ball4.addEventListener(CollisionEvent.COLLIDE, bahit4); } function frame14(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl5); resetbut.addEventListener(MouseEvent.CLICK, reset5); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr5); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed5); stage.addEventListener(KeyboardEvent.KEY_UP, key_released5); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level5 = new Group(); level5.collideInternal = true; b5g4 = new CircleParticle(250, 200, 200, true, 2); b5g4.collidable = false; b5g4.setStyle(30, 12058224, 1, 13434777, 1); level5.addParticle(b5g4); b5g3 = new CircleParticle(150, 220, 150, true, 2); b5g3.collidable = false; b5g3.setStyle(30, 12058224, 1, 15125759, 1); level5.addParticle(b5g3); b5g2 = new CircleParticle(80, 260, 100, true, 2); b5g2.collidable = false; b5g2.setStyle(30, 12058224, 1, 13434777, 1); level5.addParticle(b5g2); b5g1 = new CircleParticle(40, 300, 65, true, 2); b5g1.collidable = false; b5g1.setStyle(30, 12058224, 1, 15125759, 1); level5.addParticle(b5g1); ball5 = new CircleParticle(330, 100, 15, false, 2); level5.addParticle(ball5); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 5 complete"; gameinstructions.text = "You may have noticed that you can move anything thats blue!"; lv5 = new RectangleParticle(-20, 200, 20, 550, 0, true); level5.addParticle(lv5); lv5.visible = false; wa5 = new WheelParticle(10, 20, 15, false, 2); level5.addParticle(wa5); wb5 = new WheelParticle(50, 20, 15, false, 2); level5.addParticle(wb5); wc5 = new SpringConstraint(wa5, wb5, 0.5, true, 10); level5.addConstraint(wc5); leftfloor5 = new RectangleParticle(100, 205, 200, 10, 0, true); level5.addParticle(leftfloor5); rightfloor5 = new RectangleParticle(400, 205, 200, 10, 0, true); level5.addParticle(rightfloor5); leftbox5 = new RectangleParticle(195, 231.5, 10, 63, 0, true); level5.addParticle(leftbox5); rightbox5 = new RectangleParticle(305, 231.5, 10, 63, 0, true); level5.addParticle(rightbox5); botbox5 = new RectangleParticle(250, 258, 100, 10, 0, true); level5.addParticle(botbox5); boxl5 = new CircleParticle(100, 100, 25, false, 100, 0.3, 0.02); level5.addParticle(boxl5); boxr5 = new CircleParticle(150, 100, 25, false, 100, 0.3, 0.02); level5.addParticle(boxr5); boxm5 = new SpringConstraint(boxl5, boxr5, 0.5, true, 50); level5.addConstraint(boxm5); yhit5 = new RectangleParticle(495, 150, 10, 100, 0, true); level5.addParticle(yhit5); yhit5.sprite.name = "y"; yhit5.setStyle(3, 16040962, 1, 0xFFCC00, 1); wa5.setStyle(3, 3359795, 1, 11189179, 1); wb5.setStyle(3, 3359795, 1, 11189179, 1); wc5.setStyle(3, 3359795, 1, 11189179, 1); leftfloor5.setStyle(3, 3359795, 1, 11189162, 1); rightfloor5.setStyle(3, 3359795, 1, 11189162, 1); leftbox5.setStyle(3, 3359795, 1, 11189162, 1); rightbox5.setStyle(3, 3359795, 1, 11189162, 1); botbox5.setStyle(3, 3359795, 1, 11189162, 1); boxr5.setStyle(0, 3368618, 1, 3368618, 1); boxl5.setStyle(0, 3368618, 1, 3368618, 1); boxm5.setStyle(0, 3368618, 1, 3368618, 1); ball5.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level5); ball5.addEventListener(CollisionEvent.COLLIDE, bahit5); } function frame15(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl6); resetbut.addEventListener(MouseEvent.CLICK, reset6); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr6); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed6); stage.addEventListener(KeyboardEvent.KEY_UP, key_released6); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level6 = new Group(); level6.collideInternal = true; b6g4 = new CircleParticle(360, 60, 10, true, 2); b6g4.collidable = false; b6g4.setStyle(10, 12058224, 1, 13434777, 1); level6.addParticle(b6g4); b6g8 = new CircleParticle(100, 220, 10, true, 2); b6g8.collidable = false; b6g8.setStyle(10, 12058224, 1, 13434777, 1); level6.addParticle(b6g8); b6g3 = new CircleParticle(340, 80, 20, true, 2); b6g3.collidable = false; b6g3.setStyle(15, 12058224, 1, 15125759, 1); level6.addParticle(b6g3); b6g7 = new CircleParticle(120, 200, 20, true, 2); b6g7.collidable = false; b6g7.setStyle(15, 12058224, 1, 15125759, 1); level6.addParticle(b6g7); b6g2 = new CircleParticle(300, 150, 55, true, 2); b6g2.collidable = false; b6g2.setStyle(30, 12058224, 1, 13434777, 1); level6.addParticle(b6g2); b6g6 = new CircleParticle(200, 200, 55, true, 2); b6g6.collidable = false; b6g6.setStyle(30, 12058224, 1, 13434777, 1); level6.addParticle(b6g6); b6g1 = new CircleParticle(300, 280, 100, true, 2); b6g1.collidable = false; b6g1.setStyle(30, 12058224, 1, 15125759, 1); level6.addParticle(b6g1); b6g = new CircleParticle(520, 400, 200, true, 2); b6g.collidable = false; b6g.setStyle(30, 12058224, 1, 13434777, 1); level6.addParticle(b6g); ball6 = new CircleParticle(100, 10, 15, false, 2); level6.addParticle(ball6); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 6 complete"; gameinstructions.text = "Red things are usually bouncy"; lv6 = new RectangleParticle(-20, 200, 20, 550, 0, true); level6.addParticle(lv6); lv6.visible = false; wa6 = new WheelParticle(10, 20, 15, false, 2); level6.addParticle(wa6); wb6 = new WheelParticle(50, 20, 15, false, 2); level6.addParticle(wb6); wc6 = new SpringConstraint(wa6, wb6, 0.5, true, 10); level6.addConstraint(wc6); mainfloor6 = new RectangleParticle(200, 205, 400, 10, 0, true); level6.addParticle(mainfloor6); bouncePad6 = new RectangleParticle(445, 290, 110, 10, 0, true); bouncePad6.setStyle(3, 11600129, 1, 14352898, 1); bouncePad6.elasticity = 2; level6.addParticle(bouncePad6); rightbar6 = new RectangleParticle(495, 195, 10, 200, 0, true); level6.addParticle(rightbar6); leftbar6 = new RectangleParticle(395, 248, 10, 95, 0, true); level6.addParticle(leftbar6); yhit6 = new RectangleParticle(450, 100, 100, 10, 0, true); level6.addParticle(yhit6); yhit6.sprite.name = "y"; yhit6.setStyle(3, 16040962, 1, 0xFFCC00, 1); wa6.setStyle(3, 3359795, 1, 11189179, 1); wb6.setStyle(3, 3359795, 1, 11189179, 1); wc6.setStyle(3, 3359795, 1, 11189179, 1); mainfloor6.setStyle(3, 3359795, 1, 11189162, 1); rightbar6.setStyle(3, 3359795, 1, 11189162, 1); leftbar6.setStyle(3, 3359795, 1, 11189162, 1); ball6.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level6); ball6.addEventListener(CollisionEvent.COLLIDE, bahit6); } function frame19(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl10); resetbut.addEventListener(MouseEvent.CLICK, reset10); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr10); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed10); stage.addEventListener(KeyboardEvent.KEY_UP, key_released10); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level10 = new Group(); level10.collideInternal = true; b10g22 = new CircleParticle(220, 80, 55, true, 2); b10g22.collidable = false; b10g22.setStyle(30, 12058224, 1, 13434777, 1); level10.addParticle(b10g22); b10g12 = new CircleParticle(300, 200, 100, true, 2); b10g12.collidable = false; b10g12.setStyle(30, 12058224, 1, 13434777, 1); level10.addParticle(b10g12); b102g = new CircleParticle(100, 400, 200, true, 2); b102g.collidable = false; b102g.setStyle(30, 12058224, 1, 13434777, 1); level10.addParticle(b102g); ball10 = new CircleParticle(100, -10, 15, false, 2); level10.addParticle(ball10); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 10 complete"; gameinstructions.text = "Not too hard!"; lv10 = new RectangleParticle(-30, 200, 20, 550, 0, true); level10.addParticle(lv10); lv10.visible = false; wa10 = new WheelParticle(10, 20, 15, false, 2); level10.addParticle(wa10); wb10 = new WheelParticle(50, 20, 15, false, 2); level10.addParticle(wb10); wc10 = new SpringConstraint(wa10, wb10, 0.5, true, 10); level10.addConstraint(wc10); colC10 = 3359795; colB10 = 11189162; bx10 = 36; by10 = 200; bsize10 = 40.5; yslope10 = 3.4; particleSize10 = 5; start10 = new RectangleParticle(50, 150, 200, 10, 0, true); level10.addParticle(start10); start10.setStyle(3, colC10, 1, colB10); bx10 = (bx10 + 300); rv10 = new RectangleParticle(570, 200, 20, 550, 0, true); level10.addParticle(rv10); bx10 = (bx10 - 50); yhit10 = new RectangleParticle(450, 100, 100, 10, 0.4, true); level10.addParticle(yhit10); yhit10.sprite.name = "y"; yhit10.setStyle(3, 16040962, 1, 0xFFCC00, 1); bouncePad10 = new RectangleParticle(300, 300, 110, 10, 0, true); bouncePad10.setStyle(3, 11600129, 1, 14352898, 1); bouncePad10.elasticity = 1; level10.addParticle(bouncePad10); wa10.setStyle(3, 3359795, 1, 11189179, 1); wb10.setStyle(3, 3359795, 1, 11189179, 1); wc10.setStyle(3, 3359795, 1, 11189179, 1); ball10.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level10); ball10.addEventListener(CollisionEvent.COLLIDE, bahit10); } public function nextl4s(_arg1:Event):void{ APEngine.removeGroup(level4s); APEngine.container.x = 0; APEngine.container.y = 0; levelcomplete.visible = false; if (mute == false){ if (levelcomplete.visible == false){ SoundMixer.soundTransform = new SoundTransform(0.8, 0); }; }; removeEventListener(Event.ENTER_FRAME, bonusrun4s); mpause = false; go = true; gotoAndStop(34); } public function replaygame(_arg1:MouseEvent):void{ bottime.gotoAndStop(1); minuteTimer.stop(); channel.stop(); minuteTimer.reset(); minuteTimer.removeEventListener(TimerEvent.TIMER, onTick); minuteTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, onTimerComplete); lifebar.gotoAndStop(1); liveslost = 0; oscore = 0; stage.removeEventListener(KeyboardEvent.KEY_DOWN, pausegamespace); failscreen.subhold.gotoAndStop(1); failscreen.subtext.gotoAndStop(1); APEngine.removeGroup(level1); APEngine.removeGroup(level2); APEngine.removeGroup(defaultGroup); APEngine.removeGroup(level4); APEngine.removeGroup(level5); APEngine.removeGroup(level6); APEngine.removeGroup(level7); APEngine.removeGroup(level8); APEngine.removeGroup(level9); APEngine.removeGroup(level10); APEngine.removeGroup(level11); APEngine.removeGroup(level12); APEngine.removeGroup(level13); APEngine.removeGroup(level14); APEngine.removeGroup(level15); APEngine.removeGroup(level16); APEngine.removeGroup(level17); APEngine.removeGroup(level18); APEngine.removeGroup(level19); APEngine.removeGroup(level20); failscreen.visible = false; mpause = true; go = true; gotoAndStop(5); } function frame17(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl8b); resetbut.addEventListener(MouseEvent.CLICK, reset8b); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr8); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed8b); stage.addEventListener(KeyboardEvent.KEY_UP, key_released8b); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level8b = new Group(); level8b.collideInternal = true; b8g2 = new CircleParticle(400, 100, 55, true, 2); b8g2.collidable = false; b8g2.setStyle(30, 12058224, 1, 13434777, 1); level8b.addParticle(b8g2); b8g1 = new CircleParticle(300, 200, 100, true, 2); b8g1.collidable = false; b8g1.setStyle(30, 12058224, 1, 13434777, 1); level8b.addParticle(b8g1); b8g = new CircleParticle(100, 400, 200, true, 2); b8g.collidable = false; b8g.setStyle(30, 12058224, 1, 13434777, 1); level8b.addParticle(b8g); ball8b = new CircleParticle(410, 230, 15, false, 4); level8b.addParticle(ball8b); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 8 complete"; gameinstructions.text = "Its like a seesaw, only bouncier!"; lv8b = new RectangleParticle(-30, 200, 20, 550, 0, true); level8b.addParticle(lv8b); lv8b.visible = false; wa8b = new WheelParticle(10, 20, 15, false, 2); level8b.addParticle(wa8b); wb8b = new WheelParticle(50, 20, 15, false, 2); level8b.addParticle(wb8b); wc8b = new SpringConstraint(wa8b, wb8b, 0.5, true, 10); level8b.addConstraint(wc8b); colC8b = 3359795; colB8b = 11189162; bx8b = 36; by8b = 100; bsize8b = 40.5; yslope8b = 3.4; particleSize8b = 5; start8b = new RectangleParticle(bx8b, by8b, 100, 10, 0, true); level8b.addParticle(start8b); start8b.setStyle(3, colC8b, 1, colB8b); bx8b = (bx8b + 50); end8b = new RectangleParticle(bx8b, by8b, 200, 10, 0, true); level8b.addParticle(end8b); end8b.setStyle(3, colC8b, 1, colB8b); bx8b = (bx8b - 100); bx8b = (bx8b + 120); by8b = (by8b + 200); rv8b = new RectangleParticle(570, 200, 20, 550, 0, true); level8b.addParticle(rv8b); bot8b = new RectangleParticle(225, 300, 700, 10, 0, true); level8b.addParticle(bot8b); bot8b.setStyle(3, colC8b, 1, colB8b); stop8b = new RectangleParticle(470, 270, 50, 50, 0, true); level8b.addParticle(stop8b); stop8b.setStyle(3, colC8b, 1, colB8b); secc8b = new CircleParticle(360, 274, 10, true, 2); level8b.addParticle(secc8b); secc8b.setStyle(3, colC8b, 1, colB8b); seel8b = new CircleParticle(230, 244, 5, false, 2); level8b.addParticle(seel8b); seel8b.setStyle(0, 3368618, 1, 3368618, 1); seer8b = new CircleParticle(430, 244, 5, false, 2); level8b.addParticle(seer8b); seer8b.setStyle(0, 3368618, 1, 3368618, 1); seesaw8b = new SpringConstraint(seel8b, seer8b, 1, true, 10); level8b.addConstraint(seesaw8b); seesaw8b.setStyle(0, 3368618, 1, 3368618, 1); mk = new SpringConstraint(seel8b, secc8b, 1, true, 10); level8b.addConstraint(mk); mk.setStyle(0, 3368618, 1, 3368618, 1); lm = new SpringConstraint(secc8b, seer8b, 1, true, 10); level8b.addConstraint(lm); lm.setStyle(0, 3368618, 1, 3368618, 1); yhit8b = new RectangleParticle(544, 250, 10, 100, 3.14, true); level8b.addParticle(yhit8b); yhit8b.sprite.name = "y"; yhit8b.setStyle(3, 16040962, 1, 0xFFCC00, 1); wa8b.setStyle(3, 3359795, 1, 11189179, 1); wb8b.setStyle(3, 3359795, 1, 11189179, 1); wc8b.setStyle(3, 3359795, 1, 11189179, 1); ball8b.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level8b); ball8b.addEventListener(CollisionEvent.COLLIDE, bahit8b); } function frame18(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl9); resetbut.addEventListener(MouseEvent.CLICK, reset9); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr9); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed9); stage.addEventListener(KeyboardEvent.KEY_UP, key_released9); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level9 = new Group(); level9.collideInternal = true; b9g4 = new CircleParticle(550, 300, 200, true, 2); b9g4.collidable = false; b9g4.setStyle(30, 12058224, 1, 13434777, 1); level9.addParticle(b9g4); b9g3 = new CircleParticle(350, 100, 150, true, 2); b9g3.collidable = false; b9g3.setStyle(30, 12058224, 1, 15125759, 1); level9.addParticle(b9g3); b9g2 = new CircleParticle(200, 50, 100, true, 2); b9g2.collidable = false; b9g2.setStyle(30, 12058224, 1, 13434777, 1); level9.addParticle(b9g2); b9g1 = new CircleParticle(100, -50, 65, true, 2); b9g1.collidable = false; b9g1.setStyle(30, 12058224, 1, 15125759, 1); level9.addParticle(b9g1); ball9 = new CircleParticle(100, 150, 15, false, 2); level9.addParticle(ball9); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 9 complete"; gameinstructions.text = "Its all about timing!"; lv9 = new RectangleParticle(-30, 200, 20, 550, 0, true); level9.addParticle(lv9); lv9.visible = false; wa9 = new WheelParticle(10, 200, 15, false, 2); level9.addParticle(wa9); wb9 = new WheelParticle(50, 200, 15, false, 2); level9.addParticle(wb9); wc9 = new SpringConstraint(wa9, wb9, 0.5, true, 10); level9.addConstraint(wc9); colC9 = 3359795; colB9 = 11189162; bx9 = 36; by9 = 300; bsize9 = 40.5; yslope9 = 3.4; particleSize9 = 5; start9 = new RectangleParticle(bx9, 250, 380, 10, 0, true); level9.addParticle(start9); start9.setStyle(3, colC9, 1, colB9); bx9 = (bx9 + 50); bx9 = (bx9 + 120); by9 = (by9 + 200); bx9 = (bx9 - 50); yhit9 = new RectangleParticle(200, 300, 10, 80, 2.6, true); level9.addParticle(yhit9); yhit9.sprite.name = "y"; yhit9.setStyle(3, 16040962, 1, 0xFFCC00, 1); tophold9 = new CircleParticle(400, 50, 5, true, 2); level9.addParticle(tophold9); tophold9.setStyle(0, 3368618, 1, 3368618, 1); botswing9 = new CircleParticle(410, -150, 40, false, 20); level9.addParticle(botswing9); botswing9.setStyle(0, 3368618, 1, 3368618, 1); hammer9 = new SpringConstraint(tophold9, botswing9, 0.5, true, 10); level9.addConstraint(hammer9); hammer9.setStyle(0, 3368618, 1, 3368618, 1); wa9.setStyle(3, 3359795, 1, 11189179, 1); wb9.setStyle(3, 3359795, 1, 11189179, 1); wc9.setStyle(3, 3359795, 1, 11189179, 1); ball9.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level9); ball9.addEventListener(CollisionEvent.COLLIDE, bahit9); } function frame23(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl14); resetbut.addEventListener(MouseEvent.CLICK, reset14); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr14); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed14); stage.addEventListener(KeyboardEvent.KEY_UP, key_released14); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level14 = new Group(); level14.collideInternal = true; b14g22 = new CircleParticle(300, 350, 55, true, 2); b14g22.collidable = false; b14g22.setStyle(30, 12058224, 1, 13434777, 1); level14.addParticle(b14g22); b14g12 = new CircleParticle(200, 300, 100, true, 2); b14g12.collidable = false; b14g12.setStyle(30, 12058224, 1, 13434777, 1); level14.addParticle(b14g12); b142g = new CircleParticle(40, 200, 200, true, 2); b142g.collidable = false; b142g.setStyle(30, 12058224, 1, 13434777, 1); level14.addParticle(b142g); ball14 = new CircleParticle(50, -10, 15, false, 2); level14.addParticle(ball14); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 14 complete"; gameinstructions.text = "It's locked, unlock it"; lv14 = new RectangleParticle(-30, 200, 20, 550, 0, true); level14.addParticle(lv14); lv14.visible = false; wa14 = new WheelParticle(10, 20, 15, false, 2); level14.addParticle(wa14); wb14 = new WheelParticle(50, 20, 15, false, 2); level14.addParticle(wb14); wc14 = new SpringConstraint(wa14, wb14, 0.5, true, 10); level14.addConstraint(wc14); colC14 = 3359795; colB14 = 11189162; bx14 = 36; by14 = 200; bsize14 = 40.5; yslope14 = 3.4; particleSize14 = 5; start14 = new RectangleParticle(50, 205, 300, 10, 0, true); level14.addParticle(start14); start14.setStyle(3, colC14, 1, colB14); lt14 = new RectangleParticle(500, 205, 400, 10, 0, true); level14.addParticle(lt14); lt14.setStyle(3, colC14, 1, colB14); trig14 = new RectangleParticle(543, 150, 10, 100, 0, true); trig14.sprite.name = "trig"; level14.addParticle(trig14); trig14.setStyle(3, 7537379, 1, 5505449); rv14 = new RectangleParticle(570, 200, 20, 550, 0, true); level14.addParticle(rv14); bx14 = (bx14 - 50); yhit14 = new RectangleParticle(250, 75, 100, 10, 0, true); level14.addParticle(yhit14); yhit14.sprite.name = "y"; yhit14.setStyle(3, 16040962, 1, 0xFFCC00, 1); bouncePad14 = new RectangleParticle(250, 295, 100, 10, 0, true); bouncePad14.setStyle(3, 11600129, 1, 14352898, 1); bouncePad14.elasticity = 1.5; level14.addParticle(bouncePad14); boxl14 = new RectangleParticle(200, 250, 10, 100, 0, true); boxl14.setStyle(3, colC14, 1, colB14); level14.addParticle(boxl14); boxr14 = new RectangleParticle(300, 250, 10, 100, 0, true); boxr14.setStyle(3, colC14, 1, colB14); level14.addParticle(boxr14); boxt14 = new RectangleParticle(275, 205, 600, 10, 0, true); boxt14.setStyle(3, colC14, 1, colB14); level14.addParticle(boxt14); wa14.setStyle(3, 3359795, 1, 11189179, 1); wb14.setStyle(3, 3359795, 1, 11189179, 1); wc14.setStyle(3, 3359795, 1, 11189179, 1); ball14.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level14); ball14.addEventListener(CollisionEvent.COLLIDE, bahit14); wa14.addEventListener(CollisionEvent.COLLIDE, trigfunk14); wb14.addEventListener(CollisionEvent.COLLIDE, trigfunk14); } function frame24(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl15); resetbut.addEventListener(MouseEvent.CLICK, reset15); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr15); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed15); stage.addEventListener(KeyboardEvent.KEY_UP, key_released15); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level15 = new Group(); level15.collideInternal = true; b15g22 = new CircleParticle(220, 80, 55, true, 2); b15g22.collidable = false; b15g22.setStyle(30, 12058224, 1, 13434777, 1); level15.addParticle(b15g22); b15g12 = new CircleParticle(270, 170, 100, true, 2); b15g12.collidable = false; b15g12.setStyle(30, 12058224, 1, 13434777, 1); level15.addParticle(b15g12); b15g15 = new CircleParticle(100, 400, 200, true, 2); b15g15.collidable = false; b15g15.setStyle(30, 12058224, 1, 13434777, 1); level15.addParticle(b15g15); ball15 = new CircleParticle(100, -10, 15, false, 2); level15.addParticle(ball15); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 16 complete"; gameinstructions.text = "if at first you don't succeed...."; lv15 = new RectangleParticle(-30, 200, 20, 550, 0, true); level15.addParticle(lv15); lv15.visible = false; wa15 = new WheelParticle(15, 20, 15, false, 2); level15.addParticle(wa15); wb15 = new WheelParticle(50, 20, 15, false, 2); level15.addParticle(wb15); wc15 = new SpringConstraint(wa15, wb15, 0.5, true, 10); level15.addConstraint(wc15); colC15 = 3359795; colB15 = 11189162; bx15 = 36; by15 = 200; bsize15 = 40.5; yslope15 = 3.4; particleSize15 = 5; start15 = new RectangleParticle(50, 50, 100, 10, 0, true); level15.addParticle(start15); start15.setStyle(3, colC15, 1, colB15); lpira15 = new RectangleParticle(340, 180, 300, 10, 2.35, true); level15.addParticle(lpira15); lpira15.setStyle(3, colC15, 1, colB15); bouncePad15 = new RectangleParticle(175, 300, 200, 10, -2.35, true); bouncePad15.setStyle(3, 11600129, 1, 14352898, 1); bouncePad15.elasticity = 1.2; level15.addParticle(bouncePad15); bot15 = new RectangleParticle(360, 330, 300, 10, 0, true); level15.addParticle(bot15); bot15.setStyle(3, colC15, 1, colB15); rs15 = new RectangleParticle(500, 20, 10, 400, 2, true); level15.addParticle(rs15); rs15.setStyle(3, colC15, 1, colB15); re15 = new RectangleParticle(525, 200, 10, 400, 0.3, true); level15.addParticle(re15); re15.setStyle(3, colC15, 1, colB15); yhit15 = new RectangleParticle(424, 175, 120, 10, -2.35, true); level15.addParticle(yhit15); yhit15.sprite.name = "y"; yhit15.setStyle(3, 16040962, 1, 0xFFCC00, 1); wa15.setStyle(3, 3359795, 1, 11189179, 1); wb15.setStyle(3, 3359795, 1, 11189179, 1); wc15.setStyle(3, 3359795, 1, 11189179, 1); ball15.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level15); ball15.addEventListener(CollisionEvent.COLLIDE, bahit15); } function frame26(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl17); resetbut.addEventListener(MouseEvent.CLICK, reset17); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr17); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed17); stage.addEventListener(KeyboardEvent.KEY_UP, key_released17); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); APEngine.addForce(new VectorForce(true, 2, 0)); level17 = new Group(); level17.collideInternal = true; b17g22 = new CircleParticle(220, 80, 55, true, 2); b17g22.collidable = false; b17g22.setStyle(30, 12058224, 1, 13434777, 1); level17.addParticle(b17g22); b17g12 = new CircleParticle(300, 200, 100, true, 2); b17g12.collidable = false; b17g12.setStyle(30, 12058224, 1, 13434777, 1); level17.addParticle(b17g12); b17g = new CircleParticle(100, 400, 200, true, 2); b17g.collidable = false; b17g.setStyle(30, 12058224, 1, 13434777, 1); level17.addParticle(b17g); ball17 = new CircleParticle(100, -10, 15, false, 2); level17.addParticle(ball17); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 17 complete"; gameinstructions.text = "its very windy"; lv17 = new RectangleParticle(-20, 200, 20, 550, 0, true); level17.addParticle(lv17); lv17.visible = false; wa17 = new WheelParticle(10, 20, 15, false, 2); level17.addParticle(wa17); wb17 = new WheelParticle(50, 20, 15, false, 2); level17.addParticle(wb17); wc17 = new SpringConstraint(wa17, wb17, 0.5, true, 10); level17.addConstraint(wc17); colC17 = 3359795; colB17 = 11189162; bx17 = 36; by17 = 200; bsize17 = 40.5; yslope17 = 3.4; particleSize17 = 5; bluecol17 = 3368618; starter17 = new RectangleParticle(285, 305, 35, 10, -0.785, true); level17.addParticle(starter17); starter17.setStyle(3, colC17, 1, colB17); start17 = new RectangleParticle(150, 320, 300, 10, 0, true); level17.addParticle(start17); start17.setStyle(3, colC17, 1, colB17); under17 = new RectangleParticle(425, 100, 260, 10, 0, true); level17.addParticle(under17); under17.setStyle(3, colC17, 1, colB17); vert17 = new RectangleParticle(300, 210, 10, 230, 0, true); level17.addParticle(vert17); vert17.setStyle(3, colC17, 1, colB17); rv17 = new RectangleParticle(570, 200, 20, 550, 0, true); level17.addParticle(rv17); rv17.visible = false; yhit17 = new RectangleParticle(540, 50, 10, 100, 0, true); level17.addParticle(yhit17); yhit17.sprite.name = "y"; yhit17.setStyle(3, 16040962, 1, 0xFFCC00, 1); wa17.setStyle(3, 3359795, 1, 11189179, 1); wb17.setStyle(3, 3359795, 1, 11189179, 1); wc17.setStyle(3, 3359795, 1, 11189179, 1); ball17.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level17); ball17.addEventListener(CollisionEvent.COLLIDE, bahit17); } function frame21(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl12); resetbut.addEventListener(MouseEvent.CLICK, reset12); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr12); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed12); stage.addEventListener(KeyboardEvent.KEY_UP, key_released12); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level12 = new Group(); level12.collideInternal = true; b12g22 = new CircleParticle(170, 110, 55, true, 2); b12g22.collidable = false; b12g22.setStyle(30, 12058224, 1, 13434777, 1); level12.addParticle(b12g22); b12g12 = new CircleParticle(200, 200, 100, true, 2); b12g12.collidable = false; b12g12.setStyle(30, 12058224, 1, 13434777, 1); level12.addParticle(b12g12); b122g = new CircleParticle(250, 400, 200, true, 2); b122g.collidable = false; b122g.setStyle(30, 12058224, 1, 13434777, 1); level12.addParticle(b122g); ball12 = new CircleParticle(450, -10, 15, false, 2); level12.addParticle(ball12); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 12 complete"; gameinstructions.text = "What could a purple block possibly do?"; lv12 = new RectangleParticle(-30, 200, 20, 550, 0, true); level12.addParticle(lv12); lv12.visible = false; wa12 = new WheelParticle(10, 20, 15, false, 2); level12.addParticle(wa12); wb12 = new WheelParticle(50, 20, 15, false, 2); level12.addParticle(wb12); wc12 = new SpringConstraint(wa12, wb12, 0.5, true, 10); level12.addConstraint(wc12); colC12 = 3359795; colB12 = 11189162; bx12 = 36; by12 = 200; bsize12 = 40.5; yslope12 = 3.4; particleSize12 = 5; start12 = new RectangleParticle(50, 150, 200, 10, 0, true); level12.addParticle(start12); start12.setStyle(3, colC12, 1, colB12); bx12 = (bx12 + 300); rv12 = new RectangleParticle(570, 200, 20, 550, 0, true); level12.addParticle(rv12); bx12 = (bx12 - 50); trig12 = new RectangleParticle(543, 250, 10, 100, 0, true); trig12.sprite.name = "trig"; level12.addParticle(trig12); trig12.setStyle(3, 7537379, 1, 5505449); floor12 = new RectangleParticle(275, 300, 550, 10, 0, true); level12.addParticle(floor12); floor12.setStyle(3, colC12, 1, colB12); yhit12 = new RectangleParticle(50, 250, 10, 100, 0, true); level12.addParticle(yhit12); yhit12.sprite.name = "y"; yhit12.setStyle(3, 16040962, 1, 0xFFCC00, 1); boxl12 = new RectangleParticle(500, 50, 10, 100, 0, true); level12.addParticle(boxl12); boxl12.setStyle(3, colC12, 1, colB12); boxr12 = new RectangleParticle(400, 50, 10, 100, 0, true); level12.addParticle(boxr12); boxr12.setStyle(3, colC12, 1, colB12); boxb12 = new RectangleParticle(450, 100, 110, 10, 0, true); level12.addParticle(boxb12); boxb12.setStyle(3, 7537379, 1, 5505449); wa12.setStyle(3, 3359795, 1, 11189179, 1); wb12.setStyle(3, 3359795, 1, 11189179, 1); wc12.setStyle(3, 3359795, 1, 11189179, 1); ball12.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level12); ball12.addEventListener(CollisionEvent.COLLIDE, bahit12); wa12.addEventListener(CollisionEvent.COLLIDE, trigfunk12); wb12.addEventListener(CollisionEvent.COLLIDE, trigfunk12); } function frame16(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl7); resetbut.addEventListener(MouseEvent.CLICK, reset7); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr7); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed7); stage.addEventListener(KeyboardEvent.KEY_UP, key_released7); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level7 = new Group(); level7.collideInternal = true; b7g2 = new CircleParticle(420, 280, 55, true, 2); b7g2.collidable = false; b7g2.setStyle(30, 12058224, 1, 13434777, 1); level7.addParticle(b7g2); b7g1 = new CircleParticle(300, 200, 100, true, 2); b7g1.collidable = false; b7g1.setStyle(30, 12058224, 1, 13434777, 1); level7.addParticle(b7g1); b7g = new CircleParticle(500, 100, 200, true, 2); b7g.collidable = false; b7g.setStyle(30, 12058224, 1, 13434777, 1); level7.addParticle(b7g); ball7 = new CircleParticle(100, 10, 15, false, 2); level7.addParticle(ball7); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 7 complete"; gameinstructions.text = "Well thats the end of the easy levels!"; lv7 = new RectangleParticle(-20, 200, 20, 550, 0, true); level7.addParticle(lv7); lv7.visible = false; wa7 = new WheelParticle(10, 20, 15, false, 2); level7.addParticle(wa7); wb7 = new WheelParticle(50, 20, 15, false, 2); level7.addParticle(wb7); wc7 = new SpringConstraint(wa7, wb7, 0.5, true, 10); level7.addConstraint(wc7); colC7 = 3359795; colB7 = 11189162; bx7 = 100; by7 = 120; bsize7 = 40.5; yslope7 = 3.4; particleSize7 = 5; start7 = new RectangleParticle(50, by7, 100, 10, 0, true); level7.addParticle(start7); start7.setStyle(3, colC7, 1, colB7); bridgePAA7 = new CircleParticle(bx7, by7, particleSize7, true); bridgePAA7.setStyle(3, colC7, 1, colB7); level7.addParticle(bridgePAA7); bx7 = (bx7 + bsize7); by7 = (by7 + yslope7); bridgePA7 = new CircleParticle(bx7, by7, particleSize7); bridgePA7.setStyle(3, colC7, 1, colB7); level7.addParticle(bridgePA7); bx7 = (bx7 + bsize7); by7 = (by7 + yslope7); bridgePB7 = new CircleParticle(bx7, by7, particleSize7); bridgePB7.setStyle(3, colC7, 1, colB7); level7.addParticle(bridgePB7); bx7 = (bx7 + bsize7); by7 = (by7 + yslope7); bridgePC7 = new CircleParticle(bx7, by7, particleSize7); bridgePC7.setStyle(3, colC7, 1, colB7); level7.addParticle(bridgePC7); bx7 = (bx7 + bsize7); by7 = (by7 + yslope7); bridgePD7 = new CircleParticle(bx7, by7, particleSize7); bridgePD7.setStyle(3, colC7, 1, colB7); level7.addParticle(bridgePD7); bx7 = (bx7 + bsize7); by7 = (by7 + yslope7); bridgePDD7 = new CircleParticle(bx7, by7, particleSize7); bridgePDD7.setStyle(3, colC7, 1, colB7); level7.addParticle(bridgePDD7); bx7 = (bx7 + bsize7); by7 = (by7 + yslope7); bridgePE7 = new CircleParticle(bx7, by7, particleSize7, false); bridgePE7.setStyle(3, colC7, 1, colB7); level7.addParticle(bridgePE7); bx7 = (bx7 + bsize7); by7 = (by7 + yslope7); bridgePF7 = new CircleParticle(bx7, by7, particleSize7, true); bridgePF7.setStyle(3, colC7, 1, colB7); level7.addParticle(bridgePF7); bx7 = (bx7 + 100); by7 = (by7 + 75); bota7 = new CircleParticle(bx7, by7, particleSize7, true); bota7.setStyle(3, colC7, 1, colB7); level7.addParticle(bota7); bx7 = (bx7 - bsize7); by7 = (by7 + yslope7); botb7 = new CircleParticle(bx7, by7, particleSize7, false); botb7.setStyle(3, colC7, 1, colB7); level7.addParticle(botb7); bx7 = (bx7 - bsize7); by7 = (by7 + yslope7); botc7 = new CircleParticle(bx7, by7, particleSize7, false); botc7.setStyle(3, colC7, 1, colB7); level7.addParticle(botc7); bx7 = (bx7 - bsize7); by7 = (by7 + yslope7); botd7 = new CircleParticle(bx7, by7, particleSize7, false); botd7.setStyle(3, colC7, 1, colB7); level7.addParticle(botd7); bx7 = (bx7 - bsize7); by7 = (by7 + yslope7); bote7 = new CircleParticle(bx7, by7, particleSize7, false); bote7.setStyle(3, colC7, 1, colB7); level7.addParticle(bote7); bx7 = (bx7 - bsize7); by7 = (by7 + yslope7); botf7 = new CircleParticle(bx7, by7, particleSize7, false); botf7.setStyle(3, colC7, 1, colB7); level7.addParticle(botf7); bx7 = (bx7 - bsize7); by7 = (by7 + yslope7); botg7 = new CircleParticle(bx7, by7, particleSize7, false); botg7.setStyle(3, colC7, 1, colB7); level7.addParticle(botg7); bx7 = (bx7 - bsize7); by7 = (by7 + yslope7); both7 = new CircleParticle(bx7, by7, particleSize7, false); both7.setStyle(3, colC7, 1, colB7); level7.addParticle(both7); bx7 = (bx7 - bsize7); by7 = (by7 + yslope7); boti7 = new CircleParticle(bx7, by7, particleSize7, false); boti7.setStyle(3, colC7, 1, colB7); level7.addParticle(boti7); bx7 = (bx7 - bsize7); by7 = (by7 + yslope7); botj7 = new CircleParticle(bx7, by7, particleSize7, false); botj7.setStyle(3, colC7, 1, colB7); level7.addParticle(botj7); bx7 = (bx7 - bsize7); bx7 = (bx7 - 50); by7 = (by7 + yslope7); end7 = new RectangleParticle(bx7, by7, 100, 10, 0, true); level7.addParticle(end7); end7.setStyle(3, colC7, 1, colB7); bx7 = (bx7 + 50); botk7 = new CircleParticle(bx7, by7, particleSize7, true); botk7.setStyle(3, colC7, 1, colB7); level7.addParticle(botk7); bridgeConnA7 = new SpringConstraint(bridgePAA7, bridgePA7, 0.9, true, 10, 0.8); bridgeConnA7.fixedEndLimit = 0.15; bridgeConnA7.setStyle(3, colC7, 1, colB7); level7.addConstraint(bridgeConnA7); bridgeConnB7 = new SpringConstraint(bridgePA7, bridgePB7, 0.9, true, 10, 0.8); bridgeConnB7.setStyle(3, colC7, 1, colB7); level7.addConstraint(bridgeConnB7); bridgeConnC7 = new SpringConstraint(bridgePB7, bridgePC7, 0.9, true, 10, 0.8); bridgeConnC7.setStyle(3, colC7, 1, colB7); level7.addConstraint(bridgeConnC7); bridgeConnD7 = new SpringConstraint(bridgePC7, bridgePD7, 0.9, true, 10, 0.8); bridgeConnD7.setStyle(3, colC7, 1, colB7); level7.addConstraint(bridgeConnD7); bridgeConnE7 = new SpringConstraint(bridgePD7, bridgePDD7, 0.9, true, 10, 0.8); bridgeConnE7.fixedEndLimit = 0.25; bridgeConnE7.setStyle(3, colC7, 1, colB7); level7.addConstraint(bridgeConnE7); bridgeConnF7 = new SpringConstraint(bridgePDD7, bridgePE7, 0.9, true, 10, 0.8); bridgeConnF7.fixedEndLimit = 0.25; bridgeConnF7.setStyle(3, colC7, 1, colB7); level7.addConstraint(bridgeConnF7); bridgeConnF27 = new SpringConstraint(bridgePE7, bridgePF7, 0.9, true, 10, 0.8); bridgeConnF27.fixedEndLimit = 0.25; bridgeConnF27.setStyle(3, colC7, 1, colB7); level7.addConstraint(bridgeConnF27); botbridgea7 = new SpringConstraint(bota7, botb7, 0.9, true, 10, 0.8); botbridgea7.fixedEndLimit = 0.25; botbridgea7.setStyle(3, colC7, 1, colB7); level7.addConstraint(botbridgea7); botbridgeb7 = new SpringConstraint(botb7, botc7, 0.9, true, 10, 0.8); botbridgeb7.fixedEndLimit = 0.25; botbridgeb7.setStyle(3, colC7, 1, colB7); level7.addConstraint(botbridgeb7); botbridgec7 = new SpringConstraint(botc7, botd7, 0.9, true, 10, 0.8); botbridgec7.fixedEndLimit = 0.25; botbridgec7.setStyle(3, colC7, 1, colB7); level7.addConstraint(botbridgec7); botbridged7 = new SpringConstraint(botd7, bote7, 0.9, true, 10, 0.8); botbridged7.fixedEndLimit = 0.25; botbridged7.setStyle(3, colC7, 1, colB7); level7.addConstraint(botbridged7); botbridgee7 = new SpringConstraint(bote7, botf7, 0.9, true, 10, 0.8); botbridgee7.fixedEndLimit = 0.25; botbridgee7.setStyle(3, colC7, 1, colB7); level7.addConstraint(botbridgee7); botbridgef7 = new SpringConstraint(botf7, botg7, 0.9, true, 10, 0.8); botbridgef7.fixedEndLimit = 0.25; botbridgef7.setStyle(3, colC7, 1, colB7); level7.addConstraint(botbridgef7); botbridgeg7 = new SpringConstraint(botg7, both7, 0.9, true, 10, 0.8); botbridgeg7.fixedEndLimit = 0.25; botbridgeg7.setStyle(3, colC7, 1, colB7); level7.addConstraint(botbridgeg7); botbridgeh7 = new SpringConstraint(both7, boti7, 0.9, true, 10, 0.8); botbridgeh7.fixedEndLimit = 0.25; botbridgeh7.setStyle(3, colC7, 1, colB7); level7.addConstraint(botbridgeh7); botbridgei7 = new SpringConstraint(boti7, botj7, 0.9, true, 10, 0.8); botbridgei7.fixedEndLimit = 0.25; botbridgei7.setStyle(3, colC7, 1, colB7); level7.addConstraint(botbridgei7); botbridgej7 = new SpringConstraint(botj7, botk7, 0.9, true, 10, 0.8); botbridgej7.fixedEndLimit = 0.25; botbridgej7.setStyle(3, colC7, 1, colB7); level7.addConstraint(botbridgej7); bx7 = (bx7 - 72); by7 = (by7 - 62); yhit7 = new RectangleParticle(bx7, by7, 10, 124, 0, true); level7.addParticle(yhit7); yhit7.sprite.name = "y"; yhit7.setStyle(3, 16040962, 1, 0xFFCC00, 1); wa7.setStyle(3, 3359795, 1, 11189179, 1); wb7.setStyle(3, 3359795, 1, 11189179, 1); wc7.setStyle(3, 3359795, 1, 11189179, 1); ball7.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level7); ball7.addEventListener(CollisionEvent.COLLIDE, bahit7); ball7.addEventListener(CollisionEvent.COLLIDE, telleport7); } public function nextl5s(_arg1:Event):void{ APEngine.removeGroup(level5s); removeEventListener(Event.ENTER_FRAME, bonusrun5s); levelcomplete.visible = false; if (mute == false){ if (levelcomplete.visible == false){ SoundMixer.soundTransform = new SoundTransform(0.8, 0); }; }; removeEventListener(Event.ENTER_FRAME, bonusrun5s); mpause = false; go = true; channel.stop(); levelcomplete.nextlev.removeEventListener(MouseEvent.CLICK, nextlw); stage.removeEventListener(KeyboardEvent.KEY_DOWN, pausegamespace); gotoAndStop(5); } function frame25(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl16); resetbut.addEventListener(MouseEvent.CLICK, reset16); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr16); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed16); stage.addEventListener(KeyboardEvent.KEY_UP, key_released16); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level16 = new Group(); level16.collideInternal = true; b16g4 = new CircleParticle(550, 300, 200, true, 2); b16g4.collidable = false; b16g4.setStyle(30, 12058224, 1, 13434777, 1); level16.addParticle(b16g4); b16g3 = new CircleParticle(350, 100, 150, true, 2); b16g3.collidable = false; b16g3.setStyle(30, 12058224, 1, 15125759, 1); level16.addParticle(b16g3); b16g2 = new CircleParticle(200, 50, 100, true, 2); b16g2.collidable = false; b16g2.setStyle(30, 12058224, 1, 13434777, 1); level16.addParticle(b16g2); b16g1 = new CircleParticle(100, -50, 65, true, 2); b16g1.collidable = false; b16g1.setStyle(30, 12058224, 1, 15125759, 1); level16.addParticle(b16g1); ball16 = new CircleParticle(100, -10, 15, false, 2); level16.addParticle(ball16); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 16 complete"; gameinstructions.text = "use just enough power"; lv16 = new RectangleParticle(-30, 200, 20, 550, 0, true); level16.addParticle(lv16); lv16.visible = false; wa16 = new WheelParticle(10, 20, 15, false, 2); level16.addParticle(wa16); wb16 = new WheelParticle(50, 20, 15, false, 2); level16.addParticle(wb16); wc16 = new SpringConstraint(wa16, wb16, 0.5, true, 10); level16.addConstraint(wc16); colC16 = 3359795; colB16 = 11189162; bx16 = 36; by16 = 200; bsize16 = 40.5; yslope16 = 3.4; particleSize16 = 5; bluecol = 3368618; start16 = new RectangleParticle(150, 100, 300, 10, 0, true); level16.addParticle(start16); start16.setStyle(3, colC16, 1, colB16); under16 = new RectangleParticle(400, 150, 370, 10, 0, true); level16.addParticle(under16); under16.setStyle(3, colC16, 1, colB16); rv16 = new RectangleParticle(570, 200, 20, 550, 0, true); level16.addParticle(rv16); bx16 = (bx16 - 50); yhit16 = new RectangleParticle(250, 320, 100, 10, 0, true); level16.addParticle(yhit16); yhit16.sprite.name = "y"; yhit16.setStyle(3, 16040962, 1, 0xFFCC00, 1); wa16.setStyle(3, 3359795, 1, 11189179, 1); wb16.setStyle(3, 3359795, 1, 11189179, 1); wc16.setStyle(3, 3359795, 1, 11189179, 1); ball16.setStyle(3, 16040962, 1, 0xFFCC00, 1); swingDoorP1l = new CircleParticle(150, 150, 7); swingDoorP1l.mass = 0.001; swingDoorP1l.setStyle(3, bluecol, 1, bluecol); level16.addParticle(swingDoorP1l); swingDoorP2l = new CircleParticle(200, 150, 7, true); swingDoorP2l.setStyle(3, bluecol, 1, bluecol); level16.addParticle(swingDoorP2l); swingDoorl = new SpringConstraint(swingDoorP1l, swingDoorP2l, 1, true, 13); swingDoorl.setStyle(3, bluecol, 1, bluecol); level16.addConstraint(swingDoorl); swingDoorAnchorl = new CircleParticle(150, 100, 2, true); swingDoorAnchorl.visible = false; swingDoorAnchorl.collidable = false; level16.addParticle(swingDoorAnchorl); swingDoorSpringl = new SpringConstraint(swingDoorP1l, swingDoorAnchorl, 0.02); swingDoorSpringl.restLength = 40; swingDoorSpringl.visible = false; level16.addConstraint(swingDoorSpringl); swingDoorP1 = new CircleParticle(100, 200, 7, true); swingDoorP1.mass = 0.001; swingDoorP1.setStyle(3, bluecol, 1, bluecol); level16.addParticle(swingDoorP1); swingDoorP2 = new CircleParticle(220, 200, 7); swingDoorP2.setStyle(3, bluecol, 1, bluecol); level16.addParticle(swingDoorP2); swingDoor = new SpringConstraint(swingDoorP1, swingDoorP2, 1, true, 13); swingDoor.setStyle(3, bluecol, 1, bluecol); level16.addConstraint(swingDoor); swingDoorAnchor = new CircleParticle(220, 150, 2, true); swingDoorAnchor.visible = false; swingDoorAnchor.collidable = false; level16.addParticle(swingDoorAnchor); swingDoorSpring = new SpringConstraint(swingDoorP2, swingDoorAnchor, 0.02); swingDoorSpring.restLength = 40; swingDoorSpring.visible = false; level16.addConstraint(swingDoorSpring); APEngine.addGroup(level16); ball16.addEventListener(CollisionEvent.COLLIDE, bahit16); } function frame27(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl18); resetbut.addEventListener(MouseEvent.CLICK, reset18); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr18); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed18); stage.addEventListener(KeyboardEvent.KEY_UP, key_released18); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level18 = new Group(); level18.collideInternal = true; b18g2 = new CircleParticle(420, 280, 55, true, 2); b18g2.collidable = false; b18g2.setStyle(30, 12058224, 1, 13434777, 1); level18.addParticle(b18g2); b18g1 = new CircleParticle(300, 200, 100, true, 2); b18g1.collidable = false; b18g1.setStyle(30, 12058224, 1, 13434777, 1); level18.addParticle(b18g1); b18g = new CircleParticle(100, 400, 200, true, 2); b18g.collidable = false; b18g.setStyle(30, 12058224, 1, 13434777, 1); level18.addParticle(b18g); ball18 = new CircleParticle(100, -10, 15, false, 2); level18.addParticle(ball18); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 18 complete"; gameinstructions.text = "Balls!"; rv18 = new RectangleParticle(570, 200, 20, 550, 0, true); level18.addParticle(rv18); rv18.visible = false; lv18 = new RectangleParticle(-30, 200, 20, 550, 0, true); level18.addParticle(lv18); lv18.visible = false; wa18 = new WheelParticle(10, 20, 15, false, 2); level18.addParticle(wa18); wb18 = new WheelParticle(50, 20, 15, false, 2); level18.addParticle(wb18); wc18 = new SpringConstraint(wa18, wb18, 0.5, true, 10); level18.addConstraint(wc18); colC18 = 3359795; colB18 = 11189162; bx18 = 50; by18 = 150; bsize18 = 40.5; yslope18 = 3.4; particleSize18 = 5; bluecol18 = 3368618; darkbluecol18 = 2445948; start18 = new RectangleParticle(bx18, by18, 100, 10, 0, true); level18.addParticle(start18); start18.setStyle(3, colC18, 1, colB18); bx18 = (bx18 + 100); by18 = (by18 + 50); swingball18 = new WheelParticle(bx18, by18, 50, false, 20); level18.addParticle(swingball18); swingball18.setStyle(2, darkbluecol18, 1, bluecol18, 1); by18 = (by18 - 100); sba18 = new CircleParticle(bx18, by18, 15, true, 2); level18.addParticle(sba18); sba18.visible = false; sba18.collidable = false; bx18 = (bx18 + 125); sbb18 = new CircleParticle(bx18, by18, 15, true, 2); level18.addParticle(sbb18); sbb18.visible = false; sbb18.collidable = false; by18 = (by18 + 100); swingballb18 = new WheelParticle(bx18, by18, 50, false, 20); level18.addParticle(swingballb18); swingballb18.setStyle(2, darkbluecol18, 1, bluecol18, 1); bx18 = (bx18 + 125); swingballc18 = new WheelParticle(bx18, by18, 50, false, 20); level18.addParticle(swingballc18); swingballc18.setStyle(2, darkbluecol18, 1, bluecol18, 1); by18 = (by18 - 150); sbc18 = new CircleParticle(bx18, by18, 15, true, 2); level18.addParticle(sbc18); sbc18.visible = false; sbc18.collidable = false; by18 = (by18 + 100); bx18 = (bx18 + 100); end18 = new RectangleParticle(bx18, by18, 100, 10, 0, true); level18.addParticle(end18); end18.setStyle(3, colC18, 1, colB18); bx18 = (bx18 + 47); by18 = (by18 - 50); yhit18 = new RectangleParticle(bx18, by18, 10, 100, 0, true); level18.addParticle(yhit18); yhit18.sprite.name = "y"; yhit18.setStyle(3, 16040962, 1, 0xFFCC00, 1); wa18.setStyle(3, 3359795, 1, 11189179, 1); wb18.setStyle(3, 3359795, 1, 11189179, 1); wc18.setStyle(3, 3359795, 1, 11189179, 1); ball18.setStyle(3, 16040962, 1, 0xFFCC00, 1); swinga18 = new SpringConstraint(sba18, swingball18, 0.5, false, 1); level18.addConstraint(swinga18); swinga18.visible = false; swingb18 = new SpringConstraint(sbb18, swingballb18, 0.5, false, 1); level18.addConstraint(swingb18); swingb18.visible = false; swingc18 = new SpringConstraint(sbc18, swingballc18, 0.5, false, 1); level18.addConstraint(swingc18); swingc18.visible = false; APEngine.addGroup(level18); ball18.addEventListener(CollisionEvent.COLLIDE, bahit18); } function frame28(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl19); resetbut.addEventListener(MouseEvent.CLICK, reset19); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr19); addEventListener(Event.ENTER_FRAME, run); addEventListener(Event.ENTER_FRAME, spinball19); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed19); stage.addEventListener(KeyboardEvent.KEY_UP, key_released19); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level19 = new Group(); level19.collideInternal = true; b19g4 = new CircleParticle(360, 60, 10, true, 2); b19g4.collidable = false; b19g4.setStyle(10, 12058224, 1, 13434777, 1); level19.addParticle(b19g4); b19g8 = new CircleParticle(100, 220, 10, true, 2); b19g8.collidable = false; b19g8.setStyle(10, 12058224, 1, 13434777, 1); level19.addParticle(b19g8); b19g3 = new CircleParticle(340, 80, 20, true, 2); b19g3.collidable = false; b19g3.setStyle(15, 12058224, 1, 15125759, 1); level19.addParticle(b19g3); b19g7 = new CircleParticle(120, 200, 20, true, 2); b19g7.collidable = false; b19g7.setStyle(15, 12058224, 1, 15125759, 1); level19.addParticle(b19g7); b19g2 = new CircleParticle(300, 150, 55, true, 2); b19g2.collidable = false; b19g2.setStyle(30, 12058224, 1, 13434777, 1); level19.addParticle(b19g2); b19g19 = new CircleParticle(200, 200, 55, true, 2); b19g19.collidable = false; b19g19.setStyle(30, 12058224, 1, 13434777, 1); level19.addParticle(b19g19); b19g1 = new CircleParticle(300, 280, 100, true, 2); b19g1.collidable = false; b19g1.setStyle(30, 12058224, 1, 15125759, 1); level19.addParticle(b19g1); b19g = new CircleParticle(520, 470, 200, true, 2); b19g.collidable = false; b19g.setStyle(30, 12058224, 1, 13434777, 1); level19.addParticle(b19g); ball19 = new CircleParticle(100, -10, 15, false, 2); level19.addParticle(ball19); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 19 complete"; gameinstructions.text = "make sure you pick the right platform"; rv19 = new RectangleParticle(570, 200, 20, 550, 0, true); level19.addParticle(rv19); rv19.visible = false; lv19 = new RectangleParticle(-30, 200, 20, 550, 0, true); level19.addParticle(lv19); lv19.visible = false; wa19 = new WheelParticle(10, 20, 15, false, 2); level19.addParticle(wa19); wb19 = new WheelParticle(50, 20, 15, false, 2); level19.addParticle(wb19); wc19 = new SpringConstraint(wa19, wb19, 0.5, true, 10); level19.addConstraint(wc19); colC19 = 3359795; colB19 = 11189162; bx19 = 50; by19 = 150; bsize19 = 40.5; yslope19 = 3.4; particleSize19 = 5; bluecol19 = 3368618; darkbluecol19 = 2445948; quarter19 = ((Math.PI * 2) / 4); radius19 = 100; start19 = new RectangleParticle(bx19, by19, 100, 10, 0, true); level19.addParticle(start19); start19.setStyle(3, colC19, 1, colB19); bx19 = (bx19 + 225); by19 = (by19 + 100); swingball19 = new WheelParticle(bx19, by19, 100, false, 20); level19.addParticle(swingball19); swingball19.visible = false; swingball19.collidable = false; swingball19.setStyle(2, darkbluecol19, 1, bluecol19, 1); by19 = (by19 - 150); rimt19 = new RectangleParticle(bx19, by19, 10, 150, 0, false); level19.addParticle(rimt19); rimt19.setStyle(0, bluecol19, 1, bluecol19); by19 = (by19 + 300); rimb19 = new RectangleParticle(bx19, by19, 10, 150, 0, false); level19.addParticle(rimb19); rimb19.setStyle(0, bluecol19, 1, bluecol19); by19 = (by19 - 150); bx19 = (bx19 - 150); riml19 = new RectangleParticle(bx19, by19, 150, 10, 0, false); level19.addParticle(riml19); riml19.setStyle(0, bluecol19, 1, bluecol19); bx19 = (bx19 + 300); rimr19 = new RectangleParticle(bx19, by19, 150, 10, 0, false); level19.addParticle(rimr19); rimr19.setStyle(0, bluecol19, 1, bluecol19); bx19 = (bx19 - 150); by19 = (by19 - 100); sba19 = new CircleParticle(bx19, by19, 15, true, 2); level19.addParticle(sba19); sba19.visible = false; sba19.collidable = false; bx19 = (bx19 + 225); by19 = (by19 + 100); end19 = new RectangleParticle(bx19, by19, 100, 10, 0, true); level19.addParticle(end19); end19.setStyle(3, colC19, 1, colB19); bx19 = (bx19 + 47); by19 = (by19 - 50); yhit19 = new RectangleParticle(bx19, by19, 10, 100, 0, true); level19.addParticle(yhit19); yhit19.sprite.name = "y"; yhit19.setStyle(3, 16040962, 1, 0xFFCC00, 1); wa19.setStyle(3, 3359795, 1, 11189179, 1); wb19.setStyle(3, 3359795, 1, 11189179, 1); wc19.setStyle(3, 3359795, 1, 11189179, 1); ball19.setStyle(3, 16040962, 1, 0xFFCC00, 1); swinga19 = new SpringConstraint(sba19, swingball19, 0.5, false, 1); level19.addConstraint(swinga19); swinga19.visible = false; swingb19 = new SpringConstraint(start19, swingball19, 0.5, false, 1); level19.addConstraint(swingb19); swingb19.visible = false; swingc19 = new SpringConstraint(end19, swingball19, 0.5, false, 1); level19.addConstraint(swingc19); swingc19.visible = false; APEngine.addGroup(level19); ball19.addEventListener(CollisionEvent.COLLIDE, bahit19); } function frame22(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl13); resetbut.addEventListener(MouseEvent.CLICK, reset13); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr13); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed13); stage.addEventListener(KeyboardEvent.KEY_UP, key_released13); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level13 = new Group(); level13.collideInternal = true; b13g22 = new CircleParticle(220, 225, 55, true, 2); b13g22.collidable = false; b13g22.setStyle(30, 12058224, 1, 13434777, 1); level13.addParticle(b13g22); b13g12 = new CircleParticle(275, 10, 100, true, 2); b13g12.collidable = false; b13g12.setStyle(30, 12058224, 1, 13434777, 1); level13.addParticle(b13g12); b132g = new CircleParticle(275, 200, 200, true, 2); b132g.collidable = false; b132g.setStyle(30, 12058224, 1, 13434777, 1); level13.addParticle(b132g); ball13 = new CircleParticle(275, 250, 15, false, 2); level13.addParticle(ball13); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 13 complete"; gameinstructions.text = "2 triggers, 2 consequences!"; lv13 = new RectangleParticle(-30, 200, 20, 550, 0, true); level13.addParticle(lv13); lv13.visible = false; wa13 = new WheelParticle(10, 20, 15, false, 2); level13.addParticle(wa13); wb13 = new WheelParticle(50, 20, 15, false, 2); level13.addParticle(wb13); wc13 = new SpringConstraint(wa13, wb13, 0.5, true, 10); level13.addConstraint(wc13); colC13 = 3359795; colB13 = 11189162; bx13 = 36; by13 = 200; bsize13 = 40.5; yslope13 = 3.4; particleSize13 = 5; start13 = new RectangleParticle(50, 150, 200, 10, 0, true); level13.addParticle(start13); start13.setStyle(3, colC13, 1, colB13); lt13 = new RectangleParticle(500, 150, 200, 10, 0, true); level13.addParticle(lt13); lt13.setStyle(3, colC13, 1, colB13); trig13 = new RectangleParticle(543, 100, 10, 100, 0, true); trig13.sprite.name = "trig"; level13.addParticle(trig13); trig13.setStyle(3, 7537379, 1, 5505449); trigb13 = new RectangleParticle(50, 250, 10, 100, 0, true); trigb13.sprite.name = "trigb"; level13.addParticle(trigb13); trigb13.setStyle(3, 7537379, 1, 5505449); bt13 = new CircleParticle(150, 150, 5, true, 2); bt13.setStyle(3, colC13, 1, colB13); level13.addParticle(bt13); bti13 = new CircleParticle(200, 170, 5, false, 2); bti13.setStyle(3, colC13, 1, colB13); level13.addParticle(bti13); btr13 = new CircleParticle(400, 150, 5, true, 2); btr13.setStyle(3, colC13, 1, colB13); level13.addParticle(btr13); btri13 = new CircleParticle(390, 150, 5, false, 2); btri13.setStyle(3, colC13, 1, colB13); level13.addParticle(btri13); mainb13 = new SpringConstraint(bti13, btri13, 0.5, true, 10, 0.93); level13.addConstraint(mainb13); mainb13.fixedEndLimit = 0.15; mainb13.setStyle(3, colC13, 1, colB13); leftb13 = new SpringConstraint(bti13, bt13, 0.5, true, 10, 0.85); level13.addConstraint(leftb13); leftb13.fixedEndLimit = 0.15; leftb13.setStyle(3, colC13, 1, colB13); rightb13 = new SpringConstraint(btri13, btr13, 0.5, true, 10, 0.5); level13.addConstraint(rightb13); rightb13.fixedEndLimit = 0.15; rightb13.setStyle(3, colC13, 1, colB13); bx13 = (bx13 + 300); floor13 = new RectangleParticle(275, 300, 700, 10, 0, true); level13.addParticle(floor13); floor13.setStyle(3, colC13, 1, colB13); rv13 = new RectangleParticle(570, 200, 20, 550, 0, true); level13.addParticle(rv13); bx13 = (bx13 - 50); yhit13 = new RectangleParticle(500, 250, 10, 100, 0, true); level13.addParticle(yhit13); yhit13.sprite.name = "y"; yhit13.setStyle(3, 16040962, 1, 0xFFCC00, 1); wa13.setStyle(3, 3359795, 1, 11189179, 1); wb13.setStyle(3, 3359795, 1, 11189179, 1); wc13.setStyle(3, 3359795, 1, 11189179, 1); ball13.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level13); ball13.addEventListener(CollisionEvent.COLLIDE, bahit13); wa13.addEventListener(CollisionEvent.COLLIDE, trigfunk13); wa13.addEventListener(CollisionEvent.COLLIDE, trigbfunk13); wb13.addEventListener(CollisionEvent.COLLIDE, trigfunk13); wb13.addEventListener(CollisionEvent.COLLIDE, trigbfunk13); } function frame36(){ levelcomplete.visible = false; levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl4s); resetbut.addEventListener(MouseEvent.CLICK, reset4s); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr4s); addEventListener(Event.ENTER_FRAME, bonusrun4s); removeEventListener(Event.ENTER_FRAME, bonusrun3s); removeEventListener(Event.ENTER_FRAME, spinball); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed4s); stage.addEventListener(KeyboardEvent.KEY_UP, key_released4s); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level4s = new Group(); level4s.collideInternal = true; ba4s = new CircleParticle(210, 10, 15, false, 2); level4s.addParticle(ba4s); mpause = false; gameinstructions.text = "Time Your Swing"; levelcomplete.visible = false; levelcomplete.levelname.text = "Bonus level 2 complete"; lv4s = new RectangleParticle(-20, 100, 20, 200, 0, true); level4s.addParticle(lv4s); lv4s.visible = false; rv4s = new RectangleParticle(570, 100, 20, 200, 0, true); level4s.addParticle(rv4s); rv4s.visible = false; wa4s = new WheelParticle(260, 20, 15, false, 2); level4s.addParticle(wa4s); wb4s = new WheelParticle(300, 20, 15, false, 2); level4s.addParticle(wb4s); wc4s = new SpringConstraint(wa4s, wb4s, 0.5, true, 10); level4s.addConstraint(wc4s); wa4s.setStyle(3, 3359795, 1, 11189179, 1); wb4s.setStyle(3, 3359795, 1, 11189179, 1); wc4s.setStyle(3, 3359795, 1, 11189179, 1); floor4s = new RectangleParticle(275, 100, 200, 10, 0, true); level4s.addParticle(floor4s); floor4s.setStyle(3, 3359795, 1, 11189162, 1); bar4s = new RectangleParticle(130, 100, 10, 200, 0, true); level4s.addParticle(bar4s); bar4s.setStyle(3, 3359795, 1, 11189162, 1); slope4s = new RectangleParticle(200, 300, 300, 10, 0.2, true); level4s.addParticle(slope4s); slope4s.setStyle(3, 3359795, 1, 11189162, 1); holdercirc = new CircleParticle(400, 180, 5, true); level4s.addParticle(holdercirc); holdercirc.setStyle(0, 3368618, 1, 3368618, 1); swingcirc = new CircleParticle(370, 60, 20, false, 20); level4s.addParticle(swingcirc); swingcirc.setStyle(0, 3368618, 1, 3368618, 1); swingbar = new SpringConstraint(holdercirc, swingcirc, 1, true, 10); level4s.addConstraint(swingbar); swingbar.setStyle(0, 3368618, 1, 3368618, 1); yhit4s = new RectangleParticle(60, 220, 10, 100, 0, true); yhit4s.sprite.name = "y"; yhit4s.setStyle(3, 16040962, 1, 0xFFCC00, 1); level4s.addParticle(yhit4s); ba4s.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level4s); ba4s.addEventListener(CollisionEvent.COLLIDE, bahit4s); } function frame31(){ gotoAndStop(30); } function frame20(){ levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl11); resetbut.addEventListener(MouseEvent.CLICK, reset11); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed11); stage.addEventListener(KeyboardEvent.KEY_UP, key_released11); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level11 = new Group(); level11.collideInternal = true; b11g3 = new CircleParticle(270, 85, 20, true, 2); b11g3.collidable = false; b11g3.setStyle(10, 12058224, 1, 13434777, 1); level11.addParticle(b11g3); b11g2 = new CircleParticle(300, 150, 55, true, 2); b11g2.collidable = false; b11g2.setStyle(30, 12058224, 1, 15125759, 1); level11.addParticle(b11g2); ball11 = new CircleParticle(100, -11, 15, false, 2); level11.addParticle(ball11); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 11 complete"; gameinstructions.text = "Avoid the gap!"; lv11 = new RectangleParticle(-30, 200, 20, 550, 0, true); level11.addParticle(lv11); lv11.visible = false; wa11 = new WheelParticle(10, 20, 15, false, 2); level11.addParticle(wa11); wb11 = new WheelParticle(50, 20, 15, false, 2); level11.addParticle(wb11); wc11 = new SpringConstraint(wa11, wb11, 0.5, true, 10); level11.addConstraint(wc11); colC11 = 3359795; colB11 = 11189162; bx11 = 100; by11 = 200; bsize11 = 40.5; yslope11 = 3.4; particleSize11 = 5; bigcir11 = new CircleParticle(220, 420, 200, true, 2); level11.addParticle(bigcir11); bigcir11.setStyle(3, colC11, 1, 102188); bigcirc11 = new CircleParticle(260, 320, 150, true, 2); level11.addParticle(bigcirc11); bigcirc11.setStyle(3, colC11, 1, 108851); bigcirc211 = new CircleParticle(320, 220, 80, true, 2); level11.addParticle(bigcirc211); bigcirc211.setStyle(3, colC11, 1, 113208); start11 = new RectangleParticle(50, 250, 120, 10, 0, true); level11.addParticle(start11); start11.setStyle(3, colC11, 1, colB11); rv11 = new RectangleParticle(570, 200, 20, 550, 0, true); level11.addParticle(rv11); bx11 = (bx11 - 50); yhit11 = new RectangleParticle(500, 100, 100, 10, 0, true); level11.addParticle(yhit11); yhit11.sprite.name = "y"; yhit11.setStyle(3, 16040962, 1, 0xFFCC00, 1); bouncePad11 = new RectangleParticle(500, 300, 100, 10, 0, true); bouncePad11.setStyle(3, 11600129, 1, 14352898, 1); bouncePad11.elasticity = 1; level11.addParticle(bouncePad11); wa11.setStyle(3, 3359795, 1, 11189179, 1); wb11.setStyle(3, 3359795, 1, 11189179, 1); wc11.setStyle(3, 3359795, 1, 11189179, 1); ball11.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level11); ball11.addEventListener(CollisionEvent.COLLIDE, bahit11); } function frame30(){ levelcomplete.visible = false; winscreen.playmoregames.addEventListener(MouseEvent.CLICK, playgames); winscreen.replaybut.addEventListener(MouseEvent.CLICK, replaygamee); winscreen.subhold.submitbut.addEventListener(MouseEvent.CLICK, submitscoree); lifeeeeleft = (5 - liveslost); ofinal = (oscore + (lifeeeeleft * 5000)); delete ??getglobalscope [Timer(minuteTimer)]; minuteTimer.reset(); bottime.gotoAndStop(2); winscreen.livescore.text = (("You had " + lifeeeeleft) + " lives left"); winscreen.livescorea.text = ((("Life bonus = " + lifeeeeleft) + " x 5000 = ") + (lifeeeeleft * 5000)); winscreen.finalscore.text = ("Your current score is " + oscore); if (oscore == 0){ ofinal = 0; }; winscreen.nfinalscore.text = ("Your new score is " + ofinal); } function frame34(){ levelcomplete.visible = false; levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl2s); resetbut.addEventListener(MouseEvent.CLICK, reset2s); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr2s); removeEventListener(Event.ENTER_FRAME, bonusrun4s); removeEventListener(Event.ENTER_FRAME, bonusrun3s); removeEventListener(Event.ENTER_FRAME, run); removeEventListener(Event.ENTER_FRAME, bonusrun); addEventListener(Event.ENTER_FRAME, bonusrun2s); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed2s); stage.addEventListener(KeyboardEvent.KEY_UP, key_released2s); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level2s = new Group(); level2s.collideInternal = true; ba2s = new CircleParticle(100, 10, 15, false, 2); level2s.addParticle(ba2s); mpause = false; gameinstructions.text = "New Path"; levelcomplete.visible = false; levelcomplete.levelname.text = "Bonus level 3 complete"; lv2s = new RectangleParticle(-20, 100, 20, 1000, 0, true); level2s.addParticle(lv2s); lv2s.visible = false; rv2s = new RectangleParticle(670, 100, 20, 1000, 0, true); level2s.addParticle(rv2s); rv2s.visible = false; wa2s = new WheelParticle(10, 20, 15, false, 2); level2s.addParticle(wa2s); wb2s = new WheelParticle(50, 20, 15, false, 2); level2s.addParticle(wb2s); wc2s = new SpringConstraint(wa2s, wb2s, 0.5, true, 10); level2s.addConstraint(wc2s); wa2s.setStyle(3, 3359795, 1, 11189179, 1); wb2s.setStyle(3, 3359795, 1, 11189179, 1); wc2s.setStyle(3, 3359795, 1, 11189179, 1); cols1o = 3359795; cols1i = 11189162; startbx = 50; startby = 200; gap2s = 50; yslopey = 2.4; floorl2s = new RectangleParticle(startbx, startby, 100, 10, 0, true); level2s.addParticle(floorl2s); floorl2s.setStyle(3, 3359795, 1, 11189162, 1); startbx = (startbx + 50); sb12s = new CircleParticle(startbx, startby, 5, true); level2s.addParticle(sb12s); sb12s.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap2s); startby = (startby + yslopey); sb22s = new CircleParticle(startbx, startby, 5, false); level2s.addParticle(sb22s); sb22s.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap2s); startby = (startby + yslopey); sb32s = new CircleParticle(startbx, startby, 5, false); level2s.addParticle(sb32s); sb32s.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap2s); startby = (startby + yslopey); sb42s = new CircleParticle(startbx, startby, 5, false); level2s.addParticle(sb42s); sb42s.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap2s); startby = (startby + yslopey); sb52s = new CircleParticle(startbx, startby, 5, false); level2s.addParticle(sb52s); sb52s.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap2s); startby = (startby + yslopey); sb62s = new CircleParticle(startbx, startby, 5, false); level2s.addParticle(sb62s); sb62s.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap2s); startby = (startby + yslopey); sb72s = new CircleParticle(startbx, startby, 5, false); level2s.addParticle(sb72s); sb72s.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap2s); startby = (startby + yslopey); sb82s = new CircleParticle(startbx, startby, 5, false); level2s.addParticle(sb82s); sb82s.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap2s); startby = (startby + yslopey); sb92s = new CircleParticle(startbx, startby, 5, false); level2s.addParticle(sb92s); sb92s.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap2s); startby = (startby + yslopey); sb102s = new CircleParticle(startbx, startby, 5, true); level2s.addParticle(sb102s); sb102s.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + 55); floorr2s = new RectangleParticle(startbx, startby, 100, 10, 0, true); floorr2s.sprite.name = "rtrig1"; floorr2s.setStyle(3, 7537379, 1, 5505449); level2s.addParticle(floorr2s); startby = (startby + 100); startby = (startby + 100); startby = (startby + 100); startbx = (startbx - 55); startby = (startby - 100); startby = (startby - 100); startbx = (startbx - 450); startby = (startby - 21.6); a42s = new CircleParticle(startbx, startby, 5, true); level2s.addParticle(a42s); a42s.setStyle(3, cols1o, 1, cols1i, 1); startby = (startby + 100); startby = (startby + 100); startby = (startby + 100); startbx = (startbx - 55); startby = (startby - 100); startby = (startby - 200); floorl52s = new RectangleParticle(startbx, startby, 100, 10, 0, true); level2s.addParticle(floorl52s); floorl52s.sprite.name = "y"; floorl52s.setStyle(3, 16040962, 1, 0xFFCC00, 1); bridgeCons12s = new SpringConstraint(sb12s, sb22s, 0.9, true, 10, 0.8); bridgeCons12s.fixedEndLimit = 0.15; bridgeCons12s.setStyle(3, cols1o, 1, cols1i, 1); level2s.addConstraint(bridgeCons12s); fc2s = new SpringConstraint(a42s, sb22s, 0.9, true, 10, 0.9); fc2s.fixedEndLimit = 0.15; fc2s.setStyle(3, cols1o, 1, cols1i, 1); bridgeCons22s = new SpringConstraint(sb22s, sb32s, 0.9, true, 10, 0.8); bridgeCons22s.setStyle(3, cols1o, 1, cols1i, 1); level2s.addConstraint(bridgeCons22s); bridgeCons32s = new SpringConstraint(sb32s, sb42s, 0.9, true, 10, 0.8); bridgeCons32s.setStyle(3, cols1o, 1, cols1i, 1); level2s.addConstraint(bridgeCons32s); bridgeCons42s = new SpringConstraint(sb42s, sb52s, 0.9, true, 10, 0.8); bridgeCons42s.setStyle(3, cols1o, 1, cols1i, 1); level2s.addConstraint(bridgeCons42s); bridgeCons52s = new SpringConstraint(sb52s, sb62s, 0.9, true, 10, 0.8); bridgeCons52s.setStyle(3, cols1o, 1, cols1i, 1); level2s.addConstraint(bridgeCons52s); bridgeCons62s = new SpringConstraint(sb62s, sb72s, 0.9, true, 10, 0.8); bridgeCons62s.setStyle(3, cols1o, 1, cols1i, 1); level2s.addConstraint(bridgeCons62s); bridgeCons72s = new SpringConstraint(sb72s, sb82s, 0.9, true, 10, 0.8); bridgeCons72s.setStyle(3, cols1o, 1, cols1i, 1); level2s.addConstraint(bridgeCons72s); bridgeCons82s = new SpringConstraint(sb82s, sb92s, 0.9, true, 10, 0.8); bridgeCons82s.setStyle(3, cols1o, 1, cols1i, 1); level2s.addConstraint(bridgeCons82s); bridgeCons92s = new SpringConstraint(sb92s, sb102s, 0.9, true, 10, 0.8); bridgeCons92s.fixedEndLimit = 0.15; bridgeCons92s.setStyle(3, cols1o, 1, cols1i, 1); level2s.addConstraint(bridgeCons92s); ba2s.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level2s); wa2s.addEventListener(CollisionEvent.COLLIDE, trigfunk2s); wb2s.addEventListener(CollisionEvent.COLLIDE, trigfunk2s); ba2s.addEventListener(CollisionEvent.COLLIDE, bahit2s); } public function lpausel(_arg1:Event):void{ if (levelcomplete.visible == true){ pausecont.visible = false; } else { pausecont.visible = true; }; } function frame33(){ levelcomplete.visible = false; levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl1s); pausecont.pausebut.addEventListener(MouseEvent.CLICK, pausegames); stage.addEventListener(KeyboardEvent.KEY_DOWN, pausegamespaces); mute = false; mutebut.fake.visible = false; pausecont.visible = true; mutebut.soundplay.addEventListener(MouseEvent.CLICK, mutesound2); resetbut.addEventListener(MouseEvent.CLICK, reset1s); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr1s); removeEventListener(Event.ENTER_FRAME, run); addEventListener(Event.ENTER_FRAME, bonusrun); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed1s); stage.addEventListener(KeyboardEvent.KEY_UP, key_released1s); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level1s = new Group(); level1s.collideInternal = true; ba1s = new CircleParticle(100, 10, 15, false, 2); level1s.addParticle(ba1s); mpause = false; gameinstructions.text = "The Falling bridge"; levelcomplete.visible = false; levelcomplete.levelname.text = "Bonus level 1 complete"; lv1s = new RectangleParticle(-20, 100, 20, 200, 0, true); level1s.addParticle(lv1s); lv1s.visible = false; rv1s = new RectangleParticle(570, 100, 20, 200, 0, true); level1s.addParticle(rv1s); rv1s.visible = false; wa1s = new WheelParticle(10, 20, 15, false, 2); level1s.addParticle(wa1s); wb1s = new WheelParticle(50, 20, 15, false, 2); level1s.addParticle(wb1s); wc1s = new SpringConstraint(wa1s, wb1s, 0.5, true, 10); level1s.addConstraint(wc1s); wa1s.setStyle(3, 3359795, 1, 11189179, 1); wb1s.setStyle(3, 3359795, 1, 11189179, 1); wc1s.setStyle(3, 3359795, 1, 11189179, 1); floor1s = new RectangleParticle(50, 200, 100, 10, 0, true); level1s.addParticle(floor1s); floor1s.setStyle(3, 3359795, 1, 11189162, 1); cols1o = 3359795; cols1i = 11189162; startbx = 100; startby = 200; gap1s = 50; yslopey = 2.4; sb1 = new CircleParticle(startbx, startby, 5, true); level1s.addParticle(sb1); sb1.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap1s); startby = (startby + yslopey); sb2 = new CircleParticle(startbx, startby, 5, false); level1s.addParticle(sb2); sb2.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap1s); startby = (startby + yslopey); sb3 = new CircleParticle(startbx, startby, 5, false); level1s.addParticle(sb3); sb3.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap1s); startby = (startby + yslopey); sb4 = new CircleParticle(startbx, startby, 5, false); level1s.addParticle(sb4); sb4.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap1s); startby = (startby + yslopey); sb5 = new CircleParticle(startbx, startby, 5, false); level1s.addParticle(sb5); sb5.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap1s); startby = (startby + yslopey); sb6 = new CircleParticle(startbx, startby, 5, false); level1s.addParticle(sb6); sb6.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap1s); startby = (startby + yslopey); sb7 = new CircleParticle(startbx, startby, 5, false); level1s.addParticle(sb7); sb7.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap1s); startby = (startby + yslopey); sb8 = new CircleParticle(startbx, startby, 5, false); level1s.addParticle(sb8); sb8.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap1s); startby = (startby + yslopey); sb9 = new CircleParticle(startbx, startby, 5, false); level1s.addParticle(sb9); sb9.setStyle(3, cols1o, 1, cols1i, 1); startbx = (startbx + gap1s); startby = (startby + yslopey); sb10 = new CircleParticle(startbx, startby, 5, true); level1s.addParticle(sb10); sb10.setStyle(3, cols1o, 1, cols1i, 1); bridgeCons1 = new SpringConstraint(sb1, sb2, 0.9, true, 10, 0.8); bridgeCons1.fixedEndLimit = 0.15; bridgeCons1.setStyle(3, cols1o, 1, cols1i, 1); level1s.addConstraint(bridgeCons1); bridgeCons2 = new SpringConstraint(sb2, sb3, 0.9, true, 10, 0.8); bridgeCons2.setStyle(3, cols1o, 1, cols1i, 1); level1s.addConstraint(bridgeCons2); bridgeCons3 = new SpringConstraint(sb3, sb4, 0.9, true, 10, 0.8); bridgeCons3.setStyle(3, cols1o, 1, cols1i, 1); level1s.addConstraint(bridgeCons3); bridgeCons4 = new SpringConstraint(sb4, sb5, 0.9, true, 10, 0.8); bridgeCons4.setStyle(3, cols1o, 1, cols1i, 1); level1s.addConstraint(bridgeCons4); bridgeCons5 = new SpringConstraint(sb5, sb6, 0.9, true, 10, 0.8); bridgeCons5.setStyle(3, cols1o, 1, cols1i, 1); level1s.addConstraint(bridgeCons5); bridgeCons6 = new SpringConstraint(sb6, sb7, 0.9, true, 10, 0.8); bridgeCons6.setStyle(3, cols1o, 1, cols1i, 1); level1s.addConstraint(bridgeCons6); bridgeCons7 = new SpringConstraint(sb7, sb8, 0.9, true, 10, 0.8); bridgeCons7.setStyle(3, cols1o, 1, cols1i, 1); level1s.addConstraint(bridgeCons7); bridgeCons8 = new SpringConstraint(sb8, sb9, 0.9, true, 10, 0.8); bridgeCons8.setStyle(3, cols1o, 1, cols1i, 1); level1s.addConstraint(bridgeCons8); bridgeCons9 = new SpringConstraint(sb9, sb10, 0.9, true, 10, 0.8); bridgeCons9.fixedEndLimit = 0.15; bridgeCons9.sprite.name = "bfall"; bridgeCons9.setStyle(3, 7537379, 1, 5505449); level1s.addConstraint(bridgeCons9); rect1s = new RectangleParticle(450, 400, 100, 10, 0, true); rect1s.setStyle(3, cols1o, 1, cols1i, 1); level1s.addParticle(rect1s); yhit1s = new RectangleParticle(300, 500, 100, 10, 0, true); yhit1s.sprite.name = "y"; yhit1s.setStyle(3, 16040962, 1, 0xFFCC00, 1); level1s.addParticle(yhit1s); ba1s.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level1s); wa1s.addEventListener(CollisionEvent.COLLIDE, trigfunk1s); wb1s.addEventListener(CollisionEvent.COLLIDE, trigfunk1s); ba1s.addEventListener(CollisionEvent.COLLIDE, bahit1s); } function frame37(){ levelcomplete.visible = false; levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl5s); resetbut.addEventListener(MouseEvent.CLICK, reset5s); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr5s); removeEventListener(Event.ENTER_FRAME, bonusrun2s); addEventListener(Event.ENTER_FRAME, bonusrun5s); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed5s); stage.addEventListener(KeyboardEvent.KEY_UP, key_released5s); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level5s = new Group(); level5s.collideInternal = true; ba5s = new CircleParticle(280, 10, 15, false, 2); level5s.addParticle(ba5s); mpause = false; gameinstructions.text = "Don't Fall Down The Hill!"; levelcomplete.visible = false; levelcomplete.levelname.text = "Bonus level 5 complete"; wa5s = new WheelParticle(260, 20, 15, false, 2); level5s.addParticle(wa5s); wb5s = new WheelParticle(300, 20, 15, false, 2); level5s.addParticle(wb5s); wc5s = new SpringConstraint(wa5s, wb5s, 0.5, true, 10); level5s.addConstraint(wc5s); wa5s.setStyle(3, 3359795, 1, 11189179, 1); wb5s.setStyle(3, 3359795, 1, 11189179, 1); wc5s.setStyle(3, 3359795, 1, 11189179, 1); floor5s = new RectangleParticle(500, 100, 2000, 10, -0.2, true); level5s.addParticle(floor5s); floor5s.setStyle(3, 3359795, 1, 11189162, 1); floor5s3 = new RectangleParticle(400, 50, 2000, 10, -0.2, true); level5s.addParticle(floor5s3); floor5s3.setStyle(3, 3359795, 1, 11189162, 1); floor5s2 = new RectangleParticle(600, 150, 2000, 10, -0.2, true); level5s.addParticle(floor5s2); floor5s2.setStyle(3, 3359795, 1, 11189162, 1); floor5s4 = new RectangleParticle(700, 200, 2000, 10, -0.2, true); level5s.addParticle(floor5s4); floor5s4.setStyle(3, 3359795, 1, 11189162, 1); floor6s4 = new RectangleParticle(-340, 400, 10, 1000, -1, true); level5s.addParticle(floor6s4); floor6s4.setStyle(3, 3359795, 1, 11189162, 1); yhit5s = new RectangleParticle(60, 320, 10, 100, 0, true); yhit5s.sprite.name = "y"; yhit5s.setStyle(3, 16040962, 1, 0xFFCC00, 1); level5s.addParticle(yhit5s); ba5s.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level5s); ba5s.addEventListener(CollisionEvent.COLLIDE, bahit5s); APEngine.container.x = 0; APEngine.container.y = 0; } function frame29(){ levelcomplete.visible = false; levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl20); resetbut.addEventListener(MouseEvent.CLICK, reset20); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr20); stop(); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed20); stage.addEventListener(KeyboardEvent.KEY_UP, key_released20); stage.removeEventListener(KeyboardEvent.KEY_DOWN, key_pressed19); stage.removeEventListener(KeyboardEvent.KEY_UP, key_released19); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level20 = new Group(); level20.collideInternal = true; b20g22 = new CircleParticle(220, 80, 55, true, 2); b20g22.collidable = false; b20g22.setStyle(30, 12058224, 1, 13434777, 1); level20.addParticle(b20g22); b20g12 = new CircleParticle(300, 200, 100, true, 2); b20g12.collidable = false; b20g12.setStyle(30, 12058224, 1, 13434777, 1); level20.addParticle(b20g12); b202g = new CircleParticle(100, 400, 200, true, 2); b202g.collidable = false; b202g.setStyle(30, 12058224, 1, 13434777, 1); level20.addParticle(b202g); ball20 = new CircleParticle(275, -10, 15, false, 2); level20.addParticle(ball20); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 20 complete"; gameinstructions.text = "Final Level!"; rv20 = new RectangleParticle(570, 200, 20, 550, 0, true); level20.addParticle(rv20); rv20.visible = false; lv20 = new RectangleParticle(-30, 200, 20, 550, 0, true); level20.addParticle(lv20); lv20.visible = false; wa20 = new WheelParticle(10, 20, 15, false, 2); level20.addParticle(wa20); wb20 = new WheelParticle(50, 20, 15, false, 2); level20.addParticle(wb20); wc20 = new SpringConstraint(wa20, wb20, 0.5, true, 10); level20.addConstraint(wc20); colC20 = 3359795; colB20 = 11189162; bx20 = 75; by20 = 50; bsize20 = 40.5; yslope20 = 3.4; particleSize20 = 5; bluecol20 = 3368618; darkbluecol20 = 2445948; go = true; start20 = new RectangleParticle(bx20, by20, 150, 10, -0.1, true); level20.addParticle(start20); start20.setStyle(3, colC20, 1, colB20); bx20 = (bx20 + 300); by20 = (by20 + 10); right20 = new RectangleParticle(bx20, by20, 150, 10, 0, true); level20.addParticle(right20); right20.setStyle(3, colC20, 1, colB20); bx20 = (bx20 + 100); by20 = (by20 + 100); righte20 = new RectangleParticle(bx20, by20, 200, 10, 0.1, true); level20.addParticle(righte20); righte20.setStyle(3, colC20, 1, colB20); bx20 = (bx20 - 300); by20 = (by20 + 10); left20 = new RectangleParticle(bx20, by20, 150, 10, 0, true); level20.addParticle(left20); left20.setStyle(3, colC20, 1, colB20); bx20 = (bx20 - 100); by20 = (by20 + 100); lefte20 = new RectangleParticle(bx20, by20, 150, 10, -0.1, true); level20.addParticle(lefte20); lefte20.setStyle(3, colC20, 1, colB20); bx20 = (bx20 + 300); by20 = (by20 + 10); end20 = new RectangleParticle(bx20, by20, 150, 10, 0, true); level20.addParticle(end20); end20.setStyle(3, colC20, 1, colB20); bx20 = (bx20 + 72); by20 = (by20 - 50); yhit20 = new RectangleParticle(bx20, by20, 10, 100, 0, true); level20.addParticle(yhit20); yhit20.sprite.name = "y"; yhit20.setStyle(3, 16040962, 1, 0xFFCC00, 1); bouncePad20 = new RectangleParticle(270, 400, 100, 10, 0, true); bouncePad20.setStyle(3, 11600129, 1, 14352898, 1); bouncePad20.elasticity = 0.6; level20.addParticle(bouncePad20); wa20.setStyle(3, 3359795, 1, 11189179, 1); wb20.setStyle(3, 3359795, 1, 11189179, 1); wc20.setStyle(3, 3359795, 1, 11189179, 1); ball20.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level20); ball20.addEventListener(CollisionEvent.COLLIDE, bahit20); } function frame40(){ stop(); levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl8); resetbut.addEventListener(MouseEvent.CLICK, reset8); addEventListener(Event.ENTER_FRAME, run); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed8); stage.addEventListener(KeyboardEvent.KEY_UP, key_released8); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level8 = new Group(); level8.collideInternal = true; ball8 = new CircleParticle(60, -10, 15, false, 2); level8.addParticle(ball8); minuteTimer.reset(); minuteTimer.start(); bottime.timetext.text = "30"; levelcomplete.levelname.text = "level 8 complete"; gameinstructions.text = "The trick is to aproach it slowly!"; lv8 = new RectangleParticle(-30, 200, 20, 550, 0, true); level8.addParticle(lv8); wa8 = new WheelParticle(10, 20, 15, false, 2); level8.addParticle(wa8); wb8 = new WheelParticle(50, 20, 15, false, 2); level8.addParticle(wb8); wc8 = new SpringConstraint(wa8, wb8, 0.5, true, 10); level8.addConstraint(wc8); colC8 = 3359795; colB8 = 11189162; bx8 = 36; by8 = 200; bsize8 = 40.5; yslope8 = 3.4; particleSize8 = 5; start8 = new RectangleParticle(bx8, by8, 100, 10, 0, true); level8.addParticle(start8); start8.setStyle(3, colC8, 1, colB8); bx8 = (bx8 + 50); bridgea8 = new CircleParticle(bx8, by8, particleSize8, true); bridgea8.setStyle(3, colC8, 1, colB8); level8.addParticle(bridgea8); bx8 = (bx8 + bsize8); by8 = (by8 + yslope8); bridgeb8 = new CircleParticle(bx8, by8, particleSize8, false); bridgeb8.setStyle(3, colC8, 1, colB8); level8.addParticle(bridgeb8); bx8 = (bx8 + bsize8); by8 = (by8 + yslope8); bridgec8 = new CircleParticle(bx8, by8, particleSize8, false); bridgec8.setStyle(3, colC8, 1, colB8); level8.addParticle(bridgec8); bx8 = (bx8 + bsize8); by8 = (by8 + yslope8); bridged8 = new CircleParticle(bx8, by8, particleSize8, false); bridged8.setStyle(3, colC8, 1, colB8); level8.addParticle(bridged8); bx8 = (bx8 + bsize8); by8 = (by8 + yslope8); bridgee8 = new CircleParticle(bx8, by8, particleSize8, false); bridgee8.setStyle(3, colC8, 1, colB8); level8.addParticle(bridgee8); bx8 = (bx8 + bsize8); by8 = (by8 + yslope8); bridgef8 = new CircleParticle(bx8, by8, particleSize8, false); bridgef8.setStyle(3, colC8, 1, colB8); level8.addParticle(bridgef8); bx8 = (bx8 + bsize8); by8 = (by8 + yslope8); bridgeg8 = new CircleParticle(bx8, by8, particleSize8, false); bridgeg8.setStyle(3, colC8, 1, colB8); level8.addParticle(bridgeg8); bx8 = (bx8 + bsize8); by8 = (by8 + yslope8); bridgeh8 = new CircleParticle(bx8, by8, 15, false); bridgeh8.setStyle(3, 11600129, 1, 14352898, 1); bridgeh8.elasticity = 7; level8.addParticle(bridgeh8); bx8 = (bx8 + bsize8); by8 = (by8 + yslope8); bx8 = (bx8 + 100); end8 = new RectangleParticle(bx8, by8, 200, 10, 0, true); level8.addParticle(end8); end8.setStyle(3, colC8, 1, colB8); bx8 = (bx8 - 100); bridgei8 = new CircleParticle(bx8, by8, particleSize8, true); bridgei8.setStyle(3, colC8, 1, colB8); level8.addParticle(bridgei8); bx8 = (bx8 + 120); by8 = (by8 + 200); rv8 = new RectangleParticle(570, 200, 20, 550, 0, true); level8.addParticle(rv8); bx8 = (bx8 - 50); yhit8 = new RectangleParticle(200, 100, 10, 80, 0.8, true); level8.addParticle(yhit8); yhit8.sprite.name = "y"; yhit8.setStyle(3, 16040962, 1, 0xFFCC00, 1); bia8 = new SpringConstraint(bridgea8, bridgeb8, 0.9, true, 10, 0.8); bia8.fixedEndLimit = 0.25; bia8.setStyle(3, colC8, 1, colB8); level8.addConstraint(bia8); bib8 = new SpringConstraint(bridgeb8, bridgec8, 0.9, true, 10, 0.8); bib8.fixedEndLimit = 0.25; bib8.setStyle(3, colC8, 1, colB8); level8.addConstraint(bib8); bic8 = new SpringConstraint(bridgec8, bridged8, 0.9, true, 10, 0.8); bic8.fixedEndLimit = 0.25; bic8.setStyle(3, colC8, 1, colB8); level8.addConstraint(bic8); bid8 = new SpringConstraint(bridged8, bridgee8, 0.9, true, 10, 0.8); bid8.fixedEndLimit = 0.25; bid8.setStyle(3, colC8, 1, colB8); level8.addConstraint(bid8); bie8 = new SpringConstraint(bridgee8, bridgef8, 0.9, true, 10, 0.8); bie8.fixedEndLimit = 0.25; bie8.setStyle(3, colC8, 1, colB8); level8.addConstraint(bie8); bif8 = new SpringConstraint(bridgef8, bridgeg8, 0.9, true, 10, 0.8); bif8.fixedEndLimit = 0.25; bif8.setStyle(3, colC8, 1, colB8); level8.addConstraint(bif8); big8 = new SpringConstraint(bridgeg8, bridgeh8, 0.9, true, 10, 0.8); big8.fixedEndLimit = 0.25; big8.setStyle(3, colC8, 1, colB8); level8.addConstraint(big8); bih8 = new SpringConstraint(bridgeh8, bridgei8, 0.9, true, 10, 0.8); bih8.fixedEndLimit = 0.25; bih8.setStyle(3, colC8, 1, colB8); level8.addConstraint(bih8); wa8.setStyle(3, 3359795, 1, 11189179, 1); wb8.setStyle(3, 3359795, 1, 11189179, 1); wc8.setStyle(3, 3359795, 1, 11189179, 1); ball8.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level8); ball8.addEventListener(CollisionEvent.COLLIDE, bahit8); } public function nextl8b(_arg1:MouseEvent):void{ nextFrame(); bottime.gotoAndStop(1); APEngine.removeGroup(level8b); levelcomplete.visible = false; mpause = false; go = true; } function frame35(){ levelcomplete.visible = false; levelcomplete.nextlev.addEventListener(MouseEvent.CLICK, nextl3s); resetbut.addEventListener(MouseEvent.CLICK, reset3s); stage.addEventListener(KeyboardEvent.KEY_DOWN, resetkeyr3s); removeEventListener(Event.ENTER_FRAME, bonusrun); addEventListener(Event.ENTER_FRAME, bonusrun3s); addEventListener(Event.ENTER_FRAME, spinball); stage.addEventListener(KeyboardEvent.KEY_DOWN, key_pressed3s); stage.addEventListener(KeyboardEvent.KEY_UP, key_released3s); APEngine.init((1 / 3)); APEngine.container = apiholder; APEngine.addForce(new VectorForce(false, 0, 2)); level3s = new Group(); level3s.collideInternal = true; pistongroup = new Group(); pistongroup.collideInternal = true; pistonholders = new Group(); pistonholders.collideInternal = true; pistongroup.addCollidable(pistonholders); level3s.addCollidable(pistongroup); APEngine.container.x = 0; APEngine.container.y = 0; ba3s = new CircleParticle(100, 10, 15, false, 2); level3s.addParticle(ba3s); mpause = false; gameinstructions.text = "Pistons"; levelcomplete.visible = false; levelcomplete.levelname.text = "Bonus level 4 complete"; lv3s = new RectangleParticle(-20, 200, 20, 400, 0, true); level3s.addParticle(lv3s); lv3s.visible = false; rv3s = new RectangleParticle(570, 200, 20, 400, 0, true); level3s.addParticle(rv3s); rv3s.visible = false; wa3s = new WheelParticle(10, 20, 15, false, 2); level3s.addParticle(wa3s); wb3s = new WheelParticle(50, 20, 15, false, 2); level3s.addParticle(wb3s); wc3s = new SpringConstraint(wa3s, wb3s, 0.5, true, 10); level3s.addConstraint(wc3s); wa3s.setStyle(3, 3359795, 1, 11189179, 1); wb3s.setStyle(3, 3359795, 1, 11189179, 1); wc3s.setStyle(3, 3359795, 1, 11189179, 1); floor3s = new RectangleParticle(70, 350, 140, 10, 0, true); level3s.addParticle(floor3s); floor3s.setStyle(3, 3359795, 1, 11189162, 1); floor23s = new RectangleParticle(300, 200, 100, 10, 0, true); level3s.addParticle(floor23s); floor23s.setStyle(3, 3359795, 1, 11189162, 1); floor33s = new RectangleParticle(510, 100, 100, 10, 0, true); level3s.addParticle(floor33s); floor33s.setStyle(3, 3359795, 1, 11189162, 1); pistoncog = new WheelParticle(200, 500, 30, true, 2); pistoncog.setStyle(4, 10066227, 1, 0x666600, 1); pistoncog.visible = false; pistoncog.collidable = false; pistongroup.addParticle(pistoncog); rim = new CircleParticle(200, 570, 5, false, 1); rim.collidable = false; rim.visible = false; pistongroup.addParticle(rim); piston = new RectangleParticle(200, 360, 100, 100, 0, false); piston.setStyle(0, 3368618, 1, 3368618, 1); pistongroup.addParticle(piston); pconnect = new SpringConstraint(rim, piston, 1, false); pconnect.setStyle(10, 3368618, 1, 3368618, 1); pistongroup.addConstraint(pconnect); pistonlside = new RectangleParticle(150, 220, 10, 400, 0, true); pistonholders.addParticle(pistonlside); pistonrside = new RectangleParticle(250, 220, 10, 400, 0, true); pistonholders.addParticle(pistonrside); pistonrside.visible = false; pistonlside.visible = false; pistoncog2 = new WheelParticle(415, 500, 30, true, 2); pistoncog2.setStyle(4, 10066227, 1, 0x666600, 1); pistoncog2.visible = false; pistoncog2.collidable = false; pistongroup.addParticle(pistoncog2); rim2 = new CircleParticle(415, 570, 5, false, 1); rim2.collidable = false; rim2.visible = false; pistongroup.addParticle(rim2); piston2 = new RectangleParticle(415, 270, 100, 100, 0, false); piston2.setStyle(0, 3368618, 1, 3368618, 1); pistongroup.addParticle(piston2); pconnect2 = new SpringConstraint(rim2, piston2, 1, false); pconnect2.setStyle(10, 3368618, 1, 3368618, 1); pistongroup.addConstraint(pconnect2); pistonlside2 = new RectangleParticle(365, 220, 10, 400, 0, true); pistonholders.addParticle(pistonlside2); pistonrside2 = new RectangleParticle(465, 220, 10, 400, 0, true); pistonholders.addParticle(pistonrside2); pistonrside2.visible = false; pistonlside2.visible = false; yhit3s = new RectangleParticle(545, 50, 10, 100, 0, true); yhit3s.sprite.name = "y"; yhit3s.setStyle(3, 16040962, 1, 0xFFCC00, 1); level3s.addParticle(yhit3s); ba3s.setStyle(3, 16040962, 1, 0xFFCC00, 1); APEngine.addGroup(level3s); APEngine.addGroup(pistongroup); APEngine.addGroup(pistonholders); ba3s.addEventListener(CollisionEvent.COLLIDE, bahit3s); radius = 100; radius2 = 55; } public function pausegamespaces(_arg1:KeyboardEvent):void{ var _local2:int; if (_arg1.keyCode == Keyboard.SPACE){ if (mpause == false){ mpause = true; _local2 = channel.position; channel.stop(); tpause = true; resetbut.visible = false; } else { channel = music.play(_local2, 99, volc); tpause = false; mpause = false; resetbut.visible = true; }; }; } public function trigbfunk13(_arg1:CollisionEvent):void{ var _local2:*; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "trigb"){ level13.removeConstraint(rightb13); }; } public function resetkeyr10(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa10.px = 10; wa10.py = 10; wb10.px = 50; wb10.py = 10; ball10.px = 100; ball10.py = 10; }; }; } public function resetkeyr12(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa12.px = 11; wa12.py = 11; wb12.px = 50; wb12.py = 11; ball12.px = 450; ball12.py = -10; level12.addParticle(boxb12); }; }; } public function resetkeyr13(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa13.px = 11; wa13.py = 11; wb13.px = 50; wb13.py = 11; ball13.px = 300; ball13.py = 250; bti13.px = 200; bti13.py = 170; btri13.px = 390; btri13.py = 150; level13.addConstraint(leftb13); level13.addConstraint(rightb13); }; }; } public function resetkeyr14(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa14.px = 11; wa14.py = 11; wb14.px = 50; wb14.py = 11; ball14.px = 50; ball14.py = -10; level14.addParticle(boxt14); }; }; } public function resetkeyr15(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa15.px = 11; wa15.py = 11; wb15.px = 50; wb15.py = 11; ball15.px = 100; ball15.py = -10; }; }; } public function resetkeyr19(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa19.px = 11; wa19.py = 11; wb19.px = 50; wb19.py = 11; ball19.px = 100; ball19.py = -10; swingball19.speed = -0.1; }; }; } public function resetkeyr17(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa17.px = 11; wa17.py = 11; wb17.px = 50; wb17.py = 11; ball17.px = 100; ball17.py = -10; }; }; } public function resetkeyr18(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa18.px = 11; wa18.py = 11; wb18.px = 50; wb18.py = 11; ball18.px = 100; ball18.py = -10; swingball18.px = 150; swingballb18.px = 275; swingballc18.px = 400; }; }; } public function resetkeyr16(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa16.px = 11; wa16.py = 11; wb16.px = 50; wb16.py = 11; ball16.px = 100; ball16.py = -10; swingDoorP2.py = 200; swingDoorP1l.py = 150; }; }; } public function resetkeyr20(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa20.px = 11; wa20.py = 11; wb20.px = 50; wb20.py = 11; ball20.px = 275; ball20.py = -10; }; }; } public function telleport7(_arg1:CollisionEvent):void{ var _local2:*; _local2 = _arg1.collidingItem.sprite.name; if (_local2 == "tel7"){ if (go == true){ ball7.setStyle(3, 0x330066, 1, 5505449, 1); ball7.px = 330; ball7.py = 250; }; }; } public function resetkeyr1s(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa1s.px = 10; wa1s.py = 20; wb1s.px = 50; wb1s.py = 20; ba1s.px = 100; ba1s.py = 10; sb1.py = 202.4; sb2.py = 204.8; sb2.px = 200; sb3.py = 207.2; level1s.addConstraint(bridgeCons1); }; }; } public function resetkeyr2s(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa2s.px = 10; wa2s.py = 20; wb2s.px = 50; wb2s.py = 20; ba2s.px = 100; ba2s.py = 10; sb1.py = 202.4; sb2.py = 204.8; sb2.px = 200; sb3.py = 207.2; level2s.addConstraint(bridgeCons12s); level2s.removeConstraint(fc2s); }; }; } public function stoptime(_arg1:MouseEvent):void{ if (mpause == false){ minuteTimer.start(); } else { minuteTimer.stop(); }; } public function resetkeyr3s(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa3s.px = 10; wa3s.py = 20; wb3s.px = 50; wb3s.py = 20; ba3s.px = 100; ba3s.py = 10; }; }; } public function key_released10(_arg1:KeyboardEvent):void{ wa10.angularVelocity = 0; wb10.angularVelocity = 0; } public function key_released11(_arg1:KeyboardEvent):void{ wa11.angularVelocity = 0; wb11.angularVelocity = 0; } public function key_released12(_arg1:KeyboardEvent):void{ wa12.angularVelocity = 0; wb12.angularVelocity = 0; } public function key_released13(_arg1:KeyboardEvent):void{ wa13.angularVelocity = 0; wb13.angularVelocity = 0; } public function key_released14(_arg1:KeyboardEvent):void{ wa14.angularVelocity = 0; wb14.angularVelocity = 0; } public function key_released16(_arg1:KeyboardEvent):void{ wa16.angularVelocity = 0; wb16.angularVelocity = 0; } public function key_released17(_arg1:KeyboardEvent):void{ wa17.angularVelocity = 0; wb17.angularVelocity = 0; } public function key_released19(_arg1:KeyboardEvent):void{ wa19.angularVelocity = 0; wb19.angularVelocity = 0; } public function key_released15(_arg1:KeyboardEvent):void{ wa15.angularVelocity = 0; wb15.angularVelocity = 0; } public function key_released18(_arg1:KeyboardEvent):void{ wa18.angularVelocity = 0; wb18.angularVelocity = 0; } public function key_released20(_arg1:KeyboardEvent):void{ wa20.angularVelocity = 0; wb20.angularVelocity = 0; } public function onPlaybackComplete2(_arg1:Event){ if (mute == false){ if (levelcomplete.visible == true){ SoundMixer.soundTransform = new SoundTransform(0.2, 0); } else { SoundMixer.soundTransform = new SoundTransform(0.8, 0); }; } else { SoundMixer.soundTransform = new SoundTransform(0, 0); }; } public function resetkeyr5s(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa5s.px = 260; wa5s.py = 20; wb5s.px = 300; wb5s.py = 20; ba5s.px = 280; ba5s.py = 10; }; }; } public function resetkeyr4s(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa4s.px = 260; wa4s.py = 20; wb4s.px = 300; wb4s.py = 20; ba4s.px = 200; ba4s.py = 10; swingcirc.px = 370; swingcirc.py = 60; }; }; } public function key_released1s(_arg1:KeyboardEvent):void{ wa1s.angularVelocity = 0; wb1s.angularVelocity = 0; } public function key_released2s(_arg1:KeyboardEvent):void{ wa2s.angularVelocity = 0; wb2s.angularVelocity = 0; } public function key_released3s(_arg1:KeyboardEvent):void{ wa3s.angularVelocity = 0; wb3s.angularVelocity = 0; } public function key_released4s(_arg1:KeyboardEvent):void{ wa4s.angularVelocity = 0; wb4s.angularVelocity = 0; } public function run(_arg1:Event):void{ if (mpause == false){ APEngine.step(); APEngine.paint(); }; } public function key_released5s(_arg1:KeyboardEvent):void{ wa5s.angularVelocity = 0; wb5s.angularVelocity = 0; } public function key_released8b(_arg1:KeyboardEvent):void{ wa8b.angularVelocity = 0; wb8b.angularVelocity = 0; } public function pausegamespace(_arg1:KeyboardEvent):void{ var _local2:int; if (_arg1.keyCode == Keyboard.SPACE){ if (mpause == false){ mpause = true; _local2 = channel.position; channel.stop(); tpause = true; resetbut.visible = false; } else { channel = music.play(_local2, 99, volc); tpause = false; mpause = false; resetbut.visible = true; }; }; } public function reset10(_arg1:MouseEvent):void{ if (go == true){ wa10.px = 10; wa10.py = 10; wb10.px = 50; wb10.py = 10; ball10.px = 100; ball10.py = 10; }; } public function reset11(_arg1:MouseEvent):void{ if (go == true){ wa11.px = 11; wa11.py = 11; wb11.px = 50; wb11.py = 11; ball11.px = 110; ball11.py = 11; }; } public function reset12(_arg1:MouseEvent):void{ if (go == true){ wa12.px = 11; wa12.py = 11; wb12.px = 50; wb12.py = 11; ball12.px = 450; ball12.py = -10; level12.addParticle(boxb12); }; } public function reset13(_arg1:MouseEvent):void{ if (go == true){ wa13.px = 11; wa13.py = 11; wb13.px = 50; wb13.py = 11; ball13.px = 300; ball13.py = 250; bti13.px = 200; bti13.py = 170; btri13.px = 390; btri13.py = 150; level13.addConstraint(leftb13); level13.addConstraint(rightb13); }; } public function reset14(_arg1:MouseEvent):void{ if (go == true){ wa14.px = 11; wa14.py = 11; wb14.px = 50; wb14.py = 11; ball14.px = 50; ball14.py = -10; level14.addParticle(boxt14); }; } public function reset15(_arg1:MouseEvent):void{ if (go == true){ wa15.px = 11; wa15.py = 11; wb15.px = 50; wb15.py = 11; ball15.px = 100; ball15.py = -10; }; } public function reset16(_arg1:MouseEvent):void{ if (go == true){ wa16.px = 11; wa16.py = 11; wb16.px = 50; wb16.py = 11; ball16.px = 100; ball16.py = -10; swingDoorP2.py = 200; swingDoorP1l.py = 150; }; } public function reset17(_arg1:MouseEvent):void{ if (go == true){ wa17.px = 11; wa17.py = 11; wb17.px = 50; wb17.py = 11; ball17.px = 100; ball17.py = -10; }; } public function reset18(_arg1:MouseEvent):void{ if (go == true){ wa18.px = 11; wa18.py = 11; wb18.px = 50; wb18.py = 11; ball18.px = 100; ball18.py = -10; swingball18.px = 150; swingballb18.px = 275; swingballc18.px = 400; }; } public function reset19(_arg1:MouseEvent):void{ if (go == true){ wa19.px = 11; wa19.py = 11; wb19.px = 50; wb19.py = 11; ball19.px = 100; ball19.py = -10; swingball19.speed = 0; }; } public function resetkeyr(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa.px = 10; wa.py = 20; wb.px = 50; wb.py = 20; ba.px = 100; ba.py = 10; }; }; } public function reset20(_arg1:MouseEvent):void{ if (go == true){ wa20.px = 11; wa20.py = 11; wb20.px = 50; wb20.py = 11; ball20.px = 275; ball20.py = -10; }; } public function reset1s(_arg1:MouseEvent):void{ if (go == true){ wa1s.px = 10; wa1s.py = 20; wb1s.px = 50; wb1s.py = 20; ba1s.px = 100; ba1s.py = 10; sb1.py = 202.4; sb2.py = 204.8; sb2.px = 200; sb3.py = 207.2; level1s.addConstraint(bridgeCons1); }; } public function onTimerComplete(_arg1:TimerEvent):void{ bottime.timetext.text = "0!"; lifebar.nextFrame(); liveslost++; minuteTimer.reset(); minuteTimer.start(); if (liveslost > 4){ minuteTimer.stop(); bottime.gotoAndStop(3); minuteTimer.removeEventListener(TimerEvent.TIMER, onTick); removeEventListener(KeyboardEvent.KEY_DOWN, stopgamespace); pausecont.pausebut.removeEventListener(MouseEvent.CLICK, stoptime); removeEventListener(Event.ENTER_FRAME, run); failscreen.visible = true; mpause = true; failscreen.finalscore.text = oscore; }; } public function reset2s(_arg1:MouseEvent):void{ if (go == true){ wa2s.px = 10; wa2s.py = 20; wb2s.px = 50; wb2s.py = 20; ba2s.px = 100; ba2s.py = 10; sb1.py = 202.4; sb2.py = 204.8; sb2.px = 200; sb3.py = 207.2; }; } public function onTick(_arg1:TimerEvent):void{ if (go == true){ bottime.timetext.text = (origtime + -(_arg1.target.currentCount)); scoretime = bottime.timetext.text; }; } public function reset3s(_arg1:MouseEvent):void{ if (go == true){ wa3s.px = 10; wa3s.py = 20; wb3s.px = 50; wb3s.py = 20; ba3s.px = 100; ba3s.py = 10; }; } public function reset4s(_arg1:MouseEvent):void{ if (go == true){ wa4s.px = 260; wa4s.py = 20; wb4s.px = 300; wb4s.py = 20; ba4s.px = 200; ba4s.py = 10; swingcirc.px = 370; swingcirc.py = 60; }; } public function reset5s(_arg1:MouseEvent):void{ if (go == true){ wa5s.px = 260; wa5s.py = 20; wb5s.px = 300; wb5s.py = 20; ba5s.px = 280; ba5s.py = 10; }; } public function resetkeyr2(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa1.px = 10; wa1.py = 20; wb1.px = 50; wb1.py = 20; cp.px = 100; cp.py = 10; }; }; } public function resetkeyr3(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa3.px = 10; wa3.py = 20; wb3.px = 50; wb3.py = 20; ball.px = 100; ball.py = 10; }; }; } public function resetkeyr4(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa4.px = 10; wa4.py = 20; wb4.px = 50; wb4.py = 20; ball4.px = 330; ball4.py = 200; oend4.px = 380; oend4.py = 120; }; }; } public function resetkeyr5(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa5.px = 10; wa5.py = 20; wb5.px = 50; wb5.py = 20; ball5.px = 330; ball5.py = 100; boxl5.px = 100; boxl5.py = 100; boxr5.px = 150; boxr5.py = 100; }; }; } public function resetkeyr7(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa7.px = 10; wa7.py = 20; wb7.px = 50; wb7.py = 20; ball7.px = 100; ball7.py = 10; }; }; } public function key_released3(_arg1:KeyboardEvent):void{ wa3.angularVelocity = 0; wb3.angularVelocity = 0; } public function key_released4(_arg1:KeyboardEvent):void{ wa4.angularVelocity = 0; wb4.angularVelocity = 0; } public function key_released5(_arg1:KeyboardEvent):void{ wa5.angularVelocity = 0; wb5.angularVelocity = 0; } public function key_released6(_arg1:KeyboardEvent):void{ wa6.angularVelocity = 0; wb6.angularVelocity = 0; } public function key_released7(_arg1:KeyboardEvent):void{ wa7.angularVelocity = 0; wb7.angularVelocity = 0; } public function key_released1(_arg1:KeyboardEvent):void{ wa1.angularVelocity = 0; wb1.angularVelocity = 0; } public function key_released9(_arg1:KeyboardEvent):void{ wa9.angularVelocity = 0; wb9.angularVelocity = 0; } public function resetkeyr8(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa8b.px = 10; wa8b.py = 20; wb8b.px = 50; wb8b.py = 20; seel8b.px = 230; seel8b.py = 244; seer8b.px = 430; seer8b.py = 244; ball8b.px = 410; ball8b.py = 230; }; }; } public function resetkeyr9(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa9.px = 10; wa9.py = 200; wb9.px = 50; wb9.py = 200; ball9.px = 100; ball9.py = 200; botswing9.px = 410; botswing9.py = -150; }; }; } public function reset8b(_arg1:MouseEvent):void{ if (go == true){ wa8b.px = 10; wa8b.py = 20; wb8b.px = 50; wb8b.py = 20; seel8b.px = 230; seel8b.py = 244; seer8b.px = 430; seer8b.py = 244; ball8b.px = 410; ball8b.py = 230; }; } public function key_released8(_arg1:KeyboardEvent):void{ wa8.angularVelocity = 0; wb8.angularVelocity = 0; } public function reset2(_arg1:MouseEvent):void{ if (go == true){ wa1.px = 10; wa1.py = 20; wb1.px = 50; wb1.py = 20; cp.px = 100; cp.py = 10; }; } public function reset3(_arg1:MouseEvent):void{ if (go == true){ wa3.px = 10; wa3.py = 20; wb3.px = 50; wb3.py = 20; ball.px = 100; ball.py = 10; }; } public function reset4(_arg1:MouseEvent):void{ if (go == true){ wa4.px = 10; wa4.py = 20; wb4.px = 50; wb4.py = 20; ball4.px = 330; ball4.py = 200; oend4.px = 380; oend4.py = 120; }; } public function reset5(_arg1:MouseEvent):void{ if (go == true){ wa5.px = 10; wa5.py = 20; wb5.px = 50; wb5.py = 20; ball5.px = 330; ball5.py = 100; boxl5.px = 100; boxl5.py = 100; boxr5.px = 150; boxr5.py = 100; }; } public function reset6(_arg1:MouseEvent):void{ if (go == true){ wa6.px = 10; wa6.py = 20; wb6.px = 50; wb6.py = 20; ball6.px = 100; ball6.py = 10; }; } public function reset7(_arg1:MouseEvent):void{ if (go == true){ wa7.px = 10; wa7.py = 20; wb7.px = 50; wb7.py = 20; ball7.px = 100; ball7.py = 10; }; } public function reset8(_arg1:MouseEvent):void{ if (go == true){ wa8.px = 10; wa8.py = 20; wb8.px = 50; wb8.py = 20; ball8.px = 50; ball8.py = -10; }; } public function reset9(_arg1:MouseEvent):void{ if (go == true){ wa9.px = 10; wa9.py = 200; wb9.px = 50; wb9.py = 200; ball9.px = 100; ball9.py = 200; botswing9.px = 410; botswing9.py = -150; }; } public function resetkeyr6(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == 82){ if (go == true){ wa6.px = 10; wa6.py = 20; wb6.px = 50; wb6.py = 20; ball6.px = 100; ball6.py = 10; }; }; } public function key_releasedm(_arg1:KeyboardEvent):void{ wam.angularVelocity = 0; wbm.angularVelocity = 0; } public function spinball(_arg1:Event):void{ var _local2:Number; if (mpause == false){ _local2 = (pistoncog.radian + 3.14159); rim.px = ((-(radius) * Math.sin(_local2)) + pistoncog.px); rim.py = ((radius * Math.cos(_local2)) + pistoncog.py); pistoncog.speed = 0.005; rim2.px = ((-(radius2) * Math.sin(_local2)) + pistoncog2.px); rim2.py = ((radius2 * Math.cos(_local2)) + pistoncog2.py); pistoncog2.speed = 0.005; }; } public function reset(_arg1:MouseEvent):void{ if (go == true){ wa.px = 10; wa.py = 20; wb.px = 50; wb.py = 20; ba.px = 100; ba.py = 10; }; } public function submitscore(_arg1:MouseEvent):void{ MochiScores.showLeaderboard({boardID:"5acc26ef28e079d6", score:oscore}); failscreen.subhold.gotoAndStop(2); failscreen.subtext.gotoAndStop(2); } public function doSomething2(_arg1:ContextMenuEvent):void{ var _local2:String; var _local3:URLRequest; _local2 = "http://tudway.blogspot.com/"; _local3 = new URLRequest(_local2); navigateToURL(_local3, "_blank"); } public function mutesound(_arg1:MouseEvent):void{ if (mute == false){ mutebut.fake.visible = true; SoundMixer.soundTransform = new SoundTransform(0, 0); mute = true; } else { mutebut.fake.visible = false; SoundMixer.soundTransform = new SoundTransform(0.8, 0); mute = false; }; } public function key_pressed10(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa10.angularVelocity = 0.6; wb10.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa10.angularVelocity = -0.6; wb10.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed11(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa11.angularVelocity = 0.6; wb11.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa11.angularVelocity = -0.6; wb11.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed12(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa12.angularVelocity = 0.6; wb12.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa12.angularVelocity = -0.6; wb12.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed13(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa13.angularVelocity = 0.6; wb13.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa13.angularVelocity = -0.6; wb13.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed16(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa16.angularVelocity = 0.6; wb16.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa16.angularVelocity = -0.6; wb16.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed17(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa17.angularVelocity = 0.6; wb17.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa17.angularVelocity = -0.6; wb17.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed18(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa18.angularVelocity = 0.6; wb18.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa18.angularVelocity = -0.6; wb18.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed19(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa19.angularVelocity = 0.6; wb19.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa19.angularVelocity = -0.6; wb19.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed14(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa14.angularVelocity = 0.6; wb14.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa14.angularVelocity = -0.6; wb14.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } public function key_pressed15(_arg1:KeyboardEvent):void{ if (go == true){ if (_arg1.keyCode == Keyboard.RIGHT){ wa15.angularVelocity = 0.6; wb15.angularVelocity = 0.6; }; if (_arg1.keyCode == Keyboard.LEFT){ wa15.angularVelocity = -0.6; wb15.angularVelocity = -0.6; }; }; if (_arg1.keyCode == Keyboard.SPACE){ }; } } }//package SteerWheels_fla
Section 49
//mutebut_32 (SteerWheels_fla.mutebut_32) package SteerWheels_fla { import flash.display.*; import flash.events.*; import flash.text.*; import flash.utils.*; import flash.ui.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.net.*; public dynamic class mutebut_32 extends MovieClip { public var fake:SimpleButton; public var soundplay:SimpleButton; public function mutebut_32(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package SteerWheels_fla
Section 50
//ngrscreen_25 (SteerWheels_fla.ngrscreen_25) package SteerWheels_fla { import flash.display.*; public dynamic class ngrscreen_25 extends MovieClip { public var grcom:SimpleButton; } }//package SteerWheels_fla
Section 51
//pausecontainer_41 (SteerWheels_fla.pausecontainer_41) package SteerWheels_fla { import flash.display.*; import flash.events.*; import flash.text.*; import flash.utils.*; import flash.ui.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.net.*; public dynamic class pausecontainer_41 extends MovieClip { public var playbut:SimpleButton; public var pausebut:SimpleButton; public function pausecontainer_41(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package SteerWheels_fla
Section 52
//playerdetectetion_2 (SteerWheels_fla.playerdetectetion_2) package SteerWheels_fla { import flash.display.*; public dynamic class playerdetectetion_2 extends MovieClip { public var updatebut:SimpleButton; public var bg:MovieClip; } }//package SteerWheels_fla
Section 53
//subholder_50 (SteerWheels_fla.subholder_50) package SteerWheels_fla { import flash.display.*; import flash.events.*; import flash.text.*; import flash.utils.*; import flash.ui.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.net.*; public dynamic class subholder_50 extends MovieClip { public var submitbut:SimpleButton; public function subholder_50(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package SteerWheels_fla
Section 54
//submitted_49 (SteerWheels_fla.submitted_49) package SteerWheels_fla { import flash.display.*; import flash.events.*; import flash.text.*; import flash.utils.*; import flash.ui.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.net.*; public dynamic class submitted_49 extends MovieClip { public function submitted_49(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package SteerWheels_fla
Section 55
//tudwayintro_10 (SteerWheels_fla.tudwayintro_10) package SteerWheels_fla { import flash.display.*; import flash.events.*; import flash.text.*; import flash.utils.*; import flash.ui.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.net.*; public dynamic class tudwayintro_10 extends MovieClip { public var tudbut:SimpleButton; public var tudwrite:MovieClip; public function tudwayintro_10(){ addFrameScript(0, frame1, 111, frame112, 260, frame261, 261, frame262); } public function randomtuds(_arg1:Event){ tudwrite.scaleX = (0.9 + (Math.random() / 30)); tudwrite.scaleY = (0.9 + (Math.random() / 10)); } function frame1(){ tudbut.addEventListener(MouseEvent.CLICK, gettud); } function frame112(){ addEventListener(Event.ENTER_FRAME, randomtuds); } function frame261(){ removeEventListener(Event.ENTER_FRAME, randomtuds); } function frame262(){ parent.gotoAndStop(5); } public function gettud(_arg1:MouseEvent):void{ var _local2:String; var _local3:URLRequest; _local2 = "http://www.tudway.blogspot.com"; _local3 = new URLRequest(_local2); navigateToURL(_local3, "_blank"); } } }//package SteerWheels_fla
Section 56
//boing (boing) package { import flash.media.*; public dynamic class boing extends Sound { } }//package
Section 57
//focusRectSkin (focusRectSkin) package { import flash.display.*; public dynamic class focusRectSkin extends MovieClip { } }//package
Section 58
//MochiBot (MochiBot) package { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ var _local3:MochiBot; var _local4:String; var _local5:URLVariables; var _local6:String; var _local7:URLRequest; var _local8:Loader; if (Security.sandboxType == "localWithFile"){ return (null); }; _local3 = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); _local4 = "http://core.mochibot.com/my/core.swf"; _local5 = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; _local6 = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; _local7 = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; _local8 = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 59
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_disabledSkin extends MovieClip { } }//package
Section 60
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_downSkin extends MovieClip { } }//package
Section 61
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_overSkin extends MovieClip { } }//package
Section 62
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin) package { import flash.display.*; public dynamic class ScrollArrowDown_upSkin extends MovieClip { } }//package
Section 63
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_disabledSkin extends MovieClip { } }//package
Section 64
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_downSkin extends MovieClip { } }//package
Section 65
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_overSkin extends MovieClip { } }//package
Section 66
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin) package { import flash.display.*; public dynamic class ScrollArrowUp_upSkin extends MovieClip { } }//package
Section 67
//ScrollBar_thumbIcon (ScrollBar_thumbIcon) package { import flash.display.*; public dynamic class ScrollBar_thumbIcon extends MovieClip { } }//package
Section 68
//ScrollThumb_downSkin (ScrollThumb_downSkin) package { import flash.display.*; public dynamic class ScrollThumb_downSkin extends MovieClip { } }//package
Section 69
//ScrollThumb_overSkin (ScrollThumb_overSkin) package { import flash.display.*; public dynamic class ScrollThumb_overSkin extends MovieClip { } }//package
Section 70
//ScrollThumb_upSkin (ScrollThumb_upSkin) package { import flash.display.*; public dynamic class ScrollThumb_upSkin extends MovieClip { } }//package
Section 71
//ScrollTrack_skin (ScrollTrack_skin) package { import flash.display.*; public dynamic class ScrollTrack_skin extends MovieClip { } }//package
Section 72
//theme (theme) package { import flash.media.*; public dynamic class theme extends Sound { } }//package

Library Items

Symbol 1 Sound
Symbol 2 Sound
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClipUses:3Used by:36
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClip {ScrollBar_thumbIcon}Uses:5Used by:36
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClip {ScrollArrowUp_disabledSkin}Uses:7Used by:36
Symbol 9 GraphicUsed by:10
Symbol 10 MovieClip {ScrollArrowDown_disabledSkin}Uses:9Used by:36
Symbol 11 GraphicUsed by:13 16 24 28
Symbol 12 GraphicUsed by:13
Symbol 13 MovieClip {ScrollArrowDown_upSkin}Uses:11 12Used by:36
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClip {ScrollThumb_upSkin}Uses:14Used by:36
Symbol 16 MovieClipUses:11Used by:18 20 30
Symbol 17 GraphicUsed by:18
Symbol 18 MovieClip {ScrollArrowUp_upSkin}Uses:16 17Used by:36
Symbol 19 GraphicUsed by:20
Symbol 20 MovieClip {ScrollArrowUp_overSkin}Uses:16 19Used by:36
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClip {ScrollThumb_overSkin}Uses:21Used by:36
Symbol 23 GraphicUsed by:24
Symbol 24 MovieClip {ScrollArrowDown_overSkin}Uses:11 23Used by:36
Symbol 25 GraphicUsed by:26
Symbol 26 MovieClip {ScrollThumb_downSkin}Uses:25Used by:36
Symbol 27 GraphicUsed by:28
Symbol 28 MovieClip {ScrollArrowDown_downSkin}Uses:11 27Used by:36
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClip {ScrollArrowUp_downSkin}Uses:16 29Used by:36
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClip {ScrollTrack_skin}Uses:31Used by:36
Symbol 33 GraphicUsed by:34
Symbol 34 MovieClip {focusRectSkin}Uses:33Used by:36
Symbol 35 MovieClip {fl.core.ComponentShim}Used by:36
Symbol 36 MovieClip {fl.controls.UIScrollBar}Uses:4 6 8 10 13 15 18 20 22 24 26 28 30 32 34 35
Symbol 37 BitmapUsed by:38
Symbol 38 GraphicUses:37Used by:61  Timeline
Symbol 39 GraphicUsed by:40
Symbol 40 MovieClipUses:39Used by:Timeline
Symbol 41 GraphicUsed by:Timeline
Symbol 42 FontUsed by:43
Symbol 43 EditableTextUses:42Used by:Timeline
Symbol 44 GraphicUsed by:61  Timeline
Symbol 45 GraphicUsed by:46 50
Symbol 46 MovieClipUses:45Used by:48
Symbol 47 GraphicUsed by:48 50
Symbol 48 MovieClipUses:46 47Used by:49 50
Symbol 49 MovieClipUses:48Used by:50
Symbol 50 ButtonUses:48 49 47 45Used by:58 132 139 147 209
Symbol 51 FontUsed by:52 126 127 128 204 205 206 207
Symbol 52 TextUses:51Used by:58
Symbol 53 FontUsed by:54 83 84 85 93 94 98 105 108 109 110 112 113 114 116 117 118 119 120 121 122 129 130 133 140 141 143 144 145 162 164 165 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 208 210 211
Symbol 54 TextUses:53Used by:58
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClipUses:55Used by:58 132 147
Symbol 57 GraphicUsed by:58
Symbol 58 MovieClip {SteerWheels_fla.playerdetectetion_2}Uses:50 52 54 56 57Used by:Timeline
Symbol 59 GraphicUsed by:60 63 64
Symbol 60 ButtonUses:59Used by:61
Symbol 61 MovieClip {SteerWheels_fla.gamesrelodedintro_8}Uses:60 38 44 SS1Used by:Timeline
Symbol 62 GraphicUsed by:82
Symbol 63 MovieClipUses:59Used by:64
Symbol 64 ButtonUses:63 59Used by:82
Symbol 65 GraphicUsed by:82
Symbol 66 GraphicUsed by:82
Symbol 67 GraphicUsed by:82
Symbol 68 GraphicUsed by:82
Symbol 69 GraphicUsed by:82
Symbol 70 GraphicUsed by:82
Symbol 71 GraphicUsed by:82
Symbol 72 GraphicUsed by:82
Symbol 73 GraphicUsed by:82
Symbol 74 GraphicUsed by:82
Symbol 75 GraphicUsed by:76 82
Symbol 76 MovieClipUses:75Used by:82
Symbol 77 FontUsed by:78
Symbol 78 TextUses:77Used by:79
Symbol 79 MovieClipUses:78Used by:82
Symbol 80 GraphicUsed by:81
Symbol 81 MovieClipUses:80Used by:82
Symbol 82 MovieClip {SteerWheels_fla.tudwayintro_10}Uses:62 64 65 66 67 68 69 70 71 72 73 74 75 76 79 81 SS2Used by:Timeline
Symbol 83 TextUses:53Used by:97 111 115
Symbol 84 TextUses:53Used by:97
Symbol 85 TextUses:53Used by:89 90
Symbol 86 GraphicUsed by:89 90
Symbol 87 GraphicUsed by:88 90
Symbol 88 MovieClipUses:87Used by:89
Symbol 89 MovieClipUses:85 86 88Used by:90
Symbol 90 ButtonUses:89 87 86 85Used by:97 132
Symbol 91 GraphicUsed by:92
Symbol 92 MovieClipUses:91Used by:97 111 115 209
Symbol 93 TextUses:53Used by:97
Symbol 94 TextUses:53Used by:97
Symbol 95 GraphicUsed by:96
Symbol 96 MovieClipUses:95Used by:97 111 115 209
Symbol 97 MovieClip {SteerWheels_fla.ngrscreen_25}Uses:83 84 90 92 93 94 96Used by:Timeline
Symbol 98 TextUses:53Used by:111
Symbol 99 GraphicUsed by:100 157 180 183
Symbol 100 MovieClipUses:99Used by:102
Symbol 101 GraphicUsed by:102 157
Symbol 102 MovieClipUses:100 101Used by:104 156
Symbol 103 GraphicUsed by:104
Symbol 104 MovieClipUses:102 103Used by:111
Symbol 105 TextUses:53Used by:111
Symbol 106 GraphicUsed by:107
Symbol 107 MovieClipUses:106Used by:111
Symbol 108 TextUses:53Used by:111
Symbol 109 TextUses:53Used by:111
Symbol 110 TextUses:53Used by:111
Symbol 111 MovieClipUses:98 83 104 105 92 107 108 109 110 96Used by:Timeline
Symbol 112 TextUses:53Used by:115
Symbol 113 TextUses:53Used by:115
Symbol 114 TextUses:53Used by:115
Symbol 115 MovieClipUses:112 113 83 92 114 96Used by:Timeline
Symbol 116 EditableTextUses:53Used by:Timeline
Symbol 117 EditableTextUses:53Used by:Timeline
Symbol 118 EditableTextUses:53Used by:Timeline
Symbol 119 TextUses:53Used by:Timeline
Symbol 120 TextUses:53Used by:Timeline
Symbol 121 EditableTextUses:53Used by:Timeline
Symbol 122 EditableTextUses:53Used by:Timeline
Symbol 123 GraphicUsed by:Timeline
Symbol 124 GraphicUsed by:125
Symbol 125 MovieClipUses:124Used by:Timeline
Symbol 126 EditableTextUses:51Used by:132
Symbol 127 EditableTextUses:51Used by:132
Symbol 128 EditableTextUses:51Used by:132
Symbol 129 TextUses:53Used by:132
Symbol 130 EditableTextUses:53Used by:132
Symbol 131 GraphicUsed by:132
Symbol 132 MovieClip {SteerWheels_fla.levelcomplete_54}Uses:126 127 128 90 50 129 130 131 56Used by:Timeline
Symbol 133 TextUses:53Used by:137 138
Symbol 134 GraphicUsed by:137 138
Symbol 135 GraphicUsed by:136 138
Symbol 136 MovieClipUses:135Used by:137
Symbol 137 MovieClipUses:133 134 136Used by:138
Symbol 138 ButtonUses:137 135 134 133Used by:147 209
Symbol 139 MovieClip {SteerWheels_fla.subholder_50}Uses:50Used by:147 209
Symbol 140 TextUses:53Used by:142
Symbol 141 TextUses:53Used by:142
Symbol 142 MovieClip {SteerWheels_fla.submitted_49}Uses:140 141Used by:147 209
Symbol 143 TextUses:53Used by:147 209
Symbol 144 EditableTextUses:53Used by:147
Symbol 145 TextUses:53Used by:147
Symbol 146 GraphicUsed by:147
Symbol 147 MovieClip {SteerWheels_fla.dead_48}Uses:138 139 142 50 143 144 145 56 146Used by:Timeline
Symbol 148 GraphicUsed by:149
Symbol 149 MovieClipUses:148Used by:Timeline
Symbol 150 GraphicUsed by:155
Symbol 151 GraphicUsed by:155
Symbol 152 GraphicUsed by:155
Symbol 153 GraphicUsed by:155
Symbol 154 GraphicUsed by:155
Symbol 155 MovieClip {SteerWheels_fla.lives_46}Uses:150 151 152 153 154Used by:Timeline
Symbol 156 MovieClipUses:102Used by:157
Symbol 157 ButtonUses:156 101 99Used by:161
Symbol 158 GraphicUsed by:159 160
Symbol 159 MovieClipUses:158Used by:160
Symbol 160 ButtonUses:159 158Used by:161
Symbol 161 MovieClip {SteerWheels_fla.pausecontainer_41}Uses:157 160Used by:Timeline
Symbol 162 EditableTextUses:53Used by:166
Symbol 163 GraphicUsed by:166
Symbol 164 TextUses:53Used by:166
Symbol 165 TextUses:53Used by:166
Symbol 166 MovieClip {SteerWheels_fla.bottime_40}Uses:162 163 164 165Used by:Timeline
Symbol 167 GraphicUsed by:168
Symbol 168 MovieClipUses:167Used by:Timeline
Symbol 169 GraphicUsed by:170 175 178
Symbol 170 MovieClipUses:169Used by:174 177
Symbol 171 GraphicUsed by:172 175 178
Symbol 172 MovieClipUses:171Used by:174 177
Symbol 173 GraphicUsed by:174 175
Symbol 174 MovieClipUses:170 172 173Used by:175
Symbol 175 ButtonUses:174 173 171 169Used by:179
Symbol 176 GraphicUsed by:177 178
Symbol 177 MovieClipUses:170 172 176Used by:178
Symbol 178 ButtonUses:177 176 171 169Used by:179
Symbol 179 MovieClip {SteerWheels_fla.mutebut_32}Uses:175 178Used by:Timeline
Symbol 180 MovieClipUses:99Used by:182
Symbol 181 GraphicUsed by:182 183
Symbol 182 MovieClipUses:180 181Used by:183
Symbol 183 ButtonUses:182 181 99Used by:Timeline
Symbol 184 EditableTextUses:53Used by:Timeline
Symbol 185 EditableTextUses:53Used by:Timeline
Symbol 186 EditableTextUses:53Used by:Timeline
Symbol 187 EditableTextUses:53Used by:Timeline
Symbol 188 EditableTextUses:53Used by:Timeline
Symbol 189 EditableTextUses:53Used by:Timeline
Symbol 190 EditableTextUses:53Used by:Timeline
Symbol 191 EditableTextUses:53Used by:Timeline
Symbol 192 EditableTextUses:53Used by:Timeline
Symbol 193 EditableTextUses:53Used by:Timeline
Symbol 194 EditableTextUses:53Used by:Timeline
Symbol 195 EditableTextUses:53Used by:Timeline
Symbol 196 EditableTextUses:53Used by:Timeline
Symbol 197 EditableTextUses:53Used by:Timeline
Symbol 198 EditableTextUses:53Used by:Timeline
Symbol 199 EditableTextUses:53Used by:Timeline
Symbol 200 EditableTextUses:53Used by:Timeline
Symbol 201 EditableTextUses:53Used by:Timeline
Symbol 202 EditableTextUses:53Used by:Timeline
Symbol 203 EditableTextUses:53Used by:Timeline
Symbol 204 EditableTextUses:51Used by:209
Symbol 205 EditableTextUses:51Used by:209
Symbol 206 EditableTextUses:51Used by:209
Symbol 207 EditableTextUses:51Used by:209
Symbol 208 TextUses:53Used by:209
Symbol 209 MovieClip {SteerWheels_fla.comple_55}Uses:138 204 205 206 139 142 50 143 207 208 92 96Used by:Timeline
Symbol 210 EditableTextUses:53Used by:Timeline
Symbol 211 EditableTextUses:53Used by:Timeline
Streaming Sound 1Used by:Symbol 61 MovieClip {SteerWheels_fla.gamesrelodedintro_8}
Streaming Sound 2Used by:Symbol 82 MovieClip {SteerWheels_fla.tudwayintro_10}

Instance Names

"loadBar"Frame 1Symbol 40 MovieClip
"loadText"Frame 1Symbol 43 EditableText
"fdetect"Frame 2Symbol 58 MovieClip {SteerWheels_fla.playerdetectetion_2}
"ngrscreen"Frame 5Symbol 97 MovieClip {SteerWheels_fla.ngrscreen_25}
"helpscreen"Frame 5Symbol 111 MovieClip
"creditscreen"Frame 5Symbol 115 MovieClip
"helptextm"Frame 5Symbol 116 EditableText
"bonushightextm"Frame 5Symbol 117 EditableText
"hightextm"Frame 5Symbol 118 EditableText
"credtextm"Frame 5Symbol 121 EditableText
"playtextm"Frame 5Symbol 122 EditableText
"apiholder"Frame 5Symbol 125 MovieClip
"levelcomplete"Frame 10Symbol 132 MovieClip {SteerWheels_fla.levelcomplete_54}
"failscreen"Frame 10Symbol 147 MovieClip {SteerWheels_fla.dead_48}
"mask1"Frame 10Symbol 149 MovieClip
"lifebar"Frame 10Symbol 155 MovieClip {SteerWheels_fla.lives_46}
"pausecont"Frame 10Symbol 161 MovieClip {SteerWheels_fla.pausecontainer_41}
"bottime"Frame 10Symbol 166 MovieClip {SteerWheels_fla.bottime_40}
"buttest"Frame 10Symbol 168 MovieClip
"mutebut"Frame 10Symbol 179 MovieClip {SteerWheels_fla.mutebut_32}
"resetbut"Frame 10Symbol 183 Button
"gameinstructions"Frame 10Symbol 184 EditableText
"apiholder"Frame 10Symbol 125 MovieClip
"gameinstructions"Frame 11Symbol 185 EditableText
"gameinstructions"Frame 12Symbol 186 EditableText
"gameinstructions"Frame 13Symbol 187 EditableText
"gameinstructions"Frame 14Symbol 188 EditableText
"gameinstructions"Frame 15Symbol 189 EditableText
"gameinstructions"Frame 16Symbol 190 EditableText
"gameinstructions"Frame 17Symbol 191 EditableText
"gameinstructions"Frame 18Symbol 192 EditableText
"gameinstructions"Frame 19Symbol 193 EditableText
"gameinstructions"Frame 20Symbol 194 EditableText
"gameinstructions"Frame 21Symbol 195 EditableText
"gameinstructions"Frame 22Symbol 196 EditableText
"gameinstructions"Frame 23Symbol 197 EditableText
"gameinstructions"Frame 24Symbol 198 EditableText
"gameinstructions"Frame 25Symbol 199 EditableText
"gameinstructions"Frame 26Symbol 200 EditableText
"gameinstructions"Frame 27Symbol 201 EditableText
"gameinstructions"Frame 28Symbol 202 EditableText
"gameinstructions"Frame 29Symbol 203 EditableText
"winscreen"Frame 30Symbol 209 MovieClip {SteerWheels_fla.comple_55}
"resetbut"Frame 33Symbol 183 Button
"gameinstructions"Frame 33Symbol 210 EditableText
"apiholder"Frame 33Symbol 125 MovieClip
"mask1"Frame 40Symbol 149 MovieClip
"bottime"Frame 40Symbol 166 MovieClip {SteerWheels_fla.bottime_40}
"gameinstructions"Frame 40Symbol 211 EditableText
"updatebut"Symbol 58 MovieClip {SteerWheels_fla.playerdetectetion_2} Frame 1Symbol 50 Button
"bg"Symbol 58 MovieClip {SteerWheels_fla.playerdetectetion_2} Frame 1Symbol 56 MovieClip
"overbut"Symbol 61 MovieClip {SteerWheels_fla.gamesrelodedintro_8} Frame 1Symbol 60 Button
"tudbut"Symbol 82 MovieClip {SteerWheels_fla.tudwayintro_10} Frame 1Symbol 64 Button
"tudwrite"Symbol 82 MovieClip {SteerWheels_fla.tudwayintro_10} Frame 112Symbol 79 MovieClip
"grcom"Symbol 97 MovieClip {SteerWheels_fla.ngrscreen_25} Frame 1Symbol 90 Button
"overscore"Symbol 132 MovieClip {SteerWheels_fla.levelcomplete_54} Frame 1Symbol 126 EditableText
"levelscore"Symbol 132 MovieClip {SteerWheels_fla.levelcomplete_54} Frame 1Symbol 127 EditableText
"leveltime"Symbol 132 MovieClip {SteerWheels_fla.levelcomplete_54} Frame 1Symbol 128 EditableText
"grcom"Symbol 132 MovieClip {SteerWheels_fla.levelcomplete_54} Frame 1Symbol 90 Button
"nextlev"Symbol 132 MovieClip {SteerWheels_fla.levelcomplete_54} Frame 1Symbol 50 Button
"levelname"Symbol 132 MovieClip {SteerWheels_fla.levelcomplete_54} Frame 1Symbol 130 EditableText
"bg"Symbol 132 MovieClip {SteerWheels_fla.levelcomplete_54} Frame 1Symbol 56 MovieClip
"submitbut"Symbol 139 MovieClip {SteerWheels_fla.subholder_50} Frame 1Symbol 50 Button
"grcom"Symbol 147 MovieClip {SteerWheels_fla.dead_48} Frame 1Symbol 138 Button
"subhold"Symbol 147 MovieClip {SteerWheels_fla.dead_48} Frame 1Symbol 139 MovieClip {SteerWheels_fla.subholder_50}
"subtext"Symbol 147 MovieClip {SteerWheels_fla.dead_48} Frame 1Symbol 142 MovieClip {SteerWheels_fla.submitted_49}
"replaybut"Symbol 147 MovieClip {SteerWheels_fla.dead_48} Frame 1Symbol 50 Button
"finalscore"Symbol 147 MovieClip {SteerWheels_fla.dead_48} Frame 1Symbol 144 EditableText
"bg"Symbol 147 MovieClip {SteerWheels_fla.dead_48} Frame 1Symbol 56 MovieClip
"pausebut"Symbol 161 MovieClip {SteerWheels_fla.pausecontainer_41} Frame 1Symbol 157 Button
"playbut"Symbol 161 MovieClip {SteerWheels_fla.pausecontainer_41} Frame 2Symbol 160 Button
"timetext"Symbol 166 MovieClip {SteerWheels_fla.bottime_40} Frame 1Symbol 162 EditableText
"soundplay"Symbol 179 MovieClip {SteerWheels_fla.mutebut_32} Frame 1Symbol 175 Button
"fake"Symbol 179 MovieClip {SteerWheels_fla.mutebut_32} Frame 1Symbol 178 Button
"playmoregames"Symbol 209 MovieClip {SteerWheels_fla.comple_55} Frame 1Symbol 138 Button
"nfinalscore"Symbol 209 MovieClip {SteerWheels_fla.comple_55} Frame 1Symbol 204 EditableText
"livescorea"Symbol 209 MovieClip {SteerWheels_fla.comple_55} Frame 1Symbol 205 EditableText
"livescore"Symbol 209 MovieClip {SteerWheels_fla.comple_55} Frame 1Symbol 206 EditableText
"subhold"Symbol 209 MovieClip {SteerWheels_fla.comple_55} Frame 1Symbol 139 MovieClip {SteerWheels_fla.subholder_50}
"subtext"Symbol 209 MovieClip {SteerWheels_fla.comple_55} Frame 1Symbol 142 MovieClip {SteerWheels_fla.submitted_49}
"replaybut"Symbol 209 MovieClip {SteerWheels_fla.comple_55} Frame 1Symbol 50 Button
"finalscore"Symbol 209 MovieClip {SteerWheels_fla.comple_55} Frame 1Symbol 207 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata not present, AS3.
Protect (24)Timeline Frame 10 bytes ""




http://swfchan.com/10/47761/info.shtml
Created: 1/5 -2019 05:07:20 Last modified: 1/5 -2019 05:07:20 Server time: 14/05 -2024 20:34:11