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

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

Ball Drop one.swf

This is the info page for
Flash #54060

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


ActionScript [AS3]
Section 1
//MochiScores (mochi.MochiScores) package mochi { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var options = _arg1; if (options != null){ if (options.clip != null){ if ((options.clip is Sprite)){ MochiServices.setContainer(options.clip); }; delete options.clip; } else { MochiServices.setContainer(); }; MochiServices.stayOnTop(); if (options.name != null){ if ((options.name is TextField)){ if (options.name.text.length > 0){ options.name = options.name.text; }; }; }; if (options.score != null){ if ((options.score is TextField)){ if (options.score.text.length > 0){ options.score = options.score.text; }; }; }; if (options.onDisplay != null){ options.onDisplay(); } else { if (MochiServices.clip != null){ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; }; } else { options = {}; if ((MochiServices.clip is MovieClip)){ MochiServices.clip.stop(); } else { trace("Warning: Container is not a MovieClip, cannot call default onDisplay."); }; }; if (options.onClose != null){ onCloseHandler = options.onClose; } else { onCloseHandler = function ():void{ if ((MochiServices.clip is MovieClip)){ MochiServices.clip.play(); } else { trace("Warning: Container is not a MovieClip, cannot call default onClose."); }; }; }; if (options.onError != null){ onErrorHandler = options.onError; } else { onErrorHandler = null; }; if (options.boardID == null){ if (MochiScores.boardID != null){ options.boardID = MochiScores.boardID; }; }; MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose); } public static function closeLeaderboard():void{ MochiServices.send("scores_closeLeaderboard"); } public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2); } public static function requestList(_arg1:Object, _arg2:Object=null):void{ MochiServices.send("scores_requestList", null, _arg1, _arg2); } public static function scoresArrayToObjects(_arg1:Object):Object{ var _local2:Object; var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; var _local7:String; var _local8:String; _local2 = {}; for (_local7 in _arg1) { if (typeof(_arg1[_local7]) == "object"){ if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){ _local2[_local7] = []; _local5 = _arg1[_local7]; _local4 = 0; while (_local4 < _local5.rows.length) { _local6 = {}; _local3 = 0; while (_local3 < _local5.cols.length) { _local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3]; _local3++; }; _local2[_local7].push(_local6); _local4++; }; } else { _local2[_local7] = {}; for (_local8 in _arg1[_local7]) { _local2[_local7][_local8] = _arg1[_local7][_local8]; }; }; } else { _local2[_local7] = _arg1[_local7]; }; }; return (_local2); } public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{ MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4); } public static function onClose(_arg1:Object=null):void{ if (_arg1 != null){ if (_arg1.error != null){ if (_arg1.error == true){ if (onErrorHandler != null){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; }; }; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiScores.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi
Section 2
//MochiServices (mochi.MochiServices) package mochi { import flash.events.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; private static var _sendChannel:LocalConnection; private static var _rcvChannelName:String; private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; private static var _timer:Timer; private static var _sendChannelName:String; private static var _startTime:Number; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__mochiservices"; private static var _rcvChannel:LocalConnection; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ onError("NotConnected"); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _clip._nextcallbackID++; }; }; } public static function get connected():Boolean{ return (_connected); } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (_clip != null){ if (_clip._queue != null){ while (_clip._queue.length > 0) { _local2 = _clip._queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _clip._callbacks[_local2.callbackID]; }; delete _clip._callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; }; } private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{ var _local3:Array; var _local4:int; var _local5:Array; var _local6:Array; var _local7:MovieClip; var _local8:LocalConnection; var _local9:String; var _local10:ByteArray; var _local11:ByteArray; var _local12:uint; var _local13:uint; var _local14:Loader; _local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23]; _local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3]; _local6 = [0, 64, 0, 0, 0]; _local7 = new MovieClip(); _local8 = new LocalConnection(); _local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime())); _local8 = new LocalConnection(); _local7.lc = _local8; _local7.click = _arg2; _local8.client = _local7; _local8.connect(_local9); _local10 = new ByteArray(); _local11 = new ByteArray(); _local11.endian = Endian.LITTLE_ENDIAN; _local11.writeShort(1); _local11.writeUTFBytes(((_arg1 + " ") + _local9)); _local11.writeByte(0); _local12 = ((_local3.length + _local11.length) + 4); _local13 = (_local12 + 35); _local10.endian = Endian.LITTLE_ENDIAN; _local10.writeUTFBytes("FWS"); _local10.writeByte(8); _local10.writeUnsignedInt(_local13); for each (_local4 in _local5) { _local10.writeByte(_local4); }; _local10.writeUnsignedInt(_local12); _local10.writeByte(136); _local10.writeShort(_local11.length); _local10.writeBytes(_local11); for each (_local4 in _local3) { _local10.writeByte(_local4); }; for each (_local4 in _local6) { _local10.writeByte(_local4); }; _local14 = new Loader(); _local14.loadBytes(_local10); _local7.addChild(_local14); return (_local7); } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } public static function get id():String{ return (_id); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{ var netup:Boolean; var vars:Object; var s:String; var i:Number; var x:String; var req:URLRequest; var loader:Loader; var err:Function; var complete:Function; var setURL:Function; var url = _arg1; var burl = _arg2; var btn = _arg3; var onClick = _arg4; vars = new Object(); vars["mav"] = getVersion(); vars["swfv"] = "9"; vars["swfurl"] = btn.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); s = "?"; i = 0; for (x in vars) { if (i != 0){ s = (s + "&"); }; i = (i + 1); s = (((s + x) + "=") + escape(vars[x])); }; req = new URLRequest("http://x.mochiads.com/linkping.swf"); loader = new Loader(); err = function (_arg1:Object):void{ netup = false; _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; complete = function (_arg1:Object):void{ netup = true; _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); setURL = function ():void{ var _local1:String; var _local2:DisplayObject; if (netup){ _local1 = (url + s); } else { _local1 = burl; }; _local2 = clickMovie(_local1, onClick); btn.addChild(_local2); _local2.scaleX = (0.01 * btn.width); _local2.scaleY = (0.01 * btn.height); }; setTimeout(setURL, 1500); } public static function getVersion():String{ return ("1.35"); } public static function disconnect():void{ if (((_connected) || (_connecting))){ if (_clip != null){ if (_clip.parent != null){ if ((_clip.parent is Sprite)){ Sprite(_clip.parent).removeChild(_clip); _clip = null; }; }; }; _connecting = (_connected = false); flush(true); try { _listenChannel.close(); _rcvChannel.close(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; Security.allowDomain("*"); Security.allowInsecureDomain("*"); if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; return (_local2); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); if (_clip.parent != null){ Sprite(_clip.parent).removeChild(_clip); }; } public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{ if (_arg1 != null){ if ((_arg1 is Sprite)){ _container = _arg1; }; }; if (_arg2){ if ((_container is Sprite)){ Sprite(_container).addChild(_clip); }; }; } private static function onStatus(_arg1:StatusEvent):void{ switch (_arg1.level){ case "error": _connected = false; _listenChannel.connect(_listenChannelName); break; }; } private static function initComChannels():void{ if (!_connected){ _sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _rcvChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus); _clip.onReceive = function (_arg1:Object):void{ var cb:String; var cblst:Object; var method:*; var methodName:String; var obj:Object; var pkg = _arg1; cb = pkg.callbackID; cblst = this.client._callbacks[cb]; if (!cblst){ return; }; method = cblst.callbackMethod; methodName = ""; obj = cblst.callbackObject; if (((obj) && ((typeof(method) == "string")))){ methodName = method; if (obj[method] != null){ method = obj[method]; } else { trace((("Error: Method " + method) + " does not exist.")); }; }; if (method != undefined){ try { method.apply(obj, pkg.args); } catch(error:Error) { trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString())); }; } else { if (obj != null){ try { obj(pkg.args); } catch(error:Error) { trace(("Error invoking method on object: " + error.toString())); }; }; }; delete this.client._callbacks[cb]; }; _clip.onError = function ():void{ MochiServices.onError("IOError"); }; _rcvChannel.connect(_rcvChannelName); trace("connected!"); _connecting = false; _connected = true; _listenChannel.close(); while (_clip._queue.length > 0) { _sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift()); }; }; } private static function listen():void{ _listenChannel = new LocalConnection(); _listenChannel.client = _clip; _clip.handshake = function (_arg1:Object):void{ MochiServices.comChannelName = _arg1.newChannel; }; _listenChannel.allowDomain("*", "localhost"); _listenChannel.allowInsecureDomain("*", "localhost"); _listenChannel.connect(_listenChannelName); trace("Waiting for MochiAds services to connect..."); } private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{ var args = _arg1; var callbackObject = _arg2; var callbackMethod = _arg3; if (args != null){ if (args.onError != null){ args.onError.apply(null, ["NotConnected"]); }; if (((!((args.options == null))) && (!((args.options.onError == null))))){ args.options.onError.apply(null, ["NotConnected"]); }; }; if (callbackMethod != null){ args = {}; args.error = true; args.errorCode = "NotConnected"; if (((!((callbackObject == null))) && ((callbackMethod is String)))){ try { var _local5 = callbackObject; _local5[callbackMethod](args); } catch(error:Error) { }; } else { if (callbackMethod != null){ try { callbackMethod.apply(args); } catch(error:Error) { }; }; }; }; } public static function get clip():Object{ return (_container); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); _rcvChannelName = _arg1; initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var clipname:String; var f:Function; var req:URLRequest; var id = _arg1; var clip = _arg2; clipname = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; MochiServices.allowDomains(_gatewayURL); _clip = createEmptyMovieClip(clip, clipname, 10336, false); _loader = new Loader(); _timer = new Timer(1000, 0); _startTime = getTimer(); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); f = function (_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); req = new URLRequest(_gatewayURL); _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _rcvChannel = new LocalConnection(); _rcvChannel.allowDomain("*", "localhost"); _rcvChannel.allowInsecureDomain("*", "localhost"); _rcvChannel.client = _clip; _clip._nextcallbackID = 0; _clip._callbacks = {}; listen(); return (_clip); } public static function bringToTop(_arg1:Event):void{ var e = _arg1; if (MochiServices.clip != null){ if (MochiServices.childClip != null){ try { if (MochiServices.clip.numChildren > 1){ MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); }; }; }; } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; if ((clip is DisplayObject)){ if (((!(_connected)) && ((_clip == null)))){ trace("MochiServices Connecting..."); _connecting = true; init(id, clip); }; } else { trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage."); }; if (onError != null){ MochiServices.onError = onError; } else { if (MochiServices.onError == null){ MochiServices.onError = function (_arg1:String):void{ trace(_arg1); }; }; }; } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{ var mc:MovieClip; var parent = _arg1; var name = _arg2; var depth = _arg3; var doAdd = _arg4; mc = new MovieClip(); if (doAdd){ if (((false) && (depth))){ parent.addChildAt(mc, depth); } else { parent.addChild(mc); }; }; try { parent[name] = mc; } catch(e:Error) { throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; mc["_name"] = name; return (mc); } public static function connectWait(_arg1:TimerEvent):void{ if ((getTimer() - _startTime) > 10000){ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _timer.stop(); }; } } }//package mochi
Section 3
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "2.0.0.0"; 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 4
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "2.0.0.0"; 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 5
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "2.0.0.0"; } }//package mx.core
Section 6
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 7
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.events.*; import flash.display.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get name():String; function set width(_arg1:Number):void; function get measuredHeight():Number; function set height(_arg1:Number):void; function get scaleY():Number; function move(_arg1:Number, _arg2:Number):void; function get scaleX():Number; function set mask(_arg1:DisplayObject):void; function set scaleX(_arg1:Number):void; function set name(_arg1:String):void; function set scaleY(_arg1:Number):void; function get visible():Boolean; function get measuredWidth():Number; function set visible(_arg1:Boolean):void; function get alpha():Number; function get height():Number; function get width():Number; function get parent():DisplayObjectContainer; function get mask():DisplayObject; function set x(_arg1:Number):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set y(_arg1:Number):void; function get x():Number; function get y():Number; function set alpha(_arg1:Number):void; } }//package mx.core
Section 8
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function set instanceIndices(_arg1:Array):void; function get isDocument():Boolean; function get repeaters():Array; function get instanceIndices():Array; function set repeaters(_arg1:Array):void; function initializeRepeaterArrays(_arg1:IRepeaterClient):void; function set repeaterIndices(_arg1:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 9
//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 10
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "2.0.0.0"; } }//package mx.core
Section 11
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import flash.utils.*; import mx.core.*; public class NameUtil { mx_internal static const VERSION:String = "2.0.0.0"; private static var counter:int = 0; public static function displayObjectToString(_arg1:DisplayObject):String{ var _local2:String; var _local3:DisplayObject; var _local4:String; var _local5:Array; _local3 = _arg1; while (_local3 != null) { if (((((_local3.parent) && (_local3.stage))) && ((_local3.parent == _local3.stage)))){ break; }; _local4 = _local3.name; if ((_local3 is IRepeaterClient)){ _local5 = IRepeaterClient(_local3).instanceIndices; if (_local5){ _local4 = (_local4 + (("[" + _local5.join("][")) + "]")); }; }; _local2 = ((_local2 == null)) ? _local4 : ((_local4 + ".") + _local2); _local3 = _local3.parent; }; return (_local2); } public static function createUniqueName(_arg1:Object):String{ var _local2:String; var _local3:int; var _local4:int; if (!_arg1){ return (null); }; _local2 = getQualifiedClassName(_arg1); _local3 = _local2.indexOf("::"); if (_local3 != -1){ _local2 = _local2.substr((_local3 + 2)); }; _local4 = _local2.charCodeAt((_local2.length - 1)); if ((((_local4 >= 48)) && ((_local4 <= 57)))){ _local2 = (_local2 + "_"); }; return ((_local2 + counter++)); } } }//package mx.utils
Section 12
//Ball (Ball) package { import flash.display.*; public class Ball extends Sprite { public var _classSpecial:Class; public var _bitmapShowIterations:int; public var _y:Number; public var _speedX:Number; public var _speedY:Number; public var _type:int; public var _classWater:Class; public var _maxHeight:int; public var _animationCounter:int; public var _height:Number; public var _maxBoostedTimer:int; public var _bitmap:Bitmap;// = null public var _iterationNumber:int; public var _boostHit:Boolean; public var _classSkull:Class; public var _color:int; public var _classMystery:Class; public var _boostCounter:Number; public var _explodeTimer:int; public var _width:Number; public var _classElTopo:Class; public var _touched:int; public var _radiusMin:Number; public var _clicked:Boolean; private var _animationDirection:Boolean; public var _shrinkTimer:Number; public var _classX2:Class; public var _classX3:Class; public var _classTTursas:Class; public var _classKey:Class; public var _extraSprite:Sprite;// = null public var _freeFall:Boolean; private var toDeg:Number;// = 57.2957795130823 public var _state:int; public var _animationVariable:Number; public var _explode:Boolean; public var _radius:Number; public var _extraSprite2:Sprite;// = null public var _startRadius:Number; public var _radiusMax:Number; public var _x:Number; public static const BALL_SHRINK_TIME:Array = [-1, 10, -1, 2000, -1, 10, 10, -1, 10, -1, -1, -1, -1, -1, 10, 10, 10, 10, 10, -1, -1, -1, -1, -1, -1]; public static const BALL_TYPE_WHITE:int = 2; public static const BALL_TYPE_DEAD:int = 0; public static const BALL_STATE_SHRINKING:int = 3; public static const BALL_TYPE_GRAY:int = 4; public static const BALL_TYPE_BOX_TOUGH:int = 20; public static const BALL_BOUNCE_MULTIPLIER:Array = [0, 1, 1, 1, 1, 1, 1, 2.5, 1, 2, 1.8, 0, 1, 1, 1.5, 1.5, 1, 1, 3, 0, 1.5, 1.2, 1.6, 1.5, 3]; public static const BALL_TYPE_PINK:int = 9; public static const BALL_TYPE_GHOST_HIDDEN:int = 11; public static const BALL_STATE_IDLE:int = 1; public static const BALL_TYPE_RED:int = 5; public static const BALL_SHRINK_SPEED:Array = [0.005, 0.01, 0.005, 0.005, 0.005, 0.02, 0.015, 0.001, 0.02, 0.001, 0.001, 0.001, 0.001, 0.001, 0.02, 0.02, 0.02, 0.02, 0.02, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001]; public static const BALL_STATE_DEAD:int = 0; public static const BALL_TYPE_X2:int = 14; public static const BALL_TYPE_X3:int = 15; public static const BALL_STATE_GROWING:int = 2; public static const BALL_TYPE_TTURSAS:int = 13; public static const BALL_TYPE_RAY:int = 24; public static const BALL_TYPE_PLAYER:int = 1; public static const BALL_TYPE_ANTIGRAVITY:int = 17; public static const BALL_TYPE_BOX_GLASS:int = 21; public static const BALL_TYPE_ELTOPO:int = 12; public static const BALL_TYPE_COLORS:Array = [0, 0, 0xFFFFFF, 16769595, 0xBBBBBB, 16724787, 8934024, 0x8800, 4744102, 16763388, 13363199, 13363199, 0x555555, 0xFFFFFF, 14459040, 16744709, 7763776, 3823981, 0x990000, 9281473, 8755386, 15257599, 0xBD7800, 3707873, 8376191]; public static const BALL_TYPE_YELLOW:int = 3; private static const BALL_TYPE_INFO_TEXTS:Array = ["ERROR!", null, "WHITE BALL TURNS TO GRAY", "YELLOW BALL SHRINKS AWAY AFTER A WHILE", "CLICK ON A GRAY BALL TO MAKE IT EXPLODE (COSTS 15PTS)", "SKULL BALL KILLS YOU (CLICK TO DESTROY, COSTS 300PTS)", "VIOLET BALL IS VERY BEAUTIFUL", "GREEN BALL BOUNCES A LOT", "BLUE BALL JUST EXPLODES", "HITTING A BOOSTED PINK BALL MAKES IT GO BANG", "MYSTERY BALL MAKES WEIRD NOISES", "IT'S A . . . MYSTERY BALL?", "EL TOPO KICKS THE BALL UPWARDS", "HIT TTURSAS AND YOU CAN DROP ANOTHER BALL", "HIT THIS AND DOUBLE YOUR SCORE!", "HIT THIS AND TRIPLE YOUR SCORE!", "GRAVITY BALL ATTRACTS AND EXPLODES", "ANTI-GRAVITY BALL REPELS AND EXPLODES", "HIT ALL THESE AND SOMETHING NICE WILL HAPPEN", null, "THIS BOX IS UNBREAKABLE", "THIS BOX IS MADE OF GLASS", "HIT ALL KEY BALLS AND THEY WILL EXPLODE", "RAIN BALL BECOMES SMALLER AFTER EVERY HIT", "CACTUS BALL HAS THORNS"]; public static const BALL_TYPE_SPECIAL:int = 18; public static const BALL_TYPE_GREEN:int = 7; public static const BALL_SCORE:Array = [0, 0, 10, 2, 0, 0, 25, 4, 10, 5, 5, 0, 5, 0, 0, 0, 3, 40, 50, 0, 1, 1, 10, 6, 3]; public static const BALL_TYPE_GRAVITY:int = 16; public static const BALL_TYPE_GHOST:int = 10; public static const BALL_TYPE_VIOLET:int = 6; public static const BALL_TYPE_WATER:int = 23; public static const BALL_TYPE_DESTROYED:int = 19; public static const BALL_TYPE_KEY:int = 22; public static const BALL_TYPE_BLUE:int = 8; public static var _outlineExtra:Number = 1; public function Ball(_arg1:int, _arg2:Number, _arg3:BallDropOne){ _classElTopo = Ball__classElTopo; _classTTursas = Ball__classTTursas; _classX2 = Ball__classX2; _classX3 = Ball__classX3; _classSkull = Ball__classSkull; _classMystery = Ball__classMystery; _classWater = Ball__classWater; _classSpecial = Ball__classSpecial; _classKey = Ball__classKey; _bitmap = null; _extraSprite = null; _extraSprite2 = null; toDeg = (180 / Math.PI); super(); resetVariables(_arg1, _arg2); resize(_radius, _arg3); setPosition(_x, _y); } public function removeChildAddChild(_arg1:BallDropOne):void{ if (_extraSprite != null){ _arg1.removeChild(_extraSprite); _arg1.addChild(_extraSprite); }; if (_extraSprite2 != null){ _arg1.removeChild(_extraSprite2); _arg1.addChild(_extraSprite2); }; _arg1.removeChild(this); _arg1.addChild(this); if (_bitmap != null){ _arg1.removeChild(_bitmap); _arg1.addChild(_bitmap); }; } public function useDNA(_arg1:BallDNA, _arg2:BallDropOne):void{ resetVariables(_arg1._type, _arg1._radius); _width = _arg1._width; _height = _arg1._height; resize(_radius, _arg2); setPosition(_arg1._x, _arg1._y); } public function setAlpha(_arg1:Number):void{ alpha = _arg1; if (_bitmap != null){ _bitmap.alpha = _arg1; }; } public function resize(_arg1:Number, _arg2:BallDropOne):void{ _radius = _arg1; _radiusMin = _arg1; _radiusMax = (_arg1 * 1.1); resetGraphics(_arg2); } public function getTypeInfoText(_arg1:BallDropOne, _arg2:Number, _arg3:Number):String{ if (_type != BALL_TYPE_PLAYER){ return (Ball.BALL_TYPE_INFO_TEXTS[_type]); }; if (_arg1._gameMode == BallDropOne.GAME_MODE_LEVEL_EDITOR){ return ("HIT THIS AND IT WILL ALSO START BOUNCING"); }; if (_startRadius < _arg2){ return ("HIT THIS AND YOU CAN DEPLOY SMALLER BALLS"); }; if (_startRadius > _arg3){ return ("HIT THIS AND YOU CAN DEPLOY LARGER BALLS"); }; return ("HIT THIS AND IT WILL ALSO START BOUNCING"); } public function getParticleColor():int{ if (_type == BALL_TYPE_RAY){ if (_touched > 0){ return (getModifiedColor(_color, 5)); }; return (getModifiedColor(_color, 6)); } else { if (_type == BALL_TYPE_GRAY){ return (0x444444); }; }; if (((_boostHit) && ((_type == BALL_TYPE_PINK)))){ return (getModifiedColor(_color, 13)); }; if (_touched > 0){ return (getModifiedColor(_color, 9.5)); }; return (_color); } public function animate(_arg1:BallDropOne, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Boolean; var _local7:Number; _local3 = (_arg2 / 17); _animationCounter++; if ((((_type == BALL_TYPE_GRAVITY)) || ((_type == BALL_TYPE_ANTIGRAVITY)))){ if ((_animationCounter * 0.25) > _radius){ _animationCounter = 0; }; resetGraphics(_arg1); }; if (_type == BALL_TYPE_GHOST){ _local4 = (_radius / _startRadius); if (_local4 > 1){ _local4 = (1 + ((_local4 - 1) * 7)); } else { if (_local4 < 1){ _local4 = (1 - ((1 - _local4) * 7)); }; }; _bitmap.scaleX = ((_startRadius / 20) * _local4); _bitmap.scaleY = _bitmap.scaleX; _local5 = _bitmap.rotation; _bitmap.rotation = 0; rot(_bitmap, _x, _y, ((_radius * 0.007) * _local3), (-(_bitmap.width) * 0.5), (-(_bitmap.height) * 0.5), _local5); } else { if ((((_type == BALL_TYPE_RED)) && (!((_bitmap == null))))){ if (_animationDirection){ _bitmap.scaleX = (_bitmap.scaleX - (0.005 * _local3)); _bitmap.scaleY = (_bitmap.scaleY - (0.005 * _local3)); if (_bitmap.scaleX < ((_radius / 20) * 0.9)){ _animationDirection = false; }; } else { _bitmap.scaleX = (_bitmap.scaleX + (0.005 * _local3)); _bitmap.scaleY = (_bitmap.scaleY + (0.005 * _local3)); if (_bitmap.scaleX > ((_radius / 20) * 1.1)){ _animationDirection = true; }; }; _bitmap.x = (_x - (_bitmap.width * 0.5)); _bitmap.y = (_y - (_bitmap.height * 0.5)); } else { if (_type == BALL_TYPE_RAY){ _local6 = false; if (_animationCounter < 0){ if (_animationVariable < 4){ _animationVariable = (_animationVariable + (0.4 * _local3)); if (_animationVariable > 4){ _animationVariable = 4; }; _local6 = true; }; } else { if (_animationVariable > 0){ _animationVariable = (_animationVariable - (0.4 * _local3)); if (_animationVariable < 0){ _animationVariable = 0; }; _local6 = true; }; }; _local7 = 1; if (_animationVariable > 0){ _local7 = 1.8; }; _extraSprite.rotation = (_extraSprite.rotation - ((1.4 * _local7) * _local3)); _extraSprite2.rotation = (_extraSprite2.rotation + ((0.2 * _local7) * _local3)); if (_local6){ resetGraphics(_arg1); }; }; }; }; if (_bitmapShowIterations > 0){ _bitmapShowIterations--; if (_bitmap != null){ if (_bitmapShowIterations == 0){ _bitmap.visible = false; } else { _bitmap.visible = true; }; }; }; } public function live(_arg1:BallDropOne):void{ var _local2:int; var _local3:Bitmap; var _local4:Particle; if ((((_state == BALL_STATE_DEAD)) || ((_type == BALL_TYPE_DEAD)))){ return; }; if (_explodeTimer > 0){ _explodeTimer--; if (_explodeTimer == 0){ _explode = true; }; }; if (_explode){ _explode = false; _local2 = _type; _local3 = _bitmap; _arg1.placeBallBehind(this); destroy(this, true, _arg1, false); _state = Ball.BALL_STATE_IDLE; if (((((((_arg1.isBallContained(this)) || ((_local2 == BALL_TYPE_BOX_GLASS)))) || ((_local2 == BALL_TYPE_BOX_TOUGH)))) || ((_local2 == BALL_TYPE_RED)))){ _type = Ball.BALL_TYPE_DEAD; } else { _type = Ball.BALL_TYPE_DESTROYED; _shrinkTimer = 0.001; }; if (_local2 == BALL_TYPE_RED){ _bitmap = _local3; _arg1.addChild(_bitmap); _arg1.addBitmapFadeParticleFromBall(this, 0.015); } else { if (_local2 == BALL_TYPE_SPECIAL){ _bitmap = _local3; _arg1.addChild(_bitmap); _arg1.addBitmapFadeParticleFromBall(this, 0.01); }; }; resetGraphics(_arg1); _arg1.gameTestForSpecialBonuses(); return; }; if (_maxBoostedTimer > 0){ liveBoostedTimer(_arg1); }; if (_type == BALL_TYPE_WATER){ if ((((Math.random() < 0.001)) && (!((_arg1._inGameMode == BallDropOne.INGAME_MODE_FADE_OUT))))){ _local4 = _arg1._particleManager.addParticle(_arg1, Particle.PARTICLE_TYPE_SMOKE, _x, (_y + _radius), getModifiedColor(BALL_TYPE_COLORS[_type], 9)); if (_local4 != null){ _local4._speedX = 0; _local4._speedY = 0; _local4._life = (_local4._life + ExtraMath.random(0, 300)); _local4.launch(); }; }; }; switch (_state){ case BALL_STATE_IDLE: if (_shrinkTimer > 0){ _shrinkTimer = (_shrinkTimer - BallDropOne.DELTATIME); if (_shrinkTimer < 0){ _shrinkTimer = 0; }; }; if (_shrinkTimer == 0){ _radius = (_radius - BALL_SHRINK_SPEED[_type]); if (_radius <= 0){ _type = BALL_TYPE_DEAD; _state = BALL_STATE_DEAD; visible = false; } else { resize(_radius, _arg1); }; }; break; case BALL_STATE_GROWING: if (_shrinkTimer < 0){ _shrinkTimer = BALL_SHRINK_TIME[_type]; if (_type == BALL_TYPE_WATER){ _radiusMin = (_radiusMin - 1); _radiusMax = (_radiusMax - 1); if (_radiusMin <= 5){ _explodeTimer = 2; }; }; }; if (_radius < _radiusMax){ _radius = (_radius + 0.08); }; if (_radius >= _radiusMax){ _radius = _radiusMax; _state = BALL_STATE_SHRINKING; }; scaleBitmap(); resetGraphics(_arg1); break; case BALL_STATE_SHRINKING: if (_radius > _radiusMin){ _radius = (_radius - 0.04); }; if (_radius <= _radiusMin){ _radius = _radiusMin; _state = BALL_STATE_IDLE; }; scaleBitmap(); resetGraphics(_arg1); break; }; } private function resetVariables(_arg1:int, _arg2:Number):void{ _x = 0; _y = 0; _width = 5; _height = 5; _speedX = 0; _speedY = 0; _radius = _arg2; _startRadius = _arg2; _shrinkTimer = -1; _freeFall = false; if (_arg1 == BALL_TYPE_PLAYER){ _touched = 970; } else { _touched = 0; }; _explode = false; _clicked = false; _explodeTimer = -1; _iterationNumber = -1; _state = BALL_STATE_IDLE; _type = _arg1; _bitmap = null; _extraSprite = null; _extraSprite2 = null; _bitmapShowIterations = 0; _animationCounter = 0; _animationVariable = 0; _boostCounter = 0; _boostHit = false; _maxBoostedTimer = 0; _maxHeight = 0; if (ExtraMath.random(0, 1) < 0.5){ _animationDirection = false; } else { _animationDirection = true; }; } public function resetGraphics(_arg1:BallDropOne):void{ var _local2:Number; var _local3:int; var _local4:int; graphics.clear(); if (_type == BALL_TYPE_DEAD){ return; }; if (_boostCounter > 0){ graphics.lineStyle(); if (_boostCounter < 2){ graphics.beginFill(2637933, 1); } else { graphics.beginFill(0xFFFFFF, 1); }; graphics.drawCircle(0, 0, (((_radius + _boostCounter) + (_outlineExtra * 2)) + 1)); graphics.endFill(); }; _color = BALL_TYPE_COLORS[_type]; if (_maxBoostedTimer > 0){ _color = 0xFF0000; }; if ((((_state == BALL_STATE_GROWING)) && ((_type == BALL_TYPE_YELLOW)))){ _color = 0xFFF000; }; if ((((_state == BALL_STATE_GROWING)) && ((_type == BALL_TYPE_GREEN)))){ _color = 1153297; }; if ((((((((_type == BALL_TYPE_ELTOPO)) || ((_type == BALL_TYPE_TTURSAS)))) || ((_type == BALL_TYPE_X2)))) || ((_type == BALL_TYPE_X3)))){ _local2 = 15; if (_bitmap == null){ if (_type == BALL_TYPE_ELTOPO){ _bitmap = new Bitmap(new _classElTopo().bitmapData); } else { if (_type == BALL_TYPE_TTURSAS){ _bitmap = new Bitmap(new _classTTursas().bitmapData); } else { if (_type == BALL_TYPE_X2){ _bitmap = new Bitmap(new _classX2().bitmapData); } else { if (_type == BALL_TYPE_X3){ _bitmap = new Bitmap(new _classX3().bitmapData); }; }; }; }; _arg1.addChild(_bitmap); }; if (_type == BALL_TYPE_ELTOPO){ _local2 = 45; } else { if (_type == BALL_TYPE_TTURSAS){ _local2 = 40; }; }; _bitmap.scaleX = (_radius / _local2); _bitmap.scaleY = (_radius / _local2); _bitmap.smoothing = true; setPosition(_x, _y); } else { graphics.lineStyle(); _local3 = _color; if (_touched > 0){ _local3 = getModifiedColor(_local3, 9.5); }; if (_type == BALL_TYPE_RAY){ if (_extraSprite == null){ _extraSprite = new Sprite(); _extraSprite.alpha = 0.2; _extraSprite.rotation = (Math.random() * 360); _arg1.addChild(_extraSprite); }; if (_extraSprite2 == null){ _extraSprite2 = new Sprite(); _extraSprite2.alpha = 0.2; _extraSprite2.rotation = (_extraSprite.rotation + 90); _arg1.addChild(_extraSprite2); }; _local4 = getModifiedColor(_local3, 7); _extraSprite.graphics.clear(); _extraSprite.graphics.beginFill(_local4, 1); _extraSprite.graphics.drawRect(-2, ((-(_radius) - 6) - _animationVariable), 4, (((2 * _radius) + 12) + (_animationVariable * 2))); _extraSprite.graphics.drawRect(((-(_radius) - 6) - _animationVariable), -2, (((2 * _radius) + 12) + (_animationVariable * 2)), 4); _extraSprite.graphics.endFill(); _local4 = getModifiedColor(_local3, 6); _extraSprite2.graphics.clear(); _extraSprite2.graphics.beginFill(_local4, 1); _extraSprite2.graphics.drawRect(-2, ((-(_radius) - 4) - _animationVariable), 4, (((2 * _radius) + 8) + (_animationVariable * 2))); _extraSprite2.graphics.drawRect(((-(_radius) - 4) - _animationVariable), -2, (((2 * _radius) + 8) + (_animationVariable * 2)), 4); _extraSprite2.graphics.endFill(); }; if (_type != BALL_TYPE_PLAYER){ graphics.beginFill(getModifiedColor(_local3, 4), 1); if ((((_type == BALL_TYPE_BOX_TOUGH)) || ((_type == BALL_TYPE_BOX_GLASS)))){ graphics.drawRect(((-(_width) * 0.5) - _outlineExtra), ((-(_height) * 0.5) - _outlineExtra), (_width + (_outlineExtra * 2)), (_height + (_outlineExtra * 2))); } else { graphics.drawCircle(0, 0, (_radius + (_outlineExtra * 2))); }; }; graphics.beginFill(_local3, 1); if ((((_type == BALL_TYPE_BOX_TOUGH)) || ((_type == BALL_TYPE_BOX_GLASS)))){ graphics.drawRect((-(_width) * 0.5), (-(_height) * 0.5), _width, _height); } else { graphics.drawCircle(0, 0, _radius); }; graphics.endFill(); if (_type == BALL_TYPE_RED){ if (_bitmap == null){ _bitmap = new Bitmap(new _classSkull().bitmapData); _arg1.addChild(_bitmap); _bitmap.visible = true; _bitmap.smoothing = true; }; _bitmap.scaleX = (_radius / 20); _bitmap.scaleY = (_radius / 20); setPosition(_x, _y); } else { if (_type == BALL_TYPE_KEY){ if ((((_bitmap == null)) && ((_touched <= 0)))){ _bitmap = new Bitmap(new _classKey().bitmapData); _arg1.addChild(_bitmap); _bitmap.visible = true; _bitmap.smoothing = true; }; if (_bitmap != null){ _bitmap.scaleX = (_radius / 20); _bitmap.scaleY = (_radius / 20); }; setPosition(_x, _y); } else { if (_type == BALL_TYPE_GHOST){ if (_bitmap == null){ _bitmap = new Bitmap(new _classMystery().bitmapData); _arg1.addChild(_bitmap); _bitmap.visible = true; _bitmap.smoothing = true; _bitmap.scaleX = (_radius / 20); _bitmap.scaleY = (_radius / 20); setPosition(_x, _y); }; } else { if (_type == BALL_TYPE_WATER){ if (_bitmap == null){ _bitmap = new Bitmap(new _classWater().bitmapData); _arg1.addChild(_bitmap); _bitmap.visible = true; _bitmap.smoothing = true; }; _bitmap.scaleX = (_radius / 20); _bitmap.scaleY = (_radius / 20); setPosition(_x, _y); } else { if (_type == BALL_TYPE_SPECIAL){ if (_bitmap == null){ _bitmap = new Bitmap(new _classSpecial().bitmapData); _arg1.addChild(_bitmap); _bitmap.visible = true; _bitmap.smoothing = true; setPosition(_x, _y); }; } else { if (_type == BALL_TYPE_GRAVITY){ graphics.lineStyle(1, getModifiedColor(_local3, 7)); graphics.drawCircle(0, 0, (_radius - (_animationCounter * 0.25))); } else { if (_type == BALL_TYPE_ANTIGRAVITY){ graphics.lineStyle(1, getModifiedColor(_local3, 7)); graphics.drawCircle(0, 0, (_animationCounter * 0.25)); }; }; }; }; }; }; }; }; if (_type == BALL_TYPE_GHOST_HIDDEN){ alpha = 0.2; } else { if (_type == BALL_TYPE_DESTROYED){ alpha = 0.1; } else { if (_type == BALL_TYPE_GHOST){ alpha = 0.7; } else { alpha = 1; }; }; }; } private function scaleBitmap():void{ if (_type == BALL_TYPE_WATER){ _bitmap.scaleX = ((_startRadius / 20) * (_radius / _startRadius)); _bitmap.scaleY = _bitmap.scaleX; _bitmap.x = (_x - (_bitmap.width * 0.5)); _bitmap.y = (_y - (_bitmap.height * 0.5)); }; } public function setVisible(_arg1:Boolean):void{ visible = _arg1; if (_bitmap != null){ _bitmap.visible = _arg1; }; if (_extraSprite != null){ _extraSprite.visible = _arg1; }; if (_extraSprite2 != null){ _extraSprite2.visible = _arg1; }; } public function setPosition(_arg1:Number, _arg2:Number):void{ if (_arg2 > BallDropOne.SCREEN_DY){ _arg2 = BallDropOne.SCREEN_DY; }; _x = _arg1; _y = _arg2; this.x = _arg1; this.y = _arg2; if (_bitmap != null){ _bitmap.x = (_arg1 - (_bitmap.width * 0.5)); _bitmap.y = (_arg2 - (_bitmap.height * 0.5)); }; if (_extraSprite != null){ _extraSprite.x = _arg1; _extraSprite.y = _arg2; }; if (_extraSprite2 != null){ _extraSprite2.x = _arg1; _extraSprite2.y = _arg2; }; } private function rot(_arg1:Bitmap, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):void{ var _local8:Number; var _local9:Number; _arg7 = (_arg7 + (_arg4 * toDeg)); while (_arg7 > 360) { _arg7 = (_arg7 - 360); }; _local8 = Math.cos(((_arg7 * Math.PI) / 180)); _local9 = Math.sin(((_arg7 * Math.PI) / 180)); _arg1.rotation = _arg7; _arg1.x = ((_arg2 + (_arg5 * _local8)) - (_arg6 * _local9)); _arg1.y = ((_arg3 + (_arg6 * _local8)) + (_arg5 * _local9)); } public function liveBoostedTimer(_arg1:BallDropOne):void{ _maxBoostedTimer--; if (_maxBoostedTimer == 0){ resetGraphics(_arg1); }; } public static function destroy(_arg1:Ball, _arg2:Boolean, _arg3:BallDropOne, _arg4:Boolean):void{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Particle; var _local15:int; var _local16:int; var _local17:int; if (_arg2){ _local5 = _arg1._x; _local6 = _arg1._y; _local7 = _arg1._radius; _local17 = _arg1.getParticleColor(); if ((((_arg1._type == BALL_TYPE_BOX_TOUGH)) || ((_arg1._type == BALL_TYPE_BOX_GLASS)))){ _local8 = (_local5 - (_arg1._width * 0.5)); _local9 = (_local6 - (_arg1._height * 0.5)); _local16 = (((Math.random() * (_arg1._width * _arg1._height)) * 0.02) + ((_arg1._width * _arg1._height) * 0.08)); } else { _local8 = (_local5 - _local7); _local9 = (_local6 - _local7); _local16 = ((Math.random() * (_local7 * 2.99)) + (_local7 * 3)); }; _local15 = 0; while (_local15 < _local16) { while (true) { if ((((_arg1._type == BALL_TYPE_BOX_TOUGH)) || ((_arg1._type == BALL_TYPE_BOX_GLASS)))){ _local10 = (_local8 + (Math.random() * _arg1._width)); _local11 = (_local9 + (Math.random() * _arg1._height)); _local12 = (_local10 - _local5); _local13 = (_local11 - _local6); break; } else { _local10 = (_local8 + ((Math.random() * _local7) * 2)); _local11 = (_local9 + ((Math.random() * _local7) * 2)); _local12 = (_local10 - _local5); _local13 = (_local11 - _local6); if (((_local12 * _local12) + (_local13 * _local13)) < (_local7 * _local7)){ break; }; }; }; if (_arg1._type == BALL_TYPE_RED){ _local14 = _arg3._particleManager.addParticle(_arg3, Particle.PARTICLE_TYPE_BIG_SPARKLE, _local10, _local11, _local17); } else { _local14 = _arg3._particleManager.addParticle(_arg3, Particle.PARTICLE_TYPE_SPARKLE, _local10, _local11, _local17); }; if (_local14 != null){ _local14._speedX = (_local12 * 0.004); _local14._speedY = (_local13 * 0.004); _local14._life = (_local14._life + ExtraMath.random(0, 300)); _local14.launch(); }; _local15++; }; if ((((_arg1._type == BALL_TYPE_BOX_TOUGH)) || ((_arg1._type == BALL_TYPE_BOX_GLASS)))){ _local14 = _arg3._particleManager.addParticle(_arg3, Particle.PARTICLE_TYPE_BOX, _local5, _local6, BALL_TYPE_COLORS[_arg1._type]); if (_local14 != null){ _local14._width = _arg1._width; _local14._height = _arg1._height; _local14._radiusAdder = 0.05; _local14._life = (_local14._life + ExtraMath.random(0, 50)); _local14.resetGraphics(_arg3); _local14.launch(); }; } else { _local14 = _arg3._particleManager.addParticle(_arg3, Particle.PARTICLE_TYPE_BALL, _local5, _local6, BALL_TYPE_COLORS[_arg1._type]); if (_local14 != null){ _local14._radius = _arg1._radius; _local14._radiusAdder = 0.05; _local14._life = (_local14._life + ExtraMath.random(0, 50)); _local14.resetGraphics(_arg3); _local14.launch(); }; }; } else { if (_arg1._type == BALL_TYPE_DESTROYED){ _local14 = _arg3._particleManager.addParticle(_arg3, Particle.PARTICLE_TYPE_BALL_SHRINK, _arg1._x, _arg1._y, BALL_TYPE_COLORS[_arg1._type]); if (_local14 != null){ _local14._radius = _arg1._radius; _local14._radiusAdder = -0.05; _local14.alpha = 1; _local14._life = (_local14._life + ExtraMath.random(0, 50)); _local14.resetGraphics(_arg3); _local14.launch(); }; }; }; if (_arg1._bitmap != null){ _arg3.removeChild(_arg1._bitmap); _arg1._bitmap = null; }; if (_arg1._extraSprite != null){ _arg3.removeChild(_arg1._extraSprite); _arg1._extraSprite = null; }; if (_arg1._extraSprite2 != null){ _arg3.removeChild(_arg1._extraSprite2); _arg1._extraSprite2 = null; }; if (_arg4){ _arg3.removeChild(_arg1); }; } public static function getModifiedColor(_arg1:int, _arg2:Number):int{ var _local3:int; var _local4:int; var _local5:int; _local3 = (_arg1 >> 16); _local4 = ((_arg1 >> 8) & 0xFF); _local5 = (_arg1 & 0xFF); _local3 = ((_local3 * _arg2) / 10); _local4 = ((_local4 * _arg2) / 10); _local5 = ((_local5 * _arg2) / 10); if (_local3 > 0xFF){ _local3 = 0xFF; }; if (_local4 > 0xFF){ _local4 = 0xFF; }; if (_local5 > 0xFF){ _local5 = 0xFF; }; return ((((_local3 << 16) | (_local4 << 8)) | _local5)); } } }//package
Section 13
//Ball__classElTopo (Ball__classElTopo) package { import mx.core.*; public class Ball__classElTopo extends BitmapAsset { } }//package
Section 14
//Ball__classKey (Ball__classKey) package { import mx.core.*; public class Ball__classKey extends BitmapAsset { } }//package
Section 15
//Ball__classMystery (Ball__classMystery) package { import mx.core.*; public class Ball__classMystery extends BitmapAsset { } }//package
Section 16
//Ball__classSkull (Ball__classSkull) package { import mx.core.*; public class Ball__classSkull extends BitmapAsset { } }//package
Section 17
//Ball__classSpecial (Ball__classSpecial) package { import mx.core.*; public class Ball__classSpecial extends BitmapAsset { } }//package
Section 18
//Ball__classTTursas (Ball__classTTursas) package { import mx.core.*; public class Ball__classTTursas extends BitmapAsset { } }//package
Section 19
//Ball__classWater (Ball__classWater) package { import mx.core.*; public class Ball__classWater extends BitmapAsset { } }//package
Section 20
//Ball__classX2 (Ball__classX2) package { import mx.core.*; public class Ball__classX2 extends BitmapAsset { } }//package
Section 21
//Ball__classX3 (Ball__classX3) package { import mx.core.*; public class Ball__classX3 extends BitmapAsset { } }//package
Section 22
//BallDNA (BallDNA) package { public class BallDNA { public var _type:int; public var _height:Number; public var _radius:Number; public var _width:Number; public var _x:Number; public var _y:Number; public function BallDNA(_arg1:Ball){ if (_arg1 == null){ return; }; _x = _arg1._x; _y = _arg1._y; _radius = _arg1._radius; _type = _arg1._type; _width = _arg1._width; _height = _arg1._height; } public function convertToString():String{ return (((((((((((_type + " ") + _x) + " ") + _y) + " ") + _radius) + " ") + _width) + " ") + _height)); } } }//package
Section 23
//BallDropOne (BallDropOne) package { import flash.events.*; import flash.display.*; import flash.text.*; import flash.net.*; import flash.utils.*; import flash.media.*; import mochi.*; import flash.xml.*; import flash.ui.*; import flash.system.*; import flash.geom.*; public dynamic class BallDropOne extends MovieClip { private const _MOCHIADS_TOTAL_SCORE_ID:String = "efd85cd7f6c9c417"; private const RENDERING_QUALITY_TEXTS:Array; private const _MOCHIADS_GAME_ID:String = "6abb9af0abde0ae0"; private const BGM_ID_WORLD_1:int = 1; private const BGM_ID_WORLD_2:int = 2; private const BGM_ID_WORLD_3:int = 3; private const BGM_ID_WORLD_4:int = 4; private const BGM_ID_WORLD_5:int = 5; private const BGM_ID_MENU:int = 0; private const LEVEL_EDITOR_BALLS_MAX:int = 80; private var _bonusDestroyedAll:Boolean;// = false private var _keyDownArrowDown:Boolean;// = false private var _keyDownSpeed1X:Boolean;// = false private var _closestBoxX:Number; private var _closestBoxY:Number; private var _keyDownSpeed2X:Boolean;// = false private var _initOk:Boolean;// = false private var _keyDownSpeed3X:Boolean;// = false public var _classMP3SoundHitTTursas:Class; public var _classTitleUp:Class; private var _keyDownSpeed4X:Boolean;// = false public var _bitmapTitleDown:Bitmap;// = null public var _soundUnlockLevel:Sound; public var _classMP3SoundWorld1:Class; public var _classMP3SoundWorld4:Class; public var _classMP3SoundWorld5:Class; public var _classMP3SoundWorld2:Class; public var _classMP3SoundWorld3:Class; public var _infoTextStringLatest:String; public var _classMP3SoundPiip:Class; private var _addFailedText:Boolean;// = false public var _classMusicOff:Class; public var _classMP3SoundButton1:Class; public var _classMP3SoundButton2:Class; public var _classMP3SoundHitSpecial1:Class; public var _classMP3SoundHitSpecial2:Class; public var _bitmapMusicOn:Bitmap; public var _infoTextField:TextField;// = null public var _classMP3SoundLevelStart:Class; public var _classIconClear:Class; private var _mouseUp:Boolean;// = false public var _bonusTextFieldTimers:Array; private var _keyDownReplay:Boolean;// = false public var _classMP3SoundHitMystery1:Class; public var _classMP3SoundHitMystery2:Class; public var _classMP3SoundColumn1:Class; public var _classMP3SoundColumn2:Class; public var _classMP3SoundColumn3:Class; public var _classMP3SoundColumn4:Class; public var _soundButton1:Sound; public var _soundButton2:Sound; private var _versionString:String;// = "1.11" public var _levelEditorMode:int;// = 1 public var _soundPiip:Sound; public var _deltaTime:Number;// = 0 private var _uploadedScoreLevel:int; public var _scoreLevelEditorHighScore:int;// = 0 private var _specialGotTextField:TextField;// = null public var _mouseCursorX:int; public var _mouseCursorY:int; private var _keyDownToggleRenderingQuality:Boolean;// = false private var _session:String; private var _levelEditorBasedOnID:int;// = -1 public var _soundColumn1:Sound; public var _soundColumn2:Sound; public var _soundColumn3:Sound; public var _soundColumn4:Sound; private var _tipsTimer:Number;// = -150 public var _classMP3SoundPlayerDeath:Class; public var _bonusTextFields:Array; private var _playTime:int;// = -1 private var _serverAlive:Boolean;// = false public var _levelSelectedBackground:Sprite; public var _soundBoostBad:Sound; private var _levelEditorDownloadID:int;// = -1 public var _mouseClicked:Boolean;// = false public var _bitmapIconExit:Bitmap; public var _spriteInfoBox:Sprite; private var _bounceSoundIterationNumber:int;// = 0 public var _classArrowUp:Class; private var _inputNameBackground:Sprite;// = null public var _bitmapTitleStart:Bitmap;// = null private var _skipRunMs:Number;// = 0 public var _classNewGameAlert:Class; public var _infoTextStringCurrent:String; public var _gameMode:int;// = 1 private var _ballShrinksAndGrows:int;// = -1 private var _personalBest:int;// = 0 private var _ballRadiusMax:Number;// = 13 public var _soundBounceBall1:Sound; public var _soundBounceBall2:Sound; public var _soundBounceBall3:Sound; public var _soundBounceBall4:Sound; private var _maxInGameLevelScore:int;// = 0 public var _iterationNumber:int;// = 0 private var _screenShotMode:Boolean;// = false private var _ballMaxHeight:int;// = 0 private var _returnToLevelEditor:Boolean;// = false public var _classTitleHomePage:Class; public var _levels:Levels; public var _bitmapSFXOff:Bitmap; public var _inGameMode:int;// = 0 public var _classTitleDown:Class; public var _classMP3SoundMystery:Class; private var _levelEditorGrid:Boolean;// = false private var _mochi:Boolean;// = false public var _classBackground01:Class; public var _levelSelectionMode:int;// = 0 public var _mouseClickedX:int; public var _bitmapIconSubmit:Bitmap; private var _levelNameString:String;// = null public var _ballShadowMax:Ball;// = null private var _keyDownArrowUpLeft:Boolean;// = false public var _soundWR:Sound; public var _levelEditorBallTypeIndexNext:int;// = 0 public var _bitmapTitleHomePage:Bitmap;// = null private var _levelNameTextField:TextField;// = null private var _domains:Array; public var _totalScoreTextField:TextField;// = null public var _mouseClickedY:int; public var _infoBallIndex:int;// = -1 public var _bitmapTitleLevelEditor:Bitmap;// = null public var _soundWorld2:Sound; public var _soundWorld3:Sound; public var _soundWorld4:Sound; public var _soundWorld5:Sound; public var _soundWorld1:Sound; private var _ballRadiusMin:Number;// = 10 public var _classTitleContinue:Class; public var _soundMystery:Sound; private var _bounceWallSoundIterationNumber:int;// = 0 public var _classTitleLevelEditor:Class; public var _classIconDownload:Class; public var _scoreAdder:int;// = 0 public var _musicEnabled:Boolean;// = true private var _continueAvailable:Boolean;// = false private var _keyDownArrowLeft:Boolean;// = false public var _bitmapTitleContinue:Bitmap;// = null private var _deltaTimeMultiplier:Number;// = 1 private var _keyDownArrowUpRight:Boolean;// = false public var _scoreTextField:TextField;// = null private var _keyDownArrowRight:Boolean;// = false public var _levelTargetBall:Ball;// = null private var _downloadingLevel:int; public var _mouseCursorShow:Boolean;// = false public var _bitmapIconPlay:Bitmap; private var _keyDownGrab:Boolean;// = false public var _ballShadowMin:Ball;// = null private var _bonusTouchedAll:Boolean;// = false public var _gameRestart:Boolean;// = false public var _classMP3SoundUnlockLevel:Class; public var _particleManager:ParticleManager; public var _classMusicOn:Class; private var _gameSaveCounter:int;// = 1 public var _bitmapNewGameAlert:Bitmap;// = null private var _replayPressed:Boolean;// = false private var _levelEditorBallsLeft:int;// = 80 public var _classSFXOn:Class; public var _classMP3SoundWR:Class; public var _soundSelection1:Sound; public var _soundSelection2:Sound; public var _spriteWhiteCoverBox:Sprite; private var _updateHighScores:int;// = 0 private var _levelEditor1TextField:TextField;// = null private var _levelEditorDownloadBox:InputBox;// = null private var _titleMenuItemLastSelected:Bitmap;// = null public var _classSFXOff:Class; private var _levelEditorHiScoreName:String;// = "no-one" private var _levelEditorBallsDNA:Array;// = null public var _sfxEnabled:Boolean;// = true public var _soundBounceWall:Sound; private var _jesusAmen:Boolean;// = true private var _keyDownGrid:Boolean;// = false private var _tipsIDInGame:int;// = 0 private var _game:int;// = -1 public var _bitmapArrowUps:Array;// = null public var _soundBoostGood:Sound; private var _worldRecordTimer:Number;// = 0 public var _bitmapTitleUp:Bitmap;// = null public var _classIconExit:Class; public var _classMP3SoundAllOpen:Class; public var _classMP3SoundMenu:Class; public var _classMP3SoundBoostBad:Class; public var _soundHitSpecial1:Sound; public var _soundHitSpecial2:Sound; private var _levelEditorBoxWidth:Number;// = 5 private var _bgmCurrent:int;// = -1 public var _soundHitMystery1:Sound; public var _soundHitMystery2:Sound; private var _keyDownClearBoost:Boolean;// = false public var _soundAllOpen:Sound; private var _levelEditorHiScore:int;// = 0 private var _keyDownThrust:Boolean;// = false private var _levelEditorBallRadius:Number;// = 10 public var _mouseDown:Boolean;// = false private var _playfieldBoxY:Number;// = 2 public var _scoreTotal:int;// = 0 private var _tipsTextField:TextField;// = null public var _bitmapMusicOff:Bitmap; private var _levelEditorBallsLeftTextField:TextField;// = null public var _levelEditorBall:Ball;// = null public var _soundMenu:Sound; public var _bitmapIconDownload:Bitmap; public var _ballShadow:Ball;// = null private var _levelEditor2TextField:TextField;// = null public var _levelEditorBallMouse:Ball;// = null public var _classMP3SoundSelection1:Class; public var _classMP3SoundSelection2:Class; private var _slowMotionTextField:TextField;// = null public var _classMP3SoundBounceBall1:Class; public var _classMP3SoundBounceBall2:Class; public var _classMP3SoundBounceBall3:Class; public var _classMP3SoundBounceBall4:Class; public var _spriteScoreBox:Sprite; public var _soundPlayerDeath:Sound; private var _blackBallsBusted:int;// = 0 private var _continueRecheck:Boolean;// = true private var _levelEditorClearBalls:Boolean;// = false public var _scoreDirty:Boolean;// = true public var _classMP3SoundBounceWall:Class; public var _bitmapBackground:Bitmap;// = null public var _soundTransformVolumeHigh:SoundTransform; private var _previousPlayedLevel:int;// = -1 public var _classTitleStart:Class; public var _runParticles:Boolean;// = true private var _downloadedLevel:Array;// = null public var _classMP3SoundBoostGood:Class; public var _bitmapIconClear:Bitmap; private var _levelEditorBoxHeight:Number;// = 5 private var _playerName:String;// = "NAME" private var _keyDownDelete:Boolean;// = false public var _classMP3SoundBounceBallB1:Class; public var _classMP3SoundBounceBallB2:Class; public var _classMP3SoundBounceBallB3:Class; public var _classMP3SoundBounceBallB4:Class; public var _classMP3SoundBounceBallB5:Class; public var _classMP3SoundBounceBallB6:Class; public var _mouseMoved:Boolean;// = true private var _keyDownSuperSloMo:Boolean;// = false private var _textFieldInputName:TextField;// = null public var _classMP3SoundBounceBallC1:Class; public var _classMP3SoundBounceBallC2:Class; public var _classMP3SoundBounceBallC3:Class; public var _classMP3SoundBounceBallC4:Class; public var _classMP3SoundBounceBallC5:Class; public var _classMP3SoundBounceBallC6:Class; private var _bulletTimeMs:Number;// = 0 public var _ball:Ball;// = null public var _soundHitTTursas:Sound; public var _classIconPlay:Class; public var _levelBalls:Array;// = null public var _classMP3SoundBounceBallD2:Class; public var _classMP3SoundBounceBallD4:Class; public var _classMP3SoundBounceBallD6:Class; public var _classMP3SoundBounceBallD1:Class; public var _classMP3SoundBounceBallD3:Class; public var _classMP3SoundBounceBallD5:Class; public var _bestScoreTextField:TextField;// = null private var _keyDownToggleOutline:Boolean;// = false public var _oldGetTimer:Number;// = 0 public var _renderingQuality:int;// = 0 private var _levelEditorBallsLeftShowing:int;// = 80 private var _tipsIDLevelEditor:int;// = 0 public var _soundBounceBallB1:Sound; public var _soundBounceBallB2:Sound; public var _soundBounceBallB3:Sound; public var _soundBounceBallB4:Sound; public var _soundBounceBallB6:Sound; public var _levelEditorBallTypeIndex:int;// = 0 public var _mouseMovedToX:int;// = 0 public var _mouseMovedToY:int;// = 0 public var _soundBounceBallB5:Sound; public var _classIconSubmit:Class; public var _soundBounceBallC1:Sound; public var _soundBounceBallC2:Sound; public var _soundBounceBallC3:Sound; public var _soundBounceBallC4:Sound; public var _soundBounceBallC5:Sound; public var _soundBounceBallC6:Sound; public var _soundLevelStart:Sound; private var _worldRecordTextField:TextField;// = null public var _kongregate;// = null public var _soundBounceBallD1:Sound; public var _soundBounceBallD2:Sound; public var _soundBounceBallD3:Sound; public var _soundBounceBallD4:Sound; public var _soundBounceBallD5:Sound; public var _soundBounceBallD6:Sound; public var _bitmapSFXOn:Bitmap; public var _spritePlayfieldBox:Sprite; private var _keyDownEsc:Boolean;// = false private var _scoreMultiplier:int;// = 1 private var _keyDownLeaderboard:Boolean;// = false private var _keyDownArrowUp:Boolean;// = false private var _specialGotTimer:Number;// = 0 public var _levelTargetTextField:TextField;// = null public var _soundTransformVolumeLow:SoundTransform; public static const GAME_MODE_GAME:int = 3; public static const SCREEN_DX:int = 480; public static const SCREEN_DY:int = 640; public static const GAME_MODE_TITLE:int = 1; private static const TIPS_LEVEL_EDITOR:Array = [null, "EDITOR TIP 1 : BACKSPACE DELETES THE BALL UNDER THE MOUSE POINTER ", "EDITOR TIP 2 : SPACE GRABS THE BALL UNDER THE MOUSE POINTER ", "EDITOR TIP 3 : G TOGGLES THE GRID "]; public static const LEVEL_EDITOR_MODE_EDIT:int = 1; public static const LEVEL_EDITOR_BALL_TYPES:Array = [Ball.BALL_TYPE_ANTIGRAVITY, Ball.BALL_TYPE_BLUE, Ball.BALL_TYPE_ELTOPO, Ball.BALL_TYPE_GRAVITY, Ball.BALL_TYPE_GRAY, Ball.BALL_TYPE_GREEN, Ball.BALL_TYPE_PINK, Ball.BALL_TYPE_RED, Ball.BALL_TYPE_PLAYER, Ball.BALL_TYPE_TTURSAS, Ball.BALL_TYPE_VIOLET, Ball.BALL_TYPE_WHITE, Ball.BALL_TYPE_X2, Ball.BALL_TYPE_X3, Ball.BALL_TYPE_YELLOW, Ball.BALL_TYPE_KEY, Ball.BALL_TYPE_WATER, Ball.BALL_TYPE_RAY]; public static const LEVEL_SELECTION_MODE_FADE_OUT:int = 2; public static const LEVEL_SELECTION_MODE_FADE_IN:int = 0; public static const SPEEDMUL:Number = 2; public static const INGAME_MODE_FADE_OUT:int = 2; public static const DELTATIME:Number = 2; public static const INGAME_MODE_GAME:int = 1; public static const GAME_MODE_LEVEL_SELECTION:int = 2; public static const LEVEL_EDITOR_MODE_FADE_IN:int = 0; public static const INGAME_MODE_WAIT_FOR_DROP_OFF:int = 0; public static const LEVEL_EDITOR_MODE_FADE_OUT:int = 2; public static const LEVEL_SELECTION_MODE_SELECT:int = 1; public static const GAME_MODE_SPLASH:int = 0; public static const GAME_MODE_LEVEL_EDITOR:int = 4; private static const TIPS_INGAME:Array = [null, "TIP 1 : PLACE THE MOUSE POINTER ON OBJECTS TO GET MORE INFO ", "TIP 2 : DIFFERENTLY COLORED BALLS BEHAVE DIFFERENTLY ", "TIP 3 : BONUS BALLS MIGHT BE HIDDEN UNDER OTHER BALLS ", "TIP 4 : REPLAY LEVELS FOR BIGGER SCORES ", "TIP 5 : CLICK ON A BALL TO BOOST IT ", null, "TIP 6 : THE LONGER YOU KEEP PRESSING THE BIGGER THE BOOST ", "TIP 7 : CLICK AGAIN ON THE BALL TO REMOVE THE BOOST ", "TIP 8 : HITTING A BOOSTED BALL WILL BOUNCE MORE AND SCORE MORE ", "TIP 9 : NOT HITTING THE BOOSTED BALL GIVES MINUS POINTS ", "TIP 10 : WHITE BOOST MARKER EQUALS TO MAXIMUM BOOST! ", null, "TIP 11 : UNLOCK ALL 25 LEVELS AND THE LEVELS WILL CHANGE A LITTLE ", "TIP 12 : BIG BLACK BALLS ARE HEAVIER AND BOUNCE LESS ", "TIP 13 : PRESS Q TO TOGGLE THE RENDERING QUALITY ", "TIP 14 : PRESS S TO BUY 4 SECONDS OF SLOW MOTION TIME ", "TIP 15 : BUT 4 SECONDS OF SLOW MOTION TIME COSTS 25 POINTS ", null, "TIP 16 : EACH BLACK BALL CAN BOUNCE 200 TIMES BEFORE EXPLODING ", "TIP 17 : PRESS T TO THRUST THE BALLS TOWARDS MOUSE POINTER ", "TIP 18 : ONE THRUST WITH T KEY COSTS 100 POINTS! ", "TIP 19 : PRESS O TO CHANGE THE SIZE OF THE OUTLINE OF THE BALLS ", "TIP 20 : PRESS 1, 2, 3 OR 4 TO CHANGE THE SPEED OF THE GAME ", null, "TIP 21 : PRESS ENTER TO REPLAY THE LEVEL "]; private static var m_oneTimePadSeed:int = 0; public function BallDropOne(){ _screenShotMode = false; _classMP3SoundMenu = BallDropOne__classMP3SoundMenu; _soundMenu = new _classMP3SoundMenu(); _classMP3SoundWorld1 = BallDropOne__classMP3SoundWorld1; _soundWorld1 = new _classMP3SoundWorld1(); _classMP3SoundWorld2 = BallDropOne__classMP3SoundWorld2; _soundWorld2 = new _classMP3SoundWorld2(); _classMP3SoundWorld3 = BallDropOne__classMP3SoundWorld3; _soundWorld3 = new _classMP3SoundWorld3(); _classMP3SoundWorld4 = BallDropOne__classMP3SoundWorld4; _soundWorld4 = new _classMP3SoundWorld4(); _classMP3SoundWorld5 = BallDropOne__classMP3SoundWorld5; _soundWorld5 = new _classMP3SoundWorld5(); _classMP3SoundWR = BallDropOne__classMP3SoundWR; _soundWR = new _classMP3SoundWR(); _classMP3SoundSelection1 = BallDropOne__classMP3SoundSelection1; _soundSelection1 = new _classMP3SoundSelection1(); _classMP3SoundSelection2 = BallDropOne__classMP3SoundSelection2; _soundSelection2 = new _classMP3SoundSelection2(); _classMP3SoundButton1 = BallDropOne__classMP3SoundButton1; _soundButton1 = new _classMP3SoundButton1(); _classMP3SoundButton2 = BallDropOne__classMP3SoundButton2; _soundButton2 = new _classMP3SoundButton2(); _classMP3SoundBounceBall1 = BallDropOne__classMP3SoundBounceBall1; _soundBounceBall1 = new _classMP3SoundBounceBall1(); _classMP3SoundBounceBall2 = BallDropOne__classMP3SoundBounceBall2; _soundBounceBall2 = new _classMP3SoundBounceBall2(); _classMP3SoundBounceBall3 = BallDropOne__classMP3SoundBounceBall3; _soundBounceBall3 = new _classMP3SoundBounceBall3(); _classMP3SoundBounceBall4 = BallDropOne__classMP3SoundBounceBall4; _soundBounceBall4 = new _classMP3SoundBounceBall4(); _classMP3SoundBounceBallB1 = BallDropOne__classMP3SoundBounceBallB1; _soundBounceBallB1 = new _classMP3SoundBounceBallB1(); _classMP3SoundBounceBallB2 = BallDropOne__classMP3SoundBounceBallB2; _soundBounceBallB2 = new _classMP3SoundBounceBallB2(); _classMP3SoundBounceBallB3 = BallDropOne__classMP3SoundBounceBallB3; _soundBounceBallB3 = new _classMP3SoundBounceBallB3(); _classMP3SoundBounceBallB4 = BallDropOne__classMP3SoundBounceBallB4; _soundBounceBallB4 = new _classMP3SoundBounceBallB4(); _classMP3SoundBounceBallB5 = BallDropOne__classMP3SoundBounceBallB5; _soundBounceBallB5 = new _classMP3SoundBounceBallB5(); _classMP3SoundBounceBallB6 = BallDropOne__classMP3SoundBounceBallB6; _soundBounceBallB6 = new _classMP3SoundBounceBallB5(); _classMP3SoundBounceBallC1 = BallDropOne__classMP3SoundBounceBallC1; _soundBounceBallC1 = new _classMP3SoundBounceBallC1(); _classMP3SoundBounceBallC2 = BallDropOne__classMP3SoundBounceBallC2; _soundBounceBallC2 = new _classMP3SoundBounceBallC2(); _classMP3SoundBounceBallC3 = BallDropOne__classMP3SoundBounceBallC3; _soundBounceBallC3 = new _classMP3SoundBounceBallC3(); _classMP3SoundBounceBallC4 = BallDropOne__classMP3SoundBounceBallC4; _soundBounceBallC4 = new _classMP3SoundBounceBallC4(); _classMP3SoundBounceBallC5 = BallDropOne__classMP3SoundBounceBallC5; _soundBounceBallC5 = new _classMP3SoundBounceBallC5(); _classMP3SoundBounceBallC6 = BallDropOne__classMP3SoundBounceBallC6; _soundBounceBallC6 = new _classMP3SoundBounceBallC6(); _classMP3SoundBounceBallD1 = BallDropOne__classMP3SoundBounceBallD1; _soundBounceBallD1 = new _classMP3SoundBounceBallD1(); _classMP3SoundBounceBallD2 = BallDropOne__classMP3SoundBounceBallD2; _soundBounceBallD2 = new _classMP3SoundBounceBallD2(); _classMP3SoundBounceBallD3 = BallDropOne__classMP3SoundBounceBallD3; _soundBounceBallD3 = new _classMP3SoundBounceBallD3(); _classMP3SoundBounceBallD4 = BallDropOne__classMP3SoundBounceBallD4; _soundBounceBallD4 = new _classMP3SoundBounceBallD4(); _classMP3SoundBounceBallD5 = BallDropOne__classMP3SoundBounceBallD5; _soundBounceBallD5 = new _classMP3SoundBounceBallD5(); _classMP3SoundBounceBallD6 = BallDropOne__classMP3SoundBounceBallD6; _soundBounceBallD6 = new _classMP3SoundBounceBallD6(); _classMP3SoundColumn1 = BallDropOne__classMP3SoundColumn1; _soundColumn1 = new _classMP3SoundColumn1(); _classMP3SoundColumn2 = BallDropOne__classMP3SoundColumn2; _soundColumn2 = new _classMP3SoundColumn2(); _classMP3SoundColumn3 = BallDropOne__classMP3SoundColumn3; _soundColumn3 = new _classMP3SoundColumn3(); _classMP3SoundColumn4 = BallDropOne__classMP3SoundColumn4; _soundColumn4 = new _classMP3SoundColumn4(); _classMP3SoundUnlockLevel = BallDropOne__classMP3SoundUnlockLevel; _soundUnlockLevel = new _classMP3SoundUnlockLevel(); _classMP3SoundLevelStart = BallDropOne__classMP3SoundLevelStart; _soundLevelStart = new _classMP3SoundLevelStart(); _classMP3SoundBounceWall = BallDropOne__classMP3SoundBounceWall; _soundBounceWall = new _classMP3SoundBounceWall(); _classMP3SoundPlayerDeath = BallDropOne__classMP3SoundPlayerDeath; _soundPlayerDeath = new _classMP3SoundPlayerDeath(); _classMP3SoundHitSpecial1 = BallDropOne__classMP3SoundHitSpecial1; _soundHitSpecial1 = new _classMP3SoundHitSpecial1(); _classMP3SoundHitSpecial2 = BallDropOne__classMP3SoundHitSpecial2; _soundHitSpecial2 = new _classMP3SoundHitSpecial2(); _classMP3SoundHitMystery1 = BallDropOne__classMP3SoundHitMystery1; _soundHitMystery1 = new _classMP3SoundHitMystery1(); _classMP3SoundHitMystery2 = BallDropOne__classMP3SoundHitMystery2; _soundHitMystery2 = new _classMP3SoundHitMystery2(); _classMP3SoundHitTTursas = BallDropOne__classMP3SoundHitTTursas; _soundHitTTursas = new _classMP3SoundHitTTursas(); _classMP3SoundMystery = BallDropOne__classMP3SoundMystery; _soundMystery = new _classMP3SoundMystery(); _classMP3SoundPiip = BallDropOne__classMP3SoundPiip; _soundPiip = new _classMP3SoundPiip(); _classMP3SoundAllOpen = BallDropOne__classMP3SoundAllOpen; _soundAllOpen = new _classMP3SoundAllOpen(); _classMP3SoundBoostGood = BallDropOne__classMP3SoundBoostGood; _soundBoostGood = new _classMP3SoundBoostGood(); _classMP3SoundBoostBad = BallDropOne__classMP3SoundBoostBad; _soundBoostBad = new _classMP3SoundBoostBad(); _classMusicOn = BallDropOne__classMusicOn; _classMusicOff = BallDropOne__classMusicOff; _classSFXOn = BallDropOne__classSFXOn; _classSFXOff = BallDropOne__classSFXOff; _classIconExit = BallDropOne__classIconExit; _classIconPlay = BallDropOne__classIconPlay; _classIconClear = BallDropOne__classIconClear; _classIconSubmit = BallDropOne__classIconSubmit; _classIconDownload = BallDropOne__classIconDownload; _classArrowUp = BallDropOne__classArrowUp; _bitmapArrowUps = null; _classNewGameAlert = BallDropOne__classNewGameAlert; _bitmapNewGameAlert = null; _classTitleStart = BallDropOne__classTitleStart; _bitmapTitleStart = null; _classTitleLevelEditor = BallDropOne__classTitleLevelEditor; _bitmapTitleLevelEditor = null; _classTitleHomePage = BallDropOne__classTitleHomePage; _bitmapTitleHomePage = null; _classTitleContinue = BallDropOne__classTitleContinue; _bitmapTitleContinue = null; _textFieldInputName = null; _inputNameBackground = null; _classTitleUp = BallDropOne__classTitleUp; _bitmapTitleUp = null; _classTitleDown = BallDropOne__classTitleDown; _bitmapTitleDown = null; _classBackground01 = BallDropOne__classBackground01; _bitmapBackground = null; _soundTransformVolumeLow = new SoundTransform(0.4); _soundTransformVolumeHigh = new SoundTransform(1); _ball = null; _ballShadow = null; _ballShadowMin = null; _ballShadowMax = null; _levelBalls = null; _particleManager = new ParticleManager(); _levels = new Levels(); _levelSelectedBackground = new Sprite(); _previousPlayedLevel = -1; _ballMaxHeight = 0; _maxInGameLevelScore = 0; _keyDownArrowLeft = false; _keyDownArrowRight = false; _keyDownArrowUp = false; _keyDownArrowDown = false; _keyDownArrowUpLeft = false; _keyDownArrowUpRight = false; _keyDownDelete = false; _keyDownGrab = false; _keyDownGrid = false; _keyDownToggleRenderingQuality = false; _keyDownSuperSloMo = false; _keyDownThrust = false; _keyDownEsc = false; _keyDownClearBoost = false; _keyDownSpeed1X = false; _keyDownSpeed2X = false; _keyDownSpeed3X = false; _keyDownSpeed4X = false; _keyDownReplay = false; _keyDownLeaderboard = false; _keyDownToggleOutline = false; _domains = ["*.kongregate.com", "*.villehelin.com"]; _kongregate = null; _initOk = false; _renderingQuality = 0; _mochi = false; _scoreTotal = 0; _scoreAdder = 0; _scoreLevelEditorHighScore = 0; _bestScoreTextField = null; _personalBest = 0; _scoreDirty = true; _spriteInfoBox = new Sprite(); _spriteScoreBox = new Sprite(); _spritePlayfieldBox = new Sprite(); _spriteWhiteCoverBox = new Sprite(); _levelTargetTextField = null; _levelTargetBall = null; _infoTextField = null; _infoBallIndex = -1; _musicEnabled = true; _sfxEnabled = true; _mouseCursorShow = false; _mouseMovedToX = 0; _mouseMovedToY = 0; _mouseMoved = true; _mouseClicked = false; _mouseDown = false; _mouseUp = false; _deltaTime = 0; _oldGetTimer = 0; _iterationNumber = 0; _levelNameString = null; _levelNameTextField = null; _slowMotionTextField = null; _tipsTextField = null; _tipsTimer = -150; _tipsIDInGame = 0; _tipsIDLevelEditor = 0; _totalScoreTextField = null; _scoreTextField = null; _gameMode = GAME_MODE_TITLE; _continueRecheck = true; _playfieldBoxY = 2; _game = -1; _playerName = "NAME"; _downloadedLevel = null; _levelEditorDownloadID = -1; _levelEditorBasedOnID = -1; _versionString = "1.11"; _serverAlive = false; _addFailedText = false; _levelEditorHiScore = 0; _levelEditorHiScoreName = "no-one"; RENDERING_QUALITY_TEXTS = ["HI-HI", "HI-LO", "LO-HI", "LO-LO"]; _deltaTimeMultiplier = 1; _runParticles = true; _titleMenuItemLastSelected = null; _jesusAmen = true; _continueAvailable = false; _levelEditorDownloadBox = null; _levelEditorMode = LEVEL_EDITOR_MODE_EDIT; _levelEditorBall = null; _levelEditorBallMouse = null; _levelEditorBallTypeIndex = 0; _levelEditorBallTypeIndexNext = 0; _levelEditor1TextField = null; _levelEditor2TextField = null; _levelEditorBallsLeftTextField = null; _levelEditorBallRadius = 10; _levelEditorBoxWidth = 5; _levelEditorBoxHeight = 5; _levelEditorClearBalls = false; _levelEditorGrid = false; _levelEditorBallsLeft = LEVEL_EDITOR_BALLS_MAX; _levelEditorBallsLeftShowing = LEVEL_EDITOR_BALLS_MAX; _levelEditorBallsDNA = null; _returnToLevelEditor = false; _levelSelectionMode = LEVEL_SELECTION_MODE_FADE_IN; _gameSaveCounter = 1; _updateHighScores = 0; _playTime = -1; _bgmCurrent = -1; _inGameMode = INGAME_MODE_WAIT_FOR_DROP_OFF; _gameRestart = false; _ballShrinksAndGrows = -1; _ballRadiusMin = 10; _ballRadiusMax = 13; _replayPressed = false; _worldRecordTimer = 0; _worldRecordTextField = null; _bounceSoundIterationNumber = 0; _bounceWallSoundIterationNumber = 0; _skipRunMs = 0; _bulletTimeMs = 0; _scoreMultiplier = 1; _specialGotTimer = 0; _specialGotTextField = null; _bonusTextFieldTimers = new Array(3); _bonusTextFields = new Array(3); _blackBallsBusted = 0; _bonusTouchedAll = false; _bonusDestroyedAll = false; super(); sessionReset(); stage.focus = this; stage.scaleMode = StageScaleMode.NO_SCALE; stage.quality = StageQuality.HIGH; Security.allowDomain("www.villehelin.com"); Security.loadPolicyFile("http://www.villehelin.com/crossdomain.xml"); MochiServices.connect(_MOCHIADS_GAME_ID, this); MochiAd.showPreGameAd({clip:root, id:_MOCHIADS_GAME_ID, res:"480x640", background:0xFFFFFF, color:5477825, outline:1853799, no_bg:false, ad_finished:ad_finished1}); } private function textTimersRunOnEnterFrame(_arg1:Number):void{ var _local2:int; if (_specialGotTextField != null){ _specialGotTimer = (_specialGotTimer - _arg1); _specialGotTextField = textTimerFadeOut(_specialGotTextField, _specialGotTimer, 500); }; _local2 = 0; while (_local2 < _bonusTextFieldTimers.length) { if (_bonusTextFields[_local2] == null){ } else { _bonusTextFieldTimers[_local2] = (_bonusTextFieldTimers[_local2] - _arg1); _bonusTextFields[_local2] = textTimerFadeOut(_bonusTextFields[_local2], _bonusTextFieldTimers[_local2], 500); }; _local2++; }; if (_worldRecordTextField != null){ _worldRecordTimer = (_worldRecordTimer - _arg1); _worldRecordTextField = textTimerFadeOut(_worldRecordTextField, _worldRecordTimer, 500); }; } public function fadeInTextField(_arg1:TextField, _arg2:Number, _arg3:Number):Boolean{ if (_arg1 == null){ return (false); }; if (_arg1.alpha < _arg2){ _arg1.alpha = (_arg1.alpha + _arg3); if (_arg1.alpha > _arg2){ _arg1.alpha = _arg2; return (true); }; }; return (false); } public function bgmPlay(_arg1:int, _arg2:Boolean):void{ if (((!(_arg2)) && ((_bgmCurrent == _arg1)))){ return; }; _bgmCurrent = _arg1; if (_musicEnabled){ SoundMixer.stopAll(); if (_arg1 == BGM_ID_MENU){ _soundMenu.play(0, int.MAX_VALUE, _soundTransformVolumeLow); } else { if (_arg1 == BGM_ID_WORLD_1){ _soundWorld1.play(0, int.MAX_VALUE, _soundTransformVolumeLow); } else { if (_arg1 == BGM_ID_WORLD_2){ _soundWorld2.play(0, int.MAX_VALUE, _soundTransformVolumeLow); } else { if (_arg1 == BGM_ID_WORLD_3){ _soundWorld3.play(0, int.MAX_VALUE, _soundTransformVolumeLow); } else { if (_arg1 == BGM_ID_WORLD_4){ _soundWorld4.play(0, int.MAX_VALUE, _soundTransformVolumeLow); } else { if (_arg1 == BGM_ID_WORLD_5){ _soundWorld5.play(0, int.MAX_VALUE, _soundTransformVolumeLow); }; }; }; }; }; }; }; } public function sessionReset():void{ var _local1:Date; _local1 = new Date(); _session = ("" + _local1.getTime()); } private function uploadLevelComplete(_arg1:Event):void{ var _local2:String; var _local3:Array; var _local4:int; var _local5:TextField; _local2 = URLLoader(_arg1.target).data; _local3 = _local2.split(" "); if (_local3 == null){ return; }; _levelEditorDownloadID = int(_local3[0]); _local4 = (3 - int(_local3[1])); _levelEditorBasedOnID = _levelEditorDownloadID; trace(_local2); if (_levelEditorDownloadID >= 0){ _local5 = FontBank.getTextField(this, "MassiveHeadache", 22, 0xFFFFFF); _local5.text = "SUCCESS! "; bonusTextFieldAdd(_local5, 2000); _local5 = FontBank.getTextField(this, "MassiveHeadache", 22, 0xFFFFFF); _local5.text = (("YOU CAN UPLOAD " + _local4) + " MORE LEVELS TODAY! "); bonusTextFieldAdd(_local5, 4000); if (((!((_kongregate == null))) && (_jesusAmen))){ _kongregate.stats.submit("LevelsCreated", 1); }; } else { _local5 = FontBank.getTextField(this, "MassiveHeadache", 22, 11154227); _local5.text = "SORRY! LEVEL LIMIT REACHED FOR TODAY! "; bonusTextFieldAdd(_local5, 3000); }; if (_sfxEnabled){ _soundPiip.play(0, 1, _soundTransformVolumeHigh); }; } private function titleMenuItemClickedHomePage():void{ if (_sfxEnabled){ _soundSelection2.play(0, 1, _soundTransformVolumeHigh); }; navigateToURL(new URLRequest("http://www.villehelin.com/flash.html"), "_blank"); } private function backupPlayerName():void{ var _local1:String; var _local2:int; var _local3:int; if (_textFieldInputName == null){ return; }; _local1 = new String(_textFieldInputName.text); trace(("old = " + _local1)); _local2 = 0; while (_local2 < _local1.length) { _local3 = _local1.charCodeAt(_local2); if ((((_local3 >= "A".charCodeAt(0))) && ((_local3 <= "Z".charCodeAt(0))))){ } else { if ((((_local3 >= "a".charCodeAt(0))) && ((_local3 <= "z".charCodeAt(0))))){ } else { if ((((_local3 >= "0".charCodeAt(0))) && ((_local3 <= "9".charCodeAt(0))))){ } else { _local1 = (_local1.substr(0, _local2) + _local1.substr((_local2 + 1), (_local1.length - _local2))); }; }; }; _local2++; }; trace(("new = " + _local1)); _playerName = _local1; } public function ad_started():void{ } public function gameRunOnEnterFrame(_arg1:Number):void{ var _local2:Ball; var _local3:int; var _local4:Number; var _local5:TextField; var _local6:Number; var _local7:Number; var _local8:Boolean; _spriteWhiteCoverBox.visible = false; if (_inGameMode == INGAME_MODE_WAIT_FOR_DROP_OFF){ _local6 = _mouseMovedToX; _local7 = _mouseMovedToY; if (_local6 < ((0 + _ballRadiusMax) + 2)){ _local6 = ((0 + _ballRadiusMax) + 2); } else { if (_local6 > ((SCREEN_DX - _ballRadiusMax) - 2)){ _local6 = ((SCREEN_DX - _ballRadiusMax) - 2); }; }; if (_local7 < (0 + 100)){ _local7 = (0 + 100); } else { if (_local7 > (SCREEN_DY - 100)){ _local7 = (SCREEN_DY - 100); }; }; _ballShadow.setPosition(_local6, _local7); _ballShadowMin.setPosition(_local6, _local7); _ballShadowMax.setPosition(_local6, _local7); _ball.setPosition(_local6, 100); }; if ((((_inGameMode == INGAME_MODE_WAIT_FOR_DROP_OFF)) || ((_inGameMode == INGAME_MODE_GAME)))){ fadeInSprite(_ball, 1, 0.02); fadeInSprite(_ballShadow, 0.3, 0.02); fadeInSprite(_ballShadowMin, 0.3, 0.02); fadeInSprite(_ballShadowMax, 0.3, 0.02); fadeInTextField(_totalScoreTextField, 1, 0.02); fadeInTextField(_scoreTextField, 1, 0.02); fadeInTextField(_bestScoreTextField, 1, 0.02); fadeOutLevelEditor(_arg1); }; _local3 = findBall(_mouseMovedToX, _mouseMovedToY); if (_local3 >= 0){ _infoBallIndex = _local3; _local2 = _levelBalls[_local3]; _infoTextStringLatest = _local2.getTypeInfoText(this, _ballRadiusMin, _ballRadiusMax); if (Ball.BALL_SCORE[_local2._type] > 0){ _infoTextStringLatest = (_infoTextStringLatest + ((" (" + (Ball.BALL_SCORE[_local2._type] * _scoreMultiplier)) + "PTS)")); }; _infoTextStringLatest = (_infoTextStringLatest + " "); if (((_mouseClicked) && ((_inGameMode == INGAME_MODE_GAME)))){ _mouseClicked = false; if (_local2._boostCounter > 0){ _local2._boostCounter = 0; _local2.resetGraphics(this); _mouseDown = false; }; if (_local2._type == Ball.BALL_TYPE_GRAY){ ballSelectionReset(); if ((((((_levels._level == -2)) && ((_scoreTotal >= 15)))) || ((_levels._levelScores[_levels._level] >= 15)))){ _local2._explode = true; scoreAdd(-15); }; } else { if (_local2._type == Ball.BALL_TYPE_RED){ ballSelectionReset(); if ((((((_levels._level == -2)) && ((_scoreTotal >= 300)))) || ((_levels._levelScores[_levels._level] >= 300)))){ _local2._explode = true; scoreAdd(-300); }; } else { if (_mouseDown){ ballSelectionReset(); if (((((((((!((_local2._type == Ball.BALL_TYPE_ELTOPO))) && (!((_local2._type == Ball.BALL_TYPE_TTURSAS))))) && (!((_local2._type == Ball.BALL_TYPE_GHOST_HIDDEN))))) && (!((_local2._type == Ball.BALL_TYPE_BOX_GLASS))))) && (!((_local2._type == Ball.BALL_TYPE_BOX_TOUGH))))){ _local2._boostCounter = 0.02; }; }; }; }; }; if ((((_inGameMode == INGAME_MODE_GAME)) && (_mouseDown))){ if (_local2._type != Ball.BALL_TYPE_DESTROYED){ if (_local2._boostCounter > 0){ _local2._boostCounter = (_local2._boostCounter + 0.02); if (_local2._boostCounter > 2){ _local2._boostCounter = 2; }; _local2.resetGraphics(this); }; }; }; }; if ((((_inGameMode == INGAME_MODE_WAIT_FOR_DROP_OFF)) && (_mouseClicked))){ _ballShrinksAndGrows = 0; _mouseClicked = false; }; if (_ballShrinksAndGrows == 0){ _local4 = (_ball._radius - 0.1); if (_local4 <= _ballShadowMin._radius){ _local4 = _ballShadowMin._radius; _ballShrinksAndGrows = 1; }; _ball.resize(_local4, this); _ballShadow.resize(_local4, this); _ballShadow.alpha = 0.3; } else { if (_ballShrinksAndGrows == 1){ _local4 = (_ball._radius + 0.1); if (_local4 >= _ballShadowMax._radius){ _local4 = _ballShadowMax._radius; _ballShrinksAndGrows = 0; }; _ball.resize(_local4, this); _ballShadow.resize(_local4, this); _ballShadow.alpha = 0.3; }; }; if ((((((_inGameMode == INGAME_MODE_WAIT_FOR_DROP_OFF)) && (_mouseUp))) && ((_ballShrinksAndGrows >= 0)))){ _mouseUp = false; _ballShadow.visible = false; _ballShadowMin.visible = false; _ballShadowMax.visible = false; _ball._freeFall = true; _ball._speedX = 0; _ball._speedY = 0; _ballShrinksAndGrows = -1; _inGameMode = INGAME_MODE_GAME; }; animateLevelBalls(_arg1); if (_inGameMode == INGAME_MODE_FADE_OUT){ _bulletTimeMs = 0; if (_returnToLevelEditor){ if (_particleManager._particlesAlive == 0){ _returnToLevelEditor = false; _gameMode = GAME_MODE_LEVEL_EDITOR; _inGameMode = INGAME_MODE_GAME; if ((((_levelEditorDownloadID >= 0)) && (_jesusAmen))){ uploadLevelScoreUser(_levelEditorDownloadID, _scoreTotal); }; }; } else { if (!Levels.destroyOneBall(_levelBalls, this)){ if (_replayPressed){ _replayPressed = false; if (_levels._levelScores[_levels._level] > _personalBest){ _personalBest = _levels._levelScores[_levels._level]; if (_jesusAmen){ if (_levels._levelScores[_levels._level] > 1000){ uploadLevelScoreInGame(_levels._level, _levels._levelScores[_levels._level]); }; uploadLevelScoreInGameTotal(_session, _game, _scoreTotal); }; }; if (_levels._levelScores[_levels._level] > 0){ scoreAdd(-(_levels._levelScores[_levels._level])); }; _levelBalls = _levels.levelLoad(this); _spriteWhiteCoverBox.visible = true; removeChild(_spriteWhiteCoverBox); addChild(_spriteWhiteCoverBox); _gameMode = GAME_MODE_LEVEL_SELECTION; _levelSelectionMode = LEVEL_SELECTION_MODE_FADE_OUT; return; }; _local8 = true; if (_levels._levelScores[_levels._level] < _personalBest){ _levels._levelScores[_levels._level] = _personalBest; _local8 = false; _local5 = FontBank.getTextField(this, "MassiveHeadache", 22, 16772348); _local5.text = "RETURNING THE OLD SCORE..."; bonusTextFieldAdd(_local5, 2000); }; levelSelectionStartFadeIn(); if (((_local8) && (_jesusAmen))){ if (_levels._levelScores[_levels._level] > 1000){ uploadLevelScoreInGame(_levels._level, _levels._levelScores[_levels._level]); }; uploadLevelScoreInGameTotal(_session, _game, _scoreTotal); }; scoreRedraw(); if (((_mochi) && (_jesusAmen))){ MochiScores.setBoardID(_MOCHIADS_TOTAL_SCORE_ID); MochiScores.submit(_scoreTotal, _playerName); }; if (((!((_kongregate == null))) && (_jesusAmen))){ _kongregate.scores.submit(_scoreTotal); _kongregate.stats.submit("TotalScore", _scoreTotal); if (_ballMaxHeight > 0){ _kongregate.stats.submit("MaxBallHeightNew", _ballMaxHeight); _ballMaxHeight = 0; }; if (_blackBallsBusted > 0){ _kongregate.stats.submit("BlackBallsBusted", _blackBallsBusted); _blackBallsBusted = 0; }; if (_maxInGameLevelScore < _levels._levelScores[_levels._level]){ _maxInGameLevelScore = _levels._levelScores[_levels._level]; _kongregate.stats.submit("MaxInGameLevelScoreNew", _maxInGameLevelScore); }; }; }; }; return; }; if ((((_inGameMode == INGAME_MODE_WAIT_FOR_DROP_OFF)) && ((_infoTextStringLatest == null)))){ _infoTextStringLatest = "KEEP MOUSE BUTTON PRESSED TO ADJUST THE BALL'S SIZE"; }; if (_inGameMode == INGAME_MODE_GAME){ if (_keyDownSuperSloMo){ _keyDownSuperSloMo = false; if ((((((_levels._level == -2)) && ((_scoreTotal >= 25)))) || ((_levels._levelScores[_levels._level] >= 25)))){ scoreAdd(-25); _bulletTimeMs = (_bulletTimeMs + 4000); _local5 = FontBank.getTextField(this, "MassiveHeadache", 22, 8922662); _local5.text = "+4S SLOW MOTION -25PTS "; bonusTextFieldAdd(_local5, 2000); if (_deltaTimeMultiplier > 1.1){ _keyDownSpeed1X = true; }; }; }; if (_keyDownThrust){ _keyDownThrust = false; if ((((((_levels._level == -2)) && ((_scoreTotal >= 100)))) || ((_levels._levelScores[_levels._level] >= 100)))){ scoreAdd(-100); thrustBall(_ball); _local3 = 0; while (_local3 < _levelBalls.length) { _local2 = _levelBalls[_local3]; if ((((((_local2 == null)) || (!((_local2._type == Ball.BALL_TYPE_PLAYER))))) || (!(_local2._freeFall)))){ } else { thrustBall(_local2); }; _local3++; }; _local5 = FontBank.getTextField(this, "MassiveHeadache", 22, 8922662); _local5.text = "THRUST -100PTS "; bonusTextFieldAdd(_local5, 2000); }; }; }; if (_mouseUp){ _mouseUp = false; }; } public function placeBallBehind(_arg1:Ball):void{ var _local2:int; var _local3:Ball; var _local4:Number; var _local5:Number; if (_levelBalls == null){ return; }; _local2 = 0; while (_local2 < _levelBalls.length) { _local3 = _levelBalls[_local2]; if ((((((((_local3 == null)) || ((_local3._type == Ball.BALL_TYPE_DEAD)))) || ((_local3._type == Ball.BALL_TYPE_DESTROYED)))) || ((_local3 == _arg1)))){ } else { _local4 = (_local3._x - _arg1._x); _local5 = (_local3._y - _arg1._y); if (((_local4 * _local4) + (_local5 * _local5)) <= ((_local3._radius + _arg1._radius) * (_local3._radius + _arg1._radius))){ _local3.removeChildAddChild(this); }; }; _local2++; }; } private function parseLevel(_arg1:Event):void{ var _local2:String; var _local3:Array; var _local4:TextField; _local2 = URLLoader(_arg1.target).data; _local3 = _local2.split(" "); if ((((_local3 == null)) || ((_local3.length < 6)))){ return; }; _downloadedLevel = _local3; _levelEditorDownloadID = _downloadingLevel; _levelEditorBasedOnID = _downloadingLevel; _scoreLevelEditorHighScore = 0; _local4 = FontBank.getTextField(this, "MassiveHeadache", 22, 0xFFFFFF); _local4.text = "SUCCESS! "; bonusTextFieldAdd(_local4, 2000); serverIsAlive(_arg1); if (_sfxEnabled){ _soundPiip.play(0, 1, _soundTransformVolumeHigh); }; } public function fadeOutSprite(_arg1:Sprite, _arg2:Number, _arg3:Boolean):Boolean{ if (_arg1 == null){ return (false); }; if (_arg1.alpha > 0){ _arg1.alpha = (_arg1.alpha - _arg2); if (_arg1.alpha < 0){ _arg1.alpha = 0; if (_arg3){ removeChild(_arg1); }; return (true); }; }; return (false); } private function titleMenuItemClickedLevelEditor():void{ backupPlayerName(); _mouseClicked = false; _gameMode = GAME_MODE_LEVEL_EDITOR; _levels.setBackground(this, -1); if (_sfxEnabled){ _soundSelection2.play(0, 1, _soundTransformVolumeHigh); }; } public function scoreAdd(_arg1:int):void{ if (_arg1 > 0){ _arg1 = (_arg1 * _scoreMultiplier); }; _scoreAdder = (_scoreAdder + _arg1); _scoreDirty = true; } public function gameSave():void{ var _local1:TextField; var _local2:int; var _local3:SharedObject; _local1 = FontBank.getTextField(this, "MassiveHeadache", 22, 6822712); _local1.text = "SAVING THE GAME..."; bonusTextFieldAdd(_local1, 2000); _scoreTotal = 0; _local2 = 0; while (_local2 < (5 * 5)) { _scoreTotal = (_scoreTotal + _levels._levelScores[_local2]); _local2++; }; _local3 = SharedObject.getLocal("BallDropOneSaveFile"); _local3.data.playerName = _playerName; _local3.data.session = _session; _local3.data.versionString = _versionString; _local3.data.levelScores = _levels._levelScores; _local3.data.specialBallsCollected = _levels._specialBallsCollected; _local3.data.specialBalls = _levels._specialBalls; _local3.data.levelStatuses = _levels._levelStatuses; _local3.data.scoreTotal = _scoreTotal; _local3.data.ballRadiusMin = _ballRadiusMin; _local3.data.ballRadiusMax = _ballRadiusMax; _local3.data.magic = saveGameCalculateMagic(_local3); _local3.flush(); } public function onKeyDown(_arg1:KeyboardEvent):void{ if (_arg1.charCode == "l".charCodeAt(0)){ _keyDownLeaderboard = true; }; if (_gameMode == GAME_MODE_LEVEL_EDITOR){ if (_levelEditorDownloadBox == null){ if (_arg1.charCode == "a".charCodeAt(0)){ _keyDownArrowLeft = true; } else { if (_arg1.charCode == "d".charCodeAt(0)){ _keyDownArrowRight = true; } else { if (_arg1.charCode == "w".charCodeAt(0)){ _keyDownArrowUp = true; } else { if (_arg1.charCode == "s".charCodeAt(0)){ _keyDownArrowDown = true; } else { if (_arg1.charCode == "g".charCodeAt(0)){ _keyDownGrid = true; } else { if (_arg1.charCode == "z".charCodeAt(0)){ _keyDownArrowUpLeft = true; } else { if (_arg1.charCode == "x".charCodeAt(0)){ _keyDownArrowUpRight = true; } else { if ((((_arg1.charCode == Keyboard.BACKSPACE)) || ((_arg1.charCode == Keyboard.DELETE)))){ _keyDownDelete = true; } else { if (_arg1.charCode == Keyboard.SPACE){ _keyDownGrab = true; }; }; }; }; }; }; }; }; }; }; } else { if (_gameMode == GAME_MODE_GAME){ if (_arg1.charCode == "s".charCodeAt(0)){ _keyDownSuperSloMo = true; } else { if (_arg1.charCode == "t".charCodeAt(0)){ _keyDownThrust = true; } else { if (_arg1.charCode == Keyboard.SPACE){ _keyDownClearBoost = true; } else { if (_arg1.keyCode == Keyboard.ENTER){ _keyDownReplay = true; }; }; }; }; }; }; if (_gameMode != GAME_MODE_TITLE){ if (_arg1.charCode == "q".charCodeAt(0)){ _keyDownToggleRenderingQuality = true; } else { if (_arg1.charCode == "1".charCodeAt(0)){ _keyDownSpeed1X = true; } else { if (_arg1.charCode == "2".charCodeAt(0)){ _keyDownSpeed2X = true; } else { if (_arg1.charCode == "3".charCodeAt(0)){ _keyDownSpeed3X = true; } else { if (_arg1.charCode == "4".charCodeAt(0)){ _keyDownSpeed4X = true; } else { if (_arg1.charCode == "o".charCodeAt(0)){ _keyDownToggleOutline = true; }; }; }; }; }; }; }; if (_arg1.charCode == Keyboard.ESCAPE){ _keyDownEsc = true; }; } public function onEnterFrame(_arg1:Event):void{ var _local2:TextField; var _local3:int; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:int; var _local11:Ball; var _local12:Number; if (!_initOk){ return; }; _infoTextStringLatest = null; if (_addFailedText){ _addFailedText = false; _local2 = FontBank.getTextField(this, "MassiveHeadache", 22, 0xFFFFFF); _local2.text = "FAILED! "; bonusTextFieldAdd(_local2, 2000); }; if (_keyDownToggleOutline){ _keyDownToggleOutline = false; _local2 = FontBank.getTextField(this, "MassiveHeadache", 22, 0); if (Ball._outlineExtra > 0.9){ Ball._outlineExtra = 0.3; _local2.text = "BALL OUTLINE MIN "; } else { if (Ball._outlineExtra > 0.5){ Ball._outlineExtra = 1; _local2.text = "BALL OUTLINE MAX "; } else { Ball._outlineExtra = 0.6; _local2.text = "BALL OUTLINE MEDIUM "; }; }; if (_levelBalls != null){ _local3 = 0; while (_local3 < _levelBalls.length) { if (_levelBalls[_local3] != null){ _levelBalls[_local3].resetGraphics(this); }; _local3++; }; }; bonusTextFieldAdd(_local2, 2000); }; if (_keyDownClearBoost){ _keyDownClearBoost = false; ballSelectionReset(); }; if (((((((_keyDownSpeed1X) || (_keyDownSpeed2X))) || (_keyDownSpeed3X))) || (_keyDownSpeed4X))){ if (_keyDownSpeed1X){ _keyDownSpeed1X = false; _deltaTimeMultiplier = 1; } else { if (_keyDownSpeed2X){ _keyDownSpeed2X = false; _deltaTimeMultiplier = 2; } else { if (_keyDownSpeed3X){ _keyDownSpeed3X = false; _deltaTimeMultiplier = 3; } else { if (_keyDownSpeed4X){ _keyDownSpeed4X = false; _deltaTimeMultiplier = 4; }; }; }; }; _local10 = _deltaTimeMultiplier; _local2 = FontBank.getTextField(this, "MassiveHeadache", 22, 0xFFFFFF); _local2.text = (("GAME SPEED - " + _local10) + "X! "); bonusTextFieldAdd(_local2, 2000); }; if (_keyDownToggleRenderingQuality){ _keyDownToggleRenderingQuality = false; _renderingQuality++; if (_renderingQuality == 4){ _renderingQuality = 0; }; if ((((_renderingQuality == 0)) || ((_renderingQuality == 1)))){ stage.quality = StageQuality.HIGH; } else { if (_renderingQuality == 2){ stage.quality = StageQuality.MEDIUM; } else { stage.quality = StageQuality.LOW; }; }; _worldRecordTimer = 1500; if (_worldRecordTextField != null){ removeChild(_worldRecordTextField); }; _worldRecordTextField = FontBank.getTextField(this, "MassiveHeadache", 30, 0); _worldRecordTextField.x = (SCREEN_DX >> 1); _worldRecordTextField.y = 100; _worldRecordTextField.text = (("RENDERING QUALITY - " + RENDERING_QUALITY_TEXTS[_renderingQuality]) + " "); addChild(_worldRecordTextField); }; if (((!((_levelNameTextField == null))) && ((_gameMode == GAME_MODE_LEVEL_EDITOR)))){ if ((((((((_mouseMovedToX >= _levelNameTextField.x)) && ((_mouseMovedToX <= (_levelNameTextField.x + _levelNameTextField.width))))) && ((_mouseMovedToY >= _levelNameTextField.y)))) && ((_mouseMovedToY <= (_levelNameTextField.y + _levelNameTextField.height))))){ if (_mouseClicked){ _mouseClicked = false; if (_sfxEnabled){ _soundSelection2.play(0, 1, _soundTransformVolumeHigh); }; navigateToURL(new URLRequest(("http://www.villehelin.com/BallDropOne/levelInfo.php?id=" + _levelEditorDownloadID)), "_blank"); }; _infoTextStringLatest = "CLICK TO VISIT THE LEVEL'S HOME PAGE"; }; }; if ((((((((_mouseMovedToX >= _bitmapMusicOn.x)) && ((_mouseMovedToX <= (_bitmapMusicOn.x + _bitmapMusicOn.width))))) && ((_mouseMovedToY >= _bitmapMusicOn.y)))) && ((_mouseMovedToY <= (_bitmapMusicOn.y + _bitmapMusicOn.height))))){ if (_mouseClicked){ _mouseClicked = false; _musicEnabled = !(_musicEnabled); if (_musicEnabled){ if (_gameMode == GAME_MODE_TITLE){ bgmPlay(BGM_ID_MENU, true); } else { bgmPlay(_bgmCurrent, true); }; _bitmapMusicOn.visible = true; _bitmapMusicOff.visible = false; } else { SoundMixer.stopAll(); _bitmapMusicOn.visible = false; _bitmapMusicOff.visible = true; }; playButtonSound(); }; if (_musicEnabled){ _infoTextStringLatest = "TOGGLE MUSIC OFF"; } else { _infoTextStringLatest = "TOGGLE MUSIC ON"; }; }; if ((((((((_mouseMovedToX >= _bitmapSFXOn.x)) && ((_mouseMovedToX <= (_bitmapSFXOn.x + _bitmapSFXOn.width))))) && ((_mouseMovedToY >= _bitmapSFXOn.y)))) && ((_mouseMovedToY <= (_bitmapSFXOn.y + _bitmapSFXOn.height))))){ if (_mouseClicked){ _mouseClicked = false; _sfxEnabled = !(_sfxEnabled); if (_sfxEnabled){ _bitmapSFXOn.visible = true; _bitmapSFXOff.visible = false; } else { _bitmapSFXOn.visible = false; _bitmapSFXOff.visible = true; }; playButtonSound(); }; if (_sfxEnabled){ _infoTextStringLatest = "TOGGLE SFX OFF"; } else { _infoTextStringLatest = "TOGGLE SFX ON"; }; }; if ((((((_bitmapIconExit.alpha >= 1)) && ((_levelEditorDownloadBox == null)))) && ((_playfieldBoxY == 82)))){ if ((((((((((((_mouseMovedToX >= _bitmapIconExit.x)) && ((_mouseMovedToX <= (_bitmapIconExit.x + _bitmapIconExit.width))))) && ((_mouseMovedToY >= _bitmapIconExit.y)))) && ((_mouseMovedToY <= (_bitmapIconExit.y + _bitmapIconExit.height))))) || (_keyDownEsc))) || (_keyDownReplay))){ if (((((_mouseClicked) || (_keyDownEsc))) || (_keyDownReplay))){ if (_keyDownReplay){ _replayPressed = true; }; _mouseClicked = false; _keyDownEsc = false; _keyDownReplay = false; if ((((_gameMode == GAME_MODE_GAME)) && (!((_inGameMode == INGAME_MODE_FADE_OUT))))){ _local3 = 0; while (_local3 < _levelBalls.length) { if (((((!((_levelBalls[_local3] == null))) && ((_levelBalls[_local3]._type == Ball.BALL_TYPE_PLAYER)))) && (_levelBalls[_local3]._freeFall))){ explodePlayerBall(_levelBalls[_local3], true); _levelBalls[_local3] = null; }; _local3++; }; explodePlayerBall(_ball, true); _ballShadow.visible = false; _ballShadowMin.visible = false; _ballShadowMax.visible = false; _inGameMode = INGAME_MODE_FADE_OUT; } else { if ((((_gameMode == GAME_MODE_LEVEL_SELECTION)) && ((_levelSelectionMode == LEVEL_SELECTION_MODE_SELECT)))){ levelSelectionStartFadeOut(); _gameRestart = true; scoreAdd(-(_scoreTotal)); playButtonSound(); } else { if ((((_gameMode == GAME_MODE_LEVEL_EDITOR)) && (!(_levelEditorClearBalls)))){ levelEditorBallsBackup(); if (_levelEditorBall != null){ Ball.destroy(_levelEditorBall, true, this, true); _levelEditorBall = null; }; _gameMode = GAME_MODE_TITLE; _continueRecheck = true; playButtonSound(); }; }; }; }; if ((((_gameMode == GAME_MODE_GAME)) && (!((_inGameMode == INGAME_MODE_FADE_OUT))))){ _infoTextStringLatest = "EXIT THE LEVEL (ESC) "; } else { if ((((_gameMode == GAME_MODE_LEVEL_SELECTION)) && ((_levelSelectionMode == LEVEL_SELECTION_MODE_SELECT)))){ _infoTextStringLatest = "EXIT TO MAIN MENU (ESC) "; } else { if (_gameMode == GAME_MODE_LEVEL_EDITOR){ _infoTextStringLatest = "EXIT TO MAIN MENU (ESC) "; }; }; }; }; }; if ((((_gameMode == GAME_MODE_LEVEL_EDITOR)) && ((_levelEditorMode == LEVEL_EDITOR_MODE_EDIT)))){ if ((((((((((((_mouseMovedToX >= _bitmapIconSubmit.x)) && ((_mouseMovedToX <= (_bitmapIconSubmit.x + _bitmapIconSubmit.width))))) && ((_mouseMovedToY >= _bitmapIconSubmit.y)))) && ((_mouseMovedToY <= (_bitmapIconSubmit.y + _bitmapIconSubmit.height))))) && ((_bitmapIconSubmit.alpha >= 1)))) && ((_levelEditorDownloadBox == null)))){ _infoTextStringLatest = "UPLOAD THE LEVEL TO LEVEL SERVER "; if (((_mouseClicked) && (!((_levelBalls == null))))){ _mouseClicked = false; if (_jesusAmen){ uploadLevel(); }; playButtonSound(); }; }; if ((((((((((((_mouseMovedToX >= _bitmapIconPlay.x)) && ((_mouseMovedToX <= (_bitmapIconPlay.x + _bitmapIconPlay.width))))) && ((_mouseMovedToY >= _bitmapIconPlay.y)))) && ((_mouseMovedToY <= (_bitmapIconPlay.y + _bitmapIconPlay.height))))) && ((_bitmapIconPlay.alpha >= 1)))) && ((_levelEditorDownloadBox == null)))){ _infoTextStringLatest = "PLAY THE LEVEL "; if (((((((_mouseClicked) && (!((_levelBalls == null))))) && ((_levelEditorBallsDNA == null)))) && (!(_levelEditorClearBalls)))){ levelEditorBallsBackup(); trace("LEVEL INFORMATION:"); _local3 = 0; while (_local3 < _levelBalls.length) { _local11 = _levelBalls[_local3]; if ((((_local11._type == Ball.BALL_TYPE_BOX_TOUGH)) || ((_local11._type == Ball.BALL_TYPE_BOX_GLASS)))){ trace((((((((((("\t\t\t" + _local11._type) + ", ") + _local11._x) + ", ") + _local11._y) + ", ") + _local11._width) + ", ") + _local11._height) + ",")); } else { trace((((((((("\t\t\t" + _local11._type) + ", ") + _local11._x) + ", ") + _local11._y) + ", ") + _local11._radius) + ",")); }; _local3++; }; if (_levelEditorBall != null){ Ball.destroy(_levelEditorBall, true, this, true); _levelEditorBall = null; }; _mouseClicked = false; _gameMode = GAME_MODE_GAME; _mouseUp = false; _scoreTotal = 0; _scoreAdder = 0; _scoreMultiplier = 1; _returnToLevelEditor = true; goToDropOffMode(true); _levels._level = -2; _previousPlayedLevel = -1; _levels.resetLevelStatistics(); scoreRedraw(); if (_levelEditorDownloadID >= 0){ downloadUserLevelHighScore(_levelEditorDownloadID); }; if (_sfxEnabled){ _soundLevelStart.play(0, 1, _soundTransformVolumeHigh); }; }; } else { if ((((((((((((_mouseMovedToX >= _bitmapIconClear.x)) && ((_mouseMovedToX <= (_bitmapIconClear.x + _bitmapIconClear.width))))) && ((_mouseMovedToY >= _bitmapIconClear.y)))) && ((_mouseMovedToY <= (_bitmapIconClear.y + _bitmapIconClear.height))))) && ((_bitmapIconClear.alpha >= 1)))) && ((_levelEditorDownloadBox == null)))){ _infoTextStringLatest = "RESET"; if (_mouseClicked){ _mouseClicked = false; _levelEditorClearBalls = true; _levelEditorBasedOnID = -1; _levelEditorDownloadID = -1; _scoreLevelEditorHighScore = 0; playButtonSound(); }; } else { if ((((((((((_mouseMovedToX >= _bitmapIconDownload.x)) && ((_mouseMovedToX <= (_bitmapIconDownload.x + _bitmapIconDownload.width))))) && ((_mouseMovedToY >= _bitmapIconDownload.y)))) && ((_mouseMovedToY <= (_bitmapIconDownload.y + _bitmapIconDownload.height))))) && ((_bitmapIconDownload.alpha >= 1)))){ _infoTextStringLatest = "DOWNLOAD A LEVEL FROM THE SERVER"; if (_mouseClicked){ _mouseClicked = false; if (_levelEditorDownloadBox == null){ _levelEditorDownloadBox = new InputBox(this, (SCREEN_DX * 0.5), 260, 200, 150); _levelEditorDownloadBox.Show(this); } else { _levelEditorDownloadBox.Hide(this); _levelEditorDownloadBox = null; }; playButtonSound(); }; }; }; }; }; if (_keyDownEsc){ _keyDownEsc = false; if (_levelEditorDownloadBox != null){ _levelEditorDownloadBox.Hide(this); _levelEditorDownloadBox = null; }; if (_bitmapNewGameAlert != null){ removeChild(_bitmapNewGameAlert); _bitmapNewGameAlert = null; }; }; if (_gameMode == GAME_MODE_SPLASH){ splashRunOnEnterFrame(); }; manageArrowUps(); manageBallHeights(); _local4 = _playfieldBoxY; if ((((((_gameMode == GAME_MODE_GAME)) || ((_gameMode == GAME_MODE_LEVEL_EDITOR)))) || ((_gameMode == GAME_MODE_LEVEL_SELECTION)))){ if (_local4 < 82){ _local4 = (_local4 + 2); }; } else { if (_local4 > 2){ _local4 = (_local4 - 2); }; }; if (_local4 != _playfieldBoxY){ _playfieldBoxY = _local4; _spritePlayfieldBox.graphics.clear(); _spritePlayfieldBox.graphics.lineStyle(); if (_screenShotMode){ _spritePlayfieldBox.graphics.beginFill(8032181); } else { _spritePlayfieldBox.graphics.beginFill(10728399); }; _spritePlayfieldBox.graphics.drawRoundRect(2, _local4, (SCREEN_DX - 4), (SCREEN_DY - (_local4 << 1)), 10, 10); _spritePlayfieldBox.graphics.endFill(); }; if (_oldGetTimer <= 0){ _oldGetTimer = getTimer(); }; _local5 = getTimer(); _local6 = (_local5 - _oldGetTimer); _local6 = (_local6 * _deltaTimeMultiplier); _deltaTime = (_deltaTime + _local6); _oldGetTimer = _local5; tipsRunOnEnterFrame(_local6); backgroundRunOnEnterFrame(_local6); textTimersRunOnEnterFrame(_local6); _local7 = 1; if (_bulletTimeMs > 0){ _local7 = 0.3; }; if (_gameMode == GAME_MODE_TITLE){ titleRunOnEnterFrame(_local6); } else { if (_gameMode == GAME_MODE_GAME){ gameRunOnEnterFrame((_local6 * _local7)); } else { if (_gameMode == GAME_MODE_LEVEL_EDITOR){ levelEditorRunOnEnterFrame(_local6); } else { if (_gameMode == GAME_MODE_LEVEL_SELECTION){ levelSelectionRunOnEnterFrame(_local6); }; }; }; }; if (_levelEditorDownloadBox != null){ removeChild(_levelEditorDownloadBox); addChild(_levelEditorDownloadBox); _levelEditorDownloadBox.Run(this, _local6); if (_levelEditorDownloadBox._buttonPressedCancel){ _levelEditorDownloadBox.Hide(this); _levelEditorDownloadBox = null; } else { if (_levelEditorDownloadBox._buttonPressedOk){ downloadLevel(_levelEditorDownloadBox._textFieldInput.getRawText()); _levelEditorDownloadBox.Hide(this); _levelEditorDownloadBox = null; }; }; }; _local8 = (_local6 * 0.005); if ((((_gameMode == GAME_MODE_LEVEL_EDITOR)) && ((_levelEditorMode == LEVEL_EDITOR_MODE_EDIT)))){ fadeInBitmap(_bitmapIconPlay, 1, _local8); fadeInBitmap(_bitmapIconClear, 1, _local8); fadeInBitmap(_bitmapIconDownload, 1, _local8); fadeInBitmap(_bitmapIconSubmit, 1, _local8); } else { fadeOutBitmap(_bitmapIconPlay, 0, _local8, false); fadeOutBitmap(_bitmapIconClear, 0, _local8, false); fadeOutBitmap(_bitmapIconDownload, 0, _local8, false); fadeOutBitmap(_bitmapIconSubmit, 0, _local8, false); }; if (_deltaTime > 40){ _deltaTime = 40; }; _local9 = DELTATIME; if (_bulletTimeMs > 0){ _local9 = (_local9 + (DELTATIME * 2.4)); }; while (_deltaTime >= _local9) { _deltaTime = (_deltaTime - _local9); if (_skipRunMs > 0){ _skipRunMs = (_skipRunMs - _local9); } else { if (_gameMode == GAME_MODE_GAME){ gameRun(); } else { if (_gameMode == GAME_MODE_SPLASH){ splashRun(); } else { if (_gameMode == GAME_MODE_LEVEL_SELECTION){ levelSelectionRun(); } else { if (_gameMode == GAME_MODE_LEVEL_EDITOR){ levelEditorRun(); }; }; }; }; }; if (_bulletTimeMs > 0){ _bulletTimeMs = (_bulletTimeMs - _local9); if (_bulletTimeMs < 0){ _bulletTimeMs = 0; }; }; if (_runParticles){ _particleManager.liveParticles(this); }; _runParticles = !(_runParticles); _iterationNumber++; }; if (_infoTextStringLatest != _infoTextStringCurrent){ if (_infoTextField != null){ removeChild(_infoTextField); _infoTextField = null; }; if (_infoTextStringLatest != null){ showInfo(_infoTextStringLatest); }; _infoTextStringCurrent = _infoTextStringLatest; }; if (_gameMode == GAME_MODE_LEVEL_EDITOR){ _local12 = 0; if (_levelEditor1TextField != null){ _local12 = _levelEditor1TextField.alpha; }; if (_infoTextField != null){ _infoTextField.alpha = _local12; }; }; if ((((_gameMode == GAME_MODE_GAME)) || ((_gameMode == GAME_MODE_LEVEL_SELECTION)))){ if (_scoreDirty){ scoreRedraw(); }; }; if (_gameMode != GAME_MODE_TITLE){ if (fadeOutBitmap(_bitmapTitleStart, 0, _local8, true)){ _bitmapTitleStart = null; }; if (fadeOutBitmap(_bitmapTitleLevelEditor, 0, _local8, true)){ _bitmapTitleLevelEditor = null; }; if (fadeOutBitmap(_bitmapTitleHomePage, 0, _local8, true)){ _bitmapTitleHomePage = null; }; if (fadeOutBitmap(_bitmapTitleContinue, 0, _local8, true)){ _bitmapTitleContinue = null; }; if (fadeOutBitmap(_bitmapTitleUp, 0, _local8, true)){ _bitmapTitleUp = null; }; if (fadeOutBitmap(_bitmapTitleDown, 0, _local8, true)){ _bitmapTitleDown = null; }; if (fadeOutSprite(_inputNameBackground, _local8, true)){ _inputNameBackground = null; }; if (fadeOutTextField(_textFieldInputName, _local8)){ _textFieldInputName = null; }; }; if ((((_gameMode == GAME_MODE_GAME)) || ((_gameMode == GAME_MODE_LEVEL_SELECTION)))){ if (_playfieldBoxY == 82){ removeChild(_spriteWhiteCoverBox); addChild(_spriteWhiteCoverBox); removeChild(_spriteScoreBox); addChild(_spriteScoreBox); }; } else { setChildIndex(_spriteScoreBox, (getChildIndex(_spritePlayfieldBox) - 1)); setChildIndex(_spriteWhiteCoverBox, (getChildIndex(_spriteScoreBox) - 1)); }; if ((((_gameMode == GAME_MODE_GAME)) && ((_inGameMode == INGAME_MODE_WAIT_FOR_DROP_OFF)))){ removeChild(_ball); addChild(_ball); removeChild(_ballShadow); removeChild(_ballShadowMin); removeChild(_ballShadowMax); addChild(_ballShadowMin); addChild(_ballShadow); addChild(_ballShadowMax); }; if (_infoTextField != null){ removeChild(_infoTextField); addChild(_infoTextField); }; if (_levelNameTextField != null){ removeChild(_levelNameTextField); addChild(_levelNameTextField); }; if (_tipsTextField != null){ removeChild(_tipsTextField); addChild(_tipsTextField); }; if (_slowMotionTextField != null){ removeChild(_slowMotionTextField); addChild(_slowMotionTextField); }; if (_worldRecordTextField != null){ removeChild(_worldRecordTextField); addChild(_worldRecordTextField); }; if (_bitmapNewGameAlert != null){ removeChild(_bitmapNewGameAlert); addChild(_bitmapNewGameAlert); }; if (_keyDownLeaderboard){ _keyDownLeaderboard = false; if (_mochi){ MochiScores.showLeaderboard({boardID:_MOCHIADS_TOTAL_SCORE_ID}); }; }; if (_mouseClicked){ _mouseClicked = false; }; if (_keyDownEsc){ _keyDownEsc = false; }; if (_keyDownReplay){ _keyDownReplay = false; }; } private function uploadRun():void{ var _local1:URLVariables; var _local2:URLRequest; var _local3:URLLoader; _local1 = new URLVariables(); _local1.player = _playerName; _local1.version = _versionString; _local2 = new URLRequest("http://www.villehelin.com/BallDropOne/run.php"); _local2.method = URLRequestMethod.POST; _local2.data = _local1; _local3 = new URLLoader(_local2); _local3.addEventListener(IOErrorEvent.IO_ERROR, onIOError); _local3.addEventListener(Event.COMPLETE, serverIsAlive); _local3.load(_local2); } public function fadeOutTextField(_arg1:TextField, _arg2:Number):Boolean{ if (_arg1 == null){ return (false); }; if (_arg1.alpha > 0){ _arg1.alpha = (_arg1.alpha - _arg2); if (_arg1.alpha < 0){ _arg1.alpha = 0; removeChild(_arg1); return (true); }; }; return (false); } private function uploadLevelScoreInGameTotal(_arg1:String, _arg2:int, _arg3:int):void{ var _local4:int; var _local5:URLVariables; var _local6:URLRequest; var _local7:URLLoader; _local4 = (_arg3 & 0xFFFF); oneTimePadSetSeed((_arg2 + 404), _local4); _local5 = new URLVariables(); _local5.player = _playerName; _local5.version = _versionString; _local5.score = _arg3; _local5.session = _arg1; _local5.game = _arg2; _local5.magic = oneTimePadGetNextValue(); _local6 = new URLRequest("http://www.villehelin.com/BallDropOne/levelScoreInGameTotalAdd.php"); _local6.method = URLRequestMethod.POST; _local6.data = _local5; _local7 = new URLLoader(_local6); _local7.addEventListener(IOErrorEvent.IO_ERROR, onIOError); _local7.addEventListener(Event.COMPLETE, serverIsAlive); _local7.load(_local6); } private function titleMenuItemClickedContinue():void{ backupPlayerName(); _gameSaveCounter = 1; _game++; _ballRadiusMax = 13; _ballRadiusMin = 10; _scoreTotal = 0; _scoreAdder = 0; _scoreMultiplier = 1; _levels.reset(this); levelSelectionStartFadeIn(); scoreRedraw(); _gameRestart = false; _mouseClicked = false; if (_sfxEnabled){ _soundSelection2.play(0, 1, _soundTransformVolumeHigh); _soundMystery.play(0, 1, _soundTransformVolumeHigh); }; } public function levelEditorStartFadeOut():void{ _levelEditorMode = LEVEL_EDITOR_MODE_FADE_OUT; } public function gameRun():void{ var _local1:Ball; var _local2:int; if (_ball._maxBoostedTimer > 0){ _ball.liveBoostedTimer(this); }; _local2 = 0; while (_local2 < _levelBalls.length) { _local1 = _levelBalls[_local2]; if (((!((_local1 == null))) && (!((_local1._type == Ball.BALL_TYPE_DEAD))))){ _local1.live(this); }; _local2++; }; gameRunPlayerBall(_ball); _local2 = 0; while (_local2 < _levelBalls.length) { _local1 = _levelBalls[_local2]; if (((((!((_local1 == null))) && ((_local1._type == Ball.BALL_TYPE_PLAYER)))) && (_local1._freeFall))){ gameRunPlayerBall(_local1); if (!_local1._freeFall){ _levelBalls[_local2] = null; }; }; _local2++; }; } public function fadeInBitmap(_arg1:Bitmap, _arg2:Number, _arg3:Number):Boolean{ if (_arg1 == null){ return (false); }; if (_arg1.alpha < _arg2){ _arg1.visible = true; _arg1.alpha = (_arg1.alpha + _arg3); if (_arg1.alpha > _arg2){ _arg1.alpha = _arg2; return (true); }; }; return (false); } public function addBitmapFadeParticleFromBall(_arg1:Ball, _arg2:Number):void{ var _local3:Particle; _local3 = _particleManager.addParticle(this, Particle.PARTICLE_TYPE_BITMAP_FADE, _arg1._x, _arg1._y, 0); if (_local3 != null){ _local3._speedX = 0; _local3._speedY = 0; _local3._bitmap = _arg1._bitmap; _local3._radiusAdder = _arg2; _arg1._bitmap = null; _local3.launch(); }; } public function splashRunOnEnterFrame():void{ _spriteWhiteCoverBox.visible = false; } public function titleRunOnEnterFrame(_arg1:Number):void{ var _local2:Boolean; var _local3:Boolean; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:Boolean; if (_continueRecheck){ _continueRecheck = false; isContinueAvailable(); }; bgmPlay(BGM_ID_MENU, false); fadeOutLevelEditor(_arg1); if (fadeOutTextField(_scoreTextField, (_arg1 * 0.001))){ _scoreTextField = null; }; if (fadeOutTextField(_totalScoreTextField, (_arg1 * 0.001))){ _totalScoreTextField = null; }; if (fadeOutTextField(_bestScoreTextField, (_arg1 * 0.001))){ _bestScoreTextField = null; }; if (fadeOutTextField(_levelNameTextField, (_arg1 * 0.001))){ _levelNameTextField = null; }; if (_levelBalls != null){ if (!Levels.destroyOneBall(_levelBalls, this)){ _levelBalls = null; }; }; _spriteWhiteCoverBox.visible = false; if ((((_levelBalls == null)) && ((_playfieldBoxY < 4)))){ if (_bitmapTitleStart == null){ _bitmapTitleStart = new Bitmap(new _classTitleStart().bitmapData); titleMenuItemInit(_bitmapTitleStart, 325); } else { fadeInBitmap(_bitmapTitleStart, 0.8, (_arg1 * 0.002)); }; if (_bitmapTitleContinue == null){ _bitmapTitleContinue = new Bitmap(new _classTitleContinue().bitmapData); titleMenuItemInit(_bitmapTitleContinue, (325 + 45)); } else { if (_continueAvailable){ fadeInBitmap(_bitmapTitleContinue, 0.8, (_arg1 * 0.002)); } else { fadeInBitmap(_bitmapTitleContinue, 0.4, (_arg1 * 0.002)); }; }; if (_bitmapTitleLevelEditor == null){ _bitmapTitleLevelEditor = new Bitmap(new _classTitleLevelEditor().bitmapData); titleMenuItemInit(_bitmapTitleLevelEditor, ((325 + 45) + 45)); } else { fadeInBitmap(_bitmapTitleLevelEditor, 0.8, (_arg1 * 0.002)); }; if (_bitmapTitleHomePage == null){ _bitmapTitleHomePage = new Bitmap(new _classTitleHomePage().bitmapData); titleMenuItemInit(_bitmapTitleHomePage, (((325 + 45) + 45) + 45)); } else { fadeInBitmap(_bitmapTitleHomePage, 0.8, (_arg1 * 0.002)); }; if (_inputNameBackground == null){ _inputNameBackground = new Sprite(); _inputNameBackground.graphics.clear(); _inputNameBackground.graphics.lineStyle(); _inputNameBackground.graphics.beginFill(7045286, 1); _inputNameBackground.graphics.drawRoundRect(-70, 0, 140, 24, 10, 10); _inputNameBackground.graphics.endFill(); _inputNameBackground.alpha = 0; _inputNameBackground.x = (SCREEN_DX * 0.5); _inputNameBackground.y = ((((325 + 45) + 45) + 45) + 40); addChild(_inputNameBackground); } else { fadeInSprite(_inputNameBackground, 1, (_arg1 * 0.002)); }; if (_textFieldInputName == null){ _textFieldInputName = FontBank.getTextField(this, "MassiveHeadache", 20, 0xFFFFFF); _textFieldInputName.x = (SCREEN_DX * 0.5); _textFieldInputName.y = ((((325 + 45) + 45) + 45) + 40); _textFieldInputName.text = _playerName; _textFieldInputName.mouseEnabled = true; _textFieldInputName.type = TextFieldType.INPUT; _textFieldInputName.maxChars = 12; _textFieldInputName.alpha = 0; addChild(_textFieldInputName); } else { fadeInTextField(_textFieldInputName, 1, (_arg1 * 0.002)); }; if (_bitmapTitleUp == null){ _bitmapTitleUp = new Bitmap(new _classTitleUp().bitmapData); _bitmapTitleUp.x = (((SCREEN_DX * 0.5) - (_bitmapTitleUp.width * 0.5)) + 10); _bitmapTitleUp.y = 30; _bitmapTitleUp.visible = true; _bitmapTitleUp.alpha = 0; _bitmapTitleUp.smoothing = true; addChild(_bitmapTitleUp); } else { fadeInBitmap(_bitmapTitleUp, 0.8, (_arg1 * 0.002)); }; if (_bitmapTitleDown == null){ _bitmapTitleDown = new Bitmap(new _classTitleDown().bitmapData); _bitmapTitleDown.x = ((SCREEN_DX * 0.5) - (_bitmapTitleDown.width * 0.5)); _bitmapTitleDown.y = ((SCREEN_DY - _bitmapTitleDown.height) - 45); _bitmapTitleDown.visible = true; _bitmapTitleDown.alpha = 0; _bitmapTitleDown.smoothing = true; addChild(_bitmapTitleDown); } else { fadeInBitmap(_bitmapTitleDown, 0.8, (_arg1 * 0.002)); }; _local2 = false; if (_bitmapNewGameAlert != null){ _local2 = true; }; _local3 = titleMenuItemHandle(_bitmapTitleStart, titleMenuItemClickedStart, "START A NEW GAME", 325, _arg1, _local2); if (_local3){ _local2 = true; }; if (!_continueAvailable){ titleMenuItemHandle(_bitmapTitleContinue, titleMenuItemClickedContinue, "CONTINUE GAME", (325 + 45), _arg1, true); } else { if (_local3){ _local2 = true; }; _local3 = titleMenuItemHandle(_bitmapTitleContinue, titleMenuItemClickedContinue, "CONTINUE GAME", (325 + 45), _arg1, _local2); }; if (_local3){ _local2 = true; }; _local3 = titleMenuItemHandle(_bitmapTitleLevelEditor, titleMenuItemClickedLevelEditor, "CREATE AND PLAY YOUR OWN LEVELS", ((325 + 45) + 45), _arg1, _local2); if (_local3){ _local2 = true; }; _local3 = titleMenuItemHandle(_bitmapTitleHomePage, titleMenuItemClickedHomePage, "READ NEWS, GLOBAL HIGH SCORES, AND INSTRUCTIONS", (((325 + 45) + 45) + 45), _arg1, _local2); if (((!((_bitmapNewGameAlert == null))) && (_mouseClicked))){ _local4 = _bitmapNewGameAlert.x; _local5 = (_local4 + _bitmapNewGameAlert.width); _local6 = (_bitmapNewGameAlert.y + _bitmapNewGameAlert.height); _local7 = (_local6 - 40); _local8 = 90; _local9 = false; if ((((((((_mouseMovedToX >= _local4)) && ((_mouseMovedToX <= (_local4 + _local8))))) && ((_mouseMovedToY >= _local7)))) && ((_mouseMovedToY <= _local6)))){ _mouseClicked = false; _local9 = true; titleStartANewGame(); }; if ((((((((_mouseMovedToX >= (_local5 - _local8))) && ((_mouseMovedToX <= _local5)))) && ((_mouseMovedToY >= _local7)))) && ((_mouseMovedToY <= _local6)))){ _local9 = true; }; if (_local9){ removeChild(_bitmapNewGameAlert); _bitmapNewGameAlert = null; }; }; }; } public function showLevelName():void{ var _local1:TextField; _local1 = FontBank.getTextField(this, "Zachary", 18, 0xFFFFFF); _local1.x = (BallDropOne.SCREEN_DX / 2); _local1.y = (BallDropOne.SCREEN_DY - 53); _local1.text = _levelNameString; if (_levelNameTextField != null){ removeChild(_levelNameTextField); }; _levelNameTextField = _local1; addChild(_local1); } private function kongregateLoadComplete(_arg1:Event):void{ var _local2:String; _kongregate = _arg1.target.content; if (_kongregate != null){ _kongregate.services.connect(); trace(("\n" + _kongregate.services)); trace(("\n" + _kongregate.user)); trace(("\n" + _kongregate.scores)); trace(("\n" + _kongregate.stats)); }; _local2 = _kongregate.user.getName(); if (((!((_local2 == null))) && ((_local2.length < 25)))){ _playerName = _local2; if (_textFieldInputName != null){ _textFieldInputName.text = _playerName; }; }; _initOk = true; } private function onIOError(_arg1:Event):void{ _serverAlive = false; trace(_arg1.target.data); } private function uploadLevelScoreInGame(_arg1:int, _arg2:int):void{ var _local3:int; var _local4:URLVariables; var _local5:URLRequest; var _local6:URLLoader; if (_arg2 <= 0){ return; }; _local3 = (_arg2 & 0xFFFF); oneTimePadSetSeed((_arg1 + 1), _local3); _local4 = new URLVariables(); _local4.player = _playerName; _local4.version = _versionString; _local4.level = (_arg1 + 1); _local4.score = _arg2; _local4.magic = oneTimePadGetNextValue(); _uploadedScoreLevel = _arg1; _local5 = new URLRequest("http://www.villehelin.com/BallDropOne/levelScoreInGameAdd.php"); _local5.method = URLRequestMethod.POST; _local5.data = _local4; _local6 = new URLLoader(_local5); _local6.addEventListener(IOErrorEvent.IO_ERROR, onIOError); _local6.addEventListener(Event.COMPLETE, parseLevelScorePositionInGame); _local6.load(_local5); } private function parseInGameHiScores(_arg1:Event):void{ var _local2:String; var _local3:Array; var _local4:int; _local2 = URLLoader(_arg1.target).data; _local3 = _local2.split(" "); if ((((_local3 == null)) || ((_local3.length < 51)))){ return; }; _local4 = 0; while (_local4 < 25) { if (_levels._levelScoresBest[_local4] <= int(_local3[((_local4 * 2) + 2)])){ _levels._levelScoresBestNames[_local4] = _local3[((_local4 * 2) + 1)]; _levels._levelScoresBest[_local4] = int(_local3[((_local4 * 2) + 2)]); }; _local4++; }; serverIsAlive(_arg1); } private function onIOErrorWithText(_arg1:Event):void{ _addFailedText = true; onIOError(_arg1); } private function downloadUserLevelHighScore(_arg1:int):void{ var _local2:URLVariables; var _local3:URLRequest; var _local4:URLLoader; _local2 = new URLVariables(); _local2.level = _arg1; _local3 = new URLRequest("http://www.villehelin.com/BallDropOne/levelScoreUserGetTop.php"); _local3.method = URLRequestMethod.POST; _local3.data = _local2; _local4 = new URLLoader(_local3); _local4.addEventListener(Event.COMPLETE, parseUserHiScore); _local4.addEventListener(IOErrorEvent.IO_ERROR, onIOError); _local4.load(_local3); } private function levelEditorBallsBackup():void{ var _local1:int; if (_levelBalls == null){ _levelEditorBallsDNA = null; return; }; _levelEditorBallsDNA = new Array(_levelBalls.length); _local1 = 0; while (_local1 < _levelBalls.length) { _levelEditorBallsDNA[_local1] = new BallDNA(_levelBalls[_local1]); _local1++; }; } private function thrustBall(_arg1:Ball):void{ var _local2:Number; var _local3:Number; var _local4:Number; _local2 = (_arg1._x - _mouseMovedToX); _local3 = (_arg1._y - _mouseMovedToY); _local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); if (_local4 <= 0.1){ return; }; _local2 = (_local2 / _local4); _local3 = (_local3 / _local4); _arg1._speedX = (_arg1._speedX - ((_local2 * 0.5) * SPEEDMUL)); _arg1._speedY = (_arg1._speedY - ((_local3 * 0.5) * SPEEDMUL)); _local2 = _arg1._speedX; _local3 = _arg1._speedY; _local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3))); if (_local4 > 3){ _arg1._speedX = (_arg1._speedX / _local4); _arg1._speedY = (_arg1._speedY / _local4); _arg1._speedX = (_arg1._speedX * 3); _arg1._speedY = (_arg1._speedY * 3); }; } private function manageBallHeights():void{ var _local1:int; var _local2:Ball; if (_levelBalls == null){ return; }; if (_ball != null){ manageBallHeight(_ball); }; _local1 = 0; while (_local1 < _levelBalls.length) { _local2 = _levelBalls[_local1]; if (_local2 == null){ } else { if ((((_local2._type == Ball.BALL_TYPE_PLAYER)) && (_local2._freeFall))){ manageBallHeight(_local2); }; }; _local1++; }; } public function splashRun():void{ } private function keyBallTest():void{ var _local1:int; var _local2:TextField; var _local3:Ball; _local1 = 0; while (_local1 < _levelBalls.length) { _local3 = _levelBalls[_local1]; if (((((!((_local3 == null))) && ((_local3._type == Ball.BALL_TYPE_KEY)))) && ((_local3._touched <= 0)))){ return; }; _local1++; }; _bulletTimeMs = 3000; _local1 = 0; while (_local1 < _levelBalls.length) { _local3 = _levelBalls[_local1]; if (((!((_local3 == null))) && ((_local3._type == Ball.BALL_TYPE_KEY)))){ _local3._explodeTimer = 2; }; _local1++; }; _local2 = FontBank.getTextField(this, "MassiveHeadache", 22, 16776842); _local2.text = "HIT ALL KEY BALLS! "; bonusTextFieldAdd(_local2, 3000); } private function uploadLevelScoreUser(_arg1:int, _arg2:int):void{ var _local3:int; var _local4:URLVariables; var _local5:URLRequest; var _local6:URLLoader; if (_arg2 <= 0){ return; }; _local3 = (_arg2 & 0xFFFF); oneTimePadSetSeed(_arg1, _local3); _local4 = new URLVariables(); _local4.player = _playerName; _local4.version = _versionString; _local4.level = _arg1; _local4.score = _arg2; _local4.magic = oneTimePadGetNextValue(); _uploadedScoreLevel = _arg1; _local5 = new URLRequest("http://www.villehelin.com/BallDropOne/levelScoreUserAdd.php"); _local5.method = URLRequestMethod.POST; _local5.data = _local4; _local6 = new URLLoader(_local5); _local6.addEventListener(IOErrorEvent.IO_ERROR, onIOError); _local6.addEventListener(Event.COMPLETE, parseLevelScorePositionUser); _local6.load(_local5); } public function onKeyUp(_arg1:KeyboardEvent):void{ if (_arg1.charCode == "a".charCodeAt(0)){ _keyDownArrowLeft = false; } else { if (_arg1.charCode == "d".charCodeAt(0)){ _keyDownArrowRight = false; } else { if (_arg1.charCode == "w".charCodeAt(0)){ _keyDownArrowUp = false; } else { if (_arg1.charCode == "s".charCodeAt(0)){ _keyDownArrowDown = false; } else { if (_arg1.charCode == "g".charCodeAt(0)){ _keyDownGrid = false; } else { if (_arg1.charCode == "z".charCodeAt(0)){ _keyDownArrowUpLeft = false; } else { if (_arg1.charCode == "x".charCodeAt(0)){ _keyDownArrowUpRight = false; } else { if ((((_arg1.charCode == Keyboard.BACKSPACE)) || ((_arg1.charCode == Keyboard.DELETE)))){ _keyDownDelete = false; } else { if (_arg1.charCode == Keyboard.SPACE){ _keyDownGrab = false; } else { if (_arg1.charCode == Keyboard.ESCAPE){ _keyDownEsc = false; }; }; }; }; }; }; }; }; }; }; } public function fadeInSprite(_arg1:Sprite, _arg2:Number, _arg3:Number):Boolean{ if (_arg1 == null){ return (false); }; if (_arg1.alpha < _arg2){ _arg1.alpha = (_arg1.alpha + _arg3); if (_arg1.alpha > _arg2){ _arg1.alpha = _arg2; return (true); }; }; return (false); } public function animateLevelBalls(_arg1:Number):void{ var _local2:Ball; var _local3:int; if (_levelBalls == null){ return; }; _local3 = 0; while (_local3 < _levelBalls.length) { _local2 = _levelBalls[_local3]; if ((((((_local2 == null)) || ((_local2._state == Ball.BALL_STATE_DEAD)))) || ((_local2._type == Ball.BALL_TYPE_DEAD)))){ } else { _local2.animate(this, _arg1); }; _local3++; }; } public function levelSelectionStartFadeOut():void{ var _local1:int; _levelSelectedBackground.visible = false; _local1 = 0; while (_local1 < _levels._levelPictures.length) { if (_levels._levelPictures[_local1].visible){ removeChild(_levels._levelPictures[_local1]); addChild(_levels._levelPictures[_local1]); }; if (_levels._levelLockSprites[_local1] != null){ removeChild(_levels._levelLockSprites[_local1]); addChild(_levels._levelLockSprites[_local1]); }; if (_levels._levelScoresTextFields[_local1].visible){ removeChild(_levels._levelScoresTextFields[_local1]); addChild(_levels._levelScoresTextFields[_local1]); }; _local1++; }; _local1 = 0; while (_local1 < _levels._levelSpecialBallMarkers.length) { if (_levels._levelSpecialBallMarkers[_local1] != null){ removeChild(_levels._levelSpecialBallMarkers[_local1]); addChild(_levels._levelSpecialBallMarkers[_local1]); _levels._levelSpecialBallMarkers[_local1]._speedX = (((Math.random() * 0.1) - 0.05) * SPEEDMUL); _levels._levelSpecialBallMarkers[_local1]._speedY = ((Math.random() * 0.1) * SPEEDMUL); }; _local1++; }; _particleManager.keepOnTop(this, Particle.PARTICLE_TYPE_LOCK_PIECE); _local1 = 0; while (_local1 < _levels._levelPictures.length) { _levels._levelPicturesSpeedX[_local1] = (((Math.random() * 0.1) - 0.05) * SPEEDMUL); _levels._levelPicturesSpeedY[_local1] = ((Math.random() * 0.1) * SPEEDMUL); _levels._levelPicturesX[_local1] = _levels._levelPictures[_local1].x; _levels._levelPicturesY[_local1] = _levels._levelPictures[_local1].y; _levels._levelScoresTextFieldsSpeedX[_local1] = (((Math.random() * 0.1) - 0.05) * SPEEDMUL); _levels._levelScoresTextFieldsSpeedY[_local1] = ((Math.random() * 0.1) * SPEEDMUL); _levels._levelScoresTextFieldsX[_local1] = _levels._levelScoresTextFields[_local1].x; _levels._levelScoresTextFieldsY[_local1] = _levels._levelScoresTextFields[_local1].y; _local1++; }; _levelSelectionMode = LEVEL_SELECTION_MODE_FADE_OUT; } private function ballSelectionReset():void{ var _local1:int; if (_levelBalls == null){ return; }; _local1 = 0; while (_local1 < _levelBalls.length) { if (_levelBalls[_local1] != null){ if (_levelBalls[_local1]._boostCounter > 0){ _levelBalls[_local1]._boostCounter = 0; _levelBalls[_local1].resetGraphics(this); }; }; _local1++; }; } private function parseUserHiScore(_arg1:Event):void{ var _local2:String; var _local3:Array; _local2 = URLLoader(_arg1.target).data; _local3 = _local2.split(" "); if ((((_local3 == null)) || ((_local3.length < 3)))){ return; }; _levelEditorHiScoreName = _local3[1]; _levelEditorHiScore = int(_local3[2]); scoreRedraw(); serverIsAlive(_arg1); } private function saveGameCheck(_arg1:SharedObject):Boolean{ var _local2:int; if (((!((_arg1.data.versionString == "1.10"))) && (!((_arg1.data.versionString == "1.11"))))){ return (false); }; _local2 = saveGameCalculateMagic(_arg1); if (_arg1.data.magic != _local2){ return (false); }; return (true); } private function onMouseUp(_arg1:MouseEvent):void{ _mouseUp = true; _mouseDown = false; } public function findBall(_arg1:Number, _arg2:Number):int{ var _local3:int; var _local4:Number; var _local5:Number; var _local6:int; var _local7:Ball; if (_levelBalls == null){ return (-1); }; _local3 = -1; _local6 = 0; while (_local6 < _levelBalls.length) { _local7 = _levelBalls[_local6]; if ((((((((_local7 == null)) || ((_local7._type == Ball.BALL_TYPE_DEAD)))) || ((_local7._type == Ball.BALL_TYPE_DESTROYED)))) || (_local7._freeFall))){ } else { if ((((_local7._type == Ball.BALL_TYPE_BOX_GLASS)) || ((_local7._type == Ball.BALL_TYPE_BOX_TOUGH)))){ if (((((((((_local7._x - (_local7._width * 0.5)) <= _arg1)) && (((_local7._x + (_local7._width * 0.5)) >= _arg1)))) && (((_local7._y - (_local7._height * 0.5)) <= _arg2)))) && (((_local7._y + (_local7._height * 0.5)) >= _arg2)))){ _local3 = _local6; }; } else { _local4 = (_arg1 - _local7._x); _local5 = (_arg2 - _local7._y); if (Math.sqrt(((_local4 * _local4) + (_local5 * _local5))) <= _local7._radius){ _local3 = _local6; }; }; }; _local6++; }; return (_local3); } public function fadeOutLevelEditor(_arg1:Number):void{ _arg1 = (_arg1 * 0.003); if (fadeOutSprite(_levelEditorBall, _arg1, true)){ _levelEditorBall = null; }; if (fadeOutSprite(_levelEditorBallMouse, _arg1, true)){ _levelEditorBallMouse = null; }; if (fadeOutTextField(_levelEditor1TextField, _arg1)){ _levelEditor1TextField = null; }; if (fadeOutTextField(_levelEditor2TextField, _arg1)){ _levelEditor2TextField = null; }; if (fadeOutTextField(_levelEditorBallsLeftTextField, _arg1)){ _levelEditorBallsLeftTextField = null; }; } private function titleMenuItemClickedInstructions():void{ if (_sfxEnabled){ _soundSelection2.play(0, 1, _soundTransformVolumeHigh); }; navigateToURL(new URLRequest("http://www.villehelin.com/flash.html"), "_blank"); } private function showWorldRanking(_arg1:int):void{ _worldRecordTimer = 3000; if (_worldRecordTextField != null){ removeChild(_worldRecordTextField); }; _worldRecordTextField = FontBank.getTextField(this, "MassiveHeadache", 30, 5389148); _worldRecordTextField.x = (SCREEN_DX >> 1); _worldRecordTextField.y = (SCREEN_DY >> 1); _worldRecordTextField.text = (("RANK: " + _arg1) + " "); addChild(_worldRecordTextField); } public function gameLoad():Boolean{ var _local1:SharedObject; if (!_continueAvailable){ return (false); }; _local1 = SharedObject.getLocal("BallDropOneSaveFile"); if (saveGameCheck(_local1) == false){ return (false); }; _playerName = _local1.data.playerName; _session = _local1.data.session; _levels._levelScores = _local1.data.levelScores; _levels._specialBallsCollected = _local1.data.specialBallsCollected; _levels._specialBalls = _local1.data.specialBalls; _levels._levelStatuses = _local1.data.levelStatuses; _scoreTotal = _local1.data.scoreTotal; _ballRadiusMin = _local1.data.ballRadiusMin; _ballRadiusMax = _local1.data.ballRadiusMax; return (true); } public function gameTestForSpecialBonuses():void{ var _local1:Boolean; var _local2:Boolean; var _local3:TextField; var _local4:int; var _local5:Ball; _local1 = true; _local2 = true; _local4 = 0; while (_local4 < _levelBalls.length) { _local5 = _levelBalls[_local4]; if ((((((_local5 == null)) || ((_local5._type == Ball.BALL_TYPE_DEAD)))) || ((_local5._type == Ball.BALL_TYPE_DESTROYED)))){ } else { if ((((((_local5._type == Ball.BALL_TYPE_ELTOPO)) || ((_local5._type == Ball.BALL_TYPE_TTURSAS)))) || ((_local5._type == Ball.BALL_TYPE_RED)))){ } else { if (_local5._type == Ball.BALL_TYPE_PLAYER){ if (_local5._touched == 970){ _local1 = false; }; } else { if (_local5._touched == 0){ _local1 = false; }; }; if ((((((((_local5._type == Ball.BALL_TYPE_GREEN)) || ((_local5._type == Ball.BALL_TYPE_GHOST)))) || ((_local5._type == Ball.BALL_TYPE_GHOST_HIDDEN)))) || ((_local5._type == Ball.BALL_TYPE_BOX_TOUGH)))){ } else { if ((((_local5._type == Ball.BALL_TYPE_PLAYER)) && (_local5._freeFall))){ } else { if (_local5._shrinkTimer < 0){ _local2 = false; }; }; }; }; }; _local4++; }; if (((_local1) && (!(_bonusTouchedAll)))){ _local3 = FontBank.getTextField(this, "MassiveHeadache", 22, 14998015); _local3.text = "TOUCHED ALL +50PTS! "; bonusTextFieldAdd(_local3, 2000); scoreAdd(50); _bonusTouchedAll = true; }; if (((_local2) && (!(_bonusDestroyedAll)))){ _local3 = FontBank.getTextField(this, "MassiveHeadache", 22, 14998015); _local3.text = "DESTROYED ALL +100PTS! "; bonusTextFieldAdd(_local3, 2000); scoreAdd(100); _bonusDestroyedAll = true; }; } private function parseLevelScorePositionInGame(_arg1:Event):void{ var _local2:String; var _local3:Array; var _local4:int; _local2 = URLLoader(_arg1.target).data; _local3 = _local2.split(" "); if ((((_local3 == null)) || ((_local3.length < 1)))){ return; }; _local4 = int(_local3[0]); if (_local4 == 1){ worldRecordGot(_uploadedScoreLevel, true); } else { showWorldRanking(_local4); }; } public function isBallContained(_arg1:Ball):Boolean{ var _local2:int; var _local3:Ball; var _local4:Number; var _local5:Number; var _local6:Number; _local2 = 0; while (_local2 < _levelBalls.length) { _local3 = _levelBalls[_local2]; if ((((((((_local3 == null)) || ((_local3._state == Ball.BALL_STATE_DEAD)))) || ((_local3._type == Ball.BALL_TYPE_DEAD)))) || ((_local3._type == Ball.BALL_TYPE_DESTROYED)))){ } else { if (_arg1 == _local3){ } else { _local4 = (_arg1._x - _local3._x); _local5 = (_arg1._y - _local3._y); _local6 = (_arg1._radius - _local3._radius); if (((_local4 * _local4) + (_local5 * _local5)) <= (_local6 * _local6)){ return (true); }; }; }; _local2++; }; return (false); } public function levelSelectionStartFadeIn():void{ var _local1:SharedObject; if (_gameSaveCounter == 0){ gameSave(); } else { _gameSaveCounter--; }; if (!_jesusAmen){ _local1 = SharedObject.getLocal("SpecialBonus"); _local1.data.isPlayerSpecial = "yes!"; _local1.data.versionString = _versionString; _local1.flush(); }; _ballShadow.visible = false; _ballShadowMin.visible = false; _ballShadowMax.visible = false; _ball.visible = false; _levels.levelSelectionSpritesAdd(this); _levels.levelSelectionResetFadeIn(this); _levelSelectionMode = LEVEL_SELECTION_MODE_FADE_IN; _gameMode = GAME_MODE_LEVEL_SELECTION; _inGameMode = INGAME_MODE_GAME; _tipsTimer = -150; if (_levelNameTextField != null){ removeChild(_levelNameTextField); _levelNameTextField = null; }; _updateHighScores--; if (_updateHighScores < 0){ _updateHighScores = 5; downloadHighScores(); }; } private function goToDropOffMode(_arg1:Boolean):void{ _inGameMode = INGAME_MODE_WAIT_FOR_DROP_OFF; _ball.resize(10, this); _ball.visible = true; _ball.alpha = 0; _ball._touched = 970; addChild(_ball); _ballShadow.resize(10, this); _ballShadow.alpha = 0; _ballShadow.visible = true; if (_levels._level >= 0){ _ballShadowMin.resize(_ballRadiusMin, this); } else { _ballShadowMin.resize(4, this); }; _ballShadowMin.alpha = 0; _ballShadowMin.visible = true; if (_levels._level >= 0){ _ballShadowMax.resize(_ballRadiusMax, this); } else { _ballShadowMax.resize(20, this); }; _ballShadowMax.alpha = 0; _ballShadowMax.visible = true; _ballShrinksAndGrows = -1; if (_arg1){ _bonusDestroyedAll = false; _bonusTouchedAll = false; _playTime++; _ballMaxHeight = 0; _blackBallsBusted = 0; scoreRedraw(); if (((!((_kongregate == null))) && (_jesusAmen))){ _kongregate.stats.submit("LevelsPlayed", 1); }; }; } private function explodePlayerBall(_arg1:Ball, _arg2:Boolean):void{ var _local3:int; Ball.destroy(_arg1, true, this, true); _arg1._explode = false; _arg1._freeFall = false; _arg1._speedX = 0; _arg1._speedY = 0; _arg1.visible = false; if (((_arg2) && (_sfxEnabled))){ _soundPlayerDeath.play(0, 1, _soundTransformVolumeHigh); }; if (_arg1 == _ball){ _local3 = 0; while (_local3 < _levelBalls.length) { _arg1 = _levelBalls[_local3]; if (((((!((_arg1 == null))) && ((_arg1._type == Ball.BALL_TYPE_PLAYER)))) && (_arg1._freeFall))){ _ball = _arg1; _levelBalls[_local3] = null; break; }; _local3++; }; }; } public function tipsRunOnEnterFrame(_arg1:Number):void{ var _local2:Number; var _local3:TextField; var _local4:int; var _local5:String; _local2 = (_arg1 * 0.01); if (_bulletTimeMs > 0){ if (_tipsTextField != null){ _tipsTextField.visible = false; }; if (_slowMotionTextField != null){ removeChild(_slowMotionTextField); }; _local3 = FontBank.getTextField(this, "Zachary", 18, 11195831); _local3.x = (BallDropOne.SCREEN_DX / 2); _local3.y = (BallDropOne.SCREEN_DY - 76); _local3.text = (("SLOMO " + int(((_bulletTimeMs / 1000) + 1))) + "s "); _local3.alpha = 1; _slowMotionTextField = _local3; addChild(_local3); return; }; if (_slowMotionTextField != null){ removeChild(_slowMotionTextField); _slowMotionTextField = null; }; if (_tipsTextField != null){ _tipsTextField.visible = true; }; if ((((((_gameMode == GAME_MODE_GAME)) || ((_gameMode == GAME_MODE_LEVEL_SELECTION)))) || ((_gameMode == GAME_MODE_LEVEL_EDITOR)))){ if (_tipsTextField == null){ if (_tipsTimer < 0){ _tipsTimer = (_tipsTimer + (_arg1 * 0.1)); return; }; _local4 = 16181448; if (_gameMode == GAME_MODE_LEVEL_EDITOR){ _local5 = TIPS_LEVEL_EDITOR[_tipsIDLevelEditor]; _tipsIDLevelEditor++; if (_tipsIDLevelEditor == TIPS_LEVEL_EDITOR.length){ _tipsIDLevelEditor = 0; }; } else { _local5 = TIPS_INGAME[_tipsIDInGame]; _tipsIDInGame++; if (_tipsIDInGame == TIPS_INGAME.length){ _tipsIDInGame = 0; }; }; if (_local5 == null){ if (_serverAlive){ _local5 = "INFO : SERVER IS ALIVE! "; _local4 = 11195831; } else { _local5 = "INFO : NO CONNECTION TO SERVER! "; _local4 = 15977937; }; }; _local3 = FontBank.getTextField(this, "Zachary", 11, _local4); _local3.x = (BallDropOne.SCREEN_DX / 2); _local3.y = (BallDropOne.SCREEN_DY - 72); _local3.text = _local5; _local3.alpha = 0; _tipsTextField = _local3; _tipsTimer = 400; addChild(_tipsTextField); } else { if (_tipsTimer > 0){ _tipsTimer = (_tipsTimer - (_arg1 * 0.1)); if (_tipsTextField.alpha < 1){ _tipsTextField.alpha = (_tipsTextField.alpha + _local2); if (_tipsTextField.alpha >= 1){ _tipsTextField.alpha = 1; }; }; } else { _tipsTextField.alpha = (_tipsTextField.alpha - _local2); if (_tipsTextField.alpha <= 0){ removeChild(_tipsTextField); _tipsTextField = null; _tipsTimer = -150; }; }; }; } else { if (_tipsTextField != null){ _tipsTextField.alpha = (_tipsTextField.alpha - _local2); if (_tipsTextField.alpha <= 0){ removeChild(_tipsTextField); _tipsTextField = null; _tipsTimer = -150; }; }; }; } public function levelEditorRunOnEnterFrame(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Ball; var _local6:int; var _local7:int; var _local8:Boolean; var _local9:Number; var _local10:Number; var _local11:TextField; var _local12:Number; var _local13:Number; var _local14:Array; var _local15:Number; _local9 = _mouseMovedToX; _local10 = _mouseMovedToY; if (_downloadedLevel != null){ if (_levelBalls != null){ if (!Levels.destroyOneBall(_levelBalls, this)){ _levelBalls = null; }; } else { _levelEditorBallsDNA = Levels.convertLevelArrayToDNA(_downloadedLevel); _downloadedLevel = null; }; }; if (_levelEditorBallsDNA != null){ if (_levelBalls == null){ _levelBalls = new Array(_levelEditorBallsDNA.length); _local6 = 0; while (_local6 < _levelBalls.length) { _levelBalls[_local6] = null; _local6++; }; }; if (!Levels.returnOneBall(_levelBalls, _levelEditorBallsDNA, this)){ _levelEditorBallsDNA = null; }; if (_levelBalls == null){ _levelEditorBallsLeft = LEVEL_EDITOR_BALLS_MAX; } else { _levelEditorBallsLeft = (LEVEL_EDITOR_BALLS_MAX - _levelBalls.length); }; }; if (((_levelEditorGrid) && (!((_levelEditorBallMouse == null))))){ _local6 = (SCREEN_DX >> 1); _local7 = SCREEN_DY; _local8 = true; if ((((_levelEditorBallMouse._type == Ball.BALL_TYPE_BOX_TOUGH)) || ((_levelEditorBallMouse._type == Ball.BALL_TYPE_BOX_GLASS)))){ _local12 = ((_levelEditorBoxWidth * 0.5) + 3); _local13 = ((_levelEditorBoxHeight * 0.5) + 3); } else { _local12 = (_levelEditorBallRadius + 3); _local13 = _local12; }; _local12 = (_local12 * 0.25); _local13 = (_local13 * 0.25); while (_local8) { _local8 = false; _local3 = (_local6 - _mouseMovedToX); _local4 = (_local7 - _mouseMovedToY); if (_local3 < -(_local12)){ _local6 = (_local6 + int((_local12 * 2))); _local8 = true; } else { if (_local3 > _local12){ _local6 = (_local6 - int((_local12 * 2))); _local8 = true; }; }; if (_local4 < -(_local13)){ _local7 = (_local7 + int((_local13 * 2))); _local8 = true; } else { if (_local4 > _local13){ _local7 = (_local7 - int((_local13 * 2))); _local8 = true; }; }; }; _local9 = _local6; _local10 = _local7; }; if (_levelEditorClearBalls){ if (!Levels.destroyOneBall(_levelBalls, this)){ _levelEditorClearBalls = false; _levelBalls = null; _levelEditorBallsLeft = LEVEL_EDITOR_BALLS_MAX; } else { _levelEditorBallsLeft++; }; }; if (_levelEditorMode == LEVEL_EDITOR_MODE_EDIT){ if (_keyDownArrowLeft){ _keyDownArrowLeft = false; _levelEditorBallTypeIndexNext--; if (_levelEditorBallTypeIndexNext < 0){ _levelEditorBallTypeIndexNext = (LEVEL_EDITOR_BALL_TYPES.length - 1); }; } else { if (_keyDownArrowRight){ _keyDownArrowRight = false; _levelEditorBallTypeIndexNext++; if (_levelEditorBallTypeIndexNext == LEVEL_EDITOR_BALL_TYPES.length){ _levelEditorBallTypeIndexNext = 0; }; }; }; if (_keyDownGrid){ _keyDownGrid = false; _levelEditorGrid = !(_levelEditorGrid); }; if (((((!((_levelEditorBall == null))) && (!((_levelEditorBallMouse == null))))) && ((_levelEditorDownloadBox == null)))){ if ((((_levelEditorBallMouse._type == Ball.BALL_TYPE_BOX_TOUGH)) || ((_levelEditorBallMouse._type == Ball.BALL_TYPE_BOX_GLASS)))){ if (_keyDownArrowUp){ _local2 = _levelEditorBoxHeight; _local2 = (_local2 + 1); if (_local2 > 50){ _local2 = 50; }; _levelEditorBallMouse._height = _local2; _levelEditorBallMouse.resize(_local2, this); _levelEditorBoxHeight = _local2; } else { if (_keyDownArrowDown){ _local2 = _levelEditorBoxHeight; _local2--; if (_local2 < 5){ _local2 = 5; }; _levelEditorBallMouse._height = _local2; _levelEditorBallMouse.resize(_local2, this); _levelEditorBoxHeight = _local2; } else { if (_keyDownArrowUpLeft){ _local2 = _levelEditorBoxWidth; _local2 = (_local2 + 1); if (_local2 > 50){ _local2 = 50; }; _levelEditorBallMouse._width = _local2; _levelEditorBallMouse.resize(_local2, this); _levelEditorBoxWidth = _local2; } else { if (_keyDownArrowUpRight){ _local2 = _levelEditorBoxWidth; _local2--; if (_local2 < 5){ _local2 = 5; }; _levelEditorBallMouse._width = _local2; _levelEditorBallMouse.resize(_local2, this); _levelEditorBoxWidth = _local2; }; }; }; }; } else { _local2 = _levelEditorBallRadius; if (_keyDownArrowUp){ _local2 = (_local2 + 0.5); if (_local2 > 40){ _local2 = 40; }; _levelEditorBallMouse.resize(_local2, this); } else { if (_keyDownArrowDown){ _local2 = (_local2 - 0.5); if (_local2 < 5){ _local2 = 5; }; _levelEditorBallMouse.resize(_local2, this); }; }; _levelEditorBallRadius = _local2; }; }; if (((((((_mouseClicked) && (!((_levelEditorBallMouse == null))))) && (_levelEditorBallMouse.visible))) && ((_levelEditorDownloadBox == null)))){ _mouseClicked = false; if (_levelEditorBallsLeft > 0){ _levelEditorBallsLeft--; _local5 = new Ball(LEVEL_EDITOR_BALL_TYPES[_levelEditorBallTypeIndex], int(_levelEditorBallRadius), this); _local5._width = int(_levelEditorBoxWidth); _local5._height = int(_levelEditorBoxHeight); _local5.setPosition(int(_local9), int(_local10)); addChild(_local5); _local5.resetGraphics(this); _local5.removeChildAddChild(this); if (_levelBalls == null){ _local14 = new Array(1); _local14[0] = _local5; } else { _local14 = new Array((_levelBalls.length + 1)); _local6 = 0; while (_local6 < _levelBalls.length) { _local14[_local6] = _levelBalls[_local6]; _local6++; }; _local14[_local6] = _local5; }; _levelBalls = _local14; _levelEditorDownloadID = -1; }; }; _local6 = findBall(_mouseMovedToX, _mouseMovedToY); _local5 = null; if (_local6 >= 0){ _local5 = _levelBalls[_local6]; } else { if (_infoTextStringLatest == null){ _local5 = _levelEditorBallMouse; }; }; if (((((!((_local5 == null))) && ((_mouseMovedToY > 80)))) && ((_levelEditorDownloadBox == null)))){ _infoTextStringLatest = _local5.getTypeInfoText(this, _ballRadiusMin, _ballRadiusMax); if (Ball.BALL_SCORE[_local5._type] > 0){ _infoTextStringLatest = (_infoTextStringLatest + ((" (" + (Ball.BALL_SCORE[_local5._type] * _scoreMultiplier)) + "PTS) ")); } else { _infoTextStringLatest = (_infoTextStringLatest + " "); }; }; if (_keyDownDelete){ _keyDownDelete = false; if (_local6 >= 0){ deleteLevelBall(_local6, true); _levelEditorBallsLeft++; _levelEditorDownloadID = -1; }; }; if (_keyDownGrab){ _keyDownGrab = false; if (_local6 >= 0){ _levelEditorBallsLeft++; _levelEditorBallTypeIndex = -1; _local7 = 0; while (_local7 < LEVEL_EDITOR_BALL_TYPES.length) { if (LEVEL_EDITOR_BALL_TYPES[_local7] == _levelBalls[_local6]._type){ break; }; _local7++; }; _levelEditorBallTypeIndexNext = _local7; _levelEditorBallRadius = _levelBalls[_local6]._radius; _levelEditorBoxWidth = _levelBalls[_local6]._width; _levelEditorBoxHeight = _levelBalls[_local6]._height; deleteLevelBall(_local6, false); _levelEditorDownloadID = -1; }; }; }; if (_levelEditorMode == LEVEL_EDITOR_MODE_EDIT){ if (_levelEditorBallMouse != null){ _levelEditorBallMouse.removeChildAddChild(this); }; }; if (((!((_levelEditorBallTypeIndexNext == _levelEditorBallTypeIndex))) && ((_levelEditorDownloadBox == null)))){ _levelEditorBallTypeIndex = _levelEditorBallTypeIndexNext; if (((!((_levelEditorBall == null))) && (!((_levelEditorBallMouse == null))))){ Ball.destroy(_levelEditorBall, false, this, true); _levelEditorBall = null; Ball.destroy(_levelEditorBallMouse, false, this, true); _levelEditorBallMouse = null; if (_levelEditor2TextField != null){ removeChild(_levelEditor2TextField); _levelEditor2TextField = null; }; }; }; if (_levelEditorDownloadBox == null){ if (_levelEditorBall == null){ _levelEditorBall = new Ball(LEVEL_EDITOR_BALL_TYPES[_levelEditorBallTypeIndex], 10, this); _levelEditorBall._width = 10; _levelEditorBall._height = 10; _levelEditorBall.setPosition((SCREEN_DX >> 1), 40); _levelEditorBall.resetGraphics(this); addChild(_levelEditorBall); _levelEditorBall.removeChildAddChild(this); }; if (_levelEditorBallMouse == null){ _levelEditorBallMouse = new Ball(LEVEL_EDITOR_BALL_TYPES[_levelEditorBallTypeIndex], _levelEditorBallRadius, this); _levelEditorBallMouse._width = _levelEditorBoxWidth; _levelEditorBallMouse._height = _levelEditorBoxHeight; _levelEditorBallMouse.resetGraphics(this); addChild(_levelEditorBallMouse); _levelEditorBallMouse.removeChildAddChild(this); }; }; if (_levelEditor1TextField == null){ _local11 = FontBank.getTextField(this, "Zachary", 13, 0xEEEEEE); _local11.x = (BallDropOne.SCREEN_DX / 2); _local11.y = 10; _local11.text = "A AND D CHANGE THE OBJECT"; _local11.alpha = 0; _levelEditor1TextField = _local11; addChild(_local11); }; if ((((_levelEditor2TextField == null)) && (!((_levelEditorBallMouse == null))))){ _local11 = FontBank.getTextField(this, "Zachary", 13, 0xEEEEEE); _local11.x = (BallDropOne.SCREEN_DX / 2); _local11.y = 55; if ((((_levelEditorBallMouse._type == Ball.BALL_TYPE_BOX_TOUGH)) || ((_levelEditorBallMouse._type == Ball.BALL_TYPE_BOX_GLASS)))){ _local11.text = "W&S ADJUST HEIGHT AND Z&X ADJUST WIDTH"; } else { _local11.text = "W AND S ADJUST RADIUS "; }; if (_levelEditor1TextField != null){ _local11.alpha = _levelEditor1TextField.alpha; } else { _local11.alpha = 0; }; _levelEditor2TextField = _local11; addChild(_local11); }; if ((((_levelEditorBallsLeftTextField == null)) || (!((_levelEditorBallsLeft == _levelEditorBallsLeftShowing))))){ _local15 = 0; if (_levelEditorBallsLeftTextField != null){ removeChild(_levelEditorBallsLeftTextField); _local15 = 1; }; _levelEditorBallsLeftShowing = _levelEditorBallsLeft; _local11 = FontBank.getTextField(this, "Zachary", 10, 0xFFFFFF); _local11.x = (BallDropOne.SCREEN_DX / 2); _local11.y = 82; _local11.text = (((_levelEditorBallsLeft + " OF ") + LEVEL_EDITOR_BALLS_MAX) + " LEFT"); _local11.alpha = _local15; _levelEditorBallsLeftTextField = _local11; addChild(_local11); }; if (_levelEditorBall != null){ _levelEditorBall.animate(this, _arg1); _levelEditorBall.setAlpha(_levelEditorBallsLeftTextField.alpha); }; if (((!((_levelEditorBallMouse == null))) && ((_levelEditorDownloadBox == null)))){ if ((((_levelEditorBallMouse._type == Ball.BALL_TYPE_BOX_TOUGH)) || ((_levelEditorBallMouse._type == Ball.BALL_TYPE_BOX_GLASS)))){ _local3 = (_levelEditorBallMouse._width * 0.5); _local4 = (_levelEditorBallMouse._height * 0.5); } else { _local3 = _levelEditorBallMouse._radius; _local4 = _local3; }; if ((((((((_local9 < (_local3 + 5))) || ((_local9 > ((SCREEN_DX - _local3) - 5))))) || ((_local10 < (100 + _local4))))) || ((_local10 > ((SCREEN_DY - _local4) - 85))))){ _levelEditorBallMouse.setVisible(false); } else { _levelEditorBallMouse.setVisible(true); }; _levelEditorBallMouse.setPosition(_local9, _local10); _levelEditorBallMouse.animate(this, _arg1); _levelEditorBallMouse.setAlpha(_levelEditorBall.alpha); }; if (_levelBalls != null){ _local6 = 0; while (_local6 < _levelBalls.length) { if (_levelBalls[_local6] != null){ _levelBalls[_local6].animate(this, _arg1); }; _local6++; }; }; if (_levelNameTextField == null){ if (_levelEditorDownloadID >= 0){ _levelNameString = (("LEVEL ID = " + _levelEditorDownloadID) + " "); }; } else { if (_levelEditorDownloadID < 0){ removeChild(_levelNameTextField); _levelNameTextField = null; _levelNameString = null; }; }; if (_levelNameTextField != null){ if (_levelEditorDownloadID >= 0){ _levelNameString = (("LEVEL ID = " + _levelEditorDownloadID) + " "); }; if (_levelNameTextField.text != _levelNameString){ showLevelName(); }; } else { if (_levelNameString != null){ showLevelName(); }; }; if (_levelNameTextField != null){ if (_levelEditor1TextField != null){ _levelNameTextField.alpha = _levelEditor1TextField.alpha; } else { _levelNameTextField.alpha = 0; }; }; } public function addBackground(_arg1:Sprite):void{ var _local2:Sprite; _local2 = _spriteInfoBox; _local2.graphics.lineStyle(); _local2.graphics.beginFill(8032181); _local2.graphics.drawRoundRect(2, 2, (SCREEN_DX - 4), (80 - 4), 20, 20); _local2.graphics.endFill(); addChild(_local2); _local2 = _spriteWhiteCoverBox; _local2.graphics.lineStyle(); _local2.graphics.beginFill(0xFFFFFF); _local2.graphics.drawRect(0, ((82 + SCREEN_DY) - (82 * 2)), SCREEN_DX, 200); _local2.graphics.endFill(); addChild(_local2); _local2 = _spriteScoreBox; _local2.graphics.lineStyle(); _local2.graphics.beginFill(8032181); _local2.graphics.drawRoundRect(2, ((82 + (SCREEN_DY - (82 * 2))) + 4), (SCREEN_DX - 4), (80 - 4), 20, 20); _local2.graphics.endFill(); addChild(_local2); _bitmapIconExit = new Bitmap(new _classIconExit().bitmapData); _bitmapIconExit.x = (SCREEN_DX - 48); _bitmapIconExit.y = 22; _bitmapIconExit.visible = true; _bitmapIconExit.alpha = 1; addChild(_bitmapIconExit); _bitmapIconPlay = new Bitmap(new _classIconPlay().bitmapData); _bitmapIconPlay.x = 52; _bitmapIconPlay.y = 22; _bitmapIconPlay.visible = false; _bitmapIconPlay.alpha = 1; addChild(_bitmapIconPlay); _bitmapIconSubmit = new Bitmap(new _classIconSubmit().bitmapData); _bitmapIconSubmit.x = 92; _bitmapIconSubmit.y = 22; _bitmapIconSubmit.visible = false; _bitmapIconSubmit.alpha = 1; addChild(_bitmapIconSubmit); _bitmapIconClear = new Bitmap(new _classIconClear().bitmapData); _bitmapIconClear.x = (SCREEN_DX - 88); _bitmapIconClear.y = 22; _bitmapIconClear.visible = false; _bitmapIconClear.alpha = 1; addChild(_bitmapIconClear); _bitmapIconDownload = new Bitmap(new _classIconDownload().bitmapData); _bitmapIconDownload.x = (SCREEN_DX - 128); _bitmapIconDownload.y = 22; _bitmapIconDownload.visible = false; _bitmapIconDownload.alpha = 1; addChild(_bitmapIconDownload); _local2 = _spritePlayfieldBox; _local2.graphics.lineStyle(); if (_screenShotMode){ _local2.graphics.beginFill(8032181); } else { _local2.graphics.beginFill(10728399); }; _local2.graphics.drawRoundRect(2, 2, (SCREEN_DX - 4), (SCREEN_DY - 4), 10, 10); _local2.graphics.endFill(); addChild(_local2); } private function playerBallsCollide(_arg1:Ball, _arg2:Ball, _arg3:Number, _arg4:Number):void{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local5 = _arg4; _local6 = -(_arg3); _local7 = ((_arg1._speedX * _arg3) + (_arg1._speedY * _arg4)); _local8 = ((_arg2._speedX * _arg3) + (_arg2._speedY * _arg4)); _local9 = (1 / (_arg1._radius + _arg2._radius)); _local10 = (((_local7 * (_arg1._radius - _arg2._radius)) + ((2 * _arg2._radius) * _local8)) * _local9); _local11 = (((_local8 * (_arg2._radius - _arg1._radius)) + ((2 * _arg1._radius) * _local7)) * _local9); _local12 = ((_arg1._speedX * _local5) + (_arg1._speedY * _local6)); _local13 = ((_arg2._speedX * _local5) + (_arg2._speedY * _local6)); _arg1._speedX = ((_local10 * _arg3) + (_local12 * _local5)); _arg1._speedY = ((_local10 * _arg4) + (_local12 * _local6)); _arg2._speedX = ((_local11 * _arg3) + (_local13 * _local5)); _arg2._speedY = ((_local11 * _arg4) + (_local13 * _local6)); } public function ad_finished1():void{ var _local1:int; var _local2:SharedObject; _initOk = true; if (MochiServices.connected){ _mochi = true; } else { _mochi = false; }; _local2 = SharedObject.getLocal("SpecialBonus"); if (((!((_local2 == null))) && ((_local2.data.isPlayerSpecial == "yes!")))){ _jesusAmen = false; }; FontBank.init(); _local1 = 0; while (_local1 < _bonusTextFields.length) { _bonusTextFields[_local1] = null; _bonusTextFieldTimers[_local1] = 0; _local1++; }; if (_jesusAmen){ uploadRun(); }; ad_finished(); } public function scoreRemoveTexts():void{ if (_totalScoreTextField != null){ removeChild(_totalScoreTextField); _totalScoreTextField = null; }; if (_scoreTextField != null){ removeChild(_scoreTextField); _scoreTextField = null; }; if (_bestScoreTextField != null){ removeChild(_bestScoreTextField); _bestScoreTextField = null; }; } private function manageArrowUps():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:Ball; var _local5:Bitmap; _local1 = 0; if (_gameMode == GAME_MODE_GAME){ if (((!((_ball == null))) && ((_ball.y < 90)))){ _local1++; }; _local2 = 0; while (_local2 < _levelBalls.length) { _local4 = _levelBalls[_local2]; if (_local4 == null){ } else { if ((((((_local4._type == Ball.BALL_TYPE_PLAYER)) && (_local4._freeFall))) && ((_local4.y < 90)))){ _local1++; }; }; _local2++; }; }; if (_bitmapArrowUps == null){ if (_local1 > 0){ allocateArrowUps(_local1); }; } else { if (_bitmapArrowUps.length != _local1){ _local2 = 0; while (_local2 < _bitmapArrowUps.length) { removeChild(_bitmapArrowUps[_local2]); _local2++; }; _bitmapArrowUps = null; if (_local1 == 0){ return; }; allocateArrowUps(_local1); }; }; if (_gameMode == GAME_MODE_GAME){ _local2 = 0; if (((!((_ball == null))) && ((_ball.y < 90)))){ var _temp1 = _local2; _local2 = (_local2 + 1); _local5 = _bitmapArrowUps[_temp1]; _local5.x = (_ball.x - 5); _local5.y = 83; }; _local3 = 0; while (_local2 < _local1) { var _temp2 = _local3; _local3 = (_local3 + 1); _local4 = _levelBalls[_temp2]; if (_local4 == null){ } else { if ((((((_local4._type == Ball.BALL_TYPE_PLAYER)) && (_local4._freeFall))) && ((_local4.y < 90)))){ var _temp3 = _local2; _local2 = (_local2 + 1); _local5 = _bitmapArrowUps[_temp3]; _local5.x = (_local4.x - 5); _local5.y = 83; }; }; }; }; } private function serverIsAlive(_arg1:Event):void{ _serverAlive = true; } public function ad_finished():void{ var _local1:Sprite; addBackground(this); _ball = new Ball(Ball.BALL_TYPE_PLAYER, 10, this); _ballShadow = new Ball(Ball.BALL_TYPE_PLAYER, 10, this); _ballShadowMin = new Ball(Ball.BALL_TYPE_PLAYER, 10, this); _ballShadowMax = new Ball(Ball.BALL_TYPE_PLAYER, 10, this); _ballShadow.alpha = 0.3; _ballShadowMin.alpha = 0.2; _ballShadowMax.alpha = 0.2; _ballShadow.visible = false; _ballShadowMin.visible = false; _ballShadowMax.visible = false; addChild(_ballShadow); addChild(_ballShadowMin); addChild(_ballShadowMax); _ball.visible = false; _local1 = _levelSelectedBackground; _local1.visible = false; addChild(_local1); _particleManager.initialize(this); stage.addEventListener(Event.ENTER_FRAME, onEnterFrame); stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp); stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove); stage.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); stage.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); _bitmapMusicOn = new Bitmap(new _classMusicOn().bitmapData); _bitmapMusicOn.x = 8; _bitmapMusicOn.y = 10; _bitmapMusicOn.visible = true; _bitmapMusicOn.alpha = 1; _bitmapMusicOn.smoothing = false; addChild(_bitmapMusicOn); _bitmapMusicOff = new Bitmap(new _classMusicOff().bitmapData); _bitmapMusicOff.x = 8; _bitmapMusicOff.y = 10; _bitmapMusicOff.visible = false; _bitmapMusicOff.alpha = 1; _bitmapMusicOff.smoothing = false; addChild(_bitmapMusicOff); _bitmapSFXOn = new Bitmap(new _classSFXOn().bitmapData); _bitmapSFXOn.x = 8; _bitmapSFXOn.y = 38; _bitmapSFXOn.visible = true; _bitmapSFXOn.alpha = 1; _bitmapSFXOn.smoothing = false; addChild(_bitmapSFXOn); _bitmapSFXOff = new Bitmap(new _classSFXOff().bitmapData); _bitmapSFXOff.x = 8; _bitmapSFXOff.y = 38; _bitmapSFXOff.visible = false; _bitmapSFXOff.alpha = 1; _bitmapSFXOff.smoothing = false; addChild(_bitmapSFXOff); } private function touchPlayerBall(_arg1:Ball, _arg2:Ball):void{ var _local3:int; var _local4:Boolean; var _local5:TextField; _levels.playerBallHits(this, _arg2); _local3 = _arg1._touched; _local4 = false; _arg1._touched = (_arg1._touched - 3); if (_arg1._touched == _local3){ _local4 = true; _jesusAmen = false; }; if ((((_arg1._touched <= (970 - (3 * 200)))) || (_local4))){ _local5 = FontBank.getTextField(this, "MassiveHeadache", 22, 0); _local5.text = "A BLACK BALL CAN TAKE ONLY 200 HITS! "; bonusTextFieldAdd(_local5, 3000); _arg1._explode = true; _blackBallsBusted++; }; } private function titleStartANewGame():void{ _continueAvailable = false; _gameSaveCounter = 1; sessionReset(); titleMenuItemClickedContinue(); } private function titleMenuItemClickedStart():void{ if (_continueAvailable){ if (_bitmapNewGameAlert != null){ return; }; _bitmapNewGameAlert = new Bitmap(new _classNewGameAlert().bitmapData); _bitmapNewGameAlert.x = ((SCREEN_DX * 0.5) - (_bitmapNewGameAlert.width * 0.5)); _bitmapNewGameAlert.y = ((SCREEN_DY * 0.5) - (_bitmapNewGameAlert.height * 0.5)); _bitmapNewGameAlert.visible = true; _bitmapNewGameAlert.alpha = 1; _bitmapNewGameAlert.smoothing = true; addChild(_bitmapNewGameAlert); return; }; titleStartANewGame(); } public function playButtonSound():void{ if (!_sfxEnabled){ return; }; if (Math.random() < 0.5){ _soundButton1.play(0, 1, _soundTransformVolumeHigh); } else { _soundButton2.play(0, 1, _soundTransformVolumeHigh); }; } public function showInfo(_arg1:String):void{ var _local2:TextField; _local2 = FontBank.getTextField(this, "Zachary", 13, 16181448); _local2.x = (BallDropOne.SCREEN_DX / 2); _local2.y = (BallDropOne.SCREEN_DY - 26); _local2.text = _arg1; if (_infoTextField != null){ removeChild(_infoTextField); }; _infoTextField = _local2; addChild(_local2); } private function kongregateInit():void{ var _local1:Object; var _local2:String; var _local3:URLRequest; var _local4:Loader; _local1 = LoaderInfo(root.loaderInfo).parameters; _local2 = ((_local1.api_path) || ("http://www.kongregate.com/flash/API_AS3_Local.swf")); trace(("API path: " + _local2)); Security.allowDomain("www.villehelin.com"); Security.loadPolicyFile("http://www.villehelin.com/crossdomain.xml"); Security.allowDomain(_domains); _local3 = new URLRequest(_local2); _local4 = new Loader(); _local4.contentLoaderInfo.addEventListener(Event.COMPLETE, kongregateLoadComplete); _local4.load(_local3); this.addChild(_local4); } private function ballSelectionFind():int{ var _local1:int; if (_levelBalls == null){ return (-1); }; _local1 = 0; while (_local1 < _levelBalls.length) { if (_levelBalls[_local1] != null){ if (_levelBalls[_local1]._boostCounter > 0){ return (_local1); }; }; _local1++; }; return (-1); } private function isContinueAvailable():void{ var _local1:SharedObject; _local1 = SharedObject.getLocal("BallDropOneSaveFile"); if ((((_local1 == null)) || ((_local1.size < 10)))){ _continueAvailable = false; } else { if (saveGameCheck(_local1)){ _continueAvailable = true; } else { _continueAvailable = false; }; }; } private function textTimerFadeOut(_arg1:TextField, _arg2:Number, _arg3:Number):TextField{ if (_arg2 <= 0){ removeChild(_arg1); return (null); }; if (_arg2 <= _arg3){ _arg1.alpha = (_arg2 / _arg3); }; return (_arg1); } private function uploadLevel():void{ var _local1:TextField; var _local2:BitmapData; var _local3:Bitmap; var _local4:int; var _local5:int; var _local6:ByteArray; var _local7:URLVariables; var _local8:String; var _local9:int; var _local10:URLRequest; var _local11:URLLoader; var _local12:Matrix; var _local13:int; if (_levelEditorDownloadID >= 0){ return; }; _local1 = FontBank.getTextField(this, "MassiveHeadache", 22, 0xFFFFFF); _local1.text = "UPLOADING LEVEL... "; bonusTextFieldAdd(_local1, 2000); _local2 = new BitmapData((SCREEN_DX >> 2), (SCREEN_DY >> 2), false, 10728399); _local3 = new Bitmap(_local2, "never", false); _local4 = 0; _local5 = 0; while (_local5 < _levelBalls.length) { _local12 = new Matrix(0.25, 0, 0, 0.25, (_levelBalls[_local5]._x * 0.25), (_levelBalls[_local5]._y * 0.25)); if (_levelBalls[_local5]._extraSprite != null){ _local2.draw(_levelBalls[_local5]._extraSprite, _local12, null, null, null, false); }; _local2.draw(_levelBalls[_local5], _local12, null, null, null, false); if (_levelBalls[_local5]._bitmap != null){ _local12 = new Matrix((0.25 * _levelBalls[_local5]._bitmap.scaleX), 0, 0, (0.25 * _levelBalls[_local5]._bitmap.scaleY), (_levelBalls[_local5]._bitmap.x * 0.25), (_levelBalls[_local5]._bitmap.y * 0.25)); _local2.draw(_levelBalls[_local5]._bitmap, _local12, null, null, null, false); }; _local4 = (_local4 + (1 + _levelBalls[_local5]._type)); _local5++; }; _local6 = PNGEncoder.encode(_local3.bitmapData); _local7 = new URLVariables(); _local7.levelData = ((Levels.convertLevelToString(_levelBalls) + " ") + _local4); _local7.creator = _playerName; _local7.version = _versionString; _local7.basedOn = _levelEditorBasedOnID; trace(("levelData = " + _local7.levelData)); _local8 = (_local6.length + " "); _local6.position = 0; _local4 = 0; _local9 = 0; while (_local9 < _local6.length) { _local13 = _local6.readUnsignedByte(); _local8 = (_local8 + (_local13 + " ")); _local4 = (_local4 + (1 + _local13)); _local9++; }; _local7.screenShot = (_local8 + _local4); _local10 = new URLRequest("http://www.villehelin.com/BallDropOne/levelAdd.php"); _local10.method = URLRequestMethod.POST; _local10.data = _local7; _local11 = new URLLoader(_local10); _local11.addEventListener(IOErrorEvent.IO_ERROR, onIOErrorWithText); _local11.addEventListener(Event.COMPLETE, uploadLevelComplete); _local11.load(_local10); } public function deleteLevelBall(_arg1:int, _arg2:Boolean):void{ var _local3:Array; var _local4:int; var _local5:int; Ball.destroy(_levelBalls[_arg1], _arg2, this, true); if (_levelBalls.length == 1){ _levelBalls = null; } else { _local3 = new Array((_levelBalls.length - 1)); _local4 = 0; _local5 = 0; while (_local5 < _levelBalls.length) { if (_local5 == _arg1){ } else { var _temp1 = _local4; _local4 = (_local4 + 1); var _local6 = _temp1; _local3[_local6] = _levelBalls[_local5]; }; _local5++; }; _levelBalls = _local3; }; } private function titleMenuItemHandle(_arg1:Bitmap, _arg2:Function, _arg3:String, _arg4:Number, _arg5:Number, _arg6:Boolean):Boolean{ var _local7:Boolean; _local7 = false; if (_arg1.alpha >= 0.79){ if ((((((((((_mouseMovedToX >= _arg1.x)) && ((_mouseMovedToX <= (_arg1.x + _arg1.width))))) && ((_mouseMovedToY >= _arg1.y)))) && ((_mouseMovedToY <= (_arg1.y + _arg1.height))))) && (!(_arg6)))){ _local7 = true; if (_titleMenuItemLastSelected != _arg1){ if (_sfxEnabled){ _soundSelection1.play(0, 1, _soundTransformVolumeHigh); }; _titleMenuItemLastSelected = _arg1; }; if (_arg1.scaleX < 1){ _arg1.scaleX = (_arg1.scaleX + (_arg5 * 0.003)); if (_arg1.scaleX > 1){ _arg1.scaleX = 1; }; }; removeChild(_arg1); addChild(_arg1); fadeInBitmap(_arg1, 1, (_arg5 * 0.003)); _infoTextStringLatest = _arg3; if (((_mouseClicked) && ((_levelBalls == null)))){ _arg2(); }; } else { if (_titleMenuItemLastSelected == _arg1){ _titleMenuItemLastSelected = null; }; if (_arg1.scaleX > 0.8){ _arg1.scaleX = (_arg1.scaleX - (_arg5 * 0.003)); if (_arg1.scaleX < 0.8){ _arg1.scaleX = 0.8; }; }; fadeOutBitmap(_arg1, 0.8, (_arg5 * 0.003), false); }; _arg1.scaleY = _arg1.scaleX; _arg1.x = ((SCREEN_DX >> 1) - (_arg1.width >> 1)); _arg1.y = (_arg4 - (_arg1.height >> 1)); }; return (_local7); } private function gameRunPlayerBall(_arg1:Ball):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:int; var _local8:int; var _local9:int; var _local10:Ball; var _local11:Ball; var _local12:Boolean; var _local13:Boolean; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Boolean; var _local19:Number; var _local20:Boolean; var _local21:Number; var _local22:Boolean; var _local23:Boolean; var _local24:Boolean; var _local25:TextField; var _local26:int; var _local27:Particle; var _local28:int; var _local29:Number; var _local30:Number; var _local31:Number; var _local32:Number; var _local33:Number; _local12 = false; if (_arg1._freeFall){ _local3 = _arg1._speedY; _arg1._speedY = (_arg1._speedY + (((0.0005 * SPEEDMUL) * _arg1._radius) / 7)); if (_local3 == _arg1._speedY){ _arg1._explode = true; _jesusAmen = false; }; _local7 = 0; while (_local7 < _levelBalls.length) { _local10 = _levelBalls[_local7]; if ((((_local10 == null)) || (((!((_local10._type == Ball.BALL_TYPE_GRAVITY))) && (!((_local10._type == Ball.BALL_TYPE_ANTIGRAVITY))))))){ } else { _local4 = (_local10._x - _arg1._x); _local5 = (_local10._y - _arg1._y); _local6 = ((_local4 * _local4) + (_local5 * _local5)); _local19 = ((_arg1._radius + _local10._radius) / _local6); _local6 = Math.sqrt(_local6); _local4 = ((_local4 / _local6) * _local19); _local5 = ((_local5 / _local6) * _local19); if (_local10._type == Ball.BALL_TYPE_GRAVITY){ _arg1._speedX = (_arg1._speedX + ((_local4 * 0.04) * SPEEDMUL)); _arg1._speedY = (_arg1._speedY + ((_local5 * 0.04) * SPEEDMUL)); } else { _arg1._speedX = (_arg1._speedX - ((_local4 * 0.02) * SPEEDMUL)); _arg1._speedY = (_arg1._speedY - ((_local5 * 0.02) * SPEEDMUL)); }; }; _local7++; }; _local13 = false; _local14 = _arg1._x; _local15 = _arg1._y; _local16 = (_local14 + _arg1._speedX); _local17 = (_local15 + _arg1._speedY); _local7 = 0; while (_local7 < _levelBalls.length) { _local10 = _levelBalls[_local7]; if ((((((((((_local10 == null)) || ((_local10._state == Ball.BALL_STATE_DEAD)))) || ((_local10._type == Ball.BALL_TYPE_DEAD)))) || ((_local10._type == Ball.BALL_TYPE_GHOST_HIDDEN)))) || ((_local10._type == Ball.BALL_TYPE_DESTROYED)))){ } else { if (_arg1 == _local10){ } else { if (_local10._radius < 2){ } else { _local20 = false; if ((((_local10._type == Ball.BALL_TYPE_BOX_TOUGH)) || ((_local10._type == Ball.BALL_TYPE_BOX_GLASS)))){ if (_local16 <= (_local10._x - (_local10._width * 0.5))){ _local2 = (_local10._x - (_local10._width * 0.5)); } else { if (_local16 >= (_local10._x + (_local10._width * 0.5))){ _local2 = (_local10._x + (_local10._width * 0.5)); } else { _local2 = _local16; }; }; if (_local17 <= (_local10._y - (_local10._height * 0.5))){ _local3 = (_local10._y - (_local10._height * 0.5)); } else { if (_local17 >= (_local10._y + (_local10._height * 0.5))){ _local3 = (_local10._y + (_local10._height * 0.5)); } else { _local3 = _local17; }; }; _closestBoxX = _local2; _closestBoxY = _local3; _local4 = (_local16 - _local2); _local5 = (_local17 - _local3); _local6 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5))); if (_local6 <= _arg1._radius){ _local20 = true; }; } else { _local4 = (_local16 - _local10._x); _local5 = (_local17 - _local10._y); _local6 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5))); if (_local6 <= (_arg1._radius + _local10._radius)){ _local20 = true; }; }; if (_local20){ _local21 = 1; _local22 = false; _local23 = false; _local24 = false; _local10._boostHit = false; _local8 = ballSelectionFind(); if (_local8 >= 0){ _local11 = _levelBalls[_local8]; _local22 = true; if (_local11._boostCounter >= 2){ _local24 = true; }; if (_local8 == _local7){ _local21 = (_local21 + _local10._boostCounter); if (_local24){ _arg1._maxBoostedTimer = 500; _arg1.resetGraphics(this); _local25 = FontBank.getTextField(this, "MassiveHeadache", 22, 0xFFFFFF); _local25.text = "MAX BOOST! "; bonusTextFieldAdd(_local25, 2000); ballBurstsIntoParticles(_arg1, 0); }; if (_local10._type == Ball.BALL_TYPE_PINK){ _local10._explodeTimer = 2; }; _local10._boostHit = true; if (_sfxEnabled){ _soundBoostGood.play(0, 1, _soundTransformVolumeHigh); }; } else { if (_local24){ _local25 = FontBank.getTextField(this, "MassiveHeadache", 22, 8922662); _local25.text = "MISSED MAX BOOST! "; bonusTextFieldAdd(_local25, 2000); }; _local21 = (-1 - _levelBalls[_local8]._boostCounter); if (_sfxEnabled){ _soundBoostBad.play(0, 1, _soundTransformVolumeHigh); }; }; _bounceSoundIterationNumber = _iterationNumber; _levelBalls[_local8]._boostCounter = 0; _levelBalls[_local8].resetGraphics(this); }; if (_local10._type == Ball.BALL_TYPE_TTURSAS){ _local26 = _local10._touched; _local10._touched++; if (_local10._touched == _local26){ _jesusAmen = false; }; if (_local10._touched >= 3){ _local10._explodeTimer = 2; }; } else { if (_local10._type != Ball.BALL_TYPE_PLAYER){ _local10._touched = 1; }; }; _local13 = true; _infoBallIndex = -1; if (_local10._type == Ball.BALL_TYPE_PLAYER){ removeChild(_local10); addChild(_local10); _local10._freeFall = true; } else { _local10._state = Ball.BALL_STATE_GROWING; }; if (_local10._type == Ball.BALL_TYPE_SPECIAL){ _bounceSoundIterationNumber = _iterationNumber; if (_sfxEnabled){ _local8 = ExtraMath.random(0, 3); if (_local8 == 0){ _soundHitSpecial1.play(0, 1, _soundTransformVolumeHigh); } else { _soundHitSpecial2.play(0, 1, _soundTransformVolumeHigh); }; }; } else { if (_local10._type == Ball.BALL_TYPE_TTURSAS){ _bounceSoundIterationNumber = _iterationNumber; if (_sfxEnabled){ _soundHitTTursas.play(0, 1, _soundTransformVolumeHigh); }; } else { if (_bounceSoundIterationNumber < (_iterationNumber - 4)){ _bounceSoundIterationNumber = _iterationNumber; if (_sfxEnabled){ if (_local10._type == Ball.BALL_TYPE_GHOST){ _local8 = ExtraMath.random(0, 1); if (_local8 == 0){ _soundHitMystery1.play(0, 1, _soundTransformVolumeHigh); } else { _soundHitMystery2.play(0, 1, _soundTransformVolumeHigh); }; } else { if ((_playTime & 3) == 0){ _local8 = ExtraMath.random(0, 3); if (_local8 == 0){ _soundBounceBall1.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 1){ _soundBounceBall2.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 2){ _soundBounceBall3.play(0, 1, _soundTransformVolumeHigh); } else { _soundBounceBall4.play(0, 1, _soundTransformVolumeHigh); }; }; }; } else { if ((_playTime & 3) == 1){ _local8 = ExtraMath.random(0, 5); if (_local8 == 0){ _soundBounceBallB1.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 1){ _soundBounceBallB2.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 2){ _soundBounceBallB3.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 3){ _soundBounceBallB4.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 4){ _soundBounceBallB5.play(0, 1, _soundTransformVolumeHigh); } else { _soundBounceBallB6.play(0, 1, _soundTransformVolumeHigh); }; }; }; }; }; } else { if ((_playTime & 3) == 2){ _local8 = ExtraMath.random(0, 5); if (_local8 == 0){ _soundBounceBallC1.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 1){ _soundBounceBallC2.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 2){ _soundBounceBallC3.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 3){ _soundBounceBallC4.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 4){ _soundBounceBallC5.play(0, 1, _soundTransformVolumeHigh); } else { _soundBounceBallC6.play(0, 1, _soundTransformVolumeHigh); }; }; }; }; }; } else { _local8 = ExtraMath.random(0, 5); if (_local8 == 0){ _soundBounceBallD1.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 1){ _soundBounceBallD2.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 2){ _soundBounceBallD3.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 3){ _soundBounceBallD4.play(0, 1, _soundTransformVolumeHigh); } else { if (_local8 == 4){ _soundBounceBallD5.play(0, 1, _soundTransformVolumeHigh); } else { _soundBounceBallD6.play(0, 1, _soundTransformVolumeHigh); }; }; }; }; }; }; }; }; }; }; }; }; }; if (_local10._type == Ball.BALL_TYPE_RED){ _arg1._explode = true; _local10._explodeTimer = 2; _skipRunMs = 500; }; if (_local10._type == Ball.BALL_TYPE_RAY){ _local10._animationCounter = -100; }; if ((((_local10._type == Ball.BALL_TYPE_KEY)) && (!((_local10._bitmap == null))))){ addBitmapFadeParticleFromBall(_local10, -0.003); keyBallTest(); }; if ((((_local10._type == Ball.BALL_TYPE_SPECIAL)) && (_levels.collectSpecialBall(this, _local7)))){ _bulletTimeMs = 1000; _specialGotTimer = 2000; if (_specialGotTextField != null){ removeChild(_specialGotTextField); }; _specialGotTextField = FontBank.getTextField(this, "MassiveHeadache", 30, 0xFFFFFF); _specialGotTextField.x = (BallDropOne.SCREEN_DX * 0.5); _specialGotTextField.y = ((BallDropOne.SCREEN_DY * 0.5) + 40); _local9 = (_levels._specialBallsTotal - _levels._specialBallsCollected); if (_local9 > 0){ _specialGotTextField.text = (_local9 + " MORE TO GO!"); } else { _specialGotTextField.text = "CONGRATULATIONS!\nYOU GOT THEM ALL!"; if (((!((_kongregate == null))) && (_jesusAmen))){ _kongregate.stats.submit("SpecialBallsLeft", 0); }; }; addChild(_specialGotTextField); }; gameTestForSpecialBonuses(); if (_local10._type == Ball.BALL_TYPE_PLAYER){ if (!_returnToLevelEditor){ if (_local10._startRadius > _ballRadiusMax){ _ballRadiusMax = _local10._startRadius; _local25 = FontBank.getTextField(this, "MassiveHeadache", 22, 0); _local25.text = "YOU CAN NOW DROP BIGGER BALLS! "; bonusTextFieldAdd(_local25, 4000); } else { if (_local10._startRadius < _ballRadiusMin){ _ballRadiusMin = _local10._startRadius; _local25 = FontBank.getTextField(this, "MassiveHeadache", 22, 0); _local25.text = "YOU CAN NOW DROP SMALLER BALLS! "; bonusTextFieldAdd(_local25, 4000); }; }; }; }; if (_local10._type == Ball.BALL_TYPE_TTURSAS){ explodePlayerBall(_arg1, false); if (_arg1 == _ball){ goToDropOffMode(false); _local25 = FontBank.getTextField(this, "MassiveHeadache", 22, 0xFFFFFF); _local25.text = "DROP AGAIN! "; bonusTextFieldAdd(_local25, 3000); if (_local10._touched < 3){ _local25 = FontBank.getTextField(this, "MassiveHeadache", 22, 0xFFFFFF); _local25.text = (("THE SQUID CAN TAKE " + (3 - _local10._touched)) + " HITS MORE! "); bonusTextFieldAdd(_local25, 3000); }; }; }; if (_local10._iterationNumber < (_iterationNumber - 2)){ scoreAdd(Ball.BALL_SCORE[_local10._type]); touchPlayerBall(_arg1, _local10); if (_local22){ if (_local24){ _local8 = (_local21 * 10); } else { _local8 = (_local21 * 5); }; scoreAdd(_local8); _local27 = _particleManager.addParticle(this, Particle.PARTICLE_TYPE_SCORETEXT, _local11._x, _local11._y, _local8); if (_local27 != null){ _local27._speedX = 0; _local27._speedY = -0.02; _local27.launch(); }; }; }; if (_local6 <= Number.MIN_VALUE){ _local6 = Number.MIN_VALUE; }; _local4 = (_local4 / _local6); _local5 = (_local5 / _local6); if (_local10._iterationNumber < (_iterationNumber - 2)){ if (_local10._type == Ball.BALL_TYPE_PLAYER){ _local27 = _particleManager.addParticle(this, Particle.PARTICLE_TYPE_BALL, (_local10._x + (_local4 * _local10._radius)), (_local10._y + (_local5 * _local10._radius)), 0); if (_local27 != null){ _local27._radius = 0.2; _local27._radiusAdder = 0.01; _local27._life = (_local27._life + ExtraMath.random(0, 50)); _local27.resetGraphics(this); _local27.launch(); }; } else { if ((((_local10._type == Ball.BALL_TYPE_WHITE)) || ((_local10._type == Ball.BALL_TYPE_WATER)))){ _local28 = Particle.PARTICLE_TYPE_SPARKLE; if (_local10._type == Ball.BALL_TYPE_WATER){ _local28 = Particle.PARTICLE_TYPE_MEDIUM_SPARKLE; }; _local9 = (_local10._radius * 2); _local29 = 0; _local30 = ((Math.PI * 2) / _local9); _local8 = 0; while (_local8 < _local9) { _local31 = (_local10._x + (Math.sin(_local29) * _local10._radius)); _local32 = (_local10._y + (Math.cos(_local29) * _local10._radius)); _local27 = _particleManager.addParticle(this, _local28, _local31, _local32, Ball.BALL_TYPE_COLORS[_local10._type]); if (_local27 != null){ _local27._speedX = ((Math.sin(_local29) * 0.06) * ((Math.random() * 0.1) + 1)); _local27._speedY = ((Math.cos(_local29) * 0.06) * ((Math.random() * 0.1) + 1)); if (_local10._type == Ball.BALL_TYPE_WATER){ _local27._life = (_local27._life + ExtraMath.random(-100, 400)); } else { _local27._life = (_local27._life + ExtraMath.random(0, 100)); }; _local27.launch(); }; _local29 = (_local29 + _local30); _local8++; }; } else { _local9 = ((Math.random() * 2.999) + 1); _local8 = 0; while (_local8 < _local9) { if ((((_local10._type == Ball.BALL_TYPE_BOX_GLASS)) || ((_local10._type == Ball.BALL_TYPE_BOX_TOUGH)))){ _local2 = (_closestBoxX + (_local4 * 5)); _local3 = (_closestBoxY + (_local5 * 5)); } else { _local2 = (_local10._x + (_local4 * _local10._radius)); _local3 = (_local10._y + (_local5 * _local10._radius)); }; _local27 = _particleManager.addParticle(this, Particle.PARTICLE_TYPE_SMOKE, _local2, _local3, _local10.getParticleColor()); if (_local27 != null){ _local27._speedX = ((Math.random() * 0.2) - 0.1); _local27._speedY = ((Math.random() * 0.2) - 0.1); _local27._life = (_local27._life + ExtraMath.random(0, 100)); _local27.launch(); }; _local8++; }; }; }; }; _local10._iterationNumber = _iterationNumber; if (_local10._type == Ball.BALL_TYPE_WHITE){ _local10._type = Ball.BALL_TYPE_GRAY; }; if (_local10._explodeTimer < 0){ if (_levels._level >= 0){ _local8 = _levels._levelScores[_levels._level]; } else { _local8 = _scoreTotal; }; if (_local10._type == Ball.BALL_TYPE_X2){ _local25 = FontBank.getTextField(this, "MassiveHeadache", 22, 16776842); _local25.text = (("+" + (_local8 * 2)) + "PTS! "); scoreAdd((_local8 * 2)); bonusTextFieldAdd(_local25, 3000); } else { if (_local10._type == Ball.BALL_TYPE_X3){ _local25 = FontBank.getTextField(this, "MassiveHeadache", 22, 16776842); _local25.text = (("+" + (_local8 * 3)) + "PTS! "); scoreAdd((_local8 * 3)); bonusTextFieldAdd(_local25, 3000); }; }; }; if ((((((((((((((_local10._type == Ball.BALL_TYPE_BLUE)) || ((_local10._type == Ball.BALL_TYPE_X2)))) || ((_local10._type == Ball.BALL_TYPE_X3)))) || ((_local10._type == Ball.BALL_TYPE_GRAVITY)))) || ((_local10._type == Ball.BALL_TYPE_ANTIGRAVITY)))) || ((_local10._type == Ball.BALL_TYPE_SPECIAL)))) || ((_local10._type == Ball.BALL_TYPE_BOX_GLASS)))){ _local10._explodeTimer = 2; }; if ((((_local4 > -0.01)) && ((_local4 < 0.01)))){ if (_local4 < 0){ _local4 = -0.01; } else { _local4 = 0.01; }; }; if ((((_local10._type == Ball.BALL_TYPE_BOX_TOUGH)) || ((_local10._type == Ball.BALL_TYPE_BOX_GLASS)))){ _local16 = _arg1._x; _local17 = _arg1._y; } else { _local16 = (_local10._x + (_local4 * ((_local10._radius + _arg1._radius) + 0.001))); _local17 = (_local10._y + (_local5 * ((_local10._radius + _arg1._radius) + 0.001))); }; if (_local10._type == Ball.BALL_TYPE_PLAYER){ playerBallsCollide(_arg1, _local10, _local4, _local5); } else { if ((((_local10._type == Ball.BALL_TYPE_BOX_TOUGH)) || ((_local10._type == Ball.BALL_TYPE_BOX_GLASS)))){ _local6 = ((_local4 * _arg1._speedX) + (_local5 * _arg1._speedY)); _local2 = (_local4 * _local6); _local3 = (_local5 * _local6); _arg1._speedX = (_arg1._speedX - (_local2 * SPEEDMUL)); _arg1._speedY = (_arg1._speedY - (_local3 * SPEEDMUL)); _arg1._speedX = (_arg1._speedX * 0.8); _arg1._speedY = (_arg1._speedY * 0.8); _local12 = true; } else { _local33 = (_local10._radius * 0.02); if (_local33 > 0.2){ _local33 = 0.2; }; _local33 = (_local33 * Ball.BALL_BOUNCE_MULTIPLIER[_local10._type]); if (_local21 > 0){ _local33 = (_local33 * _local21); }; _local33 = (_local33 * SPEEDMUL); _arg1._speedX = (_arg1._speedX + (_local4 * _local33)); _arg1._speedY = (_arg1._speedY + (_local5 * _local33)); if (_local10._type == Ball.BALL_TYPE_ELTOPO){ _arg1._speedY = (-0.7 * SPEEDMUL); }; }; }; }; }; }; }; _local7++; }; _local18 = false; if (_local16 < (_arg1._radius + 3)){ _local16 = (_arg1._radius + 3); _arg1._speedX = (_arg1._speedX * -0.8); _local18 = true; } else { if (_local16 > ((SCREEN_DX - _arg1._radius) - 4)){ _local16 = ((SCREEN_DX - _arg1._radius) - 4); _arg1._speedX = (_arg1._speedX * -0.8); _local18 = true; }; }; if (_local17 > ((SCREEN_DY - 84) - _arg1._radius)){ _local17 = ((SCREEN_DY - 84) - _arg1._radius); _arg1._speedY = (_arg1._speedY * -0.6); _arg1._speedX = (_arg1._speedX * 0.95); _local18 = true; _local12 = true; }; if (((((_local12) && ((_arg1._speedY > -0.004)))) && ((_arg1._speedY < 0.004)))){ _arg1._explode = true; //unresolved jump }; if (_local18){ if (_bounceWallSoundIterationNumber < (_iterationNumber - 4)){ if (_sfxEnabled){ _soundBounceWall.play(0, 1, _soundTransformVolumeHigh); }; _bounceWallSoundIterationNumber = _iterationNumber; }; }; if (_arg1._explode){ explodePlayerBall(_arg1, true); if (_arg1 == _ball){ _bulletTimeMs = 2000; _inGameMode = INGAME_MODE_FADE_OUT; }; }; _arg1.setPosition(_local16, _local17); }; } public function levelEditorRun():void{ var _local1:int; if (_levelEditorBall != null){ _levelEditorBall.live(this); }; if (_levelEditorBallMouse != null){ _levelEditorBallMouse.live(this); }; if (_levelBalls != null){ _local1 = 0; while (_local1 < _levelBalls.length) { if (((!((_levelBalls[_local1] == null))) && (!((_levelBalls[_local1]._type == Ball.BALL_TYPE_DEAD))))){ _levelBalls[_local1].live(this); }; _local1++; }; }; if (_levelEditorMode == LEVEL_EDITOR_MODE_EDIT){ if (fadeOutTextField(_totalScoreTextField, 0.01)){ _totalScoreTextField = null; }; if (fadeOutTextField(_scoreTextField, 0.01)){ _scoreTextField = null; }; if (fadeOutTextField(_bestScoreTextField, 0.01)){ _bestScoreTextField = null; }; fadeOutSprite(_ballShadow, 0.01, false); fadeOutSprite(_ballShadowMin, 0.01, false); fadeOutSprite(_ballShadowMax, 0.01, false); if (_playfieldBoxY > 81){ fadeInTextField(_levelEditor1TextField, 1, 0.01); fadeInTextField(_levelEditor2TextField, 1, 0.01); fadeInTextField(_levelEditorBallsLeftTextField, 1, 0.01); }; }; } private function allocateArrowUps(_arg1:int):void{ var _local2:int; var _local3:Bitmap; _bitmapArrowUps = new Array(_arg1); _local2 = 0; while (_local2 < _arg1) { _local3 = new Bitmap(new _classArrowUp().bitmapData); _local3.x = (SCREEN_DX - 110); _local3.y = 22; _local3.visible = true; _local3.alpha = 1; addChild(_local3); _bitmapArrowUps[_local2] = _local3; _local2++; }; } private function saveGameCalculateMagic(_arg1:SharedObject):int{ var _local2:int; var _local3:int; var _local4:int; _local2 = 1234; _local3 = 0; while (_local3 < _arg1.data.levelScores.length) { _local2 = (_local2 + _arg1.data.levelScores[_local3]); _local3++; }; _local3 = 0; while (_local3 < _arg1.data.specialBalls.length) { _local2 = (_local2 + _arg1.data.specialBalls[_local3]); _local3++; }; oneTimePadSetSeed(_local2, _arg1.data.scoreTotal); _local4 = oneTimePadGetNextValue(); return (_local4); } public function fadeOutBitmap(_arg1:Bitmap, _arg2:Number, _arg3:Number, _arg4:Boolean):Boolean{ if (_arg1 == null){ return (false); }; if (_arg1.alpha > _arg2){ _arg1.alpha = (_arg1.alpha - _arg3); if (_arg1.alpha < _arg2){ _arg1.alpha = _arg2; if (_arg4){ removeChild(_arg1); }; return (true); }; }; return (false); } private function onMouseMove(_arg1:MouseEvent):void{ if (_mouseCursorShow == true){ _mouseCursorX = mouseX; _mouseCursorY = mouseY; }; _mouseMovedToX = mouseX; _mouseMovedToY = mouseY; _mouseMoved = true; } private function worldRecordGot(_arg1:int, _arg2:Boolean):void{ if (_arg2){ _levels._levelScoresBest[_arg1] = _levels._levelScores[_arg1]; _levels._levelScoresBestNames[_arg1] = _playerName; }; _worldRecordTimer = 3000; if (_worldRecordTextField != null){ removeChild(_worldRecordTextField); }; _worldRecordTextField = FontBank.getTextField(this, "MassiveHeadache", 30, 5389148); _worldRecordTextField.x = (SCREEN_DX >> 1); _worldRecordTextField.y = (SCREEN_DY >> 1); _worldRecordTextField.text = "A NEW WORLD RECORD! "; addChild(_worldRecordTextField); if (_sfxEnabled){ _soundWR.play(0, 1, _soundTransformVolumeHigh); }; if (_arg2){ scoreRedraw(); }; } private function downloadHighScores():void{ var _local1:URLVariables; var _local2:URLRequest; var _local3:URLLoader; _local1 = new URLVariables(); _local1.player = _playerName; _local2 = new URLRequest("http://www.villehelin.com/BallDropOne/tops.txt"); _local2.method = URLRequestMethod.POST; _local2.data = _local1; _local3 = new URLLoader(_local2); _local3.addEventListener(Event.COMPLETE, parseInGameHiScores); _local3.addEventListener(IOErrorEvent.IO_ERROR, onIOError); _local3.load(_local2); } private function ballBurstsIntoParticles(_arg1:Ball, _arg2:int):void{ var _local3:int; var _local4:int; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Particle; _local3 = ((Math.random() * (_arg1._radius * 2.99)) + (_arg1._radius * 3)); _local4 = 0; while (_local4 < _local3) { while (true) { _local5 = ((_arg1._x - _arg1._radius) + ((Math.random() * _arg1._radius) * 2)); _local6 = ((_arg1._y - _arg1._radius) + ((Math.random() * _arg1._radius) * 2)); _local7 = (_local5 - _arg1._x); _local8 = (_local6 - _arg1._y); if (((_local7 * _local7) + (_local8 * _local8)) < (_arg1._radius * _arg1._radius)){ break; }; }; _local9 = _particleManager.addParticle(this, Particle.PARTICLE_TYPE_BIG_SPARKLE, _local5, _local6, _arg2); if (_local9 != null){ _local9._speedX = (_local7 * 0.004); _local9._speedY = (_local8 * 0.004); _local9._life = (_local9._life + ExtraMath.random(0, 300)); _local9.launch(); }; _local4++; }; } public function levelSelectionRun():void{ var _local1:int; var _local2:int; var _local3:SoundTransform; var _local4:int; if (_levelSelectionMode == LEVEL_SELECTION_MODE_FADE_OUT){ _local1 = 0; while (_local1 < _levels._levelPictures.length) { if ((((_levels._levelPictures[_local1] == null)) || (!(_levels._levelPictures[_local1].visible)))){ } else { _levels._levelPicturesX[_local1] = (_levels._levelPicturesX[_local1] + _levels._levelPicturesSpeedX[_local1]); _levels._levelPicturesY[_local1] = (_levels._levelPicturesY[_local1] + _levels._levelPicturesSpeedY[_local1]); if (_levels._levelPicturesX[_local1] < 0){ _levels._levelPicturesX[_local1] = 0; _levels._levelPicturesSpeedX[_local1] = (_levels._levelPicturesSpeedX[_local1] * -1); } else { if ((_levels._levelPicturesX[_local1] + _levels._levelPictures[_local1].width) >= (SCREEN_DX - 1)){ _levels._levelPicturesX[_local1] = ((SCREEN_DX - _levels._levelPictures[_local1].width) - 1); _levels._levelPicturesSpeedX[_local1] = (_levels._levelPicturesSpeedX[_local1] * -1); }; }; _levels._levelPictures[_local1].x = _levels._levelPicturesX[_local1]; _levels._levelPictures[_local1].y = _levels._levelPicturesY[_local1]; if (_levels._levelLockSprites[_local1] != null){ _levels._levelLockSprites[_local1].x = _levels._levelPicturesX[_local1]; _levels._levelLockSprites[_local1].y = _levels._levelPicturesY[_local1]; }; _levels._levelPicturesSpeedY[_local1] = (_levels._levelPicturesSpeedY[_local1] + (0.0008 * SPEEDMUL)); if (_levels._levelPicturesY[_local1] >= SCREEN_DY){ _levels._levelPictures[_local1].visible = false; if (_levels._levelLockSprites[_local1] != null){ _levels._levelLockSprites[_local1].visible = false; }; if (((_sfxEnabled) && ((Math.random() < 0.1)))){ _local3 = _soundTransformVolumeHigh; if (Math.random() < 0.5){ _local3 = _soundTransformVolumeLow; }; }; }; }; _local1++; }; _local1 = 0; while (_local1 < _levels._levelScoresTextFields.length) { if ((((_levels._levelScoresTextFields[_local1] == null)) || (!(_levels._levelScoresTextFields[_local1].visible)))){ } else { _levels._levelScoresTextFieldsX[_local1] = (_levels._levelScoresTextFieldsX[_local1] + _levels._levelScoresTextFieldsSpeedX[_local1]); _levels._levelScoresTextFieldsY[_local1] = (_levels._levelScoresTextFieldsY[_local1] + _levels._levelScoresTextFieldsSpeedY[_local1]); _levels._levelScoresTextFields[_local1].x = _levels._levelScoresTextFieldsX[_local1]; _levels._levelScoresTextFields[_local1].y = _levels._levelScoresTextFieldsY[_local1]; _levels._levelScoresTextFieldsSpeedY[_local1] = (_levels._levelScoresTextFieldsSpeedY[_local1] + (0.0008 * SPEEDMUL)); if (_levels._levelScoresTextFieldsY[_local1] >= SCREEN_DY){ _levels._levelScoresTextFields[_local1].visible = false; }; }; _local1++; }; _local1 = 0; while (_local1 < _levels._levelSpecialBallMarkers.length) { if (_levels._levelSpecialBallMarkers[_local1] != null){ _levels._levelSpecialBallMarkers[_local1].x = (_levels._levelSpecialBallMarkers[_local1].x + _levels._levelSpecialBallMarkers[_local1]._speedX); _levels._levelSpecialBallMarkers[_local1].y = (_levels._levelSpecialBallMarkers[_local1].y + _levels._levelSpecialBallMarkers[_local1]._speedY); if (_levels._levelSpecialBallMarkers[_local1].x < 4){ _levels._levelSpecialBallMarkers[_local1].x = 4; _levels._levelSpecialBallMarkers[_local1]._speedX = (_levels._levelSpecialBallMarkers[_local1]._speedX * -1); } else { if (_levels._levelSpecialBallMarkers[_local1].x >= (SCREEN_DX - 5)){ _levels._levelSpecialBallMarkers[_local1].x = (SCREEN_DX - 5); _levels._levelSpecialBallMarkers[_local1]._speedX = (_levels._levelSpecialBallMarkers[_local1]._speedX * -1); }; }; _levels._levelSpecialBallMarkers[_local1]._speedY = (_levels._levelSpecialBallMarkers[_local1]._speedY + (0.0008 * SPEEDMUL)); if (_levels._levelSpecialBallMarkers[_local1].y >= SCREEN_DY){ _levels._levelSpecialBallMarkers[_local1].visible = false; }; }; _local1++; }; if (!_gameRestart){ if (_levels.levelScroll((-0.4 * SPEEDMUL), _levelBalls)){ _levels.levelSelectionSpritesRemove(this); _gameMode = GAME_MODE_GAME; goToDropOffMode(true); _mouseUp = false; _scoreMultiplier = 1; if (_sfxEnabled){ _soundLevelStart.play(0, 1, _soundTransformVolumeHigh); }; }; } else { _local4 = 0; _local1 = 0; while (_local1 < _levels._levelPictures.length) { if (_levels._levelPictures[_local1].visible){ _local4++; }; _local1++; }; _local1 = 0; while (_local1 < _levels._levelScoresTextFields.length) { if (_levels._levelScoresTextFields[_local1].visible){ _local4++; }; _local1++; }; _local1 = 0; while (_local1 < _levels._levelSpecialBallMarkers.length) { if (((!((_levels._levelSpecialBallMarkers[_local1] == null))) && (_levels._levelSpecialBallMarkers[_local1].visible))){ _local4++; }; _local1++; }; if (_local4 == 0){ _gameMode = GAME_MODE_TITLE; _continueRecheck = true; }; }; } else { if (_levelSelectionMode == LEVEL_SELECTION_MODE_FADE_IN){ if (_playfieldBoxY == 82){ if (_levels.levelPicturesScroll(this)){ _levelSelectionMode = LEVEL_SELECTION_MODE_SELECT; _ball.x = -10000; _ballShadow.x = -10000; _ballShadowMin.x = -10000; _ballShadowMax.x = -10000; _levels.unlockNewLevels(this, _scoreTotal); }; }; }; }; } public function scoreRedraw():void{ var _local1:int; var _local2:int; var _local3:Number; var _local4:TextField; _scoreDirty = false; _local2 = 0; _local1 = _scoreAdder; if (_local1 < 0){ _local1 = -(_local1); }; if (((!((_gameMode == GAME_MODE_GAME))) || (!((_inGameMode == INGAME_MODE_FADE_OUT))))){ if (_local1 > 1000){ _local1 = 1000; } else { if (_local1 > 100){ _local1 = 100; } else { if (_local1 > 10){ _local1 = 10; } else { _local1 = 1; }; }; }; }; if (_levels._level >= 0){ _local2 = _levels._levelScores[_levels._level]; } else { _local2 = _scoreTotal; }; if (_scoreAdder > 0){ _local2 = (_local2 + _local1); _scoreAdder = (_scoreAdder - _local1); _scoreDirty = true; } else { if (_scoreAdder < 0){ _local2 = (_local2 - _local1); _scoreAdder = (_scoreAdder + _local1); _scoreDirty = true; }; }; if (_local2 < 0){ _local2 = 0; }; if (_levels._level >= 0){ _levels._levelScores[_levels._level] = _local2; _scoreTotal = 0; _local1 = 0; while (_local1 < (5 * 5)) { _scoreTotal = (_scoreTotal + _levels._levelScores[_local1]); _local1++; }; } else { _scoreTotal = _local2; if (_levels._level == -2){ if (_scoreLevelEditorHighScore < _local2){ _scoreLevelEditorHighScore = _local2; }; }; }; _local3 = 0; if (_totalScoreTextField != null){ _local3 = _totalScoreTextField.alpha; }; scoreRemoveTexts(); _local4 = FontBank.getTextField(this, "Malache", 32, 0xFFFFFF); _local4.x = (SCREEN_DX >> 1); _local4.y = 5; if (_levels._level == -2){ _local4.text = ("HI SCORE: " + _scoreLevelEditorHighScore); } else { _local4.text = ("TOTAL SCORE: " + _scoreTotal); }; _local4.alpha = _local3; addChild(_local4); _totalScoreTextField = _local4; if (_levels._level != -1){ _local4 = FontBank.getTextField(this, "Malache", 22, 16181448); _local4.x = (SCREEN_DX >> 1); _local4.y = 34; _local4.text = ("LEVEL SCORE: " + _local2); _local4.alpha = _local3; addChild(_local4); _scoreTextField = _local4; }; if ((((_levels._level >= 0)) || ((((_levels._level == -2)) && ((_levelEditorDownloadID >= 0)))))){ _local4 = FontBank.getTextField(this, "Malache", 14, 0xFFFFFF); _local4.x = (SCREEN_DX >> 1); _local4.y = 59; if (_levels._level >= 0){ _local4.text = ("LEVEL WORLD RECORD: " + _levels._levelScoresBest[_levels._level]); if (_levels._levelScoresBestNames[_levels._level] != null){ _local4.appendText(((" (" + _levels._levelScoresBestNames[_levels._level]) + ") ")); }; } else { _local4.text = ("LEVEL WORLD RECORD: " + _levelEditorHiScore); _local4.appendText(((" (" + _levelEditorHiScoreName) + ") ")); }; _local4.alpha = _local3; addChild(_local4); _bestScoreTextField = _local4; }; } public function bonusTextFieldAdd(_arg1:TextField, _arg2:int):void{ var _local3:int; var _local4:Number; var _local5:int; _local4 = 10000; _local5 = -1; _local3 = 0; while (_local3 < _bonusTextFields.length) { if (_bonusTextFields[_local3] != null){ if (_bonusTextFieldTimers[_local3] < _local4){ _local4 = _bonusTextFieldTimers[_local3]; _local5 = _local3; }; } else { break; }; _local3++; }; if (_local3 == _bonusTextFields.length){ _local3 = _local5; }; if (_bonusTextFields[_local3] != null){ removeChild(_bonusTextFields[_local3]); }; _arg1.y = (95 + (_local3 * 21)); _arg1.x = ((SCREEN_DX >> 1) - (_arg1.width >> 1)); _bonusTextFieldTimers[_local3] = _arg2; _bonusTextFields[_local3] = _arg1; addChild(_bonusTextFields[_local3]); } public function levelSelectionRunOnEnterFrame(_arg1:Number):void{ var _local2:int; var _local3:int; var _local4:Boolean; var _local5:int; var _local6:Bitmap; var _local7:int; var _local8:String; var _local9:Sprite; var _local10:int; _spriteWhiteCoverBox.visible = true; if ((((_levelSelectionMode == LEVEL_SELECTION_MODE_SELECT)) || ((((_levelSelectionMode == LEVEL_SELECTION_MODE_FADE_OUT)) && (!(_gameRestart)))))){ fadeInTextField(_totalScoreTextField, 1, 0.02); fadeInTextField(_scoreTextField, 1, 0.02); fadeInTextField(_bestScoreTextField, 1, 0.02); } else { if ((((_levelSelectionMode == LEVEL_SELECTION_MODE_FADE_OUT)) && (_gameRestart))){ if (fadeOutTextField(_scoreTextField, 0.02)){ _scoreTextField = null; }; if (fadeOutTextField(_totalScoreTextField, 0.02)){ _totalScoreTextField = null; }; if (fadeOutTextField(_bestScoreTextField, 0.02)){ _bestScoreTextField = null; }; }; }; if (_levelSelectionMode == LEVEL_SELECTION_MODE_SELECT){ _local2 = _levels._level; _local3 = -1; _local4 = false; _levels._level = -1; _local5 = 0; while (_local5 < (5 * 5)) { _local6 = _levels._levelPictures[_local5]; if ((((((((_mouseMovedToX >= _local6.x)) && ((_mouseMovedToX <= (_local6.x + _local6.width))))) && ((_mouseMovedToY >= _local6.y)))) && ((_mouseMovedToY <= (_local6.y + _local6.height))))){ _local7 = ((_local5 / 5) + 1); _local8 = ((("LEVEL " + _local7) + "-") + ((_local5 % 5) + 1)); if (_levels._levelStatuses[_local5] == Levels.LEVEL_STATUS_UNLOCKED){ _levelNameString = ((_local8 + " - ") + Levels.LEVEL_NAMES[_local5]); _levels._level = _local5; _local4 = true; } else { if (_local5 < 24){ _levelNameString = (((_local8 + " - COLLECT ") + Levels.LEVEL_UNLOCK_SCORES[_local5]) + " PTS TO UNLOCK "); } else { _levelNameString = (_local8 + " - ??? "); }; _local4 = true; }; _local3 = _local5; }; _local5++; }; if (_levels._level != _local2){ scoreRedraw(); }; if (_local4){ if ((((_levelNameTextField == null)) || (!((_levelNameTextField.text == _levelNameString))))){ showLevelName(); }; }; if (((!((_levelNameTextField == null))) && ((_local3 < 0)))){ removeChild(_levelNameTextField); _levelNameTextField = null; }; if ((((_local3 >= 0)) && ((_levels._levelStatuses[_local3] == Levels.LEVEL_STATUS_UNLOCKED)))){ _local9 = _levelSelectedBackground; _local9.graphics.clear(); _local9.graphics.lineStyle(); if (_previousPlayedLevel == _local3){ _local9.graphics.beginFill(12044258); } else { _local9.graphics.beginFill(11254743); }; _local10 = ((64 + 10) + 10); _local9.graphics.drawRoundRect((-(_local10) >> 1), (-(_local10) >> 1), _local10, _local10, 10, 10); _local9.graphics.endFill(); _levelSelectedBackground.x = _levels._levelPicturesCenterX[_local3]; _levelSelectedBackground.y = _levels._levelPicturesCenterY[_local3]; _levelSelectedBackground.visible = true; } else { _levelSelectedBackground.visible = false; }; if (((_mouseClicked) && ((_local3 >= 0)))){ _mouseClicked = false; _previousPlayedLevel = _local3; if (_levels._levelStatuses[_local3] == Levels.LEVEL_STATUS_UNLOCKED){ _personalBest = _levels._levelScores[_local3]; if (_levels._levelScores[_local3] > 0){ scoreAdd(-(_levels._levelScores[_local3])); }; _levelBalls = _levels.levelLoad(this); levelSelectionStartFadeOut(); if (_local3 < 5){ bgmPlay(BGM_ID_WORLD_1, false); } else { if (_local3 < 10){ bgmPlay(BGM_ID_WORLD_2, false); } else { if (_local3 < 15){ bgmPlay(BGM_ID_WORLD_3, false); } else { if (_local3 < 20){ bgmPlay(BGM_ID_WORLD_4, false); } else { if (_local3 < 25){ bgmPlay(BGM_ID_WORLD_5, false); }; }; }; }; }; }; }; }; } private function manageBallHeight(_arg1:Ball):void{ var _local2:int; var _local3:int; var _local4:TextField; _local2 = -((_arg1._y - 89)); if (_arg1._speedY < 0){ if (_arg1._maxHeight < _local2){ _arg1._maxHeight = _local2; }; return; }; if (_arg1._maxHeight < 1){ return; }; if (_ballMaxHeight < _arg1._maxHeight){ _ballMaxHeight = _arg1._maxHeight; }; _local3 = ((_arg1._maxHeight * 0.06) + 1); scoreAdd(_local3); _local4 = FontBank.getTextField(this, "MassiveHeadache", 22, 0x444444); _local4.text = (("HEIGHT BONUS " + _local3) + "PTS! "); bonusTextFieldAdd(_local4, 2000); _arg1._maxHeight = 0; } private function onMouseOut(_arg1:MouseEvent):void{ _mouseCursorX = -10000; _mouseCursorY = -10000; _mouseCursorShow = false; } private function parseLevelScorePositionUser(_arg1:Event):void{ var _local2:String; var _local3:Array; var _local4:int; _local2 = URLLoader(_arg1.target).data; _local3 = _local2.split(" "); if ((((_local3 == null)) || ((_local3.length < 1)))){ return; }; _local4 = int(_local3[0]); if (_local4 == 1){ worldRecordGot(_uploadedScoreLevel, false); } else { showWorldRanking(_local4); }; } private function titleMenuItemInit(_arg1:Bitmap, _arg2:Number):void{ _arg1.scaleX = 0.7; _arg1.scaleY = 0.7; _arg1.x = ((SCREEN_DX >> 1) - (_arg1.width >> 1)); _arg1.y = (_arg2 - (_arg1.height >> 1)); _arg1.visible = true; _arg1.alpha = 0; _arg1.smoothing = true; addChild(_arg1); } private function onMouseDown(_arg1:MouseEvent):void{ _mouseClickedX = mouseX; _mouseClickedY = mouseY; _mouseClicked = true; _mouseDown = true; } private function backgroundRunOnEnterFrame(_arg1:Number):void{ var _local2:Number; _local2 = (_arg1 * 0.001); if (_bitmapBackground != null){ if ((((((_gameMode == GAME_MODE_GAME)) || ((_gameMode == GAME_MODE_LEVEL_EDITOR)))) || ((((((_gameMode == GAME_MODE_LEVEL_SELECTION)) && ((_levelSelectionMode == LEVEL_SELECTION_MODE_FADE_OUT)))) && (!(_gameRestart)))))){ _bitmapBackground.visible = true; if (!_screenShotMode){ if (_bitmapBackground.alpha < 1){ _bitmapBackground.alpha = (_bitmapBackground.alpha + _local2); if (_bitmapBackground.alpha > 1){ _bitmapBackground.alpha = 1; }; }; }; } else { if (_bitmapBackground.alpha > 0){ _bitmapBackground.alpha = (_bitmapBackground.alpha - _local2); if (_bitmapBackground.alpha < 0){ _bitmapBackground.alpha = 0; _bitmapBackground.visible = false; }; }; }; }; } private function downloadLevel(_arg1:String):void{ var _local2:TextField; var _local3:URLVariables; var _local4:URLRequest; var _local5:URLLoader; _levelEditorHiScore = 0; _levelEditorHiScoreName = "no-one"; _downloadingLevel = int(_arg1); _local2 = FontBank.getTextField(this, "MassiveHeadache", 22, 0xFFFFFF); _local2.text = "DOWNLOADING LEVEL... "; bonusTextFieldAdd(_local2, 2000); _local3 = new URLVariables(); _local3.levelID = _downloadingLevel; _local4 = new URLRequest("http://www.villehelin.com/BallDropOne/levelGet.php"); _local4.method = URLRequestMethod.POST; _local4.data = _local3; _local5 = new URLLoader(_local4); _local5.addEventListener(Event.COMPLETE, parseLevel); _local5.addEventListener(IOErrorEvent.IO_ERROR, onIOErrorWithText); _local5.load(_local4); } private function onMouseOver(_arg1:MouseEvent):void{ _mouseCursorX = mouseX; _mouseCursorY = mouseY; _mouseCursorShow = true; } private static function oneTimePadSetSeed(_arg1:int, _arg2:int):void{ m_oneTimePadSeed = ((_arg2 + _arg1) + 4); oneTimePadGetNextValue(); oneTimePadGetNextValue(); } private static function oneTimePadGetNextValue():int{ m_oneTimePadSeed = ((m_oneTimePadSeed + 123) * 4827); while (m_oneTimePadSeed >= 65536) { m_oneTimePadSeed = (m_oneTimePadSeed - 65536); }; return (m_oneTimePadSeed); } } }//package
Section 24
//BallDropOne__classArrowUp (BallDropOne__classArrowUp) package { import mx.core.*; public class BallDropOne__classArrowUp extends BitmapAsset { } }//package
Section 25
//BallDropOne__classBackground01 (BallDropOne__classBackground01) package { import mx.core.*; public class BallDropOne__classBackground01 extends BitmapAsset { } }//package
Section 26
//BallDropOne__classIconClear (BallDropOne__classIconClear) package { import mx.core.*; public class BallDropOne__classIconClear extends BitmapAsset { } }//package
Section 27
//BallDropOne__classIconDownload (BallDropOne__classIconDownload) package { import mx.core.*; public class BallDropOne__classIconDownload extends BitmapAsset { } }//package
Section 28
//BallDropOne__classIconExit (BallDropOne__classIconExit) package { import mx.core.*; public class BallDropOne__classIconExit extends BitmapAsset { } }//package
Section 29
//BallDropOne__classIconPlay (BallDropOne__classIconPlay) package { import mx.core.*; public class BallDropOne__classIconPlay extends BitmapAsset { } }//package
Section 30
//BallDropOne__classIconSubmit (BallDropOne__classIconSubmit) package { import mx.core.*; public class BallDropOne__classIconSubmit extends BitmapAsset { } }//package
Section 31
//BallDropOne__classMP3SoundAllOpen (BallDropOne__classMP3SoundAllOpen) package { import mx.core.*; public class BallDropOne__classMP3SoundAllOpen extends SoundAsset { } }//package
Section 32
//BallDropOne__classMP3SoundBoostBad (BallDropOne__classMP3SoundBoostBad) package { import mx.core.*; public class BallDropOne__classMP3SoundBoostBad extends SoundAsset { } }//package
Section 33
//BallDropOne__classMP3SoundBoostGood (BallDropOne__classMP3SoundBoostGood) package { import mx.core.*; public class BallDropOne__classMP3SoundBoostGood extends SoundAsset { } }//package
Section 34
//BallDropOne__classMP3SoundBounceBall1 (BallDropOne__classMP3SoundBounceBall1) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBall1 extends SoundAsset { } }//package
Section 35
//BallDropOne__classMP3SoundBounceBall2 (BallDropOne__classMP3SoundBounceBall2) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBall2 extends SoundAsset { } }//package
Section 36
//BallDropOne__classMP3SoundBounceBall3 (BallDropOne__classMP3SoundBounceBall3) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBall3 extends SoundAsset { } }//package
Section 37
//BallDropOne__classMP3SoundBounceBall4 (BallDropOne__classMP3SoundBounceBall4) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBall4 extends SoundAsset { } }//package
Section 38
//BallDropOne__classMP3SoundBounceBallB1 (BallDropOne__classMP3SoundBounceBallB1) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallB1 extends SoundAsset { } }//package
Section 39
//BallDropOne__classMP3SoundBounceBallB2 (BallDropOne__classMP3SoundBounceBallB2) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallB2 extends SoundAsset { } }//package
Section 40
//BallDropOne__classMP3SoundBounceBallB3 (BallDropOne__classMP3SoundBounceBallB3) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallB3 extends SoundAsset { } }//package
Section 41
//BallDropOne__classMP3SoundBounceBallB4 (BallDropOne__classMP3SoundBounceBallB4) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallB4 extends SoundAsset { } }//package
Section 42
//BallDropOne__classMP3SoundBounceBallB5 (BallDropOne__classMP3SoundBounceBallB5) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallB5 extends SoundAsset { } }//package
Section 43
//BallDropOne__classMP3SoundBounceBallB6 (BallDropOne__classMP3SoundBounceBallB6) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallB6 extends SoundAsset { } }//package
Section 44
//BallDropOne__classMP3SoundBounceBallC1 (BallDropOne__classMP3SoundBounceBallC1) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallC1 extends SoundAsset { } }//package
Section 45
//BallDropOne__classMP3SoundBounceBallC2 (BallDropOne__classMP3SoundBounceBallC2) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallC2 extends SoundAsset { } }//package
Section 46
//BallDropOne__classMP3SoundBounceBallC3 (BallDropOne__classMP3SoundBounceBallC3) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallC3 extends SoundAsset { } }//package
Section 47
//BallDropOne__classMP3SoundBounceBallC4 (BallDropOne__classMP3SoundBounceBallC4) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallC4 extends SoundAsset { } }//package
Section 48
//BallDropOne__classMP3SoundBounceBallC5 (BallDropOne__classMP3SoundBounceBallC5) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallC5 extends SoundAsset { } }//package
Section 49
//BallDropOne__classMP3SoundBounceBallC6 (BallDropOne__classMP3SoundBounceBallC6) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallC6 extends SoundAsset { } }//package
Section 50
//BallDropOne__classMP3SoundBounceBallD1 (BallDropOne__classMP3SoundBounceBallD1) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallD1 extends SoundAsset { } }//package
Section 51
//BallDropOne__classMP3SoundBounceBallD2 (BallDropOne__classMP3SoundBounceBallD2) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallD2 extends SoundAsset { } }//package
Section 52
//BallDropOne__classMP3SoundBounceBallD3 (BallDropOne__classMP3SoundBounceBallD3) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallD3 extends SoundAsset { } }//package
Section 53
//BallDropOne__classMP3SoundBounceBallD4 (BallDropOne__classMP3SoundBounceBallD4) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallD4 extends SoundAsset { } }//package
Section 54
//BallDropOne__classMP3SoundBounceBallD5 (BallDropOne__classMP3SoundBounceBallD5) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallD5 extends SoundAsset { } }//package
Section 55
//BallDropOne__classMP3SoundBounceBallD6 (BallDropOne__classMP3SoundBounceBallD6) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceBallD6 extends SoundAsset { } }//package
Section 56
//BallDropOne__classMP3SoundBounceWall (BallDropOne__classMP3SoundBounceWall) package { import mx.core.*; public class BallDropOne__classMP3SoundBounceWall extends SoundAsset { } }//package
Section 57
//BallDropOne__classMP3SoundButton1 (BallDropOne__classMP3SoundButton1) package { import mx.core.*; public class BallDropOne__classMP3SoundButton1 extends SoundAsset { } }//package
Section 58
//BallDropOne__classMP3SoundButton2 (BallDropOne__classMP3SoundButton2) package { import mx.core.*; public class BallDropOne__classMP3SoundButton2 extends SoundAsset { } }//package
Section 59
//BallDropOne__classMP3SoundColumn1 (BallDropOne__classMP3SoundColumn1) package { import mx.core.*; public class BallDropOne__classMP3SoundColumn1 extends SoundAsset { } }//package
Section 60
//BallDropOne__classMP3SoundColumn2 (BallDropOne__classMP3SoundColumn2) package { import mx.core.*; public class BallDropOne__classMP3SoundColumn2 extends SoundAsset { } }//package
Section 61
//BallDropOne__classMP3SoundColumn3 (BallDropOne__classMP3SoundColumn3) package { import mx.core.*; public class BallDropOne__classMP3SoundColumn3 extends SoundAsset { } }//package
Section 62
//BallDropOne__classMP3SoundColumn4 (BallDropOne__classMP3SoundColumn4) package { import mx.core.*; public class BallDropOne__classMP3SoundColumn4 extends SoundAsset { } }//package
Section 63
//BallDropOne__classMP3SoundHitMystery1 (BallDropOne__classMP3SoundHitMystery1) package { import mx.core.*; public class BallDropOne__classMP3SoundHitMystery1 extends SoundAsset { } }//package
Section 64
//BallDropOne__classMP3SoundHitMystery2 (BallDropOne__classMP3SoundHitMystery2) package { import mx.core.*; public class BallDropOne__classMP3SoundHitMystery2 extends SoundAsset { } }//package
Section 65
//BallDropOne__classMP3SoundHitSpecial1 (BallDropOne__classMP3SoundHitSpecial1) package { import mx.core.*; public class BallDropOne__classMP3SoundHitSpecial1 extends SoundAsset { } }//package
Section 66
//BallDropOne__classMP3SoundHitSpecial2 (BallDropOne__classMP3SoundHitSpecial2) package { import mx.core.*; public class BallDropOne__classMP3SoundHitSpecial2 extends SoundAsset { } }//package
Section 67
//BallDropOne__classMP3SoundHitTTursas (BallDropOne__classMP3SoundHitTTursas) package { import mx.core.*; public class BallDropOne__classMP3SoundHitTTursas extends SoundAsset { } }//package
Section 68
//BallDropOne__classMP3SoundLevelStart (BallDropOne__classMP3SoundLevelStart) package { import mx.core.*; public class BallDropOne__classMP3SoundLevelStart extends SoundAsset { } }//package
Section 69
//BallDropOne__classMP3SoundMenu (BallDropOne__classMP3SoundMenu) package { import mx.core.*; public class BallDropOne__classMP3SoundMenu extends SoundAsset { } }//package
Section 70
//BallDropOne__classMP3SoundMystery (BallDropOne__classMP3SoundMystery) package { import mx.core.*; public class BallDropOne__classMP3SoundMystery extends SoundAsset { } }//package
Section 71
//BallDropOne__classMP3SoundPiip (BallDropOne__classMP3SoundPiip) package { import mx.core.*; public class BallDropOne__classMP3SoundPiip extends SoundAsset { } }//package
Section 72
//BallDropOne__classMP3SoundPlayerDeath (BallDropOne__classMP3SoundPlayerDeath) package { import mx.core.*; public class BallDropOne__classMP3SoundPlayerDeath extends SoundAsset { } }//package
Section 73
//BallDropOne__classMP3SoundSelection1 (BallDropOne__classMP3SoundSelection1) package { import mx.core.*; public class BallDropOne__classMP3SoundSelection1 extends SoundAsset { } }//package
Section 74
//BallDropOne__classMP3SoundSelection2 (BallDropOne__classMP3SoundSelection2) package { import mx.core.*; public class BallDropOne__classMP3SoundSelection2 extends SoundAsset { } }//package
Section 75
//BallDropOne__classMP3SoundUnlockLevel (BallDropOne__classMP3SoundUnlockLevel) package { import mx.core.*; public class BallDropOne__classMP3SoundUnlockLevel extends SoundAsset { } }//package
Section 76
//BallDropOne__classMP3SoundWorld1 (BallDropOne__classMP3SoundWorld1) package { import mx.core.*; public class BallDropOne__classMP3SoundWorld1 extends SoundAsset { } }//package
Section 77
//BallDropOne__classMP3SoundWorld2 (BallDropOne__classMP3SoundWorld2) package { import mx.core.*; public class BallDropOne__classMP3SoundWorld2 extends SoundAsset { } }//package
Section 78
//BallDropOne__classMP3SoundWorld3 (BallDropOne__classMP3SoundWorld3) package { import mx.core.*; public class BallDropOne__classMP3SoundWorld3 extends SoundAsset { } }//package
Section 79
//BallDropOne__classMP3SoundWorld4 (BallDropOne__classMP3SoundWorld4) package { import mx.core.*; public class BallDropOne__classMP3SoundWorld4 extends SoundAsset { } }//package
Section 80
//BallDropOne__classMP3SoundWorld5 (BallDropOne__classMP3SoundWorld5) package { import mx.core.*; public class BallDropOne__classMP3SoundWorld5 extends SoundAsset { } }//package
Section 81
//BallDropOne__classMP3SoundWR (BallDropOne__classMP3SoundWR) package { import mx.core.*; public class BallDropOne__classMP3SoundWR extends SoundAsset { } }//package
Section 82
//BallDropOne__classMusicOff (BallDropOne__classMusicOff) package { import mx.core.*; public class BallDropOne__classMusicOff extends BitmapAsset { } }//package
Section 83
//BallDropOne__classMusicOn (BallDropOne__classMusicOn) package { import mx.core.*; public class BallDropOne__classMusicOn extends BitmapAsset { } }//package
Section 84
//BallDropOne__classNewGameAlert (BallDropOne__classNewGameAlert) package { import mx.core.*; public class BallDropOne__classNewGameAlert extends BitmapAsset { } }//package
Section 85
//BallDropOne__classSFXOff (BallDropOne__classSFXOff) package { import mx.core.*; public class BallDropOne__classSFXOff extends BitmapAsset { } }//package
Section 86
//BallDropOne__classSFXOn (BallDropOne__classSFXOn) package { import mx.core.*; public class BallDropOne__classSFXOn extends BitmapAsset { } }//package
Section 87
//BallDropOne__classTitleContinue (BallDropOne__classTitleContinue) package { import mx.core.*; public class BallDropOne__classTitleContinue extends BitmapAsset { } }//package
Section 88
//BallDropOne__classTitleDown (BallDropOne__classTitleDown) package { import mx.core.*; public class BallDropOne__classTitleDown extends BitmapAsset { } }//package
Section 89
//BallDropOne__classTitleHomePage (BallDropOne__classTitleHomePage) package { import mx.core.*; public class BallDropOne__classTitleHomePage extends BitmapAsset { } }//package
Section 90
//BallDropOne__classTitleLevelEditor (BallDropOne__classTitleLevelEditor) package { import mx.core.*; public class BallDropOne__classTitleLevelEditor extends BitmapAsset { } }//package
Section 91
//BallDropOne__classTitleStart (BallDropOne__classTitleStart) package { import mx.core.*; public class BallDropOne__classTitleStart extends BitmapAsset { } }//package
Section 92
//BallDropOne__classTitleUp (BallDropOne__classTitleUp) package { import mx.core.*; public class BallDropOne__classTitleUp extends BitmapAsset { } }//package
Section 93
//ExtraMath (ExtraMath) package { public class ExtraMath { public static function random(_arg1:Number, _arg2:Number=0, _arg3:Number=1):Number{ var _local4:Number; var _local5:Number; var _local6:Number; if (_arg1 > _arg2){ _local6 = _arg1; _arg1 = _arg2; _arg2 = _local6; }; _local4 = ((_arg2 - _arg1) + (1 * _arg3)); _local5 = (Math.random() * _local4); _local5 = (_local5 + _arg1); return (floor(_local5, _arg3)); } private static function floor(_arg1:Number, _arg2:Number=1):Number{ return ((Math.floor((_arg1 / _arg2)) * _arg2)); } } }//package
Section 94
//FontBank (FontBank) package { import flash.display.*; import flash.text.*; public class FontBank { public static var _fontMassiveHeadache:Class = FontBank__fontMassiveHeadache; public static var _fontMalache:Class = FontBank__fontMalache; public static var _fontZachary:Class = FontBank__fontZachary; public static function init():void{ Font.registerFont(_fontMalache); Font.registerFont(_fontZachary); Font.registerFont(_fontMassiveHeadache); } public static function getTextField(_arg1:BallDropOne, _arg2:String, _arg3:int, _arg4:int):TextField{ var _local5:TextFormat; var _local6:TextField; _local5 = new TextFormat(); _local5.size = _arg3; _local5.font = _arg2; _local5.color = _arg4; _local6 = new TextField(); _local6.defaultTextFormat = _local5; _local6.embedFonts = true; _local6.autoSize = TextFieldAutoSize.CENTER; _local6.mouseEnabled = false; if ((((_arg1.stage.quality == StageQuality.MEDIUM)) || ((_arg1.stage.quality == StageQuality.LOW)))){ _local6.antiAliasType = AntiAliasType.NORMAL; } else { _local6.antiAliasType = AntiAliasType.ADVANCED; }; return (_local6); } } }//package
Section 95
//FontBank__fontMalache (FontBank__fontMalache) package { import mx.core.*; public class FontBank__fontMalache extends FontAsset { } }//package
Section 96
//FontBank__fontMassiveHeadache (FontBank__fontMassiveHeadache) package { import mx.core.*; public class FontBank__fontMassiveHeadache extends FontAsset { } }//package
Section 97
//FontBank__fontZachary (FontBank__fontZachary) package { import mx.core.*; public class FontBank__fontZachary extends FontAsset { } }//package
Section 98
//InputBox (InputBox) package { import flash.display.*; import flash.text.*; import flash.net.*; public class InputBox extends Sprite { public var _textFieldInput:TextField; private var _b3DX:Number; private var _b3DY:Number; private var _b1X:Number; public var _buttonPressedCancel:Boolean; public var _buttonPressedOk:Boolean; public var _height:Number; private var _b1Y:Number; private var _b2Y:Number; private var _b2X:Number; private var _b2DY:Number; private var _b3X:Number; private var _b2DX:Number; public var _textFieldTitle:TextField; private var _textField2:TextField; private var _textField1:TextField; private var _b3Y:Number; private var _b1DX:Number; private var _b1DY:Number; public var _width:Number; public var _x:Number; public var _y:Number; public function InputBox(_arg1:BallDropOne, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number){ x = _arg2; y = _arg3; _x = _arg2; _y = _arg3; _width = _arg4; _height = _arg5; _buttonPressedOk = false; _buttonPressedCancel = false; _textField1 = null; _textField2 = null; _textFieldInput = null; _textFieldTitle = null; } public function Show(_arg1:BallDropOne):void{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:TextField; graphics.clear(); graphics.lineStyle(); graphics.beginFill(5466772, 1); graphics.drawRoundRect((-(_width) * 0.5), (-(_height) * 0.5), _width, _height, 10, 10); graphics.endFill(); graphics.beginFill(7045286, 1); graphics.drawRoundRect((-(_width) * 0.485), (-(_height) * 0.48), (_width * 0.97), (_height * 0.96), 10, 10); graphics.endFill(); _b1DX = (_width * 0.4); _b1DY = (_height * 0.2); _b1X = ((-(_width) * 0.5) + (_b1DX * 0.1)); _b1Y = ((_height * 0.5) - (_b1DY * 1.3)); graphics.beginFill(5466772, 1); graphics.drawRoundRect(_b1X, _b1Y, _b1DX, _b1DY, 10, 10); graphics.endFill(); graphics.beginFill(8097974, 1); graphics.drawRoundRect((_b1X + 2), (_b1Y + 2), (_b1DX - 4), (_b1DY - 4), 10, 10); graphics.endFill(); _textField1 = FontBank.getTextField(_arg1, "MassiveHeadache", 18, 0xFFFFFF); _textField1.x = (_b1X + (_b1DX * 0.5)); _textField1.y = (_b1Y + 5); _textField1.text = "Ok"; addChild(_textField1); _b2DX = _b1DX; _b2DY = _b1DY; _b2X = ((_width * 0.5) - (_b2DX * 1.1)); _b2Y = ((_height * 0.5) - (_b2DY * 1.3)); graphics.beginFill(5466772, 1); graphics.drawRoundRect(_b2X, _b2Y, _b2DX, _b2DY, 10, 10); graphics.endFill(); graphics.beginFill(8097974, 1); graphics.drawRoundRect((_b2X + 2), (_b2Y + 2), (_b2DX - 4), (_b2DY - 4), 10, 10); graphics.endFill(); _textField2 = FontBank.getTextField(_arg1, "MassiveHeadache", 18, 0xFFFFFF); _textField2.x = ((_b2X + (_b2DX * 0.5)) - 2); _textField2.y = (_b2Y + 5); _textField2.text = "Cancel"; addChild(_textField2); _local4 = _b2DX; _local5 = _b2DY; _local2 = (-(_local4) * 0.5); _local3 = -68; _b3X = _local2; _b3Y = _local3; _b3DX = _local4; _b3DY = _local5; graphics.beginFill(5466772, 1); graphics.drawRoundRect(_local2, _local3, _local4, _local5, 10, 10); graphics.endFill(); graphics.beginFill(8097974, 1); graphics.drawRoundRect((_local2 + 2), (_local3 + 2), (_local4 - 4), (_local5 - 4), 10, 10); graphics.endFill(); _local6 = FontBank.getTextField(_arg1, "MassiveHeadache", 18, 0xFFFFFF); _local6.x = ((_local2 + (_local4 * 0.5)) - 2); _local6.y = (_local3 + 5); _local6.text = "Levels"; addChild(_local6); graphics.beginFill(5466772, 1); graphics.drawRoundRect(-35, 0, 70, 24, 10, 10); graphics.endFill(); _textFieldInput = FontBank.getTextField(_arg1, "MassiveHeadache", 20, 0xFFFFFF); _textFieldInput.x = 0; _textFieldInput.y = 0; _textFieldInput.text = "0"; _textFieldInput.mouseEnabled = true; _textFieldInput.type = TextFieldType.INPUT; _textFieldInput.maxChars = 4; addChild(_textFieldInput); _textFieldTitle = FontBank.getTextField(_arg1, "MassiveHeadache", 20, 0xFFFFFF); _textFieldTitle.x = 0; _textFieldTitle.y = -32; _textFieldTitle.text = "INPUT LEVEL ID"; addChild(_textFieldTitle); _arg1.addChild(this); } public function Hide(_arg1:BallDropOne):void{ _arg1.removeChild(this); } public function Run(_arg1:BallDropOne, _arg2:Number):void{ var _local3:int; if ((((((((_arg1._mouseMovedToX >= (_b1X + x))) && ((_arg1._mouseMovedToX <= ((_b1X + x) + _b1DX))))) && ((_arg1._mouseMovedToY >= (_b1Y + y))))) && ((_arg1._mouseMovedToY <= ((_b1Y + y) + _b1DY))))){ _arg1._infoTextStringLatest = "DOWNLOAD THE LEVEL"; if (_arg1._mouseClicked){ _arg1._mouseClicked = false; _arg1.playButtonSound(); _buttonPressedOk = true; }; } else { if ((((((((_arg1._mouseMovedToX >= (_b2X + x))) && ((_arg1._mouseMovedToX <= ((_b2X + x) + _b2DX))))) && ((_arg1._mouseMovedToY >= (_b2Y + y))))) && ((_arg1._mouseMovedToY <= ((_b2Y + y) + _b2DY))))){ _arg1._infoTextStringLatest = "DO NOT DOWNLOAD THE LEVEL"; if (_arg1._mouseClicked){ _arg1._mouseClicked = false; _arg1.playButtonSound(); _buttonPressedCancel = true; }; } else { if ((((((((_arg1._mouseMovedToX >= (_b3X + x))) && ((_arg1._mouseMovedToX <= ((_b3X + x) + _b3DX))))) && ((_arg1._mouseMovedToY >= (_b3Y + y))))) && ((_arg1._mouseMovedToY <= ((_b3Y + y) + _b3DY))))){ _arg1._infoTextStringLatest = "VISIT THE LEVEL SERVER"; if (_arg1._mouseClicked){ _arg1._mouseClicked = false; _arg1.playButtonSound(); _local3 = int(_textFieldInput.text); navigateToURL(new URLRequest(("http://www.villehelin.com/BallDropOne/levelsList.php?id=" + _local3)), "_blank"); }; }; }; }; } } }//package
Section 99
//Levels (Levels) package { import flash.display.*; import flash.text.*; public class Levels { public var _specialBalls:Array; public var _classLevel19:Class; public var _levelOffsetY:Number; public var _classLevel13:Class; public var _levelScores:Array; public var _classLevel20:Class; public var _classLevel21:Class; public var _classLevel22:Class; public var _classLevel23:Class; public var _classLevel24:Class; public var _classLevel25:Class; public var _levelScoresBest:Array; public var _ballBouncesTotal:int; public var _levelScoresTextFieldsY:Array; public var _levelPictureColumnSpeedY:Array; public var _levelScoresBestNames:Array; public var _levelSpecialBallMarkers:Array;// = null public var _levelPicturesCenterX:Array; public var _specialBallsTotal:int; public var _levelPicturesSpeedX:Array; public var _levelPicturesSpeedY:Array; public var _specialBallsCollected:int; public var _levelPicturesCenterY:Array; public var _level:int; public var _ballCurrentType:int; public var _levelPictureColumnOffsetsY:Array; public var _levelPicturesX:Array; public var _levelPicturesY:Array; public var _levelStatuses:Array; public var _levelSpecialBallsPerLevel:Array; public var _levelPicturesCache:Array; public var _classLevel02:Class; public var _classLevel03:Class; public var _classLevel04:Class; public var _classLevel05:Class; public var _classLevel06:Class; public var _classLevel07:Class; public var _classLevel01:Class; public var _classLevel09:Class; public var _classLevel08:Class; public var _levelLockSprites:Array; public var _levelPictures:Array; public var _classLevel10:Class; public var _classLevel11:Class; public var _levelScoresTextFields:Array; public var _classLevel14:Class; public var _classLevel15:Class; public var _classLevel18:Class; public var _levelScoresTextFieldsX:Array; public var _ballBouncesCurrentType:int; public var _classLevel16:Class; public var _classLevel17:Class; public var _classLevel12:Class; public var _levelScoresTextFieldsSpeedX:Array; public var _levelScoresTextFieldsSpeedY:Array; public static const LEVEL_NAMES:Array = ["KNOW YOUR BALLS ", "FIREWORKS AND A BEAST ", "MAYBE LATER? ", "WAITING ", "SCORE ROOM ", "GLASS SHOP ", "GARDEN OF CACTI ", "CAN YO DIG IT? ", "HARD BALLS ", "SAFE CRACKER ", "SOMETIMES BIGGER IS BETTER ", "GOT BIGGG? ", "UNLEASHING THE MONSTER ", "SMALL BALLS GO TO PLACES ", "CANNED GOODS ", "THE DISHWASHER ", "LOCKED AWAY ", "WEATHER FORECAST ", "FUTURE IS TOFU ", "SLOW OR DIE ", "REVISITOR ", "THE MASTER OF THE PYRAMID ", "GOOD LUCK! BIG BANG! ", "VIOLET SPACE ", "MYSTERY SOLVED! "]; public static const LEVEL_0:Array = [7, 56, 0x0200, 13.9, 7, 88, 0x0200, 13.9, 7, 120, 0x0200, 13.9, 7, 152, 0x0200, 13.9, 7, 184, 0x0200, 13.9, 7, 424, 0x0200, 13.9, 7, 392, 0x0200, 13.9, 7, 360, 0x0200, 13.9, 7, 328, 0x0200, 13.9, 7, 296, 0x0200, 13.9, 3, 24, 0x0200, 13.9, 3, 456, 0x0200, 13.9, 3, 216, 520, 13.9, 3, 264, 520, 13.9, 18, 240, 542, 12.4, 3, 240, 500, 12.4, 9, 240, 310, 28, 9, 132, 268, 22.3, 9, 396, 148, 22.3000000000001, 9, 60, 160, 28.6000000000001, 9, 300, 316, 22.9000000000001, 9, 350, 300, 18.4, 9, 384, 271, 16.3, 9, 408, 241, 11.2, 7, 408, 430, 40, 7, 84, 393, 23.2, 11, 184, 290, 25.9, 11, 97, 233, 20.2, 11, 420, 214, 10.3]; public static const LEVEL_1:Array = [Ball.BALL_TYPE_GHOST_HIDDEN, ((240 - (25 * 8)) - 10), (260 + (25 * 5)), 20, Ball.BALL_TYPE_GHOST_HIDDEN, ((240 + (25 * 8)) + 10), (260 + (25 * 5)), 20, Ball.BALL_TYPE_PINK, (240 - (25 * 8)), (260 + (25 * 0)), 12, Ball.BALL_TYPE_BLUE, (240 - (25 * 8)), (260 + (25 * 0)), 14, Ball.BALL_TYPE_BLUE, (240 - (25 * 5)), (260 + (25 * 0)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 4)), (260 + (25 * 0)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 3)), (260 + (25 * 0)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 2)), (260 + (25 * 0)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 1)), (260 + (25 * 0)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 1)), (260 + (25 * 0)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 2)), (260 + (25 * 0)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 3)), (260 + (25 * 0)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 4)), (260 + (25 * 0)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 5)), (260 + (25 * 0)), 10, Ball.BALL_TYPE_PINK, (240 + (25 * 8)), (260 + (25 * 0)), 12, Ball.BALL_TYPE_BLUE, (240 + (25 * 8)), (260 + (25 * 0)), 14, Ball.BALL_TYPE_BLUE, (240 - (25 * 5)), (260 + (25 * 1)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 4)), (260 + (25 * 1)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 3)), (260 + (25 * 1)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 2)), (260 + (25 * 1)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 1)), (260 + (25 * 1)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 1)), (260 + (25 * 1)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 2)), (260 + (25 * 1)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 3)), (260 + (25 * 1)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 4)), (260 + (25 * 1)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 5)), (260 + (25 * 1)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 5)), (260 + (25 * 2)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 4)), (260 + (25 * 2)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 3)), (260 + (25 * 2)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 2)), (260 + (25 * 2)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 1)), (260 + (25 * 2)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 0)), (260 + (25 * 2)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 1)), (260 + (25 * 2)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 2)), (260 + (25 * 2)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 3)), (260 + (25 * 2)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 4)), (260 + (25 * 2)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 5)), (260 + (25 * 2)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 5)), (260 + (25 * 3)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 4)), (260 + (25 * 3)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 3)), (260 + (25 * 3)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 2)), (260 + (25 * 3)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 1)), (260 + (25 * 3)), 10, Ball.BALL_TYPE_BLUE, (240 - (25 * 0)), (260 + (25 * 3)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 1)), (260 + (25 * 3)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 2)), (260 + (25 * 3)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 3)), (260 + (25 * 3)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 4)), (260 + (25 * 3)), 10, Ball.BALL_TYPE_BLUE, (240 + (25 * 5)), (260 + (25 * 3)), 10, Ball.BALL_TYPE_YELLOW, (240 - (25 * 7)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 - (25 * 6)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 - (25 * 5)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 - (25 * 4)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 - (25 * 3)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 - (25 * 2)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 - (25 * 1)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 - (25 * 0)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 + (25 * 1)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 + (25 * 2)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 + (25 * 3)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 + (25 * 4)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 + (25 * 5)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 + (25 * 6)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_YELLOW, (240 + (25 * 7)), (260 + (25 * 5)), 12, Ball.BALL_TYPE_PLAYER, (240 - (25 * 0)), (260 + (25 * 6)), 7, Ball.BALL_TYPE_ELTOPO, (240 - (25 * 0)), (260 + (25 * 11)), 15]; public static const LEVEL_2:Array = [1, 240, 188, 9.5, 1, 240, 232, 9.5, 1, 240, 276, 9.5, 1, 240, 320, 9.5, 1, 240, 364, 9.5, 1, 240, 408, 9.5, 11, 240, 472, 17.9, 5, 240, 516, 12.2, 5, 220, 520, 8.3, 5, 260, 520, 8.3, 5, 212, 530, 5.3, 5, 268, 530, 5.3, 7, 168, 464, 10.1, 7, 312, 464, 10.1, 7, 144, 464, 10.1, 7, 336, 464, 10.1, 7, 120, 464, 10.1, 7, 360, 464, 10.1, 8, 384, 464, 10.1, 8, 96, 464, 10.1, 8, 408, 464, 10.1, 8, 72, 464, 10.1, 8, 432, 464, 10.1, 8, 48, 464, 10.1, 8, 456, 464, 10.1, 8, 24, 464, 10.1, 7, 72, 404, 19.4, 7, 408, 404, 19.4, 7, 348, 320, 25, 7, 132, 320, 25, 7, 380, 292, 13, 7, 100, 292, 13, 7, 408, 264, 13, 7, 72, 264, 13, 6, 24, 488, 10.6, 6, 48, 488, 10.6, 6, 72, 488, 10.6, 6, 96, 488, 10.6, 6, 384, 488, 10.6, 6, 408, 488, 10.6, 6, 432, 488, 10.6, 6, 456, 488, 10.6, 6, 336, 200, 10.6, 6, 336, 224, 10.6, 6, 360, 224, 10.6, 6, 360, 200, 10.6, 6, 144, 200, 10.6, 6, 144, 224, 10.6, 6, 120, 224, 10.6, 6, 120, 200, 10.6, 11, 274, 456, 15.5, 11, 206, 456, 15.5, 5, 200, 500, 8.9, 5, 280, 500, 8.9, 5, 296, 502, 5, 5, 184, 502, 5, 11, 336, 517, 17.9, 11, 145, 516, 17.9, 18, 176, 320, 14.5, 18, 304, 320, 14.5]; public static const LEVEL_3:Array = [9, 30, 280, 17.2, 9, 450, 280, 17.2, 9, 65, 283, 11.2, 9, 415, 283, 11.2, 9, 96, 288, 14.2, 9, 384, 288, 14.2, 9, 126, 286, 10.3, 9, 354, 286, 10.3, 9, 159, 280, 16, 9, 321, 280, 16, 9, 192, 274, 10.6, 9, 288, 274, 10.6, 9, 224, 272, 14.2, 9, 0x0100, 272, 14.2, 9, 114, 262, 9.1, 9, 177, 248, 11.5, 9, 84, 264, 5, 9, 396, 264, 5, 9, 366, 262, 9.1, 9, 303, 248, 11.5, 9, 20, 250, 7.3, 9, 465, 250, 7.3, 9, 240, 252, 5, 2, 170, 311, 12.5, 2, 317, 311, 12.5, 2, 190, 340, 17.3, 2, 300, 340, 17.3, 2, 245, 365, 9.2, 2, 271, 360, 12.2, 2, 219, 360, 12.2, 23, 216, 300, 6.8, 23, 272, 300, 6.8, 1, 244, 316, 12.2, 11, 48, 508, 22.4, 11, 432, 508, 22.4, 24, 97, 508, 19.1, 24, 383, 508, 19.1, 24, 174, 530, 19.1, 24, 306, 530, 19.1, 24, 30, 318, 11.3, 24, 450, 318, 11.3, 18, 288, 388, 10.7, 18, 204, 388, 10.7, 5, 24, 538, 10.7, 5, 458, 538, 10.7, 11, 214, 224, 24.4000000000001, 11, 266, 224, 24.4000000000001, 11, 312, 217, 16.6, 11, 168, 217, 16.6, 11, 336, 192, 13.3, 11, 144, 192, 13.3, 2, 315, 365, 7.4, 2, 325, 380, 7.4, 2, 335, 395, 7.4, 2, 175, 365, 7.4, 2, 165, 380, 7.4, 2, 155, 395, 7.4, 2, 245, 385, 7.4, 2, 245, 405, 7.4, 2, 245, 425, 7.4, 2, 245, 445, 7.4, 2, 245, 465, 7.4, 2, 245, 485, 7.4, 2, 245, 505, 7.4, 2, 245, 525, 7.4, 2, 245, 545, 7.1]; public static const LEVEL_4:Array = [8, 100, 341, 8, 8, 32, 273, 8, 8, 98, 201, 8, 8, 290, 277, 8, 8, 369, 178, 8, 8, 413, 262, 8, 8, 452, 147, 8, 8, 224, 139, 8, 8, 214, 248, 8, 8, 308, 217, 8, 8, 363, 357, 8, 8, 209, 412, 8, 8, 160, 304, 8, 8, 44, 411, 8, 8, 154, 489, 8, 8, 0xFF, 360, 8, 8, 395, 472, 8, 8, 429, 351, 8, 8, 357, 303, 8, 8, 293, 415, 8, 8, 222, 315, 8, 8, 139, 418, 8, 8, 94, 259, 8, 8, 195, 202, 7.9, 8, 41, 162, 7.9, 8, 334, 471, 7.9, 8, 423, 408, 7.9, 8, 249, 467, 7.9, 8, 71, 520, 7.9, 7, 173, 364, 21.4, 7, 213, 513, 25, 7, 362, 422, 21.1, 7, 354, 248, 21.1, 7, 46, 217, 21.1, 11, 46, 353, 22.3, 11, 446, 529, 22.3, 11, 33, 528, 22.3, 11, 265, 531, 22.3, 11, 307, 336, 17.2, 11, 438, 304, 21.4, 18, 170, 536, 12.4, 18, 328, 287, 12.7, 18, 63, 259, 12.7, 1, 202, 225, 10.6, 1, 141, 385, 10.6, 1, 383, 277, 11.2, 1, 258, 316, 11.2, 8, 253, 220, 10.3, 8, 403, 202, 10.3, 8, 290, 154, 10.3, 8, 139, 165, 10.3, 8, 149, 249, 10.3, 8, 28, 311, 10.3, 8, 93, 387, 10.3, 8, 37, 459, 10.3, 8, 103, 479, 10.3, 8, 173, 442, 10.3, 8, 343, 533, 10.3, 8, 392, 511, 10.3, 8, 446, 460, 10.3, 8, 393, 378, 10.3, 8, 285, 380, 10.3, 8, 253, 423, 10.3, 8, 217, 361, 10.3, 8, 195, 288, 10.3, 8, 250, 273, 10.3, 8, 324, 185, 10.3, 8, 322, 378, 10.3, 8, 297, 466, 10.3, 8, 316, 504, 10.3, 8, 95, 439, 10.3, 8, 125, 530, 10.3, 8, 69, 474, 10.3, 8, 74, 305, 10.3, 8, 125, 316, 10.3, 8, 450, 222, 10.3, 8, 450, 387, 10.3, 8, 204, 460, 5, 8, 18, 494, 5, 8, 424, 165, 5]; public static const LEVEL_5:Array = [21, 20, 240, 19.5, 17, 21, 42, 260, 19.5, 17, 21, 64, 240, 19.5, 17, 21, 86, 260, 19.5, 17, 21, 108, 240, 19.5, 17, 21, 130, 260, 19.5, 17, 21, 152, 240, 19.5, 17, 21, 174, 260, 19.5, 17, 21, 196, 240, 19.5, 17, 21, 218, 260, 19.5, 17, 21, 240, 240, 19.5, 17, 21, 262, 260, 19.5, 17, 21, 284, 240, 19.5, 17, 21, 306, 260, 19.5, 17, 21, 328, 240, 19.5, 17, 21, 350, 260, 19.5, 17, 21, 372, 240, 19.5, 17, 21, 394, 260, 19.5, 17, 21, 416, 240, 19.5, 17, 21, 438, 260, 19.5, 17, 21, 460, 240, 19.5, 17, 9, 152, 331, 13.6, 9, 327, 331, 13.6, 1, 239, 332, 19.9, 9, 239, 331, 25, 21, 438, 220, 18, 16, 21, 394, 220, 18, 16, 21, 350, 220, 18, 16, 21, 306, 220, 18, 16, 21, 262, 220, 18, 16, 21, 218, 220, 18, 16, 21, 174, 220, 18, 16, 21, 130, 220, 18, 16, 21, 86, 220, 18, 16, 21, 42, 220, 18, 16, 24, 408, 530, 19.6, 24, 72, 530, 19.6, 9, 112, 0x0200, 14.5, 9, 368, 0x0200, 14.5, 11, 240, 288, 14.5, 11, 176, 288, 14.5, 11, 304, 288, 14.5, 11, 112, 288, 14.5, 11, 368, 288, 14.5, 11, 48, 288, 14.5, 11, 432, 288, 14.5, 11, 48, 352, 14.5, 11, 432, 352, 14.5, 11, 48, 416, 14.5, 11, 432, 416, 14.5, 11, 48, 480, 14.5, 11, 432, 480, 14.5, 24, 240, 536, 16.9, 1, 42, 239, 8.5, 1, 438, 239, 8.5, 5, 200, 340, 8.5, 5, 280, 340, 8.5, 9, 380, 404, 12.4, 9, 100, 404, 12.4, 18, 240, 384, 14.5]; public static const LEVEL_6:Array = [24, 147, 349, 13.6, 24, 145, 432, 23.5, 24, 206, 380, 40, 24, 293, 342, 40, 24, 285, 425, 30.1000000000001, 24, 347, 397, 30.1000000000001, 24, 406, 359, 30.1000000000001, 24, 452, 335, 14.5, 24, 46, 335, 31.9000000000001, 23, 44, 180, 12.7, 23, 100, 180, 12.7, 23, 156, 180, 12.7, 23, 212, 180, 12.7, 23, 268, 180, 12.7, 23, 324, 180, 12.7, 23, 380, 180, 12.7, 23, 436, 180, 12.7, 23, 72, 180, 5, 23, 128, 180, 5, 23, 184, 180, 5, 23, 240, 180, 5, 23, 296, 180, 5, 23, 352, 180, 5, 23, 408, 180, 5, 23, 464, 180, 5, 23, 16, 180, 5, 12, 85, 543, 10, 13, 455, 370, 11.8, 6, 448, 528, 24.7000000000001, 6, 348, 536, 16, 6, 304, 530, 24.4000000000001, 6, 160, 538, 16.3, 6, 189, 438, 16.3, 6, 328, 440, 11.5, 6, 393, 403, 11.5, 18, 390, 473, 11.5, 11, 394, 529, 25.3000000000001, 11, 260, 538, 16.6, 11, 123, 288, 19.3, 11, 373, 260, 25.6000000000001, 11, 26, 387, 18.7, 23, 241, 136, 21.7, 24, 191, 542, 11.8, 24, 355, 345, 16, 8, 188, 242, 11.5, 8, 80, 0x0100, 14.5, 8, 324, 264, 12.7, 8, 206, 286, 15.4, 8, 48, 248, 10.3, 8, 420, 248, 7.90000000000002]; public static const LEVEL_7:Array = [2, 60, 290, 13.6, 2, 90, 290, 13.6, 2, 120, 290, 13.6, 2, 150, 290, 13.6, 2, 180, 290, 13.6, 2, 210, 290, 13.6, 2, 240, 290, 13.6, 2, 270, 290, 13.6, 2, 300, 290, 13.6, 2, 330, 290, 13.6, 2, 360, 290, 13.6, 2, 390, 290, 13.6, 2, 420, 290, 13.6, 2, 420, 320, 13.6, 2, 390, 320, 13.6, 2, 360, 320, 13.6, 2, 330, 320, 13.6, 2, 300, 320, 13.6, 2, 270, 320, 13.6, 2, 240, 320, 13.6, 2, 210, 320, 13.6, 2, 180, 320, 13.6, 2, 150, 320, 13.6, 2, 120, 320, 13.6, 2, 90, 320, 13.6, 2, 60, 320, 13.6, 2, 60, 350, 13.6, 2, 90, 350, 13.6, 2, 120, 350, 13.6, 2, 150, 350, 13.6, 2, 180, 350, 13.6, 2, 210, 350, 13.6, 2, 240, 350, 13.6, 2, 270, 350, 13.6, 2, 300, 350, 13.6, 2, 330, 350, 13.6, 2, 360, 350, 13.6, 2, 390, 350, 13.6, 2, 420, 350, 13.6, 2, 420, 380, 13.6, 2, 390, 380, 13.6, 2, 360, 380, 13.6, 2, 330, 380, 13.6, 2, 300, 380, 13.6, 2, 270, 380, 13.6, 2, 210, 380, 13.6, 2, 180, 380, 13.6, 2, 150, 380, 13.6, 2, 120, 380, 13.6, 2, 90, 380, 13.6, 2, 60, 380, 13.6, 18, 240, 380, 13.6, 5, 70, 524, 15.7, 5, 138, 524, 15.7, 5, 206, 524, 15.7, 5, 274, 524, 15.7, 5, 342, 524, 15.7, 5, 410, 524, 15.7, 1, 240, 200, 10.3, 1, 168, 200, 10.3, 1, 312, 200, 10.3, 1, 96, 200, 10.3, 1, 384, 200, 10.3, 11, 48, 457, 20.8, 11, 119, 468, 24.4, 11, 171, 423, 18.1, 11, 208, 478, 15.4, 11, 253, 440, 18.7, 11, 298, 455, 8.79999999999996, 11, 327, 470, 8.79999999999996, 11, 375, 490, 19.9, 11, 426, 466, 18.1, 8, 450, 336, 13.6, 8, 29, 335, 13.6]; public static const LEVEL_8:Array = [24, 48, 518, 21.1, 24, 424, 0x0200, 16.3, 24, 192, 452, 22.3000000000001, 24, 262, 452, 22.3000000000001, 24, 339, 452, 22.3000000000001, 24, 168, 520, 16.3, 24, 272, 0x0200, 16.3, 24, 320, 528, 16.3, 24, 222, 528, 16.3, 18, 288, 542, 11.2, 24, 366, 159, 12.7, 24, 426, 159, 12.7, 24, 366, 201, 12.7, 24, 426, 201, 12.7, 24, 366, 243, 12.7, 24, 426, 243, 12.7, 1, 396, 145, 10.3, 24, 30, 280, 18.1, 24, 30, 240, 18.1, 24, 30, 200, 18.1, 24, 40, 160, 18.1, 24, 70, 130, 18.1, 24, 110, 119, 18.1, 24, 150, 120, 18.1, 24, 190, 120, 18.1, 14, 104, 192, 13.3, 9, 105, 191, 20.5, 24, 396, 117, 11.2, 24, 420, 131, 11.2, 24, 372, 131, 11.2, 18, 396, 222, 11.2, 5, 30, 117, 11.2, 11, 370, 502, 26.2000000000001, 11, 30, 473, 17.8, 11, 447, 473, 17.8, 24, 360, 285, 12.7, 24, 432, 285, 12.7, 12, 100, 410, 12.7]; public static const LEVEL_9:Array = [22, 272, 0x0100, 14.8, 22, 208, 0x0100, 14.8, 22, 240, 268, 11.3, 22, 156, 516, 12.8, 22, 324, 516, 12.8, 7, 240, 530, 19.1, 7, 184, 292, 12.5, 7, 296, 292, 12.5, 7, 184, 320, 12.5, 7, 296, 320, 12.5, 7, 184, 348, 12.5, 7, 296, 348, 12.5, 7, 184, 376, 12.5, 7, 296, 376, 12.5, 7, 184, 404, 12.5, 7, 296, 404, 12.5, 7, 240, 404, 12.5, 7, 240, 404, 12.5, 7, 212, 404, 12.5, 7, 268, 404, 12.5, 18, 212, 376, 12.5, 18, 240, 376, 12.5, 18, 268, 376, 12.5, 7, 40, 440, 18.8, 7, 440, 440, 18.8, 7, 360, 360, 18.8, 7, 120, 360, 18.8, 1, 240, 440, 8.6, 12, 23, 535, 11.3, 12, 456, 535, 11.3, 11, 48, 128, 22.4, 11, 144, 128, 22.4, 11, 432, 128, 22.4, 11, 336, 128, 22.4, 11, 36, 218, 15.5, 11, 444, 218, 15.5, 14, 240, 320, 11.6]; public static const LEVEL_STATUS_UNLOCKED:int = 0; public static const LEVEL_10:Array = [8, 80, 280, 8.6, 8, 140, 300, 8.6, 8, 400, 280, 8.6, 8, 340, 300, 8.6, 8, 208, 280, 8.6, 8, 271, 280, 8.6, 8, 20, 300, 8.6, 8, 460, 300, 8.6, 8, 58, 320, 11, 8, 422, 320, 11, 8, 162, 320, 11, 8, 318, 320, 11, 8, 240, 320, 11, 5, 204, 356, 16.7, 5, 276, 356, 16.7, 5, 132, 356, 16.7, 5, 348, 356, 16.7, 5, 24, 356, 16.7, 5, 456, 356, 16.7, 5, 72, 344, 10.4, 5, 408, 344, 10.4, 11, 36, 218, 15.8, 11, 444, 218, 15.8, 11, 240, 184, 15.8, 11, 148, 182, 21.5, 11, 332, 182, 21.5, 11, 40, 520, 23.9, 11, 440, 520, 23.9, 22, 48, 288, 14.9, 22, 112, 288, 14.9, 22, 176, 288, 14.9, 22, 304, 288, 14.9, 22, 368, 288, 14.9, 22, 432, 288, 14.9, 8, 144, 272, 10.7, 8, 336, 272, 10.7, 8, 24, 272, 10.7, 8, 456, 272, 10.7, 8, 64, 0x0100, 6.8, 8, 416, 0x0100, 6.8, 8, 224, 0x0100, 6.8, 8, 0x0100, 0x0100, 6.8, 8, 96, 0x0100, 6.8, 8, 384, 0x0100, 6.8, 8, 184, 264, 5, 8, 296, 264, 5, 8, 310, 264, 5, 8, 170, 264, 5, 8, 366, 264, 5, 8, 114, 264, 5, 9, 96, 536, 16.1, 9, 384, 536, 16.1, 18, 436, 460, 12.2, 18, 44, 460, 12.2, 11, 30, 410, 13.4, 11, 450, 410, 13.4, 11, 60, 380, 13.4, 11, 420, 380, 13.4, 14, 360, 410, 13.4, 14, 120, 410, 13.4, 22, 239, 287, 17.3, 9, 240, 536, 16.1, 1, 240, 472, 17.3, 8, 204, 302, 7.7, 8, 276, 302, 7.7, 8, 402, 302, 7.7, 8, 78, 302, 7.7, 8, 198, 264, 5, 8, 282, 264, 5, 8, 44, 264, 5, 8, 436, 264, 5, 8, 86, 320, 5, 8, 394, 320, 5]; public static const LEVEL_11:Array = [2, 44, 264, 12.2, 2, 100, 264, 12.2, 2, 156, 264, 12.2, 2, 212, 264, 12.2, 2, 268, 264, 12.2, 2, 324, 264, 12.2, 2, 380, 264, 12.2, 2, 436, 264, 12.2, 2, 436, 320, 12.2, 2, 380, 320, 12.2, 2, 324, 320, 12.2, 2, 268, 320, 12.2, 2, 212, 320, 12.2, 2, 156, 320, 12.2, 2, 100, 320, 12.2, 2, 44, 320, 12.2, 2, 44, 376, 12.2, 2, 100, 376, 12.2, 2, 156, 376, 12.2, 2, 324, 376, 12.2, 2, 380, 376, 12.2, 2, 436, 376, 12.2, 2, 436, 432, 12.2, 2, 380, 432, 12.2, 2, 324, 432, 12.2, 2, 268, 432, 12.2, 2, 212, 432, 12.2, 2, 156, 432, 12.2, 2, 100, 432, 12.2, 2, 44, 432, 12.2, 7, 64, 496, 20.6, 7, 416, 496, 20.6, 7, 104, 524, 15.5, 7, 376, 524, 15.5, 7, 350, 540, 9.8, 7, 130, 540, 9.8, 18, 212, 376, 12.2, 18, 268, 376, 12.2, 12, 240, 540, 9.8, 5, 456, 536, 10.4, 5, 24, 536, 10.4, 11, 456, 488, 10.4, 11, 24, 488, 10.4, 11, 220, 540, 8.3, 11, 260, 540, 8.3, 1, 64, 184, 9.5, 1, 416, 184, 9.5, 8, 20, 254, 9.5, 8, 460, 254, 9.5, 8, 240, 254, 9.5, 8, 130, 254, 9.5, 8, 350, 254, 9.5, 11, 72, 208, 12.8, 11, 128, 208, 12.8, 11, 184, 208, 12.8, 11, 240, 208, 12.8, 11, 296, 208, 12.8, 11, 352, 208, 12.8, 11, 408, 208, 12.8]; public static const LEVEL_12:Array = [11, 90, 520, 23.6, 11, 390, 520, 23.6, 11, 40, 480, 18.4, 11, 440, 480, 18.4, 5, 30, 530, 13.3, 5, 450, 530, 13.3, 11, 156, 530, 19.3, 11, 324, 530, 19.3, 24, 240, 528, 24.1000000000001, 8, 240, 150, 15.7, 8, 206, 150, 15.7, 8, 274, 150, 15.7, 8, 172, 150, 15.7, 8, 308, 150, 15.7, 8, 138, 150, 15.7, 8, 342, 150, 15.7, 8, 104, 150, 15.7, 8, 376, 150, 15.7, 8, 70, 150, 15.7, 8, 410, 150, 15.7, 8, 36, 150, 15.7, 8, 444, 150, 15.7, 8, 240, 440, 10, 8, 216, 440, 10, 8, 264, 440, 10, 8, 192, 440, 10, 8, 288, 440, 10, 8, 168, 440, 10, 8, 312, 440, 10, 8, 144, 440, 10, 8, 336, 440, 10, 8, 120, 440, 10, 8, 360, 440, 10, 8, 96, 440, 10, 8, 384, 440, 10, 8, 72, 440, 10, 8, 408, 440, 10, 8, 48, 440, 10, 8, 432, 440, 10, 8, 24, 440, 10, 8, 456, 440, 10, 11, 30, 410, 13.6, 11, 450, 410, 13.6, 24, 408, 404, 19, 24, 72, 404, 19, 24, 240, 242, 37, 24, 288, 272, 22.3000000000001, 24, 192, 272, 22.3000000000001, 24, 162, 294, 11.2, 24, 318, 294, 11.2, 14, 240, 112, 11.5, 18, 240, 488, 10.9, 18, 144, 464, 10.9, 18, 336, 464, 10.9, 3, 240, 360, 18.7, 3, 268, 348, 12.4, 3, 212, 348, 12.4, 3, 282, 320, 19.6, 3, 198, 320, 19.6, 24, 336, 320, 14.5, 24, 144, 320, 14.5, 5, 240, 185, 13, 11, 72, 320, 40, 11, 408, 320, 40, 1, 240, 309, 16.6]; public static const LEVEL_13:Array = [7, 40, 170, 23.6, 7, 140, 170, 23.6, 7, 240, 170, 23.6, 7, 340, 170, 23.6, 7, 440, 170, 23.6, 5, 44, 124, 12.2, 5, 436, 124, 12.2, 7, 240, 536, 16.3, 11, 240, 128, 14.8, 18, 448, 476, 11.5, 18, 32, 476, 11.5, 8, 240, 298, 9.39999999999996, 8, 218, 298, 9.39999999999996, 8, 262, 298, 9.39999999999996, 8, 196, 298, 9.39999999999996, 8, 284, 298, 9.39999999999996, 8, 174, 298, 9.39999999999996, 8, 306, 298, 9.39999999999996, 8, 152, 298, 9.39999999999996, 8, 328, 298, 9.39999999999996, 8, 218, 320, 9.39999999999996, 8, 262, 320, 9.39999999999996, 8, 196, 320, 9.39999999999996, 8, 284, 320, 9.39999999999996, 8, 174, 320, 9.39999999999996, 8, 306, 320, 9.39999999999996, 8, 152, 320, 9.39999999999996, 8, 328, 320, 9.39999999999996, 8, 218, 342, 9.39999999999996, 8, 262, 342, 9.39999999999996, 8, 196, 342, 9.39999999999996, 8, 284, 342, 9.39999999999996, 8, 174, 342, 9.39999999999996, 8, 306, 342, 9.39999999999996, 8, 152, 342, 9.39999999999996, 8, 328, 342, 9.39999999999996, 8, 240, 364, 9.39999999999996, 8, 218, 364, 9.39999999999996, 8, 262, 364, 9.39999999999996, 8, 196, 364, 9.39999999999996, 8, 284, 364, 9.39999999999996, 8, 174, 364, 9.39999999999996, 8, 306, 364, 9.39999999999996, 8, 152, 364, 9.39999999999996, 8, 328, 364, 9.39999999999996, 7, 186, 428, 25, 7, 294, 428, 25, 7, 40, 320, 19, 7, 440, 320, 19, 8, 240, 320, 9.39999999999996, 1, 240, 342, 9.39999999999996, 14, 240, 242, 11.8, 22, 240, 416, 10.3, 22, 288, 536, 10.3, 22, 192, 536, 10.3, 22, 240, 241, 14.5, 9, 150, 530, 13.7, 9, 120, 500, 13.7, 9, 90, 470, 13.7, 9, 60, 440, 13.7, 9, 30, 410, 13.7, 9, 330, 530, 13.7, 9, 360, 500, 13.7, 9, 390, 470, 13.7, 9, 420, 440, 13.7, 9, 450, 410, 13.7, 11, 448, 528, 24.1, 11, 32, 528, 24.1, 7, 390, 170, 7.4, 7, 290, 170, 7.4, 7, 189, 170, 7.4, 7, 90, 170, 7.4]; public static const LEVEL_14:Array = [2, 60, 248, 16.9, 2, 60, 284, 16.9, 2, 60, 320, 16.9, 2, 96, 320, 16.9, 2, 132, 320, 16.9, 2, 168, 320, 16.9, 2, 168, 284, 16.9, 2, 168, 248, 16.9, 2, 420, 248, 16.9, 2, 420, 284, 16.9, 2, 420, 320, 16.9, 2, 384, 320, 16.9, 2, 348, 320, 16.9, 2, 312, 320, 16.9, 2, 312, 284, 16.9, 2, 312, 248, 16.9, 2, 60, 392, 16.9, 2, 60, 428, 16.9, 2, 60, 464, 16.9, 2, 96, 464, 16.9, 2, 132, 464, 16.9, 2, 168, 464, 16.9, 2, 168, 428, 16.9, 2, 168, 392, 16.9, 2, 420, 392, 16.9, 2, 420, 428, 16.9, 2, 420, 464, 16.9, 2, 384, 464, 16.9, 2, 348, 464, 16.9, 2, 312, 464, 16.9, 2, 312, 428, 16.9, 2, 312, 392, 16.9, 24, 239, 356, 40, 24, 28, 532, 22.6000000000001, 24, 451, 532, 22.6000000000001, 6, 130, 427, 13, 6, 97, 270, 13, 6, 349, 428, 13, 6, 119, 251, 7.90000000000002, 6, 127, 277, 11.8, 6, 108, 433, 5, 6, 106, 416, 7.1, 6, 365, 405, 8.6, 6, 373, 425, 6.5, 6, 387, 409, 8.6, 6, 390, 432, 6.2, 6, 336, 408, 6.2, 6, 388, 287, 9.5, 6, 365, 263, 13, 6, 364, 290, 10, 6, 137, 401, 8.20000000000002, 6, 91, 432, 7.1, 18, 370, 502, 11.3, 18, 110, 502, 11.3, 24, 240, 0x0202, 40, 11, 450, 362, 19.9, 11, 30, 362, 19.9, 1, 240, 416, 10.4, 11, 96, 224, 22.9000000000001, 11, 384, 224, 22.9000000000001, 11, 168, 176, 34.9, 11, 312, 176, 34.9, 11, 292, 528, 24.4000000000001, 11, 188, 528, 24.4000000000001]; public static const LEVEL_15:Array = [11, 240, 299, 19, 11, 108, 299, 19, 11, 372, 299, 19, 11, 75, 354, 19, 11, 405, 354, 19, 11, 108, 409, 19, 11, 372, 409, 19, 11, 240, 368, 32.5000000000001, 11, 240, 445, 27.7000000000001, 23, 45, 302, 24.7000000000001, 23, 435, 302, 24.7000000000001, 23, 75, 244, 20.5, 23, 405, 244, 20.5, 23, 123, 235, 15.4, 23, 357, 235, 15.4, 23, 168, 244, 21.1, 23, 312, 244, 21.1, 23, 213, 244, 16.6, 23, 267, 244, 16.6, 23, 240, 230, 8.80000000000002, 12, 144, 520, 13, 12, 344, 520, 13, 2, 40, 520, 17.5, 2, 440, 520, 17.5, 2, 408, 521, 11.8, 2, 72, 521, 11.8, 2, 96, 526, 9.10000000000002, 2, 384, 526, 9.10000000000002, 2, 204, 532, 16, 2, 276, 532, 16, 2, 294, 451, 15.1, 2, 186, 451, 15.1, 2, 30, 360, 12.7, 2, 450, 360, 12.7, 2, 142, 458, 25.0000000000001, 2, 338, 458, 25.0000000000001, 2, 200, 428, 6.70000000000002, 2, 276, 428, 6.70000000000002, 2, 32, 160, 13, 2, 448, 160, 13, 2, 55, 165, 8.80000000000002, 2, 425, 165, 8.80000000000002, 2, 400, 168, 14.2, 2, 80, 168, 14.2, 2, 120, 170, 18.4, 2, 360, 170, 18.4, 2, 149, 185, 11.5, 2, 331, 185, 11.5, 2, 170, 190, 7.30000000000002, 2, 310, 190, 7.30000000000002, 2, 184, 196, 5, 2, 296, 196, 5, 2, 205, 199, 12.8, 2, 275, 199, 12.8, 2, 230, 195, 8.9, 2, 250, 195, 8.9, 1, 185, 355, 8.80000000000002, 1, 295, 355, 8.80000000000002, 2, 296, 353, 12.4, 2, 184, 353, 12.4, 2, 36, 412, 22.3000000000001, 2, 444, 412, 22.3000000000001, 2, 410, 470, 31.9000000000001, 2, 70, 470, 31.9000000000001, 11, 136, 352, 13.3, 11, 344, 352, 13.3, 11, 168, 415, 16.3, 11, 312, 415, 16.3, 11, 312, 289, 15.4, 11, 177, 289, 15.4]; public static const LEVEL_16:Array = [22, 168, 248, 14.2, 22, 312, 248, 14.2, 22, 96, 248, 14.2, 22, 384, 248, 14.2, 22, 96, 376, 14.2, 22, 384, 376, 14.2, 7, 58, 510, 23.2, 7, 422, 510, 23.2, 1, 240, 466, 9.7, 1, 270, 478, 9.7, 1, 210, 478, 9.7, 1, 282, 508, 9.7, 1, 198, 508, 9.7, 11, 213, 532, 15.4, 11, 267, 532, 15.4, 7, 240, 510, 23.2, 18, 240, 311, 11.8, 5, 240, 248, 14.2, 22, 240, 250, 24.7, 5, 174, 376, 9.4, 5, 306, 376, 9.4, 11, 240, 412, 22.3, 14, 96, 312, 10.9, 14, 385, 312, 10.9, 22, 176, 376, 13.6, 22, 304, 376, 13.6, 22, 384, 312, 13.6, 22, 96, 312, 13.6, 11, 444, 436, 22, 11, 36, 436, 22, 2, 96, 280, 6.1, 2, 96, 344, 6.1, 2, 136, 376, 6.1, 2, 344, 376, 6.1, 2, 384, 344, 6.1, 2, 384, 280, 6.1, 2, 132, 248, 6.1, 2, 348, 248, 6.1, 2, 457, 535, 12.4, 2, 23, 535, 12.4, 2, 85, 485, 8.2, 2, 390, 485, 8.2, 2, 240, 545, 7.3]; public static const LEVEL_17:Array = [23, 75, 212, 22, 23, 139, 258, 13, 23, 349, 185, 18, 23, 437, 304, 14, 23, 297, 338, 13, 23, 262, 261, 16, 23, 345, 270, 10, 23, 148, 358, 21, 23, 39, 319, 21, 23, 193, 208, 16, 23, 215, 314, 36, 23, 99, 320, 24, 23, 146, 302, 14, 23, 185, 254, 23, 23, 274, 302, 18, 23, 296, 272, 8, 23, 317, 247, 14, 23, 382, 273, 18, 23, 420, 0x0100, 15, 23, 375, 308, 12, 23, 409, 291, 6, 23, 67, 290, 11, 23, 336, 347, 17, 6, 323, 302, 13, 6, 105, 274, 12, 6, 227, 260, 11, 6, 357, 231, 16, 6, 452, 273, 12, 6, 29, 272, 17, 6, 188, 361, 11, 6, 263, 342, 14, 6, 68, 350, 11, 6, 405, 320, 14, 23, 104, 365, 10, 23, 383, 356, 17, 23, 295, 383, 23, 23, 220, 370, 10, 23, 189, 392, 13, 23, 429, 346, 12, 23, 73, 383, 16, 23, 38, 364, 15, 23, 423, 396, 31, 23, 253, 375, 7, 23, 388, 240, 5, 23, 21, 394, 10, 6, 354, 378, 7, 6, 151, 227, 12, 6, 122, 397, 12, 18, 222, 400, 12, 18, 458, 331, 12, 18, 74, 253, 11, 1, 449, 120, 11, 1, 34, 120, 9, 11, 51, 515, 19, 11, 434, 517, 19, 11, 339, 502, 24, 11, 148, 519, 24, 2, 239, 497, 18, 3, 239, 499, 40]; public static const LEVEL_18:Array = [2, 60, 244, 15, 2, 150, 244, 15, 2, 195, 244, 15, 2, 240, 244, 15, 2, 285, 244, 15, 2, 330, 244, 15, 2, 420, 244, 15, 2, 60, 289, 15, 2, 105, 289, 15, 2, 150, 289, 15, 2, 195, 289, 15, 2, 285, 289, 15, 2, 330, 289, 15, 2, 375, 289, 15, 2, 420, 289, 15, 2, 60, 334, 15, 2, 105, 334, 15, 2, 150, 334, 15, 2, 195, 334, 15, 2, 240, 334, 15, 2, 285, 334, 15, 2, 330, 334, 15, 2, 375, 334, 15, 2, 420, 334, 15, 2, 60, 379, 15, 2, 105, 379, 15, 2, 195, 379, 15, 2, 240, 379, 15, 2, 285, 379, 15, 2, 375, 379, 15, 2, 420, 379, 15, 2, 60, 424, 15, 2, 105, 424, 15, 2, 150, 424, 15, 2, 195, 424, 15, 2, 240, 424, 15, 2, 285, 424, 15, 2, 330, 424, 15, 2, 375, 424, 15, 2, 420, 424, 15, 2, 60, 469, 15, 2, 105, 469, 15, 2, 150, 469, 15, 2, 195, 469, 15, 2, 285, 469, 15, 2, 330, 469, 15, 2, 375, 469, 15, 2, 420, 469, 15, 2, 105, 0x0202, 15, 2, 150, 0x0202, 15, 2, 330, 0x0202, 15, 2, 375, 0x0202, 15, 2, 60, 199, 15, 2, 105, 199, 15, 2, 150, 199, 15, 2, 195, 199, 15, 2, 240, 199, 15, 2, 285, 199, 15, 2, 330, 199, 15, 2, 375, 199, 15, 2, 420, 199, 15, 24, 60, 510, 18, 24, 197, 511, 18, 24, 286, 511, 18, 24, 420, 510, 18, 24, 150, 379, 20, 24, 330, 379, 20, 24, 375, 244, 20, 24, 105, 243, 20, 1, 240, 469, 15, 12, 240, 538, 10, 2, 240, 505, 7, 18, 128, 542, 11, 18, 352, 542, 11, 22, 23, 472, 11, 22, 457, 472, 11, 11, 33, 136, 16, 11, 447, 136, 16, 11, 240, 289, 24]; public static const LEVEL_19:Array = [5, 86, 376, 19, 5, 360, 224, 13, 5, 380, 444, 25, 5, 192, 496, 22, 12, 282, 535, 11, 6, 233, 493, 11, 6, 220, 460, 18, 6, 180, 450, 18, 6, 152, 480, 14, 6, 156, 0x0202, 10, 6, 220, 520, 7, 7, 176, 528, 5, 7, 196, 532, 5, 7, 432, 520, 13, 7, 392, 520, 13, 7, 352, 520, 13, 7, 60, 508, 22, 6, 372, 400, 10, 6, 408, 408, 14, 6, 422, 444, 11, 6, 416, 486, 20, 6, 378, 484, 9, 6, 356, 472, 5, 6, 338, 451, 11, 6, 339, 415, 16, 6, 120, 358, 10, 6, 96, 334, 15, 6, 60, 343, 15, 6, 50, 375, 8, 6, 53, 409, 20, 6, 93, 416, 11, 6, 123, 397, 15, 6, 330, 199, 15, 6, 366, 190, 15, 6, 394, 213, 11, 6, 385, 240, 8, 6, 364, 252, 5, 6, 340, 250, 8, 6, 330, 230, 7, 18, 104, 464, 13, 7, 190, 380, 18, 7, 370, 328, 23, 7, 80, 240, 29, 7, 288, 128, 13, 1, 432, 208, 13, 1, 191, 416, 12, 11, 31, 299, 20, 11, 144, 280, 21, 11, 185, 321, 19, 11, 405, 277, 19, 7, 421, 147, 40, 8, 354, 271, 10, 8, 318, 247, 6, 8, 140, 373, 6, 8, 127, 332, 9, 8, 71, 313, 10, 8, 34, 358, 6, 8, 145, 450, 10, 8, 247, 474, 6, 8, 358, 486, 5, 8, 433, 422, 8, 8, 391, 382, 11, 8, 350, 386, 6, 8, 342, 174, 6, 8, 393, 191, 6, 8, 410, 235, 10]; public static const LEVEL_UNLOCK_SCORES:Array = [0, 400, 600, 1000, 1400, 1800, 2000, 2800, 3000, 3600, 4900, 5300, 5700, 6000, 6700, 7600, 8000, 8400, 8900, 9600, 10500, 11100, 12000, 13500, 99999999]; public static const LEVEL_STATUS_LOCKED:int = 1; public static const LEVELS:Array = [LEVEL_0, LEVEL_1, LEVEL_2, LEVEL_3, LEVEL_4, LEVEL_5, LEVEL_6, LEVEL_7, LEVEL_8, LEVEL_9, LEVEL_10, LEVEL_11, LEVEL_12, LEVEL_13, LEVEL_14, LEVEL_15, LEVEL_16, LEVEL_17, LEVEL_18, LEVEL_19, LEVEL_20, LEVEL_22, LEVEL_23, LEVEL_21, LEVEL_24]; public static const LEVEL_20:Array = [7, 48, 272, 10, 7, 48, 296, 10, 7, 48, 320, 10, 7, 48, 344, 10, 7, 432, 272, 10, 7, 432, 296, 10, 7, 432, 320, 10, 7, 432, 344, 10, 7, 24, 536, 10, 7, 456, 536, 10, 7, 48, 488, 10, 7, 72, 488, 10, 7, 96, 488, 10, 7, 120, 488, 10, 7, 432, 488, 10, 7, 408, 488, 10, 7, 384, 488, 10, 7, 360, 488, 10, 7, 240, 536, 10, 7, 192, 536, 10, 7, 288, 536, 10, 24, 240, 194, 19, 24, 240, 236, 19, 24, 240, 278, 19, 24, 240, 320, 19, 24, 240, 362, 19, 24, 240, 404, 19, 24, 240, 446, 19, 24, 218, 298, 9.70000000000002, 24, 262, 298, 9.70000000000002, 24, 196, 298, 9.70000000000002, 24, 284, 298, 9.70000000000002, 24, 174, 298, 9.70000000000002, 24, 306, 298, 9.70000000000002, 24, 152, 298, 9.70000000000002, 24, 328, 298, 9.70000000000002, 1, 130, 298, 9.70000000000002, 1, 350, 298, 9.70000000000002, 18, 240, 488, 12.1, 11, 366, 530, 19.6, 11, 114, 530, 19.6, 11, 60, 140, 28.9000000000001, 11, 420, 140, 28.9000000000001, 5, 204, 324, 12.7, 5, 276, 324, 12.7]; public static const LEVEL_21:Array = [13, 240, 320, 40, 6, 397, 214, 13.6, 6, 144, 177, 19.6, 6, 51, 209, 21.7, 6, 284, 229, 21.7, 6, 402, 379, 16, 6, 187, 444, 31.0000000000001, 6, 315, 380, 24.1000000000001, 6, 319, 292, 15.1, 6, 342, 414, 15.1, 6, 42, 253, 9.40000000000002, 6, 322, 222, 9.40000000000002, 6, 285, 264, 6.70000000000002, 6, 226, 402, 15.4, 6, 54, 499, 23.8000000000001, 6, 27, 463, 12.1, 6, 85, 524, 9.10000000000002, 6, 37, 534, 10.9, 6, 299, 416, 10.9, 6, 48, 272, 5.80000000000002, 6, 282, 398, 6.70000000000002, 6, 348, 286, 10.7, 6, 418, 201, 7.1, 6, 384, 235, 7.1, 6, 371, 243, 5, 6, 369, 423, 9.2, 6, 239, 427, 9.2, 6, 154, 417, 6.2, 6, 25, 275, 12.7, 6, 21, 485, 6.70000000000002, 6, 140, 435, 11.2, 6, 405, 241, 10, 6, 407, 511, 19, 6, 339, 479, 15.4, 6, 272, 530, 15.4, 6, 190, 509, 15.4, 6, 273, 455, 12.4, 6, 316, 495, 7.90000000000002, 6, 168, 498, 5.20000000000002, 6, 324, 254, 13.6, 6, 231, 451, 10, 6, 301, 525, 10, 6, 325, 515, 7.30000000000002, 6, 342, 535, 14.2, 6, 319, 532, 5, 6, 85, 481, 7.1, 6, 188, 483, 5, 6, 104, 336, 40, 6, 157, 317, 13, 6, 67, 380, 13, 6, 51, 328, 9.10000000000002, 6, 140, 371, 5.50000000000002, 6, 91, 386, 7.60000000000002, 6, 154, 342, 7.60000000000002, 6, 430, 489, 7.60000000000002, 6, 408, 541, 7.60000000000002, 6, 438, 508, 8.20000000000002, 6, 452, 534, 16.3, 6, 344, 507, 8.80000000000002, 6, 123, 477, 25.6000000000001, 6, 414, 428, 30.7000000000001, 6, 373, 397, 11.2, 6, 425, 223, 11.2, 6, 109, 173, 10.9, 6, 117, 194, 8, 6, 99, 192, 5.9, 6, 120, 146, 12.5, 6, 169, 198, 8.6, 6, 175, 180, 7.1, 6, 308, 450, 15.8, 6, 454, 489, 11.6, 6, 375, 532, 15.5, 6, 171, 535, 13.4, 6, 220, 511, 10.7, 6, 353, 260, 10.7, 6, 160, 364, 10.7, 6, 32, 360, 20.9, 18, 69, 431, 12.2, 18, 399, 310, 12.2, 6, 249, 473, 9.5]; public static const LEVEL_22:Array = [3, 240, 236, 12.7, 3, 212, 264, 12.7, 3, 268, 264, 12.7, 3, 240, 292, 12.7, 3, 184, 292, 12.7, 3, 296, 292, 12.7, 3, 212, 320, 12.7, 3, 268, 320, 12.7, 3, 156, 320, 12.7, 3, 324, 320, 12.7, 3, 184, 348, 12.7, 3, 128, 348, 12.7, 3, 352, 348, 12.7, 3, 212, 376, 12.7, 3, 268, 376, 12.7, 3, 156, 376, 12.7, 3, 324, 376, 12.7, 3, 100, 376, 12.7, 3, 380, 376, 12.7, 3, 240, 404, 12.7, 3, 184, 404, 12.7, 3, 296, 404, 12.7, 3, 128, 404, 12.7, 3, 352, 404, 12.7, 3, 72, 404, 12.7, 3, 408, 404, 12.7, 3, 212, 432, 12.7, 3, 268, 432, 12.7, 3, 156, 432, 12.7, 3, 324, 432, 12.7, 3, 100, 432, 12.7, 3, 380, 432, 12.7, 3, 44, 432, 12.7, 3, 436, 432, 12.7, 24, 32, 528, 24.7, 24, 448, 528, 24.7, 1, 240, 352, 6.69999999999996, 3, 296, 348, 12.7, 3, 240, 348, 12.7, 3, 268, 292, 5.19999999999996, 3, 212, 292, 5.19999999999996, 3, 240, 320, 5.19999999999996, 3, 184, 320, 5.19999999999996, 3, 296, 320, 5.19999999999996, 3, 212, 348, 5.19999999999996, 3, 268, 348, 5.19999999999996, 3, 156, 348, 5.19999999999996, 3, 324, 348, 5.19999999999996, 3, 240, 376, 5.19999999999996, 3, 184, 376, 5.19999999999996, 3, 296, 376, 5.19999999999996, 3, 128, 376, 5.19999999999996, 3, 352, 376, 5.19999999999996, 3, 212, 404, 5.19999999999996, 3, 268, 404, 5.19999999999996, 3, 156, 404, 5.19999999999996, 3, 324, 404, 5.19999999999996, 3, 100, 404, 5.19999999999996, 3, 380, 404, 5.19999999999996, 3, 240, 432, 5.19999999999996, 3, 184, 432, 5.19999999999996, 3, 296, 432, 5.19999999999996, 3, 128, 432, 5.19999999999996, 3, 352, 432, 5.19999999999996, 3, 72, 432, 5.19999999999996, 3, 408, 432, 5.19999999999996, 5, 240, 264, 10.9, 11, 240, 515, 40, 11, 192, 535, 18.4, 11, 288, 536, 18.4, 24, 77, 537, 16.1, 24, 402, 537, 16.1, 24, 30, 320, 19.7, 24, 450, 320, 19.7, 24, 420, 290, 13.4, 24, 60, 290, 13.4, 23, 432, 128, 22.4, 23, 48, 128, 22.4, 1, 240, 455, 10.4]; public static const LEVEL_23:Array = [3, 62, 304, 16.1, 3, 145, 223, 16.1, 3, 309, 223, 20, 3, 392, 316, 23.6, 3, 216, 451, 23.6, 3, 184, 333, 23.6, 3, 77, 446, 19.1, 3, 333, 492, 19.1, 3, 337, 386, 19.1, 3, 275, 331, 19.1, 3, 396, 430, 15.5, 3, 439, 368, 15.5, 3, 430, 240, 15.5, 3, 353, 273, 15.5, 3, 148, 277, 12.8, 3, 82, 374, 12.8, 3, 223, 387, 12.8, 3, 286, 273, 12.8, 3, 432, 511, 12.8, 3, 285, 416, 25, 3, 138, 406, 25, 3, 114, 335, 25, 3, 215, 0x0100, 25, 3, 46, 222, 25, 3, 99, 263, 25, 3, 32, 382, 25, 3, 148, 484, 25, 3, 334, 332, 25, 3, 440, 288, 17.5, 3, 387, 376, 17.5, 3, 234, 311, 17.5, 3, 265, 231, 17.5, 3, 391, 248, 17.5, 3, 353, 232, 17.5, 3, 190, 208, 17.5, 3, 24, 285, 17.5, 3, 184, 382, 17.5, 3, 32, 436, 17.5, 3, 92, 490, 17.5, 3, 271, 477, 17.5, 3, 342, 439, 17.5, 3, 389, 489, 17.5, 3, 441, 457, 25, 3, 232, 352, 9.69999999999996, 3, 280, 371, 9.69999999999996, 3, 309, 294, 9.69999999999996, 3, 183, 294, 9.69999999999996, 3, 57, 343, 9.69999999999996, 18, 25, 330, 13.9, 18, 181, 419, 11.8, 18, 435, 331, 11.8, 1, 254, 277, 11.8, 1, 96, 214, 15.1, 1, 431, 406, 15.1, 1, 149, 362, 10.9, 1, 62, 412, 10.9, 1, 304, 460, 10.9, 1, 405, 278, 10.9, 5, 119, 448, 10.9, 5, 242, 415, 13.3, 5, 373, 456, 11.2, 5, 318, 265, 11.2, 11, 41, 485, 25, 11, 368, 409, 14.2, 11, 150, 308, 14.2, 11, 96, 408, 14.2, 11, 195, 494, 19, 11, 275, 298, 10.3, 11, 454, 537, 14.8, 11, 306, 366, 10.9, 11, 171, 250, 13, 11, 55, 265, 12.7, 7, 29, 534, 18.4, 7, 367, 530, 22.6, 7, 290, 543, 9.5, 7, 186, 546, 7.1, 3, 236, 496, 13.1, 3, 136, 538, 13.1, 3, 107, 538, 13.1]; public static const LEVEL_24:Array = [1, 240, 360, 5, 1, 240, 320, 27.4000000000001, 11, 225, 506, 19, 11, 432, 519, 17.8, 11, 331, 536, 17.8, 11, 85, 506, 27.7000000000001, 11, 159, 425, 40, 11, 38, 290, 29.5000000000001, 11, 435, 200, 39.1, 11, 447, 368, 25.9000000000001, 11, 92, 132, 31.9000000000001, 11, 205, 122, 21.7, 11, 324, 134, 29.2000000000001, 12, 127, 545, 8.80000000000002, 5, 399, 120, 18.7, 6, 278, 522, 27.4000000000001, 6, 368, 536, 12.1, 6, 396, 526, 7.90000000000002, 6, 444, 483, 12.4, 6, 427, 446, 19.3, 6, 452, 416, 12.4, 6, 36, 238, 15.7, 6, 63, 175, 8.50000000000002, 6, 46, 202, 12.4, 5, 365, 110, 8.80000000000002, 5, 423, 146, 9.10000000000002, 2, 72, 329, 13, 2, 93, 349, 9.40000000000002, 2, 99, 375, 10.9, 2, 114, 393, 7.00000000000002, 2, 207, 467, 14.2, 2, 117, 471, 10, 2, 30, 501, 20.5]; public function Levels(){ var _local1:int; _classLevel01 = Levels__classLevel01; _classLevel02 = Levels__classLevel02; _classLevel03 = Levels__classLevel03; _classLevel04 = Levels__classLevel04; _classLevel05 = Levels__classLevel05; _classLevel06 = Levels__classLevel06; _classLevel07 = Levels__classLevel07; _classLevel08 = Levels__classLevel08; _classLevel09 = Levels__classLevel09; _classLevel10 = Levels__classLevel10; _classLevel11 = Levels__classLevel11; _classLevel12 = Levels__classLevel12; _classLevel13 = Levels__classLevel13; _classLevel14 = Levels__classLevel14; _classLevel15 = Levels__classLevel15; _classLevel16 = Levels__classLevel16; _classLevel17 = Levels__classLevel17; _classLevel18 = Levels__classLevel18; _classLevel19 = Levels__classLevel19; _classLevel20 = Levels__classLevel20; _classLevel21 = Levels__classLevel21; _classLevel22 = Levels__classLevel22; _classLevel23 = Levels__classLevel23; _classLevel24 = Levels__classLevel24; _classLevel25 = Levels__classLevel25; _levelPictures = new Array((5 * 5)); _levelPicturesCache = new Array((5 * 5)); _levelPicturesCenterX = new Array((5 * 5)); _levelPicturesCenterY = new Array((5 * 5)); _levelPicturesSpeedX = new Array((5 * 5)); _levelPicturesSpeedY = new Array((5 * 5)); _levelPicturesX = new Array((5 * 5)); _levelPicturesY = new Array((5 * 5)); _levelSpecialBallMarkers = null; _levelSpecialBallsPerLevel = new Array((5 * 5)); _levelScores = new Array((5 * 5)); _levelScoresBest = new Array((5 * 5)); _levelScoresBestNames = new Array((5 * 5)); _levelScoresTextFields = new Array((5 * 5)); _levelScoresTextFieldsSpeedX = new Array((5 * 5)); _levelScoresTextFieldsSpeedY = new Array((5 * 5)); _levelScoresTextFieldsX = new Array((5 * 5)); _levelScoresTextFieldsY = new Array((5 * 5)); _specialBalls = new Array(((5 * 5) * 3)); _levelStatuses = new Array((5 * 5)); _levelLockSprites = new Array((5 * 5)); _levelPictureColumnOffsetsY = new Array(5); _levelPictureColumnSpeedY = new Array(5); super(); _levelPicturesCache[0] = new Bitmap(new _classLevel01().bitmapData); _levelPicturesCache[1] = new Bitmap(new _classLevel02().bitmapData); _levelPicturesCache[2] = new Bitmap(new _classLevel03().bitmapData); _levelPicturesCache[3] = new Bitmap(new _classLevel04().bitmapData); _levelPicturesCache[4] = new Bitmap(new _classLevel05().bitmapData); _levelPicturesCache[5] = new Bitmap(new _classLevel06().bitmapData); _levelPicturesCache[6] = new Bitmap(new _classLevel07().bitmapData); _levelPicturesCache[7] = new Bitmap(new _classLevel08().bitmapData); _levelPicturesCache[8] = new Bitmap(new _classLevel09().bitmapData); _levelPicturesCache[9] = new Bitmap(new _classLevel10().bitmapData); _levelPicturesCache[10] = new Bitmap(new _classLevel11().bitmapData); _levelPicturesCache[11] = new Bitmap(new _classLevel12().bitmapData); _levelPicturesCache[12] = new Bitmap(new _classLevel13().bitmapData); _levelPicturesCache[13] = new Bitmap(new _classLevel14().bitmapData); _levelPicturesCache[14] = new Bitmap(new _classLevel15().bitmapData); _levelPicturesCache[15] = new Bitmap(new _classLevel16().bitmapData); _levelPicturesCache[16] = new Bitmap(new _classLevel17().bitmapData); _levelPicturesCache[17] = new Bitmap(new _classLevel18().bitmapData); _levelPicturesCache[18] = new Bitmap(new _classLevel19().bitmapData); _levelPicturesCache[19] = new Bitmap(new _classLevel20().bitmapData); _levelPicturesCache[20] = new Bitmap(new _classLevel21().bitmapData); _levelPicturesCache[21] = new Bitmap(new _classLevel22().bitmapData); _levelPicturesCache[22] = new Bitmap(new _classLevel23().bitmapData); _levelPicturesCache[23] = new Bitmap(new _classLevel24().bitmapData); _levelPicturesCache[24] = new Bitmap(new _classLevel25().bitmapData); _local1 = 0; while (_local1 < (5 * 5)) { _levelScoresBest[_local1] = 0; _levelScoresBestNames[_local1] = "???"; _local1++; }; reset(null); } public function levelPicturesScroll(_arg1:BallDropOne):Boolean{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:Bitmap; var _local11:Particle; var _local12:int; var _local13:TextField; var _local14:Sprite; var _local15:SpecialBallMarker; var _local16:int; var _local17:int; var _local18:Number; var _local19:SpecialBallMarker; _local4 = 0; _local2 = 0; while (_local2 < 5) { if (_levelPictureColumnOffsetsY[_local2] > 0){ _levelPictureColumnOffsetsY[_local2] = (_levelPictureColumnOffsetsY[_local2] - (_levelPictureColumnSpeedY[_local2] * BallDropOne.SPEEDMUL)); if (_levelPictureColumnOffsetsY[_local2] <= 0){ _levelPictureColumnOffsetsY[_local2] = 0; _local10 = _levelPictures[_local2]; _local3 = 0; while (_local3 < _local10.width) { _local11 = _arg1._particleManager.addParticle(_arg1, Particle.PARTICLE_TYPE_SMOKE, (_local10.x + _local3), _local10.y, 0x333333); if (_local11 != null){ _local11._speedX = ((Math.random() * 0.1) - 0.05); _local11._speedY = ((Math.random() * 0.15) - 0.2); _local11._life = (_local11._life + ExtraMath.random(0, 100)); _local11.alpha = 0.05; _local11.launch(); }; _local3 = (_local3 + 1); }; if (_arg1._sfxEnabled){ _local3 = ExtraMath.random(0, 3); if (_local3 == 0){ _arg1._soundColumn1.play(0, 1, _arg1._soundTransformVolumeHigh); } else { if (_local3 == 1){ _arg1._soundColumn2.play(0, 1, _arg1._soundTransformVolumeHigh); } else { if (_local3 == 2){ _arg1._soundColumn3.play(0, 1, _arg1._soundTransformVolumeHigh); } else { _arg1._soundColumn4.play(0, 1, _arg1._soundTransformVolumeHigh); }; }; }; }; }; }; if (_levelPictureColumnOffsetsY[_local2] <= 0){ _local4++; }; _local2++; }; _local5 = 30; _local6 = 100; _local7 = 88; _local8 = 90; _local2 = 0; _local9 = 0; while (_local9 < 5) { _local12 = 0; while (_local12 < 5) { _local10 = _levelPictures[_local2]; _local10.x = (_local5 + (_local7 * _local12)); _local10.y = ((_local6 + (_local8 * _local9)) + _levelPictureColumnOffsetsY[_local12]); _levelPicturesCenterX[_local2] = (_local10.x + (_local10.width * 0.5)); _levelPicturesCenterY[_local2] = (_local10.y + (_local10.height * 0.5)); if (((!(_local10.visible)) && ((_local10.y < (BallDropOne.SCREEN_DY - 50))))){ _local10.visible = true; }; if (_levelLockSprites[_local2] != null){ _local14 = _levelLockSprites[_local2]; _local14.x = _local10.x; _local14.y = _local10.y; _local14.visible = _local10.visible; }; _local13 = _levelScoresTextFields[_local2]; _local13.x = ((_local10.x + (_local10.width >> 1)) - (_local13.width >> 1)); _local13.y = (_local10.y + _local10.height); _local13.visible = _local10.visible; _local2++; _local12++; }; _local9++; }; _local2 = 0; while (_local2 < _levelSpecialBallMarkers.length) { _local15 = _levelSpecialBallMarkers[_local2]; if (_local15 != null){ _local16 = 0; _local17 = 0; _local3 = 0; while (_local3 < _levelSpecialBallMarkers.length) { _local19 = _levelSpecialBallMarkers[_local3]; if (_local19 != null){ if (_local2 == _local3){ _local17 = _local16; }; if (_local19._level == _local15._level){ _local16++; }; }; _local3++; }; _local10 = _levelPictures[_local15._level]; _local18 = ((_local15.width + 2) * 0.5); _local15.x = ((((_local10.x + (_local10.width * 0.5)) - ((_local16 - 1) * _local18)) + ((_local17 * _local18) * 2)) + 1); _local15.y = ((_local10.y - _local15.height) + 2); _local15.visible = _local10.visible; }; _local2++; }; if (_local4 == 5){ return (true); }; return (false); } public function levelSelectionSpritesAdd(_arg1:BallDropOne):void{ var _local2:int; var _local3:Bitmap; var _local4:TextField; var _local5:Sprite; var _local6:SpecialBallMarker; _local2 = 0; while (_local2 < (5 * 5)) { _levelPictures[_local2] = _levelPicturesCache[_local2]; _local2++; }; _local2 = 0; while (_local2 < (5 * 5)) { _local3 = _levelPictures[_local2]; _local3.visible = false; if (_levelStatuses[_local2] == LEVEL_STATUS_LOCKED){ _local5 = new Sprite(); _local5.graphics.clear(); _local5.graphics.lineStyle(); _local5.graphics.beginFill(0); _local5.graphics.drawRect(0, 0, _local3.width, _local3.height); _local5.graphics.endFill(); _local5.alpha = 0.5; _local5.visible = false; _levelLockSprites[_local2] = _local5; }; _local4 = FontBank.getTextField(_arg1, "Zachary", 14, 0xFFFFFF); _local4.x = (_local3.x + (_local3.width >> 1)); _local4.y = (_local3.y + _local3.height); _local4.text = ("" + _levelScores[_local2]); _local4.visible = false; _levelScoresTextFields[_local2] = _local4; _local2++; }; _local2 = 0; while (_local2 < (5 * 5)) { _arg1.addChild(_levelPictures[_local2]); if (_levelLockSprites[_local2] != null){ _arg1.addChild(_levelLockSprites[_local2]); }; _arg1.addChild(_levelScoresTextFields[_local2]); _local2++; }; _local2 = 0; while (_local2 < _levelSpecialBallMarkers.length) { _local6 = _levelSpecialBallMarkers[_local2]; if (_local6 != null){ _local6.visible = false; _arg1.addChild(_local6); }; _local2++; }; } public function setBackground(_arg1:BallDropOne, _arg2:int):void{ var _local3:Bitmap; var _local4:int; _local3 = new Bitmap(new _arg1._classBackground01().bitmapData); _local3.x = 2; _local3.y = 82; _local3.visible = false; _local3.alpha = 0; _arg1.addChild(_local3); if (_arg1._bitmapBackground != null){ _local4 = _arg1.getChildIndex(_arg1._bitmapBackground); _arg1.setChildIndex(_local3, _local4); _arg1.removeChild(_arg1._bitmapBackground); }; _arg1._bitmapBackground = _local3; } public function playerBallHits(_arg1:BallDropOne, _arg2:Ball):void{ var _local3:TextField; var _local4:int; _ballBouncesTotal++; if (((!((_arg2 == null))) && ((_ballCurrentType == _arg2._type)))){ _ballBouncesCurrentType++; _local4 = (_ballBouncesCurrentType / 10); if (_ballBouncesCurrentType == (_local4 * 10)){ _arg1.scoreAdd(20); _local3 = FontBank.getTextField(_arg1, "MassiveHeadache", 22, 16777152); _local3.text = (((_ballBouncesCurrentType + " SAME IN A ROW! +") + 20) + "PTS! "); _arg1.bonusTextFieldAdd(_local3, 2000); }; } else { _ballBouncesCurrentType = 1; if (_arg2 != null){ _ballCurrentType = _arg2._type; } else { _ballCurrentType = Ball.BALL_TYPE_DEAD; }; }; _local4 = (_ballBouncesTotal / 20); if (_ballBouncesTotal == (_local4 * 20)){ _arg1.scoreAdd(10); _local3 = FontBank.getTextField(_arg1, "MassiveHeadache", 22, 15922102); _local3.text = (((_ballBouncesTotal + " BOUNCES! +") + 10) + "PTS! "); _arg1.bonusTextFieldAdd(_local3, 2000); }; } public function unlockNewLevels(_arg1:BallDropOne, _arg2:int):void{ var _local3:int; var _local4:int; _local3 = -1; _local4 = 0; while (_local4 < ((5 * 5) - 1)) { if (_levelStatuses[_local4] == LEVEL_STATUS_UNLOCKED){ } else { if (_arg2 >= LEVEL_UNLOCK_SCORES[_local4]){ levelUnlock(_arg1, _local4); _local3 = _local4; }; }; _local4++; }; if ((((_levelStatuses[((5 * 5) - 1)] == LEVEL_STATUS_LOCKED)) && ((_specialBallsTotal == _specialBallsCollected)))){ levelUnlock(_arg1, ((5 * 5) - 1)); _local3 = ((5 * 5) - 1); }; if (_arg1._sfxEnabled){ if (_local3 == ((5 * 5) - 1)){ _arg1._soundAllOpen.play(0, 1, _arg1._soundTransformVolumeHigh); } else { if (_local3 >= 0){ _arg1._soundUnlockLevel.play(0, 1, _arg1._soundTransformVolumeHigh); }; }; }; } public function reset(_arg1:BallDropOne):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:Boolean; var _local6:Array; var _local7:int; var _local8:SpecialBallMarker; _level = -1; _local2 = 0; while (_local2 < (5 * 5)) { _levelScores[_local2] = 0; _levelScoresTextFields[_local2] = null; _local2++; }; _specialBallsCollected = 0; _local2 = 0; while (_local2 < ((5 * 5) * 3)) { _specialBalls[_local2] = -1; _local2++; }; _local5 = false; if (_arg1 != null){ _local5 = _arg1.gameLoad(); }; _specialBallsTotal = 0; _local2 = 0; while (_local2 < (5 * 5)) { _levelSpecialBallsPerLevel[_local2] = 0; _local6 = LEVELS[_local2]; _local3 = 0; while (_local3 < _local6.length) { if (_local6[_local3] == Ball.BALL_TYPE_SPECIAL){ _specialBallsTotal++; var _local9 = _levelSpecialBallsPerLevel; var _local10 = _local2; var _local11 = (_local9[_local10] + 1); _local9[_local10] = _local11; } else { if ((((_local6[_local3] == Ball.BALL_TYPE_BOX_GLASS)) || ((_local6[_local3] == Ball.BALL_TYPE_BOX_TOUGH)))){ _local3++; }; }; _local3 = (_local3 + 4); }; _local2++; }; _local4 = 0; _levelSpecialBallMarkers = new Array(_specialBallsTotal); _local2 = 0; while (_local2 < (5 * 5)) { _local7 = (_local2 * 3); _local3 = (_levelSpecialBallsPerLevel[_local2] - 1); while (_local3 >= 0) { if (_specialBalls[_local7] < 0){ _local8 = new SpecialBallMarker(_local2, _local3); var _temp1 = _local4; _local4 = (_local4 + 1); _local9 = _temp1; _levelSpecialBallMarkers[_local9] = _local8; } else { var _temp2 = _local4; _local4 = (_local4 + 1); _local9 = _temp2; _levelSpecialBallMarkers[_local9] = null; }; _local7++; _local3--; }; _local2++; }; if (!_local5){ _local2 = 0; while (_local2 < (5 * 5)) { if ((((LEVEL_UNLOCK_SCORES[_local2] == 0)) || ((_levelScores[_local2] > 0)))){ _levelStatuses[_local2] = LEVEL_STATUS_UNLOCKED; } else { _levelStatuses[_local2] = LEVEL_STATUS_LOCKED; }; _local2++; }; }; _local2 = 0; while (_local2 < (5 * 5)) { _levelLockSprites[_local2] = null; _local2++; }; } public function levelSelectionResetFadeIn(_arg1:BallDropOne):void{ var _local2:int; _local2 = 0; while (_local2 < 5) { _levelPictureColumnSpeedY[_local2] = (0.3 + (Math.random() * 0.15)); _levelPictureColumnOffsetsY[_local2] = (BallDropOne.SCREEN_DY + 200); _local2++; }; } public function levelScroll(_arg1:Number, _arg2:Array):Boolean{ var _local3:Boolean; var _local4:Array; var _local5:int; var _local6:int; _local3 = false; _levelOffsetY = (_levelOffsetY + _arg1); if ((((_arg1 < 0)) && ((_levelOffsetY <= 0)))){ _levelOffsetY = 0; _local3 = true; } else { if ((((_arg1 > 0)) && ((_levelOffsetY >= BallDropOne.SCREEN_DY)))){ _levelOffsetY = BallDropOne.SCREEN_DY; _local3 = true; }; }; _local4 = LEVELS[_level]; _local6 = 0; _local5 = 0; while (_local5 < _arg2.length) { if (_arg2[_local5] != null){ _arg2[_local5].setPosition(_local4[(_local6 + 1)], (_local4[(_local6 + 2)] + _levelOffsetY)); }; if ((((_local4[(_local6 + 0)] == Ball.BALL_TYPE_BOX_GLASS)) || ((_local4[(_local6 + 0)] == Ball.BALL_TYPE_BOX_TOUGH)))){ _local6 = (_local6 + 5); } else { _local6 = (_local6 + 4); }; _local5++; }; return (_local3); } public function resetLevelStatistics():void{ _ballBouncesTotal = 0; _ballBouncesCurrentType = 0; _ballCurrentType = Ball.BALL_TYPE_DEAD; } public function levelLoad(_arg1:BallDropOne):Array{ var _local2:int; var _local3:int; var _local4:int; var _local5:Array; var _local6:Array; var _local7:Array; var _local8:int; var _local9:Ball; _local5 = LEVELS[_level]; _local6 = new Array((_local5.length >> 1)); _local2 = 0; while (_local2 < _local6.length) { _local6[_local2] = null; _local2++; }; _levelOffsetY = BallDropOne.SCREEN_DY; setBackground(_arg1, _level); resetLevelStatistics(); _local3 = 0; _local2 = 0; _local4 = -1; while (_local3 < _local5.length) { _local8 = _local5[_local3]; _local4++; if (_levelStatuses[((5 * 5) - 1)] == LEVEL_STATUS_UNLOCKED){ if (_local8 == Ball.BALL_TYPE_GHOST_HIDDEN){ _local8 = Ball.BALL_TYPE_GHOST; }; }; if (_local8 == Ball.BALL_TYPE_SPECIAL){ if ((((((_specialBalls[((_level * 3) + 0)] == _local4)) || ((_specialBalls[((_level * 3) + 1)] == _local4)))) || ((_specialBalls[((_level * 3) + 2)] == _local4)))){ _local8 = Ball.BALL_TYPE_VIOLET; }; }; _local9 = new Ball(_local8, _local5[(_local3 + 3)], _arg1); var _temp1 = _local2; _local2 = (_local2 + 1); var _local10 = _temp1; _local6[_local10] = _local9; _local9.setPosition(_local5[(_local3 + 1)], (_local5[(_local3 + 2)] + _levelOffsetY)); if ((((_local8 == Ball.BALL_TYPE_BOX_GLASS)) || ((_local8 == Ball.BALL_TYPE_BOX_TOUGH)))){ _local9._width = _local5[(_local3 + 3)]; _local9._height = _local5[(_local3 + 4)]; _local9.resetGraphics(_arg1); _local3 = (_local3 + 5); } else { _local3 = (_local3 + 4); }; _arg1.addChild(_local9); _local9.removeChildAddChild(_arg1); }; _local7 = new Array(_local2); _local3 = 0; while (_local3 < _local2) { _local7[_local3] = _local6[_local3]; _local3++; }; return (_local7); } public function collectSpecialBall(_arg1:BallDropOne, _arg2:int):Boolean{ var _local3:int; _local3 = 0; while (_local3 < 3) { if (_specialBalls[((_level * 3) + _local3)] < 0){ _specialBalls[((_level * 3) + _local3)] = _arg2; _specialBallsCollected++; _local3 = 0; while (_local3 < _levelSpecialBallMarkers.length) { if (((!((_levelSpecialBallMarkers[_local3] == null))) && ((_levelSpecialBallMarkers[_local3]._level == _level)))){ _levelSpecialBallMarkers[_local3] = null; break; }; _local3++; }; if (_arg1._kongregate != null){ _arg1._kongregate.stats.submit("SpecialBallsCollected", _specialBallsCollected); }; return (true); } else { if (_specialBalls[((_level * 3) + _local3)] == _arg2){ return (false); }; }; _local3++; }; return (false); } public function levelUnlock(_arg1:BallDropOne, _arg2:int):void{ var _local3:Bitmap; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:Particle; if (_arg1._kongregate != null){ _arg1._kongregate.stats.submit("Level", (_arg2 + 1)); }; _levelStatuses[_arg2] = LEVEL_STATUS_UNLOCKED; _arg1.removeChild(_levelLockSprites[_arg2]); _levelLockSprites[_arg2] = null; _local3 = _levelPictures[_arg2]; _local4 = (_local3.width >> 3); _local5 = (_local3.height >> 3); _local6 = 0; while (_local6 < _local5) { _local7 = 0; while (_local7 < _local4) { _local8 = _arg1._particleManager.addParticle(_arg1, Particle.PARTICLE_TYPE_LOCK_PIECE, ((_local3.x + 4) + (_local7 << 3)), ((_local3.y + 4) + (_local6 << 3)), 0); if (_local8 != null){ _local8._speedX = ((Math.random() * 0.1) - 0.05); _local8._speedY = ((Math.random() * 0.1) - 0.05); _local8._life = (_local8._life + ExtraMath.random(0, 100)); _local8.alpha = 0.5; _local8.launch(); }; _local7++; }; _local6++; }; } public function levelSelectionSpritesRemove(_arg1:BallDropOne):void{ var _local2:int; _local2 = 0; while (_local2 < (5 * 5)) { if (_levelPictures[_local2] != null){ _arg1.removeChild(_levelPictures[_local2]); _levelPictures[_local2] = null; }; if (_levelLockSprites[_local2] != null){ _arg1.removeChild(_levelLockSprites[_local2]); _levelLockSprites[_local2] = null; }; if (_levelScoresTextFields[_local2] != null){ _arg1.removeChild(_levelScoresTextFields[_local2]); _levelScoresTextFields[_local2] = null; }; _local2++; }; _local2 = 0; while (_local2 < _levelSpecialBallMarkers.length) { if (((!((_levelSpecialBallMarkers[_local2] == null))) && (_arg1.contains(_levelSpecialBallMarkers[_local2])))){ _arg1.removeChild(_levelSpecialBallMarkers[_local2]); }; _local2++; }; } public static function convertLevelToString(_arg1:Array):String{ var _local2:String; var _local3:int; var _local4:Ball; var _local5:BallDNA; _local2 = (_arg1.length + ""); _local3 = 0; while (_local3 < _arg1.length) { _local4 = _arg1[_local3]; _local5 = new BallDNA(_local4); _local2 = (_local2 + (" " + _local5.convertToString())); _local3++; }; return (_local2); } public static function destroyOneBall(_arg1:Array, _arg2:BallDropOne):Boolean{ var _local3:int; var _local4:int; var _local5:Ball; if (_arg1 == null){ return (false); }; _local3 = 0; while (_local3 < _arg1.length) { _local5 = _arg1[_local3]; if ((((((_local5 == null)) || ((_local5._type == Ball.BALL_TYPE_DEAD)))) || ((_local5._state == Ball.BALL_STATE_DEAD)))){ _arg1[_local3] = null; } else { if ((((_local5._type == Ball.BALL_TYPE_GHOST_HIDDEN)) || ((_local5._type == Ball.BALL_TYPE_DESTROYED)))){ Ball.destroy(_local5, false, _arg2, true); } else { Ball.destroy(_local5, true, _arg2, true); }; _arg1[_local3] = null; return (true); }; _local3++; }; return (false); } public static function convertLevelArrayToDNA(_arg1:Array):Array{ var _local2:int; var _local3:Array; var _local4:int; var _local5:int; var _local6:BallDNA; _local2 = int(_arg1[0]); if (_local2 <= 0){ return (null); }; _local3 = new Array(_local2); _local4 = 1; _local5 = 0; while (_local5 < _local2) { _local6 = new BallDNA(null); var _temp1 = _local4; _local4 = (_local4 + 1); _local6._type = int(_arg1[_temp1]); var _temp2 = _local4; _local4 = (_local4 + 1); _local6._x = Number(_arg1[_temp2]); var _temp3 = _local4; _local4 = (_local4 + 1); _local6._y = Number(_arg1[_temp3]); var _temp4 = _local4; _local4 = (_local4 + 1); _local6._radius = Number(_arg1[_temp4]); var _temp5 = _local4; _local4 = (_local4 + 1); _local6._width = Number(_arg1[_temp5]); var _temp6 = _local4; _local4 = (_local4 + 1); _local6._height = Number(_arg1[_temp6]); var _temp7 = _local5; _local5 = (_local5 + 1); var _local7 = _temp7; _local3[_local7] = _local6; }; return (_local3); } public static function returnOneBall(_arg1:Array, _arg2:Array, _arg3:BallDropOne):Boolean{ var _local4:int; var _local5:int; var _local6:BallDNA; if ((((_arg1 == null)) || ((_arg2 == null)))){ return (false); }; _local4 = 0; while (_local4 < _arg2.length) { if (_arg1[_local4] != null){ if (_arg1[_local4]._bitmap != null){ _arg1[_local4]._bitmap.visible = true; }; if ((((_arg1[_local4]._type == Ball.BALL_TYPE_DESTROYED)) || (((!((_arg2[_local4] == null))) && (!((_arg2[_local4]._type == _arg1[_local4]._type))))))){ Ball.destroy(_arg1[_local4], false, _arg3, true); _arg1[_local4] = null; }; }; if (((((((!((_arg1[_local4] == null))) && (!((_arg1[_local4]._type == Ball.BALL_TYPE_DEAD))))) && ((_arg1[_local4]._shrinkTimer < 0)))) && (!(_arg1[_local4]._touched)))){ _arg1[_local4]._boostCounter = 0; _arg1[_local4]._touched = false; _arg1[_local4].resetGraphics(_arg3); _arg1[_local4].removeChildAddChild(_arg3); _arg2[_local4] = null; } else { if (((!((_arg1[_local4] == null))) && (!((_arg2[_local4] == null))))){ Ball.destroy(_arg1[_local4], false, _arg3, true); _arg1[_local4] = null; }; _local6 = _arg2[_local4]; if (_local6 == null){ } else { _arg1[_local4] = new Ball(Ball.BALL_TYPE_ANTIGRAVITY, 1, _arg3); _arg1[_local4].useDNA(_local6, _arg3); _arg3.addChild(_arg1[_local4]); _arg1[_local4].removeChildAddChild(_arg3); _arg2[_local4] = null; return (true); }; }; _local4++; }; return (false); } } }//package
Section 100
//Levels__classLevel01 (Levels__classLevel01) package { import mx.core.*; public class Levels__classLevel01 extends BitmapAsset { } }//package
Section 101
//Levels__classLevel02 (Levels__classLevel02) package { import mx.core.*; public class Levels__classLevel02 extends BitmapAsset { } }//package
Section 102
//Levels__classLevel03 (Levels__classLevel03) package { import mx.core.*; public class Levels__classLevel03 extends BitmapAsset { } }//package
Section 103
//Levels__classLevel04 (Levels__classLevel04) package { import mx.core.*; public class Levels__classLevel04 extends BitmapAsset { } }//package
Section 104
//Levels__classLevel05 (Levels__classLevel05) package { import mx.core.*; public class Levels__classLevel05 extends BitmapAsset { } }//package
Section 105
//Levels__classLevel06 (Levels__classLevel06) package { import mx.core.*; public class Levels__classLevel06 extends BitmapAsset { } }//package
Section 106
//Levels__classLevel07 (Levels__classLevel07) package { import mx.core.*; public class Levels__classLevel07 extends BitmapAsset { } }//package
Section 107
//Levels__classLevel08 (Levels__classLevel08) package { import mx.core.*; public class Levels__classLevel08 extends BitmapAsset { } }//package
Section 108
//Levels__classLevel09 (Levels__classLevel09) package { import mx.core.*; public class Levels__classLevel09 extends BitmapAsset { } }//package
Section 109
//Levels__classLevel10 (Levels__classLevel10) package { import mx.core.*; public class Levels__classLevel10 extends BitmapAsset { } }//package
Section 110
//Levels__classLevel11 (Levels__classLevel11) package { import mx.core.*; public class Levels__classLevel11 extends BitmapAsset { } }//package
Section 111
//Levels__classLevel12 (Levels__classLevel12) package { import mx.core.*; public class Levels__classLevel12 extends BitmapAsset { } }//package
Section 112
//Levels__classLevel13 (Levels__classLevel13) package { import mx.core.*; public class Levels__classLevel13 extends BitmapAsset { } }//package
Section 113
//Levels__classLevel14 (Levels__classLevel14) package { import mx.core.*; public class Levels__classLevel14 extends BitmapAsset { } }//package
Section 114
//Levels__classLevel15 (Levels__classLevel15) package { import mx.core.*; public class Levels__classLevel15 extends BitmapAsset { } }//package
Section 115
//Levels__classLevel16 (Levels__classLevel16) package { import mx.core.*; public class Levels__classLevel16 extends BitmapAsset { } }//package
Section 116
//Levels__classLevel17 (Levels__classLevel17) package { import mx.core.*; public class Levels__classLevel17 extends BitmapAsset { } }//package
Section 117
//Levels__classLevel18 (Levels__classLevel18) package { import mx.core.*; public class Levels__classLevel18 extends BitmapAsset { } }//package
Section 118
//Levels__classLevel19 (Levels__classLevel19) package { import mx.core.*; public class Levels__classLevel19 extends BitmapAsset { } }//package
Section 119
//Levels__classLevel20 (Levels__classLevel20) package { import mx.core.*; public class Levels__classLevel20 extends BitmapAsset { } }//package
Section 120
//Levels__classLevel21 (Levels__classLevel21) package { import mx.core.*; public class Levels__classLevel21 extends BitmapAsset { } }//package
Section 121
//Levels__classLevel22 (Levels__classLevel22) package { import mx.core.*; public class Levels__classLevel22 extends BitmapAsset { } }//package
Section 122
//Levels__classLevel23 (Levels__classLevel23) package { import mx.core.*; public class Levels__classLevel23 extends BitmapAsset { } }//package
Section 123
//Levels__classLevel24 (Levels__classLevel24) package { import mx.core.*; public class Levels__classLevel24 extends BitmapAsset { } }//package
Section 124
//Levels__classLevel25 (Levels__classLevel25) package { import mx.core.*; public class Levels__classLevel25 extends BitmapAsset { } }//package
Section 125
//MochiAd (MochiAd) package { import flash.events.*; import flash.display.*; import flash.net.*; import flash.utils.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return ("2.7"); } public static function showClickAwayAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_timeout:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var sendHostProgress:Boolean; var options = _arg1; DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{ }, ad_finished:function ():void{ }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_timeout = options.ad_timeout; delete options.ad_timeout; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; sendHostProgress = false; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; if (!this.parent){ delete this.onEnterFrame; return; }; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; _local3 = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.root == null){ _local3 = true; }; if (_local3){ delete this.onEnterFrame; }; }; doOnEnterFrame(chk); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function _allowDomains(_arg1:String):String{ var _local2:String; _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (_arg1.origFrameRate != undefined){ _arg1.stage.frameRate = _arg1.origFrameRate; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad._containerLCName != undefined){ _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"}); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ MochiAd._cleanup(mc); options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; if (!this.parent){ delete this.onEnterFrame; delete this.fadeFunction; return; }; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local4 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (_local2 > chk.ad_msec){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local3:Object; var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; if (_local3.clip == undefined){ throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite.")); }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; if (_local3.id == "test"){ trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!"); }; return (_local3); } public static function _cleanup(_arg1:Object):void{ var idx:Number; var k:String; var lc:LocalConnection; var f:Function; var mc = _arg1; if (("lc" in mc)){ lc = mc.lc; f = function ():void{ try { lc.client = null; lc.close(); } catch(e:Error) { }; }; setTimeout(f, 0); }; idx = DisplayObjectContainer(mc).numChildren; while (idx > 0) { idx = (idx - 1); DisplayObjectContainer(mc).removeChildAt(idx); }; for (k in mc) { delete mc[k]; }; } public static function load(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var depth:Number; var mc:MovieClip; var wh:Array; var lv:URLVariables; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; try { if (clip._mochiad_loaded){ return (null); }; } catch(e:Error) { throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic.")); }; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); wh = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; }; lv = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; mc.lcName = name; lv.lc = name; lv.st = getTimer(); loader = new Loader(); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g); req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime())); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{ var _local4:Array; var _local5:Number; _local4 = _arg2.split("."); _local5 = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return (undefined); }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; if (typeof(_arg1[_local4[_local5]]) == "function"){ return (_arg1[_local4[_local5]].apply(_arg1, _arg3)); }; return (undefined); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip; _local4 = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local3:Object; var _local4:Number; var _local5:Number; var _local6:Array; _local3 = _arg2.getBounds(_arg2.root); _local4 = 0; _local5 = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function adShowing(_arg1:Object):void{ _arg1.origFrameRate = _arg1.stage.frameRate; _arg1.stage.frameRate = 30; } public static function getValue(_arg1:Object, _arg2:String):Object{ var _local3:Array; var _local4:Number; _local3 = _arg2.split("."); _local4 = 0; while (_local4 < (_local3.length - 1)) { if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){ return (undefined); }; _arg1 = _arg1[_local3[_local4]]; _local4++; }; return (_arg1[_local3[_local4]]); } public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{ var _local4:Object; var _local5:Object; switch (_arg3.id){ case "setValue": MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value); break; case "getValue": _local4 = MochiAd.getValue(_arg1, _arg3.objectName); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4); break; case "runMethod": _local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5); break; default: trace(("[mochiads rpc] unknown rpc id: " + _arg3.id)); }; } public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{ var _local4:Array; var _local5:Number; _local4 = _arg2.split("."); _local5 = 0; while (_local5 < (_local4.length - 1)) { if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){ return; }; _arg1 = _arg1[_local4[_local5]]; _local5++; }; _arg1[_local4[_local5]] = _arg3; } public static function showPreGameAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var bar:MovieClip; var bar_color:Number; var bar_background:Number; var bar_outline:Number; var backing_mc:MovieClip; var backing:Object; var inside_mc:MovieClip; var inside:Object; var outline_mc:MovieClip; var outline:Object; var complete:Boolean; var unloaded:Boolean; var f:Function; var sendHostProgress:Boolean; var fn:Function; var r:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{ if ((this.clip is MovieClip)){ this.clip.stop(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_finished:function ():void{ if ((this.clip is MovieClip)){ this.clip.play(); } else { throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers.")); }; }, ad_loaded:function (_arg1:Number, _arg2:Number):void{ }, ad_failed:function ():void{ trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software"); }, ad_skipped:function ():void{ }, ad_progress:function (_arg1:Number):void{ }}; options = MochiAd._parseOptions(options, DEFAULTS); if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){ options.ad_started(); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); return; }; clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ var fn:Function; MochiAd._cleanup(mc); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); bar = createEmptyMovieClip(chk, "_mochiad_bar", 4); if (options.no_progress_bar){ bar.visible = false; delete options.no_progress_bar; } else { bar.x = 10; bar.y = (h - 20); }; bar_color = options.color; delete options.color; bar_background = options.background; delete options.background; bar_outline = options.outline; delete options.outline; backing_mc = createEmptyMovieClip(bar, "_outline", 1); backing = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); inside_mc = createEmptyMovieClip(bar, "_inside", 2); inside = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; outline_mc = createEmptyMovieClip(bar, "_outline", 3); outline = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; f = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f); if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.showing = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; mc.rpc = function (_arg1:Number, _arg2:Object):void{ MochiAd.rpc(clip, _arg1, _arg2); }; mc.rpcTestFn = function (_arg1:String):Object{ trace(("[MOCHIAD rpcTestFn] " + _arg1)); return (_arg1); }; mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; sendHostProgress = false; mc.sendHostLoadProgress = function (_arg1:String):void{ sendHostProgress = true; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Object; var _local3:Number; var _local4:Boolean; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Object; var _local10:Number; var _local11:Number; if (((!(this.parent)) || (!(this.parent.parent)))){ delete this["onEnterFrame"]; return; }; _local1 = this.parent.parent.root; _local2 = this.parent._mochiad_ctr; _local3 = (getTimer() - this.started); _local4 = false; _local5 = _local1.loaderInfo.bytesTotal; _local6 = _local1.loaderInfo.bytesLoaded; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; _local7 = ((100 * _local6) / _local5); _local8 = ((100 * _local3) / chk.ad_msec); _local9 = this._mochiad_bar._inside; _local10 = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); options.ad_progress(_local10); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7}); if (_local7 == 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local11 > 0){ chk.showing = true; chk.started = getTimer(); MochiAd.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0"); MochiAd.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0"); MochiAd.showInterLevelAd(_arg1); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var f:Function; var mc = _arg1; f = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; }; mc.addEventListener(Event.ENTER_FRAME, f); } } }//package
Section 126
//Particle (Particle) package { import flash.display.*; import flash.text.*; public class Particle extends Sprite { public var _speedX:Number; public var _type:int; public var _speedY:Number; public var _ignoreCollisions:Boolean; public var _bitmap:Bitmap; public var _color:int;// = 0 public var _height:Number; public var _iD:int; public var _radius:Number; private var _textField1:TextField; public var _width:Number; public var _alive:Boolean; public var _life:Number; public var _radiusAdder:Number; private var _x:Number; private var _y:Number; public static const PARTICLE_TYPE_BITMAP_FADE:int = 8; public static const PARTICLE_TYPE_SMOKE:int = 2; public static const PARTICLE_TYPE_SPARKLE:int = 0; public static const PARTICLE_TYPE_BALL:int = 4; public static const PARTICLE_TYPE_LOCK_PIECE:int = 1; public static const PARTICLE_TYPE_BIG_SPARKLE:int = 6; public static const PARTICLE_TYPE_SCORETEXT:int = 3; public static const PARTICLE_TYPE_MEDIUM_SPARKLE:int = 9; public static const PARTICLE_LIFE_TIMES:Array = [700, 3500, 2500, 2000, 450, 3000, 800, 450, 500, 700]; public static const PARTICLE_TYPE_BALL_SHRINK:int = 5; public static const PARTICLE_TYPE_BOX:int = 7; public function Particle(_arg1:int){ _color = 0; super(); _iD = _arg1; _x = 0; _y = 0; _speedX = 0; _speedY = 0; _life = 0; _textField1 = null; _alive = false; _ignoreCollisions = true; _bitmap = null; } public function extrasShow(_arg1:BallDropOne):void{ if (_textField1 != null){ _arg1.addChild(_textField1); }; if (_bitmap != null){ _arg1.addChild(_bitmap); }; } public function live(_arg1:BallDropOne):void{ var _local2:int; var _local3:Number; var _local4:Number; var _local5:Boolean; var _local6:Ball; var _local7:int; var _local8:Number; var _local9:Number; if (_type == PARTICLE_TYPE_BALL_SHRINK){ _radius = (_radius + (BallDropOne.SPEEDMUL * _radiusAdder)); if (_radius < 0){ _life = 0; }; resetGraphics(_arg1); return; }; if (_life < 300){ alpha = (alpha - ((BallDropOne.SPEEDMUL * 2) / 300)); if (alpha < 0){ alpha = 0; _life = 0; }; if (_textField1 != null){ _textField1.alpha = alpha; }; if (_bitmap != null){ _bitmap.alpha = alpha; }; }; if (_type == PARTICLE_TYPE_BALL){ _radius = (_radius + ((BallDropOne.SPEEDMUL * 2) * _radiusAdder)); resetGraphics(_arg1); return; }; if (_type == PARTICLE_TYPE_BOX){ _width = (_width + ((BallDropOne.SPEEDMUL * 2) * _radiusAdder)); _height = (_height + ((BallDropOne.SPEEDMUL * 2) * _radiusAdder)); resetGraphics(_arg1); return; }; if (_type == PARTICLE_TYPE_BITMAP_FADE){ _bitmap.scaleX = (_bitmap.scaleX + (BallDropOne.SPEEDMUL * _radiusAdder)); _bitmap.scaleY = (_bitmap.scaleY + (BallDropOne.SPEEDMUL * _radiusAdder)); if (_bitmap.scaleX < 0){ _bitmap.scaleX = 0; }; if (_bitmap.scaleY < 0){ _bitmap.scaleY = 0; }; _bitmap.x = (_x - (_bitmap.width * 0.5)); _bitmap.y = (_y - (_bitmap.height * 0.5)); return; }; _local3 = (_x + _speedX); _local4 = (_y + _speedY); if (_type == PARTICLE_TYPE_LOCK_PIECE){ _speedY = (_speedY + ((0.0007 * BallDropOne.SPEEDMUL) * 2)); } else { if (_type == PARTICLE_TYPE_SMOKE){ _speedY = (_speedY + ((0.001 * BallDropOne.SPEEDMUL) * 2)); if (((!((_arg1._levelBalls == null))) && ((((_arg1._gameMode == BallDropOne.GAME_MODE_GAME)) || ((_arg1._gameMode == BallDropOne.GAME_MODE_LEVEL_EDITOR)))))){ _local5 = false; _local2 = 0; while (_local2 < _arg1._levelBalls.length) { _local6 = _arg1._levelBalls[_local2]; if ((((_local6 == null)) || ((_local6._state == Ball.BALL_STATE_DEAD)))){ } else { _local7 = _local6._type; if ((((((_local7 == Ball.BALL_TYPE_DEAD)) || ((_local7 == Ball.BALL_TYPE_GHOST_HIDDEN)))) || ((_local7 == Ball.BALL_TYPE_DESTROYED)))){ } else { _local8 = (_local3 - _local6._x); _local9 = (_local4 - _local6._y); if (((_local8 * _local8) + (_local9 * _local9)) < ((_local6._radius + 2) * (_local6._radius + 2))){ if (!_ignoreCollisions){ _local3 = _x; _local4 = _y; _speedX = (_speedX + (((_local8 * 0.0012) * BallDropOne.SPEEDMUL) * 2)); _speedY = (_speedY + (((_local9 * 0.0012) * BallDropOne.SPEEDMUL) * 2)); }; _local5 = true; }; }; }; _local2++; }; if (!_local5){ _ignoreCollisions = false; }; }; }; }; if (_local3 < 4){ _local3 = 4; _speedX = -(_speedX); } else { if (_local3 > (BallDropOne.SCREEN_DX - 5)){ _local3 = (BallDropOne.SCREEN_DX - 5); _speedX = -(_speedX); }; }; if (_type == PARTICLE_TYPE_SMOKE){ if ((((_local4 > (BallDropOne.SCREEN_DY - 85))) && ((((_arg1._gameMode == BallDropOne.GAME_MODE_GAME)) || ((_arg1._gameMode == BallDropOne.GAME_MODE_LEVEL_EDITOR)))))){ _local4 = (BallDropOne.SCREEN_DY - 85); _speedY = (_speedY * -0.4); _speedX = (_speedX * 0.5); }; } else { if (_local4 >= (BallDropOne.SCREEN_DY - 10)){ _life = 0; }; }; setPosition(_local3, _local4); } public function resetGraphics(_arg1:BallDropOne):void{ var _local2:int; if (_type == PARTICLE_TYPE_SCORETEXT){ if (_textField1 == null){ graphics.clear(); if (_color < 0){ _local2 = 8922662; } else { _local2 = 5401135; }; _local2 = Ball.getModifiedColor(_local2, ExtraMath.random(7, 10)); _textField1 = FontBank.getTextField(_arg1, "MassiveHeadache", 22, _local2); if (_color < 0){ _textField1.text = ("" + _color); } else { _textField1.text = ("+" + _color); }; _color = _local2; }; } else { if ((((_type == PARTICLE_TYPE_BALL)) || ((_type == PARTICLE_TYPE_BALL_SHRINK)))){ graphics.clear(); if (_radius > 0.01){ graphics.lineStyle(); graphics.beginFill(_color, 1); graphics.drawCircle(0, 0, _radius); graphics.endFill(); }; } else { if (_type == PARTICLE_TYPE_BOX){ graphics.clear(); if ((((_width > 0.01)) && ((_height > 0.01)))){ graphics.lineStyle(); graphics.beginFill(_color, 1); graphics.drawRect((-(_width) * 0.5), (-(_height) * 0.5), _width, _height); graphics.endFill(); }; } else { if (_type == PARTICLE_TYPE_BITMAP_FADE){ graphics.clear(); } else { graphics.clear(); graphics.lineStyle(); graphics.beginFill(_color); if (_type == PARTICLE_TYPE_SPARKLE){ graphics.drawCircle(0, 0, 2); } else { if (_type == PARTICLE_TYPE_BIG_SPARKLE){ graphics.drawRect(-3, -3, 6, 6); } else { if ((((_type == PARTICLE_TYPE_SMOKE)) || ((_type == PARTICLE_TYPE_MEDIUM_SPARKLE)))){ graphics.drawRect(-2, -2, 4, 4); } else { if (_type == PARTICLE_TYPE_LOCK_PIECE){ graphics.drawRect(-4, -4, 8, 8); }; }; }; }; graphics.endFill(); }; }; }; }; } public function extrasHide(_arg1:BallDropOne):void{ if (_textField1 != null){ _arg1.removeChild(_textField1); _textField1 = null; }; if (_bitmap != null){ _arg1.removeChild(_bitmap); _bitmap = null; }; } public function rebirth():void{ _alive = true; _life = PARTICLE_LIFE_TIMES[_type]; _ignoreCollisions = true; _bitmap = null; visible = true; rotation = 0; scaleX = 1; scaleY = 1; alpha = 1; } public function launch():void{ _speedX = (_speedX * (BallDropOne.SPEEDMUL * 1.5)); _speedY = (_speedY * (BallDropOne.SPEEDMUL * 1.5)); } public function setPosition(_arg1:Number, _arg2:Number):void{ _x = _arg1; _y = _arg2; this.x = _arg1; this.y = _arg2; if (_textField1 != null){ _textField1.x = (_arg1 - (_textField1.width * 0.5)); _textField1.y = (_arg2 - (_textField1.height * 0.5)); }; if (_bitmap != null){ _bitmap.x = (_arg1 - (_bitmap.width * 0.5)); _bitmap.y = (_arg2 - (_bitmap.height * 0.5)); }; } public function addChildRemoveChild(_arg1:BallDropOne):void{ _arg1.removeChild(this); _arg1.addChild(this); if (_textField1 != null){ _arg1.removeChild(_textField1); _arg1.addChild(_textField1); }; if (_bitmap != null){ _arg1.removeChild(_bitmap); _arg1.addChild(_bitmap); }; } } }//package
Section 127
//ParticleManager (ParticleManager) package { import flash.display.*; public class ParticleManager { private var _particlesAliveIndices:Array; private var _particles:Array; private var _smokeParticles:int;// = 0 public var _particlesAlive:int;// = 0 private static const PARTICLES_MAX:int = (0x0400 + 0x0200); public function ParticleManager(){ var _local1:int; _particles = new Array(PARTICLES_MAX); _particlesAliveIndices = new Array(PARTICLES_MAX); _particlesAlive = 0; _smokeParticles = 0; super(); _local1 = 0; while (_local1 < PARTICLES_MAX) { _particles[_local1] = new Particle(_local1); _local1++; }; } public function keepOnTop(_arg1:BallDropOne, _arg2:int):void{ var _local3:Particle; var _local4:int; _local4 = 0; while (_local4 < _particlesAlive) { _local3 = _particles[_particlesAliveIndices[_local4]]; if (!_local3._alive){ } else { if (_local3._type == _arg2){ _local3.addChildRemoveChild(_arg1); }; }; _local4++; }; } private function resetParticle(_arg1:Particle, _arg2:int, _arg3:BallDropOne, _arg4:int, _arg5:Number, _arg6:Number, _arg7:int):void{ _arg1._type = _arg4; _arg1._color = _arg7; _arg1.resetGraphics(_arg3); _arg1.setPosition(_arg5, _arg6); _arg1._speedX = 0; _arg1._speedY = 0; _arg1.rebirth(); _arg3.removeChild(_arg1); _arg3.addChild(_arg1); _arg1.extrasShow(_arg3); if (_arg4 == Particle.PARTICLE_TYPE_SMOKE){ _smokeParticles++; }; } public function addParticle(_arg1:BallDropOne, _arg2:int, _arg3:Number, _arg4:Number, _arg5:int):Particle{ var _local6:int; var _local7:int; var _local8:int; var _local9:Particle; if (_arg2 == Particle.PARTICLE_TYPE_SMOKE){ if (_smokeParticles == 35){ if (_arg1._gameMode != BallDropOne.GAME_MODE_LEVEL_SELECTION){ return (null); }; }; if (_arg1._renderingQuality >= 1){ return (null); }; }; _local6 = -1; _local7 = (0x0400 * 0x0400); _local8 = 0; while (_local8 < PARTICLES_MAX) { _local9 = _particles[_local8]; if (!_local9._alive){ resetParticle(_local9, _local8, _arg1, _arg2, _arg3, _arg4, _arg5); _particlesAliveIndices[_particlesAlive] = _local8; _particlesAlive++; return (_local9); }; if ((((_local9._life < _local7)) && ((_local9._type < Particle.PARTICLE_TYPE_BALL)))){ _local7 = _local9._life; _local6 = _local8; }; _local8++; }; if (_local6 < 0){ return (null); }; _local9 = _particles[_local6]; if (_local9._type == Particle.PARTICLE_TYPE_SMOKE){ _smokeParticles--; }; resetParticle(_local9, _local6, _arg1, _arg2, _arg3, _arg4, _arg5); return (_local9); } public function initialize(_arg1:Sprite):void{ var _local2:int; _local2 = 0; while (_local2 < PARTICLES_MAX) { _arg1.addChild(_particles[_local2]); _particles[_local2].visible = false; _particlesAliveIndices[_local2] = -1; _local2++; }; _particlesAlive = 0; _smokeParticles = 0; } public function liveParticles(_arg1:BallDropOne):void{ var _local2:Particle; var _local3:int; _local3 = 0; while (_local3 < _particlesAlive) { _local2 = _particles[_particlesAliveIndices[_local3]]; if (!_local2._alive){ } else { _local2.live(_arg1); _local2._life = (_local2._life - (BallDropOne.SPEEDMUL * 2)); if (_local2._life <= 0){ _local2._alive = false; _local2.visible = false; _local2.extrasHide(_arg1); _particlesAliveIndices[_local3] = _particlesAliveIndices[(_particlesAlive - 1)]; _particlesAlive--; if (_local2._type == Particle.PARTICLE_TYPE_SMOKE){ _smokeParticles--; }; _local3--; }; }; _local3++; }; } } }//package
Section 128
//PNGEncoder (PNGEncoder) package { import flash.display.*; import flash.utils.*; public class PNGEncoder { private static var crcTableComputed:Boolean = false; private static var crcTable:Array; private static function writeChunk(_arg1:ByteArray, _arg2:uint, _arg3:ByteArray):void{ var _local4:uint; var _local5:uint; var _local6:uint; var _local7:int; var _local8:uint; var _local9:uint; var _local10:uint; if (!crcTableComputed){ crcTableComputed = true; crcTable = []; _local9 = 0; while (_local9 < 0x0100) { _local8 = _local9; _local10 = 0; while (_local10 < 8) { if ((_local8 & 1)){ _local8 = uint((uint(3988292384) ^ uint((_local8 >>> 1)))); } else { _local8 = uint((_local8 >>> 1)); }; _local10++; }; crcTable[_local9] = _local8; _local9++; }; }; _local4 = 0; if (_arg3 != null){ _local4 = _arg3.length; }; _arg1.writeUnsignedInt(_local4); _local5 = _arg1.position; _arg1.writeUnsignedInt(_arg2); if (_arg3 != null){ _arg1.writeBytes(_arg3); }; _local6 = _arg1.position; _arg1.position = _local5; _local8 = 4294967295; _local7 = 0; while (_local7 < (_local6 - _local5)) { _local8 = uint((crcTable[((_local8 ^ _arg1.readUnsignedByte()) & uint(0xFF))] ^ uint((_local8 >>> 8)))); _local7++; }; _local8 = uint((_local8 ^ uint(4294967295))); _arg1.position = _local6; _arg1.writeUnsignedInt(_local8); } public static function encode(_arg1:BitmapData):ByteArray{ var _local2:ByteArray; var _local3:ByteArray; var _local4:ByteArray; var _local5:int; var _local6:uint; var _local7:int; _local2 = new ByteArray(); _local2.writeUnsignedInt(2303741511); _local2.writeUnsignedInt(218765834); _local3 = new ByteArray(); _local3.writeInt(_arg1.width); _local3.writeInt(_arg1.height); _local3.writeUnsignedInt(134610944); _local3.writeByte(0); writeChunk(_local2, 1229472850, _local3); _local4 = new ByteArray(); _local5 = 0; while (_local5 < _arg1.height) { _local4.writeByte(0); if (!_arg1.transparent){ _local7 = 0; while (_local7 < _arg1.width) { _local6 = _arg1.getPixel(_local7, _local5); _local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | 0xFF))); _local7++; }; } else { _local7 = 0; while (_local7 < _arg1.width) { _local6 = _arg1.getPixel32(_local7, _local5); _local4.writeUnsignedInt(uint((((_local6 & 0xFFFFFF) << 8) | (_local6 >>> 24)))); _local7++; }; }; _local5++; }; _local4.compress(); writeChunk(_local2, 1229209940, _local4); writeChunk(_local2, 1229278788, null); return (_local2); } } }//package
Section 129
//SpecialBallMarker (SpecialBallMarker) package { import flash.display.*; public class SpecialBallMarker extends Sprite { public var _speedX:Number; public var _speedY:Number; public var _level:int; public var _num:int; public function SpecialBallMarker(_arg1:int, _arg2:int){ _level = _arg1; _num = _arg2; graphics.clear(); graphics.lineStyle(); graphics.beginFill(0x990000); graphics.drawCircle(0, 0, 3); graphics.endFill(); } } }//package

Library Items

Symbol 1 Sound {BallDropOne__classMP3SoundBounceBallB5} [BallDropOne__classMP3SoundBounceBallB5]
Symbol 2 Sound {BallDropOne__classMP3SoundPlayerDeath} [BallDropOne__classMP3SoundPlayerDeath]
Symbol 3 Sound {BallDropOne__classMP3SoundBounceBallC1} [BallDropOne__classMP3SoundBounceBallC1]
Symbol 4 Bitmap {BallDropOne__classTitleStart} [BallDropOne__classTitleStart]
Symbol 5 Bitmap {BallDropOne__classTitleLevelEditor} [BallDropOne__classTitleLevelEditor]
Symbol 6 Sound {BallDropOne__classMP3SoundMystery} [BallDropOne__classMP3SoundMystery]
Symbol 7 Sound {BallDropOne__classMP3SoundBounceWall} [BallDropOne__classMP3SoundBounceWall]
Symbol 8 Sound {BallDropOne__classMP3SoundButton2} [BallDropOne__classMP3SoundButton2]
Symbol 9 Sound {BallDropOne__classMP3SoundBounceBallB6} [BallDropOne__classMP3SoundBounceBallB6]
Symbol 10 Sound {BallDropOne__classMP3SoundColumn2} [BallDropOne__classMP3SoundColumn2]
Symbol 11 Sound {BallDropOne__classMP3SoundButton1} [BallDropOne__classMP3SoundButton1]
Symbol 12 Bitmap {BallDropOne__classTitleHomePage} [BallDropOne__classTitleHomePage]
Symbol 13 Sound {BallDropOne__classMP3SoundBounceBallD3} [BallDropOne__classMP3SoundBounceBallD3]
Symbol 14 Sound {BallDropOne__classMP3SoundColumn4} [BallDropOne__classMP3SoundColumn4]
Symbol 15 Sound {BallDropOne__classMP3SoundBounceBall2} [BallDropOne__classMP3SoundBounceBall2]
Symbol 16 Sound {BallDropOne__classMP3SoundBounceBallD4} [BallDropOne__classMP3SoundBounceBallD4]
Symbol 17 Bitmap {BallDropOne__classIconSubmit} [BallDropOne__classIconSubmit]
Symbol 18 Bitmap {BallDropOne__classMusicOn} [BallDropOne__classMusicOn]
Symbol 19 Sound {BallDropOne__classMP3SoundWorld1} [BallDropOne__classMP3SoundWorld1]
Symbol 20 Bitmap {BallDropOne__classArrowUp} [BallDropOne__classArrowUp]
Symbol 21 Bitmap {BallDropOne__classTitleDown} [BallDropOne__classTitleDown]
Symbol 22 Bitmap {BallDropOne__classIconPlay} [BallDropOne__classIconPlay]
Symbol 23 Sound {BallDropOne__classMP3SoundColumn3} [BallDropOne__classMP3SoundColumn3]
Symbol 24 Sound {BallDropOne__classMP3SoundWorld5} [BallDropOne__classMP3SoundWorld5]
Symbol 25 Sound {BallDropOne__classMP3SoundAllOpen} [BallDropOne__classMP3SoundAllOpen]
Symbol 26 Sound {BallDropOne__classMP3SoundBounceBallC6} [BallDropOne__classMP3SoundBounceBallC6]
Symbol 27 Sound {BallDropOne__classMP3SoundBounceBallB1} [BallDropOne__classMP3SoundBounceBallB1]
Symbol 28 Sound {BallDropOne__classMP3SoundHitMystery1} [BallDropOne__classMP3SoundHitMystery1]
Symbol 29 Sound {BallDropOne__classMP3SoundBounceBallB2} [BallDropOne__classMP3SoundBounceBallB2]
Symbol 30 Sound {BallDropOne__classMP3SoundLevelStart} [BallDropOne__classMP3SoundLevelStart]
Symbol 31 Bitmap {BallDropOne__classSFXOff} [BallDropOne__classSFXOff]
Symbol 32 Sound {BallDropOne__classMP3SoundWorld4} [BallDropOne__classMP3SoundWorld4]
Symbol 33 Sound {BallDropOne__classMP3SoundBounceBallD2} [BallDropOne__classMP3SoundBounceBallD2]
Symbol 34 Bitmap {BallDropOne__classIconClear} [BallDropOne__classIconClear]
Symbol 35 Sound {BallDropOne__classMP3SoundHitSpecial1} [BallDropOne__classMP3SoundHitSpecial1]
Symbol 36 Sound {BallDropOne__classMP3SoundBounceBallC2} [BallDropOne__classMP3SoundBounceBallC2]
Symbol 37 Sound {BallDropOne__classMP3SoundHitMystery2} [BallDropOne__classMP3SoundHitMystery2]
Symbol 38 Sound {BallDropOne__classMP3SoundWorld2} [BallDropOne__classMP3SoundWorld2]
Symbol 39 Sound {BallDropOne__classMP3SoundBounceBallC3} [BallDropOne__classMP3SoundBounceBallC3]
Symbol 40 Sound {BallDropOne__classMP3SoundWorld3} [BallDropOne__classMP3SoundWorld3]
Symbol 41 Sound {BallDropOne__classMP3SoundBounceBallD1} [BallDropOne__classMP3SoundBounceBallD1]
Symbol 42 Sound {BallDropOne__classMP3SoundHitTTursas} [BallDropOne__classMP3SoundHitTTursas]
Symbol 43 Sound {BallDropOne__classMP3SoundBounceBall3} [BallDropOne__classMP3SoundBounceBall3]
Symbol 44 Sound {BallDropOne__classMP3SoundBounceBallD6} [BallDropOne__classMP3SoundBounceBallD6]
Symbol 45 Bitmap {BallDropOne__classMusicOff} [BallDropOne__classMusicOff]
Symbol 46 Sound {BallDropOne__classMP3SoundBounceBall4} [BallDropOne__classMP3SoundBounceBall4]
Symbol 47 Bitmap {BallDropOne__classNewGameAlert} [BallDropOne__classNewGameAlert]
Symbol 48 Sound {BallDropOne__classMP3SoundBounceBallB4} [BallDropOne__classMP3SoundBounceBallB4]
Symbol 49 Sound {BallDropOne__classMP3SoundBounceBallC5} [BallDropOne__classMP3SoundBounceBallC5]
Symbol 50 Sound {BallDropOne__classMP3SoundSelection2} [BallDropOne__classMP3SoundSelection2]
Symbol 51 Sound {BallDropOne__classMP3SoundBoostBad} [BallDropOne__classMP3SoundBoostBad]
Symbol 52 Bitmap {BallDropOne__classBackground01} [BallDropOne__classBackground01]
Symbol 53 Sound {BallDropOne__classMP3SoundHitSpecial2} [BallDropOne__classMP3SoundHitSpecial2]
Symbol 54 Sound {BallDropOne__classMP3SoundUnlockLevel} [BallDropOne__classMP3SoundUnlockLevel]
Symbol 55 Sound {BallDropOne__classMP3SoundBounceBallC4} [BallDropOne__classMP3SoundBounceBallC4]
Symbol 56 Sound {BallDropOne__classMP3SoundBounceBallD5} [BallDropOne__classMP3SoundBounceBallD5]
Symbol 57 Sound {BallDropOne__classMP3SoundBounceBallB3} [BallDropOne__classMP3SoundBounceBallB3]
Symbol 58 Sound {BallDropOne__classMP3SoundBounceBall1} [BallDropOne__classMP3SoundBounceBall1]
Symbol 59 Bitmap {BallDropOne__classIconDownload} [BallDropOne__classIconDownload]
Symbol 60 Sound {BallDropOne__classMP3SoundMenu} [BallDropOne__classMP3SoundMenu]
Symbol 61 Bitmap {BallDropOne__classIconExit} [BallDropOne__classIconExit]
Symbol 62 Sound {BallDropOne__classMP3SoundWR} [BallDropOne__classMP3SoundWR]
Symbol 63 Sound {BallDropOne__classMP3SoundPiip} [BallDropOne__classMP3SoundPiip]
Symbol 64 Bitmap {BallDropOne__classTitleUp} [BallDropOne__classTitleUp]
Symbol 65 Bitmap {BallDropOne__classTitleContinue} [BallDropOne__classTitleContinue]
Symbol 66 Sound {BallDropOne__classMP3SoundSelection1} [BallDropOne__classMP3SoundSelection1]
Symbol 67 Sound {BallDropOne__classMP3SoundBoostGood} [BallDropOne__classMP3SoundBoostGood]
Symbol 68 Sound {BallDropOne__classMP3SoundColumn1} [BallDropOne__classMP3SoundColumn1]
Symbol 69 Bitmap {BallDropOne__classSFXOn} [BallDropOne__classSFXOn]
Symbol 70 Bitmap {Levels__classLevel16} [Levels__classLevel16]
Symbol 71 Bitmap {Levels__classLevel09} [Levels__classLevel09]
Symbol 72 Bitmap {Levels__classLevel01} [Levels__classLevel01]
Symbol 73 Bitmap {Levels__classLevel08} [Levels__classLevel08]
Symbol 74 Bitmap {Levels__classLevel23} [Levels__classLevel23]
Symbol 75 Bitmap {Levels__classLevel19} [Levels__classLevel19]
Symbol 76 Bitmap {Levels__classLevel24} [Levels__classLevel24]
Symbol 77 Bitmap {Levels__classLevel13} [Levels__classLevel13]
Symbol 78 Bitmap {Levels__classLevel18} [Levels__classLevel18]
Symbol 79 Bitmap {Levels__classLevel02} [Levels__classLevel02]
Symbol 80 Bitmap {Levels__classLevel14} [Levels__classLevel14]
Symbol 81 Bitmap {Levels__classLevel25} [Levels__classLevel25]
Symbol 82 Bitmap {Levels__classLevel03} [Levels__classLevel03]
Symbol 83 Bitmap {Levels__classLevel15} [Levels__classLevel15]
Symbol 84 Bitmap {Levels__classLevel06} [Levels__classLevel06]
Symbol 85 Bitmap {Levels__classLevel22} [Levels__classLevel22]
Symbol 86 Bitmap {Levels__classLevel05} [Levels__classLevel05]
Symbol 87 Bitmap {Levels__classLevel12} [Levels__classLevel12]
Symbol 88 Bitmap {Levels__classLevel07} [Levels__classLevel07]
Symbol 89 Bitmap {Levels__classLevel20} [Levels__classLevel20]
Symbol 90 Bitmap {Levels__classLevel21} [Levels__classLevel21]
Symbol 91 Bitmap {Levels__classLevel10} [Levels__classLevel10]
Symbol 92 Bitmap {Levels__classLevel11} [Levels__classLevel11]
Symbol 93 Bitmap {Levels__classLevel17} [Levels__classLevel17]
Symbol 94 Bitmap {Levels__classLevel04} [Levels__classLevel04]
Symbol 95 Font {FontBank__fontMalache} [FontBank__fontMalache]
Symbol 96 Font {FontBank__fontMassiveHeadache} [FontBank__fontMassiveHeadache]
Symbol 97 Font {FontBank__fontZachary} [FontBank__fontZachary]
Symbol 98 Bitmap {Ball__classTTursas} [Ball__classTTursas]
Symbol 99 Bitmap {Ball__classSpecial} [Ball__classSpecial]
Symbol 100 Bitmap {Ball__classWater} [Ball__classWater]
Symbol 101 Bitmap {Ball__classKey} [Ball__classKey]
Symbol 102 Bitmap {Ball__classX2} [Ball__classX2]
Symbol 103 Bitmap {Ball__classX3} [Ball__classX3]
Symbol 104 Bitmap {Ball__classMystery} [Ball__classMystery]
Symbol 105 Bitmap {Ball__classElTopo} [Ball__classElTopo]
Symbol 106 Bitmap {Ball__classSkull} [Ball__classSkull]
Symbol 107 Font
Symbol 108 Font
Symbol 109 Font

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata not present, AS3.
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 1Symbol 1 as "BallDropOne__classMP3SoundBounceBallB5"
ExportAssets (56)Timeline Frame 1Symbol 2 as "BallDropOne__classMP3SoundPlayerDeath"
ExportAssets (56)Timeline Frame 1Symbol 3 as "BallDropOne__classMP3SoundBounceBallC1"
ExportAssets (56)Timeline Frame 1Symbol 4 as "BallDropOne__classTitleStart"
ExportAssets (56)Timeline Frame 1Symbol 5 as "BallDropOne__classTitleLevelEditor"
ExportAssets (56)Timeline Frame 1Symbol 6 as "BallDropOne__classMP3SoundMystery"
ExportAssets (56)Timeline Frame 1Symbol 7 as "BallDropOne__classMP3SoundBounceWall"
ExportAssets (56)Timeline Frame 1Symbol 8 as "BallDropOne__classMP3SoundButton2"
ExportAssets (56)Timeline Frame 1Symbol 9 as "BallDropOne__classMP3SoundBounceBallB6"
ExportAssets (56)Timeline Frame 1Symbol 10 as "BallDropOne__classMP3SoundColumn2"
ExportAssets (56)Timeline Frame 1Symbol 11 as "BallDropOne__classMP3SoundButton1"
ExportAssets (56)Timeline Frame 1Symbol 12 as "BallDropOne__classTitleHomePage"
ExportAssets (56)Timeline Frame 1Symbol 13 as "BallDropOne__classMP3SoundBounceBallD3"
ExportAssets (56)Timeline Frame 1Symbol 14 as "BallDropOne__classMP3SoundColumn4"
ExportAssets (56)Timeline Frame 1Symbol 15 as "BallDropOne__classMP3SoundBounceBall2"
ExportAssets (56)Timeline Frame 1Symbol 16 as "BallDropOne__classMP3SoundBounceBallD4"
ExportAssets (56)Timeline Frame 1Symbol 17 as "BallDropOne__classIconSubmit"
ExportAssets (56)Timeline Frame 1Symbol 18 as "BallDropOne__classMusicOn"
ExportAssets (56)Timeline Frame 1Symbol 19 as "BallDropOne__classMP3SoundWorld1"
ExportAssets (56)Timeline Frame 1Symbol 20 as "BallDropOne__classArrowUp"
ExportAssets (56)Timeline Frame 1Symbol 21 as "BallDropOne__classTitleDown"
ExportAssets (56)Timeline Frame 1Symbol 22 as "BallDropOne__classIconPlay"
ExportAssets (56)Timeline Frame 1Symbol 23 as "BallDropOne__classMP3SoundColumn3"
ExportAssets (56)Timeline Frame 1Symbol 24 as "BallDropOne__classMP3SoundWorld5"
ExportAssets (56)Timeline Frame 1Symbol 25 as "BallDropOne__classMP3SoundAllOpen"
ExportAssets (56)Timeline Frame 1Symbol 26 as "BallDropOne__classMP3SoundBounceBallC6"
ExportAssets (56)Timeline Frame 1Symbol 27 as "BallDropOne__classMP3SoundBounceBallB1"
ExportAssets (56)Timeline Frame 1Symbol 28 as "BallDropOne__classMP3SoundHitMystery1"
ExportAssets (56)Timeline Frame 1Symbol 29 as "BallDropOne__classMP3SoundBounceBallB2"
ExportAssets (56)Timeline Frame 1Symbol 30 as "BallDropOne__classMP3SoundLevelStart"
ExportAssets (56)Timeline Frame 1Symbol 31 as "BallDropOne__classSFXOff"
ExportAssets (56)Timeline Frame 1Symbol 32 as "BallDropOne__classMP3SoundWorld4"
ExportAssets (56)Timeline Frame 1Symbol 33 as "BallDropOne__classMP3SoundBounceBallD2"
ExportAssets (56)Timeline Frame 1Symbol 34 as "BallDropOne__classIconClear"
ExportAssets (56)Timeline Frame 1Symbol 35 as "BallDropOne__classMP3SoundHitSpecial1"
ExportAssets (56)Timeline Frame 1Symbol 36 as "BallDropOne__classMP3SoundBounceBallC2"
ExportAssets (56)Timeline Frame 1Symbol 37 as "BallDropOne__classMP3SoundHitMystery2"
ExportAssets (56)Timeline Frame 1Symbol 38 as "BallDropOne__classMP3SoundWorld2"
ExportAssets (56)Timeline Frame 1Symbol 39 as "BallDropOne__classMP3SoundBounceBallC3"
ExportAssets (56)Timeline Frame 1Symbol 40 as "BallDropOne__classMP3SoundWorld3"
ExportAssets (56)Timeline Frame 1Symbol 41 as "BallDropOne__classMP3SoundBounceBallD1"
ExportAssets (56)Timeline Frame 1Symbol 42 as "BallDropOne__classMP3SoundHitTTursas"
ExportAssets (56)Timeline Frame 1Symbol 43 as "BallDropOne__classMP3SoundBounceBall3"
ExportAssets (56)Timeline Frame 1Symbol 44 as "BallDropOne__classMP3SoundBounceBallD6"
ExportAssets (56)Timeline Frame 1Symbol 45 as "BallDropOne__classMusicOff"
ExportAssets (56)Timeline Frame 1Symbol 46 as "BallDropOne__classMP3SoundBounceBall4"
ExportAssets (56)Timeline Frame 1Symbol 47 as "BallDropOne__classNewGameAlert"
ExportAssets (56)Timeline Frame 1Symbol 48 as "BallDropOne__classMP3SoundBounceBallB4"
ExportAssets (56)Timeline Frame 1Symbol 49 as "BallDropOne__classMP3SoundBounceBallC5"
ExportAssets (56)Timeline Frame 1Symbol 50 as "BallDropOne__classMP3SoundSelection2"
ExportAssets (56)Timeline Frame 1Symbol 51 as "BallDropOne__classMP3SoundBoostBad"
ExportAssets (56)Timeline Frame 1Symbol 52 as "BallDropOne__classBackground01"
ExportAssets (56)Timeline Frame 1Symbol 53 as "BallDropOne__classMP3SoundHitSpecial2"
ExportAssets (56)Timeline Frame 1Symbol 54 as "BallDropOne__classMP3SoundUnlockLevel"
ExportAssets (56)Timeline Frame 1Symbol 55 as "BallDropOne__classMP3SoundBounceBallC4"
ExportAssets (56)Timeline Frame 1Symbol 56 as "BallDropOne__classMP3SoundBounceBallD5"
ExportAssets (56)Timeline Frame 1Symbol 57 as "BallDropOne__classMP3SoundBounceBallB3"
ExportAssets (56)Timeline Frame 1Symbol 58 as "BallDropOne__classMP3SoundBounceBall1"
ExportAssets (56)Timeline Frame 1Symbol 59 as "BallDropOne__classIconDownload"
ExportAssets (56)Timeline Frame 1Symbol 60 as "BallDropOne__classMP3SoundMenu"
ExportAssets (56)Timeline Frame 1Symbol 61 as "BallDropOne__classIconExit"
ExportAssets (56)Timeline Frame 1Symbol 62 as "BallDropOne__classMP3SoundWR"
ExportAssets (56)Timeline Frame 1Symbol 63 as "BallDropOne__classMP3SoundPiip"
ExportAssets (56)Timeline Frame 1Symbol 64 as "BallDropOne__classTitleUp"
ExportAssets (56)Timeline Frame 1Symbol 65 as "BallDropOne__classTitleContinue"
ExportAssets (56)Timeline Frame 1Symbol 66 as "BallDropOne__classMP3SoundSelection1"
ExportAssets (56)Timeline Frame 1Symbol 67 as "BallDropOne__classMP3SoundBoostGood"
ExportAssets (56)Timeline Frame 1Symbol 68 as "BallDropOne__classMP3SoundColumn1"
ExportAssets (56)Timeline Frame 1Symbol 69 as "BallDropOne__classSFXOn"
ExportAssets (56)Timeline Frame 1Symbol 70 as "Levels__classLevel16"
ExportAssets (56)Timeline Frame 1Symbol 71 as "Levels__classLevel09"
ExportAssets (56)Timeline Frame 1Symbol 72 as "Levels__classLevel01"
ExportAssets (56)Timeline Frame 1Symbol 73 as "Levels__classLevel08"
ExportAssets (56)Timeline Frame 1Symbol 74 as "Levels__classLevel23"
ExportAssets (56)Timeline Frame 1Symbol 75 as "Levels__classLevel19"
ExportAssets (56)Timeline Frame 1Symbol 76 as "Levels__classLevel24"
ExportAssets (56)Timeline Frame 1Symbol 77 as "Levels__classLevel13"
ExportAssets (56)Timeline Frame 1Symbol 78 as "Levels__classLevel18"
ExportAssets (56)Timeline Frame 1Symbol 79 as "Levels__classLevel02"
ExportAssets (56)Timeline Frame 1Symbol 80 as "Levels__classLevel14"
ExportAssets (56)Timeline Frame 1Symbol 81 as "Levels__classLevel25"
ExportAssets (56)Timeline Frame 1Symbol 82 as "Levels__classLevel03"
ExportAssets (56)Timeline Frame 1Symbol 83 as "Levels__classLevel15"
ExportAssets (56)Timeline Frame 1Symbol 84 as "Levels__classLevel06"
ExportAssets (56)Timeline Frame 1Symbol 85 as "Levels__classLevel22"
ExportAssets (56)Timeline Frame 1Symbol 86 as "Levels__classLevel05"
ExportAssets (56)Timeline Frame 1Symbol 87 as "Levels__classLevel12"
ExportAssets (56)Timeline Frame 1Symbol 88 as "Levels__classLevel07"
ExportAssets (56)Timeline Frame 1Symbol 89 as "Levels__classLevel20"
ExportAssets (56)Timeline Frame 1Symbol 90 as "Levels__classLevel21"
ExportAssets (56)Timeline Frame 1Symbol 91 as "Levels__classLevel10"
ExportAssets (56)Timeline Frame 1Symbol 92 as "Levels__classLevel11"
ExportAssets (56)Timeline Frame 1Symbol 93 as "Levels__classLevel17"
ExportAssets (56)Timeline Frame 1Symbol 94 as "Levels__classLevel04"
ExportAssets (56)Timeline Frame 1Symbol 95 as "FontBank__fontMalache"
ExportAssets (56)Timeline Frame 1Symbol 96 as "FontBank__fontMassiveHeadache"
ExportAssets (56)Timeline Frame 1Symbol 97 as "FontBank__fontZachary"
ExportAssets (56)Timeline Frame 1Symbol 98 as "Ball__classTTursas"
ExportAssets (56)Timeline Frame 1Symbol 99 as "Ball__classSpecial"
ExportAssets (56)Timeline Frame 1Symbol 100 as "Ball__classWater"
ExportAssets (56)Timeline Frame 1Symbol 101 as "Ball__classKey"
ExportAssets (56)Timeline Frame 1Symbol 102 as "Ball__classX2"
ExportAssets (56)Timeline Frame 1Symbol 103 as "Ball__classX3"
ExportAssets (56)Timeline Frame 1Symbol 104 as "Ball__classMystery"
ExportAssets (56)Timeline Frame 1Symbol 105 as "Ball__classElTopo"
ExportAssets (56)Timeline Frame 1Symbol 106 as "Ball__classSkull"
SerialNumber (41)Timeline Frame 1

Labels

"BallDropOne"Frame 1




http://swfchan.com/11/54060/info.shtml
Created: 22/4 -2019 01:05:12 Last modified: 22/4 -2019 01:05:12 Server time: 02/05 -2024 03:58:13