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

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

ElectroSpinner.swf

This is the info page for
Flash #132927

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


Text
INSTRUCTIONS

The signal.
catch it and try
to keep
on the spinner

The receiver. Bring
all signals here

Your spinner.
Control it by the
following buttons:
Press and hold an
arrow to see what
will happen;
Press the space
button to see its
action.

free elecricity
Grab it to get extra score

Another signal.
catch it and bring to
the receiver too

In short, your task on
each level is to  catch
all signals and bring
them all to the
receiver.

Choose level

Well Done!

<p align="center"><font face="04b08" size="8" color="#fff1d7" letterSpacing="2.000000" kerning="1">04</font></p>

<p align="center"><font face="04b08" size="8" color="#fff1d7" letterSpacing="2.000000" kerning="1">48</font></p>

<p align="center"><font face="04b08" size="8" color="#fff1d7" letterSpacing="2.000000" kerning="1">04</font></p>

ActionScript [AS3]

Section 1
//KeyPoll (bigroom.input.KeyPoll) package bigroom.input { import flash.display.*; import flash.events.*; import flash.utils.*; public class KeyPoll { private var states:ByteArray; private var dispObj:DisplayObject; private var lastKeyCode:uint; public static const Z:uint = 90; public static const LEFT:uint = 37; public static const RIGHTBRACKET:uint = 221; public static const EQUAL:uint = 187; public static const COMMAND:uint = 19; public static const CONTROL:uint = 17; public static const NUMPAD_DECIMAL:uint = 110; public static const A:uint = 65; public static const B:uint = 66; public static const C:uint = 67; public static const D:uint = 68; public static const E:uint = 69; public static const F:uint = 70; public static const G:uint = 71; public static const H:uint = 72; public static const I:uint = 73; public static const J:uint = 74; public static const L:uint = 76; public static const M:uint = 77; public static const N:uint = 78; public static const O:uint = 79; public static const MINUS:uint = 189; public static const K:uint = 75; public static const S:uint = 83; public static const NUMPAD:uint = 21; public static const NUMPAD_ENTER:uint = 108; public static const P:uint = 80; public static const PAGE_DOWN:uint = 34; public static const ALTERNATE:uint = 18; public static const T:uint = 84; public static const BACKSPACE:uint = 8; public static const PAGE_UP:uint = 33; public static const X:uint = 88; public static const Y:uint = 89; public static const Q:uint = 81; public static const QUOTE:uint = 222; public static const SLASH:uint = 191; public static const U:uint = 85; public static const W:uint = 87; public static const SHIFT:uint = 16; public static const TAB:uint = 9; public static const R:uint = 82; public static const ESCAPE:uint = 27; public static const NUMPAD_ADD:uint = 107; public static const LEFTBRACKET:uint = 219; public static const DOWN:uint = 40; public static const F1:uint = 112; public static const F3:uint = 114; public static const F4:uint = 115; public static const F5:uint = 116; public static const F6:uint = 117; public static const F7:uint = 118; public static const F8:uint = 119; public static const F2:uint = 113; public static const COMMA:uint = 188; public static const ENTER:uint = 13; public static const INSERT:uint = 45; public static const DELETE:uint = 46; public static const NUMBER_1:uint = 49; public static const NUMBER_2:uint = 50; public static const NUMBER_3:uint = 51; public static const NUMBER_5:uint = 53; public static const NUMBER_6:uint = 54; public static const NUMBER_0:uint = 48; public static const END:uint = 35; public static const NUMBER_9:uint = 57; public static const NUMPAD_6:uint = 102; public static const NUMPAD_1:uint = 97; public static const NUMPAD_2:uint = 98; public static const NUMBER_7:uint = 55; public static const CAPS_LOCK:uint = 20; public static const F9:uint = 120; public static const NUMBER_4:uint = 52; public static const NUMBER_8:uint = 56; public static const BACKQUOTE:uint = 192; public static const BACKSLASH:uint = 220; public static const SEMICOLON:uint = 186; public static const NUMPAD_DIVIDE:uint = 111; public static const NUMPAD_3:uint = 99; public static const NUMPAD_4:uint = 100; public static const NUMPAD_5:uint = 101; public static const NUMPAD_7:uint = 103; public static const NUMPAD_8:uint = 104; public static const HOME:uint = 36; public static const NUMPAD_0:uint = 96; public static const PERIOD:uint = 190; public static const F10:uint = 121; public static const F11:uint = 122; public static const F12:uint = 123; public static const F13:uint = 124; public static const F14:uint = 125; public static const F15:uint = 126; public static const V:uint = 86; public static const SPACE:uint = 32; public static const NUMPAD_MULTIPLY:uint = 106; public static const NUMPAD_SUBTRACT:uint = 109; public static const NUMPAD_9:uint = 105; public static const RIGHT:uint = 39; public static const UP:uint = 38; public function KeyPoll(_arg1:DisplayObject){ states = new ByteArray(); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); states.writeUnsignedInt(0); dispObj = _arg1; dispObj.addEventListener(KeyboardEvent.KEY_DOWN, keyDownListener, false, 0, true); dispObj.addEventListener(KeyboardEvent.KEY_UP, keyUpListener, false, 0, true); dispObj.addEventListener(Event.ACTIVATE, resetKeyStates, false, 0, true); dispObj.addEventListener(Event.DEACTIVATE, resetKeyStates, false, 0, true); } public function isUp(_arg1:uint, _arg2:uint=0, _arg3:uint=0):Boolean{ var _local4:Boolean; _local4 = ((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0); if ((((_arg2 > 0)) && ((_local4 == true)))){ _local4 = ((states[(_arg2 >>> 3)] & (1 << (_arg2 & 7))) == 0); }; if ((((_arg3 > 0)) && ((_local4 == true)))){ _local4 = ((states[(_arg3 >>> 3)] & (1 << (_arg3 & 7))) == 0); }; return (_local4); } private function keyUpListener(_arg1:KeyboardEvent):void{ states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] & ~((1 << (_arg1.keyCode & 7)))); lastKeyCode = 0; } private function resetKeyStates(_arg1:Event):void{ var _local2:int; _local2 = 0; while (_local2 < 32) { states[_local2] = 0; _local2++; }; lastKeyCode = 0; } public function get keyCode():uint{ return (lastKeyCode); } public function isDown(_arg1:uint, _arg2:uint=0, _arg3:uint=0):Boolean{ var _local4:Boolean; _local4 = !(((states[(_arg1 >>> 3)] & (1 << (_arg1 & 7))) == 0)); if ((((_arg2 > 0)) && ((_local4 == true)))){ _local4 = !(((states[(_arg2 >>> 3)] & (1 << (_arg2 & 7))) == 0)); }; if ((((_arg3 > 0)) && ((_local4 == true)))){ _local4 = !(((states[(_arg3 >>> 3)] & (1 << (_arg3 & 7))) == 0)); }; return (_local4); } private function keyDownListener(_arg1:KeyboardEvent):void{ states[(_arg1.keyCode >>> 3)] = (states[(_arg1.keyCode >>> 3)] | (1 << (_arg1.keyCode & 7))); lastKeyCode = _arg1.keyCode; } } }//package bigroom.input
Section 2
//Ampermeter (classes.Ampermeter) package classes { import flash.display.*; public dynamic class Ampermeter extends MovieClip { } }//package classes
Section 3
//BaseMenu (classes.BaseMenu) package classes { import com.reintroducing.sound.*; import flash.display.*; import flash.events.*; import com.greensock.*; import mochi.as3.*; import flash.net.*; import com.greensock.easing.*; import flash.system.*; public class BaseMenu extends MovieClip { var sm:SoundManager; public var stageRef:Stage; public var loadNext:BaseMenu; public static const blurValue = 20; public static const fadeoutTime = 0.55; public function BaseMenu(){ alpha = 0; sm = SoundManager.getInstance(); } public function remove():void{ dispatchEvent(new Event("menuRemoved")); if (stageRef.contains(this)){ stageRef.removeChild(this); }; if (loadNext != null){ loadNext.load(); }; } public function onLoaded(){ } public function load():void{ var _local1:TimelineLite; stageRef.addChild(this); this.alpha = 0; _local1 = new TimelineLite({onComplete:onLoaded}); _local1.append(new TweenLite(this, 0, {blurFilter:{blurX:blurValue, blurY:blurValue}})); _local1.appendMultiple([new TweenLite(this, fadeoutTime, {blurFilter:{blurX:0, blurY:0}}), new TweenLite(this, fadeoutTime, {alpha:1})], 0); } public function gotoLink(_arg1:String, _arg2:String){ var vars:URLVariables; var req:URLRequest; var mochiTrackedURL = _arg1; var alternateURI = _arg2; vars = new URLVariables(); vars["mav"] = MochiServices.getVersion(); vars["swfv"] = "9"; vars["swfurl"] = this.loaderInfo.loaderURL; vars["fv"] = Capabilities.version; vars["os"] = Capabilities.os; vars["lang"] = Capabilities.language; vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY); req = new URLRequest(mochiTrackedURL); req.data = vars; try { navigateToURL(req, "_blank"); } catch(e:Error) { navigateToURL(new URLRequest(alternateURI), "_blank"); }; } public function unload(_arg1:BaseMenu=null):void{ var _local2:TimelineLite; if (_arg1 != null){ loadNext = _arg1; }; _local2 = new TimelineLite({onComplete:remove}); _local2.appendMultiple([new TweenLite(this, fadeoutTime, {blurFilter:{blurX:blurValue, blurY:blurValue}}), new TweenLite(this, fadeoutTime, {alpha:0})], 0); } } }//package classes
Section 4
//Contact (classes.Contact) package classes { import com.reintroducing.sound.*; public class Contact extends GameObject { private var _type:String; var sm:SoundManager; var timeToEvent:int; var eventInterval:int; private var col:int; public var isActive:Boolean; private var row:int; var delayTime:int; static const CHARGED:String = "charged"; static const FLIPPING:String = "short"; static const NORMAL:String = "normal"; static const PLAIN:String = "plain"; static const RECEIVER:String = "receiver"; public function Contact(_arg1:int=0, _arg2:int=0, _arg3:int=0, _arg4:int=0){ addFrameScript(0, frame1); super(); row = _arg1; col = _arg2; _type = NORMAL; isActive = true; objType = GameObject.TYPE_CONTACT; delayTime = _arg4; eventInterval = _arg3; timeToEvent = eventInterval; sm = SoundManager.getInstance(); } function frame1(){ stop(); } public function set type(_arg1:String):void{ _type = _arg1; if (_type == FLIPPING){ objType = GameObject.TYPE_DYNAMIC_CONTACT; } else { gotoAndStop(_type); if (_type == PLAIN){ isActive = false; }; }; } public function get type():String{ return (_type); } public function uncharge(){ var _local1:Game; var _local2:ParticleEffect; _local1 = (parent.parent as Game); if (!_local1){ return; }; type = NORMAL; _local1.scoreCounter.addScore(Game.BONUS_CHARGED); _local2 = new ParticleEffect(); _local2.x = x; _local2.y = y; _local1.addChild(_local2); _local2.flow(80, 300, (_local1.scoreCounter.x - x), (_local1.scoreCounter.y - y), 2); } override public function onFrame(_arg1:int){ var _local2:Game; if (objType != TYPE_DYNAMIC_CONTACT){ return; }; delayTime = (delayTime - _arg1); if (delayTime > 0){ return; }; timeToEvent = (timeToEvent - _arg1); if (timeToEvent <= 0){ timeToEvent = eventInterval; if (isActive){ gotoAndStop(FLIPPING); if (GameData.vars.soundsEnabled){ sm.playSound("sndContact", 0.5); }; if (parent.parent){ _local2 = (parent.parent as Game); if ((((row == _local2.spinner.row)) && ((col == _local2.spinner.col)))){ _local2.stopGame("fail"); }; }; } else { if (GameData.vars.soundsEnabled){ sm.playSound("sndContact", 0.5); }; gotoAndStop(NORMAL); }; isActive = !(isActive); }; } } }//package classes
Section 5
//Cookie (classes.Cookie) package classes { import flash.net.*; public class Cookie { private var _name:String; private var _so:SharedObject; public function Cookie(_arg1:String="tempCookie"){ _name = _arg1; _so = SharedObject.getLocal(_arg1, "/"); } public function isKeyExist(_arg1:String):Boolean{ _arg1 = ("key_" + _arg1); return (((!((_so.data.cookie == undefined))) && (!((_so.data.cookie[_arg1] == undefined))))); } public function remove(_arg1:String):void{ if (isKeyExist(_arg1)){ delete _so.data.cookie[("key_" + _arg1)]; _so.flush(); }; } public function getName():String{ return (_name); } public function clear():void{ _so.clear(); } public function put(_arg1:String, _arg2):void{ var _local3:Object; _arg1 = ("key_" + _arg1); if (_so.data.cookie == undefined){ _local3 = {}; _local3[_arg1] = _arg2; _so.data.cookie = _local3; } else { _so.data.cookie[_arg1] = _arg2; }; _so.flush(); } public function getSize():uint{ return (_so.size); } public function isExist():Boolean{ return (!((getSize() == 0))); } public function get(_arg1:String):Object{ return ((isKeyExist(_arg1)) ? _so.data.cookie[("key_" + _arg1)] : null); } } }//package classes
Section 6
//Enemy (classes.Enemy) package classes { import com.reintroducing.sound.*; public class Enemy extends GameObject { var isFirstCall:Boolean;// = true var sm:SoundManager; var timeToEvent:int; var eventInterval:int; var lastEventTime:int; var game:Game; var delayTime:int; public function Enemy(_arg1:int, _arg2:int=0){ isFirstCall = true; super(); sm = SoundManager.getInstance(); objType = GameObject.TYPE_ENEMY; delayTime = _arg2; eventInterval = _arg1; } public function execute(){ } public function setGameRef(_arg1:Game){ game = _arg1; } public function destruct(){ if (parent){ parent.removeChild(this); }; } public function update(_arg1:int){ } override public function onFrame(_arg1:int){ if (isFirstCall){ isFirstCall = false; lastEventTime = 0; timeToEvent = delayTime; firstTimeInit(); }; update(_arg1); timeToEvent = (timeToEvent - _arg1); if ((((eventInterval > 0)) && ((timeToEvent <= 0)))){ execute(); timeToEvent = eventInterval; }; } } }//package classes
Section 7
//EnemyBreak (classes.EnemyBreak) package classes { import flash.display.*; import com.greensock.*; import com.greensock.easing.*; public class EnemyBreak extends Enemy { private const TWEEN_TIME:Number = 0.3; private const PARTICLES:int = 15; public var flash:MovieClip; var isActive:Boolean; var length:int; public function EnemyBreak(_arg1:int, _arg2:int, _arg3:int=0){ addFrameScript(0, frame1); super(_arg2, _arg3); isActive = false; length = _arg1; gotoAndStop(int(((Math.random() * 3) + 1))); } private function onTweenComplete(_arg1:String){ var _local2:MovieClip; _local2 = (getChildByName(_arg1) as MovieClip); if (_local2){ game.spinner.removeCollider(_local2); removeChild(_local2); }; } function frame1(){ stop(); } override public function execute(){ var _local1:int; var _local2:Particle; var _local3:int; var _local4:TimelineLite; if (GameData.vars.soundsEnabled){ sm.playSound("sndBreak", ((Math.random() * 0.3) + 0.15)); }; flash.alpha = 0.7; TweenLite.to(flash, 0.6, {alpha:0, delay:0.1}); _local1 = 0; while (_local1 < PARTICLES) { _local2 = new Particle(); _local2.name = ("sparkle-" + _local1); _local2.rotation = (Math.random() * 360); addChild(_local2); game.spinner.addCollider(_local2); _local3 = ((Math.random() * 30) - 15); _local4 = new TimelineLite({onComplete:onTweenComplete, onCompleteParams:new Array(_local2.name)}); _local4.append(new TweenMax(_local2, (Math.random() + (TWEEN_TIME * length)), {rotation:(Math.random() * 200), bezierThrough:[{x:(_local3 / 3), y:-((Math.random() * 2))}, {x:_local3, y:((((Math.random() * Game.CELL_HEIGHT) * length) / 2) + ((Game.CELL_HEIGHT * length) / 2))}], orientToBezier:false, ease:Linear.easeIn})); _local4.append(new TweenMax(_local2, 0.2, {colorMatrixFilter:{brightness:-2}})); _local1++; }; } } }//package classes
Section 8
//EnemyFlyer (classes.EnemyFlyer) package classes { import flash.display.*; import com.greensock.*; import com.greensock.motionPaths.*; import com.greensock.easing.*; import com.greensock.plugins.*; public class EnemyFlyer extends Enemy { const RADIUS:int = 20; public var ball:MovieClip; var points:Array; var timeline:TimelineLite; var isStarted:Boolean; public var col:int; var clockwise:Boolean; public var row:int; public function EnemyFlyer(_arg1:Boolean, _arg2:int=0){ super(0, _arg2); clockwise = _arg1; points = new Array(); timeline = new TimelineLite(); isStarted = false; } override public function resume(){ timeline.resume(); } public function addPoints(_arg1:Array){ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:Circle2D; var _local12:String; if ((((_arg1.length <= 2)) || (!(game)))){ return; }; _local2 = Game.CELL_WIDTH; _local3 = Game.CELL_HEIGHT; _local4 = x; _local5 = y; _local6 = (clockwise) ? 1 : -1; _local7 = 2; while (_local7 < _arg1.length) { _local8 = _arg1[_local7]; switch (_local8){ case 1: _local4 = (_local4 + _local2); _local5 = (_local5 + (_local6 * _local3)); points.push({x:_local4, y:_local5}); _local4 = (_local4 + _local2); _local5 = (_local5 - (_local6 * _local3)); points.push({x:_local4, y:_local5}); _local6 = (_local6 * -1); break; case 3: _local4 = (_local4 + (_local6 * _local2)); _local5 = (_local5 + _local3); points.push({x:_local4, y:_local5}); _local4 = (_local4 - (_local6 * _local2)); _local5 = (_local5 + _local3); points.push({x:_local4, y:_local5}); _local6 = (_local6 * -1); break; case 5: _local4 = (_local4 - _local2); _local5 = (_local5 + (_local6 * _local3)); points.push({x:_local4, y:_local5}); _local4 = (_local4 - _local2); _local5 = (_local5 - (_local6 * _local3)); points.push({x:_local4, y:_local5}); _local6 = (_local6 * -1); break; case 7: _local4 = (_local4 + (_local6 * _local2)); _local5 = (_local5 - _local3); points.push({x:_local4, y:_local5}); _local4 = (_local4 - (_local6 * _local2)); _local5 = (_local5 - _local3); points.push({x:_local4, y:_local5}); _local6 = (_local6 * -1); break; }; _local7++; }; if (_arg1.length > 3){ timeline.append(new TweenMax(this, (((game.spinnerTime / 2) * (_arg1.length - 2)) / 1000), {repeat:-1, bezier:points, orientToBezier:false, ease:Linear.easeNone})); } else { if (_arg1.length == 3){ switch (_arg1[2]){ case 1: _local9 = (x + Game.CELL_WIDTH); _local10 = y; break; case 3: _local9 = x; _local10 = (y + Game.CELL_HEIGHT); break; case 5: _local9 = (x - Game.CELL_WIDTH); _local10 = y; break; case 7: _local9 = x; _local10 = (y - Game.CELL_HEIGHT); break; }; _local11 = new Circle2D(_local9, _local10, RADIUS); _local12 = (clockwise) ? Direction.CLOCKWISE : Direction.COUNTER_CLOCKWISE; timeline.append(new TweenLite(this, ((game.spinnerTime / 1000) * 1000000), {circle2D:{path:_local11, startAngle:0, endAngle:360, autoRotate:true, direction:_local12, extraRevolutions:1000000}, ease:Linear.easeNone})); }; }; timeline.stop(); } override public function onFrame(_arg1:int){ if (isStarted){ return; }; if (isFirstCall){ game.spinner.addCollider(this.ball); isFirstCall = false; if (delayTime > 0){ timeToEvent = delayTime; isStarted = false; } else { isStarted = true; if (points.length > 0){ timeline.play(); }; }; }; timeToEvent = (timeToEvent - _arg1); if (((!(isStarted)) && ((timeToEvent <= 0)))){ if (points.length > 0){ timeline.play(); }; isStarted = true; }; } override public function pause(){ timeline.pause(); } } var _local1:* = TweenPlugin.activate([Circle2DPlugin]); return (_local1); }//package classes
Section 9
//EnemyShock (classes.EnemyShock) package classes { import flash.display.*; import com.greensock.*; public class EnemyShock extends Enemy { private const BG_ALPHA_MAX:Number = 0.25; private const ACTIVE_TIME:Number = 0.2; private const ANIMATION_TIME:Number = 0.5; public var flash:MovieClip; public var bg:MovieClip; var isVertical:Boolean; public function EnemyShock(_arg1:Boolean=true, _arg2:int=2000, _arg3:int=0){ addFrameScript(0, frame1); super(_arg2, _arg3); if (_arg1){ gotoAndStop(2); }; bg.alpha = 0; flash.alpha = 0; } function frame1(){ stop(); } override public function execute(){ executing = true; TweenLite.to(bg, ANIMATION_TIME, {alpha:BG_ALPHA_MAX, onComplete:animateFlash}); TweenLite.to(bg, 0.05, {alpha:0, onComplete:finaliseAnimations, delay:(ANIMATION_TIME + ACTIVE_TIME)}); } private function animateFlash(){ flash.alpha = 0.7; bg.alpha = 0.07; sm.playSound("sndShock"); flash.play(); if (game.spinner){ game.spinner.addCollider(this); }; } private function finaliseAnimations(){ if (game.spinner){ game.spinner.removeCollider(this); }; bg.alpha = 0; flash.alpha = 0; } } }//package classes
Section 10
//Game (classes.Game) package classes { import flash.display.*; import flash.events.*; import com.greensock.*; import mochi.as3.*; import flash.utils.*; import bigroom.input.*; import com.greensock.easing.*; import com.greensock.plugins.*; public class Game extends BaseMenu { const UPDATE_INTERVAL:int = 33; const OFFSET_X:int = 7; const OFFSET_Y:int = 7; var exitX:int; var previousKeyCode:uint;// = 0 public var lines:Array; var signalsCount:int; var isPaused:Boolean;// = false var spinner:Spinner; var scoreCounter:ScoreCounter; var bg:GameBackground; var timer:GameTimer; var lastKeyTime:int; var spaceIsPressed:Boolean;// = false var exitY:int; public var spinnerTime:int; var lastUpdateTime:int; public var signalsLeft:int; public var level:int; public var gameContainer:MovieClip; var lineColor:int; public var forceRestart:Boolean;// = false var keyboard:KeyPoll; var gameCanvas:Sprite; static const CELL_HEIGHT:int = 24; static const CELL_WIDTH:int = 24; static const CELLS_X:int = 28; static const CELLS_Y:int = 18; static const BONUS_TIME:int = 10; static const BONUS_SIGNAL:int = 1000; static const BONUS_CHARGED:int = 500; static const LINE_COLOR:uint = 4607771; static const LINE_WIDTH:int = 3; public function Game(_arg1:Stage=null){ var _local2:GameFrame; var _local3:GameButton; isPaused = false; previousKeyCode = 0; spaceIsPressed = false; forceRestart = false; super(); this.stageRef = _arg1; level = 0; TweenPlugin.activate([BlurFilterPlugin]); bg = new GameBackground(); bg.x = OFFSET_X; bg.y = OFFSET_Y; addChild(bg); gameCanvas = new Sprite(); gameCanvas.x = OFFSET_X; gameCanvas.y = OFFSET_Y; addChild(gameCanvas); gameContainer = new MovieClip(); gameContainer.x = OFFSET_X; gameContainer.y = OFFSET_Y; addChild(gameContainer); _local2 = new GameFrame(); _local2.name = "frame"; _local2.mouseEnabled = false; addChild(_local2); timer = new GameTimer(onTimeOut); timer.x = 66; timer.y = 415; addChild(timer); scoreCounter = new ScoreCounter(); scoreCounter.x = 123; scoreCounter.y = 414; addChild(scoreCounter); _local3 = new GameButton(new Array("btn_pause", "btn_pause2", "btn_pause3"), pauseGame, true); _local3.x = 457; _local3.y = 403; _local3.name = "btnPause"; addChild(_local3); _local3 = new GameButton(new Array("btn_skip", "btn_skip2", "btn_skip3"), skipLevel); _local3.x = 406; _local3.y = 403; _local3.name = "btnSkip"; addChild(_local3); _local3 = new GameButton(new Array("btn_sound1", "btn_sound2", "btn_sound3"), toggleSound, true); _local3.x = 511; _local3.y = 403; _local3.name = "btnSound"; if (GameData.vars.soundsEnabled){ _local3.toggleState(); }; addChild(_local3); _local3 = new GameButton(new Array("btn_moregames", "btn_moregames2", "btn_moregames3"), onMoreButton); _local3.x = 546; _local3.y = 403; _local3.name = "btnMore"; addChild(_local3); keyboard = new KeyPoll(this.stageRef); this.stageRef.focus = this; } public function lineByNode(_arg1:int, _arg2:int):int{ var _local3:int; var _local4:Boolean; var _local5:int; _local3 = 0; _local4 = false; while (((!(_local4)) && ((_local3 < lines.length)))) { _local5 = 0; while (((!(_local4)) && ((_local5 < lines[_local3].length)))) { _local4 = (((_arg1 == lines[_local3][_local5][0])) && ((_arg2 == lines[_local3][_local5][1]))); _local5++; }; _local3++; }; if (_local4){ return ((_local3 - 1)); }; return (-1); } private function onMoreButton(){ gotoLink("http://x.mochiads.com/link/0ae1d1d3c115e7de", "http://arcadeous.com/?fromElectrospinner"); } public function stopGame(_arg1:String="fail"){ _arg1 = "fail"; if (_arg1){ spinner.kill(); pauseGame(false); }; } private function finalizeLevel(){ var _local1:int; var _local2:Cookie; var _local3:int; var _local4:LevelMenu; if (getChildByName("fakeLines")){ gameCanvas.removeChild(getChildByName("fakeLines")); }; if (getChildByName("fakeLinesGlow")){ gameCanvas.removeChild(getChildByName("fakeLinesGlow")); }; if (signalsLeft == 0){ _local2 = new Cookie("arcadeous-electrospinner"); if (_local2.isExist()){ _local1 = _local2.get("levelsDone"); if ((level + 1) > _local1){ _local2.put("levelsDone", (level + 1)); }; _local2.put("score", scoreCounter.score); }; removeEventListener(Event.ENTER_FRAME, update); _local3 = gameContainer.numChildren; while (_local3--) { gameContainer.removeChildAt(_local3); }; _local4 = new LevelMenu(stageRef); _local4.levelFinished = level; unload(_local4); signalsLeft = -1; }; } public function catchSignal(_arg1:String){ var _local2:TubePopup; var _local3:Sprite; var _local4:Sprite; var _local5:int; var _local6:TimelineLite; var _local7:int; var _local8:int; var _local9:int; var _local10:Sprite; signalsLeft--; if (!getChildByName("fakeLines")){ _local3 = new Sprite(); _local3.name = "fakeLines"; _local4 = new Sprite(); _local4.name = "fakeLinesGlow"; _local3.graphics.lineStyle(LINE_WIDTH, 0xFFFFFF); _local4.graphics.lineStyle(LINE_WIDTH, 0xFFFFFF); _local5 = 0; while (_local5 < GameData.nodeThreads[level].length) { _local7 = GameData.nodeThreads[level][_local5][1]; _local8 = GameData.nodeThreads[level][_local5][0]; _local3.graphics.moveTo((_local7 * CELL_WIDTH), (_local8 * CELL_HEIGHT)); _local4.graphics.moveTo((_local7 * CELL_WIDTH), (_local8 * CELL_HEIGHT)); _local9 = 2; while (_local9 < GameData.nodeThreads[level][_local5].length) { switch (GameData.nodeThreads[level][_local5][_local9]){ case 1: _local7++; break; case 2: _local7++; _local8++; break; case 3: _local8++; break; case 4: _local7--; _local8++; break; case 5: _local7--; break; case 6: _local7--; _local8--; break; case 7: _local8--; break; case 8: _local7++; _local8--; break; }; _local3.graphics.lineTo((_local7 * CELL_WIDTH), (_local8 * CELL_HEIGHT)); _local4.graphics.lineTo((_local7 * CELL_WIDTH), (_local8 * CELL_HEIGHT)); _local9++; }; _local5++; }; _local3.alpha = 0; _local4.alpha = 0; TweenLite.to(_local4, 0, {blurFilter:{blurX:7, blurY:7}}); gameCanvas.addChild(_local4); gameCanvas.addChild(_local3); _local6 = new TimelineLite({onComplete:finalizeLevel}); _local6.appendMultiple([new TweenLite(_local3, 0.2, {alpha:0.6}), new TweenLite(_local4, 0.2, {alpha:1})], 0); _local6.appendMultiple([new TweenLite(_local3, 5, {alpha:0, ease:Quad.easeOut, delay:1}), new TweenLite(_local4, 5, {alpha:0, ease:Quad.easeOut, delay:1})], 0); }; if (!getChildByName("whiteness")){ _local10 = new Sprite(); _local10.name = "whiteness"; _local10.graphics.beginFill(0xFFFFFF); _local10.graphics.drawRect(0, 0, bg.width, bg.height); _local10.alpha = 0; _local10.blendMode = BlendMode.ADD; addChildAt(_local10, getChildIndex(getChildByName("frame"))); _local10.alpha = 0.8; TweenLite.to(_local10, 1, {alpha:0, ease:Quad.easeIn, onComplete:deleteWhiteness}); }; if (!getChildByName("tube")){ _local2 = new TubePopup(); _local2.x = 21; _local2.y = 376; _local2.name = "tube"; addChild(_local2); } else { _local2 = getChildByName("tube"); }; _local2.showProgress(exitX, exitY, signalsCount, signalsLeft); scoreCounter.addScore(BONUS_SIGNAL); if (signalsLeft == 0){ pauseGame(false); sm.stopSound("sndClock"); if (timer.time > 0){ scoreCounter.addScore((timer.time * BONUS_TIME)); timer.zeroize(); }; }; } private function onTimeOut(){ stopGame(); } public function restartGame(){ var _local1:int; forceRestart = false; gameCanvas.graphics.clear(); lines.slice(); spinner.cleanUp(); _local1 = gameContainer.numChildren; while (_local1--) { gameContainer.removeChildAt(_local1); }; (getChildByName("btnPause") as GameButton).turnOff(); playLevel(); } private function skipLevel(){ if (isPaused){ return; }; scoreCounter.addScore(int((-(scoreCounter.score) / 3))); signalsLeft = 1; catchSignal(" "); } public function playLevel(_arg1:int=-1){ var _local2:int; var _local3:Cookie; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:int; var _local10:Array; var _local11:int; var _local12:int; var _local13:int; var _local14:int; var _local15:int; var _local16:Contact; var _local17:int; var _local18:EnemyBreak; var _local19:EnemyShock; var _local20:*; var _local21:Wall; var _local22:Switcher; var _local23:Signal; if (_arg1 != -1){ level = _arg1; }; _local2 = GameData.levels[level][CELLS_Y][1]; if (GameData.levels[level][CELLS_Y].length > 3){ lineColor = GameData.levels[level][CELLS_Y][3]; } else { lineColor = LINE_COLOR; }; if (_local2){ bg.background = _local2; } else { bg.background = 2; }; signalsCount = 0; spinnerTime = (GameData.levels[level][(GameData.levels[level].length - 1)][2]) ? GameData.levels[level][(GameData.levels[level].length - 1)][2] : Spinner.DEFAULT_TIME; spinner = new Spinner(spinnerTime); spinner.setGameRef(this); _local3 = new Cookie("arcadeous-electrospinner"); if (_local3.isExist()){ _local9 = _local3.get("score"); scoreCounter.score = _local9; } else { scoreCounter.score = 0; _local3.put("score", 0); }; _local4 = GameData.levels[level][(GameData.levels[level].length - 1)][0]; timer.time = _local4; lines = new Array(); gameCanvas.graphics.lineStyle(LINE_WIDTH, lineColor); _local5 = 0; while (_local5 < GameData.nodeThreads[level].length) { _local10 = new Array(); _local11 = GameData.nodeThreads[level][_local5][1]; _local12 = GameData.nodeThreads[level][_local5][0]; _local10.push(new Array(_local12, _local11)); gameCanvas.graphics.moveTo((_local11 * CELL_WIDTH), (_local12 * CELL_HEIGHT)); _local13 = 2; while (_local13 < GameData.nodeThreads[level][_local5].length) { switch (GameData.nodeThreads[level][_local5][_local13]){ case 1: _local11++; break; case 2: _local11++; _local12++; break; case 3: _local12++; break; case 4: _local11--; _local12++; break; case 5: _local11--; break; case 6: _local11--; _local12--; break; case 7: _local12--; break; case 8: _local11++; _local12--; break; }; _local10.push(new Array(_local12, _local11)); gameCanvas.graphics.lineTo((_local11 * CELL_WIDTH), (_local12 * CELL_HEIGHT)); _local13++; }; lines.push(_local10); _local5++; }; _local8 = 0; while (_local8 < (GameData.levels[level].length - 1)) { _local14 = 0; while (_local14 < GameData.levels[level][_local8].length) { if ((GameData.levels[level][_local8][_local14] is Array)){ _local15 = GameData.levels[level][_local8][_local14][0]; } else { _local15 = GameData.levels[level][_local8][_local14]; }; switch (_local15){ case 1: case 2: case 6: case 7: case 8: case 11: case 12: if (_local15 == 12){ _local7 = 0; _local6 = 2000; if ((GameData.levels[level][_local8][_local14] is Array)){ _local7 = GameData.levels[level][_local8][_local14][1]; _local6 = GameData.levels[level][_local8][_local14][2]; }; _local16 = new Contact(_local8, _local14, _local6, _local7); _local16.type = Contact.FLIPPING; } else { _local16 = new Contact(_local8, _local14); }; _local16.y = (CELL_HEIGHT * _local8); _local16.x = (CELL_WIDTH * _local14); _local16.name = ((("contact" + _local8) + "-") + _local14); gameContainer.addChild(_local16); if (_local15 == 7){ spinner.x = (CELL_WIDTH * _local14); spinner.y = (CELL_HEIGHT * _local8); gameContainer.addChild(spinner); spinner.setCell(_local8, _local14); } else { if (_local15 == 8){ _local16.type = Contact.RECEIVER; exitX = _local16.x; exitY = _local16.y; } else { if (_local15 == 11){ _local16.type = Contact.CHARGED; } else { if (_local15 == 2){ _local16.type = Contact.PLAIN; } else { if (_local15 == 6){ _local16.type = Contact.PLAIN; _local23 = new Signal(signalsCount); _local23.y = (CELL_HEIGHT * _local8); _local23.x = (CELL_WIDTH * _local14); _local23.name = ("signal" + signalsCount); _local23.setGameRef(this); gameContainer.addChild(_local23); _local23.setLine(lineByNode(_local8, _local14)); _local23.setPoint(0); signalsCount++; }; }; }; }; }; break; case 3: _local7 = 0; _local6 = 4000; _local17 = 2; if ((GameData.levels[level][_local8][_local14] is Array)){ _local7 = GameData.levels[level][_local8][_local14][1]; _local6 = GameData.levels[level][_local8][_local14][2]; _local17 = GameData.levels[level][_local8][_local14][3]; }; _local18 = new EnemyBreak(_local17, _local6, _local7); _local18.y = (CELL_HEIGHT * _local8); _local18.x = (CELL_WIDTH * _local14); _local18.name = ((("Break" + _local8) + "-") + _local14); _local18.setGameRef(this); gameContainer.addChild(_local18); break; case 4: case 5: _local7 = ((GameData.levels[level][_local8][_local14] is Array)) ? GameData.levels[level][_local8][_local14][1] : 0; _local6 = ((GameData.levels[level][_local8][_local14] is Array)) ? GameData.levels[level][_local8][_local14][2] : 4000; _local19 = new EnemyShock((_local15 == 5), _local6, _local7); _local19.y = (CELL_HEIGHT * _local8); _local19.x = (CELL_WIDTH * _local14); _local19.name = ((("enemy" + _local8) + "-") + _local14); _local19.setGameRef(this); gameContainer.addChild(_local19); break; case 9: case 10: _local7 = ((GameData.levels[level][_local8][_local14] is Array)) ? GameData.levels[level][_local8][_local14][1] : 0; _local20 = new EnemyFlyer((_local15 == 9), _local7); _local20.y = (CELL_HEIGHT * _local8); _local20.x = (CELL_WIDTH * _local14); _local20.col = _local14; _local20.row = _local8; _local20.name = ((("flyer" + _local8) + "-") + _local14); _local20.setGameRef(this); if ((GameData.levels[level][_local8][_local14] is Array)){ _local20.addPoints(GameData.levels[level][_local8][_local14]); }; gameContainer.addChild(_local20); break; case 13: case 14: _local7 = ((GameData.levels[level][_local8][_local14] is Array)) ? GameData.levels[level][_local8][_local14][1] : 0; _local6 = ((GameData.levels[level][_local8][_local14] is Array)) ? GameData.levels[level][_local8][_local14][2] : 0; _local21 = new Wall((_local15 == 14), _local6, _local7); _local21.setGameRef(this); if ((((GameData.levels[level][_local8][_local14] is Array)) && ((GameData.levels[level][_local8][_local14].length > 3)))){ _local21.switcherName = ((("switcher" + GameData.levels[level][_local8][_local14][3]) + "-") + GameData.levels[level][_local8][_local14][4]); }; _local21.y = (CELL_HEIGHT * _local8); _local21.x = (CELL_WIDTH * _local14); _local21.name = ((("wall" + _local8) + "-") + _local14); gameContainer.addChild(_local21); break; case 15: _local22 = new Switcher(); _local22.y = (CELL_HEIGHT * _local8); _local22.x = (CELL_WIDTH * _local14); _local22.name = ((("switcher" + _local8) + "-") + _local14); gameContainer.addChild(_local22); break; }; _local14++; }; isPaused = false; _local8++; }; signalsLeft = signalsCount; gameContainer.setChildIndex(spinner, (gameContainer.numChildren - 1)); spinner.enabled = true; lastUpdateTime = getTimer(); lastKeyTime = lastUpdateTime; _local5 = 0; while (_local5 < signalsCount) { (gameContainer.getChildByName(("signal" + _local5)) as Signal).enabled = true; _local5++; }; addEventListener(Event.ENTER_FRAME, update, false, 0, true); } public function pauseGame(_arg1:Boolean=true){ var _local2:SmallPanel; var _local3:int; var _local4:DisplayObject; _local2 = getChildByName("pausePanel"); if (!isPaused){ if (_local2){ removeChild(_local2); }; if (_arg1){ _local2 = new SmallPanel(SmallPanel.PAUSE, 640, 440); _local2.name = "pausePanel"; _local2.x = gameContainer.x; _local2.y = gameContainer.y; addChildAt(_local2, getChildIndex(getChildByName("frame"))); _local2.display(); }; isPaused = true; removeEventListener(Event.ENTER_FRAME, update); timer.stopTimer(); _local3 = gameContainer.numChildren; while (_local3--) { _local4 = gameContainer.getChildAt(_local3); if ((_local4 is GameObject)){ (_local4 as GameObject).pause(); }; }; } else { _local2 = getChildByName("pausePanel"); if (_local2){ _local2.hide(onPauseHidden); }; }; } private function deleteWhiteness(){ if (getChildByName("whiteness")){ removeChild(getChildByName("whiteness")); }; } private function update(_arg1:Event):void{ var _local2:int; var _local3:int; var _local4:GameObject; _local2 = gameContainer.numChildren; _local3 = (getTimer() - lastUpdateTime); if (_local3 > 100){ lastUpdateTime = getTimer(); return; }; while (_local2--) { _local4 = gameContainer.getChildAt(_local2); if ((_local4 is GameObject)){ _local4.onFrame(_local3); }; }; lastUpdateTime = getTimer(); if ((getTimer() - lastKeyTime) > 100){ if (keyboard.isDown(KeyPoll.DOWN)){ spinner.speedDown(); } else { if (keyboard.isDown(KeyPoll.UP)){ spinner.speedUp(); }; }; lastKeyTime = getTimer(); }; if (spinner.active){ if (keyboard.isUp(KeyPoll.RIGHT, KeyPoll.LEFT)){ spinner.deactivate(); } else { spinner.activate(keyboard.isUp(KeyPoll.RIGHT)); }; }; if (keyboard.keyCode != previousKeyCode){ timer.startTimer(); previousKeyCode = keyboard.keyCode; if (keyboard.isDown(KeyPoll.RIGHT)){ spinner.activate(); }; if (keyboard.isDown(KeyPoll.LEFT)){ spinner.activate(true); }; if (((!(spaceIsPressed)) && (keyboard.isDown(KeyPoll.SPACE)))){ spinner.reverse(); spaceIsPressed = true; } else { spaceIsPressed = keyboard.isDown(KeyPoll.SPACE); }; }; } private function onPauseHidden(){ var _local1:*; var _local2:int; var _local3:DisplayObject; _local1 = getChildByName("pausePanel"); if (_local1){ removeChild(_local1); }; isPaused = false; if (forceRestart){ restartGame(); } else { _local2 = gameContainer.numChildren; while (_local2--) { _local3 = gameContainer.getChildAt(_local2); if ((_local3 is GameObject)){ (_local3 as GameObject).resume(); }; }; lastUpdateTime = getTimer(); addEventListener(Event.ENTER_FRAME, update, false, 0, true); timer.startTimer(); }; } private function toggleSound(){ GameData.vars.soundsEnabled = !(GameData.vars.soundsEnabled); } } }//package classes
Section 11
//GameBackground (classes.GameBackground) package classes { import flash.display.*; public class GameBackground extends MovieClip { public function GameBackground(){ addFrameScript(0, frame1); super(); gotoAndStop(1); } public function get background():int{ return (currentFrame); } public function set background(_arg1:int):void{ if (_arg1 > this.framesLoaded){ _arg1 = framesLoaded; }; gotoAndStop(_arg1); } function frame1(){ stop(); } } }//package classes
Section 12
//GameButton (classes.GameButton) package classes { import com.reintroducing.sound.*; import flash.display.*; import flash.events.*; import flash.utils.*; public dynamic class GameButton extends MovieClip { private var imgCount:int; public var isToggle:Boolean; var sm:SoundManager; public var functionToPerform:Function; public var toggled:int;// = 1 public function GameButton(_arg1:Array, _arg2:Function=null, _arg3:Boolean=false):void{ var _local4:int; var _local5:Class; var _local6:Bitmap; toggled = 1; super(); sm = SoundManager.getInstance(); gotoAndStop(1); isToggle = _arg3; functionToPerform = _arg2; buttonMode = true; imgCount = _arg1.length; _local4 = 0; while (_local4 < imgCount) { _local5 = (getDefinitionByName(_arg1[_local4]) as Class); _local6 = new Bitmap(new _local5(0, 0)); _local6.name = ("img" + _local4); addChild(_local6); if (_local4 > 0){ _local6.alpha = 0; }; _local4++; }; addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true); addEventListener(MouseEvent.MOUSE_OUT, mouseOut, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, mouseDown, false, 0, true); addEventListener(MouseEvent.MOUSE_UP, mouseUp, false, 0, true); } private function mouseOver(_arg1:MouseEvent):void{ showImg(1); } public function turnOn(){ if (isToggle){ toggled = -1; showImg(2); }; } private function mouseUp(_arg1:MouseEvent):void{ if (isToggle){ if (toggled > 0){ showImg(0); } else { showImg(2); }; } else { showImg(0); if (functionToPerform){ functionToPerform(); }; }; } private function mouseOut(_arg1:MouseEvent):void{ if (isToggle){ if (toggled > 0){ showImg(0); } else { showImg(2); }; } else { showImg(0); }; } private function showImg(_arg1:int){ var _local2:int; var _local3:*; _local2 = 0; while (_local2 < imgCount) { _local3 = getChildByName(("img" + _local2)); if (_local2 != _arg1){ _local3.alpha = 0; } else { _local3.alpha = 1; }; _local2++; }; } public function toggleState(){ if (isToggle){ toggled = (toggled * -1); if (toggled > 0){ showImg(0); } else { showImg(2); }; }; } public function turnOff(){ if (isToggle){ toggled = 1; showImg(0); }; } private function mouseDown(_arg1:MouseEvent):void{ if (!(parent is Preloader)){ if (GameData.vars.soundsEnabled){ sm.playSound("sndButton", 0.5); }; }; if (isToggle){ functionToPerform(); toggled = (toggled * -1); if (toggled > 0){ showImg(0); } else { showImg(2); }; } else { showImg(2); }; } } }//package classes
Section 13
//GameData (classes.GameData) package classes { public class GameData { public static var nodeThreads:Array = Array([[4, 7, 2, 3], [8, 18, 4], [12, 7, 8, 7]], [[5, 6, 1, 2], [7, 9, 2, 1, 1, 1, 1, 1, 1, 8], [7, 11, 1, 1, 1, 1], [9, 11, 1, 1, 1, 1], [9, 16, 2], [10, 9, 8], [10, 12, 4, 3], [12, 7, 7, 8]], [[4, 5, 2, 3], [10, 8, 4, 3], [12, 21, 6, 7]], [[2, 7, 7, 7], [2, 8, 7, 7], [2, 9, 7, 7], [2, 10, 7, 7], [2, 11, 7, 7], [2, 12, 7, 7], [2, 13, 7, 7], [2, 14, 7, 7], [2, 22, 7, 7], [2, 23, 7, 7], [2, 24, 7, 7], [4, 24, 1, 1], [13, 5, 7, 7, 7, 7, 7, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [13, 23, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 7, 7, 7, 5, 5, 5, 5], [13, 25, 5, 5], [14, 2, 8, 8], [15, 5, 7, 7]], [[0, 5, 3, 3, 3, 3, 3], [5, 3, 7, 7, 7, 7, 7], [5, 7, 7, 7, 7, 7, 7], [5, 9, 7, 7, 7, 7, 7], [5, 17, 7, 7, 7, 7, 7], [5, 19, 7, 7, 7, 7, 7], [5, 21, 7, 7, 7, 7, 7], [5, 23, 7, 7, 7, 7, 7], [6, 8, 3, 3, 3, 3], [6, 18, 3, 3, 3, 3], [6, 24, 8, 1], [12, 0, 1, 1, 1, 1], [12, 26, 5, 5, 5, 5], [15, 1, 3, 3], [15, 2, 3, 3], [15, 11, 3, 3], [15, 12, 3, 3], [15, 13, 3, 3], [15, 14, 3, 3], [15, 15, 3, 3], [15, 23, 3, 3], [15, 24, 3, 3], [15, 25, 3, 3]], [[2, 4, 7, 7], [2, 5, 7, 7], [2, 9, 1], [2, 21, 7, 7], [2, 22, 7, 7], [2, 23, 7, 7], [2, 24, 7, 7], [3, 2, 1, 2], [3, 4, 6, 5, 5, 5], [3, 7, 7], [3, 8, 7, 7, 7], [3, 13, 3, 3, 3, 3], [3, 18, 7], [4, 2, 1, 2], [4, 18, 6, 7, 7, 7], [4, 19, 1, 1, 1], [4, 23, 1, 1, 1], [5, 2, 5, 5], [5, 9, 3, 3], [5, 11, 7, 7, 7, 7, 7], [5, 15, 7, 7, 7, 7, 7], [5, 17, 3, 3], [5, 19, 1, 2], [5, 22, 3, 3, 3], [5, 23, 3, 3], [6, 2, 5, 5], [6, 6, 7, 8], [7, 2, 5, 5], [7, 5, 7, 7, 8], [7, 11, 3, 3], [7, 15, 3, 3], [7, 19, 3, 3], [9, 3, 7, 8], [9, 7, 7, 7], [10, 24, 3, 3, 4], [11, 3, 3, 3, 3, 3], [11, 9, 7, 7], [11, 13, 3, 3], [11, 17, 7, 7], [11, 21, 8], [11, 23, 3, 4, 5, 5], [12, 4, 1, 2], [12, 7, 3, 2], [12, 8, 3, 2], [12, 9, 1], [13, 4, 3, 3, 3, 3], [13, 11, 4, 3, 3, 3], [13, 15, 2, 3, 3, 3], [13, 17, 8], [14, 6, 3, 3, 3], [14, 18, 8], [15, 23, 1, 1, 1]], [[3, 12, 1], [4, 4, 1, 1, 1, 1, 1, 8, 1], [4, 10, 1], [4, 12, 1], [5, 6, 1, 1, 1, 1, 1, 1, 1, 1, 8], [6, 1, 1, 1, 1], [6, 22, 1, 1, 1, 1], [7, 7, 1, 8, 1], [7, 22, 1, 1, 1, 1], [8, 22, 1, 1, 1, 1], [9, 7, 1, 2, 1], [9, 22, 1, 1, 1, 1], [10, 1, 1, 1, 1], [10, 22, 1, 1, 1, 1], [11, 6, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 7], [12, 7, 2, 1, 1, 1, 1], [12, 8, 1, 1], [12, 11, 1]], [[0, 13, 3, 3], [2, 23, 2, 1, 1], [3, 16, 1, 8, 7, 7], [5, 8, 1, 1, 1], [6, 15, 8, 1, 1, 1, 1, 8], [6, 17, 1, 1, 1, 1], [7, 10, 1, 1, 8, 8], [8, 3, 8, 1, 1, 1, 1, 8], [8, 5, 1, 1, 1, 1], [8, 11, 1, 1, 1, 1], [8, 17, 1, 1, 1, 1], [10, 9, 8, 1, 1, 1, 1, 1, 1, 2], [10, 11, 1, 1, 1, 1], [12, 1, 2, 2], [12, 3, 2, 1, 1, 1, 1, 8], [12, 5, 8, 1, 1, 1, 1, 2], [12, 15, 8, 1, 1, 1, 1, 8], [12, 25, 4, 4], [13, 12, 1, 1], [13, 20, 1, 8, 7]], [[0, 4, 3, 3], [0, 18, 3, 3], [2, 10, 7, 7], [2, 12, 7, 7], [4, 4, 2, 1, 1, 1, 1, 1, 1, 2], [4, 10, 8, 7, 7, 7], [5, 14, 8, 8, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1], [5, 15, 8, 1, 1], [6, 2, 5, 5], [6, 4, 6, 5, 5, 5], [6, 6, 4, 5, 5, 5, 5, 5], [6, 15, 1, 1, 1], [6, 20, 8, 1, 1], [7, 9, 1, 1, 1, 1, 2], [8, 2, 5, 5], [8, 4, 4, 5, 5, 5], [8, 6, 8, 8, 1, 1], [8, 24, 3, 3, 3, 3, 2, 1], [9, 9, 1, 1, 1, 1, 1, 1, 8], [10, 4, 8, 1, 1, 8], [10, 6, 1, 1, 1, 1], [10, 13, 1, 1, 1, 1, 8, 1], [11, 13, 1, 1, 1, 1, 8], [11, 19, 1, 1, 8], [12, 4, 8, 1, 1, 1, 1, 1, 1, 8], [12, 18, 4, 5, 5, 5, 5, 4], [12, 20, 2, 2, 1, 1, 1, 1], [16, 10, 7, 7]], [[11, 13, 7, 7, 8], [8, 24, 2, 1]], [[3, 11, 7, 7, 7], [3, 13, 7, 7, 7], [3, 15, 7, 7, 7], [5, 2, 7, 7, 8], [5, 9, 6, 7, 8, 7, 7], [5, 10, 7, 7, 7, 7, 7], [5, 12, 7, 7, 7, 7, 7], [5, 14, 7, 7, 7, 7, 7], [5, 16, 7, 7, 7, 7, 7], [5, 17, 8, 7, 6, 7, 7], [5, 24, 7, 7, 6], [6, 2, 5, 5], [6, 8, 5, 5, 5, 5, 4], [6, 18, 1, 1, 1, 1, 2], [6, 24, 1, 1], [7, 9, 5, 5, 5, 5, 5, 5, 5, 5, 5], [7, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [8, 2, 5, 5], [8, 13, 2], [8, 24, 1, 1], [9, 9, 5, 5, 5, 5, 5, 5, 5, 5, 5], [9, 16, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [10, 2, 5, 5], [10, 8, 5, 5, 5, 5, 6], [10, 18, 1, 1, 1, 1, 8], [10, 24, 1, 1], [11, 2, 3, 3, 2], [11, 9, 4, 3, 2, 3, 3], [11, 10, 3, 3, 3, 3, 3], [11, 12, 3, 3, 3, 3, 3], [11, 14, 3, 3, 3, 3, 3], [11, 16, 3, 3, 3, 3, 3], [11, 17, 2, 3, 4, 3, 3], [11, 24, 3, 3, 4], [13, 11, 3, 3, 3], [13, 13, 3, 3, 3], [13, 15, 3, 3, 3]], [[0, 0, 2, 2], [0, 26, 4, 4], [2, 4, 2, 3, 3, 3, 3], [2, 6, 2, 3, 3, 3], [3, 9, 3, 3, 3, 4, 5], [3, 15, 3, 3, 3, 2, 1], [4, 2, 2, 3, 3, 2, 1, 1], [4, 4, 3, 3, 3], [4, 6, 3, 3, 3], [4, 16, 2, 1, 1, 1, 1, 2], [4, 18, 1, 2, 2], [4, 20, 1, 2], [4, 24, 4, 3, 3, 4, 5, 5, 5, 5], [6, 16, 1, 1, 1], [7, 6, 1], [7, 17, 1, 1], [8, 12, 1, 1], [9, 6, 1], [9, 19, 5, 5], [10, 16, 1, 1, 1], [12, 2, 8, 7, 7, 8, 1, 1], [12, 4, 7, 7, 7], [12, 6, 7, 7, 7], [12, 16, 8, 1, 1, 1, 1, 8], [12, 18, 1, 8, 8], [12, 20, 1, 8], [12, 24, 6, 7, 7, 6, 5, 5, 5, 5], [13, 9, 7, 7, 7, 6, 5], [13, 15, 7, 7, 7, 8, 1], [14, 4, 8, 7, 7, 7, 7], [14, 6, 8, 7, 7, 7], [16, 0, 8, 8], [16, 26, 6, 6]], [[4, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [5, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [6, 0, 1, 1, 1, 1], [6, 18, 1, 1, 1, 1, 1, 1, 1, 1], [7, 0, 1, 1, 1, 1, 1, 1], [7, 18, 1, 1, 1, 1, 1, 1, 1, 1], [8, 0, 1, 1, 1, 1, 1, 1], [8, 18, 1, 1, 1, 1, 1, 1, 1, 1], [9, 0, 1, 1, 1, 1, 1, 1], [9, 18, 1, 1, 1, 1, 1, 1, 1, 1], [10, 0, 1, 1, 1, 1, 1, 1], [10, 18, 1, 1, 1, 1, 1, 1, 1, 1], [11, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [12, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], [[2, 22, 5, 4], [5, 8, 1, 1], [5, 12, 1, 1], [5, 16, 1, 1], [5, 18, 8], [6, 7, 8], [7, 8, 1, 1], [7, 10, 3, 3], [7, 12, 1, 1], [7, 14, 3, 3], [7, 16, 1, 1], [7, 18, 8], [8, 7, 8], [9, 10, 1, 1], [9, 12, 7, 7], [9, 14, 1, 1], [9, 16, 7, 7], [9, 18, 8], [10, 7, 8], [11, 8, 1, 1], [11, 12, 1, 1], [11, 16, 1, 1], [11, 18, 8], [12, 7, 8], [13, 6, 4, 5], [15, 21, 7, 6]], [[1, 6, 3, 3, 3], [4, 21, 5, 5, 5], [12, 3, 1, 1, 1], [12, 18, 3, 3, 3, 3, 3]]); public static var vars:Object = {}; public static var levels:Array = Array([[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 6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, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 11, 0, 11, 0, 0, 0, 0, 0, [12, 500, 4000], 0, [12, 2500, 4000], 0, 0, 0, 0, 0, [12, 600, 4000], 0, [12, 2600, 4000], 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, [9, 0, 1, 1, 5, 5], 11, 0, 11, 0, 11, 0, 0, 0, 1, 0, 11, 0, 11, 0, 0, 0, 11, 0, 11, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [180, 9, 2700]], [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 3, 0, 0, [13, 5000, 3500], 0, [13, 4500, 3500], 0, [13, 4000, 3500], 0, [13, 3500, 3500], 0, 0, 0, [13, 3500, 3500], 0, [13, 4000, 3500], 0, [13, 4500, 3500], 0, [13, 5000, 3500], 0, 0, 0, 0, 0], [0, 0, 11, 0, 11, [14, 5500, 3500], 1, 0, 1, 0, 1, 0, 1, [14, 3000, 3500], 0, [14, 3000, 3500], 1, 0, 1, 0, 1, 0, 1, [14, 5500, 3500], 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [13, 0, 7000], 0, [13, 0, 7000], 0, [13, 0, 7000], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 11, 0, 11, [14, 6000, 3500], 1, [9, 0, 1], 1, 0, 1, [14, 0, 7000], 1, 0, 11, 0, 1, [14, 0, 7000], 1, [9, 0, 1], 1, 0, 1, [14, 6000, 3500], 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, [14, 0, 3500], 1, 0, 1, 0, 1, [14, 0, 7000], 1, 0, 11, 0, 1, [14, 0, 7000], 1, 0, 1, 0, 1, [14, 6500, 3500], 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, [13, 0, 3500], 0, [13, 500, 3500], 0, [13, 1000, 3500], 0, 0, 0, 0, 0, 0, 0, [13, 1000, 3500], 0, [13, 500, 3500], 0, [13, 0, 3500], 0, 0, 0, 0, 0], [0, 0, 7, 0, 1, 0, 1, 0, 1, 0, 1, [14, 0, 7000], 11, 0, 11, 0, 11, [14, 0, 7000], 1, 0, 1, 0, 1, 0, 8, 0, 0, 0], [0, 0, 0, 0, 0, 0, [13, 0, 3500], 0, [13, 500, 3500], 0, [13, 1000, 3500], 0, 0, 0, 0, 0, 0, 0, [13, 1000, 3500], 0, [13, 500, 3500], 0, [13, 0, 3500], 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, [14, 0, 3500], 1, 0, 1, 0, 1, [14, 0, 7000], 1, 0, 11, 0, 1, [14, 0, 7000], 1, 0, 1, 0, 1, [14, 6500, 3500], 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, [10, 0, 1], 11, 0, 11, [14, 6000, 3500], 1, [9, 0, 1], 1, 0, 1, [14, 0, 7000], 1, 0, 11, 0, 1, [14, 0, 7000], 1, [9, 0, 1], 1, 0, 1, [14, 6000, 3500], 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, [13, 0, 7000], 0, [13, 0, 7000], 0, [13, 0, 7000], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 11, [10, 1200, 5], 11, [14, 5500, 3500], 1, 0, 1, 0, 1, 0, 1, [14, 3000, 3500], 0, [14, 3000, 3500], 1, 0, 1, 0, 1, 0, 1, [14, 5500, 3500], 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, [13, 5000, 3500], 0, [13, 4500, 3500], 0, [13, 4000, 3500], 0, [13, 3500, 3500], 0, 0, 0, [13, 3500, 3500], 0, [13, 4000, 3500], 0, [13, 4500, 3500], 0, [13, 5000, 3500], 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [150, 10, 2500, 7299110]], [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, [3, 0, 8000, 10], 0, [3, 2000, 8000, 10], 0, 0, 0, [3, 4000, 8000, 10], 0, [3, 6000, 8000, 10], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 11, 1, 11, 1, 11, 1,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 0, 0], [6, 0, 0, 0, 0, 0, 0, 0, 0, [14, 0, 0, 9, 7], 0, 0, 0, 0, 0, [14, 0, 0, 9, 17], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [280, 12, 2500, 8097103]], [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [6, 0, 0, 0, 1, 0, 7, 0, 1, [4, 0, 4000], 1, [4, 1000, 4000], 1, [4, 2000, 14000], 1, [4, 3000, 4000], 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0, 2, 0, [5, 0, 9000], 0, [5, 3000, 5000], 0, [5, 3000, 16000], 0, [5, 4500, 12000], 0, [5, 6500, 9500], 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 0, 0, 0, 0, 0, 2, 0, 11, [4, 1500, 6000], 11, [4, 3500, 9000], 11, [4, 4500, 11000], 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, [10, 1800, 1], 11, [9, 1500, 1], 1, 0, 1, 0, 7, 0, 1, [9, 600, 1], 1, [10, 600, 1], 11, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 1, [9, 1400, 1], 1, 0, 1, [9, 900, 1], 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 6, 0, 0, 1, 0, 1, [10, 1500, 5], 1, 0, 11, 0, 1, 0, 1, [10, 1200, 5], 8, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [120, 15, 2500, 0x6A6A6A]]); } }//package classes
Section 14
//GameObject (classes.GameObject) package classes { import flash.display.*; public class GameObject extends MovieClip { private var _objType:int; static const TYPE_PASSIVE:int = 0; static const TYPE_ENEMY:int = 3; static const TYPE_CONTACT:int = 1; static const TYPE_SIGNAL:int = 4; static const TYPE_SPINNER:int = 5; static const TYPE_DYNAMIC_CONTACT:int = 2; public function resume(){ } public function firstTimeInit(){ } public function set objType(_arg1:int){ _objType = _arg1; } public function onFrame(_arg1:int){ } public function get objType(){ return (_objType); } public function pause(){ } } }//package classes
Section 15
//GameTimer (classes.GameTimer) package classes { import com.reintroducing.sound.*; import flash.display.*; import flash.events.*; import flash.utils.*; import flash.text.*; public class GameTimer extends MovieClip { private var isStarted:Boolean; private var onTimeIsOut:Function; var secondsLeft:int; var sm:SoundManager; var lastUpdateTime:int; public var seconds:TextField; var minutesLeft:int; public var minutes:TextField; public function GameTimer(_arg1:Function){ minutes.text = "00"; seconds.text = "00"; onTimeIsOut = _arg1; isStarted = false; sm = SoundManager.getInstance(); } public function startTimer(){ if (isStarted){ return; }; isStarted = true; lastUpdateTime = getTimer(); addEventListener(Event.ENTER_FRAME, onFrame, false, 0, true); } private function decreaseTimer(_arg1:Event):void{ if (time == 0){ removeEventListener(Event.ENTER_FRAME, decreaseTimer); } else { if ((secondsLeft > 10)){ secondsLeft = (secondsLeft - 10); } else { secondsLeft--; }; if (secondsLeft < 0){ secondsLeft = 59; minutesLeft--; }; minutes.text = ((minutesLeft < 10)) ? ("0" + minutesLeft) : minutesLeft; seconds.text = ((secondsLeft < 10)) ? ("0" + secondsLeft) : secondsLeft; }; } public function stopTimer(){ if (isStarted){ removeEventListener(Event.ENTER_FRAME, onFrame); isStarted = false; }; } public function set time(_arg1:int):void{ secondsLeft = (_arg1 % 60); minutesLeft = Math.floor((_arg1 / 60)); minutes.text = ((minutesLeft < 10)) ? ("0" + minutesLeft) : minutesLeft; seconds.text = ((secondsLeft < 10)) ? ("0" + secondsLeft) : secondsLeft; } public function zeroize(){ stopTimer(); addEventListener(Event.ENTER_FRAME, decreaseTimer, false, 0, true); } public function get time(){ return (((minutesLeft * 60) + secondsLeft)); } function onFrame(_arg1:Event):void{ var _local2:int; _local2 = (getTimer() - lastUpdateTime); if (_local2 >= 1000){ lastUpdateTime = getTimer(); secondsLeft--; if ((((minutesLeft == 0)) && ((secondsLeft == 10)))){ sm.playSound("sndClock"); }; if (secondsLeft < 0){ secondsLeft = 59; minutesLeft--; }; if (minutesLeft < 0){ onTimeIsOut(); } else { minutes.text = ((minutesLeft < 10)) ? ("0" + minutesLeft) : minutesLeft; seconds.text = ((secondsLeft < 10)) ? ("0" + secondsLeft) : secondsLeft; }; }; } } }//package classes
Section 16
//HighscoresMenu (classes.HighscoresMenu) package classes { import flash.display.*; import mochi.as3.*; public class HighscoresMenu extends BaseMenu { public function HighscoresMenu(_arg1:Stage=null){ var cookie:Cookie; var scoreEarned:int; var stageRef = _arg1; super(); this.stageRef = stageRef; MochiServices.setContainer(this); cookie = new Cookie("arcadeous-electrospinner"); if (cookie.isExist()){ scoreEarned = cookie.get("score"); MochiScores.showLeaderboard({score:scoreEarned, res:"640x440", onClose:returnMainMenu, onError:function ():void{ trace("error loading leaderboard!"); }}); } else { MochiScores.showLeaderboard({res:"640x440", onClose:returnMainMenu, onError:function ():void{ trace("error loading leaderboard!"); }}); }; } private function returnMainMenu(){ MochiScores.closeLeaderboard(); unload(new MainMenu(stageRef)); } override public function onLoaded(){ } } }//package classes
Section 17
//InstructionsMenu (classes.InstructionsMenu) package classes { import flash.display.*; import com.greensock.*; import com.greensock.easing.*; public class InstructionsMenu extends BaseMenu { public var mcSpark:MovieClip; public function InstructionsMenu(_arg1:Stage=null){ var _local2:GameButton; super(); this.stageRef = _arg1; _local2 = new GameButton(new Array("button_back", "button_back2", "button_back3"), returnMainMenu); _local2.x = 265; _local2.y = 355; addChild(_local2); } private function returnMainMenu(){ unload(new MainMenu(stageRef)); } } }//package classes
Section 18
//LevelButton (classes.LevelButton) package classes { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.text.*; public class LevelButton extends MovieClip { private var imgCount:int; private var label:TextField; public var functionToPerform:Function; private var level:int; public var toggled:int;// = 1 private var isDone:Boolean; private var isLocked:Boolean; public function LevelButton(_arg1:Array, _arg2:Function=null, _arg3:Boolean=false):void{ var _local4:int; var _local5:TextFormat; var _local6:Font; var _local7:Class; var _local8:Bitmap; toggled = 1; super(); gotoAndStop(1); isLocked = false; isDone = false; functionToPerform = _arg2; buttonMode = true; imgCount = _arg1.length; _local4 = 0; while (_local4 < imgCount) { _local7 = (getDefinitionByName(_arg1[_local4]) as Class); _local8 = new Bitmap(new _local7(0, 0)); _local8.name = ("img" + _local4); addChild(_local8); if (_local4 > 0){ _local8.alpha = 0; }; _local4++; }; addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true); addEventListener(MouseEvent.MOUSE_OUT, mouseOut, false, 0, true); addEventListener(MouseEvent.MOUSE_DOWN, mouseDown, false, 0, true); addEventListener(MouseEvent.MOUSE_UP, mouseUp, false, 0, true); label = new TextField(); label.mouseEnabled = false; label.selectable = false; label.multiline = false; label.antiAliasType = AntiAliasType.ADVANCED; label.autoSize = TextFieldAutoSize.CENTER; label.embedFonts = true; label.x = 16; label.y = 3; label.width = 30; _local5 = new TextFormat(); _local6 = new CourierB(); _local5.font = _local6.fontName; _local5.color = 4075287; _local5.size = 22; _local5.bold = true; label.defaultTextFormat = _local5; addChild(label); } public function set done(_arg1:Boolean):void{ isDone = _arg1; if (isDone){ showImg(1); } else { showImg(0); }; } public function set locked(_arg1:Boolean):void{ var _local2:Class; var _local3:Bitmap; isLocked = _arg1; if (isLocked){ label.text = ""; _local2 = (getDefinitionByName("locked_level") as Class); _local3 = new Bitmap(new _local2(0, 0)); _local3.name = "lock"; _local3.x = 25; _local3.y = 9; addChild(_local3); } else { if (getChildByName("lock")){ removeChild(getChildByName("lock")); }; label.text = (level + 1); }; } private function mouseOver(_arg1:MouseEvent):void{ if (isLocked){ return; }; if (isDone){ showImg(1); } else { showImg(2); }; } private function mouseUp(_arg1:MouseEvent):void{ if (isLocked){ return; }; functionToPerform(level); } private function mouseOut(_arg1:MouseEvent):void{ if (isLocked){ return; }; if (isDone){ showImg(2); } else { showImg(0); }; } public function setLevel(_arg1:int){ level = _arg1; label.text = (level + 1); } private function showImg(_arg1:int){ var _local2:int; var _local3:*; _local2 = 0; while (_local2 < imgCount) { _local3 = getChildByName(("img" + _local2)); if (_local2 != _arg1){ _local3.alpha = 0; } else { _local3.alpha = 1; }; _local2++; }; if (_arg1 > 0){ label.textColor = 11570518; } else { label.textColor = 4075287; }; } private function mouseDown(_arg1:MouseEvent):void{ if (isLocked){ return; }; if (isDone){ showImg(0); } else { showImg(2); }; } } }//package classes
Section 19
//LevelMenu (classes.LevelMenu) package classes { import flash.display.*; import com.greensock.*; import mochi.as3.*; import com.greensock.easing.*; import com.greensock.plugins.*; public dynamic class LevelMenu extends BaseMenu { private const BUTTONS_IN_ROW:int = 5; private var game:Game; private var levelToRun:int; public var message:MovieClip; public var levelFinished:int;// = -1 var levelsDone:int; public var scheme:MovieClip; private var isGameFinished:Boolean; public function LevelMenu(_arg1:Stage=null){ var _local2:GameButton; var _local3:GameButton; var _local4:Cookie; var _local5:int; var _local6:int; var _local7:Boolean; var _local8:LevelButton; var _local9:int; var _local10:int; levelFinished = -1; super(); this.stageRef = _arg1; if (GameData.vars.soundsEnabled){ sm.fadeSound("sndMenu", 0, 3); }; levelFinished = -1; _local2 = new GameButton(new Array("button_back", "button_back2", "button_back3"), returnMainMenu); _local2.x = 265; _local2.y = 355; addChild(_local2); _local3 = new GameButton(new Array("btn_pas", "btn_pas2", "btn_pas2"), onPASButton); _local3.name = "btnPAS"; _local3.x = 63; _local3.y = 414; addChild(_local3); _local3 = new GameButton(new Array("btn_arcadeous", "btn_arcadeous2", "btn_arcadeous2"), onMoreButton); _local3.x = 491; _local3.y = 414; _local3.name = "btnArcadeous"; addChild(_local3); message.stop(); _local4 = new Cookie("arcadeous-electrospinner"); isGameFinished = false; if (_local4.isExist()){ levelsDone = _local4.get("levelsDone"); if (_local4.isKeyExist("gameFinished")){ isGameFinished = _local4.get("gameFinished"); }; } else { levelsDone = 0; _local4.put("levelsDone", 0); }; _local5 = GameData.levels.length; _local6 = 0; while (_local6 < _local5) { _local7 = (_local6 < levelsDone); _local8 = new LevelButton(new Array("button_level", "button_level_complete", "button_level_complete"), runLevel, _local7); _local8.name = ("btn" + _local6); _local8.done = _local7; _local8.setLevel(_local6); if (_local6 > levelsDone){ _local8.locked = true; }; _local9 = (_local6 / BUTTONS_IN_ROW); _local10 = (_local6 % BUTTONS_IN_ROW); _local8.x = (148 + (_local10 * 70)); _local8.y = (165 + (_local9 * 35)); addChild(_local8); _local6++; }; } private function returnMainMenu(){ unload(new MainMenu(stageRef)); } private function playGameOverSound(){ sm.playSound("sndLeveldone"); } private function onAdsFinished():void{ if (parent.getChildByName("adHolder")){ parent.removeChild(parent.getChildByName("adHolder")); }; super.remove(); game.playLevel(levelToRun); } private function onMoreButton(){ gotoLink("http://x.mochiads.com/link/07bbde27da945a6b", "http://arcadeous.com/?fromElectrospinner"); } private function playButtonSound(){ sm.playSound("sndLevelbutton"); } private function onPASButton(){ gotoLink("http://x.mochiads.com/link/9cf23b35bb1d4ef4", "http://proarcadescript.com/?fromElectrospinner"); } private function changeMessage(){ message.play(); } override public function remove():void{ var _local1:MovieClip; trace(((("levelFinished : " + levelFinished) + ", next : ") + loadNext)); if ((((levelFinished > 1)) && ((loadNext is Game)))){ trace(" Show ADS ++++++++++++++++"); _local1 = new MovieClip(); _local1.name = "adHolder"; parent.addChild(_local1); MochiAd.showInterLevelAd({clip:_local1, ad_finished:onAdsFinished, id:"cefc988031c0d916", res:"640x440", no_bg:false}); } else { trace(" no ADS --------------------"); super.remove(); if ((loadNext is Game)){ game.playLevel(levelToRun); }; }; } public function runLevel(_arg1:int){ game = new Game(stageRef); levelToRun = _arg1; unload(game); } override public function onLoaded(){ var _local1:LevelButton; var _local2:ParticleEffect; var _local3:int; var _local4:TimelineLite; var _local5:int; var _local6:Cookie; if (levelFinished > -1){ _local1 = (getChildByName(("btn" + levelFinished)) as LevelButton); _local2 = new ParticleEffect(); _local2.mouseEnabled = false; _local2.x = (_local1.x + (_local1.width / 2)); _local2.y = (_local1.y + (_local1.height / 2)); addChild(_local2); _local2.fireworks(9, 0.3, 40, 100, 60, 20, 6); if (GameData.vars.soundsEnabled){ sm.playSound("sndFirework", 0.4); }; _local1.done = true; MochiEvents.trackEvent("level finished", (levelFinished + 1)); _local3 = GameData.levels.length; if ((levelFinished == (_local3 - 1))){ _local4 = new TimelineLite({delay:7}); _local5 = 0; while (_local5 < _local3) { _local1 = getChildByName(("btn" + _local5)); _local4.append(new TweenMax(_local1, 0.2, {onStart:playButtonSound, colorTransform:{brightness:2}, glowFilter:{color:0xFFFFFF, alpha:1, blurX:20, blurY:20}})); _local5++; }; _local6 = new Cookie("arcadeous-electrospinner"); _local6.put("gameFinished", true); TweenMax.to(scheme, 3, {onStart:playGameOverSound, colorTransform:{brightness:2}, glowFilter:{color:0xFFFFFF, alpha:1, blurX:10, blurY:10}, delay:4}); TweenMax.to(scheme, 3, {onComplete:changeMessage, glowFilter:{color:0xFFFFFF, alpha:1, blurX:0, blurY:0}, delay:7}); }; }; } } var _local1:* = TweenPlugin.activate([ColorTransformPlugin, GlowFilterPlugin, TintPlugin]); return (_local1); }//package classes
Section 20
//MainMenu (classes.MainMenu) package classes { import flash.display.*; import com.greensock.*; import mochi.as3.*; import com.greensock.easing.*; public dynamic class MainMenu extends BaseMenu { static var firsttimeInit:Boolean = true; public function MainMenu(_arg1:Stage=null){ var _local2:GameButton; var _local3:GameButton; super(); this.stageRef = _arg1; if (firsttimeInit){ GameData.vars.soundsEnabled = true; sm.addLibrarySound(menu_ambient, "sndMenu"); sm.addLibrarySound(sound_break, "sndBreak"); sm.addLibrarySound(sound_shock, "sndShock"); sm.addLibrarySound(sound_flip, "sndFlip"); sm.addLibrarySound(sound_charge, "sndCharge"); sm.addLibrarySound(sound_tube, "sndTube"); sm.addLibrarySound(sound_button, "sndButton"); sm.addLibrarySound(sound_firework, "sndFirework"); sm.addLibrarySound(sound_contact, "sndContact"); sm.addLibrarySound(sound_explosion, "sndExplosion"); sm.addLibrarySound(sound_wall, "sndWall"); sm.addLibrarySound(sound_clock, "sndClock"); sm.addLibrarySound(sound_levelbutton, "sndLevelbutton"); sm.addLibrarySound(sound_leveldone, "sndLeveldone"); firsttimeInit = false; }; _local2 = new GameButton(new Array("btn_playgame", "btn_playgame2", "btn_playgame3"), playGame); _local2.x = 160; _local2.y = 270; addChild(_local2); _local2 = new GameButton(new Array("button_highscores", "button_highscores2", "button_highscores3"), showHighscores); _local2.x = 320; _local2.y = 270; addChild(_local2); _local2 = new GameButton(new Array("imgInstructions1", "imgInstructions2", "imgInstructions3"), showInstructions); _local2.x = 160; _local2.y = 318; addChild(_local2); _local3 = new GameButton(new Array("imgMore1", "imgMore2", "imgMore3"), onMoreButton); _local3.x = 320; _local3.y = 318; _local3.name = "moreBtn"; addChild(_local3); if (GameData.vars.soundsEnabled){ sm.stopAllSounds(); sm.playSound("sndMenu", 0, 0, 999999); sm.fadeSound("sndMenu", 1, 4); }; } private function showHighscores(){ unload(new HighscoresMenu(stageRef)); } private function onMoreButton(){ gotoLink("http://x.mochiads.com/link/b0925467905ce424", "http://arcadeous.com/?fromElectrospinner"); } private function showInstructions(){ unload(new InstructionsMenu(stageRef)); } private function playGame(){ unload(new LevelMenu(stageRef)); } } }//package classes
Section 21
//Panel (classes.Panel) package classes { import flash.display.*; import com.greensock.*; import com.greensock.plugins.*; public class Panel extends MovieClip { var panel:MovieClip; var background:Bitmap; var cover:Sprite; public function Panel(_arg1:int, _arg2:int){ cover = new Sprite(); cover.alpha = 0; addChild(cover); cover.graphics.beginFill(0, 0.7); cover.graphics.drawRect(0, 0, _arg1, _arg2); cover.graphics.endFill(); panel = new MovieClip(); addChild(panel); } public function hide(_arg1:Function=null){ var _local2:TimelineLite; _local2 = new TimelineLite({onComplete:_arg1}); _local2.appendMultiple([new TweenLite(cover, 0.5, {alpha:0}), new TweenLite(panel, 0.5, {alpha:0, blurFilter:{blurX:40, blurY:40}})], 0); } public function display(){ var _local1:TimelineLite; _local1 = new TimelineLite(); TweenPlugin.activate([BlurFilterPlugin]); _local1.appendMultiple([new TweenLite(cover, 0.5, {alpha:1}), new TweenLite(panel, 0, {alpha:0, blurFilter:{blurX:30, blurY:30}}), new TweenLite(panel, 0.5, {alpha:1, blurFilter:{blurX:0, blurY:0}})], 0); } } }//package classes
Section 22
//ParticleEffect (classes.ParticleEffect) package classes { import flash.display.*; import com.greensock.*; import com.greensock.easing.*; public class ParticleEffect extends MovieClip { public var scaleFactor:Number;// = 1 public function ParticleEffect(){ scaleFactor = 1; super(); } public function fireworks(_arg1:int=5, _arg2:Number=1, _arg3:int=30, _arg4:int=100, _arg5:int=100, _arg6:int=40, _arg7:int=2, _arg8:Function=null){ var _local9:Number; var _local10:int; var _local11:int; var _local12:int; var _local13:int; var _local14:Particle; var _local15:Number; var _local16:int; var _local17:Number; var _local18:int; var _local19:Array; var _local20:TimelineLite; _arg4 = ((_arg4 < 40)) ? 40 : _arg4; _local9 = 0; _local10 = 0; while (_local10 < _arg1) { _local11 = ((Math.random() * _arg5) - (_arg5 / 2)); _local12 = ((Math.random() * _arg6) - (_arg6 / 2)); _local13 = 0; while (_local13 < _arg3) { _local14 = new Particle(); _local15 = (Math.random() * 1.5); _local14.width = (_local14.width * _local15); _local14.height = (_local14.height * _local15); _local14.gotoAndStop("star"); _local14.name = ((("e" + _local10) + "-") + _local13); _local14.alpha = 0; _local14.x = _local11; _local14.y = _local12; _local14.rotation = (Math.random() * 360); addChild(_local14); _local16 = (Math.random() * 360); _local17 = (Math.PI * 2); _local18 = ((Math.random() * (_arg4 - 50)) + 50); if (_local10 < (_arg1 - 1)){ _local19 = new Array(_local14.name, null); } else { _local19 = new Array(_local14.name, _arg8); }; _local20 = new TimelineLite({onComplete:onTweenComplete, onCompleteParams:new Array(_local14.name, _arg8)}); _local20.append(new TweenLite(_local14, 0, {delay:_local9, alpha:(1 / _local15)})); _local20.append(new TweenMax(_local14, ((Math.random() * _arg7) + 0.3), {alpha:0, rotation:(Math.random() * 200), bezier:[{x:(Math.cos(_local16) * _local18), y:((Math.sin(_local16) * _local18) - 40)}, {x:(Math.cos(_local16) * (_local18 - 30)), y:((Math.sin(_local16) * (_local18 - 30)) + 80)}], orientToBezier:false, ease:Quad.easeOut})); _local13++; }; _local9 = (_local9 + (Math.random() * _arg2)); _local10++; }; } private function onTweenComplete(_arg1:String, _arg2:Function=null){ var _local3:MovieClip; _local3 = (getChildByName(_arg1) as MovieClip); if (_local3){ removeChild(_local3); }; if (this.numChildren == 0){ if (_arg2 != null){ _arg2(); }; parent.removeChild(this); }; } public function flow(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int=3){ var _local6:int; var _local7:Particle; _local6 = 0; while (_local6 < _arg1) { _local7 = new Particle(); new Particle().width = (_local7.width * ((Math.random() + 0.5) * scaleFactor)); _local7.height = (_local7.height * ((Math.random() + 0.5) * scaleFactor)); _local7.gotoAndStop("electric"); _local7.name = ("particle" + _local6); addChild(_local7); TweenMax.to(_local7, ((Math.random() * _arg5) + 0.3), {onComplete:onTweenComplete, onCompleteParams:new Array(_local7.name), alpha:0.5, bezier:[{x:((Math.random() * _arg2) - (_arg2 / 3)), y:-((100 + (Math.random() * 100)))}, {x:(_arg3 + (Math.random() * 100)), y:_arg4}], orientToBezier:false, ease:Quad.easeInOut}); _local6++; }; } public function explode(_arg1:int=90, _arg2:int=200, _arg3:int=3, _arg4:Function=null){ var _local5:int; var _local6:Particle; var _local7:Number; var _local8:int; var _local9:Number; var _local10:int; _arg2 = ((_arg2 < 60)) ? 60 : _arg2; _local5 = 0; while (_local5 < _arg1) { _local6 = new Particle(); _local7 = (Math.random() * 2); _local6.gotoAndStop("explosion"); _local6.name = ("particle" + _local5); _local6.alpha = ((Math.random() * 0.4) + 0.6); addChild(_local6); _local8 = (Math.random() * 360); _local9 = (Math.PI * 2); _local10 = ((Math.random() * (_arg2 - 50)) + 50); TweenMax.to(_local6, ((Math.random() * _arg3) + 0.3), {onComplete:onTweenComplete, onCompleteParams:new Array(_local6.name, _arg4), rotation:(Math.random() * 200), bezier:[{x:(Math.cos(_local8) * _local10), y:((Math.sin(_local8) * _local10) - 80)}, {x:(Math.cos(_local8) * (_local10 - 30)), y:((Math.sin(_local8) * (_local10 - 30)) + 80)}], orientToBezier:false, ease:Quad.easeOut}); _local5++; }; } } }//package classes
Section 23
//Preloader (classes.Preloader) package classes { import flash.display.*; import flash.events.*; import com.greensock.*; import mochi.as3.*; import com.greensock.easing.*; import com.greensock.plugins.*; import flash.text.*; public dynamic class Preloader extends MovieClip { public var bg:MovieClip; private function onAdsFinished():void{ showLogo(); } public function init(){ MochiAd.showPreGameAd({clip:this, id:"cefc988031c0d916", res:"640x440", background:0, color:4806671, outline:0, no_bg:true, ad_finished:onAdsFinished}); TweenLite.to(bg, 7, {alpha:1}); } public function showLogo(){ var _local1:MyLogo; var _local2:TimelineLite; _local1 = new MyLogo(); _local1.buttonMode = true; _local1.alpha = 0; addChild(_local1); MochiServices.addLinkEvent("http://x.mochiads.com/link/6057d949152e174d", "http://arcadeous.com/?fromElectrospinner", _local1); _local2 = new TimelineLite({onComplete:showSponsorLogo}); _local2.append(new TweenLite(_local1, 0, {colorTransform:{brightness:0}})); _local2.appendMultiple([new TweenLite(_local1, 4, {alpha:1}), new TweenLite(_local1, 4, {colorTransform:{brightness:1}})], 0); _local2.appendMultiple([new TweenLite(_local1, 1.5, {alpha:0, delay:1, ease:Quad.easeIn}), new TweenLite(_local1, 1.5, {delay:1, ease:Quad.easeIn, blurFilter:{blurX:100, blurY:100}})], 0); } public function onAnimationsDone(){ btnPlay = new GameButton(new Array("imgPlay1", "imgPlay2", "imgPlay3"), playGame); addChild(btnPlay); btnPlay.x = 261; btnPlay.y = 371; btnPlay.addEventListener(MouseEvent.CLICK, this.playGame); } private function playGame(_arg1:MouseEvent=null){ TweenLite.to(this, 2, {onComplete:finalizePreloader, ease:Quad.easeIn, colorTransform:{brightness:0}}); } public function showSponsorLogo(){ var _local1:SponsorLogo; var _local2:TimelineLite; _local1 = new SponsorLogo(); _local1.buttonMode = true; _local1.alpha = 0; addChild(_local1); MochiServices.addLinkEvent("http://x.mochiads.com/link/bb9395f2618c74ee", "http://proarcadescript.com/?fromElectrospinner", _local1); _local2 = new TimelineLite({onComplete:onAnimationsDone}); _local2.append(new TweenLite(_local1, 0, {blurFilter:{blurX:100, blurY:100}})); _local2.appendMultiple([new TweenLite(_local1, 2, {ease:Quad.easeOut, alpha:1}), new TweenLite(_local1, 2, {ease:Quad.easeOut, blurFilter:{blurX:0, blurY:0}})], 0); _local2.append(new TweenLite(_local1, 4, {alpha:1})); } public function isUrl(_arg1:Array):Boolean{ var _local2:String; var _local3:Number; var _local4:Number; var _local5:String; var _local6:Number; var _local7:Number; var _local8:int; _local2 = stage.loaderInfo.loaderURL; _local3 = (_local2.indexOf("://") + 3); _local4 = _local2.indexOf("/", _local3); _local5 = _local2.substring(_local3, _local4); _local6 = (_local5.lastIndexOf(".") - 1); _local7 = (_local5.lastIndexOf(".", _local6) + 1); _local5 = _local5.substring(_local7, _local5.length); _local8 = 0; while (_local8 < _arg1.length) { if (_local5 == _arg1[_local8]){ return (true); }; _local8++; }; return (false); } public function finalizePreloader(){ dispatchEvent(new Event("preloaderFinished")); } } TweenPlugin.activate([ColorTransformPlugin]); var _local1:* = TweenPlugin.activate([BlurFilterPlugin]); return (_local1); }//package classes
Section 24
//Rotor (classes.Rotor) package classes { import flash.display.*; public class Rotor extends MovieClip { public const SIZE:int = 45; public var inaccuracy:int; public var shadow:MovieClip; public var stick:MovieClip; static const DEF_INACCURACY:int = 6; public function Rotor(){ addFrameScript(0, frame1); super(); inaccuracy = DEF_INACCURACY; } function frame1(){ stop(); } public function getDirection():int{ if ((((rotation > -(inaccuracy))) && ((rotation < inaccuracy)))){ return (1); }; if ((((rotation > (-90 - inaccuracy))) && ((rotation < (-90 + inaccuracy))))){ return (4); }; if ((((rotation > (180 - inaccuracy))) && ((rotation < (180 + inaccuracy))))){ return (3); }; if ((((rotation > (90 - inaccuracy))) && ((rotation < (90 + inaccuracy))))){ return (2); }; return (-1); } } }//package classes
Section 25
//ScoreCounter (classes.ScoreCounter) package classes { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.text.*; public class ScoreCounter extends MovieClip { public var label:TextField; var timer:Timer; private var _score:int; var scoreToAdd:int; public function ScoreCounter(){ _score = 0; scoreToAdd = 0; label.text = "0"; timer = new Timer(30); } public function set score(_arg1:int):void{ _score = _arg1; label.text = _score; } public function addScore(_arg1:int){ scoreToAdd = (scoreToAdd + _arg1); if (!timer.running){ timer.addEventListener(TimerEvent.TIMER, onTimer); timer.start(); }; } public function get score():int{ return (_score); } private function onTimer(_arg1:TimerEvent):void{ var _local2:*; if (scoreToAdd > 0){ _local2 = ((scoreToAdd)>10) ? (Math.ceil((scoreToAdd / 20)) + 1) : 1; _score = (_score + _local2); scoreToAdd = (scoreToAdd - _local2); label.text = _score; } else { if (scoreToAdd < 0){ _local2 = ((scoreToAdd)<-10) ? (Math.ceil((scoreToAdd / 20)) - 1) : -1; _score = (_score + _local2); scoreToAdd = (scoreToAdd - _local2); label.text = _score; } else { timer.stop(); timer.removeEventListener(TimerEvent.TIMER, onTimer); }; }; } } }//package classes
Section 26
//Signal (classes.Signal) package classes { import flash.display.*; import flash.utils.*; public class Signal extends GameObject { const SPINNER_TIME:int = 700; const CELL_TIME:int = 400; const MIN_DIST:int = 4; var currentP:int; public var isOnSpinner:Boolean; var line:int; var lastUpdateTime:int; var dP:int; var nextP:int; var index:int; public var mcSpark:MovieClip; var game:Game; public function Signal(_arg1:int=0){ objType = GameObject.TYPE_SIGNAL; isOnSpinner = false; line = -1; index = _arg1; name = ("signal" + index); enabled = false; lastUpdateTime = getTimer(); } public function destroy(){ if (parent != null){ parent.removeChild(this); }; } public function repositionOnSpinner(){ x = ((Game.CELL_WIDTH * 2) - x); dP = (dP * -1); } public function setPoint(_arg1:int){ currentP = _arg1; x = (game.lines[line][_arg1][1] * Game.CELL_WIDTH); y = (game.lines[line][_arg1][0] * Game.CELL_HEIGHT); dP = ((_arg1)==0) ? 1 : -1; nextP = (_arg1 + dP); } public function setLine(_arg1:int, _arg2:Boolean=false){ var _local3:Contact; if (_arg1 == -1){ return; }; line = _arg1; _local3 = game.gameContainer.getChildByName(((("contact" + game.spinner.row) + "-") + game.spinner.col)); if (_local3){ if (_local3.type == Contact.RECEIVER){ game.catchSignal(this.name); destroy(); }; }; } public function setGameRef(_arg1:Game){ game = _arg1; } public function moveToSpinner(){ x = 0; y = -1; dP = 1; if (!game.spinner.rotor){ trace("Spinner.rotor not found"); return; }; game.gameContainer.removeChild(this); game.spinner.rotor.addChild(this); isOnSpinner = true; } override public function onFrame(_arg1:int){ var _local2:Spinner; var _local3:*; var _local4:int; var _local5:int; var _local6:int; var _local7:int; _local2 = game.spinner; if (isOnSpinner){ _local3 = (x + (((dP * Game.CELL_WIDTH) * _arg1) / SPINNER_TIME)); if ((((((_local3 < _local2.rotor.SIZE)) && ((dP == 1)))) || ((((_local3 > 0)) && ((dP == -1)))))){ x = _local3; if ((((((dP == -1)) && ((x < MIN_DIST)))) && ((_local2.line >= 0)))){ isOnSpinner = false; game.gameContainer.addChildAt(this, (game.gameContainer.numChildren - 2)); setLine(_local2.line); if ((((_local2.row == game.lines[line][0][0])) && ((_local2.col == game.lines[line][0][1])))){ setPoint(0); } else { setPoint((game.lines[line].length - 1)); }; }; } else { dP = -(dP); }; } else { _local4 = (game.lines[line][nextP][1] * Game.CELL_WIDTH); _local5 = (game.lines[line][nextP][0] * Game.CELL_HEIGHT); if ((((Math.abs((x - _local2.x)) < MIN_DIST)) && ((Math.abs((y - _local2.y)) < MIN_DIST)))){ if ((((((dP == -1)) && ((currentP == 1)))) || ((((dP == 1)) && ((currentP == (game.lines[line].length - 2))))))){ moveToSpinner(); }; }; if ((((Math.abs((_local4 - x)) < MIN_DIST)) && ((Math.abs((_local5 - y)) < MIN_DIST)))){ currentP = nextP; x = (game.lines[line][currentP][1] * Game.CELL_WIDTH); y = (game.lines[line][currentP][0] * Game.CELL_HEIGHT); nextP = (nextP + dP); if ((((nextP < 0)) || ((nextP >= game.lines[line].length)))){ dP = -(dP); nextP = (currentP + dP); }; } else { _local6 = ((game.lines[line][nextP][1] - game.lines[line][currentP][1]) * Game.CELL_WIDTH); _local7 = ((game.lines[line][nextP][0] - game.lines[line][currentP][0]) * Game.CELL_HEIGHT); x = (x + ((_local6 * _arg1) / CELL_TIME)); y = (y + ((_local7 * _arg1) / CELL_TIME)); }; }; } } }//package classes
Section 27
//SmallPanel (classes.SmallPanel) package classes { import flash.display.*; import flash.utils.*; public class SmallPanel extends Panel { private var type:int; static const FAILED:int = 1; static const PAUSE:int = 2; public function SmallPanel(_arg1:int, _arg2:int, _arg3:int){ var _local4:Class; var _local5:String; var _local6:Class; var _local7:Bitmap; var _local8:GameButton; super(_arg2, _arg3); type = _arg1; _local4 = (getDefinitionByName("panel_small") as Class); background = new Bitmap(new _local4(0, 0)); background.name = "bg"; panel.addChild(background); panel.x = 190; panel.y = 120; _local5 = ((_arg1)==1) ? "level_failed" : "game_paused"; _local6 = (getDefinitionByName(_local5) as Class); _local7 = new Bitmap(new _local6(0, 0)); _local7.name = "caption"; panel.addChild(_local7); _local7.y = 25; _local8 = new GameButton(new Array("button_restart", "button_restart2", "button_restart3"), onRestart); _local8.x = 67; _local8.y = 74; panel.addChild(_local8); _local8 = new GameButton(new Array("button_mainmenu", "button_mainmenu2", "button_mainmenu3"), onMainMenu); _local8.x = 67; _local8.y = 107; panel.addChild(_local8); } private function onRestart(){ var _local1:Game; _local1 = (parent as Game); _local1.forceRestart = true; _local1.pauseGame(); } private function onMainMenu(){ var _local1:Game; _local1 = (parent as Game); _local1.unload(new MainMenu(_local1.stageRef)); } } }//package classes
Section 28
//Spinner (classes.Spinner) package classes { import com.reintroducing.sound.*; import flash.display.*; import com.coreyoneil.collision.*; public dynamic class Spinner extends GameObject { private const MIN_ACTION_INTERVAL:int = 200; public var rotor:Rotor; public var tweenTime:int; public var active:Boolean; private var timeSinceAction:int; public var line:int; var sm:SoundManager; private var defTweenTime:int; var direction:int; public var col:int; private var minTweenTime:int; private var maxTweenTime:int; public var row:int; var wantNewDirection:Boolean; var game:Game; var collisionList:CollisionList; static const DEFAULT_TIME:int = 2500; public function Spinner(_arg1:int=2500){ sm = SoundManager.getInstance(); objType = GameObject.TYPE_SPINNER; tweenTime = _arg1; defTweenTime = tweenTime; minTweenTime = (tweenTime * 0.65); maxTweenTime = (tweenTime * 2); active = false; col = 0; row = 0; line = -1; timeSinceAction = (MIN_ACTION_INTERVAL * 2); direction = 1; wantNewDirection = false; enabled = false; collisionList = new CollisionList(this.rotor.stick); } public function activate(_arg1:Boolean=false){ wantNewDirection = _arg1; rotor.gotoAndStop("highlight"); active = true; } public function kill(){ var _local1:ParticleEffect; if (!enabled){ return; }; enabled = false; rotor.alpha = 0; _local1 = new ParticleEffect(); _local1.x = x; _local1.y = y; game.addChild(_local1); if (GameData.vars.soundsEnabled){ sm.playSound("sndExplosion"); }; _local1.explode(240, 180, 4, game.restartGame); } public function deactivate(){ rotor.gotoAndStop("normal"); active = false; } public function speedDown(){ if ((tweenTime + 200) < maxTweenTime){ tweenTime = (tweenTime + 200); rotor.inaccuracy = Rotor.DEF_INACCURACY; }; } public function setGameRef(_arg1:Game){ game = _arg1; } public function removeCollider(_arg1:DisplayObject){ collisionList.removeItem(_arg1); } public function speedUp(){ if ((tweenTime - 200) > minTweenTime){ tweenTime = (tweenTime - 200); rotor.inaccuracy = ((Rotor.DEF_INACCURACY * defTweenTime) / tweenTime); }; } public function addCollider(_arg1:DisplayObject){ collisionList.addItem(_arg1); } public function setCell(_arg1:int, _arg2:int){ col = _arg2; row = _arg1; line = game.lineByNode(row, col); } override public function onFrame(_arg1:int){ var _local2:Array; var _local3:Number; var _local4:int; var _local5:int; var _local6:int; var _local7:Contact; var _local8:DisplayObject; var _local9:Signal; _local2 = collisionList.checkCollisions(); if (_local2.length > 0){ _local8 = _local2[(_local2.length - 1)].object1; if (_local8 == rotor.stick){ _local8 = _local2[(_local2.length - 1)].object2; }; if (((_local8.parent) && ((_local8.parent is Switcher)))){ (_local8.parent as Switcher).processCollision(); } else { game.stopGame("fail"); }; }; _local3 = (((direction * 360) * _arg1) / tweenTime); rotor.rotation = (rotor.rotation + _local3); rotor.shadow.y = (Math.cos(((Math.PI * rotor.rotation) / 180)) * 7); _local4 = 0; while (_local4 < game.signalsCount) { _local9 = rotor.getChildByName(("signal" + _local4)); if (_local9){ _local9.onFrame(_arg1); }; _local4++; }; if (((((!(active)) || (!(rotor)))) || (!(parent)))){ return; }; if (timeSinceAction < MIN_ACTION_INTERVAL){ timeSinceAction = (timeSinceAction + _arg1); return; }; _local5 = 0; _local6 = 0; switch (rotor.getDirection()){ case 1: _local5 = (col + 2); _local6 = row; break; case 2: _local5 = col; _local6 = (row + 2); break; case 3: _local5 = (col - 2); _local6 = row; break; case 4: _local5 = col; _local6 = (row - 2); break; }; _local7 = (parent.getChildByName(((("contact" + _local6) + "-") + _local5)) as Contact); if (!_local7){ return; }; if (!_local7.isActive){ return; }; x = _local7.x; y = _local7.y; setCell(_local6, _local5); rotor.rotation = (rotor.rotation + 180); if (wantNewDirection){ reverse(); }; if (_local7.type == Contact.CHARGED){ _local7.uncharge(); if (GameData.vars.soundsEnabled){ sm.playSound("sndCharge"); }; } else { if (GameData.vars.soundsEnabled){ sm.playSound("sndFlip"); }; }; _local4 = 0; while (_local4 < game.signalsCount) { _local9 = rotor.getChildByName(("signal" + _local4)); if (_local9){ _local9.repositionOnSpinner(); }; _local4++; }; timeSinceAction = 0; } public function cleanUp(){ var _local1:int; _local1 = rotor.numChildren; while (_local1--) { rotor.removeChildAt(_local1); }; } public function reverse(){ direction = -(direction); } } }//package classes
Section 29
//SpinnerGame (classes.SpinnerGame) package classes { import flash.display.*; import flash.events.*; import mochi.as3.*; import flash.ui.*; public class SpinnerGame extends MovieClip { public var preloader:Preloader; public var gameState:int;// = 0 public static const STATE_SYSTEM_LOADER:int = 0; public static const STATE_SYSTEM_TITLE:int = 1; public function SpinnerGame():void{ var _local1:ContextMenu; gameState = STATE_SYSTEM_LOADER; super(); addFrameScript(0, frame1, 2, frame3); _local1 = new ContextMenu(); _local1.hideBuiltInItems(); contextMenu = _local1; preloader = new Preloader(); addChild(preloader); preloader.init(); preloader.addEventListener("preloaderFinished", onLoaded); addEventListener(Event.DEACTIVATE, onDeactivate); } function frame3(){ stop(); } function frame1(){ stop(); } private function onDeactivate(_arg1:Event):void{ MochiEvents.endPlay(); } public function onLoaded(_arg1:Event):void{ MochiBot.track(this, "7f9f8694"); MochiServices.connect("cefc988031c0d916", root); MochiScores.setBoardID("250162ef3b4a39ec"); MochiEvents.startPlay(); this.removeChild(preloader); gotoAndPlay(2); new MainMenu(stage).load(); } } }//package classes
Section 30
//Switcher (classes.Switcher) package classes { import flash.display.*; import flash.utils.*; public class Switcher extends Enemy { private var lastCollisionTime:int;// = 0 private var state:int; public var hotspot:MovieClip; public function Switcher(){ lastCollisionTime = 0; addFrameScript(0, frame1); super(-1, 0); state = 2; gotoAndStop(state); } override public function firstTimeInit(){ if (parent.parent){ (parent.parent as Game).spinner.addCollider(this.hotspot); }; } function frame1(){ stop(); } public function processCollision(){ if ((getTimer() - lastCollisionTime) > 500){ lastCollisionTime = getTimer(); state = ((state)==1) ? 2 : 1; gotoAndStop(state); sm.playSound("sndWall"); }; } public function get isOn():Boolean{ return ((state == 2)); } } }//package classes
Section 31
//TubePopup (classes.TubePopup) package classes { import com.reintroducing.sound.*; import flash.display.*; import com.greensock.*; import com.greensock.easing.*; public class TubePopup extends MovieClip { private const TUBE_WIDTH:int = 168; public var panel:MovieClip; private var flowY:int; var sm:SoundManager; private var signalsLeft:int; private var signals:int; private var flowX:int; public function TubePopup(){ sm = SoundManager.getInstance(); panel.y = 25; } private function onFinishAnimation(){ if (((parent) && (this))){ parent.removeChild(this); }; } public function showProgress(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:Number=0){ signals = _arg3; signalsLeft = _arg4; flowX = _arg1; flowY = _arg2; panel.progressbar.width = ((((signals - signalsLeft) - 1) * TUBE_WIDTH) / signals); TweenLite.to(panel, 0.5, {y:0, onComplete:onPanelShown, ease:Quad.easeIn, delay:_arg5}); TweenLite.to(panel, 0.5, {y:25, onStart:onStartClosing, onComplete:onFinishAnimation, ease:Quad.easeOut, delay:(_arg5 + 4)}); if (GameData.vars.soundsEnabled){ sm.playSound("sndTube"); }; } private function onStartClosing(){ if (GameData.vars.soundsEnabled){ sm.playSound("sndTube"); }; } private function onPanelShown(){ var _local1:ParticleEffect; var _local2:GameTimer; TweenLite.to(panel.progressbar, 2, {width:(((signals - signalsLeft) * TUBE_WIDTH) / signals)}); _local1 = new ParticleEffect(); _local1.x = flowX; _local1.y = flowY; parent.addChild(_local1); _local1.flow(40, 300, ((x + 20) - _local1.x), ((y + 7) - _local1.y), 3); _local2 = (parent as Game).timer; if ((((_local2.time > 0)) && (((parent as Game).signalsLeft == 0)))){ _local1 = new ParticleEffect(); _local1.x = (_local2.x + 20); _local1.y = _local2.y; parent.addChild(_local1); _local1.flow(40, 300, ((x + 20) - _local1.x), ((y + 7) - _local1.y), 3); }; } } }//package classes
Section 32
//Wall (classes.Wall) package classes { import flash.display.*; public class Wall extends Enemy { public var switcherName:String; public var hotspotv:MovieClip; public var hotspoth:MovieClip; private var isVertical:Boolean; private var isActive:Boolean; private var hotspot:MovieClip; private var switcher:Switcher; public function Wall(_arg1:Boolean=false, _arg2:int=-1, _arg3:int=0){ addFrameScript(0, frame1); super(_arg2, _arg3); isVertical = _arg1; if (isVertical){ gotoAndStop(2); removeChild(getChildByName("hotspoth")); hotspot = getChildByName("hotspotv"); } else { removeChild(getChildByName("hotspotv")); hotspot = getChildByName("hotspoth"); }; } public function set active(_arg1:Boolean):void{ isActive = _arg1; if (isActive){ hotspot.alpha = 1; if (isVertical){ gotoAndStop(2); } else { gotoAndStop(1); }; game.spinner.addCollider(hotspot); } else { hotspot.alpha = 0; game.spinner.removeCollider(hotspot); gotoAndStop(3); }; } override public function firstTimeInit(){ isActive = true; game.spinner.addCollider(hotspot); if (((parent) && (switcherName))){ switcher = parent.getChildByName(switcherName); }; } function frame1(){ stop(); } override public function execute(){ active = !(isActive); } override public function update(_arg1:int){ if (eventInterval > 0){ return; }; if (!switcher){ return; }; if (isActive != switcher.isOn){ active = switcher.isOn; }; } } }//package classes
Section 33
//CDK (com.coreyoneil.collision.CDK) package com.coreyoneil.collision { import flash.display.*; import flash.geom.*; import flash.utils.*; import flash.text.*; import flash.errors.*; public class CDK { private var colorTransform1:ColorTransform; private var colorTransform2:ColorTransform; private var _returnAngleType:String; private var pixels1:ByteArray; private var pixels2:ByteArray; private var bmdResample:BitmapData; private var _returnAngle:Boolean; private var transMatrix2:Matrix; private var rect1:Rectangle; private var rect2:Rectangle; private var transMatrix1:Matrix; protected var objectCheckArray:Array; private var _alphaThreshold:Number; private var item1Registration:Point; private var bmd1:BitmapData; private var bmd2:BitmapData; protected var objectArray:Array; private var item2Registration:Point; protected var objectCollisionArray:Array; private var _numChildren:uint; private var colorExclusionArray:Array; public function CDK():void{ if (getQualifiedClassName(this) == "com.coreyoneil.collision::CDK"){ throw (new Error("CDK is an abstract class and is not meant for instantiation - use CollisionGroup or CollisionList")); }; init(); } public function get returnAngle():Boolean{ return (_returnAngle); } public function set returnAngle(_arg1:Boolean):void{ _returnAngle = _arg1; } private function init():void{ objectCheckArray = []; objectCollisionArray = []; objectArray = []; colorExclusionArray = []; _alphaThreshold = 0; _returnAngle = true; _returnAngleType = "RADIANS"; } protected function findCollisions(_arg1, _arg2):void{ var item1_isText:Boolean; var item2_isText:Boolean; var item1xDiff:Number; var item1yDiff:Number; var currentObj:*; var k:uint; var value1:uint; var value2:uint; var collisionPoint:Number; var overlap:Boolean; var overlapping:Array; var locY:Number; var locX:Number; var locStage:Point; var hasColors:int; var pixelLength:int; var alpha1:uint; var alpha2:uint; var colorFlag:Boolean; var red1:uint; var red2:uint; var green1:uint; var green2:uint; var blue1:uint; var blue2:uint; var colorObj:Object; var aPlus:uint; var aMinus:uint; var rPlus:uint; var rMinus:uint; var gPlus:uint; var gMinus:uint; var bPlus:uint; var bMinus:uint; var item1Flags:uint; var item2Flags:uint; var n:uint; var angle:Number; var recordedCollision:Object; var item1 = _arg1; var item2 = _arg2; item1_isText = false; item2_isText = false; if ((item1 is TextField)){ item1_isText = ((item1.antiAliasType)=="advanced") ? true : false; item1.antiAliasType = ((item1.antiAliasType)=="advanced") ? "normal" : item1.antiAliasType; }; if ((item2 is TextField)){ item2_isText = ((item2.antiAliasType)=="advanced") ? true : false; item2.antiAliasType = ((item2.antiAliasType)=="advanced") ? "normal" : item2.antiAliasType; }; colorTransform1 = item1.transform.colorTransform; colorTransform2 = item2.transform.colorTransform; item1Registration = new Point(); item2Registration = new Point(); item1Registration = item1.localToGlobal(item1Registration); item2Registration = item2.localToGlobal(item2Registration); bmd1 = new BitmapData(item1.width, item1.height, true, 0xFFFFFF); bmd2 = new BitmapData(item1.width, item1.height, true, 0xFFFFFF); transMatrix1 = item1.transform.matrix; currentObj = item1; while (currentObj.parent != null) { transMatrix1.concat(currentObj.parent.transform.matrix); currentObj = currentObj.parent; }; rect1 = item1.getBounds(currentObj); if (item1 != currentObj){ rect1.x = (rect1.x + currentObj.x); rect1.y = (rect1.y + currentObj.y); }; var _local4 = (item1Registration.x - rect1.left); item1xDiff = _local4; transMatrix1.tx = _local4; _local4 = (item1Registration.y - rect1.top); item1yDiff = _local4; transMatrix1.ty = _local4; transMatrix2 = item2.transform.matrix; currentObj = item2; while (currentObj.parent != null) { transMatrix2.concat(currentObj.parent.transform.matrix); currentObj = currentObj.parent; }; transMatrix2.tx = (item2Registration.x - rect1.left); transMatrix2.ty = (item2Registration.y - rect1.top); bmd1.draw(item1, transMatrix1, colorTransform1, null, null, true); bmd2.draw(item2, transMatrix2, colorTransform2, null, null, true); pixels1 = bmd1.getPixels(new Rectangle(0, 0, bmd1.width, bmd1.height)); pixels2 = bmd2.getPixels(new Rectangle(0, 0, bmd1.width, bmd1.height)); k = 0; value1 = 0; value2 = 0; collisionPoint = -1; overlap = false; overlapping = []; hasColors = colorExclusionArray.length; pixels1.position = 0; pixels2.position = 0; pixelLength = pixels1.length; while (k < pixelLength) { k = pixels1.position; try { value1 = pixels1.readUnsignedInt(); value2 = pixels2.readUnsignedInt(); } catch(e:EOFError) { break; }; alpha1 = ((value1 >> 24) & 0xFF); alpha2 = ((value2 >> 24) & 0xFF); if ((((alpha1 > _alphaThreshold)) && ((alpha2 > _alphaThreshold)))){ colorFlag = false; if (hasColors){ red1 = ((value1 >> 16) & 0xFF); red2 = ((value2 >> 16) & 0xFF); green1 = ((value1 >> 8) & 0xFF); green2 = ((value2 >> 8) & 0xFF); blue1 = (value1 & 0xFF); blue2 = (value2 & 0xFF); n = 0; while (n < hasColors) { colorObj = Object(colorExclusionArray[n]); item1Flags = 0; item2Flags = 0; if ((((blue1 >= colorObj.bMinus)) && ((blue1 <= colorObj.bPlus)))){ item1Flags = (item1Flags + 1); }; if ((((blue2 >= colorObj.bMinus)) && ((blue2 <= colorObj.bPlus)))){ item2Flags = (item2Flags + 1); }; if ((((green1 >= colorObj.gMinus)) && ((green1 <= colorObj.gPlus)))){ item1Flags = (item1Flags + 1); }; if ((((green2 >= colorObj.gMinus)) && ((green2 <= colorObj.gPlus)))){ item2Flags = (item2Flags + 1); }; if ((((red1 >= colorObj.rMinus)) && ((red1 <= colorObj.rPlus)))){ item1Flags = (item1Flags + 1); }; if ((((red2 >= colorObj.rMinus)) && ((red2 <= colorObj.rPlus)))){ item2Flags = (item2Flags + 1); }; if ((((alpha1 >= colorObj.aMinus)) && ((alpha1 <= colorObj.aPlus)))){ item1Flags = (item1Flags + 1); }; if ((((alpha2 >= colorObj.aMinus)) && ((alpha2 <= colorObj.aPlus)))){ item2Flags = (item2Flags + 1); }; if ((((item1Flags == 4)) || ((item2Flags == 4)))){ colorFlag = true; }; n = (n + 1); }; }; if (!colorFlag){ overlap = true; collisionPoint = (k >> 2); locY = (collisionPoint / bmd1.width); locX = (collisionPoint % bmd1.width); locY = (locY - item1yDiff); locX = (locX - item1xDiff); locStage = item1.localToGlobal(new Point(locX, locY)); overlapping.push(locStage); }; }; }; if (overlap){ angle = (_returnAngle) ? findAngle(item1, item2) : 0; recordedCollision = {object1:item1, object2:item2, angle:angle, overlapping:overlapping}; objectCollisionArray.push(recordedCollision); }; if (item1_isText){ item1.antiAliasType = "advanced"; }; if (item2_isText){ item2.antiAliasType = "advanced"; }; _local4 = false; item2_isText = _local4; item1_isText = _local4; } public function dispose():void{ objectArray = []; } public function excludeColor(_arg1:uint, _arg2:uint=0xFF, _arg3:uint=20, _arg4:uint=20, _arg5:uint=20):void{ var _local6:int; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:uint; var _local11:uint; var _local12:uint; var _local13:uint; var _local14:uint; var _local15:uint; var _local16:Object; _local6 = colorExclusionArray.length; _local7 = 0; while (_local7 < _local6) { if (colorExclusionArray[_local7].color == _arg1){ throw (new Error((("Color could not be added - color already in the exclusion list [" + _arg1) + "]"))); }; _local7++; }; _local8 = (((_arg1 >> 24) & 0xFF) + _arg2); _local9 = (_local8 - (_arg2 << 1)); _local10 = (((_arg1 >> 16) & 0xFF) + _arg3); _local11 = (_local10 - (_arg3 << 1)); _local12 = (((_arg1 >> 8) & 0xFF) + _arg4); _local13 = (_local12 - (_arg4 << 1)); _local14 = ((_arg1 & 0xFF) + _arg5); _local15 = (_local14 - (_arg5 << 1)); _local16 = {color:_arg1, aPlus:_local8, aMinus:_local9, rPlus:_local10, rMinus:_local11, gPlus:_local12, gMinus:_local13, bPlus:_local14, bMinus:_local15}; colorExclusionArray.push(_local16); } public function get numChildren():uint{ return (objectArray.length); } public function get alphaThreshold():Number{ return (_alphaThreshold); } public function removeItem(_arg1):void{ var _local2:int; _local2 = objectArray.indexOf(_arg1); if (_local2 > -1){ objectArray.splice(_local2, 1); } else { throw (new Error((_arg1 + " could not be removed - object not found in item list."))); }; } public function set returnAngleType(_arg1:String):void{ _arg1 = _arg1.toUpperCase(); switch (_arg1){ case "DEGREES": case "DEGREE": case "DEG": case "DEGS": _returnAngleType = "DEGREES"; break; case "RADIANS": case "RADIAN": case "RAD": case "RADS": _returnAngleType = "RADIANS"; break; default: throw (new Error("returnAngleType expects 'DEGREES' or 'RADIANS'")); }; } private function findAngle(_arg1:DisplayObject, _arg2:DisplayObject):Number{ var center:Point; var pixels:ByteArray; var columnHeight:uint; var rowWidth:uint; var pixel:uint; var thisAlpha:uint; var lastAlpha:int; var edgeArray:Array; var hasColors:int; var j:uint; var edgePoint:int; var numEdges:int; var slopeYAvg:Number; var slopeXAvg:Number; var average:Number; var k:uint; var upperLimit:int; var colorFlag:Boolean; var red1:uint; var green1:uint; var blue1:uint; var colorObj:Object; var a:uint; var r:uint; var g:uint; var b:uint; var item1Flags:uint; var n:uint; var item1 = _arg1; var item2 = _arg2; center = new Point((item1.width >> 1), (item1.height >> 1)); pixels = pixels2; transMatrix2.tx = (transMatrix2.tx + center.x); transMatrix2.ty = (transMatrix2.ty + center.y); bmdResample = new BitmapData((item1.width << 1), (item1.height << 1), true, 0xFFFFFF); bmdResample.draw(item2, transMatrix2, colorTransform2, null, null, true); pixels = bmdResample.getPixels(new Rectangle(0, 0, bmdResample.width, bmdResample.height)); center.x = (bmdResample.width >> 1); center.y = (bmdResample.height >> 1); columnHeight = Math.round(bmdResample.height); rowWidth = Math.round(bmdResample.width); edgeArray = []; hasColors = colorExclusionArray.length; j = 0; while (j < columnHeight) { k = ((j * rowWidth) << 2); pixels.position = k; lastAlpha = -1; upperLimit = (((j + 1) * rowWidth) << 2); while (k < upperLimit) { k = pixels.position; try { pixel = pixels.readUnsignedInt(); } catch(e:EOFError) { break; }; thisAlpha = ((pixel >> 24) & 0xFF); if (lastAlpha == -1){ lastAlpha = thisAlpha; } else { if (thisAlpha > _alphaThreshold){ colorFlag = false; if (hasColors){ red1 = ((pixel >> 16) & 0xFF); green1 = ((pixel >> 8) & 0xFF); blue1 = (pixel & 0xFF); n = 0; while (n < hasColors) { colorObj = Object(colorExclusionArray[n]); item1Flags = 0; if ((((blue1 >= colorObj.bMinus)) && ((blue1 <= colorObj.bPlus)))){ item1Flags = (item1Flags + 1); }; if ((((green1 >= colorObj.gMinus)) && ((green1 <= colorObj.gPlus)))){ item1Flags = (item1Flags + 1); }; if ((((red1 >= colorObj.rMinus)) && ((red1 <= colorObj.rPlus)))){ item1Flags = (item1Flags + 1); }; if ((((thisAlpha >= colorObj.aMinus)) && ((thisAlpha <= colorObj.aPlus)))){ item1Flags = (item1Flags + 1); }; if (item1Flags == 4){ colorFlag = true; }; n = (n + 1); }; }; if (!colorFlag){ edgeArray.push((k >> 2)); }; }; }; }; j = (j + 1); }; numEdges = edgeArray.length; slopeYAvg = 0; slopeXAvg = 0; j = 0; while (j < numEdges) { edgePoint = int(edgeArray[j]); slopeYAvg = (slopeYAvg + (center.y - (edgePoint / rowWidth))); slopeXAvg = (slopeXAvg + ((edgePoint % rowWidth) - center.x)); j = (j + 1); }; average = -(Math.atan2(slopeYAvg, slopeXAvg)); average = ((_returnAngleType == "RADIANS")) ? average : (average * 57.2957795); return (average); } public function addItem(_arg1):void{ if ((_arg1 is DisplayObject)){ objectArray.push(_arg1); } else { throw (new Error((("Cannot add item: " + _arg1) + " - item must be a Display Object."))); }; } public function get returnAngleType():String{ return (_returnAngleType); } public function set alphaThreshold(_arg1:Number):void{ if ((((_arg1 <= 1)) && ((_arg1 >= 0)))){ _alphaThreshold = (_arg1 * 0xFF); } else { throw (new Error("alphaThreshold expects a value from 0 to 1")); }; } public function removeExcludeColor(_arg1:uint):void{ var _local2:Boolean; var _local3:int; var _local4:uint; _local2 = false; _local3 = colorExclusionArray.length; _local4 = 0; while (_local4 < _local3) { if (colorExclusionArray[_local4].color == _arg1){ colorExclusionArray.splice(_local4, 1); _local2 = true; break; }; _local4++; }; if (!_local2){ throw (new Error((("Color could not be removed - color not found in exclusion list [" + _arg1) + "]"))); }; } protected function clearArrays():void{ objectCheckArray = []; objectCollisionArray = []; } } }//package com.coreyoneil.collision
Section 34
//CollisionList (com.coreyoneil.collision.CollisionList) package com.coreyoneil.collision { import flash.display.*; public class CollisionList extends CDK { public function CollisionList(_arg1, ... _args):void{ var _local3:uint; super(); addItem(_arg1); _local3 = 0; while (_local3 < _args.length) { addItem(_args[_local3]); _local3++; }; } public function swapTarget(_arg1):void{ if ((_arg1 is DisplayObject)){ objectArray[0] = _arg1; } else { throw (new Error((("Cannot swap target: " + _arg1) + " - item must be a Display Object."))); }; } public function checkCollisions():Array{ var _local1:uint; var _local2:*; var _local3:DisplayObject; var _local4:uint; clearArrays(); _local1 = objectArray.length; _local2 = DisplayObject(objectArray[0]); _local4 = 1; while (_local4 < _local1) { _local3 = DisplayObject(objectArray[_local4]); if (_local2.hitTestObject(_local3)){ if ((_local3.width * _local3.height) > (_local2.width * _local2.height)){ objectCheckArray.push([_local2, _local3]); } else { objectCheckArray.push([_local3, _local2]); }; }; _local4++; }; _local1 = objectCheckArray.length; _local4 = 0; while (_local4 < _local1) { findCollisions(DisplayObject(objectCheckArray[_local4][0]), DisplayObject(objectCheckArray[_local4][1])); _local4++; }; return (objectCollisionArray); } override public function removeItem(_arg1):void{ var _local2:int; _local2 = objectArray.indexOf(_arg1); if (_local2 > 0){ objectArray.splice(_local2, 1); } else { if (_local2 == 0){ throw (new Error("You cannot remove the target from CollisionList. Use swapTarget to change the target.")); }; throw (new Error((_arg1 + " could not be removed - object not found in item list."))); }; } } }//package com.coreyoneil.collision
Section 35
//PropTween (com.greensock.core.PropTween) package com.greensock.core { public class PropTween { public var start:Number; public var name:String; public var prevNode:PropTween; public var change:Number; public var target:Object; public var priority:int; public var property:String; public var nextNode:PropTween; public var isPlugin:Boolean; public function PropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean, _arg7:PropTween=null, _arg8:int=0){ this.target = _arg1; this.property = _arg2; this.start = _arg3; this.change = _arg4; this.name = _arg5; this.isPlugin = _arg6; if (_arg7){ _arg7.prevNode = this; this.nextNode = _arg7; }; this.priority = _arg8; } } }//package com.greensock.core
Section 36
//SimpleTimeline (com.greensock.core.SimpleTimeline) package com.greensock.core { public class SimpleTimeline extends TweenCore { public var autoRemoveChildren:Boolean; protected var _lastChild:TweenCore; protected var _firstChild:TweenCore; public function SimpleTimeline(_arg1:Object=null){ super(0, _arg1); } override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{ var _local4:TweenCore; var _local5:Number; var _local6:TweenCore; _local4 = _firstChild; this.cachedTotalTime = _arg1; this.cachedTime = _arg1; while (_local4) { _local6 = _local4.nextNode; if (((_local4.active) || ((((((_arg1 >= _local4.cachedStartTime)) && (!(_local4.cachedPaused)))) && (!(_local4.gc)))))){ if (!_local4.cachedReversed){ _local4.renderTime(((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale), _arg2, false); } else { _local5 = (_local4.cacheIsDirty) ? _local4.totalDuration : _local4.cachedTotalDuration; _local4.renderTime((_local5 - ((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale)), _arg2, false); }; }; _local4 = _local6; }; } public function addChild(_arg1:TweenCore):void{ if (((!(_arg1.gc)) && (_arg1.timeline))){ _arg1.timeline.remove(_arg1, true); }; _arg1.timeline = this; if (_arg1.gc){ _arg1.setEnabled(true, true); }; if (_firstChild){ _firstChild.prevNode = _arg1; }; _arg1.nextNode = _firstChild; _firstChild = _arg1; _arg1.prevNode = null; } public function get rawTime():Number{ return (this.cachedTotalTime); } public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{ if (_arg1.gc){ return; }; if (!_arg2){ _arg1.setEnabled(false, true); }; if (_arg1.nextNode){ _arg1.nextNode.prevNode = _arg1.prevNode; } else { if (_lastChild == _arg1){ _lastChild = _arg1.prevNode; }; }; if (_arg1.prevNode){ _arg1.prevNode.nextNode = _arg1.nextNode; } else { if (_firstChild == _arg1){ _firstChild = _arg1.nextNode; }; }; } } }//package com.greensock.core
Section 37
//TweenCore (com.greensock.core.TweenCore) package com.greensock.core { import com.greensock.*; public class TweenCore { public var initted:Boolean; protected var _hasUpdate:Boolean; public var active:Boolean; protected var _delay:Number; public var cachedReversed:Boolean; public var nextNode:TweenCore; public var cachedTime:Number; protected var _rawPrevTime:Number;// = -1 public var vars:Object; public var cachedTotalTime:Number; public var data; public var timeline:SimpleTimeline; public var cachedStartTime:Number; public var prevNode:TweenCore; public var cachedDuration:Number; public var gc:Boolean; protected var _pauseTime:Number; public var cacheIsDirty:Boolean; public var cachedPaused:Boolean; public var cachedTimeScale:Number; public var cachedTotalDuration:Number; public static const version:Number = 1.13; protected static var _classInitted:Boolean; public function TweenCore(_arg1:Number=0, _arg2:Object=null){ var _local3:SimpleTimeline; _rawPrevTime = -1; super(); this.vars = ((_arg2) || ({})); this.cachedDuration = (this.cachedTotalDuration = ((_arg1) || (0))); _delay = ((this.vars.delay) || (0)); this.cachedTimeScale = ((this.vars.timeScale) || (1)); this.active = Boolean((((((_arg1 == 0)) && ((_delay == 0)))) && (!((this.vars.immediateRender == false))))); this.cachedTotalTime = (this.cachedTime = 0); this.data = this.vars.data; if (!_classInitted){ if (isNaN(TweenLite.rootFrame)){ TweenLite.initClass(); _classInitted = true; } else { return; }; }; _local3 = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline; this.cachedStartTime = (_local3.cachedTotalTime + _delay); _local3.addChild(this); if (this.vars.reversed){ this.cachedReversed = true; }; if (this.vars.paused){ this.paused = true; }; } public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{ } public function get delay():Number{ return (_delay); } public function get duration():Number{ return (this.cachedDuration); } public function set reversed(_arg1:Boolean):void{ if (_arg1 != this.cachedReversed){ this.cachedReversed = _arg1; setTotalTime(this.cachedTotalTime, true); }; } public function set startTime(_arg1:Number):void{ var _local2:Boolean; _local2 = Boolean(((!((this.timeline == null))) && (((!((_arg1 == this.cachedStartTime))) || (this.gc))))); this.cachedStartTime = _arg1; if (_local2){ this.timeline.addChild(this); }; } public function set delay(_arg1:Number):void{ this.startTime = (this.startTime + (_arg1 - _delay)); _delay = _arg1; } public function resume():void{ this.paused = false; } public function get paused():Boolean{ return (this.cachedPaused); } public function play():void{ this.reversed = false; this.paused = false; } public function set duration(_arg1:Number):void{ this.cachedDuration = (this.cachedTotalDuration = _arg1); setDirtyCache(false); } public function invalidate():void{ } public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{ this.reversed = false; this.paused = false; this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2); } public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{ if (!_arg1){ renderTime(this.cachedTotalDuration, _arg2, false); return; }; if (this.timeline.autoRemoveChildren){ this.setEnabled(false, false); } else { this.active = false; }; if (!_arg2){ if (((((this.vars.onComplete) && ((this.cachedTotalTime == this.cachedTotalDuration)))) && (!(this.cachedReversed)))){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); } else { if (((((this.cachedReversed) && ((this.cachedTotalTime == 0)))) && (this.vars.onReverseComplete))){ this.vars.onReverseComplete.apply(null, this.vars.onReverseCompleteParams); }; }; }; } public function get reversed():Boolean{ return (this.cachedReversed); } public function get totalTime():Number{ return (this.cachedTotalTime); } public function get startTime():Number{ return (this.cachedStartTime); } public function set currentTime(_arg1:Number):void{ setTotalTime(_arg1, false); } protected function setDirtyCache(_arg1:Boolean=true):void{ var _local2:TweenCore; _local2 = (_arg1) ? this : this.timeline; while (_local2) { _local2.cacheIsDirty = true; _local2 = _local2.timeline; }; } public function reverse(_arg1:Boolean=true):void{ this.reversed = true; if (_arg1){ this.paused = false; } else { if (this.gc){ this.setEnabled(true, false); }; }; } public function set paused(_arg1:Boolean):void{ if (((!((_arg1 == this.cachedPaused))) && (this.timeline))){ if (_arg1){ _pauseTime = this.timeline.rawTime; } else { this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - _pauseTime)); _pauseTime = NaN; setDirtyCache(false); }; this.cachedPaused = _arg1; this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); }; if (((!(_arg1)) && (this.gc))){ this.setTotalTime(this.cachedTotalTime, false); this.setEnabled(true, false); }; } public function kill():void{ setEnabled(false, false); } public function set totalTime(_arg1:Number):void{ setTotalTime(_arg1, false); } public function get currentTime():Number{ return (this.cachedTime); } protected function setTotalTime(_arg1:Number, _arg2:Boolean=false):void{ var _local3:Number; var _local4:Number; if (this.timeline){ _local3 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime; if (this.cachedReversed){ _local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; this.cachedStartTime = (_local3 - ((_local4 - _arg1) / this.cachedTimeScale)); } else { this.cachedStartTime = (_local3 - (_arg1 / this.cachedTimeScale)); }; if (!this.timeline.cacheIsDirty){ setDirtyCache(false); }; if (this.cachedTotalTime != _arg1){ renderTime(_arg1, _arg2, false); }; }; } public function pause():void{ this.paused = true; } public function set totalDuration(_arg1:Number):void{ this.duration = _arg1; } public function get totalDuration():Number{ return (this.cachedTotalDuration); } public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{ if (_arg1){ this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration)))); if (((!(_arg2)) && (this.gc))){ this.timeline.addChild(this); }; } else { this.active = false; if (!_arg2){ this.timeline.remove(this, true); }; }; this.gc = !(_arg1); return (false); } } }//package com.greensock.core
Section 38
//Linear (com.greensock.easing.Linear) package com.greensock.easing { public class Linear { public static const power:uint = 0; public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } } }//package com.greensock.easing
Section 39
//Quad (com.greensock.easing.Quad) package com.greensock.easing { public class Quad { public static const power:uint = 1; public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((_arg3 * _arg1) * _arg1) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 * 0.5)); if (_arg1 < 1){ return (((((_arg3 * 0.5) * _arg1) * _arg1) + _arg2)); }; --_arg1; return ((((-(_arg3) * 0.5) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2)); } } }//package com.greensock.easing
Section 40
//TweenEvent (com.greensock.events.TweenEvent) package com.greensock.events { import flash.events.*; public class TweenEvent extends Event { public static const COMPLETE:String = "complete"; public static const START:String = "start"; public static const UPDATE:String = "change"; public static const REVERSE_COMPLETE:String = "reverseComplete"; public static const INIT:String = "init"; public static const VERSION:Number = 1.1; public static const REPEAT:String = "repeat"; public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function clone():Event{ return (new TweenEvent(this.type, this.bubbles, this.cancelable)); } } }//package com.greensock.events
Section 41
//Circle2D (com.greensock.motionPaths.Circle2D) package com.greensock.motionPaths { import flash.display.*; import flash.geom.*; public class Circle2D extends MotionPath { protected var _radius:Number; public function Circle2D(_arg1:Number, _arg2:Number, _arg3:Number){ _radius = _arg3; super.x = _arg1; super.y = _arg2; } public function angleToProgress(_arg1:Number, _arg2:Boolean=false):Number{ var _local3:Number; _local3 = (_arg2) ? (Math.PI * 2) : 360; if (_arg1 < 0){ _arg1 = (_arg1 + ((int((-(_arg1) / _local3)) + 1) * _local3)); } else { if (_arg1 > _local3){ _arg1 = (_arg1 - (int((_arg1 / _local3)) * _local3)); }; }; return ((_arg1 / _local3)); } override protected function renderAll():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Matrix; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:PathFollower; var _local12:Graphics; _local4 = this.transform.matrix; _local5 = _local4.a; _local6 = _local4.b; _local7 = _local4.c; _local8 = _local4.d; _local9 = _local4.tx; _local10 = _local4.ty; _local11 = _rootFollower; while (_local11) { _local1 = ((_local11.cachedProgress * Math.PI) * 2); _local2 = (Math.cos(_local1) * _radius); _local3 = (Math.sin(_local1) * _radius); _local11.target.x = (((_local2 * _local5) + (_local3 * _local7)) + _local9); _local11.target.y = (((_local2 * _local6) + (_local3 * _local8)) + _local10); _local11 = _local11.cachedNext; }; if (((((_redrawLine) && (this.visible))) && (this.parent))){ _local12 = this.graphics; _local12.clear(); _local12.lineStyle(_thickness, _color, _lineAlpha, _pixelHinting, _scaleMode, _caps, _joints, _miterLimit); _local12.drawCircle(0, 0, _radius); _redrawLine = false; }; } public function progressToAngle(_arg1:Number, _arg2:Boolean=false):Number{ var _local3:Number; _local3 = (_arg2) ? (Math.PI * 2) : 360; return ((_arg1 * _local3)); } public function set radius(_arg1:Number):void{ _radius = _arg1; _redrawLine = true; renderAll(); } override public function renderObjectAt(_arg1:Object, _arg2:Number):void{ var _local3:Number; var _local4:Matrix; var _local5:Number; var _local6:Number; _local3 = ((_arg2 * Math.PI) * 2); _local4 = this.transform.matrix; _local5 = (Math.cos(_local3) * _radius); _local6 = (Math.sin(_local3) * _radius); _arg1.x = (((_local5 * _local4.a) + (_local6 * _local4.c)) + _local4.tx); _arg1.y = (((_local5 * _local4.b) + (_local6 * _local4.d)) + _local4.ty); } public function get radius():Number{ return (_radius); } public function anglesToProgressChange(_arg1:Number, _arg2:Number, _arg3:String="clockwise", _arg4:uint=0, _arg5:Boolean=false):Number{ var _local6:Number; var _local7:Number; _local6 = (_arg5) ? (Math.PI * 2) : 360; _local7 = (_arg2 - _arg1); if ((((_local7 < 0)) && ((_arg3 == "clockwise")))){ _local7 = (_local7 + ((int((-(_local7) / _local6)) + 1) * _local6)); } else { if ((((_local7 > 0)) && ((_arg3 == "counterClockwise")))){ _local7 = (_local7 - ((int((_local7 / _local6)) + 1) * _local6)); } else { if (_arg3 == "shortest"){ var _temp1 = (_local7 % _local6); _local7 = (_local7 % _local6); if (_temp1 != (_local7 % (_local6 * 0.5))){ _local7 = ((_local7)<0) ? (_local7 + _local6) : (_local7 - _local6); }; }; }; }; if (_local7 < 0){ _local7 = (_local7 - (_arg4 * _local6)); } else { _local7 = (_local7 + (_arg4 * _local6)); }; return ((_local7 / _local6)); } public function followerTween(_arg1, _arg2:Number, _arg3:String="clockwise", _arg4:uint=0, _arg5:Boolean=false):String{ var _local6:Number; _local6 = (_arg5) ? (Math.PI * 2) : 360; return (String(anglesToProgressChange((getFollower(_arg1).progress * _local6), _arg2, _arg3, _arg4, _arg5))); } } }//package com.greensock.motionPaths
Section 42
//Direction (com.greensock.motionPaths.Direction) package com.greensock.motionPaths { public class Direction { public static const CLOCKWISE:String = "clockwise"; public static const SHORTEST:String = "shortest"; public static const COUNTER_CLOCKWISE:String = "counterClockwise"; } }//package com.greensock.motionPaths
Section 43
//MotionPath (com.greensock.motionPaths.MotionPath) package com.greensock.motionPaths { import flash.display.*; import flash.events.*; public class MotionPath extends Shape { protected var _scaleMode:String; protected var _color:uint; protected var _progress:Number; protected var _pixelHinting:Boolean; protected var _redrawLine:Boolean; protected var _lineAlpha:Number; protected var _joints:String; protected var _caps:String; protected var _thickness:Number; protected var _miterLimit:Number; protected var _rootFollower:PathFollower; protected static const _RAD2DEG:Number = (180 / Math.PI); protected static const _DEG2RAD:Number = (Math.PI / 180); public function MotionPath(){ _progress = 0; lineStyle(1, 0x666666, 1, false, "none", null, null, 3, true); this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true); } override public function get y():Number{ return (super.y); } public function get targets():Array{ var _local1:Array; var _local2:uint; var _local3:PathFollower; _local1 = []; _local2 = 0; _local3 = _rootFollower; while (_local3) { var _temp1 = _local2; _local2 = (_local2 + 1); var _local4 = _temp1; _local1[_local4] = _local3.target; _local3 = _local3.cachedNext; }; return (_local1); } public function renderObjectAt(_arg1:Object, _arg2:Number):void{ } override public function set width(_arg1:Number):void{ super.width = _arg1; renderAll(); } public function getFollower(_arg1:Object):PathFollower{ var _local2:PathFollower; if ((_arg1 is PathFollower)){ return ((_arg1 as PathFollower)); }; _local2 = _rootFollower; while (_local2) { if (_local2.target == _arg1){ return (_local2); }; _local2 = _local2.cachedNext; }; return (null); } override public function set scaleX(_arg1:Number):void{ super.scaleX = _arg1; renderAll(); } override public function set scaleY(_arg1:Number):void{ super.scaleY = _arg1; renderAll(); } public function lineStyle(_arg1:Number=1, _arg2:uint=0x666666, _arg3:Number=1, _arg4:Boolean=false, _arg5:String="none", _arg6:String=null, _arg7:String=null, _arg8:Number=3, _arg9:Boolean=false):void{ _thickness = _arg1; _color = _arg2; _lineAlpha = _arg3; _pixelHinting = _arg4; _scaleMode = _arg5; _caps = _arg6; _joints = _arg7; _miterLimit = _arg8; _redrawLine = true; if (!_arg9){ renderAll(); }; } override public function get height():Number{ return (super.height); } protected function onAddedToStage(_arg1:Event):void{ renderAll(); } protected function renderAll():void{ } public function get followers():Array{ var _local1:Array; var _local2:uint; var _local3:PathFollower; _local1 = []; _local2 = 0; _local3 = _rootFollower; while (_local3) { var _temp1 = _local2; _local2 = (_local2 + 1); var _local4 = _temp1; _local1[_local4] = _local3; _local3 = _local3.cachedNext; }; return (_local1); } public function get progress():Number{ return (_progress); } public function removeFollower(_arg1):void{ var _local2:PathFollower; _local2 = getFollower(_arg1); if (_local2 == null){ return; }; if (_local2.cachedNext){ _local2.cachedNext.cachedPrev = _local2.cachedPrev; }; if (_local2.cachedPrev){ _local2.cachedPrev.cachedNext = _local2.cachedNext; } else { if (_rootFollower == _local2){ _rootFollower = null; }; }; _local2.cachedNext = (_local2.cachedPrev = null); _local2.path = null; } override public function get scaleX():Number{ return (super.scaleX); } override public function get scaleY():Number{ return (super.scaleY); } override public function set height(_arg1:Number):void{ super.height = _arg1; renderAll(); } override public function set visible(_arg1:Boolean):void{ super.visible = _arg1; _redrawLine = true; renderAll(); } public function addFollower(_arg1, _arg2:Number=0):PathFollower{ var _local3:PathFollower; _local3 = ((getFollower(_arg1)) || (new PathFollower(_arg1))); if (_local3.path != this){ if (_rootFollower){ _rootFollower.cachedPrev = _local3; }; _local3.cachedNext = _rootFollower; _rootFollower = _local3; _local3.path = this; _local3.cachedProgress = _arg2; renderObjectAt(_local3.target, _arg2); }; return (_local3); } override public function get width():Number{ return (super.width); } public function set progress(_arg1:Number):void{ var _local2:Number; var _local3:PathFollower; if (_arg1 > 1){ _arg1 = (_arg1 - int(_arg1)); } else { if (_arg1 < 0){ _arg1 = (_arg1 - (int(_arg1) - 1)); }; }; _local2 = (_arg1 - _progress); _local3 = _rootFollower; while (_local3) { _local3.cachedProgress = (_local3.cachedProgress + _local2); _local3 = _local3.cachedNext; }; _progress = _arg1; renderAll(); } override public function set x(_arg1:Number):void{ super.x = _arg1; renderAll(); } override public function set y(_arg1:Number):void{ super.y = _arg1; renderAll(); } override public function get x():Number{ return (super.x); } override public function get visible():Boolean{ return (super.visible); } override public function set rotation(_arg1:Number):void{ super.rotation = _arg1; renderAll(); } override public function get rotation():Number{ return (super.rotation); } } }//package com.greensock.motionPaths
Section 44
//PathFollower (com.greensock.motionPaths.PathFollower) package com.greensock.motionPaths { public class PathFollower { public var path:MotionPath; public var target:Object; public var cachedNext:PathFollower; public var cachedProgress:Number; public var cachedPrev:PathFollower; public function PathFollower(_arg1:Object){ this.target = _arg1; this.cachedProgress = 0; } public function get progress():Number{ return (this.cachedProgress); } public function set progress(_arg1:Number):void{ if (_arg1 > 1){ _arg1 = (_arg1 - int(_arg1)); } else { if (_arg1 < 0){ _arg1 = (_arg1 - (int(_arg1) - 1)); }; }; this.cachedProgress = _arg1; if (this.path){ this.path.renderObjectAt(this.target, _arg1); }; } } }//package com.greensock.motionPaths
Section 45
//AutoAlphaPlugin (com.greensock.plugins.AutoAlphaPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; public class AutoAlphaPlugin extends TweenPlugin { protected var _ignoreVisible:Boolean; protected var _target:Object; public static const API:Number = 1; public function AutoAlphaPlugin(){ this.propName = "autoAlpha"; this.overwriteProps = ["alpha", "visible"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha"); return (true); } override public function killProps(_arg1:Object):void{ super.killProps(_arg1); _ignoreVisible = Boolean(("visible" in _arg1)); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); if (!_ignoreVisible){ _target.visible = Boolean(!((_target.alpha == 0))); }; } } }//package com.greensock.plugins
Section 46
//BevelFilterPlugin (com.greensock.plugins.BevelFilterPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; import flash.filters.*; public class BevelFilterPlugin extends FilterPlugin { public static const API:Number = 1; private static var _propNames:Array = ["distance", "angle", "highlightColor", "highlightAlpha", "shadowColor", "shadowAlpha", "blurX", "blurY", "strength", "quality"]; public function BevelFilterPlugin(){ this.propName = "bevelFilter"; this.overwriteProps = ["bevelFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = BevelFilter; initFilter(_arg2, new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_arg2.quality) || (2))), _propNames); return (true); } } }//package com.greensock.plugins
Section 47
//BezierPlugin (com.greensock.plugins.BezierPlugin) package com.greensock.plugins { import com.greensock.*; import com.greensock.core.*; public class BezierPlugin extends TweenPlugin { protected var _future:Object; protected var _orientData:Array; protected var _orient:Boolean; protected var _beziers:Object; protected var _target:Object; public static const API:Number = 1; protected static const _RAD2DEG:Number = (180 / Math.PI); public function BezierPlugin(){ _future = {}; super(); this.propName = "bezier"; this.overwriteProps = []; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg2 is Array)){ return (false); }; init(_arg3, (_arg2 as Array), false); return (true); } protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{ var _local4:Object; var _local5:Object; var _local6:int; var _local7:String; var _local8:Object; _target = _arg1.target; _local4 = ((_arg1.vars.isTV)==true) ? _arg1.vars.exposedVars : _arg1.vars; if (_local4.orientToBezier == true){ _orientData = [["x", "y", "rotation", 0, 0.01]]; _orient = true; } else { if ((_local4.orientToBezier is Array)){ _orientData = _local4.orientToBezier; _orient = true; }; }; _local5 = {}; _local6 = 0; while (_local6 < _arg2.length) { for (_local7 in _arg2[_local6]) { if (_local5[_local7] == undefined){ _local5[_local7] = [_arg1.target[_local7]]; }; if (typeof(_arg2[_local6][_local7]) == "number"){ _local5[_local7].push(_arg2[_local6][_local7]); } else { _local5[_local7].push((_arg1.target[_local7] + Number(_arg2[_local6][_local7]))); }; }; _local6++; }; for (_local7 in _local5) { this.overwriteProps[this.overwriteProps.length] = _local7; if (_local4[_local7] != undefined){ if (typeof(_local4[_local7]) == "number"){ _local5[_local7].push(_local4[_local7]); } else { _local5[_local7].push((_arg1.target[_local7] + Number(_local4[_local7]))); }; _local8 = {}; _local8[_local7] = true; _arg1.killVars(_local8, false); delete _local4[_local7]; }; }; _beziers = parseBeziers(_local5, _arg3); } override public function killProps(_arg1:Object):void{ var _local2:String; for (_local2 in _beziers) { if ((_local2 in _arg1)){ delete _beziers[_local2]; }; }; super.killProps(_arg1); } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:String; var _local4:Object; var _local5:Number; var _local6:uint; var _local7:Number; var _local8:Object; var _local9:Number; var _local10:Number; var _local11:Array; var _local12:Number; var _local13:Object; var _local14:Boolean; if (_arg1 == 1){ for (_local3 in _beziers) { _local2 = (_beziers[_local3].length - 1); _target[_local3] = _beziers[_local3][_local2][2]; }; } else { for (_local3 in _beziers) { _local6 = _beziers[_local3].length; if (_arg1 < 0){ _local2 = 0; } else { if (_arg1 >= 1){ _local2 = (_local6 - 1); } else { _local2 = int((_local6 * _arg1)); }; }; _local5 = ((_arg1 - (_local2 * (1 / _local6))) * _local6); _local4 = _beziers[_local3][_local2]; if (this.round){ _local7 = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0]))))); _target[_local3] = ((_local7)>0) ? int((_local7 + 0.5)) : int((_local7 - 0.5)); } else { _target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0]))))); }; }; }; if (_orient){ _local2 = _orientData.length; _local8 = {}; while (_local2--) { _local11 = _orientData[_local2]; _local8[_local11[0]] = _target[_local11[0]]; _local8[_local11[1]] = _target[_local11[1]]; }; _local13 = _target; _local14 = this.round; _target = _future; this.round = false; _orient = false; _local2 = _orientData.length; while (_local2--) { _local11 = _orientData[_local2]; this.changeFactor = (_arg1 + ((_local11[4]) || (0.01))); _local12 = ((_local11[3]) || (0)); _local9 = (_future[_local11[0]] - _local8[_local11[0]]); _local10 = (_future[_local11[1]] - _local8[_local11[1]]); _local13[_local11[2]] = ((Math.atan2(_local10, _local9) * _RAD2DEG) + _local12); }; _target = _local13; this.round = _local14; _orient = true; }; } public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{ var _local3:int; var _local4:Array; var _local5:Object; var _local6:String; var _local7:Object; _local7 = {}; if (_arg2){ for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 2){ _local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]]; _local3 = 1; while (_local3 < (_local4.length - 1)) { _local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]]; _local3++; }; } else { _local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]]; }; }; } else { for (_local6 in _arg1) { _local4 = _arg1[_local6]; _local5 = []; _local7[_local6] = _local5; if (_local4.length > 3){ _local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)]; _local3 = 2; while (_local3 < (_local4.length - 2)) { _local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)]; _local3++; }; _local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]]; } else { if (_local4.length == 3){ _local5[_local5.length] = [_local4[0], _local4[1], _local4[2]]; } else { if (_local4.length == 2){ _local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]]; }; }; }; }; }; return (_local7); } } }//package com.greensock.plugins
Section 48
//BezierThroughPlugin (com.greensock.plugins.BezierThroughPlugin) package com.greensock.plugins { import com.greensock.*; public class BezierThroughPlugin extends BezierPlugin { public static const API:Number = 1; public function BezierThroughPlugin(){ this.propName = "bezierThrough"; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (!(_arg2 is Array)){ return (false); }; init(_arg3, (_arg2 as Array), true); return (true); } } }//package com.greensock.plugins
Section 49
//BlurFilterPlugin (com.greensock.plugins.BlurFilterPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; import flash.filters.*; public class BlurFilterPlugin extends FilterPlugin { public static const API:Number = 1; private static var _propNames:Array = ["blurX", "blurY", "quality"]; public function BlurFilterPlugin(){ this.propName = "blurFilter"; this.overwriteProps = ["blurFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = BlurFilter; initFilter(_arg2, new BlurFilter(0, 0, ((_arg2.quality) || (2))), _propNames); return (true); } } }//package com.greensock.plugins
Section 50
//Circle2DPlugin (com.greensock.plugins.Circle2DPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; import flash.geom.*; import com.greensock.motionPaths.*; public class Circle2DPlugin extends TweenPlugin { protected var _change:Number; protected var _start:Number; protected var _circle:Circle2D; protected var _target:Object; protected var _autoRemove:Boolean; public static const API:Number = 1; private static const _2PI:Number = (Math.PI * 2); public function Circle2DPlugin(){ this.propName = "circle2D"; this.overwriteProps = ["x", "y"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:PathFollower; if (((!(("path" in _arg2))) || (!((_arg2.path is Circle2D))))){ trace("Circle2DPlugin error: invalid 'path' property. Please define a Circle2D instance."); return (false); }; _target = _arg1; _circle = (_arg2.path as Circle2D); _local4 = _circle.getFollower(_arg1); if (((!((_local4 == null))) && (!(("startAngle" in _arg2))))){ _start = _local4.progress; } else { _start = _circle.angleToProgress(((_arg2.startAngle) || (0)), _arg2.useRadians); _circle.renderObjectAt(_target, _start); }; _change = Number(_circle.anglesToProgressChange(_circle.progressToAngle(_start), ((_arg2.endAngle) || (0)), ((_arg2.direction) || ("clockwise")), ((_arg2.extraRevolutions) || (0)), Boolean(_arg2.useRadians))); return (true); } override public function killProps(_arg1:Object):void{ super.killProps(_arg1); if (((("x" in _arg1)) || (("y" in _arg1)))){ this.overwriteProps = []; }; } override public function set changeFactor(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4:Matrix; var _local5:Number; var _local6:Number; _local2 = ((_start + (_change * _arg1)) * _2PI); _local3 = _circle.radius; _local4 = _circle.transform.matrix; _local5 = (Math.cos(_local2) * _local3); _local6 = (Math.sin(_local2) * _local3); _target.x = (((_local5 * _local4.a) + (_local6 * _local4.c)) + _local4.tx); _target.y = (((_local5 * _local4.b) + (_local6 * _local4.d)) + _local4.ty); } } }//package com.greensock.plugins
Section 51
//ColorMatrixFilterPlugin (com.greensock.plugins.ColorMatrixFilterPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; import flash.filters.*; public class ColorMatrixFilterPlugin extends FilterPlugin { protected var _matrix:Array; protected var _matrixTween:EndArrayPlugin; public static const API:Number = 1; private static var _propNames:Array = []; protected static var _lumG:Number = 0.71516; protected static var _lumR:Number = 0.212671; protected static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]; protected static var _lumB:Number = 0.072169; public function ColorMatrixFilterPlugin(){ this.propName = "colorMatrixFilter"; this.overwriteProps = ["colorMatrixFilter"]; } override public function set changeFactor(_arg1:Number):void{ _matrixTween.changeFactor = _arg1; ColorMatrixFilter(_filter).matrix = _matrix; super.changeFactor = _arg1; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:Object; var _local5:Array; _target = _arg1; _type = ColorMatrixFilter; _local4 = _arg2; initFilter({remove:_arg2.remove, index:_arg2.index, addFilter:_arg2.addFilter}, new ColorMatrixFilter(_idMatrix.slice()), _propNames); _matrix = ColorMatrixFilter(_filter).matrix; _local5 = []; if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){ _local5 = _local4.matrix; } else { if (_local4.relative == true){ _local5 = _matrix.slice(); } else { _local5 = _idMatrix.slice(); }; _local5 = setBrightness(_local5, _local4.brightness); _local5 = setContrast(_local5, _local4.contrast); _local5 = setHue(_local5, _local4.hue); _local5 = setSaturation(_local5, _local4.saturation); _local5 = setThreshold(_local5, _local4.threshold); if (!isNaN(_local4.colorize)){ _local5 = colorize(_local5, _local4.colorize, _local4.amount); }; }; _matrixTween = new EndArrayPlugin(); _matrixTween.init(_matrix, _local5); return (true); } public static function setSaturation(_arg1:Array, _arg2:Number):Array{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Array; if (isNaN(_arg2)){ return (_arg1); }; _local3 = (1 - _arg2); _local4 = (_local3 * _lumR); _local5 = (_local3 * _lumG); _local6 = (_local3 * _lumB); _local7 = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local7, _arg1)); } public static function setHue(_arg1:Array, _arg2:Number):Array{ var _local3:Number; var _local4:Number; var _local5:Array; if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 * (Math.PI / 180)); _local3 = Math.cos(_arg2); _local4 = Math.sin(_arg2); _local5 = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]; return (applyMatrix(_local5, _arg1)); } public static function setContrast(_arg1:Array, _arg2:Number):Array{ var _local3:Array; if (isNaN(_arg2)){ return (_arg1); }; _arg2 = (_arg2 + 0.01); _local3 = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } public static function applyMatrix(_arg1:Array, _arg2:Array):Array{ var _local3:Array; var _local4:int; var _local5:int; var _local6:int; var _local7:int; if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){ return (_arg2); }; _local3 = []; _local4 = 0; _local5 = 0; _local6 = 0; while (_local6 < 4) { _local7 = 0; while (_local7 < 5) { if (_local7 == 4){ _local5 = _arg1[(_local4 + 4)]; } else { _local5 = 0; }; _local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5); _local7++; }; _local4 = (_local4 + 5); _local6++; }; return (_local3); } public static function setThreshold(_arg1:Array, _arg2:Number):Array{ var _local3:Array; if (isNaN(_arg2)){ return (_arg1); }; _local3 = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0]; return (applyMatrix(_local3, _arg1)); } public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Array; if (isNaN(_arg2)){ return (_arg1); }; if (isNaN(_arg3)){ _arg3 = 1; }; _local4 = (((_arg2 >> 16) & 0xFF) / 0xFF); _local5 = (((_arg2 >> 8) & 0xFF) / 0xFF); _local6 = ((_arg2 & 0xFF) / 0xFF); _local7 = (1 - _arg3); _local8 = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0]; return (applyMatrix(_local8, _arg1)); } public static function setBrightness(_arg1:Array, _arg2:Number):Array{ if (isNaN(_arg2)){ return (_arg1); }; _arg2 = ((_arg2 * 100) - 100); return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1)); } } }//package com.greensock.plugins
Section 52
//ColorTransformPlugin (com.greensock.plugins.ColorTransformPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; import flash.geom.*; public class ColorTransformPlugin extends TintPlugin { public static const API:Number = 1; public function ColorTransformPlugin(){ this.propName = "colorTransform"; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:ColorTransform; var _local5:String; var _local6:Number; if (!(_arg1 is DisplayObject)){ return (false); }; _local4 = _arg1.transform.colorTransform; for (_local5 in _arg2) { if ((((_local5 == "tint")) || ((_local5 == "color")))){ if (_arg2[_local5] != null){ _local4.color = int(_arg2[_local5]); }; } else { if ((((((_local5 == "tintAmount")) || ((_local5 == "exposure")))) || ((_local5 == "brightness")))){ } else { _local4[_local5] = _arg2[_local5]; }; }; }; if (!isNaN(_arg2.tintAmount)){ _local6 = (_arg2.tintAmount / (1 - (((_local4.redMultiplier + _local4.greenMultiplier) + _local4.blueMultiplier) / 3))); _local4.redOffset = (_local4.redOffset * _local6); _local4.greenOffset = (_local4.greenOffset * _local6); _local4.blueOffset = (_local4.blueOffset * _local6); _local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = (1 - _arg2.tintAmount))); } else { if (!isNaN(_arg2.exposure)){ _local4.redOffset = (_local4.greenOffset = (_local4.blueOffset = (0xFF * (_arg2.exposure - 1)))); _local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = 1)); } else { if (!isNaN(_arg2.brightness)){ _local4.redOffset = (_local4.greenOffset = (_local4.blueOffset = Math.max(0, ((_arg2.brightness - 1) * 0xFF)))); _local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = (1 - Math.abs((_arg2.brightness - 1))))); }; }; }; _ignoreAlpha = Boolean(((!((_arg3.vars.alpha == undefined))) && ((_arg2.alphaMultiplier == undefined)))); init((_arg1 as DisplayObject), _local4); return (true); } } }//package com.greensock.plugins
Section 53
//DropShadowFilterPlugin (com.greensock.plugins.DropShadowFilterPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; import flash.filters.*; public class DropShadowFilterPlugin extends FilterPlugin { public static const API:Number = 1; private static var _propNames:Array = ["distance", "angle", "color", "alpha", "blurX", "blurY", "strength", "quality", "inner", "knockout", "hideObject"]; public function DropShadowFilterPlugin(){ this.propName = "dropShadowFilter"; this.overwriteProps = ["dropShadowFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = DropShadowFilter; initFilter(_arg2, new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout, _arg2.hideObject), _propNames); return (true); } } }//package com.greensock.plugins
Section 54
//EndArrayPlugin (com.greensock.plugins.EndArrayPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; public class EndArrayPlugin extends TweenPlugin { protected var _info:Array; protected var _a:Array; public static const API:Number = 1; public function EndArrayPlugin(){ _info = []; super(); this.propName = "endArray"; this.overwriteProps = ["endArray"]; } public function init(_arg1:Array, _arg2:Array):void{ var _local3:int; _a = _arg1; _local3 = _arg2.length; while (_local3--) { if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){ _info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3])); }; }; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){ return (false); }; init((_arg1 as Array), _arg2); return (true); } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:ArrayTweenInfo; var _local4:Number; _local2 = _info.length; if (this.round){ while (_local2--) { _local3 = _info[_local2]; _local4 = (_local3.start + (_local3.change * _arg1)); _a[_local3.index] = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5)); }; } else { while (_local2--) { _local3 = _info[_local2]; _a[_local3.index] = (_local3.start + (_local3.change * _arg1)); }; }; } } }//package com.greensock.plugins class ArrayTweenInfo { public var change:Number; public var index:uint; public var start:Number; private function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){ this.index = _arg1; this.start = _arg2; this.change = _arg3; } }
Section 55
//FilterPlugin (com.greensock.plugins.FilterPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; import com.greensock.core.*; import flash.filters.*; public class FilterPlugin extends TweenPlugin { protected var _index:int; protected var _filter:BitmapFilter; protected var _type:Class; protected var _remove:Boolean; protected var _target:Object; public static const VERSION:Number = 2.03; public static const API:Number = 1; public function onCompleteTween():void{ var _local1:Array; var _local2:int; if (_remove){ _local1 = _target.filters; if (!(_local1[_index] is _type)){ _local2 = _local1.length; while (_local2--) { if ((_local1[_local2] is _type)){ _local1.splice(_local2, 1); break; }; }; } else { _local1.splice(_index, 1); }; _target.filters = _local1; }; } protected function initFilter(_arg1:Object, _arg2:BitmapFilter, _arg3:Array):void{ var _local4:Array; var _local5:String; var _local6:int; var _local7:HexColorsPlugin; var _local8:Object; _local4 = _target.filters; _local8 = ((_arg1 is BitmapFilter)) ? {} : _arg1; _index = -1; if (_local8.index != null){ _index = _local8.index; } else { _local6 = _local4.length; while (_local6--) { if ((_local4[_local6] is _type)){ _index = _local6; break; }; }; }; if ((((((_index == -1)) || ((_local4[_index] == null)))) || ((_local8.addFilter == true)))){ _index = ((_local8.index)!=null) ? _local8.index : _local4.length; _local4[_index] = _arg2; _target.filters = _local4; }; _filter = _local4[_index]; if (_local8.remove == true){ _remove = true; this.onComplete = onCompleteTween; }; _local6 = _arg3.length; while (_local6--) { _local5 = _arg3[_local6]; if ((((_local5 in _arg1)) && (!((_filter[_local5] == _arg1[_local5]))))){ if ((((((_local5 == "color")) || ((_local5 == "highlightColor")))) || ((_local5 == "shadowColor")))){ _local7 = new HexColorsPlugin(); _local7.initColor(_filter, _local5, _filter[_local5], _arg1[_local5]); _tweens[_tweens.length] = new PropTween(_local7, "changeFactor", 0, 1, _local5, false); } else { if ((((((((_local5 == "quality")) || ((_local5 == "inner")))) || ((_local5 == "knockout")))) || ((_local5 == "hideObject")))){ _filter[_local5] = _arg1[_local5]; } else { addTween(_filter, _local5, _filter[_local5], _arg1[_local5], _local5); }; }; }; }; } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:PropTween; var _local4:Array; _local2 = _tweens.length; _local4 = _target.filters; while (_local2--) { _local3 = _tweens[_local2]; _local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1)); }; if (!(_local4[_index] is _type)){ _local2 = (_index = _local4.length); while (_local2--) { if ((_local4[_local2] is _type)){ _index = _local2; break; }; }; }; _local4[_index] = _filter; _target.filters = _local4; } } }//package com.greensock.plugins
Section 56
//FrameLabelPlugin (com.greensock.plugins.FrameLabelPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; public class FrameLabelPlugin extends FramePlugin { public static const API:Number = 1; public function FrameLabelPlugin(){ this.propName = "frameLabel"; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:Array; var _local5:String; var _local6:int; var _local7:int; if ((!(_arg3.target) is MovieClip)){ return (false); }; _target = (_arg1 as MovieClip); this.frame = _target.currentFrame; _local4 = _target.currentLabels; _local5 = _arg2; _local6 = _target.currentFrame; _local7 = _local4.length; while (_local7--) { if (_local4[_local7].name == _local5){ _local6 = _local4[_local7].frame; break; }; }; if (this.frame != _local6){ addTween(this, "frame", this.frame, _local6, "frame"); }; return (true); } } }//package com.greensock.plugins
Section 57
//FramePlugin (com.greensock.plugins.FramePlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; public class FramePlugin extends TweenPlugin { public var frame:int; protected var _target:MovieClip; public static const API:Number = 1; public function FramePlugin(){ this.propName = "frame"; this.overwriteProps = ["frame", "frameLabel"]; this.round = true; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){ return (false); }; _target = (_arg1 as MovieClip); this.frame = _target.currentFrame; addTween(this, "frame", this.frame, _arg2, "frame"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _target.gotoAndStop(this.frame); } } }//package com.greensock.plugins
Section 58
//GlowFilterPlugin (com.greensock.plugins.GlowFilterPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; import flash.filters.*; public class GlowFilterPlugin extends FilterPlugin { public static const API:Number = 1; private static var _propNames:Array = ["color", "alpha", "blurX", "blurY", "strength", "quality", "inner", "knockout"]; public function GlowFilterPlugin(){ this.propName = "glowFilter"; this.overwriteProps = ["glowFilter"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _type = GlowFilter; initFilter(_arg2, new GlowFilter(0xFFFFFF, 0, 0, 0, ((_arg2.strength) || (1)), ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout), _propNames); return (true); } } }//package com.greensock.plugins
Section 59
//HexColorsPlugin (com.greensock.plugins.HexColorsPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; public class HexColorsPlugin extends TweenPlugin { protected var _colors:Array; public static const API:Number = 1; public function HexColorsPlugin(){ this.propName = "hexColors"; this.overwriteProps = []; _colors = []; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:String; for (_local4 in _arg2) { initColor(_arg1, _local4, uint(_arg1[_local4]), uint(_arg2[_local4])); }; return (true); } override public function killProps(_arg1:Object):void{ var _local2:int; _local2 = (_colors.length - 1); while (_local2 > -1) { if (_arg1[_colors[_local2][1]] != undefined){ _colors.splice(_local2, 1); }; _local2--; }; super.killProps(_arg1); } public function initColor(_arg1:Object, _arg2:String, _arg3:uint, _arg4:uint):void{ var _local5:Number; var _local6:Number; var _local7:Number; if (_arg3 != _arg4){ _local5 = (_arg3 >> 16); _local6 = ((_arg3 >> 8) & 0xFF); _local7 = (_arg3 & 0xFF); _colors[_colors.length] = [_arg1, _arg2, _local5, ((_arg4 >> 16) - _local5), _local6, (((_arg4 >> 8) & 0xFF) - _local6), _local7, ((_arg4 & 0xFF) - _local7)]; this.overwriteProps[this.overwriteProps.length] = _arg2; }; } override public function set changeFactor(_arg1:Number):void{ var _local2:int; var _local3:Array; _local2 = (_colors.length - 1); while (_local2 > -1) { _local3 = _colors[_local2]; _local3[0][_local3[1]] = ((((_local3[2] + (_arg1 * _local3[3])) << 16) | ((_local3[4] + (_arg1 * _local3[5])) << 8)) | (_local3[6] + (_arg1 * _local3[7]))); _local2--; }; } } }//package com.greensock.plugins
Section 60
//RemoveTintPlugin (com.greensock.plugins.RemoveTintPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; public class RemoveTintPlugin extends TintPlugin { public static const API:Number = 1; public function RemoveTintPlugin(){ this.propName = "removeTint"; } } }//package com.greensock.plugins
Section 61
//RoundPropsPlugin (com.greensock.plugins.RoundPropsPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; public class RoundPropsPlugin extends TweenPlugin { public static const API:Number = 1; public function RoundPropsPlugin(){ this.propName = "roundProps"; this.overwriteProps = []; this.round = true; } public function add(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{ addTween(_arg1, _arg2, _arg3, (_arg3 + _arg4), _arg2); this.overwriteProps[this.overwriteProps.length] = _arg2; } } }//package com.greensock.plugins
Section 62
//ShortRotationPlugin (com.greensock.plugins.ShortRotationPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; public class ShortRotationPlugin extends TweenPlugin { public static const API:Number = 1; public function ShortRotationPlugin(){ this.propName = "shortRotation"; this.overwriteProps = []; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:String; if (typeof(_arg2) == "number"){ return (false); }; for (_local4 in _arg2) { initRotation(_arg1, _local4, _arg1[_local4], ((typeof(_arg2[_local4]))=="number") ? Number(_arg2[_local4]) : (_arg1[_local4] + Number(_arg2[_local4]))); }; return (true); } public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{ var _local5:Number; _local5 = ((_arg4 - _arg3) % 360); if (((_arg4 - _arg3) % 360) != (_local5 % 180)){ _local5 = ((_local5)<0) ? (_local5 + 360) : (_local5 - 360); }; addTween(_arg1, _arg2, _arg3, (_arg3 + _local5), _arg2); this.overwriteProps[this.overwriteProps.length] = _arg2; } } }//package com.greensock.plugins
Section 63
//TintPlugin (com.greensock.plugins.TintPlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; import com.greensock.core.*; import flash.geom.*; public class TintPlugin extends TweenPlugin { protected var _ct:ColorTransform; protected var _transform:Transform; protected var _ignoreAlpha:Boolean; public static const API:Number = 1; protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"]; public function TintPlugin(){ this.propName = "tint"; this.overwriteProps = ["tint"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ var _local4:ColorTransform; if (!(_arg1 is DisplayObject)){ return (false); }; _local4 = new ColorTransform(); if (((!((_arg2 == null))) && (!((_arg3.vars.removeTint == true))))){ _local4.color = uint(_arg2); }; _ignoreAlpha = true; init((_arg1 as DisplayObject), _local4); return (true); } public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{ var _local3:int; var _local4:String; _transform = _arg1.transform; _ct = _transform.colorTransform; _local3 = _props.length; while (_local3--) { _local4 = _props[_local3]; if (_ct[_local4] != _arg2[_local4]){ _tweens[_tweens.length] = new PropTween(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false); }; }; } override public function set changeFactor(_arg1:Number):void{ var _local2:ColorTransform; updateTweens(_arg1); if (_ignoreAlpha){ _local2 = _transform.colorTransform; _ct.alphaMultiplier = _local2.alphaMultiplier; _ct.alphaOffset = _local2.alphaOffset; }; _transform.colorTransform = _ct; } } }//package com.greensock.plugins
Section 64
//TweenPlugin (com.greensock.plugins.TweenPlugin) package com.greensock.plugins { import com.greensock.*; import com.greensock.core.*; public class TweenPlugin { public var activeDisable:Boolean; public var onEnable:Function; public var round:Boolean; public var onDisable:Function; public var propName:String; protected var _tweens:Array; public var priority:int;// = 0 public var overwriteProps:Array; public var onComplete:Function; protected var _changeFactor:Number;// = 0 public static const VERSION:Number = 1.31; public static const API:Number = 1; public function TweenPlugin(){ priority = 0; _tweens = []; _changeFactor = 0; super(); } public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _changeFactor = _arg1; } protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{ var _local6:Number; if (_arg4 != null){ _local6 = ((typeof(_arg4))=="number") ? (Number(_arg4) - _arg3) : Number(_arg4); if (_local6 != 0){ _tweens[_tweens.length] = new PropTween(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false); }; }; } protected function updateTweens(_arg1:Number):void{ var _local2:int; var _local3:PropTween; var _local4:Number; _local2 = _tweens.length; if (this.round){ while (_local2--) { _local3 = _tweens[_local2]; _local4 = (_local3.start + (_local3.change * _arg1)); _local3.target[_local3.property] = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5)); }; } else { while (_local2--) { _local3 = _tweens[_local2]; _local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1)); }; }; } public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName); return (true); } public function get changeFactor():Number{ return (_changeFactor); } public function killProps(_arg1:Object):void{ var _local2:int; _local2 = this.overwriteProps.length; while (_local2--) { if ((this.overwriteProps[_local2] in _arg1)){ this.overwriteProps.splice(_local2, 1); }; }; _local2 = _tweens.length; while (_local2--) { if ((PropTween(_tweens[_local2]).name in _arg1)){ _tweens.splice(_local2, 1); }; }; } public static function activate(_arg1:Array):Boolean{ var _local2:int; var _local3:Object; TweenLite.onPluginEvent = TweenPlugin.onTweenEvent; _local2 = _arg1.length; while (_local2--) { if (_arg1[_local2].hasOwnProperty("API")){ _local3 = new ((_arg1[_local2] as Class)); TweenLite.plugins[_local3.propName] = _arg1[_local2]; }; }; return (true); } private static function onTweenEvent(_arg1:String, _arg2:TweenLite):Boolean{ var _local3:PropTween; var _local4:Boolean; var _local5:Array; var _local6:int; _local3 = _arg2.cachedPT1; if (_arg1 == "onInit"){ _local5 = []; while (_local3) { _local5[_local5.length] = _local3; _local3 = _local3.nextNode; }; _local5.sortOn("priority", (Array.NUMERIC | Array.DESCENDING)); _local6 = _local5.length; while (_local6--) { PropTween(_local5[_local6]).nextNode = _local5[(_local6 + 1)]; PropTween(_local5[_local6]).prevNode = _local5[(_local6 - 1)]; }; _arg2.cachedPT1 = _local5[0]; } else { while (_local3) { if (((_local3.isPlugin) && (_local3.target[_arg1]))){ if (_local3.target.activeDisable){ _local4 = true; }; var _local7 = _local3.target; _local7[_arg1](); }; _local3 = _local3.nextNode; }; }; return (_local4); } } }//package com.greensock.plugins
Section 65
//VisiblePlugin (com.greensock.plugins.VisiblePlugin) package com.greensock.plugins { import flash.display.*; import com.greensock.*; public class VisiblePlugin extends TweenPlugin { protected var _tween:TweenLite; protected var _visible:Boolean; protected var _target:Object; protected var _initVal:Boolean; public static const API:Number = 1; public function VisiblePlugin(){ this.propName = "visible"; this.overwriteProps = ["visible"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ _target = _arg1; _tween = _arg3; _initVal = _target.visible; _visible = Boolean(_arg2); return (true); } override public function set changeFactor(_arg1:Number):void{ if ((((_arg1 == 1)) && ((((_tween.cachedDuration == _tween.cachedTime)) || ((_tween.cachedTime == 0)))))){ _target.visible = _visible; } else { _target.visible = _initVal; }; } } }//package com.greensock.plugins
Section 66
//VolumePlugin (com.greensock.plugins.VolumePlugin) package com.greensock.plugins { import flash.media.*; import flash.display.*; import com.greensock.*; public class VolumePlugin extends TweenPlugin { protected var _st:SoundTransform; protected var _target:Object; public static const API:Number = 1; public function VolumePlugin(){ this.propName = "volume"; this.overwriteProps = ["volume"]; } override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{ if (((isNaN(_arg2)) || (!(_arg1.hasOwnProperty("soundTransform"))))){ return (false); }; _target = _arg1; _st = _target.soundTransform; addTween(_st, "volume", _st.volume, _arg2, "volume"); return (true); } override public function set changeFactor(_arg1:Number):void{ updateTweens(_arg1); _target.soundTransform = _st; } } }//package com.greensock.plugins
Section 67
//OverwriteManager (com.greensock.OverwriteManager) package com.greensock { import com.greensock.core.*; import flash.utils.*; import flash.errors.*; public class OverwriteManager { public static const ALL_ONSTART:int = 4; public static const CONCURRENT:int = 3; public static const ALL_IMMEDIATE:int = 1; public static const PREEXISTING:int = 5; public static const AUTO:int = 2; public static const version:Number = 6; public static const NONE:int = 0; public static var enabled:Boolean; public static var mode:int; public static function getGlobalPaused(_arg1:TweenCore):Boolean{ while (_arg1) { if (_arg1.cachedPaused){ return (true); }; _arg1 = _arg1.timeline; }; return (false); } public static function init(_arg1:int=2):int{ if (TweenLite.version < 11.099994){ throw (new Error("Warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com.")); }; TweenLite.overwriteManager = _slot1; mode = _arg1; enabled = true; return (mode); } public static function manageOverwrites(_arg1:TweenLite, _arg2:Object, _arg3:Array, _arg4:uint):Boolean{ var _local5:int; var _local6:Boolean; var _local7:TweenLite; var _local8:Number; var _local9:Array; var _local10:Array; var _local11:uint; var _local12:uint; var _local13:uint; var _local14:Number; var _local15:Number; var _local16:TweenCore; var _local17:Number; var _local18:SimpleTimeline; if (_arg4 >= 4){ _local13 = _arg3.length; _local5 = 0; while (_local5 < _local13) { _local7 = _arg3[_local5]; if (_local7 != _arg1){ if (_local7.setEnabled(false, false)){ _local6 = true; }; } else { if (_arg4 == 5){ break; }; }; _local5++; }; return (_local6); }; _local8 = _arg1.startTime; _local9 = []; _local10 = []; _local11 = 0; _local12 = 0; _local5 = _arg3.length; while (_local5--) { _local7 = _arg3[_local5]; if ((((_local7 == _arg1)) || (_local7.gc))){ } else { if (_local7.timeline != _arg1.timeline){ if (!getGlobalPaused(_local7)){ var _temp1 = _local11; _local11 = (_local11 + 1); var _local19 = _temp1; _local10[_local19] = _local7; }; } else { if ((((((_local7.startTime <= _local8)) && (((_local7.startTime + _local7.totalDuration) > _local8)))) && (!(getGlobalPaused(_local7))))){ var _temp2 = _local12; _local12 = (_local12 + 1); _local19 = _temp2; _local9[_local19] = _local7; }; }; }; }; if (_local11 != 0){ _local14 = _arg1.cachedTimeScale; _local15 = _local8; _local18 = _arg1.timeline; while (_local18) { _local14 = (_local14 * _local18.cachedTimeScale); _local15 = (_local15 + _local18.startTime); _local18 = _local18.timeline; }; _local8 = (_local14 * _local15); _local5 = _local11; while (_local5--) { _local16 = _local10[_local5]; _local14 = _local16.cachedTimeScale; _local15 = _local16.startTime; _local18 = _local16.timeline; while (_local18) { _local14 = (_local14 * _local18.cachedTimeScale); _local15 = (_local15 + _local18.startTime); _local18 = _local18.timeline; }; _local17 = (_local14 * _local15); if ((((_local17 <= _local8)) && (((((_local17 + (_local16.totalDuration * _local14)) > _local8)) || ((_local16.cachedDuration == 0)))))){ var _temp3 = _local12; _local12 = (_local12 + 1); _local19 = _temp3; _local9[_local19] = _local16; }; }; }; if (_local12 == 0){ return (_local6); }; _local5 = _local12; if (_arg4 == 2){ while (_local5--) { _local7 = _local9[_local5]; if (_local7.killVars(_arg2)){ _local6 = true; }; if ((((_local7.cachedPT1 == null)) && (_local7.initted))){ _local7.setEnabled(false, false); }; }; } else { while (_local5--) { if (TweenLite(_local9[_local5]).setEnabled(false, false)){ _local6 = true; }; }; }; return (_local6); } } }//package com.greensock
Section 68
//TimelineLite (com.greensock.TimelineLite) package com.greensock { import com.greensock.core.*; import flash.utils.*; public class TimelineLite extends SimpleTimeline { protected var _endCaps:Array; protected var _labels:Object; public static const version:Number = 1.2; private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(2); ; public function TimelineLite(_arg1:Object=null){ super(_arg1); _endCaps = []; _labels = {}; this.autoRemoveChildren = Boolean((this.vars.autoRemoveChildren == true)); _hasUpdate = Boolean((typeof(this.vars.onUpdate) == "function")); if ((this.vars.tweens is Array)){ this.insertMultiple(this.vars.tweens, 0, ((this.vars.align) || ("normal")), ((this.vars.stagger) || (0))); }; } public function stop():void{ this.paused = true; } public function get useFrames():Boolean{ var _local1:SimpleTimeline; _local1 = this.timeline; while (_local1.timeline) { _local1 = _local1.timeline; }; return (Boolean((_local1 == TweenLite.rootFramesTimeline))); } override public function get rawTime():Number{ if (((!((this.cachedTotalTime == 0))) && (!((this.cachedTotalTime == this.cachedTotalDuration))))){ return (this.cachedTotalTime); }; return (((this.timeline.rawTime - this.cachedStartTime) * this.cachedTimeScale)); } public function append(_arg1:TweenCore, _arg2:Number=0):void{ insert(_arg1, (this.duration + _arg2)); } public function getLabelTime(_arg1:String):Number{ return (((_arg1 in _labels)) ? Number(_labels[_arg1]) : -1); } override public function set duration(_arg1:Number):void{ if (((!((this.duration == 0))) && (!((_arg1 == 0))))){ this.timeScale = (this.duration / _arg1); }; } protected function forceChildrenToBeginning(_arg1:Number, _arg2:Boolean=false):Number{ var _local3:TweenCore; var _local4:TweenCore; var _local5:Number; _local3 = _lastChild; while (_local3) { _local4 = _local3.prevNode; if (((_local3.active) || (((((!(_local3.cachedPaused)) && (!(_local3.gc)))) && (((!((_local3.cachedTotalTime == 0))) || ((_local3.cachedDuration == 0)))))))){ if ((((_arg1 == 0)) && (((!((_local3.cachedDuration == 0))) || ((_local3.cachedStartTime == 0)))))){ _local3.renderTime((_local3.cachedReversed) ? _local3.cachedTotalDuration : 0, _arg2, false); } else { if (!_local3.cachedReversed){ _local3.renderTime(((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale), _arg2, false); } else { _local5 = (_local3.cacheIsDirty) ? _local3.totalDuration : _local3.cachedTotalDuration; _local3.renderTime((_local5 - ((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale)), _arg2, false); }; }; }; _local3 = _local4; }; return (_arg1); } override public function invalidate():void{ var _local1:TweenCore; _local1 = ((_firstChild) || (_endCaps[0])); while (_local1) { _local1.invalidate(); _local1 = _local1.nextNode; }; } public function appendMultiple(_arg1:Array, _arg2:Number=0, _arg3:String="normal", _arg4:Number=0):void{ insertMultiple(_arg1, (this.duration + _arg2), _arg3, _arg4); } public function goto(_arg1, _arg2:Boolean=true):void{ setTotalTime(parseTimeOrLabel(_arg1), _arg2); } public function clear(_arg1:Array=null):void{ var _local2:int; if (_arg1 == null){ _arg1 = getChildren(false, true, true); }; _local2 = _arg1.length; while (_local2--) { TweenCore(_arg1[_local2]).setEnabled(false, false); }; } public function getChildren(_arg1:Boolean=true, _arg2:Boolean=true, _arg3:Boolean=true, _arg4:Number=-9999999999):Array{ var _local5:Array; var _local6:TweenCore; var _local7:uint; _local5 = []; _local6 = ((_firstChild) || (_endCaps[0])); _local7 = 0; while (_local6) { if (_local6.cachedStartTime < _arg4){ } else { if ((_local6 is TweenLite)){ if (_arg2){ var _temp1 = _local7; _local7 = (_local7 + 1); var _local8 = _temp1; _local5[_local8] = _local6; }; } else { if (_arg3){ var _temp2 = _local7; _local7 = (_local7 + 1); _local8 = _temp2; _local5[_local8] = _local6; }; if (_arg1){ _local5 = _local5.concat(TimelineLite(_local6).getChildren(true, _arg2, _arg3)); }; }; }; _local6 = _local6.nextNode; }; return (_local5); } protected function forceChildrenToEnd(_arg1:Number, _arg2:Boolean=false):Number{ var _local3:TweenCore; var _local4:TweenCore; var _local5:Number; _local3 = _firstChild; while (_local3) { _local4 = _local3.nextNode; if (((_local3.active) || (((((!(_local3.cachedPaused)) && (!(_local3.gc)))) && (((!((_local3.cachedTotalTime == _local3.cachedTotalDuration))) || ((_local3.cachedDuration == 0)))))))){ if ((((_arg1 == this.cachedDuration)) && (((!((_local3.cachedDuration == 0))) || ((_local3.cachedStartTime == this.cachedDuration)))))){ _local3.renderTime((_local3.cachedReversed) ? 0 : _local3.cachedTotalDuration, _arg2, false); } else { if (!_local3.cachedReversed){ _local3.renderTime(((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale), _arg2, false); } else { _local5 = (_local3.cacheIsDirty) ? _local3.totalDuration : _local3.cachedTotalDuration; _local3.renderTime((_local5 - ((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale)), _arg2, false); }; }; }; _local3 = _local4; }; return (_arg1); } public function get timeScale():Number{ return (this.cachedTimeScale); } override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{ var _local3:TweenCore; var _local4:TweenCore; if (_arg1 == this.gc){ if (_arg1){ _local3 = _endCaps[0]; _firstChild = _local3; _lastChild = _endCaps[1]; } else { _local3 = _firstChild; _endCaps = [_firstChild, _lastChild]; _firstChild = (_lastChild = null); }; while (_local3) { _local3.setEnabled(_arg1, true); _local3 = _local3.nextNode; }; }; return (super.setEnabled(_arg1, _arg2)); } override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{ var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:TweenCore; var _local9:Boolean; var _local10:Boolean; var _local11:TweenCore; var _local12:Number; if (this.gc){ this.setEnabled(true, false); } else { if (((!(this.active)) && (!(this.cachedPaused)))){ this.active = true; }; }; _local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; _local5 = this.cachedTime; _local6 = this.cachedStartTime; _local7 = this.cachedTimeScale; if (_arg1 >= _local4){ if ((((_rawPrevTime <= _local4)) && (!((_rawPrevTime == _arg1))))){ this.cachedTotalTime = (this.cachedTime = _local4); forceChildrenToEnd(_local4, _arg2); _local9 = !(this.hasPausedChild()); _local10 = true; if ((((((this.cachedDuration == 0)) && (_local9))) && ((((_arg1 == 0)) || ((_rawPrevTime < 0)))))){ _arg3 = true; }; }; } else { if (_arg1 <= 0){ if (_arg1 < 0){ this.active = false; if ((((this.cachedDuration == 0)) && ((_rawPrevTime > 0)))){ _arg3 = true; _local9 = true; }; }; if ((((_rawPrevTime >= 0)) && (!((_rawPrevTime == _arg1))))){ forceChildrenToBeginning(0, _arg2); this.cachedTotalTime = 0; this.cachedTime = 0; _local10 = true; if (this.cachedReversed){ _local9 = true; }; }; } else { this.cachedTotalTime = (this.cachedTime = _arg1); }; }; _rawPrevTime = _arg1; if ((((this.cachedTime == _local5)) && (!(_arg3)))){ return; }; if (!this.initted){ this.initted = true; }; if ((((((((_local5 == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(_arg2)))){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (_local10){ } else { if ((this.cachedTime - _local5) > 0){ _local8 = _firstChild; while (_local8) { _local11 = _local8.nextNode; if (((_local8.active) || (((((!(_local8.cachedPaused)) && ((_local8.cachedStartTime <= this.cachedTime)))) && (!(_local8.gc)))))){ if (!_local8.cachedReversed){ _local8.renderTime(((this.cachedTime - _local8.cachedStartTime) * _local8.cachedTimeScale), _arg2, false); } else { _local12 = (_local8.cacheIsDirty) ? _local8.totalDuration : _local8.cachedTotalDuration; _local8.renderTime((_local12 - ((this.cachedTime - _local8.cachedStartTime) * _local8.cachedTimeScale)), _arg2, false); }; }; _local8 = _local11; }; } else { _local8 = _lastChild; while (_local8) { _local11 = _local8.prevNode; if (((_local8.active) || (((((!(_local8.cachedPaused)) && ((_local8.cachedStartTime <= _local5)))) && (!(_local8.gc)))))){ if (!_local8.cachedReversed){ _local8.renderTime(((this.cachedTime - _local8.cachedStartTime) * _local8.cachedTimeScale), _arg2, false); } else { _local12 = (_local8.cacheIsDirty) ? _local8.totalDuration : _local8.cachedTotalDuration; _local8.renderTime((_local12 - ((this.cachedTime - _local8.cachedStartTime) * _local8.cachedTimeScale)), _arg2, false); }; }; _local8 = _local11; }; }; }; if (((_hasUpdate) && (!(_arg2)))){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (((_local9) && ((((_local6 == this.cachedStartTime)) || (!((_local7 == this.cachedTimeScale))))))){ complete(true, _arg2); }; } public function set currentProgress(_arg1:Number):void{ setTotalTime((this.duration * _arg1), false); } public function prepend(_arg1:TweenCore, _arg2:Boolean=false):void{ shiftChildren(((_arg1.totalDuration / _arg1.cachedTimeScale) + _arg1.delay), _arg2, 0); insert(_arg1, 0); } protected function parseTimeOrLabel(_arg1):Number{ if (typeof(_arg1) == "string"){ if (!(_arg1 in _labels)){ throw (new Error((("TimelineLite error: the " + _arg1) + " label was not found."))); }; return (getLabelTime(String(_arg1))); }; return (Number(_arg1)); } override public function get duration():Number{ var _local1:Number; if (this.cacheIsDirty){ _local1 = this.totalDuration; }; return (this.cachedDuration); } public function gotoAndStop(_arg1, _arg2:Boolean=true):void{ setTotalTime(parseTimeOrLabel(_arg1), _arg2); this.paused = true; } public function hasPausedChild():Boolean{ var _local1:TweenCore; _local1 = ((_firstChild) || (_endCaps[0])); while (_local1) { if (((_local1.cachedPaused) || ((((_local1 is TimelineLite)) && ((_local1 as TimelineLite).hasPausedChild()))))){ return (true); }; _local1 = _local1.nextNode; }; return (false); } override public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{ var _local3:TweenCore; var _local4:TweenCore; if (_arg1.gc){ return; }; if (!_arg2){ _arg1.setEnabled(false, true); }; _local3 = ((_firstChild) || (_endCaps[0])); _local4 = ((_lastChild) || (_endCaps[1])); if (_arg1.nextNode){ _arg1.nextNode.prevNode = _arg1.prevNode; } else { if (_local4 == _arg1){ _local4 = _arg1.prevNode; }; }; if (_arg1.prevNode){ _arg1.prevNode.nextNode = _arg1.nextNode; } else { if (_local3 == _arg1){ _local3 = _arg1.nextNode; }; }; if (this.gc){ _endCaps[0] = _local3; _endCaps[1] = _local4; } else { _firstChild = _local3; _lastChild = _local4; }; setDirtyCache(true); } public function shiftChildren(_arg1:Number, _arg2:Boolean=false, _arg3:Number=0):void{ var _local4:TweenCore; var _local5:String; _local4 = ((_firstChild) || (_endCaps[0])); while (_local4) { if (_local4.cachedStartTime >= _arg3){ _local4.cachedStartTime = (_local4.cachedStartTime + _arg1); }; _local4 = _local4.nextNode; }; if (_arg2){ for (_local5 in _labels) { if (_labels[_local5] >= _arg3){ _labels[_local5] = (_labels[_local5] + _arg1); }; }; }; this.setDirtyCache(true); } public function insert(_arg1:TweenCore, _arg2=0):void{ if (typeof(_arg2) == "string"){ if (!(_arg2 in _labels)){ addLabel(_arg2, this.duration); }; _arg2 = Number(_labels[_arg2]); }; _arg1.cachedStartTime = (Number(_arg2) + _arg1.delay); addChild(_arg1); } public function prependMultiple(_arg1:Array, _arg2:String="normal", _arg3:Number=0, _arg4:Boolean=false):void{ var _local5:TimelineLite; _local5 = new TimelineLite({tweens:_arg1, align:_arg2, stagger:_arg3}); shiftChildren(_local5.duration, _arg4, 0); insertMultiple(_arg1, 0, _arg2, _arg3); _local5.kill(); } public function get currentProgress():Number{ return ((this.cachedTime / this.duration)); } public function gotoAndPlay(_arg1, _arg2:Boolean=true):void{ setTotalTime(parseTimeOrLabel(_arg1), _arg2); play(); } public function removeLabel(_arg1:String):Number{ var _local2:Number; _local2 = _labels[_arg1]; delete _labels[_arg1]; return (_local2); } public function addLabel(_arg1:String, _arg2:Number):void{ _labels[_arg1] = _arg2; } public function getTweensOf(_arg1:Object, _arg2:Boolean=true):Array{ var _local3:Array; var _local4:Array; var _local5:int; var _local6:uint; _local3 = getChildren(_arg2, true, false); _local4 = []; _local6 = _local3.length; _local5 = 0; while (_local5 < _local6) { if (TweenLite(_local3[_local5]).target == _arg1){ _local4[_local4.length] = _local3[_local5]; }; _local5++; }; return (_local4); } public function insertMultiple(_arg1:Array, _arg2=0, _arg3:String="normal", _arg4:Number=0):void{ var _local5:int; var _local6:TweenCore; var _local7:Number; var _local8:uint; _local7 = ((Number(_arg2)) || (0)); _local8 = _arg1.length; if (typeof(_arg2) == "string"){ if (!(_arg2 in _labels)){ addLabel(_arg2, this.duration); }; _local7 = _labels[_arg2]; }; _local5 = 0; while (_local5 < _local8) { _local6 = (_arg1[_local5] as TweenCore); insert(_local6, _local7); if (_arg3 == "sequence"){ _local7 = (_local6.cachedStartTime + (_local6.totalDuration / _local6.cachedTimeScale)); } else { if (_arg3 == "start"){ _local6.cachedStartTime = (_local6.cachedStartTime - _local6.delay); }; }; _local7 = (_local7 + _arg4); _local5++; }; } public function killTweensOf(_arg1:Object, _arg2:Boolean=true):Boolean{ var _local3:Array; var _local4:int; _local3 = getTweensOf(_arg1, _arg2); _local4 = _local3.length; while (_local4--) { TweenLite(_local3[_local4]).setEnabled(false, false); }; return (Boolean((_local3.length > 0))); } override public function set totalDuration(_arg1:Number):void{ if (((!((this.totalDuration == 0))) && (!((_arg1 == 0))))){ this.timeScale = (this.totalDuration / _arg1); }; } override public function get totalDuration():Number{ var _local1:Number; var _local2:Number; var _local3:TweenCore; var _local4:Number; var _local5:TweenCore; if (this.cacheIsDirty){ _local1 = 0; _local3 = ((_firstChild) || (_endCaps[0])); _local4 = -(Infinity); while (_local3) { _local5 = _local3.nextNode; if (_local3.cachedStartTime < _local4){ this.addChild(_local3); _local4 = _local3.prevNode.cachedStartTime; } else { _local4 = _local3.cachedStartTime; }; if (_local3.cachedStartTime < 0){ _local1 = (_local1 - _local3.cachedStartTime); this.shiftChildren(-(_local3.cachedStartTime), false, -9999999999); }; _local2 = (_local3.cachedStartTime + (_local3.totalDuration / _local3.cachedTimeScale)); if (_local2 > _local1){ _local1 = _local2; }; _local3 = _local5; }; this.cachedDuration = (this.cachedTotalDuration = _local1); this.cacheIsDirty = false; }; return (this.cachedTotalDuration); } public function set timeScale(_arg1:Number):void{ var _local2:Number; if (_arg1 == 0){ _arg1 = 0.0001; }; _local2 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime; this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1)); this.cachedTimeScale = _arg1; setDirtyCache(false); } override public function addChild(_arg1:TweenCore):void{ var _local2:TweenCore; var _local3:TweenCore; var _local4:TweenCore; var _local5:Number; if (((!(_arg1.gc)) && (_arg1.timeline))){ _arg1.timeline.remove(_arg1, true); }; _arg1.timeline = this; if (_arg1.gc){ _arg1.setEnabled(true, true); }; setDirtyCache(true); _local2 = ((_firstChild) || (_endCaps[0])); _local3 = ((_lastChild) || (_endCaps[1])); if (_local3 == null){ _local3 = _arg1; _local2 = _local3; _arg1.nextNode = (_arg1.prevNode = null); } else { _local4 = _local3; _local5 = _arg1.cachedStartTime; while (((!((_local4 == null))) && ((_local5 <= _local4.cachedStartTime)))) { _local4 = _local4.prevNode; }; if (_local4 == null){ _local2.prevNode = _arg1; _arg1.nextNode = _local2; _arg1.prevNode = null; _local2 = _arg1; } else { if (_local4.nextNode){ _local4.nextNode.prevNode = _arg1; } else { if (_local4 == _local3){ _local3 = _arg1; }; }; _arg1.prevNode = _local4; _arg1.nextNode = _local4.nextNode; _local4.nextNode = _arg1; }; }; if (this.gc){ _endCaps[0] = _local2; _endCaps[1] = _local3; } else { _firstChild = _local2; _lastChild = _local3; }; } } }//package com.greensock
Section 69
//TweenLite (com.greensock.TweenLite) package com.greensock { import flash.display.*; import flash.events.*; import com.greensock.core.*; import flash.utils.*; import com.greensock.plugins.*; public class TweenLite extends TweenCore { public var target:Object; protected var _overwrite:uint; public var ratio:Number;// = 0 protected var _notifyPluginsOfEnabled:Boolean; protected var _hasPlugins:Boolean; public var cachedPT1:PropTween; protected var _overwrittenProps:Object; public var propTweenLookup:Object; protected var _ease:Function; public static const version:Number = 11.2; public static var rootTimeline:SimpleTimeline; public static var fastEaseLookup:Dictionary = new Dictionary(false); public static var onPluginEvent:Function; public static var rootFramesTimeline:SimpleTimeline; public static var defaultEase:Function = TweenLite.easeOut; public static var plugins:Object = {}; public static var masterList:Dictionary = new Dictionary(false); public static var overwriteManager:Object; public static var rootFrame:Number; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; private static var _shape:Shape = new Shape(); protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, onInit:1, onInitParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, onReverseCompleteListener:1, onRepeatListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1}; public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){ var _local4:Array; var _local5:TweenLite; ratio = 0; super(_arg2, _arg3); this.target = _arg1; if ((((this.target is TweenCore)) && (("timeScale" in this.vars)))){ this.cachedTimeScale = 1; }; propTweenLookup = {}; _ease = defaultEase; _overwrite = (((!((Number(_arg3.overwrite) > -1))) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite); _local4 = masterList[_arg1]; if (!_local4){ masterList[_arg1] = [this]; } else { if (_overwrite == 1){ for each (_local5 in _local4) { if (!_local5.gc){ _local5.setEnabled(false, false); }; }; masterList[_arg1] = [this]; } else { _local4[_local4.length] = this; }; }; if (((this.active) || (this.vars.immediateRender))){ renderTime(0, false, true); }; } override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{ var _local4:Boolean; var _local5:Number; var _local6:PropTween; _local5 = this.cachedTime; if (_arg1 >= this.cachedDuration){ this.cachedTotalTime = (this.cachedTime = this.cachedDuration); this.ratio = 1; _local4 = true; if (this.cachedDuration == 0){ if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){ _arg3 = true; }; _rawPrevTime = _arg1; }; } else { if (_arg1 <= 0){ this.cachedTotalTime = (this.cachedTime = (this.ratio = 0)); if (_arg1 < 0){ this.active = false; if (this.cachedDuration == 0){ if (_rawPrevTime > 0){ _arg3 = true; _local4 = true; }; _rawPrevTime = _arg1; }; }; if (((this.cachedReversed) && (!((_local5 == 0))))){ _local4 = true; }; } else { this.cachedTotalTime = (this.cachedTime = _arg1); this.ratio = _ease(_arg1, 0, 1, this.cachedDuration); }; }; if ((((this.cachedTime == _local5)) && (!(_arg3)))){ return; }; if (!this.initted){ init(); if (((!(_local4)) && (this.cachedTime))){ this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration); }; }; if (((!(this.active)) && (!(this.cachedPaused)))){ this.active = true; }; if ((((((((_local5 == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(_arg2)))){ this.vars.onStart.apply(null, this.vars.onStartParams); }; _local6 = this.cachedPT1; while (_local6) { _local6.target[_local6.property] = (_local6.start + (this.ratio * _local6.change)); _local6 = _local6.nextNode; }; if (((_hasUpdate) && (!(_arg2)))){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local4){ if (((_hasPlugins) && (this.cachedPT1))){ onPluginEvent("onComplete", this); }; complete(true, _arg2); }; } protected function init():void{ var _local1:String; var _local2:int; var _local3:*; var _local4:Boolean; var _local5:Array; var _local6:PropTween; if (this.vars.onInit){ this.vars.onInit.apply(null, this.vars.onInitParams); }; if (typeof(this.vars.ease) == "function"){ _ease = this.vars.ease; }; if (this.vars.easeParams){ this.vars.proxiedEase = _ease; _ease = easeProxy; }; this.cachedPT1 = null; this.propTweenLookup = {}; for (_local1 in this.vars) { if ((((_local1 in _reservedProps)) && (!((((_local1 == "timeScale")) && ((this.target is TweenCore))))))){ } else { if ((((_local1 in plugins)) && (new ((plugins[_local1] as Class)).onInitTween(this.target, this.vars[_local1], this)))){ this.cachedPT1 = new PropTween(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1); if (this.cachedPT1.name == "_MULTIPLE_"){ _local2 = _local3.overwriteProps.length; while (_local2--) { this.propTweenLookup[_local3.overwriteProps[_local2]] = this.cachedPT1; }; } else { this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1; }; if (_local3.priority){ this.cachedPT1.priority = _local3.priority; _local4 = true; }; if (((_local3.onDisable) || (_local3.onEnable))){ _notifyPluginsOfEnabled = true; }; _hasPlugins = true; } else { this.cachedPT1 = new PropTween(this.target, _local1, Number(this.target[_local1]), ((typeof(this.vars[_local1]))=="number") ? (Number(this.vars[_local1]) - this.target[_local1]) : Number(this.vars[_local1]), _local1, false, this.cachedPT1); this.propTweenLookup[_local1] = this.cachedPT1; }; }; }; if (_local4){ onPluginEvent("onInit", this); }; if (this.vars.runBackwards){ _local6 = this.cachedPT1; while (_local6) { _local6.start = (_local6.start + _local6.change); _local6.change = -(_local6.change); _local6 = _local6.nextNode; }; }; _hasUpdate = Boolean(!((this.vars.onUpdate == null))); if (_overwrittenProps){ killVars(_overwrittenProps); if (this.cachedPT1 == null){ this.setEnabled(false, false); }; }; if ((((((((_overwrite > 1)) && (this.cachedPT1))) && (masterList[this.target]))) && ((_local5.length > 1)))){ if (overwriteManager.manageOverwrites(this, this.propTweenLookup, _local5, _overwrite)){ init(); }; }; this.initted = true; } protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } override public function invalidate():void{ if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){ onPluginEvent("onDisable", this); }; this.cachedPT1 = null; _overwrittenProps = null; _hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false))); this.propTweenLookup = {}; } public function killVars(_arg1:Object, _arg2:Boolean=true):Boolean{ var _local3:String; var _local4:PropTween; var _local5:Boolean; if (_overwrittenProps == null){ _overwrittenProps = {}; }; for (_local3 in _arg1) { if ((_local3 in propTweenLookup)){ _local4 = propTweenLookup[_local3]; if (((_local4.isPlugin) && ((_local4.name == "_MULTIPLE_")))){ _local4.target.killProps(_arg1); if (_local4.target.overwriteProps.length == 0){ _local4.name = ""; }; }; if (_local4.name != "_MULTIPLE_"){ if (_local4.nextNode){ _local4.nextNode.prevNode = _local4.prevNode; }; if (_local4.prevNode){ _local4.prevNode.nextNode = _local4.nextNode; } else { if (this.cachedPT1 == _local4){ this.cachedPT1 = _local4.nextNode; }; }; if (((_local4.isPlugin) && (_local4.target.onDisable))){ _local4.target.onDisable(); if (_local4.target.activeDisable){ _local5 = true; }; }; delete propTweenLookup[_local3]; }; }; if (_arg2){ _overwrittenProps[_local3] = 1; }; }; return (_local5); } override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{ var _local3:Array; if (_arg1){ _local3 = TweenLite.masterList[this.target]; if (!_local3){ TweenLite.masterList[this.target] = [this]; } else { _local3[_local3.length] = this; }; }; super.setEnabled(_arg1, _arg2); if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){ return (onPluginEvent((_arg1) ? "onEnable" : "onDisable", this)); }; return (false); } public static function initClass():void{ rootFrame = 0; rootTimeline = new SimpleTimeline(null); rootFramesTimeline = new SimpleTimeline(null); rootTimeline.cachedStartTime = (getTimer() * 0.001); rootFramesTimeline.cachedStartTime = rootFrame; rootTimeline.autoRemoveChildren = true; rootFramesTimeline.autoRemoveChildren = true; _shape.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true); if (overwriteManager == null){ overwriteManager = {mode:1, enabled:false}; }; } public static function killTweensOf(_arg1:Object, _arg2:Boolean=false):void{ var _local3:Array; var _local4:int; if ((_arg1 in masterList)){ _local3 = masterList[_arg1]; _local4 = _local3.length; while (_local4--) { if (!TweenLite(_local3[_local4]).gc){ if (_arg2){ TweenLite(_local3[_local4]).complete(false, false); } else { TweenLite(_local3[_local4]).setEnabled(false, false); }; }; }; delete masterList[_arg1]; }; } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ _arg3.runBackwards = true; if (!("immediateRender" in _arg3)){ _arg3.immediateRender = true; }; return (new TweenLite(_arg1, _arg2, _arg3)); } protected static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (1 - (_arg1 / _arg4)); return ((1 - (_arg1 * _arg1))); } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenLite{ return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, immediateRender:false, useFrames:_arg4, overwrite:0})); } protected static function updateAll(_arg1:Event=null):void{ var _local2:Dictionary; var _local3:Object; var _local4:Array; var _local5:int; rootTimeline.renderTime((((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale), false, false); rootFrame++; rootFramesTimeline.renderTime(((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale), false, false); if (!(rootFrame % 60)){ _local2 = masterList; for (_local3 in _local2) { _local4 = _local2[_local3]; _local5 = _local4.length; while (_local5--) { if (TweenLite(_local4[_local5]).gc){ _local4.splice(_local5, 1); }; }; if (_local4.length == 0){ delete _local2[_local3]; }; }; }; } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ return (new TweenLite(_arg1, _arg2, _arg3)); } } }//package com.greensock
Section 70
//TweenMax (com.greensock.TweenMax) package com.greensock { import flash.display.*; import flash.events.*; import com.greensock.core.*; import flash.utils.*; import com.greensock.plugins.*; import com.greensock.events.*; public class TweenMax extends TweenLite implements IEventDispatcher { protected var _easePower:uint; protected var _dispatcher:EventDispatcher; protected var _hasUpdateListener:Boolean; protected var _easeType:uint; public var yoyo:Boolean; protected var _repeat:int;// = 0 protected var _cyclesComplete:uint;// = 0 protected var _repeatDelay:Number;// = 0 public static const version:Number = 11.2; private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(2); ; public static var killTweensOf:Function = TweenLite.killTweensOf; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){ _repeat = 0; _repeatDelay = 0; _cyclesComplete = 0; super(_arg1, _arg2, _arg3); if (TweenLite.version < 11.2){ throw (new Error("TweenMax error! Please update your TweenLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com.")); }; this.yoyo = Boolean(this.vars.yoyo); _repeat = ((this.vars.repeat) || (0)); _repeatDelay = ((this.vars.repeatDelay) || (0)); this.cacheIsDirty = true; if (((((((((this.vars.onCompleteListener) || (this.vars.onUpdateListener))) || (this.vars.onStartListener))) || (this.vars.onRepeatListener))) || (this.vars.onReverseCompleteListener))){ initDispatcher(); if ((((_arg2 == 0)) && ((_delay == 0)))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); }; }; if (((("timeScale" in this.vars)) && (!((this.target is TweenCore))))){ this.cachedTimeScale = this.vars.timeScale; }; } override protected function init():void{ var _local1:TweenMax; var _local2:int; var _local3:String; var _local4:String; var _local5:Array; var _local6:Object; var _local7:PropTween; var _local8:PropTween; var _local9:int; if (this.vars.startAt){ this.vars.startAt.overwrite = 0; this.vars.startAt.immediateRender = true; _local1 = new TweenMax(this.target, 0, this.vars.startAt); }; if (_dispatcher){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.INIT)); }; super.init(); if ((_ease in fastEaseLookup)){ _easeType = fastEaseLookup[_ease][0]; _easePower = fastEaseLookup[_ease][1]; }; if (((!((this.vars.roundProps == null))) && (("roundProps" in TweenLite.plugins)))){ _local5 = this.vars.roundProps; _local9 = _local5.length; while (_local9--) { _local3 = _local5[_local9]; _local8 = this.cachedPT1; while (_local8) { if (_local8.name == _local3){ if (_local8.isPlugin){ _local8.target.round = true; } else { if (_local6 == null){ _local6 = new TweenLite.plugins.roundProps(); _local6.add(_local8.target, _local3, _local8.start, _local8.change); _hasPlugins = true; _local7 = insertPropTween(_local6, "changeFactor", 0, 1, "_MULTIPLE_", true, this.cachedPT1); this.cachedPT1 = _local7; } else { _local6.add(_local8.target, _local3, _local8.start, _local8.change); }; this.removePropTween(_local8); this.propTweenLookup[_local3] = _local7; }; } else { if (((((_local8.isPlugin) && ((_local8.name == "_MULTIPLE_")))) && (!(_local8.target.round)))){ _local4 = ((" " + _local8.target.overwriteProps.join(" ")) + " "); if (_local4.indexOf(((" " + _local3) + " ")) != -1){ _local8.target.round = true; }; }; }; _local8 = _local8.nextNode; }; }; }; } public function updateTo(_arg1:Object, _arg2:Boolean=false):void{ var _local3:Number; var _local4:String; var _local5:Number; var _local6:PropTween; var _local7:Number; _local3 = this.ratio; if (((((_arg2) && (!((this.timeline == null))))) && ((this.cachedStartTime < this.timeline.cachedTime)))){ this.cachedStartTime = this.timeline.cachedTime; this.setDirtyCache(false); if (this.gc){ this.setEnabled(true, false); } else { this.timeline.addChild(this); }; }; for (_local4 in _arg1) { this.vars[_local4] = _arg1[_local4]; }; if (this.initted){ this.initted = false; if (!_arg2){ init(); if (((((!(_arg2)) && ((this.cachedTime > 0)))) && ((this.cachedTime < this.cachedDuration)))){ _local5 = (1 / (1 - _local3)); _local6 = this.cachedPT1; while (_local6) { _local7 = (_local6.start + _local6.change); _local6.change = (_local6.change * _local5); _local6.start = (_local7 - _local6.change); _local6 = _local6.nextNode; }; }; }; }; } public function set repeat(_arg1:int):void{ _repeat = _arg1; setDirtyCache(true); } override public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{ super.complete(_arg1, _arg2); if (((!(_arg2)) && (_dispatcher))){ if ((((this.cachedTotalTime == this.cachedTotalDuration)) && (!(this.cachedReversed)))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE)); } else { if (((this.cachedReversed) && ((this.cachedTotalTime == 0)))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE)); }; }; }; } public function set totalProgress(_arg1:Number):void{ setTotalTime((this.totalDuration * _arg1), false); } override public function invalidate():void{ this.yoyo = Boolean((this.vars.yoyo == true)); _repeat = ((this.vars.repeat) || (0)); _repeatDelay = ((this.vars.repeatDelay) || (0)); _hasUpdateListener = false; if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){ initDispatcher(); }; setDirtyCache(true); super.invalidate(); } public function killProperties(_arg1:Array):void{ var _local2:Object; var _local3:int; _local2 = {}; _local3 = _arg1.length; while (_local3--) { _local2[_arg1[_local3]] = true; }; killVars(_local2); } public function dispatchEvent(_arg1:Event):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.dispatchEvent(_arg1)); } protected function insertPropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String, _arg6:Boolean, _arg7:PropTween):PropTween{ var _local8:PropTween; var _local9:Array; var _local10:int; _local8 = new PropTween(_arg1, _arg2, _arg3, ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4), _arg5, _arg6, _arg7); if (((_arg6) && ((_arg5 == "_MULTIPLE_")))){ _local9 = _arg1.overwriteProps; _local10 = _local9.length; while (_local10--) { this.propTweenLookup[_local9[_local10]] = _local8; }; } else { this.propTweenLookup[_arg5] = _local8; }; return (_local8); } public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (_dispatcher){ _dispatcher.removeEventListener(_arg1, _arg2, _arg3); }; } public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{ var _local4:Object; _local4 = {}; _local4[_arg1] = _arg2; updateTo(_local4, !(_arg3)); } public function set repeatDelay(_arg1:Number):void{ _repeatDelay = _arg1; setDirtyCache(true); } public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if (_dispatcher == null){ initDispatcher(); }; if (_arg1 == TweenEvent.UPDATE){ _hasUpdateListener = true; }; _dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } public function get timeScale():Number{ return (this.cachedTimeScale); } override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{ var _local4:Number; var _local5:Number; var _local6:Boolean; var _local7:Boolean; var _local8:Boolean; var _local9:PropTween; var _local10:Number; var _local11:uint; var _local12:Number; _local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration; _local5 = this.cachedTime; if (_arg1 >= _local4){ this.cachedTotalTime = _local4; this.cachedTime = this.cachedDuration; this.ratio = 1; _local6 = true; if (this.cachedDuration == 0){ if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){ _arg3 = true; }; _rawPrevTime = _arg1; }; } else { if (_arg1 <= 0){ if (_arg1 < 0){ this.active = false; if (this.cachedDuration == 0){ if (_rawPrevTime > 0){ _arg3 = true; _local6 = true; }; _rawPrevTime = _arg1; }; }; this.cachedTotalTime = (this.cachedTime = (this.ratio = 0)); if (((this.cachedReversed) && (!((_local5 == 0))))){ _local6 = true; }; } else { this.cachedTotalTime = (this.cachedTime = _arg1); _local8 = true; }; }; if (_repeat != 0){ _local10 = (this.cachedDuration + _repeatDelay); if (_local6){ if (((this.yoyo) && ((_repeat % 2)))){ this.cachedTime = (this.ratio = 0); }; } else { if (_arg1 > 0){ if (_cyclesComplete != (_cyclesComplete = int((this.cachedTotalTime / _local10)))){ _local7 = true; }; this.cachedTime = (((this.cachedTotalTime / _local10) - _cyclesComplete) * _local10); if (((this.yoyo) && ((_cyclesComplete % 2)))){ this.cachedTime = (this.cachedDuration - this.cachedTime); } else { if (this.cachedTime >= this.cachedDuration){ this.cachedTime = this.cachedDuration; this.ratio = 1; _local8 = false; }; }; if (this.cachedTime <= 0){ this.cachedTime = (this.ratio = 0); _local8 = false; }; }; }; }; if ((((_local5 == this.cachedTime)) && (!(_arg3)))){ return; }; if (!this.initted){ init(); }; if (((!(this.active)) && (!(this.cachedPaused)))){ this.active = true; }; if (_local8){ if (_easeType){ _local11 = _easePower; _local12 = (this.cachedTime / this.cachedDuration); if (_easeType == 2){ _local12 = (1 - _local12); this.ratio = _local12; while (_local11--) { this.ratio = (_local12 * this.ratio); }; this.ratio = (1 - this.ratio); } else { if (_easeType == 1){ this.ratio = _local12; while (_local11--) { this.ratio = (_local12 * this.ratio); }; } else { if (_local12 < 0.5){ _local12 = (_local12 * 2); this.ratio = _local12; while (_local11--) { this.ratio = (_local12 * this.ratio); }; this.ratio = (this.ratio * 0.5); } else { _local12 = ((1 - _local12) * 2); this.ratio = _local12; while (_local11--) { this.ratio = (_local12 * this.ratio); }; this.ratio = (1 - (0.5 * this.ratio)); }; }; }; } else { this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration); }; }; if ((((((_local5 == 0)) && (!((this.cachedTotalTime == 0))))) && (!(_arg2)))){ if (this.vars.onStart){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (_dispatcher){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START)); }; }; _local9 = this.cachedPT1; while (_local9) { _local9.target[_local9.property] = (_local9.start + (this.ratio * _local9.change)); _local9 = _local9.nextNode; }; if (((_hasUpdate) && (!(_arg2)))){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (((_hasUpdateListener) && (!(_arg2)))){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE)); }; if (_local6){ if (((_hasPlugins) && (this.cachedPT1))){ onPluginEvent("onComplete", this); }; complete(true, _arg2); } else { if (((_local7) && (!(_arg2)))){ if (this.vars.onRepeat){ this.vars.onRepeat.apply(null, this.vars.onRepeatParams); }; if (_dispatcher){ _dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT)); }; }; }; } public function willTrigger(_arg1:String):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.willTrigger(_arg1)); } public function set currentProgress(_arg1:Number):void{ if (_cyclesComplete == 0){ setTotalTime((this.duration * _arg1), false); } else { setTotalTime(((this.duration * _arg1) + (_cyclesComplete * this.cachedDuration)), false); }; } public function get totalProgress():Number{ return ((this.cachedTotalTime / this.totalDuration)); } protected function removePropTween(_arg1:PropTween):Boolean{ if (_arg1.nextNode){ _arg1.nextNode.prevNode = _arg1.prevNode; }; if (_arg1.prevNode){ _arg1.prevNode.nextNode = _arg1.nextNode; } else { if (this.cachedPT1 == _arg1){ this.cachedPT1 = _arg1.nextNode; }; }; if (((_arg1.isPlugin) && (_arg1.target.onDisable))){ _arg1.target.onDisable(); if (_arg1.target.activeDisable){ return (true); }; }; return (false); } public function get repeatDelay():Number{ return (_repeatDelay); } public function get repeat():int{ return (_repeat); } public function get currentProgress():Number{ return ((this.cachedTime / this.duration)); } override public function set currentTime(_arg1:Number):void{ if (_cyclesComplete == 0){ } else { if (((this.yoyo) && (((_cyclesComplete % 2) == 1)))){ _arg1 = ((this.duration - _arg1) + (_cyclesComplete * (this.cachedDuration + _repeatDelay))); } else { _arg1 = (_arg1 + (_cyclesComplete * (this.duration + _repeatDelay))); }; }; setTotalTime(_arg1, false); } protected function initDispatcher():void{ if (_dispatcher == null){ _dispatcher = new EventDispatcher(this); }; if ((this.vars.onInitListener is Function)){ _dispatcher.addEventListener(TweenEvent.INIT, this.vars.onInitListener, false, 0, true); }; if ((this.vars.onStartListener is Function)){ _dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true); }; if ((this.vars.onUpdateListener is Function)){ _dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true); _hasUpdateListener = true; }; if ((this.vars.onCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true); }; if ((this.vars.onRepeatListener is Function)){ _dispatcher.addEventListener(TweenEvent.REPEAT, this.vars.onRepeatListener, false, 0, true); }; if ((this.vars.onReverseCompleteListener is Function)){ _dispatcher.addEventListener(TweenEvent.REVERSE_COMPLETE, this.vars.onReverseCompleteListener, false, 0, true); }; } public function hasEventListener(_arg1:String):Boolean{ return (((_dispatcher)==null) ? false : _dispatcher.hasEventListener(_arg1)); } override public function set totalDuration(_arg1:Number):void{ if (_repeat == -1){ return; }; this.duration = ((_arg1 - (_repeat * _repeatDelay)) / (_repeat + 1)); } override public function get totalDuration():Number{ if (this.cacheIsDirty){ this.cachedTotalDuration = ((_repeat)==-1) ? 999999999999 : ((this.cachedDuration * (_repeat + 1)) + (_repeatDelay * _repeat)); this.cacheIsDirty = false; }; return (this.cachedTotalDuration); } public function set timeScale(_arg1:Number):void{ var _local2:Number; if (_arg1 == 0){ _arg1 = 0.0001; }; _local2 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime; this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1)); this.cachedTimeScale = _arg1; setDirtyCache(false); } public static function set globalTimeScale(_arg1:Number):void{ var _local2:SimpleTimeline; var _local3:Number; if (_arg1 == 0){ _arg1 = 0.0001; }; if (TweenLite.rootTimeline == null){ TweenLite.to({}, 0, {}); }; _local2 = TweenLite.rootTimeline; _local3 = (getTimer() * 0.001); _local2.cachedStartTime = (_local3 - (((_local3 - _local2.cachedStartTime) * _local2.cachedTimeScale) / _arg1)); _local2 = TweenLite.rootFramesTimeline; _local3 = TweenLite.rootFrame; _local2.cachedStartTime = (_local3 - (((_local3 - _local2.cachedStartTime) * _local2.cachedTimeScale) / _arg1)); TweenLite.rootFramesTimeline.cachedTimeScale = (TweenLite.rootTimeline.cachedTimeScale = _arg1); } public static function fromTo(_arg1:Object, _arg2:Number, _arg3:Object, _arg4:Object):TweenMax{ _arg4.startAt = _arg3; if (_arg3.immediateRender){ _arg4.immediateRender = true; }; return (new TweenMax(_arg1, _arg2, _arg4)); } public static function allFromTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Object, _arg5:Number=0, _arg6:Function=null, _arg7:Array=null):Array{ _arg4.startAt = _arg3; if (_arg3.immediateRender){ _arg4.immediateRender = true; }; return (allTo(_arg1, _arg2, _arg4, _arg5, _arg6, _arg7)); } public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=true):void{ changePause(true, _arg1, _arg2); } public static function getTweensOf(_arg1:Object):Array{ var _local2:Array; var _local3:Array; var _local4:int; var _local5:uint; _local2 = masterList[_arg1]; _local3 = []; if (_local2){ _local4 = _local2.length; _local5 = 0; while (_local4--) { if (!_local2[_local4].gc){ var _temp1 = _local5; _local5 = (_local5 + 1); var _local6 = _temp1; _local3[_local6] = _local2[_local4]; }; }; }; return (_local3); } public static function get globalTimeScale():Number{ return (((TweenLite.rootTimeline)==null) ? 1 : TweenLite.rootTimeline.cachedTimeScale); } public static function killChildTweensOf(_arg1:DisplayObjectContainer, _arg2:Boolean=false):void{ var _local3:Array; var _local4:Object; var _local5:DisplayObjectContainer; var _local6:int; _local3 = getAllTweens(); _local6 = _local3.length; while (_local6--) { _local4 = _local3[_local6].target; if ((_local4 is DisplayObject)){ _local5 = _local4.parent; while (_local5) { if (_local5 == _arg1){ if (_arg2){ _local3[_local6].complete(false); } else { _local3[_local6].setEnabled(false, false); }; }; _local5 = _local5.parent; }; }; }; } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenMax{ return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, immediateRender:false, useFrames:_arg4, overwrite:0})); } public static function isTweening(_arg1:Object):Boolean{ var _local2:Array; var _local3:int; var _local4:TweenLite; _local2 = getTweensOf(_arg1); _local3 = _local2.length; while (_local3--) { _local4 = _local2[_local3]; if (((_local4.active) || ((((_local4.cachedStartTime == _local4.timeline.cachedTime)) && (_local4.timeline.active))))){ return (true); }; }; return (false); } public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{ var _local4:Array; var _local5:Boolean; var _local6:int; _local4 = getAllTweens(); _local6 = _local4.length; while (_local6--) { _local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete); if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){ if (_arg1){ _local4[_local6].complete(false); } else { _local4[_local6].setEnabled(false, false); }; }; }; } private static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{ var _local4:Array; var _local5:Boolean; var _local6:int; _local4 = getAllTweens(); _local6 = _local4.length; while (_local6--) { _local5 = (TweenLite(_local4[_local6]).target == TweenLite(_local4[_local6]).vars.onComplete); if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){ TweenCore(_local4[_local6]).paused = _arg1; }; }; } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ _arg3.runBackwards = true; if (!("immediateRender" in _arg3)){ _arg3.immediateRender = true; }; return (new TweenMax(_arg1, _arg2, _arg3)); } public static function allFrom(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Number=0, _arg5:Function=null, _arg6:Array=null):Array{ _arg3.runBackwards = true; if (!("immediateRender" in _arg3)){ _arg3.immediateRender = true; }; return (allTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6)); } public static function getAllTweens():Array{ var _local1:Dictionary; var _local2:uint; var _local3:Array; var _local4:Array; var _local5:int; _local1 = masterList; _local2 = 0; _local3 = []; for each (_local4 in _local1) { _local5 = _local4.length; while (_local5--) { if (!TweenLite(_local4[_local5]).gc){ var _temp1 = _local2; _local2 = (_local2 + 1); var _local8 = _temp1; _local3[_local8] = _local4[_local5]; }; }; }; return (_local3); } public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=true):void{ changePause(false, _arg1, _arg2); } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{ return (new TweenMax(_arg1, _arg2, _arg3)); } public static function allTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Number=0, _arg5:Function=null, _arg6:Array=null):Array{ var i:int; var varsDup:Object; var p:String; var l:uint; var a:Array; var curDelay:Number; var onCompleteProxy:Function; var onCompleteParamsProxy:Array; var lastIndex:int; var targets = _arg1; var duration = _arg2; var vars = _arg3; var stagger = _arg4; var onCompleteAll = _arg5; var onCompleteAllParams = _arg6; l = targets.length; a = []; curDelay = ((vars.delay) || (0)); onCompleteProxy = vars.onComplete; onCompleteParamsProxy = vars.onCompleteParams; lastIndex = ((stagger)<=0) ? 0 : (l - 1); i = 0; while (i < l) { varsDup = {}; for (p in vars) { varsDup[p] = vars[p]; }; varsDup.delay = curDelay; if ((((i == lastIndex)) && (!((onCompleteAll == null))))){ varsDup.onComplete = function ():void{ if (onCompleteProxy != null){ onCompleteProxy.apply(null, onCompleteParamsProxy); }; onCompleteAll.apply(null, onCompleteAllParams); }; }; a[a.length] = new TweenMax(targets[i], duration, varsDup); curDelay = (curDelay + stagger); i = (i + 1); }; return (a); } TweenPlugin.activate([AutoAlphaPlugin, EndArrayPlugin, FramePlugin, RemoveTintPlugin, TintPlugin, VisiblePlugin, VolumePlugin, BevelFilterPlugin, BezierPlugin, BezierThroughPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, ColorTransformPlugin, DropShadowFilterPlugin, FrameLabelPlugin, GlowFilterPlugin, HexColorsPlugin, RoundPropsPlugin, ShortRotationPlugin, {}]); } }//package com.greensock
Section 71
//SoundManager (com.reintroducing.sound.SoundManager) package com.reintroducing.sound { import flash.media.*; import com.greensock.*; import flash.utils.*; import flash.net.*; import com.greensock.easing.*; import com.greensock.plugins.*; public class SoundManager { private var _soundsDict:Dictionary; private var _sounds:Array; private static var _instance:SoundManager; private static var _allowInstance:Boolean; public function SoundManager(){ this._soundsDict = new Dictionary(true); this._sounds = new Array(); if (!SoundManager._allowInstance){ throw (new Error("Error: Use SoundManager.getInstance() instead of the new keyword.")); }; } public function fadeSound(_arg1:String, _arg2:Number=0, _arg3:Number=1):void{ var _local4:SoundChannel; _local4 = this._soundsDict[_arg1].channel; TweenLite.to(_local4, _arg3, {volume:_arg2}); } public function get sounds():Array{ return (this._sounds); } public function getSoundDuration(_arg1:String):Number{ return (this._soundsDict[_arg1].sound.length); } public function setSoundVolume(_arg1:String, _arg2:Number):void{ var _local3:Object; var _local4:SoundTransform; _local3 = this._soundsDict[_arg1]; _local4 = _local3.channel.soundTransform; _local4.volume = _arg2; _local3.channel.soundTransform = _local4; } public function getSoundVolume(_arg1:String):Number{ return (this._soundsDict[_arg1].channel.soundTransform.volume); } public function addLibrarySound(_arg1, _arg2:String):Boolean{ var _local3:int; var _local4:Object; var _local5:Sound; _local3 = 0; while (_local3 < this._sounds.length) { if (this._sounds[_local3].name == _arg2){ return (false); }; _local3++; }; _local4 = new Object(); _local5 = new (_arg1); _local4.name = _arg2; _local4.sound = _local5; _local4.channel = new SoundChannel(); _local4.position = 0; _local4.paused = true; _local4.volume = 1; _local4.startTime = 0; _local4.loops = 0; _local4.pausedByAll = false; this._soundsDict[_arg2] = _local4; this._sounds.push(_local4); return (true); } public function toString():String{ return (getQualifiedClassName(this)); } public function isSoundPaused(_arg1:String):Boolean{ return (this._soundsDict[_arg1].paused); } public function removeAllSounds():void{ var _local1:int; _local1 = 0; while (_local1 < this._sounds.length) { this._sounds[_local1] = null; _local1++; }; this._sounds = new Array(); this._soundsDict = new Dictionary(true); } public function getSoundPosition(_arg1:String):Number{ return (this._soundsDict[_arg1].channel.position); } public function stopAllSounds(_arg1:Boolean=true):void{ var _local2:int; var _local3:String; _local2 = 0; while (_local2 < this._sounds.length) { _local3 = this._sounds[_local2].name; if (_arg1){ if (!this._soundsDict[_local3].paused){ this._soundsDict[_local3].pausedByAll = true; this.stopSound(_local3); }; } else { this.stopSound(_local3); }; _local2++; }; } public function removeSound(_arg1:String):void{ var _local2:int; _local2 = 0; while (_local2 < this._sounds.length) { if (this._sounds[_local2].name == _arg1){ this._sounds[_local2] = null; this._sounds.splice(_local2, 1); }; _local2++; }; delete this._soundsDict[_arg1]; } public function muteAllSounds():void{ var _local1:int; var _local2:String; _local1 = 0; while (_local1 < this._sounds.length) { _local2 = this._sounds[_local1].name; this.setSoundVolume(_local2, 0); _local1++; }; } public function stopSound(_arg1:String):void{ var _local2:Object; _local2 = this._soundsDict[_arg1]; _local2.paused = true; _local2.channel.stop(); _local2.position = _local2.channel.position; } public function pauseAllSounds(_arg1:Boolean=true):void{ var _local2:int; var _local3:String; _local2 = 0; while (_local2 < this._sounds.length) { _local3 = this._sounds[_local2].name; if (_arg1){ if (!this._soundsDict[_local3].paused){ this._soundsDict[_local3].pausedByAll = true; this.pauseSound(_local3); }; } else { this.pauseSound(_local3); }; _local2++; }; } public function playAllSounds(_arg1:Boolean=false):void{ var _local2:int; var _local3:String; _local2 = 0; while (_local2 < this._sounds.length) { _local3 = this._sounds[_local2].name; if (_arg1){ if (this._soundsDict[_local3].pausedByAll){ this._soundsDict[_local3].pausedByAll = false; this.playSound(_local3); }; } else { this.playSound(_local3); }; _local2++; }; } public function addExternalSound(_arg1:String, _arg2:String, _arg3:Number=1000, _arg4:Boolean=false):Boolean{ var _local5:int; var _local6:Object; var _local7:Sound; _local5 = 0; while (_local5 < this._sounds.length) { if (this._sounds[_local5].name == _arg2){ return (false); }; _local5++; }; _local6 = new Object(); _local7 = new Sound(new URLRequest(_arg1), new SoundLoaderContext(_arg3, _arg4)); _local6.name = _arg2; _local6.sound = _local7; _local6.channel = new SoundChannel(); _local6.position = 0; _local6.paused = true; _local6.volume = 1; _local6.startTime = 0; _local6.loops = 0; _local6.pausedByAll = false; this._soundsDict[_arg2] = _local6; this._sounds.push(_local6); return (true); } public function unmuteAllSounds():void{ var _local1:int; var _local2:String; var _local3:Object; var _local4:SoundTransform; _local1 = 0; while (_local1 < this._sounds.length) { _local2 = this._sounds[_local1].name; _local3 = this._soundsDict[_local2]; _local4 = _local3.channel.soundTransform; _local4.volume = _local3.volume; _local3.channel.soundTransform = _local4; _local1++; }; } public function isSoundPausedByAll(_arg1:String):Boolean{ return (this._soundsDict[_arg1].pausedByAll); } public function getSoundObject(_arg1:String):Sound{ return (this._soundsDict[_arg1].sound); } public function pauseSound(_arg1:String):void{ var _local2:Object; _local2 = this._soundsDict[_arg1]; _local2.paused = true; _local2.position = _local2.channel.position; _local2.channel.stop(); } public function playSound(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4:int=0):void{ var _local5:Object; _local5 = this._soundsDict[_arg1]; _local5.volume = _arg2; _local5.startTime = _arg3; _local5.loops = _arg4; if (_local5.paused){ _local5.channel = _local5.sound.play(_local5.position, _local5.loops, new SoundTransform(_local5.volume)); } else { _local5.channel = _local5.sound.play(_arg3, _local5.loops, new SoundTransform(_local5.volume)); }; _local5.paused = false; } public static function getInstance():SoundManager{ if (SoundManager._instance == null){ SoundManager._allowInstance = true; SoundManager._instance = new (SoundManager); SoundManager._allowInstance = false; }; return (SoundManager._instance); } } var _local1:* = TweenPlugin.activate([VolumePlugin]); return (_local1); }//package com.reintroducing.sound
Section 72
//MochiAd (mochi.as3.MochiAd) package mochi.as3 { import flash.display.*; import flash.events.*; import flash.utils.*; import flash.net.*; import flash.system.*; public class MochiAd { public static function getVersion():String{ return (MochiServices.getVersion()); } 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 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 = _slot1._parseOptions(options, DEFAULTS); clip = options.clip; ad_timeout = options.ad_timeout; delete options.ad_timeout; if (!_slot1.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ _slot1._cleanup(mc); options.ad_finished(); }; wh = _slot1._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{ _slot1.unload(clip); }; mc.adLoaded = options.ad_loaded; mc.adSkipped = options.ad_skipped; mc.rpc = function (_arg1:Number, _arg2:Object):void{ _slot1.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; 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 = _slot1._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 (!_slot1.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ _slot1._cleanup(mc); options.ad_finished(); }; wh = _slot1._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 { _slot1.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ _slot1.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{ _slot1.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(); _slot1.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 = _slot1._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = _slot1.getVersion(); clip = options.clip; if (!(clip is DisplayObject)){ trace("Warning: Object passed as container clip not a descendant of the DisplayObject type"); return (null); }; if (MovieClip(clip).stage == null){ trace("Warning: Container clip for ad is not attached to the stage"); return (null); }; if (!_slot1._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 = _slot1._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(); mc.regContLC = function (_arg1:String):void{ mc._containerLCName = _arg1; }; loader = new Loader(); g = function (_arg1:Object):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); _slot1.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"); }); if (!options.skip){ 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": _slot1.setValue(_arg1, _arg3.objectName, _arg3.value); break; case "getValue": _local4 = _slot1.getValue(_arg1, _arg3.objectName); _arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4); break; case "runMethod": _local5 = _slot1.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_w:Number; 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 progress:Number; 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{ }, progress_override:function (_arg1:Object):Number{ return (NaN); }, bar_offset:0}; options = _slot1._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; if (options.skip){ ad_timeout = 0; }; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!_slot1.load(options)){ options.ad_failed(); options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ var fn:Function; _slot1._cleanup(mc); fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; wh = _slot1._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 + options.bar_offset); bar.y = (h - 20); }; bar_w = ((w - bar.x) - 10); 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(bar_w, 0); backing.lineTo(bar_w, 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(bar_w, 0); inside.lineTo(bar_w, 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(bar_w, 0); outline.lineTo(bar_w, 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 { _slot1.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; progress = Math.min(1, options.progress_override(clip)); f = function (_arg1:Event):void{ _arg1.target.removeEventListener(_arg1.type, arguments.callee); complete = true; if (unloaded){ _slot1.unload(clip); }; }; if (!isNaN(progress)){ complete = (progress == 1); } else { if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){ complete = true; } else { if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; } else { clip.loaderInfo.addEventListener(Event.COMPLETE, f); }; } else { clip.loaderInfo.addEventListener(Event.COMPLETE, f); }; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ _slot1.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{ _slot1.rpc(clip, _arg1, _arg2); }; mc.rpcTestFn = function (_arg1:String):Object{ trace(("[MOCHIAD rpcTestFn] " + _arg1)); return (_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:Number; var _local10:Object; var _local11:Number; var _local12: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; _local7 = Math.min(1, options.progress_override(_local1)); if (_local7 == 1){ complete = true; }; if (complete){ _local6 = Math.max(1, _local6); _local5 = _local6; }; _local8 = ((100 * _local6) / _local5); if (!isNaN(_local7)){ _local8 = (100 * _local7); }; _local9 = ((100 * _local3) / chk.ad_msec); _local10 = this._mochiad_bar._inside; _local11 = Math.min(100, Math.min(((_local8) || (0)), _local9)); _local11 = Math.max(this.last_pcnt, _local11); this.last_pcnt = _local11; _local10.scaleX = (_local11 * 0.01); options.ad_progress(_local11); if (sendHostProgress){ clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local8}); if (_local8 >= 100){ sendHostProgress = false; }; }; if (!chk.showing){ _local12 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal; if (_local12 > 0){ chk.showing = true; chk.started = getTimer(); _slot1.adShowing(clip); } else { if ((((_local3 > chk.ad_timeout)) && ((_local8 == 100)))){ options.ad_failed(); _local4 = true; }; }; }; if (_local3 > chk.ad_msec){ _local4 = true; }; if (((complete) && (_local4))){ if (unloaded){ _slot1.unload(_local1); } else { 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"); _slot1.showPreGameAd(_arg1); } public static function showTimedAd(_arg1:Object):void{ trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0"); _slot1.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 mochi.as3
Section 73
//MochiCoins (mochi.as3.MochiCoins) package mochi.as3 { public class MochiCoins { public static const STORE_HIDE:String = "StoreHide"; public static const NO_USER:String = "NoUser"; public static const IO_ERROR:String = "IOError"; public static const ITEM_NEW:String = "ItemNew"; public static const ITEM_OWNED:String = "ItemOwned"; public static const STORE_ITEMS:String = "StoreItems"; public static const ERROR:String = "Error"; public static const STORE_SHOW:String = "StoreShow"; public static var _inventory:MochiInventory; public static function triggerEvent(_arg1:String, _arg2:Object):void{ MochiSocial.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ MochiSocial.removeEventListener(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ MochiSocial.addEventListener(_arg1, _arg2); } public static function getStoreItems():void{ MochiServices.send("coins_getStoreItems"); } public static function get inventory():MochiInventory{ return (_inventory); } public static function showStore(_arg1:Object=null):void{ MochiServices.bringToTop(); MochiServices.send("coins_showStore", {options:_arg1}, null, null); } public static function showItem(_arg1:Object=null):void{ if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){ trace("ERROR: showItem call must pass an Object with an item key"); return; }; MochiServices.bringToTop(); MochiServices.send("coins_showItem", {options:_arg1}, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function showVideo(_arg1:Object=null):void{ if (((!(_arg1)) || (!((typeof(_arg1.item) == "string"))))){ trace("ERROR: showVideo call must pass an Object with an item key"); return; }; MochiServices.bringToTop(); MochiServices.send("coins_showVideo", {options:_arg1}, null, null); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{ _inventory = new MochiInventory(); }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{ _inventory = null; }); } }//package mochi.as3
Section 74
//MochiDigits (mochi.as3.MochiDigits) package 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 mochi.as3
Section 75
//MochiEventDispatcher (mochi.as3.MochiEventDispatcher) package mochi.as3 { public class MochiEventDispatcher { private var eventTable:Object; public function MochiEventDispatcher():void{ eventTable = {}; } public function triggerEvent(_arg1:String, _arg2:Object):void{ var _local3:Object; if (eventTable[_arg1] == undefined){ return; }; for (_local3 in eventTable[_arg1]) { var _local6 = eventTable[_arg1]; _local6[_local3](_arg2); }; } public function removeEventListener(_arg1:String, _arg2:Function):void{ var _local3:Object; if (eventTable[_arg1] == undefined){ eventTable[_arg1] = []; return; }; for (_local3 in eventTable[_arg1]) { if (eventTable[_arg1][_local3] != _arg2){ } else { eventTable[_arg1].splice(Number(_local3), 1); }; }; } public function addEventListener(_arg1:String, _arg2:Function):void{ removeEventListener(_arg1, _arg2); eventTable[_arg1].push(_arg2); } } }//package mochi.as3
Section 76
//MochiEvents (mochi.as3.MochiEvents) package mochi.as3 { import flash.display.*; public class MochiEvents { public static const ALIGN_BOTTOM_LEFT:String = "ALIGN_BL"; public static const FORMAT_LONG:String = "LongForm"; public static const ALIGN_BOTTOM:String = "ALIGN_B"; public static const ACHIEVEMENT_RECEIVED:String = "AchievementReceived"; public static const FORMAT_SHORT:String = "ShortForm"; public static const ALIGN_TOP_RIGHT:String = "ALIGN_TR"; public static const ALIGN_BOTTOM_RIGHT:String = "ALIGN_BR"; public static const ALIGN_TOP:String = "ALIGN_T"; public static const ALIGN_LEFT:String = "ALIGN_L"; public static const ALIGN_RIGHT:String = "ALIGN_R"; public static const ALIGN_TOP_LEFT:String = "ALIGN_TL"; public static const ALIGN_CENTER:String = "ALIGN_C"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); private static var gameStart:Number; private static var levelStart:Number; public static function endPlay():void{ MochiServices.send("events_clearRoundID", null, null, null); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function trackEvent(_arg1:String, _arg2=null):void{ MochiServices.send("events_trackEvent", {tag:_arg1, value:_arg2}, null, null); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function startSession(_arg1:String):void{ MochiServices.send("events_beginSession", {achievementID:_arg1}, null, null); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function setNotifications(_arg1:MovieClip, _arg2:Object):void{ var _local3:Object; var _local4:Object; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; _local3.clip = _arg1; MochiServices.send("events_setNotifications", _local3, null, null); } public static function getVersion():String{ return (MochiServices.getVersion()); } public static function startPlay(_arg1:String="gameplay"):void{ MochiServices.send("events_setRoundID", {tag:String(_arg1)}, null, null); } } }//package mochi.as3
Section 77
//MochiInventory (mochi.as3.MochiInventory) package mochi.as3 { import flash.events.*; import flash.utils.*; public dynamic class MochiInventory extends Proxy { private var _timer:Timer; private var _names:Array; private var _consumableProperties:Object; private var _syncID:Number; private var _storeSync:Object; private var _outstandingID:Number; private var _syncPending:Boolean; public static const READY:String = "InvReady"; public static const ERROR:String = "Error"; public static const IO_ERROR:String = "IoError"; private static const KEY_SALT:String = " syncMaint"; public static const WRITTEN:String = "InvWritten"; public static const NOT_READY:String = "InvNotReady"; public static const VALUE_ERROR:String = "InvValueError"; private static const CONSUMER_KEY:String = "MochiConsumables"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public function MochiInventory():void{ MochiCoins.addEventListener(MochiCoins.ITEM_OWNED, itemOwned); MochiCoins.addEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.addEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, loggedOut); _storeSync = new Object(); _syncPending = false; _outstandingID = 0; _syncID = 0; _timer = new Timer(1000); _timer.addEventListener(TimerEvent.TIMER, sync); _timer.start(); if (MochiSocial.loggedIn){ loggedIn(); } else { loggedOut(); }; } private function newItems(_arg1:Object):void{ if (!this[(_arg1.id + KEY_SALT)]){ this[(_arg1.id + KEY_SALT)] = 0; }; if (!this[_arg1.id]){ this[_arg1.id] = 0; }; this[(_arg1.id + KEY_SALT)] = (this[(_arg1.id + KEY_SALT)] + _arg1.count); this[_arg1.id] = (this[_arg1.id] + _arg1.count); if (_arg1.privateProperties.consumable){ if (!this[_arg1.privateProperties.tag]){ this[_arg1.privateProperties.tag] = 0; }; this[_arg1.privateProperties.tag] = (this[_arg1.privateProperties.tag] + (_arg1.privateProperties.inc * _arg1.count)); }; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (-1); }; if (_consumableProperties[_arg1]){ return (MochiDigits(_consumableProperties[_arg1]).value); }; return (undefined); } public function release():void{ MochiCoins.removeEventListener(MochiCoins.ITEM_NEW, newItems); MochiSocial.removeEventListener(MochiSocial.LOGGED_IN, loggedIn); MochiSocial.removeEventListener(MochiSocial.LOGGED_OUT, loggedOut); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function hasProperty(_arg1):Boolean{ if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return (false); }; if (_consumableProperties[_arg1] == undefined){ return (false); }; return (true); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextNameIndex(_arg1:int):int{ return (((_arg1)>=_names.length) ? 0 : (_arg1 + 1)); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ var _local3:MochiDigits; if (_consumableProperties == null){ triggerEvent(ERROR, {type:NOT_READY}); return; }; if (!(_arg2 is Number)){ triggerEvent(ERROR, {type:VALUE_ERROR, error:"Invalid type", arg:_arg2}); return; }; if (_consumableProperties[_arg1]){ _local3 = MochiDigits(_consumableProperties[_arg1]); if (_local3.value == _arg2){ return; }; _local3.value = _arg2; } else { _names.push(_arg1); _consumableProperties[_arg1] = new MochiDigits(_arg2); }; _syncID++; } private function sync(_arg1:Event=null):void{ var _local2:Object; var _local3:String; if (((_syncPending) || ((_syncID == _outstandingID)))){ return; }; _outstandingID = _syncID; _local2 = {}; for (_local3 in _consumableProperties) { _local2[_local3] = MochiDigits(_consumableProperties[_local3]).value; }; MochiUserData.put(CONSUMER_KEY, _local2, putConsumableBag); _syncPending = true; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function nextName(_arg1:int):String{ return (_names[(_arg1 - 1)]); } private function loggedIn(_arg1:Object=null):void{ MochiUserData.get(CONSUMER_KEY, getConsumableBag); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function deleteProperty(_arg1):Boolean{ if (!_consumableProperties[_arg1]){ return (false); }; _names.splice(_names.indexOf(_arg1), 1); delete _consumableProperties[_arg1]; return (true); } private function itemOwned(_arg1:Object):void{ _storeSync[_arg1.id] = {properties:_arg1.properties, count:_arg1.count}; } private function putConsumableBag(_arg1:MochiUserData):void{ _syncPending = false; if (_arg1.error){ triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error}); _outstandingID = -1; }; triggerEvent(WRITTEN, {}); } private function getConsumableBag(_arg1:MochiUserData):void{ var _local2:String; var _local3:Number; if (_arg1.error){ triggerEvent(ERROR, {type:IO_ERROR, error:_arg1.error}); return; }; _consumableProperties = {}; _names = new Array(); if (_arg1.data){ for (_local2 in _arg1.data) { _names.push(_local2); _consumableProperties[_local2] = new MochiDigits(_arg1.data[_local2]); }; }; for (_local2 in _storeSync) { _local3 = _storeSync[_local2].count; if (_consumableProperties[(_local2 + KEY_SALT)]){ _local3 = (_local3 - _consumableProperties[_local2]); }; if (_local3 == 0){ } else { newItems({id:_local2, count:_local3, properties:_storeSync[_local2].properties}); }; }; triggerEvent(READY, {}); } private function loggedOut(_arg1:Object=null):void{ _consumableProperties = null; } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } } }//package mochi.as3
Section 78
//MochiScores (mochi.as3.MochiScores) package mochi.as3 { import flash.display.*; import flash.text.*; public class MochiScores { private static var boardID:String; public static var onErrorHandler:Object; public static var onCloseHandler:Object; public static function showLeaderboard(_arg1:Object=null):void{ var n:Number; var options = _arg1; if (options != null){ delete options.clip; MochiServices.setContainer(); MochiServices.bringToTop(); 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 (_slot1.boardID != null){ options.boardID = _slot1.boardID; }; }; MochiServices.warnID(options.boardID, true); 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) && ((_arg1.error == true)))) && (onErrorHandler))){ if (_arg1.errorCode == null){ _arg1.errorCode = "IOError"; }; onErrorHandler(_arg1.errorCode); MochiServices.doClose(); return; }; onCloseHandler(); MochiServices.doClose(); } public static function setBoardID(_arg1:String):void{ MochiServices.warnID(_arg1, true); _slot1.boardID = _arg1; MochiServices.send("scores_setBoardID", {boardID:_arg1}); } } }//package mochi.as3
Section 79
//MochiServices (mochi.as3.MochiServices) package mochi.as3 { import flash.display.*; import flash.events.*; 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 _queue:Array; private static var _swfVersion:String; private static var _preserved:Object; public static var netupAttempted:Boolean = false; private static var _sendChannel:LocalConnection; public static var servicesSync:MochiSync = new MochiSync(); private static var _nextCallbackID:Number; private static var _clip:MovieClip; private static var _id:String; private static var _services:String = "services.swf"; private static var _servURL:String = "http://www.mochiads.com/static/lib/services/"; public static var widget:Boolean = false; private static var _timer:Timer; private static var _sendChannelName:String; private static var _loader:Loader; private static var _callbacks:Object; private static var _connecting:Boolean = false; private static var _mochiLocalConnection:MovieClip; private static var _listenChannelName:String = "__ms_"; public static var onError:Object; public static var netup:Boolean = true; private static var _mochiLC:String = "MochiLC.swf"; public static function isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function get connected():Boolean{ return (_connected); } private static function onReceive(_arg1:Object):void{ var cb:String; var cblst:Object; var method:*; var methodName:String; var obj:Object; var pkg = _arg1; cb = pkg.callbackID; cblst = _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 _callbacks[cb]; } public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{ if (_connected){ _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_nextCallbackID}); } else { if ((((_clip == null)) || (!(_connecting)))){ trace(("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + _arg1)); handleError(_arg2, _arg3, _arg4); flush(true); return; }; _queue.push({methodName:_arg1, args:_arg2, callbackID:_nextCallbackID}); }; if (_clip != null){ if (_callbacks != null){ _callbacks[_nextCallbackID] = {callbackObject:_arg3, callbackMethod:_arg4}; _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().time)); _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, _slot1.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 { _mochiLocalConnection.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.8 as3"); } public static function doClose():void{ _container.removeEventListener(Event.ENTER_FRAME, _slot1.bringToTop); } public static function warnID(_arg1:String, _arg2:Boolean):void{ var _local3:Number; _arg1 = _arg1.toLowerCase(); if (_arg1.length != 16){ trace((("WARNING: " + (_arg2) ? "board" : "game") + " ID is not the appropriate length")); return; } else { if (_arg1 == "1e113c7239048b3f"){ if (_arg2){ trace("WARNING: Using testing board ID"); } else { trace("WARNING: Using testing board ID as game ID"); }; return; } else { if (_arg1 == "84993a1de4031cd8"){ if (_arg2){ trace("WARNING: Using testing game ID as board ID"); } else { trace("WARNING: Using testing game ID"); }; return; }; }; }; _local3 = 0; while (_local3 < _arg1.length) { switch (_arg1.charAt(_local3)){ case "0": case "1": case "2": case "3": case "4": case "5": case "6": case "7": case "8": case "9": case "a": case "b": case "c": case "d": case "e": case "f": break; default: trace(("WARNING: Board ID contains illegal characters: " + _arg1)); return; }; _local3++; }; } private static function flush(_arg1:Boolean):void{ var _local2:Object; var _local3:Object; if (((_clip) && (_queue))){ while (_queue.length > 0) { _local2 = _queue.shift(); _local3 = null; if (_local2 != null){ if (_local2.callbackID != null){ _local3 = _callbacks[_local2.callbackID]; }; delete _callbacks[_local2.callbackID]; if (((_arg1) && (!((_local3 == null))))){ handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod); }; }; }; }; } public static function get id():String{ return (_id); } private static function onEvent(_arg1:Object):void{ var _local2:String; var _local3:String; _local2 = _arg1.target; _local3 = _arg1.event; switch (_local2){ case "events": MochiEvents.triggerEvent(_arg1.event, _arg1.args); break; case "coins": MochiCoins.triggerEvent(_arg1.event, _arg1.args); break; case "sync": servicesSync.triggerEvent(_arg1.event, _arg1.args); break; }; } private static function urlOptions(_arg1:Object):Object{ var _local2:Object; var _local3:String; var _local4:Array; var _local5:Number; var _local6:Array; _local2 = {}; if (_arg1.stage){ _local3 = _arg1.stage.loaderInfo.parameters.mochiad_options; } else { _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 (_clip.parent){ _clip.parent.removeChild(_clip); }; if (_arg1 != null){ if ((_arg1 is DisplayObjectContainer)){ _container = _arg1; }; }; if (_arg2){ if ((_container is DisplayObjectContainer)){ DisplayObjectContainer(_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 loadError(_arg1:Object):void{ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load."); _slot1.disconnect(); _slot1.onError("IOError"); } private static function initComChannels():void{ if (!_connected){ trace("[SERVICES_API] connected!"); _connecting = false; _connected = true; _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"}); _mochiLocalConnection.send(_sendChannelName, "onReceive", {methodName:"registerGame", preserved:_preserved, id:_id, version:getVersion(), parentURL:_container.loaderInfo.loaderURL}); _clip.onReceive = onReceive; _clip.onEvent = onEvent; _clip.onError = function ():void{ _slot1.onError("IOError"); }; while (_queue.length > 0) { _mochiLocalConnection.send(_sendChannelName, "onReceive", _queue.shift()); }; }; } private static function loadLCBridge(_arg1:Object):void{ var loader:Loader; var mochiLCURL:String; var req:URLRequest; var complete:Function; var clip = _arg1; loader = new Loader(); mochiLCURL = (_servURL + _mochiLC); req = new URLRequest(mochiLCURL); complete = function (_arg1:Object):void{ _mochiLocalConnection = MovieClip(loader.content); listen(); }; loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); loader.load(req); clip.addChild(loader); } private static function listen():void{ _mochiLocalConnection.connect(_listenChannelName); _clip.handshake = function (_arg1:Object):void{ _slot1.comChannelName = _arg1.newChannel; }; trace("Waiting for MochiAds services to connect..."); } public static function get clip():Object{ return (_container); } public static function set comChannelName(_arg1:String):void{ if (_arg1 != null){ if (_arg1.length > 3){ _sendChannelName = (_arg1 + "_fromgame"); initComChannels(); }; }; } private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{ var _local3:String; var _local4:URLRequest; var _local5:URLVariables; if (_clip != null){ return (_clip); }; if (!_slot1.isNetworkAvailable()){ return (null); }; if (urlOptions(_arg2).servURL){ _servURL = urlOptions(_arg2).servURL; }; _local3 = (_servURL + _services); if (urlOptions(_arg2).servicesURL){ _local3 = urlOptions(_arg2).servicesURL; }; _listenChannelName = (_listenChannelName + ((Math.floor(new Date().time) + "_") + Math.floor((Math.random() * 99999)))); _slot1.allowDomains(_local3); _clip = new MovieClip(); loadLCBridge(_clip); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError); _local4 = new URLRequest(_local3); _local5 = new URLVariables(); _local5.listenLC = _listenChannelName; _local5.mochiad_options = _arg2.loaderInfo.parameters.mochiad_options; _local5.api_version = getVersion(); if (widget){ _local5.widget = true; }; _local4.data = _local5; _loader.load(_local4); _clip.addChild(_loader); _sendChannel = new LocalConnection(); _queue = []; _nextCallbackID = 0; _callbacks = {}; _timer = new Timer(10000, 1); _timer.addEventListener(TimerEvent.TIMER, connectWait); _timer.start(); return (_clip); } public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{ var id = _arg1; var clip = _arg2; var onError = _arg3; warnID(id, false); if ((clip is DisplayObject)){ if (clip.stage == null){ trace("MochiServices connect requires the containing clip be attached to the stage"); }; 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){ _slot1.onError = onError; } else { if (_slot1.onError == null){ _slot1.onError = function (_arg1:String):void{ trace(_arg1); }; }; }; } public static function updateCopy(_arg1:Object):void{ _slot1.send("coins_updateCopy", _arg1, null, null); } public static function bringToTop(_arg1:Event=null):void{ var e = _arg1; if (((!((_slot1.clip == null))) && (!((_slot1.childClip == null))))){ try { if (_slot1.clip.numChildren > 1){ _slot1.clip.setChildIndex(_slot1.childClip, (_slot1.clip.numChildren - 1)); }; } catch(errorObject:Error) { trace("Warning: Depth sort error."); _container.removeEventListener(Event.ENTER_FRAME, _slot1.bringToTop); }; }; } public static function connectWait(_arg1:TimerEvent):void{ if (!_connected){ _clip._mochiad_ctr_failed = true; trace("MochiServices could not load. (timeout)"); _slot1.disconnect(); _slot1.onError("IOError"); }; } } }//package mochi.as3
Section 80
//MochiSocial (mochi.as3.MochiSocial) package mochi.as3 { public class MochiSocial { public static const LOGGED_IN:String = "LoggedIn"; public static const PROFILE_HIDE:String = "ProfileHide"; public static const NO_USER:String = "NoUser"; public static const PROPERTIES_SIZE:String = "PropertiesSize"; public static const IO_ERROR:String = "IOError"; public static const PROPERTIES_SAVED:String = "PropertySaved"; public static const WIDGET_LOADED:String = "WidgetLoaded"; public static const USER_INFO:String = "UserInfo"; public static const ERROR:String = "Error"; public static const LOGIN_SHOW:String = "LoginShow"; public static const LOGGED_OUT:String = "LoggedOut"; public static const PROFILE_SHOW:String = "ProfileShow"; public static const LOGIN_SHOWN:String = "LoginShown"; public static const LOGIN_HIDE:String = "LoginHide"; private static var _dispatcher:MochiEventDispatcher = new MochiEventDispatcher(); public static var _user_info:Object = null; public static function getVersion():String{ return (MochiServices.getVersion()); } public static function saveUserProperties(_arg1:Object):void{ MochiServices.send("coins_saveUserProperties", _arg1); } public static function get loggedIn():Boolean{ return (!((_user_info == null))); } public static function triggerEvent(_arg1:String, _arg2:Object):void{ _dispatcher.triggerEvent(_arg1, _arg2); } public static function addEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } public static function getUserInfo():void{ MochiServices.send("coins_getUserInfo"); } public static function showLoginWidget(_arg1:Object=null):void{ MochiServices.setContainer(); MochiServices.bringToTop(); MochiServices.send("coins_showLoginWidget", {options:_arg1}); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.removeEventListener(_arg1, _arg2); } public static function requestLogin():void{ MochiServices.send("coins_requestLogin"); } public static function getAPIURL():String{ if (!_user_info){ return (null); }; return (_user_info.api_url); } public static function hideLoginWidget():void{ MochiServices.send("coins_hideLoginWidget"); } public static function getAPIToken():String{ if (!_user_info){ return (null); }; return (_user_info.api_token); } MochiSocial.addEventListener(MochiSocial.LOGGED_IN, function (_arg1:Object):void{ _user_info = _arg1; }); MochiSocial.addEventListener(MochiSocial.LOGGED_OUT, function (_arg1:Object):void{ _user_info = null; }); } }//package mochi.as3
Section 81
//MochiSync (mochi.as3.MochiSync) package mochi.as3 { import flash.utils.*; public dynamic class MochiSync extends Proxy { private var _syncContainer:Object; public static var SYNC_PROPERTY:String = "UpdateProperty"; public static var SYNC_REQUEST:String = "SyncRequest"; public function MochiSync():void{ _syncContainer = {}; } public function triggerEvent(_arg1:String, _arg2:Object):void{ switch (_arg1){ case SYNC_REQUEST: MochiServices.send("sync_syncronize", _syncContainer); break; case SYNC_PROPERTY: _syncContainer[_arg2.name] = _arg2.value; break; }; } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function getProperty(_arg1){ return (_syncContainer[_arg1]); } override "http://www.adobe.com/2006/actionscript/flash/proxy"?? function setProperty(_arg1, _arg2):void{ var _local3:String; if (_syncContainer[_arg1] == _arg2){ return; }; _local3 = _arg1.toString(); _syncContainer[_local3] = _arg2; MochiServices.send("sync_propUpdate", {name:_local3, value:_arg2}); } } }//package mochi.as3
Section 82
//MochiUserData (mochi.as3.MochiUserData) package mochi.as3 { import flash.events.*; import flash.utils.*; import flash.net.*; public class MochiUserData extends EventDispatcher { public var callback:Function;// = null public var error:Event;// = null public var key:String;// = null public var operation:String;// = null public var data;// = null public var _loader:URLLoader; public function MochiUserData(_arg1:String="", _arg2:Function=null){ key = null; data = null; error = null; operation = null; callback = null; super(); this.key = _arg1; this.callback = _arg2; } public function securityErrorHandler(_arg1:SecurityErrorEvent):void{ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + _arg1.toString()))); } public function putEvent(_arg1):void{ request("put", serialize(_arg1)); } public function request(_arg1:String, _arg2:ByteArray):void{ var api_url:String; var api_token:String; var args:URLVariables; var req:URLRequest; var _operation = _arg1; var _data = _arg2; operation = _operation; api_url = MochiSocial.getAPIURL(); api_token = MochiSocial.getAPIToken(); if ((((api_url == null)) || ((api_token == null)))){ errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, "not logged in")); return; }; _loader = new URLLoader(); args = new URLVariables(); args.op = _operation; args.key = key; req = new URLRequest((((MochiSocial.getAPIURL() + "/") + "MochiUserData?") + args.toString())); req.method = URLRequestMethod.POST; req.contentType = "application/x-mochi-userdata"; req.requestHeaders = [new URLRequestHeader("x-mochi-services-version", MochiServices.getVersion()), new URLRequestHeader("x-mochi-api-token", api_token)]; req.data = _data; _loader.dataFormat = URLLoaderDataFormat.BINARY; _loader.addEventListener(Event.COMPLETE, completeHandler); _loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); try { _loader.load(req); } catch(e:SecurityError) { errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("security error: " + e.toString()))); }; } public function completeHandler(_arg1:Event):void{ var event = _arg1; try { if (_loader.data.length){ data = deserialize(_loader.data); } else { data = null; }; } catch(e:Error) { errorHandler(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, ("deserialize error: " + e.toString()))); return; }; if (callback != null){ performCallback(); } else { dispatchEvent(event); }; close(); } public function performCallback():void{ try { callback(this); } catch(e:Error) { trace(("[MochiUserData] exception during callback: " + e)); }; } public function serialize(_arg1):ByteArray{ var _local2:ByteArray; _local2 = new ByteArray(); _local2.objectEncoding = ObjectEncoding.AMF3; _local2.writeObject(_arg1); _local2.compress(); return (_local2); } public function errorHandler(_arg1:IOErrorEvent):void{ data = null; error = _arg1; if (callback != null){ performCallback(); } else { dispatchEvent(_arg1); }; close(); } public function getEvent():void{ request("get", serialize(null)); } override public function toString():String{ return ((((((((("[MochiUserData operation=" + operation) + " key=\"") + key) + "\" data=") + data) + " error=\"") + error) + "\"]")); } public function close():void{ if (_loader){ _loader.removeEventListener(Event.COMPLETE, completeHandler); _loader.removeEventListener(IOErrorEvent.IO_ERROR, errorHandler); _loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler); _loader.close(); _loader = null; }; error = null; callback = null; } public function deserialize(_arg1:ByteArray){ _arg1.objectEncoding = ObjectEncoding.AMF3; _arg1.uncompress(); return (_arg1.readObject()); } public static function get(_arg1:String, _arg2:Function):void{ var _local3:MochiUserData; _local3 = new MochiUserData(_arg1, _arg2); _local3.getEvent(); } public static function put(_arg1:String, _arg2, _arg3:Function):void{ var _local4:MochiUserData; _local4 = new MochiUserData(_arg1, _arg3); _local4.putEvent(_arg2); } } }//package mochi.as3
Section 83
//_sounds_35 (SpinnerGame_fla._sounds_35) package SpinnerGame_fla { import flash.media.*; import flash.display.*; import flash.events.*; import flash.geom.*; import flash.filters.*; import flash.utils.*; import flash.net.*; import flash.text.*; import flash.system.*; import flash.errors.*; import flash.accessibility.*; import flash.ui.*; public dynamic class _sounds_35 extends MovieClip { public function _sounds_35(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package SpinnerGame_fla
Section 84
//charged_15 (SpinnerGame_fla.charged_15) package SpinnerGame_fla { import flash.media.*; import flash.display.*; import flash.events.*; import flash.geom.*; import flash.filters.*; import flash.utils.*; import flash.net.*; import flash.text.*; import flash.system.*; import flash.errors.*; import flash.accessibility.*; import flash.ui.*; public dynamic class charged_15 extends MovieClip { public function charged_15(){ addFrameScript(1, frame2); } function frame2(){ if (Math.random() > 0.94){ gotoAndPlay(3); } else { gotoAndPlay(1); }; } } }//package SpinnerGame_fla
Section 85
//Levelmenu_26 (SpinnerGame_fla.Levelmenu_26) package SpinnerGame_fla { import flash.media.*; import flash.display.*; import flash.events.*; import flash.geom.*; import flash.filters.*; import flash.utils.*; import flash.net.*; import flash.text.*; import flash.system.*; import flash.errors.*; import flash.accessibility.*; import flash.ui.*; public dynamic class Levelmenu_26 extends MovieClip { public function Levelmenu_26(){ addFrameScript(0, frame1, 18, frame19); } function frame1(){ stop(); } function frame19(){ stop(); } } }//package SpinnerGame_fla
Section 86
//Tube_33 (SpinnerGame_fla.Tube_33) package SpinnerGame_fla { import flash.display.*; public dynamic class Tube_33 extends MovieClip { public var progressbar:MovieClip; } }//package SpinnerGame_fla
Section 87
//btn_arcadeous (btn_arcadeous) package { import flash.display.*; public dynamic class btn_arcadeous extends BitmapData { public function btn_arcadeous(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 88
//btn_arcadeous2 (btn_arcadeous2) package { import flash.display.*; public dynamic class btn_arcadeous2 extends BitmapData { public function btn_arcadeous2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 89
//btn_moregames (btn_moregames) package { import flash.display.*; public dynamic class btn_moregames extends BitmapData { public function btn_moregames(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 90
//btn_moregames2 (btn_moregames2) package { import flash.display.*; public dynamic class btn_moregames2 extends BitmapData { public function btn_moregames2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 91
//btn_moregames3 (btn_moregames3) package { import flash.display.*; public dynamic class btn_moregames3 extends BitmapData { public function btn_moregames3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 92
//btn_music1 (btn_music1) package { import flash.display.*; public dynamic class btn_music1 extends BitmapData { public function btn_music1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 93
//btn_music2 (btn_music2) package { import flash.display.*; public dynamic class btn_music2 extends BitmapData { public function btn_music2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 94
//btn_music3 (btn_music3) package { import flash.display.*; public dynamic class btn_music3 extends BitmapData { public function btn_music3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 95
//btn_pas (btn_pas) package { import flash.display.*; public dynamic class btn_pas extends BitmapData { public function btn_pas(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 96
//btn_pas2 (btn_pas2) package { import flash.display.*; public dynamic class btn_pas2 extends BitmapData { public function btn_pas2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 97
//btn_pause (btn_pause) package { import flash.display.*; public dynamic class btn_pause extends BitmapData { public function btn_pause(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 98
//btn_pause2 (btn_pause2) package { import flash.display.*; public dynamic class btn_pause2 extends BitmapData { public function btn_pause2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 99
//btn_pause3 (btn_pause3) package { import flash.display.*; public dynamic class btn_pause3 extends BitmapData { public function btn_pause3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 100
//btn_playgame (btn_playgame) package { import flash.display.*; public dynamic class btn_playgame extends BitmapData { public function btn_playgame(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 101
//btn_playgame2 (btn_playgame2) package { import flash.display.*; public dynamic class btn_playgame2 extends BitmapData { public function btn_playgame2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 102
//btn_playgame3 (btn_playgame3) package { import flash.display.*; public dynamic class btn_playgame3 extends BitmapData { public function btn_playgame3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 103
//btn_skip (btn_skip) package { import flash.display.*; public dynamic class btn_skip extends BitmapData { public function btn_skip(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 104
//btn_skip2 (btn_skip2) package { import flash.display.*; public dynamic class btn_skip2 extends BitmapData { public function btn_skip2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 105
//btn_skip3 (btn_skip3) package { import flash.display.*; public dynamic class btn_skip3 extends BitmapData { public function btn_skip3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 106
//btn_sound1 (btn_sound1) package { import flash.display.*; public dynamic class btn_sound1 extends BitmapData { public function btn_sound1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 107
//btn_sound2 (btn_sound2) package { import flash.display.*; public dynamic class btn_sound2 extends BitmapData { public function btn_sound2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 108
//btn_sound3 (btn_sound3) package { import flash.display.*; public dynamic class btn_sound3 extends BitmapData { public function btn_sound3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 109
//button_back (button_back) package { import flash.display.*; public dynamic class button_back extends BitmapData { public function button_back(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 110
//button_back2 (button_back2) package { import flash.display.*; public dynamic class button_back2 extends BitmapData { public function button_back2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 111
//button_back3 (button_back3) package { import flash.display.*; public dynamic class button_back3 extends BitmapData { public function button_back3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 112
//button_highscores (button_highscores) package { import flash.display.*; public dynamic class button_highscores extends BitmapData { public function button_highscores(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 113
//button_highscores2 (button_highscores2) package { import flash.display.*; public dynamic class button_highscores2 extends BitmapData { public function button_highscores2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 114
//button_highscores3 (button_highscores3) package { import flash.display.*; public dynamic class button_highscores3 extends BitmapData { public function button_highscores3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 115
//button_level (button_level) package { import flash.display.*; public dynamic class button_level extends BitmapData { public function button_level(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 116
//button_level_complete (button_level_complete) package { import flash.display.*; public dynamic class button_level_complete extends BitmapData { public function button_level_complete(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 117
//button_mainmenu (button_mainmenu) package { import flash.display.*; public dynamic class button_mainmenu extends BitmapData { public function button_mainmenu(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 118
//button_mainmenu2 (button_mainmenu2) package { import flash.display.*; public dynamic class button_mainmenu2 extends BitmapData { public function button_mainmenu2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 119
//button_mainmenu3 (button_mainmenu3) package { import flash.display.*; public dynamic class button_mainmenu3 extends BitmapData { public function button_mainmenu3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 120
//button_restart (button_restart) package { import flash.display.*; public dynamic class button_restart extends BitmapData { public function button_restart(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 121
//button_restart2 (button_restart2) package { import flash.display.*; public dynamic class button_restart2 extends BitmapData { public function button_restart2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 122
//button_restart3 (button_restart3) package { import flash.display.*; public dynamic class button_restart3 extends BitmapData { public function button_restart3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 123
//CourierB (CourierB) package { import flash.text.*; public dynamic class CourierB extends Font { } }//package
Section 124
//game_paused (game_paused) package { import flash.display.*; public dynamic class game_paused extends BitmapData { public function game_paused(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 125
//GameFrame (GameFrame) package { import flash.display.*; public dynamic class GameFrame extends MovieClip { } }//package
Section 126
//imgInstructions1 (imgInstructions1) package { import flash.display.*; public dynamic class imgInstructions1 extends BitmapData { public function imgInstructions1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 127
//imgInstructions2 (imgInstructions2) package { import flash.display.*; public dynamic class imgInstructions2 extends BitmapData { public function imgInstructions2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 128
//imgInstructions3 (imgInstructions3) package { import flash.display.*; public dynamic class imgInstructions3 extends BitmapData { public function imgInstructions3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 129
//imgMore1 (imgMore1) package { import flash.display.*; public dynamic class imgMore1 extends BitmapData { public function imgMore1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 130
//imgMore2 (imgMore2) package { import flash.display.*; public dynamic class imgMore2 extends BitmapData { public function imgMore2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 131
//imgMore3 (imgMore3) package { import flash.display.*; public dynamic class imgMore3 extends BitmapData { public function imgMore3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 132
//imgPlay1 (imgPlay1) package { import flash.display.*; public dynamic class imgPlay1 extends BitmapData { public function imgPlay1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 133
//imgPlay2 (imgPlay2) package { import flash.display.*; public dynamic class imgPlay2 extends BitmapData { public function imgPlay2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 134
//imgPlay3 (imgPlay3) package { import flash.display.*; public dynamic class imgPlay3 extends BitmapData { public function imgPlay3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 135
//level_failed (level_failed) package { import flash.display.*; public dynamic class level_failed extends BitmapData { public function level_failed(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 136
//locked_level (locked_level) package { import flash.display.*; public dynamic class locked_level extends BitmapData { public function locked_level(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 137
//menu_ambient (menu_ambient) package { import flash.media.*; public dynamic class menu_ambient extends Sound { } }//package
Section 138
//MochiBot (MochiBot) package { import flash.display.*; import flash.net.*; import flash.system.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ var _local3:MochiBot; var _local4:String; var _local5:URLVariables; var _local6:String; var _local7:URLRequest; var _local8:Loader; if (Security.sandboxType == "localWithFile"){ return (null); }; _local3 = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); _local4 = "http://core.mochibot.com/my/core.swf"; _local5 = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; _local6 = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; _local7 = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; _local8 = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 139
//MyLogo (MyLogo) package { import flash.display.*; public dynamic class MyLogo extends MovieClip { } }//package
Section 140
//panel_small (panel_small) package { import flash.display.*; public dynamic class panel_small extends BitmapData { public function panel_small(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 141
//Particle (Particle) package { import flash.media.*; import flash.display.*; import flash.events.*; import flash.geom.*; import flash.filters.*; import flash.utils.*; import flash.net.*; import flash.text.*; import flash.system.*; import flash.errors.*; import flash.accessibility.*; import flash.ui.*; public dynamic class Particle extends MovieClip { public function Particle(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 142
//sound_break (sound_break) package { import flash.media.*; public dynamic class sound_break extends Sound { } }//package
Section 143
//sound_button (sound_button) package { import flash.media.*; public dynamic class sound_button extends Sound { } }//package
Section 144
//sound_charge (sound_charge) package { import flash.media.*; public dynamic class sound_charge extends Sound { } }//package
Section 145
//sound_clock (sound_clock) package { import flash.media.*; public dynamic class sound_clock extends Sound { } }//package
Section 146
//sound_contact (sound_contact) package { import flash.media.*; public dynamic class sound_contact extends Sound { } }//package
Section 147
//sound_explosion (sound_explosion) package { import flash.media.*; public dynamic class sound_explosion extends Sound { } }//package
Section 148
//sound_firework (sound_firework) package { import flash.media.*; public dynamic class sound_firework extends Sound { } }//package
Section 149
//sound_flip (sound_flip) package { import flash.media.*; public dynamic class sound_flip extends Sound { } }//package
Section 150
//sound_levelbutton (sound_levelbutton) package { import flash.media.*; public dynamic class sound_levelbutton extends Sound { } }//package
Section 151
//sound_leveldone (sound_leveldone) package { import flash.media.*; public dynamic class sound_leveldone extends Sound { } }//package
Section 152
//sound_shock (sound_shock) package { import flash.media.*; public dynamic class sound_shock extends Sound { } }//package
Section 153
//sound_startlevel (sound_startlevel) package { import flash.media.*; public dynamic class sound_startlevel extends Sound { } }//package
Section 154
//sound_tube (sound_tube) package { import flash.media.*; public dynamic class sound_tube extends Sound { } }//package
Section 155
//sound_wall (sound_wall) package { import flash.media.*; public dynamic class sound_wall extends Sound { } }//package
Section 156
//SponsorLogo (SponsorLogo) package { import flash.display.*; public dynamic class SponsorLogo extends MovieClip { } }//package

Library Items

Symbol 1 BitmapUsed by:2 215
Symbol 2 GraphicUses:1Used by:3 89 158
Symbol 3 MovieClipUses:2Used by:4
Symbol 4 MovieClip {classes.Preloader}Uses:3
Symbol 5 BitmapUsed by:6
Symbol 6 GraphicUses:5Used by:7
Symbol 7 MovieClip {SponsorLogo}Uses:6
Symbol 8 BitmapUsed by:9
Symbol 9 GraphicUses:8Used by:10
Symbol 10 MovieClip {MyLogo}Uses:9Used by:253
Symbol 11 Bitmap {imgPlay3}Used by:253
Symbol 12 Bitmap {imgPlay2}Used by:253
Symbol 13 Bitmap {imgPlay1}Used by:253
Symbol 14 Bitmap {btn_moregames}Used by:253
Symbol 15 Bitmap {btn_moregames2}Used by:253
Symbol 16 Bitmap {btn_moregames3}Used by:253
Symbol 17 Bitmap {btn_pause}Used by:253
Symbol 18 Bitmap {btn_pause2}Used by:253
Symbol 19 Bitmap {btn_pause3}Used by:253
Symbol 20 Bitmap {button_back}Used by:253
Symbol 21 Bitmap {button_back2}Used by:253
Symbol 22 Bitmap {button_back3}Used by:253
Symbol 23 Bitmap {imgInstructions1}Used by:253
Symbol 24 Bitmap {imgInstructions2}Used by:253
Symbol 25 Bitmap {imgInstructions3}Used by:253
Symbol 26 Bitmap {imgMore1}Used by:253
Symbol 27 Bitmap {imgMore2}Used by:253
Symbol 28 Bitmap {imgMore3}Used by:253
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClipUses:29Used by:89 98 253
Symbol 31 GraphicUsed by:32
Symbol 32 MovieClipUses:31Used by:37
Symbol 33 GraphicUsed by:36
Symbol 34 GraphicUsed by:36
Symbol 35 GraphicUsed by:36
Symbol 36 MovieClipUses:33 34 35Used by:37
Symbol 37 MovieClip {classes.EnemyShock}Uses:32 36Used by:253
Symbol 38 GraphicUsed by:57
Symbol 39 GraphicUsed by:56
Symbol 40 GraphicUsed by:56
Symbol 41 GraphicUsed by:56
Symbol 42 GraphicUsed by:56
Symbol 43 GraphicUsed by:56
Symbol 44 GraphicUsed by:56
Symbol 45 GraphicUsed by:56
Symbol 46 GraphicUsed by:56
Symbol 47 GraphicUsed by:56
Symbol 48 GraphicUsed by:56
Symbol 49 GraphicUsed by:56
Symbol 50 GraphicUsed by:56
Symbol 51 GraphicUsed by:56
Symbol 52 GraphicUsed by:56
Symbol 53 GraphicUsed by:56
Symbol 54 GraphicUsed by:56
Symbol 55 GraphicUsed by:56
Symbol 56 MovieClipUses:39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55Used by:57 89
Symbol 57 MovieClip {classes.Signal}Uses:38 56Used by:253
Symbol 58 GraphicUsed by:59
Symbol 59 MovieClipUses:58Used by:65
Symbol 60 GraphicUsed by:61 89
Symbol 61 MovieClipUses:60Used by:65
Symbol 62 GraphicUsed by:63
Symbol 63 MovieClipUses:62Used by:65
Symbol 64 GraphicUsed by:65
Symbol 65 MovieClip {classes.Rotor}Uses:59 61 63 64Used by:66
Symbol 66 MovieClip {classes.Spinner}Uses:65Used by:253
Symbol 67 BitmapUsed by:68
Symbol 68 GraphicUses:67Used by:89 158
Symbol 69 BitmapUsed by:70
Symbol 70 GraphicUses:69Used by:71 98
Symbol 71 MovieClipUses:70Used by:89
Symbol 72 GraphicUsed by:75
Symbol 73 GraphicUsed by:74
Symbol 74 MovieClipUses:73Used by:75
Symbol 75 MovieClip {SpinnerGame_fla.charged_15}Uses:72 74Used by:89 98
Symbol 76 GraphicUsed by:89
Symbol 77 Font {CourierB}Used by:78 87 155 156
Symbol 78 TextUses:77Used by:89
Symbol 79 FontUsed by:80 83 84 85 159 160 162
Symbol 80 TextUses:79Used by:86
Symbol 81 FontUsed by:82 159 160 162
Symbol 82 TextUses:81Used by:86
Symbol 83 TextUses:79Used by:86
Symbol 84 TextUses:79Used by:86
Symbol 85 TextUses:79Used by:86
Symbol 86 MovieClipUses:80 82 83 84 85Used by:89
Symbol 87 TextUses:77Used by:88
Symbol 88 MovieClipUses:87Used by:89
Symbol 89 MovieClip {classes.InstructionsMenu}Uses:2 68 30 71 56 60 75 76 78 86 88Used by:253
Symbol 90 GraphicUsed by:93
Symbol 91 GraphicUsed by:93
Symbol 92 GraphicUsed by:93
Symbol 93 MovieClip {classes.Ampermeter}Uses:90 91 92Used by:140 253
Symbol 94 BitmapUsed by:95
Symbol 95 GraphicUses:94Used by:98
Symbol 96 BitmapUsed by:97
Symbol 97 GraphicUses:96Used by:98
Symbol 98 MovieClip {classes.Contact}Uses:70 30 75 95 97Used by:253
Symbol 99 Bitmap {btn_music1}Used by:253
Symbol 100 Bitmap {btn_music2}Used by:253
Symbol 101 Bitmap {btn_music3}Used by:253
Symbol 102 Bitmap {btn_sound1}Used by:253
Symbol 103 Bitmap {btn_sound2}Used by:253
Symbol 104 Bitmap {btn_sound3}Used by:253
Symbol 105 BitmapUsed by:106
Symbol 106 GraphicUses:105Used by:135
Symbol 107 BitmapUsed by:108
Symbol 108 GraphicUses:107Used by:135
Symbol 109 BitmapUsed by:110
Symbol 110 GraphicUses:109Used by:135
Symbol 111 BitmapUsed by:112
Symbol 112 GraphicUses:111Used by:135
Symbol 113 BitmapUsed by:114
Symbol 114 GraphicUses:113Used by:135
Symbol 115 BitmapUsed by:116
Symbol 116 GraphicUses:115Used by:135
Symbol 117 BitmapUsed by:118
Symbol 118 GraphicUses:117Used by:135
Symbol 119 BitmapUsed by:120
Symbol 120 GraphicUses:119Used by:135
Symbol 121 BitmapUsed by:122
Symbol 122 GraphicUses:121Used by:135
Symbol 123 BitmapUsed by:124
Symbol 124 GraphicUses:123Used by:135
Symbol 125 BitmapUsed by:126
Symbol 126 GraphicUses:125Used by:135
Symbol 127 BitmapUsed by:128
Symbol 128 GraphicUses:127Used by:135
Symbol 129 BitmapUsed by:130
Symbol 130 GraphicUses:129Used by:135
Symbol 131 BitmapUsed by:132
Symbol 132 GraphicUses:131Used by:135
Symbol 133 BitmapUsed by:134
Symbol 134 GraphicUses:133Used by:135
Symbol 135 MovieClip {classes.GameBackground}Uses:106 108 110 112 114 116 118 120 122 124 126 128 130 132 134Used by:253
Symbol 136 GraphicUsed by:137
Symbol 137 MovieClip {classes.Game}Uses:136Used by:253
Symbol 138 BitmapUsed by:139
Symbol 139 GraphicUses:138Used by:140
Symbol 140 MovieClip {GameFrame}Uses:139 93Used by:253
Symbol 141 Bitmap {button_mainmenu}Used by:253
Symbol 142 Bitmap {button_mainmenu2}Used by:253
Symbol 143 Bitmap {button_mainmenu3}Used by:253
Symbol 144 Bitmap {button_restart}Used by:253
Symbol 145 Bitmap {button_restart2}Used by:253
Symbol 146 Bitmap {button_restart3}Used by:253
Symbol 147 Bitmap {btn_playgame}Used by:253
Symbol 148 Bitmap {btn_playgame2}Used by:253
Symbol 149 Bitmap {btn_playgame3}Used by:253
Symbol 150 Bitmap {button_level}Used by:253
Symbol 151 Bitmap {button_level_complete}Used by:253
Symbol 152 BitmapUsed by:153
Symbol 153 GraphicUses:152Used by:154
Symbol 154 MovieClipUses:153Used by:158
Symbol 155 TextUses:77Used by:157
Symbol 156 TextUses:77Used by:157
Symbol 157 MovieClip {SpinnerGame_fla.Levelmenu_26}Uses:155 156Used by:158
Symbol 158 MovieClip {classes.LevelMenu}Uses:2 68 154 157Used by:253
Symbol 159 EditableTextUses:79 81Used by:161
Symbol 160 EditableTextUses:79 81Used by:161
Symbol 161 MovieClip {classes.GameTimer}Uses:159 160Used by:253
Symbol 162 EditableTextUses:79 81Used by:163
Symbol 163 MovieClip {classes.ScoreCounter}Uses:162Used by:253
Symbol 164 Bitmap {locked_level}Used by:253
Symbol 165 BitmapUsed by:166
Symbol 166 GraphicUses:165Used by:173
Symbol 167 BitmapUsed by:168
Symbol 168 GraphicUses:167Used by:173
Symbol 169 BitmapUsed by:170
Symbol 170 GraphicUses:169Used by:173
Symbol 171 BitmapUsed by:172
Symbol 172 GraphicUses:171Used by:173
Symbol 173 MovieClip {Particle}Uses:166 168 170 172Used by:253
Symbol 174 Bitmap {panel_small}Used by:253
Symbol 175 Bitmap {game_paused}Used by:253
Symbol 176 BitmapUsed by:177
Symbol 177 GraphicUses:176Used by:187
Symbol 178 BitmapUsed by:179
Symbol 179 GraphicUses:178Used by:180
Symbol 180 MovieClipUses:179Used by:187
Symbol 181 BitmapUsed by:182
Symbol 182 GraphicUses:181Used by:187
Symbol 183 BitmapUsed by:184
Symbol 184 GraphicUses:183Used by:187
Symbol 185 BitmapUsed by:186
Symbol 186 GraphicUses:185Used by:187
Symbol 187 MovieClip {classes.EnemyBreak}Uses:177 180 182 184 186Used by:253
Symbol 188 Bitmap {level_failed}Used by:253
Symbol 189 GraphicUsed by:192 196
Symbol 190 BitmapUsed by:191
Symbol 191 GraphicUses:190Used by:195
Symbol 192 MovieClipUses:189Used by:195
Symbol 193 BitmapUsed by:194
Symbol 194 GraphicUses:193Used by:195
Symbol 195 MovieClip {SpinnerGame_fla.Tube_33}Uses:191 192 194Used by:196
Symbol 196 MovieClip {classes.TubePopup}Uses:189 195Used by:253
Symbol 197 GraphicUsed by:213
Symbol 198 Sound {menu_ambient}Used by:213
Symbol 199 Sound {sound_break}Used by:213
Symbol 200 Sound {sound_shock}Used by:213
Symbol 201 Sound {sound_flip}Used by:213
Symbol 202 Sound {sound_charge}Used by:213
Symbol 203 Sound {sound_tube}Used by:213
Symbol 204 Sound {sound_startlevel}Used by:213
Symbol 205 Sound {sound_button}Used by:213
Symbol 206 Sound {sound_firework}Used by:213
Symbol 207 Sound {sound_contact}Used by:213
Symbol 208 Sound {sound_explosion}Used by:213
Symbol 209 Sound {sound_wall}Used by:213
Symbol 210 Sound {sound_clock}Used by:213
Symbol 211 Sound {sound_levelbutton}Used by:213
Symbol 212 Sound {sound_leveldone}Used by:213
Symbol 213 MovieClip {SpinnerGame_fla._sounds_35}Uses:197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212Used by:253
Symbol 214 BitmapUsed by:215
Symbol 215 GraphicUses:214 1Used by:216
Symbol 216 MovieClip {classes.MainMenu}Uses:215Used by:253
Symbol 217 GraphicUsed by:224
Symbol 218 GraphicUsed by:219
Symbol 219 MovieClipUses:218Used by:224
Symbol 220 BitmapUsed by:221
Symbol 221 GraphicUses:220Used by:224
Symbol 222 BitmapUsed by:223
Symbol 223 GraphicUses:222Used by:224
Symbol 224 MovieClip {classes.Switcher}Uses:217 219 221 223Used by:253
Symbol 225 Bitmap {button_highscores}Used by:253
Symbol 226 Bitmap {button_highscores2}Used by:253
Symbol 227 Bitmap {button_highscores3}Used by:253
Symbol 228 GraphicUsed by:233
Symbol 229 GraphicUsed by:230
Symbol 230 MovieClipUses:229Used by:233
Symbol 231 GraphicUsed by:232
Symbol 232 MovieClipUses:231Used by:233
Symbol 233 MovieClip {classes.EnemyFlyer}Uses:228 230 232Used by:253
Symbol 234 GraphicUsed by:235
Symbol 235 MovieClipUses:234Used by:245
Symbol 236 GraphicUsed by:237
Symbol 237 MovieClipUses:236Used by:245
Symbol 238 GraphicUsed by:244
Symbol 239 GraphicUsed by:243
Symbol 240 GraphicUsed by:243
Symbol 241 GraphicUsed by:242
Symbol 242 MovieClipUses:241Used by:243
Symbol 243 MovieClipUses:239 240 242Used by:244
Symbol 244 MovieClipUses:238 243Used by:245
Symbol 245 MovieClip {classes.Wall}Uses:235 237 244Used by:253
Symbol 246 Bitmap {btn_skip}Used by:253
Symbol 247 Bitmap {btn_skip2}Used by:253
Symbol 248 Bitmap {btn_skip3}Used by:253
Symbol 249 Bitmap {btn_arcadeous}Used by:253
Symbol 250 Bitmap {btn_arcadeous2}Used by:253
Symbol 251 Bitmap {btn_pas}Used by:253
Symbol 252 Bitmap {btn_pas2}Used by:253
Symbol 253 MovieClipUses:14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 13 12 11 30 37 57 66 89 93 98 99 100 101 102 103 104 135 137 140 141 142 143 144 145 146 147 148 149 150 151 158 161 163 164 173 174 175 187 188 196 213 216 224 225 226 227 233 245 246 247 248 10 249 250 251 252Used by:Timeline

Instance Names

"bg"Symbol 4 MovieClip {classes.Preloader} Frame 1Symbol 3 MovieClip
"bg"Symbol 37 MovieClip {classes.EnemyShock} Frame 1Symbol 32 MovieClip
"flash"Symbol 37 MovieClip {classes.EnemyShock} Frame 1Symbol 36 MovieClip
"mcSpark"Symbol 57 MovieClip {classes.Signal} Frame 1Symbol 56 MovieClip
"shadow"Symbol 65 MovieClip {classes.Rotor} Frame 1Symbol 59 MovieClip
"stick"Symbol 65 MovieClip {classes.Rotor} Frame 1Symbol 61 MovieClip
"stick"Symbol 65 MovieClip {classes.Rotor} Frame 2Symbol 63 MovieClip
"rotor"Symbol 66 MovieClip {classes.Spinner} Frame 1Symbol 65 MovieClip {classes.Rotor}
"mcSpark"Symbol 89 MovieClip {classes.InstructionsMenu} Frame 1Symbol 56 MovieClip
"mcSpark"Symbol 89 MovieClip {classes.InstructionsMenu} Frame 1Symbol 56 MovieClip
"scheme"Symbol 158 MovieClip {classes.LevelMenu} Frame 1Symbol 154 MovieClip
"message"Symbol 158 MovieClip {classes.LevelMenu} Frame 1Symbol 157 MovieClip {SpinnerGame_fla.Levelmenu_26}
"minutes"Symbol 161 MovieClip {classes.GameTimer} Frame 1Symbol 159 EditableText
"seconds"Symbol 161 MovieClip {classes.GameTimer} Frame 1Symbol 160 EditableText
"label"Symbol 163 MovieClip {classes.ScoreCounter} Frame 1Symbol 162 EditableText
"flash"Symbol 187 MovieClip {classes.EnemyBreak} Frame 1Symbol 180 MovieClip
"progressbar"Symbol 195 MovieClip {SpinnerGame_fla.Tube_33} Frame 1Symbol 192 MovieClip
"panel"Symbol 196 MovieClip {classes.TubePopup} Frame 1Symbol 195 MovieClip {SpinnerGame_fla.Tube_33}
"hotspot"Symbol 224 MovieClip {classes.Switcher} Frame 1Symbol 219 MovieClip
"ball"Symbol 233 MovieClip {classes.EnemyFlyer} Frame 1Symbol 232 MovieClip
"hotspoth"Symbol 245 MovieClip {classes.Wall} Frame 1Symbol 235 MovieClip
"hotspotv"Symbol 245 MovieClip {classes.Wall} Frame 1Symbol 237 MovieClip

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1210 bytes "<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns ..."
Tag 0x3EA (1002)Timeline Frame 1

Labels

"normal"Symbol 65 MovieClip {classes.Rotor} Frame 1
"highlight"Symbol 65 MovieClip {classes.Rotor} Frame 2
"normal"Symbol 98 MovieClip {classes.Contact} Frame 1
"receiver"Symbol 98 MovieClip {classes.Contact} Frame 2
"charged"Symbol 98 MovieClip {classes.Contact} Frame 3
"short"Symbol 98 MovieClip {classes.Contact} Frame 4
"plain"Symbol 98 MovieClip {classes.Contact} Frame 5
"star"Symbol 173 MovieClip {Particle} Frame 2
"explosion"Symbol 173 MovieClip {Particle} Frame 3
"electric"Symbol 173 MovieClip {Particle} Frame 4




http://swfchan.com/27/132927/info.shtml
Created: 17/2 -2019 09:01:19 Last modified: 17/2 -2019 09:01:19 Server time: 09/05 -2024 03:09:06