Section 1
//PerlinDistort (com.gfx.PerlinDistort)
package com.gfx {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
public class PerlinDistort extends MovieClip {
private const _zeroPoint:Point;
private const _rndCount:Number;
private var _theTarget:DisplayObject;
private var perlinOffset:Array;
private var blurMod:Number;// = 0.25
private var _initialized:Boolean;// = false
private var bF:BlurFilter;
private var val;// = 1
private var nYScale:int;
private var _nx:int;
private var _ny:int;
private var eTarg;
private var bmp:BitmapData;
private var baseX:Number;// = 100
private var baseY:Number;// = 100
private var p1:Point;
private var p2:Point;
private var nXScale:int;
var dmf:DisplacementMapFilter;
public function PerlinDistort(_arg1, _arg2:int, _arg3:int){
baseX = 100;
baseY = 100;
_zeroPoint = new Point(0, 0);
_rndCount = (Math.random() * 25);
p1 = new Point(55, 34);
p2 = new Point(20, 33);
perlinOffset = new Array(p1, p2);
bF = new BlurFilter(2, 2, 3);
blurMod = 0.25;
_initialized = false;
val = 1;
super();
_theTarget = _arg1;
nXScale = (_nx = _arg2);
nYScale = (_ny = _arg3);
init();
}
public function start_noise():void{
_theTarget.addEventListener(Event.ENTER_FRAME, noiseOn);
}
private function destroy():void{
_theTarget.removeEventListener(Event.ENTER_FRAME, noiseOff);
dispatchEvent(new Event("NOISE_OFF_COMPLETE", false));
eTarg.filters = null;
}
private function noiseOff(_arg1:Event):void{
bF.blurX = (bF.blurX - (blurMod * 1.2));
bF.blurY = (bF.blurY - (blurMod * 1.2));
perlinOffset[0].y = (perlinOffset[0].y - 8);
perlinOffset[0].x = (perlinOffset[0].x - 5);
perlinOffset[1].x = (perlinOffset[1].x + 8);
perlinOffset[1].y = (perlinOffset[1].y + 5);
bmp.perlinNoise(baseX, baseY, 3, _rndCount, false, true, 1, true, perlinOffset);
_arg1.target.filters = [dmf, bF];
_arg1.target.alpha = (_arg1.target.alpha + 0.01);
nXScale = (nXScale - 0.25);
nYScale = (nYScale - 0.25);
dmf = new DisplacementMapFilter(bmp, _zeroPoint, 1, 1, nXScale, nYScale, "color", 0xFFFFFF, 0);
val = (val + 0.1);
eTarg = _arg1.target;
if (val >= 1){
destroy();
};
}
public function init():void{
bmp = new BitmapData((_theTarget.width + 100), (_theTarget.height + 100), false);
bmp.draw(_theTarget);
dmf = new DisplacementMapFilter(bmp, _zeroPoint, 1, 1, nXScale, nYScale, "color", 0xFFFFFF, 0);
_initialized = true;
}
public function finish():void{
_theTarget.removeEventListener(Event.ENTER_FRAME, noiseOn);
dispatchEvent(new Event("NOISE_ON_COMPLETE", false));
}
private function noiseOn(_arg1:Event):void{
bF.blurX = (bF.blurX + blurMod);
bF.blurY = (bF.blurY + blurMod);
perlinOffset[0].y = (perlinOffset[0].y - 8);
perlinOffset[0].x = (perlinOffset[0].x - 5);
perlinOffset[1].x = (perlinOffset[1].x + 8);
perlinOffset[1].y = (perlinOffset[1].y + 5);
bmp.perlinNoise(baseX, baseY, 3, _rndCount, false, true, 1, true, perlinOffset);
_arg1.target.filters = [dmf, bF];
_arg1.target.alpha = (_arg1.target.alpha - 0.01);
val = (val - 0.1);
if (val <= 0){
finish();
};
}
public function end_noise():void{
_theTarget.addEventListener(Event.ENTER_FRAME, noiseOff);
}
public function noise_reset():void{
nXScale = _nx;
nYScale = _ny;
perlinOffset[0].x = 55;
perlinOffset[0].y = 34;
perlinOffset[1].x = 20;
perlinOffset[1].y = 33;
bF.blurX = 2;
bF.blurY = 2;
dmf = new DisplacementMapFilter(bmp, _zeroPoint, 1, 1, nXScale, nYScale, "color", 0xFFFFFF, 0);
}
}
}//package com.gfx
Section 2
//ArrayUtils (com.stampy.arrays.ArrayUtils)
package com.stampy.arrays {
public class ArrayUtils {
public static function clone(_arg1:Array):Array{
return (_arg1.concat());
}
public static function randomArray(_arg1:Array):Array{
var _local2:Array;
_local2 = new Array();
while (_arg1.length > 0) {
_local2.push(_arg1.splice(Math.floor((Math.random() * _arg1.length)), 1));
};
return (_local2);
}
}
}//package com.stampy.arrays
Section 3
//DisplayListUtils (com.stampy.arrays.DisplayListUtils)
package com.stampy.arrays {
import flash.display.*;
import com.stampy.type.*;
public class DisplayListUtils {
public static function getDisplayList(_arg1):Array{
var _local2:Array;
var _local3:uint;
var _local4:int;
_local2 = [];
_local3 = _arg1.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local2.push(_arg1.getChildAt(_local4));
_local4++;
};
return (_local2);
}
public static function getChildrenByType(_arg1, _arg2:Class):Array{
var _local3:Array;
var _local4:int;
var _local5:DisplayObject;
_local3 = [];
if (TypeUtils.canHaveChildren(_arg1)){
_local4 = _arg1.numChildren;
while (_local4--) {
_local5 = _arg1.getChildAt(_local4);
if ((_local5 is _arg2)){
_local3.push(_local5);
};
};
};
return (_local3);
}
}
}//package com.stampy.arrays
Section 4
//BitmapDraw (com.stampy.bitmaps.BitmapDraw)
package com.stampy.bitmaps {
import flash.display.*;
import gs.*;
import flash.events.*;
public class BitmapDraw extends Bitmap {
private var _isOn:Boolean;// = false
private var _isFrameBased:Boolean;// = true
private var _bitmapData:BitmapData;
private var _renderTime:Number;// = 0.01
private var _bitmap:Bitmap;
private var _drawing:Sprite;
public function BitmapDraw(_arg1:Number, _arg2:Number, _arg3:Boolean=false, _arg4:uint=0){
var _local5:Boolean;
_isOn = false;
_isFrameBased = true;
_renderTime = 0.01;
_drawing = new Sprite();
super();
_local5 = validWorldSize(_arg1, _arg2);
if (_local5){
_bitmapData = new BitmapData(_arg1, _arg2, _arg3, _arg4);
//unresolved jump
};
if (_local5){
this.bitmapData = _bitmapData;
//unresolved jump
};
}
public function stop():void{
if (_isOn){
_isOn = false;
if (this.hasEventListener(Event.ENTER_FRAME)){
removeEventListener(Event.ENTER_FRAME, updateDrawing);
//unresolved jump
};
};
}
public function addChild(_arg1:DisplayObject):void{
_drawing.addChild(_arg1);
}
public function kill():void{
var _local1:uint;
var _local2:int;
_local1 = _drawing.numChildren;
_local2 = 0;
while (_local2 < _local1) {
_drawing.removeChildAt(0);
_local2++;
};
_bitmapData.dispose();
if (this.hasEventListener(Event.ENTER_FRAME)){
removeEventListener(Event.ENTER_FRAME, updateDrawing);
//unresolved jump
};
if (this.parent != null){
this.parent.removeChild(this);
//unresolved jump
};
}
private function updateDrawing(_arg1:Event=null):void{
_bitmapData.draw(_drawing);
}
private function validWorldSize(_arg1:Number, _arg2):Boolean{
var _local3:Boolean;
_local3 = ((((_arg2 > 2880)) || ((_arg1 > 2880)))) ? false : true;
if (!_local3){
throw (new Error("Bitmap size has exceeded maximum of 2880"));
};
return (_local3);
}
public function set renderTime(_arg1:Number):void{
_renderTime = _arg1;
}
public function set method(_arg1:String):void{
switch (_arg1){
case "time":
_isFrameBased = false;
break;
case "frame":
_isFrameBased = true;
break;
};
}
public function start():void{
if (!_isOn){
_isOn = true;
//unresolved jump
};
if (_isFrameBased){
addEventListener(Event.ENTER_FRAME, updateDrawing, false, 0, true);
} else {
timeBasedDraw();
};
}
private function timeBasedDraw():void{
if (_isOn){
TweenLite.to(1, _renderTime, {onComplete:timeBasedDraw});
//unresolved jump
};
updateDrawing();
}
}
}//package com.stampy.bitmaps
Section 5
//Cookie (com.stampy.cookies.Cookie)
package com.stampy.cookies {
import flash.net.*;
import flash.utils.*;
public class Cookie {
public static function addCookieUser(_arg1:String, _arg2:String, _arg3:Object):void{
var _local4:SharedObject;
var _local5:Boolean;
_local4 = getCookie(_arg1);
_local5 = _local4.data.hasOwnProperty("users");
if (_local5){
_local4.data.users[_arg2] = _arg3;
flushCookie(_local4);
} else {
addCookieUserStore(_arg1);
addCookieUser(_arg1, _arg2, _arg3);
};
}
public static function addCookieUserStore(_arg1:String):void{
var _local2:SharedObject;
_local2 = getCookie(_arg1);
_local2.data.users = new Dictionary();
flushCookie(_local2);
}
public static function getCookieUser(_arg1:String, _arg2:String=""):Object{
var _local3:SharedObject;
var _local4:Boolean;
var _local5:Object;
_local3 = getCookie(_arg1);
_local4 = _local3.data.hasOwnProperty("users");
if (_local4){
_local5 = _local3.data.users[_arg2];
} else {
addCookieUserStore(_arg1);
};
return (_local5);
}
public static function addCookieLastUser(_arg1:String, _arg2:String=""):void{
var _local3:SharedObject;
_local3 = getCookie((_arg1 + "Last"));
_local3.data.LastUser = _arg2;
flushCookie(_local3);
}
private static function flushCookie(_arg1:SharedObject):void{
var soCookie = _arg1;
try {
soCookie.flush();
} catch(e:Error) {
trace("Cookie only stored online");
};
}
public static function getCookie(_arg1:String):SharedObject{
var _local2:SharedObject;
_local2 = SharedObject.getLocal(_arg1);
return (_local2);
}
public static function getCookieLastUser(_arg1:String):Object{
var _local2:SharedObject;
var _local3:Boolean;
var _local4:String;
var _local5:Object;
_local2 = getCookie((_arg1 + "Last"));
_local3 = _local2.data.hasOwnProperty("LastUser");
if (_local3){
_local4 = _local2.data.LastUser;
_local5 = getCookieUser(_arg1, _local4);
};
return (_local5);
}
}
}//package com.stampy.cookies
Section 6
//FlashCookie (com.stampy.cookies.FlashCookie)
package com.stampy.cookies {
public class FlashCookie {
private var _strCookieName:String;// = "none"
private var _cookie:Object;
public function FlashCookie(_arg1:String, _arg2:Object, _arg3:String="guestUser"):void{
_strCookieName = "none";
super();
_strCookieName = _arg1;
_cookie = Cookie.getCookieUser(_strCookieName, _arg3);
if (_cookie == null){
Cookie.addCookieUser(_strCookieName, _arg3, _arg2);
};
}
public function getFromCookie(_arg1:String, _arg2:String="guestUser"){
var _local3:String;
_cookie = getCookie(_arg2);
for (_local3 in _cookie) {
if (_local3 == _arg1){
return (_cookie[_local3]);
};
};
return (null);
}
public function updateCookieVar(_arg1:String, _arg2, _arg3:String="guestUser"):void{
var _local4:String;
_cookie = getCookie(_arg3);
for (_local4 in _cookie) {
if (_local4 == _arg1){
_cookie[_local4] = _arg2;
};
};
updateCookie(_cookie, _arg3);
}
public function updateCookie(_arg1:Object, _arg2:String="guestUser"):void{
Cookie.addCookieUser(_strCookieName, _arg2, _arg1);
}
public function get cookieName():String{
return (_strCookieName);
}
public function getCookie(_arg1:String="guestUser"):Object{
_cookie = Cookie.getCookieUser(_strCookieName, _arg1);
return (_cookie);
}
}
}//package com.stampy.cookies
Section 7
//ChanceDecision (com.stampy.decisions.ChanceDecision)
package com.stampy.decisions {
import flash.utils.*;
import com.stampy.random.*;
import com.stampy.equality.*;
public class ChanceDecision {
private var _numbers:Array;
private var _count:uint;
private var _results:Array;
private var _options:Dictionary;
public function ChanceDecision(){
_options = new Dictionary();
super();
}
private function getNearest(_arg1:Array, _arg2:Number):uint{
var _local3:uint;
var _local4:uint;
var _local5:Number;
var _local6:int;
_local3 = _arg1.length;
_local4 = 0;
_local5 = _arg1[0];
_local6 = 1;
while (_local6 < _local3) {
if ((_local5 - _arg2) > (_arg1[_local6] - _arg2)){
_local4 = _local6;
_local5 = _arg1[_local6];
};
_local6++;
};
return (_local4);
}
public function makeDecision(_arg1:Array=null):String{
var _local2:Object;
var _local3:*;
_results = [];
_numbers = [];
_count = 0;
if (_arg1 == null){
_arg1 = [];
};
for (_local2 in _options) {
if (!equalUtils.isInArray(_options[_local2].name, _arg1)){
_options[_local2].random = Random.range(1, _options[_local2].chance);
_results.push(_options[_local2]);
_numbers.push(_options[_local2].random);
};
_count++;
};
if (_arg1.length >= _count){
return (null);
};
_local3 = getNearest(_numbers, 1);
return (_results[_local3].name);
}
public function addChance(_arg1:String, _arg2:Number):void{
_options[_arg1] = {name:_arg1, chance:_arg2, random:0};
}
}
}//package com.stampy.decisions
Section 8
//equalUtils (com.stampy.equality.equalUtils)
package com.stampy.equality {
public class equalUtils {
public static function isInArray(_arg1, _arg2:Array):Boolean{
var _local3:int;
_local3 = 0;
while (_local3 < _arg2.length) {
if (_arg1 == _arg2[_local3]){
return (true);
};
_local3++;
};
return (false);
}
public static function notEqualToMany(_arg1, ... _args):Boolean{
var testEquality:Function;
var equalValue = _arg1;
var args = _args;
testEquality = function (_arg1, _arg2:int, _arg3:Array):Boolean{
var _local4:Boolean;
_local4 = (_arg3[_arg2] is Array);
if (_local4){
return (_arg3[_arg2].every(testEquality));
};
return (((_arg3[_arg2] == equalValue)) ? false : true);
};
return (args.every(testEquality));
}
public static function equalToAny(_arg1, _arg2:Array):Boolean{
var _local3:uint;
var _local4:int;
_local3 = _arg2.length;
_local4 = 0;
while (_local4 < _local3) {
if (_arg2[_local4] == _arg1){
return (true);
};
_local4++;
};
return (false);
}
public static function equalToMany(_arg1, ... _args):Boolean{
var testEquality:Function;
var equalValue = _arg1;
var args = _args;
testEquality = function (_arg1, _arg2:int, _arg3:Array):Boolean{
var _local4:Boolean;
_local4 = (_arg3[_arg2] is Array);
if (_local4){
return (_arg3[_arg2].every(testEquality));
};
return (((_arg3[_arg2] == equalValue)) ? true : false);
};
return (args.every(testEquality));
}
}
}//package com.stampy.equality
Section 9
//FrameUtils (com.stampy.frames.FrameUtils)
package com.stampy.frames {
import flash.display.*;
public class FrameUtils {
public static function onEveryFrame(_arg1, _arg2:Function):void{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
_local3 = _arg1.framesLoaded;
if ((_arg1 is MovieClip)){
_local4 = 1;
while (_local4 <= _local3) {
onEnterFrame(_local4, _arg1, _arg2);
_local4++;
};
} else {
if ((_arg1 is Array)){
_local5 = _arg1.length;
_local6 = 0;
while (_local6 < _local5) {
onEveryFrame(_arg1[_local6], _arg2);
_local6++;
};
};
};
}
public static function onEnterFrame(_arg1, _arg2, _arg3:Function):void{
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:uint;
if ((_arg2 is MovieClip)){
if ((_arg1 is uint)){
_arg2.addFrameScript((_arg1 - 1), _arg3);
} else {
if ((_arg1 is String)){
_arg2.addFrameScript((frameNumByLabel(_arg1, _arg2) - 1), _arg3);
} else {
if ((_arg1 is Array)){
_local4 = _arg1.length;
_local5 = 0;
while (_local5 < _local4) {
onEnterFrame(_arg1[_local5], _arg2, _arg3);
_local5++;
};
};
};
};
};
if ((_arg2 is Array)){
_local6 = _arg2.length;
_local7 = 0;
while (_local7 < _local6) {
onEnterFrame(_arg1, _arg2[_local7], _arg3);
_local7++;
};
};
}
public static function frameNumByLabel(_arg1:String, _arg2:MovieClip):Number{
var _local3:uint;
var _local4:uint;
_local3 = _arg2.currentLabels.length;
_local4 = 0;
while (_local4 < _local3) {
if (_arg2.currentLabels[_local4].name == _arg1){
return (_arg2.currentLabels[_local4].frame);
};
_local4++;
};
return (1);
}
}
}//package com.stampy.frames
Section 10
//PointDistance (com.stampy.points.PointDistance)
package com.stampy.points {
import flash.geom.*;
public class PointDistance {
public static function betweenPoints(_arg1:Point, _arg2:Point):Number{
var _local3:*;
var _local4:*;
var _local5:Number;
_local4 = (_arg2.x - _arg1.x);
_local5 = (_arg2.y - _arg1.y);
_local3 = Math.sqrt(((_local4 * _local4) + (_local5 * _local5)));
return (_local3);
}
}
}//package com.stampy.points
Section 11
//Random (com.stampy.random.Random)
package com.stampy.random {
public class Random {
public static function range(_arg1:Number, _arg2:Number):Number{
return ((Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1));
}
}
}//package com.stampy.random
Section 12
//TypeUtils (com.stampy.type.TypeUtils)
package com.stampy.type {
public class TypeUtils {
public static function isSprite(_arg1):Boolean{
return (((_arg1.constructor)=="[class Sprite]") ? true : false);
}
public static function isArray(_arg1):Boolean{
return (((_arg1.constructor)=="[class Array]") ? true : false);
}
public static function isMovieClip(_arg1):Boolean{
return (((_arg1.constructor)=="[class MovieClip]") ? true : false);
}
public static function canHaveChildren(_arg1):Boolean{
var _local2:String;
_local2 = _arg1.constructor;
return ((((!((_local2 == null))) && ((((_local2 == "[class MovieClip]")) || ((_local2 == "[class Sprite]")))))) ? true : false);
}
}
}//package com.stampy.type
Section 13
//OpenURL (console.loadurl.OpenURL)
package console.loadurl {
import flash.net.*;
import flash.external.*;
public class OpenURL {
public static function loadURL(_arg1:String, _arg2:String="_blank"):void{
var WINDOW_OPEN_FUNCTION:String;
var url = _arg1;
var window = _arg2;
WINDOW_OPEN_FUNCTION = "window.open";
if (ExternalInterface.available){
try {
ExternalInterface.call(WINDOW_OPEN_FUNCTION, url, window);
trace("EXTERNAL INTERFACE TO URL");
} catch(e:Error) {
navigateToURL(new URLRequest(url), window);
trace("NAVIGATE TO URL");
};
} else {
navigateToURL(new URLRequest(url), window);
trace("EXTERNAL INTERFACE NOT AVAILABLE");
};
}
}
}//package console.loadurl
Section 14
//GamePreloader (console.preloader.GamePreloader)
package console.preloader {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class GamePreloader extends MovieClip {
private var _bytesTotal:Number;// = 0
private var _bytesLoaded:Number;// = 0
private var _preloadList:Dictionary;
private var _percentLoaded:Number;// = 0
public static const COMPLETE:String = "Complete";
public static const PROGRESS:String = "Progress";
public function GamePreloader():void{
_bytesTotal = 0;
_bytesLoaded = 0;
_percentLoaded = 0;
super();
_preloadList = new Dictionary(true);
this.addEventListener(Event.ADDED_TO_STAGE, onStage);
}
private function init():void{
stage.addEventListener(Event.ENTER_FRAME, handleFrame);
}
private function handleFrame(_arg1:Event):void{
_bytesTotal = stage.loaderInfo.bytesTotal;
_bytesLoaded = stage.loaderInfo.bytesLoaded;
_percentLoaded = Math.floor((_bytesLoaded * (100 / _bytesTotal)));
dispatch(PROGRESS);
if (_percentLoaded >= 99){
stage.removeEventListener(Event.ENTER_FRAME, handleFrame);
dispatch(COMPLETE);
this.parent.removeChild(this);
};
}
public function get bytesLoaded():Number{
return (_bytesLoaded);
}
private function onStage(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, onStage);
init();
}
public function get bytesTotal():Number{
return (_bytesTotal);
}
private function dispatch(_arg1:String):void{
dispatchEvent(new Event(_arg1));
}
public function get percentLoaded():Number{
return (_percentLoaded);
}
}
}//package console.preloader
Section 15
//SoundObject (console.sounds.SoundObject)
package console.sounds {
import gs.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
public class SoundObject {
private var _isMute:Boolean;// = false
private var _sndSound;
private var _linkage:String;
private var _channel:SoundChannel;
private var _intMaxVolume:Number;// = 1
private var _isPlaying:Boolean;// = false
private var _intVolume:Number;// = 1
private var _intLastPosition:Number;// = 0
private var _isLooping:Boolean;// = false
private var _intLoopCount:uint;// = 0
private var _intPrevVolume:Number;// = 1
public function SoundObject(_arg1:String):void{
var _local2:Class;
_intVolume = 1;
_isMute = false;
_intPrevVolume = 1;
_intLastPosition = 0;
_isLooping = false;
_intLoopCount = 0;
_isPlaying = false;
_intMaxVolume = 1;
super();
_linkage = _arg1;
_local2 = (getDefinitionByName(_arg1) as Class);
_sndSound = new (_local2);
_channel = new SoundChannel();
}
public function set volume(_arg1:Number):void{
if (!_isMute){
_intVolume = _arg1;
modifyVolume(_intVolume);
};
}
public function stop(_arg1:Event=null):void{
var evt = _arg1;
try {
_channel.removeEventListener(Event.SOUND_COMPLETE, stop);
_isPlaying = false;
_intLastPosition = _channel.position;
_channel.stop();
} catch(evt:Error) {
trace("SoundObject stop: Error");
};
}
public function muteOff(_arg1:Number):void{
if (_isMute){
volume = _intPrevVolume;
_isMute = false;
};
}
public function muteOn(_arg1:Number=0):void{
if (!_isMute){
_intPrevVolume = volume;
volume = 0;
_isMute = true;
};
}
public function get mute():Boolean{
return (_isMute);
}
public function get volume():Number{
return (_intVolume);
}
public function get linkage():String{
return (_linkage);
}
private function modifyVolume(_arg1:Number):void{
var intValue:Number;
var mod1:SoundTransform;
var value = _arg1;
intValue = (value * _intMaxVolume);
try {
mod1 = new SoundTransform();
mod1.volume = intValue;
_channel.soundTransform = mod1;
} catch(evt:Error) {
trace("SoundObject.modifyVolume() Error");
};
}
public function get isPlaying():Boolean{
return (_isPlaying);
}
public function set maxVolume(_arg1:Number):void{
if ((((_arg1 >= 0)) && ((_arg1 <= 1)))){
_intMaxVolume = _arg1;
volume = _intVolume;
};
}
public function resume():void{
if (!_isPlaying){
play(_isLooping, _intLoopCount, _intLastPosition);
};
}
public function play(_arg1:Boolean, _arg2:uint, _arg3:uint):void{
var intRepeatCount:*;
var isLooping = _arg1;
var intLoopCount = _arg2;
var intStartTime = _arg3;
_isLooping = isLooping;
_intLoopCount = intLoopCount;
_isPlaying = true;
intRepeatCount = (isLooping) ? intLoopCount : 0;
try {
_channel = _sndSound.play(intStartTime, intRepeatCount);
modifyVolume(volume);
_channel.addEventListener(Event.SOUND_COMPLETE, stop);
} catch(evt:Error) {
};
}
public function fade(_arg1:Number, _arg2:Number):void{
if (!_isMute){
TweenLite.to(this, _arg2, {volume:_arg1});
};
}
}
}//package console.sounds
Section 16
//SoundUtils (console.sounds.SoundUtils)
package console.sounds {
import gs.*;
import flash.utils.*;
import flash.media.*;
public class SoundUtils {
private static var _dictMusic:Dictionary = new Dictionary();
private static var _dictSFX:Dictionary = new Dictionary();
private static var _sfxChannelVolume:Number = 1;
private static var _musicMute:Boolean = false;
private static var _rememberValue:Boolean = true;
private static var _musicChannelVolume:Number = 1;
private static var _globalMute:Boolean = false;
private static var _sfxMute:Boolean = false;
public static function addMusic(_arg1:String, _arg2:Number=1):void{
var _local3:SoundObject;
_local3 = new SoundObject(_arg1);
_local3.volume = _arg2;
_dictMusic[_arg1] = _local3;
}
public static function fadeAll(_arg1:Number, _arg2:Number):void{
fadeSFXChannel(_arg1, _arg2);
fadeMusicChannel(_arg1, _arg2);
}
public static function fadeMusic(_arg1:String, _arg2:Number, _arg3:Number):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].fade(_arg2, _arg3);
};
}
public static function fadeSFXStop(_arg1:String, _arg2:Number, _arg3:Number):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].fade(_arg2, _arg3);
TweenLite.to(_arg1, _arg3, {onComplete:stopSFX, onCompleteParams:[_arg1]});
};
}
public static function muteMusic(_arg1:String, _arg2:Number=0):void{
var _local3:*;
if ((_dictMusic[_arg1] is SoundObject)){
_local3 = _dictMusic[_arg1];
if (_local3.mute){
_local3.muteOff(_arg2);
} else {
_local3.muteOn(_arg2);
};
};
}
public static function isMusicPlaying(_arg1:String):Boolean{
return (_dictMusic[_arg1].isPlaying);
}
public static function resumeSFX(_arg1:String):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].resume();
};
}
public static function setMaxVolumeMusicChannel(_arg1:Number):void{
var _local2:SoundObject;
if (_rememberValue){
_musicChannelVolume = _arg1;
};
for each (_local2 in _dictMusic) {
_local2.maxVolume = _arg1;
};
}
public static function muteGlobal():void{
if (!_globalMute){
try {
trace("Mute Success OFF");
_globalMute = true;
SoundMixer.soundTransform = new SoundTransform(0);
} catch(evt:Error) {
trace("SoundUtils.muteGlobal() Error 1");
};
} else {
_globalMute = false;
try {
trace("Mute Success ON");
SoundMixer.soundTransform = new SoundTransform(1);
} catch(evt:Error) {
trace("SoundUtils.muteGlobal() Error 2");
};
};
}
public static function isMusicChannelMute():Boolean{
return (_musicMute);
}
public static function stopSFX(_arg1:String):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].stop();
};
}
public static function addSFX(_arg1:String, _arg2:Number=1):void{
var _local3:SoundObject;
_local3 = new SoundObject(_arg1);
_local3.volume = _arg2;
_dictSFX[_arg1] = _local3;
}
public static function get isGlobalMute():Boolean{
return (_globalMute);
}
public static function setMaxVolumeMusic(_arg1:String, _arg2:Number):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].maxVolume = _arg2;
};
}
public static function fadeMusicStop(_arg1:String, _arg2:Number, _arg3:Number):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].fade(_arg2, _arg3);
TweenLite.to(_arg1, _arg3, {onComplete:stopMusic, onCompleteParams:[_arg1]});
};
}
public static function muteSFX(_arg1:String, _arg2:Number=0):void{
var _local3:*;
if ((_dictSFX[_arg1] is SoundObject)){
_local3 = _dictSFX[_arg1];
if (_local3.mute){
_local3.muteOff(_arg2);
} else {
_local3.muteOn(_arg2);
};
};
}
public static function playSFX(_arg1:String, _arg2:Boolean=false, _arg3:uint=999999, _arg4:uint=0):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].play(_arg2, _arg3, _arg4);
};
}
public static function isSFXPlaying(_arg1:String):Boolean{
return (_dictSFX[_arg1].isPlaying);
}
public static function setMaxVolumeSFX(_arg1:String, _arg2:Number):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].maxVolume = _arg2;
};
}
public static function muteSFXChannel(_arg1:Number=0):void{
var _local2:SoundObject;
var _local3:SoundObject;
if (!_sfxMute){
_sfxMute = true;
for each (_local2 in _dictSFX) {
_local2.muteOn(_arg1);
};
} else {
_sfxMute = false;
for each (_local3 in _dictSFX) {
_local3.muteOff(_arg1);
};
};
}
public static function fadeMusicChannel(_arg1:Number, _arg2:Number):void{
var _local3:SoundObject;
for each (_local3 in _dictMusic) {
_local3.fade(_arg1, _arg2);
};
}
public static function stopMusicChannel():void{
var _local1:SoundObject;
for each (_local1 in _dictMusic) {
_local1.stop();
};
}
public static function setMaxVolumeSFXChannel(_arg1:Number):void{
var _local2:SoundObject;
if (_rememberValue){
_sfxChannelVolume = _arg1;
};
for each (_local2 in _dictSFX) {
_local2.maxVolume = _arg1;
};
}
public static function isSFXChannelMuted():Boolean{
return (_sfxMute);
}
public static function TrackChannelLastVolume(_arg1:Boolean):void{
_rememberValue = _arg1;
}
public static function setVolumeSFX(_arg1:String, _arg2:Number):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].volume = _arg2;
};
}
public static function resumeSFXChannel():void{
var _local1:SoundObject;
for each (_local1 in _dictSFX) {
_local1.resume();
};
}
public static function getVolumeMusicChannel():Number{
return (_musicChannelVolume);
}
public static function muteAll(_arg1:Number=0):void{
muteSFXChannel(_arg1);
muteMusicChannel(_arg1);
}
public static function playMusic(_arg1:String, _arg2:Boolean=false, _arg3:uint=999999, _arg4:uint=0):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].play(_arg2, _arg3, _arg4);
};
}
public static function stopMusic(_arg1:String):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].stop();
};
}
public static function getVolumeSFX(_arg1:String):Number{
return (_dictSFX[_arg1].volume);
}
public static function fadeSFXChannel(_arg1:Number, _arg2:Number):void{
var _local3:SoundObject;
for each (_local3 in _dictSFX) {
_local3.fade(_arg1, _arg2);
};
}
public static function fadeMusicChannelStop(_arg1:Number, _arg2:Number):void{
var _local3:SoundObject;
for each (_local3 in _dictMusic) {
_local3.fade(_arg1, _arg2);
TweenLite.to(_local3, _arg2, {onComplete:stopMusic, onCompleteParams:[_local3.linkage]});
};
}
public static function fadeMusicPlay(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:uint=999999, _arg6:uint=0):void{
if ((_dictMusic[_arg1] is SoundObject)){
setVolumeMusic(_arg1, 0);
playMusic(_arg1, _arg4, _arg5, _arg6);
fadeMusic(_arg1, _arg2, _arg3);
};
}
public static function muteMusicChannel(_arg1:Number=0):void{
var _local2:SoundObject;
var _local3:SoundObject;
if (!_musicMute){
_musicMute = true;
for each (_local2 in _dictMusic) {
_local2.muteOn(_arg1);
};
} else {
_musicMute = false;
for each (_local3 in _dictMusic) {
_local3.muteOff(_arg1);
};
};
}
public static function setVolumeMusicChannel(_arg1:Number):void{
var _local2:SoundObject;
for each (_local2 in _dictMusic) {
_local2.volume = _arg1;
};
}
public static function stopSFXChannel():void{
var _local1:SoundObject;
for each (_local1 in _dictSFX) {
_local1.stop();
};
}
public static function setVolumeMusic(_arg1:String, _arg2:Number):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].volume = _arg2;
};
}
public static function resumeMusicChannel():void{
var _local1:SoundObject;
for each (_local1 in _dictMusic) {
_local1.resume();
};
}
public static function fadeSFX(_arg1:String, _arg2:Number, _arg3:Number):void{
if ((_dictSFX[_arg1] is SoundObject)){
_dictSFX[_arg1].fade(_arg2, _arg3);
};
}
public static function getVolumeMusic(_arg1:String):Number{
return (_dictMusic[_arg1].volume);
}
public static function resumeMusic(_arg1:String):void{
if ((_dictMusic[_arg1] is SoundObject)){
_dictMusic[_arg1].resume();
};
}
public static function setVolumeSFXChannel(_arg1:Number):void{
var _local2:SoundObject;
for each (_local2 in _dictSFX) {
_local2.volume = _arg1;
};
}
public static function fadeSFXChannelStop(_arg1:Number, _arg2:Number):void{
var _local3:SoundObject;
for each (_local3 in _dictSFX) {
_local3.fade(_arg1, _arg2);
TweenLite.to(_local3, _arg2, {onComplete:stopSFX, onCompleteParams:[_local3.linkage]});
};
}
public static function getVolumeSFXChannel():Number{
return (_sfxChannelVolume);
}
}
}//package console.sounds
Section 17
//MochiBot (console.trackers.MochiBot)
package console.trackers {
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;
trace("RUN MOCHIBOT TRACKING");
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 console.trackers
Section 18
//ANIMATED_TITLE1_11 (game_fla.ANIMATED_TITLE1_11)
package game_fla {
import flash.display.*;
public dynamic class ANIMATED_TITLE1_11 extends MovieClip {
public var title:MovieClip;
public var title_next:SimpleButton;
public var title_prev:SimpleButton;
}
}//package game_fla
Section 19
//ANIMATION_PACMAN_331 (game_fla.ANIMATION_PACMAN_331)
package game_fla {
import flash.display.*;
public dynamic class ANIMATION_PACMAN_331 extends MovieClip {
public function ANIMATION_PACMAN_331(){
addFrameScript(69, frame70);
}
function frame70(){
stop();
}
}
}//package game_fla
Section 20
//Awards_mc_139 (game_fla.Awards_mc_139)
package game_fla {
import flash.display.*;
public dynamic class Awards_mc_139 extends MovieClip {
public var trophy1:SimpleButton;
public var trophy5:SimpleButton;
public var trophy4:SimpleButton;
public var trophy6:SimpleButton;
public var trophy3:SimpleButton;
public var trophy2:SimpleButton;
}
}//package game_fla
Section 21
//BACKGROUND_CHOICE_328 (game_fla.BACKGROUND_CHOICE_328)
package game_fla {
import flash.display.*;
public dynamic class BACKGROUND_CHOICE_328 extends MovieClip {
public var video:MovieClip;
public function BACKGROUND_CHOICE_328(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 22
//ballon_338 (game_fla.ballon_338)
package game_fla {
import flash.display.*;
public dynamic class ballon_338 extends MovieClip {
public var arrow:MovieClip;
public var bg:MovieClip;
public function ballon_338(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 23
//BlackBox_gr_164 (game_fla.BlackBox_gr_164)
package game_fla {
import flash.display.*;
public dynamic class BlackBox_gr_164 extends MovieClip {
public var spectrum:MovieClip;
}
}//package game_fla
Section 24
//BlackBox_gr30_265 (game_fla.BlackBox_gr30_265)
package game_fla {
import flash.display.*;
public dynamic class BlackBox_gr30_265 extends MovieClip {
public var spectrum:MovieClip;
}
}//package game_fla
Section 25
//BlackBox_gr33_332 (game_fla.BlackBox_gr33_332)
package game_fla {
import flash.display.*;
public dynamic class BlackBox_gr33_332 extends MovieClip {
public var spectrum:MovieClip;
}
}//package game_fla
Section 26
//BlackBox_gr50_95 (game_fla.BlackBox_gr50_95)
package game_fla {
import flash.display.*;
public dynamic class BlackBox_gr50_95 extends MovieClip {
public var spectrum:MovieClip;
}
}//package game_fla
Section 27
//BlackBox10_gr_239 (game_fla.BlackBox10_gr_239)
package game_fla {
import flash.display.*;
public dynamic class BlackBox10_gr_239 extends MovieClip {
public var spectrum:MovieClip;
}
}//package game_fla
Section 28
//BlackBox22_grcopy_240 (game_fla.BlackBox22_grcopy_240)
package game_fla {
import flash.display.*;
public dynamic class BlackBox22_grcopy_240 extends MovieClip {
public var spectrum:MovieClip;
}
}//package game_fla
Section 29
//BRICK_BREATER_ANIM_241 (game_fla.BRICK_BREATER_ANIM_241)
package game_fla {
import flash.display.*;
public dynamic class BRICK_BREATER_ANIM_241 extends MovieClip {
public function BRICK_BREATER_ANIM_241(){
addFrameScript(157, frame158);
}
function frame158(){
gotoAndPlay(1);
}
}
}//package game_fla
Section 30
//bubble_mc_207 (game_fla.bubble_mc_207)
package game_fla {
import flash.display.*;
public dynamic class bubble_mc_207 extends MovieClip {
public function bubble_mc_207(){
addFrameScript(0, frame1, 7, frame8);
}
function frame1(){
stop();
}
function frame8(){
gotoAndPlay(2);
}
}
}//package game_fla
Section 31
//ButtonMain_5 (game_fla.ButtonMain_5)
package game_fla {
import flash.display.*;
public dynamic class ButtonMain_5 extends MovieClip {
public var loading:MovieClip;
public var start:SimpleButton;
public function ButtonMain_5(){
addFrameScript(0, frame1, 12, frame13, 21, frame22);
}
function frame1(){
stop();
}
function frame22(){
stop();
}
function frame13(){
gotoAndPlay(9);
}
}
}//package game_fla
Section 32
//character_mc_153 (game_fla.character_mc_153)
package game_fla {
import flash.display.*;
public dynamic class character_mc_153 extends MovieClip {
public var eye:MovieClip;
}
}//package game_fla
Section 33
//character_move_mc_152 (game_fla.character_move_mc_152)
package game_fla {
import flash.display.*;
public dynamic class character_move_mc_152 extends MovieClip {
public var outline:MovieClip;
}
}//package game_fla
Section 34
//custom_LEVEL_129 (game_fla.custom_LEVEL_129)
package game_fla {
import flash.display.*;
public dynamic class custom_LEVEL_129 extends MovieClip {
public var target7:MovieClip;
public function custom_LEVEL_129(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 35
//CustomBox_297 (game_fla.CustomBox_297)
package game_fla {
import flash.display.*;
public dynamic class CustomBox_297 extends MovieClip {
public var size:MovieClip;
public var odds:MovieClip;
public var speed:MovieClip;
public var direction:MovieClip;
public var style:MovieClip;
}
}//package game_fla
Section 36
//DIRECTION_mc_325 (game_fla.DIRECTION_mc_325)
package game_fla {
import flash.display.*;
public dynamic class DIRECTION_mc_325 extends MovieClip {
public var emmiterBTN:SimpleButton;
public function DIRECTION_mc_325(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 37
//DIRECTION_PICKER_324 (game_fla.DIRECTION_PICKER_324)
package game_fla {
import flash.display.*;
public dynamic class DIRECTION_PICKER_324 extends MovieClip {
public var e2:MovieClip;
public var e5:MovieClip;
public var e6:MovieClip;
public var e3:MovieClip;
public var e4:MovieClip;
public var corner:MovieClip;
public var e1:MovieClip;
public var e7:MovieClip;
public var e8:MovieClip;
}
}//package game_fla
Section 38
//DURATION_CHOICE_300 (game_fla.DURATION_CHOICE_300)
package game_fla {
import flash.display.*;
public dynamic class DURATION_CHOICE_300 extends MovieClip {
public function DURATION_CHOICE_300(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 39
//Explosion_216 (game_fla.Explosion_216)
package game_fla {
import flash.display.*;
public dynamic class Explosion_216 extends MovieClip {
public function Explosion_216(){
addFrameScript(17, frame18);
}
function frame18(){
stop();
}
}
}//package game_fla
Section 40
//Explosion2_217 (game_fla.Explosion2_217)
package game_fla {
import flash.display.*;
public dynamic class Explosion2_217 extends MovieClip {
public function Explosion2_217(){
addFrameScript(23, frame24);
}
function frame24(){
stop();
}
}
}//package game_fla
Section 41
//Explosion3_218 (game_fla.Explosion3_218)
package game_fla {
import flash.display.*;
public dynamic class Explosion3_218 extends MovieClip {
public function Explosion3_218(){
addFrameScript(31, frame32);
}
function frame32(){
stop();
}
}
}//package game_fla
Section 42
//ExplosionGreen1_219 (game_fla.ExplosionGreen1_219)
package game_fla {
import flash.display.*;
public dynamic class ExplosionGreen1_219 extends MovieClip {
public function ExplosionGreen1_219(){
addFrameScript(46, frame47);
}
function frame47(){
stop();
}
}
}//package game_fla
Section 43
//ExplosionGreen4_220 (game_fla.ExplosionGreen4_220)
package game_fla {
import flash.display.*;
public dynamic class ExplosionGreen4_220 extends MovieClip {
public function ExplosionGreen4_220(){
addFrameScript(50, frame51);
}
function frame51(){
stop();
}
}
}//package game_fla
Section 44
//ExplosionGreen5_221 (game_fla.ExplosionGreen5_221)
package game_fla {
import flash.display.*;
public dynamic class ExplosionGreen5_221 extends MovieClip {
public function ExplosionGreen5_221(){
addFrameScript(55, frame56);
}
function frame56(){
stop();
}
}
}//package game_fla
Section 45
//eye_container_226 (game_fla.eye_container_226)
package game_fla {
import flash.display.*;
public dynamic class eye_container_226 extends MovieClip {
public var eye:MovieClip;
}
}//package game_fla
Section 46
//FREQUENCY_CHOICEcopy_303 (game_fla.FREQUENCY_CHOICEcopy_303)
package game_fla {
import flash.display.*;
public dynamic class FREQUENCY_CHOICEcopy_303 extends MovieClip {
public function FREQUENCY_CHOICEcopy_303(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 47
//GENERATE_BTN_295 (game_fla.GENERATE_BTN_295)
package game_fla {
import flash.display.*;
public dynamic class GENERATE_BTN_295 extends MovieClip {
public var levelGenerate:SimpleButton;
public var loading:MovieClip;
}
}//package game_fla
Section 48
//GENERATE_WORD_296 (game_fla.GENERATE_WORD_296)
package game_fla {
import flash.display.*;
public dynamic class GENERATE_WORD_296 extends MovieClip {
public var percent:MovieClip;
}
}//package game_fla
Section 49
//GRAIFFITI_SELECTION_184 (game_fla.GRAIFFITI_SELECTION_184)
package game_fla {
import flash.display.*;
public dynamic class GRAIFFITI_SELECTION_184 extends MovieClip {
public var anim:MovieClip;
public var paul:SimpleButton;
public var terminal:SimpleButton;
public var sticker1:MovieClip;
public function GRAIFFITI_SELECTION_184(){
addFrameScript(0, frame1, 3, frame4, 7, frame8);
}
function frame1(){
stop();
}
function frame4(){
gotoAndStop(3);
}
function frame8(){
gotoAndStop(3);
}
}
}//package game_fla
Section 50
//INVADER_GREEN_DANCE_176 (game_fla.INVADER_GREEN_DANCE_176)
package game_fla {
import flash.display.*;
public dynamic class INVADER_GREEN_DANCE_176 extends MovieClip {
public var rand;
public function INVADER_GREEN_DANCE_176(){
addFrameScript(8, frame9);
}
function frame9(){
rand = (Math.random() * 80);
if (rand < 2){
gotoAndPlay(10);
} else {
gotoAndPlay(1);
};
}
}
}//package game_fla
Section 51
//INVADOIR_CHOICE_302 (game_fla.INVADOIR_CHOICE_302)
package game_fla {
import flash.display.*;
public dynamic class INVADOIR_CHOICE_302 extends MovieClip {
public function INVADOIR_CHOICE_302(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 52
//INVADOIR_CHOICE2_305 (game_fla.INVADOIR_CHOICE2_305)
package game_fla {
import flash.display.*;
public dynamic class INVADOIR_CHOICE2_305 extends MovieClip {
public var invader:MovieClip;
public function INVADOIR_CHOICE2_305(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 53
//leveChampion_115 (game_fla.leveChampion_115)
package game_fla {
import flash.display.*;
public dynamic class leveChampion_115 extends MovieClip {
public var champ:MovieClip;
public var star:MovieClip;
}
}//package game_fla
Section 54
//levelBest_mc_114 (game_fla.levelBest_mc_114)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class levelBest_mc_114 extends MovieClip {
public var textBox:TextField;
public var target:MovieClip;
}
}//package game_fla
Section 55
//levelBest2_mc_134 (game_fla.levelBest2_mc_134)
package game_fla {
import flash.display.*;
public dynamic class levelBest2_mc_134 extends MovieClip {
public var flashing:MovieClip;
}
}//package game_fla
Section 56
//levelBest8_mc_245 (game_fla.levelBest8_mc_245)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class levelBest8_mc_245 extends MovieClip {
public var textBox:TextField;
public var target:MovieClip;
}
}//package game_fla
Section 57
//levelBest99_mc_79 (game_fla.levelBest99_mc_79)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class levelBest99_mc_79 extends MovieClip {
public var textBox:TextField;
public var target:MovieClip;
}
}//package game_fla
Section 58
//levelBestGREEN_82 (game_fla.levelBestGREEN_82)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class levelBestGREEN_82 extends MovieClip {
public var points_good:TextField;
}
}//package game_fla
Section 59
//levelBestPOINTS_83 (game_fla.levelBestPOINTS_83)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class levelBestPOINTS_83 extends MovieClip {
public var points_points:TextField;
}
}//package game_fla
Section 60
//levelBestRED_81 (game_fla.levelBestRED_81)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class levelBestRED_81 extends MovieClip {
public var points_bad:TextField;
}
}//package game_fla
Section 61
//levelBonus_mc_111 (game_fla.levelBonus_mc_111)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class levelBonus_mc_111 extends MovieClip {
public var star:MovieClip;
public var textBox:TextField;
}
}//package game_fla
Section 62
//levelBonus2_mc_132 (game_fla.levelBonus2_mc_132)
package game_fla {
import flash.display.*;
public dynamic class levelBonus2_mc_132 extends MovieClip {
public var flashing:MovieClip;
}
}//package game_fla
Section 63
//levelBonus3_mc_136 (game_fla.levelBonus3_mc_136)
package game_fla {
import flash.display.*;
public dynamic class levelBonus3_mc_136 extends MovieClip {
public var flashing:MovieClip;
}
}//package game_fla
Section 64
//LevelSummary_119 (game_fla.LevelSummary_119)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class LevelSummary_119 extends MovieClip {
public var points_4:TextField;
public var points_special:TextField;
public var level:TextField;
public var points_good:TextField;
public var points_bad:TextField;
public var points_1:TextField;
public var points_2:TextField;
public var points_3:TextField;
public function LevelSummary_119(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 65
//LevelSummary2_244 (game_fla.LevelSummary2_244)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class LevelSummary2_244 extends MovieClip {
public var points_4:TextField;
public var points_special:TextField;
public var points_good:TextField;
public var points_bad:TextField;
public var points_1:TextField;
public var points_2:TextField;
public var points_3:TextField;
public function LevelSummary2_244(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 66
//LevelTarget_mc_110 (game_fla.LevelTarget_mc_110)
package game_fla {
import flash.display.*;
public dynamic class LevelTarget_mc_110 extends MovieClip {
public var best:MovieClip;
public var champ:MovieClip;
public var target:MovieClip;
}
}//package game_fla
Section 67
//LevelTarget2_mc_131 (game_fla.LevelTarget2_mc_131)
package game_fla {
import flash.display.*;
public dynamic class LevelTarget2_mc_131 extends MovieClip {
public var best1:MovieClip;
public var best2:MovieClip;
public var best3:MovieClip;
}
}//package game_fla
Section 68
//littleAnim_201 (game_fla.littleAnim_201)
package game_fla {
import flash.display.*;
public dynamic class littleAnim_201 extends MovieClip {
public function littleAnim_201(){
addFrameScript(0, frame1, 96, frame97);
}
function frame97(){
stop();
}
function frame1(){
stop();
}
}
}//package game_fla
Section 69
//MENU2_1 (game_fla.MENU2_1)
package game_fla {
import flash.display.*;
public dynamic class MENU2_1 extends MovieClip {
public var tile1:MovieClip;
public var tile2:MovieClip;
public var tile3:MovieClip;
public var tile6:MovieClip;
public var tile13:MovieClip;
public var tile17:MovieClip;
public var tile19:MovieClip;
public var tile5:MovieClip;
public var tile9:MovieClip;
public var tile11:MovieClip;
public var tile14:MovieClip;
public var tile15:MovieClip;
public var tile16:MovieClip;
public var tile18:MovieClip;
public var tile24:MovieClip;
public var tile25:MovieClip;
public var tile22:MovieClip;
public var tile23:MovieClip;
public var tile8:MovieClip;
public var tile28:MovieClip;
public var tile21:MovieClip;
public var tile4:MovieClip;
public var tile20:MovieClip;
public var tile26:MovieClip;
public var tile10:MovieClip;
public var tile27:MovieClip;
public var vent:MovieClip;
public var tile12:MovieClip;
public var tile7:MovieClip;
}
}//package game_fla
Section 70
//message_mc_333 (game_fla.message_mc_333)
package game_fla {
import flash.display.*;
import com.stampy.random.*;
public dynamic class message_mc_333 extends MovieClip {
public var rand:uint;
public function message_mc_333(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
rand = Random.range(2, 10);
trace(("2-10 = " + rand));
gotoAndStop(rand);
}
}
}//package game_fla
Section 71
//movingText_mc_86 (game_fla.movingText_mc_86)
package game_fla {
import flash.display.*;
public dynamic class movingText_mc_86 extends MovieClip {
public var track:MovieClip;
}
}//package game_fla
Section 72
//MUSIC_CHOICE_329 (game_fla.MUSIC_CHOICE_329)
package game_fla {
import flash.display.*;
public dynamic class MUSIC_CHOICE_329 extends MovieClip {
public function MUSIC_CHOICE_329(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 73
//MuteBtn1_64 (game_fla.MuteBtn1_64)
package game_fla {
import flash.display.*;
public dynamic class MuteBtn1_64 extends MovieClip {
public var muteOFF:SimpleButton;
public var muteON:SimpleButton;
public function MuteBtn1_64(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 74
//MuteBtn2_98 (game_fla.MuteBtn2_98)
package game_fla {
import flash.display.*;
public dynamic class MuteBtn2_98 extends MovieClip {
public var muteOFF:SimpleButton;
public var muteON:SimpleButton;
public function MuteBtn2_98(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 75
//MuteBtn3_89 (game_fla.MuteBtn3_89)
package game_fla {
import flash.display.*;
public dynamic class MuteBtn3_89 extends MovieClip {
public var muteOFF:SimpleButton;
public var muteON:SimpleButton;
public function MuteBtn3_89(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 76
//NEWS_BAD_MC_277 (game_fla.NEWS_BAD_MC_277)
package game_fla {
import flash.display.*;
public dynamic class NEWS_BAD_MC_277 extends MovieClip {
public var blackBox:MovieClip;
}
}//package game_fla
Section 77
//NEWS_BAD2_MC_283 (game_fla.NEWS_BAD2_MC_283)
package game_fla {
import flash.display.*;
public dynamic class NEWS_BAD2_MC_283 extends MovieClip {
public var blackBox:MovieClip;
}
}//package game_fla
Section 78
//NEWS_BAD3_MC_286 (game_fla.NEWS_BAD3_MC_286)
package game_fla {
import flash.display.*;
public dynamic class NEWS_BAD3_MC_286 extends MovieClip {
public var blackBox:MovieClip;
}
}//package game_fla
Section 79
//news_good__MC_273 (game_fla.news_good__MC_273)
package game_fla {
import flash.display.*;
public dynamic class news_good__MC_273 extends MovieClip {
public var blackBox:MovieClip;
}
}//package game_fla
Section 80
//news_good2__MC_282 (game_fla.news_good2__MC_282)
package game_fla {
import flash.display.*;
public dynamic class news_good2__MC_282 extends MovieClip {
public var blackBox:MovieClip;
}
}//package game_fla
Section 81
//news_good3__MC_285 (game_fla.news_good3__MC_285)
package game_fla {
import flash.display.*;
public dynamic class news_good3__MC_285 extends MovieClip {
public var blackBox:MovieClip;
}
}//package game_fla
Section 82
//news_good5__MC_288 (game_fla.news_good5__MC_288)
package game_fla {
import flash.display.*;
public dynamic class news_good5__MC_288 extends MovieClip {
public var blackBox:MovieClip;
}
}//package game_fla
Section 83
//news_good6__MC_289 (game_fla.news_good6__MC_289)
package game_fla {
import flash.display.*;
public dynamic class news_good6__MC_289 extends MovieClip {
public var blackBox:MovieClip;
}
}//package game_fla
Section 84
//ODDS_PICKER_301 (game_fla.ODDS_PICKER_301)
package game_fla {
import flash.display.*;
public dynamic class ODDS_PICKER_301 extends MovieClip {
public var invader_left:SimpleButton;
public var frequency_left:SimpleButton;
public var frequency:MovieClip;
public var invader:MovieClip;
public var frequency_right:SimpleButton;
public var invader_right:SimpleButton;
}
}//package game_fla
Section 85
//pacman_anim_224 (game_fla.pacman_anim_224)
package game_fla {
import flash.display.*;
public dynamic class pacman_anim_224 extends MovieClip {
public var spec:MovieClip;
}
}//package game_fla
Section 86
//Pacman_gr_223 (game_fla.Pacman_gr_223)
package game_fla {
import flash.display.*;
public dynamic class Pacman_gr_223 extends MovieClip {
public var eye:MovieClip;
public var hit:MovieClip;
public var p1:MovieClip;
public var p2:MovieClip;
public var p3:MovieClip;
public var p5:MovieClip;
public var p6:MovieClip;
public var p7:MovieClip;
public var p4:MovieClip;
}
}//package game_fla
Section 87
//PacVader2_179 (game_fla.PacVader2_179)
package game_fla {
import flash.display.*;
public dynamic class PacVader2_179 extends MovieClip {
public var spectrumFilters:MovieClip;
}
}//package game_fla
Section 88
//PAcVader3_178 (game_fla.PAcVader3_178)
package game_fla {
import flash.display.*;
public dynamic class PAcVader3_178 extends MovieClip {
public var pac2:MovieClip;
public var pac3:MovieClip;
public var pac1:MovieClip;
}
}//package game_fla
Section 89
//Padlock_mc_138 (game_fla.Padlock_mc_138)
package game_fla {
import flash.display.*;
public dynamic class Padlock_mc_138 extends MovieClip {
public function Padlock_mc_138(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 90
//Percent_mc_10 (game_fla.Percent_mc_10)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Percent_mc_10 extends MovieClip {
public var textBox:TextField;
}
}//package game_fla
Section 91
//PercentAnim_mc_9 (game_fla.PercentAnim_mc_9)
package game_fla {
import flash.display.*;
public dynamic class PercentAnim_mc_9 extends MovieClip {
public var percent:MovieClip;
}
}//package game_fla
Section 92
//PLAY_AGAIN_BTN2_246 (game_fla.PLAY_AGAIN_BTN2_246)
package game_fla {
import flash.display.*;
public dynamic class PLAY_AGAIN_BTN2_246 extends MovieClip {
public var loading:MovieClip;
public var playAgain:SimpleButton;
}
}//package game_fla
Section 93
//PlayAnim_mc_6 (game_fla.PlayAnim_mc_6)
package game_fla {
import flash.display.*;
public dynamic class PlayAnim_mc_6 extends MovieClip {
public var percent:MovieClip;
}
}//package game_fla
Section 94
//PlayAnim_mc2_247 (game_fla.PlayAnim_mc2_247)
package game_fla {
import flash.display.*;
public dynamic class PlayAnim_mc2_247 extends MovieClip {
public var percent:MovieClip;
}
}//package game_fla
Section 95
//playedText_mc_118 (game_fla.playedText_mc_118)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class playedText_mc_118 extends MovieClip {
public var textBox:TextField;
}
}//package game_fla
Section 96
//PointsTextExplode_92 (game_fla.PointsTextExplode_92)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class PointsTextExplode_92 extends MovieClip {
public var points:TextField;
public function PointsTextExplode_92(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 97
//PointsTextExplode2_253 (game_fla.PointsTextExplode2_253)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class PointsTextExplode2_253 extends MovieClip {
public var points:TextField;
public function PointsTextExplode2_253(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 98
//PointsTextExplode3_255 (game_fla.PointsTextExplode3_255)
package game_fla {
import flash.display.*;
import flash.text.*;
public dynamic class PointsTextExplode3_255 extends MovieClip {
public var points:TextField;
public function PointsTextExplode3_255(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 99
//prizes_249 (game_fla.prizes_249)
package game_fla {
import flash.display.*;
public dynamic class prizes_249 extends MovieClip {
public var trophy1:SimpleButton;
public var trophy5:SimpleButton;
public var trophy4:SimpleButton;
public var trophy6:SimpleButton;
public var trophy3:SimpleButton;
public var trophy2:SimpleButton;
public var lock:SimpleButton;
}
}//package game_fla
Section 100
//randomStatement_335 (game_fla.randomStatement_335)
package game_fla {
import flash.display.*;
import com.stampy.random.*;
public dynamic class randomStatement_335 extends MovieClip {
public var rand2:uint;
public function randomStatement_335(){
addFrameScript(0, frame1, 5, frame6);
}
function frame1(){
rand2 = Random.range(2, 6);
trace(("2-6 = " + rand2));
gotoAndStop(rand2);
}
function frame6(){
stop();
}
}
}//package game_fla
Section 101
//rightBTN_292 (game_fla.rightBTN_292)
package game_fla {
import flash.display.*;
public dynamic class rightBTN_292 extends MovieClip {
public var blackBox:MovieClip;
}
}//package game_fla
Section 102
//scale_308 (game_fla.scale_308)
package game_fla {
import flash.display.*;
public dynamic class scale_308 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 103
//scale1_306 (game_fla.scale1_306)
package game_fla {
import flash.display.*;
public dynamic class scale1_306 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 104
//scale10_316 (game_fla.scale10_316)
package game_fla {
import flash.display.*;
public dynamic class scale10_316 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 105
//scale11_317 (game_fla.scale11_317)
package game_fla {
import flash.display.*;
public dynamic class scale11_317 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 106
//scale12_318 (game_fla.scale12_318)
package game_fla {
import flash.display.*;
public dynamic class scale12_318 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 107
//scale13_319 (game_fla.scale13_319)
package game_fla {
import flash.display.*;
public dynamic class scale13_319 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 108
//scale14_320 (game_fla.scale14_320)
package game_fla {
import flash.display.*;
public dynamic class scale14_320 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 109
//scale2_307 (game_fla.scale2_307)
package game_fla {
import flash.display.*;
public dynamic class scale2_307 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 110
//scale3_309 (game_fla.scale3_309)
package game_fla {
import flash.display.*;
public dynamic class scale3_309 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 111
//scale4_310 (game_fla.scale4_310)
package game_fla {
import flash.display.*;
public dynamic class scale4_310 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 112
//scale5_311 (game_fla.scale5_311)
package game_fla {
import flash.display.*;
public dynamic class scale5_311 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 113
//scale7_312 (game_fla.scale7_312)
package game_fla {
import flash.display.*;
public dynamic class scale7_312 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 114
//scale8_314 (game_fla.scale8_314)
package game_fla {
import flash.display.*;
public dynamic class scale8_314 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 115
//scale9_315 (game_fla.scale9_315)
package game_fla {
import flash.display.*;
public dynamic class scale9_315 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 116
//scaler_313 (game_fla.scaler_313)
package game_fla {
import flash.display.*;
public dynamic class scaler_313 extends MovieClip {
public var invader:MovieClip;
}
}//package game_fla
Section 117
//SIZE_PICKER_304 (game_fla.SIZE_PICKER_304)
package game_fla {
import flash.display.*;
public dynamic class SIZE_PICKER_304 extends MovieClip {
public var invader2_right:SimpleButton;
public var size_small:SimpleButton;
public var invader:MovieClip;
public var invader2_left:SimpleButton;
public var size_big:SimpleButton;
}
}//package game_fla
Section 118
//sizeHeader_323 (game_fla.sizeHeader_323)
package game_fla {
import flash.display.*;
public dynamic class sizeHeader_323 extends MovieClip {
public function sizeHeader_323(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 119
//skin_337 (game_fla.skin_337)
package game_fla {
import flash.display.*;
public dynamic class skin_337 extends MovieClip {
public var mc:MovieClip;
}
}//package game_fla
Section 120
//SkipButton_161 (game_fla.SkipButton_161)
package game_fla {
import flash.display.*;
public dynamic class SkipButton_161 extends MovieClip {
public var blackBox:MovieClip;
public var skipbtn:SimpleButton;
}
}//package game_fla
Section 121
//SpectrumEffects_74 (game_fla.SpectrumEffects_74)
package game_fla {
import flash.display.*;
public dynamic class SpectrumEffects_74 extends MovieClip {
public var holder:MovieClip;
}
}//package game_fla
Section 122
//SpectrumFilters_mc_180 (game_fla.SpectrumFilters_mc_180)
package game_fla {
import flash.display.*;
public dynamic class SpectrumFilters_mc_180 extends MovieClip {
public var spectrumContainer:MovieClip;
}
}//package game_fla
Section 123
//SpectrumRingHolder_mc_72 (game_fla.SpectrumRingHolder_mc_72)
package game_fla {
import flash.display.*;
public dynamic class SpectrumRingHolder_mc_72 extends MovieClip {
public var effects:MovieClip;
}
}//package game_fla
Section 124
//SPEED_CHOICE_299 (game_fla.SPEED_CHOICE_299)
package game_fla {
import flash.display.*;
public dynamic class SPEED_CHOICE_299 extends MovieClip {
public function SPEED_CHOICE_299(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 125
//SPEED_PICKER_298 (game_fla.SPEED_PICKER_298)
package game_fla {
import flash.display.*;
public dynamic class SPEED_PICKER_298 extends MovieClip {
public var speed_right:SimpleButton;
public var time_right:SimpleButton;
public var time_left:SimpleButton;
public var speed:MovieClip;
public var time:MovieClip;
public var speed_left:SimpleButton;
}
}//package game_fla
Section 126
//SpriteDump_mc_68 (game_fla.SpriteDump_mc_68)
package game_fla {
import flash.display.*;
public dynamic class SpriteDump_mc_68 extends MovieClip {
public function SpriteDump_mc_68(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 127
//stickerRollOver_188 (game_fla.stickerRollOver_188)
package game_fla {
import flash.display.*;
public dynamic class stickerRollOver_188 extends MovieClip {
public var stickerColor:MovieClip;
public var e4:SimpleButton;
public function stickerRollOver_188(){
addFrameScript(0, frame1, 69, frame70);
}
function frame70(){
stop();
}
function frame1(){
stop();
}
}
}//package game_fla
Section 128
//STYLE_PICKER_327 (game_fla.STYLE_PICKER_327)
package game_fla {
import flash.display.*;
public dynamic class STYLE_PICKER_327 extends MovieClip {
public var music:MovieClip;
public var background:MovieClip;
public var background_left:SimpleButton;
public var music_right:SimpleButton;
public var background_right:SimpleButton;
public var music_left:SimpleButton;
}
}//package game_fla
Section 129
//titleCHOICES_mc_12 (game_fla.titleCHOICES_mc_12)
package game_fla {
import flash.display.*;
public dynamic class titleCHOICES_mc_12 extends MovieClip {
public function titleCHOICES_mc_12(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package game_fla
Section 130
//TrackText_mc_87 (game_fla.TrackText_mc_87)
package game_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.text.*;
public dynamic class TrackText_mc_87 extends MovieClip {
public var loopTimer:Timer;
public var matr:Matrix;
public var myText_txt:TextField;
public var spreadMethod:String;
public var fillType:String;
public var speed:Number;
public var colors:Array;
public var scrollTimer:Timer;
public var posX;
public var textMask:MovieClip;
public var interval:Number;
public var ratios:Array;
public var alphas:Array;
public function TrackText_mc_87(){
addFrameScript(0, frame1);
}
public function moveTextfield(_arg1:Event):void{
myText_txt.x--;
if ((((myText_txt.x <= posX)) && ((myText_txt.scrollH == 0)))){
loopTimer.stop();
scrollTimer.start();
};
if (myText_txt.x <= (posX - myText_txt.width)){
myText_txt.x = (posX + myText_txt.width);
myText_txt.scrollH = 0;
};
}
function frame1(){
interval = 20;
speed = 1;
textMask = new MovieClip();
fillType = GradientType.LINEAR;
colors = [0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF];
alphas = [0, 1, 1, 0];
ratios = [0, 40, 215, 0xFF];
matr = new Matrix();
matr.createGradientBox(200, 30, 0, 0, 0);
spreadMethod = SpreadMethod.PAD;
textMask.graphics.beginGradientFill(fillType, colors, alphas, ratios, matr, spreadMethod);
textMask.graphics.drawRect(0, 0, 200, 30);
loopTimer = new Timer(interval);
loopTimer.addEventListener(TimerEvent.TIMER, moveTextfield);
scrollTimer = new Timer(interval);
scrollTimer.addEventListener(TimerEvent.TIMER, scrollText);
if (myText_txt.scrollH < myText_txt.maxScrollH){
addChild(textMask);
textMask.blendMode = "overlay";
myText_txt.mask = textMask;
posX = myText_txt.x;
textMask.x = posX;
textMask.y = myText_txt.y;
textMask.width = myText_txt.width;
textMask.height = myText_txt.height;
myText_txt.cacheAsBitmap = true;
textMask.cacheAsBitmap = true;
myText_txt.x = (posX + myText_txt.width);
loopTimer.start();
};
}
public function scrollText(_arg1:Event):void{
myText_txt.scrollH = (myText_txt.scrollH + speed);
if (myText_txt.scrollH == myText_txt.maxScrollH){
scrollTimer.stop();
loopTimer.start();
};
}
}
}//package game_fla
Section 131
//Tween1_149 (game_fla.Tween1_149)
package game_fla {
import flash.display.*;
public dynamic class Tween1_149 extends MovieClip {
public var body:MovieClip;
}
}//package game_fla
Section 132
//Bounce (gs.easing.Bounce)
package gs.easing {
public class Bounce {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 / 2)){
return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
}
}//package gs.easing
Section 133
//Elastic (gs.easing.Elastic)
package gs.easing {
public class Elastic {
private static const _2PI:Number = (Math.PI * 2);
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) * 0.5) + _arg3) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) + _arg3) + _arg2));
}
}
}//package gs.easing
Section 134
//Quart (gs.easing.Quart)
package gs.easing {
public class Quart {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2));
}
}
}//package gs.easing
Section 135
//Quint (gs.easing.Quint)
package gs.easing {
public class Quint {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package gs.easing
Section 136
//TweenEvent (gs.events.TweenEvent)
package gs.events {
import flash.events.*;
public class TweenEvent extends Event {
public var info:Object;
public static const UPDATE:String = "update";
public static const START:String = "start";
public static const version:Number = 0.9;
public static const COMPLETE:String = "complete";
public function TweenEvent(_arg1:String, _arg2:Object=null, _arg3:Boolean=false, _arg4:Boolean=false){
super(_arg1, _arg3, _arg4);
this.info = _arg2;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.info, this.bubbles, this.cancelable));
}
}
}//package gs.events
Section 137
//AutoAlphaPlugin (gs.plugins.AutoAlphaPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class AutoAlphaPlugin extends TweenPlugin {
protected var _tweenVisible:Boolean;
protected var _tween:TweenLite;
protected var _visible:Boolean;
protected var _target:Object;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function AutoAlphaPlugin(){
this.propName = "autoAlpha";
this.overwriteProps = ["alpha", "visible"];
this.onComplete = onCompleteTween;
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (((!((_target.visible == true))) && (_tweenVisible))){
_target.visible = true;
};
}
public function onCompleteTween():void{
if (((((_tweenVisible) && (!((_tween.vars.runBackwards == true))))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(!((_arg2 == 0)));
_tweenVisible = true;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function killProps(_arg1:Object):void{
super.killProps(_arg1);
_tweenVisible = !(Boolean(("visible" in _arg1)));
}
}
}//package gs.plugins
Section 138
//BevelFilterPlugin (gs.plugins.BevelFilterPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.filters.*;
public class BevelFilterPlugin extends FilterPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
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))));
return (true);
}
}
}//package gs.plugins
Section 139
//BezierPlugin (gs.plugins.BezierPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class BezierPlugin extends TweenPlugin {
protected var _future:Object;
protected var _orient:Boolean;
protected var _orientData:Array;
protected var _beziers:Object;
protected var _target:Object;
protected static const _RAD2DEG:Number = 57.2957795130823;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function BezierPlugin(){
_future = {};
super();
this.propName = "bezier";
this.overwriteProps = [];
}
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:int;
var _local9:Object;
var _local10:Boolean;
var _local11:Number;
var _local12:Number;
var _local13:Array;
var _local14:Number;
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])))));
_local8 = ((_local7)<0) ? -1 : 1;
_target[_local3] = ((((_local7 % 1) * _local8))>0.5) ? (int(_local7) + _local8) : int(_local7);
} else {
_target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
};
};
};
if (_orient){
_local9 = _target;
_local10 = this.round;
_target = _future;
this.round = false;
_orient = false;
this.changeFactor = (_arg1 + 0.01);
_target = _local9;
this.round = _local10;
_orient = true;
_local2 = 0;
while (_local2 < _orientData.length) {
_local13 = _orientData[_local2];
_local14 = ((_local13[3]) || (0));
_local11 = (_future[_local13[0]] - _target[_local13[0]]);
_local12 = (_future[_local13[1]] - _target[_local13[1]]);
_target[_local13[2]] = ((Math.atan2(_local12, _local11) * _RAD2DEG) + _local14);
_local2++;
};
};
}
protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{
var _local4:Object;
var _local5:int;
var _local6:String;
_target = _arg1.target;
if (_arg1.exposedVars.orientToBezier == true){
_orientData = [["x", "y", "rotation", 0]];
_orient = true;
} else {
if ((_arg1.exposedVars.orientToBezier is Array)){
_orientData = _arg1.exposedVars.orientToBezier;
_orient = true;
};
};
_local4 = {};
_local5 = 0;
while (_local5 < _arg2.length) {
for (_local6 in _arg2[_local5]) {
if (_local4[_local6] == undefined){
_local4[_local6] = [_arg1.target[_local6]];
};
if (typeof(_arg2[_local5][_local6]) == "number"){
_local4[_local6].push(_arg2[_local5][_local6]);
} else {
_local4[_local6].push((_arg1.target[_local6] + Number(_arg2[_local5][_local6])));
};
};
_local5++;
};
for (_local6 in _local4) {
this.overwriteProps[this.overwriteProps.length] = _local6;
if (_arg1.exposedVars[_local6] != undefined){
if (typeof(_arg1.exposedVars[_local6]) == "number"){
_local4[_local6].push(_arg1.exposedVars[_local6]);
} else {
_local4[_local6].push((_arg1.target[_local6] + Number(_arg1.exposedVars[_local6])));
};
delete _arg1.exposedVars[_local6];
_local5 = (_arg1.tweens.length - 1);
while (_local5 > -1) {
if (_arg1.tweens[_local5].name == _local6){
_arg1.tweens.splice(_local5, 1);
};
_local5--;
};
};
};
_beziers = parseBeziers(_local4, _arg3);
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), false);
return (true);
}
override public function killProps(_arg1:Object):void{
var _local2:String;
for (_local2 in _beziers) {
if ((_local2 in _arg1)){
delete _beziers[_local2];
};
};
super.killProps(_arg1);
}
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 gs.plugins
Section 140
//BezierThroughPlugin (gs.plugins.BezierThroughPlugin)
package gs.plugins {
import gs.*;
public class BezierThroughPlugin extends BezierPlugin {
public static const VERSION:Number = 1;
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 gs.plugins
Section 141
//BlurFilterPlugin (gs.plugins.BlurFilterPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.filters.*;
public class BlurFilterPlugin extends FilterPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
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))));
return (true);
}
}
}//package gs.plugins
Section 142
//ColorMatrixFilterPlugin (gs.plugins.ColorMatrixFilterPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.filters.*;
public class ColorMatrixFilterPlugin extends FilterPlugin {
protected var _matrix:Array;
protected var _matrixTween:EndArrayPlugin;
public static const API:Number = 1;
public static const VERSION:Number = 1.1;
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 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()));
_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);
}
override public function set changeFactor(_arg1:Number):void{
_matrixTween.changeFactor = _arg1;
ColorMatrixFilter(_filter).matrix = _matrix;
super.changeFactor = _arg1;
}
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 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 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 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));
}
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));
}
}
}//package gs.plugins
Section 143
//DropShadowFilterPlugin (gs.plugins.DropShadowFilterPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.filters.*;
public class DropShadowFilterPlugin extends FilterPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
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));
return (true);
}
}
}//package gs.plugins
Section 144
//EndArrayPlugin (gs.plugins.EndArrayPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _info:Array;
protected var _a:Array;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function EndArrayPlugin(){
_info = [];
super();
this.propName = "endArray";
this.overwriteProps = ["endArray"];
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:ArrayTweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_a[_local3.index] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_info.length - 1);
while (_local2 > -1) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
public function init(_arg1:Array, _arg2:Array):void{
var _local3:int;
_a = _arg1;
_local3 = (_arg2.length - 1);
while (_local3 > -1) {
if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){
_info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3]));
};
_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);
}
}
}//package gs.plugins
Section 145
//FilterPlugin (gs.plugins.FilterPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.filters.*;
import gs.utils.tween.*;
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 = 1.03;
public static const API:Number = 1;
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:TweenInfo;
var _local4:Array;
_local4 = _target.filters;
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
if (!(_local4[_index] is _type)){
_index = (_local4.length - 1);
_local2 = (_local4.length - 1);
while (_local2 > -1) {
if ((_local4[_local2] is _type)){
_index = _local2;
break;
};
_local2--;
};
};
_local4[_index] = _filter;
_target.filters = _local4;
}
public function onCompleteTween():void{
var _local1:int;
var _local2:Array;
if (_remove){
_local2 = _target.filters;
if (!(_local2[_index] is _type)){
_local1 = (_local2.length - 1);
while (_local1 > -1) {
if ((_local2[_local1] is _type)){
_local2.splice(_local1, 1);
break;
};
_local1--;
};
} else {
_local2.splice(_index, 1);
};
_target.filters = _local2;
};
}
protected function initFilter(_arg1:Object, _arg2:BitmapFilter):void{
var _local3:Array;
var _local4:String;
var _local5:int;
var _local6:HexColorsPlugin;
var _local7:Object;
_local3 = _target.filters;
_index = -1;
if (_arg1.index != null){
_index = _arg1.index;
} else {
_local5 = (_local3.length - 1);
while (_local5 > -1) {
if ((_local3[_local5] is _type)){
_index = _local5;
break;
};
_local5--;
};
};
if ((((((_index == -1)) || ((_local3[_index] == null)))) || ((_arg1.addFilter == true)))){
_index = ((_arg1.index)!=null) ? _arg1.index : _local3.length;
_local3[_index] = _arg2;
_target.filters = _local3;
};
_filter = _local3[_index];
_remove = Boolean((_arg1.remove == true));
if (_remove){
this.onComplete = onCompleteTween;
};
_local7 = ((_arg1.isTV)==true) ? _arg1.exposedVars : _arg1;
for (_local4 in _local7) {
if (((((((((!((_local4 in _filter))) || ((_filter[_local4] == _local7[_local4])))) || ((_local4 == "remove")))) || ((_local4 == "index")))) || ((_local4 == "addFilter")))){
} else {
if ((((((_local4 == "color")) || ((_local4 == "highlightColor")))) || ((_local4 == "shadowColor")))){
_local6 = new HexColorsPlugin();
_local6.initColor(_filter, _local4, _filter[_local4], _local7[_local4]);
_tweens[_tweens.length] = new TweenInfo(_local6, "changeFactor", 0, 1, _local4, false);
} else {
if ((((((((_local4 == "quality")) || ((_local4 == "inner")))) || ((_local4 == "knockout")))) || ((_local4 == "hideObject")))){
_filter[_local4] = _local7[_local4];
} else {
addTween(_filter, _local4, _filter[_local4], _local7[_local4], _local4);
};
};
};
};
}
}
}//package gs.plugins
Section 146
//FramePlugin (gs.plugins.FramePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class FramePlugin extends TweenPlugin {
public var frame:int;
protected var _target:MovieClip;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function FramePlugin(){
this.propName = "frame";
this.overwriteProps = ["frame"];
this.round = true;
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.gotoAndStop(this.frame);
}
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);
}
}
}//package gs.plugins
Section 147
//GlowFilterPlugin (gs.plugins.GlowFilterPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.filters.*;
public class GlowFilterPlugin extends FilterPlugin {
public static const VERSION:Number = 1;
public static const API:Number = 1;
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));
return (true);
}
}
}//package gs.plugins
Section 148
//HexColorsPlugin (gs.plugins.HexColorsPlugin)
package gs.plugins {
import gs.*;
public class HexColorsPlugin extends TweenPlugin {
protected var _colors:Array;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function HexColorsPlugin(){
this.propName = "hexColors";
this.overwriteProps = [];
_colors = [];
}
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--;
};
}
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;
};
}
}
}//package gs.plugins
Section 149
//RemoveTintPlugin (gs.plugins.RemoveTintPlugin)
package gs.plugins {
public class RemoveTintPlugin extends TintPlugin {
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function RemoveTintPlugin(){
this.propName = "removeTint";
}
}
}//package gs.plugins
Section 150
//RoundPropsPlugin (gs.plugins.RoundPropsPlugin)
package gs.plugins {
public class RoundPropsPlugin extends TweenPlugin {
public static const VERSION:Number = 1;
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 gs.plugins
Section 151
//ShortRotationPlugin (gs.plugins.ShortRotationPlugin)
package gs.plugins {
import gs.*;
public class ShortRotationPlugin extends TweenPlugin {
public static const VERSION:Number = 1;
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"){
trace("WARNING: You appear to be using the old shortRotation syntax. Instead of passing a number, please pass an object with properties that correspond to the rotations values For example, TweenMax.to(mc, 2, {shortRotation:{rotationX:-170, rotationY:25}})");
return (false);
};
for (_local4 in _arg2) {
initRotation(_arg1, _local4, _arg1[_local4], _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 gs.plugins
Section 152
//TintPlugin (gs.plugins.TintPlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.geom.*;
import gs.utils.tween.*;
public class TintPlugin extends TweenPlugin {
protected var _ct:ColorTransform;
protected var _ignoreAlpha:Boolean;
protected var _target:DisplayObject;
public static const VERSION:Number = 1.1;
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 set changeFactor(_arg1:Number):void{
var _local2:ColorTransform;
updateTweens(_arg1);
if (_ignoreAlpha){
_local2 = _target.transform.colorTransform;
_ct.alphaMultiplier = _local2.alphaMultiplier;
_ct.alphaOffset = _local2.alphaOffset;
};
_target.transform.colorTransform = _ct;
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local3:int;
var _local4:String;
_target = _arg1;
_ct = _target.transform.colorTransform;
_local3 = (_props.length - 1);
while (_local3 > -1) {
_local4 = _props[_local3];
if (_ct[_local4] != _arg2[_local4]){
_tweens[_tweens.length] = new TweenInfo(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false);
};
_local3--;
};
}
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.exposedVars.removeTint == true))))){
_local4.color = uint(_arg2);
};
_ignoreAlpha = true;
init((_arg1 as DisplayObject), _local4);
return (true);
}
}
}//package gs.plugins
Section 153
//TweenPlugin (gs.plugins.TweenPlugin)
package gs.plugins {
import gs.*;
import gs.utils.tween.*;
public class TweenPlugin {
public var overwriteProps:Array;
protected var _tweens:Array;
public var round:Boolean;
public var onComplete:Function;
public var propName:String;
protected var _changeFactor:Number;// = 0
public static const VERSION:Number = 1.03;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
_changeFactor = 0;
super();
}
protected function updateTweens(_arg1:Number):void{
var _local2:int;
var _local3:TweenInfo;
var _local4:Number;
var _local5:int;
if (this.round){
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local5 = ((_local4)<0) ? -1 : 1;
_local3.target[_local3.property] = ((((_local4 % 1) * _local5))>0.5) ? (int(_local4) + _local5) : int(_local4);
_local2--;
};
} else {
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
_local2--;
};
};
}
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") ? (_arg4 - _arg3) : Number(_arg4);
if (_local6 != 0){
_tweens[_tweens.length] = new TweenInfo(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false);
};
};
}
public function killProps(_arg1:Object):void{
var _local2:int;
_local2 = (this.overwriteProps.length - 1);
while (_local2 > -1) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
_local2--;
};
_local2 = (_tweens.length - 1);
while (_local2 > -1) {
if ((_tweens[_local2].name in _arg1)){
_tweens.splice(_local2, 1);
};
_local2--;
};
}
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 static function activate(_arg1:Array):Boolean{
var _local2:int;
var _local3:Object;
_local2 = (_arg1.length - 1);
while (_local2 > -1) {
_local3 = new (_arg1[_local2]);
TweenLite.plugins[_local3.propName] = _arg1[_local2];
_local2--;
};
return (true);
}
}
}//package gs.plugins
Section 154
//VisiblePlugin (gs.plugins.VisiblePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
public class VisiblePlugin extends TweenPlugin {
protected var _tween:TweenLite;
protected var _visible:Boolean;
protected var _target:Object;
public static const VERSION:Number = 1;
public static const API:Number = 1;
public function VisiblePlugin(){
this.propName = "visible";
this.overwriteProps = ["visible"];
this.onComplete = onCompleteTween;
}
override public function set changeFactor(_arg1:Number):void{
if (_target.visible != true){
_target.visible = true;
};
}
public function onCompleteTween():void{
if (((!((_tween.vars.runBackwards == true))) && ((_tween.ease == _tween.vars.ease)))){
_target.visible = _visible;
};
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_visible = Boolean(_arg2);
return (true);
}
}
}//package gs.plugins
Section 155
//VolumePlugin (gs.plugins.VolumePlugin)
package gs.plugins {
import flash.display.*;
import gs.*;
import flash.media.*;
public class VolumePlugin extends TweenPlugin {
protected var _st:SoundTransform;
protected var _target:Object;
public static const VERSION:Number = 1.01;
public static const API:Number = 1;
public function VolumePlugin(){
this.propName = "volume";
this.overwriteProps = ["volume"];
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.soundTransform = _st;
}
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);
}
}
}//package gs.plugins
Section 156
//ArrayTweenInfo (gs.utils.tween.ArrayTweenInfo)
package gs.utils.tween {
public class ArrayTweenInfo {
public var change:Number;
public var index:uint;
public var start:Number;
public function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
}//package gs.utils.tween
Section 157
//TweenInfo (gs.utils.tween.TweenInfo)
package gs.utils.tween {
public class TweenInfo {
public var start:Number;
public var name:String;
public var change:Number;
public var target:Object;
public var property:String;
public var isPlugin:Boolean;
public function TweenInfo(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
}
}
}//package gs.utils.tween
Section 158
//OverwriteManager (gs.OverwriteManager)
package gs {
import flash.utils.*;
import gs.utils.tween.*;
import flash.errors.*;
public class OverwriteManager {
public static const ALL:int = 1;
public static const NONE:int = 0;
public static const AUTO:int = 2;
public static const CONCURRENT:int = 3;
public static const version:Number = 3.12;
public static var mode:int;
public static var enabled:Boolean;
public static function killVars(_arg1:Object, _arg2:Object, _arg3:Array):void{
var _local4:int;
var _local5:String;
var _local6:TweenInfo;
_local4 = (_arg3.length - 1);
while (_local4 > -1) {
_local6 = _arg3[_local4];
if ((_local6.name in _arg1)){
_arg3.splice(_local4, 1);
} else {
if (((_local6.isPlugin) && ((_local6.name == "_MULTIPLE_")))){
_local6.target.killProps(_arg1);
if (_local6.target.overwriteProps.length == 0){
_arg3.splice(_local4, 1);
};
};
};
_local4--;
};
for (_local5 in _arg1) {
delete _arg2[_local5];
};
}
public static function manageOverwrites(_arg1:TweenLite, _arg2:Array):void{
var _local3:Object;
var _local4:int;
var _local5:Number;
var _local6:Array;
var _local7:int;
var _local8:TweenLite;
var _local9:int;
var _local10:Array;
var _local11:Object;
var _local12:int;
var _local13:TweenInfo;
var _local14:Array;
_local3 = _arg1.vars;
_local4 = ((_local3.overwrite)==undefined) ? mode : int(_local3.overwrite);
if ((((_local4 < 2)) || ((_arg2 == null)))){
return;
};
_local5 = _arg1.startTime;
_local6 = [];
_local9 = -1;
_local7 = (_arg2.length - 1);
while (_local7 > -1) {
_local8 = _arg2[_local7];
if (_local8 == _arg1){
_local9 = _local7;
} else {
if ((((((_local7 < _local9)) && ((_local8.startTime <= _local5)))) && (((_local8.startTime + ((_local8.duration * 1000) / _local8.combinedTimeScale)) > _local5)))){
_local6[_local6.length] = _local8;
};
};
_local7--;
};
if ((((_local6.length == 0)) || ((_arg1.tweens.length == 0)))){
return;
};
if (_local4 == AUTO){
_local10 = _arg1.tweens;
_local11 = {};
_local7 = (_local10.length - 1);
while (_local7 > -1) {
_local13 = _local10[_local7];
if (_local13.isPlugin){
if (_local13.name == "_MULTIPLE_"){
_local14 = _local13.target.overwriteProps;
_local12 = (_local14.length - 1);
while (_local12 > -1) {
_local11[_local14[_local12]] = true;
_local12--;
};
} else {
_local11[_local13.name] = true;
};
_local11[_local13.target.propName] = true;
} else {
_local11[_local13.name] = true;
};
_local7--;
};
_local7 = (_local6.length - 1);
while (_local7 > -1) {
killVars(_local11, _local6[_local7].exposedVars, _local6[_local7].tweens);
_local7--;
};
} else {
_local7 = (_local6.length - 1);
while (_local7 > -1) {
_local6[_local7].enabled = false;
_local7--;
};
};
}
public static function init(_arg1:int=2):int{
if (TweenLite.version < 10.09){
trace("TweenLite 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 = OverwriteManager;
mode = _arg1;
enabled = true;
return (mode);
}
}
}//package gs
Section 159
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import gs.utils.tween.*;
import gs.plugins.*;
public class TweenLite {
public var delay:Number;
protected var _hasUpdate:Boolean;
protected var _hasPlugins:Boolean;
public var started:Boolean;
public var initted:Boolean;
public var active:Boolean;
public var startTime:Number;
public var target:Object;
public var duration:Number;
public var gc:Boolean;
public var vars:Object;
public var ease:Function;
public var tweens:Array;
public var exposedVars:Object;
public var combinedTimeScale:Number;
public var initTime:Number;
public static const version:Number = 10.091;
private static var _timer:Timer = new Timer(2000);
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var currentTime:uint;
public static var masterList:Dictionary = new Dictionary(false);
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, roundProps:1, onStart:1, onStartParams:1, persist:1, renderOnStart:1, proxiedEase:1, easeParams:1, yoyo:1, loop:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, orientToBezier:1, timeScale:1};
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var timingSprite:Sprite = new Sprite();
public static var overwriteManager:Object;
private static var _tlInitted:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local4:int;
super();
if (_arg1 == null){
return;
};
if (!_tlInitted){
TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin]);
currentTime = getTimer();
timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage, false, 0, true);
_timer.start();
_tlInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.combinedTimeScale = ((_arg3.timeScale) || (1));
this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0))));
this.target = _arg1;
if (typeof(this.vars.ease) != "function"){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
this.ease = this.vars.ease;
this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedVars : this.vars;
this.tweens = [];
this.initTime = currentTime;
this.startTime = (this.initTime + (this.delay * 1000));
_local4 = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if (((!((_arg1 in masterList))) || ((_local4 == 1)))){
masterList[_arg1] = [this];
} else {
masterList[_arg1].push(this);
};
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){
initTweenVals();
if (this.active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
if (((((!((this.exposedVars.visible == null))) && ((this.vars.runBackwards == true)))) && ((this.target is DisplayObject)))){
this.target.visible = this.exposedVars.visible;
};
};
}
public function set enabled(_arg1:Boolean):void{
var _local2:Array;
var _local3:Boolean;
var _local4:int;
if (_arg1){
if (!(this.target in masterList)){
masterList[this.target] = [this];
} else {
_local2 = masterList[this.target];
_local4 = (_local2.length - 1);
while (_local4 > -1) {
if (_local2[_local4] == this){
_local3 = true;
break;
};
_local4--;
};
if (!_local3){
_local2[_local2.length] = this;
};
};
};
this.gc = (_arg1) ? false : true;
if (this.gc){
this.active = false;
} else {
this.active = this.started;
};
}
public function clear():void{
this.tweens = [];
this.vars = (this.exposedVars = {ease:this.vars.ease});
_hasUpdate = false;
}
public function render(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
var _local4:TweenInfo;
var _local5:int;
_local2 = ((_arg1 - this.startTime) * 0.001);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change));
_local5--;
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function activate():void{
this.started = (this.active = true);
if (!this.initted){
initTweenVals();
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
}
public function get enabled():Boolean{
return ((this.gc) ? false : true);
}
public function initTweenVals():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:TweenInfo;
if (((!((this.exposedVars.timeScale == undefined))) && (this.target.hasOwnProperty("timeScale")))){
this.tweens[this.tweens.length] = new TweenInfo(this.target, "timeScale", this.target.timeScale, (this.exposedVars.timeScale - this.target.timeScale), "timeScale", false);
};
for (_local1 in this.exposedVars) {
if ((_local1 in _reservedProps)){
} else {
if ((_local1 in plugins)){
_local3 = new (plugins[_local1]);
if (_local3.onInitTween(this.target, this.exposedVars[_local1], this) == false){
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
} else {
this.tweens[this.tweens.length] = new TweenInfo(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true);
_hasPlugins = true;
};
} else {
this.tweens[this.tweens.length] = new TweenInfo(this.target, _local1, this.target[_local1], ((typeof(this.exposedVars[_local1]))=="number") ? (this.exposedVars[_local1] - this.target[_local1]) : Number(this.exposedVars[_local1]), _local1, false);
};
};
};
if (this.vars.runBackwards == true){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
_local4 = this.tweens[_local2];
this.tweens[_local2].start = (_local4.start + _local4.change);
_local4.change = -(_local4.change);
_local2--;
};
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
if (((TweenLite.overwriteManager.enabled) && ((this.target in masterList)))){
overwriteManager.manageOverwrites(this, masterList[this.target]);
};
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)));
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.exposedVars, this.tweens);
};
}
public function complete(_arg1:Boolean=false):void{
var _local2:int;
if (!_arg1){
if (!this.initted){
initTweenVals();
};
this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale));
render(currentTime);
return;
};
if (_hasPlugins){
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
if (((this.tweens[_local2].isPlugin) && (!((this.tweens[_local2].target.onComplete == null))))){
this.tweens[_local2].target.onComplete();
};
_local2--;
};
};
if (this.vars.persist != true){
this.enabled = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function updateAll(_arg1:Event=null):void{
var _local2:uint;
var _local3:Dictionary;
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
_local2 = (currentTime = getTimer());
_local3 = masterList;
for each (_local4 in _local3) {
_local5 = (_local4.length - 1);
while (_local5 > -1) {
_local6 = _local4[_local5];
if (_local6.active){
_local6.render(_local2);
} else {
if (_local6.gc){
_local4.splice(_local5, 1);
} else {
if (_local2 >= _local6.startTime){
_local6.activate();
_local6.render(_local2);
};
};
};
_local5--;
};
};
}
public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{
if (_arg1 != null){
if (_arg2){
_arg1.clear();
};
_arg1.enabled = false;
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
if (((!((_arg1 == null))) && ((_arg1 in masterList)))){
_local3 = masterList[_arg1];
_local4 = (_local3.length - 1);
while (_local4 > -1) {
_local5 = _local3[_local4];
if (((_arg2) && (!(_local5.gc)))){
_local5.complete(false);
};
_local5.clear();
_local4--;
};
delete masterList[_arg1];
};
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
protected static function killGarbage(_arg1:TimerEvent):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = masterList;
for (_local3 in _local2) {
if (_local2[_local3].length == 0){
delete _local2[_local3];
};
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 160
//TweenMax (gs.TweenMax)
package gs {
import flash.events.*;
import flash.utils.*;
import gs.utils.tween.*;
import gs.plugins.*;
import gs.events.*;
public class TweenMax extends TweenLite implements IEventDispatcher {
protected var _dispatcher:EventDispatcher;
protected var _callbacks:Object;
public var pauseTime:Number;
protected var _repeatCount:Number;
protected var _timeScale:Number;
public static const version:Number = 10.1;
public static var removeTween:Function = TweenLite.removeTween;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init();
;
protected static var _pausedTweens:Dictionary = new Dictionary(false);
protected static var _globalTimeScale:Number = 1;
public static var killTweensOf:Function = TweenLite.killTweensOf;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
private static var _activatedPlugins:Boolean = TweenPlugin.activate([TintPlugin, RemoveTintPlugin, FramePlugin, AutoAlphaPlugin, VisiblePlugin, VolumePlugin, EndArrayPlugin, HexColorsPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, BevelFilterPlugin, DropShadowFilterPlugin, GlowFilterPlugin, RoundPropsPlugin, BezierPlugin, BezierThroughPlugin, ShortRotationPlugin]);
public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){
super(_arg1, _arg2, _arg3);
if (TweenLite.version < 10.09){
trace("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.");
};
if (((!((this.combinedTimeScale == 1))) && ((this.target is TweenMax)))){
_timeScale = 1;
this.combinedTimeScale = _globalTimeScale;
} else {
_timeScale = this.combinedTimeScale;
this.combinedTimeScale = (this.combinedTimeScale * _globalTimeScale);
};
if (((!((this.combinedTimeScale == 1))) && (!((this.delay == 0))))){
this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale)));
};
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
initDispatcher();
if ((((_arg2 == 0)) && ((this.delay == 0)))){
onUpdateDispatcher();
onCompleteDispatcher();
};
};
_repeatCount = 0;
if (((!(isNaN(this.vars.yoyo))) || (!(isNaN(this.vars.loop))))){
this.vars.persist = true;
};
if ((((this.delay == 0)) && (!((this.exposedVars.startAt == null))))){
this.exposedVars.startAt.overwrite = 0;
new TweenMax(this.target, 0, this.exposedVars.startAt);
};
}
override public function set enabled(_arg1:Boolean):void{
if (!_arg1){
_pausedTweens[this] = null;
delete _pausedTweens[this];
};
super.enabled = _arg1;
if (_arg1){
this.combinedTimeScale = (_timeScale * _globalTimeScale);
};
}
public function set reversed(_arg1:Boolean):void{
if (this.reversed != _arg1){
reverse();
};
}
override public function render(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
var _local4:TweenInfo;
var _local5:int;
_local2 = (((_arg1 - this.startTime) * 0.001) * this.combinedTimeScale);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.target[_local4.property] = (_local4.start + (_local3 * _local4.change));
_local5--;
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
protected function adjustStartValues():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:TweenInfo;
var _local6:int;
_local1 = this.progress;
if (_local1 != 0){
_local2 = this.ease(_local1, 0, 1, 1);
_local3 = (1 / (1 - _local2));
_local6 = (this.tweens.length - 1);
while (_local6 > -1) {
_local5 = this.tweens[_local6];
_local4 = (_local5.start + _local5.change);
if (_local5.isPlugin){
_local5.change = ((_local4 - _local2) * _local3);
} else {
_local5.change = ((_local4 - _local5.target[_local5.property]) * _local3);
};
_local5.start = (_local4 - _local5.change);
_local6--;
};
};
}
public function get timeScale():Number{
return (_timeScale);
}
public function restart(_arg1:Boolean=false):void{
if (_arg1){
this.initTime = currentTime;
this.startTime = (currentTime + (this.delay * (1000 / this.combinedTimeScale)));
} else {
this.startTime = currentTime;
this.initTime = (currentTime - (this.delay * (1000 / this.combinedTimeScale)));
};
_repeatCount = 0;
if (this.target != this.vars.onComplete){
render(this.startTime);
};
this.pauseTime = NaN;
_pausedTweens[this] = null;
delete _pausedTweens[this];
this.enabled = true;
}
public function get paused():Boolean{
return (!(isNaN(this.pauseTime)));
}
public function killProperties(_arg1:Array):void{
var _local2:Object;
var _local3:int;
_local2 = {};
_local3 = (_arg1.length - 1);
while (_local3 > -1) {
_local2[_arg1[_local3]] = true;
_local3--;
};
killVars(_local2);
}
public function resume():void{
this.enabled = true;
if (!isNaN(this.pauseTime)){
this.initTime = (this.initTime + (currentTime - this.pauseTime));
this.startTime = (this.initTime + (this.delay * (1000 / this.combinedTimeScale)));
this.pauseTime = NaN;
if (((!(this.started)) && ((currentTime >= this.startTime)))){
activate();
} else {
this.active = this.started;
};
_pausedTweens[this] = null;
delete _pausedTweens[this];
};
}
override public function complete(_arg1:Boolean=false):void{
if (((((!(isNaN(this.vars.yoyo))) && ((((_repeatCount < this.vars.yoyo)) || ((this.vars.yoyo == 0)))))) || (((!(isNaN(this.vars.loop))) && ((((_repeatCount < this.vars.loop)) || ((this.vars.loop == 0)))))))){
_repeatCount++;
if (!isNaN(this.vars.yoyo)){
this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease;
};
this.startTime = (_arg1) ? (this.startTime + (this.duration * (1000 / this.combinedTimeScale))) : currentTime;
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
} else {
if (this.vars.persist == true){
pause();
};
};
super.complete(_arg1);
}
public function invalidate(_arg1:Boolean=true):void{
var _local2:Number;
if (this.initted){
_local2 = this.progress;
if (((!(_arg1)) && (!((_local2 == 0))))){
this.progress = 0;
};
this.tweens = [];
_hasPlugins = false;
this.exposedVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars;
initTweenVals();
_timeScale = ((this.vars.timeScale) || (1));
this.combinedTimeScale = (_timeScale * _globalTimeScale);
this.delay = ((this.vars.delay) || (0));
if (isNaN(this.pauseTime)){
this.startTime = (this.initTime + ((this.delay * 1000) / this.combinedTimeScale));
};
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
if (_dispatcher != null){
this.vars.onStart = _callbacks.onStart;
this.vars.onUpdate = _callbacks.onUpdate;
this.vars.onComplete = _callbacks.onComplete;
_dispatcher = null;
};
initDispatcher();
};
if (_local2 != 0){
if (_arg1){
adjustStartValues();
} else {
this.progress = _local2;
};
};
};
}
public function get progress():Number{
var _local1:Number;
var _local2:Number;
_local1 = (isNaN(this.pauseTime)) ? currentTime : this.pauseTime;
_local2 = (((((_local1 - this.initTime) * 0.001) - (this.delay / this.combinedTimeScale)) / this.duration) * this.combinedTimeScale);
if (_local2 > 1){
return (1);
};
if (_local2 < 0){
return (0);
};
return (_local2);
}
public function willTrigger(_arg1:String):Boolean{
if (_dispatcher == null){
return (false);
};
return (_dispatcher.willTrigger(_arg1));
}
public function dispatchEvent(_arg1:Event):Boolean{
if (_dispatcher == null){
return (false);
};
return (_dispatcher.dispatchEvent(_arg1));
}
public function get reversed():Boolean{
return ((this.ease == reverseEase));
}
protected function onStartDispatcher(... _args):void{
if (_callbacks.onStart != null){
_callbacks.onStart.apply(null, this.vars.onStartParams);
};
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START));
}
public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{
var _local4:Number;
var _local5:int;
var _local6:TweenInfo;
var _local7:Object;
var _local8:Object;
var _local9:Array;
var _local10:Boolean;
var _local11:Array;
var _local12:Object;
_local4 = this.progress;
if (this.initted){
if (!_arg3){
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local6 = this.tweens[_local5];
if (_local6.name == _arg1){
_local6.target[_local6.property] = _local6.start;
};
_local5--;
};
};
_local7 = this.vars;
_local8 = this.exposedVars;
_local9 = this.tweens;
_local10 = _hasPlugins;
this.tweens = [];
this.vars = (this.exposedVars = {});
this.vars[_arg1] = _arg2;
initTweenVals();
if (((!((this.ease == reverseEase))) && ((_local7.ease is Function)))){
this.ease = _local7.ease;
};
if (((_arg3) && (!((_local4 == 0))))){
adjustStartValues();
};
_local11 = this.tweens;
this.vars = _local7;
this.exposedVars = _local8;
this.tweens = _local9;
_local12 = {};
_local12[_arg1] = true;
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local6 = this.tweens[_local5];
if (_local6.name == _arg1){
this.tweens.splice(_local5, 1);
} else {
if (((_local6.isPlugin) && ((_local6.name == "_MULTIPLE_")))){
_local6.target.killProps(_local12);
if (_local6.target.overwriteProps.length == 0){
this.tweens.splice(_local5, 1);
};
};
};
_local5--;
};
this.tweens = this.tweens.concat(_local11);
_hasPlugins = Boolean(((_local10) || (_hasPlugins)));
};
this.vars[_arg1] = (this.exposedVars[_arg1] = _arg2);
}
public function set timeScale(_arg1:Number):void{
if (_arg1 < 1E-5){
_arg1 = (_timeScale = 1E-5);
} else {
_timeScale = _arg1;
_arg1 = (_arg1 * _globalTimeScale);
};
this.initTime = ((currentTime - ((((currentTime - this.initTime) - (this.delay * (1000 / this.combinedTimeScale))) * this.combinedTimeScale) * (1 / _arg1))) - (this.delay * (1000 / _arg1)));
if (this.startTime != 999999999999999){
this.startTime = (this.initTime + (this.delay * (1000 / _arg1)));
};
this.combinedTimeScale = _arg1;
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_dispatcher != null){
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
};
}
override public function initTweenVals():void{
var _local1:int;
var _local2:int;
var _local3:String;
var _local4:String;
var _local5:Array;
var _local6:Object;
var _local7:TweenInfo;
if (((!((this.exposedVars.startAt == null))) && (!((this.delay == 0))))){
this.exposedVars.startAt.overwrite = 0;
new TweenMax(this.target, 0, this.exposedVars.startAt);
};
super.initTweenVals();
if ((((this.exposedVars.roundProps is Array)) && (!((TweenLite.plugins.roundProps == null))))){
_local5 = this.exposedVars.roundProps;
_local1 = (_local5.length - 1);
while (_local1 > -1) {
_local3 = _local5[_local1];
_local2 = (this.tweens.length - 1);
while (_local2 > -1) {
_local7 = this.tweens[_local2];
if (_local7.name == _local3){
if (_local7.isPlugin){
_local7.target.round = true;
} else {
if (_local6 == null){
_local6 = new TweenLite.plugins.roundProps();
_local6.add(_local7.target, _local3, _local7.start, _local7.change);
_hasPlugins = true;
this.tweens[_local2] = new TweenInfo(_local6, "changeFactor", 0, 1, _local3, true);
} else {
_local6.add(_local7.target, _local3, _local7.start, _local7.change);
this.tweens.splice(_local2, 1);
};
};
} else {
if (((((_local7.isPlugin) && ((_local7.name == "_MULTIPLE_")))) && (!(_local7.target.round)))){
_local4 = ((" " + _local7.target.overwriteProps.join(" ")) + " ");
if (_local4.indexOf(((" " + _local3) + " ")) != -1){
_local7.target.round = true;
};
};
};
_local2--;
};
_local1--;
};
};
}
protected function initDispatcher():void{
var _local1:Object;
var _local2:String;
if (_dispatcher == null){
_dispatcher = new EventDispatcher(this);
_callbacks = {onStart:this.vars.onStart, onUpdate:this.vars.onUpdate, onComplete:this.vars.onComplete};
if (this.vars.isTV == true){
this.vars = this.vars.clone();
} else {
_local1 = {};
for (_local2 in this.vars) {
_local1[_local2] = this.vars[_local2];
};
this.vars = _local1;
};
this.vars.onStart = onStartDispatcher;
this.vars.onComplete = onCompleteDispatcher;
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);
this.vars.onUpdate = onUpdateDispatcher;
_hasUpdate = true;
};
if ((this.vars.onCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true);
};
};
}
protected function onUpdateDispatcher(... _args):void{
if (_callbacks.onUpdate != null){
_callbacks.onUpdate.apply(null, this.vars.onUpdateParams);
};
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
}
public function set progress(_arg1:Number):void{
this.startTime = (currentTime - ((this.duration * _arg1) * 1000));
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
if (!this.started){
activate();
};
render(currentTime);
if (!isNaN(this.pauseTime)){
this.pauseTime = currentTime;
this.startTime = 999999999999999;
this.active = false;
};
}
public function reverse(_arg1:Boolean=true, _arg2:Boolean=true):void{
var _local3:Number;
this.ease = ((this.vars.ease)==this.ease) ? reverseEase : this.vars.ease;
_local3 = this.progress;
if (((_arg1) && ((_local3 > 0)))){
this.startTime = (currentTime - ((((1 - _local3) * this.duration) * 1000) / this.combinedTimeScale));
this.initTime = (this.startTime - (this.delay * (1000 / this.combinedTimeScale)));
};
if (_arg2 != false){
if (_local3 < 1){
resume();
} else {
restart();
};
};
}
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)) && (!((this.vars.onUpdate == onUpdateDispatcher))))){
this.vars.onUpdate = onUpdateDispatcher;
_hasUpdate = true;
};
_dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function set paused(_arg1:Boolean):void{
if (_arg1){
pause();
} else {
resume();
};
}
public function hasEventListener(_arg1:String):Boolean{
if (_dispatcher == null){
return (false);
};
return (_dispatcher.hasEventListener(_arg1));
}
public function pause():void{
if (isNaN(this.pauseTime)){
this.pauseTime = currentTime;
this.startTime = 999999999999999;
this.enabled = false;
_pausedTweens[this] = this;
};
}
public function reverseEase(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.ease((_arg4 - _arg1), _arg2, _arg3, _arg4));
}
protected function onCompleteDispatcher(... _args):void{
if (_callbacks.onComplete != null){
_callbacks.onComplete.apply(null, this.vars.onCompleteParams);
};
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
}
public static function set globalTimeScale(_arg1:Number):void{
setGlobalTimeScale(_arg1);
}
public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=false):void{
changePause(true, _arg1, _arg2);
}
public static function killAllDelayedCalls(_arg1:Boolean=false):void{
killAll(_arg1, false, true);
}
public static function setGlobalTimeScale(_arg1:Number):void{
var _local2:Dictionary;
var _local3:int;
var _local4:Array;
if (_arg1 < 1E-5){
_arg1 = 1E-5;
};
_local2 = masterList;
_globalTimeScale = _arg1;
for each (_local4 in _local2) {
_local3 = (_local4.length - 1);
while (_local3 > -1) {
if ((_local4[_local3] is TweenMax)){
_local4[_local3].timeScale = (_local4[_local3].timeScale * 1);
};
_local3--;
};
};
}
public static function get globalTimeScale():Number{
return (_globalTimeScale);
}
public static function getTweensOf(_arg1:Object):Array{
var _local2:Array;
var _local3:Array;
var _local4:TweenLite;
var _local5:int;
_local2 = masterList[_arg1];
_local3 = [];
if (_local2 != null){
_local5 = (_local2.length - 1);
while (_local5 > -1) {
if (!_local2[_local5].gc){
_local3[_local3.length] = _local2[_local5];
};
_local5--;
};
};
for each (_local4 in _pausedTweens) {
if (_local4.target == _arg1){
_local3[_local3.length] = _local4;
};
};
return (_local3);
}
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, persist:_arg4, overwrite:0}));
}
public static function isTweening(_arg1:Object):Boolean{
var _local2:Array;
var _local3:int;
_local2 = getTweensOf(_arg1);
_local3 = (_local2.length - 1);
while (_local3 > -1) {
if (((((_local2[_local3].active) || ((_local2[_local3].startTime == currentTime)))) && (!(_local2[_local3].gc)))){
return (true);
};
_local3--;
};
return (false);
}
public 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 - 1);
while (_local6 > -1) {
_local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete);
if ((((_local4[_local6] is TweenMax)) && ((((_local5 == _arg3)) || (!((_local5 == _arg2))))))){
_local4[_local6].paused = _arg1;
};
_local6--;
};
}
public static function killAllTweens(_arg1:Boolean=false):void{
killAll(_arg1, true, false);
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
_arg3.runBackwards = true;
return (new TweenMax(_arg1, _arg2, _arg3));
}
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 - 1);
while (_local6 > -1) {
_local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete);
if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){
if (_arg1){
_local4[_local6].complete(false);
_local4[_local6].clear();
} else {
TweenLite.removeTween(_local4[_local6], true);
};
};
_local6--;
};
}
public static function getAllTweens():Array{
var _local1:Dictionary;
var _local2:Array;
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
_local1 = masterList;
_local2 = [];
for each (_local3 in _local1) {
_local4 = (_local3.length - 1);
while (_local4 > -1) {
if (!_local3[_local4].gc){
_local2[_local2.length] = _local3[_local4];
};
_local4--;
};
};
for each (_local5 in _pausedTweens) {
_local2[_local2.length] = _local5;
};
return (_local2);
}
public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=false):void{
changePause(false, _arg1, _arg2);
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
return (new TweenMax(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 161
//Background (Background)
package {
import flash.display.*;
public dynamic class Background extends MovieClip {
}
}//package
Section 162
//BlackScreen (BlackScreen)
package {
import flash.display.*;
public dynamic class BlackScreen extends MovieClip {
}
}//package
Section 163
//BlurField (BlurField)
package {
import flash.display.*;
import gs.*;
import com.stampy.arrays.*;
public class BlurField extends Sprite {
private var _starFieldDensity:Number;// = 5
private var _starFieldRate:Number;// = 0.05
public function BlurField(){
_starFieldRate = 0.05;
_starFieldDensity = 5;
super();
generateField();
}
public function start():void{
TweenLite.to({}, _starFieldRate, {onComplete:start});
moveField();
}
public function finish():void{
}
private function generateField():void{
var _local1:int;
_local1 = 0;
while (_local1 < _starFieldDensity) {
_local1++;
};
}
private function moveField():void{
var _local1:Array;
var _local2:uint;
var _local3:int;
_local1 = DisplayListUtils.getDisplayList(this);
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
_local1[_local3].x = (_local1[_local3].x - 2);
if (_local1[_local3].x > 800){
_local1[_local3].x = 0;
} else {
if (_local1[_local3].x < -200){
_local1[_local3].x = 800;
};
};
_local3++;
};
}
}
}//package
Section 164
//Container (Container)
package {
import flash.display.*;
public dynamic class Container extends MovieClip {
public var container1:MovieClip;
public var container2:MovieClip;
public var container3:MovieClip;
public var container4:MovieClip;
public var container5:MovieClip;
public var container6:MovieClip;
public var container7:MovieClip;
public var container8:MovieClip;
}
}//package
Section 165
//Emitter (Emitter)
package {
import flash.display.*;
import gs.*;
import flash.events.*;
import com.stampy.random.*;
public class Emitter extends Sprite {
private var _alternate:uint;// = 1
private var _active:Boolean;// = false
private var EMITTER_RATE:Number;// = 0.08
private var _atom:Particle;
private var _range:Object;
private var _speed:Number;// = 0
private var _custom:Object;
private var _emitterQuanity:uint;// = 1
private var _isOn:Boolean;// = false
private var _level:uint;// = 0
private var _emitterRate:Number;// = 0.04
private var _target;
private var _intSpecialRate:Number;
private var _atomSpeed:Number;// = 0
public function Emitter(_arg1:Number=0.04, _arg2:Number=0.08, _arg3:Number=0.01, _arg4:Number=0){
EMITTER_RATE = 0.08;
_isOn = false;
_emitterRate = 0.04;
_emitterQuanity = 1;
_alternate = 1;
_range = {min:-400, max:400};
_atomSpeed = 0;
_active = false;
_level = 0;
_custom = {active:false};
_speed = 0;
super();
_active = true;
_intSpecialRate = _arg3;
_emitterRate = _arg1;
EMITTER_RATE = _arg2;
_atomSpeed = _arg4;
}
public function set level(_arg1:uint):void{
_level = _arg1;
}
public function set target(_arg1):void{
_target = _arg1;
}
private function frameHandler(_arg1:Event=null):void{
var _local2:int;
_local2 = 0;
while (_local2 < _emitterQuanity) {
_atom = new Particle(_level, _custom, _alternate);
_atom.target = _target;
_atom.x = Random.range(_range.min, _range.max);
_atom.mouseEnabled = false;
_atom.mouseChildren = false;
if (_alternate != 1){
_emitterRate = _intSpecialRate;
_atom.speed = (40 + _speed);
} else {
_emitterRate = EMITTER_RATE;
};
if (_atomSpeed > 0){
_atom.speed = (_atomSpeed + _speed);
};
this.addChild(_atom);
_atom.fire();
_local2++;
};
}
private function setAlternate(_arg1:uint):void{
alternative = _arg1;
}
public function start():void{
if (_active){
TweenLite.to({}, _emitterRate, {onComplete:start});
frameHandler();
};
}
public function set alternative(_arg1:uint):void{
_alternate = _arg1;
if (_arg1 != 1){
TweenLite.killTweensOf(this);
TweenLite.to(this, 5, {onComplete:setAlternate, onCompleteParams:[1]});
};
}
public function kill():void{
_active = false;
this.parent.removeChild(this);
}
public function set speed(_arg1:Number):void{
_speed = _arg1;
}
public function set custom(_arg1:Object):void{
_custom = _arg1;
}
}
}//package
Section 166
//EndOverlay (EndOverlay)
package {
import flash.display.*;
public dynamic class EndOverlay extends MovieClip {
public function EndOverlay(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 167
//ExplodingMega (ExplodingMega)
package {
import flash.display.*;
import flash.geom.*;
import com.stampy.frames.*;
public class ExplodingMega extends MovieClip {
public var points:MovieClip;
private var _points:int;
public function ExplodingMega(_arg1:int, _arg2:Point, _arg3:uint=1){
addFrameScript(0, frame1, 29, frame30);
this.x = _arg2.x;
this.y = _arg2.y;
this.points.gotoAndStop(_arg3);
_points = _arg1;
FrameUtils.onEnterFrame(_arg3, this.points, update);
FrameUtils.onEnterFrame(30, this, kill);
}
function frame1(){
stop();
}
public function kill():void{
this.parent.removeChild(this);
}
function frame30(){
stop();
}
private function update():void{
this.points.points.text = _points.toString();
this.gotoAndPlay(2);
}
}
}//package
Section 168
//ExplodingPoints (ExplodingPoints)
package {
import flash.display.*;
import flash.geom.*;
import com.stampy.frames.*;
public class ExplodingPoints extends MovieClip {
public var points:MovieClip;
private var _points:int;
public function ExplodingPoints(_arg1:int, _arg2:Point, _arg3:uint){
addFrameScript(0, frame1, 11, frame12);
this.x = _arg2.x;
this.y = _arg2.y;
this.points.gotoAndStop(_arg3);
_points = _arg1;
FrameUtils.onEnterFrame(_arg3, this.points, update);
FrameUtils.onEnterFrame(11, this, kill);
}
function frame12(){
stop();
}
function frame1(){
stop();
}
public function kill():void{
this.parent.removeChild(this);
}
private function update():void{
this.points.points.text = _points.toString();
this.gotoAndPlay(2);
}
}
}//package
Section 169
//ExplodingRainbow (ExplodingRainbow)
package {
import flash.display.*;
import flash.geom.*;
import com.stampy.frames.*;
public class ExplodingRainbow extends MovieClip {
public var points:MovieClip;
private var _points:int;
public function ExplodingRainbow(_arg1:int, _arg2:Point, _arg3:uint=1){
addFrameScript(0, frame1, 29, frame30);
this.x = _arg2.x;
this.y = _arg2.y;
this.points.gotoAndStop(_arg3);
_points = _arg1;
FrameUtils.onEnterFrame(_arg3, this.points, update);
FrameUtils.onEnterFrame(30, this, kill);
}
function frame1(){
stop();
}
public function kill():void{
this.parent.removeChild(this);
}
function frame30(){
stop();
}
private function update():void{
this.points.points.text = _points.toString();
this.gotoAndPlay(2);
}
}
}//package
Section 170
//ExplodingSkull (ExplodingSkull)
package {
import flash.display.*;
import flash.geom.*;
import com.stampy.frames.*;
public class ExplodingSkull extends MovieClip {
public var points:MovieClip;
private var _points:int;
public function ExplodingSkull(_arg1:int, _arg2:Point, _arg3:uint=1){
addFrameScript(0, frame1, 31, frame32);
this.x = _arg2.x;
this.y = _arg2.y;
this.points.gotoAndStop(_arg3);
_points = _arg1;
FrameUtils.onEnterFrame(_arg3, this.points, update);
FrameUtils.onEnterFrame(11, this, kill);
}
function frame1(){
stop();
}
public function kill():void{
this.parent.removeChild(this);
}
function frame32(){
stop();
}
private function update():void{
this.points.points.text = _points.toString();
this.gotoAndPlay(2);
}
}
}//package
Section 171
//GameEngine (GameEngine)
package {
import flash.display.*;
import gs.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
import com.stampy.cookies.*;
import gs.easing.*;
import console.sounds.*;
import com.stampy.random.*;
import com.stampy.arrays.*;
import com.stampy.equality.*;
import com.stampy.bitmaps.*;
import com.gfx.*;
import flash.ui.*;
public class GameEngine extends Sprite {
private var _pointsBoard:PointsBoard;
private var _maskOverlay:MaskOverlay;
var perlinOffset:Array;
var perlinOffsetFall:Array;
private var _active:Boolean;// = true
private var _emitter:Emitter;
var pDist:PerlinDistort;
private var _ending:EndOverlay;
private var _starField:StarField;
var bm:BitmapData;
private var _pointsNegative:uint;// = 4
private var _levelCustom:LevelCustom;
private var _newBestBlue:Boolean;// = false
private var _newBestTeal:Boolean;// = false
private var _emmiterSprite:Sprite;
private var _arrEmitters:Array;
private var _level:uint;
private var _newBestPurple:Boolean;// = false
private var _tweenLevelSelect:Boolean;// = false
private var _spaceBackground:SpaceBackground;
private var _pacman:Pacman;
private var _tetrisField:TetrisField;
private var _gameContainer:Sprite;
private var _rotateRate:Number;// = 0.02
private var _bitmapDraw:BitmapDraw;
private var _newBestBonus:Boolean;// = false
private var _sprBackground:Sprite;
private var _pixelOverlay:PixelOverlay;
private var _background:Background;
private var _customLevel:Object;
private var _droppedContainer:MovieClip;
private var _spectrum1:SpectrumAnalyzer;
private var _gameTimer:GameTimer;
private var _emitterContainer:Container;
private var _redExplosionCounter:uint;// = 0
private var _customSpeedSpecial:Number;// = 0.08
private var _tetrisContainer2:Sprite;
private var _newBestScore:Boolean;// = false
private var _newBestGreenBonus:Boolean;// = false
private var _newLevelUnlocked:Boolean;// = false
private var _newBestYellow:Boolean;// = false
private var _overlay1:Overlay1;
private var _greenExplosionCounter:uint;// = 0
private var _blurField:BlurField;
private var _title:uint;// = 1
private var _pointsMultiplier:uint;// = 6
private var _gameduration:uint;// = 120
private var _currentLevel:uint;// = 0
private var _customSpeedNormal:Number;// = 0.04
private var _customEmitters:Array;
private var _newBestPink:Boolean;// = false
private var _customTime:uint;// = 60
private var _cookie:FlashCookie;
public var _gameSummary:GameSummary;
private var _offSet:int;// = -70
private var _score:Object;
private var _newBestGreen:Boolean;// = false
var disp:DisplacementMapFilter;
var _pixelate:Boolean;// = false
private var _arrPacman:Array;
private var _howto;
private var _tetrisField2:TetrisField;
private var _maskA:Mask1;
private var _levelSelect:LevelSelect;
private var _normalRoute:Boolean;// = true
private var _newBestRed:Boolean;// = false
private var _introduction:Introduction;
public function GameEngine(_arg1:FlashCookie, _arg2:Boolean=true){
_score = {red:0, green:0, blue:0, purple:0, pink:0, teal:0, yellow:0, bonus:1, score:0, highest:0, totalGreen:0};
_offSet = -70;
_active = true;
_currentLevel = 0;
_newLevelUnlocked = false;
_newBestScore = false;
_newBestGreen = false;
_newBestRed = false;
_newBestBonus = false;
_newBestTeal = false;
_newBestBlue = false;
_newBestPink = false;
_newBestYellow = false;
_newBestGreenBonus = false;
_newBestPurple = false;
_gameduration = 120;
_rotateRate = 0.02;
_title = 1;
_pointsMultiplier = 6;
_pointsNegative = 4;
_normalRoute = true;
_tweenLevelSelect = false;
_customTime = 60;
_customEmitters = [1, 2, 3, 4, 5, 6, 7, 8];
_customSpeedNormal = 0.04;
_customSpeedSpecial = 0.08;
_pixelate = false;
_greenExplosionCounter = 0;
_redExplosionCounter = 0;
_customLevel = {active:false};
super();
_cookie = _arg1;
_normalRoute = _arg2;
this.addEventListener(Event.ADDED_TO_STAGE, init);
}
private function returnToSelection():void{
TweenMax.to(_levelCustom, 1, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, alpha:0, ease:Elastic.easeInOut, onComplete:removeCustom});
}
private function addPixelate():void{
perlinOffset[0].x = (perlinOffset[0].x + 1);
perlinOffset[1].y = (perlinOffset[1].y - 1);
bm.perlinNoise(2, 3, 4, 5, false, false, 7, true, perlinOffset);
_bitmapDraw.filters = [disp];
}
private function hitFlash():void{
TweenMax.to(_pacman, 0.2, {colorMatrixFilter:{colorize:0xFFFFFF, amount:1}, onComplete:hitFlash2, ease:Elastic.easeOut});
}
private function hitGreenOff():void{
TweenMax.to(_pacman, 0.3, {colorMatrixFilter:{colorize:0x66FF00, amount:0}, ease:Elastic.easeOut});
}
private function hitFlashoff():void{
TweenMax.to(_pacman, 0.2, {colorMatrixFilter:{colorize:0xFF00FF, amount:0}, ease:Elastic.easeOut});
}
private function removeIntro():void{
trace("HELLO");
if (_normalRoute){
if (_introduction.parent != null){
_introduction.addEventListener(MouseEvent.CLICK, mouseHandler);
};
};
if (_normalRoute){
if (_introduction.parent != null){
_introduction.parent.removeChild(_introduction);
};
};
}
private function doTransition():void{
pDist.start_noise();
}
private function setGameTime():void{
switch (_currentLevel){
case 1:
_gameduration = 60;
break;
case 2:
_gameduration = 80;
break;
case 3:
_gameduration = 100;
break;
case 4:
_gameduration = 120;
break;
case 5:
_gameduration = 140;
break;
case 6:
_gameduration = 160;
break;
case 7:
_gameduration = _customLevel.duration;
break;
};
}
private function levelSelection():void{
var _local1:*;
var _local2:int;
if (_normalRoute){
TweenMax.to(_introduction, 2, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, alpha:0, ease:Elastic.easeInOut, onComplete:removeIntro});
};
_local1 = new Array();
_local2 = 1;
while (_local2 < 7) {
_local1.push(_cookie.getFromCookie((("level" + _local2) + "_unlocked")));
_local2++;
};
_levelSelect = new LevelSelect(_local1, _cookie);
_levelSelect.x = 240;
_levelSelect.y = 110;
_levelSelect.alpha = 0;
_levelSelect.addEventListener(LevelSelect.NEW_LEVEL, newLevel);
_levelSelect.addEventListener(LevelSelect.NEW_CUSTOM, newCustom);
_levelSelect.addEventListener(Event.ADDED_TO_STAGE, displayLevelSelect);
_gameContainer.addChild(_levelSelect);
}
private function howtoplay():void{
switch (_currentLevel){
case 1:
_howto = new Howto();
break;
case 2:
_howto = new Howto2();
break;
case 3:
_howto = new Howto3();
break;
case 4:
_howto = new Howto4();
break;
case 5:
_howto = new Howto5();
break;
case 6:
_howto = new Howto6();
break;
case 7:
_howto = new Howto6();
break;
};
_gameContainer.addChild(_howto);
_howto.gotoAndPlay(2);
TweenMax.from(_howto, 1, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, alpha:0, ease:Elastic.easeInOut});
TweenMax.to(_howto, 1, {blurFilter:{blurX:0}, colorMatrixFilter:{colorize:0, amount:0, brightness:1}, alpha:1, ease:Elastic.easeInOut});
_howto.addEventListener(Howto.COMPLETE, startGame);
_howto.x = 80;
_howto.y = 140;
}
private function checkShield():void{
var _local1:Number;
if (_score.bonus > 1){
_local1 = (_score.bonus * 0.03);
TweenLite.to(_pacman, 0.5, {scaleX:(1 + _local1), scaleY:(1 + _local1)});
} else {
TweenLite.to(_pacman, 0.5, {scaleX:1, scaleY:1, ease:Elastic.easeOut});
};
}
private function hitRedOff():void{
TweenMax.to(_pacman, 0.3, {colorMatrixFilter:{colorize:0xFF0000, amount:0}, ease:Elastic.easeOut});
}
private function customLevel(_arg1:Event):void{
_levelCustom.removeEventListener(MouseEvent.CLICK, mouseHandler);
_levelCustom.removeEventListener(LevelCustom.CUSTOM, customLevel);
_customLevel = _levelCustom.getCustom();
_cookie.updateCookieVar("customLevel", _customLevel);
TweenMax.to(_levelCustom, 1, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, alpha:0, ease:Elastic.easeInOut, onComplete:removeCustom2});
_currentLevel = 7;
TweenLite.to({}, 2, {onComplete:howtoplay});
}
private function explodeGreen():void{
var _arrEmitter:Array;
var emitters:uint;
var i:int;
_arrEmitter = [];
emitters = _arrEmitters.length;
i = 0;
while (i < emitters) {
_arrEmitter = _arrEmitter.concat(DisplayListUtils.getDisplayList(_arrEmitters[i]));
i = (i + 1);
};
_arrEmitter.forEach(function (_arg1, _arg2:int, _arg3:Array):void{
if ((_arg1 is Particle)){
if (equalUtils.equalToAny(_arg1.type, [1, 14, 15, 16])){
_arg1.gotoAndStop(Random.range(40, 42));
_score.score = (_score.score + 1000);
_arg1.parent.addChild(new ExplodingPoints(1000, new Point(_arg1.x, _arg1.y), 7));
TweenLite.to(_arg1, 2, {onComplete:_arg1.kill});
};
};
});
if (_greenExplosionCounter < 20){
_greenExplosionCounter++;
TweenLite.to({}, 0.1, {onComplete:explodeGreen});
};
}
private function explode(_arg1:uint=0):void{
var _arrEmitter:Array;
var emitters:uint;
var i:int;
var arrPacman:Array;
var _arrEmitterA:Array;
var count = _arg1;
_arrEmitter = [];
emitters = _arrEmitters.length;
i = 0;
while (i < emitters) {
_arrEmitter = _arrEmitter.concat(DisplayListUtils.getDisplayList(_arrEmitters[i]));
i = (i + 1);
};
arrPacman = DisplayListUtils.getDisplayList(_droppedContainer);
_arrEmitterA = _arrEmitter.concat(arrPacman);
_arrEmitterA.forEach(function (_arg1, _arg2:int, _arg3:Array):void{
if ((_arg1 is Particle)){
_arg1.gotoAndStop(Random.range(40, 42));
TweenLite.to(_arg1, 2, {onComplete:_arg1.kill});
};
});
if (_redExplosionCounter < 5){
_redExplosionCounter++;
TweenLite.to({}, 0.1, {onComplete:explode});
};
}
private function mouseHandler(_arg1:MouseEvent):void{
var evt = _arg1;
if (evt.target.name == "introStart"){
try {
SoundUtils.playSFX("SFX16");
} catch(e:Error) {
trace("SoundError");
};
levelSelection();
} else {
if (evt.target.name == "backToSelect"){
try {
SoundUtils.playSFX("SFX16");
} catch(e:Error) {
trace("SoundError");
};
_levelCustom.removeEventListener(MouseEvent.CLICK, mouseHandler);
trace("clicked the right button");
returnToSelection();
};
};
switch (evt.target.name){
case "muteON":
if ((((evt.type == "click")) && (SoundUtils.isGlobalMute))){
trace("muteON");
SoundUtils.muteGlobal();
evt.target.parent.gotoAndStop(2);
};
break;
case "muteOFF":
if ((((evt.type == "click")) && (!(SoundUtils.isGlobalMute)))){
trace("muteOFF");
SoundUtils.muteGlobal();
evt.target.parent.gotoAndStop(1);
};
break;
};
}
public function set level(_arg1:uint):void{
_level = _arg1;
}
private function init(_arg1:Event):void{
var _local2:Point;
var _local3:Point;
var _local4:Point;
var _local5:Point;
this.removeEventListener(Event.ADDED_TO_STAGE, init);
_maskA = new Mask1();
_maskA.x = (115 + _offSet);
_maskA.y = 30;
_maskOverlay = new MaskOverlay();
_maskOverlay.x = (115 + _offSet);
_maskOverlay.y = 18;
_gameContainer = new Sprite();
_gameContainer.mask = _maskA;
addChild(_gameContainer);
addChild(_maskOverlay);
_bitmapDraw = new BitmapDraw(700, 500);
_bitmapDraw.start();
bm = new BitmapData(_bitmapDraw.width, _bitmapDraw.height);
disp = new DisplacementMapFilter(bm, new Point(0, 0), 1, 2, 10, 60);
_local2 = new Point(0, 0);
_local3 = new Point(0, 0);
perlinOffset = [_local2, _local3];
_local4 = new Point(0, 0);
_local5 = new Point(0, 0);
perlinOffsetFall = [_local4, _local4];
addEventListener(Event.ENTER_FRAME, updateEffect);
_background = new Background();
_bitmapDraw.addChild(_background);
_gameContainer.addChild(_bitmapDraw);
_starField = new StarField();
_starField.start();
_bitmapDraw.addChild(_starField);
_tetrisField = new TetrisField();
_tetrisField.start();
_tetrisField.blendMode = BlendMode.OVERLAY;
_bitmapDraw.addChild(_tetrisField);
_sprBackground = new Sprite();
_bitmapDraw.addChild(_sprBackground);
_emmiterSprite = new Sprite();
_bitmapDraw.addChild(_emmiterSprite);
_bitmapDraw.addChild((_droppedContainer = new MovieClip()));
_pixelOverlay = new PixelOverlay();
_pixelOverlay.alpha = 0.3;
_pixelOverlay.mouseEnabled = false;
_pixelOverlay.mouseChildren = false;
_gameContainer.addChild(_pixelOverlay);
if (_normalRoute){
TweenLite.from(_bitmapDraw, 2, {alpha:0});
TweenLite.to(_bitmapDraw, 2, {alpha:1});
};
if (_normalRoute){
showIntroduction();
} else {
levelSelection();
};
}
private function removeCustom():void{
_levelCustom.kill();
_normalRoute = false;
_tweenLevelSelect = true;
levelSelection();
}
private function removeHow():void{
_gameContainer.removeChild(_howto);
}
private function hitGreen():void{
TweenMax.to(_pacman, 0.3, {colorMatrixFilter:{colorize:0x66FF00, amount:1}, onComplete:hitGreenOff, ease:Elastic.easeOut});
}
private function newCustom(_arg1:Event):void{
_levelSelect.removeEventListener(LevelSelect.NEW_LEVEL, newLevel);
_levelSelect.removeEventListener(LevelSelect.NEW_CUSTOM, newCustom);
_levelCustom = new LevelCustom();
_levelCustom.setCustom(_cookie.getFromCookie("customLevel"));
_levelCustom.x = 240;
_levelCustom.y = 110;
_levelCustom.alpha = 0;
_levelCustom.addEventListener(LevelCustom.CUSTOM, customLevel);
_levelCustom.addEventListener(MouseEvent.CLICK, mouseHandler);
_gameContainer.addChild(_levelCustom);
TweenMax.to(_levelSelect, 1, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, alpha:0, ease:Elastic.easeInOut, onComplete:_levelSelect.kill});
TweenMax.from(_levelCustom, 1, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, alpha:0, ease:Elastic.easeInOut});
TweenMax.to(_levelCustom, 1, {blurFilter:{blurX:0}, colorMatrixFilter:{colorize:0, amount:0, brightness:1}, alpha:1, ease:Elastic.easeInOut});
}
private function containerRotate():void{
TweenLite.to({}, 0.001, {onComplete:containerRotate});
_emitterContainer.rotation = (_emitterContainer.rotation + _rotateRate);
checkCollision();
checkShield();
}
private function updateScore():void{
_pointsBoard.points.points_points.text = _score.score.toString();
_pointsBoard.green.points_good.text = (_score.bonus - 1).toString();
_pointsBoard.red.points_bad.text = _score.red.toString();
}
private function removeEffect():void{
_bitmapDraw.filters = [];
}
private function checkCollision():void{
var emitters:uint;
var _arrConcat:Array;
var _arrEmitter:Array;
var k:int;
var arrPacman:Array;
var _arrEmitterA:Array;
var pacmen:uint;
if (_active){
emitters = _arrEmitters.length;
_arrConcat = [];
_arrEmitter = [];
k = 0;
while (k < emitters) {
_arrEmitter = _arrEmitter.concat(DisplayListUtils.getDisplayList(_arrEmitters[k]));
k = (k + 1);
};
arrPacman = DisplayListUtils.getDisplayList(_droppedContainer);
_arrEmitterA = _arrEmitter.concat(arrPacman);
pacmen = _arrPacman.length;
_arrEmitterA.forEach(function (_arg1, _arg2:int, _arg3:Array):void{
var pass:Boolean;
var i:int;
var j:int;
var type:*;
var bestGreenBonus:*;
var points:*;
var m:int;
var p:int;
var n:int;
var value = _arg1;
var index = _arg2;
var array = _arg3;
if ((value is Particle)){
if (value.active){
pass = true;
if (_pacman.isShieldON()){
if ((((((value.type == 1)) || ((value.type == 14)))) || ((value.type == 15)))){
i = 0;
while (i < pacmen) {
if ((_arrPacman[i] is Pacman)){
if (value.hitTestObject(_arrPacman[i].shield)){
pass = false;
value.pacmanShield(_pacman, _gameContainer);
};
};
i = (i + 1);
};
};
};
if (pass){
j = 0;
while (j < pacmen) {
if ((_arrPacman[j] is Pacman)){
if (value.hitTestObject(_arrPacman[j].pman.hit)){
if (value.hitTestPoint(_arrPacman[j].pman.hit.x, _arrPacman[j].pman.hit.y, true)){
};
type = value.type;
switch (type){
case 1:
try {
_score.bonus;
SoundUtils.playSFX(("SFX" + Random.range(14, 15).toString()));
} catch(e:Error) {
trace("SoundError");
};
bestGreenBonus = _cookie.getFromCookie((("level" + _currentLevel) + "_bestGreenBonus"));
if (_score.bonus > bestGreenBonus){
_newBestGreenBonus = true;
_cookie.updateCookieVar((("level" + _currentLevel) + "_bestGreenBonus"), _score.bonus);
_score.highest = _score.bonus;
} else {
_score.highest = _score.highest;
};
_score.red++;
hitRed();
spunkGreens(_score.bonus);
_score.score = (_score.score - ((100 * _score.bonus) * _pointsNegative));
_bitmapDraw.addChild(new ExplodingSkull(-(((100 * _score.bonus) * _pointsNegative)), new Point(_pacman.x, _pacman.y)));
_score.bonus = 1;
value.kill();
break;
case 2:
try {
SoundUtils.playSFX("SFX19");
} catch(e:Error) {
trace("SoundError");
};
_score.green++;
_score.bonus++;
_score.totalGreen++;
_score.score = (_score.score + ((60 * _score.bonus) * _pointsMultiplier));
hitGreen();
_bitmapDraw.addChild(new ExplodingPoints(((60 * _score.bonus) * _pointsMultiplier), new Point(_pacman.x, _pacman.y), 1));
if (_score.bonus > _score.highest){
_score.highest = _score.bonus;
} else {
_score.highest = _score.highest;
};
value.kill();
break;
case 3:
try {
SoundUtils.playSFX(("SFX" + Random.range(4, 6).toString()));
} catch(e:Error) {
trace("SoundError");
};
_score.blue++;
_score.score = (_score.score + ((10 * _score.bonus) * _pointsMultiplier));
_bitmapDraw.addChild(new ExplodingPoints(((10 * _score.bonus) * _pointsMultiplier), new Point(_pacman.x, _pacman.y), 7));
value.kill();
break;
case 4:
try {
SoundUtils.playSFX(("SFX" + Random.range(4, 6).toString()));
} catch(e:Error) {
trace("SoundError");
};
_score.pink++;
_score.score = (_score.score + ((30 * _score.bonus) * _pointsMultiplier));
_bitmapDraw.addChild(new ExplodingPoints(((30 * _score.bonus) * _pointsMultiplier), new Point(_pacman.x, _pacman.y), 3));
value.kill();
break;
case 5:
try {
SoundUtils.playSFX(("SFX" + Random.range(4, 6).toString()));
} catch(e:Error) {
trace("SoundError");
};
_score.yellow++;
_score.score = (_score.score + ((40 * _score.bonus) * _pointsMultiplier));
_bitmapDraw.addChild(new ExplodingPoints(((40 * _score.bonus) * _pointsMultiplier), new Point(_pacman.x, _pacman.y), 4));
value.kill();
break;
case 6:
_bitmapDraw.addChild(new ExplodingRainbow(((60 * _score.bonus) * _pointsMultiplier), new Point(_pacman.x, _pacman.y), 1));
try {
SoundUtils.playSFX("SFX10");
} catch(e:Error) {
trace("SoundError");
};
_score.purple++;
_score.score = (_score.score + ((60 * _score.bonus) * _pointsMultiplier));
m = 0;
while (m < emitters) {
_arrEmitters[m].alternative = 3;
m = (m + 1);
};
value.kill();
break;
case 7:
_score.teal++;
_score.score = (_score.score + ((20 * _score.bonus) * _pointsMultiplier));
_bitmapDraw.addChild(new ExplodingPoints(((20 * _score.bonus) * _pointsMultiplier), new Point((_pacman.x + Random.range(0, 20)), (_pacman.y + Random.range(0, 20))), 5));
value.kill();
break;
case 8:
case 10:
try {
SoundUtils.playSFX("SFX10");
} catch(e:Error) {
trace("SoundError");
};
p = 0;
while (p < emitters) {
_arrEmitters[p].alternative = 3;
p = (p + 1);
};
points = ((type)==8) ? (5000 * _pointsMultiplier) : (7000 * _pointsMultiplier);
_score.score = (_score.score + points);
_bitmapDraw.addChild(new ExplodingMega(points, new Point(_pacman.x, _pacman.y), 1));
value.kill();
break;
case 9:
_bitmapDraw.addChild(new ExplodingRainbow(((100 * _score.bonus) * _pointsMultiplier), new Point(_pacman.x, _pacman.y), 1));
try {
SoundUtils.playSFX("SFX31");
} catch(e:Error) {
trace("SoundError");
};
_score.bonus = (_score.bonus + 20);
_score.score = (_score.score + ((100 * _score.bonus) * _pointsMultiplier));
hitFlash();
if (_score.bonus > _score.highest){
_score.highest = _score.bonus;
} else {
_score.highest = _score.highest;
};
value.kill();
break;
case 12:
_score.score = (_score.score + (1000 * _pointsMultiplier));
_bitmapDraw.addChild(new ExplodingRainbow((1000 * _pointsMultiplier), new Point(_pacman.x, _pacman.y), 1));
if (!_pacman.isShieldON()){
try {
SoundUtils.playSFX("SFX29");
} catch(e:Error) {
trace("SoundError");
};
};
_pacman.shieldON();
value.kill();
break;
case 14:
try {
SoundUtils.playSFX("SFX30");
} catch(e:Error) {
trace("SoundError");
};
hitRed();
n = 0;
while (n < emitters) {
_arrEmitters[n].alternative = 2;
n = (n + 1);
};
spunkGreens(_score.bonus);
_score.bonus = 1;
addEffect(4);
_score.score = (_score.score - (2000 * _pointsNegative));
_bitmapDraw.addChild(new ExplodingSkull(-((2000 * _pointsNegative)), new Point(_pacman.x, _pacman.y)));
try {
SoundUtils.playSFX(("SFX" + Random.range(12, 13).toString()));
} catch(e:Error) {
trace("SoundError");
};
value.kill();
break;
case 15:
_redExplosionCounter = 0;
try {
SoundUtils.playSFX("SFX28");
} catch(e:Error) {
trace("SoundError");
};
hitRed();
_score.score = (_score.score - (1000 * _pointsNegative));
_bitmapDraw.addChild(new ExplodingSkull(-((1000 * _pointsNegative)), new Point(_pacman.x, _pacman.y)));
explode();
_score.bonus = 1;
value.kill();
break;
case 16:
spunkGreens(_score.bonus);
hitRed();
_score.score = (_score.score - (2000 * _pointsNegative));
_bitmapDraw.addChild(new ExplodingSkull(-((2000 * _pointsNegative)), new Point(_pacman.x, _pacman.y)));
addEffect(1);
_score.bonus = 1;
try {
SoundUtils.playSFX(("SFX" + Random.range(12, 13).toString()));
} catch(e:Error) {
trace("SoundError");
};
value.kill();
break;
case 17:
try {
SoundUtils.playSFX("SFX37");
} catch(e:Error) {
trace("SoundError");
};
_greenExplosionCounter = 0;
try {
SoundUtils.playSFX("SFX36");
} catch(e:Error) {
trace("SoundError");
};
value.gotoAndStop(Random.range(43, 45));
_score.score = (_score.score + (10000 * _pointsMultiplier));
_bitmapDraw.addChild(new ExplodingRainbow((10000 * _pointsMultiplier), new Point(_pacman.x, _pacman.y), 1));
explodeGreen();
TweenLite.to({}, 2, {onComplete:value.kill});
break;
};
};
};
j = (j + 1);
};
};
};
};
});
};
updateScore();
}
public function kill():void{
var _local1:uint;
var _local2:int;
var _local3:uint;
var _local4:int;
removeEventListener(Event.ENTER_FRAME, updateEffect);
TweenLite.killTweensOf(this);
_bitmapDraw.kill();
_tetrisField.kill();
_local1 = 0;
_local2 = 0;
while (_local2 < _local1) {
TweenLite.killTweensOf(_gameContainer.getChildAt(0));
_gameContainer.removeChildAt(0);
_local2++;
};
_local3 = this.numChildren;
_local4 = 0;
while (_local4 < _local3) {
TweenLite.killTweensOf(this.getChildAt(0));
this.removeChildAt(0);
_local4++;
};
}
private function displayLevelSelect(_arg1:Event):void{
_levelSelect.removeEventListener(Event.ADDED_TO_STAGE, displayLevelSelect);
if (((_normalRoute) || (_tweenLevelSelect))){
TweenMax.from(_levelSelect, 1, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, alpha:0, ease:Elastic.easeInOut});
TweenMax.to(_levelSelect, 1, {blurFilter:{blurX:0}, colorMatrixFilter:{brightness:1}, alpha:1, ease:Elastic.easeInOut, onComplete:removeIntro});
} else {
TweenLite.to(_levelSelect, 1, {alpha:1});
};
}
private function startGame(_arg1:Event):void{
var _local2:Emitter;
var _local3:Array;
var _local4:uint;
var _local5:uint;
var _local6:int;
var _local7:*;
var _local8:int;
var _local9:int;
var _local10:int;
var _local11:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local15:int;
_spaceBackground = new SpaceBackground();
if (_currentLevel < 7){
_spaceBackground.gotoAndStop(_currentLevel);
} else {
_spaceBackground.gotoAndStop(_customLevel.background);
};
_sprBackground.addChild(_spaceBackground);
TweenLite.from(_spaceBackground, 1, {alpha:0});
TweenLite.to(_spaceBackground, 1, {alpha:1});
scoreboard();
setGameTime();
gametime(_gameduration);
_gameTimer.start();
_howto.stop();
_howto.removeEventListener(Howto.COMPLETE, startGame);
TweenMax.to(_howto, 2, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, alpha:0, ease:Elastic.easeInOut, onComplete:removeHow});
_emitterContainer = new Container();
_emitterContainer.x = (350 + _offSet);
_emitterContainer.y = 250;
_emitterContainer.rotation = 90;
_emmiterSprite.addChild(_emitterContainer);
switch (_currentLevel){
case 1:
_rotateRate = 0.02;
_arrEmitters = [];
_local3 = [1, 7];
_local4 = _local3.length;
_local8 = 0;
while (_local8 < _local4) {
_local2 = new Emitter(0.2, 0.2, 0.1);
_local2.speed = 7;
_local2.x = (0 + _offSet);
_local2.y = 0;
_local2.level = _currentLevel;
_local2.start();
_emitterContainer[("container" + _local3[_local8])].addChild(_local2);
_arrEmitters.push(_local2);
_local8++;
};
break;
case 2:
_rotateRate = 0.03;
_arrEmitters = [];
_local3 = [1, 5, 7];
_local4 = _local3.length;
_local9 = 0;
while (_local9 < _local4) {
_local2 = new Emitter(0.3, 0.3, 0.1);
_local2.speed = 8;
_local2.x = (0 + _offSet);
_local2.y = 0;
_local2.level = _currentLevel;
_local2.start();
_emitterContainer[("container" + _local3[_local9])].addChild(_local2);
_arrEmitters.push(_local2);
_local9++;
};
break;
case 3:
_rotateRate = 0.04;
_arrEmitters = [];
_local3 = [4, 3, 8, 6];
_local4 = _local3.length;
_local10 = 0;
while (_local10 < _local4) {
_local2 = new Emitter(0.5, 0.5, 0.3);
_local2.speed = 12;
_local2.x = (0 + _offSet);
_local2.y = 0;
_local2.level = _currentLevel;
_local2.start();
_emitterContainer[("container" + _local3[_local10])].addChild(_local2);
_arrEmitters.push(_local2);
_local10++;
};
break;
case 4:
_rotateRate = 0.05;
_arrEmitters = [];
_local3 = [3, 4, 5, 2];
_local4 = _local3.length;
_local11 = 0;
while (_local11 < _local4) {
_local2 = new Emitter(0.6, 0.6, 0.4);
_local2.speed = 16;
_local2.x = (0 + _offSet);
_local2.y = 0;
_local2.level = _currentLevel;
_local2.start();
_emitterContainer[("container" + _local3[_local11])].addChild(_local2);
_arrEmitters.push(_local2);
_local11++;
};
break;
case 5:
_rotateRate = 0.06;
_arrEmitters = [];
_local3 = [1, 2, 5, 6, 7, 8];
_local4 = _local3.length;
_local12 = 0;
while (_local12 < _local4) {
_local2 = new Emitter(0.9, 0.9, 0.7);
_local2.speed = 22;
_local2.x = (0 + _offSet);
_local2.y = 0;
_local2.level = _currentLevel;
_local2.start();
_emitterContainer[("container" + _local3[_local12])].addChild(_local2);
_arrEmitters.push(_local2);
_local12++;
};
break;
case 6:
_rotateRate = 0.07;
_arrEmitters = [];
_local3 = [1, 2, 3, 4, 5, 6, 7, 8];
_local4 = _local3.length;
_local13 = 0;
while (_local13 < _local4) {
_local2 = new Emitter(1, 1, 0.5);
_local2.x = (0 + _offSet);
_local2.y = 0;
_local2.level = _currentLevel;
_local2.start();
_emitterContainer[("container" + _local3[_local13])].addChild(_local2);
_arrEmitters.push(_local2);
_local13++;
};
break;
case 7:
_local7 = _customLevel.odds.length;
_local14 = 0;
while (_local14 < _local7) {
trace(("ODDS:" + _customLevel.odds[_local14].frequency));
_local14++;
};
_rotateRate = 0.07;
_arrEmitters = [];
_local3 = _customLevel.emitters;
_local4 = _local3.length;
_local15 = 0;
while (_local15 < _local4) {
_local2 = new Emitter(_customLevel.speed, _customLevel.speed, _customLevel.special);
_local2.custom = _customLevel;
_local2.x = (0 + _offSet);
_local2.y = 0;
_local2.level = _currentLevel;
_local2.start();
_emitterContainer[("container" + _local3[_local15])].addChild(_local2);
_arrEmitters.push(_local2);
_local15++;
};
break;
};
_pacman = new Pacman(stage, 0.2);
_pacman.init();
_bitmapDraw.addChild(_pacman);
_arrPacman = [_pacman];
_local5 = _arrEmitters.length;
_local6 = 0;
while (_local6 < _local5) {
_arrEmitters[_local6].target = _pacman;
_local6++;
};
containerRotate();
}
private function summary():void{
var _local1:Tip;
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:int;
var _local12:int;
var _local13:int;
var _local14:int;
var _local15:int;
var _local16:int;
var _local17:int;
var _local18:int;
var _local19:int;
var _local20:int;
var _local21:int;
_gameSummary = new GameSummary();
if (SoundUtils.isGlobalMute){
_gameSummary.music.gotoAndStop(2);
};
_gameSummary.x = 250;
_gameSummary.y = 100;
_local1 = new Tip(1.5);
_gameSummary.trophies.addChild(_local1);
if (_currentLevel == 7){
_gameSummary.target.alpha = 0;
};
_local2 = _levelSelect.level;
_local3 = _cookie.getFromCookie((("level" + _local2) + "_target"));
_local4 = _score.score;
_local5 = _score.totalGreen;
_local6 = _score.red;
_local7 = _score.bonus;
_local8 = _score.purple;
_local9 = _score.teal;
_local10 = _score.blue;
_local11 = _score.pink;
_local12 = _score.yellow;
_local13 = _cookie.getFromCookie((("level" + _local2) + "_played"));
_local14 = _cookie.getFromCookie((("level" + _local2) + "_bestScore"));
_local15 = _cookie.getFromCookie((("level" + _local2) + "_bestGreen"));
_local16 = _cookie.getFromCookie((("level" + _local2) + "_bestRed"));
_local17 = _cookie.getFromCookie((("level" + _local2) + "_bestBonus"));
_local18 = _cookie.getFromCookie((("level" + _local2) + "_bestTeal"));
_local19 = _cookie.getFromCookie((("level" + _local2) + "_bestBlue"));
_local20 = _cookie.getFromCookie((("level" + _local2) + "_bestPink"));
_local21 = _cookie.getFromCookie((("level" + _local2) + "_bestYellow"));
_gameSummary.target.textBox.text = _cookie.getFromCookie((("level" + _local2) + "_target"));
if (_currentLevel < 5){
_newLevelUnlocked = ((((_local4 >= _local3)) && ((_local2 < 5)))) ? true : false;
if (_newLevelUnlocked){
_cookie.updateCookieVar((("level" + (_local2 + 1)) + "_unlocked"), true);
};
} else {
if (_currentLevel == 5){
_newLevelUnlocked = ((_local4)>=_local3) ? true : false;
if (_newLevelUnlocked){
_cookie.updateCookieVar("level7_unlocked", true);
};
};
};
_newBestScore = ((_local4)>_local14) ? true : false;
if (_newBestScore){
trace("NEW HIGHEST SCORE");
_cookie.updateCookieVar((("level" + _local2) + "_bestScore"), _local4);
};
_newBestGreen = ((_local5)>_local15) ? true : false;
if (_newBestGreen){
_cookie.updateCookieVar((("level" + _local2) + "_bestGreen"), _local5);
};
_newBestRed = ((_local6)<_local16) ? true : false;
if (_newBestRed){
_cookie.updateCookieVar((("level" + _local2) + "_bestRed"), _local6);
};
_newBestPurple = ((_local8)>_local17) ? true : false;
if (_newBestPurple){
_cookie.updateCookieVar((("level" + _local2) + "_bestBonus"), _local8);
};
_newBestTeal = ((_local9)>_local18) ? true : false;
if (_newBestTeal){
_cookie.updateCookieVar((("level" + _local2) + "_bestTeal"), _local9);
};
_newBestBlue = ((_local10)>_local19) ? true : false;
if (_newBestBlue){
_cookie.updateCookieVar((("level" + _local2) + "_bestBlue"), _local10);
};
_newBestPink = ((_local11)>_local20) ? true : false;
if (_newBestPink){
_cookie.updateCookieVar((("level" + _local2) + "_bestPink"), _local11);
};
_newBestYellow = ((_local12)>_local21) ? true : false;
if (_newBestYellow){
_cookie.updateCookieVar((("level" + _local2) + "_bestYellow"), _local12);
};
var _temp1 = _local13;
_local13 = (_local13 + 1);
_cookie.updateCookieVar((("level" + _local2) + "_played"), _temp1);
if (((_newLevelUnlocked) && ((_currentLevel < 6)))){
_local1.addTarget(_gameSummary.trophies.lock, 14);
trace("NEW LEVEL UNLOCKED");
} else {
if (_currentLevel < 6){
_local1.addTarget(_gameSummary.trophies.lock, 13);
_gameSummary.trophies.lock.alpha = 0.1;
trace("FAILED TO UNLOCK LEVEL");
} else {
_local1.addTarget(_gameSummary.trophies.lock, 15);
_gameSummary.trophies.lock.alpha = 0.1;
};
};
if (_local6 == 0){
_local1.addTarget(_gameSummary.trophies.trophy1, 1);
_cookie.updateCookieVar((("level" + _local2) + "_trophy1"), true);
} else {
_local1.addTarget(_gameSummary.trophies.trophy1, 7);
_gameSummary.trophies.trophy1.alpha = 0.1;
};
if (_local4 >= 1000000){
_local1.addTarget(_gameSummary.trophies.trophy2, 2);
_cookie.updateCookieVar((("level" + _local2) + "_trophy2"), true);
} else {
_local1.addTarget(_gameSummary.trophies.trophy2, 8);
_gameSummary.trophies.trophy2.alpha = 0.1;
};
if (_local4 >= 2000000){
_local1.addTarget(_gameSummary.trophies.trophy3, 3);
_cookie.updateCookieVar((("level" + _local2) + "_trophy3"), true);
} else {
_local1.addTarget(_gameSummary.trophies.trophy3, 9);
_gameSummary.trophies.trophy3.alpha = 0.1;
};
if (_local4 >= 3000000){
_local1.addTarget(_gameSummary.trophies.trophy4, 4);
_cookie.updateCookieVar((("level" + _local2) + "_trophy4"), true);
} else {
_local1.addTarget(_gameSummary.trophies.trophy4, 10);
_gameSummary.trophies.trophy4.alpha = 0.1;
};
if (_score.highest >= 100){
_local1.addTarget(_gameSummary.trophies.trophy5, 5);
_cookie.updateCookieVar((("level" + _local2) + "_trophy5"), true);
} else {
_local1.addTarget(_gameSummary.trophies.trophy5, 11);
_gameSummary.trophies.trophy5.alpha = 0.1;
};
if ((((((((((_local9 >= 60)) && ((_local10 >= 60)))) && ((_local12 >= 60)))) && ((_local11 >= 60)))) && ((_local5 >= 60)))){
_local1.addTarget(_gameSummary.trophies.trophy6, 6);
_cookie.updateCookieVar((("level" + _local2) + "_trophy6"), true);
} else {
_local1.addTarget(_gameSummary.trophies.trophy6, 12);
_gameSummary.trophies.trophy6.alpha = 0.1;
};
Mouse.show();
_gameSummary.levelSummary.points_bad.text = _score.red.toString();
_gameSummary.levelSummary.points_good.text = _score.totalGreen.toString();
_gameSummary.levelSummary.points_special.text = _score.purple.toString();
_gameSummary.levelSummary.points_4.text = _score.yellow.toString();
_gameSummary.levelSummary.points_1.text = _score.teal.toString();
_gameSummary.levelSummary.points_2.text = _score.blue.toString();
_gameSummary.levelSummary.points_3.text = _score.pink.toString();
_gameSummary.points_points.text = _score.score.toString();
_gameContainer.addChild(_gameSummary);
TweenLite.from(_gameSummary, 1, {alpha:0});
TweenLite.to(_gameSummary, 1, {alpha:1});
}
private function addEffect(_arg1:uint):void{
var _local2:Point;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:DisplacementMapFilter;
var _local8:BlurFilter;
switch (_arg1){
case 1:
perlinOffset[0].x = (perlinOffset[0].x + 1);
perlinOffset[1].y = (perlinOffset[1].y - 1);
bm.perlinNoise(2, 3, 4, 5, false, false, 7, true, perlinOffset);
_bitmapDraw.filters = [disp];
TweenLite.to({}, 4, {onComplete:removeEffect});
break;
case 2:
_local2 = new Point(0, 0);
_local3 = 4;
_local4 = 4;
_local5 = 20;
_local6 = 20;
_local7 = new DisplacementMapFilter(bm, _local2, _local3, _local4, _local5, _local6);
_bitmapDraw.filters = [_local7];
TweenLite.to({}, 2, {onComplete:removeEffect});
break;
case 3:
_local8 = new BlurFilter(40, 0, 1);
_bitmapDraw.filters = [_local8];
TweenLite.to({}, 2, {onComplete:removeEffect});
break;
case 4:
pDist = new PerlinDistort(_pacman, 80, 80);
addChild(pDist);
doTransition();
pDist.addEventListener("NOISE_ON_COMPLETE", transitionComplete);
break;
case 5:
perlinOffsetFall[0].y = (perlinOffsetFall[0].y - 1);
perlinOffsetFall[1].x = (perlinOffsetFall[1].x - 0.1);
bm.perlinNoise(20, 10, 1, 99, true, false, 7, false, perlinOffsetFall);
_bitmapDraw.filters = [disp];
TweenLite.to({}, 6, {onComplete:removeEffect});
break;
};
}
private function spunkGreens(_arg1:uint):void{
var _local2:int;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
if (_arg1 > 1){
_local2 = 0;
while (_local2 < _arg1) {
_local3 = new Particle(2, _customLevel, 4);
_local3.target = _pacman;
_local3.mouseEnabled = false;
_local3.mouseChildren = false;
_local3.speed = 200;
_local4 = Random.range(0, 20);
_local5 = Random.range(0, 20);
_local6 = Random.range(1, 2);
_local7 = Random.range(1, 2);
_local3.x = ((_local6)==1) ? (_pacman.x + _local4) : (_pacman.x - _local4);
_local3.y = ((_local7)==1) ? (_pacman.y + _local5) : (_pacman.y - _local5);
_local8 = Random.range(0, 180);
_local3.rotation = ((_local6)==1) ? _local8 : -(_local8);
_local3.alpha = (Random.range(5, 10) / 10);
_local9 = (Random.range(20, 40) / 10);
_local3.scaleX = _local9;
_local3.scaleY = _local9;
_droppedContainer.addChild(_local3);
_local3.spunk();
_local2++;
};
};
}
private function hitFlash2():void{
TweenMax.to(_pacman, 0.2, {colorMatrixFilter:{colorize:52479, amount:1}, onComplete:hitFlash3, ease:Elastic.easeOut});
}
private function scoreboard():void{
_pointsBoard = new PointsBoard();
_pointsBoard.x = 68;
_pointsBoard.y = 440;
_pointsBoard.musicPlayer.cookie = _cookie;
if (_currentLevel < 6){
_pointsBoard.target.textBox.text = _cookie.getFromCookie((("level" + _currentLevel) + "_target"));
} else {
_pointsBoard.target.alpha = 0;
_pointsBoard.guide.alpha = 0;
_pointsBoard.points.x = 200;
};
switch (_currentLevel){
case 1:
_pointsBoard.musicPlayer.setTrack(1);
break;
case 2:
_pointsBoard.musicPlayer.setTrack(2);
break;
case 3:
_pointsBoard.musicPlayer.setTrack(3);
break;
case 4:
_pointsBoard.musicPlayer.setTrack(4);
break;
case 5:
_pointsBoard.musicPlayer.setTrack(5);
break;
case 6:
_pointsBoard.musicPlayer.setTrack(6);
break;
case 7:
trace(("LEVEL 7 MUSIC:" + _customLevel.track));
_pointsBoard.musicPlayer.setTrack(_customLevel.track, true);
break;
};
_gameContainer.addChild(_pointsBoard);
TweenLite.from(_pointsBoard, 1, {alpha:0});
TweenLite.to(_pointsBoard, 1, {alpha:1});
updateScore();
}
private function showIntroduction():void{
trace("NEW INTRODUCTION");
_introduction = new Introduction();
if (SoundUtils.isGlobalMute){
_introduction.music.gotoAndStop(2);
};
_introduction.x = 235;
_introduction.y = 35;
_introduction.title.gotoAndStop(_cookie.getFromCookie("title"));
_gameContainer.addChild(_introduction);
_introduction.addEventListener(MouseEvent.CLICK, mouseHandler);
}
private function hitFlash6():void{
TweenMax.to(_pacman, 0.2, {colorMatrixFilter:{colorize:52479, amount:1}, onComplete:hitFlash7, ease:Elastic.easeOut});
}
private function updateEffect(_arg1:Event):void{
if (_pixelate){
perlinOffset[0].x = (perlinOffset[0].x + 1);
perlinOffset[1].y = (perlinOffset[1].y - 1);
bm.perlinNoise(2, 3, 4, 5, false, false, 7, true, perlinOffset);
_bitmapDraw.filters = [disp];
};
}
private function removeCustom2():void{
_levelCustom.kill();
_normalRoute = false;
_tweenLevelSelect = true;
}
private function hitFlash4():void{
TweenMax.to(_pacman, 0.2, {colorMatrixFilter:{colorize:0xFF9900, amount:1}, onComplete:hitFlash5, ease:Elastic.easeOut});
}
private function hitFlash7():void{
TweenMax.to(_pacman, 0.2, {colorMatrixFilter:{colorize:0xFF00FF, amount:1}, onComplete:hitFlashoff, ease:Elastic.easeOut});
}
private function hitFlash3():void{
TweenMax.to(_pacman, 0.2, {colorMatrixFilter:{colorize:0xFF00FF, amount:1}, onComplete:hitFlash4, ease:Elastic.easeOut});
}
private function hitFlash5():void{
TweenMax.to(_pacman, 0.2, {colorMatrixFilter:{colorize:0xFFFFFF, amount:1}, onComplete:hitFlash6, ease:Elastic.easeOut});
}
private function gametime(_arg1:Number):void{
_gameTimer = new GameTimer(_arg1);
_gameTimer.x = -59;
_gameTimer.y = 8;
_gameTimer.addEventListener(GameTimer.COMPLETE, gameOver);
TweenLite.from(_gameTimer, 0.5, {alpha:0});
TweenLite.to(_gameTimer, 0.5, {alpha:1});
_pointsBoard.addChild(_gameTimer);
}
private function newLevel(_arg1:Event):void{
_levelSelect.removeEventListener(LevelSelect.NEW_LEVEL, newLevel);
_levelSelect.removeEventListener(LevelSelect.NEW_CUSTOM, newCustom);
_currentLevel = _levelSelect.level;
_levelSelect.kill();
TweenLite.to({}, 2, {onComplete:howtoplay});
}
private function transitionComplete(_arg1:Event):void{
pDist.removeEventListener("NOISE_ON_COMPLETE", transitionComplete);
pDist.end_noise();
removeChild(pDist);
}
private function gameOver(_arg1:Event):void{
var intEmitters:uint;
var i:int;
var evt = _arg1;
_ending = new EndOverlay();
_ending.gotoAndStop(Random.range(1, 7));
_ending.alpha = 0;
_ending.x = 350;
_ending.y = 250;
_gameContainer.addChild(_ending);
TweenLite.to(_ending, 1, {scaleX:2, scaleY:2, alpha:1, ease:Elastic.easeOut});
TweenLite.to(_ending, 1, {delay:0.5, alpha:0, scaleX:3, scaleY:3});
_gameTimer.removeEventListener(GameTimer.COMPLETE, gameOver);
try {
SoundUtils.playSFX("SFX34");
} catch(e:Error) {
trace("SoundError");
};
intEmitters = _arrEmitters.length;
i = 0;
while (i < intEmitters) {
_arrEmitters[i].kill();
i = (i + 1);
};
TweenLite.to(_pacman, 0.5, {alpha:0, onComplete:_pacman.kill});
TweenLite.to(_pointsBoard, 1, {alpha:0, onComplete:_pointsBoard.kill});
TweenLite.to({}, 1, {onComplete:summary});
_active = false;
}
private function hitRed():void{
TweenMax.to(_pacman, 0.3, {colorMatrixFilter:{colorize:0xFF0000, amount:1}, onComplete:hitRedOff, ease:Elastic.easeOut});
}
}
}//package
Section 172
//GameSummary (GameSummary)
package {
import flash.display.*;
import flash.text.*;
public class GameSummary extends MovieClip {
private var _spectrum1:SpectrumAnalyzer;
public var music:MovieClip;
public var blackBox:MovieClip;
public var levelSummary:MovieClip;
public var target:MovieClip;
public var points_points:TextField;
public var trophies:MovieClip;
public function GameSummary():void{
}
public function kill():void{
this.parent.removeChild(this);
}
}
}//package
Section 173
//GameTimer (GameTimer)
package {
import flash.display.*;
import gs.*;
import flash.events.*;
import gs.easing.*;
import console.sounds.*;
public class GameTimer extends MovieClip {
public var sec100:MovieClip;
public var sec2:MovieClip;
public var sec4:MovieClip;
public var sec6:MovieClip;
public var sec5:MovieClip;
public var sec7:MovieClip;
public var sec8:MovieClip;
public var sec1:MovieClip;
public var sec9:MovieClip;
public var sec3:MovieClip;
public var sec10:MovieClip;
public var sec11:MovieClip;
public var sec12:MovieClip;
public var sec13:MovieClip;
public var sec14:MovieClip;
public var sec15:MovieClip;
public var sec16:MovieClip;
public var sec17:MovieClip;
public var sec18:MovieClip;
public var sec19:MovieClip;
private var _current;// = 0
public var sec28:MovieClip;
public var sec29:MovieClip;
public var sec23:MovieClip;
public var sec26:MovieClip;
public var sec27:MovieClip;
public var sec21:MovieClip;
public var sec31:MovieClip;
public var sec20:MovieClip;
public var sec35:MovieClip;
public var sec36:MovieClip;
public var sec37:MovieClip;
public var sec38:MovieClip;
public var sec39:MovieClip;
public var sec22:MovieClip;
public var sec32:MovieClip;
public var sec30:MovieClip;
public var sec24:MovieClip;
public var sec42:MovieClip;
public var sec43:MovieClip;
public var sec44:MovieClip;
public var sec40:MovieClip;
public var sec41:MovieClip;
public var sec49:MovieClip;
public var sec45:MovieClip;
public var sec46:MovieClip;
public var sec47:MovieClip;
public var sec34:MovieClip;
public var sec48:MovieClip;
public var sec25:MovieClip;
public var sec51:MovieClip;
public var sec53:MovieClip;
public var sec50:MovieClip;
public var sec52:MovieClip;
public var sec54:MovieClip;
public var sec55:MovieClip;
public var sec56:MovieClip;
public var sec57:MovieClip;
public var sec58:MovieClip;
public var sec59:MovieClip;
public var sec33:MovieClip;
public var sec60:MovieClip;
public var sec61:MovieClip;
public var sec62:MovieClip;
public var sec63:MovieClip;
public var sec64:MovieClip;
public var sec65:MovieClip;
public var sec66:MovieClip;
public var sec67:MovieClip;
public var sec68:MovieClip;
public var sec69:MovieClip;
public var sec71:MovieClip;
public var sec73:MovieClip;
public var sec75:MovieClip;
public var sec70:MovieClip;
public var sec79:MovieClip;
public var sec74:MovieClip;
public var sec76:MovieClip;
public var sec78:MovieClip;
public var sec77:MovieClip;
public var sec80:MovieClip;
public var sec82:MovieClip;
public var sec84:MovieClip;
public var sec85:MovieClip;
public var sec87:MovieClip;
public var sec89:MovieClip;
public var sec83:MovieClip;
public var sec81:MovieClip;
public var sec86:MovieClip;
public var sec91:MovieClip;
public var sec92:MovieClip;
public var sec93:MovieClip;
public var sec94:MovieClip;
public var sec95:MovieClip;
public var sec96:MovieClip;
public var sec90:MovieClip;
public var sec98:MovieClip;
public var sec99:MovieClip;
public var sec72:MovieClip;
public var sec88:MovieClip;
public var sec97:MovieClip;
private var _timeTick:Number;// = 0.8
public static const COMPLETE:String = "Complete";
public function GameTimer(_arg1:Number){
_timeTick = 0.8;
_current = 0;
super();
_timeTick = (_arg1 / 100);
}
public function start():void{
if (_current != 0){
nextTick();
};
if (_current == 90){
beginPulse();
soundPulse();
};
if (_current < 100){
_current++;
TweenMax.to({}, _timeTick, {onComplete:start});
} else {
SoundUtils.stopSFX("SFX35");
dispatchEvent(new Event(COMPLETE));
};
}
private function beginPulse():void{
if ((((_current > 89)) && ((_current < 100)))){
TweenMax.to(this, _timeTick, {colorMatrixFilter:{colorize:0xFFFF, amount:1, brightness:3}, onComplete:endPulse});
};
}
private function nextTick():void{
TweenMax.to(this[("sec" + _current)], 0.5, {colorMatrixFilter:{colorize:0xFF00FF, amount:2, brightness:1000}, ease:Elastic.easeOut});
}
private function endPulse():void{
if (_current < 100){
TweenMax.to(this, _timeTick, {colorMatrixFilter:{colorize:0xFFFF, amount:0, brightness:1}, onComplete:beginPulse});
};
}
private function soundPulse():void{
if ((((_current > 89)) && ((_current < 101)))){
SoundUtils.playSFX("SFX35", true);
};
}
}
}//package
Section 174
//Howto (Howto)
package {
import flash.display.*;
import flash.events.*;
import com.stampy.frames.*;
import console.sounds.*;
import com.stampy.random.*;
public class Howto extends MovieClip {
private var _spectrum1:SpectrumAnalyzer;
public var blackBox:MovieClip;
public var skip:MovieClip;
public static const COMPLETE:String = "Complete";
public function Howto(){
addFrameScript(0, frame1, 322, frame323);
_spectrum1 = new SpectrumAnalyzer(160, 160);
this.blackBox.spectrum.addChild(_spectrum1);
skip.addEventListener(MouseEvent.CLICK, skipButton);
FrameUtils.onEnterFrame(305, this, dispatch);
FrameUtils.onEnterFrame(10, this, playSound);
FrameUtils.onEnterFrame(49, this, playSound);
FrameUtils.onEnterFrame(88, this, playSound);
FrameUtils.onEnterFrame(127, this, playSound);
FrameUtils.onEnterFrame(149, this, playSound);
FrameUtils.onEnterFrame(172, this, playSound);
FrameUtils.onEnterFrame(195, this, playSound);
FrameUtils.onEnterFrame(217, this, playSound);
FrameUtils.onEnterFrame(240, this, playSound);
FrameUtils.onEnterFrame(244, this, playPulse);
FrameUtils.onEnterFrame(268, this, playPulse);
FrameUtils.onEnterFrame(292, this, playPulse);
}
function frame323(){
stop();
}
public function playSound():void{
SoundUtils.playSFX(("SFX" + Random.range(16, 18).toString()));
}
function frame1(){
stop();
}
public function skipButton(_arg1:MouseEvent):void{
if (_arg1.target.name == "skipbtn"){
_arg1.target.visible = false;
this.gotoAndPlay(240);
};
}
public function dispatch(){
skip.removeEventListener(MouseEvent.CLICK, skipButton);
dispatchEvent(new Event(COMPLETE));
}
public function playPulse():void{
SoundUtils.playSFX("SFX19");
}
}
}//package
Section 175
//Howto2 (Howto2)
package {
import flash.display.*;
import flash.events.*;
import com.stampy.frames.*;
import console.sounds.*;
import com.stampy.random.*;
public class Howto2 extends MovieClip {
private var _spectrum1:SpectrumAnalyzer;
public var skip:MovieClip;
public static const COMPLETE:String = "Complete";
public function Howto2(){
addFrameScript(0, frame1, 336, frame337);
skip.addEventListener(MouseEvent.CLICK, skipButton);
FrameUtils.onEnterFrame(6, this, playSound);
FrameUtils.onEnterFrame(137, this, playSound);
FrameUtils.onEnterFrame(269, this, playPulse);
FrameUtils.onEnterFrame(292, this, playPulse);
FrameUtils.onEnterFrame(314, this, playPulse);
FrameUtils.onEnterFrame(337, this, dispatch);
}
public function playSound():void{
SoundUtils.playSFX(("SFX" + Random.range(16, 18).toString()));
}
function frame1(){
stop();
}
function frame337(){
stop();
}
public function skipButton(_arg1:MouseEvent):void{
if (_arg1.target.name == "skipbtn"){
_arg1.target.visible = false;
this.gotoAndPlay(269);
};
}
public function dispatch(){
dispatchEvent(new Event(COMPLETE));
}
public function playPulse():void{
SoundUtils.playSFX("SFX19");
}
}
}//package
Section 176
//Howto3 (Howto3)
package {
import flash.display.*;
import flash.events.*;
import com.stampy.frames.*;
import console.sounds.*;
import com.stampy.random.*;
public class Howto3 extends MovieClip {
private var _spectrum1:SpectrumAnalyzer;
public var skip:MovieClip;
public static const COMPLETE:String = "Complete";
public function Howto3(){
addFrameScript(0, frame1, 337, frame338);
skip.addEventListener(MouseEvent.CLICK, skipButton);
FrameUtils.onEnterFrame(6, this, playSound);
FrameUtils.onEnterFrame(137, this, playSound);
FrameUtils.onEnterFrame(269, this, playPulse);
FrameUtils.onEnterFrame(292, this, playPulse);
FrameUtils.onEnterFrame(314, this, playPulse);
FrameUtils.onEnterFrame(337, this, dispatch);
}
public function playSound():void{
SoundUtils.playSFX(("SFX" + Random.range(16, 18).toString()));
}
function frame338(){
stop();
}
function frame1(){
stop();
}
public function skipButton(_arg1:MouseEvent):void{
if (_arg1.target.name == "skipbtn"){
_arg1.target.visible = false;
this.gotoAndPlay(269);
};
}
public function dispatch(){
dispatchEvent(new Event(COMPLETE));
}
public function playPulse():void{
SoundUtils.playSFX("SFX19");
}
}
}//package
Section 177
//Howto4 (Howto4)
package {
import flash.display.*;
import flash.events.*;
import com.stampy.frames.*;
import console.sounds.*;
import com.stampy.random.*;
public class Howto4 extends MovieClip {
private var _spectrum1:SpectrumAnalyzer;
public var skip:MovieClip;
public static const COMPLETE:String = "Complete";
public function Howto4(){
addFrameScript(0, frame1, 337, frame338);
skip.addEventListener(MouseEvent.CLICK, skipButton);
FrameUtils.onEnterFrame(6, this, playSound);
FrameUtils.onEnterFrame(137, this, playSound);
FrameUtils.onEnterFrame(269, this, playPulse);
FrameUtils.onEnterFrame(292, this, playPulse);
FrameUtils.onEnterFrame(314, this, playPulse);
FrameUtils.onEnterFrame(337, this, dispatch);
}
public function playSound():void{
SoundUtils.playSFX(("SFX" + Random.range(16, 18).toString()));
}
function frame338(){
stop();
}
function frame1(){
stop();
}
public function skipButton(_arg1:MouseEvent):void{
if (_arg1.target.name == "skipbtn"){
_arg1.target.visible = false;
this.gotoAndPlay(269);
};
}
public function dispatch(){
dispatchEvent(new Event(COMPLETE));
}
public function playPulse():void{
SoundUtils.playSFX("SFX19");
}
}
}//package
Section 178
//Howto5 (Howto5)
package {
import flash.display.*;
import flash.events.*;
import com.stampy.frames.*;
import console.sounds.*;
import com.stampy.random.*;
public class Howto5 extends MovieClip {
private var _spectrum1:SpectrumAnalyzer;
public var skip:MovieClip;
public static const COMPLETE:String = "Complete";
public function Howto5(){
addFrameScript(0, frame1, 338, frame339);
skip.addEventListener(MouseEvent.CLICK, skipButton);
FrameUtils.onEnterFrame(6, this, playSound);
FrameUtils.onEnterFrame(137, this, playSound);
FrameUtils.onEnterFrame(269, this, playPulse);
FrameUtils.onEnterFrame(292, this, playPulse);
FrameUtils.onEnterFrame(314, this, playPulse);
FrameUtils.onEnterFrame(337, this, dispatch);
}
public function playSound():void{
SoundUtils.playSFX(("SFX" + Random.range(16, 18).toString()));
}
function frame339(){
stop();
}
function frame1(){
stop();
}
public function skipButton(_arg1:MouseEvent):void{
if (_arg1.target.name == "skipbtn"){
_arg1.target.visible = false;
this.gotoAndPlay(269);
};
}
public function dispatch(){
dispatchEvent(new Event(COMPLETE));
}
public function playPulse():void{
SoundUtils.playSFX("SFX19");
}
}
}//package
Section 179
//Howto6 (Howto6)
package {
import flash.display.*;
import flash.events.*;
import com.stampy.frames.*;
import console.sounds.*;
import com.stampy.random.*;
public class Howto6 extends MovieClip {
private var _spectrum1:SpectrumAnalyzer;
public static const COMPLETE:String = "Complete";
public function Howto6(){
addFrameScript(0, frame1, 78, frame79, 216, frame217);
FrameUtils.onEnterFrame(8, this, playPulse);
FrameUtils.onEnterFrame(35, this, playPulse);
FrameUtils.onEnterFrame(57, this, playPulse);
FrameUtils.onEnterFrame(79, this, dispatch);
}
function frame79(){
stop();
}
public function playSound():void{
SoundUtils.playSFX(("SFX" + Random.range(16, 18).toString()));
}
function frame217(){
stop();
}
function frame1(){
stop();
}
public function skipButton(_arg1:MouseEvent):void{
if (_arg1.target.name == "skipbtn"){
_arg1.target.visible = false;
this.gotoAndPlay(146);
};
}
public function dispatch(){
dispatchEvent(new Event(COMPLETE));
}
public function playPulse():void{
SoundUtils.playSFX("SFX19");
}
}
}//package
Section 180
//Inbetween (Inbetween)
package {
import flash.display.*;
public dynamic class Inbetween extends MovieClip {
public var message:MovieClip;
public var blackBox:MovieClip;
public var title:MovieClip;
}
}//package
Section 181
//Introduction (Introduction)
package {
import flash.display.*;
public dynamic class Introduction extends MovieClip {
public var music:MovieClip;
public var loading:MovieClip;
public var blackBox:MovieClip;
public var introStart:SimpleButton;
public var title:MovieClip;
}
}//package
Section 182
//InvaderGroup (InvaderGroup)
package {
import flash.display.*;
public dynamic class InvaderGroup extends MovieClip {
public var pacman:MovieClip;
public var emitterPacman:MovieClip;
public var invader1:MovieClip;
public var invader2:MovieClip;
public var invader3:MovieClip;
public var invader4:MovieClip;
public var invader5:MovieClip;
}
}//package
Section 183
//LevelCustom (LevelCustom)
package {
import flash.display.*;
import gs.*;
import flash.events.*;
import com.stampy.frames.*;
import gs.easing.*;
import com.stampy.arrays.*;
public class LevelCustom extends MovieClip {
public var next:MovieClip;
public var currentSize;// = 1
private var _emitters:Object;
public var prev:SimpleButton;
public var nextCustom:SimpleButton;
private var _levelDuration:uint;// = 4
public var blackBox:MovieClip;
private var _levelEmitters:Array;
public var backToSelect:SimpleButton;
public var prevCustom:SimpleButton;
public var customBox:MovieClip;
private var _section:uint;// = 1
private var _levelBackground:uint;// = 3
public var newSize;// = 1
private var _levelSpeed:uint;// = 8
private var _oddArray:Array;
private var _levelTrack:uint;// = 6
private var _currentInvader:uint;// = 1
public static const CUSTOM:String = "Custom";
public function LevelCustom():void{
_oddArray = [{invader:1, frequency:9, size:5}, {invader:2, frequency:13, size:5}, {invader:3, frequency:13, size:5}, {invader:4, frequency:13, size:5}, {invader:5, frequency:12, size:5}, {invader:6, frequency:10, size:5}, {invader:7, frequency:7, size:5}, {invader:8, frequency:6, size:5}, {invader:9, frequency:3, size:5}, {invader:10, frequency:6, size:5}, {invader:11, frequency:7, size:5}, {invader:12, frequency:8, size:5}, {invader:13, frequency:3, size:5}, {invader:14, frequency:6, size:5}, {invader:15, frequency:5, size:5}];
_levelSpeed = 8;
_levelDuration = 4;
_levelEmitters = [];
_levelBackground = 3;
_levelTrack = 6;
_section = 1;
_emitters = {e1:false, e2:true, e3:false, e4:true, e5:false, e6:true, e7:false, e8:false};
currentSize = 1;
newSize = 1;
_currentInvader = 1;
super();
prev.visible = false;
prevCustom.visible = false;
customBox.odds.frequency.gotoAndStop(_oddArray[customBox.odds.invader.currentFrame].frequency);
customBox.speed.speed.gotoAndStop(_levelSpeed);
customBox.speed.time.gotoAndStop(_levelDuration);
customBox.style.music.gotoAndStop(_levelTrack);
customBox.style.background.gotoAndStop(_levelBackground);
currentSize = _oddArray[(customBox.size.invader.currentFrame - 1)].size;
newSize = _oddArray[(customBox.size.invader.currentFrame - 1)].size;
addEventListener(MouseEvent.CLICK, mouseHandler);
setEmitters();
updateEmitters();
}
private function setEmitters():void{
var _local1:int;
_local1 = 1;
while (_local1 < 9) {
trace(((("SET EMITTER:" + _local1) + " to ") + _emitters[("e" + _local1)]));
if (_emitters[("e" + _local1)]){
customBox.direction[("e" + _local1)].gotoAndStop(2);
} else {
customBox.direction[("e" + _local1)].gotoAndStop(1);
};
_local1++;
};
}
public function getCustom():Object{
var _local1:Object;
_local1 = {};
_local1.active = true;
_local1.track = _levelTrack;
_local1.duration = (30 + (10 * (_levelDuration - 1)));
_local1.durationFrame = _levelDuration;
_local1.speed = ((1.1 / _levelSpeed) + (_levelEmitters.length * 0.05));
_local1.speedFrame = _levelSpeed;
_local1.special = ((_local1.speed / 100) * 80);
_local1.emitters = _levelEmitters;
_local1.emitterFrame = _emitters;
_local1.odds = ArrayUtils.clone(_oddArray);
_local1.background = _levelBackground;
return (_local1);
}
public function setCustom(_arg1:Object):void{
if (_arg1.active != null){
_oddArray = _arg1.odds;
_levelTrack = _arg1.track;
_levelDuration = _arg1.durationFrame;
_levelSpeed = _arg1.speedFrame;
_levelEmitters = _arg1.emitters;
_emitters = _arg1.emitterFrame;
_levelBackground = _arg1.background;
};
customBox.odds.frequency.gotoAndStop(_oddArray[(customBox.odds.invader.currentFrame - 1)].frequency);
customBox.speed.speed.gotoAndStop(_levelSpeed);
customBox.speed.time.gotoAndStop(_levelDuration);
customBox.style.music.gotoAndStop(_levelTrack);
customBox.style.background.gotoAndStop(_levelBackground);
currentSize = _oddArray[(customBox.size.invader.currentFrame - 1)].size;
newSize = _oddArray[(customBox.size.invader.currentFrame - 1)].size;
setEmitters();
updateEmitters();
}
private function moveCustom():void{
if (_section > 1){
[(prev.visible = true), (prevCustom.visible = true)];
} else {
[(prev.visible = false), (prevCustom.visible = false)];
};
if (_section > 4){
[(next.visible = false), (nextCustom.visible = false)];
} else {
[(next.visible = true), (nextCustom.visible = true)];
};
switch (_section){
case 1:
TweenLite.to(customBox, 1, {x:31, ease:Elastic.easeOut});
break;
case 2:
TweenLite.to(customBox, 1, {x:-152, ease:Elastic.easeOut});
break;
case 3:
TweenLite.to(customBox, 1, {x:-334, ease:Elastic.easeOut});
break;
case 4:
TweenLite.to(customBox, 1, {x:-516, ease:Elastic.easeOut});
break;
case 5:
TweenLite.to(customBox, 1, {x:-696, ease:Elastic.easeOut});
break;
};
}
private function updateEmitters():void{
var _local1:int;
_levelEmitters = [];
_local1 = 1;
while (_local1 < 9) {
_emitters[("e" + _local1)] = ((customBox.direction[("e" + _local1)].currentFrame)==1) ? false : true;
if (_emitters[("e" + _local1)]){
_levelEmitters.push(_local1);
};
_local1++;
};
}
public function kill():void{
if (this.parent != null){
this.parent.removeChild(this);
};
}
private function scaleInvader():void{
switch (newSize){
case 1:
TweenLite.to(customBox.size.invader.invader, 0.3, {scaleX:0.1, scaleY:0.1, ease:Bounce.easeOut});
break;
case 2:
TweenLite.to(customBox.size.invader.invader, 0.3, {scaleX:0.3, scaleY:0.3, ease:Bounce.easeOut});
break;
case 3:
TweenLite.to(customBox.size.invader.invader, 0.3, {scaleX:0.6, scaleY:0.6, ease:Bounce.easeOut});
break;
case 4:
TweenLite.to(customBox.size.invader.invader, 0.3, {scaleX:0.8, scaleY:0.8, ease:Bounce.easeOut});
break;
case 5:
TweenLite.to(customBox.size.invader.invader, 0.3, {scaleX:1, scaleY:1, ease:Bounce.easeOut});
break;
case 6:
TweenLite.to(customBox.size.invader.invader, 0.3, {scaleX:1.2, scaleY:1.2, ease:Bounce.easeOut});
break;
case 7:
TweenLite.to(customBox.size.invader.invader, 0.3, {scaleX:1.5, scaleY:1.5, ease:Bounce.easeOut});
break;
case 8:
TweenLite.to(customBox.size.invader.invader, 0.3, {scaleX:2, scaleY:2, ease:Bounce.easeOut});
break;
case 9:
TweenLite.to(customBox.size.invader.invader, 0.3, {scaleX:2.5, scaleY:2.5, ease:Bounce.easeOut});
break;
case 10:
TweenLite.to(customBox.size.invader.invader, 0.3, {scaleX:3, scaleY:3, ease:Bounce.easeOut});
break;
};
}
private function mouseHandler(_arg1:MouseEvent):void{
var _local2:*;
if (_arg1.target.name != null){
switch (_arg1.target.name){
case "prevCustom":
if (_section > 1){
_section--;
};
moveCustom();
break;
case "nextCustom":
if (_section < 5){
_section++;
};
moveCustom();
break;
case "invader_left":
_oddArray[(customBox.odds.invader.currentFrame - 1)].frequency = customBox.odds.frequency.currentFrame;
if (customBox.odds.invader.currentFrame > 1){
customBox.odds.invader.prevFrame();
} else {
customBox.odds.invader.gotoAndStop(15);
};
customBox.odds.frequency.gotoAndStop(_oddArray[(customBox.odds.invader.currentFrame - 1)].frequency);
break;
case "invader_right":
_oddArray[(customBox.odds.invader.currentFrame - 1)].frequency = customBox.odds.frequency.currentFrame;
if (customBox.odds.invader.currentFrame < 15){
customBox.odds.invader.nextFrame();
} else {
customBox.odds.invader.gotoAndStop(1);
};
customBox.odds.frequency.gotoAndStop(_oddArray[(customBox.odds.invader.currentFrame - 1)].frequency);
break;
case "frequency_left":
if (customBox.odds.frequency.currentFrame > 1){
customBox.odds.frequency.prevFrame();
};
_oddArray[(customBox.odds.invader.currentFrame - 1)].frequency = customBox.odds.frequency.currentFrame;
break;
case "frequency_right":
customBox.odds.frequency.nextFrame();
(_oddArray[(customBox.odds.invader.currentFrame - 1)].frequency = customBox.odds.frequency.currentFrame);
break;
case "speed_left":
if (customBox.speed.speed.currentFrame > 1){
customBox.speed.speed.prevFrame();
};
(_levelSpeed = customBox.speed.speed.currentFrame);
break;
case "speed_right":
if (customBox.speed.speed.currentFrame < 15){
customBox.speed.speed.nextFrame();
};
(_levelSpeed = customBox.speed.speed.currentFrame);
break;
case "time_left":
((customBox.speed.time.currentFrame)>1) ? customBox.speed.time.prevFrame() : customBox.speed.time.gotoAndStop(16);
(_levelDuration = customBox.speed.time.currentFrame);
break;
case "time_right":
((customBox.speed.time.currentFrame)<16) ? customBox.speed.time.nextFrame() : customBox.speed.time.gotoAndStop(1);
(_levelDuration = customBox.speed.time.currentFrame);
break;
case "emmiterBTN":
_local2 = _arg1.target.parent;
((_local2.currentFrame == 1)) ? _local2.gotoAndStop(2) : _local2.gotoAndStop(1);
updateEmitters();
break;
case "levelGenerate":
dispatchEvent(new Event(CUSTOM));
break;
case "background_right":
if (customBox.style.background.currentFrame < 8){
customBox.style.background.nextFrame();
};
(_levelBackground = customBox.style.background.currentFrame);
break;
case "background_left":
if (customBox.style.background.currentFrame > 1){
customBox.style.background.prevFrame();
};
(_levelBackground = customBox.style.background.currentFrame);
break;
case "music_right":
((customBox.style.music.currentFrame)<6) ? customBox.style.music.nextFrame() : customBox.style.music.gotoAndStop(1);
(_levelTrack = customBox.style.music.currentFrame);
break;
case "music_left":
((customBox.style.music.currentFrame)>1) ? customBox.style.music.prevFrame() : customBox.style.music.gotoAndStop(6);
(_levelTrack = customBox.style.music.currentFrame);
break;
case "size_big":
(currentSize = _oddArray[(customBox.size.invader.currentFrame - 1)].size);
((currentSize)<10) ? trace("get bigger") : trace("stay same size");
(_oddArray[(customBox.size.invader.currentFrame - 1)].size = ((currentSize)<10) ? currentSize = (currentSize + 1) : currentSize);
(newSize = _oddArray[(customBox.size.invader.currentFrame - 1)].size);
FrameUtils.onEnterFrame(_currentInvader, customBox.size.invader, scaleInvader);
break;
case "size_small":
(currentSize = _oddArray[(customBox.size.invader.currentFrame - 1)].size);
((currentSize)>1) ? trace("get smaller") : trace("stay same size");
(_oddArray[(customBox.size.invader.currentFrame - 1)].size = ((currentSize)>1) ? currentSize = (currentSize - 1) : currentSize);
(newSize = _oddArray[(customBox.size.invader.currentFrame - 1)].size);
FrameUtils.onEnterFrame(_currentInvader, customBox.size.invader, scaleInvader);
break;
case "invader2_left":
(_oddArray[(customBox.size.invader.currentFrame - 1)].size = currentSize);
((customBox.size.invader.currentFrame)>1) ? [(_currentInvader = (_currentInvader - 1)), customBox.size.invader.prevFrame()] : [(_currentInvader = 15), customBox.size.invader.gotoAndStop(15)];
(currentSize = _oddArray[(customBox.size.invader.currentFrame - 1)].size);
(newSize = _oddArray[(customBox.size.invader.currentFrame - 1)].size);
FrameUtils.onEnterFrame(_currentInvader, customBox.size.invader, scaleInvader);
break;
case "invader2_right":
(_oddArray[(customBox.size.invader.currentFrame - 1)].size = currentSize);
((customBox.size.invader.currentFrame)<15) ? [(_currentInvader = (_currentInvader + 1)), customBox.size.invader.nextFrame()] : [(_currentInvader = 1), customBox.size.invader.gotoAndStop(1)];
(currentSize = _oddArray[(customBox.size.invader.currentFrame - 1)].size);
(newSize = _oddArray[(customBox.size.invader.currentFrame - 1)].size);
FrameUtils.onEnterFrame(_currentInvader, customBox.size.invader, scaleInvader);
break;
};
};
}
}
}//package
Section 184
//LevelSelect (LevelSelect)
package {
import flash.display.*;
import gs.*;
import flash.events.*;
import com.stampy.cookies.*;
import gs.easing.*;
import console.sounds.*;
public class LevelSelect extends MovieClip {
private var _summaryVisible:Boolean;// = false
public var Backing1:MovieClip;
public var Backing2:MovieClip;
public var Backing3:MovieClip;
public var Backing5:MovieClip;
public var Backing7:MovieClip;
public var Backing4:MovieClip;
public var music:MovieClip;
public var lock2:MovieClip;
public var lock3:MovieClip;
public var lock4:MovieClip;
public var lock5:MovieClip;
public var lock7:MovieClip;
public var lock1:MovieClip;
public var target2:MovieClip;
public var target3:MovieClip;
public var target4:MovieClip;
public var target5:MovieClip;
public var target1:MovieClip;
private var _levelStatus;
private var _spectrum1:SpectrumAnalyzer;
public var trophies1:MovieClip;
public var trophies3:MovieClip;
public var trophies4:MovieClip;
public var trophies2:MovieClip;
public var level1:SimpleButton;
public var level2:SimpleButton;
public var level3:SimpleButton;
public var level4:SimpleButton;
public var level5:SimpleButton;
public var level7:SimpleButton;
public var trophies5:MovieClip;
public var blackBox:MovieClip;
private var _arrLocked:Array;
public var custom:MovieClip;
private var _cookie:FlashCookie;
public var levelSummary:MovieClip;
public var level:uint;// = 1
public var played1:MovieClip;
public var played3:MovieClip;
public var played4:MovieClip;
public var played5:MovieClip;
public var played2:MovieClip;
public static const NEW_CUSTOM:String = "NewCustom";
public static const NEW_LEVEL:String = "NewLevel";
public function LevelSelect(_arg1:Array, _arg2:FlashCookie){
var _local3:int;
var _local4:Tip;
var _local5:int;
_levelStatus = {level1:true, level2:false, level3:false, level4:false, level5:false, level6:false, level7:false};
level = 1;
_summaryVisible = false;
super();
if (SoundUtils.isGlobalMute){
this.music.gotoAndStop(2);
};
_cookie = _arg2;
_arrLocked = _arg1;
_local3 = 1;
while (_local3 <= 5) {
_local4 = new Tip();
this[("trophies" + _local3)].addChild(_local4);
_local5 = 1;
while (_local5 <= 6) {
if (_cookie.getFromCookie(((("level" + _local3) + "_trophy") + _local5))){
_local4.addTarget(this[("trophies" + _local3)][("trophy" + _local5)], _local5);
} else {
if (_arrLocked[(_local3 - 1)]){
this[("trophies" + _local3)][("trophy" + _local5)].alpha = 0.3;
_local4.addTarget(this[("trophies" + _local3)][("trophy" + _local5)], (_local5 + 6));
} else {
this[("trophies" + _local3)][("trophy" + _local5)].alpha = 0.1;
};
};
_local5++;
};
_local3++;
};
levelSummary.alpha = 0;
TweenMax.to(levelSummary, 0, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, alpha:0});
setLocks();
this.addEventListener(MouseEvent.CLICK, mouseHandler);
this.addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
this.addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
}
private function hideSummary():void{
_summaryVisible = false;
TweenMax.to(levelSummary, 1, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, alpha:0, ease:Elastic.easeInOut});
}
private function nextTrack(_arg1:uint):void{
switch (_arg1){
case 1:
SoundUtils.fadeMusicPlay("Track4", 1, 3, true);
break;
case 2:
SoundUtils.fadeMusicPlay("Track2", 1, 3, true);
break;
case 3:
SoundUtils.fadeMusicPlay("Track6", 1, 3, true);
break;
case 4:
SoundUtils.fadeMusicPlay("Track5", 1, 3, true);
break;
case 5:
SoundUtils.fadeMusicPlay("Track1", 1, 3, true);
break;
case 6:
SoundUtils.fadeMusicPlay("Track3", 1, 3, true);
break;
};
}
private function mouseOut(_arg1:MouseEvent):void{
switch (_arg1.target.name){
case "level1":
case "level2":
case "level3":
case "level4":
case "level5":
if (_summaryVisible){
hideSummary();
};
break;
};
}
private function mouseHandler(_arg1:MouseEvent):void{
switch (_arg1.target.name){
case "level1":
if (_levelStatus[_arg1.target.name]){
level = 1;
playMusic(level);
_cookie.updateCookieVar((("level" + level) + "_played"), (_cookie.getFromCookie((("level" + level) + "_played")) + 1));
dispatchEvent(new Event(NEW_LEVEL));
};
break;
case "level2":
if (_levelStatus[_arg1.target.name]){
level = 2;
playMusic(level);
_cookie.updateCookieVar((("level" + level) + "_played"), (_cookie.getFromCookie((("level" + level) + "_played")) + 1));
dispatchEvent(new Event(NEW_LEVEL));
};
break;
case "level3":
if (_levelStatus[_arg1.target.name]){
level = 3;
playMusic(level);
_cookie.updateCookieVar((("level" + level) + "_played"), (_cookie.getFromCookie((("level" + level) + "_played")) + 1));
dispatchEvent(new Event(NEW_LEVEL));
};
break;
case "level4":
if (_levelStatus[_arg1.target.name]){
level = 4;
playMusic(level);
_cookie.updateCookieVar((("level" + level) + "_played"), (_cookie.getFromCookie((("level" + level) + "_played")) + 1));
dispatchEvent(new Event(NEW_LEVEL));
};
break;
case "level5":
if (_levelStatus[_arg1.target.name]){
level = 5;
playMusic(level);
_cookie.updateCookieVar((("level" + level) + "_played"), (_cookie.getFromCookie((("level" + level) + "_played")) + 1));
dispatchEvent(new Event(NEW_LEVEL));
};
break;
case "level7":
if (_levelStatus[_arg1.target.name]){
level = 7;
trace("SELECTED LEVEL 7 ");
dispatchEvent(new Event(NEW_CUSTOM));
};
break;
};
}
private function mouseOver(_arg1:MouseEvent):void{
switch (_arg1.target.name){
case "level1":
if (_cookie.getFromCookie("level1_played") > 0){
showSummary(1);
};
break;
case "level2":
if (_cookie.getFromCookie("level2_played") > 0){
showSummary(2);
};
break;
case "level3":
if (_cookie.getFromCookie("level3_played") > 0){
showSummary(3);
};
break;
case "level4":
if (_cookie.getFromCookie("level4_played") > 0){
showSummary(4);
};
break;
case "level5":
if (_cookie.getFromCookie("level5_played") > 0){
showSummary(5);
};
break;
};
}
private function playMusic(_arg1:uint):void{
var _local2:int;
_local2 = 1;
while (_local2 < 7) {
SoundUtils.fadeMusicStop(("Track" + _local2), 0, 0.8);
_local2++;
};
TweenMax.to({}, 1, {onComplete:nextTrack, onCompleteParams:[_arg1]});
}
public function kill():void{
this.removeEventListener(MouseEvent.CLICK, mouseHandler);
this.removeEventListener(MouseEvent.MOUSE_OVER, mouseOver);
this.removeEventListener(MouseEvent.MOUSE_OUT, mouseOut);
this.parent.removeChild(this);
}
private function setLocks():void{
var _local1:int;
var _local2:int;
var _local3:uint;
var _local4:uint;
_local1 = 1;
while (_local1 < 6) {
this[("lock" + _local1)].mouseEnabled = false;
this[("lock" + _local1)].mouseChildren = false;
if (_arrLocked[(_local1 - 1)]){
this[("target" + _local1)].target.textBox.text = _cookie.getFromCookie((("level" + _local1) + "_target"));
this[("Backing" + _local1)].alpha = 1;
this[("lock" + _local1)].gotoAndStop(2);
_levelStatus[("level" + _local1)] = true;
} else {
this[("Backing" + _local1)].alpha = 0.2;
this[("target" + _local1)].target.textBox.visible = false;
this[("target" + _local1)].target.target.visible = false;
_levelStatus[("level" + _local1)] = false;
};
if (_cookie.getFromCookie((("level" + _local1) + "_bestScore")) > -9999999){
trace(("DISPLAY BEST SCORE IN LEVEL SELECT:" + _local1));
this[("target" + _local1)].best.textBox.text = _cookie.getFromCookie((("level" + _local1) + "_bestScore"));
this[("target" + _local1)].best.visible = true;
this[("target" + _local1)].best.star.visible = true;
this[("target" + _local1)].best.textBox.visible = true;
} else {
trace(((("SCORE IN LEVEL SELECT <= -999999:" + _local1) + " = ") + _cookie.getFromCookie((("level" + _local1) + "_bestScore"))));
this[("target" + _local1)].best.star.visible = false;
this[("target" + _local1)].best.textBox.visible = false;
};
if (_cookie.getFromCookie((("level" + _local1) + "_played")) > 0){
this[("played" + _local1)].textBox.text = _cookie.getFromCookie((("level" + _local1) + "_played"));
this[("played" + _local1)].visible = true;
} else {
this[("played" + _local1)].visible = false;
};
if (_cookie.getFromCookie("level7_unlocked")){
_levelStatus["level7"] = true;
} else {
this["Backing7"].alpha = 0.2;
custom.target7.best1.flashing.visible = false;
custom.target7.best2.flashing.visible = false;
custom.target7.best3.flashing.visible = false;
};
_local1++;
};
_local2 = 1;
while (_local2 <= 5) {
_local3 = 0;
_local4 = 1;
while (_local4 <= 6) {
if (_cookie.getFromCookie(((("level" + _local2) + "_trophy") + _local4))){
_local3++;
};
_local4++;
};
if (_local3 == 6){
this[("target" + _local2)].champ.star.visible = true;
this[("target" + _local2)].champ.champ.visible = true;
} else {
this[("target" + _local2)].champ.star.visible = false;
this[("target" + _local2)].champ.champ.visible = false;
};
_local2++;
};
if (_cookie.getFromCookie("level7_unlocked")){
this["lock7"].gotoAndStop(2);
};
}
private function showSummary(_arg1:uint):void{
var _local2:*;
_local2 = _cookie.getFromCookie((("level" + _arg1) + "_bestRed"));
levelSummary.points_bad.text = ((_local2 == 999999999)) ? 0 : _local2;
levelSummary.points_good.text = _cookie.getFromCookie((("level" + _arg1) + "_bestGreen"));
levelSummary.points_special.text = _cookie.getFromCookie((("level" + _arg1) + "_bestBonus"));
levelSummary.points_4.text = _cookie.getFromCookie((("level" + _arg1) + "_bestYellow"));
levelSummary.points_3.text = _cookie.getFromCookie((("level" + _arg1) + "_bestPink"));
levelSummary.points_2.text = _cookie.getFromCookie((("level" + _arg1) + "_bestBlue"));
levelSummary.points_1.text = _cookie.getFromCookie((("level" + _arg1) + "_bestTeal"));
levelSummary.level.text = _arg1.toString();
levelSummary.gotoAndStop(_arg1);
_summaryVisible = true;
TweenMax.to(levelSummary, 1, {blurFilter:{blurX:0}, colorMatrixFilter:{colorize:0, amount:0, brightness:1}, alpha:1, ease:Elastic.easeInOut});
}
}
}//package
Section 185
//Main (Main)
package {
import flash.display.*;
import gs.*;
import flash.events.*;
import flash.geom.*;
import com.stampy.cookies.*;
import console.trackers.*;
import gs.easing.*;
import console.sounds.*;
import com.stampy.random.*;
import console.loadurl.*;
import console.preloader.*;
import flash.system.*;
public class Main extends MovieClip {
private var _black:BlackScreen;
private var _spectrum1:SpectrumAnalyzer;
private var _preloader:GamePreloader;
private var _spectrum3:SpectrumAnalyzer;
private var _spectrum2:SpectrumAnalyzer;
private var _blankCustom:Object;
public var background:MainMenu;
private var _emitter:Emitter;
public var loading:MovieClip;
public var menu:MovieClip;
private var _title:uint;// = 1
public var intro:InvaderGroup;
private var _cookie:FlashCookie;
private var inbetweenShown:Boolean;// = false
private var _cookieName:String;// = "gmf36"
public var logo:MovieClip;
private var _cookieData:Object;
private var _game:GameEngine;
private var _inbetween:Inbetween;
public function Main(){
_cookieName = "gmf36";
_title = 1;
_blankCustom = {active:null, track:null, duration:null, speed:null, special:null, emitters:null, odds:null, background:null, speedFrame:null, durationFrame:null, emitterFrame:null};
_cookieData = {title:1, level1_unlocked:true, level1_played:0, level1_bestGreen:0, level1_bestGreenBonus:0, level1_bestRed:999999999, level1_bestBonus:0, level1_bestScore:-999999999, level1_bestTeal:0, level1_bestBlue:0, level1_bestPink:0, level1_bestYellow:0, level1_target:200000, level1_trophy1:false, level1_trophy2:false, level1_trophy3:false, level1_trophy4:false, level1_trophy5:false, level1_trophy6:false, level2_unlocked:false, level2_played:0, level2_bestGreen:0, level2_bestGreenBonus:0, level2_bestRed:999999999, level2_bestBonus:0, level2_bestScore:-999999999, level2_bestTeal:0, level2_bestBlue:0, level2_bestPink:0, level2_bestYellow:0, level2_target:400000, level2_trophy1:false, level2_trophy2:false, level2_trophy3:false, level2_trophy4:false, level2_trophy5:false, level2_trophy6:false, level3_unlocked:false, level3_played:0, level3_bestGreen:0, level3_bestGreenBonus:0, level3_bestRed:999999999, level3_bestBonus:0, level3_bestScore:-999999999, level3_bestTeal:0, level3_bestBlue:0, level3_bestPink:0, level3_bestYellow:0, level3_target:600000, level3_trophy1:false, level3_trophy2:false, level3_trophy3:false, level3_trophy4:false, level3_trophy5:false, level3_trophy6:false, level4_unlocked:false, level4_played:0, level4_bestGreen:0, level4_bestGreenBonus:0, level4_bestRed:999999999, level4_bestBonus:0, level4_bestScore:-999999999, level4_bestTeal:0, level4_bestBlue:0, level4_bestPink:0, level4_bestYellow:0, level4_target:800000, level4_trophy1:false, level4_trophy2:false, level4_trophy3:false, level4_trophy4:false, level4_trophy5:false, level4_trophy6:false, level5_unlocked:false, level5_played:0, level5_bestGreen:0, level5_bestGreenBonus:0, level5_bestRed:999999999, level5_bestBonus:0, level5_bestScore:-999999999, level5_bestTeal:0, level5_bestBlue:0, level5_bestPink:0, level5_bestYellow:0, level5_target:1000000, level5_trophy1:false, level5_trophy2:false, level5_trophy3:false, level5_trophy4:false, level5_trophy5:false, level5_trophy6:false, level7_unlocked:false, level7_played:0, level7_bestGreen:0, level7_bestGreenBonus:0, level7_bestRed:999999999, level7_bestBonus:0, level7_bestScore:-999999999, level7_bestTeal:0, level7_bestBlue:0, level7_bestPink:0, level7_bestYellow:0, level7_target:600000, level7_trophy1:false, level7_trophy2:false, level7_trophy3:false, level7_trophy4:false, level7_trophy5:false, level7_trophy6:false, customLevel:_blankCustom};
inbetweenShown = false;
super();
addFrameScript(0, frame1, 2, frame3);
tracking();
hideTiles();
preload();
cookie();
mouseListen();
}
private function preload():void{
SoundUtils.addSFX("SFX23", 0.2);
SoundUtils.addSFX("SFX24", 0.2);
SoundUtils.addSFX("SFX25", 0.2);
SoundUtils.addSFX("SFX26", 0.2);
SoundUtils.addSFX("SFX27", 0.2);
_preloader = new GamePreloader();
_preloader.addEventListener(GamePreloader.PROGRESS, handleProgress);
_preloader.addEventListener(GamePreloader.COMPLETE, handleComplete);
addChild(_preloader);
}
public function init():void{
var _local1:int;
CreateSoundLibrary();
SoundUtils.fadeMusicPlay("Track2", 1, 3, true);
TweenLite.from(this.intro.pacman, 1.5, {alpha:0});
TweenLite.to(this.intro.pacman, 1.5, {alpha:1.8, ease:Elastic.easeOut});
_local1 = 1;
while (_local1 < 6) {
TweenLite.from(this.intro[("invader" + _local1)], 1.5, {alpha:0});
TweenLite.to(this.intro[("invader" + _local1)], 1.5, {delay:(0.3 * _local1), alpha:1.8, ease:Elastic.easeOut});
_local1++;
};
TweenLite.to({}, 2, {onComplete:this.background.vent.gotoAndPlay, onCompleteParams:[2]});
_emitter = new Emitter(2, 2, 5);
_emitter.y = 800;
_emitter.scaleX = 5;
_emitter.scaleY = 5;
_emitter.target = new Point(0, 0);
_emitter.mouseChildren = false;
_emitter.mouseEnabled = false;
_emitter.start();
intro.emitterPacman.addChild(_emitter);
this.background.graffiti.alpha = 0;
this.background.graffiti.gotoAndStop(Random.range(2, 10));
TweenMax.to(this.background.graffiti, 1, {alpha:1});
}
private function newBlackGrid():void{
this.removeChild(logo);
this.background.graffiti.sticker1.gotoAndPlay(2);
if (this.background.graffiti.currentFrame == 10){
this.background.graffiti.anim.gotoAndPlay(2);
};
TweenLite.to({}, 0.5, {onComplete:SoundUtils.playSFX, onCompleteParams:["SFX22"]});
TweenLite.to({}, 1.8, {onComplete:SoundUtils.playSFX, onCompleteParams:["SFX9"]});
TweenMax.to(this.background, 2, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, delay:3, onComplete:newGame, ease:Elastic.easeInOut});
}
private function crossDomain():void{
Security.allowDomain("*");
}
private function removeLoading():void{
if (loading != null){
this.removeChild(loading);
};
}
private function newGameBoard():void{
SoundUtils.playSFX("SFX3");
this.background.vent.gotoAndPlay(14);
TweenLite.to(this.background, 4, {y:-741, ease:Quart.easeInOut});
TweenLite.to(this.logo, 4, {y:-351, ease:Quart.easeInOut});
TweenLite.to(this.intro, 4, {y:-330, ease:Quart.easeInOut});
TweenLite.to({}, 5, {onComplete:newBlackGrid});
}
function frame3(){
this.init();
stop();
}
private function hideTiles():void{
var _local1:int;
_local1 = 1;
while (_local1 < 25) {
this.menu[("tile" + _local1)].alpha = 0;
_local1++;
};
}
private function handleProgress(_arg1:Event):void{
var _local2:Number;
var _local3:uint;
var _local4:int;
_local2 = _preloader.percentLoaded;
_local3 = Math.ceil((_local2 / 4));
if (_local2 < 100){
loading.percent.textBox.text = (_local2.toString() + "%");
};
_local4 = 1;
while (_local4 < _local3) {
if (this.menu[("tile" + _local4)].alpha == 0){
SoundUtils.playSFX(("SFX" + Random.range(23, 27).toString()));
TweenLite.to(this.menu[("tile" + _local4)], 0.5, {alpha:1, ease:Elastic.easeOut});
};
_local4++;
};
if (_preloader.percentLoaded >= 99){
TweenLite.to(loading, 0.3, {alpha:0, onComplete:removeLoading});
_preloader.removeEventListener(GamePreloader.PROGRESS, handleProgress);
};
}
private function cookie():void{
_cookie = new FlashCookie(_cookieName, _cookieData);
}
private function handleMouse(_arg1:MouseEvent):void{
var type:String;
var evt = _arg1;
type = evt.type;
switch (evt.target.name){
case "start":
if (type == "click"){
newGameBoard();
try {
SoundUtils.playSFX("SFX16");
} catch(e:Error) {
trace("SoundError");
};
};
break;
case "e4":
if (type == "click"){
OpenURL.loadURL("http://www.e4.com/grandmasterflash/");
try {
SoundUtils.playSFX("SFX16");
} catch(e:Error) {
trace("SoundError");
};
};
break;
case "playAgain":
if (type == "click"){
try {
SoundUtils.playSFX("SFX16");
} catch(e:Error) {
trace("SoundError");
};
removeGame();
};
break;
case "title_prev":
if (type == "click"){
try {
SoundUtils.playSFX("SFX16");
} catch(e:Error) {
trace("SoundError");
};
_title = ((_title)<15) ? (_title + 1) : 1;
_cookie.updateCookieVar("title", _title);
logo.title.gotoAndStop(_title);
};
break;
case "title_next":
if (type == "click"){
try {
SoundUtils.playSFX("SFX16");
} catch(e:Error) {
trace("SoundError");
};
_title = ((_title)>1) ? (_title - 1) : 15;
_cookie.updateCookieVar("title", _title);
logo.title.gotoAndStop(_title);
};
break;
case "paul":
if (type == "click"){
OpenURL.loadURL("http://www.paulstamp.co.uk");
try {
SoundUtils.playSFX("SFX16");
} catch(e:Error) {
trace("SoundError");
};
};
break;
case "terminal":
if (type == "click"){
OpenURL.loadURL("http://www.terminalstation.co.uk");
try {
SoundUtils.playSFX("SFX16");
} catch(e:Error) {
trace("SoundError");
};
};
break;
case "muteON":
if (type == "click"){
SoundUtils.muteGlobal();
};
if (type == "click"){
evt.target.parent.gotoAndStop(2);
};
break;
case "muteOFF":
if (type == "click"){
SoundUtils.muteGlobal();
};
if (type == "click"){
evt.target.parent.gotoAndStop(1);
};
break;
};
}
private function handleComplete(_arg1:Event):void{
gotoAndPlay(2);
}
function frame1(){
stop();
}
private function removeGame():void{
TweenMax.to(_game._gameSummary, 1, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, alpha:0, ease:Elastic.easeInOut, onComplete:showInbetween});
}
private function nextGame():void{
inbetweenShown = false;
_game.kill();
_game = new GameEngine(_cookie, false);
newGame2();
removeInbetween();
}
private function tracking():void{
try {
MochiBot.track(this, "74bb8c86");
} catch(e:Error) {
trace("Mochi Error");
};
}
private function newGame():void{
_emitter.kill();
this.removeChild(background);
this.removeChild(intro);
_game = new GameEngine(_cookie);
addChild(_game);
}
private function mouseListen():void{
addEventListener(MouseEvent.CLICK, handleMouse);
addEventListener(MouseEvent.MOUSE_OVER, handleMouse);
}
private function newGame2():void{
addChild(_game);
}
private function showInbetween():void{
try {
if (!inbetweenShown){
inbetweenShown = true;
_game._gameSummary.kill();
_inbetween = new Inbetween();
if (SoundUtils.isGlobalMute){
_inbetween.music.gotoAndStop(2);
};
_inbetween.title.gotoAndStop(_title);
addChild(_inbetween);
TweenMax.from(_inbetween, 1, {blurFilter:{blurX:800}, colorMatrixFilter:{colorize:0, amount:0, brightness:-3}, alpha:0, ease:Elastic.easeInOut});
TweenMax.to(_inbetween, 1, {blurFilter:{blurX:0}, colorMatrixFilter:{colorize:0, amount:0, brightness:1}, alpha:1, ease:Elastic.easeInOut});
TweenLite.to({}, 4, {onComplete:nextGame});
};
} catch(e:Error) {
trace("inbetween error");
};
}
private function CreateSoundLibrary():void{
SoundUtils.addMusic("Track1", 1);
SoundUtils.addMusic("Track2", 1);
SoundUtils.addMusic("Track3", 1);
SoundUtils.addMusic("Track4", 1);
SoundUtils.addMusic("Track5", 1);
SoundUtils.addMusic("Track6", 1);
SoundUtils.addSFX("SFX3", 1);
SoundUtils.addSFX("SFX4", 0.2);
SoundUtils.addSFX("SFX5", 0.2);
SoundUtils.addSFX("SFX6", 0.3);
SoundUtils.addSFX("SFX7", 0.3);
SoundUtils.addSFX("SFX8", 0.3);
SoundUtils.addSFX("SFX9", 0.5);
SoundUtils.addSFX("SFX10", 0.6);
SoundUtils.addSFX("SFX13", 0.6);
SoundUtils.addSFX("SFX14", 0.2);
SoundUtils.addSFX("SFX15", 0.2);
SoundUtils.addSFX("SFX16", 1);
SoundUtils.addSFX("SFX17", 1);
SoundUtils.addSFX("SFX18", 1);
SoundUtils.addSFX("SFX19", 1);
SoundUtils.addSFX("SFX21", 1);
SoundUtils.addSFX("SFX22", 0.6);
SoundUtils.addSFX("SFX28", 1);
SoundUtils.addSFX("SFX29", 1);
SoundUtils.addSFX("SFX30", 1);
SoundUtils.addSFX("SFX31", 1);
SoundUtils.addSFX("SFX32", 1);
SoundUtils.addSFX("SFX34", 1);
SoundUtils.addSFX("SFX35", 1);
SoundUtils.addSFX("SFX36", 1);
SoundUtils.addSFX("SFX37", 1);
_spectrum1 = new SpectrumAnalyzer(160, 160);
_spectrum2 = new SpectrumAnalyzer(160, 160);
_spectrum3 = new SpectrumAnalyzer(160, 160);
_spectrum1.x = 100;
_spectrum1.y = 105;
_spectrum2.x = 100;
_spectrum2.y = 105;
_spectrum3.x = 100;
_spectrum3.y = 105;
_spectrum1.rotation = -15;
_spectrum2.rotation = -15;
_spectrum3.rotation = -15;
intro.pacman.pac1.spectrumFilters.spectrumContainer.addChild(_spectrum1);
intro.pacman.pac2.spectrumFilters.spectrumContainer.addChild(_spectrum2);
intro.pacman.pac3.spectrumFilters.spectrumContainer.addChild(_spectrum3);
}
private function removeInbetween():void{
removeChild(_inbetween);
}
}
}//package
Section 186
//MainMenu (MainMenu)
package {
import flash.display.*;
public dynamic class MainMenu extends MovieClip {
public var tile1:MovieClip;
public var tile2:MovieClip;
public var tile3:MovieClip;
public var tile6:MovieClip;
public var tile13:MovieClip;
public var tile17:MovieClip;
public var tile19:MovieClip;
public var tile5:MovieClip;
public var tile9:MovieClip;
public var tile11:MovieClip;
public var tile14:MovieClip;
public var tile15:MovieClip;
public var tile16:MovieClip;
public var tile18:MovieClip;
public var tile24:MovieClip;
public var tile25:MovieClip;
public var tile22:MovieClip;
public var tile23:MovieClip;
public var tile8:MovieClip;
public var tile28:MovieClip;
public var tile21:MovieClip;
public var tile4:MovieClip;
public var tile20:MovieClip;
public var tile26:MovieClip;
public var tile10:MovieClip;
public var tile27:MovieClip;
public var vent:MovieClip;
public var tile12:MovieClip;
public var tile7:MovieClip;
public var graffiti:MovieClip;
}
}//package
Section 187
//Mask1 (Mask1)
package {
import flash.display.*;
public dynamic class Mask1 extends MovieClip {
}
}//package
Section 188
//Mask2 (Mask2)
package {
import flash.display.*;
public dynamic class Mask2 extends MovieClip {
}
}//package
Section 189
//MaskOverlay (MaskOverlay)
package {
import flash.display.*;
public dynamic class MaskOverlay extends MovieClip {
}
}//package
Section 190
//MusicPlayer (MusicPlayer)
package {
import flash.display.*;
import gs.*;
import flash.events.*;
import com.stampy.cookies.*;
import gs.easing.*;
import console.sounds.*;
import flash.ui.*;
public class MusicPlayer extends MovieClip {
private var _spectrum1:SpectrumAnalyzer;
public var next:SimpleButton;
public var music:MovieClip;
public var prev:SimpleButton;
private var _track:uint;// = 0
private var _playList:Array;
private var _cookie:FlashCookie;
public var movingText:MovieClip;
private var _over:Boolean;// = false
public var spectrum:MovieClip;
public function MusicPlayer():void{
_track = 0;
_over = false;
_playList = [0, 4, 2, 6, 5, 1, 3];
super();
if (SoundUtils.isGlobalMute){
this.music.gotoAndStop(2);
};
addEventListener(MouseEvent.CLICK, mouseClick);
addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
}
private function mouseClick(_arg1:MouseEvent):void{
switch (_arg1.target.name){
case "next":
nextTrack();
break;
case "prev":
prevTrack();
break;
};
}
public function setTrack(_arg1:uint, _arg2:Boolean=false):void{
var _local3:Boolean;
var _local4:Boolean;
var _local5:Boolean;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
_track = _arg1;
switch (_arg1){
case 5:
_local3 = _cookie.getFromCookie("level5_unlocked");
if (_local3){
movingText.track.myText_txt.text = "*** Level:5 - title:mind voyager - artist:miniman";
if (_arg2){
playTrack(_arg1);
};
} else {
movingText.track.myText_txt.text = "*** Level:5 - Locked";
};
movingText.track.myText_txt.textColor = "0x66FFFF";
movingText.track.myText_txt.scrollH = 0;
break;
case 2:
_local4 = _cookie.getFromCookie("level2_unlocked");
if (_local4){
movingText.track.myText_txt.text = "*** Level:2 - title:in 8 bit we trust - artist:miniman";
if (_arg2){
playTrack(_arg1);
};
} else {
movingText.track.myText_txt.text = "*** Level:2 - Locked";
};
movingText.track.myText_txt.textColor = "0x66FF00";
movingText.track.myText_txt.scrollH = 0;
break;
case 6:
_local5 = _cookie.getFromCookie("level7_unlocked");
if (_local5){
movingText.track.myText_txt.text = "*** BONUS TRACK: - title:v for love 2.0 - artist:miniman";
if (_arg2){
playTrack(_arg1);
};
} else {
movingText.track.myText_txt.text = "*** Level:6 - Locked";
};
movingText.track.myText_txt.textColor = "0x66FFFF";
movingText.track.myText_txt.scrollH = 0;
break;
case 1:
_local6 = _cookie.getFromCookie("level1_unlocked");
if (_local6){
movingText.track.myText_txt.text = "*** Level:1 - title:basic idea - artist:miniman";
if (_arg2){
playTrack(_arg1);
};
} else {
movingText.track.myText_txt.text = "*** Level:1 - Locked";
};
movingText.track.myText_txt.textColor = "0x66FF00";
movingText.track.myText_txt.scrollH = 0;
break;
case 4:
_local7 = _cookie.getFromCookie("level4_unlocked");
if (_local7){
movingText.track.myText_txt.text = "*** Level:4 - title:arcade isn't dead - artist:miniman";
if (_arg2){
playTrack(_arg1);
};
} else {
movingText.track.myText_txt.text = "*** Level:4 - Locked";
};
movingText.track.myText_txt.textColor = "0x66FFFF";
movingText.track.myText_txt.scrollH = 0;
break;
case 3:
_local8 = _cookie.getFromCookie("level3_unlocked");
if (_local8){
movingText.track.myText_txt.text = "*** Level:3 - title:little melody - artist:miniman";
if (_arg2){
playTrack(_arg1);
};
} else {
movingText.track.myText_txt.text = "*** Level:3 - Locked";
};
movingText.track.myText_txt.textColor = "0x66FF00";
movingText.track.myText_txt.scrollH = 0;
break;
};
}
private function prevTrack():void{
if (_track > 1){
setTrack((_track - 1), true);
} else {
setTrack(6, true);
};
}
private function startTrack(_arg1):void{
var _local2:int;
trace(("PLAY:" + _arg1));
_local2 = 1;
while (_local2 < 7) {
SoundUtils.stopMusic(("Track" + _local2));
_local2++;
};
SoundUtils.fadeMusicPlay(("Track" + _arg1), 1, 0.5, true);
}
private function mouseMove(_arg1:MouseEvent=null):void{
if (_over){
Mouse.show();
} else {
Mouse.hide();
};
}
private function nextTrack():void{
if (_track < 6){
setTrack((_track + 1), true);
} else {
setTrack(1, true);
};
}
private function mouseOver(_arg1:MouseEvent):void{
_over = true;
mouseMove();
}
private function mouseOut(_arg1:MouseEvent):void{
_over = false;
mouseMove();
}
private function playTrack(_arg1):void{
var _local2:int;
_local2 = 1;
while (_local2 < 7) {
SoundUtils.fadeMusicStop(("Track" + _local2), 0, 0.5);
_local2++;
};
TweenMax.to({}, 0.6, {onComplete:startTrack, onCompleteParams:[_arg1]});
}
public function set cookie(_arg1:FlashCookie):void{
_cookie = _arg1;
}
}
}//package
Section 191
//Overlay1 (Overlay1)
package {
import flash.display.*;
public dynamic class Overlay1 extends MovieClip {
}
}//package
Section 192
//Overlay2 (Overlay2)
package {
import flash.display.*;
public dynamic class Overlay2 extends MovieClip {
}
}//package
Section 193
//Pacman (Pacman)
package {
import flash.display.*;
import gs.*;
import flash.events.*;
import flash.geom.*;
import gs.easing.*;
import flash.ui.*;
public class Pacman extends MovieClip {
private const EMITTER_DIST:uint = 200;
private const ANGLE_SPECIAL:Number = 57.32;
private const FULL_SCALE:Number = 0.8;
private const EXTRA_ANGLE:uint = 90;
private var _arrKids:Array;
private var _speed:Number;
private var _distantY:Number;
private var _distantX:Number;
private var _scale:Number;// = 1
public var shield:MovieClip;
private var _cursorAngle:Number;
private var _distanceFromEmitter:Number;
private var _localPoint:Point;
private var _mousePoint:Point;
private var _emitterPoint:Point;
private var _cursorDegree:Number;
public var pman:MovieClip;
private static var _stage;
public function Pacman(_arg1, _arg2:Number){
_scale = 1;
super();
addFrameScript(0, frame1);
shield.visible = false;
_speed = _arg2;
_stage = _arg1;
_mousePoint = new Point(0, 0);
_localPoint = new Point(0, 0);
_emitterPoint = new Point(0, 0);
mouseMove();
}
public function init():void{
Mouse.hide();
_stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
}
public function shieldON():void{
this.shield.visible = true;
this.shield.gotoAndStop(1);
TweenLite.from(shield, 0.5, {alpha:1});
TweenLite.to(shield, 0.5, {alpha:1});
TweenLite.to({}, 10, {onComplete:shieldOFF});
TweenLite.to({}, 7, {onComplete:pulseShield});
}
private function mouseMove(_arg1:MouseEvent=null):void{
var _local2:int;
var _local3:int;
var _local4:Number;
var _local5:Number;
_mousePoint.x = mouseX;
_mousePoint.y = mouseY;
_localPoint = this.localToGlobal(_mousePoint);
_local2 = (this.x - _localPoint.x);
_local3 = (this.y - _localPoint.y);
_local4 = Math.atan2(_local3, _local2);
_local5 = (360 * (_local4 / (2 * Math.PI)));
TweenLite.to(this, _speed, {x:_localPoint.x, y:_localPoint.y, shortRotation:{rotation:_local5}});
}
override public function get scaleX():Number{
return (super.scaleX);
}
override public function get scaleY():Number{
return (super.scaleY);
}
override public function get alpha():Number{
return (super.alpha);
}
function frame1(){
stop();
}
private function pulseShield():void{
this.shield.gotoAndPlay(2);
}
override public function get rotation():Number{
return (super.rotation);
}
public function isShieldON():Boolean{
return (this.shield.visible);
}
public function kill():void{
Mouse.show();
_stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
this.parent.removeChild(this);
}
private function shieldOFF():void{
TweenLite.to(shield, 0.5, {alpha:0, onComplete:shieldInv});
}
override public function set scaleX(_arg1:Number):void{
if (_arg1 > 0.5){
super.scaleX = _arg1;
} else {
super.scaleX = 1;
};
}
override public function set scaleY(_arg1:Number):void{
if (_arg1 > 0.5){
super.scaleY = _arg1;
} else {
super.scaleY = 1;
};
}
override public function set alpha(_arg1:Number):void{
if (_arg1 > 0.5){
super.alpha = _arg1;
} else {
super.alpha = 1;
};
}
private function shieldInv():void{
this.shield.visible = false;
}
override public function set rotation(_arg1:Number):void{
super.rotation = _arg1;
if ((((this.rotation > -90)) && ((this.rotation < 89)))){
if (this.currentFrame != 2){
this.gotoAndStop(2);
};
} else {
if (this.currentFrame != 1){
this.gotoAndStop(1);
};
};
}
}
}//package
Section 194
//Particle (Particle)
package {
import flash.display.*;
import gs.*;
import flash.geom.*;
import com.stampy.decisions.*;
import gs.easing.*;
import console.sounds.*;
import com.stampy.random.*;
import com.stampy.points.*;
public class Particle extends MovieClip {
private var _sound:Boolean;// = true
private var _lastPoint:Point;
private var _decision:String;
private var _speed:Number;
private var _distance:Number;
private var _hitShield:Boolean;// = false
private var _scale:Number;// = 1
private var _activate:Boolean;// = true
private var _chance:ChanceDecision;
private var _currentPoint:Point;
private var _alternate:uint;// = 1
private var _localPoint:Point;
private var _midPoint:Point;
private var _homePoint:Point;
private var _destinationPoint:Point;
private var _chosen:uint;
private var _isAtDestination:Boolean;// = false
private var _custom:Object;
private var _level:uint;
private var _time:Number;
private var _target;
public function Particle(_arg1:uint, _arg2:Object, _arg3:uint=1){
_isAtDestination = false;
_scale = 1;
_alternate = 1;
_hitShield = false;
_activate = true;
_sound = true;
super();
addFrameScript(0, frame1);
_custom = _arg2;
this.mouseEnabled = false;
this.mouseChildren = false;
_level = _arg1;
_alternate = _arg3;
_scale = (Random.range(20, 40) / 10);
if (!_custom.active){
if (_alternate != 4){
_chance = new ChanceDecision();
if ((_alternate == 3)){
_chance.addChance("green", 1);
} else {
_chance.addChance("green", 15);
};
_chance.addChance("blue", 6);
_chance.addChance("lightBlue", 6);
_chance.addChance("purple", 6);
_chance.addChance("teal", 10);
_chance.addChance("star", 220);
_chance.addChance("mushroom", 190);
_chance.addChance("smile", 400);
_chance.addChance("greenShield", 800);
_chance.addChance("redMine", 100);
_chance.addChance("specs", 900);
_chance.addChance("greenMine", 200);
particleNormal();
particleDecision();
} else {
this.gotoAndStop(2);
};
} else {
if (_alternate != 4){
_chance = new ChanceDecision();
if ((_alternate == 3)){
_chance.addChance("green", 1);
} else {
_chance.addChance("green", getOdds(_custom.odds[0].frequency));
};
if ((_alternate == 2)){
_chance.addChance("red", 1);
} else {
_chance.addChance("red", getOdds(_custom.odds[5].frequency));
};
_chance.addChance("blue", getOdds(_custom.odds[1].frequency));
_chance.addChance("lightBlue", getOdds(_custom.odds[2].frequency));
_chance.addChance("purple", getOdds(_custom.odds[3].frequency));
_chance.addChance("teal", getOdds(_custom.odds[4].frequency));
_chance.addChance("special", getOdds(_custom.odds[6].frequency));
_chance.addChance("mushroom", getOdds(_custom.odds[7].frequency));
_chance.addChance("redMine", getOdds(_custom.odds[8].frequency));
_chance.addChance("greenMine", getOdds(_custom.odds[9].frequency));
_chance.addChance("greenShield", getOdds(_custom.odds[10].frequency));
_chance.addChance("redPill", getOdds(_custom.odds[11].frequency));
_chance.addChance("specs", getOdds(_custom.odds[12].frequency));
_chance.addChance("star", getOdds(_custom.odds[13].frequency));
_chance.addChance("smile", getOdds(_custom.odds[14].frequency));
_decision = _chance.makeDecision([]);
particleDecision();
} else {
this.gotoAndStop(2);
};
};
_homePoint = new Point(0, 0);
_currentPoint = new Point(0, 0);
_localPoint = new Point(0, 0);
_speed = Random.range(5, 10);
_lastPoint = new Point(0, 0);
_destinationPoint = new Point(Random.range(-500, 500), Random.range(-200, -200));
_midPoint = new Point(Random.range(-100, 100), Random.range(-100, -800));
}
private function activate():void{
_activate = true;
}
private function particleNormal():void{
switch (_level){
case 1:
_chance.addChance("special", 300);
if ((_alternate == 2)){
_chance.addChance("red", 1);
} else {
_chance.addChance("red", 20);
};
_decision = _chance.makeDecision(["specs", "greenMine", "redMine", "redPill", "greenShield", "smile", "mushroom", "star"]);
break;
case 2:
_chance.addChance("special", 260);
if ((_alternate == 2)){
_chance.addChance("red", 1);
} else {
_chance.addChance("red", 19);
};
_chance.addChance("redPill", 90);
_decision = _chance.makeDecision(["specs", "greenMine", "redPill", "smile", "mushroom", "star"]);
break;
case 3:
_chance.addChance("special", 220);
if ((_alternate == 3)){
_chance.addChance("green", 1);
} else {
_chance.addChance("green", 20);
};
if ((_alternate == 2)){
_chance.addChance("red", 1);
} else {
_chance.addChance("red", 18);
};
_chance.addChance("redPill", 88);
_decision = _chance.makeDecision(["redPill", "smile", "mushroom", "star"]);
break;
case 4:
_chance.addChance("special", 180);
if ((_alternate == 2)){
_chance.addChance("red", 1);
} else {
_chance.addChance("red", 12);
};
_chance.addChance("redPill", 86);
_decision = _chance.makeDecision(["smile", "star"]);
break;
case 5:
_chance.addChance("special", 140);
if ((_alternate == 2)){
_chance.addChance("red", 1);
} else {
_chance.addChance("red", 16);
};
_chance.addChance("redPill", 84);
_decision = _chance.makeDecision();
break;
case 6:
_chance.addChance("special", 80);
if ((_alternate == 2)){
_chance.addChance("red", 1);
} else {
_chance.addChance("red", 18);
};
_chance.addChance("redPill", 80);
_decision = _chance.makeDecision();
break;
};
}
public function get active():Boolean{
if (_activate){
return ((_isAtDestination) ? false : true);
//unresolved jump
};
return (false);
}
public function set target(_arg1):void{
_target = _arg1;
}
public function pacmanShield(_arg1, _arg2):void{
var _local3:Point;
var _local4:Point;
if (!_hitShield){
playSound();
_hitShield = true;
_speed = 100;
_local3 = _arg2.globalToLocal(new Point(this.x, this.y));
_local4 = _arg2.globalToLocal(new Point(_arg1.x, _arg1.y));
_destinationPoint.x = ((_local4.x)>_local3.x) ? (_local3.x - 1000) : (_local3.x + 1000);
_destinationPoint.y = ((_local4.y)>_local3.y) ? (_local3.y + 1000) : (_local3.y - 1000);
_distance = PointDistance.betweenPoints(_destinationPoint, _homePoint);
_time = (_distance / _speed);
TweenLite.to(this, _time, {x:_destinationPoint.x, y:_destinationPoint.y, onComplete:atDestination});
TweenMax.to(this, _time, {scaleX:0.5, scaleY:0.5, rotation:Random.range(-180, 180), ease:Quint.easeOut, onComplete:atDestination});
};
}
public function fire():void{
_distance = PointDistance.betweenPoints(_destinationPoint, _homePoint);
_time = (_distance / _speed);
TweenLite.to({}, (_time * 0.2), {onComplete:atDestination});
TweenLite.to(this, _time, {x:_destinationPoint.x, y:_destinationPoint.y, onComplete:atDestination});
TweenMax.to(this, _time, {scaleX:0.5, scaleY:0.5, rotation:Random.range(-180, 180), bezierThrough:[{x:_midPoint.x, y:_midPoint.y}, {x:_destinationPoint.x, y:_destinationPoint.y}], orientToBezier:false, ease:Quint.easeOut, onComplete:atDestination});
}
private function checkPosition():void{
var _local1:Number;
if (!_isAtDestination){
_localPoint = this.localToGlobal(_currentPoint);
_local1 = PointDistance.betweenPoints(_currentPoint, _lastPoint);
};
}
public function kill():void{
if (!_isAtDestination){
_isAtDestination = true;
TweenLite.to(this, 0.5, {x:_homePoint.x, y:_homePoint.y, alpha:0, scaleX:0, scaleY:0, rotation:Random.range(-180, 180), onComplete:removeThis});
};
}
public function spunk():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_activate = false;
_local1 = Random.range(1, 2);
_local2 = Random.range(1, 2);
_local3 = ((_local1)==1) ? Random.range(0, 1000) : -(Random.range(0, 1000));
_local4 = ((_local2)==1) ? Random.range(0, 1000) : -(Random.range(0, 1000));
_destinationPoint.x = ((this.x)>_target.x) ? _local3 : -(_local3);
_destinationPoint.y = ((this.y)>_target.y) ? _local4 : -(_local4);
_distance = PointDistance.betweenPoints(_destinationPoint, _homePoint);
_speed = Random.range(40, 80);
_time = (_distance / _speed);
TweenLite.to({}, 0.5, {onComplete:activate});
TweenLite.to({}, (_time * 0.2), {onComplete:atDestination});
TweenLite.to(this, _time, {x:_destinationPoint.x, y:_destinationPoint.y, onComplete:atDestination});
TweenMax.to(this, _time, {scaleX:0.5, scaleY:0.5, rotation:Random.range(-180, 180), x:_destinationPoint.x, y:_destinationPoint.y, ease:Quint.easeOut, onComplete:atDestination});
}
override public function get x():Number{
return (super.x);
}
override public function get y():Number{
return (super.y);
}
private function removeThis():void{
this.parent.removeChild(this);
delete ??getglobalscope
[this];
}
private function staticScale():void{
this.scaleX = _scale;
this.scaleY = _scale;
}
public function set speed(_arg1:Number):void{
_speed = _arg1;
}
private function getOdds(_arg1:uint):uint{
var _local2:*;
_local2 = 99999999999;
switch (_arg1){
case 1:
_local2 = 9999999999;
break;
case 2:
_local2 = 4000;
break;
case 3:
_local2 = 1000;
break;
case 4:
_local2 = 800;
break;
case 5:
_local2 = 500;
break;
case 6:
_local2 = 200;
break;
case 7:
_local2 = 100;
break;
case 8:
_local2 = 60;
break;
case 9:
_local2 = 40;
break;
case 10:
_local2 = 20;
break;
case 11:
_local2 = 15;
break;
case 12:
_local2 = 10;
break;
case 13:
_local2 = 6;
break;
case 14:
_local2 = 4;
break;
case 15:
_local2 = 2;
break;
};
return (_local2);
}
private function particleDecision():void{
switch (_decision){
case "red":
this.gotoAndStop(1);
switch (_level){
case 1:
_scale = (_scale - (Random.range(0, 2) / 10));
break;
case 2:
_scale = (_scale + (Random.range(0, 5) / 10));
break;
case 3:
_scale = (_scale + Random.range(0, 1));
break;
case 4:
_scale = (_scale + Random.range(0, 3));
break;
case 5:
_scale = (_scale + Random.range(0, 8));
break;
case 7:
_scale = (_scale + getScale(_custom.odds[5].size));
break;
};
break;
case "green":
this.gotoAndStop(2);
switch (_level){
case 1:
_scale = (_scale + (Random.range(0, 25) / 10));
break;
case 2:
_scale = (_scale + (Random.range(0, 15) / 10));
break;
case 3:
_scale = (_scale + (Random.range(0, 5) / 10));
break;
case 4:
_scale = (_scale + 0);
break;
case 5:
_scale = (_scale - (Random.range(0, 5) / 10));
break;
case 7:
_scale = (_scale + getScale(_custom.odds[0].size));
break;
};
break;
case "blue":
this.gotoAndStop(3);
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[1].size));
break;
};
break;
case "lightBlue":
this.gotoAndStop(4);
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[2].size));
break;
};
break;
case "purple":
this.gotoAndStop(5);
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[3].size));
break;
};
break;
case "special":
this.gotoAndStop(6);
SoundUtils.playSFX(("SFX" + Random.range(7, 8).toString()));
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[6].size));
break;
};
break;
case "teal":
this.gotoAndStop(7);
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[4].size));
break;
};
break;
case "star":
this.gotoAndStop(8);
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[13].size));
break;
};
break;
case "mushroom":
this.gotoAndStop(9);
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[7].size));
break;
};
break;
case "smile":
this.gotoAndStop(10);
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[14].size));
break;
};
break;
case "greenShield":
this.gotoAndStop(12);
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[10].size));
break;
};
break;
case "redPill":
this.gotoAndStop(14);
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[11].size));
break;
};
break;
case "redMine":
this.gotoAndStop(15);
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[8].size));
break;
};
break;
case "specs":
this.gotoAndStop(16);
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[12].size));
break;
};
break;
case "greenMine":
this.gotoAndStop(17);
switch (_level){
case 7:
_scale = (_scale + getScale(_custom.odds[9].size));
break;
};
break;
};
staticScale();
}
private function getNearest(_arg1:Array, _arg2:Number):uint{
var _local3:uint;
var _local4:uint;
var _local5:Number;
var _local6:int;
_local3 = _arg1.length;
_local4 = 0;
_local5 = _arg1[0];
_local6 = 1;
while (_local6 < _local3) {
if ((_local5 - _arg2) > (_arg1[_local6] - _arg2)){
_local4 = _local6;
_local5 = _arg1[_local6];
};
_local6++;
};
return (_local4);
}
private function getScale(_arg1:uint):Number{
var _local2:Number;
switch (_arg1){
case 1:
_local2 = (0 - (Random.range(0, 7) / 10));
break;
case 2:
_local2 = (0 - (Random.range(0, 5) / 10));
break;
case 3:
_local2 = (0 - (Random.range(0, 3) / 10));
break;
case 4:
_local2 = (0 - (Random.range(0, 1) / 10));
break;
case 5:
_local2 = (Random.range(0, 1) / 10);
break;
case 6:
_local2 = (Random.range(0, 3) / 10);
break;
case 7:
_local2 = (Random.range(0, 7) / 10);
break;
case 8:
_local2 = (Random.range(0, 15) / 10);
break;
case 9:
_local2 = (Random.range(0, 20) / 10);
break;
case 10:
_local2 = (Random.range(0, 25) / 10);
break;
};
return (_local2);
}
public function get type():uint{
return (this.currentFrame);
}
private function playSound():void{
if (_sound){
_sound = false;
try {
SoundUtils.playSFX("SFX32");
} catch(e:Error) {
trace("SoundError");
};
TweenLite.to({}, 1, {onComplete:offSound});
};
}
function frame1(){
stop();
}
private function atDestination():void{
if (!_isAtDestination){
_isAtDestination = true;
TweenLite.to(this, 2, {x:_homePoint.x, y:_homePoint.y, alpha:0, scaleX:0, scaleY:0, rotation:Random.range(-180, 180), onComplete:removeThis});
};
}
private function offSound():void{
_sound = true;
}
override public function set y(_arg1:Number):void{
if (!_isAtDestination){
_lastPoint.y = super.y;
super.y = _arg1;
_currentPoint.y = _arg1;
checkPosition();
};
}
override public function set x(_arg1:Number):void{
if (!_isAtDestination){
_lastPoint.x = super.x;
super.x = _arg1;
_currentPoint.x = _arg1;
checkPosition();
};
}
}
}//package
Section 195
//PixelOverlay (PixelOverlay)
package {
import flash.display.*;
public dynamic class PixelOverlay extends MovieClip {
}
}//package
Section 196
//Player (Player)
package {
import flash.display.*;
public dynamic class Player extends MovieClip {
public var character:MovieClip;
}
}//package
Section 197
//PointsBoard (PointsBoard)
package {
import flash.display.*;
public class PointsBoard extends MovieClip {
public var points:MovieClip;
public var guide:MovieClip;
public var green:MovieClip;
public var musicPlayer:MusicPlayer;
public var target:MovieClip;
public var red:MovieClip;
public function kill():void{
this.parent.removeChild(this);
}
}
}//package
Section 198
//SFX10 (SFX10)
package {
import flash.media.*;
public dynamic class SFX10 extends Sound {
}
}//package
Section 199
//SFX13 (SFX13)
package {
import flash.media.*;
public dynamic class SFX13 extends Sound {
}
}//package
Section 200
//SFX14 (SFX14)
package {
import flash.media.*;
public dynamic class SFX14 extends Sound {
}
}//package
Section 201
//SFX15 (SFX15)
package {
import flash.media.*;
public dynamic class SFX15 extends Sound {
}
}//package
Section 202
//SFX16 (SFX16)
package {
import flash.media.*;
public dynamic class SFX16 extends Sound {
}
}//package
Section 203
//SFX17 (SFX17)
package {
import flash.media.*;
public dynamic class SFX17 extends Sound {
}
}//package
Section 204
//SFX18 (SFX18)
package {
import flash.media.*;
public dynamic class SFX18 extends Sound {
}
}//package
Section 205
//SFX19 (SFX19)
package {
import flash.media.*;
public dynamic class SFX19 extends Sound {
}
}//package
Section 206
//SFX21 (SFX21)
package {
import flash.media.*;
public dynamic class SFX21 extends Sound {
}
}//package
Section 207
//SFX22 (SFX22)
package {
import flash.media.*;
public dynamic class SFX22 extends Sound {
}
}//package
Section 208
//SFX23 (SFX23)
package {
import flash.media.*;
public dynamic class SFX23 extends Sound {
}
}//package
Section 209
//SFX24 (SFX24)
package {
import flash.media.*;
public dynamic class SFX24 extends Sound {
}
}//package
Section 210
//SFX25 (SFX25)
package {
import flash.media.*;
public dynamic class SFX25 extends Sound {
}
}//package
Section 211
//SFX26 (SFX26)
package {
import flash.media.*;
public dynamic class SFX26 extends Sound {
}
}//package
Section 212
//SFX27 (SFX27)
package {
import flash.media.*;
public dynamic class SFX27 extends Sound {
}
}//package
Section 213
//SFX28 (SFX28)
package {
import flash.media.*;
public dynamic class SFX28 extends Sound {
}
}//package
Section 214
//SFX29 (SFX29)
package {
import flash.media.*;
public dynamic class SFX29 extends Sound {
}
}//package
Section 215
//SFX3 (SFX3)
package {
import flash.media.*;
public dynamic class SFX3 extends Sound {
}
}//package
Section 216
//SFX30 (SFX30)
package {
import flash.media.*;
public dynamic class SFX30 extends Sound {
}
}//package
Section 217
//SFX31 (SFX31)
package {
import flash.media.*;
public dynamic class SFX31 extends Sound {
}
}//package
Section 218
//SFX32 (SFX32)
package {
import flash.media.*;
public dynamic class SFX32 extends Sound {
}
}//package
Section 219
//SFX34 (SFX34)
package {
import flash.media.*;
public dynamic class SFX34 extends Sound {
}
}//package
Section 220
//SFX35 (SFX35)
package {
import flash.media.*;
public dynamic class SFX35 extends Sound {
}
}//package
Section 221
//SFX36 (SFX36)
package {
import flash.media.*;
public dynamic class SFX36 extends Sound {
}
}//package
Section 222
//SFX37 (SFX37)
package {
import flash.media.*;
public dynamic class SFX37 extends Sound {
}
}//package
Section 223
//SFX4 (SFX4)
package {
import flash.media.*;
public dynamic class SFX4 extends Sound {
}
}//package
Section 224
//SFX5 (SFX5)
package {
import flash.media.*;
public dynamic class SFX5 extends Sound {
}
}//package
Section 225
//SFX6 (SFX6)
package {
import flash.media.*;
public dynamic class SFX6 extends Sound {
}
}//package
Section 226
//SFX7 (SFX7)
package {
import flash.media.*;
public dynamic class SFX7 extends Sound {
}
}//package
Section 227
//SFX8 (SFX8)
package {
import flash.media.*;
public dynamic class SFX8 extends Sound {
}
}//package
Section 228
//SFX9 (SFX9)
package {
import flash.media.*;
public dynamic class SFX9 extends Sound {
}
}//package
Section 229
//SpaceBackground (SpaceBackground)
package {
import flash.display.*;
public dynamic class SpaceBackground extends MovieClip {
public var video:MovieClip;
public function SpaceBackground(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 230
//SpectrumAnalyzer (SpectrumAnalyzer)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.media.*;
class SpectrumAnalyzer extends Sprite {
private var __height:uint;
private var scaleOnBeat:Number;// = 1.01
private var reactToBeat:Number;// = 8
private var ba:ByteArray;
private var lineColor:Number;// = 16724889
private var lineThickness:Number;// = 14
private var __width:uint;
private var circleSize:Number;// = 75
function SpectrumAnalyzer(_arg1:uint, _arg2:uint, _arg3:Number=14, _arg4:Number=75){
lineThickness = 14;
lineColor = 16724889;
circleSize = 75;
scaleOnBeat = 1.01;
reactToBeat = 8;
ba = new ByteArray();
super();
circleSize = _arg4;
lineThickness = _arg3;
__width = _arg1;
__height = _arg2;
x = (__width / 2);
y = (__height / 2);
addEventListener(Event.ENTER_FRAME, processSound);
}
private function processSound(_arg1:Event):void{
var _local2:Number;
var _local3:uint;
var _local4:Number;
var _local5:uint;
SoundMixer.computeSpectrum(ba, true, 0);
graphics.clear();
graphics.moveTo(0, -(circleSize));
graphics.lineStyle(lineThickness, lineColor);
_local2 = 0;
_local3 = 0;
while (_local3 < 0x0200) {
_local4 = ba.readFloat();
_local2 = (_local2 + _local4);
_local5 = _local3;
if (_local3 < 0x0100){
_local5 = (_local5 + 0x0100);
};
if (_local3 == 0x0100){
graphics.moveTo(0, -(circleSize));
};
graphics.lineTo(((-(Math.sin(((_local3 / 0x0100) * Math.PI))) * circleSize) * (_local4 + 1)), ((Math.cos(((_local5 / 0x0100) * Math.PI)) * circleSize) * (_local4 + 1)));
_local3++;
};
if (_local2 > reactToBeat){
scaleX = (scaleY = scaleOnBeat);
} else {
scaleX = (scaleY = 1);
};
}
}
}//package
Section 231
//SpectrumRing (SpectrumRing)
package {
import flash.display.*;
public class SpectrumRing extends MovieClip {
public var holder:MovieClip;
public function SpectrumRing(){
var _local1:SpectrumAnalyzer;
super();
_local1 = new SpectrumAnalyzer(25, 25, 10, 25);
_local1.x = -1;
_local1.y = -1;
_local1.rotation = -50;
holder.effects.holder.addChild(_local1);
}
}
}//package
Section 232
//Star (Star)
package {
import flash.display.*;
import com.stampy.random.*;
public class Star extends Sprite {
private var _z:uint;
public function Star(_arg1:Number, _arg2:Number, _arg3:Number){
var _local4:Shape;
super();
_z = Random.range(1, 100);
this.alpha = (_z / 100);
_local4 = new Shape();
_local4.graphics.beginFill(0xFFFFFF);
_local4.graphics.drawCircle(_arg1, _arg2, (_arg3 * this.alpha));
_local4.graphics.endFill();
addChild(_local4);
}
public function get z():uint{
return (_z);
}
}
}//package
Section 233
//StarField (StarField)
package {
import flash.display.*;
import gs.*;
import com.stampy.random.*;
import com.stampy.arrays.*;
public class StarField extends Sprite {
private var _starFieldDensity:Number;// = 300
private var _starFieldRate:Number;// = 0.01
public function StarField(){
_starFieldRate = 0.01;
_starFieldDensity = 300;
super();
this.alpha = 0.6;
generateField();
}
public function start():void{
TweenLite.to({}, _starFieldRate, {onComplete:start});
moveField();
}
public function finish():void{
}
private function generateField():void{
var _local1:int;
var _local2:Star;
_local1 = 0;
while (_local1 < _starFieldDensity) {
_local2 = new Star(0, 0, (Random.range(5, 20) / 10));
_local2.x = Random.range(-100, 800);
_local2.y = Random.range(-100, 600);
addChild(_local2);
_local1++;
};
}
private function moveField():void{
var _local1:Array;
var _local2:uint;
var _local3:int;
_local1 = DisplayListUtils.getDisplayList(this);
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
_local1[_local3].x = (_local1[_local3].x - (_local1[_local3].z / 50));
if (_local1[_local3].x > 800){
_local1[_local3].x = 0;
_local1[_local3].y = Random.range(-100, 500);
} else {
if (_local1[_local3].x < -100){
_local1[_local3].x = 800;
_local1[_local3].y = Random.range(-100, 500);
};
};
_local3++;
};
}
}
}//package
Section 234
//TetrisBlock (TetrisBlock)
package {
import flash.display.*;
public dynamic class TetrisBlock extends MovieClip {
public function TetrisBlock(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 235
//TetrisField (TetrisField)
package {
import flash.display.*;
import gs.*;
import com.stampy.random.*;
import com.stampy.arrays.*;
public class TetrisField extends Sprite {
private var _active:Boolean;// = true
private var _starFieldDensity:Number;// = 40
private var _starFieldRate:Number;// = 0.01
public function TetrisField(){
_starFieldRate = 0.01;
_starFieldDensity = 40;
_active = true;
super();
generateField();
}
public function start():void{
if (((!((this.parent == null))) && (_active))){
TweenLite.to(this, _starFieldRate, {onComplete:start});
moveField();
} else {
TweenLite.killTweensOf(this);
};
}
public function kill():void{
var _local1:uint;
var _local2:int;
_active = false;
_local1 = this.numChildren;
_local2 = 0;
while (_local2 < _local1) {
this.removeChildAt(0);
_local2++;
};
}
public function finish():void{
}
private function generateField():void{
var _local1:int;
var _local2:TetrisBlock;
_local1 = 0;
while (_local1 < _starFieldDensity) {
_local2 = new TetrisBlock();
_local2.x = Random.range(-100, 800);
_local2.y = Random.range(-100, 600);
_local2.gotoAndStop(Random.range(1, 27));
addChild(_local2);
_local1++;
};
}
private function moveField():void{
var _local1:Array;
var _local2:uint;
var _local3:int;
_local1 = DisplayListUtils.getDisplayList(this);
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
_local1[_local3].y = (_local1[_local3].y + 10);
if (_local1[_local3].y > 600){
_local1[_local3].x = Random.range(-100, 500);
_local1[_local3].y = -10;
} else {
if (_local1[_local3].y < -100){
_local1[_local3].x = Random.range(-100, 500);
_local1[_local3].y = -10;
};
};
_local3++;
};
}
}
}//package
Section 236
//Tip (Tip)
package {
import flash.display.*;
import gs.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public class Tip extends MovieClip {
private var _scale:Number;// = 1
public var skin:MovieClip;
private var _dict:Dictionary;
public function Tip(_arg1:Number=1){
_scale = 1;
super();
_scale = _arg1;
_dict = new Dictionary(true);
this.alpha = 0;
}
private function mouseMove(_arg1:MouseEvent):void{
mouseOver(_arg1);
TweenLite.to(this, 0.2, {x:_arg1.target.x, y:_arg1.target.y});
}
private function mouseOver(_arg1:MouseEvent):void{
var _local2:*;
_local2 = _arg1.target;
if (_local2 == _dict[_local2].target){
this.skin.mc.gotoAndStop(_dict[_local2].frame);
TweenLite.to(this, 0.2, {x:_arg1.target.x, y:_arg1.target.y});
TweenLite.to(_local2, 0.3, {scaleX:(_scale + 0.5), scaleY:(_scale + 0.5)});
_local2.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove, false, 0, true);
showTip();
};
}
private function mouseOut(_arg1:MouseEvent):void{
TweenLite.to(_arg1.target, 0.2, {scaleX:_scale, scaleY:_scale});
if (_arg1.target.hasEventListener(MouseEvent.MOUSE_MOVE)){
_arg1.target.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
};
hideTip();
}
private function showTip():void{
if (this.alpha == 0){
trace("SHOW TIP");
TweenLite.to(this, 0.2, {alpha:1});
};
}
public function addTarget(_arg1, _arg2:uint):void{
_dict[_arg1] = {target:_arg1, frame:_arg2};
_arg1.addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true);
_arg1.addEventListener(MouseEvent.MOUSE_OUT, mouseOut, false, 0, true);
}
private function hideTip():void{
if (this.alpha > 0){
trace("HIDE TIP");
TweenLite.to(this, 0.2, {alpha:0});
};
}
}
}//package
Section 237
//Track1 (Track1)
package {
import flash.media.*;
public dynamic class Track1 extends Sound {
}
}//package
Section 238
//Track2 (Track2)
package {
import flash.media.*;
public dynamic class Track2 extends Sound {
}
}//package
Section 239
//Track3 (Track3)
package {
import flash.media.*;
public dynamic class Track3 extends Sound {
}
}//package
Section 240
//Track4 (Track4)
package {
import flash.media.*;
public dynamic class Track4 extends Sound {
}
}//package
Section 241
//Track5 (Track5)
package {
import flash.media.*;
public dynamic class Track5 extends Sound {
}
}//package
Section 242
//Track6 (Track6)
package {
import flash.media.*;
public dynamic class Track6 extends Sound {
}
}//package