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

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

crush1.swf

This is the info page for
Flash #132008

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


ActionScript [AS3]
Section 1
//KeyPoll (bigroom.input.KeyPoll) package bigroom.input { import flash.events.*; import flash.display.*; import flash.utils.*; public class KeyPoll { private var states:ByteArray; public var press:Boolean;// = false public var click:Boolean;// = false public var onscreen:Boolean;// = true public var hasclicked:Boolean;// = false private var dispObj:DisplayObject; public function KeyPoll(_arg1:DisplayObject){ states = new ByteArray(); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); dispObj = _arg1; dispObj.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener, false, 0, true); dispObj.addEventListener(KeyboardEvent.KEY_UP, keyUpListener, false, 0, true); dispObj.addEventListener(Event.ACTIVATE, activateListener, false, 0, true); dispObj.addEventListener(Event.DEACTIVATE, deactivateListener, false, 0, true); dispObj.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownListener); dispObj.addEventListener(MouseEvent.MOUSE_UP, mouseUpListener); dispObj.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler); dispObj.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler); } public function mouseOutHandler(_arg1:MouseEvent):void{ onscreen = false; } public function isUp(_arg1:uint):Boolean{ return (((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0)); } private function activateListener(_arg1:Event):void{ var _local2:int; while (_local2 < 8) { states[_local2] = 0; _local2++; }; } public function isDown(_arg1:uint):Boolean{ return (!(((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0))); } private function keyUpListener(_arg1:KeyboardEvent):void{ states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] & ~((1 << (_arg1.keyCode & 7)))); } private function deactivateListener(_arg1:Event):void{ var _local2:int; while (_local2 < 8) { states[_local2] = 0; _local2++; }; } public function mouseOverHandler(_arg1:MouseEvent):void{ onscreen = true; } public function mouseUpListener(_arg1:MouseEvent):void{ press = false; click = false; hasclicked = false; } public function mouseDownListener(_arg1:MouseEvent):void{ press = true; click = true; hasclicked = true; } private function keyDownListener(_arg1:KeyboardEvent):void{ states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] | (1 << (_arg1.keyCode & 7))); } } }//package bigroom.input
Section 2
//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.4.0.9271"; 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 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.4.0.9271"; 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
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 5
//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 6
//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 7
//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 8
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.4.0.9271"; } }//package mx.core
Section 9
//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.4.0.9271"; 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 10
//blockclass (blockclass) package { import flash.display.*; import flash.geom.*; public class blockclass extends Sprite { public var hp:int; public var rect:Rectangle; public var active:Boolean; public var yp:int; public var xp:int; public var wp:int; public var type:int; public var trigger:int; public function blockclass():void{ clear(); } public function clear():void{ active = false; type = 0; trigger = 0; xp = 0; yp = 0; wp = 0; hp = 0; rect = new Rectangle(); rect.x = xp; rect.y = yp; rect.width = wp; rect.height = hp; } public function rectset(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ rect.x = _arg1; rect.y = _arg2; rect.width = _arg3; rect.height = _arg4; } } }//package
Section 11
//dwgraphicsclass (dwgraphicsclass) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.net.*; public class dwgraphicsclass extends Sprite { public var bfontpos:int; public var backgrounds:Array; public var bfontmask:Array; public var sprites_rect:Rectangle; public var cur:int; public var buffer:BitmapData; public var images_rect:Rectangle; public var sprites:Array; public var ntextbox:int; public var trect:Rectangle; public var tiles_rect:Rectangle; public var i:int; public var j:int; public var k:int; public var screen:Bitmap; public var ct:ColorTransform; public var z:int; public var textbox:Array; public var images:Array; public var temptile:BitmapData; public var alphamult:uint; public var tl:Point; public var tiles:Array; public var bg_rect:Rectangle; public var screenbuffer:BitmapData; public var bfont:Array; public var bfont_rect:Rectangle; public var updatebackground:Boolean; public var bfontlen:Array; public var bfontmask_rect:Rectangle; public var stemp:String; public var temp:int; public var temp2:int; public var temp3:int; public var backbuffer:BitmapData; public function dwgraphicsclass(){ backgrounds = new Array(); images = new Array(); tiles = new Array(); sprites = new Array(); bfont = new Array(); bfontmask = new Array(); bfontlen = new Array(); textbox = new Array(); super(); } public function createtextbox(_arg1:String, _arg2:int, _arg3:int, _arg4:int=0xFF, _arg5:int=0xFF, _arg6:int=0xFF):void{ if (ntextbox == 0){ z = 0; ntextbox++; } else { i = 0; z = -1; while (i < ntextbox) { if (!textbox[i].active){ z = i; i = ntextbox; }; i++; }; if (z == -1){ z = ntextbox; ntextbox++; }; }; if (z < 20){ textbox[z].clear(); textbox[z].line[0] = _arg1; textbox[z].xp = _arg2; if (_arg2 == -1){ textbox[z].xp = (160 - (((_arg1.length / 2) + 1) * 8)); }; textbox[z].yp = _arg3; textbox[z].initcol(_arg4, _arg5, _arg6); textbox[z].resize(); }; } public function textboxactive():void{ i = 0; while (i < ntextbox) { if (z != i){ textbox[i].remove(); }; i++; }; } public function drawentities(_arg1:entityclass, _arg2:helpclass):void{ var _local3:int; var _local4:int; var _local5:int; while (_local5 < _arg1.nentity) { if (_arg1.entities[_local5].active){ if (_arg1.entities[_local5].size == 1){ _local3 = 0; while (_local3 < 2) { _local4 = 0; while (_local4 < 2) { backbuffer.copyPixels(sprites[((_arg1.entities[_local5].drawframe + _local3) + (_local4 * 20))], sprites_rect, new Point((_arg1.entities[_local5].xp + (_local3 * 16)), (_arg1.entities[_local5].yp + (_local4 * 16)))); _local4++; }; _local3++; }; } else { if (_arg1.entities[_local5].size == 2){ if (((!(_arg1.entities[_local5].invis)) && (_arg1.entities[_local5].active))){ backbuffer.copyPixels(tiles[_arg1.entities[_local5].drawframe], tiles_rect, new Point(_arg1.entities[_local5].xp, _arg1.entities[_local5].yp)); backbuffer.copyPixels(tiles[(_arg1.entities[_local5].drawframe + 20)], tiles_rect, new Point(_arg1.entities[_local5].xp, (_arg1.entities[_local5].yp + 16))); }; } else { if (!_arg1.entities[_local5].invis){ if ((Math.random() * 100) > 50){ fillrect(_arg1.entities[_local5].xp, _arg1.entities[_local5].yp, 4, 8, 0xFF, 0xFF, 0xFF); } else { fillrect(_arg1.entities[_local5].xp, _arg1.entities[_local5].yp, 4, 8, 0xFF, 0, 0); }; }; }; }; }; _local5++; }; } public function makespritearray():void{ var _local2:Number; var _local3:BitmapData; var _local4:Rectangle; var _local1:Number = 0; while (_local1 < 15) { _local2 = 0; while (_local2 < 20) { _local3 = new BitmapData(32, 32, true, 0); _local4 = new Rectangle((_local2 * 32), (_local1 * 32), 32, 32); _local3.copyPixels(buffer, _local4, tl); sprites.push(_local3); _local2++; }; _local1++; }; } public function bprinttemptile(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean=false):void{ printmasktemptile(_arg1, _arg2, _arg3, _arg7); printtemptile(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); } public function init():void{ var _local1:textboxclass; updatebackground = true; tiles_rect = new Rectangle(0, 0, 16, 16); sprites_rect = new Rectangle(0, 0, 32, 32); bfont_rect = new Rectangle(0, 0, 8, 8); bfontmask_rect = new Rectangle(0, 0, 9, 9); bg_rect = new Rectangle(0, 0, 320, 240); tl = new Point(0, 0); ct = new ColorTransform(0, 0, 0, 1, 0xFF, 0xFF, 0xFF, 1); trect = new Rectangle(0, 0, 0, 0); i = 0; while (i < 20) { _local1 = new textboxclass(); textbox.push(_local1); i++; }; ntextbox = 0; backbuffer = new BitmapData(640, 480, false, 0); screenbuffer = new BitmapData(640, 480, false, 0); temptile = new BitmapData(16, 16, false, 0); screen = new Bitmap(screenbuffer); screen.width = 640; screen.height = 480; addChild(screen); } public function addline(_arg1:String):void{ textbox[z].addline(_arg1); } public function printmask(_arg1:int, _arg2:int, _arg3:String, _arg4:Boolean=false):void{ if (_arg4){ _arg1 = (160 - (len(_arg3) / 2)); }; bfontpos = 0; var _local5:int; while (_local5 < _arg3.length) { cur = _arg3.charCodeAt(_local5); backbuffer.copyPixels(bfontmask[cur], bfont_rect, new Point(((_arg1 + bfontpos) - 1), _arg2)); bfontpos = (bfontpos + bfontlen[cur]); _local5++; }; } public function screenshake():void{ screenbuffer.lock(); screenbuffer.copyPixels(backbuffer, backbuffer.rect, tl, null, null, false); screenbuffer.copyPixels(backbuffer, backbuffer.rect, new Point(((Math.random() * 5) - 3), ((Math.random() * 5) - 3)), null, null, false); screenbuffer.unlock(); backbuffer.lock(); backbuffer.fillRect(backbuffer.rect, 0); backbuffer.unlock(); } public function len(_arg1:String):int{ bfontpos = 0; var _local2:int; while (_local2 < _arg1.length) { cur = _arg1.charCodeAt(_local2); bfontpos = (bfontpos + bfontlen[cur]); _local2++; }; return (bfontpos); } public function flashlight():void{ backbuffer.fillRect(backbuffer.rect, 9383213); } public function printtemptile(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean=false):void{ if (_arg4 < 0){ _arg4 = 0; }; if (_arg5 < 0){ _arg5 = 0; }; if (_arg6 < 0){ _arg6 = 0; }; if (_arg4 > 0xFF){ _arg4 = 0xFF; }; if (_arg5 > 0xFF){ _arg5 = 0xFF; }; if (_arg6 > 0xFF){ _arg6 = 0xFF; }; ct.color = RGB(_arg4, _arg5, _arg6); if (_arg7){ _arg1 = (160 - (len(_arg3) / 2)); }; bfontpos = 0; var _local8:int; while (_local8 < _arg3.length) { cur = _arg3.charCodeAt(_local8); bfont[cur].colorTransform(bfont_rect, ct); temptile.copyPixels(bfont[cur], bfont_rect, new Point((_arg1 + bfontpos), _arg2)); bfontpos = (bfontpos + bfontlen[cur]); _local8++; }; } public function drawbuffertile(_arg1:int, _arg2:int, _arg3:int):void{ buffer.copyPixels(tiles[_arg3], tiles_rect, new Point(_arg1, _arg2)); } public function maketilearray():void{ var _local2:Number; var _local3:BitmapData; var _local4:Rectangle; var _local1:Number = 0; while (_local1 < 15) { _local2 = 0; while (_local2 < 20) { _local3 = new BitmapData(16, 16, true, 0); _local4 = new Rectangle((_local2 * 16), (_local1 * 16), 16, 16); _local3.copyPixels(buffer, _local4, tl); tiles.push(_local3); _local2++; }; _local1++; }; } public function drawhp(_arg1:int, _arg2:int, _arg3:int):void{ backbuffer.copyPixels(images[4], new Rectangle(0, 0, _arg3, 85), new Point(_arg1, _arg2)); } public function textboxcenter():void{ textbox[z].centerx(); textbox[z].centery(); } public function addimage():void{ var _local1:BitmapData = new BitmapData(buffer.width, buffer.height, true, 0); _local1.copyPixels(buffer, new Rectangle(0, 0, buffer.width, buffer.height), tl); images.push(_local1); } public function textboxcleanup():void{ i = (ntextbox - 1); while ((((i >= 0)) && (!(textbox[i].active)))) { ntextbox--; i--; }; } public function drawbackground(_arg1:int):void{ backbuffer.copyPixels(backgrounds[_arg1], bg_rect, tl); } public function drawgui(_arg1:helpclass):void{ textboxcleanup(); i = 0; while (i < ntextbox) { textbox[i].update(); if (textbox[i].active){ if (textbox[i].ismenu){ backbuffer.fillRect(textbox[i].textrect, RGB((textbox[i].r / 6), (textbox[i].g / 6), (textbox[i].b / 6))); j = 0; while (j < textbox[i].numlines) { if (textbox[i].highlighted == j){ print((textbox[i].xp + 2), ((textbox[i].yp + 8) + (j * 8)), ">", (0xFF - _arg1.glow), (0xFF - _arg1.glow), (0xFF - _arg1.glow)); print((textbox[i].xp + 8), ((textbox[i].yp + 8) + (j * 8)), textbox[i].line[j], (0xFF - _arg1.glow), (0xFF - _arg1.glow), (0xFF - _arg1.glow)); } else { print((textbox[i].xp + 8), ((textbox[i].yp + 8) + (j * 8)), textbox[i].line[j], (textbox[i].r * 0.5), (textbox[i].g * 0.5), (textbox[i].b * 0.5)); }; j++; }; } else { backbuffer.fillRect(textbox[i].textrect, RGB((textbox[i].r / 6), (textbox[i].g / 6), (textbox[i].b / 6))); j = 0; while (j < textbox[i].numlines) { print((textbox[i].xp + 8), ((textbox[i].yp + 8) + (j * 8)), textbox[i].line[j], textbox[i].r, textbox[i].g, textbox[i].b); j++; }; }; }; i++; }; } public function textboxremove():void{ i = 0; while (i < ntextbox) { textbox[i].remove(); i++; }; } public function textboxsetmenu():void{ textbox[z].ismenu = true; } public function textboxcenterx():void{ textbox[z].centerx(); } public function textboxcentery():void{ textbox[z].centery(); } public function textboxtimer(_arg1:int):void{ textbox[z].timer = _arg1; } public function makebfont():void{ var _local2:Array; var _local5:Number; var _local6:BitmapData; var _local7:Rectangle; var _local1:Number = 0; while (_local1 < 16) { _local5 = 0; while (_local5 < 16) { _local6 = new BitmapData(8, 8, true, 0); _local7 = new Rectangle((_local5 * 8), (_local1 * 8), 8, 8); _local6.copyPixels(buffer, _local7, tl); bfont.push(_local6); _local5++; }; _local1++; }; _local5 = 0; while (_local5 < 0x0100) { bfontlen.push(6); _local5++; }; var _local3 = "4,3,5,7,6,7,6,3,4,4,7,7,3,5,2,5,6,5,6,6,6,6,6,6,6,6,2,3,5,5,5,6,7,6,6,6,6,5,5,6,6,3,6,6,5,7,7,6,6,6,6,6,5,6,7,7,7,7,5,4,5,4,5,6,4,6,6,6,6,5,5,6,6,3,6,6,5,7,7,6,6,6,6,6,5,6,7,7,7,7,5,5,3,5,6,4"; _local2 = new Array(); _local2 = _local3.split(","); var _local4:int; while (_local4 < 96) { bfontlen[(_local4 + 32)] = int(_local2[_local4]); _local4++; }; } public function bprint(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean=false):void{ printmask(_arg1, _arg2, _arg3, _arg7); print(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7); } public function addbackground():void{ var _local1:BitmapData = new BitmapData(160, 144, true, 0); _local1.copyPixels(buffer, bg_rect, tl); backgrounds.push(_local1); } public function render():void{ screenbuffer.lock(); screenbuffer.copyPixels(backbuffer, backbuffer.rect, tl, null, null, false); screenbuffer.unlock(); backbuffer.lock(); backbuffer.fillRect(backbuffer.rect, 0); backbuffer.unlock(); } public function drawimage(_arg1:int, _arg2:int, _arg3:int, _arg4:Boolean=false):void{ if (_arg4){ backbuffer.copyPixels(images[_arg1], new Rectangle(0, 0, images[_arg1].width, images[_arg1].height), new Point((80 - int((images[_arg1].width / 2))), _arg3)); } else { backbuffer.copyPixels(images[_arg1], new Rectangle(0, 0, images[_arg1].width, images[_arg1].height), new Point(_arg2, _arg3)); }; } public function printmasktemptile(_arg1:int, _arg2:int, _arg3:String, _arg4:Boolean=false):void{ if (_arg4){ _arg1 = (160 - (len(_arg3) / 2)); }; bfontpos = 0; var _local5:int; while (_local5 < _arg3.length) { cur = _arg3.charCodeAt(_local5); temptile.copyPixels(bfontmask[cur], bfont_rect, new Point(((_arg1 + bfontpos) - 1), _arg2)); bfontpos = (bfontpos + bfontlen[cur]); _local5++; }; } public function RGB(_arg1:Number, _arg2:Number, _arg3:Number):Number{ return (((_arg3 | (_arg2 << 8)) | (_arg1 << 16))); } public function print(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:int, _arg6:int, _arg7:Boolean=false):void{ if (_arg4 < 0){ _arg4 = 0; }; if (_arg5 < 0){ _arg5 = 0; }; if (_arg6 < 0){ _arg6 = 0; }; if (_arg4 > 0xFF){ _arg4 = 0xFF; }; if (_arg5 > 0xFF){ _arg5 = 0xFF; }; if (_arg6 > 0xFF){ _arg6 = 0xFF; }; ct.color = RGB(_arg4, _arg5, _arg6); if (_arg7){ _arg1 = (160 - (len(_arg3) / 2)); }; bfontpos = 0; var _local8:int; while (_local8 < _arg3.length) { cur = _arg3.charCodeAt(_local8); bfont[cur].colorTransform(bfont_rect, ct); backbuffer.copyPixels(bfont[cur], bfont_rect, new Point((_arg1 + bfontpos), _arg2)); bfontpos = (bfontpos + bfontlen[cur]); _local8++; }; } public function drawpixel(_arg1:int, _arg2:int, _arg3:int):void{ trect.x = _arg1; trect.y = _arg2; trect.width = 7; trect.height = 7; switch (_arg3){ case 0: backbuffer.fillRect(trect, RGB(225, 20, 20)); break; case 1: backbuffer.fillRect(trect, RGB(20, 225, 20)); break; case 2: backbuffer.fillRect(trect, RGB(20, 20, 225)); break; case 3: backbuffer.fillRect(trect, RGB(225, 225, 20)); break; case 4: backbuffer.fillRect(trect, RGB(225, 20, 225)); break; case 5: backbuffer.fillRect(trect, RGB(20, 225, 20)); break; case 6: backbuffer.fillRect(trect, RGB(20, 225, 225)); break; case 7: backbuffer.fillRect(trect, RGB(225, 225, 20)); break; }; } public function fillrect(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):void{ trect.x = _arg1; trect.y = _arg2; trect.width = _arg3; trect.height = _arg4; backbuffer.fillRect(trect, RGB(_arg5, _arg6, _arg7)); } public function makebfontmask():void{ var _local2:Number; var _local3:BitmapData; var _local4:Rectangle; var _local1:Number = 0; while (_local1 < 16) { _local2 = 0; while (_local2 < 16) { _local3 = new BitmapData(9, 9, true, 0); _local4 = new Rectangle((_local2 * 9), (_local1 * 9), 9, 9); _local3.copyPixels(buffer, _local4, tl); bfontmask.push(_local3); _local2++; }; _local1++; }; } public function drawtile(_arg1:int, _arg2:int, _arg3:int):void{ backbuffer.copyPixels(tiles[_arg3], tiles_rect, new Point(_arg1, _arg2)); } } }//package
Section 12
//entclass (entclass) package { import flash.display.*; public class entclass extends Sprite { public var size:int; public var rule:int; public var active:Boolean; public var onentity:Boolean; public var jumpframe:int; public var harmful:Boolean; public var state:int; public var statedelay:int; public var walkingframe:int; public var jumping:Boolean; public var yp:int; public var newxp:int; public var dir:int; public var onxwall:int; public var onwall:int; public var onground:Boolean; public var tile:int; public var newyp:int; public var ay:Number; public var type:int; public var cx:int; public var framedelay:int; public var ax:Number; public var drawframe:int; public var vx:Number; public var vy:Number; public var onywall:int; public var gravity:Boolean; public var invis:Boolean; public var ch:int; public var h:int; public var cw:int; public var cy:int; public var life:int; public var w:int; public var xp:int; public function entclass():void{ clear(); } public function clear():void{ active = false; invis = false; type = 0; size = 0; tile = 0; rule = 0; state = 0; statedelay = 0; life = 0; xp = 0; yp = 0; ax = 0; ay = 0; vx = 0; vy = 0; cw = 16; ch = 16; w = 16; h = 16; cx = 0; cy = 0; framedelay = 0; drawframe = 0; walkingframe = 0; dir = 0; } } }//package
Section 13
//entityclass (entityclass) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.net.*; public class entityclass extends Sprite { public var z:int; public var blocks:Array; public var temph:int; public var nblocks:int; public var colpoint1:Point; public var tempw:int; public var tempx:int; public var tempy:int; public var colpoint2:Point; public var temprect:Rectangle; public var entities:Array; public var nentity:int; public var temp:int; public var temp2:int; public var i:int; public var j:int; public var activetrigger:int; public var temprect2:Rectangle; public static var TRIGGER:Number = 1; public static var BLOCK:Number = 0; public static var DAMAGE:Number = 2; public function entityclass(){ entities = new Array(); blocks = new Array(); super(); } public function removeblock(_arg1:int):void{ blocks[_arg1].clear(); i = (nblocks - 1); while ((((i >= 0)) && (!(blocks[i].active)))) { nblocks--; i--; }; } public function updateentities(_arg1:int, _arg2:helpclass, _arg3:gameclass, _arg4:musicclass):Boolean{ if (entities[_arg1].active){ if (entities[_arg1].statedelay <= 0){ switch (entities[_arg1].type){ case 0: if (entities[_arg1].state == 0){ if (entities[_arg1].yp < 0){ entities[_arg1].active = false; }; }; break; }; } else { entities[_arg1].statedelay--; if (entities[_arg1].statedelay < 0){ entities[_arg1].statedelay = 0; }; }; }; return (true); } public function init():void{ var _local2:entclass; var _local3:blockclass; nentity = 0; nblocks = 0; temprect = new Rectangle(); temprect2 = new Rectangle(); colpoint1 = new Point(); colpoint2 = new Point(); var _local1:Number = 0; while (_local1 < 200) { _local2 = new entclass(); entities.push(_local2); _local3 = new blockclass(); blocks.push(_local3); _local1++; }; } public function createblock(_arg1:int, _arg2:int=0, _arg3:int=0, _arg4:int=0, _arg5:int=0, _arg6:int=0):void{ if (nblocks == 0){ z = 0; nblocks++; } else { i = 0; z = -1; while (i < nblocks) { if (!blocks[i].active){ z = i; i = nblocks; }; i++; }; if (z == -1){ z = nblocks; nblocks++; }; }; blocks[z].clear(); blocks[z].active = true; switch (_arg1){ case BLOCK: blocks[z].type = BLOCK; blocks[z].xp = _arg2; blocks[z].yp = _arg3; blocks[z].wp = _arg4; blocks[z].hp = _arg5; blocks[z].rectset(_arg2, _arg3, _arg4, _arg5); nblocks++; break; case TRIGGER: blocks[z].type = TRIGGER; blocks[z].x = _arg2; blocks[z].y = _arg3; blocks[z].w = _arg4; blocks[z].h = _arg5; blocks[z].rectset(_arg2, _arg3, _arg4, _arg5); blocks[z].trigger = _arg6; nblocks++; break; case DAMAGE: blocks[z].type = DAMAGE; blocks[z].x = _arg2; blocks[z].y = _arg3; blocks[z].w = _arg4; blocks[z].h = _arg5; blocks[z].rectset(_arg2, _arg3, _arg4, _arg5); nblocks++; break; }; } public function gettype(_arg1:int):Boolean{ var _local2:int; while (_local2 < nentity) { if (entities[_local2].type == _arg1){ return (true); }; _local2++; }; return (false); } public function animateentities(_arg1:int, _arg2:helpclass):void{ if (entities[_arg1].active){ if (entities[_arg1].statedelay <= 0){ switch (entities[_arg1].type){ default: entities[_arg1].drawframe = entities[_arg1].tile; break; }; } else { entities[_arg1].statedelay--; if (entities[_arg1].statedelay < 0){ entities[_arg1].statedelay = 0; }; }; }; } public function checktrigger():int{ i = 0; while (i < nentity) { if (entities[i].rule == 0){ tempx = (entities[i].xp + entities[i].cx); tempy = (entities[i].yp + entities[i].cy); tempw = entities[i].cw; temph = entities[i].ch; rectset(tempx, tempy, tempw, temph); j = 0; while (j < nblocks) { if (blocks[j].type == TRIGGER){ if (blocks[j].rect.intersects(temprect)){ return (blocks[j].trigger); }; }; j++; }; }; i++; }; return (-1); } public function removetrigger(_arg1:int):void{ i = 0; while (i < nblocks) { if (blocks[i].type == TRIGGER){ if (blocks[i].trigger == _arg1){ removeblock(i); }; }; i++; }; } public function getplayer():int{ var _local1:int; while (_local1 < nentity) { if (entities[_local1].type == 0){ return (_local1); }; _local1++; }; return (-1); } public function entitycollisioncheck(_arg1:dwgraphicsclass, _arg2:gameclass, _arg3:mapclass, _arg4:musicclass):void{ i = 0; while (i < nentity) { if (entities[i].active){ j = 0; while (j < nentity) { if (entities[j].active){ if ((((((entities[i].rule == 0)) && ((entities[j].rule == 1)))) && (entities[j].harmful))){ if (entitycollide(i, j)){ if ((((entities[i].size == 0)) && ((entities[j].size == 0)))){ colpoint1.x = entities[i].xp; colpoint1.y = entities[i].yp; colpoint2.x = entities[j].xp; colpoint2.y = entities[j].yp; if (_arg1.sprites[entities[i].drawframe].hitTest(colpoint1, 1, _arg1.sprites[entities[j].drawframe], colpoint2, 1)){ _arg2.deathseq = 30; }; } else { _arg2.deathseq = 30; }; }; }; if ((((entities[i].rule == 0)) && ((entities[j].rule == 2)))){ if (entities[j].onentity > 0){ if (entitycollide(i, j)){ entities[j].state = entities[j].onentity; }; }; }; }; j++; }; }; i++; }; if (checkdamage()){ _arg2.deathseq = 30; }; activetrigger = -1; if (checktrigger() > -1){ _arg2.state = activetrigger; }; } public function testwallsx(_arg1:int, _arg2:int, _arg3:int):Boolean{ tempx = (_arg2 + entities[_arg1].cx); tempy = (_arg3 + entities[_arg1].cy); tempw = entities[_arg1].cw; temph = entities[_arg1].ch; rectset(tempx, tempy, tempw, temph); if (checkwall()){ if (entities[_arg1].vx > 1){ entities[_arg1].vx--; entities[_arg1].newxp = int((entities[_arg1].xp + entities[_arg1].vx)); return (testwallsx(_arg1, entities[_arg1].newxp, entities[_arg1].yp)); }; if (entities[_arg1].vx < -1){ entities[_arg1].vx++; entities[_arg1].newxp = int((entities[_arg1].xp + entities[_arg1].vx)); return (testwallsx(_arg1, entities[_arg1].newxp, entities[_arg1].yp)); }; entities[_arg1].vx = 0; return (false); }; return (true); } public function testwallsy(_arg1:int, _arg2:int, _arg3:int):Boolean{ tempx = (_arg2 + entities[_arg1].cx); tempy = (_arg3 + entities[_arg1].cy); tempw = entities[_arg1].cw; temph = entities[_arg1].ch; rectset(tempx, tempy, tempw, temph); if (checkwall()){ if (entities[_arg1].vy > 1){ entities[_arg1].vy--; entities[_arg1].newyp = int((entities[_arg1].yp + entities[_arg1].vy)); return (testwallsy(_arg1, entities[_arg1].xp, entities[_arg1].newyp)); }; if (entities[_arg1].vy < -1){ entities[_arg1].vy++; entities[_arg1].newyp = int((entities[_arg1].yp + entities[_arg1].vy)); return (testwallsy(_arg1, entities[_arg1].xp, entities[_arg1].newyp)); }; entities[_arg1].vy = 0; return (false); }; return (true); } public function checkwall():Boolean{ i = 0; while (i < nblocks) { if (blocks[i].type == BLOCK){ if (blocks[i].rect.intersects(temprect)){ return (true); }; }; i++; }; return (false); } public function rect2set(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ temprect2.x = _arg1; temprect2.y = _arg2; temprect2.width = _arg3; temprect2.height = _arg4; } public function createentity(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Number=0, _arg5:Number=0, _arg6:int=0):void{ if (nentity == 0){ z = 0; nentity++; } else { i = 0; z = -1; while (i < nentity) { if (!entities[i].active){ z = i; i = nentity; }; i++; }; if (z == -1){ z = nentity; nentity++; }; }; entities[z].clear(); entities[z].active = true; switch (_arg3){ case 0: entities[z].rule = 0; entities[z].tile = 0; entities[z].xp = _arg1; entities[z].yp = _arg2; entities[z].vy = -20; break; }; } public function removeallblocks():void{ i = 0; while (i < nblocks) { blocks[i].clear(); i++; }; nblocks = 0; } public function applyfriction(_arg1:int, _arg2:Number, _arg3:Number):void{ if (Math.abs(entities[_arg1].vy) <= _arg3){ entities[_arg1].vy = 0; }; if (entities[_arg1].vy > 0){ entities[_arg1].vy = (entities[_arg1].vy - _arg3); }; if (entities[_arg1].vy < 0){ entities[_arg1].vy = (entities[_arg1].vy + _arg3); }; if (entities[_arg1].vy > 4){ entities[_arg1].vy = 4; }; if (entities[_arg1].vy < -3){ entities[_arg1].vy = -3; }; if (entities[_arg1].vx > 3){ entities[_arg1].vx = 3; }; if (entities[_arg1].vx < -3){ entities[_arg1].vx = -3; }; } public function entitycollidefloor(_arg1:int):Boolean{ tempx = (entities[_arg1].xp + entities[_arg1].cx); tempy = ((entities[_arg1].yp + entities[_arg1].cy) + 1); tempw = entities[_arg1].cw; temph = entities[_arg1].ch; rectset(tempx, tempy, tempw, temph); if (checkwall()){ return (true); }; return (false); } public function checkdamage():Boolean{ i = 0; while (i < nentity) { if (entities[i].rule == 0){ tempx = (entities[i].xp + entities[i].cx); tempy = (entities[i].yp + entities[i].cy); tempw = entities[i].cw; temph = entities[i].ch; rectset(tempx, tempy, tempw, temph); j = 0; while (j < nblocks) { if (blocks[j].type == DAMAGE){ if (blocks[j].rect.intersects(temprect)){ return (true); }; }; j++; }; }; i++; }; return (false); } public function entitycollide(_arg1:int, _arg2:int):Boolean{ tempx = (entities[_arg1].xp + entities[_arg1].cx); tempy = (entities[_arg1].yp + entities[_arg1].cy); tempw = entities[_arg1].w; temph = entities[_arg1].h; rectset(tempx, tempy, tempw, temph); tempx = (entities[_arg2].xp + entities[_arg2].cx); tempy = (entities[_arg2].yp + entities[_arg2].cy); tempw = entities[_arg2].w; temph = entities[_arg2].h; rect2set(tempx, tempy, tempw, temph); if (temprect.intersects(temprect2)){ return (true); }; return (false); } public function removeblockat(_arg1:int, _arg2:int):void{ i = 0; while (i < nblocks) { if ((((blocks[i].x == _arg1)) && ((blocks[i].y == _arg2)))){ removeblock(i); }; i++; }; } public function rectset(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ temprect.x = _arg1; temprect.y = _arg2; temprect.width = _arg3; temprect.height = _arg4; } } }//package
Section 14
//gameclass (gameclass) package { import flash.events.*; import flash.display.*; public class gameclass extends Sprite { public var hascontrol:Boolean; public var mutebutton:int; public var state:int; public var statedelay:int; public var footheight:int; public var foottimer:int; public var test:Boolean; public var screenshake:int; public var footwidth:int; public var teststring:String; public var flashlight:int; public var mx:int; public var my:int; public var paused:Boolean; public var pixelx:int; public var pixely:int; public var pixelcol:int; public var gamecomplete:int; public var footx:int; public var footy:int; public var aimode:int; public var infocus:Boolean; public var globalsound:int; public var gamestate:int; public var jumpheld:Boolean; public var aistate:int; public var footstate:int; public var muted:Boolean; public var bombtime:int; public var deathseq:int; public var foothp:int; public static var GAMEMODE:Number = 0; public static var TRIGGER:Number = 1; public static var BLOCK:Number = 0; public static var DAMAGE:Number = 2; public function gameclass(_arg1:entityclass, _arg2:helpclass, _arg3:musicclass):void{ infocus = true; paused = false; muted = false; globalsound = 1; addEventListener(Event.DEACTIVATE, windowNotActive); addEventListener(Event.ACTIVATE, windowActive); gamestate = GAMEMODE; hascontrol = true; jumpheld = false; aimode = 1; aistate = 0; deathseq = 0; gamecomplete = 0; footx = 20; footy = 260; footwidth = 280; footheight = 187; footstate = 0; foottimer = 0; foothp = 500; pixelx = 320; pixely = (260 - 7); pixelcol = 0; bombtime = 0; test = false; teststring = "FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK"; state = 1; statedelay = 0; updatestate(_arg1, _arg2, _arg3); } public function windowActive(_arg1:Event):void{ infocus = true; } public function windowNotActive(_arg1:Event):void{ infocus = false; } public function start(_arg1:entityclass, _arg2:musicclass):void{ _arg2.play(3); footx = 20; footy = 260; footwidth = 280; footheight = 187; footstate = 0; foottimer = 0; foothp = 500; pixelx = 480; pixely = (260 - 7); pixelcol = 0; bombtime = 0; } public function updatestate(_arg1:entityclass, _arg2:helpclass, _arg3:musicclass):void{ statedelay--; if (statedelay <= 0){ statedelay = 0; }; if (statedelay <= 0){ switch (state){ case 0: break; case 1: break; }; }; } } }//package
Section 15
//helpclass (helpclass) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.net.*; public class helpclass extends Sprite { public var glowdir:int; public var globaltemp3:int; public var sine:Array; public var slowsine:int; public var glow:int; public var globaltemp:int; public var cosine:Array; public var globaltemp2:int; public function opa(_arg1:int):int{ return (((_arg1 + 32) % 64)); } public function removeObject(_arg1:Object, _arg2:Array):void{ var _local3:String; for (_local3 in _arg2) { if (_arg2[_local3] == _arg1){ _arg2.splice(_local3, 1); break; }; }; } public function inbox(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int):Boolean{ if ((((_arg1 >= _arg3)) && ((_arg1 < (_arg3 + _arg5))))){ if ((((_arg2 >= _arg4)) && ((_arg2 < (_arg4 + _arg6))))){ return (true); }; }; return (false); } public function number(_arg1:int):String{ switch (_arg1){ case 0: return ("Zero"); case 1: return ("One"); case 2: return ("Two"); case 3: return ("Three"); case 4: return ("Four"); case 5: return ("Five"); case 6: return ("Six"); case 7: return ("Seven"); case 8: return ("Eight"); case 9: return ("Nine"); case 10: return ("Ten"); case 11: return ("Eleven"); case 12: return ("Twelve"); case 13: return ("Thirteen"); case 14: return ("Fourteen"); case 15: return ("Fifteen"); case 16: return ("Sixteen"); case 17: return ("Seventeen"); case 18: return ("Eighteen"); case 19: return ("Nineteen"); case 20: return ("Twenty"); case 21: return ("Twenty One"); }; return ("Some"); } public function init():void{ sine = new Array(); cosine = new Array(); var _local1:int; while (_local1 < 64) { sine[_local1] = Math.sin(((_local1 * 6.283) / 64)); cosine[_local1] = Math.cos(((_local1 * 6.283) / 64)); _local1++; }; glow = 0; glowdir = 0; slowsine = 0; } public function updateglow():void{ slowsine++; if (slowsine >= 64){ slowsine = 0; }; if (glowdir == 0){ glow = (glow + 2); if (glow >= 62){ glowdir = 1; }; } else { glow = (glow - 2); if (glow < 2){ glowdir = 0; }; }; } } }//package
Section 16
//Main (Main) package { import bigroom.input.*; import flash.events.*; import flash.display.*; import flash.geom.*; import flash.media.*; import flash.net.*; import flash.ui.*; public class Main extends Sprite { private var ef_0:Class; public var GAMEMODE:int;// = 0 private var music_0:Class; private var music_1:Class; private var music_3:Class; private var ef_1:Class; public var pixel:uint; public var music:musicclass; private var music_2:Class; public var dwgfx:dwgraphicsclass; public var slogo:MovieClip; private var im_image0:Class; private var im_image2:Class; private var im_image4:Class; private var im_image5:Class; private var im_tiles:Class; private var im_sprites:Class; public var CLICKTOSTART:int;// = 2 private var im_image1:Class; public var help:helpclass; private var im_bfontmask:Class; public var logoposition:Matrix; private var im_image3:Class; private var im_bfont:Class; public var TITLEMODE:int;// = 1 public var map:mapclass; public var gamestate:int; public var FOCUSMODE:int;// = 3 public var key:KeyPoll; public var i:int; public var pixel2:uint; public var game:gameclass; public var obj:entityclass; public var pi:uint; public var pj:uint; public static var TRIGGER:Number = 1; public static var BLOCK:Number = 0; public static var DAMAGE:Number = 2; public function Main():void{ dwgfx = new dwgraphicsclass(); music = new musicclass(); map = new mapclass(); help = new helpclass(); obj = new entityclass(); im_tiles = Main_im_tiles; im_sprites = Main_im_sprites; im_bfont = Main_im_bfont; im_bfontmask = Main_im_bfontmask; im_image0 = Main_im_image0; im_image1 = Main_im_image1; im_image2 = Main_im_image2; im_image3 = Main_im_image3; im_image4 = Main_im_image4; im_image5 = Main_im_image5; music_0 = Main_music_0; music_1 = Main_music_1; music_2 = Main_music_2; music_3 = Main_music_3; ef_0 = Main_ef_0; ef_1 = Main_ef_1; super(); if (stage){ init(); } else { addEventListener(Event.ADDED_TO_STAGE, gameinit); }; } private function gameinit(_arg1:Event=null):void{ var _local2:Bitmap; var _local3:ContextMenu; var _local4:ContextMenuItem; removeEventListener(Event.ADDED_TO_STAGE, gameinit); if (sitelock()){ _local3 = new ContextMenu(); _local4 = new ContextMenuItem("Visit distractionware.com"); _local4.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, visit_distractionware); _local3.hideBuiltInItems(); _local3.customItems.push(_local4); this.contextMenu = _local3; gamestate = TITLEMODE; obj.init(); help.init(); key = new KeyPoll(stage); SoundMixer.soundTransform = new SoundTransform(1); music.currentsong = -1; music.musicfade = 0; music.initefchannels(); music.currentefchan = 0; music.numplays = 0; music.musicchan.push(new music_0()); music.musicchan.push(new music_1()); music.musicchan.push(new music_2()); music.musicchan.push(new music_3()); music.play(0); music.efchan.push(new ef_0()); music.efchan.push(new ef_1()); game = new gameclass(obj, help, music); dwgfx.init(); _local2 = new im_tiles(); dwgfx.buffer = _local2.bitmapData; dwgfx.maketilearray(); _local2 = new im_sprites(); dwgfx.buffer = _local2.bitmapData; dwgfx.makespritearray(); _local2 = new im_bfont(); dwgfx.buffer = _local2.bitmapData; dwgfx.makebfont(); _local2 = new im_bfontmask(); dwgfx.buffer = _local2.bitmapData; dwgfx.makebfontmask(); _local2 = new im_image0(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_image1(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_image2(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_image3(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_image4(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); _local2 = new im_image5(); dwgfx.buffer = _local2.bitmapData; dwgfx.addimage(); dwgfx.buffer = new BitmapData(320, 240, false, 0); addChild(dwgfx); addEventListener(Event.ENTER_FRAME, mainloop); } else { dwgfx.init(); addChild(dwgfx); _local2 = new im_bfont(); dwgfx.buffer = _local2.bitmapData; dwgfx.makebfont(); _local2 = new im_bfontmask(); dwgfx.buffer = _local2.bitmapData; dwgfx.makebfontmask(); dwgfx.buffer = new BitmapData(320, 240, false, 0); addEventListener(Event.ENTER_FRAME, lockedloop); }; } public function titlelogic(_arg1:KeyPoll, _arg2:dwgraphicsclass, _arg3:mapclass, _arg4:gameclass, _arg5:entityclass, _arg6:helpclass, _arg7:musicclass):void{ _arg6.updateglow(); } public function gamerender(_arg1:KeyPoll, _arg2:dwgraphicsclass, _arg3:mapclass, _arg4:gameclass, _arg5:entityclass, _arg6:helpclass):void{ _arg2.backbuffer.lock(); i = 0; while (i < _arg5.nblocks) { if ((((_arg5.blocks[i].type == 0)) && (_arg5.blocks[i].active))){ _arg2.backbuffer.fillRect(_arg5.blocks[i].rect, 0xDDDDDD); }; i++; }; _arg2.drawimage(3, 0, 0); _arg2.drawimage(5, _arg4.footx, (_arg4.footy - _arg4.footheight)); _arg4.pixelcol = ((_arg4.pixelcol + 1) % 8); _arg2.drawpixel(_arg4.pixelx, _arg4.pixely, _arg4.pixelcol); _arg2.fillrect(_arg4.footx, 260, _arg4.footwidth, 40, 0, 0, 0); _arg2.drawhp(60, 390, _arg4.foothp); _arg2.drawentities(_arg5, _arg6); _arg2.drawgui(_arg6); if (_arg4.test){ _arg2.bprint(5, 5, _arg4.teststring, 196, 196, 196, false); }; if (_arg4.flashlight > 0){ _arg4.flashlight--; _arg2.flashlight(); }; if (_arg4.screenshake > 0){ _arg4.screenshake--; _arg2.screenshake(); } else { _arg2.render(); }; _arg2.backbuffer.unlock(); } public function titleinput(_arg1:KeyPoll, _arg2:dwgraphicsclass, _arg3:mapclass, _arg4:gameclass, _arg5:entityclass, _arg6:helpclass, _arg7:musicclass):void{ _arg4.mx = (mouseX / 4); _arg4.my = (mouseY / 4); if (((((((_arg1.isDown(90)) || (_arg1.isDown(32)))) || (_arg1.isDown(86)))) && (!(_arg4.jumpheld)))){ gamestate = GAMEMODE; _arg4.start(_arg5, _arg7); }; } public function inbox(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int):Boolean{ if ((((_arg1 >= _arg3)) && ((_arg1 <= _arg5)))){ if ((((_arg2 >= _arg4)) && ((_arg2 <= _arg6)))){ return (true); }; }; return (false); } public function sitelock():Boolean{ var _local1:String = stage.loaderInfo.url.toLowerCase(); if ((((_local1.indexOf("distractionware.com") <= 0)) && ((_local1.indexOf("flashgamelicense.com") <= 0)))){ return (true); }; return (true); } public function gameinput(_arg1:KeyPoll, _arg2:dwgraphicsclass, _arg3:mapclass, _arg4:gameclass, _arg5:entityclass, _arg6:helpclass, _arg7:musicclass):void{ _arg4.mx = (mouseX / 2); _arg4.my = (mouseY / 2); i = 0; while (i < _arg2.ntextbox) { if (_arg2.textbox[i].active){ if (_arg2.textbox[i].ismenu){ _arg2.textbox[i].highlighted = -1; if (inboxw(_arg4.mx, _arg4.my, _arg2.textbox[i].textrect.x, _arg2.textbox[i].textrect.y, _arg2.textbox[i].textrect.width, _arg2.textbox[i].textrect.height)){ _arg2.textbox[i].highlighted = (_arg4.my - (_arg2.textbox[i].textrect.y + 8)); _arg2.textbox[i].highlighted = (_arg2.textbox[i].highlighted / 8); }; if (_arg1.click){ if (_arg2.textbox[i].highlighted == 2){ _arg4.test = true; }; }; }; }; i++; }; if (_arg4.aimode == 0){ if (_arg4.footstate < 2){ if (_arg1.isDown(Keyboard.LEFT)){ _arg4.footx = (_arg4.footx - 15); } else { if (_arg1.isDown(Keyboard.RIGHT)){ _arg4.footx = (_arg4.footx + 15); }; }; }; if (_arg1.isDown(65)){ _arg4.pixelx = (_arg4.pixelx - 30); } else { if (_arg1.isDown(68)){ _arg4.pixelx = (_arg4.pixelx + 30); }; }; } else { if (_arg4.aimode == 1){ if (_arg1.isDown(Keyboard.LEFT)){ _arg4.pixelx = (_arg4.pixelx - 30); } else { if (_arg1.isDown(Keyboard.RIGHT)){ _arg4.pixelx = (_arg4.pixelx + 30); }; }; if (_arg4.footstate < 2){ if (_arg4.aistate == 0){ _arg4.footx = (_arg4.footx - 15); if (_arg4.footx <= 0){ _arg4.aistate = 1; }; } else { if (_arg4.aistate == 1){ _arg4.footx = (_arg4.footx + 15); if (_arg4.footx > (640 - _arg4.footwidth)){ _arg4.aistate = 0; }; }; }; }; } else { if (_arg4.aimode == 2){ if (_arg4.footstate < 2){ if (_arg1.isDown(Keyboard.LEFT)){ _arg4.footx = (_arg4.footx - 15); } else { if (_arg1.isDown(Keyboard.RIGHT)){ _arg4.footx = (_arg4.footx + 15); }; }; }; if (_arg4.aistate == 0){ _arg4.pixelx = (_arg4.pixelx + 30); if (_arg4.pixelx > (638 - 4)){ _arg4.aistate = 1; }; } else { if (_arg4.aistate == 1){ _arg4.pixelx = (_arg4.pixelx - 30); if (_arg4.pixelx <= 0){ _arg4.aistate = 0; }; }; }; }; }; }; if (_arg4.footx <= 0){ _arg4.footx = 0; }; if (_arg4.footx > (640 - _arg4.footwidth)){ _arg4.footx = ((640 - _arg4.footwidth) - 1); }; if (_arg4.pixelx <= 0){ _arg4.pixelx = 0; }; if (_arg4.pixelx > (638 - 4)){ _arg4.pixelx = (637 - 4); }; } public function visit_sponsor_logo():void{ var _local1:URLRequest = new URLRequest("http://www.kongregate.com/?gamereferral=dontlookback"); navigateToURL(_local1, "_blank"); } public function visit_sponsor(_arg1:Event):void{ var _local2:URLRequest = new URLRequest("http://www.kongregate.com/?gamereferral=dontlookback"); navigateToURL(_local2, "_blank"); } public function gamelogic(_arg1:KeyPoll, _arg2:dwgraphicsclass, _arg3:mapclass, _arg4:gameclass, _arg5:entityclass, _arg6:helpclass, _arg7:musicclass):void{ _arg6.updateglow(); if (_arg4.footstate == 0){ _arg4.footy = (_arg4.footy - 30); if (_arg4.footy < -100){ _arg4.footstate++; }; } else { if (_arg4.footstate == 1){ _arg4.footy = (_arg4.footy + 30); if (_arg4.footy > 260){ _arg4.footy = 260; _arg4.footstate++; _arg4.foottimer = 10; _arg4.screenshake = 5; _arg4.pixely = (_arg4.pixely - 10); _arg7.playef(1, 10); if (_arg6.inbox((_arg4.pixelx + 3), _arg4.pixely, (_arg4.footx + 15), 0, (_arg4.footwidth - 30), 480)){ _arg4.gamecomplete = 2; _arg7.play(2); gamestate = 1; }; }; } else { if (_arg4.footstate == 2){ _arg4.foottimer--; _arg4.pixely++; if (_arg4.foottimer < 0){ _arg4.pixely = (260 - 7); _arg4.footstate = 0; }; }; }; }; _arg4.bombtime--; if (_arg4.bombtime <= 0){ _arg5.createentity(_arg4.pixelx, _arg4.pixely, 0); _arg4.bombtime = 5; }; if (_arg4.footy > -(_arg4.footheight)){ i = 0; while (i < _arg5.nentity) { if (_arg6.inbox(_arg5.entities[i].xp, _arg5.entities[i].yp, _arg4.footx, (_arg4.footy - _arg4.footheight), _arg4.footwidth, _arg4.footheight)){ _arg5.entities[i].active = false; _arg4.screenshake = 10; _arg4.foothp = (_arg4.foothp - 10); _arg7.playef(0, 10); if (_arg4.foothp <= 0){ _arg4.gamecomplete = 1; _arg7.play(1); gamestate = 1; }; }; i++; }; }; _arg4.updatestate(_arg5, _arg6, _arg7); i = 0; while (i < _arg5.nentity) { _arg5.updateentities(i, _arg6, _arg4, _arg7); _arg5.entities[i].vx = (_arg5.entities[i].vx + _arg5.entities[i].ax); _arg5.entities[i].vy = (_arg5.entities[i].vy + _arg5.entities[i].ay); _arg5.entities[i].ax = 0; if (_arg5.entities[i].jumping){ if (_arg5.entities[i].ay < 0){ _arg5.entities[i].ay++; }; if (_arg5.entities[i].ay > -2){ _arg5.entities[i].ay = 0; }; _arg5.entities[i].jumpframe--; if (_arg5.entities[i].jumpframe <= 0){ _arg5.entities[i].jumping = false; }; } else { if (_arg5.entities[i].gravity){ _arg5.entities[i].ay = 2; }; }; if (_arg5.entities[i].gravity){ _arg5.applyfriction(i, 0.3, 0.5); }; _arg5.entities[i].newxp = int((_arg5.entities[i].xp + _arg5.entities[i].vx)); _arg5.entities[i].newyp = int((_arg5.entities[i].yp + _arg5.entities[i].vy)); if (_arg5.testwallsx(i, _arg5.entities[i].newxp, _arg5.entities[i].yp)){ _arg5.entities[i].xp = _arg5.entities[i].newxp; } else { if (_arg5.entities[i].onwall > 0){ _arg5.entities[i].state = _arg5.entities[i].onwall; }; if (_arg5.entities[i].onxwall > 0){ _arg5.entities[i].state = _arg5.entities[i].onxwall; }; }; if (_arg5.testwallsy(i, _arg5.entities[i].xp, _arg5.entities[i].newyp)){ _arg5.entities[i].yp = _arg5.entities[i].newyp; } else { if (_arg5.entities[i].onwall > 0){ _arg5.entities[i].state = _arg5.entities[i].onwall; }; if (_arg5.entities[i].onywall > 0){ _arg5.entities[i].state = _arg5.entities[i].onywall; }; _arg5.entities[i].jumpframe = 0; }; if (!_arg5.testwallsx(i, _arg5.entities[i].xp, _arg5.entities[i].yp)){ if (_arg5.entities[i].rule == 0){ _arg5.entities[i].yp = (_arg5.entities[i].yp - 3); }; }; _arg5.animateentities(i, _arg6); if (_arg5.entitycollidefloor(i)){ _arg5.entities[i].onground = true; } else { _arg5.entities[i].onground = false; }; i++; }; i = (_arg5.nentity - 1); while ((((i >= 0)) && (!(_arg5.entities[i].active)))) { _arg5.nentity--; i--; }; } public function lockedloop(_arg1:Event):void{ dwgfx.backbuffer.lock(); dwgfx.bprint(5, 110, "Sorry! This game can only by played on", (196 - help.glow), (196 - help.glow), (0xFF - help.glow), true); dwgfx.bprint(5, 120, "www.distractionware.com", (196 - help.glow), (196 - help.glow), (0xFF - help.glow), true); dwgfx.render(); dwgfx.backbuffer.unlock(); help.updateglow(); } public function inboxw(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int):Boolean{ if ((((_arg1 >= _arg3)) && ((_arg1 <= (_arg3 + _arg5))))){ if ((((_arg2 >= _arg4)) && ((_arg2 <= (_arg4 + _arg6))))){ return (true); }; }; return (false); } public function visit_distractionware(_arg1:Event):void{ var _local2:URLRequest = new URLRequest("http://www.distractionware.com"); navigateToURL(_local2, "_blank"); } public function mainloop(_arg1:Event):void{ if (!game.infocus){ if (game.globalsound > 0){ game.globalsound = 0; SoundMixer.soundTransform = new SoundTransform(0); }; music.processmusic(); dwgfx.backbuffer.lock(); dwgfx.bprint(5, 110, "Game paused", (196 - help.glow), (0xFF - help.glow), (196 - help.glow), true); dwgfx.bprint(5, 120, "[click to resume]", (196 - help.glow), (0xFF - help.glow), (196 - help.glow), true); dwgfx.bprint(5, 230, "Press M to mute in game", (164 - help.glow), (196 - help.glow), (164 - help.glow), true); dwgfx.render(); dwgfx.backbuffer.unlock(); help.updateglow(); } else { switch (gamestate){ case TITLEMODE: titlerender(key, dwgfx, map, game, obj, help); titleinput(key, dwgfx, map, game, obj, help, music); titlelogic(key, dwgfx, map, game, obj, help, music); break; case GAMEMODE: gamerender(key, dwgfx, map, game, obj, help); gameinput(key, dwgfx, map, game, obj, help, music); gamelogic(key, dwgfx, map, game, obj, help, music); break; case CLICKTOSTART: dwgfx.backbuffer.lock(); dwgfx.bprint(5, 115, "[Click to start]", (196 - help.glow), (196 - help.glow), (0xFF - help.glow), true); dwgfx.render(); dwgfx.backbuffer.unlock(); help.updateglow(); if (key.click){ gamestate = TITLEMODE; }; break; }; music.processmusic(); if (((key.isDown(77)) && ((game.mutebutton <= 0)))){ game.mutebutton = 8; if (game.muted){ game.muted = false; } else { game.muted = true; }; }; if (game.mutebutton > 0){ game.mutebutton--; }; if (game.muted){ if (game.globalsound == 1){ game.globalsound = 0; SoundMixer.soundTransform = new SoundTransform(0); }; }; if (((!(game.muted)) && ((game.globalsound == 0)))){ game.globalsound = 1; SoundMixer.soundTransform = new SoundTransform(1); }; }; if (key.hasclicked){ key.click = false; }; } public function titlerender(_arg1:KeyPoll, _arg2:dwgraphicsclass, _arg3:mapclass, _arg4:gameclass, _arg5:entityclass, _arg6:helpclass):void{ _arg2.backbuffer.lock(); _arg2.drawimage(_arg4.gamecomplete, 0, 0); _arg2.drawgui(_arg6); if (_arg4.test){ _arg2.print(5, 5, _arg4.teststring, 196, 196, 196, false); }; _arg2.render(); _arg2.backbuffer.unlock(); } } }//package
Section 17
//Main_ef_0 (Main_ef_0) package { import mx.core.*; public class Main_ef_0 extends SoundAsset { } }//package
Section 18
//Main_ef_1 (Main_ef_1) package { import mx.core.*; public class Main_ef_1 extends SoundAsset { } }//package
Section 19
//Main_im_bfont (Main_im_bfont) package { import mx.core.*; public class Main_im_bfont extends BitmapAsset { } }//package
Section 20
//Main_im_bfontmask (Main_im_bfontmask) package { import mx.core.*; public class Main_im_bfontmask extends BitmapAsset { } }//package
Section 21
//Main_im_image0 (Main_im_image0) package { import mx.core.*; public class Main_im_image0 extends BitmapAsset { } }//package
Section 22
//Main_im_image1 (Main_im_image1) package { import mx.core.*; public class Main_im_image1 extends BitmapAsset { } }//package
Section 23
//Main_im_image2 (Main_im_image2) package { import mx.core.*; public class Main_im_image2 extends BitmapAsset { } }//package
Section 24
//Main_im_image3 (Main_im_image3) package { import mx.core.*; public class Main_im_image3 extends BitmapAsset { } }//package
Section 25
//Main_im_image4 (Main_im_image4) package { import mx.core.*; public class Main_im_image4 extends BitmapAsset { } }//package
Section 26
//Main_im_image5 (Main_im_image5) package { import mx.core.*; public class Main_im_image5 extends BitmapAsset { } }//package
Section 27
//Main_im_sprites (Main_im_sprites) package { import mx.core.*; public class Main_im_sprites extends BitmapAsset { } }//package
Section 28
//Main_im_tiles (Main_im_tiles) package { import mx.core.*; public class Main_im_tiles extends BitmapAsset { } }//package
Section 29
//Main_music_0 (Main_music_0) package { import mx.core.*; public class Main_music_0 extends SoundAsset { } }//package
Section 30
//Main_music_1 (Main_music_1) package { import mx.core.*; public class Main_music_1 extends SoundAsset { } }//package
Section 31
//Main_music_2 (Main_music_2) package { import mx.core.*; public class Main_music_2 extends SoundAsset { } }//package
Section 32
//Main_music_3 (Main_music_3) package { import mx.core.*; public class Main_music_3 extends SoundAsset { } }//package
Section 33
//mapclass (mapclass) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.net.*; public class mapclass extends Sprite { public var contents:Array; public var vmult:Array; public var tmap:Array; public var i:int; public var j:int; public var temp2:int; public var background:int; public var temp:int; public function mapclass():void{ contents = new Array(); vmult = new Array(); tmap = new Array(); super(); i = 0; while (i < 15) { vmult.push(int((i * 22))); i++; }; j = 0; while (j < 15) { i = 0; while (i < 22) { contents.push(0); i++; }; j++; }; } public function loadlevel(_arg1:int, _arg2:entityclass):void{ switch (_arg1){ case 0: tmap = new Array(); tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,1,1,1,1,1,1,1"); tmap.push("1,1,1,1,6,2,2,2,2,2,2,2,2,5,1,1,1,1,1,1,1,1"); tmap.push("1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"); tmap.push("1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"); tmap.push("1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"); tmap.push("1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"); tmap.push("1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"); tmap.push("1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"); tmap.push("1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"); tmap.push("1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"); tmap.push("1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"); tmap.push("1,1,1,1,1,1,1,1,1,1,4,2,2,2,2,2,2,2,2,2,2,2"); tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); tmap.push("2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"); fillcontent(tmap); break; }; } public function fillcontent(_arg1:Array):void{ var _local2:Array; j = 0; while (j < 15) { _local2 = new Array(); _local2 = _arg1[j].split(","); i = 0; while (i < 22) { contents[(i + vmult[j])] = _local2[i]; i++; }; j++; }; } public function at(_arg1:int, _arg2:int):int{ if ((((((((_arg1 >= 0)) && ((_arg2 >= 0)))) && ((_arg1 < 22)))) && ((_arg2 < 15)))){ return (contents[(_arg1 + vmult[_arg2])]); }; return (0); } public function collide(_arg1:int, _arg2:int):Boolean{ if (_arg2 == -1){ return (collide(_arg1, (_arg2 + 1))); }; if (_arg2 == 29){ return (collide(_arg1, (_arg2 - 1))); }; if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= 40)))) || ((_arg2 >= 29)))){ return (false); }; if (contents[(_arg1 + vmult[_arg2])] == 1){ return (true); }; if ((((contents[(_arg1 + vmult[_arg2])] >= 80)) && ((contents[(_arg1 + vmult[_arg2])] < 680)))){ return (true); }; return (false); } } }//package
Section 34
//musicclass (musicclass) package { import flash.events.*; import flash.display.*; import flash.media.*; public class musicclass extends Sprite { public var musicchannel:SoundChannel; public var musicstopother:int; public var musicfadein:int; public var currentsong:int; public var efchannel:Array; public var currentmusicchan:int; public var musicchancur:int; public var currentefchan:int; public var musicfade:int; public var efchan:Array; public var musicchan:Array; public var numplays:int; public var musicchannel2:SoundChannel; public var musicchanlen:int; public function musicclass(){ musicchan = new Array(); efchannel = new Array(); efchan = new Array(); super(); } public function loopmusic(_arg1:Event):void{ musicchannel.removeEventListener(Event.SOUND_COMPLETE, loopmusic); if (currentsong > -1){ musicchannel = musicchan[currentsong].play(); musicchannel.addEventListener(Event.SOUND_COMPLETE, loopmusic); }; } public function processmusicfadein():void{ musicfadein--; if (musicfadein > 0){ musicchannel.soundTransform = new SoundTransform(((60 - musicfadein) / 60)); } else { musicchannel.soundTransform = new SoundTransform(1); }; } public function initefchannels():void{ var _local1:int; while (_local1 < 16) { efchannel.push(new SoundChannel()); _local1++; }; } public function playef(_arg1:int, _arg2:int=0):void{ efchannel[currentefchan] = efchan[_arg1].play(_arg2); currentefchan++; if (currentefchan > 15){ currentefchan = (currentefchan - 16); }; } public function processmusic():void{ if (musicfade > 0){ processmusicfade(); }; if (musicfadein > 0){ processmusicfadein(); }; musicstopother--; if (musicstopother == 1){ musicstopother = 0; if (currentmusicchan == 0){ musicchannel2.stop(); }; if (currentmusicchan == 1){ musicchannel.stop(); }; }; if (musicstopother < 0){ musicstopother = 0; }; musicchancur--; if ((((((musicchancur <= 0)) && ((currentsong > -1)))) && ((musicchanlen > 0)))){ musicchancur = musicchanlen; if (currentmusicchan == 0){ musicchannel2 = musicchan[currentsong].play(); musicstopother = 3; currentmusicchan = 1; } else { musicchannel = musicchan[currentsong].play(); musicstopother = 3; currentmusicchan = 0; }; }; } public function fadeout():void{ if (musicfade == 0){ musicfade = 31; }; } public function processmusicfade():void{ musicfade--; if (musicfade > 0){ if (currentmusicchan == 0){ musicchannel.soundTransform = new SoundTransform((musicfade / 30)); }; if (currentmusicchan == 1){ musicchannel2.soundTransform = new SoundTransform((musicfade / 30)); }; } else { if (currentmusicchan == 0){ musicchannel.stop(); }; if (currentmusicchan == 1){ musicchannel2.stop(); }; currentsong = -1; }; } public function stopmusic(_arg1:Event):void{ musicchannel.removeEventListener(Event.SOUND_COMPLETE, stopmusic); musicchannel.stop(); currentsong = -1; } public function play(_arg1:int):void{ if (currentsong != _arg1){ if (currentsong != -1){ currentmusicchan = 0; musicchannel.stop(); musicchannel.removeEventListener(Event.SOUND_COMPLETE, loopmusic); }; if (_arg1 != -1){ currentsong = _arg1; musicchannel = musicchan[currentsong].play(0); musicchannel.addEventListener(Event.SOUND_COMPLETE, loopmusic); } else { currentsong = -1; }; }; } } }//package
Section 35
//Preloader (Preloader) package { import flash.events.*; import flash.display.*; import flash.ui.*; import flash.net.*; import flash.utils.*; public dynamic class Preloader extends MovieClip { private var im_loading:Class; public var showctp:Boolean; public var startgame:Boolean; public var adson:Boolean; public var loading:Bitmap; public function Preloader(){ im_loading = Preloader_im_loading; super(); if (checksite()){ adson = false; } else { adson = true; }; adson = false; var _local1:ContextMenu = new ContextMenu(); var _local2:ContextMenuItem = new ContextMenuItem("Visit distractionware.com"); var _local3:ContextMenuItem = new ContextMenuItem("Visit kongregate.com"); _local2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, visit_distractionware); _local3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, visit_sponsor); _local3.separatorBefore = false; _local1.hideBuiltInItems(); _local1.customItems.push(_local2); _local1.customItems.push(_local3); this.contextMenu = _local1; addEventListener(Event.ENTER_FRAME, checkFrame); if (!adson){ loading = new im_loading(); loading.x = (320 - (loading.width / 2)); loading.y = 316; addChild(loading); }; showctp = false; startgame = false; } private function checkFrame(_arg1:Event):void{ var _local3:int; var _local2:Number = (this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal); if (!adson){ graphics.clear(); graphics.beginFill(0); graphics.drawRect(0, 0, 640, 480); graphics.endFill(); graphics.beginFill(13039728); graphics.drawRect(120, 279, 400, 18); graphics.endFill(); }; if (_local2 < 1){ if (!adson){ graphics.beginFill(0); _local3 = int(Math.round((_local2 * 391))); graphics.drawRect((125 + _local3), 283, (391 - _local3), 10); graphics.endFill(); }; } else { if (!showctp){ showctp = true; startgame = true; }; }; if (currentFrame == totalFrames){ if (startgame){ startup(); }; }; } public function visit_sponsor(_arg1:Event):void{ var _local2:URLRequest = new URLRequest("http://www.kongregate.com/?gamereferral=dontlookback"); navigateToURL(_local2, "_blank"); } public function visit_distractionware(_arg1:Event):void{ var _local2:URLRequest = new URLRequest("http://www.distractionware.com"); navigateToURL(_local2, "_blank"); } public function checksite():Boolean{ var _local1:String = stage.loaderInfo.url.toLowerCase(); if ((((((((_local1.indexOf("distractionware.com") <= 0)) && ((_local1.indexOf("flashgamelicense.com") <= 0)))) && ((_local1.indexOf("kongregate.com") <= 0)))) && ((_local1.indexOf("chat.kongregate.com") <= 0)))){ return (false); }; return (true); } private function startup():void{ removeEventListener(Event.ENTER_FRAME, checkFrame); var _local1:Class = (getDefinitionByName("Main") as Class); addChild((new (_local1) as DisplayObject)); } } }//package
Section 36
//Preloader_im_loading (Preloader_im_loading) package { import mx.core.*; public class Preloader_im_loading extends BitmapAsset { } }//package
Section 37
//textboxclass (textboxclass) package { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.net.*; public class textboxclass extends Sprite { public var tr:int; public var active:Boolean; public var ismenu:Boolean; public var lw:int; public var textrect:Rectangle; public var yp:int; public var iter:int; public var numlines:int; public var timer:int; public var highlighted:int; public var boxname:String; public var b:int; public var g:int; public var h:int; public var max:int; public var r:int; public var tg:int; public var line:Array; public var tb:int; public var tl:Number; public var tm:int; public var w:int; public var xp:int; public function textboxclass():void{ line = new Array(); super(); firstcreate(); } public function remove():void{ tm = 2; tl = 1; } public function addline(_arg1:String):void{ line[numlines] = _arg1; numlines++; resize(); if (numlines >= 10){ numlines = 0; }; } public function firstcreate():void{ var _local1:String; iter = 0; while (iter < 10) { _local1 = new String(); _local1 = ""; line.push(_local1); iter++; }; x = 0; y = 0; w = 0; h = 0; numlines = 0; lw = 0; tl = 0; tm = 0; active = false; timer = 0; ismenu = false; boxname = "textbox"; highlighted = 1; } public function resize():void{ max = 0; iter = 0; while (iter < numlines) { if (line[iter].length > max){ max = line[iter].length; }; iter++; }; lw = max; w = ((max + 2) * 6); h = ((numlines + 2) * 8); textrect.x = xp; textrect.y = yp; textrect.width = w; textrect.height = h; } public function centerx():void{ resize(); xp = (160 - (w / 2)); resize(); } public function centery():void{ resize(); yp = (120 - (h / 2)); resize(); } public function update():void{ if (tm == 0){ tl = (tl + 0.1); if (tl >= 1){ tl = 1; tm = 1; }; setcol(int((tr * tl)), int((tg * tl)), int((tb * tl))); } else { if (tm == 2){ tl = (tl - 0.1); if (tl <= 0.5){ tl = 0.5; active = false; }; setcol(int((tr * tl)), int((tg * tl)), int((tb * tl))); }; }; if (timer > 0){ timer--; if (timer == 0){ tm = 2; }; }; } public function clear():void{ iter = 0; while (iter < 10) { line[iter] = ""; iter++; }; textrect = new Rectangle(); xp = 0; yp = 0; w = 0; h = 0; numlines = 1; lw = 0; tl = 0; tm = 0; active = true; timer = 0; } public function setcol(_arg1:int, _arg2:int, _arg3:int):void{ r = _arg1; g = _arg2; b = _arg3; } public function initcol(_arg1:int, _arg2:int, _arg3:int):void{ tr = _arg1; tg = _arg2; tb = _arg3; r = 0; g = 0; b = 0; tl = 0.5; } } }//package

Library Items

Symbol 1 Bitmap {Preloader_im_loading}
Symbol 2 Sound {Main_ef_1} [Main_ef_1]
Symbol 3 Sound {Main_ef_0} [Main_ef_0]
Symbol 4 Sound {Main_music_0} [Main_music_0]
Symbol 5 Sound {Main_music_1} [Main_music_1]
Symbol 6 Sound {Main_music_2} [Main_music_2]
Symbol 7 Sound {Main_music_3} [Main_music_3]
Symbol 8 Bitmap {Main_im_image2}
Symbol 9 Bitmap {Main_im_image3}
Symbol 10 Bitmap {Main_im_image4}
Symbol 11 Bitmap {Main_im_image5}
Symbol 12 Bitmap {Main_im_bfont}
Symbol 13 Bitmap {Main_im_sprites}
Symbol 14 Bitmap {Main_im_image0}
Symbol 15 Bitmap {Main_im_image1}
Symbol 16 Bitmap {Main_im_tiles}
Symbol 17 Bitmap {Main_im_bfontmask}

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 2Symbol 2 as "Main_ef_1"
ExportAssets (56)Timeline Frame 2Symbol 3 as "Main_ef_0"
ExportAssets (56)Timeline Frame 2Symbol 4 as "Main_music_0"
ExportAssets (56)Timeline Frame 2Symbol 5 as "Main_music_1"
ExportAssets (56)Timeline Frame 2Symbol 6 as "Main_music_2"
ExportAssets (56)Timeline Frame 2Symbol 7 as "Main_music_3"
SerialNumber (41)Timeline Frame 126 bytes "..........7$.......dž.'..."

Labels

"Preloader"Frame 1
"start"Frame 2




http://swfchan.com/27/132008/info.shtml
Created: 20/2 -2019 07:00:52 Last modified: 20/2 -2019 07:00:52 Server time: 14/11 -2024 22:51:12