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

A
Very
Merry Christmas!


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

CopterCrasher.swf

This is the info page for
Flash #65507

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


Text
Loading Please Wait...

CopterCrasher

v 1.1

Arrow Keys to Move

Play

Music: ParagonX9

A to Toggle Stats

Helicopters Destroyed:

Fuel Left:

Press Space Bar to Exit

Press Space Bar to Exit

Rank:

Beginner-Crasher

ActionScript [AS3]

Section 1
//arrowkeys_15 (heli_fla.arrowkeys_15) package heli_fla { import flash.display.*; public dynamic class arrowkeys_15 extends MovieClip { public function arrowkeys_15(){ addFrameScript(68, frame69); } function frame69(){ stop(); } } }//package heli_fla
Section 2
//fuel_24 (heli_fla.fuel_24) package heli_fla { import flash.display.*; public dynamic class fuel_24 extends MovieClip { public function fuel_24(){ addFrameScript(0, frame1, 38, frame39); } function frame1(){ stop(); } function frame39(){ gotoAndPlay(2); } } }//package heli_fla
Section 3
//gamelevel_12 (heli_fla.gamelevel_12) package heli_fla { import flash.display.*; public dynamic class gamelevel_12 extends MovieClip { public var upWall:MovieClip; public var rightWall:MovieClip; public var downWall1:MovieClip; public var leftWall:MovieClip; public var Jgames:MovieClip; public var downWall:MovieClip; public var upWall1:MovieClip; public var cloudMap:MovieClip; public function gamelevel_12(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package heli_fla
Section 4
//helicopter_35 (heli_fla.helicopter_35) package heli_fla { import flash.display.*; public dynamic class helicopter_35 extends MovieClip { public var propeller:MovieClip; public function helicopter_35(){ addFrameScript(0, frame1); } function frame1(){ propeller.alpha = 0.8; } } }//package heli_fla
Section 5
//loading_1 (heli_fla.loading_1) package heli_fla { import flash.display.*; public dynamic class loading_1 extends MovieClip { public function loading_1(){ addFrameScript(42, frame43); } function frame43(){ stop(); } } }//package heli_fla
Section 6
//logoD_4 (heli_fla.logoD_4) package heli_fla { import flash.display.*; public dynamic class logoD_4 extends MovieClip { public var fire:MovieClip; } }//package heli_fla
Section 7
//o_5 (heli_fla.o_5) package heli_fla { import flash.display.*; public dynamic class o_5 extends MovieClip { public function o_5(){ addFrameScript(223, frame224); } function frame224(){ } } }//package heli_fla
Section 8
//propeller1_33 (heli_fla.propeller1_33) package heli_fla { import flash.display.*; public dynamic class propeller1_33 extends MovieClip { public function propeller1_33(){ addFrameScript(3, frame4, 4, frame5); } function frame4(){ gotoAndPlay(1); } function frame5(){ stop(); } } }//package heli_fla
Section 9
//stats_23 (heli_fla.stats_23) package heli_fla { import flash.display.*; import flash.text.*; public dynamic class stats_23 extends MovieClip { public var HcounterTxt:TextField; public var Fuel:MovieClip; } }//package heli_fla
Section 10
//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 11
//MochiServices (mochi.MochiServices) package mochi { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiServices { private static var _container:Object; private static var _connected:Boolean = false; private static var _swfVersion:String; private static var _sendChannel:LocalConnection; private static var _rcvChannelName:String; private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; private static var _timer:Timer; private static var _sendChannelName:String; private static var _startTime:Number; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__mochiservices"; private static var _rcvChannel:LocalConnection; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ onError("NotConnected"); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID}); }; if (_clip != null){ if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){ _clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _clip._nextcallbackID++; }; }; } public static function get connected():Boolean{ return (_connected); } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (_clip != null){ if (_clip._queue != null){ while (_clip._queue.length > 0) { _local2 = _clip._queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _clip._callbacks[_local2.callbackID]; }; delete _clip._callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; }; } private static function init(_arg1:String, _arg2:Object):void{ _id = _arg1; if (_arg2 != null){ _container = _arg2; loadCommunicator(_arg1, _container); }; } public static function get childClip():Object{ return (_clip); } public static function get id():String{ return (_id); } public static function stayOnTop():void{ _container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true); if (_clip != null){ _clip.visible = true; }; } public static function getVersion():String{ return ("1.31"); } 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()}); _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 (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 12
//Crash (Crash) package { import flash.media.*; public dynamic class Crash extends Sound { } }//package
Section 13
//Eheli (Eheli) package { import flash.display.*; import flash.events.*; import flash.utils.*; public class Eheli extends MovieClip { public var left:Boolean;// = false public var right:Boolean;// = false public var EdeltaX:Number;// = 0 public var EdeltaY:Number;// = 0 public var superaccelerationY;// = 0.5 public var Efriction:Number;// = 0.9 public var superaccelerationX;// = 0.5 private var xdif1:Number;// = 0 public var normalaccelerationY;// = 0.6 public var normalaccelerationX;// = 0.6 public var exTimer:Timer; public var exploOn:Boolean;// = false public var speed:Number;// = 11 public var hitMX:Number;// = 0 public var hitMY:Number;// = 0 private var lastTime:int; public var propeller:MovieClip; public var up:Boolean;// = false public var down:Boolean;// = false public var Erotation:Number;// = 0 public var speed2:Number;// = 13 public var length; public var randomNumX:Number; public var randomNumY:Number; public var xdif:Number;// = 0 public var Rspeed:Number; public var RandomNumTimer:Timer; public var ydif:Number;// = 0 public var aHit:Boolean;// = false private var target:MovieClip; public var hit:Boolean;// = false public var hitMXX:Number;// = 0 public var hitEx:Boolean;// = false public var EaccelerationX:Number;// = 0.05 public var EaccelerationY:Number;// = 0.05 public var hitMYY:Number;// = 0 public var randomNum:Number; private var ydif1:Number;// = 0 public var Eplusrotation:Number;// = 1.5 public var distance:Number;// = 800 public function Eheli(_arg1, _arg2:Number, _arg3:MovieClip){ randomNumX = Math.random(); randomNumY = Math.random(); exploOn = false; hit = false; hitMX = 0; hitMY = 0; hitMXX = 0; hitMYY = 0; left = false; right = false; up = false; down = false; distance = 800; superaccelerationX = 0.5; superaccelerationY = 0.5; normalaccelerationX = 0.6; normalaccelerationY = 0.6; EdeltaX = 0; EdeltaY = 0; Efriction = 0.9; EaccelerationX = 0.05; EaccelerationY = 0.05; Erotation = 0; Eplusrotation = 1.5; xdif = 0; ydif = 0; speed = 11; speed2 = 13; length = Math.sqrt(((xdif * xdif) + (ydif * ydif))); Rspeed = (10 + (Math.random() / 10)); xdif1 = 0; ydif1 = 0; hitEx = false; aHit = false; super(); addFrameScript(0, frame1, 10, frame11, 19, frame20); this.x = _arg1; this.y = _arg2; getDaRandomNum(); addEventListener(Event.ENTER_FRAME, moveEheli); this.target = _arg3; } public function repeatgetRandomNum(_arg1:TimerEvent){ getDaRandomNum(); } public function deleteEheli(){ parent.removeChild(this); removeEventListener(Event.ENTER_FRAME, moveEheli); } function frame11(){ } function frame1(){ stop(); randomNum = Math.floor((Math.random() * 2)); } public function getDaRandomNum(){ randomNumX = Math.random(); speed2 = (12 + (Math.random() * 4)); if (Math.random() > 0.5){ randomNumX = randomNumX; } else { randomNumX = -(randomNumX); }; randomNumY = Math.random(); if (Math.random() > 0.5){ randomNumY = randomNumY; } else { randomNumY = -(randomNumY); }; getRandomNum(); } function frame20(){ stop(); } public function explode(){ exTimer = new Timer(1, 1); exTimer.addEventListener(TimerEvent.TIMER_COMPLETE, explode1); exTimer.start(); } public function getRandomNum(){ RandomNumTimer = new Timer((4000 + (Math.random() * 6000)), 1); RandomNumTimer.addEventListener(TimerEvent.TIMER_COMPLETE, repeatgetRandomNum); RandomNumTimer.start(); } public function explode1(_arg1:TimerEvent){ exploOn = true; this.gotoAndPlay(2); } public function moveEheli(_arg1:Event){ xdif1 = (target.x - this.x); ydif1 = (target.y - this.y); if (exploOn == false){ if (hit == false){ this.x = (this.x + hitMX); this.y = (this.y + hitMY); }; this.x = (this.x + hitMXX); this.y = (this.y + hitMYY); }; if (this.hitTestObject(target)){ } else { if (hit == false){ this.x = (this.x + (randomNumX * speed2)); this.y = (this.y + (randomNumY * speed2)); }; }; if (hit == true){ if (exploOn == false){ hitMYY = (hitMYY - -0.8); this.rotation = (this.rotation + 15); }; if ((((((((xdif1 < (distance * 1.1))) && ((xdif1 > (-(distance) * 1.1))))) && ((ydif1 < (distance - 200))))) && ((ydif1 > -((distance - 200)))))){ } else { deleteEheli(); }; }; } } }//package
Section 14
//Explode (Explode) package { import flash.media.*; public dynamic class Explode extends Sound { } }//package
Section 15
//heli (heli) package { import flash.display.*; public dynamic class heli extends MovieClip { public var propeller1:MovieClip; public var propeller:MovieClip; public function heli(){ addFrameScript(0, frame1); } function frame1(){ } } }//package
Section 16
//Heli (Heli) package { import flash.display.*; import flash.events.*; import mochi.*; import flash.media.*; import flash.utils.*; import flash.text.*; import flash.net.*; public dynamic class Heli extends MovieClip { public var ToggleSound:Boolean;// = true public var accelerationX:Number;// = 4 public var downWall2:MovieClip; public var upArrow:Boolean; public var heli1:MochiThing; public var volc1:SoundTransform; public var playerscore:Number; public var Rank:String; public var gravity:Number;// = 1 public var h:heli; public var leftEdge:Number; public var exTimer1:Timer; public var leftArrow:Boolean; public var Stats:MovieClip; public var lastTime:int; public var RankTxt:TextField; public var downArrow:Boolean; public var music1:TestSong; public var atJgames:Boolean; public var Hcounter:Number;// = 0 public var StatsPosition:Boolean; public var gamelevel:MovieClip; public var vol:Number;// = 2 public var edgeDistance:Number;// = 400 public var MusicF; public var hgravity:Number; public var JGamesLogo:MovieClip; public var rightWall2:MovieClip; public var stagePositionX:Number; public var explode:Explode; public var stagePositionY:Number; public var friction:Number;// = 0.9 public var upEdge:Number; public var channel:SoundChannel; public var NoScrolling:Boolean; public var Echannel:SoundChannel; public var SoundOn:Boolean;// = false public var bitmap:MovieClip; public var plusrotation:Number;// = 1.5 public var EheliX;// = 200 public var EheliY;// = 200 public var SoundF; public var FuelX:Number; public var rightArrow:Boolean; public var gAlpha:Number; public var rdeltaChanged;// = false public var Ehelis:Array; public var downEdge:Number; public var crashchannel:SoundChannel; public var channel1:SoundChannel; public var EheliTimer:Timer; public var deltaX:Number;// = 0 public var deltaY:Number;// = 0 public var crash:Crash; public var exploded:Array; public var vol1:Number;// = 0.25 public var upWall2:MovieClip; public var volE:Number;// = 4 public var accelerationY:Number;// = 4 public var leftWall2:MovieClip; public var hrotation:Number;// = 0 public var rightEdge:Number; public var EheliCounter:Number;// = 130 public function Heli(){ rdeltaChanged = false; EheliCounter = 130; Hcounter = 0; SoundOn = false; ToggleSound = true; vol = 2; vol1 = 0.25; crash = new Crash(); volE = 4; explode = new Explode(); edgeDistance = 400; gravity = 1; friction = 0.9; accelerationX = 4; accelerationY = 4; hrotation = 0; plusrotation = 1.5; deltaX = 0; deltaY = 0; EheliX = 200; EheliY = 200; h = new heli(); super(); addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5); } public function keyPressedDown(_arg1:KeyboardEvent){ if (_arg1.keyCode == 37){ leftArrow = true; } else { if (_arg1.keyCode == 39){ rightArrow = true; } else { if (_arg1.keyCode == 38){ upArrow = true; } else { if (_arg1.keyCode == 40){ downArrow = true; }; }; }; }; } public function scrollWithHeroH(_arg1:Event){ scrollWithHero(); } public function showFuel(_arg1:Event){ var _local2:Boolean; _local2 = false; if (FuelX <= 15){ }; if (FuelX <= 0){ gamelevel.alpha = (gamelevel.alpha - 0.15); if (gamelevel.alpha <= 0){ endGame(); removeEventListener(Event.ENTER_FRAME, showFuel); gotoAndStop("GameOver"); }; } else { FuelX = (FuelX + -0.0075); Stats.Fuel.scaleX = FuelX; }; } function frame3(){ leftArrow = false; rightArrow = false; upArrow = false; downArrow = false; stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressedDown); stage.addEventListener(KeyboardEvent.KEY_UP, keyPressedUp); stage.addEventListener(Event.ENTER_FRAME, moveh); stop(); Hcounter = 0; h.x = 200; h.y = 200; gamelevel.addChild(h); h.stop(); addEventListener(Event.ENTER_FRAME, checkMenuHits); atJgames = false; addEventListener(Event.ENTER_FRAME, checkMenu); if (SoundF == false){ SoundF = true; sSound(); music1 = new TestSong(); volc1 = new SoundTransform(vol1); channel1 = music1.play(0, 100, volc1); } else { sSound(); }; gamelevel.alpha = 0.1; addEventListener(Event.ENTER_FRAME, GalphaUp); } public function checkMenuHits(_arg1:Event){ if (h.hitTestObject(gamelevel.upWall1)){ deltaY = (deltaY * 1.6); deltaY = -(deltaY); }; if (h.hitTestObject(gamelevel.downWall1)){ deltaY = (deltaY * 1.6); deltaY = -(deltaY); }; } function frame4(){ stop(); startHeli(); leftArrow = false; rightArrow = false; downArrow = false; upArrow = false; addEventListener(Event.ENTER_FRAME, scrollWithHeroH); NoScrolling = false; StatsPosition = true; stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressedDownM); hgravity = 0; FuelX = 14; gAlpha = 0; addEventListener(Event.ENTER_FRAME, showFuel); updateHcounter(); removeEventListener(Event.ENTER_FRAME, checkMenu); } function frame5(){ Rank = "Beginner-crasher"; if (Hcounter <= 70){ Rank = "Beginner-crasher"; } else { if ((((Hcounter > 70)) && ((Hcounter <= 116)))){ Rank = "Advanced-crasher"; } else { if ((((Hcounter > 116)) && ((Hcounter <= 125)))){ Rank = "Pro-crasher"; } else { if (Hcounter > 125){ Rank = "Master-crasher"; }; }; }; }; RankTxt.text = String(Rank); playerscore = 1; MochiScores.showLeaderboard({boardID:"28b5de13cfc5123d", score:Hcounter, previewScores:true, numScores:15, onClose:function (){ gotoMenu(); }}); sSound(); } function frame1(){ MochiAd.showPreGameAd({clip:root, id:"c05503525c8b0356", res:"800x500", background:8553087, color:4473408, outline:6578783, no_bg:true}); MochiServices.connect("c05503525c8b0356", heli1); SoundF = false; MusicF = false; MochiBot.track(this, "6c7672b9"); } public function sSound(){ var _local1:heliSound; var _local2:SoundTransform; if (ToggleSound == true){ if (SoundOn == false){ _local1 = new heliSound(); _local2 = new SoundTransform(vol); SoundOn = true; } else { SoundOn = false; }; }; } public function GalphaUp(_arg1:Event){ if (gamelevel.alpha < 1){ gamelevel.alpha = (gamelevel.alpha + 0.05); } else { removeEventListener(Event.ENTER_FRAME, GalphaUp); }; } public function updateHcounter(){ Stats.HcounterTxt.text = String(Hcounter); } public function checkMenu(_arg1:Event){ scrollWithHeroMenu(); if (h.x > 825){ h.x = 1000; gamelevel.alpha = (gamelevel.alpha - 0.05); leftArrow = false; rightArrow = false; downArrow = false; upArrow = false; removeEventListener(Event.ENTER_FRAME, checkMenuHits); }; if (h.x < -100){ h.x = -40; }; if (h.x > 5){ atJgames = false; }; if (h.x < -40){ if (atJgames == false){ atJgames = true; gotoJGames(); leftArrow = false; rightArrow = false; downArrow = false; upArrow = false; }; }; if (gamelevel.alpha <= 0){ gotoAndStop("Game"); gamelevel.gotoAndStop(2); trace("ingame"); removeEventListener(Event.ENTER_FRAME, checkMenuHits); }; } public function moveh(_arg1:Event){ if (leftArrow){ deltaX = (deltaX - accelerationX); hrotation = (hrotation - plusrotation); }; if (rightArrow){ deltaX = (deltaX + accelerationX); hrotation = (hrotation + plusrotation); }; if (upArrow){ deltaY = (deltaY - accelerationY); }; if (downArrow){ deltaY = (deltaY + accelerationY); }; deltaX = (deltaX * friction); deltaY = (deltaY * friction); hrotation = (hrotation * friction); h.rotation = hrotation; h.x = (h.x + deltaX); h.y = (h.y + deltaY); } function frame2(){ stop(); JGamesLogo.alpha = 0; JGamesLogo.addEventListener(MouseEvent.CLICK, jgamesclick); addEventListener(Event.ENTER_FRAME, JalphaUp); } public function keyPressedUp(_arg1:KeyboardEvent){ if (_arg1.keyCode == 37){ leftArrow = false; } else { if (_arg1.keyCode == 39){ rightArrow = false; } else { if (_arg1.keyCode == 38){ upArrow = false; } else { if (_arg1.keyCode == 40){ downArrow = false; }; }; }; }; } public function EheliTimerRepeat(_arg1:TimerEvent){ addEheli(); EheliCounter = (EheliCounter + 1); if (EheliCounter < 10000){ addEheliTimer(); }; } public function startHeli(){ gamelevel.gotoAndStop(2); h.stop(); gamelevel.removeChild(h); gamelevel.addChild(h); h.stop(); Ehelis = new Array(); exploded = new Array(); addEventListener(Event.ENTER_FRAME, checkForHits); } public function scrollWithHeroMenu(){ } public function addEheliTimer(){ EheliTimer = new Timer(1, 1); EheliTimer.addEventListener(TimerEvent.TIMER_COMPLETE, EheliTimerRepeat); EheliTimer.start(); } public function keyPressedDownM(_arg1:KeyboardEvent){ if (_arg1.keyCode == 65){ addEventListener(Event.ENTER_FRAME, moveStats); }; } public function JalphaUp(_arg1:Event){ if (JGamesLogo.alpha < 2){ JGamesLogo.alpha = (JGamesLogo.alpha + 0.03); } else { removeEventListener(Event.ENTER_FRAME, JalphaUp); gotoAndStop("Menu"); }; } public function addEheli(){ var _local1:Eheli; EheliX = (Math.random() * gamelevel.width); EheliY = (Math.random() * gamelevel.height); _local1 = new Eheli(EheliX, EheliY, h); gamelevel.addChild(_local1); Ehelis.push(_local1); } public function halphaUp(_arg1:Event){ } public function moveStats(_arg1:Event){ if (StatsPosition == true){ if (Stats.y > 501){ removeEventListener(Event.ENTER_FRAME, moveStats); StatsPosition = false; }; Stats.y = (Stats.y + 2); } else { if (StatsPosition == false){ if (Stats.y <= 456){ Stats.y = 456; removeEventListener(Event.ENTER_FRAME, moveStats); StatsPosition = true; }; Stats.y = (Stats.y - 2); }; }; } public function gotoMenu(){ gotoAndStop("Menu"); } public function jgamesclick(_arg1:MouseEvent){ gotoJGames(); } public function endGame(){ removeChild(gamelevel); removeEventListener(Event.ENTER_FRAME, scrollWithHeroH); removeEventListener(Event.ENTER_FRAME, checkForHits); EheliCounter = 130; } public function removeEheli(_arg1:Eheli){ var _local2:*; for (_local2 in Ehelis) { if (Ehelis[_local2] == _arg1){ Ehelis.splice(_local2, 1); break; }; }; } public function explode4(){ Echannel = explode.play(volE); } public function checkForHits(_arg1:Event){ var _local2:int; var _local3:*; var _local4:*; if (h.hitTestObject(gamelevel.rightWall)){ deltaX = (deltaX * 2); deltaX = -(deltaX); rdeltaChanged = true; }; if (h.hitTestObject(gamelevel.leftWall)){ deltaX = (deltaX * 2); deltaX = -(deltaX); }; if (h.hitTestObject(gamelevel.upWall)){ deltaY = (deltaY * 2); deltaY = -(deltaY); }; if (h.hitTestObject(gamelevel.downWall)){ deltaY = (deltaY * 2); deltaY = -(deltaY); }; _local2 = 0; while (_local2 < Ehelis.length) { if (gamelevel.leftWall.hitTestObject(Ehelis[_local2])){ Ehelis[_local2].hitMX = (Ehelis[_local2].hitMX + 10); } else { if (Ehelis[_local2].hitMX > 0){ Ehelis[_local2].hitMX = (Ehelis[_local2].hitMX - 0.2); }; }; if (gamelevel.rightWall.hitTestObject(Ehelis[_local2])){ Ehelis[_local2].hitMX = (Ehelis[_local2].hitMX - 10); } else { if (Ehelis[_local2].hitMX < 0){ Ehelis[_local2].hitMX = (Ehelis[_local2].hitMX + 0.2); }; }; if (gamelevel.upWall.hitTestObject(Ehelis[_local2])){ Ehelis[_local2].hitMY = (Ehelis[_local2].hitMY + 10); } else { if (Ehelis[_local2].hitMY > 0){ Ehelis[_local2].hitMY = (Ehelis[_local2].hitMY - 0.2); }; }; if (gamelevel.downWall.hitTestObject(Ehelis[_local2])){ Ehelis[_local2].hitMY = (Ehelis[_local2].hitMY - 10); } else { if (Ehelis[_local2].hitMY < 0){ Ehelis[_local2].hitMY = (Ehelis[_local2].hitMY + 0.2); }; }; if (h.hitTestObject(Ehelis[_local2])){ if (Ehelis[_local2].hit == false){ Hcounter = (Hcounter + 1); Ehelis[_local2].hit = true; crashchannel = crash.play(vol); updateHcounter(); } else { if (Ehelis[_local2].hit == true){ }; }; if ((((((((deltaX < 4)) && ((deltaX > -4)))) && ((deltaY < 4)))) && ((deltaY > -4)))){ Ehelis[_local2].hitMYY = -10; } else { Ehelis[_local2].hitMXX = (deltaX * 1.3); Ehelis[_local2].hitMYY = (deltaY * 1.3); }; } else { Ehelis[_local2].hitMXX = (Ehelis[_local2].hitMXX * 0.9995); Ehelis[_local2].hitMYY = (Ehelis[_local2].hitMYY * 0.9995); }; _local2++; }; _local3 = 0; while (_local3 < Ehelis.length) { _local4 = (_local3 + 1); while (_local4 < Ehelis.length) { if (Ehelis[_local4].hitTestObject(Ehelis[_local3])){ if (Ehelis[_local4].hit == true){ if (Ehelis[_local4].exploOn == false){ trace("yay"); Ehelis[_local4].explode(); Ehelis[_local3].explode(); explode4(); if (Ehelis[_local3].hit == false){ Hcounter = (Hcounter + 1); updateHcounter(); }; }; }; if (Ehelis[_local3].hit == true){ if (Ehelis[_local3].exploOn == false){ trace("yay"); Ehelis[_local4].explode(); Ehelis[_local3].explode(); explode4(); if (Ehelis[_local4].hit == false){ Hcounter = (Hcounter + 1); updateHcounter(); }; }; }; }; _local4++; }; _local3++; }; EheliCounter; while (EheliCounter >= 0) { addEheli(); EheliCounter--; }; } public function gotoJGames(){ var _local1:*; var _local2:URLRequest; _local1 = "http://www.jgames.ch"; _local2 = new URLRequest(_local1); navigateToURL(_local2, "_blank"); } public function scrollWithHero(){ if (gamelevel.alpha < 1){ gamelevel.alpha = (gamelevel.alpha + 0.1); }; stagePositionX = (gamelevel.x + h.x); stagePositionY = (gamelevel.y + h.y); rightEdge = (stage.stageWidth / 2); leftEdge = (stage.stageWidth / 2); upEdge = (stage.stageHeight / 2); downEdge = (stage.stageHeight / 2); if (h.x < 0){ h.x = 400; h.y = 250; }; if (h.x > 4010){ h.x = 400; h.y = 250; }; trace(h.x); if (h.y < -60){ h.x = 400; h.y = 250; }; if (h.y > 2900){ h.x = 400; h.y = 250; }; if (stagePositionX > rightEdge){ gamelevel.x = (gamelevel.x - (stagePositionX - rightEdge)); if (gamelevel.x < -(3175)){ gamelevel.x = -(3175); }; }; if (stagePositionX < leftEdge){ gamelevel.x = (gamelevel.x + (leftEdge - stagePositionX)); if (gamelevel.x > 0){ gamelevel.x = 0; }; }; if (stagePositionY < upEdge){ if (NoScrolling == false){ gamelevel.y = (gamelevel.y - (stagePositionY - upEdge)); if (gamelevel.y > -12){ gamelevel.y = -12; }; }; }; if (stagePositionY > downEdge){ if (NoScrolling == false){ gamelevel.y = (gamelevel.y + (downEdge - stagePositionY)); if (gamelevel.y < -(2360)){ gamelevel.y = -(2360); }; }; }; } } }//package
Section 17
//heliSound (heliSound) package { import flash.media.*; public dynamic class heliSound extends Sound { } }//package
Section 18
//MochiAd (MochiAd) package { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return ("2.3"); } public static function showTimedAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0"); MochiAd.showInterLevelAd(_arg1); } 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 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 f:Function; 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; lv.lc = name; lv.st = getTimer(); loader = new Loader(); f = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); mc._mochiad_ctr_failed = true; }; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); 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")); 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 sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip; _local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["sendHighScore", _arg1], _arg2, _arg3); return (true); } 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 _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } 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 unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (!_arg1._mochiad){ return (false); }; 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"); }}; 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.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); }; 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 = _local1.loaderInfo.bytesTotal; if ((((_local4 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ options.ad_failed(); _local3 = true; }; }; }; if (this.parent._mochiad_ctr_failed){ 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 _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 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 _loadCommunicator(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var clipname:String; var server:String; var depth:Number; var mc:MovieClip; var lv:URLVariables; var k:String; var lc:LocalConnection; var name:String; var req:URLRequest; var loader:Loader; var options = _arg1; DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; clipname = ("_mochiad_com_" + options.id); if (!MochiAd._isNetworkAvailable()){ return (null); }; if (clip[clipname]){ return (clip[clipname]); }; server = (options.com_server + options.id); MochiAd._allowDomains(server); delete options.id; delete options.com_server; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, clipname, depth); lv = new URLVariables(); for (k in options) { lv[k] = options[k]; }; 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.name = name; mc.lc = lc; lv.lc = name; mc._id = 0; mc._queue = []; mc.rpcResult = function (_arg1:Object):void{ var _local3:Array; var _local4:Array; var _local5:Number; var _local6:Object; var _local7:Object; _arg1 = parseInt(_arg1.toString()); _local3 = mc._callbacks[_arg1]; if (typeof(_local3) == "undefined"){ return; }; delete mc._callbacks[_arg1]; _local4 = []; _local5 = 2; while (_local5 < _local3.length) { _local4.push(_local3[_local5]); _local5++; }; _local5 = 1; while (_local5 < arguments.length) { _local4.push(arguments[_local5]); _local5++; }; _local6 = _local3[1]; _local7 = _local3[0]; if (((_local7) && ((typeof(_local6) == "string")))){ _local6 = _local7[_local6]; }; if (typeof(_local6) == "function"){ _local6.apply(_local7, _local4); }; }; mc._didConnect = function (_arg1:String):void{ var _local2:Array; var _local3:Function; var _local4:Number; var _local5:Array; mc._endpoint = _arg1; _local2 = mc._queue; delete mc._queue; _local3 = mc.doSend; _local4 = 0; while (_local4 < _local2.length) { _local5 = _local2[_local4]; _local3.apply(this, _local5); _local4++; }; }; mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{ var _local5:Number; var _local6:LocalConnection; var _local7:Array; var _local8:Number; if (mc._endpoint == null){ _local7 = []; _local8 = 0; while (_local8 < arguments.length) { _local7.push(arguments[_local8]); _local8++; }; mc._queue.push(_local7); return; }; mc._id = (mc._id + 1); _local5 = mc._id; mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))]; _local6 = new LocalConnection(); _local6.send(mc._endpoint, "rpc", _local5, _arg1); }; mc._callbacks = {}; mc._callbacks[0] = [mc, "_didConnect"]; lv.st = getTimer(); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader = new Loader(); loader.load(req); mc.addChild(loader); mc._mochiad_com = loader; return (mc); } 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 r:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, 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"); }}; options = MochiAd._parseOptions(options, DEFAULTS); if ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0){ options.ad_started(); options.ad_finished(); 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); 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.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; }; 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); if (!chk.showing){ _local11 = _local2.loaderInfo.bytesTotal; if ((((_local11 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local3 > chk.ad_timeout){ options.ad_failed(); _local4 = true; }; }; }; if (this.parent._mochiad_ctr_failed){ 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 fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip; _local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3); return (true); } 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 19
//MochiBot (MochiBot) package { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ var _local3:MochiBot; var _local4:String; var _local5:URLVariables; var _local6:String; var _local7:URLRequest; var _local8:Loader; if (Security.sandboxType == "localWithFile"){ return (null); }; _local3 = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); _local4 = "http://core.mochibot.com/my/core.swf"; _local5 = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; _local6 = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; _local7 = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; _local8 = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 20
//MochiThing (MochiThing) package { import flash.display.*; public dynamic class MochiThing extends MovieClip { } }//package
Section 21
//TestSong (TestSong) package { import flash.media.*; public dynamic class TestSong extends Sound { } }//package

Library Items

Symbol 1 Sound {heliSound}
Symbol 2 Sound {Crash}
Symbol 3 Sound {Explode}
Symbol 4 GraphicUsed by:13
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClipUses:5Used by:13 23 96 108
Symbol 7 GraphicUsed by:12
Symbol 8 GraphicUsed by:12
Symbol 9 GraphicUsed by:12
Symbol 10 GraphicUsed by:12
Symbol 11 GraphicUsed by:12
Symbol 12 MovieClip {heli_fla.propeller1_33}Uses:7 8 9 10 11Used by:13 23 108
Symbol 13 MovieClip {heli}Uses:4 6 12Used by:108
Symbol 14 GraphicUsed by:23
Symbol 15 BitmapUsed by:16 107
Symbol 16 GraphicUses:15Used by:17
Symbol 17 MovieClipUses:16Used by:23 41
Symbol 18 BitmapUsed by:19 107
Symbol 19 GraphicUses:18Used by:20
Symbol 20 MovieClipUses:19Used by:23 41
Symbol 21 GraphicUsed by:22
Symbol 22 MovieClipUses:21Used by:23 41
Symbol 23 MovieClip {Eheli}Uses:14 6 12 17 20 22Used by:108
Symbol 24 GraphicUsed by:25
Symbol 25 MovieClip {MochiThing}Uses:24Used by:108  Timeline
Symbol 26 GraphicUsed by:27
Symbol 27 MovieClip {MochiBot}Uses:26Used by:Timeline
Symbol 28 BitmapUsed by:29 50
Symbol 29 GraphicUses:28Used by:Timeline
Symbol 30 GraphicUsed by:34 57
Symbol 31 FontUsed by:32 42 45 55 60 63 79 80 81 85 99 100 109 110
Symbol 32 TextUses:31Used by:34
Symbol 33 GraphicUsed by:34 57
Symbol 34 MovieClip {heli_fla.loading_1}Uses:30 32 33Used by:Timeline
Symbol 35 ShapeTweeningUsed by:39
Symbol 36 GraphicUsed by:39
Symbol 37 ShapeTweeningUsed by:39
Symbol 38 GraphicUsed by:39
Symbol 39 MovieClipUses:35 36 37 38Used by:Timeline
Symbol 40 GraphicUsed by:Timeline
Symbol 41 MovieClip {heli_fla.o_5}Uses:17 20 22Used by:44
Symbol 42 TextUses:31Used by:43
Symbol 43 MovieClipUses:42Used by:44
Symbol 44 MovieClip {heli_fla.logoD_4}Uses:41 43Used by:76  Timeline
Symbol 45 TextUses:31Used by:Timeline
Symbol 46 BitmapUsed by:47 61 92
Symbol 47 GraphicUses:46Used by:48
Symbol 48 MovieClipUses:47Used by:108  Timeline
Symbol 49 Sound {TestSong}Used by:Timeline
Symbol 50 GraphicUses:28Used by:76 88  Timeline
Symbol 51 GraphicUsed by:52
Symbol 52 MovieClipUses:51Used by:76 108  Timeline
Symbol 53 GraphicUsed by:54
Symbol 54 MovieClipUses:53Used by:76 108  Timeline
Symbol 55 TextUses:31Used by:56
Symbol 56 MovieClipUses:55Used by:57 108
Symbol 57 MovieClip {heli_fla.arrowkeys_15}Uses:30 56 33Used by:76
Symbol 58 BitmapUsed by:59 64
Symbol 59 GraphicUses:58Used by:76
Symbol 60 TextUses:31Used by:76
Symbol 61 GraphicUses:46Used by:62
Symbol 62 MovieClipUses:61Used by:76 108
Symbol 63 TextUses:31Used by:76
Symbol 64 GraphicUses:58Used by:76 108
Symbol 65 BitmapUsed by:66 92
Symbol 66 GraphicUses:65Used by:67
Symbol 67 MovieClipUses:66Used by:76 108
Symbol 68 GraphicUsed by:69
Symbol 69 MovieClipUses:68Used by:76 108
Symbol 70 GraphicUsed by:71
Symbol 71 MovieClipUses:70Used by:76 108
Symbol 72 GraphicUsed by:73
Symbol 73 MovieClipUses:72Used by:76 108
Symbol 74 GraphicUsed by:75
Symbol 75 MovieClipUses:74Used by:76 108
Symbol 76 MovieClip {heli_fla.gamelevel_12}Uses:50 52 54 57 59 60 44 62 63 64 67 69 71 73 75Used by:108  Timeline
Symbol 77 GraphicUsed by:Timeline
Symbol 78 GraphicUsed by:87
Symbol 79 TextUses:31Used by:87
Symbol 80 TextUses:31Used by:87
Symbol 81 EditableTextUses:31Used by:87
Symbol 82 GraphicUsed by:84 86
Symbol 83 GraphicUsed by:84 108
Symbol 84 MovieClip {heli_fla.fuel_24}Uses:82 83Used by:87 108
Symbol 85 TextUses:31Used by:87
Symbol 86 MovieClipUses:82Used by:87 108
Symbol 87 MovieClip {heli_fla.stats_23}Uses:78 79 80 81 84 85 86Used by:108  Timeline
Symbol 88 MovieClipUses:50Used by:108  Timeline
Symbol 89 MovieClipUsed by:108
Symbol 90 GraphicUsed by:91
Symbol 91 MovieClipUses:90Used by:108
Symbol 92 GraphicUses:46 65Used by:108
Symbol 93 GraphicUsed by:94
Symbol 94 MovieClipUses:93Used by:108
Symbol 95 GraphicUsed by:96
Symbol 96 MovieClip {heli_fla.helicopter_35}Uses:95 6Used by:108
Symbol 97 BitmapUsed by:98
Symbol 98 GraphicUses:97Used by:108
Symbol 99 TextUses:31Used by:101
Symbol 100 TextUses:31Used by:101
Symbol 101 MovieClipUses:99 100Used by:108
Symbol 102 GraphicUsed by:106
Symbol 103 GraphicUsed by:104
Symbol 104 MovieClipUses:103Used by:106
Symbol 105 GraphicUsed by:106
Symbol 106 MovieClipUses:102 104 105Used by:108
Symbol 107 GraphicUses:18 15Used by:108
Symbol 108 MovieClipUses:83 89 88 91 92 67 94 71 54 23 84 86 64 76 13 96 62 98 48 75 25 6 12 69 101 106 87 56 73 52 107Used by:Timeline
Symbol 109 TextUses:31Used by:Timeline
Symbol 110 EditableTextUses:31Used by:Timeline

Instance Names

"heli1"Frame 1Symbol 25 MovieClip {MochiThing}
"JGamesLogo"Frame 2Symbol 48 MovieClip
"gamelevel"Frame 3Symbol 76 MovieClip {heli_fla.gamelevel_12}
"Stats"Frame 4Symbol 87 MovieClip {heli_fla.stats_23}
"bitmap"Frame 5Symbol 88 MovieClip
"upWall2"Frame 5Symbol 52 MovieClip
"downWall2"Frame 5Symbol 54 MovieClip
"leftWall2"Frame 5Symbol 52 MovieClip
"rightWall2"Frame 5Symbol 52 MovieClip
"RankTxt"Frame 5Symbol 110 EditableText
"propeller1"Symbol 13 MovieClip {heli} Frame 1Symbol 6 MovieClip
"propeller"Symbol 13 MovieClip {heli} Frame 1Symbol 12 MovieClip {heli_fla.propeller1_33}
"propeller"Symbol 23 MovieClip {Eheli} Frame 1Symbol 6 MovieClip
"propeller"Symbol 23 MovieClip {Eheli} Frame 1Symbol 12 MovieClip {heli_fla.propeller1_33}
"fire"Symbol 44 MovieClip {heli_fla.logoD_4} Frame 1Symbol 41 MovieClip {heli_fla.o_5}
"upWall1"Symbol 76 MovieClip {heli_fla.gamelevel_12} Frame 1Symbol 52 MovieClip
"downWall1"Symbol 76 MovieClip {heli_fla.gamelevel_12} Frame 1Symbol 54 MovieClip
"Jgames"Symbol 76 MovieClip {heli_fla.gamelevel_12} Frame 1Symbol 62 MovieClip
"cloudMap"Symbol 76 MovieClip {heli_fla.gamelevel_12} Frame 2Symbol 67 MovieClip
"rightWall"Symbol 76 MovieClip {heli_fla.gamelevel_12} Frame 2Symbol 69 MovieClip
"downWall"Symbol 76 MovieClip {heli_fla.gamelevel_12} Frame 2Symbol 71 MovieClip
"upWall"Symbol 76 MovieClip {heli_fla.gamelevel_12} Frame 2Symbol 73 MovieClip
"leftWall"Symbol 76 MovieClip {heli_fla.gamelevel_12} Frame 2Symbol 75 MovieClip
"HcounterTxt"Symbol 87 MovieClip {heli_fla.stats_23} Frame 1Symbol 81 EditableText
"Fuel"Symbol 87 MovieClip {heli_fla.stats_23} Frame 1Symbol 84 MovieClip {heli_fla.fuel_24}
"propeller"Symbol 96 MovieClip {heli_fla.helicopter_35} Frame 1Symbol 6 MovieClip

Special Tags

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

Labels

"Menu"Frame 3
"Game"Frame 4
"GameOver"Frame 5




http://swfchan.com/14/65507/info.shtml
Created: 12/4 -2019 13:32:19 Last modified: 12/4 -2019 13:32:19 Server time: 23/12 -2024 00:39:08