Frame 1
function Preloader(baseClip, loadedFrame) {
this.loadedFrame = loadedFrame;
this.baseClip = baseClip;
this.clip = this.baseClip.createEmptyMovieClip("preloaderClip", this.baseClip.getNextHighestDepth());
this.clip.preloader = this;
this.frame = 0;
this.fractionLoaded = 0;
this.loadedBytes = 0;
this.totalBytes = 0;
this.percentLoaded = 0;
this.clip.onEnterFrame = this.evtEnterFrame;
}
function setupRightClickMenu(showHyperlaunchLink) {
var _local2 = new ContextMenu();
_local2.hideBuiltInItems();
if (showHyperlaunchLink || (showHyperlaunchLink == undefined)) {
var _local4 = new ContextMenuItem("\u00A9 2008 Hyperlaunch New Media Ltd", function () {
return(undefined);
});
var _local3 = new ContextMenuItem("http://www.hyperlaunch.com", function () {
getURL ("http://www.hyperlaunch.com", "_blank");
});
_local3.separatorBefore = true;
_local2.customItems.push(_local4, _local3);
}
_root.menu = _local2;
}
function ScreenTrans(contentRoot, screenClip, startFrame, fastTrans) {
this.content = contentRoot;
this.screen = screenClip;
this.curFrame = startFrame;
this.screenFrame = 0;
this.transitioning = false;
this.fastTrans = (fastTrans ? true : false);
}
stop();
Preloader.prototype.evtEnterFrame = function () {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
this.preloader.frame++;
this.preloader.onUpdate();
if ((_local4 > 10) && (_local3 > 10)) {
this.preloader.totalBytes = _local3;
this.preloader.loadedBytes = _local4;
this.preloader.fractionLoaded = _local4 / _local3;
this.preloader.percentLoaded = Math.floor((_local4 * 100) / _local3);
if (_local4 == _local3) {
this.preloader.onLoaded();
this.onEnterFrame = undefined;
this.removeMovieClip();
}
} else {
this.preloader.percentLoaded = 0;
}
this.preloader.loadingString = ("Loading: " + this.preloader.percentLoaded) + "%";
};
Preloader.prototype.onLoaded = function () {
_root.gotoAndStop(this.loadedFrame);
};
Preloader.prototype.onUpdate = function () {
trace(this.fractionLoaded);
};
ScreenTrans.prototype.goto = function (frame, onTransComplete) {
if (this.curFrame == frame) {
return(undefined);
}
if (this.transitioning) {
return(undefined);
}
this.goingTo = frame;
this.transitioning = true;
this.onTransComplete = onTransComplete;
this.content.objTrans = this;
this.screen.objTrans = this;
this.screen.prevFrameNo = this.screen._currentframe;
this.screen.onEnterFrame = function () {
if ((this.prevFrameNo == this._currentframe) || (this.objTrans.fastTrans)) {
this.objTrans.next();
}
this.prevFrameNo = this._currentframe;
};
this.screen.gotoAndPlay("hide");
};
ScreenTrans.prototype.next = function () {
this.curFrame = this.goingTo;
this.goingTo = undefined;
this.screen.prevFrameNo = this.screen._currentframe;
this.screen.onEnterFrame = function () {
if ((this.prevFrameNo == this._currentframe) || (this.objTrans.fastTrans)) {
this.objTrans.transComplete();
}
this.prevFrameNo = this._currentframe;
};
this.content.gotoAndStop(this.curFrame);
this.screen.gotoAndPlay("reveal");
};
ScreenTrans.prototype.transComplete = function () {
this.screen.onEnterFrame = undefined;
this.transitioning = false;
if (this.fastTrans) {
this.screen.gotoAndStop("idle");
}
this.onTransComplete();
};
var objTrans = new ScreenTrans(_root, _root.screen, "preload", false);
var objPreloader = new Preloader(_root);
_root.bar._xscale = 0;
objPreloader.onUpdate = function () {
bar._xscale = this.percentLoaded;
};
objPreloader.onLoaded = function () {
objTrans.goto("instructions");
};
setupRightClickMenu();
_root.compURL = "http://www.littlechef.co.uk/bringback/game/";
_root.keyDir = "righty";
_level0.hyperlaunchSWF_ID = "LittleChef_Pacman";
if (_global.System) {
System.security.allowDomain("www.hyperlaunch.com");
}
loadMovieNum ("http://www.hyperlaunch.com/tracking/tracker.swf?r=" + (Math.floor(Math.random() * 10000) + 10000), 19467);
Frame 41
function Sounds(clip) {
if (clip == undefined) {
trace("Sounds: Clip not found in constructor");
}
this.clip = clip;
clip.objSounds = this;
this.sounds = [];
this.groups = [];
this.muted = false;
clip.onEnterFrame = function () {
this.objSounds.evtEnterFrame();
};
}
function Game(clip, panel, keyDir) {
this.panel = panel;
this.clip = clip;
clip.objGame = this;
panel.objGame = this;
this.objSounds = _root.objSounds;
this.keyDir = keyDir;
this.initialise();
}
function stopSounds() {
objSounds.stop("walkloop");
objSounds.stop("pillloop");
objSounds.stop("music_death");
objSounds.stop("music_end");
objSounds.stop("music_intro_long");
objSounds.stop("music_intro_short");
objSounds.stop("music_loop");
}
function HighscoreService(gameID, count) {
this.gameID = gameID;
this.scoresLoaded = false;
this.displayDetailsSaved = false;
this.baseDomain = "www.hyperlaunch.com";
this.baseURL = ("http://" + this.baseDomain) + "/highscoreservice/";
this.scoreCount = ((count == undefined) ? 10 : (count));
var _local2 = SharedObject.getLocal("highscoreService");
this.userKey = _local2.data.userKey;
this.objXML = new XML();
this.objXML.ignoreWhite = true;
this.objXML.load((((((((this.baseURL + "getScores.php?gameID=") + this.gameID) + "&count=") + this.scoreCount) + "&userKey=") + this.userKey) + "&r=") + (Math.floor(Math.random() * 100000) + 100000));
this.objXML.owner = this;
this.objXML.onLoad = function () {
this.owner.scoresLoaded = true;
var _local3 = this.getNodeValue("highscores/userKey");
if (_local3 != undefined) {
var _local2 = SharedObject.getLocal("highscoreService");
this.owner.userKey = (_local2.data.userKey = _local3);
_local2.flush();
}
if (this.owner.displayDetailsSaved) {
this.owner._displayScores();
}
System.security.allowDomain(this.owner.baseDomain);
loadMovieNum ((this.owner.baseURL + "highscoreService.swf?r=") + (Math.floor(Math.random() * 100000) + 100000), 19356);
};
}
_root.baseURL = "http://www.hyperlaunch.com/littlechef/";
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing);
var Maths = new Object();
Maths.randomNum = function (minNum, maxNum) {
return((Math.random() * (maxNum - minNum)) + minNum);
};
Maths.randomInt = function (minNum, maxNum) {
return(Math.round((Math.random() * (maxNum - minNum)) + minNum));
};
Maths.vectorLength = function (dx, dy) {
return(Math.sqrt((dx * dx) + (dy * dy)));
};
Maths.distance = function (x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Maths.vectorLength(_local2, _local1));
};
Maths.vectorLengthSquared = function (dx, dy) {
return((dx * dx) + (dy * dy));
};
Maths.distanceSquared = function (x1, y1, x2, y2) {
var _local2 = x1 - x2;
var _local1 = y1 - y2;
return(Maths.vectorLengthSquared(_local2, _local1));
};
Maths.angleBetween = function (x1, y1, x2, y2) {
var _local2 = (x1 * x2) + (y1 * y2);
var _local1 = Maths.vectorLength(x1, y1) * Maths.vectorLength(x2, y2);
return(Math.acos(_local2 / _local1));
};
Maths.dotProduct = function (ax, ay, bx, by) {
return((ax * bx) + (ay * by));
};
Maths.unitNormal = function (x, y) {
var _local2 = -y;
var _local1 = x;
var _local3 = Maths.vectorLength(_local2, _local1);
_local2 = _local2 / _local3;
_local1 = _local1 / _local3;
return({x:_local2, y:_local1});
};
Maths.scalarProjection = function (x1, y1, x2, y2) {
return(Maths.dotProduct(x1, y1, x2, y2) / Maths.vectorLength(x2, y2));
};
Maths.vectorProjection = function (x1, y1, x2, y2) {
var _local2 = Maths.dotProduct(x1, y1, x2, y2);
var _local1 = Maths.vectorLength(x2, y2);
var _local6 = (_local2 * x2) / (_local1 * _local1);
var _local5 = (_local2 * y2) / (_local1 * _local1);
return({x:_local6, y:_local5});
};
Maths.formatNum = function (num, leadingDigits, decimalDigits) {
var _local2 = "" + Math.floor(num);
while (_local2.length < leadingDigits) {
_local2 = "0" + _local2;
}
if (decimalDigits != undefined) {
var _local1 = Math.abs(num) - Math.floor(Math.abs(num));
_local1 = _local1 * (10 ^ decimalDigits);
_local1 = Math.floor(_local1);
_local1 = "" + _local1;
while (_local1.length < decimalDigits) {
_local1 = _local1 + "0";
}
_local2 = (_local2 + ".") + _local1;
}
return(_local2);
};
Maths.degToRad = function (degs) {
return(degs * (Math.PI/180));
};
Maths.radToDeg = function (rads) {
return(rads * 57.2957795130823);
};
MovieClip.prototype.curvedRectangle = function (p_nX1, p_nY1, p_nX2, p_nY2, p_nR) {
var _local2 = ((p_nR == undefined) ? 0 : (p_nR));
var _local7 = _local2 * 2;
var _local10 = Math.abs(p_nX2 - p_nX1) - _local7;
var _local8 = Math.abs(p_nY2 - p_nY1) - _local7;
this.moveTo(p_nX1 + _local2, p_nY1);
this.lineTo(p_nX2 - _local2, p_nY1);
this.curveTo(p_nX2, p_nY1, p_nX2, p_nY1 + _local2);
this.lineTo(p_nX2, p_nY2 - _local2);
this.curveTo(p_nX2, p_nY2, p_nX2 - _local2, p_nY2);
this.lineTo(p_nX1 + _local2, p_nY2);
this.curveTo(p_nX1, p_nY2, p_nX1, p_nY2 - _local2);
this.lineTo(p_nX1, p_nY1 + _local2);
this.curveTo(p_nX1, p_nY1, p_nX1 + _local2, p_nY1);
};
MovieClip.prototype.drawSquare = function (x, y, w, h) {
this.moveTo(x, y);
this.lineTo(x + w, y);
this.lineTo(x + w, y + h);
this.lineTo(x, y + h);
this.lineTo(x, y);
};
MovieClip.prototype.drawFilledSquare = function (x, y, w, h, colour, alpha) {
this.beginFill(colour, alpha);
this.drawSquare(x, y, w, h);
this.endFill();
};
MovieClip.prototype.drawCircle = function (x, y, r) {
var _local6 = r * 0.414213562373095;
var _local5 = (r * Math.SQRT2) / 2;
this.moveTo(x + r, y);
this.curveTo(x + r, y + _local6, x + _local5, y + _local5);
this.curveTo(x + _local6, y + r, x, y + r);
this.curveTo(x - _local6, y + r, x - _local5, y + _local5);
this.curveTo(x - r, y + _local6, x - r, y);
this.curveTo(x - r, y - _local6, x - _local5, y - _local5);
this.curveTo(x - _local6, y - r, x, y - r);
this.curveTo(x + _local6, y - r, x + _local5, y - _local5);
this.curveTo(x + r, y - _local6, x + r, y);
};
MovieClip.prototype.drawFilledCircle = function (x, y, r, colour, alpha) {
this.beginFill(colour, alpha);
this.drawCircle(x, y, r);
this.endFill();
};
MovieClip.prototype.drawCircleSegment = function (x, y, r, startAngle, endAngle, stepAngle) {
degToRad = (Math.PI/180);
while (endAngle < startAngle) {
endAngle = endAngle + 360;
}
this.moveTo(x, y);
this.lineTo(x + (r * Math.cos(startAngle * degToRad)), x + (r * Math.sin(startAngle * degToRad)));
var _local2 = startAngle + stepAngle;
while (_local2 < (endAngle - stepAngle)) {
var _local3 = _local2 * degToRad;
this.lineTo(x + (r * Math.cos(_local3)), x + (r * Math.sin(_local3)));
_local2 = _local2 + stepAngle;
}
this.lineTo(x + (r * Math.cos(endAngle * degToRad)), x + (r * Math.sin(endAngle * degToRad)));
this.lineTo(x, y);
};
MovieClip.prototype.drawFilledCircleSegment = function (x, y, r, startAngle, endAngle, stepAngle, colour, alpha) {
this.beginFill(colour, alpha);
this.drawCircleSegment(x, y, r, startAngle, endAngle, stepAngle);
this.endFill();
};
MovieClip.prototype.drawSmoothCurveThroughPoints = function (wibbleFactor, startAngle, points) {
this.moveTo(points[0].x, points[0].y);
var _local13 = points[0].x - Math.cos((Math.PI * startAngle) / 180);
var _local12 = points[0].y - Math.sin((Math.PI * startAngle) / 180);
var _local2 = 1;
while (_local2 < points.length) {
var _local5 = points[_local2 - 1].x - _local13;
var _local4 = points[_local2 - 1].y - _local12;
var _local8 = Maths.vectorLength(_local5, _local4);
var _local10 = points[_local2 - 1].x - points[_local2].x;
var _local9 = points[_local2 - 1].y - points[_local2].y;
var _local11 = Maths.vectorLength(_local10, _local9);
cScale = 0;
if (_local8 != 0) {
cScale = ((0.5 + wibbleFactor) * _local11) / _local8;
}
var _local7 = points[_local2 - 1].x + (_local5 * cScale);
var _local6 = points[_local2 - 1].y + (_local4 * cScale);
this.curveTo(_local7, _local6, points[_local2].x, points[_local2].y);
_local13 = _local7;
_local12 = _local6;
_local2++;
}
};
MovieClip.prototype.localToLocal = function (clip, x, y) {
var _local2 = {x:x, y:y};
clip.localToGlobal(_local2);
this.globalToLocal(_local2);
return(_local2);
};
MovieClip.prototype.holderToLocal = function (clip) {
var _local2 = {x:0, y:0};
this.localToGlobal(_local2);
clip.globalToLocal(_local2);
return(_local2);
};
MovieClip.prototype.holderToGlobal = function () {
var _local2 = {x:0, y:0};
this.localToGlobal(_local2);
return(_local2);
};
MovieClip.prototype.addHolder = function (x, y) {
var _local3 = this.getNextHighestDepth();
var _local2 = this.createEmptyMovieClip("holder_" + _local3, _local3);
_local2._x = x;
_local2._y = y;
return(_local2);
};
var Keys = new Object();
Keys.LeftMouse = 1;
Keys._mouseDown = false;
Keys.onMouseDown = function () {
this._mouseDown = true;
};
Keys.onMouseUp = function () {
this._mouseDown = false;
};
Mouse.addListener(Keys);
Keys.mouseDown = function () {
return(this._mouseDown);
};
Keys.CursorLeft = 37;
Keys.CursorRight = 39;
Keys.CursorUp = 38;
Keys.CursorDown = 40;
Keys.Backspace = 8;
Keys.Tab = 9;
Keys.Enter = 13;
Keys.Shift = 16;
Keys.Control = 17;
Keys.Alt = 18;
Keys.CapsLock = 20;
Keys.Spacebar = 32;
Keys.PageUp = 33;
Keys.PageDown = 34;
Keys.End = 35;
Keys.Home = 36;
Keys.PrintScr = 44;
Keys.ScrollLock = 145;
Keys.Pause = 19;
Keys.Insert = 45;
Keys.Delete = 46;
Keys.NumLock = 144;
Keys.Semicolon = 186;
Keys.Equals = 187;
Keys.Minus = 189;
Keys.Slash = 191;
Keys.Apostrophe = 192;
Keys.BackTick = 223;
Keys.BackSlash = 220;
Keys.Hash = 222;
Keys.Comma = 188;
Keys.Period = 190;
Keys.SquareOpen = 219;
Keys.SquareClose = 221;
Keys.F1 = 112;
Keys.F2 = 113;
Keys.F3 = 114;
Keys.F4 = 115;
Keys.F5 = 116;
Keys.F6 = 117;
Keys.F7 = 118;
Keys.F8 = 119;
Keys.F9 = 120;
Keys.F10 = undefined;
Keys.F11 = 122;
Keys.F12 = 123;
Keys.Num0 = 96;
Keys.Num1 = 97;
Keys.Num2 = 98;
Keys.Num3 = 99;
Keys.Num4 = 100;
Keys.Num5 = 101;
Keys.Num6 = 102;
Keys.Num7 = 103;
Keys.Num8 = 104;
Keys.Num9 = 105;
Keys.NumMultiply = 106;
Keys.NumAdd = 107;
Keys.NumEnter = 13;
Keys.NumMinus = 109;
Keys.NumPeriod = 110;
Keys.NumDivide = 111;
Keys.A = 65;
Keys.B = 66;
Keys.C = 67;
Keys.D = 68;
Keys.E = 69;
Keys.F = 70;
Keys.G = 71;
Keys.H = 72;
Keys.I = 73;
Keys.J = 74;
Keys.K = 75;
Keys.L = 76;
Keys.M = 77;
Keys.N = 78;
Keys.O = 79;
Keys.P = 80;
Keys.Q = 81;
Keys.R = 82;
Keys.S = 83;
Keys.T = 84;
Keys.U = 85;
Keys.V = 86;
Keys.W = 87;
Keys.X = 88;
Keys.Y = 89;
Keys.Z = 90;
Keys.Key0 = 48;
Keys.Key1 = 49;
Keys.Key2 = 50;
Keys.Key3 = 51;
Keys.Key4 = 52;
Keys.Key5 = 53;
Keys.Key6 = 54;
Keys.Key7 = 55;
Keys.Key8 = 56;
Keys.Key9 = 57;
Sounds.prototype.registerSound = function (linkage, defaultVolume) {
if (defaultVolume == undefined) {
defaultVolume = 100;
}
var _local4 = this.clip.getNextHighestDepth();
var _local2 = this.clip.createEmptyMovieClip((linkage + "_") + _local4, _local4);
_local2.sound = new Sound(_local2);
_local2.sound.defaultVolume = defaultVolume;
_local2.sound.clip = _local2;
_local2.sound.attachSound(linkage);
_local2.sound.setVolume(defaultVolume);
this.sounds[linkage] = _local2.sound;
this.sounds[linkage].looping = false;
this.sounds[linkage].playing = false;
this.sounds[linkage].onSoundComplete = function () {
if (this.looping) {
this.start();
} else {
this.playing = false;
}
};
return(_local2.sound);
};
Sounds.prototype.registerGroup = function (groupID, arrGroupIDs) {
var _local2 = 0;
while (_local2 < arrGroupIDs.length) {
if (this.sounds[arrGroupIDs[_local2]] == undefined) {
trace(((("Sounds: Group '" + groupID) + "' contains non-registered sound ID '") + arrGroupIDs[_local2]) + "'");
}
_local2++;
}
this.groups[groupID] = arrGroupIDs;
};
Sounds.prototype.play = function (id, volume, loop, soundPosition) {
if (this.muted) {
return(undefined);
}
if (loop != undefined) {
this.sounds[id].looping = loop;
}
if (soundPosition == undefined) {
soundPosition = 0;
}
if (this.groups[id] != undefined) {
id = this.groups[id][Maths.randomInt(0, this.groups[id].length - 1)];
}
if (this.sounds[id] == undefined) {
trace(("Sounds: Trying to play unregistered sound '" + id) + "'");
}
if (volume != undefined) {
this.sounds[id].setVolume(volume);
}
this.sounds[id].start(soundPosition);
this.sounds[id].playing = true;
};
Sounds.prototype.stop = function (id) {
if (this.sounds[id] == undefined) {
trace(("Sounds: Trying to stop unregistered sound '" + id) + "'");
}
this.sounds[id].looping = false;
this.sounds[id].stop();
this.sounds[id].playing = false;
};
Sounds.prototype.volume = function (id, volume) {
if (this.sounds[id] == undefined) {
trace(("Sounds: Trying to set volume of unregistered sound '" + id) + "'");
}
this.sounds[id].setVolume(volume);
};
Sounds.prototype.fadeTo = function (id, volume, dVol) {
if (this.sounds[id] == undefined) {
trace(("Sounds: Trying to fade volume of unregistered sound '" + id) + "'");
}
if (dVol == undefined) {
dVol = 1;
}
this.sounds[id].dVol = Math.ceil(Math.abs(dVol));
this.sounds[id].targetVol = volume;
};
Sounds.prototype.stopAllSounds = function () {
for (id in this.sounds) {
this.stop(id);
}
};
Sounds.prototype.fadeOutAllSounds = function (dVol) {
for (id in this.sounds) {
this.fadeTo(id, 0, dVol);
}
};
Sounds.prototype.setMute = function (muted) {
this.muted = muted;
if (this.muted) {
this.stopAllSounds();
}
};
Sounds.prototype.evtEnterFrame = function () {
for (id in this.sounds) {
if (this.sounds[id].targetVol != undefined) {
var _local2 = this.sounds[id].getVolume();
var _local3 = _local2 - this.sounds[id].targetVol;
if (Math.abs(_local3) < this.sounds[id].dVol) {
this.sounds[id].setVolume(this.sounds[id].targetVol);
this.sounds[id].targetVol = undefined;
} else {
this.sounds[id].setVolume(((_local3 > 0) ? (_local2 - this.sounds[id].dVol) : (_local2 + this.sounds[id].dVol)));
}
}
}
};
var lev1graph = [{id:0, links:[1, 6]}, {id:1, links:[0, 9]}, {id:2, links:[3, 10]}, {id:3, links:[2, 12]}, {id:4, links:[5, 14]}, {id:5, links:[6, 4, 15]}, {id:6, links:[7, 5, 0]}, {id:7, links:[8, 6, 17]}, {id:8, links:[9, 7, 18]}, {id:9, links:[10, 8, 1]}, {id:10, links:[9, 11, 2, 20]}, {id:11, links:[10, 12, 21]}, {id:12, links:[11, 3]}, {id:13, links:[14, 22]}, {id:14, links:[13, 4, 23]}, {id:15, links:[16, 5]}, {id:16, links:[15, 17, 24]}, {id:17, links:[16, 7]}, {id:18, links:[19, 8]}, {id:19, links:[18, 20, 25]}, {id:20, links:[19, 10]}, {id:21, links:[22, 11, 26]}, {id:22, links:[21, 13]}, {id:23, links:[24, 14, 32]}, {id:24, links:[23, 25, 16, 28]}, {id:25, links:[24, 26, 19, 29]}, {id:26, links:[25, 21, 39]}, {id:27, links:[28, 33]}, {id:28, links:[27, 24, 34]}, {id:29, links:[30, 25, 37]}, {id:30, links:[29, 38]}, {id:31, links:[32, 40]}, {id:32, links:[31, 33, 23, 41]}, {id:33, links:[32, 27]}, {id:34, links:[35, 28]}, {id:35, links:[36, 34, 43]}, {id:36, links:[37, 35, 44]}, {id:37, links:[36, 29]}, {id:38, links:[39, 30]}, {id:39, links:[38, 40, 26, 46]}, {id:40, links:[39, 31]}, {id:41, links:[32, 48, 42]}, {id:42, links:[50, 41, 43]}, {id:43, links:[35, 42]}, {id:44, links:[36, 45]}, {id:45, links:[53, 44, 46]}, {id:46, links:[39, 55, 45]}, {id:47, links:[61, 48]}, {id:48, links:[41, 47, 49]}, {id:49, links:[62, 48, 50]}, {id:50, links:[42, 49, 51]}, {id:51, links:[58, 50, 52]}, {id:52, links:[59, 51, 53]}, {id:53, links:[45, 52, 54]}, {id:54, links:[65, 53, 55]}, {id:55, links:[46, 54, 56]}, {id:56, links:[66, 55]}, {id:57, links:[63, 58]}, {id:58, links:[51, 57]}, {id:59, links:[52, 60]}, {id:60, links:[64, 59]}, {id:61, links:[47, 62]}, {id:62, links:[49, 61, 63]}, {id:63, links:[57, 62, 64]}, {id:64, links:[60, 63, 65]}, {id:65, links:[54, 64, 66]}, {id:66, links:[56, 65]}];
var lev2graph = [{id:0, links:[1, 4]}, {id:1, links:[0, 2, 5]}, {id:2, links:[1, 6]}, {id:3, links:[4, 9]}, {id:4, links:[5, 3, 11, 0]}, {id:5, links:[6, 4, 1]}, {id:6, links:[7, 5, 14, 2]}, {id:7, links:[6, 16]}, {id:8, links:[9, 17]}, {id:9, links:[8, 18, 3]}, {id:10, links:[11, 19]}, {id:11, links:[10, 12, 4]}, {id:12, links:[11, 21]}, {id:13, links:[14, 23]}, {id:14, links:[13, 15, 6]}, {id:15, links:[14, 25]}, {id:16, links:[17, 7, 26]}, {id:17, links:[16, 8]}, {id:18, links:[19, 35, 9]}, {id:19, links:[18, 27, 10]}, {id:20, links:[21, 28]}, {id:21, links:[22, 20, 12]}, {id:22, links:[23, 21, 32]}, {id:23, links:[24, 22, 13]}, {id:24, links:[23, 29]}, {id:25, links:[26, 30, 15]}, {id:26, links:[25, 16, 40]}, {id:27, links:[28, 19]}, {id:28, links:[27, 31, 20]}, {id:29, links:[30, 33, 24]}, {id:30, links:[29, 25]}, {id:31, links:[32, 37, 28]}, {id:32, links:[31, 33, 46, 22]}, {id:33, links:[32, 38, 29]}, {id:34, links:[35, 41]}, {id:35, links:[34, 42, 18]}, {id:36, links:[37, 43]}, {id:37, links:[36, 31, 44]}, {id:38, links:[39, 48, 33]}, {id:39, links:[38, 49]}, {id:40, links:[41, 50, 26]}, {id:41, links:[40, 34]}, {id:42, links:[43, 35, 57]}, {id:43, links:[42, 36, 51]}, {id:44, links:[45, 37]}, {id:45, links:[46, 44, 53]}, {id:46, links:[47, 45, 32]}, {id:47, links:[48, 46, 54]}, {id:48, links:[47, 38]}, {id:49, links:[50, 56, 39]}, {id:50, links:[49, 60, 40]}, {id:51, links:[52, 43]}, {id:52, links:[51, 53, 58]}, {id:53, links:[52, 45]}, {id:54, links:[55, 47]}, {id:55, links:[54, 56, 59]}, {id:56, links:[55, 49]}, {id:57, links:[58, 61, 42]}, {id:58, links:[59, 57, 52]}, {id:59, links:[60, 58, 55]}, {id:60, links:[59, 63, 50]}, {id:61, links:[62, 57]}, {id:62, links:[61, 63]}, {id:63, links:[62, 60]}];
var lev3graph = [{id:0, links:[1, 6]}, {id:1, links:[2, 0, 7]}, {id:2, links:[3, 1, 9]}, {id:3, links:[4, 2, 10]}, {id:4, links:[3, 12]}, {id:5, links:[6, 14]}, {id:6, links:[5, 0, 15]}, {id:7, links:[8, 1]}, {id:8, links:[7, 9, 16]}, {id:9, links:[8, 2]}, {id:10, links:[11, 3]}, {id:11, links:[10, 12, 17]}, {id:12, links:[11, 4]}, {id:13, links:[14, 18]}, {id:14, links:[13, 5]}, {id:15, links:[16, 6, 24]}, {id:16, links:[17, 15, 8, 20]}, {id:17, links:[18, 16, 11, 21]}, {id:18, links:[17, 13, 31]}, {id:19, links:[20, 25]}, {id:20, links:[19, 26, 16]}, {id:21, links:[22, 29, 17]}, {id:22, links:[21, 30]}, {id:23, links:[24, 32]}, {id:24, links:[25, 23, 33, 15]}, {id:25, links:[24, 19]}, {id:26, links:[27, 20]}, {id:27, links:[28, 26, 35]}, {id:28, links:[29, 27, 36]}, {id:29, links:[28, 21]}, {id:30, links:[31, 22]}, {id:31, links:[30, 32, 18, 38]}, {id:32, links:[31, 23]}, {id:33, links:[34, 24, 39]}, {id:34, links:[33, 35, 40]}, {id:35, links:[34, 27]}, {id:36, links:[37, 28]}, {id:37, links:[36, 38, 43]}, {id:38, links:[37, 44, 31]}, {id:39, links:[40, 33]}, {id:40, links:[41, 39, 34]}, {id:41, links:[42, 40, 46]}, {id:42, links:[43, 41, 47]}, {id:43, links:[44, 42, 37]}, {id:44, links:[43, 38]}, {id:45, links:[46, 49]}, {id:46, links:[45, 41]}, {id:47, links:[48, 42]}, {id:48, links:[47, 50]}, {id:49, links:[50, 45]}, {id:50, links:[49, 48]}];
var lev4graph = [{id:0, links:[1, 4]}, {id:1, links:[0, 2, 5]}, {id:2, links:[1, 6]}, {id:3, links:[4, 9]}, {id:4, links:[5, 3, 11, 0]}, {id:5, links:[6, 4, 1]}, {id:6, links:[7, 5, 14, 2]}, {id:7, links:[6, 16]}, {id:8, links:[9, 17]}, {id:9, links:[8, 18, 3]}, {id:10, links:[11, 19]}, {id:11, links:[10, 12, 4]}, {id:12, links:[11, 21]}, {id:13, links:[14, 23]}, {id:14, links:[13, 15, 6]}, {id:15, links:[14, 25]}, {id:16, links:[17, 7, 26]}, {id:17, links:[16, 8]}, {id:18, links:[19, 35, 9]}, {id:19, links:[18, 27, 10]}, {id:20, links:[21, 28]}, {id:21, links:[22, 20, 12]}, {id:22, links:[23, 21, 32]}, {id:23, links:[24, 22, 13]}, {id:24, links:[23, 29]}, {id:25, links:[26, 30, 15]}, {id:26, links:[25, 16, 40]}, {id:27, links:[28, 19]}, {id:28, links:[27, 31, 20]}, {id:29, links:[30, 33, 24]}, {id:30, links:[29, 25]}, {id:31, links:[32, 37, 28]}, {id:32, links:[31, 33, 46, 22]}, {id:33, links:[32, 38, 29]}, {id:34, links:[35, 41]}, {id:35, links:[34, 42, 18]}, {id:36, links:[37, 43]}, {id:37, links:[36, 31, 44]}, {id:38, links:[39, 48, 33]}, {id:39, links:[38, 49]}, {id:40, links:[41, 50, 26]}, {id:41, links:[40, 34]}, {id:42, links:[43, 35, 57]}, {id:43, links:[42, 36, 51]}, {id:44, links:[45, 37]}, {id:45, links:[46, 44, 53]}, {id:46, links:[47, 45, 32]}, {id:47, links:[48, 46, 54]}, {id:48, links:[47, 38]}, {id:49, links:[50, 56, 39]}, {id:50, links:[49, 60, 40]}, {id:51, links:[52, 43]}, {id:52, links:[51, 53, 58]}, {id:53, links:[52, 45]}, {id:54, links:[55, 47]}, {id:55, links:[54, 56, 59]}, {id:56, links:[55, 49]}, {id:57, links:[58, 61, 42]}, {id:58, links:[59, 57, 52]}, {id:59, links:[60, 58, 55]}, {id:60, links:[59, 63, 50]}, {id:61, links:[62, 57]}, {id:62, links:[61, 63]}, {id:63, links:[62, 60]}];
var lev5graph = [{id:0, links:[1, 5]}, {id:1, links:[0, 6]}, {id:2, links:[3, 16]}, {id:3, links:[2, 10]}, {id:4, links:[5, 67]}, {id:5, links:[4, 0]}, {id:6, links:[7, 1]}, {id:7, links:[6, 12]}, {id:8, links:[9, 14]}, {id:9, links:[8, 20]}, {id:10, links:[11, 3]}, {id:11, links:[67, 10, 23]}, {id:12, links:[13, 7, 19]}, {id:13, links:[12, 14, 27]}, {id:14, links:[13, 8]}, {id:15, links:[16, 21]}, {id:16, links:[15, 2, 22]}, {id:17, links:[18, 67]}, {id:18, links:[17, 19, 25]}, {id:19, links:[18, 12]}, {id:20, links:[21, 28, 9]}, {id:21, links:[20, 15]}, {id:22, links:[23, 16, 29]}, {id:23, links:[22, 11, 30]}, {id:24, links:[25, 31]}, {id:25, links:[24, 26, 18]}, {id:26, links:[25, 32]}, {id:27, links:[28, 13, 33]}, {id:28, links:[27, 20, 34]}, {id:29, links:[30, 22, 36]}, {id:30, links:[29, 31, 40, 23]}, {id:31, links:[30, 41, 24]}, {id:32, links:[33, 26, 43]}, {id:33, links:[32, 34, 44, 27]}, {id:34, links:[33, 28, 37]}, {id:35, links:[36, 38]}, {id:36, links:[35, 39, 29]}, {id:37, links:[38, 34, 45]}, {id:38, links:[37, 35]}, {id:39, links:[40, 55, 36]}, {id:40, links:[39, 50, 30]}, {id:41, links:[42, 31]}, {id:42, links:[41, 43, 47]}, {id:43, links:[42, 32]}, {id:44, links:[45, 53, 33]}, {id:45, links:[44, 62, 37]}, {id:46, links:[47, 51]}, {id:47, links:[46, 48, 42]}, {id:48, links:[47, 52]}, {id:49, links:[50, 56]}, {id:50, links:[49, 51, 40]}, {id:51, links:[50, 57, 46]}, {id:52, links:[53, 60, 48]}, {id:53, links:[52, 54, 44]}, {id:54, links:[53, 61]}, {id:55, links:[56, 63, 39]}, {id:56, links:[55, 49]}, {id:57, links:[58, 51]}, {id:58, links:[57, 64]}, {id:59, links:[60, 65]}, {id:60, links:[59, 52]}, {id:61, links:[62, 54]}, {id:62, links:[61, 66, 45]}, {id:63, links:[64, 55]}, {id:64, links:[65, 63, 58]}, {id:65, links:[66, 64, 59]}, {id:66, links:[65, 62]}, {id:67, links:[11, 4, 17]}];
var lev6graph = [{id:0, links:[1, 8]}, {id:1, links:[2, 0, 10]}, {id:2, links:[3, 1, 5]}, {id:3, links:[2, 6]}, {id:4, links:[5, 11]}, {id:5, links:[4, 2]}, {id:6, links:[7, 3]}, {id:7, links:[6, 14]}, {id:8, links:[9, 0]}, {id:9, links:[10, 8, 18]}, {id:10, links:[11, 9, 19, 1]}, {id:11, links:[12, 10, 4]}, {id:12, links:[13, 11, 21]}, {id:13, links:[14, 12, 22]}, {id:14, links:[15, 13, 7]}, {id:15, links:[16, 14, 23]}, {id:16, links:[15, 24]}, {id:17, links:[18, 25]}, {id:18, links:[17, 26, 9]}, {id:19, links:[20, 10]}, {id:20, links:[19, 21, 27]}, {id:21, links:[20, 12]}, {id:22, links:[23, 13]}, {id:23, links:[22, 29, 15]}, {id:24, links:[25, 30, 16]}, {id:25, links:[24, 17]}, {id:26, links:[27, 37, 18]}, {id:27, links:[26, 28, 20, 32]}, {id:28, links:[27, 33]}, {id:29, links:[30, 23]}, {id:30, links:[29, 24, 35]}, {id:31, links:[32, 38]}, {id:32, links:[31, 39, 27]}, {id:33, links:[34, 28]}, {id:34, links:[33, 35, 41]}, {id:35, links:[34, 42, 30]}, {id:36, links:[37, 43]}, {id:37, links:[36, 38, 44, 26]}, {id:38, links:[37, 31]}, {id:39, links:[40, 32]}, {id:40, links:[39, 41, 46]}, {id:41, links:[40, 34]}, {id:42, links:[43, 48, 35]}, {id:43, links:[42, 36]}, {id:44, links:[45, 50, 37]}, {id:45, links:[44, 52]}, {id:46, links:[47, 40]}, {id:47, links:[46, 48, 55]}, {id:48, links:[47, 42, 57]}, {id:49, links:[50, 63]}, {id:50, links:[51, 49, 44]}, {id:51, links:[52, 50, 64]}, {id:52, links:[53, 51, 45]}, {id:53, links:[54, 52, 60]}, {id:54, links:[55, 53, 61]}, {id:55, links:[56, 54, 47]}, {id:56, links:[57, 55, 67]}, {id:57, links:[58, 56, 48]}, {id:58, links:[57, 68]}, {id:59, links:[60, 65]}, {id:60, links:[59, 53]}, {id:61, links:[62, 54]}, {id:62, links:[61, 66]}, {id:63, links:[64, 49]}, {id:64, links:[65, 63, 51]}, {id:65, links:[66, 64, 59]}, {id:66, links:[67, 65, 62]}, {id:67, links:[68, 66, 56]}, {id:68, links:[67, 58]}];
var lev7graph = [{id:0, links:[1, 6]}, {id:1, links:[0, 9]}, {id:2, links:[3, 10]}, {id:3, links:[2, 12]}, {id:4, links:[5, 14]}, {id:5, links:[6, 4, 15]}, {id:6, links:[7, 5, 0]}, {id:7, links:[8, 6, 17]}, {id:8, links:[9, 7, 18]}, {id:9, links:[10, 8, 1]}, {id:10, links:[9, 11, 2, 20]}, {id:11, links:[10, 12, 21]}, {id:12, links:[11, 3]}, {id:13, links:[14, 22]}, {id:14, links:[13, 4, 23]}, {id:15, links:[16, 5]}, {id:16, links:[15, 17, 24]}, {id:17, links:[16, 7]}, {id:18, links:[19, 8]}, {id:19, links:[18, 20, 25]}, {id:20, links:[19, 10]}, {id:21, links:[22, 11, 26]}, {id:22, links:[21, 13]}, {id:23, links:[24, 14, 32]}, {id:24, links:[23, 25, 16, 28]}, {id:25, links:[24, 26, 19, 29]}, {id:26, links:[25, 21, 39]}, {id:27, links:[28, 33]}, {id:28, links:[27, 24, 34]}, {id:29, links:[30, 25, 37]}, {id:30, links:[29, 38]}, {id:31, links:[32, 40]}, {id:32, links:[31, 33, 23, 41]}, {id:33, links:[32, 27]}, {id:34, links:[35, 28]}, {id:35, links:[36, 34, 43]}, {id:36, links:[37, 35, 44]}, {id:37, links:[36, 29]}, {id:38, links:[39, 30]}, {id:39, links:[38, 40, 26, 46]}, {id:40, links:[39, 31]}, {id:41, links:[32, 48, 42]}, {id:42, links:[50, 41, 43]}, {id:43, links:[35, 42]}, {id:44, links:[36, 45]}, {id:45, links:[53, 44, 46]}, {id:46, links:[39, 55, 45]}, {id:47, links:[61, 48]}, {id:48, links:[41, 47, 49]}, {id:49, links:[62, 48, 50]}, {id:50, links:[42, 49, 51]}, {id:51, links:[58, 50, 52]}, {id:52, links:[59, 51, 53]}, {id:53, links:[45, 52, 54]}, {id:54, links:[65, 53, 55]}, {id:55, links:[46, 54, 56]}, {id:56, links:[66, 55]}, {id:57, links:[63, 58]}, {id:58, links:[51, 57]}, {id:59, links:[52, 60]}, {id:60, links:[64, 59]}, {id:61, links:[47, 62]}, {id:62, links:[49, 61, 63]}, {id:63, links:[57, 62, 64]}, {id:64, links:[60, 63, 65]}, {id:65, links:[54, 64, 66]}, {id:66, links:[56, 65]}];
var lev8graph = [{id:0, links:[1, 4]}, {id:1, links:[0, 2, 5]}, {id:2, links:[1, 6]}, {id:3, links:[4, 9]}, {id:4, links:[5, 3, 11, 0]}, {id:5, links:[6, 4, 1]}, {id:6, links:[7, 5, 14, 2]}, {id:7, links:[6, 16]}, {id:8, links:[9, 17]}, {id:9, links:[8, 18, 3]}, {id:10, links:[11, 19]}, {id:11, links:[10, 12, 4]}, {id:12, links:[11, 21]}, {id:13, links:[14, 23]}, {id:14, links:[13, 15, 6]}, {id:15, links:[14, 25]}, {id:16, links:[17, 7, 26]}, {id:17, links:[16, 8]}, {id:18, links:[19, 35, 9]}, {id:19, links:[18, 27, 10]}, {id:20, links:[21, 28]}, {id:21, links:[22, 20, 12]}, {id:22, links:[23, 21, 32]}, {id:23, links:[24, 22, 13]}, {id:24, links:[23, 29]}, {id:25, links:[26, 30, 15]}, {id:26, links:[25, 16, 40]}, {id:27, links:[28, 19]}, {id:28, links:[27, 31, 20]}, {id:29, links:[30, 33, 24]}, {id:30, links:[29, 25]}, {id:31, links:[32, 37, 28]}, {id:32, links:[31, 33, 46, 22]}, {id:33, links:[32, 38, 29]}, {id:34, links:[35, 41]}, {id:35, links:[34, 42, 18]}, {id:36, links:[37, 43]}, {id:37, links:[36, 31, 44]}, {id:38, links:[39, 48, 33]}, {id:39, links:[38, 49]}, {id:40, links:[41, 50, 26]}, {id:41, links:[40, 34]}, {id:42, links:[43, 35, 57]}, {id:43, links:[42, 36, 51]}, {id:44, links:[45, 37]}, {id:45, links:[46, 44, 53]}, {id:46, links:[47, 45, 32]}, {id:47, links:[48, 46, 54]}, {id:48, links:[47, 38]}, {id:49, links:[50, 56, 39]}, {id:50, links:[49, 60, 40]}, {id:51, links:[52, 43]}, {id:52, links:[51, 53, 58]}, {id:53, links:[52, 45]}, {id:54, links:[55, 47]}, {id:55, links:[54, 56, 59]}, {id:56, links:[55, 49]}, {id:57, links:[58, 61, 42]}, {id:58, links:[59, 57, 52]}, {id:59, links:[60, 58, 55]}, {id:60, links:[59, 63, 50]}, {id:61, links:[62, 57]}, {id:62, links:[61, 63]}, {id:63, links:[62, 60]}];
var lev9graph = [{id:0, links:[1, 11]}, {id:1, links:[2, 0, 5]}, {id:2, links:[3, 1, 8]}, {id:3, links:[2, 16]}, {id:4, links:[5, 12]}, {id:5, links:[4, 6, 1]}, {id:6, links:[5, 13]}, {id:7, links:[8, 14]}, {id:8, links:[7, 9, 2]}, {id:9, links:[8, 15]}, {id:10, links:[11, 17]}, {id:11, links:[10, 27, 0]}, {id:12, links:[13, 18, 4]}, {id:13, links:[12, 19, 6]}, {id:14, links:[15, 20, 7]}, {id:15, links:[14, 21, 9]}, {id:16, links:[17, 28, 3]}, {id:17, links:[16, 10]}, {id:18, links:[19, 22, 12]}, {id:19, links:[18, 23, 13]}, {id:20, links:[21, 24, 14]}, {id:21, links:[20, 25, 15]}, {id:22, links:[23, 30, 18]}, {id:23, links:[24, 22, 31, 19]}, {id:24, links:[25, 23, 32, 20]}, {id:25, links:[24, 33, 21]}, {id:26, links:[27, 29]}, {id:27, links:[26, 40, 11]}, {id:28, links:[29, 43, 16]}, {id:29, links:[28, 26]}, {id:30, links:[31, 34, 22]}, {id:31, links:[30, 36, 23]}, {id:32, links:[33, 37, 24]}, {id:33, links:[32, 39, 25]}, {id:34, links:[35, 30]}, {id:35, links:[34, 36, 41]}, {id:36, links:[35, 31]}, {id:37, links:[38, 32]}, {id:38, links:[37, 39, 42]}, {id:39, links:[38, 33]}, {id:40, links:[41, 27]}, {id:41, links:[42, 40, 35]}, {id:42, links:[43, 41, 38]}, {id:43, links:[42, 28]}];
var lev10graph = [{id:0, links:[1, 11]}, {id:1, links:[2, 0, 6]}, {id:2, links:[3, 1, 7]}, {id:3, links:[4, 2, 8]}, {id:4, links:[5, 3, 9]}, {id:5, links:[4, 16]}, {id:6, links:[7, 12, 1]}, {id:7, links:[6, 2]}, {id:8, links:[9, 3]}, {id:9, links:[8, 15, 4]}, {id:10, links:[11, 17]}, {id:11, links:[10, 20, 0]}, {id:12, links:[13, 21, 6]}, {id:13, links:[12, 18]}, {id:14, links:[15, 19]}, {id:15, links:[14, 24, 9]}, {id:16, links:[17, 25, 5]}, {id:17, links:[16, 10]}, {id:18, links:[19, 13]}, {id:19, links:[18, 14]}, {id:20, links:[21, 26, 11]}, {id:21, links:[22, 20, 27, 12]}, {id:22, links:[23, 21, 36]}, {id:23, links:[24, 22, 37]}, {id:24, links:[25, 23, 28, 15]}, {id:25, links:[24, 29, 16]}, {id:26, links:[27, 31, 20]}, {id:27, links:[26, 21]}, {id:28, links:[29, 24]}, {id:29, links:[28, 32, 25]}, {id:30, links:[31, 33]}, {id:31, links:[30, 34, 26]}, {id:32, links:[33, 39, 29]}, {id:33, links:[32, 30]}, {id:34, links:[35, 50, 31]}, {id:35, links:[36, 34, 42]}, {id:36, links:[37, 35, 22]}, {id:37, links:[38, 36, 23]}, {id:38, links:[39, 37, 45]}, {id:39, links:[38, 55, 29]}, {id:40, links:[41, 43]}, {id:41, links:[40, 44]}, {id:42, links:[43, 46, 35]}, {id:43, links:[42, 40]}, {id:44, links:[45, 41]}, {id:45, links:[44, 49, 38]}, {id:46, links:[47, 51, 42]}, {id:47, links:[46, 52]}, {id:48, links:[49, 53]}, {id:49, links:[48, 54, 45]}, {id:50, links:[51, 34]}, {id:51, links:[52, 50, 46]}, {id:52, links:[53, 51, 47]}, {id:53, links:[54, 52, 48]}, {id:54, links:[55, 53, 49]}, {id:55, links:[54, 39]}];
var lev1 = {num:1, id:"lev1", graph:lev1graph, startNode:35, dotFrame:"pinkblue", items:[{id:0, frame:"tree_big"}, {id:1, frame:"tree_big"}, {id:2, frame:"tree"}, {id:3, frame:"tree"}, {id:4, frame:"tree"}, {id:5, frame:"tree"}, {id:6, frame:"tree"}, {id:7, frame:"bull"}, {id:8, frame:"bull"}], meanies:[{startNode:6, speed:1.4, frame:"pink", startDir:"ul", ai:0}, {startNode:7, speed:1.4, frame:"green", startDir:"dl", ai:0}, {startNode:8, speed:1.4, frame:"blue", startDir:"dl", ai:30}, {startNode:9, speed:1.4, frame:"yellow", startDir:"dr", ai:50}], pickups:[{node:15, frame:"egg"}, {node:20, frame:"egg"}, {node:48, frame:"egg"}, {node:55, frame:"egg"}], cloudCount:10, clouds:[16777215, 16711935, 65535]};
var lev2 = {num:2, id:"lev2", graph:lev2graph, startNode:32, dotFrame:"yellowpink", items:[{id:0, frame:"tower"}, {id:1, frame:"tower"}], meanies:[{startNode:61, speed:1.6, frame:"pink", startDir:"ur", ai:0}, {startNode:63, speed:1.6, frame:"green", startDir:"ur", ai:0}, {startNode:3, speed:1.6, frame:"blue", startDir:"dl", ai:50}, {startNode:7, speed:1.6, frame:"yellow", startDir:"dl", ai:70}], pickups:[{node:62, frame:"bacon"}, {node:5, frame:"bacon"}, {node:36, frame:"bacon"}, {node:30, frame:"bacon"}], cloudCount:10, clouds:[16777215, 16711935, 65535]};
var lev3 = {num:3, id:"lev3", graph:lev3graph, startNode:27, dotFrame:"whiteblack", items:[{id:0, frame:"tree_pine"}, {id:1, frame:"tree_pine"}, {id:2, frame:"tree_pine"}, {id:3, frame:"tree_pine"}, {id:4, frame:"tree_pine"}, {id:5, frame:"tree_pine"}, {id:6, frame:"tree_pine"}, {id:7, frame:"tree_pine"}, {id:8, frame:"tree_pine"}, {id:9, frame:"tree_pine"}, {id:10, frame:"tree_pine"}], meanies:[{startNode:45, speed:1.8, frame:"pink", startDir:"dr", ai:0}, {startNode:48, speed:1.8, frame:"green", startDir:"ul", ai:10}, {startNode:0, speed:1.8, frame:"blue", startDir:"dr", ai:60}, {startNode:4, speed:1.8, frame:"yellow", startDir:"ul", ai:80}], pickups:[{node:39, frame:"saussage"}, {node:44, frame:"saussage"}, {node:6, frame:"saussage"}, {node:12, frame:"saussage"}], cloudCount:15, clouds:[16777215, 43990, 37559]};
var lev4 = {num:4, id:"lev4", graph:lev4graph, startNode:62, dotFrame:"yellowpink", items:[{id:0, frame:"tree_big"}, {id:1, frame:"tree_big"}, {id:2, frame:"tree_big"}, {id:3, frame:"tree_big"}, {id:4, frame:"tree_big"}, {id:5, frame:"tree_big"}, {id:6, frame:"tree"}, {id:7, frame:"tree"}, {id:8, frame:"tree"}, {id:9, frame:"tree"}, {id:10, frame:"tree"}], meanies:[{startNode:10, speed:1.8, frame:"pink", startDir:"dl", ai:10}, {startNode:12, speed:1.8, frame:"green", startDir:"dl", ai:30}, {startNode:13, speed:1.8, frame:"blue", startDir:"dl", ai:60}, {startNode:15, speed:1.8, frame:"yellow", startDir:"dl", ai:90}], pickups:[{node:42, frame:"mushroom"}, {node:50, frame:"mushroom"}, {node:5, frame:"mushroom"}, {node:46, frame:"mushroom"}], cloudCount:8, clouds:[16777215, 16556192, 13434880, 15628922, 14548992]};
var lev5 = {num:5, id:"lev5", graph:lev5graph, startNode:29, dotFrame:"yellowgray", items:[{id:0, frame:"cactus"}, {id:1, frame:"cactus"}, {id:2, frame:"cactus"}, {id:3, frame:"cactus"}, {id:4, frame:"cactus"}], meanies:[{startNode:66, speed:2, frame:"pink", startDir:"ul", ai:30}, {startNode:45, speed:2, frame:"green", startDir:"ul", ai:45}, {startNode:28, speed:2, frame:"blue", startDir:"ul", ai:65}, {startNode:9, speed:2, frame:"yellow", startDir:"ul", ai:95}], pickups:[{node:30, frame:"potatoes"}, {node:33, frame:"potatoes"}, {node:47, frame:"potatoes"}, {node:18, frame:"potatoes"}], cloudCount:6, clouds:[16777215, 16565408, 16565408, 13434880, 13434880]};
var lev6 = {num:6, id:"lev6", graph:lev6graph, startNode:31, dotFrame:"yellowgray", items:[{id:0, frame:"barrow"}, {id:1, frame:"mud"}, {id:2, frame:"post"}, {id:3, frame:"post"}, {id:4, frame:"keepleft"}, {id:5, frame:"keepleft"}, {id:6, frame:"barrier"}, {id:7, frame:"barrier"}, {id:8, frame:"keepleft"}, {id:9, frame:"keepleft"}, {id:10, frame:"barrier"}, {id:11, frame:"barrier"}, {id:12, frame:"keepleft"}], meanies:[{startNode:48, speed:2.2, frame:"pink", startDir:"ul", ai:40}, {startNode:35, speed:2.2, frame:"green", startDir:"ul", ai:50}, {startNode:16, speed:2.2, frame:"blue", startDir:"ul", ai:70}, {startNode:57, speed:2.2, frame:"yellow", startDir:"ul", ai:90}], pickups:[{node:10, frame:"tomato"}, {node:15, frame:"tomato"}, {node:51, frame:"tomato"}, {node:56, frame:"tomato"}], cloudCount:8, clouds:[16777215, 15658618, 13434880]};
var lev7 = {num:7, id:"lev7", graph:lev7graph, startNode:7, dotFrame:"whiteblack", items:[{id:0, frame:"tree_big"}, {id:1, frame:"house"}, {id:2, frame:"house"}, {id:3, frame:"tree_big"}, {id:4, frame:"tree_big"}, {id:5, frame:"tree_big"}, {id:6, frame:"chef_b"}, {id:7, frame:"chef_a"}, {id:8, frame:"house_small"}, {id:9, frame:"house_small"}], meanies:[{startNode:32, speed:2.2, frame:"pink", startDir:"ur", ai:60}, {startNode:34, speed:2.2, frame:"green", startDir:"ur", ai:70}, {startNode:37, speed:2.2, frame:"blue", startDir:"ur", ai:80}, {startNode:39, speed:2.2, frame:"yellow", startDir:"ur", ai:90}], pickups:[{node:50, frame:"beans"}, {node:53, frame:"beans"}, {node:19, frame:"beans"}, {node:16, frame:"beans"}], cloudCount:10, clouds:[16777215, 16777215, 16777215, 16513919]};
var lev8 = {num:8, id:"lev8", graph:lev8graph, startNode:62, dotFrame:"yellowpink", items:[{id:0, frame:"palm_tall"}, {id:1, frame:"palm"}, {id:2, frame:"palm_small"}, {id:3, frame:"palm"}, {id:4, frame:"tree"}, {id:5, frame:"tree"}, {id:6, frame:"palm"}, {id:7, frame:"tree"}, {id:8, frame:"tree"}], meanies:[{startNode:61, speed:2.4, frame:"pink", startDir:"ur", ai:90}, {startNode:63, speed:2.4, frame:"green", startDir:"ur", ai:90}, {startNode:3, speed:2.4, frame:"blue", startDir:"dl", ai:90}, {startNode:7, speed:2.4, frame:"yellow", startDir:"dl", ai:90}], pickups:[{node:10, frame:"toast"}, {node:15, frame:"toast"}, {node:51, frame:"toast"}, {node:56, frame:"toast"}], cloudCount:12, clouds:[16777215, 6472950]};
var lev9 = {num:9, id:"lev9", graph:lev9graph, startNode:23, dotFrame:"yellowgray", items:[{id:0, frame:"palm_fat"}, {id:1, frame:"shade"}, {id:2, frame:"shade"}, {id:3, frame:"palm_fat"}, {id:4, frame:"palm_fat"}, {id:5, frame:"palm_fat"}], meanies:[{startNode:40, speed:2.6, frame:"pink", startDir:"dr", ai:0}, {startNode:3, speed:2.6, frame:"green", startDir:"ul", ai:0}, {startNode:39, speed:2.6, frame:"blue", startDir:"ur", ai:100}, {startNode:4, speed:2.6, frame:"yellow", startDir:"dr", ai:100}], pickups:[{node:34, frame:"tea"}, {node:9, frame:"tea"}, {node:40, frame:"tea"}, {node:3, frame:"tea"}], cloudCount:8, clouds:[16777215, 16711935, 65535]};
var lev10 = {num:10, id:"lev10", graph:lev10graph, startNode:22, dotFrame:"yellowgray", items:[{id:0, frame:"tent"}, {id:1, frame:"tent"}, {id:2, frame:"candy"}, {id:3, frame:"roundabout"}, {id:4, frame:"icecream"}, {id:5, frame:"icecream"}, {id:6, frame:"candy"}, {id:7, frame:"bush"}, {id:8, frame:"bush"}, {id:9, frame:"bush"}, {id:10, frame:"bush"}, {id:11, frame:"bush"}, {id:12, frame:"bush"}, {id:13, frame:"bush"}, {id:14, frame:"bush"}], meanies:[{startNode:46, speed:2.8, frame:"pink", startDir:"ur", ai:100}, {startNode:49, speed:2.8, frame:"green", startDir:"ur", ai:100}, {startNode:6, speed:2.8, frame:"blue", startDir:"dl", ai:100}, {startNode:9, speed:2.8, frame:"yellow", startDir:"dl", ai:100}], pickups:[{node:0, frame:"lollipop"}, {node:5, frame:"lollipop"}, {node:50, frame:"lollipop"}, {node:55, frame:"lollipop"}], cloudCount:11, clouds:[16777215, 16711935, 65535]};
var arrLevels = [lev1, lev2, lev3, lev4, lev5, lev6, lev7, lev8, lev9, lev10];
Game.prototype.initialise = function () {
this.easeInFunc = "easeOutBack";
this.easeOutFunc = "easeInQuad";
this.easeTimeQuick = 0.3;
this.easeTimeSlow = 0.6;
this.dotPitch = 7;
this.lives = 4;
this.score = 0;
this.frame = 0;
this.levelFrames = 0;
this.totalFrames = 0;
this.state = "prestart";
this.items = [];
this.playedLongIntro = false;
this.updatePanel();
this.clip.onEnterFrame = function () {
this.objGame.evtEnterFrame();
};
};
Game.prototype.addItem = function (linkage, x, y) {
var _local2 = this.clip.itemHolder.getNextHighestDepth();
this.clip.itemHolder.attachMovie(linkage, "item" + _local2, _local2);
var clip = this.clip.itemHolder["item" + _local2];
clip._x = x;
clip._y = y;
clip._z = 0;
this.items.push(clip);
return(clip);
};
Game.prototype.restartLevel = function () {
if (this.lives <= 0) {
_root.gameEnd = "lose";
this.setState("gameover");
return(undefined);
}
var _local4 = 0;
while (_local4 < this.meanies.length) {
var _local3 = this.meanies[_local4];
_local3._alpha = 100;
_local3.dir = this.level.meanies[_local4].startDir;
_local3.speed = this.level.meanies[_local4].speed;
_local3.ai = this.level.meanies[_local4].ai;
_local3.curNode = this.graph[this.level.meanies[_local4].startNode];
_local3.dist = 0;
_local3.invulnFrames = 0;
_local3.pillFrames = 0;
_local3.deathFrames = undefined;
this.updatePosition(_local3);
_local4++;
}
this.player._alpha = 100;
this.player.curNode = this.graph[this.level.startNode];
this.player.lastDir = "dr";
this.player.dir = "idle";
this.player.nextDir = "idle";
this.player.dist = 0;
this.player.speed = 3;
this.player._z = 0;
this.player.vz = 0;
this.updatePosition(this.player);
this.objSounds.play("music_intro_short");
this.setState("prestart");
};
Game.prototype.startNextLevel = function () {
var _local2 = 0;
while (_local2 < this.items.length) {
this.items[_local2].removeMovieClip();
_local2++;
}
this.items = [];
this.pickups = [];
this.dots = [];
this.meanies = [];
this.setState("idle");
this.endFrames = undefined;
this.curLevel++;
if (this.lives < 4) {
this.lives++;
}
if (arrLevels[this.curLevel - 1] == undefined) {
this.gameComplete();
return(undefined);
}
this.startLevel(this.curLevel);
};
Game.prototype.startLevel = function (num) {
_level0.trackPoint(("Level_" + num) + "_start");
if (!this.playedLongIntro) {
this.playedLongIntro = true;
this.objSounds.play("music_intro_long");
} else {
this.objSounds.play("music_intro_short");
}
this.curLevel = num;
this.clip.gotoAndStop("lev" + num);
this.clip._parent.bg.gotoAndStop("lev" + num);
this.panel.txtLevel.text = "LEVEL " + num;
this.level = arrLevels[num - 1];
this.graph = this.level.graph;
var _local4 = 0;
while (_local4 < this.graph.length) {
var _local2 = this.graph[_local4];
var clip = this.clip["g" + _local2.id];
clip._visible = false;
var _local13 = clip.holderToLocal(this.clip.itemHolder);
_local2.x = _local13.x;
_local2.y = _local13.y;
var _local3 = 0;
while (_local3 < _local2.links.length) {
var _local5 = this.graph[_local2.links[_local3]];
var _local6 = this.clip["g" + _local5.id];
_local13 = _local6.holderToLocal(this.clip.itemHolder);
var _local12 = _local13.x - _local2.x;
var _local11 = _local13.y - _local2.y;
var _local8 = Maths.vectorLength(_local12, _local11);
var _local10 = _local12 / _local8;
var _local9 = _local11 / _local8;
var _local15 = "error";
if (_local8 > 350) {
_local15 = "teleport";
} else {
if ((_local12 < 0) && (_local11 < 0)) {
_local15 = "ul";
}
if ((_local12 > 0) && (_local11 < 0)) {
_local15 = "ur";
}
if ((_local12 < 0) && (_local11 > 0)) {
_local15 = "dl";
}
if ((_local12 > 0) && (_local11 > 0)) {
_local15 = "dr";
}
}
_local2[_local15] = {node:_local5, dx:_local12, dy:_local11, ux:_local10, uy:_local9, dir:_local15, len:_local8};
_local3++;
}
_local4++;
}
this.pickups = [];
this.dots = [];
_local4 = 0;
while (_local4 < this.level.pickups.length) {
var _local2 = this.graph[this.level.pickups[_local4].node];
var clip = this.addItem("pickup", _local2.x, _local2.y);
clip.gotoAndStop(this.level.pickups[_local4].frame);
clip.hit._visible = false;
clip.collected = false;
clip.pickupID = "pill";
_local2.pickup = clip;
this.pickups.push(clip);
this.dots.push(clip);
_local4++;
}
_local4 = 0;
while (_local4 < this.graph.length) {
var _local2 = this.graph[_local4];
this.addDots(_local2, _local2.ul);
this.addDots(_local2, _local2.ur);
this.addDots(_local2, _local2.dl);
this.addDots(_local2, _local2.dr);
_local4++;
}
this.player = this.addItem("chef");
this.player._xscale = 25;
this.player._yscale = 25;
this.player.curNode = this.graph[this.level.startNode];
this.player.lastDir = "dr";
this.player.dir = "idle";
this.player.nextDir = "idle";
this.player.dist = 0;
this.player.speed = 3;
this.player._z = 0;
this.player.vz = 0;
this.updatePosition(this.player);
_local4 = 0;
while (_local4 < this.level.items.length) {
var _local14 = this.level.items[_local4];
var _local7 = this.clip["i" + _local14.id];
var _local13 = _local7.holderToLocal(this.clip.itemHolder);
var clip = this.addItem("item", _local13.x, _local13.y);
_local7._visible = false;
clip.gotoAndStop(_local14.frame);
if (!_local7) {
trace(("Warning: Item " + _local4) + " did not resolve into a real object");
}
_local4++;
}
this.meanies = [];
_local4 = 0;
while (_local4 < this.level.meanies.length) {
var clip = this.addItem("meanie");
clip.baseFrame = this.level.meanies[_local4].frame;
clip.frame = this.level.meanies[_local4].frame;
clip.dir = this.level.meanies[_local4].startDir;
clip.speed = this.level.meanies[_local4].speed;
clip.ai = this.level.meanies[_local4].ai;
clip.curNode = this.graph[this.level.meanies[_local4].startNode];
clip.dist = 0;
clip.invulnFrames = 0;
clip.pillFrames = 0;
clip.deathFrames = undefined;
clip.hit._visible = false;
this.updatePosition(clip);
this.meanies.push(clip);
_local4++;
}
this.addClouds();
this.bonus = 0;
this.setState("prestart");
};
Game.prototype.addDots = function (node, link) {
var _local5 = this.clip.dotHolder;
if ((node.pickup == undefined) && (node.teleport == undefined)) {
var _local3 = _local5.getNextHighestDepth();
_local5.attachMovie("dot", "dot" + _local3, _local3);
var clip = _local5["dot" + _local3];
clip._x = node.x;
clip._y = node.y;
clip.gotoAndStop(this.level.dotFrame);
clip.hit._visible = false;
clip.collected = false;
clip.pickupID = "dot";
node.pickup = clip;
this.dots.push(clip);
}
if (link == undefined) {
return(undefined);
}
if (link.dots != undefined) {
return(undefined);
}
var _local10 = link.node;
var _local9;
switch (link.dir) {
case "ul" :
_local9 = _local10.dr;
break;
case "ur" :
_local9 = _local10.dl;
break;
case "dl" :
_local9 = _local10.ur;
break;
case "dr" :
_local9 = _local10.ul;
}
link.dots = [];
_local9.dots = link.dots;
var _local8 = Math.floor((link.len - this.dotPitch) / this.dotPitch);
var _local7 = (link.len - ((_local8 + 1) * this.dotPitch)) / 2;
var _local2 = 1;
while (_local2 <= _local8) {
var _local3 = _local5.getNextHighestDepth();
_local5.attachMovie("dot", "dot" + _local3, _local3);
var clip = _local5["dot" + _local3];
clip._x = node.x + (link.ux * (_local7 + (_local2 * this.dotPitch)));
clip._y = node.y + (link.uy * (_local7 + (_local2 * this.dotPitch)));
clip.gotoAndStop(this.level.dotFrame);
clip.hit._visible = false;
clip.collected = false;
clip.pickupID = "dot";
link.dots.push(clip);
this.dots.push(clip);
_local2++;
}
};
Game.prototype.updatePosition = function (clip) {
switch (clip.dir) {
case "idle" :
var _local2 = clip.curNode[clip.lastDir];
clip._x = clip.curNode.x + (_local2.ux * clip.dist);
clip._y = (clip.curNode.y + (_local2.uy * clip.dist)) - clip._z;
clip.gotoAndStop("idle-" + clip.lastDir);
break;
case "ul" :
case "ur" :
case "dl" :
case "dr" :
_local2 = clip.curNode[clip.dir];
clip._x = clip.curNode.x + (_local2.ux * clip.dist);
clip._y = (clip.curNode.y + (_local2.uy * clip.dist)) - clip._z;
clip.gotoAndStop("run-" + clip.dir);
break;
default :
trace("updatePosition: Unhandled direction " + clip.curDir);
}
};
Game.prototype.sortDepths = function () {
this.items.sort(function (a, b) {
return((a._y + a._z) > (b._y + b._z));
});
var _local2 = 0;
while (_local2 < this.items.length) {
this.items[_local2].swapDepths(_local2);
_local2++;
}
};
Game.prototype.moveItem = function (clip) {
switch (clip.dir) {
case "idle" :
break;
case "ul" :
case "ur" :
case "dl" :
case "dr" :
var _local3 = clip.curNode[clip.dir];
if (_local3 == undefined) {
clip.lastDir = clip.dir;
clip.dir = "idle";
clip.dist = 0;
} else {
if ((clip.deathFrames == undefined) && (clip._z == 0)) {
if (clip.pillFrames > 0) {
clip.dist = clip.dist + (clip.speed * 0.75);
} else {
clip.dist = clip.dist + clip.speed;
}
}
if (clip.dist > _local3.len) {
var _local4 = clip.dist - _local3.len;
clip.curNode = _local3.node;
if ((clip.nextDir != undefined) && (clip.curNode[clip.nextDir] != undefined)) {
clip.dir = clip.nextDir;
clip.dist = _local4;
clip.nextDir = undefined;
} else if (clip.curNode[clip.dir] != undefined) {
clip.dist = _local4;
} else if (clip.curNode.teleport != undefined) {
clip.curNode = clip.curNode.teleport.node;
clip.dist = _local4;
} else {
clip.lastDir = clip.dir;
clip.dir = "idle";
clip.dist = 0;
clip.nextDir = undefined;
if (clip == this.player) {
this.objSounds.play("collidewall");
this.objSounds.stop("walkloop");
}
}
}
}
break;
default :
trace("moveItem: Unhandled direction " + clip.curDir);
}
this.updatePanel();
this.updatePosition(clip);
};
Game.prototype.aboutTurn = function (clip) {
clip.curNode = clip.curNode[clip.dir].node;
switch (clip.dir) {
case "ul" :
clip.dir = "dr";
break;
case "ur" :
clip.dir = "dl";
break;
case "dl" :
clip.dir = "ur";
break;
case "dr" :
clip.dir = "ul";
}
clip.dist = clip.curNode[clip.dir].len - clip.dist;
};
Game.prototype.evtEnterFrame = function () {
this.frame++;
switch (this.state) {
case "idle" :
break;
case "prestart" :
this.updatePanel();
this.sortDepths();
this.frame--;
if (((!this.objSounds.sounds.music_intro_short.playing) && (!this.objSounds.sounds.music_intro_long.playing)) && (this.panel.intro.done)) {
this.setState("playing");
}
break;
case "playing" :
var _local14 = false;
var _local15 = false;
var _local13 = false;
var _local16 = false;
switch (this.keyDir) {
case "lefty" :
if (Key.isDown(Keys.CursorUp)) {
_local14 = true;
}
if (Key.isDown(Keys.CursorDown)) {
_local16 = true;
}
if (Key.isDown(Keys.CursorLeft)) {
_local13 = true;
}
if (Key.isDown(Keys.CursorRight)) {
_local15 = true;
}
break;
case "righty" :
if (Key.isDown(Keys.CursorUp)) {
_local15 = true;
}
if (Key.isDown(Keys.CursorDown)) {
_local13 = true;
}
if (Key.isDown(Keys.CursorLeft)) {
_local14 = true;
}
if (Key.isDown(Keys.CursorRight)) {
_local16 = true;
}
break;
default :
trace("evtEnterFrame: Unknown key binding");
}
this.player.nextDir = undefined;
switch (this.player.dir) {
case "idle" :
if (_local14) {
this.player.dir = "ul";
}
if (_local15) {
this.player.dir = "ur";
}
if (_local13) {
this.player.dir = "dl";
}
if (_local16) {
this.player.dir = "dr";
}
if ((this.player.dir != "idle") && (!this.objSounds.sounds.walkloop.playing)) {
this.objSounds.play("walkloop", undefined, true);
}
break;
case "ul" :
if (_local15) {
this.player.nextDir = "ur";
}
if (_local13) {
this.player.nextDir = "dl";
}
if (_local16) {
this.aboutTurn(this.player);
}
break;
case "ur" :
if (_local14) {
this.player.nextDir = "ul";
}
if (_local13) {
this.aboutTurn(this.player);
}
if (_local16) {
this.player.nextDir = "dr";
}
break;
case "dl" :
if (_local14) {
this.player.nextDir = "ul";
}
if (_local15) {
this.aboutTurn(this.player);
}
if (_local16) {
this.player.nextDir = "dr";
}
break;
case "dr" :
if (_local14) {
this.aboutTurn(this.player);
}
if (_local15) {
this.player.nextDir = "ur";
}
if (_local13) {
this.player.nextDir = "dl";
}
break;
default :
trace("evtEnterFrame: Unhandled player direction " + this.player.dir);
}
this.moveItem(this.player);
var _local11 = 0;
while (_local11 < this.meanies.length) {
var _local4 = this.meanies[_local11];
if (_local4.nextDir == undefined) {
var _local5 = _local4.curNode[_local4.dir].node;
if (_local5 == undefined) {
_local5 = _local4.curNode;
}
var _local3 = [];
if (_local5.ul && (_local4.dir != "dr")) {
_local3.push("ul");
}
if (_local5.ur && (_local4.dir != "dl")) {
_local3.push("ur");
}
if (_local5.dl && (_local4.dir != "ur")) {
_local3.push("dl");
}
if (_local5.dr && (_local4.dir != "ul")) {
_local3.push("dr");
}
if (_local4.dir == "idle") {
trace((((((((("Ghost " + _local4.frame) + " got broke: C=") + _local4.curNode.id) + ", N=") + _local5.id) + ", dir=") + _local4.dir) + ", dirs.length=") + _local3.length);
_local4.dir = _local3[0];
}
if (Maths.randomInt(0, 100) <= _local4.ai) {
var _local9;
if (_local4.pillFrames > 0) {
var _local10 = 0;
var _local6 = 0;
while (_local6 < _local3.length) {
var _local7 = _local5[_local3[_local6]].node;
var _local8 = Maths.distance(_local7.x, _local7.y, this.player._x, this.player._y);
if (_local8 > _local10) {
_local10 = _local8;
_local9 = _local3[_local6];
}
_local6++;
}
} else {
var _local10 = 10000;
var _local6 = 0;
while (_local6 < _local3.length) {
var _local7 = _local5[_local3[_local6]].node;
var _local8 = Maths.distance(_local7.x, _local7.y, this.player._x, this.player._y);
if (_local8 < _local10) {
_local10 = _local8;
_local9 = _local3[_local6];
}
_local6++;
}
}
_local4.nextDir = _local9;
} else {
_local4.nextDir = _local3[Maths.randomInt(0, _local3.length - 1)];
}
}
this.moveItem(_local4);
_local11++;
}
_local11 = 0;
while (_local11 < this.meanies.length) {
var _local2 = this.meanies[_local11];
if (_local2.invulnFrames > 0) {
_local2.invulnFrames--;
_local2._alpha = (((_local2.invulnFrames % 14) >= 7) ? 70 : 40);
if (_local2.invulnFrames <= 0) {
_local2._alpha = 100;
}
} else if (_local2.pillFrames > 0) {
_local2.pillFrames--;
_local2.frame = _local2.baseFrame + "pill";
if ((_local2.pillFrames < 90) && ((_local2.pillFrames % 14) >= 7)) {
_local2.frame = _local2.baseFrame;
}
if (_local2.pillFrames <= 0) {
_local2.frame = _local2.baseFrame;
}
_local2.gfx.gotoAndStop(_local2.frame);
}
if (_local2.deathFrames != undefined) {
_local2.deathFrames++;
_local2._alpha = 100 - (2 * _local2.deathFrames);
_local2.vz = _local2.vz + 0.1;
_local2._z = _local2._z + _local2.vz;
_local2.frame = _local2.baseFrame + "pill";
_local2.gfx.gotoAndStop(_local2.frame);
if (_local2.deathFrames == 210) {
_local2.frame = _local2.baseFrame;
_local2.gfx.gotoAndStop(_local2.frame);
_local2.deathFrames = undefined;
_local2.invulnFrames = 210;
_local2.nextDir = undefined;
_local2.dist = 0;
_local2._z = 420;
_local2.vz = 0;
}
} else if (_local2._z > 0) {
_local2.vz = _local2.vz - 0.4;
_local2._z = _local2._z + _local2.vz;
if (_local2._z < 0) {
_local2.vz = -0.2 * _local2.vz;
_local2._z = 0.1;
if (_local2.vz < 2) {
_local2._z = 0;
_local2.vz = 0;
}
}
}
_local11++;
}
var _local12 = false;
_local11 = 0;
while (_local11 < this.meanies.length) {
if (this.meanies[_local11].pillFrames > 0) {
_local12 = true;
}
_local11++;
}
if (_local12 && (!this.objSounds.sounds.pillloop.playing)) {
this.objSounds.play("pillloop", undefined, true);
}
if ((!_local12) && (this.objSounds.sounds.pillloop.playing)) {
this.objSounds.stop("pillloop");
}
this.checkPickups();
this.sortDepths();
this.checkLevelComplete();
this.checkDeath();
break;
case "ending" :
this.endFrames--;
if (this.endFrames <= 0) {
this.startNextLevel();
return(undefined);
}
if (this.player._z <= 0) {
this.player._z = 0;
this.player.vz = 8;
}
this.player.vz = this.player.vz - 1;
this.player._z = this.player._z + this.player.vz;
this.updatePosition(this.player);
this.sortDepths();
break;
case "dying" :
this.endFrames--;
if (this.endFrames <= 0) {
this.restartLevel();
return(undefined);
}
this.player.vz = this.player.vz - 1.2;
this.player._z = this.player._z + this.player.vz;
if (this.player.vz < 0) {
this.player._alpha = this.player._alpha - 10;
}
this.updatePosition(this.player);
this.sortDepths();
break;
case "gameover" :
break;
default :
trace(("evtEnterFrame(" + this.state) + "): Unhandled");
}
};
Game.prototype.checkLevelComplete = function () {
if (this.dots.length == 0) {
this.levelComplete();
}
};
Game.prototype.checkDeath = function () {
var _local4 = this.player.holderToGlobal();
var _local2 = 0;
while (_local2 < this.meanies.length) {
var _local3 = this.meanies[_local2];
if (_local3.hit.hitTest(_local4.x, _local4.y, true)) {
this.caughtByBaddie(_local3);
}
_local2++;
}
};
Game.prototype.checkPickups = function () {
var _local5 = this.player.holderToGlobal();
var _local6 = this.player.curNode;
this.checkPickup(_local6.pickup, _local5);
var _local4 = _local6[this.player.dir];
var _local2 = 0;
while (_local2 < _local4.dots.length) {
var _local3 = _local4.dots[_local2];
this.checkPickup(_local3, _local5);
_local2++;
}
};
Game.prototype.checkPickup = function (pickup, p) {
if ((!pickup.collected) && (pickup.hit.hitTest(p.x, p.y, true))) {
pickup.collected = true;
pickup._visible = false;
var _local3 = 0;
while (_local3 < this.dots.length) {
if (pickup == this.dots[_local3]) {
this.dots.splice(_local3, 1);
_local3 = this.dots.length;
}
_local3++;
}
switch (pickup.pickupID) {
case "dot" :
this.score = this.score + 5;
if (!this.objSounds.sounds.waca.playing) {
this.objSounds.play("waca");
}
break;
case "pill" :
this.objSounds.play("powerpill");
this.score = this.score + 500;
this.bonus = 500;
this.showScore(500, this.player._x, this.player._y);
_local3 = 0;
while (_local3 < this.meanies.length) {
var _local2 = this.meanies[_local3];
if (_local2.deathFrames == undefined) {
_local2.nextDir = undefined;
_local2.pillFrames = 300;
_local2.invulnFrames = 0;
_local2._alpha = 100;
this.aboutTurn(_local2);
}
_local3++;
}
break;
default :
trace("Unhandled pickup " + pickup.pickupID);
}
}
};
Game.prototype.showScore = function (score, x, y) {
var _local2 = this.clip.scoreHolder.getNextHighestDepth();
this.clip.scoreHolder.attachMovie("scoreIndicator", "score" + _local2, _local2);
var clip = this.clip.scoreHolder["score" + _local2];
clip._x = x;
clip._y = y;
clip.score.txtScore.text = score;
};
Game.prototype.caughtByBaddie = function (baddie) {
if (baddie.invulnFrames > 0) {
return(undefined);
}
if (baddie.deathFrames != undefined) {
return(undefined);
}
if (baddie.pillFrames > 0) {
this.objSounds.play("killmeanie");
baddie.pillFrames = 0;
baddie.invulnFrames = 0;
baddie._z = 0;
baddie.vz = 0;
baddie.deathFrames = 0;
this.bonus = this.bonus * 2;
this.score = this.score + this.bonus;
this.showScore(this.bonus, baddie._x, baddie._y);
} else {
this.setState("dying");
}
};
Game.prototype.levelComplete = function () {
_level0.trackPoint(("Level_" + this.curLevel) + "_start");
_root.stopSounds();
this.objSounds.play("music_end");
this.score = this.score + 5000;
this.showScore(5000, this.player._x, this.player._y);
this.endFrames = 90;
this.setState("ending");
};
Game.prototype.gameComplete = function () {
_root.gameEnd = "win";
this.setState("gameover");
};
Game.prototype.setState = function (newState) {
var _local5 = this.state;
this.state = newState;
switch (newState) {
case "idle" :
break;
case "prestart" :
this.panel.intro.done = false;
this.panel.intro.gotoAndPlay(1);
break;
case "playing" :
this.panel.intro.gotoAndStop("off");
this.objSounds.play("music_loop", undefined, true);
break;
case "dying" :
_root.stopSounds();
this.objSounds.play("zap");
this.objSounds.play("music_death");
var _local3 = 0;
while (_local3 < this.meanies.length) {
this.meanies[_local3].alphaTo(0, 0.75, "easeInOutSine", 0.25);
_local3++;
}
this.player.vz = 16;
this.endFrames = 90;
this.lives--;
this.updatePanel();
case "ending" :
this.player.lastDir = this.player.dir;
this.player.dir = "idle";
this.updatePosition(this.player);
this.sortDepths();
this.objSounds.stop("walkloop");
break;
case "gameover" :
_level0.trackPoint("GameOver_" + _root.gameEnd);
this.panel.gameOver.box.gotoAndPlay("in");
this.panel.gameOver.content.gotoAndStop(_root.gameEnd);
_root.score = this.score;
break;
default :
trace(("setState(" + newState) + "): Unhandled");
}
};
Game.prototype.updatePanel = function () {
this.panel.life1._visible = this.lives >= 1;
this.panel.life2._visible = this.lives >= 2;
this.panel.life3._visible = this.lives >= 3;
this.panel.life4._visible = this.lives >= 4;
var _local2 = this.formatTime(this.frame);
this.panel.txtScore.text = Maths.formatNum(this.score, 7);
this.panel.txtTime.text = _local2.strTime;
this.panel.txtLevel.text = "Level " + this.level.num;
};
Game.prototype.formatTime = function (frame) {
var _local4 = Math.floor(frame / 30);
var _local3 = Math.floor(_local4 / 60);
var _local2 = _local4 % 60;
var _local5 = (frame / 30) - _local4;
var _local1 = {minutes:Maths.formatNum(_local3, 2), seconds:Maths.formatNum(_local2, 2), tenths:Maths.formatNum(_local5 * 100, 2)};
_local1.strTime = (((Maths.formatNum(_local3, 2) + ":") + Maths.formatNum(_local2, 2)) + ":") + Maths.formatNum(_local5 * 100, 2);
_local1.longTime = "";
if (_local3 > 0) {
_local1.longTime = _local1.longTime + (_local3 + " minute");
}
if (_local3 > 1) {
_local1.longTime = _local1.longTime + "s";
}
if (_local3 > 0) {
_local1.longTime = _local1.longTime + ", ";
}
_local1.longTime = _local1.longTime + (_local2 + " second");
if (_local2 != 1) {
_local1.longTime = _local1.longTime + "s";
}
_local1.shortTime = "";
if (_local3 > 0) {
_local1.shortTime = _local1.shortTime + (_local3 + "m ");
_local1.shortTime = _local1.shortTime + (_local2 + "sec");
if (_local2 != 1) {
_local1.shortTime = _local1.shortTime + "s";
}
} else {
_local1.shortTime = _local1.shortTime + (_local2 + " second");
if (_local2 != 1) {
_local1.shortTime = _local1.shortTime + "s";
}
}
return(_local1);
};
Game.prototype.addClouds = function () {
var _local3 = 0;
while (_local3 < this.clouds.length) {
this.clouds[_local3].removeMovieClip();
_local3++;
}
this.clouds = [];
_local3 = 0;
while (_local3 < this.level.cloudCount) {
var _local2 = this.clip.cloudHolder.getNextHighestDepth();
this.clip.cloudHolder.attachMovie("cloud", "cloud" + _local2, _local2);
var clip = this.clip.cloudHolder["cloud" + _local2];
clip.gotoAndStop(Maths.randomInt(2, clip._totalframes));
clip._x = Maths.randomInt(250, 760);
clip._y = Maths.randomInt(25, 125);
clip._scale = 25 + (50 * (_local3 / this.level.cloudCount));
clip._tintPercent = 100;
clip._tint = this.level.clouds[Maths.randomInt(0, this.level.clouds.length - 1)];
clip.cloud.gotoAndPlay(Maths.randomInt(1, clip.cloud._totalframes));
this.clouds.push(clip);
_local3++;
}
};
Game.prototype.evt = function () {
};
_level0.trackPoint("Section_instructions");
stopSounds();
System.security.loadPolicyFile("http://www.hyperlaunch.com/highscoreservice/crossdomain.php");
HighscoreService.prototype.traceHighscores = function () {
if (!_level0._highscoreServiceLoaded) {
trace("Warning: Score submission service has not finished loading yet");
}
if (!this.scoresLoaded) {
trace("Highscore table has not loaded yet");
return(undefined);
}
var _local6 = this.objXML.getNodeSiblingCount("highscores", "score");
var _local2 = 0;
while (_local2 < _local6) {
var _local3 = this.objXML.getNodeAttribute(("highscores/score[" + _local2) + "]", "rank");
var _local5 = this.objXML.getNodeAttribute(("highscores/score[" + _local2) + "]", "score");
var _local4 = this.objXML.getNodeValue(("highscores/score[" + _local2) + "]");
trace((((_local3 + ": ") + _local4) + " => ") + _local5);
_local2++;
}
};
HighscoreService.prototype.displayHighscores = function (displayClip, depth, elementLinkage, elementSpacing, displayRowsLimit) {
this.displayClip = displayClip;
this.depth = depth;
this.elementLinkage = elementLinkage;
this.elementSpacing = elementSpacing;
this.displayRowsLimit = ((displayRowsLimit == undefined) ? (this.scoreCount) : (displayRowsLimit));
this.displayDetailsSaved = true;
this._displayScores();
};
HighscoreService.prototype.submitScore = function (name, score, extraInfo) {
if (!_level0._highscoreServiceLoaded) {
trace("Cannot submit score as score submission service has not finished loading yet");
return(undefined);
}
_level19356.submitScore(this, name, score, extraInfo);
};
HighscoreService.prototype._displayScores = function () {
if (!this.displayDetailsSaved) {
trace("Attempted to display scores with no display details in highscore object");
return(undefined);
}
var _local6 = this.displayClip.createEmptyMovieClip("_highscoreClip", this.depth);
var _local7 = this.objXML.getNodeSiblingCount("highscores", "score");
var _local2 = 0;
while (_local2 < Math.min(_local7, this.displayRowsLimit)) {
var _local3 = this.objXML.getNodeAttribute(("highscores/score[" + _local2) + "]", "rank");
var _local5 = this.objXML.getNodeAttribute(("highscores/score[" + _local2) + "]", "score");
var _local4 = this.objXML.getNodeValue(("highscores/score[" + _local2) + "]");
_local6.attachMovie(this.elementLinkage, "scoreElement" + _local2, _local2);
element = _local6["scoreElement" + _local2];
element.gotoAndStop((_local2 % element._totalframes) + 1);
element._x = 0;
element._y = _local2 * this.elementSpacing;
element.txtRank.text = _local3;
element.txtName.text = _local4;
element.txtScore.text = this._treatScore(_local5);
_local2++;
}
};
HighscoreService.prototype._treatScore = function (intScore) {
return(intScore);
};
XML.prototype.getNodeValue = function (strPath) {
var _local2 = this.findNode(strPath);
if (_local2 == undefined) {
return(undefined);
}
if (_local2.firstChild.nodeType != 3) {
return(undefined);
}
return(_local2.firstChild.nodeValue);
};
XML.prototype.getNodeAttribute = function (strPath, strAttribute) {
var _local2 = this.findNode(strPath);
if (_local2 == undefined) {
return(undefined);
}
return(_local2.attributes[strAttribute]);
};
XML.prototype.getNodeSiblingCount = function (strPath, strSiblingName) {
var _local3 = this.findNode(strPath);
if (_local3 == undefined) {
return(undefined);
}
var _local4 = 0;
var _local2 = 0;
while (_local2 < _local3.childNodes.length) {
if (_local3.childNodes[_local2].nodeName.toLowerCase() == strSiblingName.toLowerCase()) {
_local4++;
}
_local2++;
}
return(_local4);
};
XML.prototype.findNode = function (strPath) {
var _local4 = this;
var _local11 = strPath.toLowerCase().split("/");
var _local9 = 0;
while (_local9 < _local11.length) {
var _local8 = 0;
var _local3 = _local11[_local9];
var _local7 = _local3.indexOf("[");
if (_local7 != -1) {
var _local10 = _local3.slice(_local7 + 1, _local3.length - 1);
_local8 = Number(_local10);
_local3 = _local3.slice(0, _local7);
}
var _local5;
var _local6 = 0;
var _local2 = 0;
while (_local2 < _local4.childNodes.length) {
if (_local4.childNodes[_local2].nodeName.toLowerCase() == _local3) {
if (_local6 == _local8) {
_local5 = _local2;
_local2 = _local4.childNodes.length;
} else {
_local6++;
}
}
_local2++;
}
if (_local5 == undefined) {
return(undefined);
}
_local4 = _local4.childNodes[_local5];
_local9++;
}
return(_local4);
};
if (objHS == undefined) {
objHS = new HighscoreService("LittleChef_pacman", 100);
}
var objSounds = new Sounds(soundClip);
objSounds.registerSound("beep");
objSounds.registerSound("boop");
objSounds.registerSound("collidewall");
objSounds.registerSound("killmeanie");
objSounds.registerSound("music_death", 50);
objSounds.registerSound("music_end", 50);
objSounds.registerSound("music_intro_long", 50);
objSounds.registerSound("music_intro_short", 50);
objSounds.registerSound("music_loop", 50);
objSounds.registerSound("pillloop");
objSounds.registerSound("powerpill");
objSounds.registerSound("waca");
objSounds.registerSound("walkloop");
objSounds.registerSound("zap");
gotoAndStop ("instructions");
Frame 51
var objGame = new Game(this.gameClip, this.panel, _root.keyDir);
objGame.startLevel(1);
_level0.trackPoint("Section_game");
Frame 61
bg.gotoAndStop("lev1");
stopSounds();
_level0.trackPoint("Section_STF");
Frame 71
bg.gotoAndStop("lev1");
stopSounds();
objScroll = new scrollBar(highscores.content.highscores, highscores.content.highscores.highscoreHolder, highscores.content.highscores.mask, highscores.content.highscores.slider, highscores.content.highscores.draggerBar, highscores.content.highscores.btnUp, highscores.content.highscores.btnDown, false, 1);
objScroll.init(2200);
objHS.displayHighscores(highscores.content.highscores.highscoreHolder, 1, "highscoreElement", 22);
_level0.trackPoint("Section_highscores");
Symbol 14 MovieClip Frame 1
gotoAndStop ("idle");
Symbol 14 MovieClip Frame 41
stop();
Symbol 14 MovieClip Frame 71
gotoAndStop ("idle");
Symbol 896 MovieClip [__Packages.com.mosesSupposes.fuse.Shortcuts] Frame 0
class com.mosesSupposes.fuse.Shortcuts
{
function Shortcuts () {
}
static function initialize() {
if (shortcuts == null) {
initShortcuts();
}
}
static function doShortcut(obj, methodName) {
initialize();
var _local5 = shortcuts[methodName];
if (_local5 == undefined) {
if (typeof(obj) == "movieclip") {
_local5 = mcshortcuts[methodName];
}
}
if (_local5 == undefined) {
return(null);
}
obj = arguments.shift();
methodName = String(arguments.shift());
if (!(obj instanceof Array)) {
obj = [obj];
}
var _local3 = "";
for (var _local6 in obj) {
var _local2 = String(_local5.apply(obj[_local6], arguments));
if ((_local2 != null) && (_local2.length > 0)) {
if (_local3.length > 0) {
_local3 = (_local2 + "|") + _local3;
} else {
_local3 = _local2;
}
}
}
return(((_local3 == "") ? null : (_local3)));
}
static function addShortcutsTo() {
initialize();
var _local5 = function (o, so) {
for (var _local5 in so) {
var _local2 = so[_local5];
if (_local2.getter || (_local2.setter)) {
o.addProperty(_local5, _local2.getter, _local2.setter);
_global.ASSetPropFlags(o, _local5, 3, 1);
} else {
o[_local5] = _local2;
_global.ASSetPropFlags(o, _local5, 7, 1);
}
}
};
for (var _local7 in arguments) {
var _local4 = arguments[_local7];
if ((_local4 == MovieClip.prototype) || (typeof(_local4) == "movieclip")) {
_local5(_local4, mcshortcuts);
}
_local5(_local4, shortcuts);
}
}
static function removeShortcutsFrom() {
initialize();
var _local5 = function (o, so) {
for (var _local5 in so) {
_global.ASSetPropFlags(o, _local5, 0, 2);
var _local2 = so[_local5];
if (_local2.getter || (_local2.setter)) {
o.addProperty(_local5, null, null);
}
delete o[_local5];
}
};
for (var _local7 in arguments) {
var _local3 = arguments[_local7];
if ((_local3 == MovieClip.prototype) || (typeof(_local3) == "movieclip")) {
_local5(_local3, mcshortcuts);
}
_local5(_local3, shortcuts);
}
}
static function parseStringTypeCallback(callbackStr) {
var evaluate = function (val) {
var first = val.charAt(0);
if ((first == val.slice(-1)) && ((first == "\"") || (first == "'"))) {
return(val.slice(1, -1));
}
if (val == "true") {
return(Object(true));
}
if (val == "false") {
return(Object(false));
}
if (val == "null") {
return(Object(null));
}
if (_global.isNaN(Number(val)) == false) {
return(Object(Number(val)));
}
return(Object(eval (val)));
};
var trimWhite = function (str) {
while (str.charAt(0) == " ") {
str = str.slice(1);
}
while (str.slice(-1) == " ") {
str = str.slice(0, -1);
}
return(str);
};
var evaluateList = function (list) {
var _local11 = [];
var _local4 = 0;
while (_local4 < list.length) {
var _local3 = list[_local4];
_local3 = trimWhite(_local3);
var _local5 = (_local3.charAt(0) == "{") && ((_local3.indexOf("}") > -1) || (_local3.indexOf(":") > -1));
var _local10 = _local3.charAt(0) == "[";
if ((_local5 || (_local10)) == true) {
var _local6 = ((_local5 == true) ? ({}) : ([]));
var _local2 = _local4;
while (_local2 < list.length) {
if (_local2 == _local4) {
_local3 = _local3.slice(1);
}
var _local1;
var _local8 = (_local1.slice(-1) == ((_local5 == true) ? "}" : "]")) || (_local2 == (list.length - 1));
if (_local8 == true) {
_local1 = _local1.slice(0, -1);
}
if ((_local5 == true) && (_local1.indexOf(":") > -1)) {
var _local7 = _local1.split(":");
_local6[trimWhite(_local7[0])] = evaluate(trimWhite(_local7[1]));
} else if (_local10 == true) {
_local6.push(evaluate(trimWhite(_local1)));
}
if (_local8 == true) {
_local11.push(_local6);
_local4 = _local2;
break;
}
_local2++;
}
} else {
_local11.push(evaluate(trimWhite(_local3)));
}
_local4++;
}
return(_local11);
};
var parts = callbackStr.split("(");
var p0 = parts[0];
var p1 = parts[1];
return({func:p0.slice(p0.lastIndexOf(".") + 1), scope:eval (p0.slice(0, p0.lastIndexOf("."))), args:evaluateList(p1.slice(0, p1.lastIndexOf(")")).split(","))});
}
static function initShortcuts() {
shortcuts = new Object();
var methods = {alphaTo:"_alpha", scaleTo:"_scale", sizeTo:"_size", rotateTo:"_rotation", brightnessTo:"_brightness", brightOffsetTo:"_brightOffset", contrastTo:"_contrast", colorTo:"_tint", tintPercentTo:"_tintPercent", colorResetTo:"_colorReset", invertColorTo:"_invertColor"};
var _local4 = _global.com.mosesSupposes.fuse.FuseFMP.getAllShortcuts();
var _local7 = {blur:1, blurX:1, blurY:1, strength:1, shadowAlpha:1, highlightAlpha:1, angle:1, distance:1, alpha:1, color:1};
for (var _local9 in _local4) {
if (_local7[_local4[_local9].split("_")[1]] === 1) {
methods[_local4[_local9] + "To"] = _local4[_local9];
}
}
var _local8 = {__resolve:function (name) {
var propName = methods[name];
return(function () {
var _local4 = _global.com.mosesSupposes.fuse.ZigoEngine.doTween.apply(com.mosesSupposes.fuse.ZigoEngine, new Array(this, propName).concat(arguments));
return(_local4);
});
}};
var _local5 = {__resolve:function (name) {
var _local3 = {setter:function (v) {
_global.com.mosesSupposes.fuse.ZigoEngine.doTween(this, ((name == "_tintString") ? "_tint" : (name)), v, 0);
}};
switch (name) {
case "_colorReset" :
_local3.getter = function () {
return(100 - _global.com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(this).tintPercent);
};
break;
case "_colorTransform" :
_local3.getter = function () {
return(Color(new Color(this)).getTransform());
};
break;
case "_fade" :
_local3.getter = function () {
return(this._alpha);
};
break;
case "_size" :
_local3.getter = function () {
return(((this._width == this._height) ? (this._width) : null));
};
break;
case "_scale" :
_local3.getter = function () {
return(((this._xscale == this._yscale) ? (this._xscale) : null));
};
break;
default :
_local3.getter = function () {
return(_global.com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(this)[name.slice(1)]);
};
}
return(_local3);
}};
for (var _local9 in methods) {
shortcuts[_local9] = _local8[_local9];
if ((_local9 != "alphaTo") && (_local9 != "rotateTo")) {
shortcuts[methods[_local9]] = _local5[methods[_local9]];
}
}
shortcuts._tintString = _local5._tintString;
shortcuts._colorTransform = _local5._colorTransform;
shortcuts._fade = _local5._fade;
shortcuts.tween = function (props, endVals, seconds, ease, delay, callback) {
if ((arguments.length == 1) && (typeof(props) == "object")) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween({target:this, action:props}));
}
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, props, endVals, seconds, ease, delay, callback));
};
shortcuts.removeTween = (shortcuts.stopTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.removeTween(this, props);
});
shortcuts.removeAllTweens = (shortcuts.stopAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.removeTween("ALL");
});
shortcuts.isTweening = function (prop) {
return(com.mosesSupposes.fuse.ZigoEngine.isTweening(this, prop));
};
shortcuts.getTweens = function () {
return(com.mosesSupposes.fuse.ZigoEngine.getTweens(this));
};
shortcuts.lockTween = function () {
com.mosesSupposes.fuse.ZigoEngine.lockTween(this, true);
};
shortcuts.unlockTween = function () {
com.mosesSupposes.fuse.ZigoEngine.lockTween(this, false);
};
shortcuts.isTweenLocked = function () {
return(com.mosesSupposes.fuse.ZigoEngine.isTweenLocked(this));
};
shortcuts.isTweenPaused = function (prop) {
return(com.mosesSupposes.fuse.ZigoEngine.isTweenPaused(this, prop));
};
shortcuts.pauseTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.pauseTween(this, props);
};
shortcuts.resumeTween = (shortcuts.unpauseTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.unpauseTween(this, props);
});
shortcuts.pauseAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.pauseTween("ALL");
};
shortcuts.resumeAllTweens = (shortcuts.unpauseAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.unpauseTween("ALL");
});
shortcuts.ffTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.ffTween(this, props);
};
shortcuts.rewTween = function (props, suppressStartEvents) {
com.mosesSupposes.fuse.ZigoEngine.rewTween(this, props, false, suppressStartEvents);
};
shortcuts.rewAndPauseTween = function (props, suppressStartEvents) {
com.mosesSupposes.fuse.ZigoEngine.rewTween(this, props, true, suppressStartEvents);
};
shortcuts.skipTweenTo = function (seconds, props) {
com.mosesSupposes.fuse.ZigoEngine.skipTweenTo(seconds, this, props);
};
shortcuts.bezierTo = function (destX, destY, controlX, controlY, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_bezier_", {x:destX, y:destY, controlX:controlX, controlY:controlY}, seconds, ease, delay, callback));
};
shortcuts.colorTransformTo = function (ra, rb, ga, gb, ba, bb, aa, ab, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_colorTransform", {ra:ra, rb:rb, ga:ga, gb:gb, ba:ba, bb:bb, aa:aa, ab:ab}, seconds, ease, delay, callback));
};
shortcuts.tintTo = function (rgb, percent, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_tint", {tint:rgb, percent:percent}, seconds, ease, delay, callback));
};
shortcuts.slideTo = function (destX, destY, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_x,_y", [destX, destY], seconds, ease, delay, callback));
};
shortcuts.fadeIn = function (seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_fade", 100, seconds, ease, delay, callback));
};
shortcuts.fadeOut = function (seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_fade", 0, seconds, ease, delay, callback));
};
mcshortcuts = new Object();
mcshortcuts._frame = {getter:function () {
return(this._currentframe);
}, setter:function (v) {
this.gotoAndStop(Math.round(v));
}};
mcshortcuts.frameTo = function (endframe, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_frame", ((endframe != undefined) ? (endframe) : (this._totalframes)), seconds, ease, delay, callback));
};
}
static var registryKey = "shortcuts";
static var shortcuts = null;
static var mcshortcuts = null;
}
Symbol 897 MovieClip [__Packages.com.mosesSupposes.fuse.FuseKitCommon] Frame 0
class com.mosesSupposes.fuse.FuseKitCommon
{
static var logOutput;
function FuseKitCommon () {
}
static function _cts() {
return("|_tint|_tintPercent|_brightness|_brightOffset|_contrast|_invertColor|_colorReset|_colorTransform|");
}
static function _resetTo100() {
return("|_alpha|_contrast|_invertColor|_tintPercent|_xscale|_yscale|_scale|");
}
static function _resetTo0() {
return("|_brightness|_brightOffset|_colorReset|_rotation|");
}
static function _underscoreable() {
return(_cts() + "_frame|_x|_y|_xscale|_yscale|_scale|_width|_height|_size|_rotation|_alpha|_fade|_visible|");
}
static function _cbprops() {
return("|skipLevel|cycles|roundResults|extra1|extra2|func|scope|args|startfunc|startscope|startargs|updfunc|updscope|updargs|");
}
static function _fuseEvents() {
return("|onStart|onStop|onPause|onResume|onAdvance|onComplete|");
}
static function _fuseprops() {
return("|command|label|delay|event|eventparams|target|addTarget|trigger|startAt|ease|easing|seconds|duration|time|");
}
static function _validateFuseCommand(c, inGroup, hasArg, outputLevel, simple) {
var _local1 = false;
var _local2 = false;
switch (c) {
case "start" :
case "stop" :
case "pause" :
case "resume" :
case "setStartProps" :
if (inGroup != true) {
_local1 = true;
}
break;
case "delay" :
case "trigger" :
if (simple == true) {
if (hasArg == true) {
_local1 = true;
}
} else {
_local2 = true;
}
inGroup = false;
break;
case "skipTo" :
if (!((hasArg == true) && (inGroup != true))) {
break;
}
_local1 = true;
}
if ((outputLevel > 0) && (_local1 == false)) {
error("109", c, inGroup, _local2);
}
return(_local1);
}
static function output(s) {
if (typeof(logOutput) == "function") {
logOutput(s);
} else {
trace(s);
}
}
static function error(errorCode) {
var _local3 = arguments[1];
var _local4 = arguments[2];
var _local6 = arguments[3];
if (VERBOSE != true) {
output(("[FuseKitCommon#" + errorCode) + "]");
return(undefined);
}
var _local2 = "";
var _local5 = newline;
switch (errorCode) {
case "001" :
_local2 = _local2 + "** ERROR: When using simpleSetup to extend prototypes, you must pass the Shortcuts class. **";
_local2 = _local2 + (_local5 + " import com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + " ZigoEngine.simpleSetup(Shortcuts);") + _local5);
break;
case "002" :
_local2 = _local2 + "** ZigoEngine.doShortcut: shortcuts missing. Use the setup commands: import com.mosesSupposes.fuse.*; ZigoEngine.register(Shortcuts); **";
break;
case "003" :
_local2 = _local2 + ((_local5 + "*** Error: DO NOT use #include \"lmc_tween.as\" with this version of ZigoEngine! ***") + _local5);
break;
case "004" :
_local2 = _local2 + (("** ZigoEngine.doTween - too few arguments [" + _local3) + "].");
if (Boolean(_local4) == true) {
_local2 = _local2 + " If you are trying to use Object Syntax without Fuse, pass FuseItem in your register() or simpleSetup() call. **";
} else {
_local2 = _local2 + " Object syntax call failed. **";
}
break;
case "005" :
_local2 = _local2 + (((("** ZigoEngine.doTween - missing targets[" + _local3) + "] and/or props[") + _local4) + "] **");
break;
case "006" :
_local2 = _local2 + (("** Error: easing shortcut string not recognized (\"" + _local3) + "\"). You may need to pass the in PennerEasing class during register or simpleSetup. **");
break;
case "007" :
_local2 = _local2 + (((("- ZigoEngine: Target locked [" + _local3) + "], ignoring tween call [") + _local4) + "]");
break;
case "008" :
_local2 = _local2 + "** You must register the Shortcuts class in order to use easy string-type callback parsing. **";
break;
case "009" :
_local2 = _local2 + (("** ZigoEngine: A callback parameter \"" + _local3) + "\" was not recognized. **");
break;
case "010" :
_local2 = _local2 + ((((("** " + ((_local3 == true) ? "ZigoEngine" : "FuseItem")) + " unable to parse ") + ((_local4 == 1) ? "callback[" : (String(_local4) + " callbacks["))) + _local6) + "]. Try using the syntax {scope:this, func:\"myFunction\"} **");
break;
case "011" :
_local2 = _local2 + (((("- ZigoEngine: Callbacks discarded via skipLevel 2 option [" + _local3) + "|") + _local4) + "].");
break;
case "012" :
_local2 = _local2 + (((((("- Engine set props or ignored no-change tween on: " + _local3) + ", props passed:[") + _local4) + "], endvals passed:[") + _local6) + "]");
break;
case "013" :
_local2 = _local2 + (((((("- Engine added tween on:\n\ttargets:[" + _local3) + "]\n\tprops:[") + _local4) + "]\n\tendvals:[") + _local6) + "]");
break;
case "014" :
_local2 = _local2 + "** Error: easing function passed is not usable with this engine. Functions need to follow the Robert Penner model. **";
break;
case "015" :
_local2 = _local2 + "** Error: The CustomEasing class must be passed during setup (register or simpleSetup) to use custom easing Arrays. **";
break;
case "016" :
_local2 = _local2 + (("[ ZigoEngine.TIME_MULTIPLIER: " + String(Number(Number(_local3) * 100))) + "% ]");
break;
case "101" :
_local2 = _local2 + "** ERROR: Fuse simpleSetup was removed in version 2.0! **";
_local2 = _local2 + (_local5 + " You must now use the following commands:");
_local2 = _local2 + ((_local5 + _local5) + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + (_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);");
_local2 = _local2 + ((_local5 + "Note that PennerEasing is optional, and FuseFMP is also accepted. (FuseFMP.simpleSetup is run automatically if included.)") + _local5);
break;
case "102" :
_local2 = _local2 + (((("** Fuse " + _local3) + " index or label not found (") + _local4) + ") or out of range. **");
break;
case "103" :
_local2 = _local2 + (((("** Fuse skipTo (" + _local3) + ") ignored - targets the current index (") + _local4) + "). **");
break;
case "104" :
_local2 = _local2 + (("** Fuse fastForward index out of play range (" + _local3) + ") - skipTo has been called instead. **");
break;
case "105" :
_local2 = _local2 + "** An unsupported Array method was called on Fuse. **";
break;
case "106" :
_local2 = _local2 + "** ERROR: You have not set up Fuse correctly. **";
_local2 = _local2 + (_local5 + "You must now use the following commands (PennerEasing is optional).");
_local2 = _local2 + (_local5 + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);") + _local5);
break;
case "107" :
_local2 = _local2 + "** Fuse :: id not found - Aborting open(). **";
break;
case "108" :
_local2 = _local2 + "** Fuse.startRecent: No recent Fuse found to start! **";
break;
case "109" :
_local2 = _local2 + (("** Command \"" + _local3) + "\" discarded. ");
if (_local4 == true) {
_local2 = _local2 + "Not allowed within a group. **";
} else if (_local6 == true) {
_local2 = _local2 + (("Not supported in Object Syntax, use the " + _local3) + " property instead. **");
} else {
_local2 = _local2 + "The command may be unrecognized or missing an argument. **";
}
break;
case "110" :
_local2 = _local2 + (((("** " + _local3) + " illegal Fuse property discarded:\"") + _local4) + "\". Bezier keywords other than x and y cannot be set as start values. **");
break;
case "112" :
_local2 = _local2 + "** Fuse: missing com.mosesSupposes.fuse.ZigoEngine! Cannot tween. **";
break;
case "113" :
_local2 = _local2 + "** FuseItem: A callback has been discarded. Actions with a command may only contain: label, delay, scope, args. **";
break;
case "115" :
_local2 = _local2 + ((_local3 + " overlapping prop discarded: ") + _local4);
break;
case "116" :
_local2 = _local2 + ("** FuseItem Error: Delays within groups (arrays) and start/update callbacks are not supported when using Fuse without ZigoEngine. Although you need to restructure your Fuse, it should be possible to achieve the same results. **" + _local5);
break;
case "117" :
_local2 = _local2 + (("** " + _local3) + ": infinite cycles are not allowed within Fuses - discarded. **");
break;
case "118" :
_local2 = _local2 + ((("** " + _local3) + ": No targets found!") + ((_local4 == true) ? " [Unable to set start props] **" : " [Skipping tween parameters in this action] **"));
break;
case "119" :
_local2 = _local2 + ((((("** " + _local3) + ": ") + ((_local4 == 1) ? "" : (_local4 + " actions in the group"))) + " missing targets") + ((_local6 == true) ? " during setStartProps **" : " **"));
break;
case "120" :
_local2 = _local2 + (((("** " + _local3) + ": conflict with \"") + _local4) + "\". Property might be doubled within a grouped-action array. **");
break;
case "121" :
_local2 = _local2 + "** Fuse timecode formatting requires \"00:\" formatting (example:\"01:01:33\" yields 61.33 seconds.) **";
break;
case "122" :
_local2 = _local2 + (("** Event \"" + _local3) + "\" reserved by Fuse. **");
break;
case "123" :
_local2 = _local2 + (("** A Fuse event parameter failed in " + _local3) + " **");
break;
case "124" :
_local2 = _local2 + (((("** " + _local3) + ": trigger:") + _local4) + " ignored - only one trigger is allowed per action **");
break;
case "125" :
_local2 = _local2 + (_local3 + " Warning - fastForward hit an item during its tween cycle, may malfunction.");
break;
case "201" :
_local2 = _local2 + (("**** FuseFMP cannot initialize argument " + _local3) + " (BitmapFilters cannot be applied to this object type) ****");
break;
case "202" :
_local2 = _local2 + (((("** FuseFMP error: A " + _local3) + " could not be created for ") + _local4) + " **");
break;
case "203" :
_local2 = _local2 + (("** FuseFMP.setFilterProps - too few arguments passed (" + _local3) + ") - minimum 2 required. **");
break;
case "204" :
_local2 = _local2 + (("** FuseFMP.setFilterProps could not locate the filter passed. (" + _local3) + ") **");
}
output(_local2);
}
static function parseCallback(callback, targets, outputLevel, callerIsEngine, addprefix) {
if (callback._vcb == true) {
return(callback);
}
var validCBs = {_vcb:true, skipLevel:_global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL, cycles:1};
if (callback == undefined) {
return(validCBs);
}
var cbErrors = [];
if (typeof(callback) == "object") {
if (((callback.skipLevel != undefined) && (typeof(callback.skipLevel) == "number")) && (callback.skipLevel != _global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL)) {
if ((callback.skipLevel >= 0) && (callback.skipLevel <= 2)) {
validCBs.skipLevel = callback.skipLevel;
}
}
if (callback.cycles != undefined) {
if ((typeof(callback.cycles) == "number") && (callback.cycles > -1)) {
validCBs.cycles = callback.cycles;
} else if (callback.cycles.toUpperCase() == "LOOP") {
validCBs.cycles = 0;
}
}
if (callback.extra1 != undefined) {
validCBs.extra1 = callback.extra1;
}
if (callback.extra2 != undefined) {
validCBs.extra2 = callback.extra2;
}
if ((callback.roundResults === true) || (callback.roundResults === false)) {
validCBs.roundResults = callback.roundResults;
}
} else {
callback = {func:callback};
}
var prefixes = ["start", "upd", ""];
var easyfuncparse = _global.com.mosesSupposes.fuse.Shortcuts.parseStringTypeCallback;
for (var i in prefixes) {
var prefix = prefixes[i];
var fstr = callback[prefix + "func"];
if (((fstr != undefined) && (typeof(fstr) == "string")) && (fstr.indexOf("(") > -1)) {
if (easyfuncparse != undefined) {
var efc = easyfuncparse(fstr);
if (efc.func != undefined) {
callback[prefix + "scope"] = efc.scope;
callback[prefix + "func"] = efc.func;
callback[prefix + "args"] = efc.args;
}
} else if (outputLevel > 0) {
error("008");
}
}
}
var basescope = callback.scope;
for (var i in callback) {
var fi = i.toLowerCase().indexOf("func");
if (fi > -1) {
var prefix = i.slice(0, fi);
var func = callback[i];
var args = callback[prefix + "args"];
var scope = ((callback[prefix + "scope"] == undefined) ? (basescope) : (callback[prefix + "scope"]));
if ((typeof(func) == "string") && (scope[func] == undefined)) {
for (var j in targets) {
var targ = targets[j];
if (typeof(targ[func]) == "function") {
scope = targ;
break;
}
if (typeof(targ._parent[func]) == "function") {
scope = targ._parent;
break;
}
}
if ((scope == undefined) && (_level0[func] != undefined)) {
scope = _level0;
}
if ((scope == undefined) && (_global[func] != undefined)) {
scope = _global;
}
}
if (typeof(func) != "function") {
if (typeof(scope[String(func)]) == "function") {
func = scope[String(func)];
} else {
func = eval (String(func));
}
}
if (func == undefined) {
cbErrors.push(String((((((((addprefix == null) ? (i) : (addprefix + i)) + ":") + ((typeof(callback[i]) == "string") ? (("\"" + callback[i]) + "\"") : (callback[i]))) + "/") + prefix) + "scope:") + scope));
} else {
if ((args != undefined) && (!(args instanceof Array))) {
args = [args];
}
if (prefix == "") {
prefix = "end";
}
validCBs[prefix] = {s:scope, f:func, a:args};
if (callerIsEngine == true) {
validCBs[prefix].id = ++cbTicker;
}
if (prefix == "start") {
validCBs.start.fired = false;
}
}
} else if (_cbprops().indexOf(("|" + i) + "|") == -1) {
error("009", i);
}
}
if ((cbErrors.length > 0) && (outputLevel > 0)) {
if (outputLevel > 0) {
error("010", callerIsEngine, cbErrors.length, cbErrors.toString());
}
}
return(validCBs);
}
static var VERSION = "Fuse Kit 2.1.4 Copyright (c) 2006 Moses Gunesch, MosesSupposes.com under MIT Open Source License";
static var VERBOSE = true;
static var ALL = "ALL";
static var ALLCOLOR = "ALLCOLOR";
static var cbTicker = 0;
}
Symbol 898 MovieClip [__Packages.com.mosesSupposes.fuse.ZigoEngine] Frame 0
class com.mosesSupposes.fuse.ZigoEngine
{
static var extensions, updateTime, tweenHolder, instance, _listeners, broadcastMessage, updateIntId;
function ZigoEngine () {
}
static function addListener(handler) {
AsBroadcaster.initialize(com.mosesSupposes.fuse.ZigoEngine);
addListener(handler);
}
static function removeListener(handler) {
}
static function isPlaying() {
return(_playing);
}
static function simpleSetup(shortcutsClass) {
if (arguments.length > 0) {
register.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
}
_global.ZigoEngine = com.mosesSupposes.fuse.ZigoEngine;
if (extensions.fuse != undefined) {
_global.Fuse = extensions.fuse;
}
if (extensions.fuseFMP != undefined) {
extensions.fuseFMP.simpleSetup();
}
initialize(MovieClip.prototype, Button.prototype, TextField.prototype);
if (extensions.shortcuts == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("001");
}
}
static function register(classReference) {
if (extensions == undefined) {
extensions = {};
}
var _local3 = "|fuse|fuseItem|fuseFMP|shortcuts|pennerEasing|customEasing|";
for (var _local4 in arguments) {
var _local2 = arguments[_local4].registryKey;
if ((extensions[_local2] == undefined) && (_local3.indexOf(("|" + _local2) + "|") > -1)) {
extensions[_local2] = arguments[_local4];
if ((_local2 == "fuseFMP") || (_local2 == "shortcuts")) {
Object(extensions[_local2]).initialize();
}
}
}
}
static function initialize(target) {
if (arguments.length > 0) {
initializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.addShortcutsTo.apply(extensions.shortcuts, arguments);
}
}
}
static function deinitialize(target) {
if ((arguments.length == 0) || (target == null)) {
arguments.push(MovieClip.prototype, Button.prototype, TextField.prototype);
}
deinitializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.removeShortcutsFrom.apply(extensions.shortcuts, arguments);
}
}
static function getUpdateInterval() {
return(updateTime);
}
static function setUpdateInterval(time) {
if (_playing) {
setup(true);
updateTime = time;
setup();
} else {
updateTime = time;
}
}
static function getControllerDepth() {
return(tweenHolder.getDepth());
}
static function setControllerDepth(depth) {
if ((depth == null) || (_global.isNaN(depth) == true)) {
depth = 6789;
}
if (Object(tweenHolder).proof != null) {
tweenHolder.swapDepths(depth);
} else {
tweenHolder = _root.createEmptyMovieClip("ZigoEnginePulse", depth);
}
}
static function doShortcut(targets, methodName) {
if (extensions.shortcuts == undefined) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("002");
}
return(null);
}
return(extensions.shortcuts.doShortcut.apply(extensions.shortcuts, arguments));
}
static function doTween(targets, props, endvals, seconds, ease, delay, callback) {
if (extensions.fuse.addBuildItem(arguments) == true) {
return(null);
}
if (TIME_MULTIPLIER != prevTimeMult) {
TIME_MULTIPLIER = Math.abs(TIME_MULTIPLIER);
if (_global.isNaN(TIME_MULTIPLIER) == true) {
TIME_MULTIPLIER = 1;
}
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("016", TIME_MULTIPLIER);
}
prevTimeMult = TIME_MULTIPLIER;
}
if ((instance == undefined) || ((Object(tweenHolder).proof == undefined) && (updateTime == undefined))) {
if ((MovieClip.prototype.tween != null) && (typeof(_global.$tweenManager) == "object")) {
com.mosesSupposes.fuse.FuseKitCommon.error("003");
}
instance = new com.mosesSupposes.fuse.ZManager();
_playing = false;
}
var _local4 = instance.paramsObj(targets, props, endvals, true);
var _local7 = (((_local4.tg[0] == null) || (_local4.tg.length == 0)) ? undefined : (_local4.tg));
if (((_local4.pa == undefined) || (_local7 == undefined)) || (arguments.length < 3)) {
if (((extensions.fuseItem != null) && (arguments.length == 1)) && (typeof(arguments[0]) == "object")) {
return(extensions.fuseItem.doTween(arguments[0]));
}
if (OUTPUT_LEVEL > 0) {
if (arguments.length < 3) {
com.mosesSupposes.fuse.FuseKitCommon.error("004", (((arguments.length == 1) && (arguments[0] == null)) ? "1 (null)" : (String(arguments.length))), Boolean(extensions.fuseItem == null));
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("005", _local7.toString(), _local4.pa.toString());
}
}
return(null);
}
if (_playing != true) {
setup();
}
if ((seconds == null) || (_global.isNaN(seconds) == true)) {
seconds = DURATION || 1;
} else if (seconds < 0.01) {
seconds = 0;
}
seconds = seconds * TIME_MULTIPLIER;
if (((delay < 0.01) || (delay == null)) || (_global.isNaN(delay) == true)) {
delay = 0;
}
delay = delay * TIME_MULTIPLIER;
var _local12 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(callback, _local7, OUTPUT_LEVEL, true);
var _local9;
if (typeof(ease) == "function") {
if (typeof(Function(ease).call(null, 1, 1, 1, 1)) == "number") {
_local9 = Function(ease);
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("014", ease);
}
} else if ((ease == null) || (ease == "")) {
if (EASING instanceof Function) {
_local9 = Function(EASING);
} else if (extensions.pennerEasing != undefined) {
ease = EASING;
}
}
if ((typeof(ease) == "string") && (ease != "")) {
if (extensions.pennerEasing[ease] != undefined) {
_local9 = extensions.pennerEasing[ease];
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("006", ease);
}
} else if (ease instanceof Array) {
if (extensions.customEasing != undefined) {
_local12.extra1 = ease;
if (typeof(ease[0]) == "number") {
_local9 = extensions.customEasing.precalced;
} else {
_local9 = extensions.customEasing.fromCurve;
}
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("015", ease);
}
}
if (typeof(_local9) != "function") {
_local9 = function (t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
};
}
if (_listeners.length > 0) {
broadcastMessage.call(com.mosesSupposes.fuse.ZigoEngine, "onTweenAdd", _local7, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
}
var _local6 = "";
for (var _local13 in _local7) {
var _local3 = _local7[_local13];
if (_local3.__zigoID__ == null) {
initializeTargets(_local3);
} else if (instance.getStatus("locked", _local3) == true) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("007", ((_local3._name != undefined) ? (_local3._name) : (_local3.toString())), _local4.pa.toString());
}
continue;
}
var _local5 = instance.addTween(_local3, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
_local6 = ((_local5 == null) ? "|" : (_local5 + "|")) + _local6;
}
_local6 = _local6.slice(0, -1);
return((((_local6 == "") || (_local6 == "|")) ? null : (_local6)));
}
static function removeTween(targs, props) {
instance.removeTween(targs, props);
}
static function isTweening(targ, prop) {
return(Boolean(instance.getStatus("active", targ, prop)));
}
static function getTweens(targ) {
if (instance == undefined) {
return(0);
}
return(Number(instance.getStatus("count", targ)));
}
static function lockTween(targ, setLocked) {
instance.alterTweens("lock", targ, setLocked == true);
}
static function isTweenLocked(targ) {
return(Boolean(instance.getStatus("locked", targ)));
}
static function ffTween(targs, props, suppressEndEvents) {
instance.alterTweens("ff", targs, props, null, suppressEndEvents);
}
static function skipTweenTo(seconds, targs, props) {
instance.alterTweens("skipTo", targs, props, false, false, seconds);
}
static function rewTween(targs, props, pauseFlag, suppressStartEvents) {
instance.alterTweens("rewind", targs, props, pauseFlag, suppressStartEvents);
}
static function isTweenPaused(targ, prop) {
return(Boolean(instance.getStatus("paused", targ, prop)));
}
static function pauseTween(targs, props) {
instance.alterTweens("pause", targs, props);
}
static function unpauseTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function resumeTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function setColorByKey(targetObj, type, amt, rgb) {
new Color(targetObj).setTransform(getColorTransObj(type, amt, rgb));
}
static function getColorTransObj(type, amt, rgb) {
switch (type) {
case "brightness" :
var _local3 = 100 - Math.abs(amt);
var _local4 = ((amt > 0) ? (255 * (amt / 100)) : 0);
return({ra:_local3, rb:_local4, ga:_local3, gb:_local4, ba:_local3, bb:_local4});
case "brightOffset" :
return({ra:100, rb:255 * (amt / 100), ga:100, gb:255 * (amt / 100), ba:100, bb:255 * (amt / 100)});
case "contrast" :
return({ra:amt, rb:128 - (1.28 * amt), ga:amt, gb:128 - (1.28 * amt), ba:amt, bb:128 - (1.28 * amt)});
case "invertColor" :
return({ra:100 - (2 * amt), rb:amt * 2.55, ga:100 - (2 * amt), gb:amt * 2.55, ba:100 - (2 * amt), bb:amt * 2.55});
case "tint" :
if (rgb == null) {
break;
}
var _local5;
if (typeof(rgb) == "string") {
if (rgb.charAt(0) == "#") {
rgb = rgb.slice(1);
}
rgb = ((rgb.charAt(1).toLowerCase() != "x") ? ("0x" + rgb) : (rgb));
}
_local5 = Number(rgb);
return({ra:100 - amt, rb:(_local5 >> 16) * (amt / 100), ga:100 - amt, gb:((_local5 >> 8) & 255) * (amt / 100), ba:100 - amt, bb:(_local5 & 255) * (amt / 100)});
}
return({rb:0, ra:100, gb:0, ga:100, bb:0, ba:100});
}
static function getColorKeysObj(targOrTransObj) {
var _local1 = ((targOrTransObj.ra != undefined) ? (targOrTransObj) : (new Color(targOrTransObj).getTransform()));
var _local6 = (_local1.ra == _local1.ga) && (_local1.ga == _local1.ba);
var _local8 = (_local1.rb == _local1.gb) && (_local1.gb == _local1.bb);
var _local3 = {tintPercent:Number(((_local6 == true) ? (100 - _local1.ra) : 0))};
if (_local3.tintPercent != 0) {
var _local5 = 100 / _local3.tintPercent;
_local3.tint = (((_local1.rb * _local5) << 16) | ((_local1.gb * _local5) << 8)) | (_local1.bb * _local5);
var _local2 = _local3.tint.toString(16);
var _local4 = 6 - _local2.length;
while ((_local4--) > 0) {
_local2 = "0" + _local2;
}
_local3.tintString = "0x" + _local2.toUpperCase();
}
if ((_local6 == true) && (_local8 == true)) {
if (_local1.ra < 0) {
_local3.invertColor = _local1.rb * 0.392156862745098;
} else if ((_local1.ra == 100) && (_local1.rb != 0)) {
_local3.brightOffset = _local1.rb * 0.392156862745098;
}
if (_local1.ra != 100) {
if ((_local1.rb == 0) || ((_local1.rb != 0) && (((255 * ((100 - _local1.ra) / 100)) - _local1.rb) <= 1))) {
_local3.brightness = ((_local1.rb != 0) ? (100 - _local1.ra) : (_local1.ra - 100));
}
if (((128 - (1.28 * _local1.ra)) - _local1.rb) <= 1) {
_local3.contrast = _local1.ra;
}
}
}
return(_local3);
}
static function initializeTargets() {
for (var _local5 in arguments) {
var _local4 = arguments[_local5];
if ((((_local4 == MovieClip.prototype) || (_local4 == Button.prototype)) || (_local4 == TextField.prototype)) || (_local4 == Object.prototype)) {
if (_local4.oldAddListener == undefined) {
if (_local4 == TextField.prototype) {
_local4.oldAddListener = _local4.addListener;
_global.ASSetPropFlags(_local4, "oldAddListener", 7, 1);
}
_local4.addListener = function (o) {
if (this.__zigoID__ == undefined) {
com.mosesSupposes.fuse.ZigoEngine.initializeTargets(this);
}
if (this instanceof TextField) {
Function(this.oldAddListener).call(this, o);
} else {
this.addListener(o);
}
};
if (_local4 == MovieClip.prototype) {
_global.ASSetPropFlags(_local4, "addListener", 7, 1);
}
}
} else if (_local4.__zigoID__ == undefined) {
_local4.__zigoID__ = zigoIDs;
_global.ASSetPropFlags(_local4, "__zigoID__", 7, 1);
zigoIDs++;
if ((_local4._listeners == null) || (_local4.addListener == null)) {
AsBroadcaster.initialize(_local4);
}
}
}
}
static function deinitializeTargets() {
for (var _local4 in arguments) {
var _local3 = arguments[_local4];
if (_local3.__zigoID__ != undefined) {
_global.ASSetPropFlags(_local3, "__zigoID__,_listeners,broadcastMessage,addListener,removeListener", 0, 2);
delete _local3.__zigoID__;
delete _local3._listeners;
delete _local3.broadcastMessage;
delete _local3.addListener;
delete _local3.removeListener;
}
if (_local3.oldAddListener != undefined) {
_global.ASSetPropFlags(_local3, "oldAddListener", 0, 2);
_local3.addListener = _local3.oldAddListener;
delete _local3.oldAddListener;
}
}
}
static function __mgrRelay(inst, method, args) {
if (inst == instance) {
Function(com.mosesSupposes.fuse.ZigoEngine[method]).apply(com.mosesSupposes.fuse.ZigoEngine, args);
}
}
static function setup(deinitFlag) {
if (deinitFlag == true) {
_playing = false;
clearInterval(updateIntId);
delete tweenHolder.onEnterFrame;
return(undefined);
}
instance.cleanUp();
clearInterval(updateIntId);
delete updateIntId;
if ((updateTime != null) && (updateTime > 0)) {
updateIntId = setInterval(instance, "update", updateTime);
} else {
if (Object(tweenHolder).proof == null) {
setControllerDepth(6789);
Object(tweenHolder).proof = 1;
}
var _inst = instance;
tweenHolder.onEnterFrame = function () {
_inst.update.call(_inst);
};
}
_playing = true;
instance.now = getTimer();
}
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION + ", ZigoEngine based on concepts by L.Zigo";
static var EASING = "easeOutQuint";
static var DURATION = 1;
static var TIME_MULTIPLIER = 1;
static var ROUND_RESULTS = false;
static var OUTPUT_LEVEL = 1;
static var AUTOSTOP = false;
static var SKIP_LEVEL = 0;
static var _playing = false;
static var zigoIDs = 0;
static var prevTimeMult = 1;
}
Symbol 899 MovieClip [__Packages.com.mosesSupposes.fuse.ZManager] Frame 0
class com.mosesSupposes.fuse.ZManager
{
var tweens, now;
function ZManager () {
tweens = {};
numTweens = 0;
}
function addTween(obj, props, endvals, seconds, ease, delay, callback) {
var _local24 = ((callback.skipLevel == undefined) ? 0 : (callback.skipLevel));
var _local44 = ((callback.cycles == undefined) ? 1 : (callback.cycles));
var _local30 = callback.extra1;
var _local29 = callback.extra2;
var _local23 = [];
var _local14 = _global.com.mosesSupposes.fuse.FuseFMP;
var _local43 = String(("|" + _local14.getAllShortcuts().join("|")) + "|");
var _local42 = com.mosesSupposes.fuse.FuseKitCommon._cts();
var _local25 = "";
var _local28 = "";
var _local22 = obj.__zigoID__;
var _local7 = tweens[String(_local22)];
if ((_local7 != undefined) && (com.mosesSupposes.fuse.ZigoEngine.AUTOSTOP == true)) {
if (obj._listeners.length > 0) {
for (var _local40 in _local7.props) {
_local23.unshift(_local40);
}
}
_local7.numProps = 0;
cleanUp(true);
}
for (var _local47 in props) {
var _local5 = props[_local47];
var _local4 = endvals[_local47];
var _local15 = 0;
if (_local5 == "_fade") {
_local5 = "_alpha";
_local15 = ((_local4 < 50) ? -1 : 1);
}
var _local16 = _local42.indexOf(("|" + _local5) + "|") > -1;
var _local18 = _local7.colorProp;
if (_local7 != undefined) {
if ((_local16 == true) && (_local18 != undefined)) {
_local23.unshift(_local18);
delete _local7.props[_local18];
delete _local7.colorProp;
_local7.numProps--;
} else if (_local7.props[_local5] != undefined) {
_local23.unshift(_local5);
delete _local7[_local5];
_local7.numProps--;
}
}
var _local3 = {c:-1, fmp:-1, complex:-1};
var _local11 = ((_local24 == 0) && ((seconds + delay) == 0)) || ((_local24 > 0) && (seconds == 0));
var _local10 = false;
var _local13 = (_local14 != undefined) && (_local43.indexOf(("|" + _local5) + "|") > -1);
var _local19 = (_local5.toLowerCase().indexOf("colors") > -1) && (_local4 instanceof Array);
var _local27 = ((_local13 == true) && (_local5.indexOf("lor") > -1)) && (_local5.charAt(2) != "l");
if (_local13 == true) {
_local3.fmp = _local14;
_local3.ps = _local14.getFilterProp(obj, _local5, true);
_local3.special = true;
}
if (((_local16 == true) || (_local19 == true)) || (_local27 && (_local11 == false))) {
_local3.complex = 1;
if (_local16 == true) {
_local3.c = new Color(obj);
_local3.ps = Color(_local3.c).getTransform();
var _local17 = ((((_local5 == "_tint") || (_local5 == "_tintPercent")) || (_local5 == "_colorReset")) ? "tint" : (_local5.slice(1)));
var _local9 = null;
var _local12 = null;
if (_local5 != "_colorTransform") {
if (_local17 == "tint") {
if (typeof(_local4) == "object") {
_local12 = _local4.tint;
_local9 = ((_global.isNaN(_local4.percent) == true) ? 100 : (_local4.percent));
} else if ((_local5 == "_tintPercent") || (_local5 == "_colorReset")) {
var _local20 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tintPercent;
if (_local5 == "_colorReset") {
_local9 = Math.min(_local20, 100 - Math.abs(Number(_local4)));
} else {
_local9 = ((typeof(_local4) == "string") ? ((_local20 || 0) + Number(_local4)) : Number(_local4));
}
_local9 = Math.max(0, Math.min(_local9, 100));
_local12 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tint || 0;
} else {
_local12 = _local4;
_local9 = 100;
}
} else {
_local9 = ((typeof(_local4) == "string") ? ((com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj)[_local17] || 0) + Number(_local4)) : (_local4));
}
_local4 = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj(_local17, _local9, _local12);
}
if (_local11 == true) {
if (_local5 == "_colorTransform") {
Color(_local3.c).setTransform(_local4);
} else {
com.mosesSupposes.fuse.ZigoEngine.setColorByKey(obj, _local17, _local9, _local12);
}
} else {
var _local21 = getChangeObj(_local3.ps, _local4, false, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local11 == true) {
_local14.setFilterProp(obj, _local5, _local4);
} else if (_local19 == true) {
_local3.c = 2;
_local3.ch = [];
for (var _local40 in _local4) {
if (_local4[_local40] != null) {
if (_local3.ps == null) {
_local3.ps = [];
}
_local3.ps[_local40] = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, ((_local3.ps[_local40] == null) ? obj[_local5][_local40] : _local3.ps[_local40]));
var _local21 = getChangeObj(_local3.ps[_local40], com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4[_local40]), true, false);
_local3.ch[_local40] = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
}
} else {
_local3.c = 1;
_local3.ps = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local3.ps);
var _local21 = getChangeObj(_local3.ps, com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4), true, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local5 == "_bezier_") {
removeTween(obj, "_x,_y", true);
if (_local11 == true) {
if ((_local4.x != null) && (_global.isNaN(Number(_local4.x)) == false)) {
obj._x = ((typeof(_local4.x) == "string") ? (obj._x + Number(_local4.x)) : (_local4.x));
}
if ((_local4.y != null) && (_global.isNaN(Number(_local4.y)) == false)) {
obj._y = ((typeof(_local4.y) == "string") ? (obj._y + Number(_local4.y)) : (_local4.y));
}
} else {
_local3.special = true;
_local3.ps = 0;
_local3.ch = 1;
_local3.bz = {sx:obj._x, sy:obj._y};
if ((_local4.x == null) || (_global.isNaN(Number(_local4.x)))) {
_local4.x = _local3.bz.sx;
}
if ((_local4.y == null) || (_global.isNaN(Number(_local4.y)))) {
_local4.y = _local3.bz.sy;
}
_local3.bz.chx = ((typeof(_local4.x) == "string") ? (Number(_local4.x)) : (_local4.x - _local3.bz.sx));
if (_global.isNaN(_local3.bz.chx) == true) {
_local3.bx.chx = 0;
}
_local3.bz.chy = ((typeof(_local4.y) == "string") ? (Number(_local4.y)) : (_local4.y - _local3.bz.sy));
if (_global.isNaN(_local3.bz.chy) == true) {
_local3.bx.chy = 0;
}
if ((_local4.controlX == null) || (_global.isNaN(Number(_local4.controlX)))) {
_local3.bz.ctrlx = _local3.bz.sx + (_local3.bz.chx / 2);
} else {
_local3.bz.ctrlx = ((typeof(_local4.controlX) == "string") ? (_local3.bz.sx + Number(_local4.controlX)) : (_local4.controlX));
}
if ((_local4.controlY == null) || (_global.isNaN(Number(_local4.controlY)))) {
_local3.bz.ctrly = _local3.bz.sy + (_local3.bz.chy / 2);
} else {
_local3.bz.ctrly = ((typeof(_local4.controlY) == "string") ? (_local3.bz.sy + Number(_local4.controlY)) : (_local4.controlY));
}
_local3.bz.ctrlx = _local3.bz.ctrlx - _local3.bz.sx;
_local3.bz.ctrly = _local3.bz.ctrly - _local3.bz.sy;
_local10 = (_local3.bz.chx + _local3.bz.chy) != 0;
}
} else {
if (typeof(_local4) == "object") {
_local3.complex = ((_local4 instanceof Array) ? 0 : 1);
}
if ((_local5 == "_x") || (_local5 == "_y")) {
removeTween(obj, "_bezier_", true);
}
if ((_local5 == "_frame") && (typeof(obj) == "movieclip")) {
_local3.ps = obj._currentframe;
_local3.special = true;
} else if (_local13 == false) {
if (_local3.complex > -1) {
_local3.ps = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local40 in _local4) {
_local3.ps[_local40] = obj[_local5][_local40];
}
} else {
_local3.ps = obj[_local5];
}
}
if (_local11 == true) {
if (_local13 == true) {
_local14.setFilterProp(obj, _local5, ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4)));
} else if (_local3.complex > -1) {
for (var _local40 in _local4) {
if ((_local4[_local40] != null) && (_global.isNaN(Number(_local4[_local40])) == false)) {
obj[_local5][_local40] = ((typeof(_local4[_local40]) == "string") ? (_local3.ps[_local40] + Number(_local4[_local40])) : _local4[_local40]);
if (_global.isNaN(obj[_local5][_local40]) == true) {
obj[_local5][_local40] = 0;
}
}
}
} else {
obj[_local5] = ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4));
if (_local15 == 1) {
obj._visible = true;
} else if (_local15 == -1) {
obj._visible = false;
}
}
} else if (_local3.complex > -1) {
var _local21 = getChangeObj(_local3.ps, _local4, _local13, _local3.complex == 0);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
} else {
if ((_local4 == null) || (_global.isNaN(Number(_local4)))) {
_local4 = _local3.ps;
}
_local3.ch = ((typeof(_local4) == "string") ? (Number(_local4)) : (Number(_local4) - _local3.ps));
if (_global.isNaN(_local3.ch) == true) {
_local3.ch = 0;
}
_local10 = _local3.ch != 0;
}
}
if (((_local24 == 0) && ((_local10 == true) || (_local11 == false))) || ((_local10 == true) && (_local11 == false))) {
if ((_local3.complex > -1) && (!(_local3.c === 2))) {
_local3.ps = [_local3.ps];
_local3.ch = [_local3.ch];
}
_local3.ts = now + (delay * 1000);
_local3.pt = -1;
_local3.d = seconds * 1000;
_local3.ef = ease;
_local3.sf = false;
_local3.cycles = _local44;
if (_local30 != undefined) {
_local3.e1 = _local30;
}
if (_local29 != undefined) {
_local3.e2 = _local29;
}
_local3.v = _local15;
if (callback.start != undefined) {
_local3.scb = callback.start;
}
if (callback.upd != undefined) {
_local3.ucb = callback.upd;
}
if (callback.end != undefined) {
_local3.ecb = callback.end;
}
if (callback.roundResults != undefined) {
_local3.rr = callback.roundResults;
}
if (tweens[String(_local22)] == undefined) {
_local7 = (tweens[String(_local22)] = {numProps:0, locked:false, targ:obj, targID:String(("\"" + ((obj._name != undefined) ? (obj._name) : (obj.toString()))) + "\""), targZID:_local22, props:{}});
numTweens++;
}
if (_local16 == true) {
_local7.colorProp = _local5;
}
_local7.props[_local5] = _local3;
_local7.numProps++;
_local25 = (_local5 + ",") + _local25;
_local28 = (((typeof(_local4) == "string") ? (("\"" + _local4) + "\"") : (_local4)) + ",") + _local28;
}
_local3 = undefined;
}
if ((_local7 == undefined) || (_local7.numProps <= 0)) {
cleanUp();
}
if ((_local23.length > 0) && (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)) {
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:obj, props:_local23, __zigoID__:_local22, during:"add"});
}
if (_local25 == "") {
if (_local24 == 2) {
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("011", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString());
}
} else {
var _local48 = obj._listeners.length > 0;
if (_local48 == true) {
obj.broadcastMessage("onTweenStart", {target:obj, props:props});
}
if (callback.start != undefined) {
callback.start.f.apply(callback.start.s, callback.start.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenUpdate", {target:obj, props:props});
}
if (callback.upd != undefined) {
callback.upd.f.apply(callback.upd.s, callback.upd.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenEnd", {target:obj, props:props});
}
if (callback.end != undefined) {
callback.end.f.apply(callback.end.s, callback.end.a);
}
}
cleanUp();
}
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
if (_local25 == "") {
com.mosesSupposes.fuse.FuseKitCommon.error("012", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString(), endvals.toString());
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("013", ((obj._name != undefined) ? (obj._name) : (obj.toString())), _local25.slice(0, -1), _local28.slice(0, -1));
}
}
return(((_local25 == "") ? null : (_local25.slice(0, -1))));
}
function removeTween(targs, props, noInit) {
var _local4 = {};
var _local12 = paramsObj(targs, props);
if (_local12.none == true) {
return(undefined);
}
var _local16 = _local12.all;
var _local17 = _local12.allprops;
var _local9 = ((_local16 == true) ? (tweens) : (Object(_local12.tg)));
var _local8 = false;
for (var _local20 in _local9) {
var _local3 = ((_local16 == true) ? (_local20) : (String(_local9[_local20].__zigoID__)));
var _local2 = tweens[_local3];
var _local6 = ((_local17 == true) ? (_local2.props) : (_local12.props));
for (var _local14 in _local6) {
var _local5 = (_local14 == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) && (_local2.colorProp != undefined);
if ((_local2.props[_local14] != undefined) || (_local5 == true)) {
if (_local4[_local3] == null) {
_local4[_local3] = [];
}
_local4[_local3].unshift(_local14);
if ((_local14 == _local2.colorProp) || (_local5 == true)) {
delete _local2.props[_local2.colorProp];
delete _local2.colorProp;
} else {
delete _local2.props[_local14];
}
_local2.numProps--;
if (_local2.numProps <= 0) {
_local8 = true;
break;
}
}
}
}
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
for (var _local19 in _local4) {
var _local7 = tweens[_local19].targ;
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local7.addProperty) == "function") ? (_local7) : (("[MISSING(\"" + tweens[_local19].targID) + "\")]")), props:_local4[_local19], __zigoID__:tweens[_local19].targZID, during:((noInit == true) ? "add" : "remove")});
}
}
if (_local8 == true) {
cleanUp(noInit);
}
}
function alterTweens(type, targs, props, pauseFlag, noEvents, skipTo) {
if (type == "lock") {
tweens[String(targs.__zigoID__)].locked = props;
return(undefined);
}
var _local11 = paramsObj(targs, props);
if (_local11.none == true) {
return(undefined);
}
var _local14 = _local11.all;
var _local15 = _local11.allprops;
var _local9 = ((_local14 == true) ? (tweens) : (Object(_local11.tg)));
var _local8 = 0;
for (var _local16 in _local9) {
var _local7 = ((_local14 == true) ? (_local16) : (String(_local9[_local16].__zigoID__)));
var _local5 = tweens[_local7];
var _local4 = ((_local15 == true) ? (_local5.props) : (_local11.props));
if (_local4.ALLCOLOR == true) {
_local4[_local5.colorProp] = true;
delete _local4.ALLCOLOR;
}
for (var _local10 in _local4) {
_local8++;
var _local2 = _local5.props[_local10];
if (type == "rewind") {
if (pauseFlag == true) {
_local2.pt = now;
}
_local2.ts = now;
if (noEvents != true) {
_local2.sf = false;
if (_local2.scb != undefined) {
_local2.scb.fired = false;
}
}
} else if (type == "ff") {
if (noEvents == true) {
_local2.suppressEnd = true;
}
_local2.o = true;
_local2.pt = -1;
_local2.ts = now - _local2.d;
} else if (type == "skipTo") {
_local2.ts = Math.min(now, (_local2.ts + (now - _local2.ts)) - (skipTo * 1000));
} else if (type == "pause") {
if (_local2.pt == -1) {
_local2.pt = now;
}
} else if (type == "unpause") {
if (_local2.pt != -1) {
_local2.ts = now - (_local2.pt - _local2.ts);
_local2.pt = -1;
}
}
}
}
if ((type == "ff") && (_local8 > 0)) {
update();
} else if ((type == "rewind") && (_local8 > 0)) {
update(true);
}
}
function getStatus(type, targ, param) {
if (targ == null) {
return(null);
}
var _local8 = String(targ).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
var _local4 = tweens[String(targ.__zigoID__)];
switch (type) {
case "paused" :
var _local2 = _local4.props;
if (param != null) {
if (_local2[String(param)] == undefined) {
return(false);
}
return(Boolean(_local2[String(param)].pt != -1));
}
for (var _local6 in _local2) {
if (_local2[_local6].pt != -1) {
return(true);
}
}
return(false);
case "active" :
if (param == null) {
return(Boolean(_local4 != undefined));
}
if (String(param).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
return(Boolean(_local4.colorProp != undefined));
}
return(Boolean(_local4.props[String(param)] != undefined));
case "count" :
if (!_local8) {
return(_local4.numProps);
}
var _local3 = 0;
for (var _local6 in tweens) {
_local3 = _local3 + tweens[_local6].numProps;
}
return(_local3);
case "locked" :
return(_local4.locked);
}
}
function update(force) {
var _local22 = {};
var _local24 = {};
var _local23 = {};
var _local15 = {};
var _local13 = {};
var _local14 = {};
var _local26 = false;
var _local20 = com.mosesSupposes.fuse.ZigoEngine.ROUND_RESULTS;
for (var _local35 in tweens) {
var _local12 = tweens[_local35];
var _local5 = _local12.targ;
var _local34 = _local12.props;
var _local21 = _local5._listeners.length > 0;
if (_local5.__zigoID__ == undefined) {
_local26 = true;
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
var _local25 = [];
for (var _local30 in _local34) {
_local25.unshift(_local30);
}
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local5.addProperty) == "function") ? (_local5) : (("[MISSING:" + _local12.targID) + "]")), props:_local25, __zigoID__:_local12.targZID, during:"update"});
}
continue;
}
for (var _local30 in _local34) {
var _local3 = _local34[_local30];
if (((_local3.ts > now) || (_local3.pt != -1)) && (force != true)) {
continue;
}
var _local9 = now >= (_local3.ts + _local3.d);
if (_local3.complex == -1) {
var _local6;
if (_local9 == true) {
_local6 = _local3.ps + _local3.ch;
if ((_local3.cycles > 1) || (_local3.cycles == 0)) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local3.ps = _local6;
_local3.ch = -_local3.ch;
_local3.ts = now;
_local9 = false;
}
} else {
_local6 = _local3.ef(now - _local3.ts, _local3.ps, _local3.ch, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local6) == false) {
if ((_local30 != "_bezier_") && ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false))))) {
_local6 = Math.round(Number(_local6));
}
if (_local3.special != true) {
_local5[_local30] = _local6;
} else if (_local3.fmp != -1) {
_local3.fmp.setFilterProp(_local5, _local30, _local6);
} else if (_local30 == "_bezier_") {
var _local10 = _local3.bz;
var _local18 = _local10.sx + (_local6 * (((2 * (1 - _local6)) * _local10.ctrlx) + (_local6 * _local10.chx)));
var _local17 = _local10.sy + (_local6 * (((2 * (1 - _local6)) * _local10.ctrly) + (_local6 * _local10.chy)));
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local18 = Math.round(Number(_local18));
_local17 = Math.round(Number(_local17));
}
_local5._x = _local18;
_local5._y = _local17;
} else if (_local30 == "_frame") {
MovieClip(_local5).gotoAndStop(Math.ceil(_local6));
}
}
} else {
var _local16 = (_local9 == true) && ((_local3.cycles > 1) || (_local3.cycles == 0));
var _local7 = [];
for (var _local27 in _local3.ch) {
var _local4 = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local28 in _local3.ch[_local27]) {
var _local8 = _local3.ch[_local27][_local28];
var _local11 = _local3.ps[_local27][_local28];
if (_local9 == true) {
_local4[_local28] = _local11 + _local8;
if (_local16 == true) {
_local3.ch[_local27][_local28] = -_local8;
}
} else {
_local4[_local28] = _local3.ef(now - _local3.ts, _local11, _local8, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local4[_local28]) == false) {
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local4[_local28] = Math.round(_local4[_local28]);
}
}
if ((_local3.fmp == -1) && (_local3.c == -1)) {
_local5[_local30][_local28] = _local4[_local28];
}
}
_local7.push(_local4);
if ((_local3.fmp == -1) && (_local3.c == 2)) {
_local5[_local30][_local27] = Number(((_local4.rb << 16) | (_local4.gb << 8)) | _local4.bb);
}
}
if (_local3.fmp != -1) {
if (_local3.c == 1) {
_local3.fmp.setFilterProp(_local5, _local30, ((_local7[0].rb << 16) | (_local7[0].gb << 8)) | _local7[0].bb);
} else if (_local3.c == 2) {
var _local19 = [];
for (var _local28 in _local7) {
_local19.unshift(((_local7[_local28].rb << 16) | (_local7[_local28].gb << 8)) | _local7[_local28].bb);
}
_local3.fmp.setFilterProp(_local5, _local30, _local19);
} else {
_local3.fmp.setFilterProp(_local5, _local30, _local7[0]);
}
} else if (_local3.c != -1) {
_local3.c.setTransform(_local7[0]);
}
if (_local16 == true) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local9 = false;
_local3.ts = now;
_local3.ps = _local7;
}
}
if (_local3.sf == false) {
if (_local3.v != 0) {
_local5._visible = true;
}
if (_local21 == true) {
if (_local15[_local35] == undefined) {
_local15[_local35] = [_local5, []];
}
_local15[_local35][1].unshift(_local30);
}
_local3.sf = true;
}
if (_local3.scb.fired == false) {
_local22[String(_local3.scb.id)] = _local3.scb;
_local3.scb.fired = true;
}
if (_local21 == true) {
if (_local13[_local35] == undefined) {
_local13[_local35] = [_local5, []];
}
_local13[_local35][1].unshift(_local30);
}
if (_local3.ucb != undefined) {
_local24[String(_local3.ucb.id)] = _local3.ucb;
}
if (_local9 == true) {
if (_local3.v === -1) {
_local5._visible = false;
}
if (_local3.suppressEnd != true) {
if (_local21 == true) {
if (_local14[_local35] == undefined) {
_local14[_local35] = [_local5, []];
}
_local14[_local35][1].unshift(_local30);
}
if (_local3.ecb != undefined) {
_local23[String(_local3.ecb.id)] = _local3.ecb;
}
}
delete _local34[_local30];
if (_local30 == _local12.colorProp) {
delete _local12.colorProp;
}
_local12.numProps--;
if (_local12.numProps <= 0) {
_local26 = true;
}
}
delete _local3.suppressEnd;
}
}
for (var _local35 in _local15) {
_local15[_local35][0].broadcastMessage("onTweenStart", {target:_local15[_local35][0], props:_local15[_local35][1]});
}
for (var _local35 in _local22) {
_local22[_local35].f.apply(_local22[_local35].s, _local22[_local35].a);
}
for (var _local35 in _local13) {
_local13[_local35][0].broadcastMessage("onTweenUpdate", {target:_local13[_local35][0], props:_local13[_local35][1]});
}
for (var _local35 in _local24) {
_local24[_local35].f.apply(_local24[_local35].s, _local24[_local35].a);
}
for (var _local35 in _local14) {
_local14[_local35][0].broadcastMessage("onTweenEnd", {target:_local14[_local35][0], props:_local14[_local35][1]});
}
for (var _local35 in _local23) {
_local23[_local35].f.apply(_local23[_local35].s, _local23[_local35].a);
}
if (_local26) {
cleanUp();
}
now = getTimer();
}
function cleanUp(noInit) {
for (var _local4 in tweens) {
var _local2 = tweens[_local4].targ;
if ((tweens[_local4].numProps <= 0) || (_local2.__zigoID__ == undefined)) {
if ((((_local2 != undefined) && (_local2.tween == undefined)) && (noInit != true)) && (_local2._listeners.length <= 0)) {
com.mosesSupposes.fuse.ZigoEngine.deinitializeTargets(_local2);
}
delete tweens[_local4];
numTweens--;
}
}
if (numTweens <= 0) {
numTweens = 0;
delete tweens;
tweens = {};
if (noInit != true) {
com.mosesSupposes.fuse.ZigoEngine.__mgrRelay(this, "setup", [true]);
}
}
}
function paramsObj(targs, props, endvals, retainFade) {
var _local6 = {};
_local6.all = String(targs).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
_local6.none = Boolean(targs == null);
if (_local6.all == true) {
_local6.tg = [null];
} else {
_local6.tg = ((targs instanceof Array) ? (targs) : ([targs]));
for (var _local11 in _local6.tg) {
var _local7 = _local6.tg[_local11];
if ((_local7 == null) || (!((typeof(_local7) == "object") || (typeof(_local7) == "movieclip")))) {
_local6.tg.splice(Number(_local11), 1);
}
}
}
_local6.allprops = props == null;
var _local1;
var _local4;
var _local3 = {};
if (_local6.allprops == false) {
if ((typeof(props) == "string") && ((String(props).indexOf(" ") > -1) || (String(props).indexOf(",") > -1))) {
props = String(props.split(" ").join("")).split(",");
}
_local1 = ((props instanceof Array) ? (props.slice()) : ([props]));
if (endvals != undefined) {
if ((typeof(endvals) == "string") && ((String(endvals).indexOf(" ") > -1) || (String(endvals).indexOf(",") > -1))) {
endvals = String(endvals.split(" ").join("")).split(",");
}
_local4 = ((endvals instanceof Array) ? (endvals.slice()) : ([endvals]));
while (_local4.length < _local1.length) {
_local4.push(_local4[_local4.length - 1]);
}
_local4.splice(_local1.length, _local4.length - _local1.length);
}
for (var _local11 in _local1) {
var _local2 = Number(_local11);
if ((_local1[_local11] != "_scale") && (_local1[_local11] != "_size")) {
if (_local3[_local1[_local11]] == undefined) {
if ((_local1[_local11] == "_fade") && (retainFade != true)) {
_local1[_local11] = "_alpha";
}
if (String(_local1[_local11]).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
_local1[_local11] = com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR;
}
_local3[_local1[_local11]] = true;
} else {
_local1.splice(_local2, 1);
_local4.splice(_local2, 1);
}
} else {
var _local8 = String(_local1.splice(_local2, 1)[0]);
var _local5 = _local4.splice(_local2, 1)[0];
if (_local8 == "_scale") {
if (_local3._xscale == undefined) {
_local1.splice(_local2, 0, "_xscale");
_local4.splice(_local2, 0, _local5);
_local3._xscale = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_yscale");
_local4.splice(_local2, 0, _local5);
_local3._yscale = true;
}
}
if (_local8 == "_size") {
if (_local3._width == undefined) {
_local1.splice(_local2, 0, "_width");
_local4.splice(_local2, 0, _local5);
_local3._width = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_height");
_local4.splice(_local2, 0, _local5);
_local3._height = true;
}
}
}
}
for (var _local11 in _local1) {
if (((_local1[_local11] == "_xscale") && (_local3._width == true)) || ((_local1[_local11] == "_yscale") && (_local3._height == true))) {
_local1.splice(Number(_local11), 1);
_local4.splice(Number(_local11), 1);
delete _local3[_local1[_local11]];
}
}
}
_local6.pa = _local1;
_local6.va = _local4;
_local6.props = _local3;
return(_local6);
}
function getChangeObj(ps, ep, isFMP, useArray) {
var _local3 = {map:((useArray == true) ? ([]) : ({})), changed:false};
for (var _local7 in ep) {
if ((((((isFMP == true) && (_local7.charAt(1) == "b")) || (ep[_local7] != ps[_local7])) || (useArray == true)) && (ep[_local7] != null)) && (_global.isNaN(Number(ep[_local7])) == false)) {
_local3.map[_local7] = ((typeof(ep[_local7]) == "string") ? (Number(ep[_local7])) : (ep[_local7] - ps[_local7]));
if (_global.isNaN(_local3.map[_local7]) == true) {
_local3.map[_local7] = 0;
} else if (_local3.map[_local7] != 0) {
_local3.changed = true;
}
}
}
return(_local3);
}
var numTweens = 0;
}
Symbol 900 MovieClip [__Packages.com.mosesSupposes.fuse.PennerEasing] Frame 0
class com.mosesSupposes.fuse.PennerEasing
{
function PennerEasing () {
}
static function linear(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInQuad(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOutQuad(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOutQuad(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeInExpo(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOutExpo(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOutExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeOutInExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 1)) + b);
}
return(((c / 2) * (Math.pow(2, 10 * (t - 2)) + 1)) + b);
}
static function easeInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
static function easeOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static function easeOutInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
return(((0.5 * ((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + (c / 2)) + b);
}
return(((c / 2) + (0.5 * ((a * Math.pow(2, 10 * (t - 2))) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)))) + b);
}
static function easeInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static function easeOutInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) - s)) + 1)) + b);
}
static function easeOutBounce(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeInBounce(t, b, c, d) {
return((c - easeOutBounce(d - t, 0, c, d)) + b);
}
static function easeInOutBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeInBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOutBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutInBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeOutBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeInBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeInCubic(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOutCubic(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOutCubic(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function easeOutInCubic(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((t * t) * t) + 1)) + b);
}
static function easeInQuart(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOutQuart(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOutQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function easeOutInQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((((t * t) * t) * t) - 1)) + b);
}
t--;
return(((c / 2) * ((((t * t) * t) * t) + 1)) + b);
}
static function easeInQuint(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOutQuint(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOutQuint(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static function easeOutInQuint(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInSine(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOutSine(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOutSine(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutInSine(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.sin((Math.PI * t) / 2)) + b);
}
t--;
return((((-c) / 2) * (Math.cos((Math.PI * t) / 2) - 2)) + b);
}
static function easeInCirc(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOutCirc(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOutCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeOutInCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return(((c / 2) * Math.sqrt(1 - (t * t))) + b);
}
t--;
return(((c / 2) * (2 - Math.sqrt(1 - (t * t)))) + b);
}
static var registryKey = "pennerEasing";
}
Symbol 901 MovieClip [__Packages.scrollBar] Frame 0
class scrollBar
{
var myspeed, fiction, btn_scroll_fiction, runIn, mc, mask, drager_mc, barBg_mc, up_btn, down_btn, scrolll_speed, content_height, mc_pos, axis_track, drager_pos, axis_bar, start_drage, target, d_out, u_out, mouse_target;
function scrollBar (runIn, mc, mask, drager_mc, barBg_mc, up_btn, down_btn, scrollbar_fiction, scrollspeed) {
clea_up(this);
myspeed = scrollspeed;
if (scrollbar_fiction) {
fiction = 10;
btn_scroll_fiction = 0.9;
} else {
fiction = 1;
btn_scroll_fiction = 0;
}
this.runIn = runIn;
this.mc = mc;
this.mask = mask;
this.drager_mc = drager_mc;
this.barBg_mc = barBg_mc;
this.up_btn = up_btn;
this.down_btn = down_btn;
this.drager_mc.ctr = this;
this.barBg_mc.ctr = this;
this.up_btn.ctr = this;
this.down_btn.ctr = this;
init();
}
function init(c_content_height) {
mc._y = (mask._y = 0);
drager_mc._y = barBg_mc._y;
drager_mc._x = barBg_mc._x;
scrolll_speed = myspeed;
if (!c_content_height) {
content_height = mc._height;
} else {
content_height = c_content_height;
}
if (content_height < mask._height) {
hide_scroll_bar();
} else {
show_scroll_bar();
}
mc.setMask(mask);
mc_pos = {strat:mask._y, current:0};
axis_track = {height:(mask._y - content_height) + mask._height};
drager_pos = {strat:barBg_mc._y, current:0};
axis_bar = {height:Math.round(barBg_mc._height - drager_mc._height), local_y:Math.round((barBg_mc._y + barBg_mc._height) - drager_mc._height)};
setBtns();
}
function setBtns() {
drager_mc.onPress = function () {
removeMovieClip(this.ctr.runIn.timer_1);
this.ctr.start_drage = true;
this.ctr.runIn.createEmptyMovieClip("timer", 0);
this.ctr.different = this.ctr.runIn._ymouse - this._y;
this.ctr.runIn.timer.ctr = this.ctr;
this.ctr.runIn.timer.onEnterFrame = function () {
this.ctr.drage_drager();
if (this.ctr.start_drage) {
if ((this.ctr.drager_mc._y >= this.ctr.drager_pos.strat) and (this.ctr.drager_mc._y <= this.ctr.axis_bar.local_y)) {
this.ctr.drager_mc._y = this.ctr.runIn._ymouse - this.ctr.different;
}
if (this.ctr.drager_mc._y < this.ctr.drager_pos.strat) {
this.ctr.drager_mc._y = this.ctr.drager_pos.strat;
}
if (this.ctr.drager_mc._y > this.ctr.axis_bar.local_y) {
this.ctr.drager_mc._y = this.ctr.axis_bar.local_y;
}
}
};
};
drager_mc.onRelease = (drager_mc.onReleaseOutside = function () {
this.ctr.start_drage = false;
});
up_btn.onPress = function () {
this.ctr.d_out = false;
this.ctr.scrolll_speed = this.ctr.myspeed;
this.ctr.runIn.createEmptyMovieClip("timer_1", 1);
this.ctr.runIn.timer_1.ctr = this.ctr;
this.ctr.runIn.timer_1.onEnterFrame = function () {
this.ctr.drager_down();
this.ctr.drage_drager();
};
};
down_btn.onPress = function () {
this.ctr.u_out = false;
this.ctr.scrolll_speed = this.ctr.myspeed;
this.ctr.runIn.createEmptyMovieClip("timer_1", 1);
this.ctr.runIn.timer_1.ctr = this.ctr;
this.ctr.runIn.timer_1.onEnterFrame = function () {
this.ctr.drager_up();
this.ctr.drage_drager();
};
};
up_btn.onRelease = (up_btn.onReleaseOutside = function () {
this.ctr.d_out = true;
});
down_btn.onRelease = (down_btn.onReleaseOutside = function () {
this.ctr.u_out = true;
});
barBg_mc.onPress = function () {
this.ctr.mouse_target = this.ctr.runIn._ymouse;
this.ctr.runIn.createEmptyMovieClip("timer_1", 1);
this.ctr.runIn.timer_1.ctr = this.ctr;
this.ctr.runIn.timer_1.onEnterFrame = function () {
this.ctr.barBg_mc_hit();
this.ctr.drage_drager();
};
};
}
function drager_release() {
start_drage = false;
}
function drage_drager() {
drager_pos.current = drager_mc._y - drager_pos.strat;
target = (drager_pos.current / axis_bar.height) * axis_track.height;
mc._y = mc._y - ((mc._y - target) / fiction);
}
function drager_down() {
if (d_out) {
scrolll_speed = scrolll_speed * btn_scroll_fiction;
}
if (drager_mc._y > drager_pos.strat) {
if (scrolll_speed > 0.001) {
drager_mc._y = drager_mc._y - scrolll_speed;
}
}
}
function drager_up() {
if (u_out) {
scrolll_speed = scrolll_speed * btn_scroll_fiction;
}
if (drager_mc._y < axis_bar.local_y) {
if (scrolll_speed > 0.001) {
drager_mc._y = drager_mc._y + scrolll_speed;
}
}
}
function barBg_mc_hit() {
if ((drager_mc._y >= drager_pos.strat) and (drager_mc._y <= axis_bar.local_y)) {
drager_mc._y = drager_mc._y - ((drager_mc._y - mouse_target) / fiction);
}
if (drager_mc._y > axis_bar.local_y) {
drager_mc._y = axis_bar.local_y;
}
if (drager_mc._y < drager_pos.strat) {
drager_mc._y = drager_pos.strat;
}
}
function hide_scroll_bar() {
up_btn._alpha = (drager_mc._alpha = (down_btn._alpha = (barBg_mc._alpha = 0)));
up_btn.enabled = (drager_mc.enabled = (down_btn.enabled = (barBg_mc.enabled = false)));
}
function show_scroll_bar() {
up_btn._alpha = (drager_mc._alpha = (down_btn._alpha = (barBg_mc._alpha = 100)));
up_btn.enabled = (drager_mc.enabled = (down_btn.enabled = (barBg_mc.enabled = true)));
}
function clea_up(_this) {
removeMovieClip(_this.timer_1);
removeMovieClip(drager_mc.timer);
}
}
Symbol 258 MovieClip Frame 1
gotoAndPlay(_root.Maths.randomInt(1, this._totalframes));
Symbol 258 MovieClip Frame 261
gotoAndPlay (2);
Symbol 265 MovieClip Frame 1
gotoAndPlay(_root.Maths.randomInt(1, this._totalframes));
Symbol 265 MovieClip Frame 957
gotoAndPlay (2);
Symbol 286 MovieClip Frame 1
gotoAndPlay(_root.Maths.randomInt(1, 5));
Symbol 334 MovieClip Frame 1
gotoAndStop(_parent.frame);
Symbol 335 MovieClip Frame 1
gotoAndStop(_parent.frame);
Symbol 335 MovieClip Frame 41
gotoAndStop(_parent.frame);
Symbol 355 MovieClip Frame 1
gotoAndStop(_parent.frame);
Symbol 356 MovieClip Frame 1
gotoAndStop(_parent.frame);
Symbol 428 MovieClip [scoreIndicator] Frame 33
this.removeMovieClip();
Symbol 476 Button
on (release) {
_root.objSounds.play("beep");
_root.objTrans.goto("game");
}
on (rollOver) {
_root.objSounds.play("boop");
}
Symbol 478 Button
on (release) {
_root.objSounds.play("beep");
_root.objTrans.goto("highscores", function () {
highscores.box.gotoAndPlay("in");
});
}
on (rollOver) {
_root.objSounds.play("boop");
}
Symbol 480 Button
on (release) {
_root.objSounds.play("beep");
_root.objTrans.goto("stf", function () {
stf.box.gotoAndPlay("in");
});
}
on (rollOver) {
_root.objSounds.play("boop");
}
Symbol 485 Button
on (release) {
_level0.trackPoint("Sound_TurnedOff");
_root.objSounds.play("beep");
gotoAndStop ("off");
}
on (rollOver) {
_root.objSounds.play("boop");
}
Symbol 489 Button
on (release) {
_level0.trackPoint("Sound_TurnedOn");
_root.objSounds.play("beep");
gotoAndStop ("on");
}
on (rollOver) {
_root.objSounds.play("boop");
}
Symbol 490 MovieClip Frame 1
stop();
_root.objSounds.setMute(false);
Symbol 490 MovieClip Frame 11
_root.objSounds.setMute(true);
Symbol 493 Button
on (release) {
_root.objSounds.play("beep");
_root.objTrans.goto("game");
}
on (rollOver) {
_root.objSounds.play("boop");
}
Symbol 541 Button
on (release) {
_level0.trackPoint("Section_keyschangedto_righty");
gotoAndStop ("righty");
}
Symbol 542 Button
on (release) {
_level0.trackPoint("Section_keyschangedto_lefty");
gotoAndStop ("lefty");
}
Symbol 543 MovieClip Frame 1
gotoAndStop(_root.keyDir);
Symbol 543 MovieClip Frame 11
_root.keyDir = "lefty";
Symbol 543 MovieClip Frame 21
_root.keyDir = "righty";
Symbol 552 MovieClip Frame 1
stop();
Symbol 554 Button
on (release) {
_root.objSounds.play("beep");
_root.objTrans.goto("instructions");
}
on (rollOver) {
_root.objSounds.play("boop");
}
Symbol 777 MovieClip Frame 1
this.done = false;
Symbol 777 MovieClip Frame 50
this.done = true;
gotoAndPlay ("again");
Symbol 796 MovieClip Frame 1
gotoAndStop ("idle");
Symbol 796 MovieClip Frame 11
_parent.content._visible = false;
Symbol 796 MovieClip Frame 44
stop();
_parent.gotoAndStop("active");
_parent.content.fadeIn();
Symbol 810 Button
on (release) {
gotoAndStop ("terms");
}
Symbol 854 Button
on (release) {
gotoAndStop ("terms");
}
Symbol 860 Button
on (release) {
gotoAndStop(_root.gameEnd);
}
Symbol 863 MovieClip Frame 1
stop();
_parent.setupForm();
Symbol 863 MovieClip Frame 11
_parent.setupForm();
Symbol 864 MovieClip Frame 1
function setupForm() {
content.errName._visible = false;
content.btnSubmit.onRelease = function () {
_root.objSounds.play("beep");
var _local3 = true;
content.errName._visible = false;
if (content.txtName.text == "") {
_local3 = false;
content.errName._visible = true;
}
if (_local3) {
var _local2 = new LoadVars();
var _local4 = new LoadVars();
_local2.name = content.txtName.text;
_local2.email = content.txtEmail.text;
_local2.score = _root.score;
_local2.sendAndLoad(_root.compURL + "score", _local4, "get");
_level0.trackPoint("Highscore_Submitted");
_root.objHS.submitScore(content.txtName.text, _root.score, {email:content.txtEmail.text});
_root.objTrans.goto("highscores", function () {
highscores.box.gotoAndPlay("in");
});
}
};
content.btnSubmit.onRollover = function () {
_root.objSounds.play("boop");
};
}
Symbol 880 Button
on (release) {
_root.objSounds.play("beep");
gotoAndStop ("form");
}
on (rollOver) {
_root.objSounds.play("boop");
}
Symbol 883 MovieClip Frame 1
function customIsValid() {
_root.objSounds.play("beep");
return(true);
}
_level0.trackPoint("STF_Presented");
stop();
_root.Datacap = function (formID, thirdPartySubmit) {
this.formID = formID;
this.thirdPartySubmit = thirdPartySubmit;
this.controls = [];
this.formInstance = undefined;
this.sendingFrame = "";
this.successFrame = "";
this.failureFrame = "";
this.userID = 0;
this.customIsValid = undefined;
this.preSubmit = undefined;
this.onSuccess = undefined;
this.onFailure = undefined;
this.datacapURL = "http://www.hyperlaunch.com/datacap/datacap";
this.datacapExtension = "php";
if (_level0.debug) {
trace("Creating data form, ID=" + formID);
}
var _local4 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local4.data.userID == undefined) {
_local4.data.userID = Math.floor(Math.random() * 100000000) + 100000000;
}
this.userID = _local4.data.userID;
_local4.flush();
this.registerTextbox = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered textbox " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for textbox " + varName) + "");
}
this.controls.push({style:"textbox", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateTextbox, autoFill:this.autoFillTextbox});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateTextbox = function (control) {
if (control.errorMarker != undefined) {
if ((control.instance.text == undefined) || (control.instance.text == "")) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillTextbox = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.text = _local1.data[control.varName];
}
};
this.registerEmailbox = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered emailbox " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for emailbox " + varName) + "");
}
this.controls.push({style:"emailbox", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateEmailbox, autoFill:this.autoFillEmailbox});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateEmailbox = function (control) {
if (control.errorMarker != undefined) {
var _local3 = true;
if (control.instance.text == undefined) {
_local3 = false;
}
if (control.instance.text == "") {
_local3 = false;
}
var _local5 = control.instance.text.split("@");
if (_local5.length != 2) {
_local3 = false;
}
if (_local5[0] == "") {
_local3 = false;
}
var _local2 = _local5[1].split(".");
if (_local2.length < 2) {
_local3 = false;
}
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] == "") {
_local3 = false;
}
_local1++;
}
if (_local3) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = false;
return(true);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = true;
return(false);
}
return(true);
};
this.autoFillEmailbox = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.text = _local1.data[control.varName];
}
};
this.registerNumberbox = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered numberbox " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for numberbox " + varName) + "");
}
this.controls.push({style:"numberbox", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateNumberbox, autoFill:this.autoFillNumberbox});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateNumberbox = function (control) {
if (control.errorMarker != undefined) {
if (((control.instance.text == undefined) || (control.instance.text == "")) || (isNaN(parseInt(control.instance.text)))) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillNumberbox = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.text = _local1.data[control.varName];
}
};
this.registerCheckbox = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered checkbox " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for checkbox " + varName) + "");
}
this.controls.push({style:"checkbox", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateCheckbox, autoFill:this.autoFillCheckbox});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateCheckbox = function (control) {
if (control.errorMarker != undefined) {
if (_level0.debug) {
trace((("Validating " + control.style) + " ") + control.varName);
}
if (control.instance.selected != true) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillCheckbox = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.selected = _local1.data[control.varName];
control.instance.gotoAndStop((_local1.data[control.varName] ? "checked" : (unchecked)));
}
};
this.registerRadioSet = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered radioset " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for radioset " + varName) + "");
}
this.controls.push({style:"radioset", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateRadioSet, autoFill:this.autoFillRadioSet});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateRadioSet = function (control) {
if (control.errorMarker != undefined) {
if (control.instance.selection == undefined) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillRadioSet = function (control) {
return(undefined);
};
this.registerDropdown = function (varName, instance, errorMarker) {
if (_level0.debug) {
trace((("Registered dropdown " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for dropdown " + varName) + "");
}
this.controls.push({style:"dropdown", varName:varName, instance:instance, errorMarker:errorMarker, isValid:this.validateDropdown, autoFill:this.autoFillDropdown});
instance.tabIndex = this.controls.length;
instance.objForm = this;
errorMarker._visible = false;
};
this.validateDropdown = function (control) {
if (control.errorMarker != undefined) {
if (control.instance.selectedIndex == 0) {
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Invalid");
}
control.errorMarker._visible = true;
return(false);
}
if (_level0.debug) {
trace(((("Validating " + control.style) + " ") + control.varName) + ": Valid");
}
control.errorMarker._visible = false;
return(true);
}
return(true);
};
this.autoFillDropdown = function (control) {
var _local1 = SharedObject.getLocal("hyperlaunchDatacap");
if (_local1.data[control.varName] != undefined) {
control.instance.selectedIndex = _local1.data[control.varName];
}
};
this.registerSubmit = function (varName, instance, value) {
if (_level0.debug) {
trace((("Registered submit button " + varName) + " errorMarker=") + errorMarker);
}
if (instance == undefined) {
trace(("Error: Instance not found for submit button " + varName) + "");
}
this.controls.push({style:"submit", varName:varName, instance:instance, value:value});
instance.objForm = this;
instance.tabIndex = this.controls.length;
instance.onRelease = this.submitForm;
};
this.setHiddenValue = function (varName, value) {
if (_level0.debug) {
trace((("Set hidden value " + varName) + "=") + value);
}
var _local3;
var _local2 = 0;
while (_local2 < this.controls.length) {
if (this.controls[_local2].style == "hidden") {
if (this.controls[_local2].varName == varName) {
_local3 = _local2;
}
}
_local2++;
}
if (_local3 == undefined) {
this.controls.push({style:"hidden", varName:varName, value:value});
} else {
this.controls[_local3].value = value;
}
};
this.registerFrames = function (sendingFrame, successFrame, failureFrame, formInstance) {
if (_level0.debug) {
trace("Registered frames for instance " + formInstance);
}
if (formInstance == undefined) {
trace("Error: Registering frames, form instance invalid");
}
this.formInstance = formInstance;
this.sendingFrame = sendingFrame;
this.successFrame = successFrame;
this.failureFrame = failureFrame;
};
this.registerCallbacks = function (customIsValid, preSubmit, onSuccess, onFailure) {
if (_level0.debug) {
trace("Registered callbacks");
}
this.customIsValid = customIsValid;
this.preSubmit = preSubmit;
this.onSuccess = onSuccess;
this.onFailure = onFailure;
};
this.submitForm = function () {
if (_level0.debug) {
trace("Submit pressed - validating");
}
var _local6 = true;
if (this.objForm.customIsValid != undefined) {
if (!this.objForm.customIsValid()) {
_local6 = false;
}
}
var _local2 = 0;
while (_local2 < this.objForm.controls.length) {
if (this.objForm.controls[_local2].isValid != undefined) {
if (!this.objForm.controls[_local2].isValid(this.objForm.controls[_local2])) {
_local6 = false;
}
}
_local2++;
}
if (_local6) {
if (_level0.debug) {
trace("Form validated - sending");
}
if (_level0.debug) {
trace("Submitting form");
}
var _local5 = new LoadVars();
var _local7 = new LoadVars();
_local7.objForm = this.objForm;
this.objForm.preSubmit();
var _local4 = SharedObject.getLocal("hyperlaunchDatacap");
_local2 = 0;
while (_local2 < this.objForm.controls.length) {
var _local3 = "";
switch (this.objForm.controls[_local2].style) {
case "textbox" :
_local3 = this.objForm.controls[_local2].instance.text;
_local4.data[this.objForm.controls[_local2].varName] = _local3;
break;
case "emailbox" :
_local3 = this.objForm.controls[_local2].instance.text;
_local4.data[this.objForm.controls[_local2].varName] = _local3;
break;
case "numberbox" :
_local3 = this.objForm.controls[_local2].instance.text;
_local4.data[this.objForm.controls[_local2].varName] = _local3;
break;
case "checkbox" :
_local3 = (this.objForm.controls[_local2].instance.selected ? true : false);
_local4.data[this.objForm.controls[_local2].varName] = _local3;
break;
case "radioset" :
_local3 = this.objForm.controls[_local2].instance.selection.data;
break;
case "dropdown" :
_local3 = this.objForm.controls[_local2].instance.selectedItem.data;
_local4.data[this.objForm.controls[_local2].varName] = this.objForm.controls[_local2].instance.selectedIndex;
break;
case "hidden" :
_local3 = this.objForm.controls[_local2].value;
break;
case "submit" :
_local3 = this.objForm.controls[_local2].value;
this.objForm.controls[_local2].instance._visible = false;
break;
default :
trace("Unhandled component style " + this.objForm.controls[_local2].style);
}
if (_level0.debug) {
trace(((" " + this.objForm.controls[_local2].varName) + " = ") + _local3);
}
_local5[this.objForm.controls[_local2].varName] = _local3;
_local2++;
}
_local4.flush();
_local5.userID = this.objForm.userID;
_local5.formID = this.objForm.formID;
_local7.onLoad = function (success) {
trace("SUCCESS: " + success);
if (success) {
if (_level0.debug) {
trace("Success");
}
this.objForm.onSuccess();
if (this.objForm.formInstance != undefined) {
this.objForm.formInstance.gotoAndStop(this.objForm.successFrame);
}
} else {
if (_level0.debug) {
trace("Failed");
}
this.objForm.onFailure();
if (this.objForm.formInstance != undefined) {
this.objForm.formInstance.gotoAndStop(this.objForm.failureFrame);
}
}
};
var _local8 = ((this.objForm.datacapURL + ((this.objForm.thirdPartySubmit == undefined) ? "" : ("_" + this.objForm.thirdPartySubmit))) + ".") + this.objForm.datacapExtension;
_local5.sendAndLoad(_local8, _local7, "POST");
if (this.objForm.formInstance != undefined) {
this.objForm.formInstance.gotoAndStop(this.objForm.sendingFrame);
}
} else if (_level0.debug) {
trace("Form data not validated");
}
};
this.autoFill = function () {
var _local2 = 0;
while (_local2 < this.controls.length) {
this.controls[_local2].autoFill(this.controls[_local2]);
_local2++;
}
};
this.onKeyDown = function () {
if ((Key.isDown(16) && (Key.isDown(17))) && (Key.isDown(192))) {
this.autoFill();
}
};
Key.addListener(this);
trace("Press ctrl+shift+@ to autofill form with previously entered values");
this.initCountryDropDown = function (dropdownClip) {
dropdownClip.addItem("Select Country", "NIL");
dropdownClip.addItem("United Kingdom", "GB");
dropdownClip.addItem("Ireland", "IE");
dropdownClip.addItem("France", "FR");
dropdownClip.addItem("Spain", "ES");
dropdownClip.addItem("Netherlands", "NL");
dropdownClip.addItem("Italy", "IT");
dropdownClip.addItem("Germany", "DE");
dropdownClip.addItem("United States", "US");
dropdownClip.addItem("Canada", "CA");
dropdownClip.addItem("---------------------", "--");
dropdownClip.addItem("Afghanistan", "AF");
dropdownClip.addItem("Albania", "AL");
dropdownClip.addItem("Algeria", "DZ");
dropdownClip.addItem("American Samoa", "AS");
dropdownClip.addItem("Andorra", "AD");
dropdownClip.addItem("Angola", "AO");
dropdownClip.addItem("Anguilla", "AI");
dropdownClip.addItem("Antarctica", "AQ");
dropdownClip.addItem("Antigua And Barbuda", "AG");
dropdownClip.addItem("Argentina", "AR");
dropdownClip.addItem("Armenia", "AM");
dropdownClip.addItem("Aruba", "AW");
dropdownClip.addItem("Australia", "AU");
dropdownClip.addItem("Austria", "AT");
dropdownClip.addItem("Azerbaijan", "AZ");
dropdownClip.addItem("Bahamas", "BS");
dropdownClip.addItem("Bahrain", "BH");
dropdownClip.addItem("Bangladesh", "BD");
dropdownClip.addItem("Barbados", "BB");
dropdownClip.addItem("Belarus", "BY");
dropdownClip.addItem("Belgium", "BE");
dropdownClip.addItem("Belize", "BZ");
dropdownClip.addItem("Benin", "BJ");
dropdownClip.addItem("Bermuda", "BM");
dropdownClip.addItem("Bhutan", "BT");
dropdownClip.addItem("Bolivia", "BO");
dropdownClip.addItem("Bosnia And Herzegowina", "BA");
dropdownClip.addItem("Botswana", "BW");
dropdownClip.addItem("Bouvet Island", "BV");
dropdownClip.addItem("Brazil", "BR");
dropdownClip.addItem("British Indian Ocean Territory", "IO");
dropdownClip.addItem("Brunei Darussalam", "BN");
dropdownClip.addItem("Bulgaria", "BG");
dropdownClip.addItem("Burkina Faso", "BF");
dropdownClip.addItem("Burundi", "BI");
dropdownClip.addItem("Cambodia", "KH");
dropdownClip.addItem("Cameroon", "CM");
dropdownClip.addItem("Cape Verde", "CV");
dropdownClip.addItem("Cayman Islands", "KY");
dropdownClip.addItem("Central African Republic", "CF");
dropdownClip.addItem("Chad", "TD");
dropdownClip.addItem("Chile", "CL");
dropdownClip.addItem("China", "CN");
dropdownClip.addItem("Christmas Island", "CX");
dropdownClip.addItem("Cocos (Keeling) Islands", "CC");
dropdownClip.addItem("Colombia", "CO");
dropdownClip.addItem("Comoros", "KM");
dropdownClip.addItem("Congo", "CG");
dropdownClip.addItem("Cook Islands", "CK");
dropdownClip.addItem("Costa Rica", "CR");
dropdownClip.addItem("Cote D'Ivoire", "CI");
dropdownClip.addItem("Croatia (Local Name: Hrvatska)", "HR");
dropdownClip.addItem("Cuba", "CU");
dropdownClip.addItem("Cyprus", "CY");
dropdownClip.addItem("Czech Republic", "CZ");
dropdownClip.addItem("Denmark", "DK");
dropdownClip.addItem("Djibouti", "DJ");
dropdownClip.addItem("Dominica", "DM");
dropdownClip.addItem("Dominican Republic", "DO");
dropdownClip.addItem("East Timor", "TP");
dropdownClip.addItem("Ecuador", "EC");
dropdownClip.addItem("Egypt", "EG");
dropdownClip.addItem("El Salvador", "SV");
dropdownClip.addItem("Equatorial Guinea", "GQ");
dropdownClip.addItem("Eritrea", "ER");
dropdownClip.addItem("Estonia", "EE");
dropdownClip.addItem("Ethiopia", "ET");
dropdownClip.addItem("Falkland Islands (Malvinas)", "FK");
dropdownClip.addItem("Faroe Islands", "FO");
dropdownClip.addItem("Fiji", "FJ");
dropdownClip.addItem("Finland", "FI");
dropdownClip.addItem("French Guiana", "GF");
dropdownClip.addItem("French Polynesia", "PF");
dropdownClip.addItem("French Southern Territories", "TF");
dropdownClip.addItem("Gabon", "GA");
dropdownClip.addItem("Gambia", "GM");
dropdownClip.addItem("Georgia", "GE");
dropdownClip.addItem("Ghana", "GH");
dropdownClip.addItem("Gibraltar", "GI");
dropdownClip.addItem("Greece", "GR");
dropdownClip.addItem("Greenland", "GL");
dropdownClip.addItem("Grenada", "GD");
dropdownClip.addItem("Guadeloupe", "GP");
dropdownClip.addItem("Guam", "GU");
dropdownClip.addItem("Guatemala", "GT");
dropdownClip.addItem("Guinea", "GN");
dropdownClip.addItem("Guinea-Bissau", "GW");
dropdownClip.addItem("Guyana", "GY");
dropdownClip.addItem("Haiti", "HT");
dropdownClip.addItem("Heard And Mc Donald Islands", "HM");
dropdownClip.addItem("Holy See (Vatican City State)", "VA");
dropdownClip.addItem("Honduras", "HN");
dropdownClip.addItem("Hong Kong", "HK");
dropdownClip.addItem("Hungary", "HU");
dropdownClip.addItem("Icel And", "IS");
dropdownClip.addItem("India", "IN");
dropdownClip.addItem("Indonesia", "ID");
dropdownClip.addItem("Iran (Islamic Republic Of)", "IR");
dropdownClip.addItem("Iraq", "IQ");
dropdownClip.addItem("Israel", "IL");
dropdownClip.addItem("Jamaica", "JM");
dropdownClip.addItem("Japan", "JP");
dropdownClip.addItem("Jordan", "JO");
dropdownClip.addItem("Kazakhstan", "KZ");
dropdownClip.addItem("Kenya", "KE");
dropdownClip.addItem("Kiribati", "KI");
dropdownClip.addItem("Korea, Dem People'S Republic", "KP");
dropdownClip.addItem("Korea, Republic Of", "KR");
dropdownClip.addItem("Kuwait", "KW");
dropdownClip.addItem("Kyrgyzstan", "KG");
dropdownClip.addItem("Lao People'S Dem Republic", "LA");
dropdownClip.addItem("Latvia", "LV");
dropdownClip.addItem("Lebanon", "LB");
dropdownClip.addItem("Lesotho", "LS");
dropdownClip.addItem("Liberia", "LR");
dropdownClip.addItem("Libyan Arab Jamahiriya", "LY");
dropdownClip.addItem("Liechtenstein", "LI");
dropdownClip.addItem("Lithuania", "LT");
dropdownClip.addItem("Luxembourg", "LU");
dropdownClip.addItem("Macau", "MO");
dropdownClip.addItem("Macedonia", "MK");
dropdownClip.addItem("Madagascar", "MG");
dropdownClip.addItem("Malawi", "MW");
dropdownClip.addItem("Malaysia", "MY");
dropdownClip.addItem("Maldives", "MV");
dropdownClip.addItem("Mali", "ML");
dropdownClip.addItem("Malta", "MT");
dropdownClip.addItem("Marshall Islands", "MH");
dropdownClip.addItem("Martinique", "MQ");
dropdownClip.addItem("Mauritania", "MR");
dropdownClip.addItem("Mauritius", "MU");
dropdownClip.addItem("Mayotte", "YT");
dropdownClip.addItem("Mexico", "MX");
dropdownClip.addItem("Micronesia, Federated States", "FM");
dropdownClip.addItem("Moldova, Republic Of", "MD");
dropdownClip.addItem("Monaco", "MC");
dropdownClip.addItem("Mongolia", "MN");
dropdownClip.addItem("Montserrat", "MS");
dropdownClip.addItem("Morocco", "MA");
dropdownClip.addItem("Mozambique", "MZ");
dropdownClip.addItem("Myanmar", "MM");
dropdownClip.addItem("Namibia", "NA");
dropdownClip.addItem("Nauru", "NR");
dropdownClip.addItem("Nepal", "NP");
dropdownClip.addItem("Netherlands Ant Illes", "AN");
dropdownClip.addItem("New Caledonia", "NC");
dropdownClip.addItem("New Zealand", "NZ");
dropdownClip.addItem("Nicaragua", "NI");
dropdownClip.addItem("Niger", "NE");
dropdownClip.addItem("Nigeria", "NG");
dropdownClip.addItem("Niue", "NU");
dropdownClip.addItem("Norfolk Island", "NF");
dropdownClip.addItem("Northern Mariana Islands", "MP");
dropdownClip.addItem("Norway", "NO");
dropdownClip.addItem("Oman", "OM");
dropdownClip.addItem("Pakistan", "PK");
dropdownClip.addItem("Palau", "PW");
dropdownClip.addItem("Panama", "PA");
dropdownClip.addItem("Papua New Guinea", "PG");
dropdownClip.addItem("Paraguay", "PY");
dropdownClip.addItem("Peru", "PE");
dropdownClip.addItem("Philippines", "PH");
dropdownClip.addItem("Pitcairn", "PN");
dropdownClip.addItem("Poland", "PL");
dropdownClip.addItem("Portugal", "PT");
dropdownClip.addItem("Puerto Rico", "PR");
dropdownClip.addItem("Qatar", "QA");
dropdownClip.addItem("Reunion", "RE");
dropdownClip.addItem("Romania", "RO");
dropdownClip.addItem("Russian Federation", "RU");
dropdownClip.addItem("Rwanda", "RW");
dropdownClip.addItem("Saint K Itts And Nevis", "KN");
dropdownClip.addItem("Saint Lucia", "LC");
dropdownClip.addItem("Saint Vincent, The Grenadines", "VC");
dropdownClip.addItem("Samoa", "WS");
dropdownClip.addItem("San Marino", "SM");
dropdownClip.addItem("Sao Tome And Principe", "ST");
dropdownClip.addItem("Saudi Arabia", "SA");
dropdownClip.addItem("Senegal", "SN");
dropdownClip.addItem("Seychelles", "SC");
dropdownClip.addItem("Sierra Leone", "SL");
dropdownClip.addItem("Singapore", "SG");
dropdownClip.addItem("Slovakia (Slovak Republic)", "SK");
dropdownClip.addItem("Slovenia", "SI");
dropdownClip.addItem("Solomon Islands", "SB");
dropdownClip.addItem("Somalia", "SO");
dropdownClip.addItem("South Africa", "ZA");
dropdownClip.addItem("South Georgia , S Sandwich Is.", "GS");
dropdownClip.addItem("Sri Lanka", "LK");
dropdownClip.addItem("St. Helena", "SH");
dropdownClip.addItem("St. Pierre And Miquelon", "PM");
dropdownClip.addItem("Sudan", "SD");
dropdownClip.addItem("Suriname", "SR");
dropdownClip.addItem("Svalbard, Jan Mayen Islands", "SJ");
dropdownClip.addItem("Sw Aziland", "SZ");
dropdownClip.addItem("Sweden", "SE");
dropdownClip.addItem("Switzerland", "CH");
dropdownClip.addItem("Syrian Arab Republic", "SY");
dropdownClip.addItem("Taiwan", "TW");
dropdownClip.addItem("Tajikistan", "TJ");
dropdownClip.addItem("Tanzania, United Republic Of", "TZ");
dropdownClip.addItem("Thailand", "TH");
dropdownClip.addItem("Togo", "TG");
dropdownClip.addItem("Tokelau", "TK");
dropdownClip.addItem("Tonga", "TO");
dropdownClip.addItem("Trinidad And Tobago", "TT");
dropdownClip.addItem("Tunisia", "TN");
dropdownClip.addItem("Turkey", "TR");
dropdownClip.addItem("Turkmenistan", "TM");
dropdownClip.addItem("Turks And Caicos Islands", "TC");
dropdownClip.addItem("Tuvalu", "TV");
dropdownClip.addItem("Uganda", "UG");
dropdownClip.addItem("Ukraine", "UA");
dropdownClip.addItem("United Arab Emirates", "AE");
dropdownClip.addItem("United States Minor Is.", "UM");
dropdownClip.addItem("Uruguay", "UY");
dropdownClip.addItem("Uzbekistan", "UZ");
dropdownClip.addItem("Vanuatu", "VU");
dropdownClip.addItem("Venezuela", "VE");
dropdownClip.addItem("Viet Nam", "VN");
dropdownClip.addItem("Virgin Islands (British)", "VG");
dropdownClip.addItem("Virgin Islands (U.S.)", "VI");
dropdownClip.addItem("Wallis And Futuna Islands", "WF");
dropdownClip.addItem("Western Sahara", "EH");
dropdownClip.addItem("Yemen", "YE");
dropdownClip.addItem("Yugoslavia", "YU");
dropdownClip.addItem("Zaire", "ZR");
dropdownClip.addItem("Zambia", "ZM");
dropdownClip.addItem("Zimbabwe", "ZW");
dropdownClip.setSelectedIndex(0);
};
this.initMobilesDropdown = function (dropdownClip) {
mobiles = new Array();
dropdownClip.addItem("Select manufacturer", "NIL");
dropdownClip.addItem("NOKIA", "NOKIA");
dropdownClip.addItem("MOTOROLA", "MOTOROLA");
dropdownClip.addItem("SAMSUNG", "SAMSUNG");
dropdownClip.addItem("SONY ERICSSON", "ERICSSON");
dropdownClip.addItem("ALCATEL", "ALCATEL");
dropdownClip.addItem("LG", "LG");
dropdownClip.addItem("NEC", "NEC");
dropdownClip.addItem("PANASONIC", "PANASONIC");
dropdownClip.addItem("SAGEM", "SAGEM");
dropdownClip.addItem("SIEMENS", "SIEMENS");
dropdownClip.addItem("SHARP", "SHARP");
dropdownClip.addItem("TRIUM", "TRIUM");
dropdownClip.addItem("HANDSPRING", "HANDSPRING");
dropdownClip.addItem("POGO", "POGO");
dropdownClip.setSelectedItem(0);
};
this.initDateDropdowns = function (dropdownYear, dropdownMonth, dropdownDay) {
dropdownDay.addItem("DD");
var _local1 = 1;
while (_local1 <= 31) {
dropdownDay.addItem(_local1, _local1);
_local1++;
}
dropdownDay.setSelectedIndex(0);
dropdownMonth.addItem("MM");
_local1 = 1;
while (_local1 <= 12) {
dropdownMonth.addItem(_local1, _local1);
_local1++;
}
dropdownMonth.setSelectedIndex(0);
dropdownYear.addItem("YYYY");
_local1 = 2007;
while (_local1 >= 1900) {
dropdownYear.addItem(_local1, _local1);
_local1--;
}
dropdownYear.setSelectedIndex(0);
};
};
txtName.text = "";
txtEmail.text = "";
txtFname.text = "";
txtFemail.text = "";
txtMessage.text = "";
var objDatacap = (new _root.Datacap("littlechef_stf", "stf"));
objDatacap.registerTextbox("name", this.txtName, this.errName);
objDatacap.registerTextbox("email", this.txtEmail, this.errEmail);
objDatacap.registerTextbox("fname", this.txtFname, this.errFname);
objDatacap.registerTextbox("femail", this.txtFemail, this.errFemail);
objDatacap.registerTextbox("message", this.txtMessage);
objDatacap.registerSubmit("submit", this.btnSubmit, "submit");
objDatacap.registerCallbacks(customIsValid, preSubmit, onSuccess, onFailure);
objDatacap.registerFrames("sending", "success", "failure", this);
btnSubmit.onRollOver = function () {
_root.objSounds.play("beep");
};
Symbol 883 MovieClip Frame 21
_level0.trackPoint("STF_SentSuccess");
_root.objSounds.play("zap");
Symbol 883 MovieClip Frame 31
_level0.trackPoint("STF_SentFailure");