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

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

Plunk Pool 2.swf

This is the info page for
Flash #75122

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


Text
SKIP

SKIP

2Games.com - the latest Online and Multiplayer Games

Casual Games for Hardcore Gamers

Skip >

Skip >

Skip >

Click here to visit headmeatgames.com

Click here to visit headmeatgames.com

Click here to visit headmeatgames.com

Head

Meat

Games

Produced By:

www.headmeatgames.com

ActionScript [AS3]

Section 1
//BrandingManager (com.Branding.BrandingManager) package com.Branding { import flash.display.*; import flash.utils.*; import flash.net.*; import flash.external.*; public class BrandingManager { public static var defaultSponsorKey:String = ""; public static var sponsorPackages:Dictionary = new Dictionary(); public static var currentSponsorKey:String = ""; public static function navigateToURL(_arg1, _arg2:String="_self"):void{ var _local3:URLRequest; var _local4:String; _local3 = ((_arg1 is String)) ? new URLRequest(_arg1) : _arg1; if (!ExternalInterface.available){ navigateToURL(_local3, _arg2); } else { _local4 = String(ExternalInterface.call("function() {return navigator.userAgent;}")).toLowerCase(); if (((!((_local4.indexOf("firefox") == -1))) || (((!((_local4.indexOf("msie") == -1))) && ((uint(_local4.substr((_local4.indexOf("msie") + 5), 3)) >= 7)))))){ ExternalInterface.call("window.open", _local3.url, _arg2); } else { navigateToURL(_local3, _arg2); }; }; } public static function SetDefaultSponsorKey(_arg1:String):void{ defaultSponsorKey = _arg1; } public static function GetCurrentSponsorMaterial(_arg1:DisplayObjectContainer, _arg2:String):DisplayObject{ var _local3:DisplayObject; _local3 = sponsorPackages[currentSponsorKey].materials[_arg2]; if (((!((_local3 == null))) && (!((_arg1 == null))))){ _arg1.addChild(_local3); }; return (_local3); } public static function SetCurrentSponsor(_arg1:String):void{ var _local2:Object; var _local3:RegExp; currentSponsorKey = ""; for each (_local2 in sponsorPackages) { _local3 = _local2.regex; if (_arg1.search(_local3) == 0){ currentSponsorKey = _local2.sponsorKey; }; }; if (currentSponsorKey == ""){ currentSponsorKey = defaultSponsorKey; }; } public static function AddSponsorKey(_arg1:String, _arg2:RegExp, _arg3:Boolean):void{ var _local4:Dictionary; _local4 = new Dictionary(); sponsorPackages[_arg1] = {sponsorKey:_arg1, regex:_arg2, allowAds:_arg3, materials:_local4}; } public static function AddSponsorMaterials(_arg1:String, _arg2:String, _arg3:Object):void{ sponsorPackages[_arg1].materials[_arg2] = _arg3; } public static function GetCurrentSponsorAllowAds():Boolean{ return (sponsorPackages[currentSponsorKey].allowAds); } } }//package com.Branding
Section 2
//AdLoader (com.CPMStar.AdLoader) package com.CPMStar { import flash.events.*; import flash.display.*; import flash.system.*; import flash.net.*; public class AdLoader { private static var cpmstarLoader:Loader; public static function initComplete(_arg1:Event):void{ trace((("INIT COMPLETE(" + _arg1.toString()) + ")")); } public static function LoadAd(_arg1:int, _arg2:int):DisplayObject{ var _local3:String; Security.allowDomain("server.cpmstar.com"); _local3 = "http://server.cpmstar.com/adviewas3.swf"; cpmstarLoader = new Loader(); cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, initComplete); cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); cpmstarLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, AdLoader.loadIOError); cpmstarLoader.load(new URLRequest(((((_local3 + "?poolid=") + _arg1) + "&subpoolid=") + _arg2))); return (cpmstarLoader); } public static function loadIOError(_arg1:IOErrorEvent):void{ trace((("ERROR(" + _arg1.text) + ")")); } public static function LoadUnsponsoredAd(_arg1:String):DisplayObject{ var _local2:String; Security.allowDomain("server.cpmstar.com"); _local2 = "http://server.cpmstar.com/adviewas3.swf"; cpmstarLoader = new Loader(); cpmstarLoader.contentLoaderInfo.addEventListener(Event.INIT, initComplete); cpmstarLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); cpmstarLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, AdLoader.loadIOError); cpmstarLoader.load(new URLRequest(((_local2 + "?contentspotid=") + _arg1))); return (cpmstarLoader); } public static function loadComplete(_arg1:Event):void{ trace((("LOAD COMPLETE(" + _arg1.toString()) + ")")); } } }//package com.CPMStar
Section 3
//GameEngineController (com.GameEngine.Controllers.GameEngineController) package com.GameEngine.Controllers { import flash.events.*; import flash.utils.*; import com.GameEngine.Utils.*; public class GameEngineController { public var _renderTrigger:Boolean;// = false public var _renderPump:Timer; public var _gameStatePump:Timer; public var _messagePump:Timer; public var _gameStateTrigger:Boolean;// = false public var _desiredMessagePumpFrameRate:Number;// = 1000 public var _desiredRenderFrameRate:Number; public var _messagesTick:Tick; public var _desiredGameStateFrameRate:Number; public var _renderTick:Tick; public var _gameStateTick:Tick; public function GameEngineController(_arg1:Function, _arg2:Number=60, _arg3:Number=60){ _desiredMessagePumpFrameRate = 1000; _renderTrigger = false; _gameStateTrigger = false; _renderTick = new Tick(); _gameStateTick = new Tick(); _messagesTick = new Tick(); super(); this._desiredGameStateFrameRate = _arg3; this._desiredRenderFrameRate = _arg2; this._messagePump = new Timer((1000 / _desiredMessagePumpFrameRate)); this._messagePump.addEventListener(TimerEvent.TIMER, _arg1, false, int.MAX_VALUE); this._messagePump.addEventListener(TimerEvent.TIMER, onMessagePump); this._renderPump = new Timer((1000 / _desiredRenderFrameRate)); this._renderPump.addEventListener(TimerEvent.TIMER, onRenderPump); this._gameStatePump = new Timer((1000 / _desiredGameStateFrameRate)); this._gameStatePump.addEventListener(TimerEvent.TIMER, onGameStatePump); } public function StopGameEngine():void{ this._messagePump.stop(); this._renderPump.stop(); this._gameStatePump.stop(); } private function onRenderPump(_arg1:TimerEvent):void{ _renderTick.getFtime(); _renderTrigger = true; } private function onGameStatePump(_arg1:TimerEvent):void{ _gameStateTick.getFtime(); _gameStateTrigger = true; } public function StartGameEngine():void{ this._gameStateTick.Reset(); this._renderTick.Reset(); this._messagesTick.Reset(); this._messagePump.start(); this._renderPump.start(); this._gameStatePump.start(); } private function onMessagePump(_arg1:TimerEvent):void{ _messagesTick.getFtime(); _gameStateTrigger = false; _renderTrigger = false; } } }//package com.GameEngine.Controllers
Section 4
//PhysicsEngineController (com.GameEngine.Controllers.PhysicsEngineController) package com.GameEngine.Controllers { import com.GameEngine.Entities.*; import com.GameEngine.Utils.*; import flash.geom.*; public class PhysicsEngineController { public static const EPSILONHALF:Number = 0.01; public static const EPSILON:Number = 0.02; public static function movingToPoint(_arg1:Ball, _arg2:Point):Boolean{ return (((((_arg2.x - _arg1.x) * _arg1._vx) + ((_arg2.y - _arg1.y) * _arg1._vy)) > 0)); } public static function movingToBall(_arg1:Ball, _arg2:Ball):Boolean{ return (((((_arg2.x - _arg1.x) * (_arg1._vx - _arg2._vx)) + ((_arg2.y - _arg1.y) * (_arg1._vy - _arg2._vy))) > 0)); } public static function timeToCollision(_arg1:Number, _arg2:Array, _arg3:Array, _arg4:Array, _arg5:Array):Number{ var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:int; var _local13:int; var _local14:Ball; var _local15:Ball; var _local16:Ball; var _local17:Number; var _local18:Number; var _local19:int; var _local20:Point; var _local21:Point; var _local22:Bumper; var _local23:Goal; var _local24:Block; _local6 = _arg1; _local16 = null; _local12 = (_arg2.length - 1); while (_local12 >= 0) { _local14 = _arg2[_local12]; if (_local14._velocity == 0){ } else { _local13 = (_arg2.length - 1); while (_local13 >= 0) { _local15 = _arg2[_local13]; if (((!((_local14 == _local15))) && (movingToBall(_local14, _local15)))){ _local17 = PhysicsEngineController.ballTimeToCollide(_local14.x, _local14.y, _local14._radius, _local14._vx, _local14._vy, _local15.x, _local15.y, _local15._radius, _local15._vx, _local15._vy); if (_local17 < _local6){ _local6 = _local17; if (_local16 != null){ _local16._collidedObj = null; }; _local14._collidedObj = _local15; _local16 = _local14; }; }; _local13--; }; _local13 = (_arg3.length - 1); while (_local13 >= 0) { _local24 = _arg3[_local13]; _local19 = (_local24._lines.length - 1); for (;_local19 >= 0;_local19--) { _local20 = _local24._lines[_local19].p1; _local21 = _local24._lines[_local19].p2; if (movingToLine(_local14, _local20, _local21)){ _local18 = _local14.DistToLineCollision(_local20, _local21); _local17 = (_local18 / _local14._velocity); //unresolved if _local6 = _local17; if (_local16 != null){ _local16._collidedObj = null; }; _local14._collidedObj = _local24._lines[_local19]; _local14._collidedObj.block = _local24; _local16 = _local14; } else { if (PhysicsEngineController.movingToPoint(_local14, _local21)){ _local17 = PhysicsEngineController.ballTimeToCollide(_local14.x, _local14.y, _local14._radius, _local14._vx, _local14._vy, _local21.x, _local21.y, 0, 0, 0); if (_local17 < _local6){ _local6 = _local17; if (_local16 != null){ _local16._collidedObj = null; }; _local14._collidedObj = _local21; _local16 = _local14; continue; }; }; }; }; _local13--; }; _local13 = (_arg4.length - 1); for (;_local13 >= 0;_local13--) { _local22 = (_arg4[_local13] as Bumper); _local21 = new Point(_local22.x, _local22.y); if (PhysicsEngineController.movingToPoint(_local14, _local21)){ _local17 = PhysicsEngineController.ballTimeToCollide(_local14.x, _local14.y, _local14._radius, _local14._vx, _local14._vy, _local22.x, _local22.y, _local22._radius, 0, 0); if (_local17 < _local6){ _local6 = _local17; if (_local16 != null){ _local16._collidedObj = null; }; _local14._collidedObj = _local22; _local16 = _local14; continue; }; }; }; _local13 = (_arg5.length - 1); for (;_local13 >= 0;_local13--) { _local23 = (_arg5[_local13] as Goal); _local21 = new Point(_local23.x, _local23.y); if (((PhysicsEngineController.movingToPoint(_local14, _local21)) && (((_local23._radius - _local14._radius) > 0)))){ _local17 = PhysicsEngineController.ballTimeToCollide(_local14.x, _local14.y, _local14._radius, _local14._vx, _local14._vy, _local23.x, _local23.y, (_local23._radius - _local14._radius), 0, 0); if (_local17 < _local6){ _local6 = _local17; if (_local16 != null){ _local16._collidedObj = null; }; _local14._collidedObj = _local23; _local16 = _local14; continue; }; }; }; }; _local12--; }; return (_local6); } public static function movingToObject(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number):Boolean{ return (((((_arg5 - _arg1) * (_arg3 - _arg7)) + ((_arg6 - _arg2) * (_arg4 - _arg8))) > 0)); } private static function ballTimeToCollide(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number=0, _arg10:Number=0):Number{ var _local11:Number; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; var _local17:Number; var _local18:Number; var _local19:Number; var _local20:Number; var _local21:Number; var _local22:Number; _local11 = Number.MAX_VALUE; _local12 = ((((((_arg4 * _arg4) + (_arg5 * _arg5)) - ((2 * _arg4) * _arg9)) + (_arg9 * _arg9)) - ((2 * _arg5) * _arg10)) + (_arg10 * _arg10)); _local13 = ((((((((-(_arg1) * _arg4) - (_arg2 * _arg5)) + (_arg4 * _arg6)) + (_arg5 * _arg7)) + (_arg1 * _arg9)) - (_arg6 * _arg9)) + (_arg2 * _arg10)) - (_arg7 * _arg10)); _local14 = ((((((_arg4 * _arg4) + (_arg5 * _arg5)) - ((2 * _arg4) * _arg9)) + (_arg9 * _arg9)) - ((2 * _arg5) * _arg10)) + (_arg10 * _arg10)); _local15 = (((((((((_arg1 * _arg1) + (_arg2 * _arg2)) - (_arg3 * _arg3)) - ((2 * _arg1) * _arg6)) + (_arg6 * _arg6)) - ((2 * _arg2) * _arg7)) + (_arg7 * _arg7)) - ((2 * _arg3) * _arg8)) - (_arg8 * _arg8)); _local17 = (((((((((_arg1 * _arg1) + (_arg2 * _arg2)) - ((_arg3 + PhysicsEngineController.EPSILONHALF) * (_arg3 + PhysicsEngineController.EPSILONHALF))) - ((2 * _arg1) * _arg6)) + (_arg6 * _arg6)) - ((2 * _arg2) * _arg7)) + (_arg7 * _arg7)) - ((2 * (_arg3 + PhysicsEngineController.EPSILONHALF)) * (_arg8 + PhysicsEngineController.EPSILONHALF))) - ((_arg8 + PhysicsEngineController.EPSILONHALF) * (_arg8 + PhysicsEngineController.EPSILONHALF))); _local16 = (((-2 * _local13) * (-2 * _local13)) - ((4 * _local14) * _local15)); _local18 = (((-2 * _local13) * (-2 * _local13)) - ((4 * _local14) * _local17)); if (_local16 >= 0){ if (_local12 == 0){ trace("ERROR!"); } else { _local19 = ((0.5 * ((2 * _local13) - Math.sqrt(_local16))) / _local12); _local20 = ((0.5 * ((2 * _local13) + Math.sqrt(_local16))) / _local12); if (_local19 <= 0){ _local19 = _local20; } else { if (_local20 <= 0){ _local20 = _local19; }; }; _local11 = Math.min(_local19, _local20); }; }; if (_local18 >= 0){ if (_local12 == 0){ trace("ERROR!"); } else { _local21 = ((0.5 * ((2 * _local13) - Math.sqrt(_local18))) / _local12); _local22 = ((0.5 * ((2 * _local13) + Math.sqrt(_local18))) / _local12); if (_local21 <= 0){ _local21 = _local22; } else { if (_local22 <= 0){ _local22 = _local21; }; }; _local11 = Math.min(_local11, _local21, _local22); _local11 = ((Math.min(_local11, _local21, _local22))==0) ? _local11 : Math.min(_local11, _local21, _local22); }; }; if (_local11 < 0){ trace((((((((((((((((("t(" + _local11) + ")...WTF! b1(") + _arg1) + ",") + _arg2) + ",") + _arg3) + ") b2(") + _arg6) + ",") + _arg7) + ",") + _arg8) + ") abs(") + Geometry.GetDistanceToPoint(_arg1, _arg2, _arg6, _arg7)) + ")")); }; if (_local11 == 0){ trace("t == 0!"); }; return (_local11); } public static function movingToGoal(_arg1:Ball, _arg2:Goal):Boolean{ return (((((_arg2.x - _arg1.x) * _arg1._vx) + ((_arg2.y - _arg1.y) * _arg1._vy)) > 0)); } public static function movingToLine(_arg1:Ball, _arg2:Point, _arg3:Point):Boolean{ var _local4:Vector; var _local5:Vector; var _local6:Number; _local4 = Vector.fromPoints(_arg2.x, _arg2.y, _arg1.x, _arg1.y).ProjectOntoInPlace(Vector.fromPoints(_arg2.x, _arg2.y, _arg3.x, _arg3.y)); _local5 = Vector.fromPoints(_arg1.x, _arg1.y, (_arg2.x + _local4.x), (_arg2.y + _local4.y)); _local6 = (_local5.AngleBetween(_arg1.Velocity) * Geometry.RADIANSTODEGREES); if ((((((_arg1._velocity == 0)) || ((_local6 > 90)))) || ((_local6 < -90)))){ return (false); }; return (true); } public static function collide(_arg1:Ball, _arg2:Ball):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; _local3 = ((_arg1.x - _arg2.x) / (_arg1._radius + _arg2._radius)); _local4 = ((_arg1.y - _arg2.y) / (_arg1._radius + _arg2._radius)); _local5 = ((_arg1._vx * _local3) + (_arg1._vy * _local4)); _local6 = ((_arg2._vx * _local3) + (_arg2._vy * _local4)); _local7 = ((2 * (_local5 - _local6)) / (_arg1._mass + _arg2._mass)); _local8 = ((_arg1._bounce + _arg2._bounce) * 0.5); _local9 = ((_arg1._vx - ((_local7 * _local3) * _arg2._mass)) * _local8); _local10 = ((_arg1._vy - ((_local7 * _local4) * _arg2._mass)) * _local8); _local11 = ((_arg2._vx + ((_local7 * _local3) * _arg1._mass)) * _local8); _local12 = ((_arg2._vy + ((_local7 * _local4) * _arg1._mass)) * _local8); _arg1.Velocity = new Vector(_local9, _local10); _arg2.Velocity = new Vector(_local11, _local12); } } }//package com.GameEngine.Controllers
Section 5
//SoundController (com.GameEngine.Controllers.SoundController) package com.GameEngine.Controllers { import flash.media.*; public class SoundController { private static var _music1:Sound = new ResourceManager.BackgroundMusic1(); private static var _cheer:Sound = new ResourceManager.CheerSound(); private static var _ballPocket:Sound = new ResourceManager.PoolPocketSound(); private static var _ballHit:Sound = new ResourceManager.PoolBallHitSound(); public static var _globalSoundMusicTransform:SoundTransform = new SoundTransform(0.5); private static var _shortMurmur:Sound = new ResourceManager.ShortMurmurSound(); private static var _buzzer:Sound = new ResourceManager.BuzzerSound(); private static var _shortCheer1:Sound = new ResourceManager.ShortCheer1Sound(); private static var _shortCheer3:Sound = new ResourceManager.ShortCheer3Sound(); private static var _shortCheer2:Sound = new ResourceManager.ShortCheer2Sound(); public static var _globalSoundEffectTransform:SoundTransform = new SoundTransform(0.75); private static var _ballBump:Sound = new ResourceManager.PoolBallBumpSound(); public static var _musicChannel:SoundChannel; public static var _globalSoundTransform:SoundTransform = new SoundTransform(0.5); public static function playBallHit(_arg1:Number=1):SoundChannel{ return (_ballHit.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume)))); } public static function playShortMurmur(_arg1:Number=1):SoundChannel{ return (_shortMurmur.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume)))); } public static function playBallPocket(_arg1:Number=1):SoundChannel{ return (_ballPocket.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume)))); } public static function playShortCheer1(_arg1:Number=1):SoundChannel{ return (_shortCheer1.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume)))); } public static function playShortCheer2(_arg1:Number=1):SoundChannel{ return (_shortCheer2.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume)))); } public static function startBackgroundMusic(_arg1:Number=1):SoundChannel{ _musicChannel = _music1.play(0, 99999, new SoundTransform(_arg1)); return (_musicChannel); } public static function playShortCheer3(_arg1:Number=1):SoundChannel{ return (_shortCheer3.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume)))); } public static function playBuzzer(_arg1:Number=1):SoundChannel{ return (_buzzer.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume)))); } public static function playBallBump(_arg1:Number=1):SoundChannel{ return (_ballBump.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume)))); } public static function playCheer(_arg1:Number=1):SoundChannel{ return (_cheer.play(0, 0, new SoundTransform(Math.min(_arg1, _globalSoundEffectTransform.volume)))); } } }//package com.GameEngine.Controllers
Section 6
//Ball (com.GameEngine.Entities.Ball) package com.GameEngine.Entities { import flash.display.*; import com.GameEngine.Utils.*; import flash.geom.*; import com.GameEngine.Controllers.*; import flash.filters.*; public dynamic class Ball extends Sprite { public var _texture:Bitmap; public var _ricochetCount:int;// = 0 public var _underTexture:Bitmap; public var _isExplosive:Boolean;// = false public var _integrityTotal:Number;// = 0 public var _velocity:Number; public var _ballSprite:Sprite; public var _collided:Boolean; public var _isGravity:Boolean;// = false public var _alpha:Number; public var _vector:Vector; public var _color:uint; public var _vx:Number; public var _vy:Number; public var _collidedObj:Object;// = null public var _bounce:Number; public var _isImmobile:Boolean;// = false public var _radius:Number; public var _mask:Sprite; public var _mass:Number; public var _moveDelta:Number; public var _integrityCurrent:Number;// = 1 public var _x:Number; public var _y:Number; public function Ball(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Bitmap){ var _local7:Array; var _local8:Sprite; var _local9:Graphics; var _local10:Number; _collidedObj = null; _integrityTotal = 0; _integrityCurrent = 1; _ricochetCount = 0; _isImmobile = false; _isExplosive = false; _isGravity = false; super(); _radius = _arg1; this.Velocity = new Vector(_arg2, _arg3); _mass = _arg4; _alpha = alpha; _bounce = _arg5; this._collided = false; this.graphics.beginFill(0, (_alpha * 0.25)); this.graphics.drawEllipse((-(_radius) * 1.3), (-(_radius) * 0.4), (_radius * 2), (_radius * 1.4)); this.graphics.endFill(); _ballSprite = new Sprite(); addChild(_ballSprite); this._integrityTotal = 9999999; this._integrityCurrent = this._integrityTotal; _mask = new Sprite(); _mask.graphics.beginFill(0xFFFFFF, 1); _mask.graphics.drawCircle(0, 0, _radius); _mask.graphics.endFill(); _mask.graphics.beginFill(0xFFFFFF, 1); _mask.graphics.drawRect((-(_radius) - 2), 0, 0, 0); _mask.graphics.drawRect((_radius + 2), 0, 0, 0); _mask.graphics.drawRect(0, (-(_radius) - 2), 0, 0); _mask.graphics.drawRect(0, (_radius + 2), 0, 0); _mask.graphics.endFill(); _ballSprite.addChild(_mask); _ballSprite.mask = _mask; this.Texture = _arg6; _local7 = _ballSprite.filters; _local7.push(new DropShadowFilter((_radius * 0.5), -45, 0, 1, _radius, _radius, 1, 1, true)); _ballSprite.filters = _local7; _local8 = new Sprite(); _local9 = _local8.graphics; _local10 = 0.05; while (_local10 < 0.35) { _local9.beginFill(0xFFFFFF, 0.03); _local9.drawCircle((_radius * 0.5), (-(_radius) * 0.5), (_radius * _local10)); _local9.endFill(); _local10 = (_local10 + 0.01); }; _local8.cacheAsBitmap = true; _ballSprite.addChild(_local8); this.cacheAsBitmap = true; } public function Move(_arg1:Number=1):void{ var _local2:Number; var _local3:Number; _local2 = (this._vx * _arg1); _local3 = (this._vy * _arg1); if ((((_local2 == 0)) && ((_local3 == 0)))){ } else { this.x = (this.x + _local2); this.y = (this.y + _local3); this._texture.x = (this._texture.x + (_local2 % _radius)); this._texture.y = (this._texture.y + (_local3 % _radius)); if (_texture.x > -(_radius)){ _texture.x = (_texture.x - (_texture.width * 0.5)); } else { if (_texture.x < -((_texture.width - _radius))){ _texture.x = (_texture.x + (_texture.width * 0.5)); }; }; if (_texture.y > -(_radius)){ _texture.y = (_texture.y - (_texture.height * 0.5)); } else { if (_texture.y < -((_texture.height - _radius))){ _texture.y = (_texture.y + (_texture.height * 0.5)); }; }; }; } public function set Velocity(_arg1:Vector):void{ _velocity = _arg1.length; if (_velocity > LevelData.MAXVELOCITY){ _velocity = LevelData.MAXVELOCITY; }; _vector = _arg1.Normalize(); _vx = (_vector.x * _velocity); _vy = (_vector.y * _velocity); } public function get Texture():Bitmap{ return (new Bitmap(_texture.bitmapData)); } public function get Velocity():Vector{ return (new Vector(_vx, _vy)); } public function DistToLineCollision(_arg1:Point, _arg2:Point):Number{ var _local3:Number; var _local4:Point; var _local5:Vector; var _local6:Number; var _local7:Vector; var _local8:Point; var _local9:Vector; var _local10:Point; var _local11:Point; var _local12:Number; var _local13:Boolean; var _local14:Vector; var _local15:Number; var _local16:Number; var _local17:Number; _local3 = Number.MAX_VALUE; _local4 = new Point(this.x, this.y); _local5 = this.Velocity; _local6 = (this._radius + PhysicsEngineController.EPSILONHALF); _local7 = Vector.fromPoints(_arg1.x, _arg1.y, _local4.x, _local4.y).ProjectOntoInPlace(Vector.fromPoints(_arg1.x, _arg1.y, _arg2.x, _arg2.y)); _local8 = new Point((_arg1.x + _local7.x), (_arg1.y + _local7.y)); _local9 = Vector.fromPoints(_local4.x, _local4.y, _local8.x, _local8.y); _local9.NormalizeInPlace().MultiplyInPlace(_local6); _local10 = new Point((_local4.x + _local9.x), (_local4.y + _local9.y)); _local11 = new Point((_local10.x + _local5.x), (_local10.y + _local5.y)); _local12 = (_local9.AngleBetween(_local5) * Geometry.RADIANSTODEGREES); _local13 = Geometry.intersection(_local10, _local11, _arg1, _arg2); if (_local13){ _local14 = Vector.fromPoints(_local10.x, _local10.y, _local8.x, _local8.y); _local15 = _local5.AngleBetween(_local14); _local16 = Math.cos(_local15); _local17 = (_local16 * Geometry.RADIANSTODEGREES); if (_local16 == 0){ _local3 = _local14.length; } else { _local3 = (_local14.length / _local16); }; if (_local3 < PhysicsEngineController.EPSILON){ _local3 = 0; }; }; return (_local3); } public function RedirectFromPoint(_arg1:Point, _arg2:Number):void{ var _local3:Point; var _local4:Number; var _local5:Vector; var _local6:Vector; var _local7:Vector; var _local8:Point; var _local9:Point; var _local10:Point; var _local11:Point; _local3 = new Point(this.x, this.y); _local4 = this._radius; _local5 = this.Velocity; _local6 = Vector.fromPoints(_local3.x, _local3.y, _arg1.x, _arg1.y); _local7 = _local6.Normalize(); _local8 = _local3.add(_local7.Multiply(_local4).ToPoint()); _local9 = _local8.add(_local5.ToPoint()); _local10 = _arg1.add(_local7.NormalLH().Multiply(_local4).ToPoint()); _local11 = _arg1.add(_local7.NormalRH().Multiply(_local4).ToPoint()); RedirectFromLine(_local10, _local11, 1, _arg2); } override public function get x():Number{ return (_x); } override public function get y():Number{ return (_y); } public function DistToPointCollision(_arg1:Point, _arg2:Number=0):Number{ var _local3:Number; var _local4:Point; var _local5:Number; var _local6:Vector; var _local7:Vector; var _local8:Vector; var _local9:Point; var _local10:Point; var _local11:Point; var _local12:Point; var _local13:Boolean; var _local14:Vector; var _local15:Number; _local3 = Number.MAX_VALUE; _local4 = new Point(this.x, this.y); _local5 = (this._radius + PhysicsEngineController.EPSILONHALF); _local6 = this.Velocity; _local7 = Vector.fromPoints(_local4.x, _local4.y, _arg1.x, _arg1.y); _local8 = _local7.Normalize(); _local9 = _local4.add(_local8.Multiply(_local5).ToPoint()); _local10 = _local9.add(_local6.ToPoint()); _local11 = _arg1.add(_local8.NormalLH().Multiply(_local5).ToPoint()); _local12 = _arg1.add(_local8.NormalRH().Multiply(_local5).ToPoint()); _local13 = Geometry.intersection(_local9, _local10, _local11, _local12); if (_local13){ _local14 = Vector.fromPoints(_local9.x, _local9.y, _arg1.x, _arg1.y); _local15 = _local6.AngleBetween(_local14); _local3 = (_local14.length / Math.cos(_local15)); }; if (_local3 < PhysicsEngineController.EPSILON){ _local3 = 0; }; return (_local3); } public function RedirectFromLine(_arg1:Point, _arg2:Point, _arg3:Number, _arg4:Number):void{ var _local5:Vector; var _local6:Vector; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Vector; var _local11:Vector; var _local12:Number; var _local13:Number; var _local14:Number; var _local15:Number; var _local16:Number; _local5 = Vector.fromPoints(_arg1.x, _arg1.y, _arg2.x, _arg2.y); _local6 = _local5.Normalize(); _local7 = -(_local6.y); _local8 = _local6.x; _local9 = DistToLineCollision(_arg1, _arg2); _local10 = Velocity.Normalize().Multiply((_local9 + _radius)); _local11 = _local10.ProjectOnto(_local5); _local12 = ((-(_vx) * _local7) + (-(_vy) * _local8)); _local13 = (_local12 * _local7); _local14 = (_local12 * _local8); _arg3 = ((_arg3 + this._bounce) * 0.5); _local15 = (((2 * _local13) + _vx) * _arg3); _local16 = (((2 * _local14) + _vy) * _arg3); this.Velocity = new Vector(_local15, _local16); } override public function set x(_arg1:Number):void{ _x = _arg1; super.x = _x; } public function MoveTexture(_arg1:Number, _arg2:Number):void{ this._texture.x = (this._texture.x + (_arg1 % _radius)); this._texture.y = (this._texture.y + (_arg2 % _radius)); if (_texture.x > -(_radius)){ _texture.x = (_texture.x - (_texture.width * 0.5)); } else { if (_texture.x < -((_texture.width - _radius))){ _texture.x = (_texture.x + (_texture.width * 0.5)); }; }; if (_texture.y > -(_radius)){ _texture.y = (_texture.y - (_texture.height * 0.5)); } else { if (_texture.y < -((_texture.height - _radius))){ _texture.y = (_texture.y + (_texture.height * 0.5)); }; }; } override public function set y(_arg1:Number):void{ _y = _arg1; super.y = _y; } public function set Texture(_arg1:Bitmap):void{ var _local2:Matrix; if (((!((_texture == null))) && (this.contains(_texture)))){ this.removeChild(_texture); this.removeChild(_underTexture); }; if (_arg1 != null){ _texture = new Bitmap(_arg1.bitmapData.clone()); _texture.alpha = 1; _texture.width = ((2 * this._radius) * Math.PI); _texture.height = ((2 * this._radius) * Math.PI); _texture.x = (-(_texture.width) * 0.5); _texture.y = (-(_texture.height) * 0.5); _ballSprite.addChildAt(_texture, 0); _local2 = _arg1.transform.matrix; _local2.a = -1; _local2.tx = (_arg1.width + _arg1.x); _arg1.transform.matrix = _local2; }; } public static function MakeCueBall(_arg1:Number=10, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):Ball{ var _local6:Ball; _local6 = new Ball(_arg1, _arg2, _arg3, (_arg1 * 1.1), 1, new ResourceManager.SmileyFaceTexture()); _local6.x = _arg4; _local6.y = _arg5; return (_local6); } public static function MakeNormalBounceBall(_arg1:Number=10, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):Ball{ var _local6:Ball; _local6 = new Ball(_arg1, _arg2, _arg3, _arg1, 0.75, new ResourceManager.PoolballBlueTexture()); _local6.x = _arg4; _local6.y = _arg5; return (_local6); } public static function MakeSuperBounceBall(_arg1:Number=10, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):Ball{ var _local6:Ball; _local6 = new Ball(_arg1, _arg2, _arg3, _arg1, 1.25, new ResourceManager.PoolballRedTexture()); _local6.x = _arg4; _local6.y = _arg5; return (_local6); } public static function MakePerfectBounceBall(_arg1:Number=10, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0):Ball{ var _local6:Ball; _local6 = new Ball(_arg1, _arg2, _arg3, _arg1, 1, new ResourceManager.PoolballPurpleTexture()); _local6.x = _arg4; _local6.y = _arg5; return (_local6); } } }//package com.GameEngine.Entities
Section 7
//Block (com.GameEngine.Entities.Block) package com.GameEngine.Entities { import flash.display.*; import mx.effects.*; import com.GameEngine.Utils.*; import flash.geom.*; import flash.filters.*; public class Block extends Sprite { public var _lines:Array; private var _fillAlpha:Number; private var _collideGlow:Sprite; private var _fillColor:uint; private var _lineColor:uint; private var _lineAlpha:Number; public var onTweenEnd:Function; private var _height:Number; public var showCollide:Function; private var _collideTween:Tween; public var onTweenUpdate:Function; private var _width:Number; private var _bounce:Number; private var _mass:Number; public var _sprite:Sprite; public function Block(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Number, _arg5:uint, _arg6:Number, _arg7:Array){ var _local8:Point; var _local9:Point; var _local10:Line; var _local11:int; var _local12:int; showCollide = function ():void{ if (_collideTween != null){ _collideTween.endTween(); }; _collideGlow.visible = true; _collideGlow.alpha = 1; _collideTween = new Tween(this, 1, 0, 750); }; onTweenUpdate = function (_arg1:Number):void{ _collideGlow.alpha = _arg1; }; onTweenEnd = function (_arg1:Number):void{ _collideGlow.visible = false; _collideGlow.alpha = 1; _collideTween = null; }; _mass = _arg1; _bounce = _arg2; _fillColor = _arg5; _fillAlpha = _arg6; _lineColor = _arg3; _lineAlpha = _arg4; _lines = new Array(); _arg7.reverse(); _local8 = _arg7.pop(); _local9 = _arg7.pop(); _arg7.reverse(); _local10 = new Line(_local8, _local9, _bounce); _lines.push(_local10); _local11 = _arg7.length; if (((!((_arg7 == null))) && ((_local11 > 0)))){ _local12 = 0; _local10 = new Line(_local9, _arg7[_local12], _bounce); _lines.push(_local10); _local12 = 1; while (_local12 < _local11) { _local10 = new Line(_arg7[(_local12 - 1)], _arg7[_local12], _bounce); _lines.push(_local10); _local12++; }; _local10 = new Line(_arg7[(_local12 - 1)], _local8, _bounce); _lines.push(_local10); }; _collideGlow = this._drawGlowSprite(); _collideGlow.visible = false; addChild(_collideGlow); _sprite = this._drawSprite(); addChild(_sprite); super(); } public function _drawGlowSprite():Sprite{ var _local1:Sprite; var _local2:Graphics; var _local3:Line; var _local4:Number; var _local5:Number; var _local6:Line; var _local7:Array; _local1 = new Sprite(); _local2 = _local1.graphics; _local4 = Number.MAX_VALUE; _local5 = Number.MAX_VALUE; for each (_local3 in _lines) { _local4 = Math.min(_local4, _local3.p1.x, _local3.p2.x); _local5 = Math.min(_local5, _local3.p1.y, _local3.p2.y); }; _local2.clear(); _local2.lineStyle(1, this._lineColor, _lineAlpha); _local6 = _lines[0].Offset(-(_local4), -(_local5)); _local2.moveTo(_local6.p1.x, _local6.p1.y); for each (_local3 in _lines) { _local6 = _local3.Offset(-(_local4), -(_local5)); _local2.lineTo(_local6.p2.x, _local6.p2.y); }; _local2.endFill(); _local1.x = _local4; _local1.y = _local5; _local7 = _local1.filters; _local7.push(new GlowFilter(_lineColor, 1, 10, 10, 4, 1, false, true)); _local1.filters = _local7; return (_local1); } override public function get x():Number{ return (_sprite.x); } override public function get y():Number{ return (_sprite.y); } public function _drawSprite():Sprite{ var _local1:Sprite; var _local2:Graphics; var _local3:Line; var _local4:Number; var _local5:Number; var _local6:Line; var _local7:Array; _local1 = new Sprite(); _local2 = _local1.graphics; _local4 = Number.MAX_VALUE; _local5 = Number.MAX_VALUE; for each (_local3 in _lines) { _local4 = Math.min(_local4, _local3.p1.x, _local3.p2.x); _local5 = Math.min(_local5, _local3.p1.y, _local3.p2.y); }; _local2.clear(); _local2.beginFill(_fillColor, _fillAlpha); _local2.lineStyle(1, this._lineColor, _lineAlpha); _local6 = _lines[0].Offset(-(_local4), -(_local5)); _local2.moveTo(_local6.p1.x, _local6.p1.y); for each (_local3 in _lines) { _local6 = _local3.Offset(-(_local4), -(_local5)); _local2.lineTo(_local6.p2.x, _local6.p2.y); }; _local2.endFill(); _local1.x = _local4; _local1.y = _local5; _local7 = _local1.filters; _local7.push(new GradientGlowFilter(0, 0, new Array(0, _lineColor, _fillColor, _lineColor), new Array(0, _lineAlpha, _fillAlpha, _lineAlpha), new Array(0, 180, 200, 254), 20, 20, 1, 2, "inner")); _local7.push(new DropShadowFilter(4, 135)); _local7.push(new DropShadowFilter(6, 45, 0, 1, 10, 10, 1, 1, true)); _local1.filters = _local7; return (_local1); } override public function set x(_arg1:Number):void{ var _local2:Line; for each (_local2 in _lines) { _local2.Offset(_arg1, y); }; _sprite.x = _arg1; } override public function set y(_arg1:Number):void{ var _local2:Line; for each (_local2 in _lines) { _local2.Offset(x, _arg1); }; _sprite.y = _arg1; } public static function MakeNormalBounceBlock(... _args):Block{ var _local2:Block; _local2 = new Block(10000, 0.75, 85, 1, 204, 0.5, _args); return (_local2); } public static function MakeNormalBumperBlock(_arg1:Point, _arg2:Point, _arg3:Number=15, _arg4:Number=45):Block{ var _local5:Point; var _local6:Point; var _local7:Block; _local5 = Vector.fromPoints(_arg2.x, _arg2.y, _arg1.x, _arg1.y).Rotate(-(_arg4)).Normalize().Multiply(_arg3).ToPoint().add(_arg2); _local6 = Vector.fromPoints(_arg1.x, _arg1.y, _arg2.x, _arg2.y).Rotate(_arg4).Normalize().Multiply(_arg3).ToPoint().add(_arg1); _local7 = Block.MakeNormalBounceBlock(_arg1, _arg2, _local5, _local6); return (_local7); } public static function MakePerfectBounceBlock(... _args):Block{ var _local2:Block; _local2 = new Block(10000, 1, 0x550055, 1, 0xCC00CC, 0.5, _args); return (_local2); } public static function MakeSuperBounceBlock(... _args):Block{ var _local2:Block; _local2 = new Block(10000, 1.25, 0x550000, 1, 0xCC0000, 0.5, _args); return (_local2); } public static function MakePerfectBumperBlock(_arg1:Point, _arg2:Point, _arg3:Number=15, _arg4:Number=45):Block{ var _local5:Point; var _local6:Point; var _local7:Block; _local5 = Vector.fromPoints(_arg2.x, _arg2.y, _arg1.x, _arg1.y).Rotate(-(_arg4)).Normalize().Multiply(_arg3).ToPoint().add(_arg2); _local6 = Vector.fromPoints(_arg1.x, _arg1.y, _arg2.x, _arg2.y).Rotate(_arg4).Normalize().Multiply(_arg3).ToPoint().add(_arg1); _local7 = Block.MakePerfectBounceBlock(_arg1, _arg2, _local5, _local6); return (_local7); } public static function MakeSuperBumperBlock(_arg1:Point, _arg2:Point, _arg3:Number=15, _arg4:Number=45):Block{ var _local5:Point; var _local6:Point; var _local7:Block; _local5 = Vector.fromPoints(_arg2.x, _arg2.y, _arg1.x, _arg1.y).Rotate(-(_arg4)).Normalize().Multiply(_arg3).ToPoint().add(_arg2); _local6 = Vector.fromPoints(_arg1.x, _arg1.y, _arg2.x, _arg2.y).Rotate(_arg4).Normalize().Multiply(_arg3).ToPoint().add(_arg1); _local7 = Block.MakeSuperBounceBlock(_arg1, _arg2, _local5, _local6); return (_local7); } } }//package com.GameEngine.Entities
Section 8
//Bumper (com.GameEngine.Entities.Bumper) package com.GameEngine.Entities { import flash.display.*; import mx.effects.*; import flash.filters.*; public class Bumper extends Sprite { private var _fillAlpha:Number; private var _collideGlow:Sprite; private var _fillColor:uint; private var _lineColor:uint; private var _lineAlpha:Number; public var onTweenEnd:Function; public var showCollide:Function; private var _collideTween:Tween; public var _radius:Number; public var onTweenUpdate:Function; private var _bounce:Number; private var _mass:Number; private var _sprite:Sprite; public function Bumper(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:uint, _arg7:Number, _arg8:uint, _arg9:Number){ showCollide = function ():void{ if (_collideTween != null){ _collideTween.endTween(); }; _collideGlow.visible = true; _collideGlow.alpha = 1; _collideTween = new Tween(this, 1, 0, 750); }; onTweenUpdate = function (_arg1:Number):void{ _collideGlow.alpha = _arg1; }; onTweenEnd = function (_arg1:Number):void{ _collideGlow.visible = false; _collideGlow.alpha = 0; _collideTween = null; }; _radius = _arg3; _fillColor = _arg8; _fillAlpha = _arg9; _lineColor = _arg6; _lineAlpha = _arg7; _mass = _arg4; _bounce = _arg5; _collideGlow = this._drawGlowSprite(); _collideGlow.alpha = 0; addChild(_collideGlow); _sprite = this._drawSprite(); addChild(_sprite); this.x = _arg1; this.y = _arg2; super(); } public function _drawGlowSprite():Sprite{ var _local1:Sprite; var _local2:Graphics; var _local3:Array; _local1 = new Sprite(); _local2 = _local1.graphics; _local2.clear(); _local2.beginFill(_fillColor, _fillAlpha); _local2.lineStyle(1, this._lineColor, _lineAlpha); _local2.drawCircle(0, 0, _radius); _local2.drawCircle(0, 0, (_radius * 0.5)); _local2.endFill(); _local3 = _local1.filters; _local3.push(new GlowFilter(_lineColor, 1, 10, 10, 3, 1, false, true)); _local1.filters = _local3; return (_local1); } override public function get x():Number{ return (_sprite.x); } override public function get y():Number{ return (_sprite.y); } public function _drawSprite():Sprite{ var _local1:Sprite; var _local2:Graphics; var _local3:Array; _local1 = new Sprite(); _local2 = _local1.graphics; _local2.clear(); _local2.beginFill(_fillColor, _fillAlpha); _local2.lineStyle(1, this._lineColor, _lineAlpha); _local2.drawCircle(0, 0, _radius); _local2.drawCircle(0, 0, (_radius * 0.5)); _local2.endFill(); _local3 = _local1.filters; _local3.push(new GradientGlowFilter(0, 0, new Array(0, _lineColor, _fillColor, _lineColor), new Array(0, _lineAlpha, _fillAlpha, _lineAlpha), new Array(0, 180, 200, 254), 20, 20, 1, 2, "inner")); _local3.push(new DropShadowFilter(4, 135)); _local3.push(new DropShadowFilter(6, 45, 0, 1, 10, 10, 1, 1, true)); _local1.filters = _local3; return (_local1); } override public function set x(_arg1:Number):void{ _sprite.x = _arg1; _collideGlow.x = _arg1; } override public function set y(_arg1:Number):void{ _sprite.y = _arg1; _collideGlow.y = _arg1; } public static function MakeSuperBounceBumper(_arg1:Number, _arg2:Number, _arg3:Number):Bumper{ var _local4:Bumper; _local4 = new Bumper(_arg1, _arg2, _arg3, 10000, 1.25, 0xFF0000, 0.85, 0xCC0000, 0.5); return (_local4); } public static function MakePerfectBounceBumper(_arg1:Number, _arg2:Number, _arg3:Number):Bumper{ var _local4:Bumper; _local4 = new Bumper(_arg1, _arg2, _arg3, 10000, 1, 0xFF00FF, 0.85, 0xCC00CC, 0.5); return (_local4); } public static function MakeNormalBounceBumper(_arg1:Number, _arg2:Number, _arg3:Number):Bumper{ var _local4:Bumper; _local4 = new Bumper(_arg1, _arg2, _arg3, 10000, 0.5, 0xFF, 0.85, 204, 0.5); return (_local4); } } }//package com.GameEngine.Entities
Section 9
//Goal (com.GameEngine.Entities.Goal) package com.GameEngine.Entities { import flash.text.*; import flash.display.*; import mx.effects.*; import flash.geom.*; import flash.filters.*; public class Goal extends Sprite { public var _pointValue:int;// = 50 public var onTweenEnd:Function; private var _scratchTween:Tween; public var _radius:Number; public var onTweenUpdate:Function; private var _pottedTween:Tween; private var _scratchGlow:Sprite; public var _pointField:TextField; public var _pottedPointField:TextField; private var _pottedGlow:Sprite; public function Goal(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:int){ var _local5:Graphics; var _local6:Matrix; var _local7:Array; _pointValue = 50; super(); _radius = _arg3; _pointValue = _arg4; _local5 = this.graphics; _local6 = new Matrix(); _local6.createGradientBox((_arg3 * 2), (_arg3 * 2), 0, -(_arg3), -(_arg3)); _local5.beginGradientFill(GradientType.RADIAL, [0, 35791394], [1, 1], [64, 191], _local6, SpreadMethod.REFLECT); _local5.drawCircle(0, 0, _radius); _local5.endFill(); _local7 = this.filters; _local7.push(new DropShadowFilter(4, -45, 0xFFFFFF, 0.75, (_radius * 0.25), (_radius * 0.25), 1, 1, true)); this.filters = _local7; this.x = _arg1; this.y = _arg2; this.cacheAsBitmap = true; _pointField = new TextField(); _pointField.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); _pointField.mouseEnabled = false; _pointField.tabEnabled = false; _pointField.selectable = false; _pointField.embedFonts = true; _pointField.antiAliasType = AntiAliasType.ADVANCED; _pointField.text = this._pointValue.toString(); _pointField.alpha = 0.5; _pointField.x = -(_radius); _pointField.y = -5; _pointField.width = (_radius * 2); _pointField.height = (_radius * 2); addChild(_pointField); _scratchGlow = new Sprite(); _scratchGlow.alpha = 0; _scratchGlow.graphics.beginFill(0x990000, 1); _scratchGlow.graphics.drawCircle(0, 0, _radius); _scratchGlow.graphics.endFill(); _local7 = _scratchGlow.filters; _local7.push(new GlowFilter(0x990000, 1, 10, 10, 5, 1, false, true)); _scratchGlow.filters = _local7; addChild(_scratchGlow); _pottedGlow = new Sprite(); _pottedPointField = new TextField(); _pottedPointField.defaultTextFormat = new TextFormat("Abbess", 50, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); _pottedPointField.selectable = false; _pottedPointField.mouseEnabled = false; _pottedPointField.tabEnabled = false; _pottedPointField.embedFonts = true; _pottedPointField.antiAliasType = AntiAliasType.ADVANCED; _pottedPointField.text = this._pointValue.toString(); _pottedPointField.x = -200; _pottedPointField.y = -30; _pottedPointField.width = 400; _pottedPointField.height = 60; _pottedGlow.addChild(_pottedPointField); _pottedGlow.visible = false; addChild(_pottedGlow); } public function showPotted(_arg1:int=1, _arg2:int=0):void{ var multiplier = _arg1; var bonus = _arg2; if (bonus > 0){ _pottedPointField.text = (((this._pointValue * multiplier).toString() + " plus ") + bonus.toString()); } else { _pottedPointField.text = (this._pointValue * multiplier).toString(); }; this.onTweenUpdate = function (_arg1:Number):void{ _pottedGlow.alpha = _arg1; _pottedGlow.y = (_pottedGlow.y - _arg1); }; this.onTweenEnd = function (_arg1:Number):void{ _scratchGlow.visible = false; _pottedGlow.visible = false; _pottedGlow.y = 0; _pottedTween = null; }; if (_pottedTween != null){ _pottedTween.endTween(); }; if (_scratchTween != null){ _scratchTween.endTween(); }; _pottedGlow.alpha = 1; _pottedGlow.visible = true; _pottedGlow.x = 0; _pottedGlow.y = 0; _pottedTween = new Tween(this, 1, 0, 2500); } public function showScratched():void{ this.onTweenUpdate = function (_arg1:Number):void{ _scratchGlow.alpha = _arg1; }; this.onTweenEnd = function (_arg1:Number):void{ _scratchGlow.visible = false; _pottedGlow.visible = false; _pottedGlow.y = 0; _scratchTween = null; }; if (_pottedTween != null){ _pottedTween.endTween(); }; if (_scratchTween != null){ _scratchTween.endTween(); }; _scratchGlow.alpha = 1; _scratchGlow.visible = true; _scratchGlow.x = 0; _scratchGlow.y = 0; _scratchTween = new Tween(this, 1, 0, 1000); } public static function MakeRegularGoal(_arg1:Number=0, _arg2:Number=0, _arg3:Number=10, _arg4:int=50):Goal{ var _local5:Goal; _local5 = new Goal(_arg1, _arg2, _arg3, _arg4); return (_local5); } } }//package com.GameEngine.Entities
Section 10
//GravityWell (com.GameEngine.Entities.GravityWell) package com.GameEngine.Entities { import flash.display.*; public class GravityWell extends Sprite { public var _decayRate:Number;// = 0 public var _gStrength:Number; public var EPSILON:Number;// = 0.02 public var _mass:Number; public function GravityWell(_arg1:Number, _arg2:Number){ _decayRate = 0; EPSILON = 0.02; super(); _gStrength = _arg1; _mass = _arg2; } public function Decay(_arg1:Number):Number{ _mass = (_mass * (_decayRate * _arg1)); return (_mass); } public static function MakeGravityWell(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):GravityWell{ var _local5:GravityWell; _local5 = new GravityWell(_arg3, _arg4); _local5.x = _arg1; _local5.y = _arg2; _local5.graphics.beginFill(0, (_arg3 * 0.1)); _local5.graphics.drawCircle(0, 0, 5); _local5.graphics.endFill(); return (_local5); } } }//package com.GameEngine.Entities
Section 11
//DisplayConverter (com.GameEngine.Utils.DisplayConverter) package com.GameEngine.Utils { import flash.display.*; public class DisplayConverter { public function DisplayConverter(){ trace("DisplayConverter is a static class and should not be instantiated"); } public static function spriteToBitmap(_arg1:Sprite, _arg2:Boolean=false, _arg3:Number=1, _arg4:Number=0, _arg5:Number=0):Bitmap{ var _local6:BitmapData; var _local7:Bitmap; if (_arg4 == 0){ _arg4 = _arg1.width; }; if (_arg5 == 0){ _arg5 = _arg1.height; }; _local6 = new BitmapData(_arg4, _arg5, true, 0xFFFFFF); _local6.draw(_arg1); _local7 = new Bitmap(_local6, "auto", _arg2); _local7.scaleX = _arg3; _local7.scaleY = _arg3; return (_local7); } public static function bitmapToSprite(_arg1:Bitmap, _arg2:Boolean=false):Sprite{ var _local3:Sprite; _local3 = new Sprite(); _local3.addChild(new Bitmap(_arg1.bitmapData.clone(), "auto", _arg2)); return (_local3); } } }//package com.GameEngine.Utils
Section 12
//Geometry (com.GameEngine.Utils.Geometry) package com.GameEngine.Utils { import flash.geom.*; public class Geometry { public static const NAN:Number = NAN; public static const RADIANSTODEGREES:Number = 57.2957795130823; public static const NEGATIVEINFINITY:Number = -INF; public static const DEGREESTORADIANS:Number = 0.0174532925199433; public static const INFINITY:Number = INF; public static function roundToNearestIncrement(_arg1:Number, _arg2:int):int{ var _local3:int; var _local4:Number; var _local5:Number; var _local6:int; _local3 = int((_arg1 / _arg2)); _local4 = (_arg1 % _arg2); _local5 = (_local4 / _arg2); _local6 = int(Math.round(_local5)); return ((_arg2 * (_local3 + _local6))); } public static function DotProduct(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg1 * _arg3) + (_arg2 * _arg4))); } public static function RadiansToDegrees(_arg1:Number):Number{ return ((_arg1 * RADIANSTODEGREES)); } public static function GetDistanceToPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (DistanceOfVector((_arg3 - _arg1), (_arg4 - _arg2))); } public static function AngleOfVector(_arg1:Number, _arg2:Number):Number{ var _local3:Number; _local3 = Geometry.RadiansToDegrees(Math.atan2(_arg2, _arg1)); return (_local3); } public static function AddVectors(_arg1:Point, _arg2:Point):Point{ var _local3:Point; _local3 = new Point(); _local3.x = (_arg1.x + _arg2.x); _local3.y = (_arg1.y + _arg2.y); return (_local3); } public static function NormalizeVector(_arg1:Number, _arg2:Number):Point{ var _local3:Point; var _local4:Number; _local3 = new Point(_arg1, _arg2); _local4 = _local3.length; if (_local4 != 0){ _local3.x = (_local3.x / _local4); _local3.y = (_local3.y / _local4); }; return (_local3); } public static function PointIsOnSegment(_arg1:Point, _arg2:Point, _arg3:Number, _arg4:Number):Boolean{ var _local5:Boolean; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; _local5 = false; if (_arg1.x < _arg2.x){ _local6 = _arg1.x; _local7 = _arg2.x; } else { _local6 = _arg2.x; _local7 = _arg1.x; }; if (_arg1.y < _arg2.y){ _local8 = _arg1.y; _local9 = _arg2.y; } else { _local8 = _arg2.y; _local9 = _arg1.y; }; _local5 = (((((((((Geometry.PointLineSide(_arg1, ((_arg1.y - _arg2.y) / (_arg1.x - _arg2.x)), _arg3, _arg4) == 0)) && ((_arg3 >= _local6)))) && ((_arg3 <= _local7)))) && ((_arg4 >= _local8)))) && ((_arg4 <= _local9))); return (_local5); } public static function PointLineSide(_arg1:Point, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg4 - _arg1.y) - (_arg2 * (_arg3 - _arg1.x)))); } public static function roundToPrecision(_arg1:Number, _arg2:int=0):Number{ var _local3:Number; _local3 = Math.pow(10, _arg2); return ((Math.round((_local3 * _arg1)) / _local3)); } public static function GetAngleToPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (AngleOfVector((_arg3 - _arg1), (_arg4 - _arg2))); } public static function InvertVector(_arg1:Point):Point{ var _local2:Point; _local2 = new Point(); _local2.x = (_arg1.x * -1); _local2.y = (_arg1.y * -1); return (_local2); } public static function AngleAndSpeedToVelocity(_arg1:Number, _arg2:Number):Point{ var _local3:Point; var _local4:Number; _local3 = new Point(); _local4 = DegreesToRadians(_arg1); _local3.x = (Math.cos(_local4) * _arg2); _local3.y = (Math.sin(_local4) * _arg2); return (_local3); } public static function ccw(_arg1:Point, _arg2:Point, _arg3:Point):int{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local4 = (_arg2.x - _arg1.x); _local5 = (_arg2.y - _arg1.y); _local6 = (_arg3.x - _arg1.x); _local7 = (_arg3.y - _arg1.y); if ((_local5 * _local6) < (_local7 * _local4)){ return (1); }; if ((_local5 * _local6) > (_local7 * _local4)){ return (-1); }; if (((((_local4 * _local6) < 0)) || (((_local5 * _local7) < 0)))){ return (-1); }; if ((Math.abs(_local4) + Math.abs(_local5)) >= (Math.abs(_local6) + Math.abs(_local7))){ return (0); }; return (1); } public static function NormalForVectorLH(_arg1:Number, _arg2:Number):Point{ var _local3:Point; _local3 = new Point(); _local3.x = _arg2; _local3.y = -(_arg1); return (_local3); } public static function GetAngleAndDistanceToPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Point{ var _local5:Point; _local5 = VelocityToAngleAndSpeed((_arg3 - _arg1), (_arg4 - _arg2)); return (_local5); } public static function GetSlopeOfLine(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg2 - _arg4) / (_arg1 - _arg3))); } public static function NormalForVectorRH(_arg1:Number, _arg2:Number):Point{ var _local3:Point; _local3 = new Point(); _local3.x = -(_arg2); _local3.y = _arg1; return (_local3); } public static function VelocityToAngleAndSpeed(_arg1:Number, _arg2:Number):Point{ var _local3:Point; _local3 = new Point(); _local3.x = AngleOfVector(_arg1, _arg2); _local3.y = DistanceOfVector(_arg1, _arg2); return (_local3); } public static function intersection(_arg1:Point, _arg2:Point, _arg3:Point, _arg4:Point):Boolean{ return (((((ccw(_arg1, _arg2, _arg3) * ccw(_arg1, _arg2, _arg4)) <= 0)) && (((ccw(_arg3, _arg4, _arg1) * ccw(_arg3, _arg4, _arg2)) <= 0)))); } public static function DistanceOfVector(_arg1:Number, _arg2:Number):Number{ return (Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2)))); } public static function DegreesToRadians(_arg1:Number):Number{ return ((_arg1 * DEGREESTORADIANS)); } public static function DifferenceOfAngles(_arg1:Number, _arg2:Number):Number{ var _local3:Number; _local3 = (_arg1 - _arg2); if (_local3 > 180){ _local3 = (_local3 - 360); }; if (_local3 < -180){ _local3 = (_local3 + 360); }; return (Math.abs(_local3)); } public static function SubtractVectors(_arg1:Point, _arg2:Point):Point{ var _local3:Point; _local3 = new Point(); _local3.x = (_arg1.x - _arg2.x); _local3.y = (_arg1.y - _arg2.y); return (_local3); } } }//package com.GameEngine.Utils
Section 13
//Line (com.GameEngine.Utils.Line) package com.GameEngine.Utils { import flash.geom.*; public dynamic class Line { private var _P1toP2Vector:Vector; private var _RHNormal:Vector; private var _p1:Point; private var _p2:Point; private var _LHNormal:Vector; public var _bounce:Number; public function Line(_arg1:Point, _arg2:Point, _arg3:Number=1){ _p1 = _arg1.clone(); _p2 = _arg2.clone(); _bounce = _arg3; this._calcNormals(); } public function get LHNormal():Vector{ return (_LHNormal); } public function get p1():Point{ return (_p1); } public function set p1(_arg1:Point):void{ _p1 = _arg1.clone(); _calcNormals(); } public function set p2(_arg1:Point):void{ _p2 = _arg1.clone(); _calcNormals(); } public function get p2():Point{ return (_p2); } private function _calcNormals():void{ _P1toP2Vector = Vector.fromPoints(p1.x, p1.y, p2.x, p2.y); _LHNormal = _P1toP2Vector.NormalLH(); _RHNormal = _P1toP2Vector.NormalRH(); } public function get length():Number{ return (_P1toP2Vector.length); } public function Offset(_arg1:Number, _arg2:Number):Line{ var _local3:Point; var _local4:Point; var _local5:Line; _local3 = new Point((_p1.x + _arg1), (_p1.y + _arg2)); _local4 = new Point((_p2.x + _arg1), (_p2.y + _arg2)); _local5 = new Line(_local3, _local4); return (_local5); } public function Rotate(_arg1:Number):Line{ var _local2:Line; _local2 = new Line(Vector.fromPoint(_p1).Rotate(_arg1).ToPoint(), Vector.fromPoint(_p2).Rotate(_arg1).ToPoint()); return (_local2); } public function get RHNormal():Vector{ return (_RHNormal); } public static function makeLines(_arg1:Point, _arg2:Point, ... _args):Array{ var _local4:Array; return (_local4); } public static function FromPointAndVector(_arg1:Point, _arg2:Vector):Line{ var _local3:Line; _local3 = new Line(_arg1, new Point((_arg1.x + _arg2.x), (_arg1.y + _arg2.y))); return (_local3); } } }//package com.GameEngine.Utils
Section 14
//ProgressBar (com.GameEngine.Utils.ProgressBar) package com.GameEngine.Utils { import flash.display.*; import flash.geom.*; public class ProgressBar extends Sprite { private var _cr:Number; private var _backdropmask:Sprite; private var _percentage:Number; private var _bar:Sprite; private var _barmask:Sprite; private var _framemask:Sprite; private var _frame:Sprite; private var _backdrop:Sprite; private var _h:Number; private var _w:Number; public function ProgressBar(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=10, _arg5:Number=0, _arg6:Array=null, _arg7:Array=null, _arg8:Array=null){ var _local9:Graphics; var _local10:Matrix; super(); if (_arg6 == null){ _arg6 = [0x990000, 0x660000]; }; if (_arg7 == null){ _arg7 = [0x9900, 0x6600]; }; if (_arg8 == null){ _arg8 = [0x333333, 0]; }; _w = _arg1; _h = _arg2; _cr = _arg3; _backdropmask = new Sprite(); _barmask = new Sprite(); _framemask = new Sprite(); _backdrop = new Sprite(); _bar = new Sprite(); _frame = new Sprite(); _local9 = _backdropmask.graphics; _local9.beginFill(0xFFFFFF, 1); _local9.drawRoundRect(0, 0, _w, _h, _cr, _cr); _local9.endFill(); _local9 = _barmask.graphics; _local9.beginFill(0xFFFFFF, 1); _local9.drawRoundRect(0, 0, _w, _h, _cr, _cr); _local9.endFill(); _local9 = _framemask.graphics; _local9.beginFill(0xFFFFFF, 1); _local9.drawRoundRect(0, 0, _w, _h, _cr, _cr); _local9.endFill(); _local10 = new Matrix(); _local10.createGradientBox(_w, _h, 0); _local9 = _backdrop.graphics; _local9.beginGradientFill(GradientType.LINEAR, _arg6, [1, 1], [0, 0xFF], _local10); _local9.drawRoundRect((_arg4 * 0.5), (_arg4 * 0.5), (_w - _arg4), (_h - _arg4), _cr, _cr); _local9.endFill(); _local10 = new Matrix(); _local10.createGradientBox(_w, _h, 90); _local9.beginGradientFill(GradientType.LINEAR, [0xFFFFFF, 0xFFFFFF], [0.1, 0], [0, 0xFF], _local10); _local9.drawEllipse((-(_w) * 0.25), (-(_h) * 0.5), (_w * 1.5), _h); _local9.endFill(); _local10 = new Matrix(); _local10.createGradientBox(_w, _h, 0); _local9 = _bar.graphics; _local9.beginGradientFill(GradientType.LINEAR, _arg7, [1, 1], [0, 0xFF], _local10); _local9.drawRoundRect(0, 0, _w, _h, _cr, _cr); _local9.endFill(); _local10 = new Matrix(); _local10.createGradientBox(_w, _h, 90); _local9.beginGradientFill(GradientType.LINEAR, [0xFFFFFF, 0xFFFFFF], [0.05, 0], [0, 0xFF], _local10); _local9.drawEllipse((-(_w) * 0.25), (-(_h) * 0.55), (_w * 1.5), _h); _local9.endFill(); _local10 = new Matrix(); _local10.createGradientBox(_w, _h, 90); _local9 = _frame.graphics; _local9.beginGradientFill(GradientType.LINEAR, _arg8, [1, 1], [0, 0xFF], _local10); _local9.drawRoundRect(0, 0, _w, _h, _cr, _cr); _local9.drawRoundRect((_arg4 * 0.5), (_arg4 * 0.5), (_w - _arg4), (_h - _arg4), _cr, _cr); _local9.endFill(); _backdrop.mask = _backdropmask; _backdrop.addChild(_backdropmask); _bar.mask = _barmask; _bar.addChild(_barmask); _frame.mask = _framemask; _frame.addChild(_framemask); this.addChild(_backdrop); this.addChild(_bar); this.addChild(_frame); _bar.cacheAsBitmap = true; _backdrop.cacheAsBitmap = true; _frame.cacheAsBitmap = true; Percentage = _arg5; } public function set Percentage(_arg1:Number):void{ var _local2:Graphics; var _local3:Number; if (_arg1 > 1){ _arg1 = 1; } else { if (_arg1 < 0){ _arg1 = 0; }; }; _percentage = _arg1; _local2 = _barmask.graphics; _local2.clear(); _local2.beginFill(0xFFFFFF, 1); _local3 = (_w * this.Percentage); _local2.drawRoundRect(0, 0, ((_local3)<=0) ? 1 : _local3, _h, _cr, _cr); _local2.endFill(); } public function get Percentage():Number{ return (_percentage); } } }//package com.GameEngine.Utils
Section 15
//SpriteFactory (com.GameEngine.Utils.SpriteFactory) package com.GameEngine.Utils { import flash.display.*; import flash.geom.*; public class SpriteFactory { public static function makeBorderedFrameAlpha(_arg1:Number, _arg2:Number, _arg3:Number=20, _arg4:uint=0x111111, _arg5:uint=0xFFFFFF, _arg6:Number=0.55, _arg7:Number=0.95):Sprite{ var _local8:Sprite; _local8 = new Sprite(); _local8.graphics.beginFill(_arg5, _arg6); _local8.graphics.drawRoundRect(0, 0, _arg1, _arg2, _arg3, _arg3); _local8.graphics.drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _arg3, _arg3); _local8.graphics.endFill(); _local8.graphics.beginFill(_arg5, (_arg6 + 0.05)); _local8.graphics.drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _arg3, _arg3); _local8.graphics.drawRoundRect(2, 2, (_arg1 - 4), (_arg2 - 4), _arg3, _arg3); _local8.graphics.endFill(); _local8.graphics.beginFill(_arg5, (_arg6 + 0.1)); _local8.graphics.drawRoundRect(2, 2, (_arg1 - 4), (_arg2 - 4), _arg3, _arg3); _local8.graphics.drawRoundRect(3, 3, (_arg1 - 6), (_arg2 - 6), _arg3, _arg3); _local8.graphics.endFill(); _local8.graphics.beginFill(_arg5, (_arg6 + 0.15)); _local8.graphics.drawRoundRect(3, 3, (_arg1 - 6), (_arg2 - 6), _arg3, _arg3); _local8.graphics.drawRoundRect(4, 4, (_arg1 - 8), (_arg2 - 8), _arg3, _arg3); _local8.graphics.endFill(); _local8.graphics.beginFill(_arg5, (_arg6 + 0.2)); _local8.graphics.drawRoundRect(4, 4, (_arg1 - 8), (_arg2 - 8), _arg3, _arg3); _local8.graphics.drawRoundRect(5, 5, (_arg1 - 10), (_arg2 - 10), _arg3, _arg3); _local8.graphics.endFill(); _local8.graphics.beginFill(_arg5, (_arg6 + 0.22)); _local8.graphics.drawRoundRect(5, 5, (_arg1 - 10), (_arg2 - 10), _arg3, _arg3); _local8.graphics.drawRoundRect(6, 6, (_arg1 - 12), (_arg2 - 12), _arg3, _arg3); _local8.graphics.endFill(); _local8.graphics.beginFill(_arg5, (_arg6 + 0.2)); _local8.graphics.drawRoundRect(6, 6, (_arg1 - 12), (_arg2 - 12), _arg3, _arg3); _local8.graphics.drawRoundRect(7, 7, (_arg1 - 14), (_arg2 - 14), _arg3, _arg3); _local8.graphics.endFill(); _local8.graphics.beginFill(_arg5, (_arg6 + 0.15)); _local8.graphics.drawRoundRect(7, 7, (_arg1 - 14), (_arg2 - 14), _arg3, _arg3); _local8.graphics.drawRoundRect(8, 8, (_arg1 - 16), (_arg2 - 16), _arg3, _arg3); _local8.graphics.endFill(); _local8.graphics.beginFill(_arg5, (_arg6 + 0.1)); _local8.graphics.drawRoundRect(8, 8, (_arg1 - 16), (_arg2 - 16), _arg3, _arg3); _local8.graphics.drawRoundRect(9, 9, (_arg1 - 18), (_arg2 - 18), _arg3, _arg3); _local8.graphics.endFill(); _local8.graphics.beginFill(_arg5, (_arg6 + 0.05)); _local8.graphics.drawRoundRect(9, 9, (_arg1 - 18), (_arg2 - 18), _arg3, _arg3); _local8.graphics.drawRoundRect(10, 10, (_arg1 - 20), (_arg2 - 20), _arg3, _arg3); _local8.graphics.endFill(); _local8.graphics.beginFill(_arg4, _arg7); _local8.graphics.drawRoundRect(10, 10, (_arg1 - 20), (_arg2 - 20), _arg3, _arg3); _local8.graphics.endFill(); return (_local8); } public static function makeBorderedFrame(_arg1:Number, _arg2:Number, _arg3:Number=20, _arg4:uint=0x111111, _arg5:uint=0xFFFFFF, _arg6:Number=1):Sprite{ var _local7:Sprite; _local7 = new Sprite(); _local7.graphics.beginFill(colorSum(_arg5, -85, -85, -85)); _local7.graphics.drawRoundRect(0, 0, _arg1, _arg2, _arg3, _arg3); _local7.graphics.drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _arg3, _arg3); _local7.graphics.endFill(); _local7.graphics.beginFill(colorSum(_arg5, -68, -68, -68)); _local7.graphics.drawRoundRect(1, 1, (_arg1 - 2), (_arg2 - 2), _arg3, _arg3); _local7.graphics.drawRoundRect(2, 2, (_arg1 - 4), (_arg2 - 4), _arg3, _arg3); _local7.graphics.endFill(); _local7.graphics.beginFill(colorSum(_arg5, -51, -51, -51)); _local7.graphics.drawRoundRect(2, 2, (_arg1 - 4), (_arg2 - 4), _arg3, _arg3); _local7.graphics.drawRoundRect(3, 3, (_arg1 - 6), (_arg2 - 6), _arg3, _arg3); _local7.graphics.endFill(); _local7.graphics.beginFill(colorSum(_arg5, -34, -34, -34)); _local7.graphics.drawRoundRect(3, 3, (_arg1 - 6), (_arg2 - 6), _arg3, _arg3); _local7.graphics.drawRoundRect(4, 4, (_arg1 - 8), (_arg2 - 8), _arg3, _arg3); _local7.graphics.endFill(); _local7.graphics.beginFill(colorSum(_arg5, -17, -17, -17)); _local7.graphics.drawRoundRect(4, 4, (_arg1 - 8), (_arg2 - 8), _arg3, _arg3); _local7.graphics.drawRoundRect(5, 5, (_arg1 - 10), (_arg2 - 10), _arg3, _arg3); _local7.graphics.endFill(); _local7.graphics.beginFill(_arg5); _local7.graphics.drawRoundRect(5, 5, (_arg1 - 10), (_arg2 - 10), _arg3, _arg3); _local7.graphics.drawRoundRect(6, 6, (_arg1 - 12), (_arg2 - 12), _arg3, _arg3); _local7.graphics.endFill(); _local7.graphics.beginFill(colorSum(_arg5, -17, -17, -17)); _local7.graphics.drawRoundRect(6, 6, (_arg1 - 12), (_arg2 - 12), _arg3, _arg3); _local7.graphics.drawRoundRect(7, 7, (_arg1 - 14), (_arg2 - 14), _arg3, _arg3); _local7.graphics.endFill(); _local7.graphics.beginFill(colorSum(_arg5, -34, -34, -34)); _local7.graphics.drawRoundRect(7, 7, (_arg1 - 14), (_arg2 - 14), _arg3, _arg3); _local7.graphics.drawRoundRect(8, 8, (_arg1 - 16), (_arg2 - 16), _arg3, _arg3); _local7.graphics.endFill(); _local7.graphics.beginFill(colorSum(_arg5, -51, -51, -51)); _local7.graphics.drawRoundRect(8, 8, (_arg1 - 16), (_arg2 - 16), _arg3, _arg3); _local7.graphics.drawRoundRect(9, 9, (_arg1 - 18), (_arg2 - 18), _arg3, _arg3); _local7.graphics.endFill(); _local7.graphics.beginFill(colorSum(_arg5, -68, -68, -68)); _local7.graphics.drawRoundRect(9, 9, (_arg1 - 18), (_arg2 - 18), _arg3, _arg3); _local7.graphics.drawRoundRect(10, 10, (_arg1 - 20), (_arg2 - 20), _arg3, _arg3); _local7.graphics.endFill(); _local7.graphics.beginFill(_arg4, _arg6); _local7.graphics.drawRoundRect(10, 10, (_arg1 - 20), (_arg2 - 20), _arg3, _arg3); _local7.graphics.endFill(); return (_local7); } public static function makeGradientBar(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:uint, _arg5:int, _arg6:int, _arg7:int):Sprite{ var _local8:Sprite; var _local9:int; _local8 = new Sprite(); _local9 = 0; while ((((_arg1 > 0)) && ((_arg2 > 0)))) { _local8.graphics.beginFill(SpriteFactory.colorSum(_arg4, (_arg5 * _local9), (_arg6 * _local9), (_arg7 * _local9))); _local8.graphics.drawRoundRect(_local9, _local9, _arg1, _arg2, _arg3, _arg3); _local8.graphics.endFill(); _arg1 = (_arg1 - 2); _arg2 = (_arg2 - 2); _local9++; }; return (_local8); } private static function colorSum(_arg1:uint, _arg2:int, _arg3:int, _arg4:int):uint{ var _local5:ColorTransform; _local5 = new ColorTransform(); _local5.color = _arg1; _local5.redOffset = (_local5.redOffset + _arg2); _local5.greenOffset = (_local5.greenOffset + _arg3); _local5.blueOffset = (_local5.blueOffset + _arg4); if (_local5.redOffset < 0){ _local5.redOffset = 0; } else { if (_local5.redOffset > 0xFF){ _local5.redOffset = 0xFF; }; }; if (_local5.greenOffset < 0){ _local5.greenOffset = 0; } else { if (_local5.greenOffset > 0xFF){ _local5.greenOffset = 0xFF; }; }; if (_local5.blueOffset < 0){ _local5.blueOffset = 0; } else { if (_local5.blueOffset > 0xFF){ _local5.blueOffset = 0xFF; }; }; return (_local5.color); } public static function makeBorder(_arg1:Number, _arg2:Number, _arg3:uint=0xAA0000):Sprite{ var _local4:Sprite; _local4 = new Sprite(); _local4.graphics.beginFill(_arg3, 1); _local4.graphics.drawRect(0, 0, _arg1, _arg2); _local4.graphics.drawRect(1, 1, (_arg1 - 2), (_arg2 - 2)); _local4.graphics.endFill(); _local4.graphics.beginFill(_arg3, 0.9); _local4.graphics.drawRect(1, 1, (_arg1 - 2), (_arg2 - 2)); _local4.graphics.drawRect(2, 2, (_arg1 - 4), (_arg2 - 4)); _local4.graphics.endFill(); _local4.graphics.beginFill(_arg3, 0.8); _local4.graphics.drawRect(2, 2, (_arg1 - 4), (_arg2 - 4)); _local4.graphics.drawRect(3, 3, (_arg1 - 6), (_arg2 - 6)); _local4.graphics.endFill(); _local4.graphics.beginFill(_arg3, 0.7); _local4.graphics.drawRect(3, 3, (_arg1 - 6), (_arg2 - 6)); _local4.graphics.drawRect(4, 4, (_arg1 - 8), (_arg2 - 8)); _local4.graphics.endFill(); _local4.graphics.beginFill(_arg3, 0.6); _local4.graphics.drawRect(4, 4, (_arg1 - 8), (_arg2 - 8)); _local4.graphics.drawRect(5, 5, (_arg1 - 10), (_arg2 - 10)); _local4.graphics.endFill(); _local4.graphics.beginFill(_arg3, 0.5); _local4.graphics.drawRect(5, 5, (_arg1 - 10), (_arg2 - 10)); _local4.graphics.drawRect(6, 6, (_arg1 - 12), (_arg2 - 12)); _local4.graphics.endFill(); _local4.graphics.beginFill(_arg3, 0.4); _local4.graphics.drawRect(6, 6, (_arg1 - 12), (_arg2 - 12)); _local4.graphics.drawRect(7, 7, (_arg1 - 14), (_arg2 - 14)); _local4.graphics.endFill(); _local4.graphics.beginFill(_arg3, 0.3); _local4.graphics.drawRect(7, 7, (_arg1 - 14), (_arg2 - 14)); _local4.graphics.drawRect(8, 8, (_arg1 - 16), (_arg2 - 16)); _local4.graphics.endFill(); _local4.graphics.beginFill(_arg3, 0.2); _local4.graphics.drawRect(8, 8, (_arg1 - 16), (_arg2 - 16)); _local4.graphics.drawRect(9, 9, (_arg1 - 18), (_arg2 - 18)); _local4.graphics.endFill(); _local4.graphics.beginFill(_arg3, 0.1); _local4.graphics.drawRect(9, 9, (_arg1 - 18), (_arg2 - 18)); _local4.graphics.drawRect(10, 10, (_arg1 - 20), (_arg2 - 20)); _local4.graphics.endFill(); _local4.graphics.beginFill(_arg3, 0.01); _local4.graphics.drawRect(10, 10, (_arg1 - 20), (_arg2 - 20)); _local4.graphics.drawRect(11, 11, (_arg1 - 22), (_arg2 - 22)); _local4.graphics.endFill(); _local4.mouseEnabled = false; return (_local4); } public static function makeBlob(_arg1:Number, _arg2:Number, _arg3:uint, _arg4:Number, _arg5:uint):Sprite{ var _local6:Sprite; var _local7:uint; var _local8:Number; var _local9:Number; _local6 = new Sprite(); _local7 = 0; while (_local7 < _arg5) { _local8 = ((Math.random() * _arg2) - (_arg2 * 0.5)); _local9 = ((Math.random() * _arg2) - (_arg2 * 0.5)); _local6.graphics.beginFill(_arg3, _arg4); _local6.graphics.drawCircle(_local8, _local9, _arg1); _local6.graphics.endFill(); _local7++; }; return (_local6); } public static function drawGradientBar(_arg1:Sprite, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:uint, _arg6:int, _arg7:int, _arg8:int):void{ var _local9:int; _arg1.graphics.clear(); _local9 = 0; while ((((_arg2 > 0)) && ((_arg3 > 0)))) { _arg1.graphics.beginFill(SpriteFactory.colorSum(_arg5, (_arg6 * _local9), (_arg7 * _local9), (_arg8 * _local9))); _arg1.graphics.drawRoundRect(_local9, _local9, _arg2, _arg3, _arg4, _arg4); _arg1.graphics.endFill(); _arg2 = (_arg2 - 2); _arg3 = (_arg3 - 2); _local9++; }; } } }//package com.GameEngine.Utils
Section 16
//Tick (com.GameEngine.Utils.Tick) package com.GameEngine.Utils { import flash.utils.*; public class Tick { public var secs:int; public var fps:uint;// = 0 public var ftime:Number;// = 0 private var oldtime:int;// = 0 public var fps_txt:uint;// = 0 public function Tick(){ oldtime = 0; ftime = 0; fps = 0; secs = getTimer(); fps_txt = 0; super(); } public function Reset():void{ oldtime = getTimer(); ftime = 0; fps = 0; secs = getTimer(); fps_txt = 0; } public function getFtime():void{ var _local1:int; _local1 = getTimer(); ftime = ((_local1 - oldtime) / 1000); fps++; if ((_local1 - secs) > 1000){ secs = (secs + 1000); fps_txt = fps; fps = 0; }; oldtime = _local1; } } }//package com.GameEngine.Utils
Section 17
//Vector (com.GameEngine.Utils.Vector) package com.GameEngine.Utils { import flash.geom.*; public class Vector { public var x:Number; public var y:Number; public function Vector(_arg1:Number=0, _arg2:Number=0){ this.x = _arg1; this.y = _arg2; } public function Angle():Number{ var _local1:Number; _local1 = Math.atan2(y, x); _local1 = ((_local1 / Math.PI) * 180); return (_local1); } public function NormalLH():Vector{ var _local1:Vector; _local1 = new Vector(y, -(x)); return (_local1); } public function Multiply(_arg1:Number):Vector{ var _local2:Vector; _local2 = new Vector((x * _arg1), (y * _arg1)); return (_local2); } public function DotProduct(_arg1:Vector):Number{ return (((this.x * _arg1.x) + (this.y * _arg1.y))); } public function ToLengthInPlace(_arg1:Number):Vector{ return (this.NormalizeInPlace().MultiplyInPlace(_arg1)); } public function DivideInPlace(_arg1:Number):Vector{ this.x = (this.x / _arg1); this.y = (this.y / _arg1); return (this); } public function InverseInPlace():Vector{ this.x = -(x); this.y = -(y); return (this); } public function SubtractInPlace(_arg1:Vector):Vector{ this.x = (this.x - _arg1.x); this.y = (this.y - _arg1.y); return (this); } public function Add(_arg1:Vector):Vector{ var _local2:Vector; _local2 = new Vector((this.x + _arg1.x), (this.y + _arg1.y)); return (_local2); } public function AngleBetween(_arg1:Vector):Number{ return (Math.acos(this.Normalize().DotProduct(_arg1.Normalize()))); } public function Inverse():Vector{ var _local1:Vector; _local1 = new Vector(-(x), -(y)); return (_local1); } public function Divide(_arg1:Number):Vector{ var _local2:Vector; _local2 = new Vector((x / _arg1), (y / _arg1)); return (_local2); } public function NormalLHInPlace():Vector{ this.x = -(x); return (this); } public function ToLength(_arg1:Number):Vector{ return (this.Normalize().Multiply(_arg1)); } public function NormalRHInPlace():Vector{ this.y = -(y); return (this); } public function get length():Number{ return (Math.sqrt(((x * x) + (y * y)))); } public function RotateInPlace(_arg1:Number):Vector{ var _local2:Number; var _local3:Number; var _local4:Number; _local2 = Geometry.DegreesToRadians(_arg1); _local3 = Math.cos(_local2); _local4 = Math.sin(_local2); this.x = ((_local3 * x) - (_local4 * y)); this.y = ((_local4 * x) + (_local3 * y)); return (this); } public function AddInPlace(_arg1:Vector):Vector{ this.x = (this.x + _arg1.x); this.y = (this.y + _arg1.y); return (this); } public function Normalize():Vector{ var _local1:Vector; var _local2:Number; _local2 = this.length; if (_local2 != 0){ _local1 = new Vector((this.x / _local2), (this.y / _local2)); } else { _local1 = new Vector(this.x, this.y); }; return (_local1); } public function ProjectOntoInPlace(_arg1:Vector):Vector{ var _local2:Number; var _local3:Number; _local2 = this.DotProduct(_arg1); _local3 = _arg1.DotProduct(_arg1); this.x = ((_local2 / _local3) * _arg1.x); this.y = ((_local2 / _local3) * _arg1.y); return (this); } public function ProjectOnto(_arg1:Vector):Vector{ var _local2:Number; var _local3:Number; _local2 = this.DotProduct(_arg1); _local3 = _arg1.DotProduct(_arg1); return (new Vector(((_local2 / _local3) * _arg1.x), ((_local2 / _local3) * _arg1.y))); } public function Subtract(_arg1:Vector):Vector{ var _local2:Vector; _local2 = new Vector((this.x - _arg1.x), (this.y - _arg1.y)); return (_local2); } public function NormalizeInPlace():Vector{ var _local1:Number; _local1 = this.length; if (_local1 != 0){ this.x = (this.x / _local1); this.y = (this.y / _local1); }; return (this); } public function Rotate(_arg1:Number):Vector{ var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Vector; _local2 = Geometry.DegreesToRadians(_arg1); _local3 = Math.cos(_local2); _local4 = Math.sin(_local2); _local5 = new Vector(((_local3 * x) - (_local4 * y)), ((_local4 * x) + (_local3 * y))); return (_local5); } public function ToPoint():Point{ return (new Point(this.x, this.y)); } public function NormalRH():Vector{ var _local1:Vector; _local1 = new Vector(-(y), x); return (_local1); } public function MultiplyInPlace(_arg1:Number):Vector{ this.x = (this.x * _arg1); this.y = (this.y * _arg1); return (this); } public static function fromPoints(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Vector{ return (new Vector((_arg3 - _arg1), (_arg4 - _arg2))); } public static function fromPoints2(_arg1:Point, _arg2:Point):Vector{ return (new Vector((_arg2.x - _arg1.x), (_arg2.y - _arg1.y))); } public static function fromPoint(_arg1:Point):Vector{ return (new Vector(_arg1.x, _arg1.y)); } } }//package com.GameEngine.Utils
Section 18
//MochiAd (com.mochi.as3.MochiAd) package com.mochi.as3 { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; import flash.net.*; public class MochiAd { public static function getVersion():String{ return ("3.0 as3"); } 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]; if (Security.sandboxType == "application"){ return (_local2); }; 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; } else { trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal"); }; 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.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{ trace("[MochiAds] Blocked URL"); }); 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 com.mochi.as3
Section 19
//MochiDigits (com.mochi.as3.MochiDigits) package com.mochi.as3 { public final class MochiDigits { private var Sibling:MochiDigits; private var Fragment:Number; private var Encoder:Number; public function MochiDigits(_arg1:Number=0, _arg2:uint=0):void{ Encoder = 0; setValue(_arg1, _arg2); } public function set value(_arg1:Number):void{ setValue(_arg1); } public function reencode():void{ var _local1:uint; _local1 = int((2147483647 * Math.random())); Fragment = (Fragment ^ (_local1 ^ Encoder)); Encoder = _local1; } public function toString():String{ var _local1:String; _local1 = String.fromCharCode((Fragment ^ Encoder)); if (Sibling != null){ _local1 = (_local1 + Sibling.toString()); }; return (_local1); } public function get value():Number{ return (Number(this.toString())); } public function setValue(_arg1:Number=0, _arg2:uint=0):void{ var _local3:String; _local3 = _arg1.toString(); var _temp1 = _arg2; _arg2 = (_arg2 + 1); Fragment = (_local3.charCodeAt(_temp1) ^ Encoder); if (_arg2 < _local3.length){ Sibling = new MochiDigits(_arg1, _arg2); } else { Sibling = null; }; reencode(); } public function addValue(_arg1:Number):void{ value = (value + _arg1); } } }//package com.mochi.as3
Section 20
//MochiScores (com.mochi.as3.MochiScores) package com.mochi.as3 { import flash.text.*; import flash.display.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var n:Number; 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; }; } else { if ((options.score is MochiDigits)){ options.score = options.score.value; }; }; n = Number(options.score); if (isNaN(n)){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'")); } else { if ((((n == Number.NEGATIVE_INFINITY)) || ((n == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite")); } else { if (Math.floor(n) != n){ trace((("WARNING: Submitted score '" + options.score) + "' will be truncated")); }; options.score = n; }; }; }; 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; }; }; trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal"); 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{ _arg1 = Number(_arg1); if (isNaN(_arg1)){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is 'Not a Number'")); } else { if ((((_arg1 == Number.NEGATIVE_INFINITY)) || ((_arg1 == Number.POSITIVE_INFINITY)))){ trace((("ERROR: Submitted score '" + String(_arg1)) + "' will be rejected, score is an infinite")); } else { if (Math.floor(_arg1) != _arg1){ trace((("WARNING: Submitted score '" + String(_arg1)) + "' will be truncated")); }; _arg1 = Number(_arg1); }; }; 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 com.mochi.as3
Section 21
//MochiServices (com.mochi.as3.MochiServices) package com.mochi.as3 { import flash.events.*; import flash.display.*; import flash.geom.*; 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; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; private static var _clip:MovieClip; private static var _loader:Loader; private static var _id:String; private static var _listenChannel:LocalConnection; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _connecting:Boolean = false; public static var onError:Object; private static var _listenChannelName:String = "__ms_"; private static var _servicesURL:String = "http://www.mochiads.com/static/lib/services/services.swf"; public static var netup:Boolean = true; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } 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); }; }; }; }; }; } 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++; }; }; } 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); } 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); } 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 vars:Object; var avm1Click:DisplayObject; var s:String; var i:Number; var x:String; var req:URLRequest; var loader:Loader; var setURL:Function; var err:Function; var complete: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(); setURL = function (_arg1:String):void{ var _local2:Rectangle; if (avm1Click){ btn.removeChild(avm1Click); }; avm1Click = clickMovie(_arg1, onClick); _local2 = btn.getBounds(btn); btn.addChild(avm1Click); avm1Click.x = _local2.x; avm1Click.y = _local2.y; avm1Click.scaleX = (0.01 * _local2.width); avm1Click.scaleY = (0.01 * _local2.height); }; err = function (_arg1:Object):void{ netup = false; _arg1.target.removeEventListener(_arg1.type, arguments.callee); setURL(burl); }; complete = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); }; if (netup){ setURL((url + s)); } else { setURL(burl); }; if (!((netupAttempted) || (_connected))){ netupAttempted = true; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.load(req); }; } 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(); } catch(error:Error) { }; }; if (_timer != null){ try { _timer.stop(); } catch(error:Error) { }; }; } public static function allowDomains(_arg1:String):String{ var _local2:String; if (Security.sandboxType != "application"){ Security.allowDomain("*"); Security.allowInsecureDomain("*"); }; if (_arg1.indexOf("http://") != -1){ _local2 = _arg1.split("/")[2].split(":")[0]; if (Security.sandboxType != "application"){ Security.allowDomain(_local2); Security.allowInsecureDomain(_local2); }; }; return (_local2); } public static function getVersion():String{ return ("3.0"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop); if (_clip.parent != null){ Sprite(_clip.parent).removeChild(_clip); }; } private static function onStatus(_arg1:StatusEvent):void{ switch (_arg1.level){ case "error": _connected = false; _listenChannel.connect(_listenChannelName); break; }; } public static function get id():String{ return (_id); } private static function urlOptions(_arg1:Object):Object{ var _local2:Object; var _local3:String; var _local4:Array; var _local5:Number; var _local6:Array; _local2 = {}; _local3 = _arg1.loaderInfo.parameters.mochiad_options; if (_local3){ _local4 = _local3.split("&"); _local5 = 0; while (_local5 < _local4.length) { _local6 = _local4[_local5].split("="); _local2[unescape(_local6[0])] = unescape(_local6[1]); _local5++; }; }; return (_local2); } 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 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) { }; }; }; }; } 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}); _listenChannel.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"); }; trace("connected!"); _connecting = false; _connected = true; 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..."); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var clipname:String; var f:Function; var req:URLRequest; var vars:URLVariables; var id = _arg1; var clip = _arg2; clipname = ("_mochiservices_com_" + id); if (_clip != null){ return (_clip); }; if (!MochiServices.isNetworkAvailable()){ return (null); }; if (urlOptions(clip).servicesURL != undefined){ _servicesURL = urlOptions(clip).servicesURL; }; MochiServices.allowDomains(_servicesURL); _clip = createEmptyMovieClip(clip, clipname, 10336, false); _loader = new Loader(); f = function (_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); MochiServices.disconnect(); MochiServices.onError("IOError"); }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor((Math.random() * 99999)))); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); req = new URLRequest(_servicesURL); vars = new URLVariables(); vars.listenLC = _listenChannelName; vars.mochiad_options = clip.loaderInfo.parameters.mochiad_options; if (widget){ vars.widget = true; }; req.data = vars; listen(); _loader.load(req); _clip.addChild(_loader); _clip._mochiservices_com = _loader; _sendChannel = new LocalConnection(); _clip._queue = []; _clip._nextcallbackID = 0; _clip._callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function get clip():Object{ return (_container); } 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 (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load. (timeout)"); MochiServices.disconnect(); MochiServices.onError("IOError"); }; } } }//package com.mochi.as3
Section 22
//Bounce (fl.transitions.easing.Bounce) package fl.transitions.easing { public class Bounce { public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); if (_arg1 < (1 / 2.75)){ return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2)); }; if (_arg1 < (2 / 2.75)){ _arg1 = (_arg1 - (1.5 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2)); }; if (_arg1 < (2.5 / 2.75)){ _arg1 = (_arg1 - (2.25 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2)); }; _arg1 = (_arg1 - (2.625 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 < (_arg4 / 2)){ return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2)); }; return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2)); } } }//package fl.transitions.easing
Section 23
//Strong (fl.transitions.easing.Strong) package fl.transitions.easing { public class Strong { public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2)); } } }//package fl.transitions.easing
Section 24
//Tween (fl.transitions.Tween) package fl.transitions { import flash.events.*; import flash.display.*; import flash.utils.*; public class Tween extends EventDispatcher { private var _position:Number;// = NAN public var prevTime:Number;// = NAN public var prevPos:Number;// = NAN public var isPlaying:Boolean;// = false public var begin:Number;// = NAN private var _fps:Number;// = NAN private var _time:Number;// = NAN public var change:Number;// = NAN private var _finish:Number;// = NAN public var looping:Boolean;// = false private var _intervalID:uint;// = 0 public var func:Function; private var _timer:Timer;// = null private var _startTime:Number;// = NAN public var prop:String;// = "" private var _duration:Number;// = NAN public var obj:Object;// = null public var useSeconds:Boolean;// = false protected static var _mc:MovieClip = new MovieClip(); public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){ isPlaying = false; obj = null; prop = ""; func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); }; begin = NaN; change = NaN; useSeconds = false; prevTime = NaN; prevPos = NaN; looping = false; _duration = NaN; _time = NaN; _fps = NaN; _position = NaN; _startTime = NaN; _intervalID = 0; _finish = NaN; _timer = null; super(); if (!arguments.length){ return; }; this.obj = _arg1; this.prop = _arg2; this.begin = _arg4; this.position = _arg4; this.duration = _arg6; this.useSeconds = _arg7; if ((_arg3 is Function)){ this.func = _arg3; }; this.finish = _arg5; this._timer = new Timer(100); this.start(); } public function continueTo(_arg1:Number, _arg2:Number):void{ this.begin = this.position; this.finish = _arg1; if (!isNaN(_arg2)){ this.duration = _arg2; }; this.start(); } public function stop():void{ this.stopEnterFrame(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position)); } private function fixTime():void{ if (this.useSeconds){ this._startTime = (getTimer() - (this._time * 1000)); }; } public function set FPS(_arg1:Number):void{ var _local2:Boolean; _local2 = this.isPlaying; this.stopEnterFrame(); this._fps = _arg1; if (_local2){ this.startEnterFrame(); }; } public function get finish():Number{ return ((this.begin + this.change)); } public function get duration():Number{ return (this._duration); } protected function startEnterFrame():void{ var _local1:Number; if (isNaN(this._fps)){ _mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true); } else { _local1 = (1000 / this._fps); this._timer.delay = _local1; this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true); this._timer.start(); }; this.isPlaying = true; } public function set time(_arg1:Number):void{ this.prevTime = this._time; if (_arg1 > this.duration){ if (this.looping){ this.rewind((_arg1 - this._duration)); this.update(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position)); } else { if (this.useSeconds){ this._time = this._duration; this.update(); }; this.stop(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position)); }; } else { if (_arg1 < 0){ this.rewind(); this.update(); } else { this._time = _arg1; this.update(); }; }; } protected function stopEnterFrame():void{ if (isNaN(this._fps)){ _mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame); } else { this._timer.stop(); }; this.isPlaying = false; } public function getPosition(_arg1:Number=NaN):Number{ if (isNaN(_arg1)){ _arg1 = this._time; }; return (this.func(_arg1, this.begin, this.change, this._duration)); } public function set finish(_arg1:Number):void{ this.change = (_arg1 - this.begin); } public function set duration(_arg1:Number):void{ this._duration = ((_arg1)<=0) ? Infinity : _arg1; } public function setPosition(_arg1:Number):void{ this.prevPos = this._position; if (this.prop.length){ this.obj[this.prop] = (this._position = _arg1); }; this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position)); } public function resume():void{ this.fixTime(); this.startEnterFrame(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position)); } public function fforward():void{ this.time = this._duration; this.fixTime(); } protected function onEnterFrame(_arg1:Event):void{ this.nextFrame(); } public function get position():Number{ return (this.getPosition(this._time)); } public function yoyo():void{ this.continueTo(this.begin, this.time); } public function nextFrame():void{ if (this.useSeconds){ this.time = ((getTimer() - this._startTime) / 1000); } else { this.time = (this._time + 1); }; } protected function timerHandler(_arg1:TimerEvent):void{ this.nextFrame(); _arg1.updateAfterEvent(); } public function get FPS():Number{ return (this._fps); } public function rewind(_arg1:Number=0):void{ this._time = _arg1; this.fixTime(); this.update(); } public function set position(_arg1:Number):void{ this.setPosition(_arg1); } public function get time():Number{ return (this._time); } private function update():void{ this.setPosition(this.getPosition(this._time)); } public function start():void{ this.rewind(); this.startEnterFrame(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position)); } public function prevFrame():void{ if (!this.useSeconds){ this.time = (this._time - 1); }; } } }//package fl.transitions
Section 25
//TweenEvent (fl.transitions.TweenEvent) package fl.transitions { import flash.events.*; public class TweenEvent extends Event { public var time:Number;// = NAN public var position:Number;// = NAN public static const MOTION_START:String = "motionStart"; public static const MOTION_STOP:String = "motionStop"; public static const MOTION_LOOP:String = "motionLoop"; public static const MOTION_CHANGE:String = "motionChange"; public static const MOTION_FINISH:String = "motionFinish"; public static const MOTION_RESUME:String = "motionResume"; public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){ time = NaN; position = NaN; super(_arg1, _arg4, _arg5); this.time = _arg2; this.position = _arg3; } override public function clone():Event{ return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable)); } } }//package fl.transitions
Section 26
//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.1.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 27
//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.1.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 28
//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.1.0"; } }//package mx.core
Section 29
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 30
//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 31
//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 32
//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 33
//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.1.0"; } }//package mx.core
Section 34
//UIComponentGlobals (mx.core.UIComponentGlobals) package mx.core { import flash.display.*; import flash.geom.*; import mx.managers.*; public class UIComponentGlobals { mx_internal static var callLaterSuspendCount:int = 0; mx_internal static var layoutManager:ILayoutManager; mx_internal static var nextFocusObject:InteractiveObject; mx_internal static var designTime:Boolean = false; mx_internal static var tempMatrix:Matrix = new Matrix(); mx_internal static var callLaterDispatcherCount:int = 0; } }//package mx.core
Section 35
//Bounce (mx.effects.easing.Bounce) package mx.effects.easing { public class Bounce { mx_internal static const VERSION:String = "2.0.1.0"; public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ if (_arg1 < (_arg4 / 2)){ return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2)); }; return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2)); } public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); if (_arg1 < (1 / 2.75)){ return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2)); }; if (_arg1 < (2 / 2.75)){ _arg1 = (_arg1 - (1.5 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2)); }; if (_arg1 < (2.5 / 2.75)){ _arg1 = (_arg1 - (2.25 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2)); }; _arg1 = (_arg1 - (2.625 / 2.75)); return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2)); } } }//package mx.effects.easing
Section 36
//Elastic (mx.effects.easing.Elastic) package mx.effects.easing { public class Elastic { mx_internal static const VERSION:String = "2.0.1.0"; public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; if (!_arg6){ _arg6 = (_arg4 * 0.3); }; if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){ _arg5 = _arg3; _local7 = (_arg6 / 4); } else { _local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5))); }; --_arg1; return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 == 2){ return ((_arg2 + _arg3)); }; if (!_arg6){ _arg6 = (_arg4 * (0.3 * 1.5)); }; if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){ _arg5 = _arg3; _local7 = (_arg6 / 4); } else { _local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5))); }; if (_arg1 < 1){ --_arg1; return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2)); }; --_arg1; return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2)); } public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{ var _local7:Number; if (_arg1 == 0){ return (_arg2); }; _arg1 = (_arg1 / _arg4); if (_arg1 == 1){ return ((_arg2 + _arg3)); }; if (!_arg6){ _arg6 = (_arg4 * 0.3); }; if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){ _arg5 = _arg3; _local7 = (_arg6 / 4); } else { _local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5))); }; return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2)); } } }//package mx.effects.easing
Section 37
//Tween (mx.effects.Tween) package mx.effects { import flash.events.*; import mx.core.*; import flash.utils.*; import mx.events.*; public class Tween extends EventDispatcher { private var started:Boolean;// = false public var duration:Number;// = 3000 private var id:int; private var arrayMode:Boolean; private var _isPlaying:Boolean;// = true private var startValue:Object; public var listener:Object; private var userEquation:Function; private var previousUpdateTime:Number; mx_internal var needToLayout:Boolean;// = false private var updateFunction:Function; private var _doSeek:Boolean;// = false mx_internal var startTime:Number; private var endFunction:Function; private var endValue:Object; private var _doReverse:Boolean;// = false private var _playheadTime:Number;// = 0 private var _invertValues:Boolean;// = false private var maxDelay:Number;// = 87.5 mx_internal static const VERSION:String = "2.0.1.0"; private static var timer:Timer = null; private static var interval:Number = 10; private static var activeTweens:Array = []; mx_internal static var intervalTime:Number = NAN; public function Tween(_arg1:Object, _arg2:Object, _arg3:Object, _arg4:Number=-1, _arg5:Number=-1){ needToLayout = false; maxDelay = 87.5; _doSeek = false; _isPlaying = true; _doReverse = false; userEquation = defaultEasingFunction; started = false; duration = 3000; _playheadTime = 0; _invertValues = false; super(); if (!_arg1){ return; }; if ((_arg2 is Array)){ arrayMode = true; }; this.listener = _arg1; this.startValue = _arg2; this.endValue = _arg3; if (((!(isNaN(_arg4))) && (!((_arg4 == -1))))){ this.duration = _arg4; }; if (((!(isNaN(_arg5))) && (!((_arg5 == -1))))){ maxDelay = (1000 / _arg5); }; if (_arg4 == 0){ endTween(); } else { Tween.addTween(this); }; } public function pause():void{ _isPlaying = false; } mx_internal function get playheadTime():Number{ return (_playheadTime); } mx_internal function get playReversed():Boolean{ return (_invertValues); } public function resume():void{ _isPlaying = true; startTime = (intervalTime - _playheadTime); if (_doReverse){ reverse(); _doReverse = false; }; } public function setTweenHandlers(_arg1:Function, _arg2:Function):void{ this.updateFunction = _arg1; this.endFunction = _arg2; } mx_internal function set playReversed(_arg1:Boolean):void{ _invertValues = _arg1; } public function set easingFunction(_arg1:Function):void{ userEquation = _arg1; } private function defaultEasingFunction(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 / 2) * (Math.sin((Math.PI * ((_arg1 / _arg4) - 0.5))) + 1)) + _arg2)); } public function endTween():void{ var _local1:TweenEvent; var _local2:Object; _local1 = new TweenEvent(TweenEvent.TWEEN_END); _local2 = getCurrentValue(duration); _local1.value = _local2; dispatchEvent(_local1); if (endFunction != null){ endFunction(_local2); } else { listener.onTweenEnd(_local2); }; Tween.removeTweenAt(id); } public function reverse():void{ if (_isPlaying){ _doReverse = false; seek((duration - _playheadTime)); _invertValues = !(_invertValues); } else { _doReverse = !(_doReverse); }; } mx_internal function doInterval():Boolean{ var _local1:Boolean; var _local2:Number; var _local3:Object; var _local4:TweenEvent; var _local5:TweenEvent; _local1 = false; previousUpdateTime = intervalTime; if (((_isPlaying) || (_doSeek))){ _local2 = (intervalTime - startTime); _playheadTime = _local2; _local3 = getCurrentValue(_local2); if ((((_local2 >= duration)) && (!(_doSeek)))){ endTween(); _local1 = true; } else { if (!started){ _local5 = new TweenEvent(TweenEvent.TWEEN_START); dispatchEvent(_local5); started = true; }; _local4 = new TweenEvent(TweenEvent.TWEEN_UPDATE); _local4.value = _local3; dispatchEvent(_local4); if (updateFunction != null){ updateFunction(_local3); } else { listener.onTweenUpdate(_local3); }; }; _doSeek = false; }; return (_local1); } public function seek(_arg1:Number):void{ var _local2:Number; _local2 = intervalTime; previousUpdateTime = _local2; startTime = (_local2 - _arg1); _doSeek = true; } mx_internal function getCurrentValue(_arg1:Number):Object{ var _local2:Array; var _local3:int; var _local4:int; if (duration == 0){ return (endValue); }; if (_invertValues){ _arg1 = (duration - _arg1); }; if (arrayMode){ _local2 = []; _local3 = startValue.length; _local4 = 0; while (_local4 < _local3) { _local2[_local4] = userEquation(_arg1, startValue[_local4], (endValue[_local4] - startValue[_local4]), duration); _local4++; }; return (_local2); //unresolved jump }; return (userEquation(_arg1, startValue, (Number(endValue) - Number(startValue)), duration)); } mx_internal static function removeTween(_arg1:Tween):void{ removeTweenAt(_arg1.id); } private static function addTween(_arg1:Tween):void{ _arg1.id = activeTweens.length; activeTweens.push(_arg1); if (!timer){ timer = new Timer(interval); timer.addEventListener(TimerEvent.TIMER, timerHandler); timer.start(); } else { timer.start(); }; if (isNaN(intervalTime)){ intervalTime = getTimer(); }; _arg1.startTime = (_arg1.previousUpdateTime = intervalTime); } private static function timerHandler(_arg1:TimerEvent):void{ var _local2:Boolean; var _local3:Number; var _local4:int; var _local5:int; var _local6:Tween; _local2 = false; _local3 = intervalTime; intervalTime = getTimer(); _local4 = activeTweens.length; _local5 = _local4; while (_local5 >= 0) { _local6 = Tween(activeTweens[_local5]); if (_local6){ _local6.needToLayout = false; _local6.doInterval(); if (_local6.needToLayout){ _local2 = true; }; }; _local5--; }; if (_local2){ UIComponentGlobals.layoutManager.validateNow(); }; _arg1.updateAfterEvent(); } private static function removeTweenAt(_arg1:int):void{ var _local2:int; var _local3:int; var _local4:Tween; if ((((_arg1 >= activeTweens.length)) || ((_arg1 < 0)))){ return; }; activeTweens.splice(_arg1, 1); _local2 = activeTweens.length; _local3 = _arg1; while (_local3 < _local2) { _local4 = Tween(activeTweens[_local3]); _local4.id--; _local3++; }; if (_local2 == 0){ intervalTime = NaN; timer.reset(); }; } } }//package mx.effects
Section 38
//TweenEvent (mx.events.TweenEvent) package mx.events { import flash.events.*; public class TweenEvent extends Event { public var value:Object; public static const TWEEN_END:String = "tweenEnd"; mx_internal static const VERSION:String = "2.0.1.0"; public static const TWEEN_UPDATE:String = "tweenUpdate"; public static const TWEEN_START:String = "tweenStart"; public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null){ super(_arg1, _arg2, _arg3); this.value = _arg4; } override public function clone():Event{ return (new TweenEvent(type, bubbles, cancelable, value)); } } }//package mx.events
Section 39
//ILayoutManager (mx.managers.ILayoutManager) package mx.managers { import flash.events.*; public interface ILayoutManager extends IEventDispatcher { function invalidateDisplayList(_arg1:ILayoutManagerClient):void; function validateClient(_arg1:ILayoutManagerClient, _arg2:Boolean=false):void; function invalidateProperties(_arg1:ILayoutManagerClient):void; function isInvalid():Boolean; function validateNow():void; function set usePhasedInstantiation(_arg1:Boolean):void; function invalidateSize(_arg1:ILayoutManagerClient):void; function get usePhasedInstantiation():Boolean; } }//package mx.managers
Section 40
//ILayoutManagerClient (mx.managers.ILayoutManagerClient) package mx.managers { import flash.events.*; public interface ILayoutManagerClient extends IEventDispatcher { function set updateCompletePendingFlag(_arg1:Boolean):void; function set initialized(_arg1:Boolean):void; function validateProperties():void; function get nestLevel():int; function get updateCompletePendingFlag():Boolean; function validateDisplayList():void; function set processedDescriptors(_arg1:Boolean):void; function get processedDescriptors():Boolean; function validateSize(_arg1:Boolean=false):void; function set nestLevel(_arg1:int):void; function get initialized():Boolean; } }//package mx.managers
Section 41
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "2.0.1.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 42
//AGButton (AGButton) package { import flash.display.*; public dynamic class AGButton extends SimpleButton { } }//package
Section 43
//AGloader (AGloader) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.utils.*; import flash.net.*; import flash.system.*; import flash.external.*; public class AGloader { private var assets:Array; private var dataRequest:URLRequest; private var modules:Array; private var sequence:Array; private var dataXML:XML; private var index:int;// = 0 private var modContext:LoaderContext; private var dataLoader:URLLoader; private var modLoadInfo:LoaderInfo; private var modRequest:URLRequest; private var modLoader:Loader; private var toolkit:Object; public function AGloader(_arg1:Object):void{ index = 0; modules = []; assets = []; sequence = []; dataLoader = new URLLoader(); dataRequest = new URLRequest(); modLoader = new Loader(); modContext = new LoaderContext(); modRequest = new URLRequest(); super(); toolkit = _arg1; } private function initAsset(_arg1:Event):void{ toolkit[assets[index].classname].removeEventListener(Event.INIT, initAsset); if (index < (assets.length - 1)){ index++; loadAsset(); } else { index = 0; loadSequence(); }; } public function initLoader():void{ initLoadData(); } private function parseLoadData(_arg1:Event):void{ var _local2:XMLList; var _local3:XMLList; var _local4:*; var _local5:XMLList; var _local6:*; var _local7:XMLList; var _local8:*; var _local9:XMLList; var _local10:*; var _local11:XMLList; var _local12:XMLList; var _local13:XMLList; var _local14:XMLList; var _local15:XMLList; var _local16:XMLList; dataXML = new XML(dataLoader.data); if (toolkit.AGtheme == null){ toolkit.AGtheme = dataXML.elements("theme"); }; if (!toolkit.AGdev){ toolkit.AGdev = Boolean(dataXML.elements("devpanel")); }; toolkit.AGcompVersion = dataXML.elements("compVersion"); toolkit.AGmoduleVersion = dataXML.elements("moduleVersion"); toolkit.AGsoundOn = ((dataXML.elements("sounds"))=="on") ? true : false; _local2 = dataXML.child("nav"); toolkit.AGdomain = _local2.elements("domain"); toolkit.CSdomain = _local2.elements("community"); toolkit.HSdomain = _local2.elements("highscore"); toolkit.AGassetPath = _local2.elements("assetpath"); toolkit.AGmodulePath = _local2.elements("modulepath"); toolkit.AGimagePath = _local2.elements("avatarpath"); toolkit.AGprofilePath = _local2.elements("profilepath"); toolkit.AGiconPath = _local2.elements("iconpath"); toolkit.AGallowDomain(toolkit.AGdomain); toolkit.AGallowDomain(toolkit.CSdomain); toolkit.AGallowDomain(toolkit.HSdomain); _local3 = dataXML.child("modules"); _local4 = 0; while (_local4 < _local3.child("*").length()) { modules[_local4] = {filename:_local3.child(_local4).@filename, classname:_local3.child(_local4).@classname, propname:_local3.child(_local4).@propname}; _local4++; }; _local5 = dataXML.child("assets"); _local6 = 0; while (_local6 < _local5.child("*").length()) { assets[_local6] = {classname:_local5.child(_local6).@classname, methodname:_local5.child(_local6).@methodname}; _local6++; }; _local7 = dataXML.child("sequence"); _local8 = 0; while (_local8 < _local7.child("*").length()) { sequence[_local8] = {classname:_local7.child(_local8).@classname, methodname:_local7.child(_local8).@methodname}; _local8++; }; _local9 = dataXML.child("advertising"); _local10 = 0; while (_local10 < _local9.child("*").length()) { if (toolkit.AGadvert[_local10] != undefined){ } else { toolkit.AGadvert[_local10] = {assetPath:_local9.child(_local10).@assetPath, navPath:_local9.child(_local10).@navPath}; }; _local10++; }; _local11 = dataXML.child("messages"); _local12 = _local11.child("score"); toolkit.AGscoreMessage.high = _local12.elements("high"); toolkit.AGscoreMessage.best = _local12.elements("best"); toolkit.AGscoreMessage.tied = _local12.elements("tied"); toolkit.AGscoreMessage.less = _local12.elements("less"); toolkit.AGscoreMessage.initial = _local12.elements("initial"); toolkit.AGscoreMessage.logout = _local12.elements("logout"); toolkit.AGscoreMessage.zero = _local12.elements("zero"); _local13 = _local11.child("login"); toolkit.AGloginMessage.ondom = _local13.elements("ondom"); toolkit.AGloginMessage.offdom = _local13.elements("offdom"); _local14 = _local11.child("save"); toolkit.AGsaveMessage.screen = _local14.elements("screen"); toolkit.AGsaveMessage.submit = _local14.elements("submit"); _local15 = _local11.child("notify"); toolkit.AGnotifyMessage.screen = _local15.elements("screen"); toolkit.AGnotifyMessage.submit = _local15.elements("submit"); _local16 = _local11.child("error"); toolkit.AGerrorMessage.msg = _local16.elements("msg"); toolkit.AGerrorMessage.sub = _local16.elements("sub"); loadModule(); } private function initModule(_arg1:Event):void{ var _local2:Class; modLoadInfo.removeEventListener(Event.COMPLETE, initModule); _local2 = (modLoadInfo.applicationDomain.getDefinition(modules[index].classname) as Class); toolkit[modules[index].propname] = new _local2(toolkit); if (index < (modules.length - 1)){ index++; loadModule(); } else { index = 0; loadAsset(); }; } private function loadSequence():void{ toolkit[sequence[index].classname].addEventListener(Event.INIT, initSequence); var _local1 = toolkit[sequence[index].classname]; _local1[sequence[index].methodname](); } private function initLoadData():void{ var _local1:String; var _local2:String; _local1 = "config/AGloadData1.0.xml"; _local2 = (("http://" + toolkit.AGdomain) + "/sdk/hs/as3/config/AGloadData1.0.xml"); dataRequest.url = ((toolkit.AGassetLocation)=="remote") ? _local2 : _local1; dataLoader.addEventListener(Event.COMPLETE, parseLoadData); dataLoader.load(dataRequest); } private function loadAsset():void{ toolkit[assets[index].classname].addEventListener(Event.INIT, initAsset); var _local1 = toolkit[assets[index].classname]; _local1[assets[index].methodname](); } private function loadModule():void{ var _local1:*; var _local2:*; _local1 = ((("modules/" + modules[index].propname) + "/") + modules[index].filename); _local2 = ((("http://" + toolkit.AGdomain) + toolkit.AGmodulePath) + modules[index].filename); modRequest.url = ((toolkit.AGassetLocation)=="remote") ? _local2 : _local1; modContext.applicationDomain = ApplicationDomain.currentDomain; modLoadInfo = modLoader.contentLoaderInfo; modLoadInfo.addEventListener(Event.COMPLETE, initModule); modLoader.load(modRequest, modContext); } private function initSequence(_arg1:Event):void{ toolkit[sequence[index].classname].removeEventListener(Event.INIT, initSequence); if (index < (sequence.length - 1)){ index++; loadSequence(); } else { toolkit.gameInit(); }; } } }//package
Section 44
//AGtoolkit (AGtoolkit) package { import flash.events.*; import flash.display.*; import flash.media.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class AGtoolkit extends MovieClip { public var AGerrorMessage:Object; public var loader:AGloader; public var gameAuthor:String; public var gameInit:Function;// = null public var AGnotifyMessage:Object; public var AGdev:Boolean;// = false public var AGscoreMessage:Object; public var AGassetLocation:String;// = "remote" public var AGmoduleVersion:String;// = "1.0" public var AGdomain:String;// = "www.addictinggames.com" public var AGiconPath:String;// = null public var AGsoundOn:Boolean;// = false public var screen:Object; public var AGfileLocation:String;// = null public var gameID:String; public var AGimagePath:String;// = null public var AGgameoverScreenControl:Boolean;// = true public var AGcompVersion:String;// = "1.0" public var gameWidth:int; public var comm:Object; public var gamePause:Function;// = null public var gameMute:Function;// = null public var doc:Object; public var CSdomain:String;// = null public var AGdomains:Array; public var AGmodulePath:String;// = null public var AGtheme:String;// = null public var AGadvert:Array; public var toolbar:Object; public var AGloginMessage:Object; public var AGprofilePath:String;// = null public var gameTitle:String; public var AGpauseScreenControl:Boolean;// = true public var HSdomain:String;// = null public var gameVolume:Function;// = null public var gameHeight:int; public var gameRestart:Function;// = null public var gameScore:Object; public var AGassetPath:String;// = null public var gameStats:Array; public var AGsaveMessage:Object; public var AGflashVersion:String;// = "AS3" public function AGtoolkit(_arg1:Object, _arg2:String, _arg3:String, _arg4:String, _arg5:String):void{ gameInit = null; gameRestart = null; gamePause = null; gameMute = null; gameVolume = null; AGdomain = "www.addictinggames.com"; HSdomain = null; CSdomain = null; AGassetPath = null; AGmodulePath = null; AGimagePath = null; AGprofilePath = null; AGiconPath = null; AGfileLocation = null; AGassetLocation = "remote"; AGflashVersion = "AS3"; AGcompVersion = "1.0"; AGmoduleVersion = "1.0"; AGtheme = null; AGsoundOn = false; AGdomains = []; AGpauseScreenControl = true; gameScore = {prop:null, label:null, type:null, precision:0, value:0, tstamp:0}; gameStats = []; AGgameoverScreenControl = true; AGscoreMessage = {high:"You set the High Score!", best:"You set a new personal best!", tied:"You tied your best score!", less:"Good game, but not your best!", initial:"Save your first score!", logout:" ", zero:" "}; AGloginMessage = {ondom:"Want to save your score?", offdom:"Want to save your score?"}; AGsaveMessage = {screen:"Want to save your score?", submit:"Your score has been saved!"}; AGnotifyMessage = {screen:"Congratulations! You just beat # Friends!", submit:"Your Friends have been served!"}; AGerrorMessage = {msg:"Sorry, an error occurred", sub:"please return to your game"}; AGadvert = []; AGdev = false; super(); doc = _arg1; gameID = _arg2; gameTitle = _arg3; gameAuthor = _arg4; gameWidth = doc.stage.stageWidth; gameHeight = doc.stage.stageHeight; doc.stage.scaleMode = StageScaleMode.NO_SCALE; AGfileLocation = doc.loaderInfo.url; loader = new AGloader(this); if (_arg5 != null){ AGdomain = _arg5; }; AGallowDomain(AGdomain); AGallowDomain("cdn.gigya.com"); } public function AGsetTeaser(_arg1:String, _arg2:String):void{ AGadvert[0] = {assetPath:_arg1, navPath:_arg2}; } public function AGpauseScreen(_arg1:Boolean):void{ AGpauseScreenControl = _arg1; } public function AGgameScore(_arg1:String, _arg2:String, _arg3:String, _arg4:Number=0):void{ gameScore.prop = _arg1; gameScore.label = _arg2; gameScore.type = _arg3; if (_arg4 != 0){ gameScore.precision = _arg4; }; } public function AGaddAdvert(_arg1:String, _arg2:String):void{ AGadvert.push({assetPath:_arg1, navPath:_arg2}); } public function AGsetTheme(_arg1:String):void{ AGtheme = _arg1; } public function AGaccess(_arg1:KeyboardEvent):void{ if (!AGdev){ return; }; if (_arg1.keyCode == 187){ if (screen.contains(screen.AGdevPanel)){ screen.removeChild(screen.AGdevPanel); } else { screen.addChild(screen.AGdevPanel); }; }; if (_arg1.keyCode == 189){ if (screen.contains(screen.AGgamePanel)){ screen.removeChild(screen.AGgamePanel); } else { screen.addChild(screen.AGgamePanel); }; }; } public function AGinitToolkit(_arg1:Function):void{ gameInit = _arg1; loader.initLoader(); } public function AGsubmitReplay():void{ comm.initSubmitReplay(); } public function dataOutput(_arg1, _arg2):void{ if (AGdev){ screen.AGdevPanel.dataOutput(_arg1, _arg2); }; } public function AGgameStatsStat(_arg1:String, _arg2:String, _arg3:String, _arg4:Number=0):void{ var _local5:Object; _local5 = {prop:null, label:null, type:null, precision:0, value:0, tstamp:0}; _local5.prop = _arg1; _local5.label = _arg2; _local5.type = _arg3; if (_arg4 != 0){ _local5.precision = _arg4; }; gameStats.push(_local5); } public function AGsetToolbar(_arg1:String, _arg2:Function):void{ switch (_arg1){ case "restart": gameRestart = _arg2; break; case "pause": gamePause = _arg2; break; case "mute": gameMute = _arg2; break; case "volume": gameVolume = _arg2; break; }; } public function AGgetUser(_arg1:Function):void{ comm.DEVgetUser(_arg1); } public function AGgameoverScreen(_arg1:Boolean):void{ AGgameoverScreenControl = _arg1; } public function AGsubmitScore(_arg1:Function=null):void{ gameRestart = ((_arg1)==null) ? gameRestart : _arg1; gameScore.tstamp = new Date().getTime(); gameScore.value = doc[gameScore.prop]; screen.initGameOverSequence(); } public function AGallowDomain(_arg1:String):void{ AGdomains.push(_arg1); Security.allowDomain(_arg1, ("http://" + _arg1), ("https://" + _arg1)); Security.allowInsecureDomain(_arg1, ("http://" + _arg1), ("https://" + _arg1)); } public function AGsetGameMessage(_arg1:String, _arg2:String, _arg3:String):void{ switch (_arg1){ case "score": AGscoreMessage[_arg2] = _arg3; break; case "login": AGloginMessage[_arg2] = _arg3; break; case "save": AGsaveMessage[_arg2] = _arg3; break; case "notify": AGnotifyMessage[_arg2] = _arg3; break; case "error": AGerrorMessage[_arg2] = _arg3; break; }; } public function dataTrace(_arg1):void{ if (AGdev){ screen.AGdevPanel.dataTrace(_arg1); }; } public function AGgetLeaderboard(_arg1:Function, _arg2:String, _arg3:String):void{ comm.DEVgetLeaderboard(_arg1, _arg2, _arg3); } public function AGgameover(_arg1:Function=null):void{ gameRestart = ((_arg1)==null) ? gameRestart : _arg1; gameScore.tstamp = new Date().getTime(); gameScore.value = doc[gameScore.prop]; if (AGgameoverScreenControl){ screen.initGameOverScreen(); }; } } }//package
Section 45
//ContinueCourseDialog (ContinueCourseDialog) package { import flash.events.*; import flash.display.*; import flash.text.*; import mx.effects.*; import com.GameEngine.Utils.*; import mx.effects.easing.*; import flash.geom.*; import flash.filters.*; public class ContinueCourseDialog extends Sprite { public var _startOverCallback:Function; public var _titleField:TextField; public var _continueCallback:Function; private var _tweenDoneCallback:Function; public var _parent:DisplayObjectContainer; public var _backScreen:Sprite; public var _backDrop:Sprite; public var _startOverButton:GameButton; private var _showTween:Tween; public var _continueButton:GameButton; public function ContinueCourseDialog(){ var _local1:Array; super(); this._backScreen = new Sprite(); this._backScreen.graphics.beginFill(0, 0.5); this._backScreen.graphics.drawRect(0, 0, 640, 480); this._backScreen.graphics.endFill(); this.addChild(_backScreen); this._backDrop = new Sprite(); this._backDrop.addChild(SpriteFactory.makeBorderedFrame(500, 300, 30, 66115, 134773, 0.75)); this._titleField = new TextField(); this._titleField.defaultTextFormat = new TextFormat("Abbess", 50, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); this._titleField.embedFonts = true; this._titleField.antiAliasType = AntiAliasType.ADVANCED; this._titleField.selectable = false; this._titleField.mouseEnabled = false; this._titleField.text = ""; this._titleField.alpha = 0.65; this._titleField.width = 500; this._titleField.height = 120; this._titleField.y = 25; _local1 = this._titleField.filters; _local1.push(new DropShadowFilter(4, 135)); this._titleField.filters = _local1; this._continueButton = new GameButton("Continue", null, 400, 60, onContinueClick); this._continueButton.x = 50; this._continueButton.y = 140; this._continueButton.enabled = false; this._backDrop.addChild(this._continueButton); this._startOverButton = new GameButton("Start Over", null, 300, 40, onStartOverClick); this._startOverButton.x = 100; this._startOverButton.y = 230; this._startOverButton.enabled = false; this._backDrop.addChild(this._startOverButton); this._backDrop.addChild(this._titleField); this._backDrop.x = ((640 - this._backDrop.width) * 0.5); addChild(this._backDrop); } public function HideDialog():void{ var _local1:Matrix; _backDrop.visible = false; _local1 = new Matrix(); _local1.scale(0, 0); _backDrop.transform.matrix = _local1; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); _parent.removeChild(this); } public function onTweenEnd(_arg1:Number):void{ var _local2:Matrix; _local2 = new Matrix(); _local2.scale(_arg1, _arg1); _backDrop.transform.matrix = _local2; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); this._continueButton.enabled = true; this._startOverButton.enabled = true; } public function onContinueClick(_arg1:MouseEvent):void{ if (this._continueCallback != null){ this._continueCallback(_arg1); }; this._parent.removeChild(this); } public function onStartOverClick(_arg1:MouseEvent):void{ if (this._startOverCallback != null){ this._startOverCallback(_arg1); }; this._parent.removeChild(this); } public function onTweenUpdate(_arg1:Number):void{ var _local2:Matrix; _local2 = new Matrix(); _local2.scale(_arg1, _arg1); _backDrop.transform.matrix = _local2; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); } public static function ShowDialog(_arg1:DisplayObjectContainer, _arg2:Function, _arg3:Function):ContinueCourseDialog{ var _local4:ContinueCourseDialog; var _local5:Matrix; _local4 = new (ContinueCourseDialog); _local4._titleField.text = "Saved game found\nfor this course!"; _local4._continueCallback = _arg2; _local4._startOverCallback = _arg3; _local4._parent = _arg1; _local4._parent.addChild(_local4); _local4._backDrop.visible = true; _local5 = new Matrix(); _local5.scale(0, 0); _local4._backDrop.transform.matrix = _local5; _local4._backDrop.x = (320 - (_local4._backDrop.width * 0.5)); _local4._backDrop.y = (240 - (_local4._backDrop.height * 0.5)); _local4._showTween = new Tween(_local4, 0, 1, 1000); _local4._showTween.easingFunction = Bounce.easeOut; return (_local4); } } }//package
Section 46
//CourseOverDialog (CourseOverDialog) package { import flash.events.*; import flash.text.*; import flash.display.*; import flash.media.*; import mx.effects.*; import com.GameEngine.Utils.*; import flash.geom.*; import com.GameEngine.Controllers.*; import mx.effects.easing.*; import com.Branding.*; import flash.filters.*; public class CourseOverDialog extends Sprite { public var _levelShotsUnderParLabel:TextField; public var _levelUnderParBonusLabel:TextField; public var _levelRicochetBonusLabel:TextField; public var _titleField:TextField; public var _levelMultiBallBonusLabel:TextField; public var _cheerSoundChannel:SoundChannel; public var _levelNumberLabel:TextField; public var _levelParLabel:TextField; private var _tweenDoneCallback:Function; public var _playAgainCallback:Function; public var _playAgainButton:GameButton; public var _levelTotalScoreLabel:TextField; public var _totalScoreLabel:TextField; public var _totalScoreField:TextField; public var _parent:DisplayObjectContainer; public var _backScreen:Sprite; public var _backDrop:Sprite; public var _scoreMode:String; public var _scoreValue:int; public var _levelGoalScoreLabel:TextField; private var _showTween:Tween; public function CourseOverDialog(_arg1:String, _arg2:int){ var _local3:Array; super(); this._backScreen = new Sprite(); this._backScreen.graphics.beginFill(0, 0.5); this._backScreen.graphics.drawRect(0, 0, 640, 480); this._backScreen.graphics.endFill(); this.addChild(_backScreen); this._backDrop = new Sprite(); this._backDrop.addChild(SpriteFactory.makeBorderedFrame(620, 460, 20, 66115, 134773, 0.85)); this._titleField = new TextField(); this._titleField.defaultTextFormat = new TextFormat("Abbess", 40, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); this._titleField.embedFonts = true; this._titleField.antiAliasType = AntiAliasType.ADVANCED; this._titleField.selectable = false; this._titleField.mouseEnabled = false; this._titleField.text = "You Win!"; this._titleField.alpha = 0.65; this._titleField.width = 620; this._titleField.height = 120; this._titleField.y = 25; this._levelNumberLabel = new TextField(); this._levelNumberLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._levelNumberLabel.embedFonts = true; this._levelNumberLabel.antiAliasType = AntiAliasType.ADVANCED; this._levelNumberLabel.selectable = false; this._levelNumberLabel.mouseEnabled = false; this._levelNumberLabel.text = "Level Number"; this._levelNumberLabel.alpha = 0.85; this._levelNumberLabel.width = 80; this._levelNumberLabel.height = 45; this._levelNumberLabel.x = 10; this._levelNumberLabel.y = 85; this._levelParLabel = new TextField(); this._levelParLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._levelParLabel.embedFonts = true; this._levelParLabel.antiAliasType = AntiAliasType.ADVANCED; this._levelParLabel.selectable = false; this._levelParLabel.mouseEnabled = false; this._levelParLabel.text = "Level Par:"; this._levelParLabel.alpha = 0.85; this._levelParLabel.width = 80; this._levelParLabel.height = 45; this._levelParLabel.x = 10; this._levelParLabel.y = 110; this._levelShotsUnderParLabel = new TextField(); this._levelShotsUnderParLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._levelShotsUnderParLabel.embedFonts = true; this._levelShotsUnderParLabel.antiAliasType = AntiAliasType.ADVANCED; this._levelShotsUnderParLabel.selectable = false; this._levelShotsUnderParLabel.mouseEnabled = false; this._levelShotsUnderParLabel.text = "Shots Under:"; this._levelShotsUnderParLabel.alpha = 0.85; this._levelShotsUnderParLabel.width = 80; this._levelShotsUnderParLabel.height = 45; this._levelShotsUnderParLabel.x = 10; this._levelShotsUnderParLabel.y = 135; this._levelUnderParBonusLabel = new TextField(); this._levelUnderParBonusLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._levelUnderParBonusLabel.embedFonts = true; this._levelUnderParBonusLabel.antiAliasType = AntiAliasType.ADVANCED; this._levelUnderParBonusLabel.selectable = false; this._levelUnderParBonusLabel.mouseEnabled = false; this._levelUnderParBonusLabel.text = "Under Bonus:"; this._levelUnderParBonusLabel.alpha = 0.85; this._levelUnderParBonusLabel.width = 80; this._levelUnderParBonusLabel.height = 45; this._levelUnderParBonusLabel.x = 10; this._levelUnderParBonusLabel.y = 160; this._levelGoalScoreLabel = new TextField(); this._levelGoalScoreLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._levelGoalScoreLabel.embedFonts = true; this._levelGoalScoreLabel.antiAliasType = AntiAliasType.ADVANCED; this._levelGoalScoreLabel.selectable = false; this._levelGoalScoreLabel.mouseEnabled = false; this._levelGoalScoreLabel.text = "Goal:"; this._levelGoalScoreLabel.alpha = 0.85; this._levelGoalScoreLabel.width = 80; this._levelGoalScoreLabel.height = 45; this._levelGoalScoreLabel.x = 10; this._levelGoalScoreLabel.y = 185; this._levelRicochetBonusLabel = new TextField(); this._levelRicochetBonusLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._levelRicochetBonusLabel.embedFonts = true; this._levelRicochetBonusLabel.antiAliasType = AntiAliasType.ADVANCED; this._levelRicochetBonusLabel.selectable = false; this._levelRicochetBonusLabel.mouseEnabled = false; this._levelRicochetBonusLabel.text = "Ricochet:"; this._levelRicochetBonusLabel.alpha = 0.85; this._levelRicochetBonusLabel.width = 80; this._levelRicochetBonusLabel.height = 45; this._levelRicochetBonusLabel.x = 10; this._levelRicochetBonusLabel.y = 210; this._levelMultiBallBonusLabel = new TextField(); this._levelMultiBallBonusLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._levelMultiBallBonusLabel.embedFonts = true; this._levelMultiBallBonusLabel.antiAliasType = AntiAliasType.ADVANCED; this._levelMultiBallBonusLabel.selectable = false; this._levelMultiBallBonusLabel.mouseEnabled = false; this._levelMultiBallBonusLabel.text = "MultiBall:"; this._levelMultiBallBonusLabel.alpha = 0.85; this._levelMultiBallBonusLabel.width = 80; this._levelMultiBallBonusLabel.height = 45; this._levelMultiBallBonusLabel.x = 10; this._levelMultiBallBonusLabel.y = 235; this._levelTotalScoreLabel = new TextField(); this._levelTotalScoreLabel.defaultTextFormat = new TextFormat("Abbess", 10, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._levelTotalScoreLabel.embedFonts = true; this._levelTotalScoreLabel.antiAliasType = AntiAliasType.ADVANCED; this._levelTotalScoreLabel.selectable = false; this._levelTotalScoreLabel.mouseEnabled = false; this._levelTotalScoreLabel.text = "Level Score:"; this._levelTotalScoreLabel.alpha = 0.85; this._levelTotalScoreLabel.width = 80; this._levelTotalScoreLabel.height = 45; this._levelTotalScoreLabel.x = 10; this._levelTotalScoreLabel.y = 260; this._totalScoreLabel = new TextField(); this._totalScoreLabel.defaultTextFormat = new TextFormat("Abbess", 30, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._totalScoreLabel.embedFonts = true; this._totalScoreLabel.antiAliasType = AntiAliasType.ADVANCED; this._totalScoreLabel.selectable = false; this._totalScoreLabel.mouseEnabled = false; this._totalScoreLabel.text = "Total Course Score:"; this._totalScoreLabel.alpha = 0.85; this._totalScoreLabel.width = 300; this._totalScoreLabel.height = 45; this._totalScoreLabel.x = 25; this._totalScoreLabel.y = 305; this._totalScoreField = new TextField(); this._totalScoreField.defaultTextFormat = new TextFormat("Abbess", 40, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT); this._totalScoreField.embedFonts = true; this._totalScoreField.antiAliasType = AntiAliasType.ADVANCED; this._totalScoreField.selectable = false; this._totalScoreField.mouseEnabled = false; this._totalScoreField.text = "0"; this._totalScoreField.alpha = 0.85; this._totalScoreField.width = 285; this._totalScoreField.height = 45; this._totalScoreField.x = 335; this._totalScoreField.y = 305; _local3 = this._titleField.filters; _local3.push(new DropShadowFilter(4, 135)); this._titleField.filters = _local3; _local3 = this._totalScoreLabel.filters; _local3.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true)); this._totalScoreLabel.filters = _local3; _local3 = this._totalScoreField.filters; _local3.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true)); this._totalScoreField.filters = _local3; this._playAgainButton = new GameButton("Play Again", null, 200, 30, onPlayAgainClick); this._playAgainButton.x = 85; this._playAgainButton.y = 400; this._playAgainButton.enabled = false; this._playAgainButton.visible = false; this._backDrop.addChild(this._playAgainButton); this._scoreMode = _arg1; this._scoreValue = _arg2; this._backDrop.addChild(this._titleField); this._backDrop.addChild(this._totalScoreLabel); this._backDrop.addChild(this._totalScoreField); this._backDrop.addChild(this._levelNumberLabel); this._backDrop.addChild(this._levelParLabel); this._backDrop.addChild(this._levelShotsUnderParLabel); this._backDrop.addChild(this._levelUnderParBonusLabel); this._backDrop.addChild(this._levelGoalScoreLabel); this._backDrop.addChild(this._levelRicochetBonusLabel); this._backDrop.addChild(this._levelMultiBallBonusLabel); this._backDrop.addChild(this._levelTotalScoreLabel); this._backDrop.x = ((640 - this._backDrop.width) * 0.5); addChild(this._backDrop); } public function onPlayAgainClick(_arg1:MouseEvent):void{ if (_cheerSoundChannel != null){ _cheerSoundChannel.stop(); }; if (this._playAgainCallback != null){ this._playAgainCallback(_arg1); }; } public function onTweenEnd(_arg1:Number):void{ var _local2:Matrix; var _local3:ScoreWidget; if (this._showTween != null){ _local2 = new Matrix(); _local2.scale(_arg1, _arg1); _backDrop.transform.matrix = _local2; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); this._playAgainButton.enabled = true; this._playAgainButton.visible = true; BrandingManager.GetCurrentSponsorMaterial(this._backDrop, "CourseOverLogo"); _local3 = (BrandingManager.GetCurrentSponsorMaterial(this._backDrop, "CourseOverScoreSubmit") as ScoreWidget); if (_local3 != null){ _local3.SetScoreMode(this._scoreMode); _local3.SetScoreValue(this._scoreValue); }; this._showTween = null; }; } public function HideDialog():void{ var _local1:Matrix; _backDrop.visible = false; _local1 = new Matrix(); _local1.scale(0, 0); _backDrop.transform.matrix = _local1; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); _parent.removeChild(this); } public function onTweenUpdate(_arg1:Number):void{ var _local2:Matrix; _local2 = new Matrix(); _local2.scale(_arg1, _arg1); _backDrop.transform.matrix = _local2; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); } public static function createScoreCell(_arg1:LevelData, _arg2:int, _arg3:Number=50):Sprite{ var _local4:Sprite; var _local5:TextField; var _local6:TextField; var _local7:TextField; var _local8:TextField; var _local9:TextField; var _local10:TextField; var _local11:TextField; var _local12:TextField; var _local13:TextField; var _local14:TextFormat; _local4 = new Sprite(); _local4.graphics.beginFill(102, 0.25); _local4.graphics.drawRect(0, 0, _arg3, 200); _local4.graphics.endFill(); _local4.graphics.lineStyle(1, 0xFFFFFF, 0.5); _local4.graphics.drawRect(0, 0, _arg3, 25); _local4.graphics.drawRect(0, 25, _arg3, 25); _local4.graphics.drawRect(0, 50, _arg3, 25); _local4.graphics.drawRect(0, 75, _arg3, 25); _local4.graphics.drawRect(0, 100, _arg3, 25); _local4.graphics.drawRect(0, 125, _arg3, 25); _local4.graphics.drawRect(0, 150, _arg3, 25); _local4.graphics.drawRect(0, 175, _arg3, 25); _local5 = new TextField(); _local6 = new TextField(); _local7 = new TextField(); _local8 = new TextField(); _local9 = new TextField(); _local10 = new TextField(); _local11 = new TextField(); _local12 = new TextField(); for each (_local13 in [_local5, _local6, _local7, _local8, _local9, _local10, _local11, _local12]) { _local13.defaultTextFormat = new TextFormat("Abbess", 11, 0xDDDDDD, null, null, null, null, null, TextFormatAlign.CENTER); _local13.embedFonts = true; _local13.antiAliasType = AntiAliasType.ADVANCED; _local13.selectable = false; _local13.mouseEnabled = false; _local13.tabEnabled = false; _local13.alpha = 0.85; _local13.width = _arg3; _local13.height = 12; _local13.text = "0"; }; _local14 = _local5.defaultTextFormat; _local14.color = 0xDDDDDD; _local14.size = 14; _local5.defaultTextFormat = _local14; _local14 = _local6.defaultTextFormat; _local14.color = 0xCCCCCC; _local14.size = 10; _local6.defaultTextFormat = _local14; if ((_arg1._levelShotPar - _arg1._levelShotCounter) < 0){ _local14 = _local8.defaultTextFormat; _local14.color = 0xEE0000; _local8.defaultTextFormat = _local14; _local14 = _local9.defaultTextFormat; _local14.color = 0xEE0000; _local9.defaultTextFormat = _local14; }; _local14 = _local12.defaultTextFormat; _local14.color = 0xFFFFFF; _local14.size = 12; _local12.defaultTextFormat = _local14; _local5.text = _arg2.toString(); _local6.text = _arg1._levelShotPar.toString(); _local7.text = _arg1._levelGoalScore.toString(); _local8.text = (_arg1._levelShotPar - _arg1._levelShotCounter).toString(); _local9.text = _arg1._levelUnderParBonus.toString(); _local10.text = _arg1._levelRicochetBonus.toString(); _local11.text = _arg1._levelMultiBallBonus.toString(); _local12.text = _arg1.TotalScore().toString(); _local5.y = 6; _local6.y = 31; _local8.y = 56; _local9.y = 81; _local7.y = 106; _local10.y = 131; _local11.y = 156; _local12.y = 181; _local4.addChild(_local5); _local4.addChild(_local6); _local4.addChild(_local7); _local4.addChild(_local8); _local4.addChild(_local9); _local4.addChild(_local10); _local4.addChild(_local11); _local4.addChild(_local12); return (_local4); } public static function ShowDialog(_arg1:DisplayObjectContainer, _arg2:String, _arg3:String, _arg4:Array, _arg5:Function):CourseOverDialog{ var _local6:int; var _local7:Sprite; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:int; var _local13:CourseOverDialog; var _local14:Matrix; _local6 = 0; _local8 = 110; _local9 = 79; _local10 = (500 / _arg4.length); _local11 = 0; _local12 = 0; while (_local12 < _arg4.length) { _local6 = (_local6 + _arg4[_local12].TotalScore()); _local12++; }; _local13 = new CourseOverDialog(_arg2, _local6); _local12 = 0; while (_local12 < _arg4.length) { _local7 = CourseOverDialog.createScoreCell(_arg4[_local12], (_local12 + 1), _local10); _local7.x = _local8; _local7.y = _local9; _local13._backDrop.addChild(_local7); _local8 = (_local8 + _local10); _local12++; }; _local13._parent = _arg1; _local13._parent.addChild(_local13); _local13._titleField.text = _arg3; _local13._totalScoreField.text = _local6.toString(); _local13._playAgainCallback = _arg5; _local13._backDrop.visible = true; _local14 = new Matrix(); _local14.scale(0, 0); _local13._backDrop.transform.matrix = _local14; _local13._backDrop.x = (320 - (_local13._backDrop.width * 0.5)); _local13._backDrop.y = (240 - (_local13._backDrop.height * 0.5)); _local13._showTween = new Tween(_local13, 0, 1, 1000); _local13._showTween.easingFunction = Bounce.easeOut; _local13._cheerSoundChannel = SoundController.playCheer(); return (_local13); } public static function setupCellFields(... _args):void{ var _local2:TextField; for each (_local2 in _args) { _local2.defaultTextFormat = new TextFormat("Abbess", 11, 0xDDDDDD, null, null, null, null, null, TextFormatAlign.CENTER); _local2.embedFonts = true; _local2.antiAliasType = AntiAliasType.ADVANCED; _local2.selectable = false; _local2.mouseEnabled = false; _local2.tabEnabled = false; _local2.alpha = 0.85; _local2.width = 100; _local2.height = 12; _local2.text = "0"; }; } } }//package
Section 47
//CreditsScreen (CreditsScreen) package { import flash.events.*; import flash.display.*; import flash.text.*; import mx.effects.*; import com.GameEngine.Utils.*; import mx.effects.easing.*; public class CreditsScreen extends Sprite { public var _CreditsText:TextField; public var _AuthorEmailURL:TextField; public var _emailFormat:TextFormat; private var _tweenDoneCallback:Function; public var _AuthorSiteURL:TextField; public var _backButton:GameButton; public var _creditSoundLinkName:TextFormat; public var _creditName:TextFormat; public var _creditHeader:TextFormat; public var _parent:GameMenuScreen; public var _gameSiteFormat:TextFormat; public var _backScreen:Sprite; public var _backDrop:Sprite; private var _showTween:Tween; public function CreditsScreen(_arg1:GameMenuScreen){ _gameSiteFormat = new TextFormat("Abbess", 20, 204, null, null, null, "http://www.headmeatgames.com", "_blank", TextFormatAlign.CENTER); _emailFormat = new TextFormat("Abbess", 20, 204, null, null, null, "mailto:theman@headmeatgames.com", "_blank", TextFormatAlign.CENTER); _creditHeader = new TextFormat("Abbess", 25, 7501477, null, null, null, null, null, TextFormatAlign.CENTER); _creditName = new TextFormat("Abbess", 20, 13355989, null, null, null, null, null, TextFormatAlign.CENTER); _creditSoundLinkName = new TextFormat("Abbess", 20, 204, null, null, null, "http://www.8baal.net", "_blank", TextFormatAlign.CENTER); super(); _parent = _arg1; _backScreen = new Sprite(); _backScreen.graphics.beginFill(0, 0.75); _backScreen.graphics.drawRect(0, 0, 640, 480); _backScreen.graphics.endFill(); addChild(_backScreen); _backDrop = new Sprite(); this._backDrop.addChild(SpriteFactory.makeBorderedFrame(620, 460, 20, 66115, 134773, 0.85)); _CreditsText = new TextField(); _CreditsText.defaultTextFormat = this._creditHeader; _CreditsText.embedFonts = true; _CreditsText.antiAliasType = AntiAliasType.ADVANCED; _CreditsText.tabEnabled = false; _CreditsText.width = 620; _CreditsText.height = 320; _CreditsText.x = 0; _CreditsText.y = 30; _CreditsText.text = (((((("Art, SFX, Design & Programming:\n" + "Joe Striedl\n\n") + "Music:\n") + "Eli Peters\n\n\n") + "Hey Flash Portals!\n") + " Interested in licensing a custom copy of this game?\n") + "Contact me at:\n"); _CreditsText.setTextFormat(this._creditName, 32, 43); _CreditsText.setTextFormat(this._creditSoundLinkName, 52, 62); _CreditsText.setTextFormat(this._creditName, 85, 151); _backDrop.addChild(_CreditsText); _AuthorEmailURL = new TextField(); _AuthorEmailURL.defaultTextFormat = this._emailFormat; _AuthorEmailURL.embedFonts = true; _AuthorEmailURL.antiAliasType = AntiAliasType.ADVANCED; _AuthorEmailURL.tabEnabled = false; _AuthorEmailURL.width = 620; _AuthorEmailURL.height = 30; _AuthorEmailURL.x = 0; _AuthorEmailURL.y = 295; _AuthorEmailURL.text = "theman AT headmeatgames.com"; _backDrop.addChild(_AuthorEmailURL); _AuthorSiteURL = new TextField(); _AuthorSiteURL.defaultTextFormat = this._gameSiteFormat; _AuthorSiteURL.embedFonts = true; _AuthorSiteURL.antiAliasType = AntiAliasType.ADVANCED; _AuthorSiteURL.tabEnabled = false; _AuthorSiteURL.width = 620; _AuthorSiteURL.height = 30; _AuthorSiteURL.x = 0; _AuthorSiteURL.y = 325; _AuthorSiteURL.text = "http://www.headmeatgames.com"; _backDrop.addChild(_AuthorSiteURL); this._backDrop.x = ((640 - this._backDrop.width) * 0.5); addChild(_backDrop); _backButton = new GameButton("Back", null, 400, 30, onBackClick); _backButton.x = 120; _backButton.y = 410; _backDrop.addChild(_backButton); } public function HideScreen():void{ _backDrop.visible = false; _backDrop.y = 480; _parent.removeChild(this); } public function onTweenEnd(_arg1:Number):void{ _showTween = null; _backDrop.y = _arg1; this._backButton.enabled = true; } public function onTweenUpdate(_arg1:Number):void{ _backDrop.y = _arg1; } public function onBackClick(_arg1:MouseEvent):void{ HideScreen(); } public static function ShowScreen(_arg1:GameMenuScreen):CreditsScreen{ var _local2:CreditsScreen; _local2 = new CreditsScreen(_arg1); _local2._parent = _arg1; _local2._parent.addChild(_local2); _local2._backButton.enabled = false; _local2._backDrop.y = 480; _local2._backDrop.visible = true; _local2._showTween = new Tween(_local2, 480, ((480 - _local2._backDrop.height) * 0.5), 1000); _local2._showTween.easingFunction = Elastic.easeOut; return (_local2); } } }//package
Section 48
//FreePlaySelectionScreen (FreePlaySelectionScreen) package { import flash.events.*; import flash.display.*; import flash.text.*; import flash.utils.*; import mx.effects.*; import com.GameEngine.Utils.*; import mx.effects.easing.*; import flash.geom.*; import flash.filters.*; public class FreePlaySelectionScreen extends Sprite { public var _levelButtons:Dictionary; public var _titleField:TextField; private var _tweenDoneCallback:Function; public var _backButton:GameButton; public var _descriptionField:TextField; public var _parent:GameMenuScreen; public var _backScreen:Sprite; public var _backDrop:Sprite; private var _showTween:Tween; public function FreePlaySelectionScreen(_arg1:GameMenuScreen){ var _local2:Array; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:GameButton; var _local11:Sprite; var _local12:String; _levelButtons = new Dictionary(); super(); _parent = _arg1; _backScreen = new Sprite(); _backScreen.graphics.beginFill(0, 0.75); _backScreen.graphics.drawRect(0, 0, 640, 480); _backScreen.graphics.endFill(); addChild(_backScreen); _backDrop = new Sprite(); this._backDrop.addChild(SpriteFactory.makeBorderedFrame(620, 460, 20, 66115, 134773, 0.85)); this._backDrop.x = ((640 - this._backDrop.width) * 0.5); addChild(_backDrop); this._descriptionField = new TextField(); this._descriptionField.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); this._descriptionField.embedFonts = true; this._descriptionField.selectable = false; this._descriptionField.mouseEnabled = false; this._descriptionField.text = "Play without shot limits!\n(Unlock next level by finishing below the shot limit.)"; this._descriptionField.alpha = 0.65; this._descriptionField.width = 620; this._descriptionField.height = 65; this._descriptionField.y = 20; _local2 = this._descriptionField.filters; _local2.push(new DropShadowFilter(4, 135)); this._descriptionField.filters = _local2; _backDrop.addChild(_descriptionField); _backButton = new GameButton("Back", null, 400, 40, onBackClick); _backButton.x = 120; _backButton.y = 385; _backDrop.addChild(_backButton); _local3 = 40; _local4 = 40; _local5 = 30; _local6 = 10; _local7 = ((620 - ((_parent._allModes.length * _local3) + ((_parent._allModes.length - 1) * _local5))) * 0.5); _local8 = 100; _local9 = 0; for each (_local12 in _parent._allModes) { this._levelButtons[_local12] = {key:_local12, buttons:new Array()}; _local9 = 0; while (_local9 < _parent._levelPreviews[_local12].length) { _local10 = new GameButton("", null, _local3, _local4, onPickLevelClick, null, null, _parent._levelPreviews[_local12][_local9]); _local10.difficulty = _local12; _local10.index = _local9; _local10.x = _local7; _local10.y = ((_local8 + (_local9 * _local4)) + (_local9 * _local6)); this._levelButtons[_local12].key = _local12; this._levelButtons[_local12].buttons.push(_local10); _backDrop.addChild(_local10); _local9++; }; _local11 = new Sprite(); _local11.graphics.beginFill(204, 0.5); _local11.graphics.drawRoundRect(0, 0, (_local3 + (_local5 * 0.5)), (_local9 * (_local4 + _local6)), 10, 10); _local11.graphics.endFill(); _local11.x = (_local7 - (_local5 * 0.25)); _local11.y = (_local8 - (_local6 * 0.5)); _backDrop.addChildAt(_local11, 1); _local7 = (_local7 + (_local5 + _local3)); }; } public function onPickLevelClick(_arg1:MouseEvent):void{ var _local2:int; var _local3:String; _local2 = _arg1.currentTarget.index; _local3 = _arg1.currentTarget.difficulty; this._parent.loadFreePlayLevel(_local2, _local3); } public function HideScreen():void{ var _local1:Matrix; _backDrop.visible = false; _local1 = new Matrix(); _local1.scale(0, 0); _backDrop.transform.matrix = _local1; _parent.removeChild(this); } public function onTweenEnd(_arg1:Number):void{ var _local2:Matrix; var _local3:GameButton; var _local4:int; var _local5:Object; var _local6:String; _showTween = null; _local2 = new Matrix(); _local2.scale(_arg1, _arg1); _backDrop.transform.matrix = _local2; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); this._backButton.enabled = true; _local4 = 0; for each (_local5 in this._levelButtons) { _local6 = _local5.key; _local4 = 0; while (_local4 < _local5.buttons.length) { _local3 = _local5.buttons[_local4]; _local3.enabled = _parent._unlockedLevels.data.unlockedLevels[_local6][_local4]; _local4++; }; }; } public function onTweenUpdate(_arg1:Number):void{ var _local2:Matrix; _local2 = new Matrix(); _local2.scale(_arg1, _arg1); _backDrop.transform.matrix = _local2; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); } public function onBackClick(_arg1:MouseEvent):void{ HideScreen(); } public static function ShowScreen(_arg1:GameMenuScreen):FreePlaySelectionScreen{ var _local2:FreePlaySelectionScreen; var _local3:GameButton; var _local4:Object; var _local5:Matrix; _local2 = new FreePlaySelectionScreen(_arg1); _local2._parent = _arg1; _local2._parent.addChild(_local2); _local2._backButton.enabled = false; for each (_local4 in _local2._levelButtons) { for each (_local3 in _local4.buttons) { _local3.enabled = false; }; }; _local2._backDrop.visible = true; _local5 = new Matrix(); _local5.scale(0, 0); _local2._backDrop.transform.matrix = _local5; _local2._showTween = new Tween(_local2, 0, 1, 1000); _local2._showTween.easingFunction = Bounce.easeOut; return (_local2); } } }//package
Section 49
//GameButton (GameButton) package { import flash.events.*; import flash.text.*; import flash.display.*; import flash.media.*; import flash.geom.*; import com.GameEngine.Controllers.*; import flash.filters.*; public dynamic class GameButton extends MovieClip { public var _label:TextField; private var _enabled:Boolean;// = true private var _upSound:Sound; public var _onClickCallback:Function; public var _hitState:Sprite; private var _downSound:Sound; private var _leaveSound:Sound; private var _mouseDownInButton:Boolean;// = false public var _icon:Bitmap; public var _disabledState:Sprite; public var _upState:Sprite; public var _downState:Sprite; public var _overState:Sprite; private var _enterSound:Sound; public var _onRolloutCallback:Function; public var _onRolloverCallback:Function; public function GameButton(_arg1:String="button", _arg2:TextFormat=null, _arg3:Number=100, _arg4:Number=40, _arg5:Function=null, _arg6:Function=null, _arg7:Function=null, _arg8:Bitmap=null){ var _local9:Graphics; var _local10:Array; var _local11:Sprite; var _local12:Matrix; _enabled = true; _mouseDownInButton = false; super(); _onClickCallback = _arg5; _onRolloverCallback = _arg6; _onRolloutCallback = _arg7; _enterSound = new ResourceManager.BaseClickSound(); _leaveSound = new ResourceManager.BaseClickSound(); _downSound = new ResourceManager.BaseClickSound(); _upSound = new ResourceManager.SharpClickSound(); _upState = new Sprite(); _overState = new Sprite(); _downState = new Sprite(); _disabledState = new Sprite(); _local9 = _upState.graphics; _local11 = new Sprite(); _local12 = new Matrix(); _local12.createGradientBox(_arg3, _arg4, 90, 0, 0); _local9.beginGradientFill(GradientType.LINEAR, [11184878, 12303359], [1, 1], [0, 0xFF], _local12, "pad", "rgb"); _local9.drawRoundRect(0, 0, _arg3, _arg4, 10, 10); _local9.endFill(); _local9.beginGradientFill(GradientType.LINEAR, [12303359, 11184878], [1, 1], [0, 0xFF], _local12, "pad", "rgb"); _local9.drawRoundRect(7.5, 7.5, (_arg3 - 15), (_arg4 - 15), 10, 10); _local9.endFill(); _local9 = _overState.graphics; _local9.beginGradientFill(GradientType.LINEAR, [12303359, 11184878], [1, 1], [0, 0xFF], _local12, "pad", "rgb"); _local9.drawRoundRect(0, 0, _arg3, _arg4, 10, 10); _local9.endFill(); _local9.beginGradientFill(GradientType.LINEAR, [11184878, 12303359], [1, 1], [0, 0xFF], _local12, "pad", "rgb"); _local9.drawRoundRect(5, 5, (_arg3 - 10), (_arg4 - 10), 10, 10); _local9.endFill(); _local9 = _downState.graphics; _local9.beginGradientFill(GradientType.LINEAR, [10066397, 11184878], [1, 1], [0, 0xFF], _local12, "pad", "rgb"); _local9.drawRoundRect(-3, 3, _arg3, _arg4, 10, 10); _local9.endFill(); _local9.beginGradientFill(GradientType.LINEAR, [11184878, 10066397], [1, 1], [0, 0xFF], _local12, "pad", "rgb"); _local9.drawRoundRect(2, 8, (_arg3 - 10), (_arg4 - 10), 10, 10); _local9.endFill(); _local9 = _disabledState.graphics; _local9.beginFill(0, 0.5); _local9.drawRoundRect(0, 0, _arg3, _arg4, 10, 10); _local9.endFill(); _upState.alpha = 0.5; _downState.alpha = 0.7; _overState.alpha = 0.6; _local10 = _upState.filters; _local10.push(new DropShadowFilter(3, 135)); _local10.push(new BevelFilter(1, 135)); _upState.filters = _local10; _local10 = _overState.filters; _local10.push(new DropShadowFilter(3, 135)); _local10.push(new BevelFilter(1, 135)); _overState.filters = _local10; _local10 = _downState.filters; _local10.push(new DropShadowFilter(0.25, 135)); _local10.push(new BevelFilter(1, 135)); _downState.filters = _local10; this.addChild(_upState); this.addChild(_overState); this.addChild(_downState); this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver); this.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut); this.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); this.addEventListener(MouseEvent.MOUSE_UP, onMouseUp); _label = new TextField(); _label.selectable = false; _label.tabEnabled = false; _label.mouseEnabled = false; if (_arg2 == null){ _label.defaultTextFormat = new TextFormat("Abbess", (_arg4 - 10), 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); } else { _label.defaultTextFormat = _arg2; }; _label.embedFonts = true; _label.antiAliasType = AntiAliasType.ADVANCED; _label.y = 5; _label.width = _arg3; _label.height = _arg4; _label.text = _arg1; _label.alpha = 0.45; _local10 = _label.filters; _local10.push(new DropShadowFilter(4, 135)); _label.filters = _local10; this.addChild(_label); _icon = _arg8; if (_icon != null){ _icon.x = ((_arg3 - _icon.width) * 0.5); _icon.y = ((_arg4 - _icon.height) * 0.5); this.addChild(_icon); }; _hitState = new Sprite(); _hitState.graphics.beginFill(0); _hitState.graphics.drawRoundRect(0, 0, _arg3, _arg4, 10, 10); _hitState.graphics.endFill(); _hitState.alpha = 0; this.hitArea = _hitState; this.addChild(_hitState); this.addChild(_disabledState); _upState.visible = true; _downState.visible = false; _overState.visible = false; _disabledState.visible = false; } private function onMouseOver(_arg1:MouseEvent):void{ if (this.enabled){ if (_mouseDownInButton == true){ _downState.visible = true; _upState.visible = false; _overState.visible = false; } else { _overState.visible = true; _downState.visible = false; _upState.visible = false; }; if (_onRolloverCallback != null){ _onRolloverCallback(_arg1); }; if (_enterSound != null){ _enterSound.play(0, 0, SoundController._globalSoundEffectTransform); }; }; } override public function get enabled():Boolean{ return (this._enabled); } private function onMouseUp(_arg1:MouseEvent):void{ if (this.enabled){ _upState.visible = true; _downState.visible = false; _overState.visible = false; if (_mouseDownInButton){ this._mouseDownInButton = false; _label.x = (_label.x + 3); _label.y = (_label.y - 3); if (_icon != null){ _icon.x = (_icon.x + 3); _icon.y = (_icon.y - 3); }; if (_onClickCallback != null){ _onClickCallback(_arg1); }; }; if (_upSound != null){ _upSound.play(0, 0, SoundController._globalSoundEffectTransform); }; }; } override public function set enabled(_arg1:Boolean):void{ this._enabled = _arg1; this._disabledState.visible = !(_arg1); } private function onMouseOut(_arg1:MouseEvent):void{ if (this.enabled){ if (_mouseDownInButton){ _mouseDownInButton = false; _label.x = (_label.x + 3); _label.y = (_label.y - 3); if (_icon != null){ _icon.x = (_icon.x + 3); _icon.y = (_icon.y - 3); }; }; _upState.visible = true; _downState.visible = false; _overState.visible = false; if (_onRolloutCallback != null){ _onRolloutCallback(_arg1); }; if (_leaveSound != null){ _leaveSound.play(0, 0, SoundController._globalSoundEffectTransform); }; }; } private function onMouseDown(_arg1:MouseEvent):void{ if (this.enabled){ _mouseDownInButton = true; _downState.visible = true; _upState.visible = false; _overState.visible = false; _label.x = (_label.x - 3); _label.y = (_label.y + 3); if (_icon != null){ _icon.x = (_icon.x - 3); _icon.y = (_icon.y + 3); }; if (_downSound != null){ _downSound.play(0, 0, SoundController._globalSoundEffectTransform); }; }; } } }//package
Section 50
//GameMenuScreen (GameMenuScreen) package { import flash.events.*; import flash.display.*; import flash.text.*; import flash.net.*; import flash.utils.*; import com.GameEngine.Controllers.*; import com.GameEngine.Utils.*; import flash.media.*; import flash.geom.*; import com.mochi.as3.*; import com.GameEngine.Entities.*; import flash.filters.*; import com.Branding.*; public dynamic class GameMenuScreen extends MovieClip { public var _gameTitle:TextField; public var _selectToggleMusic:GameButton; public var _currentPreview:Bitmap; public var _copyright:TextField; public var _freeplayScreen:FreePlaySelectionScreen; public var _unlockedLevels:SharedObject; public var _floatingForeground:Sprite; public var _levels:Array; public var _loadingLevelsScreenText:TextField; public var _cod:CourseOverDialog; public var _courseButtons:Array; public var _currentMode:String; public var _selectToggleSound:GameButton; public var _selectFreePlay:GameButton; public var _gameTitle2:TextField; public var _gameTitle3:TextField; public var _selectPlayMoreGames:MovieClip; public var _levelPreviews:Array; public var _levelGenFunctions:Array; public var _loadingLevelsScreen:Sprite; public var _allModes:Array; public var _levelScoreSaves:SharedObject; public var _currentLevelIndex:int;// = 0 public var _GameObject:PlunkPool2; public var _creditsScreen:CreditsScreen; public var _backDrop:Sprite; public var _floatingBalls:Array; public var _floatingMask:Sprite; public var _selectCredits:GameButton; public function GameMenuScreen(){ _currentLevelIndex = 0; super(); } public function onFreePlayClick(_arg1:MouseEvent):void{ this._freeplayScreen = FreePlaySelectionScreen.ShowScreen(this); } public function loadNextLevel(_arg1:Boolean=true):void{ var _local2:Boolean; _GameObject._inFreePlayMode = false; _currentLevelIndex++; _local2 = (_currentLevelIndex < this._levelGenFunctions[_currentMode].length); if (_local2){ _GameObject.UnloadLevel(); if (!stage.contains(_GameObject)){ stage.addChild(_GameObject); }; this._levels[_currentMode][_currentLevelIndex] = this._levelGenFunctions[_currentMode][_currentLevelIndex](); _GameObject.LoadLevel(this._levels[_currentMode][_currentLevelIndex], _arg1); } else { _cod = CourseOverDialog.ShowDialog(_GameObject, _currentMode, (("Finished " + _currentMode) + " Course!"), this._levels[_currentMode], onCourseOverPlayAgain); this.clearCourseSavedData(this._currentMode); }; } public function onStartOverCourse(_arg1:MouseEvent):void{ clearCourseSavedData(this._currentMode); loadNextLevel(); } public function checkIfCourseHasSavedData(_arg1:String):Boolean{ var _local2:Boolean; _local2 = false; if (this._levelScoreSaves.data.scores[_arg1] != null){ _local2 = (this._levelScoreSaves.data.scores[_arg1].lastLevelCompleted >= 0); }; return (_local2); } public function isNextLevelUnlocked():Boolean{ var _local1:Boolean; _local1 = false; if (((((!((_unlockedLevels.data.unlockedLevels[this._currentMode] == null))) && (((this._currentLevelIndex + 1) < _unlockedLevels.data.unlockedLevels[this._currentMode].length)))) && (((this._currentLevelIndex + 1) >= 0)))){ _local1 = _unlockedLevels.data.unlockedLevels[this._currentMode][(this._currentLevelIndex + 1)]; } else { _local1 = true; }; return (_local1); } public function retryCurrentLevel():void{ if (_GameObject._inFreePlayMode){ this.loadFreePlayLevel(_currentLevelIndex, _currentMode, false); } else { _currentLevelIndex--; this.loadNextLevel(false); }; } public function loadFreePlayLevel(_arg1:int, _arg2:String, _arg3:Boolean=true):void{ _GameObject.UnloadLevel(); if (_arg1 < this._levelGenFunctions[_arg2].length){ _currentLevelIndex = _arg1; _currentMode = _arg2; if (!stage.contains(_GameObject)){ stage.addChild(_GameObject); }; this._levels[_arg2][_arg1] = this._levelGenFunctions[_arg2][_arg1](); _GameObject.LoadLevel(this._levels[_arg2][_arg1], _arg3); _GameObject._inFreePlayMode = true; } else { if (stage.contains(_GameObject)){ stage.removeChild(_GameObject); }; this._freeplayScreen.HideScreen(); _freeplayScreen = FreePlaySelectionScreen.ShowScreen(this); }; } public function onAnimateMenu(_arg1:Event):void{ var _local2:Object; for each (_local2 in this._floatingBalls) { _local2.sprite.x = (_local2.sprite.x + _local2.vec.x); _local2.sprite.y = (_local2.sprite.y + _local2.vec.y); if ((((_local2.sprite.x < _local2.radius)) || ((_local2.sprite.x > (640 - _local2.radius))))){ _local2.vec.x = -(_local2.vec.x); _local2.sprite.x = (_local2.sprite.x + _local2.vec.x); }; if ((((_local2.sprite.y < _local2.radius)) || ((_local2.sprite.y > (480 - _local2.radius))))){ _local2.vec.y = -(_local2.vec.y); _local2.sprite.y = (_local2.sprite.y + _local2.vec.y); }; }; } public function onToggleSoundEffectsClick(_arg1:MouseEvent):void{ SoundController._globalSoundEffectTransform.volume = ((SoundController._globalSoundEffectTransform.volume)==0) ? 0.5 : 0; this._selectToggleSound._label.text = ((SoundController._globalSoundEffectTransform.volume)==0) ? "Sound Effects ON" : "Sound Effects OFF"; } public function saveCurrentLevelScoreData():void{ if (this._levelScoreSaves.data.scores[this._currentMode] != null){ _levelScoreSaves.data.scores[this._currentMode].lastLevelCompleted = this._currentLevelIndex; _levelScoreSaves.data.scores[this._currentMode][this._currentLevelIndex] = this._levels[this._currentMode][this._currentLevelIndex].GetScoreToken(); this._levelScoreSaves.flush(); }; } public function onCreditsClick(_arg1:MouseEvent):void{ this._creditsScreen = CreditsScreen.ShowScreen(this); } public function onEnterFrame(_arg1:Event):void{ var _local2:uint; var _local3:Boolean; var _local4:String; _local3 = false; for each (_local4 in this._allModes) { if (this._levelPreviews[_local4].length < this._levelGenFunctions[_local4].length){ this._loadingLevelsScreenText.appendText("."); _local2 = 0; while (_local2 < this._levelGenFunctions[_local4].length) { this._levelPreviews[_local4].push(this._levelGenFunctions[_local4][_local2]()._levelPreview); _local2++; }; _local3 = true; break; }; }; if (!_local3){ this._loadingLevelsScreenText.appendText("."); this.removeEventListener(Event.ENTER_FRAME, onEnterFrame); this.removeChild(this._loadingLevelsScreen); this.StartMenuAnimation(); }; } public function getMochiBoardID(_arg1:String):String{ var _local2:Object; _local2 = {Tutorial:"a1c564497ed7c5ab", Ballistics:"83ca46b553deb769", Billiards 1:"4b5b98a93ab70cea", Billiards 2:"1318c7ee18f2c498", Trick Shots 1:"33817dc0d6fbd666", Trick Shots 2:"480aacb766b04080", Classics:"8ae4b0d56c4b172e"}; return (_local2[_arg1]); } public function onToggleMusicClick(_arg1:MouseEvent):void{ SoundController._globalSoundMusicTransform.volume = ((SoundController._globalSoundMusicTransform.volume)==0) ? 0.5 : 0; SoundController._musicChannel.soundTransform = new SoundTransform((SoundController._globalSoundMusicTransform.volume * 0.5)); this._selectToggleMusic._label.text = ((SoundController._globalSoundMusicTransform.volume)==0) ? "Music ON" : "Music OFF"; } public function clearCourseSavedData(_arg1:String):void{ if (this._levelScoreSaves.data.scores[_arg1] != null){ this._levelScoreSaves.data.scores[_arg1].lastLevelCompleted = -1; this._levelScoreSaves.flush(); }; } public function unlockCurrentLevel(_arg1:Boolean=true):void{ if (((((!((_unlockedLevels.data.unlockedLevels[this._currentMode] == null))) && ((this._currentLevelIndex < _unlockedLevels.data.unlockedLevels[this._currentMode].length)))) && ((this._currentLevelIndex >= 0)))){ _unlockedLevels.data.unlockedLevels[this._currentMode][this._currentLevelIndex] = _arg1; }; _unlockedLevels.flush(); } public function loadCourseSavedData(_arg1:String):void{ var _local2:int; _local2 = 0; if (this._levelScoreSaves.data.scores[_arg1] != null){ _local2 = 0; while (_local2 <= this._levelScoreSaves.data.scores[_arg1].lastLevelCompleted) { this._levels[_arg1][_local2] = this._levelGenFunctions[_arg1][_local2](); this._levels[_arg1][_local2].LoadScoreToken(this._levelScoreSaves.data.scores[_arg1][_local2]); _local2++; }; this._currentMode = _arg1; this._currentLevelIndex = this._levelScoreSaves.data.scores[_arg1].lastLevelCompleted; loadNextLevel(); }; } public function init():void{ var _local1:String; var _local2:int; var _local3:Array; var _local4:Matrix; var _local5:Graphics; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:String; var _local10:Number; var _local11:GameButton; MochiServices.connect("7a41b148560bb031", this); this.stage.showDefaultContextMenu = false; this.stage.frameRate = 60; _GameObject = new PlunkPool2(this); generateLevelData(); _currentMode = _allModes[0]; _unlockedLevels = SharedObject.getLocal("unlockedLevels"); if (_unlockedLevels.data.unlockedLevels == null){ _unlockedLevels.data.unlockedLevels = new Dictionary(); for each (_local1 in this._allModes) { _unlockedLevels.data.unlockedLevels[_local1] = new Array(this._levelGenFunctions[_local1].length); _local2 = 0; while (_local2 < _unlockedLevels.data.unlockedLevels[_local1].length) { _unlockedLevels.data.unlockedLevels[_local1][_local2] = false; _local2++; }; _unlockedLevels.data.unlockedLevels[_local1][0] = true; }; }; _unlockedLevels.flush(); _levelScoreSaves = SharedObject.getLocal("levelScoreSaves"); if (_levelScoreSaves.data.scores == null){ _levelScoreSaves.data.scores = new Dictionary(); for each (_local1 in this._allModes) { _levelScoreSaves.data.scores[_local1] = new Array(this._levelGenFunctions[_local1].length); _levelScoreSaves.data.scores[_local1].lastLevelCompleted = -1; }; }; _levelScoreSaves.flush(); _backDrop = new Sprite(); addChild(_backDrop); _local4 = new Matrix(); _local4.createGradientBox(640, 480, 0, 0, 0); _backDrop.graphics.beginGradientFill(GradientType.LINEAR, [66115, 134773], [1, 1], [0, 191], _local4, SpreadMethod.REFLECT); _backDrop.graphics.drawRect(0, 0, 640, 480); _backDrop.graphics.endFill(); this._floatingBalls = new Array(); this._floatingForeground = new Sprite(); this._floatingMask = new Sprite(); _local2 = 0; while (_local2 < 20) { _floatingBalls.push({vec:new Vector(4, 0), radius:((Math.random() * 20) + 20), sprite:new Sprite()}); _local5 = _floatingBalls[_local2].sprite.graphics; _local5.beginFill(0xFFFFFF, 0.025); _local5.drawCircle(0, 0, _floatingBalls[_local2].radius); _local5.endFill(); _floatingBalls[_local2].sprite.x = (_floatingBalls[_local2].radius + (Math.random() * (640 - (_floatingBalls[_local2].radius * 2)))); _floatingBalls[_local2].sprite.y = (_floatingBalls[_local2].radius + (Math.random() * (480 - (_floatingBalls[_local2].radius * 2)))); _floatingBalls[_local2].vec = (_floatingBalls[_local2].vec as Vector).Rotate((Math.random() * 360)); _floatingMask.addChild(_floatingBalls[_local2].sprite); _local2++; }; _floatingForeground.graphics.beginGradientFill(GradientType.LINEAR, [134773, 66115], [1, 1], [0, 191], _local4, SpreadMethod.REFLECT); _floatingForeground.graphics.drawRect(0, 0, 640, 480); _floatingForeground.graphics.endFill(); this._floatingForeground.mask = this._floatingMask; this._floatingForeground.addChild(this._floatingMask); this._floatingForeground.alpha = 0.3; this._backDrop.addChild(this._floatingForeground); _courseButtons = new Array(); _local6 = 325; _local7 = 135; _local8 = 30; for each (_local9 in this._allModes) { if (this._levelGenFunctions[_local9].length > 0){ _local10 = 25; _local8 = (_local10 + 5); if (_local9 == "Tutorial"){ _local10 = 35; _local8 = (_local10 + 15); }; _local11 = new GameButton((("Play " + _local9) + " Course"), null, 300, _local10, onCourseButtonClicked); _local11.courseKey = _local9; _local11.x = 325; _local11.y = _local7; _courseButtons.push(_local11); _backDrop.addChild(_local11); _local7 = (_local7 + _local8); }; }; _selectFreePlay = new GameButton("Free Play Mode", null, 250, 35, onFreePlayClick); _selectFreePlay.x = 375; _selectFreePlay.y = 375; _backDrop.addChild(_selectFreePlay); _selectCredits = new GameButton("Credits", null, 100, 25, onCreditsClick); _selectCredits.x = 405; _selectCredits.y = 432.5; _backDrop.addChild(_selectCredits); _selectToggleMusic = new GameButton("Music OFF", null, 100, 20, onToggleMusicClick); _selectToggleMusic.x = 520; _selectToggleMusic.y = 420; _backDrop.addChild(_selectToggleMusic); _selectToggleSound = new GameButton("Sound Effects OFF", null, 100, 20, onToggleSoundEffectsClick); _selectToggleSound.x = 520; _selectToggleSound.y = 450; _backDrop.addChild(_selectToggleSound); _gameTitle = new TextField(); _gameTitle.defaultTextFormat = new TextFormat("Abbess", 200, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT); _gameTitle.alpha = 0.6; _gameTitle.embedFonts = true; _gameTitle.antiAliasType = AntiAliasType.ADVANCED; _gameTitle.mouseEnabled = false; _gameTitle.tabEnabled = false; _gameTitle.text = "Plunk"; _gameTitle.x = 10; _gameTitle.y = 10; _gameTitle.width = 400; _gameTitle.height = 400; _backDrop.addChild(_gameTitle); _gameTitle2 = new TextField(); _gameTitle2.defaultTextFormat = new TextFormat("Abbess", 70, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT); _gameTitle2.alpha = 0.45; _gameTitle2.embedFonts = true; _gameTitle2.antiAliasType = AntiAliasType.ADVANCED; _gameTitle2.mouseEnabled = false; _gameTitle2.tabEnabled = false; _gameTitle2.multiline = true; _gameTitle2.text = "O\nO\nL"; _gameTitle2.x = 10; _gameTitle2.y = 135; _gameTitle2.width = 100; _gameTitle2.height = 300; _backDrop.addChild(_gameTitle2); _gameTitle3 = new TextField(); _gameTitle3.defaultTextFormat = new TextFormat("Abbess", 300, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); _gameTitle3.alpha = 0.45; _gameTitle3.scaleX = 2; _gameTitle3.scaleY = 2; _gameTitle3.embedFonts = true; _gameTitle3.antiAliasType = AntiAliasType.ADVANCED; _gameTitle3.mouseEnabled = false; _gameTitle3.tabEnabled = false; _gameTitle3.text = "2"; _gameTitle3.x = 100; _gameTitle3.y = 130; _gameTitle3.width = 100; _gameTitle3.height = 100; _backDrop.addChild(_gameTitle3); _local3 = _gameTitle.filters; _local3.push(new DropShadowFilter(4, 135)); _gameTitle.filters = _local3; _local3 = _gameTitle2.filters; _local3.push(new DropShadowFilter(4, 135)); _gameTitle2.filters = _local3; _local3 = _gameTitle3.filters; _local3.push(new DropShadowFilter(4, 135)); _gameTitle3.filters = _local3; _freeplayScreen = new FreePlaySelectionScreen(this); _freeplayScreen.visible = false; this._backDrop.addChild(_freeplayScreen); SoundController.startBackgroundMusic(0.25); BrandingManager.GetCurrentSponsorMaterial(_backDrop, "MainMenuLogo"); _backDrop.addChild(SpriteFactory.makeBorder(640, 480, 66115)); this.addEventListener(Event.ENTER_FRAME, onEnterFrame); this._loadingLevelsScreen = new Sprite(); _loadingLevelsScreen.graphics.beginFill(51, 0.95); _loadingLevelsScreen.graphics.drawRect(0, 0, 640, 480); _loadingLevelsScreen.graphics.endFill(); _loadingLevelsScreenText = new TextField(); _loadingLevelsScreenText.defaultTextFormat = new TextFormat("Abbess", 50, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); _loadingLevelsScreenText.alpha = 0.8; _loadingLevelsScreenText.embedFonts = true; _loadingLevelsScreenText.antiAliasType = AntiAliasType.ADVANCED; _loadingLevelsScreenText.mouseEnabled = false; _loadingLevelsScreenText.tabEnabled = false; _loadingLevelsScreenText.text = "Loading Level Data."; _loadingLevelsScreenText.x = 0; _loadingLevelsScreenText.y = 200; _loadingLevelsScreenText.width = 640; _loadingLevelsScreenText.height = 200; _local3 = _loadingLevelsScreenText.filters; _local3.push(new DropShadowFilter(4, 135)); _loadingLevelsScreenText.filters = _local3; this._loadingLevelsScreen.addChild(_loadingLevelsScreenText); this.addChild(this._loadingLevelsScreen); } public function onCourseOverPlayAgain(_arg1:MouseEvent):void{ _cod.HideDialog(); _GameObject.UnloadLevel(); if (stage.contains(_GameObject)){ stage.removeChild(_GameObject); }; } public function unlockNextLevel(_arg1:Boolean=true):void{ if (((((!((_unlockedLevels.data.unlockedLevels[this._currentMode] == null))) && (((this._currentLevelIndex + 1) < _unlockedLevels.data.unlockedLevels[this._currentMode].length)))) && (((this._currentLevelIndex + 1) >= 0)))){ _unlockedLevels.data.unlockedLevels[this._currentMode][(this._currentLevelIndex + 1)] = _arg1; }; _unlockedLevels.flush(); } public function onContinueCourse(_arg1:MouseEvent):void{ loadCourseSavedData(this._currentMode); } public function generateLevelData():void{ var courseKey:String; var gFunc:Function; this._levels = new Array(); this._levelPreviews = new Array(); this._levelGenFunctions = new Array(); this._allModes = ["Tutorial", "Ballistics", "Billiards 1", "Billiards 2", "Trick Shots 1", "Trick Shots 2", "Classics"]; for each (courseKey in this._allModes) { this._levelGenFunctions[courseKey] = new Array(); this._levelPreviews[courseKey] = new Array(); this._levels[courseKey] = new Array(); }; gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 20, 30, 200); _local3._levelShotPar = 3; _local3.addBall(Ball.MakeSuperBounceBall(20, 0, 0, 300, 200)); _local3.addGoal(Goal.MakeRegularGoal(500, 200, 30, 200)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = "Knock the colored Balls into the Goals with your Smiley Cue Ball!\n\nAim and Shoot with the Mouse!\n\n\n\n(Hint: Longer Power Arrow equals Stronger Shot!)"; return (_local3); }; this._levelGenFunctions["Tutorial"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 20, 50, 200); _local3._levelShotPar = 8; _local3.addBall(Ball.MakePerfectBounceBall(20, 0, 0, 300, 50)); _local3.addBall(Ball.MakeNormalBounceBall(20, 0, 0, 300, 350)); _local3.addGoal(Goal.MakeRegularGoal(525, 200, 75, 500)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = "Levels can have more than one Ball to sink!\n\nYou must sink all the Balls within the Shot Limit!\n\nIf the Smiley Cue Ball hits a Goal, You 'Scratch' and lose one Shot!\n\n(Hint: Bonus points are awarded for every shot 'Under Par'!)"; return (_local3); }; this._levelGenFunctions["Tutorial"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 20, 30, 50); _local3._levelShotPar = 5; _local3.addBall(Ball.MakeNormalBounceBall(20, 0, 0, 300, 50)); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(500, 0), new Point(600, 0), new Point(600, 100))); _local3.addBumper(Bumper.MakeNormalBounceBumper(200, 250, 150)); _local3.addGoal(Goal.MakeRegularGoal(500, 300, 50, 500)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = "Bumpers and Blocks can make straight shots impossible!\n\nEach Ricochet gives a Point bonus if the Ball sinks in a Goal!\n\n\n\n(Hint: Maximize your Points by sinking tricky Ricochet shots!)"; return (_local3); }; this._levelGenFunctions["Tutorial"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 20, 30, 50); _local3._levelShotPar = 6; _local3.addBall(Ball.MakePerfectBounceBall(20, 0, 0, 150, 50)); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(450, 190), new Point(600, 190), new Point(600, 210), new Point(450, 210))); _local3.addGoal(Goal.MakeRegularGoal(500, 50, 40, 100)); _local3.addGoal(Goal.MakeRegularGoal(500, 350, 25, 5000)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = "Levels can have more than one Goal!\n\nGoals display their Point value in their center!\n\n\n\n(Hint: Harder to reach Goals are usually worth more Points!)"; return (_local3); }; this._levelGenFunctions["Tutorial"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 200, 200); _local3._levelShotPar = 99; _local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 350, 200)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 367.4, 190)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 367.4, 210)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 384.8, 180)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 384.8, 200)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 384.8, 220)); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(30, 0), new Point(570, 0))); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(570, 400), new Point(30, 400))); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(600, 30), new Point(600, 370))); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(0, 370), new Point(0, 30))); _local3.addBumper(Bumper.MakeNormalBounceBumper(50, 150, 15)); _local3.addBumper(Bumper.MakeNormalBounceBumper(50, 250, 15)); _local3.addBumper(Bumper.MakePerfectBounceBumper(550, 150, 15)); _local3.addBumper(Bumper.MakePerfectBounceBumper(550, 250, 15)); _local3.addGoal(Goal.MakeRegularGoal(20, 20, 20, 100)); _local3.addGoal(Goal.MakeRegularGoal(580, 20, 20, 100)); _local3.addGoal(Goal.MakeRegularGoal(580, 380, 20, 100)); _local3.addGoal(Goal.MakeRegularGoal(20, 380, 20, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = "Ball, Bumper and Block Colors indicate how 'Bouncy' they are!\n\nRed equals Super Bounce\nPurple equals Moderate Bounce\nBlue equals Low Bounce\n\n(Hint: That's All Folks! Now go play the rest of the Courses!)"; return (_local3); }; this._levelGenFunctions["Tutorial"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 402; _local2 = 375; _local3 = new LevelData(_local1, _local2, 7, 201, 75, 1, false, 1, 0x9000, 0x5500, 1); _local3._levelShotPar = 14; _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 201, 190)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 179.8, 203)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 193.9, 203)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 208.1, 203)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 222.2, 203)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 186.9, 216)); _local3.addBall(Ball.MakeSuperBounceBall(7, 0, 0, 201, 216)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 215.1, 216)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 179.8, 229)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 222.2, 229)); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(191, 6), new Point(135, 144), new Point(9, 144), new Point(128, 134))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(210, 6), new Point(267, 144), new Point(393, 144), new Point(274, 134))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(6, 166), new Point(107, 240), new Point(69, 360), new Point(97, 240))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(396, 166), new Point(295, 240), new Point(333, 360), new Point(305, 240))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(89, 370), new Point(201, 300), new Point(313, 370), new Point(201, 310))); _local3.addGoal(Goal.MakeRegularGoal(201, 11, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(11, 155, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(390, 155, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(81, 360, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(321, 360, 11, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Billiards 1"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 632; _local2 = 332; _local3 = new LevelData(_local1, _local2, 10, 75, 166, 1, false, 1, 0x9000, 0x5500, 1); _local3._levelShotPar = 30; _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 450, 166)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 468, 155.9)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 468, 176.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 486, 125.8)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 486, 145.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 486, 166)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 486, 186.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 486, 206.2)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 504, 135.8)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 504, 155.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 504, 176.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 504, 196.2)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 522, 145.9)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 522, 166)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 522, 186.1)); _local3.addBlock(Block.MakePerfectBumperBlock(new Point(22, 0), new Point(306, 0))); _local3.addBlock(Block.MakePerfectBumperBlock(new Point(328, 0), new Point(610, 0))); _local3.addBlock(Block.MakePerfectBumperBlock(new Point(632, 22), new Point(632, 310))); _local3.addBlock(Block.MakePerfectBumperBlock(new Point(610, 332), new Point(328, 332))); _local3.addBlock(Block.MakePerfectBumperBlock(new Point(306, 332), new Point(22, 332))); _local3.addBlock(Block.MakePerfectBumperBlock(new Point(0, 310), new Point(0, 22))); _local3.addGoal(Goal.MakeRegularGoal(16, 16, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(316, 8, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(616, 16, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(16, 316, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(316, 324, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(616, 316, 16, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Billiards 1"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 420; _local3 = new LevelData(_local1, _local2, 10, 300, 50, 1, false, 1, 0x9000, 0x5500, 1); _local3._levelShotPar = 32; _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 300, 250)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 289.9, 268)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 310.1, 268)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 269, 286)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 258.9, 304)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 279.1, 304)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 248.9, 322)); _local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 269, 322)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 289.1, 322)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 331, 286)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 320.9, 304)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 341.1, 304)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 310.9, 322)); _local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 331, 322)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 351.1, 322)); _local3.addBlock(Block.MakePerfectBumperBlock(new Point(131, 5), new Point(469, 5))); _local3.addBlock(Block.MakePerfectBumperBlock(new Point(5, 199), new Point(104, 16))); _local3.addBlock(Block.MakePerfectBumperBlock(new Point(496, 16), new Point(595, 199))); _local3.addBlock(Block.MakePerfectBumperBlock(new Point(104, 404), new Point(5, 221))); _local3.addBlock(Block.MakePerfectBumperBlock(new Point(595, 221), new Point(496, 404))); _local3.addBlock(Block.MakePerfectBumperBlock(new Point(469, 415), new Point(131, 415))); _local3.addGoal(Goal.MakeRegularGoal(120, 16, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(480, 16, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(16, 210, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(584, 210, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(120, 404, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(480, 404, 16, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Billiards 1"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 270; _local3 = new LevelData(_local1, _local2, 7, 40, 135, 1, false, 1, 0x9000, 0x5500, 1); _local3._levelShotPar = 24; _local3.addBall(Ball.MakeSuperBounceBall(7, 0, 0, 415, 135)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 428, 127.9)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 428, 142.1)); _local3.addBall(Ball.MakeNormalBounceBall(7, 0, 0, 441, 120.8)); _local3.addBall(Ball.MakeSuperBounceBall(7, 0, 0, 441, 135)); _local3.addBall(Ball.MakeNormalBounceBall(7, 0, 0, 441, 149.2)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 454, 127.9)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 454, 142.1)); _local3.addBall(Ball.MakeSuperBounceBall(7, 0, 0, 467, 135)); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(91, 10), new Point(185, 10), new Point(260, 85), new Point(289, 85), new Point(265, 80), new Point(190, 5))); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(311, 85), new Point(340, 85), new Point(415, 10), new Point(509, 10), new Point(410, 5), new Point(335, 80))); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(528, 18), new Point(590, 85), new Point(590, 185), new Point(528, 252), new Point(595, 185), new Point(595, 80))); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(509, 260), new Point(415, 260), new Point(340, 185), new Point(311, 185), new Point(335, 190), new Point(410, 265))); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(289, 185), new Point(260, 185), new Point(185, 260), new Point(91, 260), new Point(190, 265), new Point(265, 190))); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(72, 252), new Point(10, 185), new Point(10, 85), new Point(72, 18), new Point(5, 80), new Point(5, 190))); _local3.addGoal(Goal.MakeRegularGoal(80, 10, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(80, 260, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(300, 85, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(300, 185, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(520, 10, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(520, 260, 11, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Billiards 1"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 620; _local2 = 420; _local3 = new LevelData(_local1, _local2, 7, 300, 370, 1, false, 1, 0x9000, 0x5500, 1); _local3._levelShotPar = 32; _local3.addBall(Ball.MakeSuperBounceBall(7, 0, 0, 300, 215)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 292.9, 202)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 307.1, 202)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 285.8, 189)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 300, 189)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 314.2, 189)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 273.7, 171)); _local3.addBall(Ball.MakeNormalBounceBall(7, 0, 0, 273.7, 156.8)); _local3.addBall(Ball.MakeNormalBounceBall(7, 0, 0, 260.7, 163.9)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 326.3, 171)); _local3.addBall(Ball.MakeNormalBounceBall(7, 0, 0, 326.3, 156.8)); _local3.addBall(Ball.MakeNormalBounceBall(7, 0, 0, 339.3, 163.9)); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(62, 162), new Point(10, 90), new Point(70, 10), new Point(174, 10), new Point(65, 5), new Point(5, 90))); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(193, 18), new Point(230, 80), new Point(370, 80), new Point(407, 18), new Point(365, 75), new Point(235, 75))); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(426, 10), new Point(530, 10), new Point(590, 90), new Point(538, 162), new Point(595, 90), new Point(535, 5))); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(519, 170), new Point(435, 170), new Point(365, 265), new Point(410, 318), new Point(370, 265), new Point(440, 175))); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(410, 342), new Point(360, 410), new Point(240, 410), new Point(190, 342), new Point(235, 415), new Point(365, 415))); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(190, 318), new Point(235, 265), new Point(165, 170), new Point(78, 170), new Point(160, 175), new Point(230, 265))); _local3.addGoal(Goal.MakeRegularGoal(70, 170, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(185, 10, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(415, 10, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(530, 170, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(415, 330, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(185, 330, 11, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Billiards 1"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 500; _local2 = 375; _local3 = new LevelData(_local1, _local2, 7, 160, 50, 1, true, 1, 9473791, 6184120, 1); _local3._levelShotPar = 26; _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 284, 275)); _local3.addBall(Ball.MakeSuperBounceBall(7, 0, 0, 297, 253.8)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 297, 267.9)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 297, 282.1)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 297, 296.2)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 310, 260.9)); _local3.addBall(Ball.MakeNormalBounceBall(7, 0, 0, 310, 275)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 310, 289.1)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 323, 253.8)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 323, 267.9)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 323, 282.1)); _local3.addBall(Ball.MakeSuperBounceBall(7, 0, 0, 323, 296.2)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 336, 275)); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(15, 0), new Point(19, 5), new Point(242, 5), new Point(246, 0))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(261, 10), new Point(375, 176.5), new Point(368, 178), new Point(259, 17))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(385, 192), new Point(498, 356), new Point(490, 352), new Point(382, 198))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(239, 363), new Point(125, 198.5), new Point(132, 197), new Point(241, 358))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(115, 183), new Point(2, 19), new Point(10, 23), new Point(118, 177))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(254, 375), new Point(258, 370), new Point(481, 370), new Point(485, 375))); _local3.addGoal(Goal.MakeRegularGoal(11, 11, 11, 500)); _local3.addGoal(Goal.MakeRegularGoal(252, 9, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(125, 187.5, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(375, 187.5, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(248, 366, 11, 100)); _local3.addGoal(Goal.MakeRegularGoal(489, 364, 11, 500)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Billiards 2"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 475, 200, 1, true, 1, 9473791, 6184120, 1); _local3._levelShotPar = 24; _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 110, 189.9)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 110, 210.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 128, 179.9)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 128, 220.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 146, 189.9)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 146, 210.1)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 164, 179.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 164, 220.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 182, 189.9)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 182, 210.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 200, 179.9)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 200, 220.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 218, 189.9)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 218, 210.1)); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(16, 0), new Point(90, 60), new Point(226, 60), new Point(300, 0))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(300, 0), new Point(374, 60), new Point(510, 60), new Point(584, 0))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, 16), new Point(60, 110), new Point(60, 290), new Point(0, 384))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(600, 16), new Point(540, 110), new Point(540, 290), new Point(600, 384))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(16, 400), new Point(90, 340), new Point(226, 340), new Point(300, 400))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(300, 400), new Point(374, 340), new Point(510, 340), new Point(584, 400))); _local3.addGoal(Goal.MakeRegularGoal(16, 16, 16, 500)); _local3.addGoal(Goal.MakeRegularGoal(300, 16, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(584, 16, 16, 500)); _local3.addGoal(Goal.MakeRegularGoal(16, 384, 16, 500)); _local3.addGoal(Goal.MakeRegularGoal(300, 384, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(584, 384, 16, 500)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Billiards 2"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 632; _local2 = 332; _local3 = new LevelData(_local1, _local2, 10, 316, 166, 1, true, 1, 9473791, 6184120, 1); _local3._levelShotPar = 30; _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 128, 155.9)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 128, 176.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 146, 145.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 146, 166)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 146, 186.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 164, 155.9)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 164, 176.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 468, 155.9)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 468, 176.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 486, 145.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 486, 166)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 486, 186.1)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 504, 155.9)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 504, 176.1)); _local3.addBumper(Bumper.MakeNormalBounceBumper(0, 45, 10)); _local3.addBumper(Bumper.MakeNormalBounceBumper(45, 0, 10)); _local3.addBumper(Bumper.MakeNormalBounceBumper(0, 287, 10)); _local3.addBumper(Bumper.MakeNormalBounceBumper(45, 332, 10)); _local3.addBumper(Bumper.MakeNormalBounceBumper(283, 16, 10)); _local3.addBumper(Bumper.MakeNormalBounceBumper(348, 16, 10)); _local3.addBumper(Bumper.MakeNormalBounceBumper(283, 316, 10)); _local3.addBumper(Bumper.MakeNormalBounceBumper(348, 316, 10)); _local3.addBumper(Bumper.MakeNormalBounceBumper(587, 332, 10)); _local3.addBumper(Bumper.MakeNormalBounceBumper(632, 287, 10)); _local3.addBumper(Bumper.MakeNormalBounceBumper(587, 0, 10)); _local3.addBumper(Bumper.MakeNormalBounceBumper(632, 45, 10)); _local3.addGoal(Goal.MakeRegularGoal(16, 16, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(316, 8, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(616, 16, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(16, 316, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(316, 324, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(616, 316, 16, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Billiards 2"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 7, 300, 70, 1, true, 1, 9473791, 6184120, 1); _local3._levelShotPar = 24; _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 285.9, 174)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 314.1, 174)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 292.9, 187)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 307.1, 187)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 271.8, 200)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 285.9, 200)); _local3.addBall(Ball.MakeSuperBounceBall(7, 0, 0, 300, 200)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 314.1, 200)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 328.2, 200)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 292.9, 213)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 307.1, 213)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 285.9, 226)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 314.1, 226)); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, 200), new Point(114, 76), new Point(300, 0), new Point(0, 0))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(600, 200), new Point(486, 76), new Point(300, 0), new Point(600, 0))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, 200), new Point(114, 324), new Point(300, 400), new Point(0, 400))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(600, 200), new Point(486, 324), new Point(300, 400), new Point(600, 400))); _local3.addBumper(Bumper.MakeNormalBounceBumper(200, 134, 9)); _local3.addBumper(Bumper.MakeNormalBounceBumper(400, 134, 9)); _local3.addBumper(Bumper.MakeNormalBounceBumper(200, 266, 9)); _local3.addBumper(Bumper.MakeNormalBounceBumper(400, 266, 9)); _local3.addBumper(Bumper.MakeSuperBounceBumper(300, 10, 9)); _local3.addBumper(Bumper.MakeSuperBounceBumper(300, 390, 9)); _local3.addBumper(Bumper.MakeSuperBounceBumper(10, 200, 9)); _local3.addBumper(Bumper.MakeSuperBounceBumper(590, 200, 9)); _local3.addGoal(Goal.MakeRegularGoal(157, 105, 15, 100)); _local3.addGoal(Goal.MakeRegularGoal(443, 105, 15, 100)); _local3.addGoal(Goal.MakeRegularGoal(157, 296, 15, 100)); _local3.addGoal(Goal.MakeRegularGoal(443, 296, 15, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Billiards 2"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 7, 300, 350, 1, true, 1, 9473791, 6184120, 1); _local3._levelShotPar = 36; _local3.addBall(Ball.MakeSuperBounceBall(7, 0, 0, 92.9, 187)); _local3.addBall(Ball.MakeNormalBounceBall(7, 0, 0, 107.1, 187)); _local3.addBall(Ball.MakeNormalBounceBall(7, 0, 0, 85.9, 200)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 100, 200)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 114.1, 200)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 92.9, 213)); _local3.addBall(Ball.MakeSuperBounceBall(7, 0, 0, 107.1, 213)); _local3.addBall(Ball.MakeNormalBounceBall(7, 0, 0, 492.9, 187)); _local3.addBall(Ball.MakeSuperBounceBall(7, 0, 0, 507.1, 187)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 485.9, 200)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 500, 200)); _local3.addBall(Ball.MakeNormalBounceBall(7, 0, 0, 514.1, 200)); _local3.addBall(Ball.MakeSuperBounceBall(7, 0, 0, 492.9, 213)); _local3.addBall(Ball.MakePerfectBounceBall(7, 0, 0, 507.1, 213)); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, 70), new Point(0, 0), new Point(600, 0), new Point(600, 70), new Point(300, 0))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, 330), new Point(0, 400), new Point(600, 400), new Point(600, 330), new Point(300, 400))); _local3.addBumper(Bumper.MakeSuperBounceBumper(260, 240, 11)); _local3.addBumper(Bumper.MakeSuperBounceBumper(260, 160, 11)); _local3.addBumper(Bumper.MakeSuperBounceBumper(340, 240, 11)); _local3.addBumper(Bumper.MakeSuperBounceBumper(340, 160, 11)); _local3.addBumper(Bumper.MakePerfectBounceBumper(300, 200, 50)); _local3.addGoal(Goal.MakeRegularGoal(245, 200, 15, 500)); _local3.addGoal(Goal.MakeRegularGoal(355, 200, 15, 500)); _local3.addGoal(Goal.MakeRegularGoal(300, 145, 15, 500)); _local3.addGoal(Goal.MakeRegularGoal(300, 0xFF, 15, 500)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Billiards 2"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 30, 200, 1, true, 1.25, 16773595, 10064004); _local3._levelShotPar = 10; _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 150, 200)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 167.4, 189.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 167.4, 210.1)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 184.8, 179.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 184.8, 200)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 184.8, 220.1)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 202.2, 169.8)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 202.2, 189.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 202.2, 210.1)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 202.2, 230.2)); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(390, 150), new Point(390, 250), new Point(400, 250), new Point(400, 150))); _local3.addBumper(Bumper.MakeSuperBounceBumper(300, 10, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(300, 390, 10)); _local3.addGoal(Goal.MakeRegularGoal(500, 200, 50, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3._levelStartMessage = "\nLet's Get Ballisitic!\n\nRemember: Red equals Super Bouncy!\n\n(Hint: You don't have to wait for the balls to stop moving\nto take your next shot!)"; _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Ballistics"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 300, 200, 1, true, 1.25, 16773595, 10064004); _local3._levelShotPar = 7; _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 530, 79.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 530, 100.1)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 547.4, 89.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 547.4, 110.1)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 530, 289.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 530, 310.1)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 547.4, 299.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 547.4, 320.1)); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(22, 0), new Point(300, 125), new Point(578, 0))); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(22, 400), new Point(300, 275), new Point(578, 400))); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(600, 125), new Point(550, 200), new Point(600, 275))); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(0, 125), new Point(50, 200), new Point(0, 275))); _local3.addGoal(Goal.MakeRegularGoal(50, 100, 13, 100)); _local3.addGoal(Goal.MakeRegularGoal(50, 300, 13, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Ballistics"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 300, 200, 1, true, 1.25, 16773595, 10064004); _local3._levelShotPar = 10; _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 400, 200)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 417.4, 189.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 417.4, 210.1)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 434.8, 200)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 434.8, 179.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 434.8, 220.1)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 200, 200)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 182.6, 189.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 182.6, 210.1)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 165.2, 200)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 165.2, 179.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 165.2, 220.1)); _local3.addBumper(Bumper.MakeSuperBounceBumper(90, 90, 20)); _local3.addBumper(Bumper.MakeSuperBounceBumper(90, 310, 20)); _local3.addBumper(Bumper.MakeSuperBounceBumper(510, 90, 20)); _local3.addBumper(Bumper.MakeSuperBounceBumper(510, 310, 20)); _local3.addGoal(Goal.MakeRegularGoal(40, 40, 20, 100)); _local3.addGoal(Goal.MakeRegularGoal(560, 40, 20, 100)); _local3.addGoal(Goal.MakeRegularGoal(40, 360, 20, 100)); _local3.addGoal(Goal.MakeRegularGoal(560, 360, 20, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Ballistics"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 25, 200, 1, true, 1.25, 16773595, 10064004); _local3._levelShotPar = 14; _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 275, 100)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 292.4, 89.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 292.4, 110.1)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 275, 300)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 292.4, 289.9)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 292.4, 310.1)); _local3.addBumper(Bumper.MakeSuperBounceBumper(300, 150, 12)); _local3.addBumper(Bumper.MakeSuperBounceBumper(300, 250, 12)); _local3.addBumper(Bumper.MakeSuperBounceBumper(250, 200, 12)); _local3.addBumper(Bumper.MakeSuperBounceBumper(350, 200, 12)); _local3.addGoal(Goal.MakeRegularGoal(300, 200, 30, 500)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Ballistics"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 30, 200, 1, true, 1.25, 16773595, 10064004); _local3._levelShotPar = 20; _local3.addBall(Ball.MakeSuperBounceBall(5, 0, 0, 543, 200)); _local3.addBall(Ball.MakeSuperBounceBall(5, 0, 0, 552, 194.9)); _local3.addBall(Ball.MakeSuperBounceBall(5, 0, 0, 552, 205.1)); _local3.addBall(Ball.MakeSuperBounceBall(5, 0, 0, 561, 189.9)); _local3.addBall(Ball.MakeSuperBounceBall(5, 0, 0, 561, 200)); _local3.addBall(Ball.MakeSuperBounceBall(5, 0, 0, 561, 210.1)); _local3.addBall(Ball.MakeSuperBounceBall(5, 0, 0, 570, 184.7)); _local3.addBall(Ball.MakeSuperBounceBall(5, 0, 0, 570, 194.9)); _local3.addBall(Ball.MakeSuperBounceBall(5, 0, 0, 570, 205.1)); _local3.addBall(Ball.MakeSuperBounceBall(5, 0, 0, 570, 215.3)); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(240, 200), new Point(300, 160), new Point(360, 200), new Point(300, 240))); _local3.addBumper(Bumper.MakeSuperBounceBumper(556, 75, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(526, 45, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(556, 325, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(526, 355, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(44, 75, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(74, 45, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(44, 325, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(74, 355, 10)); _local3.addGoal(Goal.MakeRegularGoal(15, 15, 13, 100)); _local3.addGoal(Goal.MakeRegularGoal(15, 385, 13, 100)); _local3.addGoal(Goal.MakeRegularGoal(585, 15, 13, 100)); _local3.addGoal(Goal.MakeRegularGoal(585, 385, 13, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = ""; return (_local3); }; this._levelGenFunctions["Ballistics"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 20, 50, 200, 1, true, 1, 0xFF00FF, 0x770077, 0.1); _local3._levelShotPar = 1; _local3.addBall(Ball.MakeSuperBounceBall(20, 0, 0, 300, 200)); _local3.addBumper(Bumper.MakeNormalBounceBumper(175, 200, 20)); _local3.addBumper(Bumper.MakeNormalBounceBumper(175, 160, 20)); _local3.addBumper(Bumper.MakeNormalBounceBumper(175, 240, 20)); _local3.addBumper(Bumper.MakeNormalBounceBumper(425, 160, 20)); _local3.addBumper(Bumper.MakeNormalBounceBumper(425, 200, 20)); _local3.addBumper(Bumper.MakeNormalBounceBumper(425, 240, 20)); _local3.addGoal(Goal.MakeRegularGoal(550, 200, 30, 500)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = "\nTrick Shots!\n\n\n\nSink all the balls in 1 shot!"; return (_local3); }; this._levelGenFunctions["Trick Shots 1"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 300, 30, 1, true, 1.5, 0xFF00FF, 0x770077, 0.1); _local3._levelShotPar = 1; _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 319, 200)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 281, 200)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 300, 250)); _local3.addGoal(Goal.MakeRegularGoal(550, 300, 15, 500)); _local3.addGoal(Goal.MakeRegularGoal(50, 300, 15, 500)); _local3.addGoal(Goal.MakeRegularGoal(300, 350, 15, 50000)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = ""; return (_local3); }; this._levelGenFunctions["Trick Shots 1"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 20, 550, 200, 1, true, 1, 0xFF00FF, 0x770077, 0.1); _local3._levelShotPar = 1; _local3.addBall(Ball.MakePerfectBounceBall(20, 0, 0, 300, 200)); _local3.addBall(Ball.MakePerfectBounceBall(20, 0, 0, 200, 200)); _local3.addGoal(Goal.MakeRegularGoal(100, 100, 25, 500)); _local3.addGoal(Goal.MakeRegularGoal(100, 300, 25, 500)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = ""; return (_local3); }; this._levelGenFunctions["Trick Shots 1"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 500; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 450, 25, 1, true, 1, 0xFF00FF, 0x770077, 0.1); _local3._levelShotPar = 1; _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 250, 335.5)); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(500, 300), new Point(500, 400), new Point(400, 400))); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(0, 300), new Point(0, 400), new Point(100, 400))); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(0, 0), new Point(0, 100), new Point(100, 0))); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(400, 0), new Point(400, 100), new Point(300, 0))); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(400, 300), new Point(400, 200), new Point(300, 300))); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(100, 200), new Point(100, 300), new Point(200, 300))); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(100, 200), new Point(100, 100), new Point(200, 100))); _local3.addGoal(Goal.MakeRegularGoal(250, 125, 20, 1000)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = ""; return (_local3); }; this._levelGenFunctions["Trick Shots 1"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 25, 50, 350, 1, true, 1, 0xFF00FF, 0x770077, 0.1); _local3._levelShotPar = 1; _local3.addBall(Ball.MakePerfectBounceBall(5, 0, 0, 350, 200)); _local3.addBall(Ball.MakePerfectBounceBall(5, 0, 0, 340, 175)); _local3.addBall(Ball.MakePerfectBounceBall(5, 0, 0, 340, 225)); _local3.addBall(Ball.MakeNormalBounceBall(5, 0, 0, 320, 172)); _local3.addBall(Ball.MakeNormalBounceBall(5, 0, 0, 320, 228)); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(100, 400), new Point(100, 300), new Point(105, 300), new Point(105, 400))); _local3.addBumper(Bumper.MakeSuperBounceBumper(-25, 150, 75)); _local3.addGoal(Goal.MakeRegularGoal(450, 200, 20, 200)); _local3.addGoal(Goal.MakeRegularGoal(400, 80, 20, 200)); _local3.addGoal(Goal.MakeRegularGoal(400, 320, 20, 200)); _local3.addGoal(Goal.MakeRegularGoal(330, 30, 20, 200)); _local3.addGoal(Goal.MakeRegularGoal(330, 370, 20, 200)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = ""; return (_local3); }; this._levelGenFunctions["Trick Shots 1"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 20, 30, 300, 1, true, 1, 0xFF00FF, 0x770077, 0.25); _local3._levelShotPar = 2; _local3.addBall(Ball.MakeNormalBounceBall(20, 0, 0, 230, 100)); _local3.addBall(Ball.MakeNormalBounceBall(20, 0, 0, 430, 300)); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(230, 200), new Point(200, 400), new Point(260, 400))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(230, 200), new Point(300, 180), new Point(370, 200), new Point(300, 220))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(460, 200), new Point(530, 180), new Point(600, 200), new Point(530, 220))); _local3.addGoal(Goal.MakeRegularGoal(500, 370, 25, 500)); _local3.addGoal(Goal.MakeRegularGoal(230, 30, 25, 500)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = "\nTrick Shots 2!\n\nSink all the balls in only 2 shots!\n\n(Hint: Where the Smiley Cue stops after the first shot\nis critical to sinking the second shot!)"; return (_local3); }; this._levelGenFunctions["Trick Shots 2"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 15, 550, 200, 1, true, 1, 0xFF00FF, 0x770077, 0.25); _local3._levelShotPar = 2; _local3.addBall(Ball.MakeNormalBounceBall(15, 0, 0, 150, 100)); _local3.addBall(Ball.MakeNormalBounceBall(15, 0, 0, 150, 300)); _local3.addBlock(Block.MakePerfectBounceBlock(new Point(0, 100), new Point(200, 200), new Point(0, 300))); _local3.addBumper(Bumper.MakeSuperBounceBumper(300, 200, 25)); _local3.addGoal(Goal.MakeRegularGoal(50, 50, 20, 200)); _local3.addGoal(Goal.MakeRegularGoal(50, 350, 20, 200)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = ""; return (_local3); }; this._levelGenFunctions["Trick Shots 2"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 20, 500, 120, 1, true, 1, 0xFF00FF, 0x770077, 0.25); _local3._levelShotPar = 2; _local3.addBall(Ball.MakeNormalBounceBall(20, 0, 0, 100, 100)); _local3.addBall(Ball.MakeSuperBounceBall(20, 0, 0, 375, 325)); _local3.addBumper(Bumper.MakeSuperBounceBumper(525, 225, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(425, 225, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(325, 225, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(225, 225, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(575, 175, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(475, 175, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(375, 175, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(275, 175, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(175, 175, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(575, 275, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(475, 275, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(375, 275, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(275, 275, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(175, 275, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(475, 295, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(475, 315, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(475, 335, 10)); _local3.addGoal(Goal.MakeRegularGoal(30, 30, 25, 200)); _local3.addGoal(Goal.MakeRegularGoal(550, 350, 25, 2000)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = ""; return (_local3); }; this._levelGenFunctions["Trick Shots 2"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 300, 200, 1, true, 1, 0xFF00FF, 0x770077, 0.25); _local3._levelShotPar = 2; _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 150, 250)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 550, 250)); _local3.addBlock(Block.MakeNormalBumperBlock(new Point(200, 150), new Point(400, 150))); _local3.addBlock(Block.MakeNormalBumperBlock(new Point(450, 200), new Point(450, 400))); _local3.addBlock(Block.MakeSuperBounceBlock(new Point(500, 0), new Point(600, 0), new Point(600, 100))); _local3.addBumper(Bumper.MakePerfectBounceBumper(400, 200, 50)); _local3.addGoal(Goal.MakeRegularGoal(50, 350, 20, 500)); _local3.addGoal(Goal.MakeRegularGoal(550, 350, 20, 500)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = ""; return (_local3); }; this._levelGenFunctions["Trick Shots 2"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 30, 30, 1, true, 1, 0xFF00FF, 0x770077, 0.25); _local3._levelShotPar = 2; _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 200, 200)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 400, 180)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 575, 100)); _local3.addGoal(Goal.MakeRegularGoal(200, 25, 20, 500)); _local3.addGoal(Goal.MakeRegularGoal(200, 375, 20, 500)); _local3.addGoal(Goal.MakeRegularGoal(575, 25, 20, 500)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); _local3._levelStartMessage = ""; return (_local3); }; this._levelGenFunctions["Trick Shots 2"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 400; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 200, 100, 1, false, 1, 0xFFFFFF, 0xEEEEEE, 0.6); _local3._levelShotPar = 10; _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 200, 229)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 210.1, 247)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 189.9, 247)); _local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 200, 265)); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(215, 58), new Point(378, 341), 10, 30)); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(361, 368), new Point(39, 368), 10, 30)); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(22, 341), new Point(185, 58), 10, 30)); _local3.addGoal(Goal.MakeRegularGoal(200, 64, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(33, 353, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(367, 353, 16, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Classics"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 400; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 200, 40, 1, false, 1, 0xFFFFFF, 0xEEEEEE, 0.6); _local3._levelShotPar = 20; _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 200, 179)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 210.1, 197)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 189.9, 197)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 200, 215)); _local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 221.1, 215)); _local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 178.9, 215)); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(24, 0), new Point(376, 0), 10)); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(400, 24), new Point(400, 376), 10)); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(376, 400), new Point(24, 400), 10)); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(0, 376), new Point(0, 24), 10)); _local3.addGoal(Goal.MakeRegularGoal(16, 16, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(16, 384, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(384, 384, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(384, 16, 16, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Classics"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 400; _local2 = 400; _local3 = new LevelData(_local1, _local2, 10, 200, 100, 1, false, 1, 0xFFFFFF, 0xEEEEEE, 0.6); _local3._levelShotPar = 16; _local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 200, 219)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 210.1, 237)); _local3.addBall(Ball.MakePerfectBounceBall(10, 0, 0, 189.9, 237)); _local3.addBall(Ball.MakeNormalBounceBall(10, 0, 0, 200, 0xFF)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 220.1, 0xFF)); _local3.addBall(Ball.MakeSuperBounceBall(10, 0, 0, 179.9, 0xFF)); _local3.addBlock(Block.MakeNormalBumperBlock(new Point(216, 30), new Point(379, 149), 5, 54)); _local3.addBlock(Block.MakeNormalBumperBlock(new Point(390, 180), new Point(327, 374), 5, 54)); _local3.addBlock(Block.MakeNormalBumperBlock(new Point(300, 392), new Point(100, 392), 5, 54)); _local3.addBlock(Block.MakeNormalBumperBlock(new Point(73, 374), new Point(10, 180), 5, 54)); _local3.addBlock(Block.MakeNormalBumperBlock(new Point(21, 149), new Point(184, 30), 5, 54)); _local3.addGoal(Goal.MakeRegularGoal(200, 30, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(15, 165, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(385, 165, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(85, 385, 16, 100)); _local3.addGoal(Goal.MakeRegularGoal(315, 385, 16, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Classics"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; _local1 = 600; _local2 = 400; _local3 = new LevelData(_local1, _local2, 8, 125, 200, 1, true, 1, 0xFFFFFF, 0xEEEEEE, 0.6); _local3._levelShotPar = 12; _local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 250, 200)); _local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 264, 192)); _local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 264, 208)); _local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 278, 184)); _local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 278, 200)); _local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 278, 216)); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(250, 100), new Point(350, 100), 8, 45)); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(500, 150), new Point(500, 250), 8, 45)); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(350, 300), new Point(250, 300), 8, 45)); _local3.addBlock(Block.MakeSuperBumperBlock(new Point(100, 250), new Point(100, 150), 8, 45)); _local3.addBumper(Bumper.MakeSuperBounceBumper(100, 100, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(500, 100, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(100, 300, 10)); _local3.addBumper(Bumper.MakeSuperBounceBumper(500, 300, 10)); _local3.addGoal(Goal.MakeRegularGoal(15, 15, 15, 100)); _local3.addGoal(Goal.MakeRegularGoal(15, 200, 15, 100)); _local3.addGoal(Goal.MakeRegularGoal(15, 385, 15, 100)); _local3.addGoal(Goal.MakeRegularGoal(585, 385, 15, 100)); _local3.addGoal(Goal.MakeRegularGoal(585, 200, 15, 100)); _local3.addGoal(Goal.MakeRegularGoal(585, 15, 15, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Classics"].push(gFunc); gFunc = function ():LevelData{ var _local1:Number; var _local2:Number; var _local3:LevelData; var _local4:Number; _local1 = 400; _local2 = 400; _local3 = new LevelData(_local1, _local2, 8, 50, 200, 1, true, 1, 0xFFFFFF, 0xEEEEEE, 0.6); _local3._levelShotPar = 36; _local3.addBall(Ball.MakeSuperBounceBall(8, 0, 0, 50, 150)); _local3.addBall(Ball.MakeSuperBounceBall(8, 0, 0, 50, 175)); _local3.addBall(Ball.MakeSuperBounceBall(8, 0, 0, 50, 225)); _local3.addBall(Ball.MakeSuperBounceBall(8, 0, 0, 50, 250)); _local3.addBall(Ball.MakeNormalBounceBall(8, 0, 0, 350, 150)); _local3.addBall(Ball.MakeNormalBounceBall(8, 0, 0, 350, 175)); _local3.addBall(Ball.MakeNormalBounceBall(8, 0, 0, 350, 200)); _local3.addBall(Ball.MakeNormalBounceBall(8, 0, 0, 350, 225)); _local3.addBall(Ball.MakeNormalBounceBall(8, 0, 0, 350, 250)); _local3.addBall(Ball.MakePerfectBounceBall(8, 0, 0, 200, 200)); _local4 = 115; _local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, _local4), new Point(0, 0), new Point(_local4, 0))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(0, (_local2 - _local4)), new Point(_local4, _local2), new Point(0, _local2))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point((_local1 - _local4), 0), new Point(_local1, 0), new Point(_local1, _local4))); _local3.addBlock(Block.MakeNormalBounceBlock(new Point(_local1, (_local2 - _local4)), new Point(_local1, _local2), new Point((_local1 - _local4), _local2))); _local3.addBumper(Bumper.MakeNormalBounceBumper(16, 168, 12)); _local3.addBumper(Bumper.MakeNormalBounceBumper(16, 232, 12)); _local3.addBumper(Bumper.MakeNormalBounceBumper(384, 168, 12)); _local3.addBumper(Bumper.MakeNormalBounceBumper(384, 232, 12)); _local3.addBumper(Bumper.MakeSuperBounceBumper(160, 200, 12)); _local3.addBumper(Bumper.MakeSuperBounceBumper(130, 200, 12)); _local3.addBumper(Bumper.MakeSuperBounceBumper(240, 200, 12)); _local3.addBumper(Bumper.MakeSuperBounceBumper(270, 200, 12)); _local3.addBumper(Bumper.MakeSuperBounceBumper(200, 160, 12)); _local3.addBumper(Bumper.MakeSuperBounceBumper(200, 130, 12)); _local3.addBumper(Bumper.MakeSuperBounceBumper(200, 240, 12)); _local3.addBumper(Bumper.MakeSuperBounceBumper(200, 270, 12)); _local3.addGoal(Goal.MakeRegularGoal(16, 200, 12, 100)); _local3.addGoal(Goal.MakeRegularGoal(384, 200, 12, 100)); _local3._levelStartBalls = (_local3._balls.length - 1); _local3.GeneratePreview(); return (_local3); }; this._levelGenFunctions["Classics"].push(gFunc); } public function StartMenuAnimation():void{ this.addEventListener(Event.ENTER_FRAME, onAnimateMenu); } public function onCourseButtonClicked(_arg1:MouseEvent):void{ trace(_arg1.currentTarget.courseKey); this._currentMode = _arg1.currentTarget.courseKey; this._currentLevelIndex = -1; if (this.checkIfCourseHasSavedData(this._currentMode)){ ContinueCourseDialog.ShowDialog(this, onContinueCourse, onStartOverCourse); } else { onStartOverCourse(_arg1); }; } public function StopMenuAnimation():void{ this.removeEventListener(Event.ENTER_FRAME, onAnimateMenu); } } }//package
Section 51
//Heartbeat (Heartbeat) package { import flash.media.*; public dynamic class Heartbeat extends Sound { } }//package
Section 52
//HMGSplashScreen (HMGSplashScreen) package { import flash.events.*; import flash.text.*; import flash.display.*; import fl.transitions.*; import flash.media.*; import flash.geom.*; import flash.utils.*; import fl.transitions.easing.*; import flash.net.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.ui.*; public dynamic class HMGSplashScreen extends MovieClip { public var head_in:Tween; public var heartbeat:Heartbeat; public var doneFlag:Boolean; public var Games_mc:MovieClip; public var meat_in:Tween; public var Head_mc:MovieClip; public var slam:Slam; public var HMGSite_mc:MovieClip; public var timer:Timer; public var games_in:Tween; public var Meat_mc:MovieClip; public var heart_scaleY_in:Tween; public var tagline_in:Tween; public var GoToHMG_btn:SimpleButton; public var hmg_in:Tween; public var noclickFlag:Boolean; public var heart_alpha_in:Tween; public var ProducedBy_mc:MovieClip; public var Brain_mc:MovieClip; public var heartbeatTimer:Timer; public var Skip_btn:SimpleButton; public var _doneCallback:Function; public var producedBy_in:Tween; public var TagLine_mc:MovieClip; public var heart_scaleX_in:Tween; public function HMGSplashScreen(){ addFrameScript(0, frame1); } public function gamesDone(_arg1:TweenEvent):void{ if (!doneFlag){ slam.play(); tagline_in = new Tween(TagLine_mc, "y", Bounce.easeOut, 660, 505, 6, false); tagline_in.addEventListener(TweenEvent.MOTION_FINISH, taglineDone); }; } public function heartBeat(_arg1:TimerEvent){ if (!doneFlag){ heartbeat.play(); heart_alpha_in = new Tween(Brain_mc, "alpha", Bounce.easeIn, 0.1, 1, 10, false); heart_scaleX_in = new Tween(Brain_mc, "scaleX", Bounce.easeIn, 0.8, 1, 10, false); heart_scaleY_in = new Tween(Brain_mc, "scaleY", Bounce.easeIn, 0.8, 1, 10, false); }; } public function taglineDone(_arg1:TweenEvent):void{ if (!doneFlag){ if (noclickFlag){ slam.play(); HMGSite_mc.visible = true; hmg_in = new Tween(HMGSite_mc, "y", Bounce.easeOut, 660, 605, 6, false); } else { slam.play(); GoToHMG_btn.visible = true; hmg_in = new Tween(GoToHMG_btn, "y", Bounce.easeOut, 660, 605, 6, false); }; }; } public function producedbyDone(_arg1:TweenEvent):void{ if (!doneFlag){ head_in = new Tween(Head_mc, "x", Bounce.easeOut, -200, 20, 6, false); meat_in = new Tween(Meat_mc, "y", Bounce.easeOut, -175, 20, 6, false); games_in = new Tween(Games_mc, "x", Bounce.easeOut, 820, 480, 6, false); games_in.addEventListener(TweenEvent.MOTION_FINISH, gamesDone); slam.play(); }; } public function loadHMG(_arg1:MouseEvent):void{ var _local2:URLRequest; if (!noclickFlag){ _local2 = new URLRequest("http://www.headmeatgames.com"); navigateToURL(_local2, "_blank"); }; } public function done(_arg1:Event){ if (timer != null){ timer.stop(); }; doneFlag = true; if (_doneCallback != null){ _doneCallback(_arg1); } else { this.parent.removeChild(this); }; } public function startAnimation():void{ timer = new Timer(5000); timer.addEventListener(TimerEvent.TIMER, done); timer.start(); heartbeatTimer = new Timer(3000, 1); heartbeatTimer.addEventListener(TimerEvent.TIMER, heartBeat); heartbeatTimer.start(); slam = new Slam(); heartbeat = new Heartbeat(); producedBy_in = new Tween(ProducedBy_mc, "alpha", Strong.easeIn, 0, 100, 10, false); producedBy_in.addEventListener(TweenEvent.MOTION_FINISH, producedbyDone); } function frame1(){ stop(); HMGSite_mc.y = 700; HMGSite_mc.visible = false; GoToHMG_btn.y = 700; GoToHMG_btn.visible = false; Head_mc.x = -250; Meat_mc.y = -175; Games_mc.x = 820; TagLine_mc.y = 660; ProducedBy_mc.alpha = 0; Brain_mc.alpha = 0.01; Brain_mc.scaleX = 0.8; Brain_mc.scaleY = 0.8; doneFlag = false; Skip_btn.addEventListener(MouseEvent.CLICK, done); GoToHMG_btn.addEventListener(MouseEvent.CLICK, loadHMG); } } }//package
Section 53
//LevelData (LevelData) package { import flash.text.*; import flash.display.*; import mx.effects.*; import com.GameEngine.Entities.*; import com.GameEngine.Utils.*; import flash.geom.*; import mx.effects.easing.*; import flash.filters.*; public class LevelData { public var _levelShotPar:int;// = 99 public var _levelUnderParBonusIncrement:int;// = 100 public var _sinkingBalls:Array; public var _levelHeight:Number; private var _warnTween:Tween; public var _levelMultiBallBonus:int;// = 0 public var _ballLayer:Sprite; public var _gWellLayer:Sprite; public var _startBallCount:uint; public var _bumpers:Array; public var _shotChargeMax:Number;// = 200 public var _levelGoalScore:int;// = 0 public var _levelWidth:Number; public var _balls:Array; public var _gWells:Array; public var _blockLayer:Sprite; public var _levelStartMessage:String;// = "" public var _levelUnderParBonus:int;// = 0 public var _levelShotsLowWarningShown:Boolean;// = false public var _levelStartBalls:int;// = 0 public var _cursor:Sprite; public var _goalLayer:Sprite; public var _levelPreview:Bitmap; public var _cue:Ball; public var _warnField:TextField; public var _levelFriction:Number;// = 1 public var _levelRicochetBonus:int;// = 0 public var _blocks:Array; public var _bonusTweenEnd:Number;// = 300 public var _goals:Array; public var _bonusTextFormat:TextFormat; public var _warnTextFormat:TextFormat; public var _tabletopLayer:Sprite; public var _backDrop:Sprite; public var _bonusField:TextField; public var _levelShotCounter:int;// = 0 public var _shotLineLayer:Sprite; public var _shotCharge:Number;// = 0 private var _showTween:Tween; public var _warnTweenEnd:Number;// = 100 public var _bonusTweenStart:Number;// = 400 public var _warnTweenStart:Number;// = 400 public static const DEFAULTMAXVELOCITY:Number = 750; public static var MAXVELOCITY:Number = 750; public function LevelData(_arg1:Number, _arg2:Number, _arg3:Number=10, _arg4:Number=0, _arg5:Number=0, _arg6:Number=1, _arg7:Boolean=true, _arg8:Number=1, _arg9:uint=11580415, _arg10:uint=6974361, _arg11:Number=0.4){ var g:Graphics; var m:Matrix; var f:Array; var borderThickness:Number; var border:Block; var width = _arg1; var height = _arg2; var cueSize = _arg3; var cueX = _arg4; var cueY = _arg5; var levelFriction = _arg6; var includeBorder = _arg7; var borderBounce = _arg8; var highlightColor = _arg9; var lowlightColor = _arg10; var accentAlpha = _arg11; _levelStartMessage = ""; _levelFriction = 1; _shotChargeMax = 200; _shotCharge = 0; _levelStartBalls = 0; _levelShotCounter = 0; _levelShotPar = 99; _levelShotsLowWarningShown = false; _levelUnderParBonusIncrement = 100; _levelGoalScore = 0; _levelMultiBallBonus = 0; _levelRicochetBonus = 0; _levelUnderParBonus = 0; _bonusTextFormat = new TextFormat("Abbess", 30, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); _bonusTweenStart = 400; _bonusTweenEnd = 300; _warnTextFormat = new TextFormat("Abbess", 30, 15935271, null, null, null, null, null, TextFormatAlign.CENTER); _warnTweenStart = 400; _warnTweenEnd = 100; super(); this._levelFriction = 0.6; LevelData.MAXVELOCITY = LevelData.DEFAULTMAXVELOCITY; _levelWidth = width; _levelHeight = height; _backDrop = new Sprite(); _tabletopLayer = new Sprite(); g = _tabletopLayer.graphics; m = new Matrix(); m.createGradientBox(_levelWidth, _levelHeight, 0, 0, 0); g.beginGradientFill(GradientType.RADIAL, [0xFFFFFF, 0xDDDDDD], [1, 1], [0, 0xFF], m); g.drawRect(0, 0, _levelWidth, _levelHeight); g.endFill(); g.beginGradientFill(GradientType.LINEAR, [lowlightColor, highlightColor, lowlightColor], [accentAlpha, accentAlpha, accentAlpha], [0, 128, 0xFF], m); g.drawRect(0, 0, _levelWidth, _levelHeight); g.endFill(); f = _tabletopLayer.filters; f.push(new GlowFilter(0xFFFFFF, 1, 12, 12, 2, 1, false, false)); _tabletopLayer.filters = f; _shotLineLayer = new Sprite(); _blockLayer = new Sprite(); _ballLayer = new Sprite(); _gWellLayer = new Sprite(); _goalLayer = new Sprite(); _tabletopLayer.mouseEnabled = false; _tabletopLayer.mouseChildren = false; _shotLineLayer.mouseEnabled = false; _shotLineLayer.mouseChildren = false; _blockLayer.mouseEnabled = false; _blockLayer.mouseChildren = false; _ballLayer.mouseEnabled = false; _ballLayer.mouseChildren = false; _gWellLayer.mouseEnabled = false; _gWellLayer.mouseChildren = false; _goalLayer.mouseEnabled = false; _goalLayer.mouseChildren = false; _backDrop.addChild(_tabletopLayer); _backDrop.addChild(_gWellLayer); _backDrop.addChild(_goalLayer); _backDrop.addChild(_blockLayer); _backDrop.addChild(_shotLineLayer); _backDrop.addChild(_ballLayer); _gWells = new Array(); _goals = new Array(); _balls = new Array(); _blocks = new Array(); _bumpers = new Array(); _sinkingBalls = new Array(); if (includeBorder){ borderThickness = 0.1; border = new Block((_levelWidth * _levelHeight), borderBounce, 102, 1, 51, 0.1, new Array(new Point(0, 0), new Point(_levelWidth, 0), new Point(_levelWidth, _levelHeight), new Point(0, _levelHeight))); border.showCollide = function ():void{ }; border._sprite.filters = new Array(); this.addBlock(border); }; _cue = Ball.MakeCueBall(cueSize, 0, 0, cueX, cueY); this.addBall(_cue); this._cursor = new Sprite(); _cursor.graphics.beginFill(4294929920, 0.9); _cursor.graphics.drawCircle(0, 0, cueSize); _cursor.graphics.drawCircle(0, 0, (cueSize - 1)); _cursor.graphics.drawCircle(0, 0, (cueSize - 2)); _cursor.graphics.drawCircle(0, 0, (cueSize - 3)); _cursor.graphics.drawCircle(0, 0, 1); _cursor.graphics.endFill(); this._cursor.x = (width * 0.5); this._cursor.y = (height * 0.5); _backDrop.addChild(this._cursor); f = this._shotLineLayer.filters; f.push(new GlowFilter(0x330000, 1, (cueSize * 1), (cueSize * 1), 2, 1, true, true)); this._shotLineLayer.filters = f; _bonusTweenStart = height; _bonusTweenEnd = (height - 100); this._bonusField = new TextField(); this._bonusField.defaultTextFormat = this._bonusTextFormat; this._bonusField.selectable = false; this._bonusField.mouseEnabled = false; this._bonusField.tabEnabled = false; this._bonusField.embedFonts = true; this._bonusField.antiAliasType = AntiAliasType.ADVANCED; this._bonusField.width = 640; this._bonusField.height = 480; this._bonusField.x = ((width - _bonusField.width) * 0.5); this._bonusField.y = _bonusTweenStart; this._bonusField.visible = false; _backDrop.addChild(this._bonusField); f = this._bonusField.filters; f.push(new GlowFilter(0, 0.5, 15, 15)); this._bonusField.filters = f; this._bonusField.cacheAsBitmap = true; _warnTweenStart = height; _warnTweenEnd = 100; this._warnField = new TextField(); this._warnField.defaultTextFormat = this._warnTextFormat; this._warnField.selectable = false; this._warnField.mouseEnabled = false; this._warnField.tabEnabled = false; this._warnField.embedFonts = true; this._warnField.antiAliasType = AntiAliasType.ADVANCED; this._warnField.width = 640; this._warnField.height = 480; this._warnField.x = ((width - _warnField.width) * 0.5); this._warnField.y = _warnTweenStart; this._warnField.visible = false; _backDrop.addChild(this._warnField); f = this._warnField.filters; f.push(new GlowFilter(0, 0.5, 15, 15)); this._warnField.filters = f; this._warnField.cacheAsBitmap = true; } public function removeBumper(_arg1:Bumper):void{ var _local2:int; _local2 = this._bumpers.indexOf(_arg1); if (_local2 != -1){ this._bumpers.splice(_local2, 1); this._blockLayer.removeChild(_arg1); }; } public function ShowShotWarningField(_arg1:String):void{ this._warnField.text = _arg1; this._warnField.setTextFormat(this._warnTextFormat); this._warnField.y = _warnTweenStart; this._warnField.alpha = 1; this._warnField.visible = true; _warnTween = new Tween(this, _warnTweenStart, _warnTweenEnd, 3500); _warnTween.setTweenHandlers(onWarnUpdate, onWarnEnd); _warnTween.easingFunction = Bounce.easeOut; } public function HideBonusField():void{ this._bonusField.visible = false; this._bonusField.alpha = 1; } public function ShowBonusField(_arg1:String):void{ this._bonusField.text = _arg1; this._bonusField.setTextFormat(this._bonusTextFormat); this._bonusField.y = _bonusTweenStart; this._bonusField.alpha = 1; this._bonusField.visible = true; _showTween = new Tween(this, _bonusTweenStart, _bonusTweenEnd, 2500); _showTween.setTweenHandlers(onBonusUpdate, onBonusEnd); _showTween.easingFunction = Bounce.easeOut; } public function onWarnUpdate(_arg1:Number):void{ this._warnField.y = _arg1; } public function removeGravityWell(_arg1:GravityWell):void{ var _local2:int; _local2 = this._gWells.indexOf(_arg1); if (_local2 != -1){ this._gWells.splice(_local2, 1); this._gWellLayer.removeChild(_arg1); }; } public function sinkBall(_arg1:Ball, _arg2:Goal):void{ var _local3:int; _local3 = this._balls.indexOf(_arg1); if (_local3 != -1){ this._balls.splice(_local3, 1); _arg1.goal = _arg2; _arg1.sinkCounter = 0; this._sinkingBalls.push(_arg1); }; } public function LoadScoreToken(_arg1:Object):void{ this._levelGoalScore = _arg1.levelGoalScore; this._levelMultiBallBonus = _arg1.levelMultiBallBonus; this._levelRicochetBonus = _arg1.levelRicochetBonus; this._levelUnderParBonus = _arg1.levelUnderParBonus; this._levelUnderParBonusIncrement = _arg1.levelUnderParBonusIncrement; this._levelShotCounter = _arg1.levelShotCounter; } public function onBonusEnd(_arg1:Number):void{ this.onBonusUpdate(_arg1); this.HideBonusField(); } public function addBall(_arg1:Ball):void{ var _local2:int; _local2 = this._balls.indexOf(_arg1); if (_local2 == -1){ this._balls.push(_arg1); this._ballLayer.addChild(_arg1); }; } public function addGoal(_arg1:Goal):void{ var _local2:int; _local2 = this._goals.indexOf(_arg1); if (_local2 == -1){ this._goals.push(_arg1); this._goalLayer.addChild(_arg1); }; } public function ClearShotLine():void{ var _local1:Graphics; _local1 = this._shotLineLayer.graphics; _local1.clear(); } public function GetScoreToken():Object{ var _local1:Object; _local1 = {levelGoalScore:_levelGoalScore, levelMultiBallBonus:_levelMultiBallBonus, levelRicochetBonus:_levelRicochetBonus, levelUnderParBonus:_levelUnderParBonus, levelUnderParBonusIncrement:_levelUnderParBonusIncrement, levelShotCounter:_levelShotCounter}; return (_local1); } public function onBonusUpdate(_arg1:Number):void{ this._bonusField.y = _arg1; } public function addBumper(_arg1:Bumper):void{ var _local2:int; _local2 = this._bumpers.indexOf(_arg1); if (_local2 == -1){ this._bumpers.push(_arg1); this._blockLayer.addChild(_arg1); }; } public function addBlock(_arg1:Block):void{ var _local2:int; _local2 = this._blocks.indexOf(_arg1); if (_local2 == -1){ this._blocks.push(_arg1); this._blockLayer.addChild(_arg1); }; } public function removeBlock(_arg1:Block):void{ var _local2:int; _local2 = this._blocks.indexOf(_arg1); if (_local2 != -1){ this._blocks.splice(_local2, 1); this._blockLayer.removeChild(_arg1); }; } public function GeneratePreview(_arg1:Number=0.05):void{ this._levelPreview = DisplayConverter.spriteToBitmap(this._backDrop, false, _arg1, this._levelWidth, this._levelHeight); } public function GetShotPowerRatio():Number{ return ((this._shotCharge / this._shotChargeMax)); } public function GetShotPower():Number{ return ((this.GetShotPowerRatio() * LevelData.MAXVELOCITY)); } public function onWarnEnd(_arg1:Number):void{ this.onWarnUpdate(_arg1); this.HideWarnField(); } public function removeBall(_arg1:Ball):void{ var _local2:int; _local2 = this._sinkingBalls.indexOf(_arg1); if (_local2 != -1){ this._sinkingBalls.splice(_local2, 1); this._ballLayer.removeChild(_arg1); }; } public function removeGoal(_arg1:Goal):void{ var _local2:int; _local2 = this._goals.indexOf(_arg1); if (_local2 != -1){ this._goals.splice(_local2, 1); this._goalLayer.removeChild(_arg1); }; } public function GenerateShotLine():Sprite{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Graphics; var _local5:Vector; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Point; var _local13:Point; var _local14:Number; _local1 = this._cursor.x; _local2 = this._cursor.y; _local3 = Math.min((this.GetShotPowerRatio() + 0.3), 0.85); _local4 = this._shotLineLayer.graphics; _local5 = Vector.fromPoints(_cue.x, _cue.y, _local1, _local2); _local6 = _local5.length; _local5 = _local5.Normalize(); _local4.clear(); _local4.moveTo(_cue.x, _cue.y); _local4.lineStyle((this._cue._radius * 2), 0xFFFFFF, 0.4); _local4.lineTo((_cue.x + (_local5.x * 700)), (_cue.y + (_local5.y * 700))); _local7 = Math.min(_local6, this._shotChargeMax); _local8 = -(_local5.y); _local9 = _local5.x; _local10 = _local5.y; _local11 = -(_local5.x); _local12 = new Point((_cue.x + (_local5.x * _local7)), (_cue.y + (_local5.y * _local7))); _local13 = new Point((_cue.x + (_local5.x * (_local7 * 0.75))), (_cue.y + (_local5.y * (_local7 * 0.75)))); _local14 = this._cue._radius; _local4.moveTo(_cue.x, _cue.y); _local4.lineStyle((this._cue._radius * 0.75), 0x660000, _local3, false, "normal", null, JointStyle.ROUND, 1); _local4.lineTo(_local12.x, _local12.y); _local4.lineTo((_local13.x + ((_local8 * _local14) * 0.5)), (_local13.y + ((_local9 * _local14) * 0.5))); _local4.lineTo((_local13.x + ((_local10 * _local14) * 0.5)), (_local13.y + ((_local11 * _local14) * 0.5))); _local4.lineTo(_local12.x, _local12.y); return (this._shotLineLayer); } public function TotalScore():int{ return ((((this._levelGoalScore + this._levelMultiBallBonus) + this._levelRicochetBonus) + this._levelUnderParBonus)); } public function HideWarnField():void{ this._warnField.visible = false; this._warnField.alpha = 1; } public function addGravityWell(_arg1:GravityWell):void{ var _local2:int; _local2 = this._gWells.indexOf(_arg1); if (_local2 == -1){ this._gWells.push(_arg1); this._gWellLayer.addChild(_arg1); }; } } }//package
Section 54
//LevelMenuScreen (LevelMenuScreen) package { import flash.events.*; import flash.display.*; import flash.text.*; import mx.effects.*; import com.GameEngine.Controllers.*; import com.GameEngine.Utils.*; import flash.media.*; import mx.effects.easing.*; import flash.geom.*; import flash.filters.*; import com.Branding.*; public class LevelMenuScreen extends Sprite { public var _playMoreGamesButton:MovieClip; public var _titleField:TextField; public var _toggleMusicButton:GameButton; public var _exitMenuButton:GameButton; public var _toggleQualityButton:GameButton; private var _tweenDoneCallback:Function; public var _quitToMenuButton:GameButton; public var _closeCallback:Function; public var _parent:DisplayObjectContainer; public var _backScreen:Sprite; public var _backDrop:Sprite; private var _showTween:Tween; public var _toggleSoundEffectsButton:GameButton; public function getNextQualityString():String{ var _local1:String; _local1 = stage.quality; if (_local1 == "BEST"){ _local1 = "LOW"; } else { if (_local1 == "HIGH"){ _local1 = "BEST"; } else { if (_local1 == "MEDIUM"){ _local1 = "HIGH"; } else { if (_local1 == "LOW"){ _local1 = "MEDIUM"; }; }; }; }; return (_local1); } public function init():void{ var _local1:Array; this._backScreen = new Sprite(); this._backScreen.graphics.beginFill(0, 0.5); this._backScreen.graphics.drawRect(0, 0, 640, 480); this._backScreen.graphics.endFill(); this.addChild(_backScreen); this._backDrop = new Sprite(); this._backDrop.addChild(SpriteFactory.makeBorderedFrame(370, 400, 20, 66115, 134773, 0.85)); this._titleField = new TextField(); this._titleField.defaultTextFormat = new TextFormat("Abbess", 50, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); this._titleField.embedFonts = true; this._titleField.selectable = false; this._titleField.mouseEnabled = false; this._titleField.text = "Menu"; this._titleField.alpha = 0.45; this._titleField.width = 370; this._titleField.height = 120; this._titleField.y = 25; _local1 = this._titleField.filters; _local1.push(new DropShadowFilter(4, 135)); this._titleField.filters = _local1; this._quitToMenuButton = new GameButton("Quit to Main Menu", null, 300, 30, onQuitToMainClick); this._quitToMenuButton.x = 35; this._quitToMenuButton.y = 120; this._quitToMenuButton.enabled = false; this._backDrop.addChild(this._quitToMenuButton); this._toggleMusicButton = new GameButton("Turn Music OFF", null, 300, 30, onToggleMusicClick); this._toggleMusicButton.x = 35; this._toggleMusicButton.y = 180; this._toggleMusicButton.enabled = false; this._backDrop.addChild(this._toggleMusicButton); this._toggleSoundEffectsButton = new GameButton("Turn Sound Effects OFF", null, 300, 30, onToggleSoundEffectsClick); this._toggleSoundEffectsButton.x = 35; this._toggleSoundEffectsButton.y = 220; this._toggleSoundEffectsButton.enabled = false; this._backDrop.addChild(this._toggleSoundEffectsButton); this._toggleQualityButton = new GameButton("Turn Graphics Quality LOW", null, 300, 30, onToggleQualityClick); this._toggleQualityButton.x = 35; this._toggleQualityButton.y = 280; this._toggleQualityButton.enabled = false; this._backDrop.addChild(this._toggleQualityButton); this._exitMenuButton = new GameButton("Back", null, 200, 30, onExitMenuClick); this._exitMenuButton.x = 85; this._exitMenuButton.y = 340; this._exitMenuButton.enabled = false; this._backDrop.addChild(this._exitMenuButton); this._backDrop.addChild(this._titleField); this._backDrop.x = ((640 - this._backDrop.width) * 0.5); addChild(this._backDrop); BrandingManager.GetCurrentSponsorMaterial(this._backDrop, "LevelMenuLogo"); } public function onExitMenuClick(_arg1:MouseEvent):void{ this.HideMenu(); } public function onTweenEnd(_arg1:Number):void{ var _local2:Matrix; _local2 = new Matrix(); _local2.scale(_arg1, _arg1); _backDrop.transform.matrix = _local2; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); this._quitToMenuButton.enabled = true; this._exitMenuButton.enabled = true; this._toggleMusicButton.enabled = true; this._toggleSoundEffectsButton.enabled = true; this._toggleQualityButton.enabled = true; if (this._playMoreGamesButton != null){ this._playMoreGamesButton.enabled = true; }; } public function onQuitToMainClick(_arg1:MouseEvent):void{ this.HideMenu(); if ((_parent is PlunkPool2)){ (_parent as PlunkPool2).UnloadLevel(); if (((!((_parent.stage == null))) && (_parent.stage.contains(_parent)))){ _parent.stage.removeChild(_parent); }; }; } public function onToggleQualityClick(_arg1:MouseEvent):void{ stage.quality = this.getNextQualityString(); _toggleQualityButton._label.text = ("Set Graphics Quality " + this.getNextQualityString().toUpperCase()); } public function onToggleSoundEffectsClick(_arg1:MouseEvent):void{ SoundController._globalSoundEffectTransform.volume = ((SoundController._globalSoundEffectTransform.volume)==0) ? 0.5 : 0; _toggleSoundEffectsButton._label.text = ((SoundController._globalSoundEffectTransform.volume)==0) ? "Turn Sound Effects ON" : "Turn Sound Effects OFF"; } public function onTweenUpdate(_arg1:Number):void{ var _local2:Matrix; _local2 = new Matrix(); _local2.scale(_arg1, _arg1); _backDrop.transform.matrix = _local2; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); } public function onToggleMusicClick(_arg1:MouseEvent):void{ SoundController._globalSoundMusicTransform.volume = ((SoundController._globalSoundMusicTransform.volume)==0) ? 0.5 : 0; SoundController._musicChannel.soundTransform = new SoundTransform((SoundController._globalSoundMusicTransform.volume * 0.5)); _toggleMusicButton._label.text = ((SoundController._globalSoundMusicTransform.volume)==0) ? "Turn Music ON" : "Turn Music OFF"; } public function HideMenu():void{ var _local1:Matrix; _backDrop.visible = false; _local1 = new Matrix(); _local1.scale(0, 0); _backDrop.transform.matrix = _local1; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); _parent.removeChild(this); if (this._closeCallback != null){ this._closeCallback(); }; } public static function ShowMenu(_arg1:DisplayObjectContainer, _arg2:Function=null):LevelMenuScreen{ var _local3:LevelMenuScreen; var _local4:Matrix; _local3 = new (LevelMenuScreen); _local3._closeCallback = _arg2; _local3._parent = _arg1; _local3._parent.addChild(_local3); _local3.init(); _local3._toggleMusicButton._label.text = ((SoundController._globalSoundMusicTransform.volume)==0) ? "Turn Music ON" : "Turn Music OFF"; _local3._toggleSoundEffectsButton._label.text = ((SoundController._globalSoundEffectTransform.volume)==0) ? "Turn Sound Effects ON" : "Turn Sound Effects OFF"; _local3._toggleQualityButton._label.text = ("Set Graphics Quality " + _local3.getNextQualityString().toUpperCase()); _local3._backDrop.visible = true; _local4 = new Matrix(); _local4.scale(0, 0); _local3._backDrop.transform.matrix = _local4; _local3._backDrop.x = (320 - (_local3._backDrop.width * 0.5)); _local3._backDrop.y = (240 - (_local3._backDrop.height * 0.5)); _local3._showTween = new Tween(_local3, 0, 1, 1000); _local3._showTween.easingFunction = Bounce.easeOut; return (_local3); } } }//package
Section 55
//LevelOverDialog (LevelOverDialog) package { import flash.events.*; import flash.display.*; import flash.text.*; import mx.effects.*; import com.GameEngine.Controllers.*; import com.GameEngine.Utils.*; import flash.media.*; import mx.effects.easing.*; import flash.geom.*; import flash.filters.*; import com.Branding.*; public class LevelOverDialog extends Sprite { public var _levelResult:String;// = "Level Passed!" public var _goalScoreField:TextField; public var _goalScoreLabel:TextField; public var _resultField:TextField; public var _levelTimeSeconds:int;// = 0 public var _ricochetBonusLabel:TextField; public var _multiBallBonusField:TextField; public var _multiBallBonusLabel:TextField; public var _ricochetBonusField:TextField; public var _continueCallback:Function; public var _unlockedMessage:TextField; private var _tweenDoneCallback:Function; public var _parBonusLabel:TextField; private var _feedbackSound:SoundChannel; public var _parBonusField:TextField; public var _totalScoreLabel:TextField; public var _totalScoreField:TextField; public var _parent:DisplayObjectContainer; public var _backScreen:Sprite; public var _backDrop:Sprite; public var _succeeded:Boolean; public var _showUnlocked:Boolean; private var _showTween:Tween; public var _doneButton:GameButton; public function LevelOverDialog(_arg1:Boolean){ var _local2:Array; _levelResult = "Level Passed!"; _levelTimeSeconds = 0; super(); this._backScreen = new Sprite(); this._backScreen.graphics.beginFill(0, 0.5); this._backScreen.graphics.drawRect(0, 0, 640, 480); this._backScreen.graphics.endFill(); this.addChild(_backScreen); this._unlockedMessage = new TextField(); this._unlockedMessage.defaultTextFormat = new TextFormat("Abbess", 30, 0xFF0000, null, null, null, null, null, TextFormatAlign.CENTER); this._unlockedMessage.embedFonts = true; this._unlockedMessage.antiAliasType = AntiAliasType.ADVANCED; this._unlockedMessage.selectable = false; this._unlockedMessage.mouseEnabled = false; this._unlockedMessage.text = "Free Play Level UNLOCKED!"; this._unlockedMessage.alpha = 1; this._unlockedMessage.visible = false; this._unlockedMessage.width = 550; this._unlockedMessage.height = 120; this._unlockedMessage.y = 110; this._backDrop = new Sprite(); this._backDrop.addChild(SpriteFactory.makeBorderedFrame(550, (_arg1) ? 400 : 465, 20, 66115, 134773, 0.75)); this._resultField = new TextField(); this._resultField.defaultTextFormat = new TextFormat("Abbess", 100, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); this._resultField.embedFonts = true; this._resultField.antiAliasType = AntiAliasType.ADVANCED; this._resultField.selectable = false; this._resultField.mouseEnabled = false; this._resultField.text = "You Win!"; this._resultField.alpha = 0.45; this._resultField.width = 550; this._resultField.height = 120; this._resultField.y = 25; this._goalScoreLabel = new TextField(); this._goalScoreLabel.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._goalScoreLabel.embedFonts = true; this._goalScoreLabel.antiAliasType = AntiAliasType.ADVANCED; this._goalScoreLabel.selectable = false; this._goalScoreLabel.mouseEnabled = false; this._goalScoreLabel.text = "Goal Points:"; this._goalScoreLabel.alpha = 0.85; this._goalScoreLabel.width = 250; this._goalScoreLabel.height = 35; this._goalScoreLabel.x = 25; this._goalScoreLabel.y = 145; this._goalScoreField = new TextField(); this._goalScoreField.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT); this._goalScoreField.embedFonts = true; this._goalScoreField.antiAliasType = AntiAliasType.ADVANCED; this._goalScoreField.selectable = false; this._goalScoreField.mouseEnabled = false; this._goalScoreField.text = "0"; this._goalScoreField.alpha = 0.85; this._goalScoreField.width = 200; this._goalScoreField.height = 35; this._goalScoreField.x = 300; this._goalScoreField.y = 145; this._parBonusLabel = new TextField(); this._parBonusLabel.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._parBonusLabel.embedFonts = true; this._parBonusLabel.antiAliasType = AntiAliasType.ADVANCED; this._parBonusLabel.selectable = false; this._parBonusLabel.mouseEnabled = false; this._parBonusLabel.text = "Under Par Bonus:"; this._parBonusLabel.alpha = 0.85; this._parBonusLabel.width = 250; this._parBonusLabel.height = 35; this._parBonusLabel.x = 25; this._parBonusLabel.y = 180; this._parBonusField = new TextField(); this._parBonusField.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT); this._parBonusField.embedFonts = true; this._parBonusField.antiAliasType = AntiAliasType.ADVANCED; this._parBonusField.selectable = false; this._parBonusField.mouseEnabled = false; this._parBonusField.text = "0"; this._parBonusField.alpha = 0.85; this._parBonusField.width = 200; this._parBonusField.height = 35; this._parBonusField.x = 300; this._parBonusField.y = 180; this._ricochetBonusLabel = new TextField(); this._ricochetBonusLabel.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._ricochetBonusLabel.embedFonts = true; this._ricochetBonusLabel.antiAliasType = AntiAliasType.ADVANCED; this._ricochetBonusLabel.selectable = false; this._ricochetBonusLabel.mouseEnabled = false; this._ricochetBonusLabel.text = "Ricochet Bonus:"; this._ricochetBonusLabel.alpha = 0.85; this._ricochetBonusLabel.width = 250; this._ricochetBonusLabel.height = 35; this._ricochetBonusLabel.x = 25; this._ricochetBonusLabel.y = 215; this._ricochetBonusField = new TextField(); this._ricochetBonusField.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT); this._ricochetBonusField.embedFonts = true; this._ricochetBonusField.antiAliasType = AntiAliasType.ADVANCED; this._ricochetBonusField.selectable = false; this._ricochetBonusField.mouseEnabled = false; this._ricochetBonusField.text = "0"; this._ricochetBonusField.alpha = 0.85; this._ricochetBonusField.width = 200; this._ricochetBonusField.height = 35; this._ricochetBonusField.x = 300; this._ricochetBonusField.y = 215; this._multiBallBonusLabel = new TextField(); this._multiBallBonusLabel.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._multiBallBonusLabel.embedFonts = true; this._multiBallBonusLabel.antiAliasType = AntiAliasType.ADVANCED; this._multiBallBonusLabel.selectable = false; this._multiBallBonusLabel.mouseEnabled = false; this._multiBallBonusLabel.text = "Multi Ball Bonus:"; this._multiBallBonusLabel.alpha = 0.85; this._multiBallBonusLabel.width = 250; this._multiBallBonusLabel.height = 35; this._multiBallBonusLabel.x = 25; this._multiBallBonusLabel.y = 250; this._multiBallBonusField = new TextField(); this._multiBallBonusField.defaultTextFormat = new TextFormat("Abbess", 20, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT); this._multiBallBonusField.embedFonts = true; this._multiBallBonusField.antiAliasType = AntiAliasType.ADVANCED; this._multiBallBonusField.selectable = false; this._multiBallBonusField.mouseEnabled = false; this._multiBallBonusField.text = "0"; this._multiBallBonusField.alpha = 0.85; this._multiBallBonusField.width = 200; this._multiBallBonusField.height = 35; this._multiBallBonusField.x = 300; this._multiBallBonusField.y = 250; this._totalScoreLabel = new TextField(); this._totalScoreLabel.defaultTextFormat = new TextFormat("Abbess", 25, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.RIGHT); this._totalScoreLabel.embedFonts = true; this._totalScoreLabel.antiAliasType = AntiAliasType.ADVANCED; this._totalScoreLabel.selectable = false; this._totalScoreLabel.mouseEnabled = false; this._totalScoreLabel.text = "Total Level Score:"; this._totalScoreLabel.alpha = 0.85; this._totalScoreLabel.width = 250; this._totalScoreLabel.height = 45; this._totalScoreLabel.x = 25; this._totalScoreLabel.y = 295; this._totalScoreField = new TextField(); this._totalScoreField.defaultTextFormat = new TextFormat("Abbess", 40, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.LEFT); this._totalScoreField.embedFonts = true; this._totalScoreField.antiAliasType = AntiAliasType.ADVANCED; this._totalScoreField.selectable = false; this._totalScoreField.mouseEnabled = false; this._totalScoreField.text = "0"; this._totalScoreField.alpha = 0.85; this._totalScoreField.width = 200; this._totalScoreField.height = 45; this._totalScoreField.x = 300; this._totalScoreField.y = 295; _local2 = this._unlockedMessage.filters; _local2.push(new GlowFilter(0xAA0000, 0.5, 20, 20, 1, 1, true)); _local2.push(new DropShadowFilter(4, 135)); this._unlockedMessage.filters = _local2; _local2 = this._resultField.filters; _local2.push(new DropShadowFilter(4, 135)); this._resultField.filters = _local2; _local2 = this._goalScoreLabel.filters; _local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true)); this._goalScoreLabel.filters = _local2; _local2 = this._goalScoreField.filters; _local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true)); this._goalScoreField.filters = _local2; _local2 = this._parBonusLabel.filters; _local2.push(new DropShadowFilter(4, 135)); this._parBonusLabel.filters = _local2; _local2 = this._ricochetBonusField.filters; _local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true)); this._ricochetBonusField.filters = _local2; _local2 = this._ricochetBonusLabel.filters; _local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true)); this._ricochetBonusLabel.filters = _local2; _local2 = this._multiBallBonusField.filters; _local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true)); this._multiBallBonusField.filters = _local2; _local2 = this._multiBallBonusLabel.filters; _local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true)); this._multiBallBonusLabel.filters = _local2; _local2 = this._parBonusField.filters; _local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true)); this._parBonusField.filters = _local2; _local2 = this._totalScoreLabel.filters; _local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true)); this._totalScoreLabel.filters = _local2; _local2 = this._totalScoreField.filters; _local2.push(new DropShadowFilter(0.1, 167, 0xAAAAAA, 0.75, 4, 4, 1, 1, true)); this._totalScoreField.filters = _local2; this._doneButton = new GameButton("Continue", null, 400, 40, onContinueClick); this._doneButton.x = 75; this._doneButton.y = 340; this._doneButton.enabled = false; this._backDrop.addChild(this._doneButton); if (!_arg1){ BrandingManager.GetCurrentSponsorMaterial(this._backDrop, "LevelOverLogo"); }; this._backDrop.addChild(this._resultField); this._backDrop.addChild(this._unlockedMessage); this._backDrop.addChild(this._goalScoreLabel); this._backDrop.addChild(this._goalScoreField); this._backDrop.addChild(this._parBonusLabel); this._backDrop.addChild(this._parBonusField); this._backDrop.addChild(this._ricochetBonusLabel); this._backDrop.addChild(this._ricochetBonusField); this._backDrop.addChild(this._multiBallBonusLabel); this._backDrop.addChild(this._multiBallBonusField); this._backDrop.addChild(this._totalScoreLabel); this._backDrop.addChild(this._totalScoreField); this._backDrop.x = ((640 - this._backDrop.width) * 0.5); addChild(this._backDrop); } public function HideDialog():void{ var _local1:Matrix; if (_feedbackSound != null){ _feedbackSound.stop(); }; this._unlockedMessage.visible = false; _backDrop.visible = false; _local1 = new Matrix(); _local1.scale(0, 0); _backDrop.transform.matrix = _local1; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); _parent.removeChild(this); } public function onTweenEnd(_arg1:Number):void{ var _local2:Matrix; var _local3:int; if (!_succeeded){ this._feedbackSound = SoundController.playShortMurmur(); } else { _local3 = Math.floor((Math.random() * 3)); switch (_local3){ case 0: this._feedbackSound = SoundController.playShortCheer1(); break; case 1: this._feedbackSound = SoundController.playShortCheer2(); break; case 2: this._feedbackSound = SoundController.playShortCheer3(); break; default: this._feedbackSound = SoundController.playShortCheer1(); break; }; }; _local2 = new Matrix(); _local2.scale(_arg1, _arg1); _backDrop.transform.matrix = _local2; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); this._doneButton.enabled = true; } public function onContinueClick(_arg1:MouseEvent):void{ if (this._continueCallback != null){ this._continueCallback(_arg1); }; } public function onTweenUpdate(_arg1:Number):void{ var _local2:Matrix; _local2 = new Matrix(); _local2.scale(_arg1, _arg1); _backDrop.transform.matrix = _local2; _backDrop.x = (320 - (_backDrop.width * 0.5)); _backDrop.y = (240 - (_backDrop.height * 0.5)); } public static function ShowDialog(_arg1:DisplayObjectContainer, _arg2:String, _arg3:LevelData, _arg4:String, _arg5:Function, _arg6:Boolean, _arg7:Boolean):LevelOverDialog{ var _local8:LevelOverDialog; var _local9:int; var _local10:int; var _local11:int; var _local12:TextFormat; var _local13:Matrix; _local8 = new LevelOverDialog(_arg6); _local8._showUnlocked = _arg7; _local8._resultField.text = _arg2; _local8._succeeded = _arg6; if (_arg6){ _local8._doneButton._label.text = "Continue"; } else { _local8._doneButton._label.text = "Try Again"; }; _local8._continueCallback = _arg5; _local8._parent = _arg1; _local8._parent.addChild(_local8); _local8._goalScoreField.text = _arg3._levelGoalScore.toString(); _local9 = (_arg3._levelShotPar - _arg3._levelShotCounter); _local10 = (_local9 * _arg3._levelUnderParBonusIncrement); _local11 = _arg3.TotalScore(); if (_local9 < 0){ _local12 = _local8._parBonusLabel.defaultTextFormat; _local12.color = 0xAA0000; _local8._parBonusLabel.defaultTextFormat = _local12; _local12 = _local8._parBonusField.defaultTextFormat; _local12.color = 0xAA0000; _local8._parBonusField.defaultTextFormat = _local12; }; _local8._parBonusField.text = (((((_local10.toString() + " (") + _local9.toString()) + " x ") + _arg3._levelUnderParBonusIncrement.toString()) + ")"); _local8._ricochetBonusField.text = _arg3._levelRicochetBonus.toString(); _local8._multiBallBonusField.text = _arg3._levelMultiBallBonus.toString(); if (_local11 < 0){ _local12 = _local8._totalScoreField.defaultTextFormat; _local12.color = 0xAA0000; _local8._totalScoreField.defaultTextFormat = _local12; }; _local8._totalScoreField.text = _local11.toString(); _local8._backDrop.visible = true; _local13 = new Matrix(); _local13.scale(0, 0); _local8._backDrop.transform.matrix = _local13; _local8._backDrop.x = (320 - (_local8._backDrop.width * 0.5)); _local8._backDrop.y = (240 - (_local8._backDrop.height * 0.5)); _local8._unlockedMessage.visible = _local8._showUnlocked; _local8._showTween = new Tween(_local8, 0, 1, 1000); _local8._showTween.easingFunction = Bounce.easeOut; return (_local8); } } }//package
Section 56
//LevelStartMessageScreen (LevelStartMessageScreen) package { import flash.events.*; import flash.display.*; import flash.text.*; import mx.effects.*; import com.GameEngine.Utils.*; import mx.effects.easing.*; public class LevelStartMessageScreen extends Sprite { public var _messageField:TextField; public var _closeCallback:Function; private var _tweenDoneCallback:Function; public var _parent:DisplayObjectContainer; public var _backScreen:Sprite; public var _backDrop:Sprite; private var _showTween:Tween; public var _doneButton:GameButton; public function LevelStartMessageScreen(){ var _local1:Array; super(); this._backScreen = new Sprite(); this._backScreen.graphics.beginFill(0, 0.1); this._backScreen.graphics.drawRect(0, 0, 640, 480); this._backScreen.graphics.endFill(); this.addChild(_backScreen); this._backDrop = new Sprite(); this._backDrop.addChild(SpriteFactory.makeBorderedFrame(600, 225, 20, 66115, 134773, 0.85)); this._messageField = new TextField(); this._messageField.defaultTextFormat = new TextFormat("Abbess", 18, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); this._messageField.embedFonts = true; this._messageField.selectable = false; this._messageField.mouseEnabled = false; this._messageField.alpha = 0.85; this._messageField.width = 600; this._messageField.height = 175; this._messageField.y = 25; _local1 = this._messageField.filters; this._messageField.filters = _local1; this._doneButton = new GameButton("OK", null, 400, 30, onDoneClick); this._doneButton.x = 100; this._doneButton.y = 175; this._doneButton.enabled = false; this._backDrop.addChild(this._doneButton); this._backDrop.addChild(this._messageField); this._backDrop.x = ((640 - this._backDrop.width) * 0.5); addChild(this._backDrop); } public function onDoneClick(_arg1:MouseEvent):void{ this.HideScreen(); } public function HideScreen():void{ _backDrop.visible = false; _backDrop.y = -(_backDrop.height); _parent.removeChild(this); if (this._closeCallback != null){ this._closeCallback(); }; } public function onTweenEnd(_arg1:Number):void{ _backDrop.y = _arg1; this._doneButton.enabled = true; } public function onTweenUpdate(_arg1:Number):void{ _backDrop.y = _arg1; } public static function ShowLevelMessage(_arg1:String, _arg2:DisplayObjectContainer, _arg3:Function=null):LevelStartMessageScreen{ var _local4:LevelStartMessageScreen; _local4 = new (LevelStartMessageScreen); _local4._messageField.text = _arg1; _local4._closeCallback = _arg3; _local4._parent = _arg2; _local4._parent.addChild(_local4); _local4._backDrop.y = -(_local4.height); _local4._backDrop.visible = true; _local4._showTween = new Tween(_local4, -(_local4._backDrop.height), ((480 - _local4._backDrop.height) * 0.5), 500); _local4._showTween.easingFunction = Elastic.easeOut; return (_local4); } } }//package
Section 57
//Logo2GamesCom (Logo2GamesCom) package { import flash.events.*; import flash.text.*; import flash.display.*; import flash.media.*; import flash.geom.*; import flash.utils.*; import flash.net.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.ui.*; public dynamic class Logo2GamesCom extends MovieClip { public function Logo2GamesCom(){ addFrameScript(0, frame1); } function frame1(){ this.addEventListener(MouseEvent.MOUSE_OVER, function (){ gotoAndStop(3); }); this.addEventListener(MouseEvent.MOUSE_OUT, function (){ gotoAndStop(2); }); this.gotoAndStop(2); } } }//package
Section 58
//Logo2GamesShort (Logo2GamesShort) package { import flash.events.*; import flash.text.*; import flash.display.*; import flash.media.*; import flash.geom.*; import flash.utils.*; import flash.net.*; import flash.system.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.ui.*; public dynamic class Logo2GamesShort extends MovieClip { public function Logo2GamesShort(){ addFrameScript(0, frame1); } function frame1(){ this.addEventListener(MouseEvent.MOUSE_OVER, function (){ gotoAndStop(3); }); this.addEventListener(MouseEvent.MOUSE_OUT, function (){ gotoAndStop(2); }); this.gotoAndStop(2); } } }//package
Section 59
//OPHighScores (OPHighScores) package { import flash.events.*; import flash.display.*; import flash.net.*; public dynamic class OPHighScores extends MovieClip { private static var _connectCompleteCallback:Function = null; private static var _gameID:String; private static var isConnected:Boolean = false; private static var _connectErrorCallback:Function = null; private static var loader:Loader; private static var scoreServer:MovieClip; private static var _connectStartCallback:Function = null; private static function loadIOError(_arg1:Event):void{ trace("ERROR Loading ScoreServer"); if (_connectErrorCallback != null){ _connectErrorCallback(null); }; } public static function ViewScores(_arg1:String="normal"):void{ var scoreMode = _arg1; if (scoreServer != null){ try { scoreServer.ViewScores(_gameID, scoreMode); } catch(e:Error) { trace((("ERROR CALLING ViewScore(...)! Message(" + e.message) + ")")); }; }; } private static function initComplete(_arg1:Event):void{ trace("INIT OPHighScores"); if (loader.content != null){ scoreServer = (loader.content as MovieClip); isConnected = true; trace("INIT & LOADED ScoreServer"); scoreServer.RecordGameView(_gameID); }; if (_connectCompleteCallback != null){ _connectCompleteCallback(null); }; } private static function loadComplete(_arg1:Event):void{ trace("LOADED ScoreServer"); } public static function Connect(_arg1:String, _arg2:Function=null, _arg3:Function=null, _arg4:Function=null):void{ var request:URLRequest; var GameID = _arg1; var startCallback = _arg2; var errorCallback = _arg3; var completeCallback = _arg4; _gameID = GameID; _connectStartCallback = startCallback; _connectCompleteCallback = completeCallback; _connectErrorCallback = errorCallback; request = new URLRequest("http://www.otherplay.com/_include/OPHighScoreServer.swf"); loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.INIT, initComplete); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadIOError); try { if (_connectStartCallback != null){ _connectStartCallback(null); }; loader.load(request); trace("loading..."); } catch(error:Error) { if (_connectErrorCallback != null){ _connectErrorCallback(null); }; trace("ERROR LOADING SCORESERVER!"); }; } public static function SubmitScore(_arg1:String, _arg2:int, _arg3:String="normal", _arg4:Number=0, _arg5:Function=null, _arg6:Function=null, _arg7:Function=null):void{ var scoreName = _arg1; var scoreValue = _arg2; var scoreMode = _arg3; var playedTimeSeconds = _arg4; var startCallback = _arg5; var errorCallback = _arg6; var completeCallback = _arg7; if (scoreServer != null){ try { scoreServer.SubmitScore(_gameID, scoreName, scoreValue, scoreMode, playedTimeSeconds, startCallback, errorCallback, completeCallback); } catch(e:Error) { trace((("ERROR CALLING SubmitScore(...)! Message(" + e.message) + ")")); }; } else { if (errorCallback != null){ errorCallback(null); }; }; } } }//package
Section 60
//PlunkPool2 (PlunkPool2) package { import flash.events.*; import flash.display.*; import flash.text.*; import flash.utils.*; import com.GameEngine.Controllers.*; import com.GameEngine.Utils.*; import flash.geom.*; import com.GameEngine.Entities.*; import com.Branding.*; import flash.ui.*; public class PlunkPool2 extends Sprite { public var _t:Number;// = 0 public var _menuButton:GameButton; public var _ballsPottedThisShot:int;// = 0 public var _frameRateField:TextField; public var _fps:Timer; public var _lastFPS:int; public var _bumpers:Array; public var _mouseIsDown:Boolean; public var _playMoreGamesButton:MovieClip; public var _moveRight:Boolean; public var _messagePump:Timer; public var _inFreePlayMode:Boolean;// = false public var _currentLevel:LevelData; public var _frameRate:Number;// = 60 public var _ballsLeftLabel:TextField; public var _gWells:Array; public var _ballsLeftField:TextField; public var _balls:Array; public var _lastT:Number;// = 0 public var _lod:LevelOverDialog; public var _levelMenu:LevelMenuScreen; public var _moveUp:Boolean; public var _shotsLeftField:TextField; public var _shotsLeftLabel:TextField; public var _moveDown:Boolean; public var _resetButton:GameButton; public var _blocks:Array; public var _gEngine:GameEngineController; public var _messages:int;// = 0 public var _renderPump:Timer; public var _frames:int;// = 0 public var _goals:Array; public var _parentMenu:GameMenuScreen; public var _backDrop:Sprite; public var _moveLeft:Boolean; public var _timeSlices:int;// = 0 public static var BallsInMotion:Boolean = false; public function PlunkPool2(_arg1:GameMenuScreen){ var _local2:Matrix; var _local3:Sprite; var _local4:BrandingManager; _inFreePlayMode = false; _frameRate = 60; _frames = 0; _lastFPS = _frameRate; _messages = 0; _timeSlices = 0; _ballsPottedThisShot = 0; _lastT = 0; _t = 0; super(); _gEngine = new GameEngineController(this.onRenderPump, 30, 45); _parentMenu = _arg1; this._backDrop = new Sprite(); _local2 = new Matrix(); _local2.createGradientBox(640, 480, 90, 0, 0); _backDrop.graphics.beginGradientFill(GradientType.LINEAR, [66115, 134773], [1, 1], [0, 191], _local2, SpreadMethod.REFLECT); this._backDrop.graphics.drawRect(0, 0, 640, 480); this._backDrop.graphics.endFill(); _local2 = new Matrix(); _local2.createGradientBox(200, 55, 0, 0, 0); _local3 = new Sprite(); _local3.mouseEnabled = false; _local3.tabEnabled = false; _local3.graphics.beginGradientFill(GradientType.LINEAR, [12434943, 12434943, 12434943], [0.3, 0.5, 0.3], [0, 128, 0xFF], _local2, SpreadMethod.REFLECT); _local3.graphics.drawRoundRect(10, 5, 200, 55, 15, 15); _local3.graphics.drawRoundRect(430, 5, 200, 55, 15, 15); _local3.graphics.endFill(); _backDrop.addChild(_local3); this.addChild(_backDrop); _backDrop.addChild(SpriteFactory.makeBorder(640, 480, 66115)); _ballsLeftLabel = new TextField(); _ballsLeftLabel.defaultTextFormat = new TextFormat("Abbess", 15, 0xFFFFFF); _ballsLeftLabel.selectable = false; _ballsLeftLabel.mouseEnabled = false; _ballsLeftLabel.embedFonts = true; _ballsLeftLabel.antiAliasType = AntiAliasType.ADVANCED; _ballsLeftLabel.text = "Balls Remaining: "; _ballsLeftLabel.x = 450; _ballsLeftLabel.y = 25; _ballsLeftLabel.width = 130; _ballsLeftLabel.height = 40; _ballsLeftField = new TextField(); _ballsLeftField.defaultTextFormat = new TextFormat("Abbess", 15, 0xFFFFFF); _ballsLeftField.selectable = false; _ballsLeftField.mouseEnabled = false; _ballsLeftField.embedFonts = true; _ballsLeftField.antiAliasType = AntiAliasType.ADVANCED; _ballsLeftField.text = "0 / 0"; _ballsLeftField.x = 580; _ballsLeftField.y = 25; _ballsLeftField.width = 100; _ballsLeftField.height = 40; _shotsLeftLabel = new TextField(); _shotsLeftLabel.defaultTextFormat = new TextFormat("Abbess", 15, 0xFFFFFF); _shotsLeftLabel.selectable = false; _shotsLeftLabel.mouseEnabled = false; _shotsLeftLabel.embedFonts = true; _shotsLeftLabel.antiAliasType = AntiAliasType.ADVANCED; _shotsLeftLabel.text = "Shots Taken: "; _shotsLeftLabel.x = 30; _shotsLeftLabel.y = 25; _shotsLeftLabel.width = 105; _shotsLeftLabel.height = 40; _shotsLeftField = new TextField(); _shotsLeftField.defaultTextFormat = new TextFormat("Abbess", 15, 0xFFFFFF); _shotsLeftField.selectable = false; _shotsLeftField.mouseEnabled = false; _shotsLeftField.embedFonts = true; _shotsLeftField.antiAliasType = AntiAliasType.ADVANCED; _shotsLeftField.text = "0 / 0"; _shotsLeftField.x = 135; _shotsLeftField.y = 25; _shotsLeftField.width = 100; _shotsLeftField.height = 40; this.addChild(_shotsLeftField); this.addChild(_shotsLeftLabel); this.addChild(_ballsLeftField); this.addChild(_ballsLeftLabel); _menuButton = new GameButton("Menu", null, 200, 25, menuButtonClick); _menuButton.x = 220; _menuButton.y = 5; this.addChild(_menuButton); _resetButton = new GameButton("Reset Level", null, 200, 25, resetButtonClick); _resetButton.x = 220; _resetButton.y = 35; this.addChild(_resetButton); _frameRateField = new TextField(); _frameRateField.defaultTextFormat = new TextFormat("Abbess", 10, 0xCCCCCC); _frameRateField.embedFonts = true; _frameRateField.antiAliasType = AntiAliasType.ADVANCED; _frameRateField.selectable = false; _frameRateField.mouseEnabled = false; _frameRateField.tabEnabled = false; _frameRateField.x = 10; _frameRateField.y = 45; _frameRateField.width = 250; _frameRateField.height = 30; _frameRateField.visible = false; this.addChild(_frameRateField); BrandingManager.GetCurrentSponsorMaterial(this, "LevelPlayScreenLogo"); } public function onMouseDown(_arg1:MouseEvent):void{ this._mouseIsDown = true; } public function onEverySecond(_arg1:TimerEvent):void{ _frameRateField.text = (((((((("RFPS(" + _gEngine._renderTick.fps_txt) + ") GFPS(") + _gEngine._gameStateTick.fps_txt) + ") MFPS(") + _gEngine._messagesTick.fps_txt) + ") Balls(") + _balls.length) + ")"); } public function LoadLevel(_arg1:LevelData, _arg2:Boolean=true):void{ _parentMenu.StopMenuAnimation(); stage.frameRate = _gEngine._desiredRenderFrameRate; if (_currentLevel != null){ this.UnloadLevel(); }; this._mouseIsDown = false; _currentLevel = _arg1; this._backDrop.addChildAt(_currentLevel._backDrop, 0); _currentLevel._backDrop.x = (20 + ((620 - _currentLevel._levelWidth) / 2)); _currentLevel._backDrop.y = (80 + ((400 - _currentLevel._levelHeight) / 2)); _currentLevel._backDrop.scaleX = 0.95; _currentLevel._backDrop.scaleY = 0.95; this._balls = this._currentLevel._balls; this._goals = this._currentLevel._goals; this._gWells = this._currentLevel._gWells; this._blocks = this._currentLevel._blocks; this._bumpers = this._currentLevel._bumpers; if (((!((this._currentLevel._levelStartMessage == ""))) && (_arg2))){ _ballsLeftField.text = (((_currentLevel._balls.length - 1).toString() + " / ") + _currentLevel._levelStartBalls.toString()); _shotsLeftField.text = ((_currentLevel._levelShotCounter.toString() + " / ") + _currentLevel._levelShotPar.toString()); LevelStartMessageScreen.ShowLevelMessage(this._currentLevel._levelStartMessage, this, StartLevel); } else { StartLevel(); }; } public function onMouseUp(_arg1:MouseEvent):void{ this._mouseIsDown = false; } public function StartLevel():void{ registerEvents(); stage.focus = stage; } private function unregisterEvents():void{ this.removeEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); this.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp); if (stage != null){ stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp); }; this._gEngine.StopGameEngine(); if (_fps != null){ this._fps.stop(); this._fps.removeEventListener(TimerEvent.TIMER, onEverySecond); }; } public function ApplyCollisions(_arg1:Number):void{ var _local2:int; var _local3:Ball; var _local4:Ball; var _local5:Goal; var _local6:String; var _local7:Bumper; _local2 = (_balls.length - 1); while (_local2 >= 0) { _local3 = _balls[_local2]; if (_local3._collidedObj != null){ if ((_local3._collidedObj is Point)){ SoundController.playBallBump(Math.max(0.01, (_local3._velocity / LevelData.MAXVELOCITY))); _local3.RedirectFromPoint((_local3._collidedObj as Point), _arg1); _local3._ricochetCount++; } else { if ((_local3._collidedObj is Line)){ SoundController.playBallBump(Math.max(0.01, (_local3._velocity / LevelData.MAXVELOCITY))); _local3.RedirectFromLine((_local3._collidedObj as Line).p1, (_local3._collidedObj as Line).p2, (_local3._collidedObj as Line)._bounce, _arg1); if (_local3._collidedObj.block != null){ _local3._collidedObj.block.showCollide(); }; } else { if ((_local3._collidedObj is Ball)){ _local4 = (_local3._collidedObj as Ball); SoundController.playBallHit(Math.max(0.01, (_local3._velocity / LevelData.MAXVELOCITY), (_local4._velocity / LevelData.MAXVELOCITY))); PhysicsEngineController.collide(_local3, _local4); if ((((_local3 == _currentLevel._cue)) || (((_local3._collidedObj as Ball) == _currentLevel._cue)))){ }; _local3._velocity = (_local3._velocity * _local4._bounce); _local3.Velocity = new Vector((_local3._vector.x * _local3._velocity), (_local3._vector.y * _local3._velocity)); _local4._velocity = (_local4._velocity * _local3._bounce); _local4.Velocity = new Vector((_local4._vector.x * _local4._velocity), (_local4._vector.y * _local4._velocity)); } else { if ((_local3._collidedObj is Goal)){ _local5 = (_local3._collidedObj as Goal); if (_local3 == _currentLevel._cue){ _currentLevel._levelShotCounter++; _local3.RedirectFromPoint(new Point((_local3._collidedObj as Goal).x, (_local3._collidedObj as Goal).y), _arg1); _local3.Velocity = _local3.Velocity.MultiplyInPlace(0.25); _local5.showScratched(); SoundController.playBuzzer(0.75); } else { _ballsPottedThisShot++; _local5.showPotted(_ballsPottedThisShot); this._currentLevel._levelGoalScore = (this._currentLevel._levelGoalScore + _local5._pointValue); _local6 = ""; if (_ballsPottedThisShot > 1){ _local6 = (_local6 + (("MULTI BALL BONUS " + (_local5._pointValue * ((_ballsPottedThisShot - 1) * 10)).toString()) + "\n")); this._currentLevel._levelMultiBallBonus = (this._currentLevel._levelMultiBallBonus + (_local5._pointValue * ((_ballsPottedThisShot - 1) * 10))); }; if (_local3._ricochetCount > 0){ _local6 = (_local6 + (("RICOCHET BONUS " + (_local5._pointValue * _local3._ricochetCount).toString()) + "\n")); this._currentLevel._levelRicochetBonus = (this._currentLevel._levelRicochetBonus + (_local5._pointValue * _local3._ricochetCount)); }; if (_local6 != ""){ this._currentLevel.ShowBonusField(_local6); }; this._currentLevel.sinkBall(_local3, _local5); SoundController.playBallPocket(Math.max(0.01, (_local3._velocity / LevelData.MAXVELOCITY))); }; } else { if ((_local3._collidedObj is Bumper)){ SoundController.playBallBump(Math.max(0.01, (_local3._velocity / LevelData.MAXVELOCITY))); _local7 = (_local3._collidedObj as Bumper); _local3.RedirectFromPoint(new Point(_local7.x, _local7.y), _arg1); _local7.showCollide(); }; }; }; }; }; _local3._ricochetCount++; _local3._collidedObj = null; }; _local2--; }; _local2 = (_currentLevel._sinkingBalls.length - 1); while (_local2 >= 0) { _local3 = _currentLevel._sinkingBalls[_local2]; _local3.sinkCounter++; if ((((_local3.sinkCounter > (this._gEngine._desiredRenderFrameRate * 2))) || ((_balls.length == 1)))){ this._currentLevel.removeBall(_local3); } else { _local3.scaleX = (_local3.scaleX * 0.95); _local3.scaleY = (_local3.scaleY * 0.95); _local3.Velocity = Vector.fromPoints(_local3.x, _local3.y, _local3.goal.x, _local3.goal.y).MultiplyInPlace(0.25); _local3.Move(1); }; _local2--; }; } public function AdvanceTime(_arg1:Number):void{ var _local2:int; var _local3:Ball; _local2 = (_balls.length - 1); while (_local2 >= 0) { _local3 = _balls[_local2]; _local3.Move(_arg1); if ((((((((_local3._x < 0)) || ((_local3._x > this._currentLevel._levelWidth)))) || ((_local3._y < 0)))) || ((_local3._y > this._currentLevel._levelHeight)))){ trace("WTF!? Ball left level bounds!"); }; _local2--; }; } public function onRenderPump(_arg1:TimerEvent):void{ var _local2:Point; var _local3:Boolean; var _local4:Vector; _frames++; if (_gEngine._gameStateTrigger){ this.onSingleFrame(_gEngine._gameStateTick.ftime); if ((((this._balls.length == 1)) && ((this._balls[0] == this._currentLevel._cue)))){ Mouse.show(); trace("FINISHED LEVEL!"); this.unregisterEvents(); this._currentLevel._levelUnderParBonus = ((this._currentLevel._levelShotPar - this._currentLevel._levelShotCounter) * this._currentLevel._levelUnderParBonusIncrement); _local3 = false; if ((((this._currentLevel._levelShotCounter <= this._currentLevel._levelShotPar)) && (!(this._parentMenu.isNextLevelUnlocked())))){ this._parentMenu.unlockNextLevel(true); _local3 = true; }; if (!_inFreePlayMode){ this._parentMenu.saveCurrentLevelScoreData(); }; _lod = LevelOverDialog.ShowDialog(this, "You Win!", this._currentLevel, "Continue", onContinueClicked, true, _local3); return; } else { if (((((!(_inFreePlayMode)) && (!(BallsInMotion)))) && ((this._currentLevel._levelShotCounter >= this._currentLevel._levelShotPar)))){ Mouse.show(); trace("FAILED LEVEL!"); this.unregisterEvents(); this._currentLevel._levelUnderParBonus = ((this._currentLevel._levelShotPar - this._currentLevel._levelShotCounter) * this._currentLevel._levelUnderParBonusIncrement); _lod = LevelOverDialog.ShowDialog(this, "Fail.", this._currentLevel, "Retry", onRetryClicked, false, false); return; }; }; _local2 = _currentLevel._backDrop.globalToLocal(new Point(this.mouseX, this.mouseY)); _currentLevel._cursor.x = _local2.x; _currentLevel._cursor.y = _local2.y; if ((((((((_local2.x >= 0)) && ((_local2.x <= _currentLevel._levelWidth)))) && ((_local2.y >= 0)))) && ((_local2.y <= _currentLevel._levelHeight)))){ Mouse.hide(); } else { Mouse.show(); }; _ballsLeftField.text = (((_currentLevel._balls.length - 1).toString() + " / ") + _currentLevel._levelStartBalls.toString()); _shotsLeftField.text = ((_currentLevel._levelShotCounter.toString() + " / ") + _currentLevel._levelShotPar.toString()); if (((!(_inFreePlayMode)) && ((this._currentLevel._levelShotCounter >= this._currentLevel._levelShotPar)))){ _currentLevel.ClearShotLine(); } else { if (this._mouseIsDown){ _local4 = Vector.fromPoints(_currentLevel._cue.x, _currentLevel._cue.y, _currentLevel._cursor.x, _currentLevel._cursor.y); _currentLevel._shotCharge = _local4.length; if (_currentLevel._shotCharge >= _currentLevel._shotChargeMax){ _currentLevel._shotCharge = _currentLevel._shotChargeMax; } else { if (_currentLevel._shotCharge <= 0){ _currentLevel._shotCharge = 0; }; }; _currentLevel.GenerateShotLine(); } else { if (_currentLevel._shotCharge > 0){ _ballsPottedThisShot = 0; _currentLevel._cue._ricochetCount = 0; _currentLevel._levelShotCounter++; _currentLevel.addGravityWell(GravityWell.MakeGravityWell(this._currentLevel._cursor.x, this._currentLevel._cursor.y, _currentLevel.GetShotPower(), this._currentLevel._cue._mass)); if ((((((_currentLevel._levelShotPar > 3)) && (!(_currentLevel._levelShotsLowWarningShown)))) && (((_currentLevel._levelShotPar - _currentLevel._levelShotCounter) <= 3)))){ _currentLevel.ShowShotWarningField((("Only " + (_currentLevel._levelShotPar - _currentLevel._levelShotCounter).toString()) + " Shots Left!")); _currentLevel._levelShotsLowWarningShown = true; }; }; _currentLevel._shotCharge = 0; _currentLevel._cursor.alpha = 1; _currentLevel._shotLineLayer.graphics.clear(); }; }; }; } public function menuButtonClick(_arg1:MouseEvent):void{ this.unregisterEvents(); _levelMenu = LevelMenuScreen.ShowMenu(this, onMenuHide); } public function onContinueClicked(_arg1:MouseEvent):void{ _lod.HideDialog(); if (_inFreePlayMode){ _parentMenu.loadFreePlayLevel(99999, this._parentMenu._allModes[0]); } else { _parentMenu.loadNextLevel(); }; } public function onSingleFrame(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4:Number; _local2 = 0; _local3 = 0; _local4 = _arg1; while (_local3 < _local4) { _timeSlices++; _local2 = PhysicsEngineController.timeToCollision((_local4 - _local3), this._balls, this._blocks, this._bumpers, this._goals); _local3 = (_local3 + _local2); if (_local2 < 0){ trace(("WTF! " + _local2)); }; this.AdvanceTime(_local2); this.ApplyCollisions(_local2); this.ApplyForces(_local2); }; } public function onMessagePump(_arg1:TimerEvent):void{ _messages++; } public function onKeyUp(_arg1:KeyboardEvent):void{ trace(_arg1.keyCode); switch (_arg1.keyCode){ case 38: case 87: this._moveUp = false; break; case 40: case 83: this._moveDown = false; break; case 37: case 65: this._moveLeft = false; break; case 39: case 68: this._moveRight = false; break; case 70: this._frameRateField.visible = !(this._frameRateField.visible); break; }; } private function registerEvents():void{ this._currentLevel._backDrop.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown); this._currentLevel._backDrop.addEventListener(MouseEvent.MOUSE_UP, onMouseUp); stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp); this._gEngine.StartGameEngine(); this._fps = new Timer(1000); this._fps.addEventListener(TimerEvent.TIMER, onEverySecond); this._fps.start(); } public function onKeyDown(_arg1:KeyboardEvent):void{ switch (_arg1.keyCode){ case 38: case 87: this._moveUp = true; break; case 40: case 83: this._moveDown = true; break; case 37: case 65: this._moveLeft = true; break; case 39: case 68: this._moveRight = true; break; }; } public function UnloadLevel():void{ if (_currentLevel != null){ this._mouseIsDown = false; if (this._backDrop.contains(_currentLevel._backDrop)){ this._backDrop.removeChild(_currentLevel._backDrop); }; if (((!((_lod == null))) && (this.contains(_lod)))){ _lod.HideDialog(); }; if (((!((_levelMenu == null))) && (this.contains(_levelMenu)))){ _levelMenu.HideMenu(); }; this._balls = null; this._goals = null; this._gWells = null; this._blocks = null; this._bumpers = null; _currentLevel = null; }; _parentMenu.StartMenuAnimation(); unregisterEvents(); Mouse.show(); } public function ApplyForces(_arg1:Number):void{ var _local2:int; var _local3:int; var _local4:Ball; var _local5:GravityWell; var _local6:Number; var _local7:Number; var _local8:Point; var _local9:Vector; var _local10:Number; var _local11:Number; _local3 = (_gWells.length - 1); while (_local3 >= 0) { _local5 = _gWells[_local3]; _local6 = _local5._mass; _local7 = _local5._gStrength; _local8 = new Point(_local5.x, _local5.y); _local4 = _currentLevel._cue; _local9 = Vector.fromPoints(_local4.x, _local4.y, _local8.x, _local8.y).NormalizeInPlace(); _local9.MultiplyInPlace(((_local6 / _local4._mass) * _local7)); _local4.Velocity = _local4.Velocity.AddInPlace(_local9); _currentLevel.removeGravityWell(_local5); _local3--; }; BallsInMotion = false; _local2 = (_balls.length - 1); while (_local2 >= 0) { _local4 = _balls[_local2]; _local10 = _local4.Velocity.length; if (_local10 > 0){ _local11 = ((_local10 * Math.pow((1 + (-(_currentLevel._levelFriction) / 1000)), (1000 * _arg1))) - ((1000 * _arg1) * (_currentLevel._levelFriction * 0.01))); if (_local11 < 1){ _local4.Velocity = _local4.Velocity.MultiplyInPlace(0); _local4._ricochetCount = 0; } else { _local4.Velocity = _local4.Velocity.ToLengthInPlace(_local11); BallsInMotion = true; }; }; _local2--; }; } public function onRetryClicked(_arg1:MouseEvent):void{ _lod.HideDialog(); _parentMenu.retryCurrentLevel(); } public function resetButtonClick(_arg1:MouseEvent):void{ this._parentMenu.retryCurrentLevel(); } public function onGameOver():void{ Mouse.show(); stage.removeChild(this); delete ??getglobalscope [this]; } public function onMenuHide():void{ this.registerEvents(); } } }//package
Section 61
//Preloader (Preloader) package { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.text.*; import com.GameEngine.Utils.*; import com.CPMStar.*; import com.Branding.*; import com.mochi.as3.*; import flash.geom.*; public dynamic class Preloader extends MovieClip { private var adTimer:Timer; private var loadText:TextField; public var endTime:int; private var backdrop:Sprite; public var startTime:int; public var w:Number;// = 640 private var waitText:TextField; public var h:Number;// = 480 private var _floatingForeground:Sprite; private var progressBar:ProgressBar; private var adBox:MovieClip; private var _floatingBalls:Array; private var _floatingMask:Sprite; public static var CPMSTAR_AD_DURATION_MS:uint = 8000; private static var angleStep:Number = 6; private static var dropStep:uint = 0; public static var MAIN_CLASS:String = "SplashScreen"; private static var alphaScaleStep:Number = -0.025; private static var doneLoading:Boolean = false; public static var LOADER_SHOW_BYTES_INSTEAD_OF_PERCENTAGE:Boolean = false; public static var _abbessEmbed:String = "Preloader__abbessEmbed"; public static var isAdFinished:Boolean = false; public function Preloader(){ var loadURL:String; var f:Function; var m:Matrix; var g:Graphics; var i:int; var rad:Number; var cos:Number; var sin:Number; w = 640; h = 480; super(); OPHighScores.Connect("83d97dfa-ecfd-102b-8a56-001e4f3b2fd2"); BrandingManager.AddSponsorKey("addictinggames", new RegExp("(^http://((www.|dev.)?addictinggames.com|(www.|agdev.|agstage.|agpublish.)?shockwave.com))", "i"), false); BrandingManager.AddSponsorKey("mindjolt", new RegExp("(^http://(((.){0,12}.)?mindjolt.com))", "i"), true); BrandingManager.AddSponsorKey("2games", new RegExp("(^http://((www.)?2games.com))", "i"), true); BrandingManager.SetDefaultSponsorKey("2games"); loadURL = this.loaderInfo.loaderURL; BrandingManager.SetCurrentSponsor(loadURL); f = function (_arg1:IOErrorEvent):void{ }; loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f); progressBar = new ProgressBar((w - 100), 50, 20, 10, 0, [11184878, 12303359], [85, 51], [6710954, 7829435]); progressBar.x = 50; progressBar.y = 405; loadText = new TextField(); loadText.selectable = false; loadText.tabEnabled = false; loadText.defaultTextFormat = new TextFormat("Abbess", 20, 0xEEEEEE, null, null, null, null, null, TextFormatAlign.CENTER); loadText.text = "0%"; loadText.width = (w - 100); loadText.height = 30; loadText.x = 50; loadText.y = 415; this.addChild(progressBar); this.addChild(loadText); adBox = new MovieClip(); this.addChild(adBox); if (BrandingManager.GetCurrentSponsorAllowAds()){ this.displayMochiAd(false); } else { _slot1.isAdFinished = true; }; backdrop = new Sprite(); m = new Matrix(); m.createGradientBox(w, h, 0, 0, 0); backdrop.graphics.beginGradientFill(GradientType.RADIAL, [66115, 134773], [1, 1], [0, 191], m, SpreadMethod.REFLECT); backdrop.graphics.drawRect(0, 0, w, h); backdrop.graphics.endFill(); this.addChildAt(backdrop, 0); this._floatingBalls = new Array(); this._floatingForeground = new Sprite(); this._floatingMask = new Sprite(); i = 0; while (i < 20) { _floatingBalls.push({vec:new Point(4, 0), radius:((Math.random() * 20) + 20), sprite:new Sprite()}); g = _floatingBalls[i].sprite.graphics; g.beginFill(0xFFFFFF, 0.025); g.drawCircle(0, 0, _floatingBalls[i].radius); g.endFill(); _floatingBalls[i].sprite.x = (_floatingBalls[i].radius + (Math.random() * (640 - (_floatingBalls[i].radius * 2)))); _floatingBalls[i].sprite.y = (_floatingBalls[i].radius + (Math.random() * (480 - (_floatingBalls[i].radius * 2)))); rad = ((Math.random() * 360) * (Math.PI / 180)); cos = Math.cos(rad); sin = Math.sin(rad); _floatingBalls[i].vec.x = ((cos * _floatingBalls[i].vec.x) - (sin * _floatingBalls[i].vec.y)); _floatingBalls[i].vec.y = ((sin * _floatingBalls[i].vec.x) + (cos * _floatingBalls[i].vec.y)); _floatingMask.addChild(_floatingBalls[i].sprite); i = (i + 1); }; _floatingForeground.graphics.beginGradientFill(GradientType.LINEAR, [134773, 66115], [1, 1], [0, 191], m, SpreadMethod.REFLECT); _floatingForeground.graphics.drawRect(0, 0, 640, 480); _floatingForeground.graphics.endFill(); this._floatingForeground.mask = this._floatingMask; this._floatingForeground.addChild(this._floatingMask); this._floatingForeground.alpha = 0.3; this.backdrop.addChild(this._floatingForeground); this.addChild(SpriteFactory.makeBorder(w, h, 66115)); this.addEventListener(Event.ENTER_FRAME, onEnterFrame); this.addEventListener(Event.ENTER_FRAME, onAnimateFrame); } private function initApp():void{ var _local1:Class; var _local2:Object; _local1 = Class(getDefinitionByName(_slot1.MAIN_CLASS)); _local2 = new (_local1); parent.addChild((_local2 as DisplayObject)); } public function onAdTimer(_arg1:TimerEvent):void{ _slot1.isAdFinished = true; if (adTimer != null){ adTimer.stop(); }; } private function onPlayClicked(_arg1:MouseEvent):void{ removeEventListener(Event.ENTER_FRAME, onAnimateFrame); if (((!((adBox == null))) && (this.contains(adBox)))){ this.removeChild(adBox); }; nextFrame(); initApp(); } public function displayMochiAd(_arg1:Boolean=true):void{ var f:Function; var followWithCPMStarAd = _arg1; adBox.x = 0; adBox.y = 0; f = function ():void{ _slot1.isAdFinished = true; }; if (followWithCPMStarAd){ f = this.onAdDoneCallback; }; MochiAd.showInterLevelAd({clip:adBox, id:"7a41b148560bb031", slug:"plunk-pool-2", res:"640x480", no_bg:true, ad_finished:f, ad_skipped:f, ad_failed:f}); } public function onAdDoneCallback():void{ endTime = getTimer(); if ((endTime - startTime) > 1000){ _slot1.isAdFinished = true; }; displayCPMStarAd(); } private function onAnimateFrame(_arg1:Event):void{ var _local2:Object; for each (_local2 in this._floatingBalls) { _local2.sprite.x = (_local2.sprite.x + _local2.vec.x); _local2.sprite.y = (_local2.sprite.y + _local2.vec.y); if ((((_local2.sprite.x < _local2.radius)) || ((_local2.sprite.x > (640 - _local2.radius))))){ _local2.vec.x = -(_local2.vec.x); _local2.sprite.x = (_local2.sprite.x + _local2.vec.x); }; if ((((_local2.sprite.y < _local2.radius)) || ((_local2.sprite.y > (480 - _local2.radius))))){ _local2.vec.y = -(_local2.vec.y); _local2.sprite.y = (_local2.sprite.y + _local2.vec.y); }; }; } public function onAdStartCallback():void{ startTime = getTimer(); } public function displayCPMStarAd():void{ var _local1:String; var _local2:DisplayObject; adBox.x = 170; adBox.y = 100; adBox.graphics.lineStyle(5, 0, 0.75); adBox.graphics.drawRect(0, 0, 300, 250); _local1 = "425QF9BE1238"; _local2 = AdLoader.LoadUnsponsoredAd(_local1); adBox.addChild(_local2); adTimer = new Timer(_slot1.CPMSTAR_AD_DURATION_MS); adTimer.addEventListener(TimerEvent.TIMER, onAdTimer); adTimer.start(); } public function onEnterFrame(_arg1:Event):void{ var _local2:int; var _local3:Class; var _local4:DisplayObject; if ((((((((this.root.loaderInfo.bytesLoaded == this.root.loaderInfo.bytesTotal)) && ((this.root.loaderInfo.bytesTotal > 0)))) && ((this.framesLoaded == this.totalFrames)))) && (_slot1.isAdFinished))){ progressBar.Percentage = (this.root.loaderInfo.bytesLoaded / this.root.loaderInfo.bytesTotal); _local2 = (progressBar.Percentage * 100); if (LOADER_SHOW_BYTES_INSTEAD_OF_PERCENTAGE){ this.loadText.text = (((("(" + this.root.loaderInfo.bytesLoaded) + "/") + this.root.loaderInfo.bytesTotal) + ")"); } else { this.loadText.text = (_local2.toString() + "%"); }; removeEventListener(Event.ENTER_FRAME, onEnterFrame); _local3 = Class(getDefinitionByName("GameButton")); _local4 = new _local3("PLAY!", null, (w - 100), 60, onPlayClicked); _local4.x = 50; _local4.y = 400; this.removeChild(this.progressBar); this.removeChild(this.loadText); this.addChild((_local4 as DisplayObject)); } else { progressBar.Percentage = (this.root.loaderInfo.bytesLoaded / this.root.loaderInfo.bytesTotal); _local2 = (progressBar.Percentage * 100); if (LOADER_SHOW_BYTES_INSTEAD_OF_PERCENTAGE){ this.loadText.text = (((("(" + this.root.loaderInfo.bytesLoaded) + "/") + this.root.loaderInfo.bytesTotal) + ")"); } else { this.loadText.text = (_local2.toString() + "%"); }; }; } } }//package
Section 62
//Preloader__abbessEmbed (Preloader__abbessEmbed) package { import mx.core.*; public class Preloader__abbessEmbed extends FontAsset { } }//package
Section 63
//ResourceManager (ResourceManager) package { public class ResourceManager { public static var PoolBallBumpSound:Class = ResourceManager_PoolBallBumpSound; public static var PoolballPurpleTexture:Class = ResourceManager_PoolballPurpleTexture; public static var ShortCheer2Sound:Class = ResourceManager_ShortCheer2Sound; public static var BuzzerSound:Class = ResourceManager_BuzzerSound; public static var SharpClickSound:Class = ResourceManager_SharpClickSound; public static var PoolballRedTexture:Class = ResourceManager_PoolballRedTexture; public static var PoolballBlueTexture:Class = ResourceManager_PoolballBlueTexture; public static var SmileyFaceTexture:Class = ResourceManager_SmileyFaceTexture; public static var ShortCheer1Sound:Class = ResourceManager_ShortCheer1Sound; public static var CheerSound:Class = ResourceManager_CheerSound; public static var BackgroundMusic1:Class = ResourceManager_BackgroundMusic1; public static var ShortMurmurSound:Class = ResourceManager_ShortMurmurSound; public static var ShortCheer3Sound:Class = ResourceManager_ShortCheer3Sound; public static var _abbessEmbed:String = "ResourceManager__abbessEmbed"; public static var PoolBallHitSound:Class = ResourceManager_PoolBallHitSound; public static var BaseClickSound:Class = ResourceManager_BaseClickSound; public static var PoolPocketSound:Class = ResourceManager_PoolPocketSound; } }//package
Section 64
//ResourceManager__abbessEmbed (ResourceManager__abbessEmbed) package { import mx.core.*; public class ResourceManager__abbessEmbed extends FontAsset { } }//package
Section 65
//ResourceManager_BackgroundMusic1 (ResourceManager_BackgroundMusic1) package { import mx.core.*; public class ResourceManager_BackgroundMusic1 extends SoundAsset { } }//package
Section 66
//ResourceManager_BaseClickSound (ResourceManager_BaseClickSound) package { import mx.core.*; public class ResourceManager_BaseClickSound extends SoundAsset { } }//package
Section 67
//ResourceManager_BuzzerSound (ResourceManager_BuzzerSound) package { import mx.core.*; public class ResourceManager_BuzzerSound extends SoundAsset { } }//package
Section 68
//ResourceManager_CheerSound (ResourceManager_CheerSound) package { import mx.core.*; public class ResourceManager_CheerSound extends SoundAsset { } }//package
Section 69
//ResourceManager_PoolballBlueTexture (ResourceManager_PoolballBlueTexture) package { import mx.core.*; public class ResourceManager_PoolballBlueTexture extends BitmapAsset { } }//package
Section 70
//ResourceManager_PoolBallBumpSound (ResourceManager_PoolBallBumpSound) package { import mx.core.*; public class ResourceManager_PoolBallBumpSound extends SoundAsset { } }//package
Section 71
//ResourceManager_PoolBallHitSound (ResourceManager_PoolBallHitSound) package { import mx.core.*; public class ResourceManager_PoolBallHitSound extends SoundAsset { } }//package
Section 72
//ResourceManager_PoolballPurpleTexture (ResourceManager_PoolballPurpleTexture) package { import mx.core.*; public class ResourceManager_PoolballPurpleTexture extends BitmapAsset { } }//package
Section 73
//ResourceManager_PoolballRedTexture (ResourceManager_PoolballRedTexture) package { import mx.core.*; public class ResourceManager_PoolballRedTexture extends BitmapAsset { } }//package
Section 74
//ResourceManager_PoolPocketSound (ResourceManager_PoolPocketSound) package { import mx.core.*; public class ResourceManager_PoolPocketSound extends SoundAsset { } }//package
Section 75
//ResourceManager_SharpClickSound (ResourceManager_SharpClickSound) package { import mx.core.*; public class ResourceManager_SharpClickSound extends SoundAsset { } }//package
Section 76
//ResourceManager_ShortCheer1Sound (ResourceManager_ShortCheer1Sound) package { import mx.core.*; public class ResourceManager_ShortCheer1Sound extends SoundAsset { } }//package
Section 77
//ResourceManager_ShortCheer2Sound (ResourceManager_ShortCheer2Sound) package { import mx.core.*; public class ResourceManager_ShortCheer2Sound extends SoundAsset { } }//package
Section 78
//ResourceManager_ShortCheer3Sound (ResourceManager_ShortCheer3Sound) package { import mx.core.*; public class ResourceManager_ShortCheer3Sound extends SoundAsset { } }//package
Section 79
//ResourceManager_ShortMurmurSound (ResourceManager_ShortMurmurSound) package { import mx.core.*; public class ResourceManager_ShortMurmurSound extends SoundAsset { } }//package
Section 80
//ResourceManager_SmileyFaceTexture (ResourceManager_SmileyFaceTexture) package { import mx.core.*; public class ResourceManager_SmileyFaceTexture extends BitmapAsset { } }//package
Section 81
//ScoreWidget (ScoreWidget) package { import flash.events.*; import flash.text.*; import flash.display.*; import com.mochi.as3.*; import flash.net.*; public dynamic class ScoreWidget extends MovieClip { public var nameField:TextField; public var viewButton:GameButton; public var scoreName:String; public var submitButton:GameButton; public var scoreMode:String; public var scoreValue:Number; public function ScoreWidget(){ this.x = 335; this.y = 365; this.nameField = new TextField(); this.nameField.defaultTextFormat = new TextFormat("Abbess", 25, 0xFFFFFF, null, null, null, null, null, TextFormatAlign.CENTER); this.nameField.embedFonts = true; this.nameField.antiAliasType = AntiAliasType.ADVANCED; this.nameField.selectable = true; this.nameField.type = TextFieldType.INPUT; this.nameField.background = true; this.nameField.backgroundColor = 134773; this.nameField.border = true; this.nameField.borderColor = 0xFFFFFF; this.nameField.maxChars = 64; this.nameField.restrict = "a-zA-Z0-9_ "; this.nameField.alpha = 0.85; this.nameField.width = 200; this.nameField.height = 30; this.nameField.x = 0; this.nameField.y = 0; this.addChild(this.nameField); this.submitButton = new GameButton("Submit Score", null, 200, 30, onSubmitClick); this.submitButton.x = 0; this.submitButton.y = 35; this.addChild(this.submitButton); this.viewButton = new GameButton("View Scores", null, 200, 30, onViewClick); this.viewButton.x = 0; this.viewButton.y = 35; this.viewButton.visible = false; this.addChild(this.viewButton); this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); } public function onRemovedFromStage(_arg1:Event=null):void{ } public function SetScoreName(_arg1:String):void{ scoreName = _arg1; this.nameField.text = scoreName; } public function onSubmitComplete(_arg1:Event=null):void{ this.nameField.text = "Submitted!"; this.viewButton.visible = true; } public function onViewError(_arg1:Event=null):void{ } public function onSubmitError(_arg1:Event=null):void{ this.nameField.text = "Submit Error!"; this.viewButton.visible = true; } public function SetScoreMode(_arg1:String):void{ this.scoreMode = _arg1; } public function SubmitScore():void{ var _local1:Object; var _local2:String; OPHighScores.SubmitScore(this.scoreName, this.scoreValue, this.scoreMode, 0); _local1 = {Tutorial:"a1c564497ed7c5ab", Ballistics:"83ca46b553deb769", Billiards 1:"4b5b98a93ab70cea", Billiards 2:"1318c7ee18f2c498", Trick Shots 1:"33817dc0d6fbd666", Trick Shots 2:"480aacb766b04080", Classics:"8ae4b0d56c4b172e"}; _local2 = _local1[this.scoreMode]; MochiScores.showLeaderboard({boardID:_local2, score:this.scoreValue, name:this.scoreName, clip:this.parent.parent, width:600, height:440, onClose:onSubmitComplete}); } public function onAddedToStage(_arg1:Event=null):void{ var _local2:String; _local2 = ((SharedObject.getLocal("lastUsername").data.lastUser)==null) ? "Anonymous" : SharedObject.getLocal("lastUsername").data.lastUser; SharedObject.getLocal("lastUsername").data.lastUser = _local2; SharedObject.getLocal("lastUsername").flush(); this.nameField.text = _local2; this.nameField.setSelection(0, 64); this.stage.focus = this.nameField; this.submitButton.enabled = true; this.viewButton.enabled = true; this.submitButton.visible = true; this.viewButton.visible = false; } public function onViewDone(_arg1:Event=null):void{ } public function onViewClick(_arg1:MouseEvent=null):void{ OPHighScores.ViewScores(this.scoreMode); } public function SetScoreValue(_arg1:Number):void{ this.scoreValue = _arg1; } public function onSubmitClick(_arg1:MouseEvent=null):void{ this.SetScoreName(this.nameField.text); SharedObject.getLocal("lastUsername").data.lastUser = this.scoreName; SharedObject.getLocal("lastUsername").flush(); this.submitButton.visible = false; this.nameField.text = "Submitting..."; this.SubmitScore(); } } }//package
Section 82
//ScoreWidgetAG (ScoreWidgetAG) package { import flash.events.*; public dynamic class ScoreWidgetAG extends ScoreWidget { public var myToolkit:AGtoolkit; public function ScoreWidgetAG(){ this.addEventListener(Event.ADDED_TO_STAGE, this.onAddedToStage); } public function onRestartFromToolbar():void{ trace("onRestartFromToolbar!"); (this.toolkit.screen.parent as CourseOverDialog).onPlayAgainClick(null); } public function onRestartGame():void{ trace("onRestartGame!"); (this.parent.parent as CourseOverDialog).onPlayAgainClick(null); } override public function SubmitScore():void{ OPHighScores.SubmitScore(this.scoreName, this.scoreValue, this.scoreMode, 0); myToolkit.AGgameover(onRestartGame); } override public function onAddedToStage(_arg1:Event=null):void{ this.submitButton.visible = false; this.nameField.visible = false; this.viewButton.visible = false; (parent.parent as CourseOverDialog)._playAgainButton.visible = false; myToolkit = new AGtoolkit(this.parent.parent, "5021", "hs3_sdk", "HeadMeatGames", "dev.addictinggames.com"); myToolkit.AGsetToolbar("restart", onRestartFromToolbar); myToolkit.AGgameScore("_scoreValue", "Points", "integer"); myToolkit.AGinitToolkit(onInitToolkit); } public function onInitToolkit():void{ trace("onInitToolkit!"); SubmitScore(); } public function onPauseGame():void{ trace("onPauseGame!"); } } }//package
Section 83
//ScoreWidgetMJ (ScoreWidgetMJ) package { import flash.events.*; import flash.display.*; import flash.net.*; public class ScoreWidgetMJ extends ScoreWidget { private var MindJoltAPI:Object; public function ScoreWidgetMJ(_arg1:LoaderInfo){ var _local2:Object; var _local3:Loader; super(); _local2 = _arg1.parameters; _local3 = new Loader(); _local3.contentLoaderInfo.addEventListener(Event.COMPLETE, loadAPIFinished); _local3.load(new URLRequest(((_local2.mjPath) || ("http://static.mindjolt.com/api/as3/scoreapi_as3_local.swf")))); this.addChild(_local3); } override public function SubmitScore():void{ OPHighScores.SubmitScore(this.scoreName, this.scoreValue, this.scoreMode, 0); MindJoltAPI.service.submitScore(this.scoreValue); } override public function onAddedToStage(_arg1:Event=null):void{ this.nameField.visible = false; this.submitButton.visible = false; this.viewButton.visible = false; } override public function SetScoreValue(_arg1:Number):void{ this.scoreValue = _arg1; this.SubmitScore(); } private function loadAPIFinished(_arg1:Event):void{ MindJoltAPI = _arg1.currentTarget.content; MindJoltAPI.service.connect(); trace("[MindJoltAPI] service manually loaded"); } } }//package
Section 84
//SiteLockScreen (SiteLockScreen) package { import flash.events.*; import flash.text.*; import flash.display.*; import com.GameEngine.Utils.*; import flash.net.*; public class SiteLockScreen extends Sprite { private var _goHome2:GameButton; private var _headline:TextField; private var _redirectURL:String; private var _fromSite:String; public var w:Number;// = 640 public var h:Number;// = 480 private var _backdrop:Sprite; private var _message:TextField; private var _goHome1:GameButton; public function SiteLockScreen(_arg1:String, _arg2:String){ var _local3:TextFormat; var _local4:TextFormat; var _local5:TextFormat; w = 640; h = 480; super(); _fromSite = _arg1; _redirectURL = _arg2; _backdrop = new Sprite(); _headline = new TextField(); _message = new TextField(); _local3 = new TextFormat("Abbess", 30, 0xAA0000, null, null, null, null, null, TextFormatAlign.CENTER); _local4 = new TextFormat("Abbess", 60, 0xDDDDDD, null, null, null, null, null, TextFormatAlign.CENTER); _local5 = new TextFormat("Abbess", 16, 0xDDDDDD, null, null, null, null, null, TextFormatAlign.LEFT); _goHome1 = new GameButton(("Go to " + _fromSite), null, (w - 100), 40, clickGoHome); _goHome2 = new GameButton(("Go to " + _fromSite), null, (w - 100), 40, clickGoHome, null); _headline.defaultTextFormat = _local4; _message.defaultTextFormat = _local5; _headline.embedFonts = true; _message.embedFonts = true; _headline.antiAliasType = AntiAliasType.ADVANCED; _message.antiAliasType = AntiAliasType.ADVANCED; _message.wordWrap = true; _backdrop.graphics.beginFill(0); _backdrop.graphics.drawRect(0, 0, w, h); _backdrop.graphics.endFill(); _headline.x = 0; _headline.y = 70; _headline.width = w; _headline.height = 70; _message.x = 30; _message.y = 120; _message.width = (w - 50); _message.height = (h - 180); _goHome1.x = 50; _goHome1.y = 20; _goHome2.x = 50; _goHome2.y = (h - 70); addChild(_backdrop); _backdrop.addChild(_headline); _backdrop.addChild(_message); _backdrop.addChild(_goHome1); _backdrop.addChild(_goHome2); _backdrop.addChild(SpriteFactory.makeBorder(w, h)); _headline.text = "I'M SORRY!"; _message.text = "\nI truly am."; _message.appendText("\nIt appears that this beta copy of the game has been taken without permission"); _message.appendText("\n\nYou're just looking to have some fun, and instead you get met with this irritation, and for that I truly apologize."); _message.appendText((("\n\nIf you would kindly direct your browser to " + _fromSite) + ", you can play to your heart's content.")); _message.appendText("\n\nPlaying a legitimate version of my game supports me as the author, and makes it possible for me to continue to create games."); _message.appendText("\n\nThank you for your support and understanding."); _message.appendText("\n\n-Joe"); } public function clickGoHome(_arg1:MouseEvent):void{ var _local2:URLRequest; trace("GO HOME!"); _local2 = new URLRequest(_redirectURL); navigateToURL(_local2, "_self"); } } }//package
Section 85
//Slam (Slam) package { import flash.media.*; public dynamic class Slam extends Sound { } }//package
Section 86
//Smash (Smash) package { import flash.media.*; public dynamic class Smash extends Sound { } }//package
Section 87
//SplashScreen (SplashScreen) package { import flash.events.*; import flash.display.*; import com.GameEngine.Utils.*; import flash.utils.*; import flash.net.*; import com.Branding.*; public class SplashScreen extends MovieClip { private var _SponsorSplashScreen:MovieClip; private var _splashScreenDone:Boolean;// = false private var _loadBackDrop:Sprite; private var _splashScreen:HMGSplashScreen; private var _loadFrame:Sprite; private var _SponsorSplashScreenTimer:Timer; public static const IS_SITE_LOCKED:Boolean = false; public static const IS_FILE_LOCKED:Boolean = false; public static const LOCKED_TO_SITE_REGEX:RegExp = new RegExp("^http(s)?://((www.|test.)?headmeatgames.com|(www.)?flashgamelicense.com|(files.|www.)?otherplay.com)", "i"); public static var isOffSiteCopy:Boolean = false; public static var MAIN_CLASS:String = "GameMenuScreen"; public static var isLocalCopy:Boolean = false; public function SplashScreen(){ _splashScreenDone = false; super(); stop(); this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); } private function onSponsorSplashScreenDone(_arg1:Event=null):void{ if (((!((_SponsorSplashScreen == null))) && (_loadBackDrop.contains(_SponsorSplashScreen)))){ _SponsorSplashScreen.stop(); _loadBackDrop.removeChild(_SponsorSplashScreen); }; startDeveloperSplashScreen(); } private function startDeveloperSplashScreen():void{ _splashScreen = new HMGSplashScreen(); _splashScreen.width = 620; _splashScreen.height = 460; _splashScreen.x = 20; _splashScreen.y = 10; _splashScreen._doneCallback = function (_arg1:Event):void{ trace("done"); _splashScreenDone = true; }; addEventListener(Event.ENTER_FRAME, onEnterFrame); _splashScreen.startAnimation(); _loadBackDrop.addChildAt(_splashScreen, 0); } public function onAddedToStage(_arg1:Event):void{ var last_name:String; var LevelPlayScreenLogo_AG:AGButton; var MainMenuLogo_AG:AGButton; var LevelMenuLogo_AG:AGButton; var LevelOverLogo_AG:GameButton; var CourseOverLogo_AG:GameButton; var SplashScreen_AG:SponsorSplashScreenAG; var CourseOverScoreSubmit_AG:ScoreWidgetAG; var MainMenuLogo_2G:Logo2GamesShort; var LevelOverLogo_2G:GameButton; var LevelMenuLogo_2G:Logo2GamesCom; var CourseOverLogo_2G:GameButton; var SplashScreen_2G:SponsorSplashScreen2G; var CourseOverScoreSubmit_2G:ScoreWidget; var CourseOverScoreSubmit_MJ:ScoreWidgetMJ; var event = _arg1; _loadBackDrop = new Sprite(); _loadBackDrop.graphics.beginFill(0); _loadBackDrop.graphics.drawRect(0, 0, 640, 480); _loadBackDrop.graphics.endFill(); addChild(_loadBackDrop); _loadFrame = SpriteFactory.makeBorder(640, 480, 66115); last_name = ((SharedObject.getLocal("lastUsername").data.lastUser)==null) ? "Anonymous" : SharedObject.getLocal("lastUsername").data.lastUser; SharedObject.getLocal("lastUsername").data.lastUser = last_name; SharedObject.getLocal("lastUsername").flush(); LevelPlayScreenLogo_AG = new AGButton(); LevelPlayScreenLogo_AG.width = 115; LevelPlayScreenLogo_AG.height = 20; LevelPlayScreenLogo_AG.x = 262.5; LevelPlayScreenLogo_AG.y = 460; LevelPlayScreenLogo_AG.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ var _local2:URLRequest; _local2 = new URLRequest("http://www.addictinggames.com"); navigateToURL(_local2, "_blank"); }); MainMenuLogo_AG = new AGButton(); MainMenuLogo_AG.width = 350; MainMenuLogo_AG.height = 60; MainMenuLogo_AG.x = 20; MainMenuLogo_AG.y = 405; MainMenuLogo_AG.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{ var _local2:URLRequest; _local2 = new URLRequest("http://www.addictinggames.com"); navigateToURL(_local2, "_blank"); }); LevelMenuLogo_AG = new AGButton(); LevelMenuLogo_AG.width = 230; LevelMenuLogo_AG.height = 40; LevelMenuLogo_AG.x = 70; LevelMenuLogo_AG.y = 70; LevelMenuLogo_AG.addEventListener(MouseEvent.CLICK, function (_arg1:Object):void{ var _local2:URLRequest; _local2 = new URLRequest("http://www.addictinggames.com"); navigateToURL(_local2, "_blank"); }); LevelOverLogo_AG = new GameButton("Play More Games", null, 300, 40, function (_arg1:MouseEvent=null):void{ navigateToURL(new URLRequest("http://www.addictinggames.com"), "_blank"); }); LevelOverLogo_AG.x = 125; LevelOverLogo_AG.y = 400; CourseOverLogo_AG = new GameButton("Play More Games", null, 200, 30, function (_arg1:MouseEvent=null):void{ navigateToURL(new URLRequest("http://www.addictinggames.com"), "_blank"); }); CourseOverLogo_AG.x = 85; CourseOverLogo_AG.y = 365; SplashScreen_AG = new SponsorSplashScreenAG({width:640, height:480, x:0, y:0, onClick:function (_arg1:MouseEvent=null):void{ navigateToURL(new URLRequest("http://www.addictinggames.com"), "_blank"); }, onDone:onSponsorSplashScreenDone}); SplashScreen_AG.stop(); SplashScreen_AG.width = 640; SplashScreen_AG.height = 480; CourseOverScoreSubmit_AG = new ScoreWidgetAG(); CourseOverScoreSubmit_AG.x = 335; CourseOverScoreSubmit_AG.y = 365; CourseOverScoreSubmit_AG.SetScoreName(last_name); BrandingManager.AddSponsorMaterials("addictinggames", "SplashScreen", SplashScreen_AG); BrandingManager.AddSponsorMaterials("addictinggames", "LevelOverLogo", LevelOverLogo_AG); BrandingManager.AddSponsorMaterials("addictinggames", "LevelMenuLogo", LevelMenuLogo_AG); BrandingManager.AddSponsorMaterials("addictinggames", "MainMenuLogo", MainMenuLogo_AG); BrandingManager.AddSponsorMaterials("addictinggames", "LevelPlayScreenLogo", LevelPlayScreenLogo_AG); BrandingManager.AddSponsorMaterials("addictinggames", "CourseOverScoreSubmit", CourseOverScoreSubmit_AG); MainMenuLogo_2G = new Logo2GamesShort(); MainMenuLogo_2G.buttonMode = true; MainMenuLogo_2G.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent=null):void{ BrandingManager.navigateToURL(new URLRequest("http://www.2games.com/clickreg.php?type=gamestats&id=1225&subid=mainmenu"), "_blank"); }); MainMenuLogo_2G.width = 240; MainMenuLogo_2G.height = 60; MainMenuLogo_2G.x = 380; MainMenuLogo_2G.y = 45; LevelOverLogo_2G = new GameButton("Play More Games", null, 300, 40, function (_arg1:MouseEvent=null):void{ BrandingManager.navigateToURL(new URLRequest("http://www.2games.com/clickreg.php?type=gamestats&id=1225&subid=levelover"), "_blank"); }); LevelOverLogo_2G.x = 125; LevelOverLogo_2G.y = 400; LevelMenuLogo_2G = new Logo2GamesCom(); LevelMenuLogo_2G.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent=null):void{ BrandingManager.navigateToURL(new URLRequest("http://www.2games.com/clickreg.php?type=gamestats&id=1225&subid=levelmenu"), "_blank"); }); LevelMenuLogo_2G.width = 225; LevelMenuLogo_2G.height = 40; LevelMenuLogo_2G.x = 72.5; LevelMenuLogo_2G.y = 70; CourseOverLogo_2G = new GameButton("Play More Games", null, 200, 30, function (_arg1:MouseEvent=null):void{ BrandingManager.navigateToURL(new URLRequest("http://www.2games.com/clickreg.php?type=gamestats&id=1225&subid=courseover"), "_blank"); }); CourseOverLogo_2G.x = 85; CourseOverLogo_2G.y = 365; SplashScreen_2G = new SponsorSplashScreen2G({width:640, height:480, onClick:function (_arg1:MouseEvent=null):void{ var _local2:*; _local2 = new URLRequest("http://www.2games.com/clickreg.php?type=gamestats&id=1225&subid=splashscreen"); BrandingManager.navigateToURL(_local2, "_blank"); }, onDone:onSponsorSplashScreenDone}); CourseOverScoreSubmit_2G = new ScoreWidget(); CourseOverScoreSubmit_2G.x = 335; CourseOverScoreSubmit_2G.y = 365; CourseOverScoreSubmit_2G.SetScoreName(last_name); BrandingManager.AddSponsorMaterials("2games", "SplashScreen", SplashScreen_2G); BrandingManager.AddSponsorMaterials("2games", "CourseOverLogo", CourseOverLogo_2G); BrandingManager.AddSponsorMaterials("2games", "LevelOverLogo", LevelOverLogo_2G); BrandingManager.AddSponsorMaterials("2games", "LevelMenuLogo", LevelMenuLogo_2G); BrandingManager.AddSponsorMaterials("2games", "MainMenuLogo", MainMenuLogo_2G); BrandingManager.AddSponsorMaterials("2games", "CourseOverScoreSubmit", CourseOverScoreSubmit_2G); CourseOverScoreSubmit_MJ = new ScoreWidgetMJ(this.root.loaderInfo); CourseOverScoreSubmit_MJ.x = 335; CourseOverScoreSubmit_MJ.y = 365; BrandingManager.AddSponsorMaterials("mindjolt", "SplashScreen", SplashScreen_2G); BrandingManager.AddSponsorMaterials("mindjolt", "CourseOverLogo", CourseOverLogo_2G); BrandingManager.AddSponsorMaterials("mindjolt", "LevelOverLogo", LevelOverLogo_2G); BrandingManager.AddSponsorMaterials("mindjolt", "LevelMenuLogo", LevelMenuLogo_2G); BrandingManager.AddSponsorMaterials("mindjolt", "MainMenuLogo", MainMenuLogo_2G); BrandingManager.AddSponsorMaterials("mindjolt", "CourseOverScoreSubmit", CourseOverScoreSubmit_MJ); _SponsorSplashScreen = (BrandingManager.GetCurrentSponsorMaterial(_loadBackDrop, "SplashScreen") as MovieClip); if (_SponsorSplashScreen == null){ onSponsorSplashScreenDone(); }; _loadBackDrop.addChild(_loadFrame); } private function onEnterFrame(_arg1:Event):void{ if (_splashScreenDone){ this.removeEventListener(Event.ENTER_FRAME, onEnterFrame); nextFrame(); initApp(); }; } private function initApp():void{ var _local1:SiteLockScreen; var _local2:Class; var _local3:Object; trace((("loader URL(" + this.root.loaderInfo.loaderURL) + ")")); if (this.root.loaderInfo.loaderURL.indexOf("http") != 0){ _slot1.isLocalCopy = true; } else { _slot1.isOffSiteCopy = !((this.root.loaderInfo.loaderURL.search(_slot1.LOCKED_TO_SITE_REGEX) == 0)); }; if (((((_slot1.isOffSiteCopy) && (_slot1.IS_SITE_LOCKED))) || (((_slot1.isLocalCopy) && (_slot1.IS_FILE_LOCKED))))){ trace("OffSite or Local Copy. Stopping..."); _local1 = new SiteLockScreen("HeadMeatGames.com", "http://www.headmeatgames.com"); this.addChild(_local1); this.stop(); return; }; _local2 = Class(getDefinitionByName(_slot1.MAIN_CLASS)); if (_local2){ _local3 = new (_local2); parent.addChild((_local3 as DisplayObject)); _local3.init(); }; this.removeChild(this._loadBackDrop); this._loadBackDrop = null; this._loadFrame = null; } } }//package
Section 88
//SponsorSplashScreen2G (SponsorSplashScreen2G) package { import flash.events.*; import flash.display.*; public class SponsorSplashScreen2G extends MovieClip { public var shouldLoop:Boolean;// = false public var rolloverMc:Logo2GamesCom; public var skip_btn:SimpleButton; public function SponsorSplashScreen2G(_arg1:Object=null){ shouldLoop = false; super(); this.stop(); if (_arg1 == null){ _arg1 = new Object(); }; if (_arg1.width == null){ _arg1.width = 550; }; if (_arg1.height == null){ _arg1.height = 400; }; if (_arg1.x == null){ _arg1.x = (_arg1.width * 0.5); }; if (_arg1.y == null){ _arg1.y = (_arg1.height * 0.5); }; this.width = _arg1.width; this.height = _arg1.height; this.x = _arg1.x; this.y = _arg1.y; if (_arg1.onDone != null){ this.addEventListener(Event.COMPLETE, _arg1.onDone); }; if (_arg1.onClick != null){ this.rolloverMc.addEventListener(MouseEvent.CLICK, _arg1.onClick); }; this.skip_btn.addEventListener(MouseEvent.CLICK, this.onClickSkip); this.addFrameScript((this.totalFrames - 1), lastFrameScript); this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); this.addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage); } private function onClickSkip(_arg1:MouseEvent):void{ trace("skip clicked!"); this.gotoAndPlay((this.totalFrames - 1)); } private function onRemovedFromStage(_arg1:Event):void{ if (_arg1.target == this){ trace("removed from stage"); this.stop(); this.removeEventListener(Event.REMOVED, onRemovedFromStage); }; } private function lastFrameScript():void{ var _local1:Event; if (!shouldLoop){ stop(); if (parent != null){ this.parent.removeChild(this); }; }; _local1 = new Event(Event.COMPLETE); dispatchEvent(_local1); } private function onAddedToStage(_arg1:Event):void{ if (_arg1.target == this){ trace("added to stage"); trace(this.width); trace(this.height); this.play(); this.removeEventListener(Event.ADDED, onAddedToStage); }; } } }//package
Section 89
//SponsorSplashScreenAG (SponsorSplashScreenAG) package { import flash.events.*; import flash.display.*; public class SponsorSplashScreenAG extends MovieClip { public var shouldLoop:Boolean;// = false public var rolloverMc:SimpleButton; public var skip_btn:SimpleButton; public function SponsorSplashScreenAG(_arg1:Object=null){ shouldLoop = false; super(); this.stop(); if (_arg1 == null){ _arg1 = new Object(); }; if (_arg1.width == null){ _arg1.width = 550; }; if (_arg1.height == null){ _arg1.height = 400; }; if (_arg1.x == null){ _arg1.x = (_arg1.width * 0.5); }; if (_arg1.y == null){ _arg1.y = (_arg1.height * 0.5); }; this.width = _arg1.width; this.height = _arg1.height; this.x = _arg1.x; this.y = _arg1.y; if (_arg1.onDone != null){ this.addEventListener(Event.COMPLETE, _arg1.onDone); }; if (_arg1.onClick != null){ this.rolloverMc.addEventListener(MouseEvent.CLICK, _arg1.onClick); }; this.skip_btn.addEventListener(MouseEvent.CLICK, this.onClickSkip); this.addFrameScript((this.totalFrames - 1), lastFrameScript); this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); this.addEventListener(Event.REMOVED_FROM_STAGE, onRemovedFromStage); } private function onClickSkip(_arg1:MouseEvent):void{ this.gotoAndPlay((this.totalFrames - 1)); } private function onRemovedFromStage(_arg1:Event):void{ if (_arg1.target == this){ this.stop(); this.removeEventListener(Event.REMOVED, onRemovedFromStage); }; } private function lastFrameScript():void{ var _local1:Event; if (!shouldLoop){ stop(); if (parent != null){ this.parent.removeChild(this); }; }; _local1 = new Event(Event.COMPLETE); dispatchEvent(_local1); } private function onAddedToStage(_arg1:Event):void{ if (_arg1.target == this){ this.play(); this.removeEventListener(Event.ADDED, onAddedToStage); }; } } }//package

Library Items

Symbol 1 Font {ResourceManager__abbessEmbed}
Symbol 2 GraphicUsed by:7 30
Symbol 3 GraphicUsed by:7
Symbol 4 GraphicUsed by:7
Symbol 5 GraphicUsed by:7
Symbol 6 GraphicUsed by:7
Symbol 7 ButtonUses:2 3 4 5 6Used by:30
Symbol 8 GraphicUsed by:13
Symbol 9 GraphicUsed by:13
Symbol 10 GraphicUsed by:13
Symbol 11 GraphicUsed by:13
Symbol 12 GraphicUsed by:13
Symbol 13 ButtonUses:8 9 10 11 12Used by:30
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClipUses:14Used by:30
Symbol 16 GraphicUsed by:28 87
Symbol 17 GraphicUsed by:28 87
Symbol 18 GraphicUsed by:28 87
Symbol 19 GraphicUsed by:28 87
Symbol 20 GraphicUsed by:28 87
Symbol 21 GraphicUsed by:28 87
Symbol 22 GraphicUsed by:28 87
Symbol 23 GraphicUsed by:28 87
Symbol 24 GraphicUsed by:28 87
Symbol 25 GraphicUsed by:28 87
Symbol 26 GraphicUsed by:28 87
Symbol 27 GraphicUsed by:28 87
Symbol 28 MovieClipUses:16 17 18 19 20 21 22 23 24 25 26 27Used by:30 87
Symbol 29 Sound {Smash} [Smash]Used by:30
Symbol 30 MovieClip {SponsorSplashScreenAG} [SponsorSplashScreenAG]Uses:2 7 13 15 28 29
Symbol 31 GraphicUsed by:37
Symbol 32 FontUsed by:33 35
Symbol 33 TextUses:32Used by:37
Symbol 34 GraphicUsed by:37
Symbol 35 TextUses:32Used by:37
Symbol 36 GraphicUsed by:37
Symbol 37 ButtonUses:31 33 34 35 36Used by:47
Symbol 38 GraphicUsed by:39
Symbol 39 MovieClipUses:38Used by:47
Symbol 40 GraphicUsed by:44
Symbol 41 GraphicUsed by:44 51
Symbol 42 GraphicUsed by:44
Symbol 43 GraphicUsed by:44
Symbol 44 MovieClip {Logo2GamesCom} [Logo2GamesCom]Uses:40 41 42 43Used by:47
Symbol 45 FontUsed by:46
Symbol 46 TextUses:45Used by:47
Symbol 47 MovieClip {SponsorSplashScreen2G} [SponsorSplashScreen2G]Uses:37 39 44 46
Symbol 48 GraphicUsed by:51
Symbol 49 GraphicUsed by:51
Symbol 50 GraphicUsed by:51
Symbol 51 MovieClip {Logo2GamesShort} [Logo2GamesShort]Uses:48 41 49 50
Symbol 52 GraphicUsed by:85
Symbol 53 BitmapUsed by:54
Symbol 54 GraphicUses:53Used by:55
Symbol 55 MovieClipUses:54Used by:85
Symbol 56 FontUsed by:57 61
Symbol 57 TextUses:56Used by:58
Symbol 58 MovieClipUses:57Used by:85
Symbol 59 GraphicUsed by:68
Symbol 60 FontUsed by:61 67
Symbol 61 TextUses:56 60Used by:68
Symbol 62 GraphicUsed by:68
Symbol 63 FontUsed by:65 67
Symbol 64 FontUsed by:65
Symbol 65 TextUses:63 64Used by:68
Symbol 66 GraphicUsed by:68
Symbol 67 TextUses:63 60Used by:68
Symbol 68 ButtonUses:59 61 62 65 66 67Used by:85
Symbol 69 FontUsed by:70 71 72 83
Symbol 70 TextUses:69Used by:73
Symbol 71 TextUses:69Used by:73
Symbol 72 TextUses:69Used by:73
Symbol 73 ButtonUses:70 71 72Used by:85
Symbol 74 FontUsed by:75 77 79 81
Symbol 75 TextUses:74Used by:76
Symbol 76 MovieClipUses:75Used by:85
Symbol 77 TextUses:74Used by:78
Symbol 78 MovieClipUses:77Used by:85
Symbol 79 TextUses:74Used by:80
Symbol 80 MovieClipUses:79Used by:85
Symbol 81 TextUses:74Used by:82
Symbol 82 MovieClipUses:81Used by:85
Symbol 83 TextUses:69Used by:84
Symbol 84 MovieClipUses:83Used by:85
Symbol 85 MovieClip {HMGSplashScreen} [HMGSplashScreen]Uses:52 55 58 68 73 76 78 80 82 84
Symbol 86 GraphicUsed by:87
Symbol 87 Button {AGButton} [AGButton]Uses:28 86 16 17 18 19 20 21 22 23 24 25 26 27
Symbol 88 MovieClip {AGtoolkit} [AGtoolkit]
Symbol 89 Sound {Heartbeat} [Heartbeat]
Symbol 90 Sound {Slam} [Slam]
Symbol 91 Sound {ResourceManager_BaseClickSound} [ResourceManager_BaseClickSound]
Symbol 92 Sound {ResourceManager_ShortCheer3Sound} [ResourceManager_ShortCheer3Sound]
Symbol 93 Sound {ResourceManager_SharpClickSound} [ResourceManager_SharpClickSound]
Symbol 94 Sound {ResourceManager_PoolBallBumpSound} [ResourceManager_PoolBallBumpSound]
Symbol 95 Sound {ResourceManager_ShortCheer2Sound} [ResourceManager_ShortCheer2Sound]
Symbol 96 Sound {ResourceManager_BuzzerSound} [ResourceManager_BuzzerSound]
Symbol 97 Sound {ResourceManager_CheerSound} [ResourceManager_CheerSound]
Symbol 98 Sound {ResourceManager_ShortMurmurSound} [ResourceManager_ShortMurmurSound]
Symbol 99 Sound {ResourceManager_PoolPocketSound} [ResourceManager_PoolPocketSound]
Symbol 100 Sound {ResourceManager_PoolBallHitSound} [ResourceManager_PoolBallHitSound]
Symbol 101 Sound {ResourceManager_BackgroundMusic1} [ResourceManager_BackgroundMusic1]
Symbol 102 Sound {ResourceManager_ShortCheer1Sound} [ResourceManager_ShortCheer1Sound]
Symbol 103 Bitmap {ResourceManager_PoolballPurpleTexture}
Symbol 104 Bitmap {ResourceManager_PoolballBlueTexture}
Symbol 105 Bitmap {ResourceManager_SmileyFaceTexture}
Symbol 106 Bitmap {ResourceManager_PoolballRedTexture}

Instance Names

"rolloverMc"Symbol 30 MovieClip {SponsorSplashScreenAG} [SponsorSplashScreenAG] Frame 1Symbol 7 Button
"skip_btn"Symbol 30 MovieClip {SponsorSplashScreenAG} [SponsorSplashScreenAG] Frame 1Symbol 13 Button
"skip_btn"Symbol 47 MovieClip {SponsorSplashScreen2G} [SponsorSplashScreen2G] Frame 1Symbol 37 Button
"rolloverMc"Symbol 47 MovieClip {SponsorSplashScreen2G} [SponsorSplashScreen2G] Frame 1Symbol 44 MovieClip {Logo2GamesCom} [Logo2GamesCom]
"Brain_mc"Symbol 85 MovieClip {HMGSplashScreen} [HMGSplashScreen] Frame 1Symbol 55 MovieClip
"TagLine_mc"Symbol 85 MovieClip {HMGSplashScreen} [HMGSplashScreen] Frame 1Symbol 58 MovieClip
"Skip_btn"Symbol 85 MovieClip {HMGSplashScreen} [HMGSplashScreen] Frame 1Symbol 68 Button
"GoToHMG_btn"Symbol 85 MovieClip {HMGSplashScreen} [HMGSplashScreen] Frame 1Symbol 73 Button
"Head_mc"Symbol 85 MovieClip {HMGSplashScreen} [HMGSplashScreen] Frame 1Symbol 76 MovieClip
"Meat_mc"Symbol 85 MovieClip {HMGSplashScreen} [HMGSplashScreen] Frame 1Symbol 78 MovieClip
"Games_mc"Symbol 85 MovieClip {HMGSplashScreen} [HMGSplashScreen] Frame 1Symbol 80 MovieClip
"ProducedBy_mc"Symbol 85 MovieClip {HMGSplashScreen} [HMGSplashScreen] Frame 1Symbol 82 MovieClip
"HMGSite_mc"Symbol 85 MovieClip {HMGSplashScreen} [HMGSplashScreen] Frame 1Symbol 84 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1459 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 2Symbol 30 as "SponsorSplashScreenAG"
ExportAssets (56)Timeline Frame 2Symbol 47 as "SponsorSplashScreen2G"
ExportAssets (56)Timeline Frame 2Symbol 44 as "Logo2GamesCom"
ExportAssets (56)Timeline Frame 2Symbol 51 as "Logo2GamesShort"
ExportAssets (56)Timeline Frame 2Symbol 85 as "HMGSplashScreen"
ExportAssets (56)Timeline Frame 2Symbol 87 as "AGButton"
ExportAssets (56)Timeline Frame 2Symbol 88 as "AGtoolkit"
ExportAssets (56)Timeline Frame 2Symbol 29 as "Smash"
ExportAssets (56)Timeline Frame 2Symbol 89 as "Heartbeat"
ExportAssets (56)Timeline Frame 2Symbol 90 as "Slam"
ExportAssets (56)Timeline Frame 2Symbol 91 as "ResourceManager_BaseClickSound"
ExportAssets (56)Timeline Frame 2Symbol 92 as "ResourceManager_ShortCheer3Sound"
ExportAssets (56)Timeline Frame 2Symbol 93 as "ResourceManager_SharpClickSound"
ExportAssets (56)Timeline Frame 2Symbol 94 as "ResourceManager_PoolBallBumpSound"
ExportAssets (56)Timeline Frame 2Symbol 95 as "ResourceManager_ShortCheer2Sound"
ExportAssets (56)Timeline Frame 2Symbol 96 as "ResourceManager_BuzzerSound"
ExportAssets (56)Timeline Frame 2Symbol 97 as "ResourceManager_CheerSound"
ExportAssets (56)Timeline Frame 2Symbol 98 as "ResourceManager_ShortMurmurSound"
ExportAssets (56)Timeline Frame 2Symbol 99 as "ResourceManager_PoolPocketSound"
ExportAssets (56)Timeline Frame 2Symbol 100 as "ResourceManager_PoolBallHitSound"
ExportAssets (56)Timeline Frame 2Symbol 101 as "ResourceManager_BackgroundMusic1"
ExportAssets (56)Timeline Frame 2Symbol 102 as "ResourceManager_ShortCheer1Sound"
SerialNumber (41)Timeline Frame 1

Labels

"Preloader"Frame 1
"SplashScreen"Frame 2
"GameMenuScreen"Frame 3




http://swfchan.com/16/75122/info.shtml
Created: 6/4 -2019 11:09:48 Last modified: 6/4 -2019 11:09:48 Server time: 22/12 -2024 23:09:04