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

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

Get Home - get home quickly before the song is over.swf

This is the info page for
Flash #90405

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


ActionScript [AS3]
Section 1
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.5.0.12683"; public function BitmapAsset(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } public function setActualSize(_arg1:Number, _arg2:Number):void{ width = _arg1; height = _arg2; } public function move(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } } }//package mx.core
Section 2
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.5.0.12683"; } }//package mx.core
Section 3
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.5.0.12683"; public function FlexBitmap(_arg1:BitmapData=null, _arg2:String="auto", _arg3:Boolean=false){ var bitmapData = _arg1; var pixelSnapping = _arg2; var smoothing = _arg3; super(bitmapData, pixelSnapping, smoothing); try { name = NameUtil.createUniqueName(this); } catch(e:Error) { }; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 4
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "3.5.0.12683"; } }//package mx.core
Section 5
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 6
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.accessibility.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get visible():Boolean; function get rotation():Number; function localToGlobal(_arg1:Point):Point; function get name():String; function set width(_arg1:Number):void; function get measuredHeight():Number; function get blendMode():String; function get scale9Grid():Rectangle; function set name(_arg1:String):void; function set scaleX(_arg1:Number):void; function set scaleY(_arg1:Number):void; function get measuredWidth():Number; function get accessibilityProperties():AccessibilityProperties; function set scrollRect(_arg1:Rectangle):void; function get cacheAsBitmap():Boolean; function globalToLocal(_arg1:Point):Point; function get height():Number; function set blendMode(_arg1:String):void; function get parent():DisplayObjectContainer; function getBounds(_arg1:DisplayObject):Rectangle; function get opaqueBackground():Object; function set scale9Grid(_arg1:Rectangle):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set alpha(_arg1:Number):void; function set accessibilityProperties(_arg1:AccessibilityProperties):void; function get width():Number; function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean; function set cacheAsBitmap(_arg1:Boolean):void; function get scaleX():Number; function get scaleY():Number; function get scrollRect():Rectangle; function get mouseX():Number; function get mouseY():Number; function set height(_arg1:Number):void; function set mask(_arg1:DisplayObject):void; function getRect(_arg1:DisplayObject):Rectangle; function get alpha():Number; function set transform(_arg1:Transform):void; function move(_arg1:Number, _arg2:Number):void; function get loaderInfo():LoaderInfo; function get root():DisplayObject; function hitTestObject(_arg1:DisplayObject):Boolean; function set opaqueBackground(_arg1:Object):void; function set visible(_arg1:Boolean):void; function get mask():DisplayObject; function set x(_arg1:Number):void; function set y(_arg1:Number):void; function get transform():Transform; function set filters(_arg1:Array):void; function get x():Number; function get y():Number; function get filters():Array; function set rotation(_arg1:Number):void; function get stage():Stage; } }//package mx.core
Section 7
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function get instanceIndices():Array; function set instanceIndices(_arg1:Array):void; function get isDocument():Boolean; function set repeaters(_arg1:Array):void; function initializeRepeaterArrays(_arg1:IRepeaterClient):void; function get repeaters():Array; function set repeaterIndices(_arg1:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 8
//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.core
Section 9
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.5.0.12683"; } }//package mx.core
Section 10
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "3.5.0.12683"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var result:String; var o:DisplayObject; var s:String; var indices:Array; var displayObject = _arg1; try { o = displayObject; while (o != null) { if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){ break; }; s = o.name; if ((o is IRepeaterClient)){ indices = IRepeaterClient(o).instanceIndices; if (indices){ s = (s + (("[" + indices.join("][")) + "]")); }; }; result = ((result == null)) ? s : ((s + ".") + result); o = o.parent; }; } catch(e:SecurityError) { }; return (result); } public static function createUniqueName(_arg1:Object):String{ if (!_arg1){ return (null); }; var _local2:String = getQualifiedClassName(_arg1); var _local3:int = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; var _local4:int = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utils
Section 11
//FlxAnim (org.flixel.data.FlxAnim) package org.flixel.data { public class FlxAnim { public var delay:Number; public var frames:Array; public var looped:Boolean; public var name:String; public function FlxAnim(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true){ name = _arg1; delay = 0; if (_arg3 > 0){ delay = (1 / _arg3); }; frames = _arg2; looped = _arg4; } } }//package org.flixel.data
Section 12
//FlxConsole (org.flixel.data.FlxConsole) package org.flixel.data { import flash.display.*; import org.flixel.*; import flash.text.*; public class FlxConsole extends Sprite { protected const MAX_CONSOLE_LINES:uint = 0x0100; protected var _lines:Array; protected var _text:TextField; protected var _fpsUpdate:Boolean; protected var _console:Sprite; protected var _Y:Number; protected var _curFPS:uint; protected var _fps:Array; protected var _bx:int; protected var _by:int; protected var _fpsDisplay:TextField; protected var _YT:Number; protected var _byt:int; public function FlxConsole(_arg1:uint, _arg2:uint, _arg3:uint){ visible = false; x = (_arg1 * _arg3); _by = (_arg2 * _arg3); _byt = (_by - (FlxG.height * _arg3)); _YT = (_Y = (y = _byt)); var _local4:Bitmap = new Bitmap(new BitmapData((FlxG.width * _arg3), (FlxG.height * _arg3), true, 2130706432)); addChild(_local4); _fps = new Array(8); _curFPS = 0; _fpsUpdate = true; _text = new TextField(); _text.width = _local4.width; _text.height = _local4.height; _text.multiline = true; _text.wordWrap = true; _text.embedFonts = true; _text.antiAliasType = AntiAliasType.NORMAL; _text.gridFitType = GridFitType.PIXEL; _text.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF); addChild(_text); _fpsDisplay = new TextField(); _fpsDisplay.width = _local4.width; _fpsDisplay.height = 20; _fpsDisplay.multiline = true; _fpsDisplay.wordWrap = true; _fpsDisplay.embedFonts = true; _fpsDisplay.antiAliasType = AntiAliasType.NORMAL; _fpsDisplay.gridFitType = GridFitType.PIXEL; _fpsDisplay.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, true, null, null, null, null, "right"); addChild(_fpsDisplay); _lines = new Array(); } public function log(_arg1:String):void{ var _local2:String; var _local3:uint; if (_arg1 == null){ _arg1 = "NULL"; }; trace(_arg1); _lines.push(_arg1); if (_lines.length > MAX_CONSOLE_LINES){ _lines.shift(); _local2 = ""; _local3 = 0; while (_local3 < _lines.length) { _local2 = (_local2 + (_lines[_local3] + "\n")); _local3++; }; _text.text = _local2; } else { _text.appendText((_arg1 + "\n")); }; _text.scrollV = _text.height; } public function update():void{ var _local1:uint; var _local2:uint; if (visible){ _fps[_curFPS] = (1 / FlxG.elapsed); if (++_curFPS >= _fps.length){ _curFPS = 0; }; _fpsUpdate = !(_fpsUpdate); if (_fpsUpdate){ _local1 = 0; _local2 = 0; while (_local2 < _fps.length) { _local1 = (_local1 + _fps[_local2]); _local2++; }; _fpsDisplay.text = (Math.floor((_local1 / _fps.length)) + " fps"); }; }; if (_Y < _YT){ _Y = (_Y + ((FlxG.height * 10) * FlxG.elapsed)); } else { if (_Y > _YT){ _Y = (_Y - ((FlxG.height * 10) * FlxG.elapsed)); }; }; if (_Y > _by){ _Y = _by; } else { if (_Y < _byt){ _Y = _byt; visible = false; }; }; y = Math.floor(_Y); } public function toggle():void{ if (_YT == _by){ _YT = _byt; } else { _YT = _by; visible = true; }; } } }//package org.flixel.data
Section 13
//FlxFactory (org.flixel.data.FlxFactory) package org.flixel.data { import flash.events.*; import flash.display.*; import org.flixel.*; import flash.text.*; import flash.net.*; import flash.utils.*; public class FlxFactory extends MovieClip { public var className:String; protected var _bits:Array; protected var _bmpBar:Bitmap; private var ImgBar:Class; private var ImgBit:Class; public var myURL:String; protected var _buffer:Sprite; public function FlxFactory(){ var tmp:Bitmap; var re:RegExp; var fmt:TextFormat; var txt:TextField; ImgBar = FlxFactory_ImgBar; ImgBit = FlxFactory_ImgBit; super(); stop(); stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; try { throw (new Error("Setting global debug flag...")); } catch(e:Error) { re = /\[.*:[0-9]+\]/; FlxG.debug = re.test(e.getStackTrace()); }; if (((((!(FlxG.debug)) && (!((myURL == null))))) && ((myURL.length > 0)))){ tmp = new Bitmap(new BitmapData(stage.stageWidth, stage.stageHeight, true, 4294967295)); addChild(tmp); fmt = new TextFormat(); fmt.color = 0; fmt.size = 16; fmt.align = "center"; fmt.bold = true; txt = new TextField(); txt.width = (tmp.width - 16); txt.height = (tmp.height - 16); txt.y = 8; txt.multiline = true; txt.wordWrap = true; txt.defaultTextFormat = fmt; txt.text = (("Hi there! It looks like somebody copied this game without my permission. If you would like to play it at my site with NO annoying ads, just click anywhere, or copy-paste this URL into your browser.\n\n" + myURL) + "\n\nThanks, and have fun!"); addChild(txt); txt.addEventListener(MouseEvent.CLICK, goToMyURL); tmp.addEventListener(MouseEvent.CLICK, goToMyURL); return; }; _buffer = new Sprite(); _buffer.scaleX = 2; _buffer.scaleY = 2; addChild(_buffer); _bmpBar = new ImgBar(); _bmpBar.x = (((stage.stageWidth / _buffer.scaleX) - _bmpBar.width) / 2); _bmpBar.y = (((stage.stageHeight / _buffer.scaleY) - _bmpBar.height) / 2); _buffer.addChild(_bmpBar); _bits = new Array(); var i:uint; while (i < 9) { tmp = new ImgBit(); tmp.visible = false; tmp.x = ((_bmpBar.x + 2) + (i * 3)); tmp.y = (_bmpBar.y + 2); _bits.push(tmp); _buffer.addChild(tmp); i = (i + 1); }; addEventListener(Event.ENTER_FRAME, onEnterFrame); } private function goToMyURL(_arg1:MouseEvent=null):void{ navigateToURL(new URLRequest(("http://" + myURL))); } private function onEnterFrame(_arg1:Event):void{ var _local2:int; var _local3:Class; var _local4:Object; var _local5:uint; graphics.clear(); if (framesLoaded == totalFrames){ removeEventListener(Event.ENTER_FRAME, onEnterFrame); nextFrame(); _local3 = Class(getDefinitionByName(className)); if (_local3){ _local4 = new _local3(this.loaderInfo.url); addChild((_local4 as DisplayObject)); }; _local2 = (_bits.length - 1); while (_local2 >= 0) { _bits.pop(); _local2--; }; removeChild(_buffer); } else { _local5 = ((root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal) * 10); _local2 = 0; while ((((_local2 < _local5)) && ((_local2 < _bits.length)))) { _bits[_local2].visible = true; _local2++; }; }; } } }//package org.flixel.data
Section 14
//FlxFactory_ImgBar (org.flixel.data.FlxFactory_ImgBar) package org.flixel.data { import mx.core.*; public class FlxFactory_ImgBar extends BitmapAsset { } }//package org.flixel.data
Section 15
//FlxFactory_ImgBit (org.flixel.data.FlxFactory_ImgBit) package org.flixel.data { import mx.core.*; public class FlxFactory_ImgBit extends BitmapAsset { } }//package org.flixel.data
Section 16
//FlxFade (org.flixel.data.FlxFade) package org.flixel.data { import org.flixel.*; public class FlxFade extends FlxSprite { protected var _delay:Number; protected var _complete:Function; public function FlxFade(){ createGraphic(FlxG.width, FlxG.height, 0, true); scrollFactor.x = 0; scrollFactor.y = 0; visible = false; } override public function update():void{ if (((visible) && (!((alpha == 1))))){ alpha = (alpha + (FlxG.elapsed / _delay)); if (alpha >= 1){ alpha = 1; if (_complete != null){ _complete(); }; }; }; } public function restart(_arg1:uint=0, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{ if (_arg2 == 0){ visible = false; return; }; if (((!(_arg4)) && (visible))){ return; }; fill(_arg1); _delay = _arg2; _complete = _arg3; alpha = 0; visible = true; } } }//package org.flixel.data
Section 17
//FlxFlash (org.flixel.data.FlxFlash) package org.flixel.data { import org.flixel.*; public class FlxFlash extends FlxSprite { protected var _delay:Number; protected var _complete:Function; public function FlxFlash(){ createGraphic(FlxG.width, FlxG.height, 0, true); scrollFactor.x = 0; scrollFactor.y = 0; visible = false; } override public function update():void{ if (visible){ alpha = (alpha - (FlxG.elapsed / _delay)); if (alpha <= 0){ visible = false; if (_complete != null){ _complete(); }; }; }; } public function restart(_arg1:uint=4294967295, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{ if (_arg2 == 0){ visible = false; return; }; if (((!(_arg4)) && (visible))){ return; }; fill(_arg1); _delay = _arg2; _complete = _arg3; alpha = 1; visible = true; } } }//package org.flixel.data
Section 18
//FlxKeyboard (org.flixel.data.FlxKeyboard) package org.flixel.data { import flash.events.*; public class FlxKeyboard { protected const _t:uint = 0x0100; public var RIGHT:Boolean; public var LEFT:Boolean; public var FOUR:Boolean; public var TWO:Boolean; public var CONTROL:Boolean; public var A:Boolean; public var B:Boolean; public var C:Boolean; public var D:Boolean; public var E:Boolean; public var ONE:Boolean; public var G:Boolean; public var H:Boolean; public var I:Boolean; public var J:Boolean; public var K:Boolean; public var F:Boolean; public var N:Boolean; public var O:Boolean; public var Q:Boolean; public var R:Boolean; public var S:Boolean; public var T:Boolean; public var ESC:Boolean; public var MINUS:Boolean; public var Y:Boolean; public var L:Boolean; public var Z:Boolean; public var QUOTE:Boolean; public var V:Boolean; public var X:Boolean; public var P:Boolean; public var SHIFT:Boolean; public var SLASH:Boolean; public var U:Boolean; public var EIGHT:Boolean; public var W:Boolean; public var M:Boolean; public var THREE:Boolean; public var SEMICOLON:Boolean; public var CAPSLOCK:Boolean; protected var _lookup:Object; public var PLUS:Boolean; protected var _map:Array; public var ZERO:Boolean; public var DOWN:Boolean; public var F1:Boolean; public var F2:Boolean; public var F3:Boolean; public var F4:Boolean; public var F5:Boolean; public var F6:Boolean; public var F7:Boolean; public var NINE:Boolean; public var F9:Boolean; public var ALT:Boolean; public var F8:Boolean; public var DELETE:Boolean; public var LBRACKET:Boolean; public var UP:Boolean; public var ENTER:Boolean; public var FIVE:Boolean; public var SIX:Boolean; public var COMMA:Boolean; public var PERIOD:Boolean; public var BACKSLASH:Boolean; public var F10:Boolean; public var F11:Boolean; public var F12:Boolean; public var SEVEN:Boolean; public var SPACE:Boolean; public var RBRACKET:Boolean; public function FlxKeyboard(){ var _local1:uint; _lookup = new Object(); _map = new Array(_t); _local1 = 65; while (_local1 <= 90) { addKey(String.fromCharCode(_local1), _local1); _local1++; }; _local1 = 48; var _temp1 = _local1; _local1 = (_local1 + 1); addKey("ZERO", _temp1); var _temp2 = _local1; _local1 = (_local1 + 1); addKey("ONE", _temp2); var _temp3 = _local1; _local1 = (_local1 + 1); addKey("TWO", _temp3); var _temp4 = _local1; _local1 = (_local1 + 1); addKey("THREE", _temp4); var _temp5 = _local1; _local1 = (_local1 + 1); addKey("FOUR", _temp5); var _temp6 = _local1; _local1 = (_local1 + 1); addKey("FIVE", _temp6); var _temp7 = _local1; _local1 = (_local1 + 1); addKey("SIX", _temp7); var _temp8 = _local1; _local1 = (_local1 + 1); addKey("SEVEN", _temp8); var _temp9 = _local1; _local1 = (_local1 + 1); addKey("EIGHT", _temp9); var _temp10 = _local1; _local1 = (_local1 + 1); addKey("NINE", _temp10); _local1 = 1; while (_local1 <= 12) { addKey(("F" + _local1), (111 + _local1)); _local1++; }; addKey("ESC", 27); addKey("MINUS", 189); addKey("PLUS", 187); addKey("DELETE", 8); addKey("LBRACKET", 219); addKey("RBRACKET", 221); addKey("BACKSLASH", 220); addKey("CAPSLOCK", 20); addKey("SEMICOLON", 186); addKey("QUOTE", 222); addKey("ENTER", 13); addKey("SHIFT", 16); addKey("COMMA", 188); addKey("PERIOD", 190); addKey("SLASH", 191); addKey("CONTROL", 17); addKey("ALT", 18); addKey("SPACE", 32); addKey("UP", 38); addKey("DOWN", 40); addKey("LEFT", 37); addKey("RIGHT", 39); } public function handleKeyUp(_arg1:KeyboardEvent):void{ var _local2:Object = _map[_arg1.keyCode]; if (_local2 == null){ return; }; if (_local2.current > 0){ _local2.current = -1; } else { _local2.current = 0; }; this[_local2.name] = false; } public function pressed(_arg1:String):Boolean{ return (this[_arg1]); } public function justReleased(_arg1:String):Boolean{ return ((_map[_lookup[_arg1]].current == -1)); } public function handleKeyDown(_arg1:KeyboardEvent):void{ var _local2:Object = _map[_arg1.keyCode]; if (_local2 == null){ return; }; if (_local2.current > 0){ _local2.current = 1; } else { _local2.current = 2; }; this[_local2.name] = true; } public function reset():void{ var _local2:Object; var _local1:uint; while (_local1 < _t) { if (_map[_local1] == null){ } else { _local2 = _map[_local1]; this[_local2.name] = false; _local2.current = 0; _local2.last = 0; }; _local1++; }; } public function justPressed(_arg1:String):Boolean{ return ((_map[_lookup[_arg1]].current == 2)); } public function update():void{ var _local2:Object; var _local1:uint; while (_local1 < _t) { if (_map[_local1] == null){ } else { _local2 = _map[_local1]; if ((((_local2.last == -1)) && ((_local2.current == -1)))){ _local2.current = 0; } else { if ((((_local2.last == 2)) && ((_local2.current == 2)))){ _local2.current = 1; }; }; _local2.last = _local2.current; }; _local1++; }; } protected function addKey(_arg1:String, _arg2:uint):void{ _lookup[_arg1] = _arg2; _map[_arg2] = {name:_arg1, current:0, last:0}; } } }//package org.flixel.data
Section 19
//FlxKong (org.flixel.data.FlxKong) package org.flixel.data { import flash.events.*; import flash.display.*; import flash.net.*; public class FlxKong extends Sprite { public var API; public function FlxKong(){ API = null; } public function init():void{ var _local1:Object = LoaderInfo(root.loaderInfo).parameters; var _local2:String = ((_local1.api_path) || ("http://www.kongregate.com/flash/API_AS3_Local.swf")); var _local3:URLRequest = new URLRequest(_local2); var _local4:Loader = new Loader(); _local4.contentLoaderInfo.addEventListener(Event.COMPLETE, APILoaded); _local4.load(_local3); this.addChild(_local4); } protected function APILoaded(_arg1:Event):void{ API = _arg1.target.content; API.services.connect(); } } }//package org.flixel.data
Section 20
//FlxLogoPixel (org.flixel.data.FlxLogoPixel) package org.flixel.data { import flash.display.*; public class FlxLogoPixel extends Sprite { private var _curLayer:uint; private var _layers:Array; public function FlxLogoPixel(_arg1:int, _arg2:int, _arg3:uint, _arg4:uint, _arg5:uint){ x = _arg1; y = _arg2; _layers = new Array(); var _local6:Array = new Array(4294901760, 4278255360, 4278190335, 4294967040, 4278255615); _layers.push(addChild(new Bitmap(new BitmapData(_arg3, _arg3, true, _arg5)))); var _local7:uint; while (_local7 < _local6.length) { _layers.push(addChild(new Bitmap(new BitmapData(_arg3, _arg3, true, _local6[_arg4])))); ++_arg4; if (_arg4 >= _local6.length){ _arg4 = 0; }; _local7++; }; _curLayer = (_layers.length - 1); } public function update():void{ if (_curLayer == 0){ return; }; if (_layers[_curLayer].alpha >= 0.1){ _layers[_curLayer].alpha = (_layers[_curLayer].alpha - 0.1); } else { _layers[_curLayer].alpha = 0; _curLayer--; }; } } }//package org.flixel.data
Section 21
//FlxMouse (org.flixel.data.FlxMouse) package org.flixel.data { import flash.events.*; public class FlxMouse { protected var _last:int; public var x:int; public var y:int; protected var _current:int; public function FlxMouse(){ x = 0; y = 0; _current = 0; _last = 0; } public function justReleased():Boolean{ return ((_current == -1)); } public function pressed():Boolean{ return ((_current > 0)); } public function handleMouseUp(_arg1:MouseEvent):void{ if (_current > 0){ _current = -1; } else { _current = 0; }; } public function update(_arg1:int, _arg2:int):void{ x = _arg1; y = _arg2; if ((((_last == -1)) && ((_current == -1)))){ _current = 0; } else { if ((((_last == 2)) && ((_last == 2)))){ _current = 1; }; }; _last = _current; } public function reset():void{ _current = 0; _last = 0; } public function justPressed():Boolean{ return ((_current == 2)); } public function handleMouseDown(_arg1:MouseEvent):void{ if (_current > 0){ _current = 1; } else { _current = 2; }; } } }//package org.flixel.data
Section 22
//FlxPanel (org.flixel.data.FlxPanel) package org.flixel.data { import org.flixel.*; import flash.ui.*; public class FlxPanel extends FlxCore { protected var _stumble:FlxButton; protected var _digg:FlxButton; protected var _gameTitle:String; protected var _closed:Boolean; protected var _payPalID:String; protected var _donate:FlxButton; protected var _mainBar:FlxSprite; protected var _topBar:FlxSprite; protected var _gameURL:String; protected var _initialized:Boolean; protected var _caption:FlxText; protected var _bottomBar:FlxSprite; protected var _delicious:FlxButton; protected var _ty:Number; protected var _payPalAmount:Number; protected var _twitter:FlxButton; protected var _close:FlxButton; protected var _s:Number; protected var _reddit:FlxButton; public function FlxPanel(){ y = -21; _ty = y; _closed = false; _initialized = false; _topBar = new FlxSprite(); _topBar.createGraphic(FlxG.width, 1, 2147483647); _topBar.scrollFactor.x = 0; _topBar.scrollFactor.y = 0; _mainBar = new FlxSprite(); _mainBar.createGraphic(FlxG.width, 19, 2130706432); _mainBar.scrollFactor.x = 0; _mainBar.scrollFactor.y = 0; _bottomBar = new FlxSprite(); _bottomBar.createGraphic(FlxG.width, 1, 2147483647); _bottomBar.scrollFactor.x = 0; _bottomBar.scrollFactor.y = 0; _donate = new FlxButton(3, 0, onDonate); _donate.loadGraphic(new FlxSprite(0, 0, null)); _donate.scrollFactor.x = 0; _donate.scrollFactor.y = 0; _stumble = new FlxButton(((((((FlxG.width / 2) - 6) - 13) - 6) - 13) - 6), 0, onStumble); _stumble.loadGraphic(new FlxSprite(0, 0, null)); _stumble.scrollFactor.x = 0; _stumble.scrollFactor.y = 0; _digg = new FlxButton(((((FlxG.width / 2) - 6) - 13) - 6), 0, onDigg); _digg.loadGraphic(new FlxSprite(0, 0, null)); _digg.scrollFactor.x = 0; _digg.scrollFactor.y = 0; _reddit = new FlxButton(((FlxG.width / 2) - 6), 0, onReddit); _reddit.loadGraphic(new FlxSprite(0, 0, null)); _reddit.scrollFactor.x = 0; _reddit.scrollFactor.y = 0; _delicious = new FlxButton((((FlxG.width / 2) + 7) + 6), 0, onDelicious); _delicious.loadGraphic(new FlxSprite(0, 0, null)); _delicious.scrollFactor.x = 0; _delicious.scrollFactor.y = 0; _twitter = new FlxButton((((((FlxG.width / 2) + 7) + 6) + 12) + 6), 0, onTwitter); _twitter.loadGraphic(new FlxSprite(0, 0, null)); _twitter.scrollFactor.x = 0; _twitter.scrollFactor.y = 0; _caption = new FlxText((FlxG.width / 2), 0, ((FlxG.width / 2) - 19), ""); _caption.alignment = "right"; _caption.scrollFactor.x = 0; _caption.scrollFactor.y = 0; _close = new FlxButton((FlxG.width - 16), 0, onClose); _close.loadGraphic(new FlxSprite(0, 0, null)); _close.scrollFactor.x = 0; _close.scrollFactor.y = 0; hide(); _s = 50; } public function onStumble():void{ FlxG.openURL(("http://www.stumbleupon.com/submit?url=" + encodeURIComponent(_gameURL))); } override public function update():void{ if (!_initialized){ return; }; if (_ty != y){ if (y < _ty){ y = (y + (FlxG.elapsed * _s)); if (y > _ty){ y = _ty; }; } else { y = (y - (FlxG.elapsed * _s)); if (y < _ty){ y = _ty; }; }; }; if ((((y <= -21)) || ((y > FlxG.height)))){ visible = false; }; _topBar.y = y; _mainBar.y = (y + 1); _bottomBar.y = (y + 20); _donate.y = (y + 4); _stumble.y = (y + 4); _digg.y = (y + 4); _reddit.y = (y + 4); _delicious.y = (y + 5); _twitter.y = (y + 4); _caption.y = (y + 4); _close.y = (y + 4); if (_donate.active){ _donate.update(); }; if (_stumble.active){ _stumble.update(); }; if (_digg.active){ _digg.update(); }; if (_reddit.active){ _reddit.update(); }; if (_delicious.active){ _delicious.update(); }; if (_twitter.active){ _twitter.update(); }; if (_caption.active){ _caption.update(); }; if (_close.active){ _close.update(); }; } public function onDelicious():void{ FlxG.openURL(((("http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=" + encodeURIComponent(_gameURL)) + "&amp;title=") + encodeURIComponent(_gameTitle))); } public function show(_arg1:Boolean=true):void{ if (!_initialized){ FlxG.log("SUPPORT PANEL ERROR: Uninitialized.\nYou forgot to call FlxGame.setupSupportPanel()\nfrom your game constructor."); return; }; if (_closed){ return; }; if (_arg1){ y = -21; _ty = -1; } else { y = FlxG.height; _ty = (FlxG.height - 20); }; Mouse.show(); visible = true; } public function init(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:String):void{ _payPalID = _arg1; if (_payPalID.length <= 0){ _donate.visible = false; }; _payPalAmount = _arg2; _gameTitle = _arg3; _gameURL = _arg4; _caption.text = _arg5; _initialized = true; } public function hide():void{ if (y < 0){ _ty = -21; } else { _ty = FlxG.height; }; Mouse.hide(); visible = false; } public function onClose():void{ _closed = true; hide(); } override public function render():void{ if (!_initialized){ return; }; if (_topBar.visible){ _topBar.render(); }; if (_mainBar.visible){ _mainBar.render(); }; if (_bottomBar.visible){ _bottomBar.render(); }; if (_stumble.visible){ _stumble.render(); }; if (_digg.visible){ _digg.render(); }; if (_reddit.visible){ _reddit.render(); }; if (_delicious.visible){ _delicious.render(); }; if (_twitter.visible){ _twitter.render(); }; if (_caption.visible){ _caption.render(); }; if (_close.visible){ _close.render(); }; } public function onReddit():void{ FlxG.openURL(("http://www.reddit.com/submit?url=" + encodeURIComponent(_gameURL))); } public function onDonate():void{ FlxG.openURL(((((("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + encodeURIComponent(_payPalID)) + "&item_name=") + encodeURIComponent(((_gameTitle + " Contribution (") + _gameURL))) + ")&currency_code=USD&amount=") + _payPalAmount)); } public function onTwitter():void{ FlxG.openURL(("http://twitter.com/home?status=Playing" + encodeURIComponent((((" " + _gameTitle) + " - ") + _gameURL)))); } public function onDigg():void{ FlxG.openURL(((("http://digg.com/submit?url=" + encodeURIComponent(_gameURL)) + "&title=") + encodeURIComponent(_gameTitle))); } } }//package org.flixel.data
Section 23
//FlxPause (org.flixel.data.FlxPause) package org.flixel.data { import org.flixel.*; public class FlxPause extends FlxLayer { private var ImgKeyP:Class; private var ImgKey0:Class; private var ImgKeyPlus:Class; private var ImgKeyMinus:Class; public function FlxPause(){ var _local1:uint; ImgKeyMinus = FlxPause_ImgKeyMinus; ImgKeyPlus = FlxPause_ImgKeyPlus; ImgKey0 = FlxPause_ImgKey0; ImgKeyP = FlxPause_ImgKeyP; super(); scrollFactor.x = 0; scrollFactor.y = 0; _local1 = 80; var _local2:uint = 92; x = ((FlxG.width - _local1) / 2); y = ((FlxG.height - _local2) / 2); add(new FlxSprite().createGraphic(_local1, _local2, 2852126720, true), true); (add(new FlxText(0, 0, _local1, "this game is"), true) as FlxText).alignment = "center"; add(new FlxText(0, 10, _local1, "PAUSED").setFormat(null, 16, 0xFFFFFF, "center"), true); add(new FlxSprite(4, 36, ImgKeyP), true); add(new FlxText(16, 36, (_local1 - 16), "Pause Game"), true); add(new FlxSprite(4, 50, ImgKey0), true); add(new FlxText(16, 50, (_local1 - 16), "Mute Sound"), true); add(new FlxSprite(4, 64, ImgKeyMinus), true); add(new FlxText(16, 64, (_local1 - 16), "Sound Down"), true); add(new FlxSprite(4, 78, ImgKeyPlus), true); add(new FlxText(16, 78, (_local1 - 16), "Sound Up"), true); } } }//package org.flixel.data
Section 24
//FlxPause_ImgKey0 (org.flixel.data.FlxPause_ImgKey0) package org.flixel.data { import mx.core.*; public class FlxPause_ImgKey0 extends BitmapAsset { } }//package org.flixel.data
Section 25
//FlxPause_ImgKeyMinus (org.flixel.data.FlxPause_ImgKeyMinus) package org.flixel.data { import mx.core.*; public class FlxPause_ImgKeyMinus extends BitmapAsset { } }//package org.flixel.data
Section 26
//FlxPause_ImgKeyP (org.flixel.data.FlxPause_ImgKeyP) package org.flixel.data { import mx.core.*; public class FlxPause_ImgKeyP extends BitmapAsset { } }//package org.flixel.data
Section 27
//FlxPause_ImgKeyPlus (org.flixel.data.FlxPause_ImgKeyPlus) package org.flixel.data { import mx.core.*; public class FlxPause_ImgKeyPlus extends BitmapAsset { } }//package org.flixel.data
Section 28
//FlxQuake (org.flixel.data.FlxQuake) package org.flixel.data { import org.flixel.*; public class FlxQuake { public var y:int; protected var _timer:Number; protected var _intensity:Number; public var x:int; protected var _zoom:uint; public function FlxQuake(_arg1:uint){ _zoom = _arg1; reset(0); } public function update():void{ if (_timer > 0){ _timer = (_timer - FlxG.elapsed); if (_timer <= 0){ _timer = 0; x = 0; y = 0; } else { x = (((((Math.random() * _intensity) * FlxG.width) * 2) - (_intensity * FlxG.width)) * _zoom); y = (((((Math.random() * _intensity) * FlxG.height) * 2) - (_intensity * FlxG.height)) * _zoom); }; }; } public function reset(_arg1:Number, _arg2:Number=0.5):void{ x = 0; y = 0; _intensity = _arg1; if (_intensity == 0){ _timer = 0; return; }; _timer = _arg2; } } }//package org.flixel.data
Section 29
//FlxBlock (org.flixel.FlxBlock) package org.flixel { import flash.geom.*; import flash.display.*; public class FlxBlock extends FlxCore { protected var _p:Point; public var _pixels:BitmapData; protected var _rects:Array; protected var _tileSize:uint; public function FlxBlock(_arg1:int, _arg2:int, _arg3:uint, _arg4:uint){ last.x = (x = _arg1); last.y = (y = _arg2); width = _arg3; height = _arg4; fixed = true; } override public function render():void{ super.render(); getScreenXY(_p); var _local1:int = _p.x; var _local2:uint = _rects.length; var _local3:uint; while (_local3 < _local2) { if (_rects[_local3] != null){ FlxG.buffer.copyPixels(_pixels, _rects[_local3], _p, null, null, true); }; _p.x = (_p.x + _tileSize); if (_p.x >= (_local1 + width)){ _p.x = _local1; _p.y = (_p.y + _tileSize); }; _local3++; }; } public function loadGraphic(_arg1:Class, _arg2:uint=0):void{ if (_arg1 == null){ return; }; _pixels = FlxG.addBitmap(_arg1); _rects = new Array(); _p = new Point(); _tileSize = _pixels.height; var _local3:uint = Math.ceil((width / _tileSize)); var _local4:uint = Math.ceil((height / _tileSize)); width = (_local3 * _tileSize); height = (_local4 * _tileSize); var _local5:uint = (_local3 * _local4); var _local6:uint = (_pixels.width / _tileSize); var _local7:uint; while (_local7 < _local5) { if ((FlxG.random() * (_local6 + _arg2)) > _arg2){ _rects.push(new Rectangle((_tileSize * Math.floor((FlxG.random() * _local6))), 0, _tileSize, _tileSize)); } else { _rects.push(null); }; _local7++; }; } } }//package org.flixel
Section 30
//FlxButton (org.flixel.FlxButton) package org.flixel { import flash.events.*; import flash.geom.*; public class FlxButton extends FlxCore { protected var _onTO:Point; protected var _sf:Point; protected var _offT:FlxText; protected var _initialized:Boolean; protected var _onT:FlxText; protected var _pressed:Boolean; protected var _callback:Function; protected var _off:FlxSprite; protected var _onToggle:Boolean; protected var _offTO:Point; protected var _on:FlxSprite; public function FlxButton(_arg1:int, _arg2:int, _arg3:Function){ x = _arg1; y = _arg2; width = 100; height = 20; _off = new FlxSprite(); _off.createGraphic(width, height, 4286545791); _off.scrollFactor = scrollFactor; _on = new FlxSprite(); _on.createGraphic(width, height, 4294967295); _on.scrollFactor = scrollFactor; _callback = _arg3; _onToggle = false; _pressed = false; updatePositions(); _initialized = false; _sf = null; } override public function update():void{ if (!_initialized){ if (FlxG.state == null){ return; }; if (FlxG.state.parent == null){ return; }; if (FlxG.state.parent.stage == null){ return; }; FlxG.state.parent.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp); _initialized = true; }; if (_sf != scrollFactor){ _sf = scrollFactor; if (_off != null){ _off.scrollFactor = _sf; }; if (_on != null){ _on.scrollFactor = _sf; }; if (_offT != null){ _offT.scrollFactor = _sf; }; if (_onT != null){ _onT.scrollFactor = _sf; }; }; super.update(); if (((((!((_off == null))) && (_off.exists))) && (_off.active))){ _off.update(); }; if (((((!((_on == null))) && (_on.exists))) && (_on.active))){ _on.update(); }; if (_offT != null){ if (((((!((_offT == null))) && (_offT.exists))) && (_offT.active))){ _offT.update(); }; if (((((!((_onT == null))) && (_onT.exists))) && (_onT.active))){ _onT.update(); }; }; visibility(false); if (_off.overlapsPoint(FlxG.mouse.x, FlxG.mouse.y)){ if (!FlxG.mouse.pressed()){ _pressed = false; } else { if (!_pressed){ _pressed = true; }; }; visibility(!(_pressed)); }; if (_onToggle){ visibility(_off.visible); }; updatePositions(); } public function switchOn():void{ _onToggle = true; } protected function onMouseUp(_arg1:MouseEvent):void{ if (((((((((!(exists)) || (!(visible)))) || (!(active)))) || (!(FlxG.mouse.justReleased())))) || ((_callback == null)))){ return; }; if (_off.overlapsPoint((FlxG.mouse.x + ((1 - scrollFactor.x) * FlxG.scroll.x)), (FlxG.mouse.y + ((1 - scrollFactor.y) * FlxG.scroll.y)))){ _callback(); }; } override public function destroy():void{ FlxG.state.parent.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); } protected function visibility(_arg1:Boolean):void{ if (_arg1){ _off.visible = false; if (_offT != null){ _offT.visible = false; }; _on.visible = true; if (_onT != null){ _onT.visible = true; }; } else { _on.visible = false; if (_onT != null){ _onT.visible = false; }; _off.visible = true; if (_offT != null){ _offT.visible = true; }; }; } public function switchOff():void{ _onToggle = false; } public function on():Boolean{ return (_onToggle); } protected function updatePositions():void{ _off.x = x; _off.y = y; if (_offT){ _offT.x = (_offTO.x + x); _offT.y = (_offTO.y + y); }; _on.x = x; _on.y = y; if (_onT){ _onT.x = (_onTO.x + x); _onT.y = (_onTO.y + y); }; } public function loadGraphic(_arg1:FlxSprite, _arg2:FlxSprite=null):FlxButton{ _off = _arg1; _off.scrollFactor = scrollFactor; if (_arg2 == null){ _on = _off; } else { _on = _arg2; }; _on.scrollFactor = scrollFactor; width = _off.width; height = _off.height; updatePositions(); return (this); } override public function render():void{ super.render(); if (((((!((_off == null))) && (_off.exists))) && (_off.visible))){ _off.render(); }; if (((((!((_on == null))) && (_on.exists))) && (_on.visible))){ _on.render(); }; if (_offT != null){ if (((((!((_offT == null))) && (_offT.exists))) && (_offT.visible))){ _offT.render(); }; if (((((!((_onT == null))) && (_onT.exists))) && (_onT.visible))){ _onT.render(); }; }; } public function loadText(_arg1:FlxText, _arg2:FlxText=null):FlxButton{ if (_arg1 != null){ _offT = _arg1; }; if (_arg2 == null){ _onT = _offT; } else { _onT = _arg2; }; if (_offT != null){ _offTO = new Point(_offT.x, _offT.y); }; if (_onT != null){ _onTO = new Point(_onT.x, _onT.y); }; _offT.scrollFactor = scrollFactor; _onT.scrollFactor = scrollFactor; updatePositions(); return (this); } } }//package org.flixel
Section 31
//FlxCore (org.flixel.FlxCore) package org.flixel { import flash.geom.*; public class FlxCore { public var y:Number; public var active:Boolean; public var x:Number; public var visible:Boolean; protected var _flickerTimer:Number; public var width:uint; public var last:Point; public var exists:Boolean; public var height:uint; public var dead:Boolean; public var fixed:Boolean; private var _flickerDelayer:Number;// = 0 protected var _flicker:Boolean; public var scrollFactor:Point; public function FlxCore(){ exists = true; active = true; visible = true; dead = false; fixed = false; width = 0; height = 0; x = 0; y = 0; last = new Point(x, y); scrollFactor = new Point(1, 1); _flicker = false; _flickerTimer = -1; } public function onScreen():Boolean{ var _local1:Point = new Point(); getScreenXY(_local1); if (((((((((_local1.x + width) < 0)) || ((_local1.x > FlxG.width)))) || (((_local1.y + height) < 0)))) || ((_local1.y > FlxG.height)))){ return (false); }; return (true); } public function hitWall(_arg1:FlxCore=null):Boolean{ return (true); } public function overlaps(_arg1:FlxCore):Boolean{ var _local2:Number = x; var _local3:Number = y; if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){ _local2 = (_local2 - Math.floor((FlxG.scroll.x * (1 - scrollFactor.x)))); _local3 = (_local3 - Math.floor((FlxG.scroll.y * (1 - scrollFactor.y)))); }; var _local4:Number = _arg1.x; var _local5:Number = _arg1.y; if (((!((_arg1.scrollFactor.x == 1))) || (!((_arg1.scrollFactor.y == 1))))){ _local4 = (_local4 - Math.floor((FlxG.scroll.x * (1 - _arg1.scrollFactor.x)))); _local5 = (_local5 - Math.floor((FlxG.scroll.y * (1 - _arg1.scrollFactor.y)))); }; if ((((((((_local4 <= (_local2 - _arg1.width))) || ((_local4 >= (_local2 + width))))) || ((_local5 <= (_local3 - _arg1.height))))) || ((_local5 >= (_local3 + height))))){ return (false); }; return (true); } public function update():void{ last.x = x; last.y = y; if (flickering()){ if (_flickerTimer > 0){ _flickerTimer = (_flickerTimer - FlxG.elapsed); if (_flickerTimer == 0){ _flickerTimer = -1; }; }; if (_flickerTimer < 0){ flicker(-1); } else { this._flickerDelayer = (this._flickerDelayer + FlxG.elapsed); if (this._flickerDelayer > 0.04){ _flicker = !(_flicker); visible = !(_flicker); this._flickerDelayer = 0; }; }; }; } public function reset(_arg1:Number, _arg2:Number):void{ exists = true; active = true; visible = true; dead = false; last.x = (x = _arg1); last.y = (y = _arg2); } public function flicker(_arg1:Number=1):void{ _flickerTimer = _arg1; if (_flickerTimer < 0){ _flicker = false; visible = true; }; } public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{ var _local4:Number = x; var _local5:Number = y; if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){ _local4 = (_local4 - Math.floor((FlxG.scroll.x * (1 - scrollFactor.x)))); _local5 = (_local5 - Math.floor((FlxG.scroll.y * (1 - scrollFactor.y)))); }; if ((((((((_arg1 <= _local4)) || ((_arg1 >= (_local4 + width))))) || ((_arg2 <= _local5)))) || ((_arg2 >= (_local5 + height))))){ return (false); }; return (true); } public function collideX(_arg1:FlxCore):Boolean{ var _local2:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local3:Rectangle = new Rectangle(); var _local4:Rectangle = new Rectangle(); if (_arg1.x > _arg1.last.x){ _local4.x = _arg1.last.x; _local4.width = ((_arg1.x - _arg1.last.x) + _arg1.width); } else { _local4.x = _arg1.x; _local4.width = ((_arg1.last.x - _arg1.x) + _arg1.width); }; _local4.y = _arg1.last.y; _local4.height = _arg1.height; if (x > last.x){ _local3.x = last.x; _local3.width = ((x - last.x) + width); } else { _local3.x = x; _local3.width = ((last.x - x) + width); }; _local3.y = last.y; _local3.height = height; if (((((((((_local4.x + _local4.width) <= _local3.x)) || ((_local4.x >= (_local3.x + _local3.width))))) || (((_local4.y + _local4.height) <= _local3.y)))) || ((_local4.y >= (_local3.y + _local3.height))))){ return (false); }; var _local5:Number = (_arg1.x - _arg1.last.x); var _local6:Number = (x - last.x); var _local7:Boolean = (((_arg1.x < (x + width))) && (((_arg1.x + _arg1.width) > x))); if ((((((((_local5 > 0)) && ((_local6 <= 0)))) || ((((_local5 >= 0)) && ((((_local5 > _local6)) && (_local7))))))) || ((((_local5 <= 0)) && ((((-(_local5) < -(_local6))) && (_local7))))))){ if (((fixed) && (!(_arg1.fixed)))){ if (_arg1.hitWall(this)){ _arg1.x = (x - _arg1.width); return (true); }; } else { if (((!(fixed)) && (_arg1.fixed))){ if (hitWall(_arg1)){ x = (_arg1.x + _arg1.width); return (true); }; } else { if (((_arg1.hitWall(this)) && (hitWall(_arg1)))){ _local2 = ((_local4.right - _local3.left) / 2); _arg1.x = (_arg1.x - _local2); x = (x + _local2); return (true); }; }; }; } else { if ((((((((_local5 < 0)) && ((_local6 >= 0)))) || ((((_local5 >= 0)) && ((((_local5 < _local6)) && (_local7))))))) || ((((_local5 <= 0)) && ((((-(_local5) > -(_local6))) && (_local7))))))){ if (_local4.left < _local3.right){ if (((fixed) && (!(_arg1.fixed)))){ if (_arg1.hitWall(this)){ _arg1.x = (x + width); return (true); }; } else { if (((!(fixed)) && (_arg1.fixed))){ if (hitWall(_arg1)){ x = (_arg1.x - width); return (true); }; } else { if (((_arg1.hitWall(this)) && (hitWall(_arg1)))){ _local2 = ((_local3.right - _local4.left) / 2); _arg1.x = (_arg1.x + _local2); x = (x - _local2); return (true); }; }; }; }; } else { _local8 = (_local4.x + (_local4.width / 2)); _local9 = (_local4.y + (_local4.height / 2)); _local10 = (_local3.x + (_local3.width / 2)); _local11 = (_local3.y + (_local3.height / 2)); if (Math.abs((_local8 - _local10)) > Math.abs((_local9 - _local11))){ if (_local8 > _local10){ if (((fixed) && (!(_arg1.fixed)))){ if (_arg1.hitWall(this)){ _arg1.x = (x + width); return (true); }; } else { if (((!(fixed)) && (_arg1.fixed))){ if (hitWall(_arg1)){ x = (_arg1.x - width); return (true); }; } else { if (((_arg1.hitWall(this)) && (hitWall(_arg1)))){ _local2 = ((_local3.right - _local4.left) / 2); _arg1.x = (_arg1.x + _local2); x = (x - _local2); return (true); }; }; }; } else { if (((fixed) && (!(_arg1.fixed)))){ if (_arg1.hitWall(this)){ _arg1.x = (x - _arg1.width); return (true); }; } else { if (((!(fixed)) && (_arg1.fixed))){ if (hitWall(_arg1)){ x = (_arg1.x + _arg1.width); return (true); }; } else { if (((_arg1.hitWall(this)) && (hitWall(_arg1)))){ _local2 = ((_local4.right - _local3.left) / 2); _arg1.x = (_arg1.x - _local2); x = (x + _local2); return (true); }; }; }; }; } else { if (_local9 > _local11){ if (_local4.top < _local3.bottom){ if (((fixed) && (!(_arg1.fixed)))){ if (_arg1.hitCeiling(this)){ _arg1.y = (y + height); return (true); }; } else { if (((!(fixed)) && (_arg1.fixed))){ if (hitFloor(_arg1)){ y = (_arg1.y - height); return (true); }; } else { if (((_arg1.hitCeiling(this)) && (hitFloor(_arg1)))){ _local2 = ((_local3.bottom - _local4.top) / 2); _arg1.y = (_arg1.y + _local2); y = (y - _local2); return (true); }; }; }; }; } else { if (((fixed) && (!(_arg1.fixed)))){ if (_arg1.hitFloor(this)){ _arg1.y = (y - _arg1.height); return (true); }; } else { if (((!(fixed)) && (_arg1.fixed))){ if (hitCeiling(_arg1)){ y = (_arg1.y + _arg1.height); return (true); }; } else { if (((_arg1.hitFloor(this)) && (hitCeiling(_arg1)))){ _local2 = ((_local4.bottom - _local3.top) / 2); _arg1.y = (_arg1.y - _local2); y = (y + _local2); return (true); }; }; }; }; }; }; }; return (true); } public function render():void{ } public function kill():void{ exists = false; dead = true; } public function collideArrayY(_arg1:Array):void{ var _local2:FlxCore; if (((!(exists)) || (dead))){ return; }; var _local3:uint = _arg1.length; var _local4:uint; while (_local4 < _local3) { _local2 = _arg1[_local4]; if ((((((((_local2 === this)) || ((_local2 == null)))) || (!(_local2.exists)))) || (_local2.dead))){ } else { collideY(_local2); }; _local4++; }; } public function collideY(_arg1:FlxCore):Boolean{ var _local2:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local3:Rectangle = new Rectangle(); var _local4:Rectangle = new Rectangle(); if (_arg1.y > _arg1.last.y){ _local4.y = _arg1.last.y; _local4.height = ((_arg1.y - _arg1.last.y) + _arg1.height); } else { _local4.y = _arg1.y; _local4.height = ((_arg1.last.y - _arg1.y) + _arg1.height); }; _local4.x = _arg1.x; _local4.width = _arg1.width; if (y > last.y){ _local3.y = last.y; _local3.height = ((y - last.y) + height); } else { _local3.y = y; _local3.height = ((last.y - y) + height); }; _local3.x = x; _local3.width = width; if (((((((((_local4.x + _local4.width) <= _local3.x)) || ((_local4.x >= (_local3.x + _local3.width))))) || (((_local4.y + _local4.height) <= _local3.y)))) || ((_local4.y >= (_local3.y + _local3.height))))){ return (false); }; var _local5:Number = (_arg1.y - _arg1.last.y); var _local6:Number = (y - last.y); var _local7:Boolean = (((_arg1.y < (y + height))) && (((_arg1.y + _arg1.height) > y))); if ((((((((_local5 > 0)) && ((_local6 <= 0)))) || ((((_local5 >= 0)) && ((((_local5 > _local6)) && (_local7))))))) || ((((_local5 <= 0)) && ((((-(_local5) < -(_local6))) && (_local7))))))){ if (_local4.bottom > _local3.top){ if (((fixed) && (!(_arg1.fixed)))){ if (_arg1.hitFloor(this)){ _arg1.y = (y - _arg1.height); return (true); }; } else { if (((!(fixed)) && (_arg1.fixed))){ if (hitCeiling(_arg1)){ y = (_arg1.y + _arg1.height); return (true); }; } else { if (((_arg1.hitFloor(this)) && (hitCeiling(_arg1)))){ _local2 = ((_local4.bottom - _local3.top) / 2); _arg1.y = (_arg1.y - _local2); y = (y + _local2); return (true); }; }; }; }; } else { if ((((((((_local5 < 0)) && ((_local6 >= 0)))) || ((((_local5 >= 0)) && ((((_local5 < _local6)) && (_local7))))))) || ((((_local5 <= 0)) && ((((-(_local5) > -(_local6))) && (_local7))))))){ if (_local4.top < _local3.bottom){ if (((fixed) && (!(_arg1.fixed)))){ if (_arg1.hitCeiling(this)){ _arg1.y = (y + height); return (true); }; } else { if (((!(fixed)) && (_arg1.fixed))){ if (hitFloor(_arg1)){ y = (_arg1.y - height); return (true); }; } else { if (((_arg1.hitCeiling(this)) && (hitFloor(_arg1)))){ _local2 = ((_local3.bottom - _local4.top) / 2); _arg1.y = (_arg1.y + _local2); y = (y - _local2); return (true); }; }; }; }; } else { _local8 = (_local4.x + (_local4.width / 2)); _local9 = (_local4.y + (_local4.height / 2)); _local10 = (_local3.x + (_local3.width / 2)); _local11 = (_local3.y + (_local3.height / 2)); if (Math.abs((_local8 - _local10)) > Math.abs((_local9 - _local11))){ if (_local8 > _local10){ if (((fixed) && (!(_arg1.fixed)))){ if (_arg1.hitWall(this)){ _arg1.x = (x + width); return (true); }; } else { if (((!(fixed)) && (_arg1.fixed))){ if (hitWall(_arg1)){ x = (_arg1.x - width); return (true); }; } else { if (((_arg1.hitWall(this)) && (hitWall(_arg1)))){ _local2 = ((_local3.right - _local4.left) / 2); _arg1.x = (_arg1.x + _local2); x = (x - _local2); return (true); }; }; }; } else { if (((fixed) && (!(_arg1.fixed)))){ if (_arg1.hitWall(this)){ _arg1.x = (x - _arg1.width); return (true); }; } else { if (((!(fixed)) && (_arg1.fixed))){ if (hitWall(_arg1)){ x = (_arg1.x + _arg1.width); return (true); }; } else { if (((_arg1.hitWall(this)) && (hitWall(_arg1)))){ _local2 = ((_local4.right - _local3.left) / 2); _arg1.x = (_arg1.x - _local2); x = (x + _local2); return (true); }; }; }; }; } else { if (_local9 > _local11){ if (_local4.top < _local3.bottom){ if (((fixed) && (!(_arg1.fixed)))){ if (_arg1.hitCeiling(this)){ _arg1.y = (y + height); return (true); }; } else { if (((!(fixed)) && (_arg1.fixed))){ if (hitFloor(_arg1)){ y = (_arg1.y - height); return (true); }; } else { if (((_arg1.hitCeiling(this)) && (hitFloor(_arg1)))){ _local2 = ((_local3.bottom - _local4.top) / 2); _arg1.y = (_arg1.y + _local2); y = (y - _local2); return (true); }; }; }; }; } else { if (((fixed) && (!(_arg1.fixed)))){ if (_arg1.hitFloor(this)){ _arg1.y = (y - _arg1.height); return (true); }; } else { if (((!(fixed)) && (_arg1.fixed))){ if (hitCeiling(_arg1)){ y = (_arg1.y + _arg1.height); return (true); }; } else { if (((_arg1.hitFloor(this)) && (hitCeiling(_arg1)))){ _local2 = ((_local4.bottom - _local3.top) / 2); _arg1.y = (_arg1.y - _local2); y = (y + _local2); return (true); }; }; }; }; }; }; }; return (true); } public function getScreenXY(_arg1:Point=null):Point{ if (_arg1 == null){ _arg1 = new Point(); }; _arg1.x = (Math.floor(x) + Math.floor((FlxG.scroll.x * scrollFactor.x))); _arg1.y = (Math.floor(y) + Math.floor((FlxG.scroll.y * scrollFactor.y))); return (_arg1); } public function hitFloor(_arg1:FlxCore=null):Boolean{ return (true); } public function hitCeiling(_arg1:FlxCore=null):Boolean{ return (true); } public function flickering():Boolean{ return ((_flickerTimer >= 0)); } public function endFlicker():void{ _flicker = false; visible = true; } public function destroy():void{ } public function collideArray(_arg1:Array):void{ var _local2:FlxCore; if (((!(exists)) || (dead))){ return; }; var _local3:uint = _arg1.length; var _local4:uint; while (_local4 < _local3) { _local2 = _arg1[_local4]; if ((((((((_local2 === this)) || ((_local2 == null)))) || (!(_local2.exists)))) || (_local2.dead))){ } else { collide(_local2); }; _local4++; }; } public function collideArrayX(_arg1:Array):void{ var _local2:FlxCore; if (((!(exists)) || (dead))){ return; }; var _local3:uint = _arg1.length; var _local4:uint; while (_local4 < _local3) { _local2 = _arg1[_local4]; if ((((((((_local2 === this)) || ((_local2 == null)))) || (!(_local2.exists)))) || (_local2.dead))){ } else { collideX(_local2); }; _local4++; }; } public function collide(_arg1:FlxCore):Boolean{ var _local2:Boolean = collideX(_arg1); var _local3:Boolean = collideY(_arg1); return (((_local2) || (_local3))); } } }//package org.flixel
Section 32
//FlxEmitter (org.flixel.FlxEmitter) package org.flixel { import flash.geom.*; public class FlxEmitter extends FlxCore { public var delay:Number; public var maxRotation:Number; protected var _timer:Number; public var gravity:Number; public var minVelocity:Point; protected var _sprites:Array; public var maxVelocity:Point; protected var _particle:uint; public var minRotation:Number; public var drag:Number; public function FlxEmitter(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0.1){ visible = false; x = _arg1; y = _arg2; width = 0; height = 0; minVelocity = new Point(-100, -100); maxVelocity = new Point(100, 100); minRotation = -360; maxRotation = 360; gravity = 400; drag = 0; delay = _arg3; _sprites = null; kill(); } public function setRotation(_arg1:Number=0, _arg2:Number=0):void{ minRotation = _arg1; maxRotation = _arg2; } public function loadSprites(_arg1:Array):FlxEmitter{ _sprites = _arg1; var _local2:uint = _sprites.length; var _local3:uint; while (_local3 < _local2) { _sprites[_local3].scrollFactor = scrollFactor; _local3++; }; kill(); if (delay > 0){ restart(); }; return (this); } override public function update():void{ _timer = (_timer + FlxG.elapsed); if (_timer > 1.4){ this.kill(); }; } public function setSize(_arg1:uint, _arg2:uint):void{ width = _arg1; height = _arg2; } public function emit():void{ var _local1:FlxSprite = _sprites[_particle]; _local1.reset(((x - (_local1.width >> 1)) + (FlxG.random() * width)), ((y - (_local1.height >> 1)) + (FlxG.random() * height))); _local1.velocity.x = minVelocity.x; if (minVelocity.x != maxVelocity.x){ _local1.velocity.x = (_local1.velocity.x + (FlxG.random() * (maxVelocity.x - minVelocity.x))); }; _local1.velocity.y = minVelocity.y; if (minVelocity.y != maxVelocity.y){ _local1.velocity.y = (_local1.velocity.y + (FlxG.random() * (maxVelocity.y - minVelocity.y))); }; _local1.acceleration.y = gravity; _local1.angularVelocity = minRotation; if (minRotation != maxRotation){ _local1.angularVelocity = (_local1.angularVelocity + (FlxG.random() * (maxRotation - minRotation))); }; if (_local1.angularVelocity != 0){ _local1.angle = ((FlxG.random() * 360) - 180); }; _local1.drag.x = drag; _local1.drag.y = drag; _particle++; if (_particle >= _sprites.length){ _particle = 0; }; _local1.onEmit(); } public function restart():void{ if (_sprites == null){ FlxG.log("ERROR: You must attach sprites to an emitter for it to work.\nSee FlxEmitter.loadSprites() and FlxEmitter.createSprites() for more info."); return; }; active = true; _timer = 0; _particle = 0; } public function createSprites(_arg1:Class, _arg2:uint=50, _arg3:Boolean=true, _arg4:FlxLayer=null):FlxEmitter{ var _local5:uint; var _local6:uint; var _local7:FlxSprite; _sprites = new Array(); _local5 = 0; while (_local5 < _arg2) { if (_arg3){ _local7 = new FlxSprite(); _local7.loadGraphic(_arg1, true); _local7.randomFrame(); _sprites.push(_local7); } else { _sprites.push(new FlxSprite(0, 0, _arg1)); }; _local5++; }; _local6 = _sprites.length; _local5 = 0; while (_local5 < _local6) { if (_arg4 == null){ FlxG.state.add(_sprites[_local5]); } else { _arg4.add(_sprites[_local5]); }; _sprites[_local5].scrollFactor = scrollFactor; _local5++; }; kill(); if (delay > 0){ restart(); }; return (this); } override public function kill():void{ active = false; if (_sprites == null){ return; }; var _local1:uint = _sprites.length; var _local2:uint; while (_local2 < _local1) { _sprites[_local2].exists = false; _local2++; }; } public function setXVelocity(_arg1:Number=0, _arg2:Number=0):void{ minVelocity.x = _arg1; maxVelocity.x = _arg2; } public function setYVelocity(_arg1:Number=0, _arg2:Number=0):void{ minVelocity.y = _arg1; maxVelocity.y = _arg2; } } }//package org.flixel
Section 33
//FlxG (org.flixel.FlxG) package org.flixel { import flash.display.*; import flash.geom.*; import org.flixel.data.*; import flash.net.*; import flash.utils.*; public class FlxG { protected static var ImgDefaultCursor:Class = FlxG_ImgDefaultCursor; public static var kong:FlxKong; public static var scores:Array; public static var music:FlxSound; public static var height:uint; protected static var _volume:Number; public static var buffer:BitmapData; public static var sounds:Array; protected static var _seed:Number; public static var debug:Boolean; public static var LIBRARY_MINOR_VERSION:uint = 57; public static var LIBRARY_MAJOR_VERSION:uint = 1; public static var levels:Array; public static var elapsed:Number; public static var save:int; protected static var _cache:Object; public static var level:int; public static var state:FlxState; public static var score:int; public static var saves:Array; protected static var _scrollTarget:Point; public static var followTarget:FlxCore; public static var mouse:FlxMouse; public static var followLead:Point; public static var LIBRARY_NAME:String = "flixel"; protected static var _originalSeed:Number; public static var followLerp:Number; public static var width:uint; public static var dilation:Number; public static var _game:FlxGame; public static var scroll:Point; public static var followMin:Point; public static var followMax:Point; public static var keys:FlxKeyboard; protected static var _pause:Boolean; public static var sendToDB:SendToDB = new SendToDB(); protected static var _mute:Boolean; public static function flash(_arg1:uint, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{ _game._flash.restart(_arg1, _arg2, _arg3, _arg4); } public static function collideArrays(_arg1:Array, _arg2:Array):Boolean{ var _local4:uint; var _local5:uint; var _local6:FlxCore; var _local7:FlxCore; var _local3:Boolean; var _local8:uint = _arg1.length; var _local9:uint = _arg2.length; if (_arg1 === _arg2){ _local4 = 0; while (_local4 < _local8) { _local6 = _arg1[_local4]; if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){ } else { _local5 = (_local4 + 1); while (_local5 < _local9) { _local7 = _arg2[_local5]; if ((((((_local7 == null)) || (!(_local7.exists)))) || (_local7.dead))){ } else { if (_local6.collide(_local7)){ _local3 = true; }; }; _local5++; }; }; _local4++; }; } else { _local4 = 0; while (_local4 < _local8) { _local6 = _arg1[_local4]; if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){ } else { _local5 = 0; while (_local5 < _local9) { _local7 = _arg2[_local5]; if ((((((((_local6 === _local7)) || ((_local7 == null)))) || (!(_local7.exists)))) || (_local7.dead))){ } else { if (_local6.collide(_local7)){ _local3 = true; }; }; _local5++; }; }; _local4++; }; }; return (_local3); } public static function get mute():Boolean{ return (_mute); } public static function get volume():Number{ return (_volume); } protected static function changeSounds():void{ if (((!((music == null))) && (music.active))){ music.updateTransform(); }; var _local1:uint = sounds.length; var _local2:uint; while (_local2 < _local1) { if (sounds[_local2].active){ sounds[_local2].updateTransform(); }; _local2++; }; } static function doFollow():void{ if (followTarget != null){ if (((followTarget.exists) && (!(followTarget.dead)))){ _scrollTarget.x = ((((width >> 1) - followTarget.x) - (followTarget.width >> 1)) + (followTarget as FlxSprite).offset.x); _scrollTarget.y = ((((height >> 1) - followTarget.y) - (followTarget.height >> 1)) + (followTarget as FlxSprite).offset.y); if (((!((followLead == null))) && ((followTarget is FlxSprite)))){ _scrollTarget.x = (_scrollTarget.x - ((followTarget as FlxSprite).velocity.x * followLead.x)); _scrollTarget.y = (_scrollTarget.y - ((followTarget as FlxSprite).velocity.y * followLead.y)); }; }; if ((followTarget as FlxSprite).facing == FlxSprite.LEFT){ scroll.x = (scroll.x + ((((_scrollTarget.x - scroll.x) + 30) * followLerp) * FlxG.elapsed)); } else { if ((followTarget as FlxSprite).facing == FlxSprite.RIGHT){ scroll.x = (scroll.x + ((((_scrollTarget.x - scroll.x) - 30) * followLerp) * FlxG.elapsed)); }; }; scroll.y = (scroll.y + ((((_scrollTarget.y - scroll.y) + 50) * followLerp) * FlxG.elapsed)); if (followMin != null){ if (scroll.x > followMin.x){ scroll.x = followMin.x; }; if (scroll.y > followMin.y){ scroll.y = followMin.y; }; }; if (followMax != null){ if (scroll.x < followMax.x){ scroll.x = followMax.x; }; if (scroll.y < followMax.y){ scroll.y = followMax.y; }; }; }; } public static function showSupportPanel(_arg1:Boolean=true):void{ _game._panel.show(_arg1); } public static function addBitmap(_arg1:Class, _arg2:Boolean=false, _arg3:Boolean=false):BitmapData{ var _local7:uint; var _local8:String; var _local9:BitmapData; var _local10:Matrix; var _local4:Boolean; var _local5:String = String(_arg1); if (((((_arg3) && (!((_cache[_local5] == undefined))))) && (!((_cache[_local5] == null))))){ _local7 = 0; do { var _temp1 = _local7; _local7 = (_local7 + 1); _local8 = (_local5 + _temp1); } while (((!((_cache[_local8] == undefined))) && (!((_cache[_local8] == null))))); _local5 = _local8; }; if ((((_cache[_local5] == undefined)) || ((_cache[_local5] == null)))){ _cache[_local5] = new (_arg1).bitmapData; if (_arg2){ _local4 = true; }; }; var _local6:BitmapData = _cache[_local5]; if (((((!(_local4)) && (_arg2))) && ((_local6.width == new (_arg1).bitmapData.width)))){ _local4 = true; }; if (_local4){ _local9 = new BitmapData((_local6.width << 1), _local6.height, true, 0); _local9.draw(_local6); _local10 = new Matrix(); _local10.scale(-1, 1); _local10.translate(_local9.width, 0); _local9.draw(_local6, _local10); _local6 = _local9; }; return (_local6); } public static function getMuteValue():uint{ if (_mute){ return (0); }; return (1); } public static function set mute(_arg1:Boolean):void{ _mute = _arg1; changeSounds(); } public static function play(_arg1:Class, _arg2:Number=1, _arg3:Boolean=false):FlxSound{ var _local4:uint; var _local5:uint = sounds.length; _local4 = 0; while (_local4 < _local5) { if (!sounds[_local4].active){ break; }; _local4++; }; if (sounds[_local4] == null){ sounds[_local4] = new FlxSound(); }; var _local6:FlxSound = sounds[_local4]; _local6.loadEmbedded(_arg1, _arg3); _local6.volume = _arg2; _local6.play(); return (_local6); } public static function getAngle(_arg1:Number, _arg2:Number):Number{ return (((Math.atan2(_arg2, _arg1) * 180) / Math.PI)); } public static function hideCursor():void{ if (_game._cursor == null){ return; }; _game._buffer.removeChild(_game._cursor); _game._cursor = null; } public static function set volume(_arg1:Number):void{ _volume = _arg1; if (_volume < 0){ _volume = 0; } else { if (_volume > 1){ _volume = 1; }; }; changeSounds(); } static function setGameData(_arg1:FlxGame, _arg2:uint, _arg3:uint):void{ _game = _arg1; _cache = new Object(); width = _arg2; height = _arg3; _mute = false; _volume = 0.5; sounds = new Array(); mouse = new FlxMouse(); keys = new FlxKeyboard(); scroll = null; _scrollTarget = null; unfollow(); FlxG.levels = new Array(); FlxG.scores = new Array(); level = 0; score = 0; seed = NaN; kong = null; pause = false; dilation = 1; } public static function computeVelocity(_arg1:Number, _arg2:Number=0, _arg3:Number=0, _arg4:Number=10000):Number{ var _local5:Number; if (_arg2 != 0){ _arg1 = (_arg1 + (_arg2 * FlxG.elapsed)); } else { if (_arg3 != 0){ _local5 = (_arg3 * FlxG.elapsed); if ((_arg1 - _local5) > 0){ _arg1 = (_arg1 - _local5); } else { if ((_arg1 + _local5) < 0){ _arg1 = (_arg1 + _local5); } else { _arg1 = 0; }; }; }; }; if (((!((_arg1 == 0))) && (!((_arg4 == 10000))))){ if (_arg1 > _arg4){ _arg1 = _arg4; } else { if (_arg1 < -(_arg4)){ _arg1 = -(_arg4); }; }; }; return (_arg1); } public static function mutate(_arg1:Number, _arg2:Number):Number{ _arg1 = (_arg1 + _arg2); if (_arg1 > 1){ _arg1 = (_arg1 - int(_arg1)); }; return (_arg1); } public static function collideArraysX(_arg1:Array, _arg2:Array):Boolean{ var _local4:uint; var _local5:uint; var _local6:FlxCore; var _local7:FlxCore; var _local3:Boolean; var _local8:uint = _arg1.length; var _local9:uint = _arg2.length; if (_arg1 === _arg2){ _local4 = 0; while (_local4 < _local8) { _local6 = _arg1[_local4]; if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){ } else { _local5 = (_local4 + 1); while (_local5 < _local9) { _local7 = _arg2[_local5]; if ((((((_local7 == null)) || (!(_local7.exists)))) || (_local7.dead))){ } else { if (_local6.collideX(_local7)){ _local3 = true; }; }; _local5++; }; }; _local4++; }; } else { _local4 = 0; while (_local4 < _local8) { _local6 = _arg1[_local4]; if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){ } else { _local5 = 0; while (_local5 < _local9) { _local7 = _arg2[_local5]; if ((((((((_local6 === _local7)) || ((_local7 == null)))) || (!(_local7.exists)))) || (_local7.dead))){ } else { if (_local6.collideX(_local7)){ _local3 = true; }; }; _local5++; }; }; _local4++; }; }; return (_local3); } public static function collideArraysY(_arg1:Array, _arg2:Array):Boolean{ var _local4:uint; var _local5:uint; var _local6:FlxCore; var _local7:FlxCore; var _local3:Boolean; var _local8:uint = _arg1.length; var _local9:uint = _arg2.length; if (_arg1 === _arg2){ _local4 = 0; while (_local4 < _local8) { _local6 = _arg1[_local4]; if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){ } else { _local5 = (_local4 + 1); while (_local5 < _local9) { _local7 = _arg2[_local5]; if ((((((_local7 == null)) || (!(_local7.exists)))) || (_local7.dead))){ } else { if (_local6.collideY(_local7)){ _local3 = true; }; }; _local5++; }; }; _local4++; }; } else { _local4 = 0; while (_local4 < _local8) { _local6 = _arg1[_local4]; if ((((((_local6 == null)) || (!(_local6.exists)))) || (_local6.dead))){ } else { _local5 = 0; while (_local5 < _local9) { _local7 = _arg2[_local5]; if ((((((((_local6 === _local7)) || ((_local7 == null)))) || (!(_local7.exists)))) || (_local7.dead))){ } else { if (_local6.collideY(_local7)){ _local3 = true; }; }; _local5++; }; }; _local4++; }; }; return (_local3); } public static function createBitmap(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean):BitmapData{ var _local6:uint; var _local7:String; var _local5:String = ((((_arg1 + "x") + _arg2) + ":") + _arg3); if (((((_arg4) && (!((_cache[_local5] == undefined))))) && (!((_cache[_local5] == null))))){ _local6 = 0; do { var _temp1 = _local6; _local6 = (_local6 + 1); _local7 = (_local5 + _temp1); } while (((!((_cache[_local7] == undefined))) && (!((_cache[_local7] == null))))); _local5 = _local7; }; if ((((_cache[_local5] == undefined)) || ((_cache[_local5] == null)))){ _cache[_local5] = new BitmapData(_arg1, _arg2, true, _arg3); }; return (_cache[_local5]); } public static function playMusic(_arg1:Class, _arg2:Number=1):void{ if (music == null){ music = new FlxSound(); } else { if (music.active){ music.stop(); }; }; music.loadEmbedded(_arg1, true); music.volume = _arg2; music.survive = true; music.play(); } public static function overlapArray(_arg1:Array, _arg2:FlxCore, _arg3:Function=null):Boolean{ var _local5:FlxCore; if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){ return (false); }; var _local4:Boolean; var _local6:uint = _arg1.length; var _local7:uint; while (_local7 < _local6) { _local5 = _arg1[_local7]; if ((((((((_local5 === _arg2)) || ((_local5 == null)))) || (!(_local5.exists)))) || (_local5.dead))){ } else { if (_local5.overlaps(_arg2)){ _local4 = true; if (_arg3 != null){ _arg3(_local5, _arg2); } else { _local5.kill(); _arg2.kill(); }; }; }; _local7++; }; return (_local4); } public static function log(_arg1:Object):void{ _game._console.log(_arg1.toString()); } public static function overlapArrays(_arg1:Array, _arg2:Array, _arg3:Function=null):Boolean{ var _local5:uint; var _local6:uint; var _local7:FlxCore; var _local8:FlxCore; var _local4:Boolean; var _local9:uint = _arg1.length; var _local10:uint = _arg2.length; if (_arg1 === _arg2){ _local5 = 0; while (_local5 < _local9) { _local7 = _arg1[_local5]; if ((((((_local7 == null)) || (!(_local7.exists)))) || (_local7.dead))){ } else { _local6 = (_local5 + 1); while (_local6 < _local10) { _local8 = _arg2[_local6]; if ((((((_local8 == null)) || (!(_local8.exists)))) || (_local8.dead))){ } else { if (_local7.overlaps(_local8)){ _local4 = true; if (_arg3 != null){ _arg3(_local7, _local8); } else { _local7.kill(); _local8.kill(); }; }; }; _local6++; }; }; _local5++; }; } else { _local5 = 0; while (_local5 < _arg1.length) { _local7 = _arg1[_local5]; if ((((((_local7 == null)) || (!(_local7.exists)))) || (_local7.dead))){ } else { _local6 = 0; while (_local6 < _arg2.length) { _local8 = _arg2[_local6]; if ((((((((_local7 === _local8)) || ((_local8 == null)))) || (!(_local8.exists)))) || (_local8.dead))){ } else { if (_local7.overlaps(_local8)){ _local4 = true; if (_arg3 != null){ _arg3(_local7, _local8); } else { _local7.kill(); _local8.kill(); }; }; }; _local6++; }; }; _local5++; }; }; return (_local4); } static function updateSounds():void{ if (((!((music == null))) && (music.active))){ music.update(); }; var _local1:uint = sounds.length; var _local2:uint; while (_local2 < _local1) { if (sounds[_local2].active){ sounds[_local2].update(); }; _local2++; }; } public static function get seed():Number{ return (_originalSeed); } public static function getClassName(_arg1:Object, _arg2:Boolean=false):String{ var _local3:String = getQualifiedClassName(_arg1); _local3 = _local3.replace("::", "."); if (_arg2){ _local3 = _local3.substr((_local3.lastIndexOf(".") + 1)); }; return (_local3); } static function updateInput():void{ keys.update(); mouse.update((state.mouseX - scroll.x), (state.mouseY - scroll.y)); } public static function stream(_arg1:String, _arg2:Number=1, _arg3:Boolean=false):FlxSound{ var _local4:uint; var _local5:uint = sounds.length; _local4 = 0; while (_local4 < _local5) { if (!sounds[_local4].active){ break; }; _local4++; }; if (sounds[_local4] == null){ sounds[_local4] = new FlxSound(); }; var _local6:FlxSound = sounds[_local4]; _local6.loadStream(_arg1, _arg3); _local6.volume = _arg2; _local6.play(); return (_local6); } static function unfollow():void{ followTarget = null; followLead = null; followLerp = 1; followMin = null; followMax = null; if (scroll == null){ scroll = new Point(); } else { scroll.x = (scroll.y = 0); }; if (_scrollTarget == null){ _scrollTarget = new Point(); } else { _scrollTarget.x = (_scrollTarget.y = 0); }; } public static function fade(_arg1:uint, _arg2:Number=1, _arg3:Function=null, _arg4:Boolean=false):void{ _game._fade.restart(_arg1, _arg2, _arg3, _arg4); } protected static function playSounds():void{ if (((!((music == null))) && (music.active))){ music.play(); }; var _local1:uint = sounds.length; var _local2:uint; while (_local2 < _local1) { if (sounds[_local2].active){ sounds[_local2].play(); }; _local2++; }; } public static function followAdjust(_arg1:Number=0, _arg2:Number=0):void{ followLead = new Point(_arg1, _arg2); } public static function follow(_arg1:FlxCore, _arg2:Number=1):void{ followTarget = _arg1; followLerp = _arg2; _scrollTarget.x = ((((width >> 1) - followTarget.x) - (followTarget.width >> 1)) + (followTarget as FlxSprite).offset.x); _scrollTarget.y = ((((height >> 1) - followTarget.y) - (followTarget.height >> 1)) + (followTarget as FlxSprite).offset.y); scroll.x = _scrollTarget.x; scroll.y = _scrollTarget.y; doFollow(); } public static function showCursor(_arg1:Class=null):void{ if (_arg1 == null){ _game._cursor = (_game._buffer.addChild(new ImgDefaultCursor()) as Bitmap); } else { _game._cursor = (_game._buffer.addChild(new (_arg1)) as Bitmap); }; } public static function randomize(_arg1:Number):Number{ return ((((69621 * int((_arg1 * 2147483647))) % 2147483647) / 2147483647)); } public static function getRandom(_arg1:Array):Object{ return (_arg1[int((FlxG.random() * _arg1.length))]); } public static function resetInput():void{ keys.reset(); mouse.reset(); } public static function switchState(_arg1:Class):void{ _game.switchState(_arg1); } public static function getNonexist(_arg1:Array):FlxCore{ var _local2:uint = _arg1.length; if (_local2 <= 0){ return (null); }; var _local3:uint; do { if (!_arg1[_local3].exists){ return (_arg1[_local3]); }; ++_local3; } while (_local3 < _local2); return (null); } public static function random(_arg1:Boolean=true):Number{ var _local2:Number; if (((_arg1) && (!(isNaN(_seed))))){ _local2 = randomize(_seed); _seed = mutate(_seed, _local2); return (_local2); }; return (Math.random()); } public static function openURL(_arg1:String):void{ navigateToURL(new URLRequest(_arg1), "_blank"); } public static function followBounds(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0):void{ followMin = new Point(-(_arg1), -(_arg2)); followMax = new Point((-(_arg3) + width), (-(_arg4) + height)); if (followMax.x > followMin.x){ followMax.x = followMin.x; }; if (followMax.y > followMin.y){ followMax.y = followMin.y; }; doFollow(); } public static function collideArray(_arg1:Array, _arg2:FlxCore):Boolean{ var _local4:FlxCore; if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){ return (false); }; var _local3:Boolean; var _local5:uint = _arg1.length; var _local6:uint; while (_local6 < _local5) { _local4 = _arg1[_local6]; if ((((((((_local4 === _arg2)) || ((_local4 == null)))) || (!(_local4.exists)))) || (_local4.dead))){ } else { if (_local4.collide(_arg2)){ _local3 = true; }; }; _local6++; }; return (_local3); } public static function quake(_arg1:Number, _arg2:Number=0.5):void{ _game._quake.reset(_arg1, _arg2); } protected static function pauseSounds():void{ if (((!((music == null))) && (music.active))){ music.pause(); }; var _local1:uint = sounds.length; var _local2:uint; while (_local2 < _local1) { if (sounds[_local2].active){ sounds[_local2].pause(); }; _local2++; }; } public static function set seed(_arg1:Number):void{ _seed = _arg1; _originalSeed = _seed; } public static function getClass(_arg1:String):Class{ return ((getDefinitionByName(_arg1) as Class)); } static function destroySounds(_arg1:Boolean=false):void{ if (sounds == null){ return; }; if (((!((music == null))) && (((_arg1) || (!(music.survive)))))){ music.destroy(); }; var _local2:uint = sounds.length; var _local3:uint; while (_local3 < _local2) { if (((_arg1) || (!(sounds[_local3].survive)))){ sounds[_local3].destroy(); }; _local3++; }; } public static function set pause(_arg1:Boolean):void{ var _local2:Boolean = _pause; _pause = _arg1; if (_pause != _local2){ if (_pause){ _game.pauseGame(); pauseSounds(); } else { _game.unpauseGame(); playSounds(); }; }; } public static function hideSupportPanel():void{ _game._panel.hide(); } public static function rotatePoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Point=null):Point{ if (_arg6 == null){ _arg6 = new Point(); }; var _local7:Number = ((-(_arg5) / 180) * Math.PI); var _local8:Number = (_arg1 - _arg3); var _local9:Number = (_arg4 - _arg2); _arg6.x = ((_arg3 + (Math.cos(_local7) * _local8)) - (Math.sin(_local7) * _local9)); _arg6.y = (_arg4 - ((Math.sin(_local7) * _local8) + (Math.cos(_local7) * _local9))); return (_arg6); } public static function get pause():Boolean{ return (_pause); } public static function collideArrayX(_arg1:Array, _arg2:FlxCore):Boolean{ var _local4:FlxCore; if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){ return (false); }; var _local3:Boolean; var _local5:uint = _arg1.length; var _local6:uint; while (_local6 < _local5) { _local4 = _arg1[_local6]; if ((((((((_local4 === _arg2)) || ((_local4 == null)))) || (!(_local4.exists)))) || (_local4.dead))){ } else { if (_local4.collideX(_arg2)){ _local3 = true; }; }; _local6++; }; return (_local3); } public static function collideArrayY(_arg1:Array, _arg2:FlxCore):Boolean{ var _local4:FlxCore; if ((((((_arg2 == null)) || (!(_arg2.exists)))) || (_arg2.dead))){ return (false); }; var _local3:Boolean; var _local5:uint = _arg1.length; var _local6:uint; while (_local6 < _local5) { _local4 = _arg1[_local6]; if ((((((((_local4 === _arg2)) || ((_local4 == null)))) || (!(_local4.exists)))) || (_local4.dead))){ } else { if (_local4.collideY(_arg2)){ _local3 = true; }; }; _local6++; }; return (_local3); } } }//package org.flixel
Section 34
//FlxG_ImgDefaultCursor (org.flixel.FlxG_ImgDefaultCursor) package org.flixel { import mx.core.*; public class FlxG_ImgDefaultCursor extends BitmapAsset { } }//package org.flixel
Section 35
//FlxGame (org.flixel.FlxGame) package org.flixel { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.text.*; import org.flixel.data.*; import flash.utils.*; public class FlxGame extends Sprite { const MAX_ELAPSED:Number = 0.0666; var _bmpFront:Bitmap; var _panel:FlxPanel; var _logoTimer:Number; var _curState:FlxState; var _console:FlxConsole; protected var SndBeep:Class; var _logoFade:Bitmap; var _created:Boolean; var _zoom:uint; var _gameXOffset:int; var _elapsed:Number; var _flipped:Boolean; var _total:uint; var _soundTrayBars:Array; public var useDefaultHotKeys:Boolean; protected var junk:String;// = "FlxGame_junk" var _bmpBack:Bitmap; var _iState:Class; public var showLogo:Boolean; var _paused:Boolean; var _quake:FlxQuake; var _gameYOffset:int; var _buffer:Sprite; var _f:Array; var _fSound:Class; var _fc:uint; var _soundTray:Sprite; var _frame:Class; var _flash:FlxFlash; var _logoComplete:Boolean; var _r:Rectangle; var _poweredBy:Bitmap; var _cursor:Bitmap; public var pause:FlxLayer; protected var ImgPoweredBy:Class; var _fade:FlxFade; var _soundTrayTimer:Number; public function FlxGame(_arg1:uint, _arg2:uint, _arg3:Class, _arg4:uint=2){ ImgPoweredBy = FlxGame_ImgPoweredBy; SndBeep = FlxGame_SndBeep; super(); _zoom = _arg4; FlxState.bgColor = 4278190080; FlxG.setGameData(this, _arg1, _arg2); _elapsed = 0; _total = 0; pause = new FlxPause(); _quake = new FlxQuake(_zoom); _flash = new FlxFlash(); _fade = new FlxFade(); _curState = null; _iState = _arg3; _panel = new FlxPanel(); useDefaultHotKeys = true; showLogo = true; _f = null; _fc = 4294967295; _frame = null; _gameXOffset = 0; _gameYOffset = 0; _paused = false; _created = false; _logoComplete = false; addEventListener(Event.ENTER_FRAME, onEnterFrame); } protected function onFocusLost(_arg1:Event=null):void{ if (_logoComplete){ FlxG.pause = true; }; } function unpauseGame():void{ if (!_panel.visible){ FlxG.resetInput(); }; _paused = false; stage.frameRate = 90; FlxG.state.afterPause(); } protected function setupSupportPanel(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:String):void{ _panel.init(_arg1, _arg2, _arg3, _arg4, _arg5); } function pauseGame():void{ if (((!((x == 0))) || (!((y == 0))))){ x = 0; y = 0; }; if (!_flipped){ _bmpBack.bitmapData.copyPixels(_bmpFront.bitmapData, _r, new Point(0, 0)); } else { _bmpFront.bitmapData.copyPixels(_bmpBack.bitmapData, _r, new Point(0, 0)); }; _paused = true; stage.frameRate = 10; FlxG.state.beforePause(); } protected function onFocus(_arg1:Event=null):void{ if (FlxG.pause){ FlxG.pause = false; }; } protected function onKeyUp(_arg1:KeyboardEvent):void{ var _local2:int; var _local3:String; if (_arg1.keyCode == 192){ _console.toggle(); return; }; if (useDefaultHotKeys){ _local2 = _arg1.keyCode; _local3 = String.fromCharCode(_arg1.charCode); switch (_local2){ case 80: FlxG.pause = !(FlxG.pause); default: break; }; }; FlxG.keys.handleKeyUp(_arg1); } protected function onMouseUp(_arg1:MouseEvent):void{ FlxG.mouse.handleMouseUp(_arg1); } function switchState(_arg1:Class):void{ _panel.hide(); FlxG.unfollow(); FlxG.keys.reset(); FlxG.mouse.reset(); FlxG.hideCursor(); FlxG.destroySounds(); _flash.restart(0, 0); _fade.restart(0, 0); _quake.reset(0); _buffer.x = 0; _buffer.y = 0; var _local2:FlxState = new (_arg1); _buffer.addChild(_local2); if (_curState != null){ _buffer.swapChildren(_local2, _curState); _buffer.removeChild(_curState); _curState.destroy(); }; _curState = _local2; } protected function onKeyDown(_arg1:KeyboardEvent):void{ FlxG.keys.handleKeyDown(_arg1); } protected function onEnterFrame(_arg1:Event):void{ var _local2:uint; var _local4:Bitmap; var _local5:uint; var _local6:uint; var _local7:int; var _local8:int; var _local9:ColorTransform; var _local10:String; var _local11:String; var _local12:TextField; var _local13:uint; var _local14:uint; var _local15:Bitmap; var _local3:uint = getTimer(); _elapsed = ((_local3 - _total) / 1000); _total = _local3; FlxG.elapsed = _elapsed; if (FlxG.elapsed > MAX_ELAPSED){ FlxG.elapsed = MAX_ELAPSED; }; FlxG.elapsed = (FlxG.elapsed * FlxG.dilation); if (_logoComplete){ _panel.update(); _console.update(); if (_soundTrayTimer > 0){ _soundTrayTimer = (_soundTrayTimer - _elapsed); } else { if (_soundTray.y > -(_soundTray.height)){ _soundTray.y = (_soundTray.y - ((_elapsed * FlxG.height) * 2)); if (_soundTray.y < -(_soundTray.height)){ _soundTray.visible = false; }; }; }; FlxG.updateInput(); if (_cursor != null){ _cursor.x = (FlxG.mouse.x + FlxG.scroll.x); _cursor.y = (FlxG.mouse.y + FlxG.scroll.y); }; FlxG.updateSounds(); if (_paused){ pause.update(); if (_flipped){ FlxG.buffer.copyPixels(_bmpFront.bitmapData, _r, new Point(0, 0)); } else { FlxG.buffer.copyPixels(_bmpBack.bitmapData, _r, new Point(0, 0)); }; pause.render(); } else { if (_flipped){ FlxG.buffer = _bmpFront.bitmapData; } else { FlxG.buffer = _bmpBack.bitmapData; }; FlxState.screen.unsafeBind(FlxG.buffer); _curState.preProcess(); FlxG.doFollow(); _curState.update(); _flash.update(); _fade.update(); _quake.update(); _buffer.x = _quake.x; _buffer.y = _quake.y; _curState.render(); _flash.render(); _fade.render(); _panel.render(); _curState.postProcess(); _bmpBack.visible = !((_bmpFront.visible = _flipped)); _flipped = !(_flipped); }; } else { if (_created){ if (!showLogo){ _logoComplete = true; FlxG.switchState(_iState); } else { if (_f == null){ _f = new Array(); _local5 = 1; if (FlxG.height > 200){ _local5 = 2; }; _local6 = (32 * _local5); _local7 = (((FlxG.height * _zoom) / 2) - (_local6 * 2)); _local8 = (((FlxG.width * _zoom) / 2) - _local6); _f.push((addChild(new FlxLogoPixel((_local8 + _local6), _local7, _local6, 0, _fc)) as FlxLogoPixel)); _f.push((addChild(new FlxLogoPixel(_local8, (_local7 + _local6), _local6, 1, _fc)) as FlxLogoPixel)); _f.push((addChild(new FlxLogoPixel(_local8, (_local7 + (_local6 * 2)), _local6, 2, _fc)) as FlxLogoPixel)); _f.push((addChild(new FlxLogoPixel((_local8 + _local6), (_local7 + (_local6 * 2)), _local6, 3, _fc)) as FlxLogoPixel)); _f.push((addChild(new FlxLogoPixel(_local8, (_local7 + (_local6 * 3)), _local6, 4, _fc)) as FlxLogoPixel)); _poweredBy = new ImgPoweredBy(); _poweredBy.scaleX = _local5; _poweredBy.scaleY = _local5; _poweredBy.x = (((FlxG.width * _zoom) / 2) - (_poweredBy.width / 2)); _poweredBy.y = ((_local7 + (_local6 * 4)) + 16); _local9 = new ColorTransform(); _local9.color = _fc; _poweredBy.bitmapData.colorTransform(new Rectangle(0, 0, _poweredBy.width, _poweredBy.height), _local9); addChild(_poweredBy); _logoFade = (addChild(new Bitmap(new BitmapData((FlxG.width * _zoom), (FlxG.height * _zoom), true, 4278190080))) as Bitmap); _logoFade.x = (_gameXOffset * _zoom); _logoFade.y = (_gameYOffset * _zoom); if (_fSound != null){ FlxG.play(_fSound, 0.35); }; }; _logoTimer = (_logoTimer + _elapsed); _local2 = 0; while (_local2 < _f.length) { _f[_local2].update(); _local2++; }; if (_logoFade.alpha > 0){ _logoFade.alpha = (_logoFade.alpha - (_elapsed * 0.5)); }; if (_logoTimer > 2){ removeChild(_poweredBy); _local2 = 0; while (_local2 < _f.length) { removeChild(_f[_local2]); _local2++; }; _f.length = 0; removeChild(_logoFade); FlxG.switchState(_iState); _logoComplete = true; }; }; } else { if (root != null){ stage.scaleMode = StageScaleMode.NO_SCALE; stage.align = StageAlign.TOP_LEFT; stage.frameRate = 90; _buffer = new Sprite(); _buffer.scaleX = _zoom; _buffer.scaleY = _zoom; addChild(_buffer); _bmpBack = new Bitmap(new BitmapData(FlxG.width, FlxG.height, true, FlxState.bgColor)); _bmpBack.x = _gameXOffset; _bmpBack.y = _gameYOffset; _buffer.addChild(_bmpBack); _bmpFront = new Bitmap(new BitmapData(_bmpBack.width, _bmpBack.height, true, FlxState.bgColor)); _bmpFront.x = _bmpBack.x; _bmpFront.y = _bmpBack.y; _buffer.addChild(_bmpFront); _flipped = false; _r = new Rectangle(0, 0, _bmpFront.width, _bmpFront.height); _console = new FlxConsole(_gameXOffset, _gameYOffset, _zoom); addChild(_console); _local10 = ((((FlxG.LIBRARY_NAME + " v") + FlxG.LIBRARY_MAJOR_VERSION) + ".") + FlxG.LIBRARY_MINOR_VERSION); if (FlxG.debug){ _local10 = (_local10 + " [debug]"); } else { _local10 = (_local10 + " [release]"); }; _local11 = ""; _local2 = 0; while (_local2 < (_local10.length + 32)) { _local11 = (_local11 + "-"); _local2++; }; FlxG.log(_local10); FlxG.log(_local11); stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp); stage.addEventListener(Event.DEACTIVATE, onFocusLost); stage.addEventListener(Event.ACTIVATE, onFocus); _soundTray = new Sprite(); _soundTray.visible = false; _soundTray.scaleX = 2; _soundTray.scaleY = 2; _local4 = new Bitmap(new BitmapData(80, 30, true, 2130706432)); _soundTray.x = (((_gameXOffset + (FlxG.width / 2)) * _zoom) - ((_local4.width / 2) * _soundTray.scaleX)); _soundTray.addChild(_local4); _local12 = new TextField(); _local12.width = _local4.width; _local12.height = _local4.height; _local12.multiline = true; _local12.wordWrap = true; _local12.selectable = false; _local12.embedFonts = true; _local12.antiAliasType = AntiAliasType.NORMAL; _local12.gridFitType = GridFitType.PIXEL; _local12.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF, null, null, null, null, null, "center"); _soundTray.addChild(_local12); _local12.text = "VOLUME"; _local12.y = 16; _local13 = 10; _local14 = 14; _soundTrayBars = new Array(); _local2 = 0; while (_local2 < 10) { _local4 = new Bitmap(new BitmapData(4, (_local2 + 1), false, 0xFFFFFF)); _local4.x = _local13; _local4.y = _local14; _soundTrayBars.push(_soundTray.addChild(_local4)); _local13 = (_local13 + 6); _local14--; _local2++; }; addChild(_soundTray); if (_frame != null){ _local15 = new _frame(); _local15.scaleX = _zoom; _local15.scaleY = _zoom; addChild(_local15); }; _created = true; _logoTimer = 0; }; }; }; } protected function setLogoFX(_arg1:Number, _arg2:Class=null):FlxGame{ _fc = _arg1; if (_arg2 != null){ _fSound = _arg2; }; return (this); } protected function onMouseDown(_arg1:MouseEvent):void{ FlxG.mouse.handleMouseDown(_arg1); } public function showSoundTray():void{ FlxG.play(SndBeep); _soundTrayTimer = 1; _soundTray.y = (_gameYOffset * _zoom); _soundTray.visible = true; var _local1:uint = Math.round((FlxG.volume * 10)); if (FlxG.mute){ _local1 = 0; }; var _local2:uint; while (_local2 < _soundTrayBars.length) { if (_local2 < _local1){ _soundTrayBars[_local2].alpha = 1; } else { _soundTrayBars[_local2].alpha = 0.5; }; _local2++; }; } protected function addFrame(_arg1:Class, _arg2:uint, _arg3:uint):FlxGame{ _frame = _arg1; _gameXOffset = _arg2; _gameYOffset = _arg3; return (this); } } }//package org.flixel
Section 36
//FlxGame_ImgPoweredBy (org.flixel.FlxGame_ImgPoweredBy) package org.flixel { import mx.core.*; public class FlxGame_ImgPoweredBy extends BitmapAsset { } }//package org.flixel
Section 37
//FlxGame_junk (org.flixel.FlxGame_junk) package org.flixel { import mx.core.*; public class FlxGame_junk extends FontAsset { } }//package org.flixel
Section 38
//FlxGame_SndBeep (org.flixel.FlxGame_SndBeep) package org.flixel { import mx.core.*; public class FlxGame_SndBeep extends SoundAsset { } }//package org.flixel
Section 39
//FlxLayer (org.flixel.FlxLayer) package org.flixel { public class FlxLayer extends FlxCore { protected var _children:Array; public function FlxLayer(){ _children = new Array(); } public function add(_arg1:FlxCore, _arg2:Boolean=false):FlxCore{ _children.push(_arg1); if (_arg2){ _arg1.scrollFactor = scrollFactor; }; return (_arg1); } override public function render():void{ var _local1:FlxCore; super.render(); var _local2:uint = _children.length; var _local3:uint; while (_local3 < _local2) { _local1 = _children[_local3]; if (((((!((_local1 == null))) && (_local1.exists))) && (_local1.visible))){ _local1.render(); }; _local3++; }; } override public function update():void{ var _local1:Number; var _local2:Number; var _local4:FlxCore; var _local3:Boolean; if (((!((x == last.x))) || (!((y == last.y))))){ _local3 = true; _local1 = (x - last.x); _local2 = (y - last.y); }; super.update(); var _local5:uint = _children.length; var _local6:uint; while (_local6 < _local5) { _local4 = (_children[_local6] as FlxCore); if (((!((_local4 == null))) && (_local4.exists))){ if (_local3){ _local4.x = (_local4.x + _local1); _local4.y = (_local4.y + _local2); }; if (_local4.active){ _local4.update(); }; }; _local6++; }; } override public function destroy():void{ super.destroy(); var _local1:uint = _children.length; var _local2:uint; while (_local2 < _local1) { _children[_local2].destroy(); _local2++; }; _children.length = 0; } public function children():Array{ return (_children); } } }//package org.flixel
Section 40
//FlxSound (org.flixel.FlxSound) package org.flixel { import flash.events.*; import flash.geom.*; import flash.media.*; import flash.net.*; public class FlxSound extends FlxCore { protected var _volume:Number; protected var _channel:SoundChannel; protected var _fadeInTimer:Number; protected var _position:Number; protected var _sound:Sound; protected var _fadeOutTotal:Number; protected var _fadeOutTimer:Number; protected var _fadeInTotal:Number; protected var _pauseOnFadeOut:Boolean; protected var _pan:Boolean; protected var _looped:Boolean; protected var _volumeAdjust:Number; protected var _transform:SoundTransform; protected var _init:Boolean; protected var _radius:Number; public var survive:Boolean; protected var _core:FlxCore; public function FlxSound(){ _transform = new SoundTransform(); init(); } public function fadeOut(_arg1:Number, _arg2:Boolean=false):void{ _pauseOnFadeOut = _arg2; _fadeInTimer = 0; _fadeOutTimer = _arg1; _fadeOutTotal = _fadeOutTimer; } public function stop():void{ _position = 0; if (_channel != null){ _channel.stop(); stopped(); }; } public function loadStream(_arg1:String, _arg2:Boolean=false):FlxSound{ stop(); init(); _sound = new Sound(new URLRequest(_arg1)); _looped = _arg2; updateTransform(); active = true; return (this); } public function loadEmbedded(_arg1:Class, _arg2:Boolean=false):FlxSound{ stop(); init(); _sound = new (_arg1); _looped = _arg2; updateTransform(); active = true; return (this); } protected function stopped(_arg1:Event=null):void{ if (!_looped){ _channel.removeEventListener(Event.SOUND_COMPLETE, stopped); } else { _channel.removeEventListener(Event.SOUND_COMPLETE, looped); }; _channel = null; active = false; } override public function update():void{ var _local3:Point; var _local4:Point; var _local5:Number; var _local6:Number; var _local7:Number; if (_position != 0){ return; }; super.update(); var _local1:Number = 1; var _local2:Number = 1; if (_core != null){ _local3 = new Point(); _local4 = new Point(); _core.getScreenXY(_local3); getScreenXY(_local4); _local5 = (_local3.x - _local4.x); _local6 = (_local3.y - _local4.y); _local1 = ((_radius - Math.sqrt(((_local5 * _local5) + (_local6 * _local6)))) / _radius); if (_local1 < 0){ _local1 = 0; }; if (_local1 > 1){ _local1 = 1; }; if (_pan){ _local7 = (-(_local5) / _radius); if (_local7 < -1){ _local7 = -1; } else { if (_local7 > 1){ _local7 = 1; }; }; _transform.pan = _local7; }; }; if (_fadeOutTimer > 0){ _fadeOutTimer = (_fadeOutTimer - FlxG.elapsed); if (_fadeOutTimer <= 0){ if (_pauseOnFadeOut){ pause(); } else { stop(); }; }; _local2 = (_fadeOutTimer / _fadeOutTotal); if (_local2 < 0){ _local2 = 0; }; } else { if (_fadeInTimer > 0){ _fadeInTimer = (_fadeInTimer - FlxG.elapsed); _local2 = (_fadeInTimer / _fadeOutTotal); if (_local2 < 0){ _local2 = 0; }; _local2 = (1 - _local2); }; }; _volumeAdjust = (_local1 * _local2); updateTransform(); } public function fadeIn(_arg1:Number):void{ _fadeOutTimer = 0; _fadeInTimer = _arg1; _fadeInTotal = _fadeInTimer; play(); } protected function looped(_arg1:Event=null):void{ if (_channel == null){ return; }; _channel.removeEventListener(Event.SOUND_COMPLETE, looped); _channel = null; play(); } public function get volume():Number{ return (_volume); } function updateTransform():void{ _transform.volume = (((FlxG.getMuteValue() * FlxG.volume) * _volume) * _volumeAdjust); if (_channel != null){ _channel.soundTransform = _transform; }; } override public function destroy():void{ if (active){ stop(); }; } public function play():void{ if (_position < 0){ return; }; if (_looped){ if (_position == 0){ if (_channel == null){ _channel = _sound.play(0, 9999, _transform); }; if (_channel == null){ active = false; }; } else { _channel = _sound.play(_position, 0, _transform); if (_channel == null){ active = false; } else { _channel.addEventListener(Event.SOUND_COMPLETE, looped); }; }; } else { if (_position == 0){ if (_channel == null){ _channel = _sound.play(0, 0, _transform); if (_channel == null){ active = false; } else { _channel.addEventListener(Event.SOUND_COMPLETE, stopped); }; }; } else { _channel = _sound.play(_position, 0, _transform); if (_channel == null){ active = false; }; }; }; _position = 0; } public function pause():void{ if (_channel == null){ _position = -1; return; }; _position = _channel.position; _channel.stop(); if (_looped){ while (_position >= _sound.length) { _position = (_position - _sound.length); }; }; _channel = null; } public function set volume(_arg1:Number):void{ _volume = _arg1; if (_volume < 0){ _volume = 0; } else { if (_volume > 1){ _volume = 1; }; }; updateTransform(); } protected function init():void{ _transform.pan = 0; _sound = null; _position = 0; _volume = 1; _volumeAdjust = 1; _looped = false; _core = null; _radius = 0; _pan = false; _fadeOutTimer = 0; _fadeOutTotal = 0; _pauseOnFadeOut = false; _fadeInTimer = 0; _fadeInTotal = 0; active = false; visible = false; dead = true; } public function proximity(_arg1:Number, _arg2:Number, _arg3:FlxCore, _arg4:Number, _arg5:Boolean=true):FlxSound{ x = _arg1; y = _arg2; _core = _arg3; _radius = _arg4; _pan = _arg5; return (this); } } }//package org.flixel
Section 41
//FlxSprite (org.flixel.FlxSprite) package org.flixel { import flash.display.*; import flash.geom.*; import org.flixel.data.*; public class FlxSprite extends FlxCore { protected var _facing:uint; protected var _caf:uint; public var _animations:Array; protected var _ct:ColorTransform; public var origin:Point; public var _curAnim:FlxAnim; public var angularDrag:Number; public var drag:Point; protected var _flipped:uint; public var scale:Point; public var blend:String; public var thrust:Number; public var health:Number; protected var _alpha:Number; public var maxVelocity:Point; protected var _color:uint; public var _curFrame:uint; public var finished:Boolean; protected var _frameTimer:Number; public var acceleration:Point; public var angularAcceleration:Number; public var offset:Point; protected var _r2:Rectangle; protected var _callback:Function; protected var _framePixels:BitmapData; protected var _pixels:BitmapData; public var angle:Number; public var maxThrust:Number; public var velocity:Point; public var maxAngular:Number; public var angularVelocity:Number; protected var _bh:uint; protected var _p:Point; public var antialiasing:Boolean; protected var _mtx:Matrix; protected var _r:Rectangle; protected var _bw:uint; protected static const _pZero:Point = new Point(); public static const LEFT:uint = 0; public static const DOWN:uint = 3; public static const UP:uint = 2; public static const RIGHT:uint = 1; public function FlxSprite(_arg1:int=0, _arg2:int=0, _arg3:Class=null){ last.x = (x = _arg1); last.y = (y = _arg2); _p = new Point(); _r = new Rectangle(); _r2 = new Rectangle(); origin = new Point(); if (_arg3 == null){ createGraphic(8, 8); } else { loadGraphic(_arg3); }; offset = new Point(); velocity = new Point(); acceleration = new Point(); drag = new Point(); maxVelocity = new Point(10000, 10000); angle = 0; angularVelocity = 0; angularAcceleration = 0; angularDrag = 0; maxAngular = 10000; thrust = 0; scale = new Point(1, 1); _alpha = 1; _color = 0xFFFFFF; blend = null; antialiasing = false; finished = false; _facing = RIGHT; _animations = new Array(); _flipped = 0; _curAnim = null; _curFrame = 0; _caf = 0; _frameTimer = 0; _mtx = new Matrix(); health = 1; _callback = null; } function unsafeBind(_arg1:BitmapData):void{ _pixels = (_framePixels = _arg1); } public function hurt(_arg1:Number):void{ if ((health = (health - _arg1)) <= 0){ kill(); }; } protected function calcFrame():void{ var _local1:uint = (_caf * _bw); var _local2:uint; var _local3:uint = (_flipped) ? _flipped : _pixels.width; if (_local1 >= _local3){ _local2 = (uint((_local1 / _local3)) * _bh); _local1 = (_local1 % _local3); }; if (((_flipped) && ((_facing == LEFT)))){ _local1 = (((_flipped << 1) - _local1) - _bw); }; _r.x = _local1; _r.y = _local2; _framePixels.copyPixels(_pixels, _r, _pZero); _r.x = (_r.y = 0); if (_ct != null){ _framePixels.colorTransform(_r, _ct); }; if (_callback != null){ _callback(_curAnim.name, _curFrame, _caf); }; } public function loadGraphic(_arg1:Class, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:Boolean=false):FlxSprite{ _pixels = FlxG.addBitmap(_arg1, _arg3, _arg6); if (_arg3){ _flipped = (_pixels.width >> 1); } else { _flipped = 0; }; if (_arg4 == 0){ if (_arg2){ _arg4 = _pixels.height; } else { if (_flipped > 0){ _arg4 = (_pixels.width / 2); } else { _arg4 = _pixels.width; }; }; }; width = (_bw = _arg4); if (_arg5 == 0){ if (_arg2){ _arg5 = width; } else { _arg5 = _pixels.height; }; }; height = (_bh = _arg5); resetHelpers(); return (this); } public function play(_arg1:String, _arg2:Boolean=false):void{ if (((((!(_arg2)) && (!((_curAnim == null))))) && ((_arg1 == _curAnim.name)))){ return; }; _curFrame = 0; _caf = 0; _frameTimer = 0; var _local3:uint = _animations.length; var _local4:uint; while (_local4 < _local3) { if (_animations[_local4].name == _arg1){ _curAnim = _animations[_local4]; if (_curAnim.delay <= 0){ finished = true; } else { finished = false; }; _caf = _curAnim.frames[_curFrame]; calcFrame(); return; }; _local4++; }; } override public function hitFloor(_arg1:FlxCore=null):Boolean{ velocity.y = 0; return (true); } protected function resetHelpers():void{ _r.x = 0; _r.y = 0; _r.width = _bw; _r.height = _bh; _r2.x = 0; _r2.y = 0; _r2.width = _pixels.width; _r2.height = _pixels.height; if ((((((_framePixels == null)) || (!((_framePixels.width == width))))) || (!((_framePixels.height == height))))){ _framePixels = new BitmapData(width, height); }; origin.x = (_bw / 2); origin.y = (_bh / 2); _framePixels.copyPixels(_pixels, _r, _pZero); } public function draw(_arg1:FlxSprite, _arg2:int=0, _arg3:int=0):void{ var _local4:BitmapData = _arg1._framePixels; if ((((((((_arg1.angle == 0)) && ((_arg1.scale.x == 1)))) && ((_arg1.scale.y == 1)))) && ((_arg1.blend == null)))){ _p.x = _arg2; _p.y = _arg3; _r2.width = _local4.width; _r2.height = _local4.height; _pixels.copyPixels(_local4, _r2, _p, null, null, true); _r2.width = _pixels.width; _r2.height = _pixels.height; calcFrame(); return; }; _mtx.identity(); _mtx.translate(-(_arg1.origin.x), -(_arg1.origin.y)); _mtx.scale(_arg1.scale.x, _arg1.scale.y); if (_arg1.angle != 0){ _mtx.rotate(((Math.PI * 2) * (_arg1.angle / 360))); }; _mtx.translate((_arg2 + _arg1.origin.x), (_arg3 + _arg1.origin.y)); _pixels.draw(_local4, _mtx, null, _arg1.blend, null, _arg1.antialiasing); calcFrame(); } public function createGraphic(_arg1:uint, _arg2:uint, _arg3:uint=4294967295, _arg4:Boolean=false):FlxSprite{ _pixels = FlxG.createBitmap(_arg1, _arg2, _arg3, _arg4); width = (_bw = _pixels.width); height = (_bh = _pixels.height); resetHelpers(); return (this); } public function addAnimationCallback(_arg1:Function):void{ _callback = _arg1; } public function onEmit():void{ } public function set pixels(_arg1:BitmapData):void{ _pixels = _arg1; width = (_bw = _pixels.width); height = (_bh = _pixels.height); resetHelpers(); } public function specificFrame(_arg1:uint):void{ _curAnim = null; _caf = _arg1; calcFrame(); } public function get alpha():Number{ return (_alpha); } public function get color():uint{ return (_color); } public function randomFrame():void{ _curAnim = null; _caf = int((FlxG.random() * (_pixels.width / _bw))); calcFrame(); } public function fill(_arg1:uint):void{ _pixels.fillRect(_r2, _arg1); calcFrame(); } override public function render():void{ if (!visible){ return; }; getScreenXY(_p); if ((((((((angle == 0)) && ((scale.x == 1)))) && ((scale.y == 1)))) && ((blend == null)))){ FlxG.buffer.copyPixels(_framePixels, _r, _p, null, null, true); return; }; _mtx.identity(); _mtx.translate(-(origin.x), -(origin.y)); _mtx.scale(scale.x, scale.y); if (angle != 0){ _mtx.rotate(((Math.PI * 2) * (angle / 360))); }; _mtx.translate((_p.x + origin.x), (_p.y + origin.y)); FlxG.buffer.draw(_framePixels, _mtx, null, blend, null, antialiasing); } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ velocity.y = 0; return (true); } public function get pixels():BitmapData{ return (_pixels); } public function set facing(_arg1:uint):void{ var _local2 = !((_facing == _arg1)); _facing = _arg1; if (_local2){ calcFrame(); }; } public function set alpha(_arg1:Number):void{ if (_arg1 > 1){ _arg1 = 1; }; if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 == _alpha){ return; }; _alpha = _arg1; if (((!((_alpha == 1))) || (!((_color == 0xFFFFFF))))){ _ct = new ColorTransform((Number((_color >> 16)) / 0xFF), (Number(((_color >> 8) & 0xFF)) / 0xFF), (Number((_color & 0xFF)) / 0xFF), _alpha); } else { _ct = null; }; calcFrame(); } public function set color(_arg1:uint):void{ _arg1 = (_arg1 & 0xFFFFFF); if (_color == _arg1){ return; }; _color = _arg1; if (((!((_alpha == 1))) || (!((_color == 0xFFFFFF))))){ _ct = new ColorTransform((Number((_color >> 16)) / 0xFF), (Number(((_color >> 8) & 0xFF)) / 0xFF), (Number((_color & 0xFF)) / 0xFF), _alpha); } else { _ct = null; }; calcFrame(); } override public function update():void{ var _local1:Point; var _local2:Point; var _local3:Number; super.update(); if (!active){ return; }; if (((((!((_curAnim == null))) && ((_curAnim.delay > 0)))) && (((_curAnim.looped) || (!(finished)))))){ _frameTimer = (_frameTimer + FlxG.elapsed); if (_frameTimer > _curAnim.delay){ _frameTimer = (_frameTimer - _curAnim.delay); if (_curFrame == (_curAnim.frames.length - 1)){ if (_curAnim.looped){ _curFrame = 0; }; finished = true; } else { _curFrame++; }; _caf = _curAnim.frames[_curFrame]; calcFrame(); }; }; angle = (angle + ((angularVelocity = FlxG.computeVelocity(angularVelocity, angularAcceleration, angularDrag, maxAngular)) * FlxG.elapsed)); if (thrust != 0){ _local1 = FlxG.rotatePoint(-(thrust), 0, 0, 0, angle); _local2 = FlxG.rotatePoint(-(maxThrust), 0, 0, 0, angle); _local3 = Math.abs(_local2.x); if (_local3 > Math.abs(_local2.y)){ _local2.y = _local3; } else { _local3 = Math.abs(_local2.y); }; maxVelocity.x = Math.abs(_local3); maxVelocity.y = Math.abs(_local3); } else { _local1 = _pZero; }; x = (x + ((velocity.x = FlxG.computeVelocity(velocity.x, (acceleration.x + _local1.x), drag.x, maxVelocity.x)) * FlxG.elapsed)); y = (y + ((velocity.y = FlxG.computeVelocity(velocity.y, (acceleration.y + _local1.y), drag.y, maxVelocity.y)) * FlxG.elapsed)); } public function get facing():uint{ return (_facing); } public function addAnimation(_arg1:String, _arg2:Array, _arg3:Number=0, _arg4:Boolean=true):void{ _animations.push(new FlxAnim(_arg1, _arg2, _arg3, _arg4)); } override public function getScreenXY(_arg1:Point=null):Point{ if (_arg1 == null){ _arg1 = new Point(); }; _arg1.x = (Math.floor((x - offset.x)) + Math.floor((FlxG.scroll.x * scrollFactor.x))); _arg1.y = (Math.floor((y - offset.y)) + Math.floor((FlxG.scroll.y * scrollFactor.y))); return (_arg1); } override public function overlapsPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean{ var _local4:Number = x; var _local5:Number = y; if (((!((scrollFactor.x == 1))) || (!((scrollFactor.y == 1))))){ _local4 = (_local4 - Math.floor((FlxG.scroll.x * (1 - scrollFactor.x)))); _local5 = (_local5 - Math.floor((FlxG.scroll.y * (1 - scrollFactor.y)))); }; if (_arg3){ return (_framePixels.hitTest(new Point(0, 0), 0xFF, new Point((_arg1 - _local4), (_arg2 - _local5)))); }; if ((((((((_arg1 <= _local4)) || ((_arg1 >= (_local4 + width))))) || ((_arg2 <= _local5)))) || ((_arg2 >= (_local5 + height))))){ return (false); }; return (true); } override public function hitWall(_arg1:FlxCore=null):Boolean{ velocity.x = 0; return (true); } } }//package org.flixel
Section 42
//FlxState (org.flixel.FlxState) package org.flixel { import flash.display.*; public class FlxState extends Sprite { protected var _layer:FlxLayer; public static var screen:FlxSprite; public static var bgColor:uint; public function FlxState(){ _layer = new FlxLayer(); FlxG.state = this; if (screen == null){ screen = new FlxSprite(); screen.createGraphic(FlxG.width, FlxG.height, 0, true); screen.origin.x = (screen.origin.y = 0); screen.antialiasing = true; }; } public function destroy():void{ _layer.destroy(); } public function add(_arg1:FlxCore):FlxCore{ return (_layer.add(_arg1)); } public function render():void{ _layer.render(); } public function beforePause():void{ } public function update():void{ _layer.update(); } public function afterPause():void{ } public function preProcess():void{ screen.fill(bgColor); } public function postProcess():void{ } } }//package org.flixel
Section 43
//FlxText (org.flixel.FlxText) package org.flixel { import flash.display.*; import flash.geom.*; import flash.text.*; public class FlxText extends FlxSprite { protected var _regen:Boolean; protected var _tf:TextField; public function FlxText(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:String=null){ if (_arg4 == null){ _arg4 = ""; }; _tf = new TextField(); _tf.width = _arg3; _tf.height = 1; _tf.embedFonts = true; _tf.selectable = false; _tf.sharpness = 100; _tf.defaultTextFormat = new TextFormat("system", 8, 0xFFFFFF); _tf.text = _arg4; super(_arg1, _arg2); createGraphic(_arg3, 1); _regen = true; calcFrame(); } public function get size():Number{ return ((_tf.defaultTextFormat.size as Number)); } public function get alignment():String{ return (_tf.defaultTextFormat.align); } public function set alignment(_arg1:String):void{ var _local2:TextFormat = dtfCopy(); _local2.align = _arg1; _tf.defaultTextFormat = _local2; _tf.setTextFormat(_local2); calcFrame(); } public function set size(_arg1:Number):void{ var _local2:TextFormat = dtfCopy(); _local2.size = _arg1; _tf.defaultTextFormat = _local2; _tf.setTextFormat(_local2); _regen = true; calcFrame(); } protected function dtfCopy():TextFormat{ var _local1:TextFormat = _tf.defaultTextFormat; return (new TextFormat(_local1.font, _local1.size, _local1.color, _local1.bold, _local1.italic, _local1.underline, _local1.url, _local1.target, _local1.align)); } public function get text():String{ return (_tf.text); } public function get font():String{ return (_tf.defaultTextFormat.font); } override protected function calcFrame():void{ var _local2:uint; var _local3:uint; if ((((((_tf == null)) || ((_tf.text == null)))) || ((_tf.text.length <= 0)))){ _framePixels.fillRect(_r, 0); return; }; if (_regen){ _local2 = _tf.numLines; height = 0; _local3 = 0; while (_local3 < _local2) { height = (height + _tf.getLineMetrics(_local3).height); _local3++; }; height = (height + 4); _framePixels = new BitmapData(width, height, true, 0); _bh = height; _tf.height = height; _r = new Rectangle(0, 0, width, height); _regen = false; } else { _framePixels.fillRect(_r, 0); }; var _local1:TextFormat = _tf.defaultTextFormat; _mtx.identity(); if ((((_local1.align == "center")) && ((_tf.numLines == 1)))){ _tf.setTextFormat(new TextFormat(_local1.font, _local1.size, _local1.color, null, null, null, null, null, "left")); _mtx.translate(Math.floor(((width - _tf.getLineMetrics(0).width) / 2)), 0); }; _framePixels.draw(_tf, _mtx, _ct); _tf.setTextFormat(new TextFormat(_local1.font, _local1.size, _local1.color, null, null, null, null, null, _local1.align)); } public function setFormat(_arg1:String=null, _arg2:Number=8, _arg3:uint=0xFFFFFF, _arg4:String=null):FlxText{ if (_arg1 == null){ _arg1 = ""; }; var _local5:TextFormat = dtfCopy(); _local5.font = _arg1; _local5.size = _arg2; _local5.align = _arg4; _tf.defaultTextFormat = _local5; _tf.setTextFormat(_local5); _regen = true; color = _arg3; calcFrame(); return (this); } public function set text(_arg1:String):void{ _tf.text = _arg1; _regen = true; calcFrame(); } public function set font(_arg1:String):void{ var _local2:TextFormat = dtfCopy(); _local2.font = _arg1; _tf.defaultTextFormat = _local2; _tf.setTextFormat(_local2); _regen = true; calcFrame(); } } }//package org.flixel
Section 44
//FlxTilemap (org.flixel.FlxTilemap) package org.flixel { import flash.geom.*; import flash.display.*; public class FlxTilemap extends FlxCore { protected var _tileWidth:uint; public var startingIndex:uint; protected var _screenRows:uint; protected var _data:Array; protected var _pixels:BitmapData; protected var _block:FlxCore; protected var _callbacks:Array; protected var _rects:Array; protected var _tileHeight:uint; public var parrent:PlayState; public var totalTiles:uint; protected var _screenCols:uint; public var drawIndex:uint; public var auto:uint; protected var _p:Point; public var heightInTiles:uint; public var widthInTiles:uint; public var collideIndex:uint; public static const ALT:uint = 2; public static const OFF:uint = 0; public static const AUTO:uint = 1; public static var data_smallStones:Class = FlxTilemap_data_smallStones; public static var data_liteTre:Class = FlxTilemap_data_liteTre; public static var data_houseBig:Class = FlxTilemap_data_houseBig; public static var data_cloud1:Class = FlxTilemap_data_cloud1; public static var ImgAutoAlt:Class = FlxTilemap_ImgAutoAlt; public static var data_treeStamme:Class = FlxTilemap_data_treeStamme; public static var data_fence:Class = FlxTilemap_data_fence; public static var data_flowers:Class = FlxTilemap_data_flowers; public static var data_school:Class = FlxTilemap_data_school; public static var data_church:Class = FlxTilemap_data_church; public static var data_caveBgDown:Class = FlxTilemap_data_caveBgDown; public static var ImgAuto:Class = FlxTilemap_ImgAuto; public static var data_caveBgRight:Class = FlxTilemap_data_caveBgRight; public static var data_caveBgDown2:Class = FlxTilemap_data_caveBgDown2; public static var data_caveBgDown3:Class = FlxTilemap_data_caveBgDown3; public static var data_house_wall:Class = FlxTilemap_data_house_wall; public function FlxTilemap(_arg1:PlayState){ parrent = _arg1; auto = OFF; collideIndex = 1; startingIndex = 0; drawIndex = 1; widthInTiles = 0; heightInTiles = 0; totalTiles = 0; _data = new Array(); _p = new Point(); _tileWidth = 0; _tileHeight = 0; _rects = null; _pixels = null; _block = new FlxCore(); _block.width = (_block.height = 0); _block.fixed = true; _callbacks = new Array(); } public function getTileByIndex(_arg1:uint):uint{ return (_data[_arg1]); } public function setCallback(_arg1:uint, _arg2:Function, _arg3:uint=1):void{ if (_arg3 <= 0){ return; }; var _local4:uint = _arg1; while (_local4 < (_arg1 + _arg3)) { _callbacks[_local4] = _arg2; _local4++; }; } public function setTileByIndex(_arg1:uint, _arg2:uint, _arg3:Boolean=true):void{ var _local4:uint; _data[_arg1] = _arg2; if (!_arg3){ return; }; if (auto == OFF){ updateTile(_arg1); return; }; var _local5:int = (int((_arg1 / widthInTiles)) - 1); var _local6:int = (_local5 + 3); var _local7:int = ((_arg1 % widthInTiles) - 1); var _local8:int = (_local7 + 3); while (_local5 < _local6) { _local7 = (_local8 - 3); while (_local7 < _local8) { if ((((((((_local5 >= 0)) && ((_local5 < heightInTiles)))) && ((_local7 >= 0)))) && ((_local7 < widthInTiles)))){ _local4 = ((_local5 * widthInTiles) + _local7); autoTile(_local4); updateTile(_local4); }; _local7++; }; _local5++; }; } override public function overlaps(_arg1:FlxCore):Boolean{ var _local2:uint; var _local3:uint; var _local4:uint; var _local5:uint; var _local6:Array = new Array(); var _local7:uint = Math.floor(((_arg1.x - x) / _tileWidth)); var _local8:uint = Math.floor(((_arg1.y - y) / _tileHeight)); var _local9:uint = (Math.ceil((_arg1.width / _tileWidth)) + 1); var _local10:uint = (Math.ceil((_arg1.height / _tileHeight)) + 1); var _local11:uint; while (_local11 < _local10) { if ((((_local11 < 0)) || ((_local11 >= heightInTiles)))){ break; }; _local3 = (((_local8 + _local11) * widthInTiles) + _local7); _local2 = 0; while (_local2 < _local9) { if ((((_local2 < 0)) || ((_local2 >= widthInTiles)))){ break; }; _local5 = _data[(_local3 + _local2)]; if (_local5 >= collideIndex){ _local6.push({x:(x + ((_local7 + _local2) * _tileWidth)), y:(y + ((_local8 + _local11) * _tileHeight)), data:_local5}); }; _local2++; }; _local11++; }; var _local12:uint = _local6.length; var _local13:Boolean; _local4 = 0; while (_local4 < _local12) { _block.last.x = (_block.x = _local6[_local4].x); _block.last.y = (_block.y = _local6[_local4].y); if (_block.overlaps(_arg1)){ return (true); }; _local4++; }; return (false); } public function loadMap(_arg1:String, _arg2:Class, _arg3:uint=0, _arg4:uint=0):FlxTilemap{ var _local5:uint; var _local6:Array; var _local9:uint; var _local7:Array = _arg1.split("\n"); heightInTiles = _local7.length; var _local8:uint; while (_local8 < heightInTiles) { _local6 = _local7[_local8].split(","); if (_local6.length <= 1){ heightInTiles--; } else { if (widthInTiles == 0){ widthInTiles = _local6.length; }; _local5 = 0; while (_local5 < widthInTiles) { _data.push(uint(_local6[_local5])); _local5++; }; }; _local8++; }; totalTiles = (widthInTiles * heightInTiles); if (auto > OFF){ collideIndex = (startingIndex = (drawIndex = 1)); _local9 = 0; while (_local9 < totalTiles) { autoTile(_local9); _local9++; }; }; _pixels = FlxG.addBitmap(_arg2); _tileWidth = _arg3; if (_tileWidth == 0){ _tileWidth = _pixels.height; }; _tileHeight = _arg4; if (_tileHeight == 0){ _tileHeight = _tileWidth; }; _block.width = _tileWidth; _block.height = _tileHeight; width = (widthInTiles * _tileWidth); height = (heightInTiles * _tileHeight); _rects = new Array(totalTiles); var _local10:int; var _local11 = 1; _local9 = 0; while (_local9 < totalTiles) { _local10 = (_local10 + 1); if (_local10 == widthInTiles){ _local10 = 0; _local11 = (_local11 + 1); }; if ((((((_data[_local9] >= 30)) && ((_data[_local9] <= 40)))) || ((_data[_local9] >= 45)))){ if (_data[_local9] == 29){ parrent.backgroundSprites.push(new BounceBlock(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), null, parrent)); }; if (_data[_local9] == 30){ parrent.backgroundSprites.push(new Tree((_local10 * _tileWidth), (_local11 * _tileHeight), null, parrent)); }; if (_data[_local9] == 31){ parrent.backgroundSprites.push(new StreetLight((_local10 * _tileWidth), (_local11 * _tileHeight), parrent)); }; if (_data[_local9] == 32){ parrent.backgroundSprites.push(new Bush((_local10 * _tileWidth), (_local11 * _tileHeight), null, parrent)); }; if (_data[_local9] == 33){ parrent.backgroundSprites.push(new BlinkEyes((_local10 * _tileWidth), (_local11 * _tileHeight), null, parrent)); }; if (_data[_local9] == 34){ parrent.backgroundSprites.push(new FlxSpriteNonCollide((_local10 * _tileWidth), (_local11 * _tileHeight), data_liteTre)); }; if (_data[_local9] == 35){ parrent.backgroundSprites.push(new FlxSpriteNonCollideCenter((_local10 * _tileWidth), ((_local11 * _tileHeight) + 2), data_smallStones)); }; if (_data[_local9] == 36){ parrent.backgroundSprites.push(new FlxSpriteNonCollide(((_local10 * _tileWidth) - _tileWidth), (_local11 * _tileHeight), data_fence)); }; if (_data[_local9] == 37){ parrent.backgroundSprites.push(new FlxSpriteNonCollideCenter((_local10 * _tileWidth), ((_local11 * _tileHeight) + 2), data_flowers)); }; if (_data[_local9] == 38){ parrent.foregroundSprites.push(new Chemical((_local10 * _tileWidth), (_local11 * _tileHeight), 2, parrent.player, parrent.dialog, parrent)); }; if (_data[_local9] == 39){ parrent.foregroundSprites.push(new Chemical((_local10 * _tileWidth), (_local11 * _tileHeight), 0, parrent.player, parrent.dialog, parrent)); }; if (_data[_local9] == 40){ parrent.foregroundSprites.push(new Chemical((_local10 * _tileWidth), (_local11 * _tileHeight), 1, parrent.player, parrent.dialog, parrent)); }; if (_data[_local9] == 47){ parrent.backgroundSprites.push(new FlxSpriteNonCollide((((_local10 * _tileWidth) - (_tileWidth * 2)) - 2), ((_local11 * _tileHeight) - (_tileHeight * 3)), data_treeStamme)); }; if (_data[_local9] == 48){ parrent.backgroundSprites.push(new FlxSpriteNonCollide(((_local10 * _tileWidth) - 6), (((_local11 * _tileHeight) - (8 * 8)) - 2), data_houseBig)); parrent.foregroundSprites.push(new FlxSpriteNonCollide((_local10 * _tileWidth), (((_local11 * _tileHeight) + (8 * 30)) + 6), data_house_wall)); }; if (_data[_local9] == 49){ parrent.foregroundLayer.add(new FlxSpriteNonCollide(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), data_caveBgDown)); }; if (_data[_local9] == 50){ parrent.foregroundLayer.add(new FlxSpriteNonCollide(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), data_caveBgRight)); }; if (_data[_local9] == 51){ parrent.backgroundSprites.push(new FlxSpriteNonCollide(((_local10 * _tileWidth) + 4), ((_local11 * _tileHeight) - 2), data_school)); }; if (_data[_local9] == 52){ parrent.foregroundSprites.push(new Chemical((_local10 * _tileWidth), (_local11 * _tileHeight), 3, parrent.player, parrent.dialog, parrent)); }; if (_data[_local9] == 53){ parrent.backgroundSprites.push(new BreakBlock((_local10 * _tileWidth), (_local11 * _tileHeight), parrent)); }; if (_data[_local9] == 54){ }; if (_data[_local9] == 55){ parrent.foregroundSprites.push(new WasteDrip(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), null, parrent)); }; if (_data[_local9] == 56){ parrent.backgroundSprites.push(new FadeToDarkTrigger(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), parrent)); }; if (_data[_local9] == 57){ parrent.foregroundLayer.add(new FlxSpriteNonCollide(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), data_caveBgDown2)); }; if (_data[_local9] == 58){ parrent.foregroundLayer.add(new FlxSpriteNonCollide(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), data_caveBgDown3)); }; if (_data[_local9] == 59){ parrent.topLayer.add(new FlxSpriteNonCollide(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), data_cloud1)); }; if (_data[_local9] == 60){ parrent.foregroundLayer.add(new FlxSpriteNonCollide(((_local10 * _tileWidth) + (_tileWidth * 4)), ((_local11 * _tileHeight) + (_tileHeight * 29)), data_church)); }; if (_data[_local9] == 61){ parrent.foregroundSprites.push(new MovingBar(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), parrent)); }; if (_data[_local9] == 62){ parrent.backgroundSprites.push(new FadeToDarkTrigger2(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), parrent)); }; if (_data[_local9] == 63){ parrent.backgroundSprites.push(new FadeToDarkTrigger3(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), parrent)); }; if (_data[_local9] == 64){ parrent.backgroundSprites.push(new ReleaseFlyModeTrigger(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), parrent)); }; if (_data[_local9] == 65){ parrent.foregroundSprites.push(new MovingBar(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), parrent, true)); }; if (_data[_local9] == 66){ parrent.backgroundSprites.push(new House(((_local10 * _tileWidth) - _tileWidth), ((_local11 * _tileHeight) - _tileHeight), parrent)); }; _data[_local9] = 0; updateTile(0); } else { updateTile(_local9); }; _local9++; }; _screenRows = (Math.ceil((FlxG.height / _tileHeight)) + 1); if (_screenRows > heightInTiles){ _screenRows = heightInTiles; }; _screenCols = (Math.ceil((FlxG.width / _tileWidth)) + 1); if (_screenCols > widthInTiles){ _screenCols = widthInTiles; }; return (this); } protected function updateTile(_arg1:uint):void{ if (_data[_arg1] < drawIndex){ _rects[_arg1] = null; return; }; var _local2:uint = ((_data[_arg1] - startingIndex) * _tileWidth); var _local3:uint; if (_local2 >= _pixels.width){ _local3 = (uint((_local2 / _pixels.width)) * _tileHeight); _local2 = (_local2 % _pixels.width); }; _rects[_arg1] = new Rectangle(_local2, _local3, _tileWidth, _tileHeight); } override public function render():void{ var _local5:uint; var _local6:uint; super.render(); getScreenXY(_p); var _local1:int = Math.floor((-(_p.x) / _tileWidth)); var _local2:int = Math.floor((-(_p.y) / _tileHeight)); if (_local1 < 0){ _local1 = 0; }; if (_local1 > (widthInTiles - _screenCols)){ _local1 = (widthInTiles - _screenCols); }; if (_local2 < 0){ _local2 = 0; }; if (_local2 > (heightInTiles - _screenRows)){ _local2 = (heightInTiles - _screenRows); }; var _local3:int = ((_local2 * widthInTiles) + _local1); _p.x = (_p.x + (_local1 * _tileWidth)); _p.y = (_p.y + (_local2 * _tileHeight)); var _local4:int = _p.x; var _local7:uint; while (_local7 < _screenRows) { _local6 = _local3; _local5 = 0; while (_local5 < _screenCols) { if (_rects[_local6] != null){ FlxG.buffer.copyPixels(_pixels, _rects[_local6], _p, null, null, true); }; _local6++; _p.x = (_p.x + _tileWidth); _local5++; }; _local3 = (_local3 + widthInTiles); _p.x = _local4; _p.y = (_p.y + _tileHeight); _local7++; }; } public function ray(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Point, _arg6:Number=1):Boolean{ var _local16:uint; var _local17:uint; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; var _local23:Number; var _local7:Number = _tileWidth; if (_tileHeight < _tileWidth){ _local7 = _tileHeight; }; _local7 = (_local7 / _arg6); var _local8:Number = (_arg3 - _arg1); var _local9:Number = (_arg4 - _arg2); var _local10:Number = Math.sqrt(((_local8 * _local8) + (_local9 * _local9))); var _local11:uint = Math.ceil((_local10 / _local7)); var _local12:Number = (_local8 / _local11); var _local13:Number = (_local9 / _local11); var _local14:Number = (_arg1 - _local12); var _local15:Number = (_arg2 - _local13); var _local18:uint; while (_local18 < _local11) { _local14 = (_local14 + _local12); _local15 = (_local15 + _local13); if ((((((((_local14 < 0)) || ((_local14 > width)))) || ((_local15 < 0)))) || ((_local15 > height)))){ } else { _local16 = (_local14 / _tileWidth); _local17 = (_local15 / _tileHeight); if (_data[((_local17 * widthInTiles) + _local16)] >= collideIndex){ _local16 = (_local16 * _tileWidth); _local17 = (_local17 * _tileHeight); _local19 = 0; _local20 = 0; _local22 = (_local14 - _local12); _local23 = (_local15 - _local13); _local21 = _local16; if (_local8 < 0){ _local21 = (_local21 + _tileWidth); }; _local19 = _local21; _local20 = (_local23 + (_local13 * ((_local21 - _local22) / _local12))); if ((((_local20 > _local17)) && ((_local20 < (_local17 + _tileHeight))))){ if (_arg5 == null){ _arg5 = new Point(); }; _arg5.x = _local19; _arg5.y = _local20; return (true); }; _local21 = _local17; if (_local9 < 0){ _local21 = (_local21 + _tileHeight); }; _local19 = (_local22 + (_local12 * ((_local21 - _local23) / _local13))); _local20 = _local21; if ((((_local19 > _local16)) && ((_local19 < (_local16 + _tileWidth))))){ if (_arg5 == null){ _arg5 = new Point(); }; _arg5.x = _local19; _arg5.y = _local20; return (true); }; return (false); }; }; _local18++; }; return (false); } public function getTile(_arg1:uint, _arg2:uint):uint{ return (getTileByIndex(((_arg2 * widthInTiles) + _arg1))); } public function setTile(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean=true):void{ setTileByIndex(((_arg2 * widthInTiles) + _arg1), _arg3, _arg4); } public function follow():void{ FlxG.followBounds(x, y, width, height); } protected function autoTile(_arg1:uint):void{ if (_data[_arg1] == 0){ return; }; _data[_arg1] = 0; if (((((_arg1 - widthInTiles) < 0)) || ((_data[(_arg1 - widthInTiles)] > 0)))){ _data[_arg1] = (_data[_arg1] + 1); }; if (((((_arg1 % widthInTiles) >= (widthInTiles - 1))) || ((_data[(_arg1 + 1)] > 0)))){ _data[_arg1] = (_data[_arg1] + 2); }; if (((((_arg1 + widthInTiles) >= totalTiles)) || ((_data[(_arg1 + widthInTiles)] > 0)))){ _data[_arg1] = (_data[_arg1] + 4); }; if (((((_arg1 % widthInTiles) <= 0)) || ((_data[(_arg1 - 1)] > 0)))){ _data[_arg1] = (_data[_arg1] + 8); }; if ((((auto == ALT)) && ((_data[_arg1] == 15)))){ if (((((((_arg1 % widthInTiles) > 0)) && (((_arg1 + widthInTiles) < totalTiles)))) && ((_data[((_arg1 + widthInTiles) - 1)] <= 0)))){ _data[_arg1] = 1; }; if (((((((_arg1 % widthInTiles) > 0)) && (((_arg1 - widthInTiles) >= 0)))) && ((_data[((_arg1 - widthInTiles) - 1)] <= 0)))){ _data[_arg1] = 2; }; if (((((((_arg1 % widthInTiles) < widthInTiles)) && (((_arg1 - widthInTiles) >= 0)))) && ((_data[((_arg1 - widthInTiles) + 1)] <= 0)))){ _data[_arg1] = 4; }; if (((((((_arg1 % widthInTiles) < widthInTiles)) && (((_arg1 + widthInTiles) < totalTiles)))) && ((_data[((_arg1 + widthInTiles) + 1)] <= 0)))){ _data[_arg1] = 8; }; }; _data[_arg1] = (_data[_arg1] + 1); } override public function collide(_arg1:FlxCore):Boolean{ var _local2:uint; var _local3:uint; var _local4:uint; var _local5:uint; var _local6:Array = new Array(); var _local7:uint = Math.floor(((_arg1.x - x) / _tileWidth)); var _local8:uint = Math.floor(((_arg1.y - y) / _tileHeight)); var _local9:uint = (Math.ceil((_arg1.width / _tileWidth)) + 1); var _local10:uint = (Math.ceil((_arg1.height / _tileHeight)) + 1); var _local11:uint; while (_local11 < _local10) { if ((((_local11 < 0)) || ((_local11 >= heightInTiles)))){ break; }; _local3 = (((_local8 + _local11) * widthInTiles) + _local7); _local2 = 0; while (_local2 < _local9) { if ((((_local2 < 0)) || ((_local2 >= widthInTiles)))){ break; }; _local5 = _data[(_local3 + _local2)]; if (_local5 >= collideIndex){ _local6.push({x:(x + ((_local7 + _local2) * _tileWidth)), y:(y + ((_local8 + _local11) * _tileHeight)), data:_local5}); }; _local2++; }; _local11++; }; var _local12:uint = _local6.length; var _local13:Boolean; _local4 = 0; while (_local4 < _local12) { _block.last.x = (_block.x = _local6[_local4].x); _block.last.y = (_block.y = _local6[_local4].y); if (_block.collideX(_arg1)){ _local3 = _local6[_local4].data; if (_callbacks[_local3] != null){ var _local15 = _callbacks; _local15[_local3](_arg1, (_block.x / _tileWidth), (_block.y / _tileHeight), _local3); }; _local13 = true; }; _local4++; }; var _local14:Boolean; _local4 = 0; while (_local4 < _local12) { _block.last.x = (_block.x = _local6[_local4].x); _block.last.y = (_block.y = _local6[_local4].y); if (_block.collideY(_arg1)){ _local3 = _local6[_local4].data; if (_callbacks[_local3] != null){ _local15 = _callbacks; _local15[_local3](_arg1, (_block.x / _tileWidth), (_block.y / _tileHeight), _local3); }; _local14 = true; }; _local4++; }; return (((_local13) || (_local14))); } public static function arrayToCSV(_arg1:Array, _arg2:int):String{ var _local3:uint; var _local4:uint; var _local5:String; var _local6:int = (_arg1.length / _arg2); _local3 = 0; while (_local3 < _local6) { _local4 = 0; while (_local4 < _arg2) { if (_local4 == 0){ if (_local3 == 0){ _local5 = (_local5 + _arg1[0]); } else { _local5 = (_local5 + ("\n" + _arg1[(_local3 * _arg2)])); }; } else { _local5 = (_local5 + (", " + _arg1[((_local3 * _arg2) + _local4)])); }; _local4++; }; _local3++; }; return (_local5); } public static function pngToCSV(_arg1:Class, _arg2:Boolean=false, _arg3:uint=1):String{ var _local4:Bitmap; var _local6:uint; var _local7:uint; var _local8:uint; var _local9:String; var _local12:Bitmap; var _local13:Matrix; if (_arg3 <= 1){ _local4 = new (_arg1); } else { _local12 = new (_arg1); _local4 = new Bitmap(new BitmapData((_local12.width * _arg3), (_local12.height * _arg3))); _local13 = new Matrix(); _local13.scale(_arg3, _arg3); _local4.bitmapData.draw(_local12, _local13); }; var _local5:BitmapData = _local4.bitmapData; var _local10:uint = _local4.width; var _local11:uint = _local4.height; _local6 = 0; while (_local6 < _local11) { _local7 = 0; while (_local7 < _local10) { _local8 = _local5.getPixel(_local7, _local6); if (((((_arg2) && ((_local8 > 0)))) || (((!(_arg2)) && ((_local8 == 0)))))){ _local8 = 1; } else { _local8 = 0; }; if (_local7 == 0){ if (_local6 == 0){ _local9 = (_local9 + _local8); } else { _local9 = (_local9 + ("\n" + _local8)); }; } else { _local9 = (_local9 + (", " + _local8)); }; _local7++; }; _local6++; }; return (_local9); } } }//package org.flixel
Section 45
//FlxTilemap_data_caveBgDown (org.flixel.FlxTilemap_data_caveBgDown) package org.flixel { import mx.core.*; public class FlxTilemap_data_caveBgDown extends BitmapAsset { } }//package org.flixel
Section 46
//FlxTilemap_data_caveBgDown2 (org.flixel.FlxTilemap_data_caveBgDown2) package org.flixel { import mx.core.*; public class FlxTilemap_data_caveBgDown2 extends BitmapAsset { } }//package org.flixel
Section 47
//FlxTilemap_data_caveBgDown3 (org.flixel.FlxTilemap_data_caveBgDown3) package org.flixel { import mx.core.*; public class FlxTilemap_data_caveBgDown3 extends BitmapAsset { } }//package org.flixel
Section 48
//FlxTilemap_data_caveBgRight (org.flixel.FlxTilemap_data_caveBgRight) package org.flixel { import mx.core.*; public class FlxTilemap_data_caveBgRight extends BitmapAsset { } }//package org.flixel
Section 49
//FlxTilemap_data_church (org.flixel.FlxTilemap_data_church) package org.flixel { import mx.core.*; public class FlxTilemap_data_church extends BitmapAsset { } }//package org.flixel
Section 50
//FlxTilemap_data_cloud1 (org.flixel.FlxTilemap_data_cloud1) package org.flixel { import mx.core.*; public class FlxTilemap_data_cloud1 extends BitmapAsset { } }//package org.flixel
Section 51
//FlxTilemap_data_fence (org.flixel.FlxTilemap_data_fence) package org.flixel { import mx.core.*; public class FlxTilemap_data_fence extends BitmapAsset { } }//package org.flixel
Section 52
//FlxTilemap_data_flowers (org.flixel.FlxTilemap_data_flowers) package org.flixel { import mx.core.*; public class FlxTilemap_data_flowers extends BitmapAsset { } }//package org.flixel
Section 53
//FlxTilemap_data_house_wall (org.flixel.FlxTilemap_data_house_wall) package org.flixel { import mx.core.*; public class FlxTilemap_data_house_wall extends BitmapAsset { } }//package org.flixel
Section 54
//FlxTilemap_data_houseBig (org.flixel.FlxTilemap_data_houseBig) package org.flixel { import mx.core.*; public class FlxTilemap_data_houseBig extends BitmapAsset { } }//package org.flixel
Section 55
//FlxTilemap_data_liteTre (org.flixel.FlxTilemap_data_liteTre) package org.flixel { import mx.core.*; public class FlxTilemap_data_liteTre extends BitmapAsset { } }//package org.flixel
Section 56
//FlxTilemap_data_school (org.flixel.FlxTilemap_data_school) package org.flixel { import mx.core.*; public class FlxTilemap_data_school extends BitmapAsset { } }//package org.flixel
Section 57
//FlxTilemap_data_smallStones (org.flixel.FlxTilemap_data_smallStones) package org.flixel { import mx.core.*; public class FlxTilemap_data_smallStones extends BitmapAsset { } }//package org.flixel
Section 58
//FlxTilemap_data_treeStamme (org.flixel.FlxTilemap_data_treeStamme) package org.flixel { import mx.core.*; public class FlxTilemap_data_treeStamme extends BitmapAsset { } }//package org.flixel
Section 59
//FlxTilemap_ImgAuto (org.flixel.FlxTilemap_ImgAuto) package org.flixel { import mx.core.*; public class FlxTilemap_ImgAuto extends BitmapAsset { } }//package org.flixel
Section 60
//FlxTilemap_ImgAutoAlt (org.flixel.FlxTilemap_ImgAutoAlt) package org.flixel { import mx.core.*; public class FlxTilemap_ImgAutoAlt extends BitmapAsset { } }//package org.flixel
Section 61
//SendToDB (org.flixel.SendToDB) package org.flixel { import flash.net.*; public class SendToDB { private var currentUrl:String; private var sendToUrl:String; public function SendToDB(){ sendToUrl = "http://jorgnsn.com/DoNotIndex/chem/sendToDB.php"; } public function completedWithoutChemicals():void{ insert("completedWithoutChemicals"); } public function loaded():void{ insert("loaded"); } public function completedOnChemicals():void{ insert("completedOnChemicals"); } private function insert(_arg1:String):void{ var _local2:URLRequest = new URLRequest(((((sendToUrl + "?action=") + _arg1) + "&fromUrl=") + currentUrl)); sendToURL(_local2); } public function setUrl(_arg1:String):void{ this.currentUrl = _arg1; } } }//package org.flixel
Section 62
//BlinkEyes (BlinkEyes) package { import org.flixel.*; public class BlinkEyes extends FlxSprite { public var parrent:PlayState; public static var data_blinkeyes:Class = BlinkEyes_data_blinkeyes; public function BlinkEyes(_arg1:int=0, _arg2:int=0, _arg3:Class=null, _arg4:PlayState=null){ super(_arg1, _arg2, null); this.addAnimation("blink", [0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], (FlxG.random() * 4)); this.loadGraphic(data_blinkeyes, true, true, 16, 8); this.parrent = _arg4; this.play("blink"); this.y = (this.y - this.height); this.x = (this.x - this.width); } } }//package
Section 63
//BlinkEyes_data_blinkeyes (BlinkEyes_data_blinkeyes) package { import mx.core.*; public class BlinkEyes_data_blinkeyes extends BitmapAsset { } }//package
Section 64
//BounceBlock (BounceBlock) package { import org.flixel.*; public class BounceBlock extends FlxBlock { private var parrent:PlayState; public static var data_1Tile:Class = BounceBlock_data_1Tile; public function BounceBlock(_arg1:int=0, _arg2:int=0, _arg3:Class=null, _arg4:PlayState=null){ parrent = _arg4; super(_arg1, _arg2, 16, 8); this.loadGraphic(data_1Tile); } override public function update():void{ super.update(); } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ return (true); } override public function hitFloor(_arg1:FlxCore=null):Boolean{ return (true); } override public function hitWall(_arg1:FlxCore=null):Boolean{ return (true); } } }//package
Section 65
//BounceBlock_data_1Tile (BounceBlock_data_1Tile) package { import mx.core.*; public class BounceBlock_data_1Tile extends BitmapAsset { } }//package
Section 66
//BreakBlock (BreakBlock) package { import flash.geom.*; import org.flixel.*; public class BreakBlock extends FlxBlock { public var originalPos:Point; public var parrent:PlayState; public function BreakBlock(_arg1:int=0, _arg2:int=0, _arg3:PlayState=null){ _arg1 = (_arg1 - 16); _arg2 = (_arg2 - 8); super(_arg1, _arg2, 16, 16); this.parrent = _arg3; this.originalPos = new Point(_arg1, _arg2); } override public function hitFloor(_arg1:FlxCore=null):Boolean{ return (true); } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ return (true); } public function remove():void{ var _local2:String; var _local3:FlxEmitter; var _local4:int; var _local1:Array = new Array(); for (_local2 in parrent.backgroundSprites) { if (parrent.backgroundSprites[_local2] == this){ } else { _local1.push(parrent.backgroundSprites[_local2]); }; }; parrent.backgroundSprites = _local1; this.loadGraphic(null); this.exists = false; _local3 = new FlxEmitter((this.x + (this.width / 2)), (this.y + (this.height / 2))); parrent.foregroundLayer.add(_local3); while (_local4 < 10) { _local3.emit(); _local4++; }; } override public function update():void{ super.update(); } override public function hitWall(_arg1:FlxCore=null):Boolean{ return (true); } } }//package
Section 67
//Bush (Bush) package { import org.flixel.*; public class Bush extends FlxSprite { public var gfx:Class; public var readyToRelease:Boolean; public var emitter:FlxEmitter; public var numOfLeaves:int; public var parrent:PlayState; public var leafArray:Array; public var counter:Number; public static var data_blad:Class = Bush_data_blad; public static var data_tree:Class = Bush_data_tree; public function Bush(_arg1:int=0, _arg2:int=0, _arg3:Class=null, _arg4:PlayState=null){ super(_arg1, _arg2); gfx = _arg3; this.loadGraphic(data_tree); this.setup(); parrent = _arg4; this.numOfLeaves = 5; } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ this.createLeafes(); return (false); } override public function hitWall(_arg1:FlxCore=null):Boolean{ this.createLeafes(); return (false); } public function createLeaf():void{ this.leafArray.push(new Leaf(((this.x + 5) + (FlxG.random() * (this.width - 5))), ((this.y + 5) + (FlxG.random() * (this.height - 5))), null, parrent)); } public function createLeafes():void{ var _local1:int; return; } override public function update():void{ var _local1:String; for (_local1 in this.leafArray) { this.leafArray[_local1].update(); if (this.leafArray[_local1].dead == true){ this.leafArray.pop(); }; }; if (this.readyToRelease == false){ counter = (counter + FlxG.elapsed); if (counter > 4){ counter = 0; this.readyToRelease = true; }; }; } override public function hitFloor(_arg1:FlxCore=null):Boolean{ this.createLeafes(); return (false); } public function setup():void{ this.x = (this.x - (this.width / 2)); this.y = (this.y - this.height); leafArray = new Array(); this.readyToRelease = true; emitter = new FlxEmitter((this.x + (this.width / 2)), (this.y + (this.height / 2)), 0.5); emitter.createSprites(data_blad); emitter.gravity = 100; emitter.drag = 10; emitter.delay = 0; counter = 0; } } }//package
Section 68
//Bush_data_blad (Bush_data_blad) package { import mx.core.*; public class Bush_data_blad extends BitmapAsset { } }//package
Section 69
//Bush_data_tree (Bush_data_tree) package { import mx.core.*; public class Bush_data_tree extends BitmapAsset { } }//package
Section 70
//Chemical (Chemical) package { import org.flixel.*; public class Chemical extends FlxSprite { public var player:Player; public var dialog:Dialog; public var parrent:PlayState; private var chemsSprite:Class; private var door:Class; public var constants:Constants; public var type:int; public function Chemical(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:Player=null, _arg5:Dialog=null, _arg6:PlayState=null){ chemsSprite = Chemical_chemsSprite; door = Chemical_door; super(_arg1, _arg2); parrent = _arg6; dialog = _arg5; player = _arg4; type = _arg3; constants = new Constants(); this.loadGraphic(chemsSprite, true, false, 16, 16); this.y = (this.y - (this.height - 2)); this.x = (this.x - this.width); if (this.type == 4){ this.width = (this.width * 4); this.height = (this.height * 4); }; var _local7:int; while (_local7 < constants.Chemicals.length) { addAnimation(constants.Chemicals[_local7], [_local7], 10); _local7++; }; if (type == 3){ this.play(constants.Chemicals[1]); } else { this.play(constants.Chemicals[type]); }; if (type == 4){ alpha = 0; }; } public function injectChemical():void{ var _local1:FlxBlock; if (this.dead == false){ parrent.sndEfx.takeChem(); parrent.changeBackgroundFilter(); if (parrent.getCompletedGameOnChemicals()){ parrent.restartWithBlink(); parrent.dialog.reset(parrent.dialog.playDontTakeThem); this.parrent.increaseNumOfTriesOffChemicals(); }; if (type == 0){ FlxG.flash(1711276287, 2); parrent.player.increaseSpeedY(); parrent.player.numberOfChemicals = (parrent.player.numberOfChemicals + 1); parrent.dialog.textAreaCenter.insertText("i feel lighter"); parrent.dialog.textAreaCenter.hangTime = 0.2; parrent.dialog.textAreaCenter.alphaFadeSpeed = 0.5; }; if (type == 1){ FlxG.flash(1713547929, 2); parrent.player.increaseSpeedX(); parrent.player.setupAnimation(); parrent.player.numberOfChemicals = (parrent.player.numberOfChemicals + 1); parrent.dialog.textAreaCenter.insertText("i feel faster"); parrent.dialog.textAreaCenter.hangTime = 0.3; parrent.dialog.textAreaCenter.alphaFadeSpeed = 0.5; }; if (type == 2){ parrent.dialog.reset(parrent.dialog.playDialogFly); parrent.player.startFlyMode(); parrent.player.numberOfChemicals = (parrent.player.numberOfChemicals + 1); parrent.sndEfx.playFlyMode(); parrent.changeBackgroundFilter(3707773474); _local1 = new FlxBlock((16 * 284), (8 * 44), 16, 70); _local1.loadGraphic(door); parrent.flightBlock.kill(); parrent.backgroundSprites.push(_local1); FlxG.flash(4294967295, 0.5); }; if (type == 3){ parrent.dialog.reset(parrent.dialog.playStronger); parrent.player.numberOfChemicals = (parrent.player.numberOfChemicals + 1); parrent.player.aggresive = true; }; if (type == 4){ parrent.player.isAtHouse = true; parrent.fadeToBlack = true; parrent.player.controllsActive = false; if (player.numberOfChemicals == 0){ parrent.dialog.reset(dialog.playHouseOffChemicals); } else { parrent.dialog.reset(dialog.playHouseOnChemicals); parrent.setCompletedGameOnChemicals(true); }; }; }; this.kill(); } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ this.injectChemical(); return (false); } override public function hitFloor(_arg1:FlxCore=null):Boolean{ this.injectChemical(); return (false); } override public function hitWall(_arg1:FlxCore=null):Boolean{ this.injectChemical(); return (false); } } }//package
Section 71
//Chemical_chemsSprite (Chemical_chemsSprite) package { import mx.core.*; public class Chemical_chemsSprite extends BitmapAsset { } }//package
Section 72
//Chemical_door (Chemical_door) package { import mx.core.*; public class Chemical_door extends BitmapAsset { } }//package
Section 73
//Chemicals (Chemicals) package { import org.flixel.*; public class Chemicals extends FlxGame { public var constants:Constants; public function Chemicals(_arg1:String=null){ constants = new Constants(); super(constants.ScreenSize.x, constants.ScreenSize.y, PlayState, 2); this.mouseEnabled = true; FlxG.sendToDB.setUrl(_arg1); FlxG.sendToDB.loaded(); showLogo = false; } public function update():void{ } } }//package
Section 74
//Constants (Constants) package { import flash.geom.*; public class Constants { public var Chemicals:Array; public var ScreenSize:Point; public function Constants(){ ScreenSize = new Point((640 / 2), (480 / 2)); Chemicals = new Array(); Chemicals[0] = "Higher"; Chemicals[1] = "Speed"; Chemicals[2] = "Fly"; Chemicals[3] = "House"; } } }//package
Section 75
//Dialog (Dialog) package { import flash.geom.*; import org.flixel.*; public class Dialog { public var textAreaCenterOver:TextArea; public var textAreaCenterUnder:TextArea; public var textAreaLeftBottom:TextArea; public var textAreaCenter:TextArea; public var textAreaRightTop:TextArea; public var readyToFire:Boolean; public var textAreaGirl:TextArea; public var textAreaBoy:TextArea; public var parrent:PlayState; public var textAreaLeftTop:TextArea; public var currentDialog:Function; private var endNum:int; public var dialogNumber:int; public var wait:Number; public var counter:Number; public function Dialog(_arg1:TextArea, _arg2:TextArea, _arg3:TextArea, _arg4:TextArea, _arg5:TextArea, _arg6:TextArea, _arg7:TextArea, _arg8:TextArea, _arg9:PlayState){ this.parrent = _arg9; textAreaLeftTop = _arg1; textAreaRightTop = _arg2; textAreaLeftBottom = _arg3; textAreaCenterOver = _arg4; textAreaCenterUnder = _arg5; textAreaCenter = _arg8; textAreaGirl = _arg6; textAreaBoy = _arg7; endNum = 0; reset(null); } public function playDontTakeThem():void{ if (readyToFire){ wait = 3; if (dialogNumber == 0){ if (parrent.getNumOfTriesOffChemicals() == 1){ textAreaBoy.insertText("She's never gone", "let me inn", "if i take these"); textAreaBoy.followPlayer = true; } else { if (parrent.getNumOfTriesOffChemicals() == 2){ textAreaBoy.insertText("There have to", "be another way", "around this"); textAreaBoy.followPlayer = true; } else { textAreaBoy.insertText("Maybe there is", "another path"); textAreaBoy.followPlayer = true; }; }; }; readyToFire = false; counter = 0; dialogNumber = (dialogNumber + 1); } else { Wait(); }; } public function clearAllDialog():void{ this.textAreaCenterOver.insertText(""); this.textAreaCenterUnder.insertText(""); this.textAreaLeftBottom.insertText(""); this.textAreaLeftTop.insertText(""); this.textAreaRightTop.insertText(""); this.textAreaBoy.insertText(""); this.textAreaGirl.insertText(""); } public function playStart():void{ if (readyToFire){ wait = 3; if (dialogNumber == 0){ wait = 2; }; if (dialogNumber == 1){ if (parrent.getCompletedGameOnChemicals()){ }; }; if (dialogNumber == 3){ parrent.volumeUI.showMuteButton(); }; readyToFire = false; counter = 0; dialogNumber = (dialogNumber + 1); } else { Wait(); }; } public function playThreeChemicalsTaken():void{ if (readyToFire){ wait = 3; if (dialogNumber == 0){ textAreaLeftTop.insertText("I feel great!"); }; readyToFire = false; counter = 0; dialogNumber = (dialogNumber + 1); } else { Wait(); }; } public function Wait():void{ counter = (counter + (1 * FlxG.elapsed)); if (counter > wait){ readyToFire = true; }; } public function playStronger():void{ if (readyToFire){ wait = 1; if (dialogNumber == 0){ textAreaLeftTop.insertText("I feel stronger"); }; if (dialogNumber == 1){ textAreaRightTop.insertText("Press Space", "to bash trough bricks"); }; readyToFire = false; counter = 0; dialogNumber = (dialogNumber + 1); } else { Wait(); }; } public function playHouseOnChemicals():void{ if (readyToFire){ wait = 3.5; this.clearAllDialog(); if (dialogNumber == 0){ this.clearAllDialog(); wait = 0; this.textAreaBoy.followPlayer = false; this.textAreaBoy.reset(); }; if (dialogNumber == 1){ textAreaBoy.insertText("*Knock* *knock*"); wait = 2; }; if (dialogNumber == 2){ textAreaBoy.insertText("*KNOCK* *KNOCK*"); }; if (dialogNumber == 3){ textAreaBoy.insertText("Come on!", "open the door"); }; if (dialogNumber == 4){ textAreaGirl.insertText("Sorry, you know", " I can't let you in", "when you're all drugged up"); }; if (dialogNumber == 5){ textAreaBoy.insertText("I feel fine", "really...", "it's not like before"); }; if (dialogNumber == 6){ textAreaGirl.insertText("but...", "you know how you", "sometimes get aggressive"); }; if (dialogNumber == 7){ textAreaBoy.insertText("I promise I'll behave", "this time.", "please dear."); wait = 2.8; }; if (dialogNumber == 8){ textAreaGirl.insertText("Sorry", "you know I can't trust you", "when you are on the chemicals"); wait = 4; textAreaGirl.hangTime = 5; }; if (dialogNumber >= 9){ textAreaLeftTop.setColor(0xFFFFFF); textAreaLeftTop.insertText("Game over", "", "If you want to win this game", "you need to get home", "without taking any chemicals", "", "Click R to retry"); parrent.topFilter.fadeInn(); }; readyToFire = false; counter = 0; dialogNumber = (dialogNumber + 1); } else { Wait(); }; } public function reset(_arg1:Function):void{ readyToFire = true; wait = 0; dialogNumber = 0; currentDialog = _arg1; } public function playHouseOffChemicals():void{ if (readyToFire){ wait = 3.5; if (dialogNumber == 0){ textAreaGirl.insertText("You made it!", "Welcome home."); this.parrent.fadeMusicChannel = true; this.parrent.musicFadeTempo = 0.26; }; if (dialogNumber == 1){ this.parrent.ending.active = true; }; if (dialogNumber == 2){ }; readyToFire = false; counter = 0; dialogNumber = (dialogNumber + 1); } else { Wait(); }; } public function update():void{ if (currentDialog != null){ currentDialog(); }; } public function playDialogFly():void{ if (readyToFire){ if ((((dialogNumber < 5)) && (!((dialogNumber == 0))))){ parrent.player.maxVelocity.x = 10; parrent.player.maxVelocity.y = 10; FlxG.flash(3435973836); parrent.sndEfx.playImpact(); }; wait = 2; if (dialogNumber == 0){ textAreaCenterOver.insertText("Jippi, I can fly!"); textAreaCenterOver.turnOnBackground(); parrent.sndEfx.playImpact(); }; if (dialogNumber == 1){ textAreaCenterUnder.insertText("No I can't"); textAreaCenterOver.insertText(""); textAreaCenterUnder.turnOnBackground(); }; if (dialogNumber == 2){ textAreaCenterOver.insertText("sure I can.", "look at me"); textAreaCenterUnder.insertText(""); textAreaCenterOver.turnOnBackground(); }; if (dialogNumber == 3){ textAreaCenterUnder.insertText("It's just the chemicals", "...", "it's always the chemicals"); textAreaCenterOver.insertText(""); textAreaCenterUnder.turnOnBackground(); }; if (dialogNumber == 4){ textAreaCenterOver.insertText("She's never gonna let me in", "Not in this state"); textAreaCenterUnder.insertText(""); textAreaCenterOver.turnOnBackground(); wait = 1; }; readyToFire = false; counter = 0; if (this.dialogNumber == 0){ }; textAreaCenterUnder.setColor(0xFF0000); textAreaLeftTop.setColor(0xFF0000); textAreaRightTop.setColor(0xFF0000); dialogNumber = (dialogNumber + 1); } else { Wait(); if (dialogNumber < 10){ parrent.player.maxVelocity.x = (parrent.player.maxVelocity.x + 4); parrent.player.maxVelocity.y = (parrent.player.maxVelocity.y + 4); if (parrent.player.maxVelocity.x > 400){ parrent.player.maxVelocity = new Point(400, 400); }; }; }; } } }//package
Section 76
//Ending (Ending) package { import flash.events.*; import org.flixel.*; import flash.display.*; import flash.text.*; public class Ending { private var started:Boolean;// = false public var active:Boolean;// = false private var flashArray:Array; private var overlay:Sprite; private var endMenuIsSetUp:Boolean; private var parrent:PlayState; private var timeArray:Array; public var data_twitter:Class; private var endMenuObjects:Array; private var quackeEndStarted:Boolean; public var data_digg:Class; public var data_stumble:Class; private var background:Sprite; private var quakeStrength:Number; public var data_facebook:Class; public function Ending(_arg1:PlayState){ data_twitter = Ending_data_twitter; data_stumble = Ending_data_stumble; data_digg = Ending_data_digg; data_facebook = Ending_data_facebook; super(); this.parrent = _arg1; this.quakeStrength = 0.02; this.quackeEndStarted = false; this.timeArray = new Array(0, 0, (100 * 2), 0); this.flashArray = new Array(8, 16, 24, 30, 32, 40, 43, 46, 48, 51, 54, 56, 59, 62, 64, 67, 70, 72, 75, 78, 80, 83, 86, 88, 91, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160); this.endMenuIsSetUp = false; } public function setupEndMenu():void{ var _local1:TextField; var _local2:TextField; if (!this.endMenuIsSetUp){ background = new Sprite(); background.x = 80; background.y = 50; background.graphics.beginFill(0, 0.7); background.graphics.drawRect(0, 0, 490, 300); background.graphics.endFill(); _local1 = new TextField(); _local1.width = 490; _local1.height = 350; _local1.y = 12; _local1.multiline = true; _local1.wordWrap = true; _local1.selectable = false; _local1.embedFonts = true; _local1.antiAliasType = AntiAliasType.NORMAL; _local1.gridFitType = GridFitType.PIXEL; _local1.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, null, null, null, null, null, "left"); _local1.text = ((((((((((((("\n" + "Thank you for playing! \n") + "Song: Weathervanes and chemicals by Team me\n") + "Game: Jorgnsn \n") + "8bit remix: Sky Barstow \n") + "\n") + "\n") + "\n") + "If you liked our little game,\n") + "Please share it with your friends. \n") + "\n") + "\n") + "\n") + "Thanks to Lasse, Zoe and freak.no for testing"); background.addChild(_local1); _local2 = new TextField(); _local2.width = 490; _local2.selectable = false; _local2.embedFonts = true; _local2.defaultTextFormat = new TextFormat("system", 24, 0xFFFFFF, null, null, null, null, null, "center"); _local2.text = "- Get home -"; background.addChild(_local2); background.addChild(new SpriteButton(0, (112 + 12), "Team me on myspace", "http://www.myspace.com/teammegjaggu", null, 236)); background.addChild(new SpriteButton((250 + 10), (112 + 12), "Buy song on iTunes", "http://itunes.apple.com/us/album/weathervanes-chemicals-single/id375802259", null, 230)); background.addChild(new SpriteButton(0, (212 + 12), "", "http://www.twitter.com/?status=check+out+the+music+video+game+from+team+me+http://goo.gl/5UDQ", data_twitter)); background.addChild(new SpriteButton((50 * 1), (212 + 12), "", "http://www.stumble.com", data_stumble)); background.addChild(new SpriteButton((50 * 2), (212 + 12), "", "http://digg.com/submit?url=http%3A//www.teammegame.com", data_digg)); background.addChild(new SpriteButton((50 * 3), (212 + 12), "", "http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.teammegame.com%2F&t=check+out+the+music+video+game+from+team+me", data_facebook)); FlxG._game.parent.addChild(background); this.endMenuIsSetUp = true; }; } public function updateBeat():void{ this.timeArray[0] = (this.timeArray[0] + (this.parrent.sndEfx.cBitHomeChannel.position - this.timeArray[1])); if (this.timeArray[0] > this.timeArray[2]){ this.timeArray[3] = (this.timeArray[3] + 1); this.timeArray[0] = (this.timeArray[0] - this.timeArray[2]); this.playFlash(); }; this.timeArray[1] = this.parrent.sndEfx.cBitHomeChannel.position; } public function playFlash():void{ var _local1:int; for each (_local1 in this.flashArray) { if (this.timeArray[3] == _local1){ this.parrent.changeBackgroundFilter(); if (_local1 == 160){ this.quackeEndStarted = true; this.quakeStrength = 0.21; FlxG.flash(4294967295, 12, null, true); this.parrent.topFilter.setMaxAlpha(1); parrent.topFilter.fadeInn(); parrent.backgroundFilter.visible = false; parrent.sndEfx.fade8BitChem(); } else { FlxG.flash(4294967295, 0.3, null, true); if (_local1 >= 40){ parrent.player.alpha = (parrent.player.alpha - 0.15); FlxG.quake(this.quakeStrength, 0.2); this.quakeStrength = (this.quakeStrength + 0.01); }; if (_local1 >= 60){ this.setupEndMenu(); }; }; }; }; } public function update():void{ if (!this.started){ this.parrent.topFilter.setMaxAlpha(0.5); this.parrent.topFilter.fadeInn(); this.started = true; this.parrent.sndEfx.play8BitChem(); FlxG.flash(4294967295, 0.5, null, true); this.parrent.foregroundLayer.add(this.parrent.backgroundFilter); }; this.updateBeat(); if (this.parrent.sndEfx.cBitHomeChannel.position > 0x7D00){ this.parrent.sndEfx.fade8BitChem(); }; if (this.quackeEndStarted){ this.quakeStrength = (this.quakeStrength - (0.022 * FlxG.elapsed)); if (this.quakeStrength < 0){ this.quakeStrength = 0; }; FlxG.quake(this.quakeStrength, 2); }; } public function traceMe(_arg1:Event):void{ trace("here"); } } }//package
Section 77
//Ending_data_digg (Ending_data_digg) package { import mx.core.*; public class Ending_data_digg extends BitmapAsset { } }//package
Section 78
//Ending_data_facebook (Ending_data_facebook) package { import mx.core.*; public class Ending_data_facebook extends BitmapAsset { } }//package
Section 79
//Ending_data_stumble (Ending_data_stumble) package { import mx.core.*; public class Ending_data_stumble extends BitmapAsset { } }//package
Section 80
//Ending_data_twitter (Ending_data_twitter) package { import mx.core.*; public class Ending_data_twitter extends BitmapAsset { } }//package
Section 81
//FadeToDarkTrigger (FadeToDarkTrigger) package { import org.flixel.*; public class FadeToDarkTrigger extends FlxSprite { private var img:Class; private var parrent:PlayState; public function FadeToDarkTrigger(_arg1:int=0, _arg2:int=0, _arg3:PlayState=null){ img = FadeToDarkTrigger_img; super(_arg1, _arg2, img); this.parrent = _arg3; this.alpha = 0; } override public function hitFloor(_arg1:FlxCore=null):Boolean{ this.preformTaks(); return (false); } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ this.preformTaks(); return (false); } override public function update():void{ super.update(); } public function preformTaks():void{ if (parrent.player.velocity.y > 0){ parrent.topFilter.fadeInn(); parrent.fadingBackground = true; parrent.fadingBackgroundFader = parrent.backgroundFadeToGrey; }; if (parrent.player.velocity.y < 0){ parrent.topFilter.fadeOut(); }; } override public function hitWall(_arg1:FlxCore=null):Boolean{ this.preformTaks(); return (false); } } }//package
Section 82
//FadeToDarkTrigger_img (FadeToDarkTrigger_img) package { import mx.core.*; public class FadeToDarkTrigger_img extends BitmapAsset { } }//package
Section 83
//FadeToDarkTrigger2 (FadeToDarkTrigger2) package { import org.flixel.*; public class FadeToDarkTrigger2 extends FlxSprite { private var img:Class; private var parrent:PlayState; public function FadeToDarkTrigger2(_arg1:int=0, _arg2:int=0, _arg3:PlayState=null){ img = FadeToDarkTrigger2_img; super(_arg1, _arg2, img); this.parrent = _arg3; this.alpha = 0; } override public function hitFloor(_arg1:FlxCore=null):Boolean{ this.preformTaks(); return (false); } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ this.preformTaks(); return (false); } override public function update():void{ super.update(); } public function preformTaks():void{ if (parrent.player.velocity.x > 0){ parrent.topFilter.fadeChurch = true; parrent.topFilter.fadeInn(); parrent.rain.visible = false; parrent.rain.stopRain(); }; if (parrent.player.velocity.x < 0){ parrent.topFilter.fadeOut(); parrent.topFilter.fadeChurch = true; }; parrent.fadingBackground = true; parrent.fadingBackgroundFader = parrent.backgroundFadeToNight; parrent.rain.visible = false; } override public function hitWall(_arg1:FlxCore=null):Boolean{ this.preformTaks(); return (false); } } }//package
Section 84
//FadeToDarkTrigger2_img (FadeToDarkTrigger2_img) package { import mx.core.*; public class FadeToDarkTrigger2_img extends BitmapAsset { } }//package
Section 85
//FadeToDarkTrigger3 (FadeToDarkTrigger3) package { import org.flixel.*; public class FadeToDarkTrigger3 extends FlxSprite { private var img:Class; private var parrent:PlayState; public function FadeToDarkTrigger3(_arg1:int=0, _arg2:int=0, _arg3:PlayState=null){ img = FadeToDarkTrigger3_img; super(_arg1, _arg2, img); this.parrent = _arg3; this.alpha = 0; } override public function hitFloor(_arg1:FlxCore=null):Boolean{ this.preformTaks(); return (false); } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ this.preformTaks(); return (false); } override public function update():void{ super.update(); } public function preformTaks():void{ if (parrent.player.velocity.x > 0){ parrent.topFilter.fadeChurch = true; parrent.topFilter.fadeInn(); }; if (parrent.player.velocity.x < 0){ parrent.topFilter.fadeOut(); parrent.topFilter.fadeChurch = true; }; } override public function hitWall(_arg1:FlxCore=null):Boolean{ this.preformTaks(); return (false); } } }//package
Section 86
//FadeToDarkTrigger3_img (FadeToDarkTrigger3_img) package { import mx.core.*; public class FadeToDarkTrigger3_img extends BitmapAsset { } }//package
Section 87
//FlxBlockInvisible (FlxBlockInvisible) package { import org.flixel.*; public class FlxBlockInvisible extends FlxBlock { public var sprite:FlxSpriteNonCollide; public function FlxBlockInvisible(_arg1:int, _arg2:int, _arg3:uint, _arg4:uint, _arg5:FlxSpriteNonCollide){ super(_arg1, _arg2, _arg3, _arg4); this.visible = false; this.loadGraphic(null); this.sprite = _arg5; } } }//package
Section 88
//FlxSpriteNonCollide (FlxSpriteNonCollide) package { import org.flixel.*; public class FlxSpriteNonCollide extends FlxSprite { public function FlxSpriteNonCollide(_arg1:int=0, _arg2:int=0, _arg3:Class=null){ super(_arg1, _arg2, _arg3); } override public function hitFloor(_arg1:FlxCore=null):Boolean{ return (false); } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ return (false); } override public function hitWall(_arg1:FlxCore=null):Boolean{ return (false); } } }//package
Section 89
//FlxSpriteNonCollideCenter (FlxSpriteNonCollideCenter) package { import org.flixel.*; public class FlxSpriteNonCollideCenter extends FlxSprite { public function FlxSpriteNonCollideCenter(_arg1:int=0, _arg2:int=0, _arg3:Class=null){ super(_arg1, _arg2, _arg3); this.y = (this.y - this.height); this.x = (this.x - (this.width / 2)); } override public function hitFloor(_arg1:FlxCore=null):Boolean{ return (false); } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ return (false); } override public function hitWall(_arg1:FlxCore=null):Boolean{ return (false); } } }//package
Section 90
//House (House) package { import org.flixel.*; public class House extends FlxSpriteNonCollide { public var parrent:PlayState; private var windowGirl:FlxSpriteNonCollide; private var door:FlxSpriteNonCollide; private var verHane:FlxSpriteNonCollide; private var girlHidden:Boolean; private var windowForeground:FlxSpriteNonCollide; private var windowBackground:FlxSpriteNonCollide; public static var data_houseWindowForeground:Class = House_data_houseWindowForeground; public static var data_houseGirl:Class = House_data_houseGirl; public static var data_houseWindowBackground:Class = House_data_houseWindowBackground; public static var data_house:Class = House_data_house; public static var data_houseDoor:Class = House_data_houseDoor; public static var data_verhane:Class = House_data_verhane; public function House(_arg1:int=0, _arg2:int=0, _arg3:PlayState=null){ _arg2 = (_arg2 - 96); _arg1 = (_arg1 - 30); super(_arg1, _arg2); parrent = _arg3; this.loadGraphic(data_house); this.door = new FlxSpriteNonCollide((this.x + 142), (this.y + 138), data_houseDoor); this.door.alpha = 0; this.windowBackground = new FlxSpriteNonCollide((this.x + 56), (this.y + 122), data_houseWindowBackground); this.windowForeground = new FlxSpriteNonCollide((this.x + 36), (this.y + 122), data_houseWindowForeground); this.windowGirl = new FlxSpriteNonCollide((this.x + 62), (this.y + 135)); this.windowGirl.loadGraphic(data_houseGirl, false, true); this.verHane = new FlxSpriteNonCollide((_arg1 + 30), _arg2); this.verHane.loadGraphic(data_verhane, true, false, (114 / 3), 36); this.verHane.addAnimation("move", [1], 1); this.verHane.play("move"); parrent.midgroundLayer.add(this.door); parrent.midgroundLayer.add(this.windowGirl); parrent.midgroundLayer.add(this.windowForeground); parrent.midgroundLayer.add(this.verHane); this.girlHidden = false; } public function girlHide():void{ if (this.girlHidden == false){ this.windowGirl.x = (this.x + 40); this.girlHidden = true; }; } override public function update():void{ if (parrent.player.x < this.windowGirl.x){ this.windowGirl.facing = LEFT; } else { this.windowGirl.facing = RIGHT; }; if (this.parrent.player.numberOfChemicals != 0){ this.girlHide(); }; if (this.windowGirl.alpha != this.parrent.player.alpha){ this.windowGirl.alpha = parrent.player.alpha; }; } public function startDialog():void{ if (parrent.player.velocity.y == 0){ if (this.door.collideY(parrent.player)){ parrent.player.x = this.door.x; parrent.player.controllsActive = false; parrent.player.facing = FlxSprite.LEFT; parrent.player.play("idle"); if (parrent.player.numberOfChemicals == 0){ if (parrent.dialog.currentDialog != parrent.dialog.playHouseOffChemicals){ parrent.dialog.reset(parrent.dialog.playHouseOffChemicals); parrent.setCompletedGameOffChemicals(true); }; } else { if (parrent.dialog.currentDialog != parrent.dialog.playHouseOnChemicals){ parrent.dialog.reset(parrent.dialog.playHouseOnChemicals); parrent.setCompletedGameOnChemicals(true); }; }; if (parrent.dialog.dialogNumber == 3){ this.girlMove(); }; }; }; } public function girlMove():void{ this.windowGirl.x = (this.windowGirl.x + (10 * FlxG.elapsed)); if (this.windowGirl.x > (this.windowBackground.x + 8)){ this.windowGirl.x = (this.windowBackground.x + 8); }; } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ this.startDialog(); return (false); } override public function render():void{ super.render(); } override public function hitFloor(_arg1:FlxCore=null):Boolean{ this.startDialog(); return (false); } override public function hitWall(_arg1:FlxCore=null):Boolean{ this.startDialog(); return (false); } } }//package
Section 91
//House_data_house (House_data_house) package { import mx.core.*; public class House_data_house extends BitmapAsset { } }//package
Section 92
//House_data_houseDoor (House_data_houseDoor) package { import mx.core.*; public class House_data_houseDoor extends BitmapAsset { } }//package
Section 93
//House_data_houseGirl (House_data_houseGirl) package { import mx.core.*; public class House_data_houseGirl extends BitmapAsset { } }//package
Section 94
//House_data_houseWindowBackground (House_data_houseWindowBackground) package { import mx.core.*; public class House_data_houseWindowBackground extends BitmapAsset { } }//package
Section 95
//House_data_houseWindowForeground (House_data_houseWindowForeground) package { import mx.core.*; public class House_data_houseWindowForeground extends BitmapAsset { } }//package
Section 96
//House_data_verhane (House_data_verhane) package { import mx.core.*; public class House_data_verhane extends BitmapAsset { } }//package
Section 97
//Leaf (Leaf) package { import org.flixel.*; public class Leaf extends FlxSprite { public var increaseSpeed:Number; public var originalX:Number; public var fallSpeed:Number; public var speedXLast:Number; public var speedX:Number; public var speedY:Number; public var parrent:PlayState; public var age:Number; public static var data_leaf:Class = Leaf_data_leaf; public function Leaf(_arg1:int=0, _arg2:int=0, _arg3:Class=null, _arg4:PlayState=null){ super(_arg1, _arg2, _arg3); this.originalX = _arg1; parrent = _arg4; this.loadGraphic(data_leaf); parrent.midgroundLayer.add(this); this.fallSpeed = (2 + (FlxG.random() * 2)); speedX = (20 + (FlxG.random() * 20)); if (parrent.player.facing == LEFT){ speedX = -(speedX); }; speedXLast = 0; speedY = 0; increaseSpeed = (0.3 + (Math.random() / 3)); this.originalX = (this.originalX + (parrent.wind * FlxG.elapsed)); this.age = 0; } override public function update():void{ if (this.x < this.originalX){ this.speedX = (this.speedX + increaseSpeed); }; if (this.x > this.originalX){ this.speedX = (this.speedX - increaseSpeed); }; this.x = (this.x + (this.speedX * FlxG.elapsed)); if (Math.abs(this.speedX) < Math.abs(this.speedXLast)){ this.speedY = (Math.abs(this.speedX) / 8); } else { this.speedY = (-(Math.abs(this.speedX)) / 8); }; this.y = (this.y - ((this.speedY - this.fallSpeed) * FlxG.elapsed)); this.speedXLast = this.speedX; this.age = (this.age + FlxG.elapsed); if (this.age > 70){ this.kill(); }; super.update(); } } }//package
Section 98
//Leaf_data_leaf (Leaf_data_leaf) package { import mx.core.*; public class Leaf_data_leaf extends BitmapAsset { } }//package
Section 99
//Menu (Menu) package { import org.flixel.*; public class Menu { public var active:Boolean;// = true private var parrent:PlayState; public function Menu(_arg1:PlayState){ this.parrent = _arg1; this.setupMenuText(); } public function setupMenuText():void{ var _local1:Array = new Array(); var _local2:Array = new Array(); _local1[0] = "-Get home-"; _local1[1] = ""; _local1[2] = "Music by Team Me"; _local1[3] = "Game by jorgnsn"; _local1[4] = "Use arrow keys to move and space to jump"; _local1[5] = "Press mouse button to start"; _local1[6] = ""; _local1[7] = "--------------------------------"; _local1[8] = "Get home before the song is up!"; _local1[9] = "--------------------------------"; var _local3:int; var _local4:int = (420 * 8); var _local5:int; var _local6 = 16; var _local7 = 8; var _local8:int; while (_local8 < _local1.length) { if (_local8 == 0){ _local5 = _local6; } else { _local5 = _local7; }; _local2[_local8] = new FlxText(_local3, _local4, 320, _local1[_local8]); _local4 = (_local4 + _local5); _local2[_local8].size = _local5; parrent.menuLayer.add(_local2[_local8]); _local8++; }; } public function startGame(_arg1:Boolean=true):void{ this.parrent.startGame(); this.active = false; if (_arg1){ FlxG.flash(3422552064); }; this.parrent.backgroundFilter.alpha = 0; this.parrent.backgroundCityFront.alpha = 0; } public function update():void{ if (FlxG.mouse.pressed()){ this.startGame(); }; if (((((FlxG.keys.pressed("LEFT")) || (FlxG.keys.pressed("RIGHT")))) || (FlxG.keys.pressed("SPACE")))){ this.startGame(false); }; } } }//package
Section 100
//MovingBar (MovingBar) package { import org.flixel.*; public class MovingBar extends FlxSpriteNonCollide { private var parrent:PlayState; private var data_crane1:Class; private var increaseSpeed:Number; private var originalX:Number; private var startDelay:Number; public var velocityXLast:Number; private var startDelayCounter:Number; private var data_crane:Class; private var collisionBlock:FlxBlockInvisible; private var data_chandelierBottom:Class; public function MovingBar(_arg1:int=0, _arg2:int=0, _arg3:PlayState=null, _arg4:Boolean=false):void{ data_chandelierBottom = MovingBar_data_chandelierBottom; data_crane1 = MovingBar_data_crane1; data_crane = MovingBar_data_crane; parrent = _arg3; super(_arg1, _arg2, data_chandelierBottom); this.x = (this.x - (this.width / 2)); this.collisionBlock = new FlxBlockInvisible(this.x, this.y, this.width, this.height, this); if (_arg4){ this.loadGraphic(data_crane1); this.y = (this.y - this.height); this.y = (this.y + 18); } else { this.loadGraphic(data_crane); this.y = (this.y - this.height); this.y = (this.y + 20); }; parrent.backgroundSprites.push(this.collisionBlock); this.increaseSpeed = 2.5; this.originalX = this.x; this.x = (this.x + (this.width / 2)); this.velocityXLast = 0; startDelayCounter = 0; startDelay = 0; if (_arg4){ this.x = (this.x - this.width); }; } override public function update():void{ startDelayCounter = (startDelayCounter + FlxG.elapsed); if (startDelayCounter > startDelay){ this.velocityXLast = this.velocity.x; if (this.x < this.originalX){ this.velocity.x = (this.velocity.x + increaseSpeed); }; if (this.x > this.originalX){ this.velocity.x = (this.velocity.x - increaseSpeed); }; super.update(); this.collisionBlock.x = this.x; }; } } }//package
Section 101
//MovingBar_data_chandelierBottom (MovingBar_data_chandelierBottom) package { import mx.core.*; public class MovingBar_data_chandelierBottom extends BitmapAsset { } }//package
Section 102
//MovingBar_data_crane (MovingBar_data_crane) package { import mx.core.*; public class MovingBar_data_crane extends BitmapAsset { } }//package
Section 103
//MovingBar_data_crane1 (MovingBar_data_crane1) package { import mx.core.*; public class MovingBar_data_crane1 extends BitmapAsset { } }//package
Section 104
//Player (Player) package { import flash.geom.*; import org.flixel.*; public class Player extends FlxSprite { public var numberOfChemicals:int; public var SpeedX:int; public var SpeedY:Number; private var lastVelocity:Point; public var flySpeed:Number; public var prevSpace:Boolean; public var mode:String; public var animationSpeed:int; public var TileMap:FlxTilemap; public var isAtHouse:Boolean; public var flickeringStarted:Boolean; public var controllsActive:Boolean; private var sndEfx:SndEfx; public var Jumping:Boolean; private var jumpSoundArray:Array; private var PlayerImage:Class; public var SpeedXIncrease:int; public var SpeedYIncrease:int; public var aggresive:Boolean; private var _prevFrame:int; public var onChandelier:FlxBlockInvisible; public function Player(_arg1:FlxTilemap, _arg2:SndEfx){ PlayerImage = Player_PlayerImage; this.sndEfx = _arg2; this.flickeringStarted = false; super((16 * 1), (8 * 440)); this.lastVelocity = new Point(0, 0); this.controllsActive = true; this.onChandelier = null; this.aggresive = false; this.prevSpace = false; mode = "walk"; this.jumpSoundArray = new Array(); TileMap = _arg1; loadGraphic(PlayerImage, true, true, 16, 32); SpeedX = (7130 / 51); SpeedY = 280; SpeedXIncrease = (2500 / 51); SpeedYIncrease = 50; flySpeed = 3500; acceleration.y = 800; this.numberOfChemicals = 0; Jumping = false; this.animationSpeed = 11; setupAnimation(); } public function setupFlyMode():void{ acceleration.y = 0; offset.y = 0; this.maxVelocity.x = 400; this.maxVelocity.y = 400; } public function startFlyMode():void{ this.mode = "fly"; this.setupFlyMode(); } public function setupAnimation():void{ this._animations = new Array(); addAnimation("walking", [0, 1, 2, 3, 4], this.animationSpeed); addAnimation("idle", [5], this.animationSpeed); addAnimation("jumping", [2], this.animationSpeed); addAnimation("flying", [6], this.animationSpeed); this._curAnim = null; } public function setupWalkMode():void{ acceleration.y = 800; this.maxVelocity.x = 60; this.maxVelocity.y = 1000; this.SpeedY = 0; } override public function hitFloor(_arg1:FlxCore=null):Boolean{ var _local2:FlxBlockInvisible; Jumping = false; if ((_arg1 is FlxBlockInvisible)){ _local2 = (_arg1 as FlxBlockInvisible); this.onChandelier = _local2; }; this.jumpSoundArray[1] = 1; return (super.hitFloor()); } override public function update():void{ var _local1:Number; if (this.controllsActive == true){ if (mode == "walk"){ if (((FlxG.keys.LEFT) || (FlxG.keys.A))){ facing = LEFT; velocity.x = (velocity.x - (SpeedX / 6)); if (this.velocity.x < -(this.SpeedX)){ this.velocity.x = -(this.SpeedX); }; if (this.onChandelier != null){ if (this.onChandelier.sprite.velocity.x < 0){ velocity.x = (velocity.x + this.onChandelier.sprite.velocity.x); }; }; play("walking"); } else { if (((FlxG.keys.RIGHT) || (FlxG.keys.D))){ facing = RIGHT; velocity.x = (velocity.x + (SpeedX / 6)); if (this.velocity.x > this.SpeedX){ this.velocity.x = this.SpeedX; }; if (this.onChandelier != null){ if (this.onChandelier.sprite.velocity.x > 0){ velocity.x = (velocity.x + this.onChandelier.sprite.velocity.x); }; }; play("walking"); } else { velocity.x = 0; play("idle"); if (this.onChandelier){ this.velocity.x = this.onChandelier.sprite.velocity.x; } else { this.angle = 0; }; }; }; if (((((((((FlxG.keys.UP) || (FlxG.keys.W))) || (FlxG.keys.SPACE))) && ((Jumping == false)))) && ((velocity.y == 0)))){ velocity.y = -(SpeedY); Jumping = true; this.jumpSoundArray[0] = 1; } else { this.jumpSoundArray[0] = 0; }; if (((FlxG.keys.UP) && (!((this.onChandelier == null))))){ this.velocity.y = -(SpeedY); }; if (velocity.y != 0){ if (this.last.y != this.y){ play("jumping"); if ((((this.jumpSoundArray[1] == 1)) && (((((FlxG.keys.UP) || (FlxG.keys.SPACE))) || (FlxG.keys.W))))){ this.sndEfx.playJump(); this.jumpSoundArray[1] = 0; }; }; }; }; if (mode == "fly"){ play("flying"); if (((FlxG.keys.RIGHT) || (FlxG.keys.D))){ this.angle = 90; velocity.x = (velocity.x + (flySpeed * FlxG.elapsed)); facing = RIGHT; } else { if (((FlxG.keys.LEFT) || (FlxG.keys.A))){ this.angle = 270; velocity.x = (velocity.x - (flySpeed * FlxG.elapsed)); facing = LEFT; } else { this.drag.x = 1200; }; }; if (((FlxG.keys.UP) || (FlxG.keys.W))){ this.angle = 0; velocity.y = (velocity.y - (flySpeed * FlxG.elapsed)); } else { if (((FlxG.keys.DOWN) || (FlxG.keys.S))){ this.angle = 180; velocity.y = (velocity.y + (flySpeed * FlxG.elapsed)); } else { this.drag.y = 1200; }; }; if (((((FlxG.keys.UP) || (FlxG.keys.W))) && (((FlxG.keys.RIGHT) || (FlxG.keys.D))))){ this.angle = 45; }; if (((((FlxG.keys.RIGHT) || (FlxG.keys.D))) && (((FlxG.keys.DOWN) || (FlxG.keys.S))))){ this.angle = (90 + 45); }; if (((((FlxG.keys.LEFT) || (FlxG.keys.A))) && (((FlxG.keys.DOWN) || (FlxG.keys.S))))){ this.angle = (180 + 45); }; if (((((FlxG.keys.LEFT) || (FlxG.keys.A))) && (((FlxG.keys.UP) || (FlxG.keys.W))))){ this.angle = (270 + 45); }; }; } else { this.play("idle"); }; if (this.x < 8){ if (this.facing == LEFT){ this.velocity.x = 0; }; }; if (this.x > ((308 * 16) - 6)){ if (this.facing == RIGHT){ this.velocity.x = 0; }; }; if (this.y < 5){ if (FlxG.keys.UP){ this.velocity.y = 0; }; }; if ((((((this._curFrame == 1)) && (!((this._curFrame == this._prevFrame))))) && ((this.mode == "walk")))){ this.sndEfx.playWalk(); }; if ((((((this.velocity.y == 0)) && (!((this.lastVelocity.y == 0))))) && ((this.mode == "walk")))){ if (this.lastVelocity.y > 0){ _local1 = (this.lastVelocity.y / 500); if (_local1 > 1){ _local1 = 1; }; this.sndEfx.playLand(_local1); }; }; this.lastVelocity = new Point(this.velocity.x, this.velocity.y); this._prevFrame = this._curFrame; super.update(); this.onChandelier = null; } public function increaseSpeedX():void{ SpeedX = (SpeedX + this.SpeedXIncrease); this.animationSpeed = (this.animationSpeed + 2); } public function increaseSpeedY():void{ this.SpeedY = (this.SpeedY + this.SpeedYIncrease); } override public function hitWall(_arg1:FlxCore=null):Boolean{ if ((_arg1 is BreakBlock)){ if (((FlxG.keys.SPACE) && (this.aggresive))){ (_arg1 as BreakBlock).remove(); }; }; return (super.hitWall()); } } }//package
Section 105
//Player_PlayerImage (Player_PlayerImage) package { import mx.core.*; public class Player_PlayerImage extends BitmapAsset { } }//package
Section 106
//PlayState (PlayState) package { import flash.events.*; import flash.geom.*; import org.flixel.*; import flash.media.*; import flash.ui.*; public class PlayState extends FlxState { public var counter:Number; public var flightBlock:FlxSprite; private var restartCounter:Number;// = 2 public var wind:Number; public var textRightBottom:TextArea; public var myMap:FlxTilemap; public var grassAlphaDirection:String; public var textCenterUnder:TextArea; public var musicChannel:SoundChannel; public var textLeftBottom:TextArea; public var topText:TopText; public var music:FlxSound; public var musicTrack:Sound; public var house:FlxSprite; public var topFilter:TopFilter; public var fadeToBlack:Boolean; public var volumeUI:VolumeUI; public var secoundsPassed:Number; public var menuLayer:FlxLayer; public var staticBackground:FlxSprite; public var elapsedArray:Array; public var ending:Ending; public var backgroundCityBack:FlxSprite; public var backgroundSun:FlxSprite; public var backgroundFilter:FlxSprite; public var fadingBackground:Boolean;// = false public var dialog:Dialog; public var secoundCounter:Number; public var grassAlpha:Number; public var backgroundSprites:Array; public var textBoy:TextArea; public var musicFadeTempo:Number; public var menu:Menu; public var textGirl:TextArea; public var fadingBackgroundFader:Function; public var backgroundAlphaMax:Number; public var grass2Array:Array; public var backgroundNight:FlxSprite; public var foregroundSprites:Array; public var backgroundMoringSun:FlxSprite; public var rain:Rain; public var dirtyArray:Array; public var colorArray:Array; public var fadeMusicChannel:Boolean;// = false public var musicFadeVolume:Number; public var backgroundMountainDay:FlxSprite; public var backgroundLayer:FlxLayer; public var foregroundLayer:FlxLayer; public var midgroundLayer:FlxLayer; private var countToRestart:Boolean;// = false public var sndEfx:SndEfx; public var textCenterOver:TextArea; public var grass1Array:Array; public var player:Player; public var textCenter:TextArea; public var churchFront:FlxSpriteNonCollide; public var textRightTop:TextArea; public var frameRate:Number; public var backgroundCityFront:FlxSprite; public var textLeftTop:TextArea; public var topLayer:FlxLayer; public var backgroundMountainNight:FlxSprite; public static var data_morning_sun_backdrop:Class = PlayState_data_morning_sun_backdrop; public static var data_bird_anim:Class = PlayState_data_bird_anim; public static var data_gjerde:Class = PlayState_data_gjerde; public static var data_mountains_night:Class = PlayState_data_mountains_night; public static var data_building_right:Class = PlayState_data_building_right; public static var data_city_front:Class = PlayState_data_city_front; public static var data_mountains_day:Class = PlayState_data_mountains_day; public static var data_schoolExtension:Class = PlayState_data_schoolExtension; public static var data_schoolExtensionCol:Class = PlayState_data_schoolExtensionCol; public static var data_churchFront:Class = PlayState_data_churchFront; private static var numOfTriesOffChemicals:int = new int(0); public static var data_tiles:Class = PlayState_data_tiles; public static var data_skyscraper:Class = PlayState_data_skyscraper; public static var ChemMusic:Class = PlayState_ChemMusic; public static var data_cement_mixer:Class = PlayState_data_cement_mixer; public static var data_construction:Class = PlayState_data_construction; public static var data_map:Class = PlayState_data_map; public static var data_constructionBack:Class = PlayState_data_constructionBack; public static var data_building_inn:Class = PlayState_data_building_inn; public static var data_sun_backdrop:Class = PlayState_data_sun_backdrop; private static var completedGameOnChemicals:Boolean = new Boolean(false); public static var data_city_back:Class = PlayState_data_city_back; private static var completedGameOffChemicals:Boolean = new Boolean(false); public static var data_grass2:Class = PlayState_data_grass2; public static var data_temporarily_closed:Class = PlayState_data_temporarily_closed; public static var data_grass1:Class = PlayState_data_grass1; public static var data_moon_backdrop:Class = PlayState_data_moon_backdrop; public function PlayState(){ var _local13:String; var _local14:String; var _local15:String; var _local16:FlxSprite; super(); Mouse.show(); this.sndEfx = new SndEfx(this); this.elapsedArray = new Array(); this.secoundCounter = 0; this.frameRate = 0; dirtyArray = new Array(); dirtyArray[0] = 0; dirtyArray[1] = 0; dirtyArray[2] = 0; this.backgroundLayer = new FlxLayer(); this.midgroundLayer = new FlxLayer(); this.foregroundLayer = new FlxLayer(); this.topLayer = new FlxLayer(); this.menuLayer = new FlxLayer(); add(this.backgroundLayer); add(this.midgroundLayer); add(this.foregroundLayer); add(this.topLayer); add(this.menuLayer); this.fadeToBlack = false; FlxG.followBounds(0, 0, (301 * 16), (450 * 8)); this.backgroundNight = new FlxSprite(0, 0, data_moon_backdrop); this.backgroundNight.scrollFactor = new Point(0, 0); this.backgroundLayer.add(this.backgroundNight); this.backgroundMoringSun = new FlxSprite(0, 0, data_morning_sun_backdrop); this.backgroundMoringSun.scrollFactor = new Point(0, 0); this.backgroundMoringSun.alpha = 0; this.backgroundLayer.add(this.backgroundMoringSun); this.backgroundSun = new FlxSprite(0, 0, data_sun_backdrop); this.backgroundSun.scrollFactor = new Point(0, 0); this.backgroundSun.alpha = 0; this.backgroundLayer.add(this.backgroundSun); this.backgroundMountainNight = new FlxSprite(0, 0, data_mountains_night); this.backgroundMountainNight.scrollFactor = new Point(0.1, 0); this.backgroundLayer.add(this.backgroundMountainNight); this.backgroundMountainDay = new FlxSprite(0, 0, data_mountains_day); this.backgroundMountainDay.scrollFactor = new Point(0.1, 0); this.backgroundMountainDay.alpha = 0; this.backgroundLayer.add(this.backgroundMountainDay); this.backgroundCityBack = new FlxSprite(0, 340, data_city_back); this.backgroundCityBack.scrollFactor = new Point(0.14, 0.1); this.backgroundCityBack.alpha = 0; this.backgroundCityFront = new FlxSprite(0, 410, data_city_front); this.backgroundCityFront.scrollFactor = new Point(0.2, 0.12); this.backgroundCityFront.alpha = 1; this.backgroundLayer.add(this.backgroundCityBack); this.backgroundLayer.add(this.backgroundCityFront); this.backgroundFilter = new FlxSprite(0, 0); this.backgroundFilter.width = FlxG.width; this.backgroundFilter.height = FlxG.height; this.colorArray = new Array(0, 1144201864, 3707773474, 2858828834, 3707773474, 583847116, 1714644497); this.changeBackgroundFilter(); this.backgroundFilter.scrollFactor = new Point(0, 0); this.backgroundFilter.alpha = 0; this.backgroundCityFront.alpha = 0; this.backgroundLayer.add(this.backgroundFilter); this.backgroundLayer.add(new FlxSpriteNonCollide((16 * 76), (8 * 416), data_gjerde)); backgroundSprites = new Array(); foregroundSprites = new Array(); myMap = new FlxTilemap(this); var _local1:String = new data_map(); var _local2:Array = new Array(); var _local3:int; var _local4:int; var _local5:int; while (_local5 < _local1.length) { if (_local1.charAt(_local5) == " "){ _local4 = (_local5 - 1); _local2.push(_local1.slice(_local3, _local4)); _local3 = (_local5 + 1); }; _local5++; }; _local3 = 0; _local4 = 0; _local1 = ""; _local1 = _local2.toString(); _local2 = new Array(); var _local6:int; var _local7:Boolean; _local5 = 0; while (_local5 < _local1.length) { if (_local1.charAt(_local5) == "\n"){ _local6 = (_local6 + 1); if (_local6 == 19){ _local6 = 0; } else { _local4 = (_local5 - 2); _local2.push(_local1.slice(_local3, _local4)); _local3 = (_local5 + 1); }; }; _local5++; }; _local1 = _local2.toString(); myMap.loadMap(_local1, data_tiles, 16, 8); myMap.widthInTiles = 301; myMap.heightInTiles = 451; this.backgroundLayer.add(new FlxSpriteNonCollide((16 * 78), (8 * 178), data_skyscraper)); this.midgroundLayer.add(myMap); if (completedGameOnChemicals == false){ _local16 = new FlxSprite((16 * 60), (8 * 430), data_temporarily_closed); _local16.fixed = true; this.foregroundSprites.push(_local16); }; var _local8:FlxSpriteNonCollide = new FlxSpriteNonCollide(((16 * 149) + 6), ((8 * 327) - 4), data_construction); this.flightBlock = new FlxSprite((16 * 279), (8 * 28)); this.flightBlock.width = 20; this.flightBlock.height = 220; this.flightBlock.createGraphic(20, 220, 4294967295); this.flightBlock.fixed = true; this.foregroundSprites.push(this.flightBlock); this.flightBlock.alpha = 0; var _local9:FlxSprite = new FlxSprite((16 * 74), ((8 * 390) + 2), data_schoolExtensionCol); _local9.fixed = true; this.foregroundSprites.push(_local9); var _local10:FlxSprite = new FlxSprite(((16 * 75) + 4), (8 * 388)); _local10.loadGraphic(data_bird_anim, true, false, 11, 17); _local10.addAnimation("move", [0, 1], 1); _local10.play("move"); this.foregroundLayer.add(_local10); this.foregroundLayer.add(new FlxSprite((16 * 74), ((8 * 387) + 4), data_schoolExtension)); this.midgroundLayer.add(_local8); var _local11:FlxSpriteNonCollide = new FlxSpriteNonCollide((16 * (149 - 40)), (8 * 342), data_constructionBack); _local11.scrollFactor = new Point(0.8, 1); var _local12:FlxSpriteNonCollide = new FlxSpriteNonCollide((16 * (149 - 70)), (8 * 347), data_constructionBack); _local12.scrollFactor = new Point(0.6, 1); _local12.scale = new Point(0.8, 0.8); this.backgroundLayer.add(_local12); this.backgroundLayer.add(_local11); this.backgroundLayer.add(new FlxSpriteNonCollide((16 * 145), (8 * 378), data_cement_mixer)); this.grass1Array = new Array(); this.grass2Array = new Array(); this.grass1Array.push(new FlxSprite(0, ((446 * 8) - 6), data_grass1)); this.grass1Array.push(new FlxSprite(this.grass1Array[0].width, ((446 * 8) - 6), data_grass1)); this.grass2Array.push(new FlxSprite(0, ((446 * 8) - 6), data_grass2)); this.grass2Array.push(new FlxSprite(this.grass2Array[0].width, ((446 * 8) - 6), data_grass2)); for (_local13 in grass1Array) { this.backgroundLayer.add(grass1Array[_local13]); this.backgroundLayer.add(grass2Array[_local13]); this.grass2Array[_local13].alpha = 0; }; this.grassAlpha = 1; this.grassAlphaDirection = "down"; rain = new Rain(this); for (_local14 in backgroundSprites) { this.backgroundLayer.add(backgroundSprites[_local14]); }; player = new Player(myMap, sndEfx); this.foregroundLayer.add(player); player.controllsActive = false; FlxG.follow(player, 9); FlxG.followMin = new Point(0, 0); myMap.collide(player); this.churchFront = new FlxSpriteNonCollide((16 * 273), (8 * -8), data_churchFront); this.foregroundLayer.add(this.churchFront); textLeftTop = new TextArea(0, 0, this); textRightTop = new TextArea((320 - 160), 0, this, "right"); textLeftBottom = new TextArea(0, 200, this); textRightBottom = new TextArea((320 - 160), 227, this, "right"); textCenterOver = new TextArea(85, 80, this, "center"); textCenterUnder = new TextArea(85, 150, this, "center"); textCenter = new TextArea(85, 100, this, "center"); textGirl = new TextArea(95, 150, this); textBoy = new TextArea(200, 150, this); dialog = new Dialog(textLeftTop, textRightTop, textLeftBottom, textCenterOver, textCenterUnder, textGirl, textBoy, textCenter, this); this.secoundsPassed = 0; for (_local15 in foregroundSprites) { this.foregroundLayer.add(foregroundSprites[_local15]); }; _local6 = 0; wind = 0; this.topFilter = new TopFilter(this); this.volumeUI = new VolumeUI(this); this.volumeUI.setVolumFaderAtRightPos(); this.menu = new Menu(this); this.ending = new Ending(this); musicTrack = new ChemMusic(); musicChannel = new SoundChannel(); this.musicFadeVolume = 0.9; this.musicFadeTempo = 0.5; } public function restart():void{ musicChannel.stop(); FlxG.switchState(PlayState); } public function fadeMusic():void{ if (this.musicChannel.soundTransform.volume > 0){ this.musicFadeVolume = (this.musicFadeVolume - (this.musicFadeTempo * FlxG.elapsed)); this.musicChannel.soundTransform.volume; this.musicChannel.soundTransform = new SoundTransform(this.musicFadeVolume); } else { this.pauseMusic(true); this.fadeMusicChannel = false; }; } public function setCompletedGameOffChemicals(_arg1:Boolean):void{ if (completedGameOffChemicals != _arg1){ completedGameOffChemicals = _arg1; FlxG.sendToDB.completedWithoutChemicals(); }; } public function backgroundFadeToMorning():void{ this.backgroundMoringSun.alpha = (this.backgroundMoringSun.alpha + (0.1 * FlxG.elapsed)); this.backgroundMountainDay.alpha = (this.backgroundMountainDay.alpha + (0.1 * FlxG.elapsed)); this.backgroundCityBack.alpha = (this.backgroundCityBack.alpha + (0.1 * FlxG.elapsed)); this.backgroundCityFront.alpha = (this.backgroundCityFront.alpha + (0.1 * FlxG.elapsed)); this.backgroundFilter.alpha = (this.backgroundFilter.alpha - (0.07 * FlxG.elapsed)); this.backgroundMountainNight.alpha = (this.backgroundMountainNight.alpha - (0.1 * FlxG.elapsed)); this.backgroundNight.alpha = (this.backgroundNight.alpha - (0.1 * FlxG.elapsed)); if (this.backgroundMoringSun.alpha >= 1){ this.fadingBackground = false; }; } public function changeBackgroundFilter(_arg1:uint=0):void{ var _local2:uint; if (_arg1 == 0){ this.backgroundFilter.alpha = 1; _local2 = this.colorArray[this.colorArray[0]]; if (this.ending != null){ if (((this.ending.active) && ((_local2 == 583847116)))){ _local2 = 1722426060; }; }; this.backgroundFilter.createGraphic(this.backgroundFilter.width, this.backgroundFilter.height, _local2); this.colorArray[0] = (this.colorArray[0] + 1); if (this.colorArray[0] >= this.colorArray.length){ this.colorArray[0] = 1; }; } else { this.backgroundFilter.createGraphic(this.backgroundFilter.width, this.backgroundFilter.height, _arg1); }; } public function backgroundFadeToNight():void{ this.backgroundMountainDay.alpha = (this.backgroundMountainDay.alpha - (0.1 * FlxG.elapsed)); this.backgroundSun.alpha = (this.backgroundSun.alpha - (0.1 * FlxG.elapsed)); this.backgroundCityFront.alpha = (this.backgroundCityFront.alpha - (0.1 * FlxG.elapsed)); this.backgroundCityBack.alpha = (this.backgroundCityBack.alpha - (0.1 * FlxG.elapsed)); this.backgroundMountainNight.alpha = (this.backgroundMountainNight.alpha + (0.1 * FlxG.elapsed)); this.backgroundNight.alpha = (this.backgroundNight.alpha + (0.1 * FlxG.elapsed)); if (this.backgroundNight.alpha >= 1){ this.fadingBackground = false; this.rain.stopRain(); }; } public function unPauseMusic():void{ this.musicChannel = this.musicTrack.play(this.musicChannel.position, 0, this.musicChannel.soundTransform); if (this.ending.active){ this.sndEfx.play8BitChem(this.sndEfx.cBitHomeChannel.position); }; } public function backgroundFadeToGrey():void{ this.backgroundSun.alpha = (this.backgroundSun.alpha + (0.1 * FlxG.elapsed)); this.backgroundMoringSun.alpha = (this.backgroundMoringSun.alpha - (0.1 * FlxG.elapsed)); if (this.backgroundSun.alpha >= 1){ this.fadingBackground = false; this.rain.startRain(); }; } public function onMusicEnd(_arg1:Event):void{ this.restart(); } override public function afterPause():void{ this.unPauseMusic(); } public function startGame():void{ this.player.controllsActive = true; dialog.reset(dialog.playStart); var _local1:SoundTransform = new SoundTransform(); musicChannel = musicTrack.play(); musicChannel.soundTransform = new SoundTransform(0.9); musicChannel.addEventListener(Event.SOUND_COMPLETE, onMusicEnd); } public function calculateWind():void{ wind = 100; } public function increaseNumOfTriesOffChemicals():void{ numOfTriesOffChemicals = (numOfTriesOffChemicals + 1); } public function getNumOfTriesOffChemicals():int{ return (numOfTriesOffChemicals); } override public function beforePause():void{ this.pauseMusic(); } public function pauseMusic(_arg1:Boolean=false):void{ this.musicChannel.stop(); if (this.ending.active){ if (!_arg1){ this.sndEfx.cBitHomeChannel.stop(); }; }; } override public function update():void{ var _local1:String; super.update(); this.volumeUI.update(); if (FlxG.keys.R){ if (!this.ending.active){ this.restart(); }; }; if (this.menu.active){ this.menu.update(); }; if (this.ending.active){ this.ending.update(); }; myMap.collide(player); player.collideArray(foregroundSprites); player.collideArray(this.backgroundSprites); player.collideArray(rain.rainArray); myMap.collideArray(rain.rainArray); secoundsPassed = Math.round((musicChannel.position / 1000)); this.rain.update(); if (secoundsPassed > 215){ if (player.isAtHouse == false){ if (player.flickeringStarted == false){ player.flicker(4); player.flickeringStarted = true; }; if (secoundsPassed > (215 + 4)){ this.restart(); }; } else { player.endFlicker(); }; }; if (this.fadeMusicChannel){ this.fadeMusic(); }; if (this.secoundCounter != new Date().seconds){ this.secoundCounter = new Date().seconds; frameRate = this.elapsedArray.length; this.elapsedArray = new Array(); } else { this.elapsedArray.push(1); }; if (this.countToRestart){ this.restartCounter = (this.restartCounter - FlxG.elapsed); if (this.restartCounter < 0){ this.restart(); }; }; textLeftBottom.update(); textLeftTop.update(); textRightTop.update(); textCenterOver.update(); textCenterUnder.update(); textGirl.update(); textBoy.update(); textCenter.update(); dialog.update(); calculateWind(); updateBackground(); if (this.grassAlphaDirection == "down"){ this.grassAlpha = (this.grassAlpha - 0.01); if (this.grassAlpha < 0){ this.grassAlphaDirection = "up"; }; }; if (this.grassAlphaDirection == "up"){ this.grassAlpha = (this.grassAlpha + 0.01); if (this.grassAlpha > 1){ this.grassAlphaDirection = "down"; }; }; for (_local1 in this.grass1Array) { this.grass1Array[_local1].alpha = this.grassAlpha; this.grass2Array[_local1].alpha = Math.abs((this.grassAlpha - 1)); }; } public function updateBackground():void{ if (this.secoundsPassed == 21){ this.fadingBackground = true; this.fadingBackgroundFader = backgroundFadeToMorning; }; if (this.fadingBackground == true){ this.fadingBackgroundFader(); }; } public function getCompletedGameOnChemicals():Boolean{ return (completedGameOnChemicals); } public function setCompletedGameOnChemicals(_arg1:Boolean):void{ if (completedGameOnChemicals != _arg1){ completedGameOnChemicals = _arg1; FlxG.sendToDB.completedOnChemicals(); }; } public function restartWithBlink():void{ this.player.flicker(3); this.fadeMusicChannel = true; this.countToRestart = true; } } }//package
Section 107
//PlayState_ChemMusic (PlayState_ChemMusic) package { import mx.core.*; public class PlayState_ChemMusic extends SoundAsset { } }//package
Section 108
//PlayState_data_bird_anim (PlayState_data_bird_anim) package { import mx.core.*; public class PlayState_data_bird_anim extends BitmapAsset { } }//package
Section 109
//PlayState_data_building_inn (PlayState_data_building_inn) package { import mx.core.*; public class PlayState_data_building_inn extends BitmapAsset { } }//package
Section 110
//PlayState_data_building_right (PlayState_data_building_right) package { import mx.core.*; public class PlayState_data_building_right extends BitmapAsset { } }//package
Section 111
//PlayState_data_cement_mixer (PlayState_data_cement_mixer) package { import mx.core.*; public class PlayState_data_cement_mixer extends BitmapAsset { } }//package
Section 112
//PlayState_data_churchFront (PlayState_data_churchFront) package { import mx.core.*; public class PlayState_data_churchFront extends BitmapAsset { } }//package
Section 113
//PlayState_data_city_back (PlayState_data_city_back) package { import mx.core.*; public class PlayState_data_city_back extends BitmapAsset { } }//package
Section 114
//PlayState_data_city_front (PlayState_data_city_front) package { import mx.core.*; public class PlayState_data_city_front extends BitmapAsset { } }//package
Section 115
//PlayState_data_construction (PlayState_data_construction) package { import mx.core.*; public class PlayState_data_construction extends BitmapAsset { } }//package
Section 116
//PlayState_data_constructionBack (PlayState_data_constructionBack) package { import mx.core.*; public class PlayState_data_constructionBack extends BitmapAsset { } }//package
Section 117
//PlayState_data_gjerde (PlayState_data_gjerde) package { import mx.core.*; public class PlayState_data_gjerde extends BitmapAsset { } }//package
Section 118
//PlayState_data_grass1 (PlayState_data_grass1) package { import mx.core.*; public class PlayState_data_grass1 extends BitmapAsset { } }//package
Section 119
//PlayState_data_grass2 (PlayState_data_grass2) package { import mx.core.*; public class PlayState_data_grass2 extends BitmapAsset { } }//package
Section 120
//PlayState_data_map (PlayState_data_map) package { import mx.core.*; public class PlayState_data_map extends ByteArrayAsset { } }//package
Section 121
//PlayState_data_moon_backdrop (PlayState_data_moon_backdrop) package { import mx.core.*; public class PlayState_data_moon_backdrop extends BitmapAsset { } }//package
Section 122
//PlayState_data_morning_sun_backdrop (PlayState_data_morning_sun_backdrop) package { import mx.core.*; public class PlayState_data_morning_sun_backdrop extends BitmapAsset { } }//package
Section 123
//PlayState_data_mountains_day (PlayState_data_mountains_day) package { import mx.core.*; public class PlayState_data_mountains_day extends BitmapAsset { } }//package
Section 124
//PlayState_data_mountains_night (PlayState_data_mountains_night) package { import mx.core.*; public class PlayState_data_mountains_night extends BitmapAsset { } }//package
Section 125
//PlayState_data_schoolExtension (PlayState_data_schoolExtension) package { import mx.core.*; public class PlayState_data_schoolExtension extends BitmapAsset { } }//package
Section 126
//PlayState_data_schoolExtensionCol (PlayState_data_schoolExtensionCol) package { import mx.core.*; public class PlayState_data_schoolExtensionCol extends BitmapAsset { } }//package
Section 127
//PlayState_data_skyscraper (PlayState_data_skyscraper) package { import mx.core.*; public class PlayState_data_skyscraper extends BitmapAsset { } }//package
Section 128
//PlayState_data_sun_backdrop (PlayState_data_sun_backdrop) package { import mx.core.*; public class PlayState_data_sun_backdrop extends BitmapAsset { } }//package
Section 129
//PlayState_data_temporarily_closed (PlayState_data_temporarily_closed) package { import mx.core.*; public class PlayState_data_temporarily_closed extends BitmapAsset { } }//package
Section 130
//PlayState_data_tiles (PlayState_data_tiles) package { import mx.core.*; public class PlayState_data_tiles extends BitmapAsset { } }//package
Section 131
//Preloader (Preloader) package { import org.flixel.data.*; public class Preloader extends FlxFactory { public function Preloader(){ this.className = "Chemicals"; } } }//package
Section 132
//Rain (Rain) package { import org.flixel.*; public class Rain { public var parrent:PlayState; public var rainArray:Array; public var rainActive:Boolean; public var intensityMax:Number; public var visible:Boolean; public var intensity:Number; public var timePassed:Number; public function Rain(_arg1:PlayState){ rainArray = new Array(); parrent = _arg1; this.timePassed = 0; this.intensity = 0.15; this.intensityMax = 0.11; this.rainActive = false; this.visible = true; } public function stopRain():void{ this.rainActive = false; } public function update():void{ var _local1:String; if (this.rainActive){ if (this.parrent.backgroundLayer.children().length > 2400){ this.stopRain(); }; if (this.intensity > this.intensityMax){ this.intensity = (this.intensity - (0.3 * FlxG.elapsed)); } else { this.intensity = this.intensityMax; }; this.timePassed = (this.timePassed + FlxG.elapsed); if (this.timePassed > this.intensity){ this.timePassed = 0; this.makeRainDrop(); }; }; for (_local1 in rainArray) { rainArray[_local1].update(); if (rainArray[_local1].dead){ rainArray.shift(); }; }; } public function startRain():void{ this.rainActive = true; this.intensity = 1; } public function makeRainDrop():void{ var _local1:RainDrop = new RainDrop(((Math.abs(FlxG.scroll.x) + (FlxG.random() * 400)) + 20), Math.abs(FlxG.scroll.y), parrent.backgroundLayer); rainArray.push(_local1); } } }//package
Section 133
//RainDrop (RainDrop) package { import flash.geom.*; import org.flixel.*; public class RainDrop extends FlxSprite { private var rainDrop:Class; public var lifeSpan:Number; public var state:String; public var splittPartA:FlxSprite; public var splittPartB:FlxSprite; private var rainDropSplit:Class; public var layer:FlxLayer; public function RainDrop(_arg1:int=0, _arg2:int=0, _arg3:FlxLayer=null, _arg4:Class=null){ rainDrop = RainDrop_rainDrop; rainDropSplit = RainDrop_rainDropSplit; super(_arg1, _arg2, rainDrop); this.state = "whole"; this.lifeSpan = 0; this.layer = _arg3; this.layer.add(this); } override public function hitWall(_arg1:FlxCore=null):Boolean{ this.hitSomething(); return (false); } public function hitSomething():void{ this.setupSplit(); this.alpha = 0; } override public function update():void{ if (this.state == "whole"){ this.velocity.x = -65; this.velocity.y = 220; }; if (this.state == "split"){ this.splittPartA.update(); this.splittPartB.update(); this.splittPartA.alpha = (this.splittPartA.alpha - 0.04); this.splittPartB.alpha = (this.splittPartB.alpha - 0.04); }; this.lifeSpan = (this.lifeSpan + FlxG.elapsed); if (this.lifeSpan > 1.5){ this.alpha = (this.alpha - 0.02); if (this.lifeSpan > 2.5){ this.kill(); if (this.splittPartA != null){ this.splittPartA.kill(); this.splittPartB.kill(); }; }; }; super.update(); } override public function hitFloor(_arg1:FlxCore=null):Boolean{ this.hitSomething(); return (false); } public function setupSplit():void{ if (this.state != "split"){ this.state = "split"; this.splittPartA = new FlxSprite(this.x, this.y, rainDropSplit); this.splittPartB = new FlxSprite(this.x, this.y, rainDropSplit); this.layer.add(this.splittPartA); this.layer.add(this.splittPartB); this.splittPartA.acceleration = new Point(100, 100); this.splittPartB.acceleration = new Point(-100, 100); this.splittPartA.maxVelocity = new Point(30, 30); this.splittPartB.maxVelocity = new Point(30, 30); this.splittPartA.velocity.y = -100; this.splittPartB.velocity.y = -100; }; } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ this.hitSomething(); return (false); } } }//package
Section 134
//RainDrop_rainDrop (RainDrop_rainDrop) package { import mx.core.*; public class RainDrop_rainDrop extends BitmapAsset { } }//package
Section 135
//RainDrop_rainDropSplit (RainDrop_rainDropSplit) package { import mx.core.*; public class RainDrop_rainDropSplit extends BitmapAsset { } }//package
Section 136
//ReleaseFlyModeTrigger (ReleaseFlyModeTrigger) package { import org.flixel.*; public class ReleaseFlyModeTrigger extends FlxSprite { private var hit:Boolean; private var img:Class; private var parrent:PlayState; public function ReleaseFlyModeTrigger(_arg1:int=0, _arg2:int=0, _arg3:PlayState=null){ img = ReleaseFlyModeTrigger_img; super(_arg1, _arg2, img); this.parrent = _arg3; this.alpha = 0; this.hit = false; } override public function hitFloor(_arg1:FlxCore=null):Boolean{ this.preformTaks(); return (false); } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ this.preformTaks(); return (false); } override public function hitWall(_arg1:FlxCore=null):Boolean{ this.preformTaks(); return (false); } override public function update():void{ super.update(); if (this.hit){ FlxG.dilation = (FlxG.dilation + (FlxG.elapsed / 2)); if (FlxG.dilation > 1){ FlxG.dilation = 1; this.hit = false; }; }; } public function preformTaks():void{ if (this.hit == false){ parrent.fadeMusicChannel = true; parrent.player.isAtHouse = true; parrent.player.animationSpeed = 10; parrent.player.setupAnimation(); parrent.player.mode = "walk"; parrent.player.setupWalkMode(); FlxG.flash(4294967295, 2); FlxG.dilation = 0.4; parrent.dialog.currentDialog = null; this.hit = true; parrent.dialog.clearAllDialog(); FlxG.quake(0.05, 1.5); parrent.sndEfx.playExplosion(); }; } } }//package
Section 137
//ReleaseFlyModeTrigger_img (ReleaseFlyModeTrigger_img) package { import mx.core.*; public class ReleaseFlyModeTrigger_img extends BitmapAsset { } }//package
Section 138
//SndEfx (SndEfx) package { import org.flixel.*; import flash.media.*; public class SndEfx { private var impactVolume:Number; private var num:int; private var prevNum:int; public var cBitHomeChannel:SoundChannel; private var rainSound:FlxSound; private var parrent:PlayState; private var cBitHomeVolume:Number; private var fx_drips:Array; private var fx_steps:Array; private var direction:String; public static var fx_startFlyMode:Class = SndEfx_fx_startFlyMode; public static var fx_impact:Class = SndEfx_fx_impact; public static var fx_hopp:Class = SndEfx_fx_hopp; public static var fx_touchTree:Class = SndEfx_fx_touchTree; public static var fx_takeChemNoise:Class = SndEfx_fx_takeChemNoise; public static var fx_walk1:Class = SndEfx_fx_walk1; public static var fx_walk2:Class = SndEfx_fx_walk2; public static var fx_walk3:Class = SndEfx_fx_walk3; public static var fx_walk4:Class = SndEfx_fx_walk4; public static var fx_walk5:Class = SndEfx_fx_walk5; public static var fx_walk6:Class = SndEfx_fx_walk6; public static var fx_explosion:Class = SndEfx_fx_explosion; public static var fx_drip2:Class = SndEfx_fx_drip2; public static var fx_drip3:Class = SndEfx_fx_drip3; public static var cbit_home:Class = SndEfx_cbit_home; public static var fx_drip1:Class = SndEfx_fx_drip1; public static var fx_land:Class = SndEfx_fx_land; public function SndEfx(_arg1:PlayState){ this.parrent = _arg1; this.fx_steps = new Array(fx_walk1, fx_walk2, fx_walk3, fx_walk4, fx_walk5, fx_walk6); this.fx_drips = new Array(1, fx_drip1, fx_drip2, fx_drip3); this.num = 0; this.direction = "up"; this.rainSound = new FlxSound(); this.impactVolume = 1; this.cBitHomeVolume = 1; } public function playExplosion():void{ FlxG.play(fx_explosion); } private function playSound():Boolean{ if (((parrent.player.isAtHouse) || ((parrent.secoundsPassed < 5)))){ return (true); }; return (false); } public function playFlyMode():void{ FlxG.play(fx_startFlyMode); } public function playDrip(_arg1:Number=1):void{ FlxG.play(this.fx_drips[this.fx_drips[0]], _arg1); this.fx_drips[0] = (this.fx_drips[0] + 1); if (this.fx_drips[0] >= this.fx_drips.length){ this.fx_drips[0] = 1; }; } public function random(_arg1:int, _arg2:int=0):int{ return ((Math.round((FlxG.random() * _arg1)) + _arg2)); } public function playLand(_arg1:Number):void{ FlxG.play(fx_land, _arg1); } public function playJump():void{ FlxG.play(fx_hopp); FlxG.play(fx_steps[random((fx_steps.length - 1))], 0.5); } public function play8BitChem(_arg1:Number=0):void{ var _local2:Sound = new cbit_home(); cBitHomeChannel = _local2.play(_arg1); } public function startRain():void{ } public function fade8BitChem():void{ this.cBitHomeVolume = (this.cBitHomeVolume - (0.1 * FlxG.elapsed)); if (this.cBitHomeVolume < 0){ this.cBitHomeVolume = 0; }; cBitHomeChannel.soundTransform = new SoundTransform(this.cBitHomeVolume); } public function playWalk():void{ if (this.playSound()){ if (direction == "up"){ num = (num + 1); } else { num = (num - 1); }; if (num == (fx_steps.length - 1)){ direction = "down"; }; if (num == 0){ direction = "up"; }; FlxG.play(fx_steps[num]); }; } public function playImpact():void{ FlxG.play(fx_impact, this.impactVolume); this.impactVolume = (this.impactVolume - 0.2); } public function takeChem():void{ FlxG.play(fx_takeChemNoise); } public function playTouchTree():void{ FlxG.play(fx_touchTree, 0.8); } public function stopRain():void{ rainSound.fadeOut(4); } } }//package
Section 139
//SndEfx_cbit_home (SndEfx_cbit_home) package { import mx.core.*; public class SndEfx_cbit_home extends SoundAsset { } }//package
Section 140
//SndEfx_fx_drip1 (SndEfx_fx_drip1) package { import mx.core.*; public class SndEfx_fx_drip1 extends SoundAsset { } }//package
Section 141
//SndEfx_fx_drip2 (SndEfx_fx_drip2) package { import mx.core.*; public class SndEfx_fx_drip2 extends SoundAsset { } }//package
Section 142
//SndEfx_fx_drip3 (SndEfx_fx_drip3) package { import mx.core.*; public class SndEfx_fx_drip3 extends SoundAsset { } }//package
Section 143
//SndEfx_fx_explosion (SndEfx_fx_explosion) package { import mx.core.*; public class SndEfx_fx_explosion extends SoundAsset { } }//package
Section 144
//SndEfx_fx_hopp (SndEfx_fx_hopp) package { import mx.core.*; public class SndEfx_fx_hopp extends SoundAsset { } }//package
Section 145
//SndEfx_fx_impact (SndEfx_fx_impact) package { import mx.core.*; public class SndEfx_fx_impact extends SoundAsset { } }//package
Section 146
//SndEfx_fx_land (SndEfx_fx_land) package { import mx.core.*; public class SndEfx_fx_land extends SoundAsset { } }//package
Section 147
//SndEfx_fx_startFlyMode (SndEfx_fx_startFlyMode) package { import mx.core.*; public class SndEfx_fx_startFlyMode extends SoundAsset { } }//package
Section 148
//SndEfx_fx_takeChemNoise (SndEfx_fx_takeChemNoise) package { import mx.core.*; public class SndEfx_fx_takeChemNoise extends SoundAsset { } }//package
Section 149
//SndEfx_fx_touchTree (SndEfx_fx_touchTree) package { import mx.core.*; public class SndEfx_fx_touchTree extends SoundAsset { } }//package
Section 150
//SndEfx_fx_walk1 (SndEfx_fx_walk1) package { import mx.core.*; public class SndEfx_fx_walk1 extends SoundAsset { } }//package
Section 151
//SndEfx_fx_walk2 (SndEfx_fx_walk2) package { import mx.core.*; public class SndEfx_fx_walk2 extends SoundAsset { } }//package
Section 152
//SndEfx_fx_walk3 (SndEfx_fx_walk3) package { import mx.core.*; public class SndEfx_fx_walk3 extends SoundAsset { } }//package
Section 153
//SndEfx_fx_walk4 (SndEfx_fx_walk4) package { import mx.core.*; public class SndEfx_fx_walk4 extends SoundAsset { } }//package
Section 154
//SndEfx_fx_walk5 (SndEfx_fx_walk5) package { import mx.core.*; public class SndEfx_fx_walk5 extends SoundAsset { } }//package
Section 155
//SndEfx_fx_walk6 (SndEfx_fx_walk6) package { import mx.core.*; public class SndEfx_fx_walk6 extends SoundAsset { } }//package
Section 156
//SpriteButton (SpriteButton) package { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.text.*; import flash.net.*; public class SpriteButton extends Sprite { public var stateDictAlpha:Dictionary; private var url:String; public function SpriteButton(_arg1:Number, _arg2:Number, _arg3:String, _arg4:String="", _arg5:Class=null, _arg6:Number=100, _arg7:Number=40){ var _local8:Bitmap; super(); this.x = _arg1; this.y = _arg2; this.url = _arg4; this.stateDictAlpha = new Dictionary(); this.stateDictAlpha["up"] = 1; this.stateDictAlpha["over"] = 0.7; this.stateDictAlpha["down"] = 0.5; if (_arg5 == null){ this.makeGraphics(_arg3, _arg6, _arg7); } else { _local8 = new (_arg5); _local8.scaleX = 3; _local8.scaleY = 3; this.addChild(_local8); }; this.addEventListener(MouseEvent.MOUSE_OVER, OnMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, OnMouseOut); this.addEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown); this.addEventListener(MouseEvent.MOUSE_UP, OnMouseOver); this.addEventListener(MouseEvent.CLICK, GoToUrl); this.alpha = this.stateDictAlpha["up"]; } public function OnMouseDown(_arg1:Event):void{ this.alpha = this.stateDictAlpha["down"]; } public function OnMouseOut(_arg1:Event):void{ this.alpha = this.stateDictAlpha["up"]; } public function makeGraphics(_arg1:String, _arg2:Number, _arg3:Number):void{ var _local4:Number = 10; this.graphics.beginFill(0xFFFFFF); this.graphics.drawRect(0, 0, _arg2, _arg3); this.graphics.endFill(); this.graphics.beginFill(0); this.graphics.drawRect(_local4, _local4, (_arg2 - (_local4 * 2)), (_arg3 - (_local4 * 2))); this.graphics.endFill(); var _local5:TextField = new TextField(); _local5.multiline = true; _local5.wordWrap = true; _local5.selectable = false; _local5.embedFonts = true; _local5.y = ((_local4 / 2) + 3); _local5.width = _arg2; _local5.height = _arg3; _local5.defaultTextFormat = new TextFormat("system", 16, 0xFFFFFF, null, null, null, null, null, "center"); _local5.text = _arg1; this.addChild(_local5); } public function OnMouseOver(_arg1:Event):void{ this.alpha = this.stateDictAlpha["over"]; } public function GoToUrl(_arg1:Event):void{ navigateToURL(new URLRequest(this.url), "_blank"); } } }//package
Section 157
//StreetLight (StreetLight) package { import org.flixel.*; public class StreetLight extends FlxSprite { public var light:FlxSpriteNonCollide; public var parrent:PlayState; public static var data_Lightbeam:Class = StreetLight_data_Lightbeam; public static var data_Lightpole:Class = StreetLight_data_Lightpole; public function StreetLight(_arg1:int=0, _arg2:int=0, _arg3:PlayState=null){ super(_arg1, _arg2, data_Lightpole); this.y = (this.y - (this.height - 5)); this.x = (this.x - ((this.width / 2) + 5)); this.light = new FlxSpriteNonCollide(this.x, this.y, data_Lightbeam); parrent = _arg3; parrent.foregroundSprites.push(this.light); } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ return (false); } override public function hitFloor(_arg1:FlxCore=null):Boolean{ return (false); } override public function hitWall(_arg1:FlxCore=null):Boolean{ return (false); } } }//package
Section 158
//StreetLight_data_Lightbeam (StreetLight_data_Lightbeam) package { import mx.core.*; public class StreetLight_data_Lightbeam extends BitmapAsset { } }//package
Section 159
//StreetLight_data_Lightpole (StreetLight_data_Lightpole) package { import mx.core.*; public class StreetLight_data_Lightpole extends BitmapAsset { } }//package
Section 160
//TextArea (TextArea) package { import flash.geom.*; import org.flixel.*; public class TextArea { public var y:int; public var followPlayer:Boolean; public var timeSinceCreated:Number; public var align:String; public var flxTextArray:Array; public var alpha:Number; public var hangTime:Number; public var parrent:PlayState; public var textArray:Array; public var alphaFadeSpeed:Number; private var background:FlxSprite; public var visible:Boolean; public var x:int; public var lineHeight:int; public function TextArea(_arg1:int, _arg2:int, _arg3:PlayState, _arg4:String="left"){ align = _arg4; visible = false; hangTime = 3.5; this.alphaFadeSpeed = 0.25; timeSinceCreated = 0; parrent = _arg3; x = _arg1; y = _arg2; lineHeight = 10; this.followPlayer = false; textArray = new Array(); flxTextArray = new Array(); this.background = new FlxSprite(_arg1, _arg2); this.background.scrollFactor = new Point(0, 0); this.background.visible = false; parrent.topLayer.add(this.background); } public function insertText(... _args):void{ var _local2:String; var _local3:int; var _local4:int; var _local5:String; var _local6:String; alpha = 1; if (_args[0] == ""){ this.turnOffBackground(); }; textArray = new Array(); for (_local2 in _args) { textArray.push(_args[_local2]); }; _local3 = x; _local4 = y; for (_local5 in flxTextArray) { if (flxTextArray[_local5] != undefined){ flxTextArray[_local5].text = ""; }; }; for (_local6 in textArray) { if (flxTextArray[_local6] == undefined){ flxTextArray[_local6] = new FlxText(_local3, _local4, 160, textArray[_local6]); flxTextArray[_local6].alignment = align; flxTextArray[_local6].scrollFactor = new Point(0, 0); parrent.topLayer.add(flxTextArray[_local6]); flxTextArray[_local6].alpha = alpha; _local4 = (_local4 + lineHeight); if (align == "right"){ flxTextArray[_local6].alignment = "right"; }; } else { flxTextArray[_local6].text = textArray[_local6]; flxTextArray[_local6].alpha = alpha; _local4 = (_local4 + lineHeight); }; }; timeSinceCreated = 0; visible = true; } public function turnOffBackground():void{ this.background.alpha = 0; } public function update():void{ var _local1:int; var _local2:FlxText; var _local3:String; if (visible){ if (this.followPlayer){ _local1 = -25; for each (_local2 in flxTextArray) { _local2.scrollFactor = new Point(1, 1); _local2.x = (parrent.player.x + 24); _local2.y = (parrent.player.y + _local1); _local1 = (_local1 + this.lineHeight); }; }; timeSinceCreated = (timeSinceCreated + FlxG.elapsed); if (timeSinceCreated > hangTime){ for (_local3 in flxTextArray) { alpha = (alpha - (this.alphaFadeSpeed * FlxG.elapsed)); this.background.alpha = (this.background.alpha - (this.alphaFadeSpeed * FlxG.elapsed)); flxTextArray[_local3].alpha = alpha; if (alpha <= 0){ visible = false; }; }; }; }; } public function reset():void{ this.flxTextArray = new Array(); } public function turnOnBackground():void{ this.background.createGraphic(160, ((lineHeight * this.textArray.length) + 4), 1711276032); this.background.visible = true; this.background.alpha = alpha; } public function setColor(_arg1:uint):void{ var _local2:FlxText; for each (_local2 in flxTextArray) { _local2.color = _arg1; }; } } }//package
Section 161
//TimeLeftCounter (TimeLeftCounter) package { import flash.geom.*; import org.flixel.*; public class TimeLeftCounter extends FlxSpriteNonCollide { private var layer:FlxLayer; private var secoundsText:FlxText; private var minutesText:FlxText; public static var data_clock:Class = TimeLeftCounter_data_clock; public function TimeLeftCounter(_arg1:int=0, _arg2:int=0, _arg3:FlxLayer=null){ super(_arg1, _arg2, data_clock); this.layer = _arg3; var _local4:int = (_arg1 - 1); var _local5:int = (_arg2 + 1); this.minutesText = new FlxText(_local4, _local5, (this.width / 2), "01"); this.secoundsText = new FlxText((_local4 + (this.width / 2)), _local5, (this.width / 2), "22"); this.secoundsText.scrollFactor = new Point(0, 0); this.minutesText.scrollFactor = new Point(0, 0); this.minutesText.color = 4291611852; this.secoundsText.color = 4291611852; this.minutesText.alignment = "center"; this.secoundsText.alignment = "center"; this.setActive(false); } public function insertTime(_arg1:String, _arg2:String):void{ if (_arg1.length == 1){ _arg1 = ("0" + _arg1); }; if (_arg2.length == 1){ _arg2 = ("0" + _arg2); }; this.minutesText.text = _arg1; this.secoundsText.text = _arg2; } public function setActive(_arg1:Boolean):void{ this.active = _arg1; this.visible = _arg1; this.minutesText.visible = _arg1; this.secoundsText.visible = _arg1; } } }//package
Section 162
//TimeLeftCounter_data_clock (TimeLeftCounter_data_clock) package { import mx.core.*; public class TimeLeftCounter_data_clock extends BitmapAsset { } }//package
Section 163
//TopFilter (TopFilter) package { import flash.geom.*; import org.flixel.*; public class TopFilter extends FlxSpriteNonCollide { private var alphaDirection:String; public var fadeChurch:Boolean; private var alphaFadeSpeed:Number; private var alphaGoal:Number; private var maxAlpha:Number; private var parrent:PlayState; public static var data_black_square:Class = TopFilter_data_black_square; public function TopFilter(_arg1:PlayState=null){ super(0, 0, data_black_square); this.parrent = _arg1; this.visible = true; this.alpha = 0; parrent.midgroundLayer.add(this); this.scrollFactor = new Point(0, 0); this.maxAlpha = 1; this.alphaFadeSpeed = 0.8; this.alphaDirection = "nan"; this.fadeChurch = false; this.alpha = 1; this.fadeOut(); } public function fadeInn():void{ this.alphaDirection = "up"; } private function fade():void{ if (this.alphaDirection == "up"){ this.alpha = (this.alpha + (this.alphaFadeSpeed * FlxG.elapsed)); if (this.alpha >= this.maxAlpha){ this.alpha = this.maxAlpha; this.alphaDirection = "nan"; }; if (this.fadeChurch){ parrent.churchFront.alpha = Math.abs((this.alpha - 1)); }; }; if (this.alphaDirection == "down"){ this.alpha = (this.alpha - (this.alphaFadeSpeed * FlxG.elapsed)); if (this.alpha <= 0){ this.alpha = 0; this.alphaDirection = "nan"; }; if (this.fadeChurch){ parrent.churchFront.alpha = Math.abs((this.alpha - 1)); }; }; if (this.alpha == 0){ this.visible = false; this.fadeChurch = false; } else { this.visible = true; }; } override public function update():void{ if (parrent.secoundsPassed == 3){ this.fadeOut(); }; if (this.alphaDirection != "nan"){ this.fade(); }; super.update(); } public function fadeOut():void{ this.alphaDirection = "down"; } public function setMaxAlpha(_arg1:Number):void{ this.maxAlpha = _arg1; } } }//package
Section 164
//TopFilter_data_black_square (TopFilter_data_black_square) package { import mx.core.*; public class TopFilter_data_black_square extends BitmapAsset { } }//package
Section 165
//TopText (TopText) package { import flash.geom.*; import org.flixel.*; public class TopText extends FlxSpriteNonCollide { private var alphaDirection:String; private var alphaFadeSpeed:Number; private var textField:FlxText; private var alphaGoal:Number; private var parrent:PlayState; private var maxAlpha:Number; public static var data_black_square:Class = TopText_data_black_square; public function TopText(_arg1:PlayState=null){ super(0, 0, data_black_square); this.parrent = _arg1; this.visible = false; this.alpha = 0; this.scrollFactor = new Point(0, 0); this.maxAlpha = 1; this.alphaFadeSpeed = 0.8; this.alphaDirection = "nan"; this.textField = new FlxText(0, 100, 320, "Get all the chemicals \n to dance in your blood \n before the song is up"); this.textField.alignment = "right"; this.textField.scrollFactor = new Point(0, 0); parrent.topLayer.add(this.textField); } private function fade():void{ if (this.alphaDirection == "up"){ this.alpha = (this.alpha + (this.alphaFadeSpeed * FlxG.elapsed)); if (this.alpha > this.maxAlpha){ this.alpha = this.maxAlpha; this.alphaDirection = "nan"; }; }; if (this.alphaDirection == "down"){ this.alpha = (this.alpha - (this.alphaFadeSpeed * FlxG.elapsed)); if (this.alpha < 0){ this.alpha = 0; this.alphaDirection = "nan"; }; }; if (this.alpha == 0){ this.visible = false; } else { this.visible = true; }; this.textField.alpha = this.alpha; this.textField.visible = this.visible; } public function fadeInn():void{ this.alphaDirection = "up"; } override public function update():void{ if (this.alphaDirection != "nan"){ this.fade(); }; super.update(); } public function fadeOut():void{ this.alphaDirection = "down"; } } }//package
Section 166
//TopText_data_black_square (TopText_data_black_square) package { import mx.core.*; public class TopText_data_black_square extends BitmapAsset { } }//package
Section 167
//Tree (Tree) package { import org.flixel.*; public class Tree extends FlxSprite { public var gfx:Class; public var readyToRelease:Boolean; public var emitter:FlxEmitter; public var numOfLeaves:int; public var parrent:PlayState; public var leafArray:Array; public var counter:Number; public static var data_blad:Class = Tree_data_blad; public static var data_tree:Class = Tree_data_tree; public function Tree(_arg1:int=0, _arg2:int=0, _arg3:Class=null, _arg4:PlayState=null){ super(_arg1, _arg2); gfx = _arg3; this.loadGraphic(data_tree); this.setup(); parrent = _arg4; this.numOfLeaves = 10; } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ this.createLeafes(); return (false); } override public function hitWall(_arg1:FlxCore=null):Boolean{ this.createLeafes(); return (false); } public function createLeaf():void{ this.leafArray.push(new Leaf(((this.x + 5) + (FlxG.random() * (this.width - 5))), ((this.y + 5) + (FlxG.random() * (this.height - 5))), null, parrent)); } public function createLeafes():void{ var _local1:int; if (this.readyToRelease){ _local1 = 0; while (_local1 < this.numOfLeaves) { this.createLeaf(); _local1++; }; this.readyToRelease = false; parrent.sndEfx.playTouchTree(); }; } override public function update():void{ var _local1:String; for (_local1 in this.leafArray) { this.leafArray[_local1].update(); if (this.leafArray[_local1].dead == true){ this.leafArray.pop(); }; }; if (this.readyToRelease == false){ counter = (counter + FlxG.elapsed); if (counter > 4){ counter = 0; this.readyToRelease = true; }; }; } override public function hitFloor(_arg1:FlxCore=null):Boolean{ this.createLeafes(); return (false); } public function setup():void{ this.x = (this.x - (this.width / 2)); this.y = (this.y - (this.height - 5)); leafArray = new Array(); this.readyToRelease = true; emitter = new FlxEmitter((this.x + (this.width / 2)), (this.y + (this.height / 2)), 0.5); emitter.createSprites(data_blad); emitter.gravity = 100; emitter.drag = 10; emitter.delay = 0; counter = 0; } } }//package
Section 168
//Tree_data_blad (Tree_data_blad) package { import mx.core.*; public class Tree_data_blad extends BitmapAsset { } }//package
Section 169
//Tree_data_tree (Tree_data_tree) package { import mx.core.*; public class Tree_data_tree extends BitmapAsset { } }//package
Section 170
//WasteDrip (WasteDrip) package { import org.flixel.*; public class WasteDrip extends FlxSprite { private var timeBetweenDrips:Number; private var numberOfDrops:int; private var dripping:Boolean; private var dropArray:Array; private var wasteDrip:Class; private var numberOfDropsOrginal:int; private var timeCounter:Number;// = 0 public var parrent:PlayState; public function WasteDrip(_arg1:int=0, _arg2:int=0, _arg3:FlxLayer=null, _arg4:PlayState=null, _arg5:Class=null){ wasteDrip = WasteDrip_wasteDrip; super(_arg1, _arg2, wasteDrip); parrent = _arg4; this.dripping = false; this.numberOfDropsOrginal = 10; this.numberOfDrops = this.numberOfDropsOrginal; this.dropArray = new Array(); this.timeBetweenDrips = 0.01; } override public function update():void{ var _local1:String; if (this.dripping){ this.timeCounter = (this.timeCounter + (1 * FlxG.elapsed)); if (this.timeCounter > this.timeBetweenDrips){ this.drip(); this.timeCounter = 0; }; if (this.dropArray.length == 0){ this.dripping = false; this.visible = false; this.kill(); }; }; for (_local1 in this.dropArray) { if (this.dropArray[_local1].finnished == true){ this.dropArray.pop(); }; }; } override public function hitCeiling(_arg1:FlxCore=null):Boolean{ this.startDrip(); return (false); } public function drip():void{ if (this.numberOfDrops != 0){ this.dropArray.push(new WasteDrop(this.x, this.y, null, parrent, this.alpha)); this.numberOfDrops = (this.numberOfDrops - 1); this.alpha = (this.numberOfDrops / this.numberOfDropsOrginal); this.timeBetweenDrips = (this.timeBetweenDrips + 0.03); }; } public function startDrip():void{ if (this.dripping == false){ this.dripping = true; this.numberOfDrops = this.numberOfDropsOrginal; this.timeCounter = 0; this.drip(); }; } override public function hitFloor(_arg1:FlxCore=null):Boolean{ this.startDrip(); return (false); } override public function hitWall(_arg1:FlxCore=null):Boolean{ this.startDrip(); return (false); } } }//package
Section 171
//WasteDrip_wasteDrip (WasteDrip_wasteDrip) package { import mx.core.*; public class WasteDrip_wasteDrip extends BitmapAsset { } }//package
Section 172
//WasteDrop (WasteDrop) package { import flash.geom.*; import org.flixel.*; public class WasteDrop extends FlxSprite { private var dropPartB:FlxSprite; private var parrent:PlayState; private var wasteDrop:Class; public var hitGround:Boolean; public var finnished:Boolean; private var wasteDropPart:Class; private var dropPartA:FlxSprite; public function WasteDrop(_arg1:int=0, _arg2:int=0, _arg3:Class=null, _arg4:PlayState=null, _arg5:Number=1){ wasteDrop = WasteDrop_wasteDrop; wasteDropPart = WasteDrop_wasteDropPart; super((_arg1 + 2), (_arg2 + 14), wasteDrop); this.parrent = _arg4; parrent.foregroundLayer.add(this); this.finnished = false; this.velocity = new Point(0, 10); this.hitGround = false; this.alpha = _arg5; this.acceleration = new Point(0, 100); } public function setUpParts():void{ this.dropPartA = new FlxSprite(this.x, this.y, wasteDropPart); this.dropPartB = new FlxSprite(this.x, this.y, wasteDropPart); this.dropPartA.alpha = this.alpha; this.dropPartB.alpha = this.alpha; this.dropPartA.acceleration = new Point(0, 300); this.dropPartB.acceleration = new Point(0, 300); this.dropPartA.velocity = new Point(((Math.random() * 20) + 30), -80); this.dropPartB.velocity = new Point(-(((Math.random() * 20) + 30)), -80); this.parrent.foregroundLayer.add(this.dropPartA); this.parrent.foregroundLayer.add(this.dropPartB); } override public function update():void{ if (this.finnished == false){ super.update(); if (this.hitGround == false){ if (parrent.myMap.collide(this)){ this.hitGround = true; this.visible = false; this.setUpParts(); this.parrent.sndEfx.playDrip(this.alpha); }; } else { parrent.myMap.collide(this.dropPartA); parrent.myMap.collide(this.dropPartB); this.dropPartA.alpha = (this.dropPartA.alpha - (0.3 * FlxG.elapsed)); this.dropPartB.alpha = (this.dropPartB.alpha - (0.3 * FlxG.elapsed)); if (this.dropPartA.alpha <= 0){ this.finnished = true; this.dead = true; this.dropPartA.destroy(); this.dropPartA.dead = true; this.dropPartA.visible = false; this.dropPartB.destroy(); this.dropPartB.dead = true; this.dropPartB.visible = false; this.destroy(); this.kill(); this.dropPartA.kill(); this.dropPartB.kill(); }; }; }; } } }//package
Section 173
//WasteDrop_wasteDrop (WasteDrop_wasteDrop) package { import mx.core.*; public class WasteDrop_wasteDrop extends BitmapAsset { } }//package
Section 174
//WasteDrop_wasteDropPart (WasteDrop_wasteDropPart) package { import mx.core.*; public class WasteDrop_wasteDropPart extends BitmapAsset { } }//package
Section 175
//VolumeUI (VolumeUI) package { import flash.geom.*; import org.flixel.*; import flash.media.*; public class VolumeUI { private var volumeFader:FlxSpriteNonCollide; private var volumeArea:FlxSpriteNonCollide; private var mouseCollision:FlxCore; private var alphaGoal:Number;// = 0 private var layer:FlxLayer; private var volumeBar:FlxSpriteNonCollide; public var parrent:PlayState; private var alpha:Number;// = 0 private var muteButtonAlphaOver:Number;// = 1 private var timeLeftCounter:TimeLeftCounter; private var muteButton:FlxSpriteNonCollide; private var muteButtonAlphaUp:Number;// = 0.8 private var muteButtonAlphaDown:Number;// = 0.5 private var y:int; private var x:int; public static var data_mute_button:Class = VolumeUI_data_mute_button; public static var data_volumeBar:Class = VolumeUI_data_volumeBar; public static var data_volumeFader:Class = VolumeUI_data_volumeFader; public function VolumeUI(_arg1:PlayState){ this.parrent = _arg1; this.setupUI(); } public function showMuteButton():void{ this.muteButton.visible = true; } public function update():void{ var _local2:int; var _local1:Boolean; if (FlxG.mouse.pressed()){ if (this.checkCollision(new Point(parrent.mouseX, parrent.mouseY), this.volumeBar)){ this.volumeFader.y = parrent.mouseY; _local1 = true; }; }; if (FlxG.mouse.justPressed()){ if (this.checkCollision(new Point(parrent.mouseX, parrent.mouseY), this.muteButton)){ if (this.getVolume() > 0){ this.volumeFader.y = (this.volumeFader.y + this.volumeBar.height); _local1 = true; } else { this.volumeFader.y = (this.volumeBar.y + (this.volumeBar.height / 4)); _local1 = true; }; }; }; if (this.checkCollision(new Point(parrent.mouseX, parrent.mouseY), this.muteButton)){ this.muteButton.alpha = this.muteButtonAlphaOver; if (FlxG.mouse.pressed()){ this.muteButton.alpha = this.muteButtonAlphaDown; }; } else { this.muteButton.alpha = this.muteButtonAlphaUp; }; if (this.checkCollision(new Point(parrent.mouseX, parrent.mouseY), this.volumeArea)){ this.alphaGoal = 1; } else { this.alphaGoal = 0; }; this.fade(); if (((FlxG.keys.justPressed("M")) || (FlxG.keys.justPressed("ZERO")))){ if (this.getVolume() != 0){ this.volumeFader.y = (this.volumeFader.y + this.volumeBar.height); _local1 = true; } else { this.volumeFader.y = (this.volumeBar.y + (this.volumeBar.height / 4)); _local1 = true; }; }; if (FlxG.keys.justPressed("PLUS")){ this.volumeFader.y = (this.volumeFader.y + 10); _local1 = true; }; if (FlxG.keys.justPressed("MINUS")){ this.volumeFader.y = (this.volumeFader.y - 10); _local1 = true; this.alpha = 1; }; if (this.volumeFader.y < this.volumeBar.y){ this.volumeFader.y = this.volumeBar.y; }; if ((this.volumeFader.y + this.volumeFader.height) > (this.volumeBar.y + this.volumeBar.height)){ this.volumeFader.y = ((this.volumeBar.y + this.volumeBar.height) - this.volumeFader.height); }; if (this.timeLeftCounter.active){ _local2 = Math.round(((this.parrent.musicTrack.length / 1000) - (this.parrent.musicChannel.position / 1000))); this.timeLeftCounter.insertTime(String(Math.floor((_local2 / 60))), String((_local2 % 60))); }; if (_local1){ this.checkMute(); }; } public function checkCollision(_arg1:Point, _arg2:FlxSpriteNonCollide):Boolean{ this.mouseCollision.x = _arg1.x; this.mouseCollision.y = _arg1.y; if (this.mouseCollision.collide(_arg2)){ if ((_arg2.y + _arg2.height) < this.mouseCollision.y){ return (false); }; return (true); //unresolved jump }; return (false); } private function fade():void{ var _local1:FlxSpriteNonCollide; if (this.alphaGoal != this.alpha){ if (this.alpha < this.alphaGoal){ this.alpha = (this.alpha + (2 * FlxG.elapsed)); }; if (this.alpha > this.alphaGoal){ this.alpha = (this.alpha - (2 * FlxG.elapsed)); }; if (this.alpha < 0){ this.alpha = this.alphaGoal; }; for each (_local1 in this.layer.children()) { _local1.alpha = this.alpha; }; }; } public function hideMuteButton():void{ this.muteButton.visible = false; } public function getVolume():Number{ var _local1:Number = (((this.volumeBar.y + this.volumeBar.height) - this.volumeFader.y) - this.volumeFader.height); return ((_local1 / this.volumeBar.height)); } public function setGlobalVolume():void{ SoundMixer.soundTransform = new SoundTransform(this.getVolume()); } public function setupUI():void{ x = (FlxG.width - 20); y = 6; this.layer = new FlxLayer(); mouseCollision = new FlxCore(); this.mouseCollision.width = 2; this.mouseCollision.height = 2; this.volumeBar = new FlxSpriteNonCollide(x, (y + 18), data_volumeBar); this.volumeBar.scrollFactor = new Point(0, 0); this.volumeBar.alpha = 0; this.layer.add(this.volumeBar); this.volumeFader = new FlxSpriteNonCollide(x, (y + 18), data_volumeFader); this.volumeFader.scrollFactor = new Point(0, 0); this.volumeFader.alpha = 0; this.layer.add(this.volumeFader); var _local1 = 10; this.volumeArea = new FlxSpriteNonCollide((x - _local1), (y - _local1)); this.volumeArea.width = (this.volumeBar.width + (_local1 * 2)); this.volumeArea.height = (this.volumeBar.height + (_local1 * 3.5)); this.volumeArea.createGraphic(this.volumeArea.width, this.volumeArea.height, 1426063360); this.volumeArea.alpha = 0; this.volumeArea.scrollFactor = new Point(0, 0); this.layer.add(this.volumeArea); parrent.topLayer.add(this.layer); this.muteButton = new FlxSpriteNonCollide((x - 2), y, null); this.muteButton.loadGraphic(data_mute_button, true, false, 15, 15); this.muteButton.addAnimation("turnOn", [0]); this.muteButton.addAnimation("turnOff", [1]); this.muteButton.play("turnOn"); this.muteButton.scrollFactor = new Point(0, 0); this.muteButton.alpha = this.muteButtonAlphaUp; parrent.topLayer.add(this.muteButton); this.timeLeftCounter = new TimeLeftCounter((x - 55), y, this.parrent.topLayer); this.timeLeftCounter.scrollFactor = new Point(0, 0); } private function checkMute():void{ this.setGlobalVolume(); if (this.getVolume() == 0){ this.muteButton.play("turnOff"); this.timeLeftCounter.setActive(true); } else { this.muteButton.play("turnOn"); this.timeLeftCounter.setActive(false); }; } public function setVolumFaderAtRightPos():void{ var _local1:Number = (this.volumeBar.height * SoundMixer.soundTransform.volume); _local1 = (Math.abs((_local1 - 45)) + this.volumeBar.y); this.volumeFader.y = _local1; this.checkMute(); } } }//package
Section 176
//VolumeUI_data_mute_button (VolumeUI_data_mute_button) package { import mx.core.*; public class VolumeUI_data_mute_button extends BitmapAsset { } }//package
Section 177
//VolumeUI_data_volumeBar (VolumeUI_data_volumeBar) package { import mx.core.*; public class VolumeUI_data_volumeBar extends BitmapAsset { } }//package
Section 178
//VolumeUI_data_volumeFader (VolumeUI_data_volumeFader) package { import mx.core.*; public class VolumeUI_data_volumeFader extends BitmapAsset { } }//package

Library Items

Symbol 1 Sound {org.flixel.FlxGame_SndBeep} [org.flixel.FlxGame_SndBeep]
Symbol 2 Bitmap {org.flixel.data.FlxPause_ImgKey0}
Symbol 3 Bitmap {org.flixel.data.FlxFactory_ImgBar}
Symbol 4 Bitmap {org.flixel.FlxGame_ImgPoweredBy}
Symbol 5 Bitmap {org.flixel.FlxG_ImgDefaultCursor}
Symbol 6 Bitmap {org.flixel.data.FlxPause_ImgKeyPlus}
Symbol 7 Bitmap {org.flixel.data.FlxFactory_ImgBit}
Symbol 8 Bitmap {org.flixel.data.FlxPause_ImgKeyMinus}
Symbol 9 Bitmap {org.flixel.data.FlxPause_ImgKeyP}
Symbol 10 Font {org.flixel.FlxGame_junk}
Symbol 11 Sound {PlayState_ChemMusic} [PlayState_ChemMusic]
Symbol 12 Sound {SndEfx_fx_explosion} [SndEfx_fx_explosion]
Symbol 13 Sound {SndEfx_fx_takeChemNoise} [SndEfx_fx_takeChemNoise]
Symbol 14 Sound {SndEfx_fx_touchTree} [SndEfx_fx_touchTree]
Symbol 15 Sound {SndEfx_fx_startFlyMode} [SndEfx_fx_startFlyMode]
Symbol 16 Sound {SndEfx_fx_walk1} [SndEfx_fx_walk1]
Symbol 17 Sound {SndEfx_fx_walk2} [SndEfx_fx_walk2]
Symbol 18 Sound {SndEfx_fx_walk3} [SndEfx_fx_walk3]
Symbol 19 Sound {SndEfx_fx_walk4} [SndEfx_fx_walk4]
Symbol 20 Sound {SndEfx_cbit_home} [SndEfx_cbit_home]
Symbol 21 Sound {SndEfx_fx_impact} [SndEfx_fx_impact]
Symbol 22 Sound {SndEfx_fx_walk6} [SndEfx_fx_walk6]
Symbol 23 Sound {SndEfx_fx_walk5} [SndEfx_fx_walk5]
Symbol 24 Sound {SndEfx_fx_hopp} [SndEfx_fx_hopp]
Symbol 25 Sound {SndEfx_fx_land} [SndEfx_fx_land]
Symbol 26 Sound {SndEfx_fx_drip2} [SndEfx_fx_drip2]
Symbol 27 Sound {SndEfx_fx_drip1} [SndEfx_fx_drip1]
Symbol 28 Sound {SndEfx_fx_drip3} [SndEfx_fx_drip3]
Symbol 29 Bitmap {PlayState_data_mountains_night}
Symbol 30 Bitmap {PlayState_data_city_back}
Symbol 31 Bitmap {PlayState_data_construction}
Symbol 32 Bitmap {PlayState_data_schoolExtensionCol}
Symbol 33 Bitmap {org.flixel.FlxTilemap_data_liteTre}
Symbol 34 Bitmap {RainDrop_rainDrop}
Symbol 35 Bitmap {BlinkEyes_data_blinkeyes}
Symbol 36 Bitmap {org.flixel.FlxTilemap_data_caveBgRight}
Symbol 37 Bitmap {ReleaseFlyModeTrigger_img}
Symbol 38 Bitmap {House_data_verhane}
Symbol 39 Bitmap {PlayState_data_moon_backdrop}
Symbol 40 Bitmap {PlayState_data_bird_anim}
Symbol 41 Bitmap {Tree_data_tree}
Symbol 42 Bitmap {PlayState_data_mountains_day}
Symbol 43 Bitmap {Chemical_chemsSprite}
Symbol 44 Bitmap {Bush_data_blad}
Symbol 45 Bitmap {VolumeUI_data_mute_button}
Symbol 46 Bitmap {StreetLight_data_Lightbeam}
Symbol 47 Bitmap {MovingBar_data_crane}
Symbol 48 Bitmap {Ending_data_facebook}
Symbol 49 Bitmap {FadeToDarkTrigger3_img}
Symbol 50 Bitmap {org.flixel.FlxTilemap_data_smallStones}
Symbol 51 Bitmap {MovingBar_data_chandelierBottom}
Symbol 52 Bitmap {PlayState_data_building_right}
Symbol 53 Bitmap {org.flixel.FlxTilemap_data_caveBgDown3}
Symbol 54 Bitmap {House_data_house}
Symbol 55 Bitmap {org.flixel.FlxTilemap_data_caveBgDown2}
Symbol 56 Bitmap {org.flixel.FlxTilemap_data_school}
Symbol 57 Bitmap {org.flixel.FlxTilemap_data_church}
Symbol 58 Bitmap {Ending_data_stumble}
Symbol 59 Bitmap {VolumeUI_data_volumeBar}
Symbol 60 Bitmap {PlayState_data_constructionBack}
Symbol 61 Bitmap {RainDrop_rainDropSplit}
Symbol 62 Bitmap {StreetLight_data_Lightpole}
Symbol 63 Bitmap {House_data_houseGirl}
Symbol 64 Bitmap {TopText_data_black_square}
Symbol 65 Bitmap {VolumeUI_data_volumeFader}
Symbol 66 Bitmap {PlayState_data_churchFront}
Symbol 67 Bitmap {org.flixel.FlxTilemap_data_treeStamme}
Symbol 68 Bitmap {MovingBar_data_crane1}
Symbol 69 Bitmap {House_data_houseWindowBackground}
Symbol 70 Bitmap {org.flixel.FlxTilemap_ImgAuto}
Symbol 71 Bitmap {WasteDrop_wasteDrop}
Symbol 72 Bitmap {PlayState_data_grass1}
Symbol 73 Bitmap {PlayState_data_grass2}
Symbol 74 Bitmap {org.flixel.FlxTilemap_data_fence}
Symbol 75 Bitmap {BounceBlock_data_1Tile}
Symbol 76 Bitmap {PlayState_data_temporarily_closed}
Symbol 77 Bitmap {PlayState_data_schoolExtension}
Symbol 78 Bitmap {org.flixel.FlxTilemap_data_cloud1}
Symbol 79 Bitmap {org.flixel.FlxTilemap_data_house_wall}
Symbol 80 Bitmap {PlayState_data_sun_backdrop}
Symbol 81 Bitmap {WasteDrop_wasteDropPart}
Symbol 82 Bitmap {PlayState_data_skyscraper}
Symbol 83 Bitmap {FadeToDarkTrigger_img}
Symbol 84 Bitmap {FadeToDarkTrigger2_img}
Symbol 85 Bitmap {House_data_houseWindowForeground}
Symbol 86 Bitmap {WasteDrip_wasteDrip}
Symbol 87 Bitmap {Bush_data_tree}
Symbol 88 Bitmap {PlayState_data_city_front}
Symbol 89 Bitmap {org.flixel.FlxTilemap_ImgAutoAlt}
Symbol 90 Bitmap {PlayState_data_morning_sun_backdrop}
Symbol 91 Bitmap {org.flixel.FlxTilemap_data_flowers}
Symbol 92 Bitmap {Ending_data_digg}
Symbol 93 Bitmap {TimeLeftCounter_data_clock}
Symbol 94 Bitmap {PlayState_data_tiles}
Symbol 95 BinaryData {PlayState_data_map}
Symbol 96 Bitmap {org.flixel.FlxTilemap_data_caveBgDown}
Symbol 97 Bitmap {org.flixel.FlxTilemap_data_houseBig}
Symbol 98 Bitmap {Player_PlayerImage}
Symbol 99 Bitmap {PlayState_data_building_inn}
Symbol 100 Bitmap {Ending_data_twitter}
Symbol 101 Bitmap {PlayState_data_cement_mixer}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1459 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 1Symbol 1 as "org.flixel.FlxGame_SndBeep"
ExportAssets (56)Timeline Frame 2Symbol 11 as "PlayState_ChemMusic"
ExportAssets (56)Timeline Frame 2Symbol 12 as "SndEfx_fx_explosion"
ExportAssets (56)Timeline Frame 2Symbol 13 as "SndEfx_fx_takeChemNoise"
ExportAssets (56)Timeline Frame 2Symbol 14 as "SndEfx_fx_touchTree"
ExportAssets (56)Timeline Frame 2Symbol 15 as "SndEfx_fx_startFlyMode"
ExportAssets (56)Timeline Frame 2Symbol 16 as "SndEfx_fx_walk1"
ExportAssets (56)Timeline Frame 2Symbol 17 as "SndEfx_fx_walk2"
ExportAssets (56)Timeline Frame 2Symbol 18 as "SndEfx_fx_walk3"
ExportAssets (56)Timeline Frame 2Symbol 19 as "SndEfx_fx_walk4"
ExportAssets (56)Timeline Frame 2Symbol 20 as "SndEfx_cbit_home"
ExportAssets (56)Timeline Frame 2Symbol 21 as "SndEfx_fx_impact"
ExportAssets (56)Timeline Frame 2Symbol 22 as "SndEfx_fx_walk6"
ExportAssets (56)Timeline Frame 2Symbol 23 as "SndEfx_fx_walk5"
ExportAssets (56)Timeline Frame 2Symbol 24 as "SndEfx_fx_hopp"
ExportAssets (56)Timeline Frame 2Symbol 25 as "SndEfx_fx_land"
ExportAssets (56)Timeline Frame 2Symbol 26 as "SndEfx_fx_drip2"
ExportAssets (56)Timeline Frame 2Symbol 27 as "SndEfx_fx_drip1"
ExportAssets (56)Timeline Frame 2Symbol 28 as "SndEfx_fx_drip3"
SerialNumber (41)Timeline Frame 1

Labels

"Preloader"Frame 1
"Chemicals"Frame 2




http://swfchan.com/19/90405/info.shtml
Created: 28/3 -2019 10:59:00 Last modified: 28/3 -2019 10:59:00 Server time: 22/12 -2024 12:32:50