Combined Code
frame 1 {
var localization_xml = '';
var level_xml = '';
localization_xml += '<?xml version=\'1.0\' encoding=\'utf-8\'?>';
localization_xml += '<config>';
localization_xml += '<!--**LOCALIZATION NOTE**';
localization_xml += 'KEEP ALL TEXT SAME CASE. IF LOWER CASE, KEEP LOWER CASE. -->';
localization_xml += ' <home>';
localization_xml += ' <instructionsPanel>';
localization_xml += ' <instructions title=\'INSTRUCTIONS\'>';
localization_xml += ' <![CDATA[<p>Welcome to The Ball of Death. Help Homer collect objectives riding his motorcycle in the deathball, there are 5 objectives per level. Be sure to grab donuts, squishees and duff beer, as they are bonus items. Stay away from obstacles, they will make you crash. You have 3 lives per level, let's see if you can pass all 10 levels!</p>]]>';
localization_xml += ' </instructions>';
localization_xml += ' <controls title=\'CONTROLS\'>';
localization_xml += ' <actions><![CDATA[<p>SPEED UP ------</p><p>SLOW DOWN --</p><p>TURN LEFT -----</p><p>TURN RIGHT ---</p>]]></actions>';
localization_xml += ' <keys>';
localization_xml += ' <![CDATA[<p>UP ARROW</p><p>DOWN ARROW</p><p>LEFT ARROW</p><p>RIGHT ARROW</p>]]>';
localization_xml += ' </keys>';
localization_xml += ' </controls>';
localization_xml += ' <buttons>';
localization_xml += ' <home label=\'HOME\' />';
localization_xml += ' <playGame label=\'PLAY GAME\' />';
localization_xml += ' </buttons>';
localization_xml += ' <bonus points=\'POINTS\' objectiveHeader=\'OBJECTIVE\' bonusHeader=\'BONUS ITEMS\' />';
localization_xml += ' </instructionsPanel>';
localization_xml += ' <nav>';
localization_xml += ' <buttons>';
localization_xml += ' <playGame label=\'PLAY GAME\' />';
localization_xml += ' <instructions label=\'INSTRUCTIONS\' />';
localization_xml += ' <leaderBoard label=\'LEADERBOARD\' />';
localization_xml += '\t\t<officialSite label=\'VISIT OFFICIAL SITE\' />';
localization_xml += ' <pimp label=\'ADD TO MY PAGE\' />';
localization_xml += ' </buttons>';
localization_xml += ' </nav>';
localization_xml += '\t<pimpPanel>';
localization_xml += '\t\t<pimp title=\'ADD TO MY PAGE\'>';
localization_xml += '\t\t\t<question><![CDATA[<p>Want to get your hands on a Ball of Death of your own?</p>]]></question>';
localization_xml += '\t\t\t<answer><![CDATA[<p>Copy the code below to add it to your MySpace page or blog:</p>]]></answer>';
localization_xml += '\t\t\t<content><![CDATA[<div><embed src=\'http://www.simpsonsmovie.com/content/games/bod/one/BOD_ENU.swf\' quality=\'high\' pluginspage=\'http://www.macromedia.com/go/getflashplayer\' type=\'application/x-shockwave-flash\' width=\'800\' height=\'450\'></embed></div><a href=\'http://www.simpsonsmovie.com\' title=\'THE SIMPSONS MOVIE\' target=\'_blank\'><b>Visit THE SIMPSONS MOVIE site!</b></a>]]></content>';
localization_xml += '\t\t</pimp>';
localization_xml += '\t\t<buttons>';
localization_xml += '\t\t\t<home label=\'BACK\' />';
localization_xml += '\t\t</buttons>';
localization_xml += '\t</pimpPanel>';
localization_xml += '\t<copyright label=\'TM & © 2007 FOX and its related entities. All Rights Reserved.\' />';
localization_xml += ' </home>';
localization_xml += ' <game siteURL=\'www.simpsonsmovie.com\'>';
localization_xml += ' <youCrashed title=\'you crashed\' />';
localization_xml += ' <hud>';
localization_xml += ' <pointsPanel title=\'POINTS\' />';
localization_xml += ' <objectivesPanel>';
localization_xml += ' <objective title=\'OBJECTIVE\' />';
localization_xml += ' <bonus title=\'BONUS\' />';
localization_xml += ' </objectivesPanel>';
localization_xml += ' <timeMeter title=\'TIME\' />';
localization_xml += ' <speedMeter title=\'SPEED\' />';
localization_xml += ' <livesMeter title=\'LIVES\' />';
localization_xml += ' </hud>';
localization_xml += ' <popups>';
localization_xml += ' <beginLevelPanel timeTitle=\'time\'>';
localization_xml += ' <objective title=\'OBJECTIVE\' />';
localization_xml += ' <bonus title=\'BONUS\' />';
localization_xml += ' <obstacle title=\'OBSTACLE\' />';
localization_xml += ' <buttons>';
localization_xml += ' <startLevel label=\'start level\' />';
localization_xml += ' </buttons>';
localization_xml += ' </beginLevelPanel>';
localization_xml += ' <endLevelPanel title=\'passed\'>';
localization_xml += ' <objective title=\'OBJECTIVE\' />';
localization_xml += ' <bonus title=\'BONUS\' />';
localization_xml += ' <levelPoints title=\'LEVEL POINTS\' />';
localization_xml += ' <buttons>';
localization_xml += ' <panelBtn label=\'continue\' />';
localization_xml += ' </buttons>';
localization_xml += ' </endLevelPanel>';
localization_xml += ' <gameOverPanel title=\'game over\'>';
localization_xml += ' <objective title=\'OBJECTIVE\' />';
localization_xml += ' <bonus title=\'BONUS\' />';
localization_xml += ' <levelPoints title=\'LEVEL POINTS\' />';
localization_xml += ' <buttons>';
localization_xml += ' <panelBtn label=\'play again\' />';
localization_xml += ' </buttons>';
localization_xml += ' </gameOverPanel>';
localization_xml += ' <gameCompletePanel title=\'CONGRATULATIONS, YOU WON!\'>';
localization_xml += ' <officialSite title=\'VISIT OFFICIAL SITE\' />';
localization_xml += ' <totalPoints title=\'TOTAL POINTS\' />';
localization_xml += ' <highScores title=\'HIGH SCORES\' />';
localization_xml += ' <buttons>';
localization_xml += ' <panelBtn label=\'play again\' />';
localization_xml += ' <visitLeader label=\'visit leaderboard\' />';
localization_xml += ' </buttons>';
localization_xml += ' </gameCompletePanel>';
localization_xml += ' </popups>';
localization_xml += ' <twitchGame slowText=\'TOO SLOW\' fastText=\'TOO FAST\'>';
localization_xml += ' <instructions>';
localization_xml += ' <![CDATA[<p>HELP HOMER GET STARTED OFF RIGHT!</p><p>STOP THE ARROW IN THE MIDDLE BY PRESSING THE SPACEBAR</p>]]>';
localization_xml += ' </instructions>';
localization_xml += ' </twitchGame>';
localization_xml += ' <soundBtn title=\'SOUND\' offLabel=\'OFF\' onLabel=\'ON\' />';
localization_xml += ' </game>';
localization_xml += '</config>';
level_xml += '<?xml version=\'1.0\' encoding=\'utf-8\'?>';
level_xml += '<!--Time needs to be in miliseconds!!-->';
level_xml += '<levels total=\'10\'>';
level_xml += '\t<level id=\'1\' title=\'level 1\' time=\'120000\' twitchSpeed=\'.2\'>';
level_xml += ' <brief><![CDATA[YOU MUST GET 5 DONUTS TO GET MAX POINTS. GRAB BONUS ITEMS ALONG THE WAY, WATCH OUT FOR OBSTACLES.]]></brief>';
level_xml += '\t\t<objective id=\'1\' type=\'Donut\' amount=\'5\' />';
level_xml += '\t\t<obstacle type=\'Brick\' />';
level_xml += '\t\t<bonus Duff=\'on\' Squishee=\'off\' Donut=\'off\' amount=\'3\' />';
level_xml += '\t</level>';
level_xml += ' <level id=\'2\' title=\'level 2\' time=\'120000\' twitchSpeed=\'.3\'>';
level_xml += ' <brief><![CDATA[YOU MUST GET 5 SQUISHEES TO GET MAX POINTS. GRAB BONUS ITEMS ALONG THE WAY, WATCH OUT FOR OBSTACLES.]]></brief>';
level_xml += ' <objective id=\'1\' type=\'Squishee\' amount=\'5\' />';
level_xml += ' <obstacle type=\'Wrench\' />';
level_xml += ' <bonus Duff=\'on\' Squishee=\'off\' Donut=\'off\' amount=\'3\' />';
level_xml += ' </level>';
level_xml += ' <level id=\'3\' title=\'level 3\' time=\'120000\' twitchSpeed=\'.4\'>';
level_xml += ' <brief><![CDATA[YOU MUST GET 5 PIZZAS TO GET MAX POINTS. GRAB BONUS ITEMS ALONG THE WAY, WATCH OUT FOR OBSTACLES.]]></brief>';
level_xml += ' <objective id=\'1\' type=\'Pizza\' amount=\'5\' />';
level_xml += ' <obstacle type=\'Brick\' />';
level_xml += ' <bonus Duff=\'on\' Squishee=\'off\' Donut=\'off\' amount=\'3\' />';
level_xml += ' </level>';
level_xml += ' <level id=\'4\' title=\'level 4\' time=\'120000\' twitchSpeed=\'.4\'>';
level_xml += ' <brief><![CDATA[GET 5 KRUSTY BURGERS TO GET MAX POINTS. GRAB BONUS ITEMS ALONG THE WAY, WATCH OUT FOR OBSTACLES.]]></brief>';
level_xml += ' <objective id=\'1\' type=\'Krusty\' amount=\'5\' />';
level_xml += ' <obstacle type=\'Wrench\' />';
level_xml += ' <bonus Duff=\'on\' Squishee=\'off\' Donut=\'off\' amount=\'3\' />';
level_xml += ' </level>';
level_xml += ' <level id=\'5\' title=\'level 5\' time=\'120000\' twitchSpeed=\'.5\'>';
level_xml += ' <brief><![CDATA[YOU MUST GET 5 COOKIES TO GET MAX POINTS. GRAB BONUS ITEMS ALONG THE WAY, WATCH OUT FOR OBSTACLES.]]></brief>';
level_xml += ' <objective id=\'1\' type=\'Cookie\' amount=\'5\' />';
level_xml += ' <obstacle type=\'Wrench\' />';
level_xml += ' <bonus Duff=\'on\' Squishee=\'off\' Donut=\'off\' amount=\'3\' />';
level_xml += ' </level>';
level_xml += ' <level id=\'6\' title=\'level 6\' time=\'120000\' twitchSpeed=\'.6\'>';
level_xml += ' <brief><![CDATA[YOU MUST GET 5 ICE CREAM CONES TO GET MAX POINTS. GRAB BONUS ITEMS ALONG THE WAY, WATCH OUT FOR OBSTACLES.]]></brief>';
level_xml += ' <objective id=\'1\' type=\'IceCream\' amount=\'5\' />';
level_xml += ' <obstacle type=\'NuclearCore\' />';
level_xml += ' <bonus Duff=\'on\' Squishee=\'off\' Donut=\'off\' amount=\'3\' />';
level_xml += ' </level>';
level_xml += ' <level id=\'7\' title=\'level 7\' time=\'120000\' twitchSpeed=\'.6\'>';
level_xml += ' <brief><![CDATA[GET 5 OF MAGGIE'S CHOCO BARS TO GET MAX POINTS. GRAB BONUS ITEMS ALONG THE WAY, WATCH OUT FOR OBSTACLES.]]></brief>';
level_xml += ' <objective id=\'1\' type=\'ChocoBar\' amount=\'5\' />';
level_xml += ' <obstacle type=\'Brick\' />';
level_xml += ' <bonus Duff=\'on\' Squishee=\'off\' Donut=\'off\' amount=\'3\' />';
level_xml += ' </level>';
level_xml += ' <level id=\'8\' title=\'level 8\' time=\'120000\' twitchSpeed=\'.7\'>';
level_xml += ' <brief><![CDATA[YOU MUST GET 5 SANDWICHS TO GET MAX POINTS. GRAB BONUS ITEMS ALONG THE WAY, WATCH OUT FOR OBSTACLES.]]></brief>';
level_xml += ' <objective id=\'1\' type=\'Sandwich\' amount=\'5\' />';
level_xml += ' <obstacle type=\'NuclearCore\' />';
level_xml += ' <bonus Duff=\'on\' Squishee=\'off\' Donut=\'off\' amount=\'3\' />';
level_xml += ' </level>';
level_xml += ' <level id=\'9\' title=\'level 9\' time=\'120000\' twitchSpeed=\'.8\'>';
level_xml += ' <brief><![CDATA[GRAB 5 HOTDOGS TO GET MAX POINTS. GRAB BONUS ITEMS ALONG THE WAY, WATCH OUT FOR OBSTACLES.]]></brief>';
level_xml += ' <objective id=\'1\' type=\'HotDog\' amount=\'5\' />';
level_xml += ' <obstacle type=\'Wrench\' />';
level_xml += ' <bonus Duff=\'on\' Squishee=\'off\' Donut=\'off\' amount=\'3\' />';
level_xml += ' </level>';
level_xml += ' <level id=\'10\' title=\'level 10\' time=\'120000\' twitchSpeed=\'.8\'>';
level_xml += ' <brief><![CDATA[FIND 5 BUZZ COLAS TO GET MAX POINTS. GRAB BONUS ITEMS ALONG THE WAY, WATCH OUT FOR OBSTACLES.]]></brief>';
level_xml += ' <objective id=\'1\' type=\'BuzzCola\' amount=\'5\' />';
level_xml += ' <obstacle type=\'NuclearCore\' />';
level_xml += ' <bonus Duff=\'on\' Squishee=\'off\' Donut=\'off\' amount=\'3\' />';
level_xml += ' </level>';
level_xml += '</levels>';
_global.localization_xml = localization_xml;
_global.level_xml = level_xml;
}
frame 1 {
stop();
_quality = 'HIGH';
}
movieClip 28 {
}
movieClip 31 {
}
movieClip 34 {
}
movieClip 36 {
}
movieClip 37 {
}
movieClip 38 {
}
movieClip 39 mcLoader {
#initclip
Object.registerClass('mcLoader', src.Loader);
#endinitclip
frame 20 {
stop();
}
}
movieClip 40 {
}
movieClip 41 {
frame 1 {
function changePage(page) {
site.changePage({'target': page});
}
var site = new src.Main(this);
_global.user = uID;
stop();
}
}
movieClip 1881 __Packages.src.Main {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.Main) {
var v1 = function (mcRoot) {
this.__set__mc(mcRoot);
(this.__get__mc()).mcLoader.addEventListener('onSwfLoaded', mx.utils.Delegate.create(this, this.onPageLoaded));
(this.__get__mc()).mcPageContainer._alpha = 0;
this._music = new Sound(this.__get__mc());
this._music.onSoundComplete = mx.utils.Delegate.create(this, this.loopMusic);
(this.__get__mc()).onEnterFrame = function () {
var v3 = this._parent.getBytesLoaded();
var v2 = this._parent.getBytesTotal();
this.mcLoader.onSwfProgress(this.mc, v3, v2);
if (v2 > 0 && v3 >= v2) {
this.onEnterFrame = undefined;
this._parent.gotoAndStop('home');
}
};
};
src.Main = v1;
var v2 = v1.prototype;
v2.__get__mc = function () {
return this._mc;
};
v2.__set__mc = function (mcTarget) {
this._mc = mcTarget;
return this.__get__mc();
};
v2.loopMusic = function () {
this._music.setVolume(85);
this._music.start(0, 0);
};
v2.onMusicLoaded = function (success) {
if (success) {
trace('SOUND LOADED');
}
};
v2.onPageLoaded = function (e) {
trace('LOADED SWF: ' + e.target);
this.loopMusic();
this.fadePageIn();
e.target.addEventListener('onPageChange', mx.utils.Delegate.create(this, this.changePage));
};
v2.loadPage = function (page, target) {
(this.__get__mc()).mcLoader.playLoader(page, target);
this.changePage('home');
};
v2.unloadPage = function () {
(this.__get__mc()).mcLoader.unloadSwf((this.__get__mc()).mcPageContainer);
this.loadPage(this._page, (this.__get__mc()).mcPageContainer);
};
v2.onFadeOutComplete = function () {
this.unloadPage();
};
v2.fadePageIn = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target((this.__get__mc()).mcPageContainer);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Expo.easeOut, 6));
v2.alter(['_alpha'], [100]);
};
v2.fadePageOut = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target((this.__get__mc()).mcPageContainer);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Expo.easeOut, 4));
v2.alter(['_alpha'], [0], mx.utils.Delegate.create(this, this.onFadeOutComplete));
};
v2.changePage = function (e) {
trace('Main Change Page: ' + e.target);
this._music.setVolume(0);
switch (e.target) {
case 'game':
this._page = src.Main.GAME_SWF;
break;
case 'leader':
this._page = src.Main.LEADER_SWF;
break;
case 'pimp':
trace(src.Main.PIMP_MY_PAGE_URL);
(this.__get__mc()).getURL(src.Main.PIMP_MY_PAGE_URL, '_blank');
break;
case 'officialSite':
(this.__get__mc()).getURL(src.Main.OFFICIAL_SITE_URL, '_blank');
break;
case 'home':
default:
this._page = src.Main.HOME_SWF;
}
};
v1.CARNIVAL_MP3 = 'simpsons_carnival.mp3';
v1.GAME_SWF = 'SimpsonsBOD.swf';
v1.HOME_SWF = 'home.swf';
v1.LEADER_SWF = 'home.swf';
v1.OFFICIAL_SITE_URL = 'http://www.simpsonsmovie.com';
v1.PIMP_MY_PAGE_URL = 'http://www.simpsonsmovie.com/addtomypage/';
v2.addProperty('mc', v2.__get__mc, v2.__set__mc);
ASSetPropFlags(src.Main.prototype, null, 1);
}
#endinitclip
}
movieClip 1882 __Packages.mx.utils.Delegate {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.utils) {
_global.mx.utils = new Object();
}
if (!_global.mx.utils.Delegate) {
var v1 = function (f) {
super();
this.func = f;
};
mx.utils.Delegate = v1;
mx.utils.Delegate extends Object;
var v2 = v1.prototype;
v1.create = function (obj, func) {
var v2 = function () {
var v2 = arguments.callee.target;
var v3 = arguments.callee.func;
return v3.apply(v2, arguments);
};
v2.target = obj;
v2.func = func;
return v2;
};
v2.createDelegate = function (obj) {
return mx.utils.Delegate.create(obj, this.func);
};
ASSetPropFlags(mx.utils.Delegate.prototype, null, 1);
}
#endinitclip
}
movieClip 1883 __Packages.net.indivision.core.AbstractDispatcher {
#initclip
if (!_global.net) {
_global.net = new Object();
}
if (!_global.net.indivision) {
_global.net.indivision = new Object();
}
if (!_global.net.indivision.core) {
_global.net.indivision.core = new Object();
}
if (!_global.net.indivision.core.AbstractDispatcher) {
var v1 = function () {
mx.events.EventDispatcher.initialize(this);
};
net.indivision.core.AbstractDispatcher = v1;
var v2 = v1.prototype;
v2.toString = function () {
return '[Dispatcher]';
};
ASSetPropFlags(net.indivision.core.AbstractDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 1884 __Packages.mx.events.EventDispatcher {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.events) {
_global.mx.events = new Object();
}
if (!_global.mx.events.EventDispatcher) {
var v1 = function () {};
mx.events.EventDispatcher = v1;
var v2 = v1.prototype;
v1._removeEventListener = function (queue, event, handler) {
if (queue != undefined) {
var v4 = queue.length;
var v1;
v1 = 0;
while (v1 < v4) {
var v2 = queue[v1];
if (v2 == handler) {
queue.splice(v1, 1);
return undefined;
}
++v1;
}
}
};
v1.initialize = function (object) {
if (mx.events.EventDispatcher._fEventDispatcher == undefined) {
mx.events.EventDispatcher._fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = mx.events.EventDispatcher._fEventDispatcher.addEventListener;
object.removeEventListener = mx.events.EventDispatcher._fEventDispatcher.removeEventListener;
object.dispatchEvent = mx.events.EventDispatcher._fEventDispatcher.dispatchEvent;
object.dispatchQueue = mx.events.EventDispatcher._fEventDispatcher.dispatchQueue;
};
v2.dispatchQueue = function (queueObj, eventObj) {
var v7 = '__q_' + eventObj.type;
var v4 = queueObj[v7];
if (v4 != undefined) {
var v5;
for (v5 in v4) {
var v1 = v4[v5];
var v3 = typeof v1;
if (v3 == 'object' || v3 == 'movieclip') {
if (v1.handleEvent != undefined) {
v1.handleEvent(eventObj);
}
if (v1[eventObj.type] != undefined) {
if (mx.events.EventDispatcher.exceptions[eventObj.type] == undefined) {
v1[eventObj.type](eventObj);
}
}
} else {
v1.apply(queueObj, [eventObj]);
}
}
}
};
v2.dispatchEvent = function (eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + 'Handler'](eventObj);
this.dispatchQueue(this, eventObj);
};
v2.addEventListener = function (event, handler) {
var v3 = '__q_' + event;
if (this[v3] == undefined) {
this[v3] = new Array();
}
_global.ASSetPropFlags(this, v3, 1);
mx.events.EventDispatcher._removeEventListener(this[v3], event, handler);
this[v3].push(handler);
};
v2.removeEventListener = function (event, handler) {
var v2 = '__q_' + event;
mx.events.EventDispatcher._removeEventListener(this[v2], event, handler);
};
v1._fEventDispatcher = undefined;
v1.exceptions = {'move': 1, 'draw': 1, 'load': 1};
ASSetPropFlags(mx.events.EventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 1885 __Packages.net.indivision.tween.TweenBase {
#initclip
if (!_global.net) {
_global.net = new Object();
}
if (!_global.net.indivision) {
_global.net.indivision = new Object();
}
if (!_global.net.indivision.tween) {
_global.net.indivision.tween = new Object();
}
if (!_global.net.indivision.tween.TweenBase) {
var v1 = function (target, customMotion) {
super();
if (customMotion) {
this.__set__motion(customMotion);
} else {
this.__set__motion(new net.indivision.tween.Motion());
}
this.__set__targetFunction(target);
};
net.indivision.tween.TweenBase = v1;
net.indivision.tween.TweenBase extends net.indivision.core.AbstractDispatcher;
var v2 = v1.prototype;
v2.start = function (startPosition, delay) {
if (startPosition) {
this.position = startPosition;
} else {
this.position = 0;
}
if (delay) {
this.delayedStart(delay, startPosition);
} else {
this.dispatchEvent({'type': 'onTweenStart', 'target': this});
this.startTween();
return this.position;
}
};
v2.delayedStart = function (delay, startPosition) {
this.intervalID = setInterval(mx.utils.Delegate.create(this, this.start), delay, startPosition);
};
v2.stop = function () {
this.destroy();
this.dispatchEvent({'type': 'onTweenStop', 'target': this});
return this.position;
};
v2.resume = function () {
this.dispatchEvent({'type': 'onTweenResume', 'target': this});
this.startTween();
return this.position;
};
v2.goto = function (newPosition) {
this.destroy();
this.position = newPosition;
this.update();
};
v2.startTween = function () {
this.destroy();
if (this._motion.__get__rate() > 0) {
this.intervalID = setInterval(mx.utils.Delegate.create(this, this.onEnterFrame), this._motion.__get__rate());
} else {
_global.MovieClip.addListener(this);
}
};
v2.destroy = function () {
clearInterval(this.intervalID);
_global.MovieClip.removeListener(this);
};
v2.onEnterFrame = function () {
++this.position;
if (this.position <= this._motion.__get__steps()) {
this.update();
} else {
this.destroy();
this.dispatchEvent({'type': 'onTweenComplete', 'target': this});
this.onTweenComplete({'type': 'onTweenComplete', 'target': this});
}
updateAfterEvent();
};
v2.report = function () {
return this._motion.equation(this.position * this._motion.__get__step(), 0, 1, 1, this._motion.parameter1, this._motion.parameter2);
};
v2.update = function () {
var v2 = this.report();
this._targetFunction.apply(this, [v2]);
this.dispatchEvent({'type': 'onTweenUpdate', 'target': this, 'report': v2});
};
v2.__set__motion = function (customMotion) {
if (customMotion) {
this._motion = customMotion;
}
return this.__get__motion();
};
v2.__set__targetFunction = function (target) {
this._targetFunction = target;
return this.__get__targetFunction();
};
v2.position = 0;
v2.addProperty('motion', function () {}, v2.__set__motion);
v2.addProperty('targetFunction', function () {}, v2.__set__targetFunction);
ASSetPropFlags(net.indivision.tween.TweenBase.prototype, null, 1);
}
#endinitclip
}
movieClip 1886 __Packages.net.indivision.tween.Motion {
#initclip
if (!_global.net) {
_global.net = new Object();
}
if (!_global.net.indivision) {
_global.net.indivision = new Object();
}
if (!_global.net.indivision.tween) {
_global.net.indivision.tween = new Object();
}
if (!_global.net.indivision.tween.Motion) {
var v1 = function (equation, steps, rate, parameter1, parameter2) {
var v3;
for (v3 in this.argumentsList) {
if (arguments[v3] == undefined) {
this[this.argumentsList[v3]] = this.defaults[v3];
} else {
this[this.argumentsList[v3]] = arguments[v3];
}
}
};
net.indivision.tween.Motion = v1;
var v2 = v1.prototype;
v2.__set__steps = function (totalSteps) {
if (totalSteps) {
this._steps = totalSteps;
} else {
this._steps = this.defaults[1];
}
this._step = 1 / this._steps;
return this.__get__steps();
};
v2.__get__steps = function () {
return this._steps;
};
v2.__get__step = function () {
return this._step;
};
v2.__set__rate = function (milliseconds) {
if (milliseconds) {
this._rate = milliseconds;
} else {
this._rate = 0;
}
if (this._rate == 0) {
mx.transitions.OnEnterFrameBeacon.init();
}
return this.__get__rate();
};
v2.__get__rate = function () {
return this._rate;
};
v2.__set__time = function (seconds) {
if (seconds) {
this.__set__rate(seconds * 1000 / this.__get__steps());
} else {
this.__set__rate(0);
}
return this.__get__time();
};
v2.__get__time = function () {
return this.__get__rate() * this.__get__steps() / 1000;
};
v2.argumentsList = ['equation', 'steps', 'rate', 'parameter1', 'parameter2'];
v2.defaults = [function (t, b, c, d) {
return c * t / d + b;
}, 10, 0, 0, 0];
v2.addProperty('rate', v2.__get__rate, v2.__set__rate);
v2.addProperty('step', v2.__get__step, function () {});
v2.addProperty('steps', v2.__get__steps, v2.__set__steps);
v2.addProperty('time', v2.__get__time, v2.__set__time);
ASSetPropFlags(net.indivision.tween.Motion.prototype, null, 1);
}
#endinitclip
}
movieClip 1887 __Packages.mx.transitions.OnEnterFrameBeacon {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.transitions) {
_global.mx.transitions = new Object();
}
if (!_global.mx.transitions.OnEnterFrameBeacon) {
var v1 = function () {};
mx.transitions.OnEnterFrameBeacon = v1;
var v2 = v1.prototype;
v1.init = function () {
var v4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(v4);
var v3 = _root.createEmptyMovieClip('__OnEnterFrameBeacon', 9876);
v3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage('onEnterFrame');
};
}
};
v1.version = '1.1.0.52';
ASSetPropFlags(mx.transitions.OnEnterFrameBeacon.prototype, null, 1);
}
#endinitclip
}
movieClip 1888 __Packages.mx.transitions.BroadcasterMX {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.transitions) {
_global.mx.transitions = new Object();
}
if (!_global.mx.transitions.BroadcasterMX) {
var v1 = function () {};
mx.transitions.BroadcasterMX = v1;
var v2 = v1.prototype;
v1.initialize = function (o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
};
v2.addListener = function (o) {
this.removeListener(o);
if (this.broadcastMessage == undefined) {
this.broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return this._listeners.push(o);
};
v2.removeListener = function (o) {
var v2 = this._listeners;
var v3 = v2.length;
while (v3--) {
if (v2[v3] == o) {
v2.splice(v3, 1);
if (!v2.length) {
this.broadcastMessage = undefined;
}
return true;
}
}
return false;
};
v2.broadcastMessage = function () {
var v5 = String(arguments.shift());
var v4 = this._listeners.concat();
var v6 = v4.length;
var v3 = 0;
while (v3 < v6) {
v4[v3][v5].apply(v4[v3], arguments);
++v3;
}
};
v1.version = '1.1.0.52';
ASSetPropFlags(mx.transitions.BroadcasterMX.prototype, null, 1);
}
#endinitclip
}
movieClip 1889 __Packages.net.indivision.tween.PropertyTween {
#initclip
if (!_global.net) {
_global.net = new Object();
}
if (!_global.net.indivision) {
_global.net.indivision = new Object();
}
if (!_global.net.indivision.tween) {
_global.net.indivision.tween = new Object();
}
if (!_global.net.indivision.tween.PropertyTween) {
var v1 = function (targetObject, customMotion) {
super(this.updateProperties);
this.__set__target(targetObject);
this.__set__motion(customMotion);
this.__set__snap(false);
};
net.indivision.tween.PropertyTween = v1;
net.indivision.tween.PropertyTween extends net.indivision.tween.TweenBase;
var v2 = v1.prototype;
v2.moveTo = function (x, y, onComplete) {
var v2 = this._target._x;
var v3 = this._target._y;
this.onTweenComplete = onComplete;
this.reset();
if (v2 != x) {
this.properties.push('_x');
this.startValues.push(v2);
this.endValues.push(x - v2);
}
if (v3 != y) {
this.properties.push('_y');
this.startValues.push(v3);
this.endValues.push(y - v3);
}
this.start(0, this.__get__delay());
};
v2.moveFrom = function (x, y, onComplete) {
var v2 = this._target._x;
var v3 = this._target._y;
this.onTweenComplete = onComplete;
this.reset();
if (x) {
this.properties.push('_x');
this.startValues.push(v2);
this.endValues.push(v2 + x);
}
if (y) {
this.properties.push('_y');
this.startValues.push(v3);
this.endValues.push(v3 + y);
}
this.start(0, this.__get__delay());
};
v2.alter = function (propertyList, valueList, onComplete) {
var v2;
this.onTweenComplete = onComplete;
this.reset();
if (!(propertyList instanceof Array)) {
propertyList = [propertyList];
}
if (!(valueList instanceof Array)) {
valueList = [valueList];
}
for (v2 in propertyList) {
this.properties.push(propertyList[v2]);
this.startValues.push(this._target[propertyList[v2]]);
this.endValues.push(valueList[v2] - this._target[propertyList[v2]]);
}
this.start(0, this.__get__delay());
};
v2.reset = function () {
this.properties = [];
this.startValues = [];
this.endValues = [];
};
v2.updateProperties = function (z) {
var v2;
for (v2 in this.properties) {
this._target[this.properties[v2]] = this.equation(v2, z);
}
};
v2.floatEquation = function (a, z) {
return this.startValues[a] + this.endValues[a] * z;
};
v2.snapEquation = function (a, z) {
return Math.round(this.startValues[a] + this.endValues[a] * z);
};
v2.__set__delay = function (delayTime) {
if (delayTime > 0) {
this._delay = delayTime;
}
return this.__get__delay();
};
v2.__get__delay = function () {
return this._delay;
};
v2.__set__target = function (targetObject) {
this._target = targetObject;
return this.__get__target();
};
v2.__set__snap = function (doSnap) {
if (doSnap) {
this.equation = this.snapEquation;
} else {
this.equation = this.floatEquation;
}
return this.__get__snap();
};
v2.addProperty('delay', v2.__get__delay, v2.__set__delay);
v2.addProperty('snap', function () {}, v2.__set__snap);
v2.addProperty('target', function () {}, v2.__set__target);
ASSetPropFlags(net.indivision.tween.PropertyTween.prototype, null, 1);
}
#endinitclip
}
movieClip 1890 __Packages.com.robertpenner.easing.Expo {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Expo) {
var v1 = function () {};
com.robertpenner.easing.Expo = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d) {
return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
};
v1.easeOut = function (t, b, c, d) {
return (t == d) ? b + c : c * (-Math.pow(2, -10 * t / d) + 1) + b;
};
v1.easeInOut = function (t, b, c, d) {
if (t == 0) {
return b;
}
if (t == d) {
return b + c;
}
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) + b;
};
ASSetPropFlags(com.robertpenner.easing.Expo.prototype, null, 1);
}
#endinitclip
}
movieClip 1891 __Packages.net.indivision.core.AbstractMovieClip {
#initclip
if (!_global.net) {
_global.net = new Object();
}
if (!_global.net.indivision) {
_global.net.indivision = new Object();
}
if (!_global.net.indivision.core) {
_global.net.indivision.core = new Object();
}
if (!_global.net.indivision.core.AbstractMovieClip) {
var v1 = function () {
super();
this._mc = this;
};
net.indivision.core.AbstractMovieClip = v1;
net.indivision.core.AbstractMovieClip extends MovieClip;
var v2 = v1.prototype;
v2.__get__mc = function () {
return this._mc;
};
v2.toString = function () {
if (this.__get__mc() == this) {
return '[AbstractMovieClip]';
} else {
return '[AbstractMovieClip: ' + this._mc + ' ]';
}
};
v2.addProperty('mc', v2.__get__mc, function () {});
ASSetPropFlags(net.indivision.core.AbstractMovieClip.prototype, null, 1);
}
#endinitclip
}
movieClip 1892 __Packages.net.indivision.core.MovieClipDispatcher {
#initclip
if (!_global.net) {
_global.net = new Object();
}
if (!_global.net.indivision) {
_global.net.indivision = new Object();
}
if (!_global.net.indivision.core) {
_global.net.indivision.core = new Object();
}
if (!_global.net.indivision.core.MovieClipDispatcher) {
var v1 = function () {
super();
mx.events.EventDispatcher.initialize(this);
};
net.indivision.core.MovieClipDispatcher = v1;
net.indivision.core.MovieClipDispatcher extends net.indivision.core.AbstractMovieClip;
var v2 = v1.prototype;
ASSetPropFlags(net.indivision.core.MovieClipDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 1893 __Packages.src.Loader {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.Loader) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
this.initLoader();
};
src.Loader = v1;
src.Loader extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.initLoader = function () {
this.mcl = new MovieClipLoader();
this.oL = new Object();
this.oL.onLoadProgress = mx.utils.Delegate.create(this, this.onSwfProgress);
this.oL.onLoadInit = mx.utils.Delegate.create(this, this.onSwfLoaded);
this.mcl.addListener(this.oL);
};
v2.onSwfProgress = function (target, bytesLoaded, bytesTotal) {
var v2 = Math.floor((bytesLoaded / bytesTotal) * 100);
(this.__get__mc()).mcPct.txtPct.text = v2.toString();
};
v2.onSwfLoaded = function (target) {
(this.__get__mc())._visible = false;
this.dispatchEvent({'type': 'onSwfLoaded', 'target': target});
};
v2.loadSwf = function () {
this.mcl.loadClip(this.swfToLoad, this.targetMC);
};
v2.unloadSwf = function (target) {
trace('Unload Clip');
this.mcl.unloadClip(target);
};
v2.playLoader = function (path, mcTarget) {
this.swfToLoad = path;
this.targetMC = mcTarget;
(this.__get__mc()).gotoAndStop(1);
(this.__get__mc())._visible = true;
var v2 = new net.indivision.tween.FrameTween(this.__get__mc(), new net.indivision.tween.Motion(), false);
v2.addEventListener('onTweenComplete', mx.utils.Delegate.create(this, this.loadSwf));
v2.animateTo((this.__get__mc())._totalframes);
};
ASSetPropFlags(src.Loader.prototype, null, 1);
}
#endinitclip
}
movieClip 1894 __Packages.net.indivision.tween.FrameTween {
#initclip
if (!_global.net) {
_global.net = new Object();
}
if (!_global.net.indivision) {
_global.net.indivision = new Object();
}
if (!_global.net.indivision.tween) {
_global.net.indivision.tween = new Object();
}
if (!_global.net.indivision.tween.FrameTween) {
var v1 = function (target, motion, forceFrames) {
super(this.updateFrame, motion);
this._target = target;
this._forceFrames = forceFrames;
this.startframe = 1;
this.change = target._totalframes;
if (this._forceFrames) {
motion.__set__steps(this.change);
}
};
net.indivision.tween.FrameTween = v1;
net.indivision.tween.FrameTween extends net.indivision.tween.TweenBase;
var v2 = v1.prototype;
v2.animateTo = function (frame) {
if (!frame) {
frame = this._target._totalframes;
}
this.startframe = this._target._currentframe;
this.change = frame - this.startframe;
if (this._forceFrames) {
(this.__get__motion()).steps = Math.abs(this.change);
}
this.start();
};
v2.updateFrame = function (z) {
var v2 = Math.round(this.startframe + this.change * z);
this._target.gotoAndStop(v2);
};
ASSetPropFlags(net.indivision.tween.FrameTween.prototype, null, 1);
}
#endinitclip
}
movieClip 1895 __Packages.src.game.dev.DevIntersectBtn {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.dev) {
_global.src.game.dev = new Object();
}
if (!_global.src.game.dev.DevIntersectBtn) {
var v1 = function () {
super();
};
src.game.dev.DevIntersectBtn = v1;
src.game.dev.DevIntersectBtn extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.init = function (label, direction, path, node, frame, angle) {
(this.__get__mc()).txtLabel.text = label;
this.iPath = path;
this.iNode = node;
this.iFrame = frame;
this.iDir = direction;
this.iAngle = angle;
this.setBtn();
};
v2.turnBtnOn = function () {
(this.__get__mc()).mcBtn.gotoAndStop('on');
};
v2.turnBtnOff = function () {
(this.__get__mc()).mcBtn.gotoAndStop('off');
};
v2.onBtnRelease = function () {
var v2 = new Object();
v2.name = (this.__get__mc())._name;
v2.angle = this.iAngle;
v2.path = this.iPath;
v2.node = this.iNode;
v2.frame = this.iFrame;
v2.dir = this.iDir;
this.dispatchEvent({'type': 'onSetIntersectPoint', 'target': v2});
};
v2.setBtn = function () {
var hook = this;
(this.__get__mc()).mcBtn.onRelease = function () {
hook.onBtnRelease();
};
};
ASSetPropFlags(src.game.dev.DevIntersectBtn.prototype, null, 1);
}
#endinitclip
}
movieClip 1896 __Packages.src.game.dev.DevConsole {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.dev) {
_global.src.game.dev = new Object();
}
if (!_global.src.game.dev.DevConsole) {
var v1 = function () {
super();
};
src.game.dev.DevConsole = v1;
src.game.dev.DevConsole extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.reloadData = function () {};
v2.setGameItemSpawnNodes = function () {
this._itemSpawnNodes = new Array();
this._itemSpawnNodes[0] = {'path': ['a1', 'a2', 'b1', 'b2', 'b3', 'b4', 'c1', 'c3'], 'node': [180, 180, 180, 180, 0, 0, 180, 0], 'scale': 80, 'x': 0, 'y': -100, 'used': false, 'container': 'mcItemsBack'};
this._itemSpawnNodes[1] = {'path': ['b1', 'b3', 'd1', 'g2', 'c2', 'c4'], 'node': [90, 90, 60, 120, 0, 180], 'scale': 100, 'x': 90, 'y': 10, 'used': false, 'container': 'mcItemsFront'};
this._itemSpawnNodes[2] = {'path': ['f1', 'f2'], 'node': [315, 225], 'scale': 100, 'x': -90, 'y': -45, 'used': false, 'container': 'mcItemsFront'};
this._itemSpawnNodes[3] = {'path': ['f3', 'f4'], 'node': [135, 45], 'scale': 60, 'x': 90, 'y': -18, 'used': false, 'container': 'mcItemsBack'};
this._itemSpawnNodes[4] = {'path': ['g4', 'd3', 'd1', 'g2'], 'node': [300, 240, 240, 300], 'scale': 60, 'x': -75, 'y': 15, 'used': false, 'container': 'mcItemsBack'};
this._itemSpawnNodes[5] = {'path': ['c1', 'c3', 'd4', 'g3', 'd3', 'g4', 'f4', 'f3'], 'node': [45, 135, 120, 60, 120, 60, 270, 270], 'scale': 100, 'x': 0, 'y': 75, 'used': false, 'container': 'mcItemsFront'};
};
v2.attachObjectsToNodes = function () {
trace('ATTACH OBJECTS');
for (var v6 in this._itemSpawnNodes) {
trace('NODE: ' + v6);
var v2 = this._itemSpawnNodes[v6];
trace('NODE: ' + v2.container);
trace('MC: ' + this.mcRoot[v2.container]);
var v5 = this.mcRoot[v2.container].attachMovie('mcPacifier30', 'mcObject' + v6, v6);
trace('OBJECT: ' + v5);
v5.init('objective', v2.x, v2.y, v2.scale);
var v4 = v5.createTextField('txtNumber', 10, 0, 0, 20, 20);
v4.embedFonts = true;
v4._y = -10;
var v3 = new TextFormat();
v3.bold = true;
v3.size = 20;
v3.font = 'BlockBE';
v4.text = v6;
v4.setTextFormat(v3);
}
};
v2.init = function (rootMC, pathMgr) {
this.mcRoot = rootMC;
this.pm = pathMgr;
this.f = 1;
for (var v2 in src.game.dev.DevConsole.PATHS) {
(this.__get__mc()).mcPathsPanel[src.game.dev.DevConsole.PATHS[v2]].init(src.game.dev.DevConsole.PATHS[v2], false, 'path');
(this.__get__mc()).mcPathsPanel[src.game.dev.DevConsole.PATHS[v2]].addEventListener('onSetPath', mx.utils.Delegate.create(this, this.onSetPath));
}
(this.__get__mc()).mcPathsPanel[src.game.dev.DevConsole.PATHS[0]].turnBtnOn();
this.delegate = mx.utils.Delegate.create(this, this.setIntersectPoint);
this.setIntersectPanel();
this.initRenderVars();
this.setBtnState();
this.setGameItemSpawnNodes();
this.attachObjectsToNodes();
};
v2.setIntersectPanel = function () {
trace('SET INTERSECT PANEL');
this.intersectObj = new Object();
var v10 = this.pm.getCurrentPath();
this.intersectObj = v10.getIntersections();
this.changePath = '';
this.changeNode = -1;
this.changeFrame = -1;
this.changeAngle = -1;
this.changeOnFrame = -1;
var v9 = 0;
while (v9 < 8) {
(this.__get__mc()).mcIntersectPanelRight['i' + v9]._visible = false;
(this.__get__mc()).mcIntersectPanelLeft['i' + v9]._visible = false;
++v9;
}
var v2 = 0;
for (v9 in this.intersectObj) {
var v3 = this.intersectObj[v9].right.path;
var v7 = this.intersectObj[v9].right.node;
var v5 = this.intersectObj[v9].right.frame;
if (v3 !== undefined) {
(this.__get__mc()).mcIntersectPanelRight['i' + v2].init(v3, 'Right', v3, v7, v5, v9);
(this.__get__mc()).mcIntersectPanelRight['i' + v2].removeEventListener('onSetIntersectPoint', this.delegate);
(this.__get__mc()).mcIntersectPanelRight['i' + v2].addEventListener('onSetIntersectPoint', this.delegate);
(this.__get__mc()).mcIntersectPanelRight['i' + v2].turnBtnOff();
(this.__get__mc()).mcIntersectPanelRight['i' + v2]._visible = true;
}
var v4 = this.intersectObj[v9].left.path;
var v8 = this.intersectObj[v9].left.node;
var v6 = this.intersectObj[v9].left.frame;
if (v4 !== undefined) {
(this.__get__mc()).mcIntersectPanelLeft['i' + v2].init(v4, 'Left', v4, v8, v6, v9);
(this.__get__mc()).mcIntersectPanelLeft['i' + v2].removeEventListener('onSetIntersectPoint', this.delegate);
(this.__get__mc()).mcIntersectPanelLeft['i' + v2].addEventListener('onSetIntersectPoint', this.delegate);
(this.__get__mc()).mcIntersectPanelLeft['i' + v2].turnBtnOff();
(this.__get__mc()).mcIntersectPanelLeft['i' + v2]._visible = true;
}
++v2;
}
};
v2.setIntersectPoint = function (e) {
var v4 = 'mcIntersectPanel' + e.target.dir;
var v2 = 0;
while (v2 < 8) {
(this.__get__mc()).mcIntersectPanelRight['i' + v2].turnBtnOff();
++v2;
}
v2 = 0;
while (v2 < 8) {
(this.__get__mc()).mcIntersectPanelLeft['i' + v2].turnBtnOff();
++v2;
}
(this.__get__mc())[v4][e.target.name].turnBtnOn();
this.changePath = e.target.path;
this.changeNode = e.target.node;
this.changeFrame = e.target.frame;
this.changeAngle = e.target.angle;
this.changeOnFrame = this.translateAngleToFrame(this.changeAngle);
trace('CHANGE ON FRAME: ' + this.changeOnFrame);
trace('CHANGE ON ANGLE: ' + this.changeAngle);
trace('CHANGE TO PATH: ' + this.changePath);
trace('CHANGE TO NODE: ' + this.changeNode);
trace('CHANGE TO FRAME: ' + this.changeFrame);
};
v2.translateAngleToFrame = function (node) {
var v1 = 0;
for (var v3 in src.game.dev.DevConsole.NODES) {
if (node == src.game.dev.DevConsole.NODES[v3]) {
v1 = Number(v3) + 1;
}
}
return v1;
};
v2.onSetPath = function (e) {
trace('SET PATH');
for (var v2 in src.game.dev.DevConsole.PATHS) {
(this.__get__mc()).mcPathsPanel[src.game.dev.DevConsole.PATHS[v2]].turnBtnOff();
}
trace(e.target.path);
trace((this.__get__mc()).mcPathsPanel[e.target.path]);
(this.__get__mc()).mcPathsPanel[e.target.path].turnBtnOn();
this.pm.changePathDev(e.target.path, 1);
this.setIntersectPanel();
};
v2.setBtnState = function () {
var hook = this;
(this.__get__mc()).mcPlayBtn.onRelease = function () {
hook.playPath();
};
(this.__get__mc()).mcDevReloadBtn.onRelease = function () {
hook.reloadData();
};
};
v2.playPath = function () {
this.f = 1;
(this.__get__mc()).onEnterFrame = mx.utils.Delegate.create(this, this.render);
};
v2.render = function () {
var v2 = this.pm.getCurrentPath();
if (this.f >= (v2.__get__mc())._totalframes) {
delete (this.__get__mc()).onEnterFrame;
} else {
if (this.f == this.changeOnFrame) {
trace('CHANGE THE PATH');
this.pm.changePathDev(this.changePath, this.changeFrame);
this.f = this.changeFrame;
this.changePath = '';
this.changeNode = -1;
this.changeFrame = -1;
this.changeAngle = -1;
this.changeOnFrame = -1;
} else {
v2.renderFrame(this.f);
++this.f;
}
}
};
v2.initRenderVars = function () {
this._change = false;
this._changeNode = -1;
this._curFrame = 1;
this._curNode = 0;
this._curNodeIndex = 0;
this._speeds = new Array(22.5, 30, 45, 60);
this._speedSetting = 0;
this._speed = this._speeds[this._speedSetting];
};
v2.setNextFrame = function () {
this._curNode += this._speed;
if (this._curNode > 337.5) {
this._curNode = 0;
this._curNodeIndex = 0;
this._curFrame = 1;
} else {
var v3 = 0;
var v2 = this._curNodeIndex;
while (v2 < 24) {
trace('COUNT: ' + v3);
trace('NODE: ' + this._curNode);
trace('FRAME: ' + this._curFrame);
trace('INDEX: ' + this._curNodeIndex);
if (this._curNode == src.game.dev.DevConsole.NODES[v2]) {
this._curFrame = v2 + 1;
this._curNodeIndex = v2;
trace('FRAME: ' + this._curFrame);
break;
}
++v3;
++v2;
}
}
};
v2.findNextGoodNode = function (fromNode) {
var v3 = fromNode;
var v2 = this._curNodeIndex;
while (v2 < 24) {
if (src.game.dev.DevConsole.NODES[v2] > fromNode && src.game.dev.DevConsole.NODES[v2] % this._speed == 0) {
v3 = src.game.dev.DevConsole.NODES[v2];
break;
}
++v2;
}
if (v3 == fromNode) {
v3 = this._curNode + this._speed;
}
trace('NEXT GOOD NODE: ' + v3);
return v3;
};
v2.mainLoop = function () {
if (Key.isDown(38)) {
} else {
if (Key.isDown(40)) {
}
}
if (Key.isDown(39)) {
this._changeNode = this.pm.getIntersectionNode('right', this._curNode, this._speed);
if (this._changeNode > -1) {
this._change = true;
}
} else {
if (Key.isDown(37)) {
this._changeNode = this.pm.getIntersectionNode('left', this._curNode, this._speed);
if (this._changeNode > -1) {
this._change = true;
}
}
}
if (this._change && this._curNode == this._changeNode) {
trace('!!!!!!!!!!!!CHANGE PATH!!!!!!!!!!!!!!!');
var v2 = this.pm.changePath();
if (v2.node % this._speed == 0) {
this._curNode = v2.node;
} else {
this._curNode = this.findNextGoodNode(v2.node);
}
this._curFrame = v2.frame;
this._change = false;
this._changeNode = -1;
this._curNodeIndex = v2.frame - 1;
delete (this.__get__mc()).onEnterFrame;
}
var v3 = this.pm.getCurrentPath();
trace('\n------RENDER--');
trace('PATH: ' + (v3.__get__mc())._name);
trace('FRAME: ' + this._curFrame);
trace('NODE: ' + this._curNode + '\n');
v3.renderFrame(this._curFrame);
this.setNextFrame();
};
v1.PATHS = new Array('a1', 'a2', 'b1', 'b2', 'b3', 'b4', 'c1', 'c2', 'c3', 'c4', 'd1', 'd2', 'd3', 'd4', 'e1', 'e2', 'e3', 'e4', 'f3', 'f2', 'f4', 'f1', 'g1', 'g2', 'g3', 'g4');
v1.NODES = new Array(0, 22.5, 30, 45, 60, 67.5, 90, 112.5, 120, 135, 150, 157.5, 180, 202.5, 210, 225, 240, 247.5, 270, 292.5, 300, 315, 330, 337.5);
ASSetPropFlags(src.game.dev.DevConsole.prototype, null, 1);
}
#endinitclip
}
movieClip 1897 __Packages.src.game.PathManager {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.PathManager) {
var v1 = function (mcTarget) {
this.mc = mcTarget;
this.init();
};
src.game.PathManager = v1;
var v2 = v1.prototype;
v2.getCurrentPath = function () {
return this.mc[this.currentPath];
};
v2.setCurrentPath = function (path, frame) {
if (!frame) {
frame = 1;
}
this.mc[this.currentPath]._visible = false;
this.currentPath = path;
this.mc[this.currentPath].gotoAndStop(frame);
this.mc[this.currentPath]._visible = true;
};
v2.getCurrentPathString = function () {
return this.currentPath;
};
v2.init = function () {
this._intersectionData = new src.game.IntersectionData();
this.initPaths();
this.currentPath = 'a1';
this.mc[this.currentPath]._visible = true;
};
v2.initPaths = function () {
var v3 = src.game.PathManager.PATHS.length;
var v2 = 0;
while (v2 < v3) {
trace('');
trace('----------------------------------------------------------------------');
trace('Path: ' + this.mc[src.game.PathManager.PATHS[v2]]);
this.mc[src.game.PathManager.PATHS[v2]].addEventListener('onChangePath', mx.utils.Delegate.create(this, this.changePath));
this.mc[src.game.PathManager.PATHS[v2]].setIntersections(this._intersectionData.getPathIntersection(src.game.PathManager.PATHS[v2]));
++v2;
}
};
v2.upSpeed = function () {
this.mc[this.currentPath].increaseSpeed();
};
v2.downSpeed = function () {
this.mc[this.currentPath].decreaseSpeed();
};
v2.setStartingPath = function () {
this.changePathTo({'path': 'a2', 'frame': 1});
};
v2.playPath = function () {
trace('Play Path: ' + this.currentPath);
this.mc[this.currentPath].startPath(this.mc[this.currentPath]._currentframe);
};
v2.pausePath = function () {
this.mc[this.currentPath].stopPath();
};
v2.changePathTo = function (newPath) {
trace('Change Path: ' + newPath.path);
trace('Change Path: ' + newPath.frame);
this.mc[this.currentPath].stopPath();
this.mc[this.currentPath]._visible = false;
this.currentPath = newPath.path;
this.mc[this.currentPath]._visible = true;
this.mc[this.currentPath].gotoAndStop(newPath.frame);
this.playPath();
};
v2.changePathLeft = function () {
trace('Change Path LEFT');
this.mc[this.currentPath].change('left');
};
v2.changePathRight = function () {};
v2.initDevVars = function () {
this._curPathIndex = 0;
};
v2.nextPath = function () {
this.currentPath = src.game.PathManager.PATHS[++this._curPathIndex];
};
v2.resetPath = function () {
this.currentPath = src.game.PathManager.PATHS[this._curPathIndex];
};
v2.changePathDev = function (newPath, frame) {
this.mc[this.currentPath]._visible = false;
this.currentPath = newPath;
this.mc[this.currentPath].gotoAndStop(frame);
this.mc[this.currentPath]._visible = true;
};
v2.changePath = function () {
this.mc[this.currentPath]._visible = false;
this.currentPath = this.newPath.path;
this.mc[this.currentPath].gotoAndStop(this.newPath.frame);
this.mc[this.currentPath]._visible = true;
return this.newPath;
};
v2.getIntersectionNode = function (direction, curNode, curSpeed) {
trace('');
trace('INTERSECTIONS: ' + curNode);
var v2 = curNode;
var v3 = this.mc[this.currentPath].getIntersections();
while (!v3[v2][direction]) {
v2 += curSpeed;
trace('DOES THIS NODE HAVE AN INTERSECTION: ' + v2);
if (v2 == 360) {
v2 = 0;
break;
} else {
if (v2 > 337.5) {
v2 = -1;
break;
}
}
}
if (v2 > -1) {
this.newPath = v3[v2][direction];
trace('NEW PATH: ' + this.newPath.path);
trace('NEW FRAME: ' + this.newPath.frame);
trace('NEW NODE: ' + this.newPath.node);
}
trace('');
return v2;
};
v1.PATHS = new Array('a1', 'a2', 'b1', 'b2', 'b3', 'b4', 'c1', 'c2', 'c3', 'c4', 'd1', 'd2', 'd3', 'd4', 'e1', 'e2', 'e3', 'e4', 'f3', 'f2', 'f4', 'f1', 'g1', 'g2', 'g3', 'g4');
v1.NODES = new Array(0, 22.5, 30, 45, 60, 67.5, 90, 112.5, 120, 135, 150, 157.5, 180, 202.5, 210, 225, 240, 247.5, 270, 292.5, 300, 315, 330, 337.5);
ASSetPropFlags(src.game.PathManager.prototype, null, 1);
}
#endinitclip
}
movieClip 1898 __Packages.src.game.IntersectionData {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.IntersectionData) {
var v1 = function () {
this.buildDataStructure();
};
src.game.IntersectionData = v1;
var v2 = v1.prototype;
v2.getPathIntersection = function (path) {
var v3 = new Array();
var v4 = this._intersections[path].length;
var v2 = 0;
while (v2 < v4) {
v3.push(this._intersections[path][v2]);
++v2;
}
return v3;
};
v2.buildDataStructure = function () {
this._intersections = new Object();
this._intersections.a1 = new Array();
this._intersections.a1[0] = {'angle': 0, 'right': {'path': 'b1', 'frame': 1, 'node': 0}, 'left': {'path': 'b4', 'frame': 13, 'node': 180}};
this._intersections.a1[1] = {'angle': 45, 'right': {'path': 'd1', 'frame': 1, 'node': 0}, 'left': {'path': 'd4', 'frame': 13, 'node': 180}};
this._intersections.a1[2] = {'angle': 90, 'right': {'path': 'f1', 'frame': 13, 'node': 180}, 'left': {'path': 'f4', 'frame': 1, 'node': 0}};
this._intersections.a1[3] = {'angle': 135, 'right': {'path': 'g1', 'frame': 1, 'node': 0}, 'left': {'path': 'g4', 'frame': 13, 'node': 180}};
this._intersections.a1[4] = {'angle': 180, 'right': {'path': 'b4', 'frame': 1, 'node': 0}, 'left': {'path': 'b1', 'frame': 13, 'node': 180}};
this._intersections.a1[5] = {'angle': 225, 'right': {'path': 'd4', 'frame': 1, 'node': 0}, 'left': {'path': 'd1', 'frame': 13, 'node': 180}};
this._intersections.a1[6] = {'angle': 270, 'right': {'path': 'f4', 'frame': 13, 'node': 180}, 'left': {'path': 'f1', 'frame': 1, 'node': 0}};
this._intersections.a1[7] = {'angle': 315, 'right': {'path': 'g4', 'frame': 1, 'node': 0}, 'left': {'path': 'g1', 'frame': 13, 'node': 180}};
this._intersections.a2 = new Array();
this._intersections.a2[0] = {'angle': 0, 'right': {'path': 'b3', 'frame': 13, 'node': 180}, 'left': {'path': 'b2', 'frame': 1, 'node': 0}};
this._intersections.a2[1] = {'angle': 45, 'right': {'path': 'd3', 'frame': 13, 'node': 180}, 'left': {'path': 'd2', 'frame': 1, 'node': 0}};
this._intersections.a2[2] = {'angle': 90, 'right': {'path': 'f3', 'frame': 1, 'node': 0}, 'left': {'path': 'f2', 'frame': 13, 'node': 180}};
this._intersections.a2[3] = {'angle': 135, 'right': {'path': 'g3', 'frame': 13, 'node': 180}, 'left': {'path': 'g2', 'frame': 1, 'node': 0}};
this._intersections.a2[4] = {'angle': 180, 'right': {'path': 'b2', 'frame': 13, 'node': 180}, 'left': {'path': 'b3', 'frame': 1, 'node': 0}};
this._intersections.a2[5] = {'angle': 225, 'right': {'path': 'd2', 'frame': 13, 'node': 180}, 'left': {'path': 'd3', 'frame': 1, 'node': 0}};
this._intersections.a2[6] = {'angle': 270, 'right': {'path': 'f2', 'frame': 1, 'node': 0}, 'left': {'path': 'f3', 'frame': 13, 'node': 180}};
this._intersections.a2[7] = {'angle': 315, 'right': {'path': 'g2', 'frame': 13, 'node': 180}, 'left': {'path': 'g3', 'frame': 1, 'node': 0}};
this._intersections.b1 = new Array();
this._intersections.b1[0] = {'angle': 0, 'right': {'path': 'c1', 'frame': 1, 'node': 0}, 'left': {'path': 'a1', 'frame': 1, 'node': 0}};
this._intersections.b1[1] = {'angle': 90, 'left': {'path': 'g4', 'frame': 8, 'node': 112.5}};
this._intersections.b1[2] = {'angle': 112.5, 'right': {'path': 'd1', 'frame': 7, 'node': 90}};
this._intersections.b1[3] = {'angle': 180, 'right': {'path': 'a1', 'frame': 13, 'node': 180}, 'left': {'path': 'c1', 'frame': 13, 'node': 180}};
this._intersections.b1[4] = {'angle': 270, 'right': {'path': 'g4', 'frame': 20, 'node': 292.5}};
this._intersections.b1[5] = {'angle': 292.5, 'left': {'path': 'd1', 'frame': 19, 'node': 270}};
this._intersections.b2 = new Array();
this._intersections.b2[0] = {'angle': 0, 'right': {'path': 'a2', 'frame': 1, 'node': 0}, 'left': {'path': 'c1', 'frame': 1, 'node': 0}};
this._intersections.b2[1] = {'angle': 90, 'right': {'path': 'g3', 'frame': 8, 'node': 112.5}};
this._intersections.b2[2] = {'angle': 112.5, 'left': {'path': 'd2', 'frame': 7, 'node': 90}};
this._intersections.b2[3] = {'angle': 180, 'right': {'path': 'c1', 'frame': 13, 'node': 180}, 'left': {'path': 'a2', 'frame': 13, 'node': 180}};
this._intersections.b2[4] = {'angle': 270, 'left': {'path': 'g3', 'frame': 20, 'node': 292.5}};
this._intersections.b2[5] = {'angle': 292.5, 'right': {'path': 'd2', 'frame': 19, 'node': 270}};
this._intersections.b3 = new Array();
this._intersections.b3[0] = {'angle': 0, 'right': {'path': 'a2', 'frame': 13, 'node': 180}, 'left': {'path': 'c3', 'frame': 1, 'node': 0}};
this._intersections.b3[1] = {'angle': 90, 'right': {'path': 'g2', 'frame': 10, 'node': 135}};
this._intersections.b3[2] = {'angle': 112.5, 'left': {'path': 'd3', 'frame': 7, 'node': 90}};
this._intersections.b3[3] = {'angle': 180, 'right': {'path': 'c3', 'frame': 13, 'node': 180}, 'left': {'path': 'a2', 'frame': 1, 'node': 0}};
this._intersections.b3[4] = {'angle': 270, 'left': {'path': 'g2', 'frame': 20, 'node': 292.5}};
this._intersections.b3[5] = {'angle': 292.5, 'right': {'path': 'd3', 'frame': 19, 'node': 270}};
this._intersections.b4 = new Array();
this._intersections.b4[0] = {'angle': 0, 'right': {'path': 'c3', 'frame': 1, 'node': 0}, 'left': {'path': 'a1', 'frame': 13, 'node': 180}};
this._intersections.b4[1] = {'angle': 90, 'left': {'path': 'g1', 'frame': 8, 'node': 112.5}};
this._intersections.b4[2] = {'angle': 112.5, 'right': {'path': 'd4', 'frame': 7, 'node': 90}};
this._intersections.b4[3] = {'angle': 180, 'right': {'path': 'a1', 'frame': 1, 'node': 0}, 'left': {'path': 'c3', 'frame': 13, 'node': 180}};
this._intersections.b4[4] = {'angle': 270, 'right': {'path': 'g1', 'frame': 20, 'node': 292.5}};
this._intersections.b4[5] = {'angle': 300, 'left': {'path': 'd4', 'frame': 19, 'node': 270}};
this._intersections.c1 = new Array();
this._intersections.c1[0] = {'angle': 0, 'right': {'path': 'b2', 'frame': 1, 'node': 0}, 'left': {'path': 'b1', 'frame': 1, 'node': 0}};
this._intersections.c1[1] = {'angle': 30, 'right': {'path': 'g3', 'frame': 4, 'node': 45}, 'left': {'path': 'g4', 'frame': 5, 'node': 60}};
this._intersections.c1[2] = {'angle': 90, 'right': {'path': 'e1', 'frame': 7, 'node': 90}, 'left': {'path': 'e2', 'frame': 7, 'node': 90}};
this._intersections.c1[3] = {'angle': 135, 'right': {'path': 'd1', 'frame': 10, 'node': 135}, 'left': {'path': 'd2', 'frame': 10, 'node': 135}};
this._intersections.c1[4] = {'angle': 180, 'right': {'path': 'b1', 'frame': 13, 'node': 180}, 'left': {'path': 'b2', 'frame': 13, 'node': 180}};
this._intersections.c1[5] = {'angle': 225, 'right': {'path': 'g4', 'frame': 17, 'node': 240}, 'left': {'path': 'g3', 'frame': 17, 'node': 240}};
this._intersections.c1[6] = {'angle': 270, 'right': {'path': 'e2', 'frame': 19, 'node': 270}, 'left': {'path': 'e1', 'frame': 19, 'node': 270}};
this._intersections.c1[7] = {'angle': 330, 'right': {'path': 'd2', 'frame': 22, 'node': 315}, 'left': {'path': 'd1', 'frame': 22, 'node': 315}};
this._intersections.c2 = new Array();
this._intersections.c2[0] = {'angle': 0, 'right': {'path': 'f3', 'frame': 13, 'node': 180}, 'left': {'path': 'f1', 'frame': 13, 'node': 180}};
this._intersections.c2[1] = {'angle': 30, 'right': {'path': 'd3', 'frame': 5, 'node': 60}, 'left': {'path': 'd1', 'frame': 5, 'node': 60}};
this._intersections.c2[2] = {'angle': 90, 'right': {'path': 'e3', 'frame': 7, 'node': 90}, 'left': {'path': 'e1', 'frame': 7, 'node': 90}};
this._intersections.c2[3] = {'angle': 135, 'right': {'path': 'g1', 'frame': 10, 'node': 135}, 'left': {'path': 'g3', 'frame': 10, 'node': 135}};
this._intersections.c2[4] = {'angle': 180, 'right': {'path': 'f1', 'frame': 1, 'node': 0}, 'left': {'path': 'f3', 'frame': 1, 'node': 0}};
this._intersections.c2[5] = {'angle': 225, 'right': {'path': 'd1', 'frame': 18, 'node': 247.5}, 'left': {'path': 'd3', 'frame': 18, 'node': 247.5}};
this._intersections.c2[6] = {'angle': 270, 'right': {'path': 'e1', 'frame': 19, 'node': 270}, 'left': {'path': 'e3', 'frame': 19, 'node': 270}};
this._intersections.c2[7] = {'angle': 330, 'right': {'path': 'g3', 'frame': 22, 'node': 315}, 'left': {'path': 'g1', 'frame': 22, 'node': 315}};
this._intersections.c3 = new Array();
this._intersections.c3[0] = {'angle': 0, 'right': {'path': 'b3', 'frame': 1, 'node': 0}, 'left': {'path': 'b4', 'frame': 1, 'node': 0}};
this._intersections.c3[1] = {'angle': 45, 'right': {'path': 'g2', 'frame': 5, 'node': 60}, 'left': {'path': 'g1', 'frame': 5, 'node': 60}};
this._intersections.c3[2] = {'angle': 90, 'right': {'path': 'e4', 'frame': 7, 'node': 90}, 'left': {'path': 'e3', 'frame': 7, 'node': 90}};
this._intersections.c3[3] = {'angle': 150, 'right': {'path': 'd4', 'frame': 10, 'node': 135}, 'left': {'path': 'd3', 'frame': 10, 'node': 135}};
this._intersections.c3[4] = {'angle': 180, 'right': {'path': 'b4', 'frame': 13, 'node': 180}, 'left': {'path': 'b3', 'frame': 13, 'node': 180}};
this._intersections.c3[5] = {'angle': 210, 'right': {'path': 'g1', 'frame': 17, 'node': 240}, 'left': {'path': 'g2', 'frame': 17, 'node': 240}};
this._intersections.c3[6] = {'angle': 270, 'right': {'path': 'e3', 'frame': 19, 'node': 270}, 'left': {'path': 'e4', 'frame': 19, 'node': 270}};
this._intersections.c3[7] = {'angle': 315, 'right': {'path': 'd3', 'frame': 22, 'node': 315}, 'left': {'path': 'd4', 'frame': 22, 'node': 315}};
this._intersections.c4 = new Array();
this._intersections.c4[0] = {'angle': 0, 'right': {'path': 'f2', 'frame': 13, 'node': 180}, 'left': {'path': 'f4', 'frame': 13, 'node': 180}};
this._intersections.c4[1] = {'angle': 30, 'right': {'path': 'd2', 'frame': 5, 'node': 60}, 'left': {'path': 'd4', 'frame': 5, 'node': 60}};
this._intersections.c4[2] = {'angle': 90, 'right': {'path': 'e2', 'frame': 7, 'node': 90}, 'left': {'path': 'e4', 'frame': 7, 'node': 90}};
this._intersections.c4[3] = {'angle': 135, 'right': {'path': 'g4', 'frame': 10, 'node': 135}, 'left': {'path': 'g2', 'frame': 10, 'node': 135}};
this._intersections.c4[4] = {'angle': 180, 'right': {'path': 'f4', 'frame': 1, 'node': 0}, 'left': {'path': 'f2', 'frame': 1, 'node': 0}};
this._intersections.c4[5] = {'angle': 225, 'right': {'path': 'd4', 'frame': 17, 'node': 240}, 'left': {'path': 'd2', 'frame': 17, 'node': 240}};
this._intersections.c4[6] = {'angle': 270, 'right': {'path': 'e4', 'frame': 19, 'node': 270}, 'left': {'path': 'e2', 'frame': 19, 'node': 270}};
this._intersections.c4[7] = {'angle': 330, 'right': {'path': 'g2', 'frame': 22, 'node': 315}, 'left': {'path': 'g4', 'frame': 22, 'node': 315}};
this._intersections.d1 = new Array();
this._intersections.d1[0] = {'angle': 0, 'right': {'path': 'e1', 'frame': 1, 'node': 0}, 'left': {'path': 'a1', 'frame': 4, 'node': 45}};
this._intersections.d1[1] = {'angle': 90, 'left': {'path': 'b1', 'frame': 8, 'node': 112.5}};
this._intersections.d1[2] = {'angle': 112.5, 'right': {'path': 'f1', 'frame': 19, 'node': 270}};
this._intersections.d1[3] = {'angle': 180, 'right': {'path': 'a1', 'frame': 16, 'node': 225}, 'left': {'path': 'e1', 'frame': 13, 'node': 180}};
this._intersections.d1[4] = {'angle': 270, 'right': {'path': 'b1', 'frame': 20, 'node': 292.5}};
this._intersections.d1[5] = {'angle': 292.5, 'left': {'path': 'f1', 'frame': 7, 'node': 90}};
this._intersections.d2 = new Array();
this._intersections.d2[0] = {'angle': 0, 'right': {'path': 'a2', 'frame': 5, 'node': 60}, 'left': {'path': 'e2', 'frame': 1, 'node': 0}};
this._intersections.d2[1] = {'angle': 90, 'right': {'path': 'b2', 'frame': 9, 'node': 120}};
this._intersections.d2[2] = {'angle': 112.5, 'left': {'path': 'f2', 'frame': 19, 'node': 270}};
this._intersections.d2[3] = {'angle': 180, 'right': {'path': 'e2', 'frame': 13, 'node': 180}, 'left': {'path': 'a2', 'frame': 16, 'node': 225}};
this._intersections.d2[4] = {'angle': 270, 'left': {'path': 'b2', 'frame': 20, 'node': 292.5}};
this._intersections.d2[5] = {'angle': 292.5, 'right': {'path': 'f2', 'frame': 7, 'node': 90}};
this._intersections.d3 = new Array();
this._intersections.d3[0] = {'angle': 0, 'right': {'path': 'a2', 'frame': 16, 'node': 225}, 'left': {'path': 'e3', 'frame': 1, 'node': 0}};
this._intersections.d3[1] = {'angle': 90, 'right': {'path': 'b3', 'frame': 9, 'node': 120}};
this._intersections.d3[2] = {'angle': 112.5, 'left': {'path': 'f3', 'frame': 19, 'node': 270}};
this._intersections.d3[3] = {'angle': 180, 'right': {'path': 'e3', 'frame': 13, 'node': 180}, 'left': {'path': 'a2', 'frame': 4, 'node': 45}};
this._intersections.d3[4] = {'angle': 270, 'left': {'path': 'b3', 'frame': 21, 'node': 300}};
this._intersections.d3[5] = {'angle': 292.5, 'right': {'path': 'f3', 'frame': 7, 'node': 90}};
this._intersections.d4 = new Array();
this._intersections.d4[0] = {'angle': 0, 'right': {'path': 'e4', 'frame': 1, 'node': 0}, 'left': {'path': 'a1', 'frame': 16, 'node': 225}};
this._intersections.d4[1] = {'angle': 90, 'left': {'path': 'b4', 'frame': 9, 'node': 120}};
this._intersections.d4[2] = {'angle': 112.5, 'right': {'path': 'f4', 'frame': 19, 'node': 270}};
this._intersections.d4[3] = {'angle': 180, 'right': {'path': 'a1', 'frame': 4, 'node': 45}, 'left': {'path': 'e4', 'frame': 13, 'node': 180}};
this._intersections.d4[4] = {'angle': 270, 'right': {'path': 'b4', 'frame': 20, 'node': 292.5}};
this._intersections.d4[5] = {'angle': 292.5, 'left': {'path': 'f4', 'frame': 7, 'node': 90}};
this._intersections.e1 = new Array();
this._intersections.e1[0] = {'angle': 0, 'right': {'path': 'g3', 'frame': 1, 'node': 0}, 'left': {'path': 'd1', 'frame': 1, 'node': 0}};
this._intersections.e1[1] = {'angle': 30, 'right': {'path': 'f3', 'frame': 17, 'node': 240}, 'left': {'path': 'b1', 'frame': 5, 'node': 60}};
this._intersections.e1[2] = {'angle': 90, 'right': {'path': 'c2', 'frame': 7, 'node': 90}, 'left': {'path': 'c1', 'frame': 7, 'node': 90}};
this._intersections.e1[3] = {'angle': 135, 'right': {'path': 'f1', 'frame': 21, 'node': 300}, 'left': {'path': 'b2', 'frame': 10, 'node': 135}};
this._intersections.e1[4] = {'angle': 180, 'right': {'path': 'd1', 'frame': 13, 'node': 180}, 'left': {'path': 'g3', 'frame': 13, 'node': 180}};
this._intersections.e1[5] = {'angle': 225, 'right': {'path': 'b1', 'frame': 17, 'node': 240}, 'left': {'path': 'f3', 'frame': 5, 'node': 60}};
this._intersections.e1[6] = {'angle': 270, 'right': {'path': 'c1', 'frame': 19, 'node': 270}, 'left': {'path': 'c2', 'frame': 19, 'node': 270}};
this._intersections.e1[7] = {'angle': 330, 'right': {'path': 'b2', 'frame': 22, 'node': 315}, 'left': {'path': 'f1', 'frame': 10, 'node': 135}};
this._intersections.e2 = new Array();
this._intersections.e2[0] = {'angle': 0, 'right': {'path': 'd2', 'frame': 1, 'node': 0}, 'left': {'path': 'g4', 'frame': 1, 'node': 0}};
this._intersections.e2[1] = {'angle': 45, 'right': {'path': 'b2', 'frame': 5, 'node': 60}, 'left': {'path': 'f4', 'frame': 17, 'node': 240}};
this._intersections.e2[2] = {'angle': 90, 'right': {'path': 'c1', 'frame': 7, 'node': 90}, 'left': {'path': 'c4', 'frame': 7, 'node': 90}};
this._intersections.e2[3] = {'angle': 150, 'right': {'path': 'b1', 'frame': 10, 'node': 135}, 'left': {'path': 'f2', 'frame': 22, 'node': 315}};
this._intersections.e2[4] = {'angle': 180, 'right': {'path': 'g4', 'frame': 13, 'node': 180}, 'left': {'path': 'd2', 'frame': 13, 'node': 180}};
this._intersections.e2[5] = {'angle': 210, 'right': {'path': 'f4', 'frame': 5, 'node': 60}, 'left': {'path': 'b2', 'frame': 17, 'node': 240}};
this._intersections.e2[6] = {'angle': 270, 'right': {'path': 'c4', 'frame': 19, 'node': 270}, 'left': {'path': 'c1', 'frame': 19, 'node': 270}};
this._intersections.e2[7] = {'angle': 315, 'right': {'path': 'f2', 'frame': 9, 'node': 120}, 'left': {'path': 'b1', 'frame': 22, 'node': 315}};
this._intersections.e3 = new Array();
this._intersections.e3[0] = {'angle': 0, 'right': {'path': 'd3', 'frame': 1, 'node': 0}, 'left': {'path': 'g1', 'frame': 1, 'node': 0}};
this._intersections.e3[1] = {'angle': 45, 'right': {'path': 'b3', 'frame': 5, 'node': 60}, 'left': {'path': 'f1', 'frame': 17, 'node': 240}};
this._intersections.e3[2] = {'angle': 90, 'right': {'path': 'c3', 'frame': 7, 'node': 90}, 'left': {'path': 'c2', 'frame': 7, 'node': 90}};
this._intersections.e3[3] = {'angle': 150, 'right': {'path': 'b4', 'frame': 10, 'node': 135}, 'left': {'path': 'f3', 'frame': 22, 'node': 315}};
this._intersections.e3[4] = {'angle': 180, 'right': {'path': 'g1', 'frame': 13, 'node': 180}, 'left': {'path': 'd3', 'frame': 13, 'node': 180}};
this._intersections.e3[5] = {'angle': 210, 'right': {'path': 'f1', 'frame': 5, 'node': 60}, 'left': {'path': 'b3', 'frame': 16, 'node': 225}};
this._intersections.e3[6] = {'angle': 270, 'right': {'path': 'c2', 'frame': 19, 'node': 270}, 'left': {'path': 'c3', 'frame': 19, 'node': 270}};
this._intersections.e3[7] = {'angle': 315, 'right': {'path': 'f3', 'frame': 9, 'node': 120}, 'left': {'path': 'b4', 'frame': 22, 'node': 315}};
this._intersections.e4 = new Array();
this._intersections.e4[0] = {'angle': 0, 'right': {'path': 'g2', 'frame': 1, 'node': 0}, 'left': {'path': 'd4', 'frame': 1, 'node': 0}};
this._intersections.e4[1] = {'angle': 30, 'right': {'path': 'f2', 'frame': 17, 'node': 240}, 'left': {'path': 'b4', 'frame': 5, 'node': 60}};
this._intersections.e4[2] = {'angle': 90, 'right': {'path': 'c4', 'frame': 7, 'node': 90}, 'left': {'path': 'c3', 'frame': 7, 'node': 90}};
this._intersections.e4[3] = {'angle': 135, 'right': {'path': 'f4', 'frame': 21, 'node': 300}, 'left': {'path': 'b3', 'frame': 9, 'node': 120}};
this._intersections.e4[4] = {'angle': 180, 'right': {'path': 'd4', 'frame': 13, 'node': 180}, 'left': {'path': 'g2', 'frame': 13, 'node': 180}};
this._intersections.e4[5] = {'angle': 225, 'right': {'path': 'b4', 'frame': 17, 'node': 240}, 'left': {'path': 'f2', 'frame': 5, 'node': 60}};
this._intersections.e4[6] = {'angle': 270, 'right': {'path': 'c3', 'frame': 19, 'node': 270}, 'left': {'path': 'c4', 'frame': 19, 'node': 270}};
this._intersections.e4[7] = {'angle': 330, 'right': {'path': 'b3', 'frame': 22, 'node': 315}, 'left': {'path': 'f4', 'frame': 10, 'node': 135}};
this._intersections.f1 = new Array();
this._intersections.f1[0] = {'angle': 0, 'right': {'path': 'a1', 'frame': 19, 'node': 270}, 'left': {'path': 'c2', 'frame': 13, 'node': 180}};
this._intersections.f1[1] = {'angle': 90, 'right': {'path': 'd1', 'frame': 21, 'node': 300}};
this._intersections.f1[2] = {'angle': 112.5, 'left': {'path': 'g1', 'frame': 19, 'node': 270}};
this._intersections.f1[3] = {'angle': 180, 'right': {'path': 'c2', 'frame': 1, 'node': 0}, 'left': {'path': 'a1', 'frame': 7, 'node': 90}};
this._intersections.f1[4] = {'angle': 270, 'left': {'path': 'd1', 'frame': 8, 'node': 112.5}};
this._intersections.f1[5] = {'angle': 292.5, 'right': {'path': 'g1', 'frame': 7, 'node': 90}};
this._intersections.f2 = new Array();
this._intersections.f2[0] = {'angle': 0, 'right': {'path': 'c4', 'frame': 13, 'node': 180}, 'left': {'path': 'a2', 'frame': 19, 'node': 270}};
this._intersections.f2[1] = {'angle': 90, 'left': {'path': 'd2', 'frame': 20, 'node': 292.5}};
this._intersections.f2[2] = {'angle': 112.5, 'right': {'path': 'g2', 'frame': 19, 'node': 270}};
this._intersections.f2[3] = {'angle': 180, 'right': {'path': 'a2', 'frame': 7, 'node': 90}, 'left': {'path': 'c4', 'frame': 1, 'node': 0}};
this._intersections.f2[4] = {'angle': 270, 'right': {'path': 'd2', 'frame': 8, 'node': 112.5}};
this._intersections.f2[5] = {'angle': 292.5, 'left': {'path': 'g2', 'frame': 7, 'node': 90}};
this._intersections.f3 = new Array();
this._intersections.f3[0] = {'angle': 0, 'right': {'path': 'c2', 'frame': 13, 'node': 180}, 'left': {'path': 'a2', 'frame': 7, 'node': 90}};
this._intersections.f3[1] = {'angle': 90, 'left': {'path': 'd3', 'frame': 20, 'node': 292.5}};
this._intersections.f3[2] = {'angle': 112.5, 'right': {'path': 'g3', 'frame': 19, 'node': 270}};
this._intersections.f3[3] = {'angle': 180, 'right': {'path': 'a2', 'frame': 19, 'node': 270}, 'left': {'path': 'c2', 'frame': 1, 'node': 0}};
this._intersections.f3[4] = {'angle': 270, 'right': {'path': 'd3', 'frame': 8, 'node': 112.5}};
this._intersections.f3[5] = {'angle': 292.5, 'left': {'path': 'g3', 'frame': 7, 'node': 90}};
this._intersections.f4 = new Array();
this._intersections.f4[0] = {'angle': 0, 'right': {'path': 'a1', 'frame': 7, 'node': 90}, 'left': {'path': 'c4', 'frame': 13, 'node': 180}};
this._intersections.f4[1] = {'angle': 90, 'right': {'path': 'd4', 'frame': 20, 'node': 292.5}};
this._intersections.f4[2] = {'angle': 112.5, 'left': {'path': 'g4', 'frame': 19, 'node': 270}};
this._intersections.f4[3] = {'angle': 180, 'right': {'path': 'c4', 'frame': 1, 'node': 0}, 'left': {'path': 'a1', 'frame': 19, 'node': 270}};
this._intersections.f4[4] = {'angle': 270, 'left': {'path': 'd4', 'frame': 8, 'node': 112.5}};
this._intersections.f4[5] = {'angle': 292.5, 'right': {'path': 'g4', 'frame': 7, 'node': 90}};
this._intersections.g1 = new Array();
this._intersections.g1[0] = {'angle': 0, 'right': {'path': 'e3', 'frame': 1, 'node': 0}, 'left': {'path': 'a1', 'frame': 10, 'node': 135}};
this._intersections.g1[1] = {'angle': 90, 'left': {'path': 'f1', 'frame': 20, 'node': 292.5}};
this._intersections.g1[2] = {'angle': 112.5, 'right': {'path': 'b4', 'frame': 7, 'node': 90}};
this._intersections.g1[3] = {'angle': 180, 'right': {'path': 'a1', 'frame': 22, 'node': 315}, 'left': {'path': 'e3', 'frame': 13, 'node': 180}};
this._intersections.g1[4] = {'angle': 270, 'right': {'path': 'f1', 'frame': 8, 'node': 112.5}};
this._intersections.g1[5] = {'angle': 292.5, 'left': {'path': 'b4', 'frame': 19, 'node': 270}};
this._intersections.g2 = new Array();
this._intersections.g2[0] = {'angle': 0, 'right': {'path': 'a2', 'frame': 10, 'node': 135}, 'left': {'path': 'e4', 'frame': 1, 'node': 0}};
this._intersections.g2[1] = {'angle': 90, 'right': {'path': 'f2', 'frame': 20, 'node': 292.5}};
this._intersections.g2[2] = {'angle': 112.5, 'left': {'path': 'b3', 'frame': 7, 'node': 90}};
this._intersections.g2[3] = {'angle': 180, 'right': {'path': 'e4', 'frame': 13, 'node': 180}, 'left': {'path': 'a2', 'frame': 22, 'node': 315}};
this._intersections.g2[4] = {'angle': 270, 'left': {'path': 'f2', 'frame': 8, 'node': 112.5}};
this._intersections.g2[5] = {'angle': 292.5, 'right': {'path': 'b3', 'frame': 19, 'node': 270}};
this._intersections.g3 = new Array();
this._intersections.g3[0] = {'angle': 0, 'right': {'path': 'a2', 'frame': 22, 'node': 315}, 'left': {'path': 'e1', 'frame': 1, 'node': 0}};
this._intersections.g3[1] = {'angle': 90, 'right': {'path': 'f3', 'frame': 20, 'node': 292.5}};
this._intersections.g3[2] = {'angle': 112.5, 'left': {'path': 'b2', 'frame': 7, 'node': 90}};
this._intersections.g3[3] = {'angle': 180, 'right': {'path': 'e1', 'frame': 13, 'node': 270}, 'left': {'path': 'a2', 'frame': 10, 'node': 135}};
this._intersections.g3[4] = {'angle': 270, 'left': {'path': 'f3', 'frame': 8, 'node': 112.5}};
this._intersections.g3[5] = {'angle': 292.5, 'right': {'path': 'b2', 'frame': 19, 'node': 270}};
this._intersections.g4 = new Array();
this._intersections.g4[0] = {'angle': 0, 'right': {'path': 'e2', 'frame': 1, 'node': 0}, 'left': {'path': 'a1', 'frame': 22, 'node': 315}};
this._intersections.g4[1] = {'angle': 90, 'left': {'path': 'f4', 'frame': 21, 'node': 300}};
this._intersections.g4[2] = {'angle': 112.5, 'right': {'path': 'b1', 'frame': 7, 'node': 90}};
this._intersections.g4[3] = {'angle': 180, 'right': {'path': 'a1', 'frame': 10, 'node': 135}, 'left': {'path': 'e2', 'frame': 13, 'node': 180}};
this._intersections.g4[4] = {'angle': 270, 'right': {'path': 'f4', 'frame': 8, 'node': 112.5}};
this._intersections.g4[5] = {'angle': 292.5, 'left': {'path': 'b1', 'frame': 19, 'node': 270}};
};
ASSetPropFlags(src.game.IntersectionData.prototype, null, 1);
}
#endinitclip
}
movieClip 1899 __Packages.src.game.Path {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.Path) {
var v1 = function () {
super();
this.init();
};
src.game.Path = v1;
src.game.Path extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.init = function () {
this._changePath = false;
this._changeNode = -1;
this._nextPath = new Object();
this._speeds = new Array(22.5, 30, 45, 60);
this._speedSetting = 1;
this.setSpeed(this._speedSetting);
(this.__get__mc())._visible = false;
this.delegate = mx.utils.Delegate.create(this, this.render);
};
v2.getIntersections = function () {
return this._intersectionObject;
};
v2.setIntersections = function (inters) {
this._intersectionObject = new Object();
this._intersections = new Array();
this._intersectNodes = new Array();
var v4 = inters.length;
var v2 = 0;
while (v2 < v4) {
if (src.game.Path._traceNode) {
trace('Intersection: ' + inters[v2].angle);
trace('\tRight: ');
trace('\t\tPath: ' + inters[v2].right.path);
trace('\t\tFrame: ' + inters[v2].right.frame);
trace('\t\tNode: ' + inters[v2].right.node);
trace('\tLeft: ');
trace('\t\tPath: ' + inters[v2].left.path);
trace('\t\tFrame: ' + inters[v2].left.frame);
trace('\t\tNode: ' + inters[v2].left.node);
}
this._intersections.push(inters[v2]);
this._intersectNodes.push(inters[v2].angle);
this._intersectionObject[inters[v2].angle] = inters[v2];
++v2;
}
};
v2.startPath = function (startFrame) {
trace('Start');
if (!startFrame || startFrame < 1) {
this._curFrame = 1;
this._curNode = src.game.Path.NODES[this._curFrame - 1];
(this.__get__mc()).gotoAndStop(1);
} else {
this._curFrame = startFrame;
this._curNode = src.game.Path.NODES[this._curFrame - 1];
(this.__get__mc()).gotoAndStop(startFrame);
}
(this.__get__mc()).onEnterFrame = this.delegate;
};
v2.stopPath = function () {
delete (this.__get__mc()).onEnterFrame;
};
v2.change = function (direction) {
var v2 = this.getClosestIntersectNodeIndex(this._curNode);
if (this._intersections[v2][direction] == undefined) {
trace('Direction Undefined for Node: ' + v2);
var v3 = this._intersectNodes.length;
if (v2 == v3) {
v2 = 0;
} else {
++v2;
}
trace('New Node Index: ' + v2);
}
if (v2 == this._curNode) {
this._nextPath = this._intersections[v2][direction];
trace('Cur Node Next Path: ' + this._nextPath);
this.sendChangeEvent();
} else {
this._changeNode = this._intersections[v2].angle;
this._nextPath = this._intersections[v2][direction];
this._changePath = true;
trace('Next Node Next Path: ' + this._nextPath);
}
trace('PATH - NEXT PATH: ' + this._nextPath.path);
trace('PATH - NEXT FRAME: ' + this._nextPath.frame);
};
v2.sendChangeEvent = function () {
this.dispatchEvent({'type': 'onChangePath', 'target': this._nextPath});
this._changePath = false;
this._changeNode = -1;
};
v2.getClosestIntersectNodeIndex = function (node) {
trace('');
trace('CurNode: ' + node);
var v3 = -1;
for (var v5 in this._intersectNodes) {
trace('iNode: ' + this._intersectNodes[v5]);
var v2 = this._intersectNodes[v5] - node;
if (v2 >= 0 && v2 <= this._speed) {
trace('THIS IS THE NODE TO SWTICH ON: ' + this._intersectNodes[v5]);
v3 = v5;
break;
}
trace('Diff: ' + v2);
}
trace('');
return v3;
};
v2.setSpeed = function (n) {
this._speed = this._speeds[n - 1];
};
v2.decreaseSpeed = function () {
if (this._speedSetting == 1) {
return undefined;
}
this._speedSetting -= 1;
this.setSpeed(this._speedSetting);
};
v2.increaseSpeed = function () {
if (this._speedSetting == 4) {
return undefined;
}
this._speedSetting += 1;
this.setSpeed(this._speedSetting);
};
v2.getFrameFromNode = function (nodeValue) {
var v1 = 0;
while (v1 < 24) {
trace('I: ' + v1);
if (src.game.Path.NODES[v1] == nodeValue) {
return v1 + 1;
}
++v1;
}
};
v2.syncFramesWithSpeed = function (curNode) {
var v2 = curNode;
if (curNode % this._speed !== 0) {
var v3 = this._curFrame - 1;
v2 = src.game.Path.NODES[++v3];
trace('SYNC NODES NEW NODE: ' + v2);
v2 = this.syncFramesWithSpeed(v2);
}
trace('RETURN SYNCED NODE: ' + v2);
return v2;
};
v2.renderFrame = function (frameToRender) {
(this.__get__mc()).gotoAndStop(frameToRender);
};
v2.render = function () {
this._curNode = this.syncFramesWithSpeed(this._curNode);
if (this._curNode + this._speed >= 360) {
this._curNode = 0;
}
if (this._changePath && this._curNode == this._changeNode) {
this.sendChangeEvent();
} else {
this._curFrame = this.getFrameFromNode(this._curNode);
trace('Render: ' + this.__get__mc());
trace('CurrentFrame: ' + this._curFrame);
trace('CurrentNode: ' + this._curNode);
trace('');
(this.__get__mc()).gotoAndStop(this._curFrame);
this._curNode += this._speed;
}
};
v1._traceNode = false;
v1.NODES = new Array(0, 22.5, 30, 45, 60, 67.5, 90, 112.5, 120, 135, 150, 157.5, 180, 202.5, 210, 225, 240, 247.5, 270, 292.5, 300, 315, 330, 337.5);
v1.INTERSECT_NODES = new Array(0, 45, 90, 135, 180, 225, 270, 315);
ASSetPropFlags(src.game.Path.prototype, null, 1);
}
#endinitclip
}
movieClip 1900 __Packages.src.game.hud.ScreenOverlay {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.hud) {
_global.src.game.hud = new Object();
}
if (!_global.src.game.hud.ScreenOverlay) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
};
src.game.hud.ScreenOverlay = v1;
src.game.hud.ScreenOverlay extends net.indivision.core.AbstractMovieClip;
var v2 = v1.prototype;
v2.resetState = function () {
(this.__get__mc())._yscale = 0;
(this.__get__mc())._xscale = 0;
(this.__get__mc())._visible = false;
};
v2.animIn = function () {
(this.__get__mc())._visible = true;
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__delay(src.game.hud.ScreenOverlay.DELAY);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 4));
v2.alter(['_xscale', '_yscale'], [100, 100]);
};
v2.animOut = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 4));
v2.alter(['_xscale', '_yscale'], [0, 0], mx.utils.Delegate.create(this, this.resetState));
};
v1.DELAY = 250;
ASSetPropFlags(src.game.hud.ScreenOverlay.prototype, null, 1);
}
#endinitclip
}
movieClip 1901 __Packages.com.robertpenner.easing.Linear {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Linear) {
var v1 = function () {};
com.robertpenner.easing.Linear = v1;
var v2 = v1.prototype;
v1.easeNone = function (t, b, c, d) {
return c * t / d + b;
};
v1.easeIn = function (t, b, c, d) {
return c * t / d + b;
};
v1.easeOut = function (t, b, c, d) {
return c * t / d + b;
};
v1.easeInOut = function (t, b, c, d) {
return c * t / d + b;
};
ASSetPropFlags(com.robertpenner.easing.Linear.prototype, null, 1);
}
#endinitclip
}
movieClip 1902 __Packages.src.game.Item {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.Item) {
var v1 = function () {
super();
};
src.game.Item = v1;
src.game.Item extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
ASSetPropFlags(src.game.Item.prototype, null, 1);
}
#endinitclip
}
movieClip 1903 __Packages.src.game.ItemGame {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.ItemGame) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
this._enabled = false;
};
src.game.ItemGame = v1;
src.game.ItemGame extends src.game.Item;
var v2 = v1.prototype;
v2.__get__enabled = function () {
return this._enabled;
};
v2.__get__type = function () {
return this._type;
};
v2.__get__id = function () {
return this._id;
};
v2.__set__id = function (s) {
this._id = s;
return this.__get__id();
};
v2.clearData = function () {
this.nodes = new Array();
this.paths = new Array();
};
v2.setData = function (data, index) {
trace('ITEM GAME SET DATA: ' + data.scale);
this.nodes = new Array();
this.paths = new Array();
for (var v3 in data.path) {
trace('SET PATH: ' + data.path[v3]);
this.paths.push(data.path[v3]);
}
for (v3 in data.node) {
this.nodes.push(data.node[v3]);
}
(this.__get__mc())._x = data.x;
(this.__get__mc())._y = data.y;
(this.__get__mc())._alpha = data.a;
this._targScale = data.scale;
this.spawnNodeIndex = index;
};
v2.init = function (itemType, x, y, scale) {
(this.__get__mc())._x = x || 0;
(this.__get__mc())._y = y || 0;
(this.__get__mc())._yscale = scale || 0;
(this.__get__mc())._xscale = (this.__get__mc())._yscale;
this._type = itemType;
switch (this._type) {
case 'objective':
this._glowColor = 65280;
break;
case 'obstacle':
this._glowColor = 16711680;
break;
case 'bonus':
this._glowColor = 16776960;
break;
default:
trace('ERROR: Invalid item type!');
}
(this.__get__mc())._visible = false;
};
v2.despawnComplete = function () {
(this.__get__mc())._visible = true;
(this.__get__mc())._yscale = 40;
(this.__get__mc())._xscale = 40;
this.dispatchEvent({'type': 'onDespawnComplete', 'target': this});
};
v2.despawn = function (respawn) {
this._respawn = respawn;
this._enabled = false;
var v2 = new flash.filters.GlowFilter();
v2.color = 16777215;
v2.strength = 8;
v2.blurY = 10;
v2.blurX = 10;
v2.quality = 2;
(this.__get__mc()).filters = [v2];
var v3 = new net.indivision.tween.PropertyTween();
v3.__set__target(this.mc);
v3.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 2));
v3.alter(['_xscale', '_yscale'], [this._targScale + 50, this._targScale + 50], mx.utils.Delegate.create(this, this.animOut));
};
v2.animOut = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 2));
v2.alter(['_xscale', '_yscale'], [0, 0], mx.utils.Delegate.create(this, this.despawnComplete));
};
v2.spawn = function () {
this._enabled = true;
var v2 = new flash.filters.GlowFilter();
v2.color = this._glowColor;
v2.strength = 3;
v2.blurY = 8;
v2.blurX = 8;
v2.quality = 2;
(this.__get__mc()).filters = [v2];
(this.__get__mc())._visible = true;
var v3 = new net.indivision.tween.PropertyTween();
v3.__set__target(this.mc);
v3.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 4));
v3.alter(['_xscale', '_yscale'], [this._targScale + 10, this._targScale + 10], mx.utils.Delegate.create(this, this.popBack));
};
v2.popBack = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 2));
v2.alter(['_xscale', '_yscale'], [this._targScale, this._targScale], mx.utils.Delegate.create(this, this.setFloat));
};
v2.setFloat = function () {
this._angle = 0;
this._speed = 0.2;
this._range = 5;
this._centerY = (this.__get__mc())._y;
(this.__get__mc()).onEnterFrame = mx.utils.Delegate.create(this, this.float);
};
v2.float = function () {
(this.__get__mc())._y = this._centerY + Math.sin(this._angle) * this._range;
this._angle += this._speed;
};
v2.addProperty('enabled', v2.__get__enabled, function () {});
v2.addProperty('id', v2.__get__id, v2.__set__id);
v2.addProperty('type', v2.__get__type, function () {});
ASSetPropFlags(src.game.ItemGame.prototype, null, 1);
}
#endinitclip
}
movieClip 1904 __Packages.src.game.ItemUI {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.ItemUI) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
};
src.game.ItemUI = v1;
src.game.ItemUI extends src.game.Item;
var v2 = v1.prototype;
v2.animIn = function (delay) {
(this.__get__mc())._visible = true;
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__delay((delay !== undefined) ? delay : 0);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 2));
v2.alter(['_xscale', '_yscale'], [110, 110], mx.utils.Delegate.create(this, this.animInBack));
};
v2.animInBack = function () {
this.dispatchEvent({'type': 'onItemUIIn'});
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 2));
v2.alter(['_xscale', '_yscale'], [100, 100], mx.utils.Delegate.create(this, this.onAnimInComplete));
};
v2.onAnimInComplete = function () {
this.dispatchEvent({'type': 'onItemUIAnimInComplete', 'target': this});
};
v2.animOut = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 2));
v2.alter(['_xscale', '_yscale'], [0, 0]);
};
ASSetPropFlags(src.game.ItemUI.prototype, null, 1);
}
#endinitclip
}
movieClip 1905 __Packages.src.game.hud.Panel {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.hud) {
_global.src.game.hud = new Object();
}
if (!_global.src.game.hud.Panel) {
var v1 = function () {
super();
this._btnFormat = new TextFormat();
this._btnFormat.leading = 2;
this._btnFormat.letterSpacing = 2;
};
src.game.hud.Panel = v1;
src.game.hud.Panel extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.animIn = function () {
this.dispatchEvent({'type': 'onPanelIn', 'target': this});
trace('Panel Anim In: ' + (this.__get__mc())._name);
(this.__get__mc())._visible = true;
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 5));
v2.alter(['_xscale', '_yscale'], [110, 110], mx.utils.Delegate.create(this, this.animInBack));
};
v2.animInBack = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 2));
v2.alter(['_xscale', '_yscale'], [100, 100], mx.utils.Delegate.create(this, this.onPanelAnimInComplete));
};
v2.animOut = function () {
this.dispatchEvent({'type': 'onPanelOut', 'target': this});
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 2));
v2.alter(['_xscale', '_yscale'], [110, 110], mx.utils.Delegate.create(this, this.animOutBack));
};
v2.animOutBack = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 5));
v2.alter(['_xscale', '_yscale'], [0, 0], mx.utils.Delegate.create(this, this.onPanelAnimOutComplete));
};
v2.onPanelAnimInComplete = function () {
trace('Panel Anim In Complete');
};
v2.onPanelAnimOutComplete = function () {
trace('Panel Anim Out Complete');
};
ASSetPropFlags(src.game.hud.Panel.prototype, null, 1);
}
#endinitclip
}
movieClip 1906 __Packages.src.game.hud.BeginLevelPanel {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.hud) {
_global.src.game.hud = new Object();
}
if (!_global.src.game.hud.BeginLevelPanel) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
};
src.game.hud.BeginLevelPanel = v1;
src.game.hud.BeginLevelPanel extends src.game.hud.Panel;
var v2 = v1.prototype;
v2.setCopy = function (data) {
var v2 = new TextFormat();
v2.leading = 2;
v2.letterSpacing = 1;
this._btnLabel = data.buttons.startLevel.attributes.label;
(this.__get__mc()).mcStartLevelBtn.txtLabel.text = this._btnLabel;
(this.__get__mc()).mcStartLevelBtn.txtLabel.setTextFormat(this._btnFormat);
this._timeTitle = data.attributes.timeTitle;
(this.__get__mc()).txtObjectiveHeader.text = data.objective.attributes.title;
(this.__get__mc()).txtObjectiveHeader.setTextFormat(v2);
(this.__get__mc()).txtBonusHeader.text = data.bonus.attributes.title;
(this.__get__mc()).txtBonusHeader.setTextFormat(v2);
(this.__get__mc()).txtObstacleHeader.text = data.obstacle.attributes.title;
(this.__get__mc()).txtObstacleHeader.setTextFormat(v2);
};
v2.init = function (data) {
this.initBtns();
};
v2.reset = function () {
(this.__get__mc())._yscale = 0;
(this.__get__mc())._xscale = 0;
(this.__get__mc())._visible = false;
};
v2.showObjects = function () {
trace('SHOW OBJECTS');
(this.__get__mc()).mcObjective[this.objectiveItem].animIn();
this.bonusItemIndex = 0;
clearInterval(this._iid);
(this.__get__mc()).mcBonusItems[this.bonusItems[this.bonusItemIndex]].animIn(500);
var v2 = 500 + 2000 * (this.bonusItems.length - 1);
(this.__get__mc()).mcObstacle[this.obstacleItem].animIn(v2);
};
v2.animBonusItems = function () {
(this.__get__mc()).mcBonusItems[this.bonusItems[this.bonusItemIndex]].animOut();
++this.bonusItemIndex;
if (this.bonusItemIndex >= this.bonusItems.length) {
this.bonusItemIndex = 0;
}
(this.__get__mc()).mcBonusItems[this.bonusItems[this.bonusItemIndex]].animIn();
};
v2.setObjects = function (data) {
this.setBriefText(data.brief);
this.setLevelTime(data.attributes.time);
this.attachObjective(data.objective);
this.attachBonusItems(data.bonus);
this.attachObstacle(data.obstacle);
};
v2.attachObjective = function (d) {
trace('ATTACH OBJECTIVE');
var v2 = 'mc' + d.attributes.type + '60';
this.objectiveItem = v2;
var v3 = (this.__get__mc()).mcObjective.attachMovie(v2, v2, 0);
v3._yscale = 0;
v3._xscale = 0;
v3._visible = false;
};
v2.attachBonusItems = function (d) {
trace('ATTACH BONUS ITEMS');
this.bonusItems = new Array();
var v5 = 0;
for (var v7 in d.attributes) {
trace('ATTR ' + v7 + ': ' + d.attributes[v7]);
if (d.attributes[v7] == 'on') {
var v3 = 'mc' + v7 + '60';
var v4 = v3 + v5.toString();
this.bonusItems.push(v4);
var v2 = (this.__get__mc()).mcBonusItems.attachMovie(v3, v4, v5);
v2._yscale = 0;
v2._xscale = 0;
v2._visible = false;
++v5;
}
}
trace('BONUS ITEMS ARRAY: ' + this.bonusItems);
};
v2.attachObstacle = function (d) {
trace('ATTACH OBSTACLE');
var v2 = 'mc' + d.attributes.type + '60';
this.obstacleItem = v2;
var v3 = (this.__get__mc()).mcObstacle.attachMovie(v2, v2, 0);
v3._yscale = 0;
v3._xscale = 0;
v3._visible = false;
};
v2.initBtns = function () {
var hook = this;
(this.__get__mc()).mcStartLevelBtn.mcHitArea.onRelease = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
trace('Close Panel');
hook.closePanel();
};
(this.__get__mc()).mcStartLevelBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcStartLevelBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcStartLevelBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcStartLevelBtn.mcHitArea.onRollOut = (this.__get__mc()).mcStartLevelBtn.mcHitArea.onReleaseOutside;
};
v2.closePanel = function () {
clearInterval(this._iid);
this.animOut();
};
v2.setLevel = function (level) {
(this.__get__mc()).txtLevelTitle.text = level;
};
v2.setBriefText = function (briefNode) {
trace('Set Brief Text: ' + briefNode);
trace('Set Brief Text: ' + briefNode._value);
var v2 = briefNode._value;
(this.__get__mc()).mcBriefText.txtBrief.text = v2;
};
v2.setLevelTime = function (time) {
var v2 = new TextFormat();
v2.leading = -2;
v2.letterSpacing = 2;
var v3 = this.configureTime(Number(time));
(this.__get__mc()).txtTime.text = this._timeTitle + ' ' + v3;
(this.__get__mc()).txtTime.setTextFormat(v2);
};
v2.configureTime = function (timePassed) {
var v2 = Math.floor(timePassed / 1000);
var v3 = Math.floor(v2 / 60);
var v4 = Math.floor(v3 / 60);
v2 %= 60;
v3 %= 60;
v4 %= 60;
var v7 = this.addZero(v4.toString());
var v6 = this.addZero(v3.toString());
var v5 = this.addZero(v2.toString());
return v6 + ':' + v5;
};
v2.addZero = function (digit) {
if (digit.length == 1) {
digit = '0' + digit;
}
return digit;
};
v2.onPanelAnimInComplete = function () {
trace((this.__get__mc())._name + ' Anim In Complete');
this.showObjects();
};
v2.onPanelAnimOutComplete = function () {
(this.__get__mc())._visible = false;
this.dispatchEvent({'type': 'onLevelBegin'});
};
ASSetPropFlags(src.game.hud.BeginLevelPanel.prototype, null, 1);
}
#endinitclip
}
movieClip 1907 __Packages.src.game.hud.EndLevelPanel {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.hud) {
_global.src.game.hud = new Object();
}
if (!_global.src.game.hud.EndLevelPanel) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
};
src.game.hud.EndLevelPanel = v1;
src.game.hud.EndLevelPanel extends src.game.hud.Panel;
var v2 = v1.prototype;
v2.setCopy = function (data) {
var v2 = new TextFormat();
v2.leading = 2;
v2.letterSpacing = 1;
this._btnLabel = data.buttons.panelBtn.attributes.label;
(this.__get__mc()).mcContinueBtn.txtLabel.text = this._btnLabel;
(this.__get__mc()).mcContinueBtn.txtLabel.setTextFormat(this._btnFormat);
this._title = data.attributes.title;
(this.__get__mc()).txtObjectiveHeader.text = data.objective.attributes.title;
(this.__get__mc()).txtObjectiveHeader.setTextFormat(v2);
(this.__get__mc()).txtBonusHeader.text = data.bonus.attributes.title;
(this.__get__mc()).txtBonusHeader.setTextFormat(v2);
(this.__get__mc()).txtLevelPointsHeader.text = data.levelPoints.attributes.title;
(this.__get__mc()).txtLevelPointsHeader.setTextFormat(v2);
};
v2.setObjectiveQuantity = function (quantity) {
this._curObjectiveQty = 0;
(this.__get__mc()).mcObjective.mcQuantity.txtQuantity.text = this._curObjectiveQty;
this._totalObjectiveQty = quantity;
};
v2.setBonusItemQuantity = function (bonusItemsCounts) {
this._curBonusQty = 0;
trace('SET BONUS ITEM QUANTITY: ' + bonusItemsCounts);
for (var v5 in bonusItemsCounts) {
trace('CONTAINER AMOUNT: ' + v5 + ' ' + bonusItemsCounts[v5].count);
trace('BONUS ITEM CONTAINER: ' + this.bonusItemObjects[v5].container);
var v4 = 'mcEndLevelItem' + this.bonusItemObjects[v5].container;
var v3 = bonusItemsCounts[v5].pointValue * bonusItemsCounts[v5].count;
if (v5 == 'Squishee') {
this._squisheePoints = v3;
this._squisheeQty = bonusItemsCounts[v5].count;
this._squisheePointValue = bonusItemsCounts[v5].pointValue;
} else {
if (v5 == 'Duff') {
this._duffPoints = v3;
this._duffQty = bonusItemsCounts[v5].count;
this._duffPointValue = bonusItemsCounts[v5].pointValue;
} else {
if (v5 == 'Donut') {
this._donutPoints = v3;
this._donutQty = bonusItemsCounts[v5].count;
this._donutPointValue = bonusItemsCounts[v5].pointValue;
}
}
}
}
};
v2.setLevelPoints = function (n) {
(this.__get__mc()).txtLevelPoints.text = n.toString();
this._levelPoints = n;
};
v2.init = function () {
this.initBtns();
this.bonusItemIndex = 0;
this._levelPoints = 0;
this.setLevelPoints(0);
this._totalObjectiveQty = 0;
this._squisheePoints = 0;
this._donutPoints = 0;
this._duffPoints = 0;
};
v2.animOut = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 2));
v2.alter(['_xscale', '_yscale'], [110, 110], mx.utils.Delegate.create(this, this.animOutBack));
};
v2.animOutBack = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 5));
v2.alter(['_xscale', '_yscale'], [0, 0], mx.utils.Delegate.create(this, this.onPanelAnimOutComplete));
};
v2.reset = function () {
this._levelPoints = 0;
this.setLevelPoints(0);
this.bonusItemIndex = 0;
this._totalObjectiveQty = 0;
this._squisheePoints = 0;
this._donutPoints = 0;
this._duffPoints = 0;
(this.__get__mc())._yscale = 0;
(this.__get__mc())._xscale = 0;
(this.__get__mc())._visible = false;
};
v2.setLevel = function (level) {
var v2 = new TextFormat();
v2.leading = 2;
v2.letterSpacing = 2;
(this.__get__mc()).txtTitle.text = level + ' ' + this._title;
(this.__get__mc()).txtTitle.setTextFormat(v2);
};
v2.showObjects = function () {
(this.__get__mc()).mcObjective.mcItem[this._objectiveItem].animIn();
};
v2.animBonusItems = function () {
trace('ANIM BONUS ITEMS IN');
clearInterval(this._iidBonus);
var v3 = 'mcEndLevelItem' + this.bonusItems[this.bonusItemIndex - 1].container;
(this.__get__mc())[v3]._visible = false;
var v2 = 'mcEndLevelItem' + this.bonusItems[this.bonusItemIndex].container;
(this.__get__mc())[v2]._visible = true;
var v4 = this.bonusItems[this.bonusItemIndex].instance;
(this.__get__mc())[v2].mcItem[v4].animIn();
};
v2.animInNextBonusItem = function () {
if (this.bonusItemIndex < this.bonusItems.length - 1) {
++this.bonusItemIndex;
clearInterval(this._iidBonus);
this._iidBonus = setInterval(this, 'animBonusItems', src.game.hud.EndLevelPanel.COUNT_MS);
}
};
v2.animNumber = function () {
clearInterval(this._iidQty);
this._iidQty = setInterval(this, 'countQty', src.game.hud.EndLevelPanel.COUNT_MS, 'mcObjective');
};
v2.countQty = function (which) {
if (which == 'mcObjective') {
if (this._curObjectiveQty < this._totalObjectiveQty) {
this._curObjectiveQty += 1;
(this.__get__mc()).mcObjective.mcQuantity.txtQuantity.text = this._curObjectiveQty;
var pts = this._levelPoints;
this._levelPoints += 5;
var targPts = this._levelPoints;
(this.__get__mc()).onEnterFrame = function () {
var v2 = targPts - pts;
if (v2 == 0) {
trace('END - DO NEXT SET');
delete this.onEnterFrame;
} else {
pts += 1;
this.mc.txtLevelPoints.text = pts.toString();
}
};
} else {
clearInterval(this._iidQty);
this.animBonusItems();
}
}
};
v2.animBonusNumber = function () {
var v2 = this.bonusItems[this.bonusItemIndex];
clearInterval(this._iidQty);
this._iidQty = setInterval(this, 'countBonusQty', src.game.hud.EndLevelPanel.COUNT_MS, v2);
};
v2.countBonusQty = function (item) {
trace('BONUS ITEM: ' + item.id);
var v6 = true;
var v2 = 'mcEndLevelItem' + item.container;
var v5 = item.instance;
switch (item.id) {
case 'Donut':
if (this._curBonusQty < this._donutQty) {
this._curBonusQty += 1;
(this.__get__mc())[v2].mcQuantity.txtQuantity.text = this._curBonusQty;
var pts = this._levelPoints;
this._levelPoints += this._donutPointValue;
var targPts = this._levelPoints;
(this.__get__mc()).onEnterFrame = function () {
var v2 = targPts - pts;
if (v2 == 0) {
trace('END - DO NEXT SET');
delete this.onEnterFrame;
} else {
pts += 1;
this.mc.txtLevelPoints.text = pts.toString();
}
};
} else {
clearInterval(this._iidQty);
this._curBonusQty = 0;
this.animInNextBonusItem();
}
break;
case 'Duff':
if (this._curBonusQty < this._duffQty) {
this._curBonusQty += 1;
(this.__get__mc())[v2].mcQuantity.txtQuantity.text = this._curBonusQty;
var pts = this._levelPoints;
this._levelPoints += this._duffPointValue;
var targPts = this._levelPoints;
(this.__get__mc()).onEnterFrame = function () {
var v2 = targPts - pts;
if (v2 == 0) {
trace('END - DO NEXT SET');
delete this.onEnterFrame;
} else {
pts += 1;
this.mc.txtLevelPoints.text = pts.toString();
}
};
} else {
clearInterval(this._iidQty);
this._curBonusQty = 0;
this.animInNextBonusItem();
}
break;
case 'Squishee':
if (this._curBonusQty < this._squisheeQty) {
this._curBonusQty += 1;
(this.__get__mc())[v2].mcQuantity.txtQuantity.text = this._curBonusQty;
var pts = this._levelPoints;
this._levelPoints += this._squisheePointValue;
var targPts = this._levelPoints;
(this.__get__mc()).onEnterFrame = function () {
var v2 = targPts - pts;
if (v2 == 0) {
trace('END - DO NEXT SET');
delete this.onEnterFrame;
} else {
pts += 1;
this.mc.txtLevelPoints.text = pts.toString();
}
};
} else {
clearInterval(this._iidQty);
this._curBonusQty = 0;
this.animInNextBonusItem();
}
}
};
v2.setObjects = function (data) {
this.attachObjective(data.objective);
this.attachBonusItems(data.bonus);
};
v2.attachObjective = function (d) {
var v3 = 'mc' + d.attributes.type + '60';
this._objectiveItem = v3;
var v2 = (this.__get__mc()).mcObjective.mcItem.attachMovie(v3, v3, 0);
v2._yscale = 0;
v2._xscale = 0;
v2._visible = false;
v2.addEventListener('onItemUIIn', mx.utils.Delegate.create(this, this.animNumber));
};
v2.attachBonusItems = function (d) {
trace('ATTACH BONUS ITEMS');
this.bonusItems = new Array();
this.bonusItemObjects = new Object();
var v5 = 0;
for (var v9 in d.attributes) {
trace('ATTR ' + v9 + ': ' + d.attributes[v9]);
if (d.attributes[v9] == 'on') {
var v6 = 'mc' + v9 + '60';
var v7 = v6 + v5.toString();
var v2 = new Object();
v2.instance = v7;
v2.container = v5;
v2.id = v9;
this.bonusItemObjects[v9] = v2;
this.bonusItems.push(v2);
var v3 = (this.__get__mc()).attachMovie('mcEndLevelItem', 'mcEndLevelItem' + v5, v5);
v3._y = 4;
v3._visible = false;
v3.mcQuantity.txtQuantity.text = '0';
var v4 = v3.mcItem.attachMovie(v6, v7, 0);
v4._yscale = 0;
v4._xscale = 0;
v4._visible = false;
v4.addEventListener('onItemUIAnimInComplete', mx.utils.Delegate.create(this, this.animBonusNumber));
++v5;
}
}
};
v2.initBtns = function () {
var hook = this;
(this.__get__mc()).mcContinueBtn.mcHitArea.onRelease = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
trace('Close Panel');
hook.closePanel();
};
(this.__get__mc()).mcContinueBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcContinueBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcContinueBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcContinueBtn.mcHitArea.onRollOut = (this.__get__mc()).mcContinueBtn.mcHitArea.onReleaseOutside;
};
v2.closePanel = function () {
clearInterval(this._iid);
this.animOut();
};
v2.onPanelAnimInComplete = function () {
trace('End Level Panel In');
this.showObjects();
};
v2.onPanelAnimOutComplete = function () {
trace('End Level Panel Out');
for (var v3 in this.bonusItems) {
var v2 = 'mcEndLevelItem' + this.bonusItems[v3].container;
(this.__get__mc())[v2].removeMovieClip();
}
this.dispatchEvent({'type': 'onContinueGame'});
};
v1.COUNT_MS = 250;
ASSetPropFlags(src.game.hud.EndLevelPanel.prototype, null, 1);
}
#endinitclip
}
movieClip 1908 __Packages.src.game.hud.GameOverPanel {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.hud) {
_global.src.game.hud = new Object();
}
if (!_global.src.game.hud.GameOverPanel) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
};
src.game.hud.GameOverPanel = v1;
src.game.hud.GameOverPanel extends src.game.hud.EndLevelPanel;
var v2 = v1.prototype;
v2.setCopy = function (data) {
var v2 = new TextFormat();
v2.leading = 2;
v2.letterSpacing = 1;
this._btnLabel = data.buttons.panelBtn.attributes.label;
this._title = data.attributes.title;
(this.__get__mc()).mcPlayAgainBtn.txtLabel.text = this._btnLabel;
(this.__get__mc()).mcPlayAgainBtn.txtLabel.setTextFormat(this._btnFormat);
(this.__get__mc()).txtObjectiveHeader.text = data.objective.attributes.title;
(this.__get__mc()).txtObjectiveHeader.setTextFormat(v2);
(this.__get__mc()).txtBonusHeader.text = data.bonus.attributes.title;
(this.__get__mc()).txtBonusHeader.setTextFormat(v2);
(this.__get__mc()).txtLevelPointsHeader.text = data.levelPoints.attributes.title;
(this.__get__mc()).txtLevelPointsHeader.setTextFormat(v2);
};
v2.setLevel = function (level) {
(this.__get__mc()).txtTitle.text = this._title;
};
v2.initBtns = function () {
var hook = this;
(this.__get__mc()).mcPlayAgainBtn.mcHitArea.onRelease = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
trace('Go Home');
hook.goHome();
};
(this.__get__mc()).mcPlayAgainBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPlayAgainBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPlayAgainBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPlayAgainBtn.mcHitArea.onRollOut = (this.__get__mc()).mcPlayAgainBtn.mcHitArea.onReleaseOutside;
};
v2.goHome = function () {
this.dispatchEvent({'type': 'onPageChange', 'target': 'home'});
};
ASSetPropFlags(src.game.hud.GameOverPanel.prototype, null, 1);
}
#endinitclip
}
movieClip 1909 __Packages.src.game.hud.ObjectsPanel {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.hud) {
_global.src.game.hud = new Object();
}
if (!_global.src.game.hud.ObjectsPanel) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
};
src.game.hud.ObjectsPanel = v1;
src.game.hud.ObjectsPanel extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.setCopy = function (data) {
var v2 = new TextFormat();
v2.letterSpacing = 1;
v2.leading = 2;
(this.__get__mc()).mcObjective.txtTitle.text = data.objective.attributes.title;
(this.__get__mc()).mcObjective.txtTitle.setTextFormat(v2);
(this.__get__mc()).txtBonusHeader.text = data.bonus.attributes.title;
(this.__get__mc()).txtBonusHeader.setTextFormat(v2);
};
v2.setObjectiveQuantity = function (n) {
(this.__get__mc()).mcObjective.txtQuantity.text = n.toString() + ' / ' + this._objectiveTotal;
};
v2.setBonusItemQuantity = function (whichItem, amount) {
trace('WHICH ITEM: ' + whichItem);
trace('AMOUNT: ' + amount);
trace('BONUS ITEM QUANTITY: ' + this._bonusItemObjects[whichItem]);
trace('WHICH CONTAINER: ' + this._bonusItemObjects[whichItem].container);
var v2 = 'mcObjectsPanelContainer' + this._bonusItemObjects[whichItem].container;
trace('WHY OH WHY: ' + (this.__get__mc()).mcBonusItems[v2]);
(this.__get__mc()).mcBonusItems[v2].txtAmount.text = amount.toString();
};
v2.animBonusItems = function () {
for (var v2 in this._bonusItems) {
trace('Pause Item: ' + (this.__get__mc()).mcBonusItems['mcObjectsPanelContainer' + v2]);
(this.__get__mc()).mcBonusItems['mcObjectsPanelContainer' + v2]._y = -40;
}
this._bonusItemIndex = 0;
this.animBonusItemIn();
};
v2.endAnimBonusItems = function () {
clearInterval(this._iid);
for (var v3 in this._bonusItems) {
var v2 = 'mcObjectsPanelContainer' + this._bonusItems[v3].container;
trace('REMOVE INST: ' + v2);
trace('REMOVE CLIP: ' + (this.__get__mc())[v2].mcItem[this._bonusItems[v3].instance]);
(this.__get__mc())[v2].mcItem[this._bonusItems[v3].instance].removeMovieClip();
}
};
v2.pauseAnimBonusItems = function () {
for (var v2 in this._bonusItems) {
trace('Pause Item: ' + (this.__get__mc()).mcBonusItems['mcObjectsPanelContainer' + v2]);
(this.__get__mc()).mcBonusItems['mcObjectsPanelContainer' + v2]._y = -40;
}
clearInterval(this._iid);
};
v2.animCurBonusOut = function () {
this.animBonusItemOut();
};
v2.animNextBonusItemIn = function () {
(this.__get__mc()).mcBonusItems['mcObjectsPanelContainer' + this._bonusItemIndex]._y = -40;
++this._bonusItemIndex;
if (this._bonusItemIndex >= this._bonusItems.length) {
this._bonusItemIndex = 0;
}
this.animBonusItemIn();
};
v2.animBonusItemIn = function () {
(this.__get__mc()).mcBonusItems['mcObjectsPanelContainer' + this._bonusItemIndex]._y = -40;
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target((this.__get__mc()).mcBonusItems['mcObjectsPanelContainer' + this._bonusItemIndex]);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 4));
v2.alter(['_y'], [src.game.hud.ObjectsPanel.TARG_IN_Y + 6], mx.utils.Delegate.create(this, this.animBonusBack));
};
v2.animBonusBack = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target((this.__get__mc()).mcBonusItems['mcObjectsPanelContainer' + this._bonusItemIndex]);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Cubic.easeOut, 1));
v2.alter(['_y'], [src.game.hud.ObjectsPanel.TARG_IN_Y], mx.utils.Delegate.create(this, this.nextAnim));
};
v2.nextAnim = function () {
clearInterval(this._iid);
this._iid = setInterval(this, 'animCurBonusOut', 3000);
};
v2.animBonusItemOut = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target((this.__get__mc()).mcBonusItems['mcObjectsPanelContainer' + this._bonusItemIndex]);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Expo.easeOut, 4));
v2.alter(['_y'], [src.game.hud.ObjectsPanel.TARG_OUT_Y], mx.utils.Delegate.create(this, this.animNextBonusItemIn));
};
v2.setObjects = function (data) {
this.endAnimBonusItems();
this._objectiveTotal = data.objective.attributes.amount;
this.setObjectiveQuantity(0);
this.attachObjective(data.objective);
this.attachBonusItems(data.bonus);
};
v2.attachObjective = function (d) {
var v3 = 'mc' + d.attributes.type + '30';
trace('LINKAGE: ' + v3);
trace('MOVIE: ' + (this.__get__mc()).mcObjective.mcItem);
var v2 = (this.__get__mc()).mcObjective.mcItem.attachMovie(v3, v3, 0);
v2._x = v2._width / 2;
v2._y = v2._height / 2;
trace('OBJECTIVE: ' + v2);
};
v2.attachBonusItems = function (d) {
trace('ATTACH BONUS ITEMS');
this._bonusItems = new Array();
this._bonusItemObjects = new Object();
var v5 = 0;
for (var v9 in d.attributes) {
trace('ATTR ' + v9 + ': ' + d.attributes[v9]);
if (d.attributes[v9] == 'on') {
var v6 = 'mc' + v9 + '30';
var v7 = v6 + v5.toString();
var v2 = new Object();
v2.id = v9;
v2.instance = v7;
v2.container = v5;
this._bonusItemObjects[v9] = v2;
this._bonusItems.push(v2);
var v3 = (this.__get__mc()).mcBonusItems.attachMovie('mcObjectsPanelContainer', 'mcObjectsPanelContainer' + v5, v5);
v3._y = -40;
v3._x += 8;
var v4 = v3.mcItem.attachMovie(v6, v7, 0);
v4._x = v4._width / 2;
v4._y = v4._height / 2;
v3.txtAmount.text = 0;
++v5;
}
}
};
v1.TARG_IN_Y = 0;
v1.TARG_OUT_Y = 40;
ASSetPropFlags(src.game.hud.ObjectsPanel.prototype, null, 1);
}
#endinitclip
}
movieClip 1910 __Packages.com.robertpenner.easing.Cubic {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Cubic) {
var v1 = function () {};
com.robertpenner.easing.Cubic = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d) {
t /= d;
return c * t * t * t + b;
};
v1.easeOut = function (t, b, c, d) {
t = t / d - 1;
return c * (t * t * t + 1) + b;
};
v1.easeInOut = function (t, b, c, d) {
t /= d / 2;
if (t < 1) {
return (c / 2) * t * t * t + b;
}
t -= 2;
return (c / 2) * (t * t * t + 2) + b;
};
ASSetPropFlags(com.robertpenner.easing.Cubic.prototype, null, 1);
}
#endinitclip
}
movieClip 1911 __Packages.src.game.hud.PointsPanel {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.hud) {
_global.src.game.hud = new Object();
}
if (!_global.src.game.hud.PointsPanel) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
(this.__get__mc()).txtPoints.text = '0';
this._points = 0;
};
src.game.hud.PointsPanel = v1;
src.game.hud.PointsPanel extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.__get__points = function () {
return this._points;
};
v2.setCopy = function (data) {
var v2 = new TextFormat();
v2.leading = 2;
v2.letterSpacing = 1;
(this.__get__mc()).txtTitle.text = data.attributes.title;
(this.__get__mc()).txtTitle.setTextFormat(v2);
};
v2.addPoints = function (nPoints) {
this._points += nPoints;
this.setPointsText();
};
v2.subtractPoints = function (nPoints) {
this._points -= nPoints;
this.setPointsText();
};
v2.setPointsText = function () {
(this.__get__mc()).txtPoints.text = (this.__get__points()).toString();
};
v2.addProperty('points', v2.__get__points, function () {});
ASSetPropFlags(src.game.hud.PointsPanel.prototype, null, 1);
}
#endinitclip
}
movieClip 1912 __Packages.src.home.HomeNav {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.home) {
_global.src.home = new Object();
}
if (!_global.src.home.HomeNav) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
};
src.home.HomeNav = v1;
src.home.HomeNav extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.setCopy = function (data) {
trace('NAV SET COPY: ' + data);
this._btnFormat = new TextFormat();
this._btnFormat.letterSpacing = 3;
this._btnFormat.leading = 2;
this._playBtnLbl = data.buttons.playGame.attributes.label;
this._instructionsBtnLbl = data.buttons.instructions.attributes.label;
this._leaderBtnLbl = data.buttons.leaderBoard.attributes.label;
this._officialSiteBtnLbl = data.buttons.officialSite.attributes.label;
this._pimpBtnLbl = data.buttons.pimp.attributes.label;
};
v2.enableNav = function () {
(this.__get__mc()).mcPlayGameBtn.mcHitArea._visible = true;
(this.__get__mc()).mcInstructionsBtn.mcHitArea._visible = true;
(this.__get__mc()).mcLeaderBoardBtn.mcHitArea._visible = true;
(this.__get__mc()).mcOfficialSiteBtn.mcHitArea._visible = true;
(this.__get__mc()).mcPimpBtn.mcHitArea._visible = true;
};
v2.disableNav = function () {
(this.__get__mc()).mcPlayGameBtn.mcHitArea._visible = false;
(this.__get__mc()).mcInstructionsBtn.mcHitArea._visible = false;
(this.__get__mc()).mcLeaderBoardBtn.mcHitArea._visible = false;
(this.__get__mc()).mcOfficialSiteBtn.mcHitArea._visible = false;
(this.__get__mc()).mcPimpBtn.mcHitArea._visible = false;
};
v2.init = function () {
trace('NAV INIT');
var hook = this;
trace('Play Game Btn: ' + (this.__get__mc()).mcPlayGameBtn);
(this.__get__mc()).mcPlayGameBtn.txtLabel.text = this._playBtnLbl;
(this.__get__mc()).mcPlayGameBtn.txtLabel.setTextFormat(this._btnFormat);
(this.__get__mc()).mcPlayGameBtn.mcHitArea.onRelease = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._playBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
trace('PlayGame Pressed');
hook.dispatchEvent({'type': 'onPageChange', 'target': 'game'});
};
(this.__get__mc()).mcPlayGameBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._playBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPlayGameBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._playBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPlayGameBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._playBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPlayGameBtn.mcHitArea.onRollOut = (this.__get__mc()).mcPlayGameBtn.mcHitArea.onReleaseOutside;
(this.__get__mc()).mcInstructionsBtn.txtLabel.text = this._instructionsBtnLbl;
(this.__get__mc()).mcInstructionsBtn.txtLabel.setTextFormat(this._btnFormat);
(this.__get__mc()).mcInstructionsBtn.mcHitArea.onRelease = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._instructionsBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
trace('Instructions Pressed');
hook.dispatchEvent({'type': 'onShowInstructions'});
};
(this.__get__mc()).mcInstructionsBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._instructionsBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcInstructionsBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._instructionsBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcInstructionsBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._instructionsBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcInstructionsBtn.mcHitArea.onRollOut = (this.__get__mc()).mcInstructionsBtn.mcHitArea.onReleaseOutside;
trace('LEADERBOARD BTN: ' + (this.__get__mc()).mcLeaderBoardBtn);
(this.__get__mc()).mcLeaderBoardBtn.txtLabel.text = this._leaderBtnLbl;
(this.__get__mc()).mcLeaderBoardBtn.txtLabel.setTextFormat(this._btnFormat);
(this.__get__mc()).mcLeaderBoardBtn.mcHitArea.onRelease = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._leaderBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
trace('LeaderBoard Pressed');
hook.dispatchEvent({'type': 'onPageChange', 'target': 'leader'});
};
(this.__get__mc()).mcLeaderBoardBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._leaderBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcLeaderBoardBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._leaderBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcLeaderBoardBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._leaderBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcLeaderBoardBtn.mcHitArea.onRollOut = (this.__get__mc()).mcLeaderBoardBtn.mcHitArea.onReleaseOutside;
trace('OFFICIAL SITE BTN: ' + (this.__get__mc()).mcOfficialSiteBtn);
(this.__get__mc()).mcOfficialSiteBtn.txtLabel.text = this._officialSiteBtnLbl;
(this.__get__mc()).mcOfficialSiteBtn.txtLabel.setTextFormat(this._btnFormat);
(this.__get__mc()).mcOfficialSiteBtn.mcHitArea.onRelease = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._officialSiteBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
trace('OfficialSite Pressed');
hook.dispatchEvent({'type': 'onPageChange', 'target': 'officialSite'});
};
(this.__get__mc()).mcOfficialSiteBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._officialSiteBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcOfficialSiteBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._officialSiteBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcOfficialSiteBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._officialSiteBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcOfficialSiteBtn.mcHitArea.onRollOut = (this.__get__mc()).mcOfficialSiteBtn.mcHitArea.onReleaseOutside;
trace('PIMP BTN: ' + (this.__get__mc()).mcPimpBtn);
(this.__get__mc()).mcPimpBtn.txtLabel.text = this._pimpBtnLbl;
(this.__get__mc()).mcPimpBtn.txtLabel.setTextFormat(this._btnFormat);
(this.__get__mc()).mcPimpBtn.mcHitArea.onRelease = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._pimpBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
trace('Pimp Pressed');
hook.dispatchEvent({'type': 'onShowPimp'});
};
(this.__get__mc()).mcPimpBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._pimpBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPimpBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._pimpBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPimpBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._pimpBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPimpBtn.mcHitArea.onRollOut = (this.__get__mc()).mcPimpBtn.mcHitArea.onReleaseOutside;
};
ASSetPropFlags(src.home.HomeNav.prototype, null, 1);
}
#endinitclip
}
movieClip 1913 __Packages.src.home.Instructions {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.home) {
_global.src.home = new Object();
}
if (!_global.src.home.Instructions) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
};
src.home.Instructions = v1;
src.home.Instructions extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.setCopy = function (data) {
this.bonusHeader = data.bonus.attributes.bonusHeader;
this.objectiveHeader = data.bonus.attributes.objectiveHeader;
this.pointsText = data.bonus.attributes.points;
this._btnFormat = new TextFormat();
this._btnFormat.letterSpacing = 3;
var v3 = new TextFormat();
v3.letterSpacing = 1;
(this.__get__mc()).inner.main.txtInstructionsTitle.text = data.instructions.attributes.title;
(this.__get__mc()).inner.main.txtInstructionsTitle.setTextFormat(v3);
(this.__get__mc()).inner.main.txtInstructions.htmlText = data.instructions._value;
(this.__get__mc()).inner.main.txtInstructions.setTextFormat(v3);
(this.__get__mc()).inner.main.txtControlsTitle.text = data.controls.attributes.title;
(this.__get__mc()).inner.main.txtControlsTitle.setTextFormat(v3);
(this.__get__mc()).inner.main.txtControlActions.htmlText = data.controls.actions._value;
(this.__get__mc()).inner.main.txtControlActions.setTextFormat(v3);
(this.__get__mc()).inner.main.txtControls.htmlText = data.controls.keys._value;
(this.__get__mc()).inner.main.txtControls.setTextFormat(v3);
this._homeBtnLbl = data.buttons.home.attributes.label;
this._playBtnLbl = data.buttons.playGame.attributes.label;
(this.__get__mc()).inner.main.mcHomeBtn.txtLabel.text = this._homeBtnLbl;
(this.__get__mc()).inner.main.mcHomeBtn.txtLabel.setTextFormat(this._btnFormat);
(this.__get__mc()).inner.main.mcPlayGameBtn.txtLabel.text = this._playBtnLbl;
(this.__get__mc()).inner.main.mcPlayGameBtn.txtLabel.setTextFormat(this._btnFormat);
trace('BTN: ' + (this.__get__mc()).inner.main.home);
trace('BTN: ' + (this.__get__mc()).inner.main.home.txtLabel);
trace('BTN: ' + (this.__get__mc()).inner.main.home.txtLabel.text);
trace('HTML TEXT: ' + (this.__get__mc()).inner.main.txtControls.htmlText);
};
v2.init = function () {
var hook = this;
(this.__get__mc()).inner.main.mcHomeBtn.mcHitArea.onRelease = function () {
hook.dispatchEvent({'type': 'onHideInstructions'});
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._homeBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).inner.main.mcHomeBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._homeBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).inner.main.mcHomeBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._homeBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).inner.main.mcHomeBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._homeBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).inner.main.mcHomeBtn.mcHitArea.onRollOut = (this.__get__mc()).inner.main.mcHomeBtn.mcHitArea.onReleaseOutside;
(this.__get__mc()).inner.main.mcPlayGameBtn.mcHitArea.onRelease = function () {
hook.dispatchEvent({'type': 'onPageChange', 'target': 'game'});
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._playBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).inner.main.mcPlayGameBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._playBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).inner.main.mcPlayGameBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._playBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).inner.main.mcPlayGameBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._playBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).inner.main.mcPlayGameBtn.mcHitArea.onRollOut = (this.__get__mc()).inner.main.mcPlayGameBtn.mcHitArea.onReleaseOutside;
};
v2.animIn = function () {
(this.__get__mc()).gotoAndPlay(2);
};
v2.animOut = function () {
(this.__get__mc()).gotoAndPlay('out');
};
ASSetPropFlags(src.home.Instructions.prototype, null, 1);
}
#endinitclip
}
movieClip 1914 __Packages.src.home.Pimp {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.home) {
_global.src.home = new Object();
}
if (!_global.src.home.Pimp) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
};
src.home.Pimp = v1;
src.home.Pimp extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.setCopy = function (data) {
this._btnFormat = new TextFormat();
this._btnFormat.letterSpacing = 3;
var v3 = new TextFormat();
v3.letterSpacing = 1;
(this.__get__mc()).mcPanel.txtPimpTitle.text = data.pimp.attributes.title;
(this.__get__mc()).mcPanel.txtPimpTitle.setTextFormat(v3);
(this.__get__mc()).mcPanel.txtQuestionLabel.htmlText = data.pimp.question._value;
(this.__get__mc()).mcPanel.txtQuestionLabel.setTextFormat(v3);
(this.__get__mc()).mcPanel.txtAnswerLabel.htmlText = data.pimp.answer._value;
(this.__get__mc()).mcPanel.txtAnswerLabel.setTextFormat(v3);
(this.__get__mc()).mcPanel.txtContent.text = (_global.pimpMyPageStr != undefined) ? _global.pimpMyPageStr : data.pimp.content._value;
(this.__get__mc()).mcPanel.txtContent.setTextFormat(v3);
this._homeBtnLbl = data.buttons.home.attributes.label;
this._playBtnLbl = data.buttons.playGame.attributes.label;
(this.__get__mc()).mcPanel.mcHomeBtn.txtLabel.text = this._homeBtnLbl;
(this.__get__mc()).mcPanel.mcHomeBtn.txtLabel.setTextFormat(this._btnFormat);
(this.__get__mc()).mcPanel.mcPlayGameBtn.txtLabel.text = this._playBtnLbl;
(this.__get__mc()).mcPanel.mcPlayGameBtn.txtLabel.setTextFormat(this._btnFormat);
trace('BTN: ' + (this.__get__mc()).mcPanel.home);
trace('BTN: ' + (this.__get__mc()).mcPanel.home.txtLabel);
trace('BTN: ' + (this.__get__mc()).mcPanel.home.txtLabel.text);
};
v2.init = function () {
var hook = this;
(this.__get__mc()).mcPanel.mcHomeBtn.mcHitArea.onRelease = function () {
hook.dispatchEvent({'type': 'onHidePimp'});
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._homeBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPanel.mcHomeBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._homeBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPanel.mcHomeBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._homeBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPanel.mcHomeBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._homeBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
trace('pimp home btn out');
};
(this.__get__mc()).mcPanel.mcHomeBtn.mcHitArea.onRollOut = (this.__get__mc()).mcPanel.mcHomeBtn.mcHitArea.onReleaseOutside;
(this.__get__mc()).mcPanel.mcPlayGameBtn.mcHitArea.onRelease = function () {
hook.dispatchEvent({'type': 'onPageChange', 'target': 'game'});
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._playBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPanel.mcPlayGameBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._playBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPanel.mcPlayGameBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._playBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPanel.mcPlayGameBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._playBtnLbl;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPanel.mcPlayGameBtn.mcHitArea.onRollOut = (this.__get__mc()).mcPanel.mcPlayGameBtn.mcHitArea.onReleaseOutside;
};
v2.animIn = function () {
(this.__get__mc()).gotoAndPlay(2);
};
v2.animOut = function () {
(this.__get__mc()).gotoAndPlay('out');
};
ASSetPropFlags(src.home.Pimp.prototype, null, 1);
}
#endinitclip
}
movieClip 1915 __Packages.src.home.Home {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.home) {
_global.src.home = new Object();
}
if (!_global.src.home.Home) {
var v1 = function () {
super();
trace('__construct: ' + this.__get__mc());
var v3 = new net.indivision.data.XMLConstruct();
v3.addEventListener('onLoad', mx.utils.Delegate.create(this, this.onXmlLoaded));
v3.load(src.home.Home.COPY_XML);
};
src.home.Home = v1;
src.home.Home extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.onXmlLoaded = function (e) {
this.onEnterFrame = function () {
this.onEnterFrame = undefined;
this._homeData = new Object();
this._homeData = e.target.home;
this._copyRightStr = this._homeData.copyright.attributes.label;
this.mc.txtCopyRight.text = this._copyRightStr;
this.mc.mcInstructions.setCopy(this._homeData.instructionsPanel);
this.mc.mcPimp.setCopy(this._homeData.pimpPanel);
this.mc.mcNav.setCopy(this._homeData.nav);
this.init();
};
};
v2.init = function () {
(this.__get__mc()).mcNav.addEventListener('onPageChange', mx.utils.Delegate.create(this, this.notify));
(this.__get__mc()).mcNav.addEventListener('onShowInstructions', mx.utils.Delegate.create(this, this.showInstructions));
(this.__get__mc()).mcNav.addEventListener('onShowPimp', mx.utils.Delegate.create(this, this.showPimp));
(this.__get__mc()).mcInstructions.addEventListener('onPageChange', mx.utils.Delegate.create(this, this.notify));
(this.__get__mc()).mcInstructions.addEventListener('onHideInstructions', mx.utils.Delegate.create(this, this.hideInstructions));
(this.__get__mc()).mcPimp.addEventListener('onPageChange', mx.utils.Delegate.create(this, this.notify));
(this.__get__mc()).mcPimp.addEventListener('onHidePimp', mx.utils.Delegate.create(this, this.hidePimp));
(this.__get__mc()).mcInstructions.init();
(this.__get__mc()).mcPimp.init();
};
v2.notify = function (e) {
trace('Home Change Page: ' + e.target);
var v2 = e.target;
this.dispatchEvent({'type': 'onPageChange', 'target': v2});
switch (v2) {
case 'officialSite':
(this.__get__mc()).getURL(src.home.Home.OFFICIAL_SITE_URL, '_blank');
break;
case 'pimp':
case 'game':
case 'leader':
case 'home':
case 'back':
(new Sound(this.__get__mc())).stop();
(this.__get__mc())._parent.gotoAndStop(v2);
break;
default:
}
};
v2.showInstructions = function () {
trace('Show Instructions');
(this.__get__mc()).mcNav.disableNav();
(this.__get__mc()).mcInstructions.animIn();
};
v2.hideInstructions = function () {
trace('Hide Instructions');
(this.__get__mc()).mcInstructions.animOut();
(this.__get__mc()).mcNav.enableNav();
};
v2.showPimp = function () {
trace('Show Pimp');
(this.__get__mc()).mcNav.disableNav();
(this.__get__mc()).mcPimp.animIn();
};
v2.hidePimp = function () {
trace('Hide Pimp');
(this.__get__mc()).mcPimp.animOut();
(this.__get__mc()).mcNav.enableNav();
};
v1.COPY_XML = 'xml/localization.xml';
v1.OFFICIAL_SITE_URL = 'http://www.simpsonsmovie.com';
v1.PIMP_MY_PAGE_URL = 'http://www.simpsonsmovie.com/addtomypage/';
ASSetPropFlags(src.home.Home.prototype, null, 1);
}
#endinitclip
}
movieClip 1916 __Packages.net.indivision.data.XMLConstructNode {
#initclip
if (!_global.net) {
_global.net = new Object();
}
if (!_global.net.indivision) {
_global.net.indivision = new Object();
}
if (!_global.net.indivision.data) {
_global.net.indivision.data = new Object();
}
if (!_global.net.indivision.data.XMLConstructNode) {
var v1 = function () {};
net.indivision.data.XMLConstructNode = v1;
var v2 = v1.prototype;
v2.appendChild = function (nodeName, node) {
if (!(this[nodeName] instanceof Array)) {
this[nodeName] = [];
this[nodeName].__resolve = this.getFirstElement;
_global.ASSetPropFlags(this[nodeName], '__resolve', 1, 0);
}
node.nodeName = nodeName;
this[nodeName].unshift(node);
_global.ASSetPropFlags(node, 'nodeName', 1, 0);
};
v2.addAttribute = function (attributeName, string) {
if (this.attributes == undefined) {
this.attributes = {};
}
this.attributes[attributeName] = string;
};
v2.toXML = function () {
var v2 = new XML(String(this.toXMLNode()));
v2.firstChild.appendChild(this.parseConstruct(this, new XML()));
return v2;
};
v2.toString = function () {
var v2 = '[XMLConstructNode: ' + this.nodeName + ' ]';
return v2;
};
v2.toXMLNode = function () {
var v4;
var v2;
var v5;
var v3;
v4 = new XML();
v3 = v4.createElement(this.nodeName);
for (v2 in this.attributes) {
v3.attributes[v2] = this.attributes[v2];
}
v4.appendChild(v3);
v5 = v4.createTextNode(this._value);
v3.appendChild(v5);
return v3;
};
v2.getFirstElement = function (f) {
return this[0][f];
};
v2.parseConstruct = function (xObj, doc) {
var v6;
var v4;
var v3;
var v2;
var v8;
var v9;
for (v6 in xObj) {
v3 = xObj[v6];
if (v3 instanceof Array) {
for (v4 in v3) {
v2 = v3[v4];
if (v2 instanceof net.indivision.data.XMLConstructNode) {
doc.appendChild(v2.toXMLNode());
doc.lastChild.appendChild(this.parseConstruct(v2, new XML()));
}
}
}
}
return doc;
};
ASSetPropFlags(net.indivision.data.XMLConstructNode.prototype, null, 1);
}
#endinitclip
}
movieClip 1917 __Packages.net.indivision.data.XMLConstruct {
#initclip
if (!_global.net) {
_global.net = new Object();
}
if (!_global.net.indivision) {
_global.net.indivision = new Object();
}
if (!_global.net.indivision.data) {
_global.net.indivision.data = new Object();
}
if (!_global.net.indivision.data.XMLConstruct) {
var v1 = function (input) {
super();
mx.events.EventDispatcher.initialize(this);
if (input != undefined) {
this.parse(input);
}
};
net.indivision.data.XMLConstruct = v1;
net.indivision.data.XMLConstruct extends net.indivision.data.XMLConstructNode;
var v2 = v1.prototype;
v2.setRoot = function (root) {
this.rootVal = root;
};
v2.parse = function (input) {
var v7;
var v3;
var v2;
var v4;
this.nodeName = input[this.rootVal].nodeName;
v3 = this.parseNode(input[this.rootVal], new net.indivision.data.XMLConstructNode());
for (v2 in this) {
if (this[v2] instanceof Array) {
delete this[v2];
}
}
this.attributes = undefined;
v4 = [];
for (v2 in v3) {
if (v2 == 'attributes') {
for (var v5 in v3[v2]) {
this.addAttribute(v5, v3[v2][v5]);
}
} else {
v4.push(v2);
}
}
for (v2 in v4) {
this[v4[v2]] = v3[v4[v2]];
}
};
v2.load = function (path) {
var thisObj = this;
var tXML = new XML();
tXML.ignoreWhite = true;
tXML.onLoad = function (success) {
thisObj.parse(tXML);
thisObj.onLoad(success);
thisObj.dispatchEvent({'type': 'onLoad', 'target': thisObj, 'success': success});
};
if (path.indexOf('localization') > 0) {
tXML.parseXML(_global.localization_xml);
tXML.onLoad(true);
} else {
if (path.indexOf('levels') > 0) {
tXML.parseXML(_global.level_xml);
tXML.onLoad(true);
} else {
tXML.load(path);
}
}
};
v2.parseNode = function (xObj, obj) {
var v2;
var v5;
var v4;
var v3;
var v8 = xObj.attributes;
for (v2 in v8) {
obj.addAttribute(v2, v8[v2]);
}
for (v2 in xObj.childNodes) {
v3 = xObj.childNodes[v2];
v5 = v3.nodeName;
v4 = v3.nodeType;
if (v4 == 3) {
obj._value = v3.nodeValue;
} else {
if (v4 == 1 && v5 != null) {
var v7 = this.parseNode(v3, new net.indivision.data.XMLConstructNode());
obj.appendChild(v5, v7);
}
}
}
return obj;
};
v2.rootVal = 'firstChild';
ASSetPropFlags(net.indivision.data.XMLConstruct.prototype, null, 1);
}
#endinitclip
}
movieClip 1918 __Packages.src.game.dev.DevBtn {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.dev) {
_global.src.game.dev = new Object();
}
if (!_global.src.game.dev.DevBtn) {
var v1 = function () {
super();
};
src.game.dev.DevBtn = v1;
src.game.dev.DevBtn extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.init = function (label, onDefault) {
(this.__get__mc()).txtLabel.text = label;
if (onDefault) {
this.turnBtnOn();
}
this.initBtn();
};
v2.turnBtnOn = function () {
(this.__get__mc()).mcBtn.gotoAndStop('on');
};
v2.turnBtnOff = function () {
(this.__get__mc()).mcBtn.gotoAndStop('off');
};
v2.onBtnPress = function () {
var v2 = new Object();
v2.path = (this.__get__mc())._name;
this.dispatchEvent({'type': 'onSetPath', 'target': v2});
};
v2.initBtn = function () {
var hook = this;
(this.__get__mc()).mcBtn.onRelease = function () {
hook.onBtnPress();
};
};
ASSetPropFlags(src.game.dev.DevBtn.prototype, null, 1);
}
#endinitclip
}
movieClip 1919 __Packages.src.game.Engine {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.Engine) {
var v1 = function (mcRoot, user) {
super();
net.indivision.event.FrameEventBeacon.initialize();
this.__set__mc(mcRoot);
this._user = user;
trace('PARENT: ' + (this.__get__mc())._parent);
this.initObjectStates();
this.resetRenderVars();
this._pathMgr = new src.game.PathManager(mcRoot.homer);
this._sMgr = new src.game.SoundMgr(this.__get__mc());
this._crashCache = new src.game.CrashCache((this.__get__mc()).mcCrashContainer);
(this.__get__mc()).mcDevConsole._visible = false;
this.loadCopy('xml/localization.xml');
};
src.game.Engine = v1;
src.game.Engine extends net.indivision.core.AbstractDispatcher;
var v2 = v1.prototype;
v2.__get__mc = function () {
return this._mc;
};
v2.__set__mc = function (mcTarget) {
this._mc = mcTarget;
return this.__get__mc();
};
v2.loadCopy = function (path) {
var v2 = new net.indivision.data.XMLConstruct();
v2.addEventListener('onLoad', mx.utils.Delegate.create(this, this.onCopyLoaded));
v2.load(path);
};
v2.onCopyLoaded = function (e) {
this._copyData = e.target.game;
this._youCrashedText = this._copyData.youCrashed.attributes.title;
_global.youCrashed = this._youCrashedText;
(this.__get__mc()).mcGameCompletePanel.setOfficialSiteURL(this._copyData.attributes.siteURL);
(this.__get__mc()).mcPointsPanel.setCopy(this._copyData.hud.pointsPanel);
(this.__get__mc()).mcObjectsPanel.setCopy(this._copyData.hud.objectivesPanel);
(this.__get__mc()).mcLivesMeter.setCopy(this._copyData.hud.livesMeter);
(this.__get__mc()).mcSpeedMeter.setCopy(this._copyData.hud.speedMeter);
(this.__get__mc()).mcTimeMeter.setCopy(this._copyData.hud.timeMeter);
(this.__get__mc()).mcBeginLevelPanel.setCopy(this._copyData.popups.beginLevelPanel);
(this.__get__mc()).mcEndLevelPanel.setCopy(this._copyData.popups.endLevelPanel);
(this.__get__mc()).mcGameOverPanel.setCopy(this._copyData.popups.gameOverPanel);
(this.__get__mc()).mcGameCompletePanel.setCopy(this._copyData.popups.gameCompletePanel);
(this.__get__mc()).mcTwitchGame.setCopy(this._copyData.twitchGame);
var v3 = new TextFormat();
v3.leading = 2;
v3.letterSpacing = 1;
(this.__get__mc()).mcSoundBtn.txtLabel.text = this._copyData.soundBtn.attributes.title;
(this.__get__mc()).mcSoundBtn.txtLabel.setTextFormat(v3);
this._onText = this._copyData.soundBtn.attributes.onLabel;
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.txtOn.text = this._onText;
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.txtOn.setTextFormat(v3);
this._offText = this._copyData.soundBtn.attributes.offLabel;
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.txtOff.text = this._offText;
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.txtOff.setTextFormat(v3);
this.loadLevels('xml/levels.xml');
};
v2.loadLevels = function (path) {
var v2 = new net.indivision.data.XMLConstruct();
v2.addEventListener('onLoad', mx.utils.Delegate.create(this, this.onLevelDataLoaded));
v2.load(path);
};
v2.onLevelDataLoaded = function (e) {
this._levelData = e.target;
var thisObj = this;
this._mc.onEnterFrame = function () {
this.onEnterFrame = undefined;
trace('onData Load');
thisObj.init();
};
};
v2.init = function () {
this._curLevel = 1;
this._bonusItems = new Array();
this._totalPoints = 0;
this._crashMovieIndex = 0;
this._twitchGameOn = false;
this._levelStarted = false;
this.initDevBtns();
this.setSoundBtn();
Mouse.addListener(this);
Key.addListener(this);
this.addEventListener('onLevelEnd', mx.utils.Delegate.create(this, this.captureEvent));
this.addEventListener('onAcquireObjective', mx.utils.Delegate.create(this, this.onAcquireObjective));
this.addEventListener('onAcquireBonus', mx.utils.Delegate.create(this, this.onAcquireBonus));
this.addEventListener('onHitObstacle', mx.utils.Delegate.create(this, this.onHitObstacle));
this.setGameItemSpawnNodes();
this.setLevelBrief();
(this.__get__mc()).mcBeginLevelPanel.animIn();
};
v2.setSoundBtn = function () {
this._soundOff = false;
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.txtOff._visible = false;
var tf = new TextFormat();
tf.leading = 2;
tf.letterSpacing = 1;
var hook = this;
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.mcHitArea.onRelease = function () {
this._parent.gotoAndStop('up');
if (hook._soundOff) {
this._parent.txtOff._visible = true;
this._parent.txtOn._visible = false;
} else {
this._parent.txtOff._visible = false;
this._parent.txtOn._visible = true;
}
this._parent.txtOn.text = hook._onText;
this._parent.txtOn.setTextFormat(tf);
this._parent.txtOff.text = hook._offText;
this._parent.txtOff.setTextFormat(tf);
hook.toggleSound();
};
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
if (hook._soundOff) {
this._parent.txtOff._visible = true;
this._parent.txtOn._visible = false;
} else {
this._parent.txtOff._visible = false;
this._parent.txtOn._visible = true;
}
this._parent.txtOn.text = hook._onText;
this._parent.txtOn.setTextFormat(tf);
this._parent.txtOff.text = hook._offText;
this._parent.txtOff.setTextFormat(tf);
};
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
if (hook._soundOff) {
this._parent.txtOff._visible = true;
this._parent.txtOn._visible = false;
} else {
this._parent.txtOff._visible = false;
this._parent.txtOn._visible = true;
}
this._parent.txtOn.text = hook._onText;
this._parent.txtOn.setTextFormat(tf);
this._parent.txtOff.text = hook._offText;
this._parent.txtOff.setTextFormat(tf);
};
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
if (hook._soundOff) {
this._parent.txtOff._visible = true;
this._parent.txtOn._visible = false;
} else {
this._parent.txtOff._visible = false;
this._parent.txtOn._visible = true;
}
this._parent.txtOn.text = hook._onText;
this._parent.txtOn.setTextFormat(tf);
this._parent.txtOff.text = hook._offText;
this._parent.txtOff.setTextFormat(tf);
};
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.mcHitArea.onRollOut = (this.__get__mc()).mcSoundBtn.mcOnOffBtn.mcHitArea.onReleaseOutside;
};
v2.toggleSound = function () {
if (this._soundOff) {
this._soundOff = false;
var v2 = new Sound();
v2.setVolume(100);
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.txtOn._visible = true;
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.txtOff._visible = false;
} else {
this._soundOff = true;
var v2 = new Sound();
v2.setVolume(0);
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.txtOn._visible = false;
(this.__get__mc()).mcSoundBtn.mcOnOffBtn.txtOff._visible = true;
}
};
v2.turnSoundOff = function () {
var v2 = new Sound();
v2.setVolume(0);
(this.__get__mc()).mcSoundBtn.btnSoundOn._visible = false;
(this.__get__mc()).mcSoundBtn.btnSoundOff._visible = true;
};
v2.turnSoundOn = function () {
var v2 = new Sound();
v2.setVolume(100);
(this.__get__mc()).mcSoundBtn.btnSoundOn._visible = true;
(this.__get__mc()).mcSoundBtn.btnSoundOff._visible = false;
};
v2.setNextLevel = function () {
++this._curLevel;
this._levelStarted = false;
var v3 = this._curLevel - 1;
var v2 = this._levelData.level[v3];
if (v2 == undefined) {
this.onGameOver();
return undefined;
}
this.setLevelBrief();
(this.__get__mc()).mcBeginLevelPanel.animIn();
};
v2.setLevelBrief = function () {
this._levelPoints = 0;
this._bonusPoints = 0;
this._bonusAcquiredCount = 0;
this._levelStarted = false;
var v4 = this._curLevel - 1;
var v2 = this._levelData.level[v4];
var v3 = v2.attributes.title;
var v5 = Number(v2.attributes.time);
this._twitchSpeed = Number(v2.attributes.twitchSpeed);
(this.__get__mc()).mcTwitchGame.setSpeed(this._twitchSpeed);
this._despawnTime = src.game.Engine.DESPAWN_TIMES[v4];
this.setLevelItems(v2);
(this.__get__mc()).mcTimeMeter.setLevel(v3);
(this.__get__mc()).mcTimeMeter.setTime(v5);
(this.__get__mc()).mcSpeedMeter.setSpeed(1);
(this.__get__mc()).mcLivesMeter.setLives(src.game.Engine.MAX_LIVES);
(this.__get__mc()).mcBeginLevelPanel.setLevel(v3);
(this.__get__mc()).mcBeginLevelPanel.setObjects(v2);
(this.__get__mc()).mcObjectsPanel.setObjects(v2);
this._pathMgr.setCurrentPath('a1', 1);
};
v2.setLevelItems = function (levelData) {
this._objectiveItem = levelData.objective.attributes.type;
this._objectivesTotal = levelData.objective.attributes.amount;
this._objectivesAcquired = 0;
this._bonusItemAcquiredCounts = new Object();
this._bonusTotal = levelData.bonus.attributes.amount;
this._obstacleItem = levelData.obstacle.attributes.type;
for (var v5 in levelData.bonus.attributes) {
if (levelData.bonus.attributes[v5] == 'on') {
trace('I: ' + v5);
this._bonusItems.push(v5);
var v2 = 0;
if (v5 == 'Duff') {
v2 = 5;
} else {
if (v5 == 'Squishee') {
v2 = 3;
} else {
if (v5 == 'Donut') {
v2 = 1;
}
}
}
var v3 = new Object();
v3.pointValue = v2;
v3.count = 0;
this._bonusItemAcquiredCounts[v5] = v3;
}
}
};
v2.setLevelEnd = function () {
this._sMgr.playEndLevelSound();
this.calculateLevelPoints();
this.setPointsPanel();
(this.__get__mc()).mcObjectsPanel.endAnimBonusItems();
if (this._curLevel == 5) {
var v3 = new Sound(this.__get__mc());
v3.attachSound('stillhungry');
v3.start(0, 0);
}
var v8 = this._curLevel - 1;
var v4 = this._levelData.level[v8];
var v6 = v4.attributes.title;
var v7 = this._levelData.level.length;
if (this._curLevel == v7) {
var v5 = new src.game.LeaderBoard(this._user);
v5.postScore(this._totalPoints);
trace('SHOW GAME COMPLETE PANEL');
(this.__get__mc()).mcGameCompletePanel.setLevelPoints(this._totalPoints);
(this.__get__mc()).mcGameCompletePanel.animIn();
} else {
var v2 = 5;
if (this._bonusPoints >= 15) {
v2 += 5;
}
(this.__get__mc()).mcEndLevelPanel.reset();
(this.__get__mc()).mcEndLevelPanel.setLevel(v6);
(this.__get__mc()).mcEndLevelPanel.setObjects(v4);
(this.__get__mc()).mcEndLevelPanel.setLevelPoints(v2);
(this.__get__mc()).mcEndLevelPanel.setObjectiveQuantity(this._objectivesAcquired);
(this.__get__mc()).mcEndLevelPanel.setBonusItemQuantity(this._bonusItemAcquiredCounts);
(this.__get__mc()).mcEndLevelPanel.animIn();
}
};
v2.calculateLevelPoints = function () {
var v3 = this._objectivesAcquired * src.game.Engine.POINTS_OBJECTIVE;
var v2 = v3 + this._bonusPoints;
v2 += 5;
if (this._bonusPoints >= 15) {
v2 += 5;
}
this._levelPoints = v2;
};
v2.setPointsPanel = function () {
this._totalPoints += this._levelPoints;
(this.__get__mc()).mcPointsPanel.addPoints(this._levelPoints);
};
v2.onGameOver = function () {
trace('GAME OVER');
(this.__get__mc()).mcObjectsPanel.endAnimBonusItems();
this.calculateLevelPoints();
this.setPointsPanel();
var v3 = this._curLevel - 1;
var v2 = this._levelData.level[v3];
(this.__get__mc()).mcGameOverPanel.setLevel('game over');
(this.__get__mc()).mcGameOverPanel.setObjects(v2);
(this.__get__mc()).mcGameOverPanel.setObjectiveQuantity(this._objectivesAcquired);
(this.__get__mc()).mcGameOverPanel.setBonusItemQuantity(this._bonusItemAcquiredCounts);
(this.__get__mc()).mcGameOverPanel.animIn();
};
v2.initObjectStates = function () {
(this.__get__mc()).mcTwitchGame._alpha = 0;
(this.__get__mc()).mcTwitchGame.addEventListener('onTwitchFailure', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcTwitchGame.addEventListener('onTwitchSuccess', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcTwitchGame.addEventListener('onGameUp', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcTwitchGame.addEventListener('onGameDown', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcScreen.resetState();
(this.__get__mc()).mcBeginLevelPanel.init();
(this.__get__mc()).mcBeginLevelPanel.reset();
(this.__get__mc()).mcBeginLevelPanel.addEventListener('onPanelIn', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcBeginLevelPanel.addEventListener('onPanelOut', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcBeginLevelPanel.addEventListener('onLevelBegin', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcEndLevelPanel.init();
(this.__get__mc()).mcEndLevelPanel.reset();
(this.__get__mc()).mcEndLevelPanel.addEventListener('onPanelIn', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcEndLevelPanel.addEventListener('onPanelOut', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcEndLevelPanel.addEventListener('onContinueGame', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcGameOverPanel.init();
(this.__get__mc()).mcGameOverPanel.reset();
(this.__get__mc()).mcGameOverPanel.addEventListener('onPanelIn', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcGameOverPanel.addEventListener('onPanelOut', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcGameOverPanel.addEventListener('onPlayAgain', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcGameOverPanel.addEventListener('onPageChange', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcGameCompletePanel.init();
(this.__get__mc()).mcGameCompletePanel.reset();
(this.__get__mc()).mcGameCompletePanel.addEventListener('onPageChange', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcLivesMeter.addEventListener('onGameOver', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcLivesMeter.addEventListener('onContinueLevel', mx.utils.Delegate.create(this, this.captureEvent));
(this.__get__mc()).mcTimeMeter.addEventListener('onLevelEnd', mx.utils.Delegate.create(this, this.captureEvent));
};
v2.initDevBtns = function () {
var hook = this;
(this.__get__mc()).btnLoseLife.onRelease = function () {
trace('Kill Homer');
hook.mc.mcLivesMeter.takeAwayLife();
};
(this.__get__mc()).btnBeginLevel.onRelease = function () {
trace('Begin Level');
hook.mc.mcBeginLevelPanel.animIn();
};
};
v2.captureEvent = function (e) {
trace('Event Received: ' + e.type);
trace('Event Data: ' + e.target);
switch (e.type) {
case 'onPageChange':
var v5 = e.target;
this.dispatchEvent({'type': 'onPageChange', 'target': v5});
(this.__get__mc())._parent.gotoAndStop(v5);
break;
case 'onPanelIn':
trace('Panel In');
(this.__get__mc()).mcScreen.animIn();
break;
case 'onPanelOut':
(this.__get__mc()).mcScreen.animOut();
break;
case 'onLevelBegin':
trace('LEVEL BEGIN');
(this.__get__mc()).mcTwitchGame.slideUp();
break;
case 'onLevelEnd':
trace('LEVEL END');
this.pauseLevel();
this.setLevelEnd();
break;
case 'onContinueLevel':
trace('CONTINUE LEVEL');
(this.__get__mc()).mcTwitchGame.slideUp();
break;
case 'onContinueGame':
trace('NEXT LEVEL');
this.setNextLevel();
break;
case 'onGameOver':
this.onGameOver();
break;
case 'onPlayAgain':
trace('PLAY AGAIN');
break;
case 'onGameUp':
this._twitchGameOn = true;
break;
case 'onGameDown':
this._twitchGameOn = false;
break;
case 'onTwitchSuccess':
(this.__get__mc()).mcTwitchGame.slideDown();
(this.__get__mc()).homer._visible = false;
var v3 = (this.__get__mc()).mcTwitchAnim.attachMovie('twitchGood', 'mcAnim', (this.__get__mc()).getNextHighestDepth());
v3._y = -30;
break;
case 'onTwitchFailure':
trace('TWITCH FAILURE: ' + e.target);
(this.__get__mc()).homer._visible = false;
if (e.target == 'FAST') {
var v4 = 'fast' + (Math.floor(Math.random() * src.game.Engine.NUM_TWITCH_FAST_ANIMS) + 1);
trace('TWITCH LINKAGE: ' + v4);
var v3 = (this.__get__mc()).mcTwitchAnim.attachMovie(v4, 'mcAnim', (this.__get__mc()).getNextHighestDepth());
v3._x = -20;
v3._y = -18;
if (v4 == 'fast2') {
v3._x = 20;
v3._y = 10;
} else {
if (v4 == 'fast3') {
v3._x = 10;
v3._y = -24;
} else {
if (v4 == 'fast4') {
}
}
}
v3._x = -2;
v3._y = -26;
v3.play();
} else {
if (e.target == 'SLOW') {
var v4 = 'slow' + (Math.floor(Math.random() * src.game.Engine.NUM_TWITCH_SLOW_ANIMS) + 1);
trace('TWITCH LINKAGE: ' + v4);
var v3 = (this.__get__mc()).mcTwitchAnim.attachMovie(v4, 'mcAnim', (this.__get__mc()).getNextHighestDepth());
v3._x = 4;
v3._y = -28;
if (v4 == 'slow3') {
v3._x = 6;
v3._y = -26;
} else {
if (v4 == 'slow4') {
v3._x = 2;
v3._y = -24;
}
}
v3.play();
}
}
break;
break;
case 'onRespawnItem':
case 'onDespawnComplete':
trace(e.target);
this._itemSpawnNodes[e.target.spawnNodeIndex].used = false;
if (e.target.type == 'objective') {
this._objectiveSpawned = false;
clearInterval(this._iidObjective);
this._iidObjective = setInterval(this, 'spawnObjective', 1000);
} else {
if (e.target.type == 'bonus') {
this._bonusSpawned = false;
clearInterval(this._iidBonus);
this._iidBonus = setInterval(this, 'spawnBonus', 1000);
} else {
if (e.target.type == 'obstacle') {
this._obstacleSpawned = false;
clearInterval(this._iidObstacle);
this._iidObstacle = setInterval(this, 'spawnObstacle', this._despawnTime);
}
}
}
e.target.removeMovieClip();
break;
default:
}
};
v2.onTwitchAnimComplete = function (success) {
trace('ENGINE TWITCH ANIM COMPLETE: ' + success);
(this.__get__mc()).mcTwitchAnim.mcAnim.removeMovieClip();
(this.__get__mc()).homer._visible = true;
if (!success) {
this._twitchGameOn = true;
(this.__get__mc()).mcTwitchGame.startTwitchGame();
} else {
this._pathMgr.setCurrentPath('c2', 8);
this._curFrame = 8;
this._curNode = 112.5;
this._curNodeIndex = 7;
this.startLevel();
}
};
v2.pauseLevel = function () {
delete (this.__get__mc()).onEnterFrame;
this._levelStarted = false;
this.clearSpawnNodes();
(this.__get__mc()).mcObjectsPanel.pauseAnimBonusItems();
(this.__get__mc()).mcTimeMeter.pauseTimerFrames();
this.resetRenderVars();
this._speedSetting = 0;
this._speed = this._speeds[this._speedSetting];
(this.__get__mc()).mcSpeedMeter.setSpeed(this._speedSetting + 1);
};
v2.startLevel = function () {
delete (this.__get__mc()).onEnterFrame;
trace('Start Level');
this.setGameItems();
(this.__get__mc()).mcTimeMeter.startTimerFrames();
(this.__get__mc()).mcObjectsPanel.animBonusItems();
this.crowdState = 'idle';
this.crowdStartTime = getTimer();
this.itemTimer = getTimer();
this._levelStarted = true;
(this.__get__mc()).onEnterFrame = mx.utils.Delegate.create(this, this.mainLoop);
};
v2.onAcquireObjective = function (e) {
trace('Acquired Objective');
clearInterval(this._iidObjective);
e.target.despawn(false);
this._sMgr.playPopOut();
if (e.target.id == 'Krusty' || e.target.id == 'HotDog' || e.target.id == 'Bottle') {
this._sMgr.playFoodSound();
}
++this._objectivesAcquired;
this._levelPoints += src.game.Engine.POINTS_OBJECTIVE;
(this.__get__mc()).mcObjectsPanel.setObjectiveQuantity(this._objectivesAcquired);
if (this._objectivesAcquired == this._objectivesTotal) {
this._sMgr.playAllObjectives();
this.dispatchEvent({'type': 'onLevelEnd'});
}
};
v2.onAcquireBonus = function (e) {
trace('Acquired Bonus');
clearInterval(this._iidBonus);
e.target.despawn(false);
this._sMgr.playPopOut();
this._bonusItemAcquiredCounts[e.target.id].count += 1;
var v3 = this._bonusItemAcquiredCounts[e.target.id].count;
(this.__get__mc()).mcObjectsPanel.setBonusItemQuantity(e.target.id, v3);
++this._bonusAcquiredCount;
if (e.target.id == 'Squishee') {
this._bonusPoints += 3;
} else {
if (e.target.id == 'Duff') {
this._sMgr.playDuffSound();
this._bonusPoints += 5;
} else {
if (e.target.id == 'Donut') {
this._bonusPoints += 1;
}
}
}
if (this._bonusPoints >= 15) {
this._sMgr.playBonusSound();
}
};
v2.onHitObstacle = function (e) {
trace('ON HIT OBSTACLE');
var v2 = new Object();
v2.x = this._itemSpawnNodes[e.target.spawnNodeIndex].x;
v2.y = this._itemSpawnNodes[e.target.spawnNodeIndex].y;
(this.__get__mc())[this._itemSpawnNodes[e.target.spawnNodeIndex].container].localToGlobal(v2);
this.pauseLevel();
this._sMgr.playObstacle();
(this.__get__mc()).mcItemsFront.globalToLocal(v2);
var v5 = (this.__get__mc()).mcItemsFront.attachMovie('mcCloudAnim', 'mcCloudAnim', (this.__get__mc()).getNextHighestDepth());
v5._x = v2.x;
v5._y = v2.y;
var v3 = (this.__get__mc()).attachMovie('mcYouCrashed', 'mcYouCrashed', (this.__get__mc()).getNextHighestDepth());
var v4 = new TextFormat();
v4.leading = 2;
v4.letterSpacing = 0;
v3.mcCrashText.txtCrashed.text = this._youCrashedText;
v3.txtCrashed.setTextFormat(v4);
v3._x = Stage.width / 2;
v3._y = Stage.height / 2;
this.changeCrowdState('wince');
};
v2.onYouCrashedComplete = function () {
(this.__get__mc()).mcYouCrashed.removeMovieClip();
this._crashCache.playCrashMovie();
(this.__get__mc()).mcItemsFront.mcCloudAnim.removeMovieClip();
};
v2.loadCrashMovie = function () {
++this._crashMovieIndex;
if (this._crashMovieIndex > 5) {
this._crashMovieIndex = 1;
}
this.crashLinkage = 'crash' + this._crashMovieIndex;
var v4 = 'swfs/crash' + this._crashMovieIndex + '.swf';
var v5 = (this.__get__mc()).mcCrashContainer.createEmptyMovieClip('mcCrash', 0);
v5.crashLinkage = this.crashLinkage;
var v2 = new MovieClipLoader();
var v3 = new Object();
v3.onLoadInit = mx.utils.Delegate.create(this, this.playCrashMovie);
v2.addListener(v3);
trace('LOAD CRASH MOVIE: ' + v4);
v2.loadClip(v4, v5);
};
v2.playCrashMovie = function (target) {
trace('TARG: ' + target);
trace('ID: ' + target.crashLinkage);
target._x = -target._width / 2;
target._y = -target._height / 2;
if (this.crashLinkage == 'crash5') {
target._y -= 30;
}
(this.__get__mc()).mcItemsFront.mcCloudAnim.removeMovieClip();
};
v2.onCrashComplete = function () {
trace('ENGINE CRASH COMPLETE');
this._pathMgr.setCurrentPath('a1', 1);
clearInterval(this._iidCrash);
this._iidCrash = setInterval(this, 'playCrashOut', 500);
};
v2.playCrashOut = function () {
clearInterval(this._iidCrash);
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target((this.__get__mc()).mcCrashContainer);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 7));
v2.alter(['_xscale', '_yscale', '_alpha'], [0, 0, 40], mx.utils.Delegate.create(this, this.onCrashOut));
};
v2.onCrashOut = function () {
this._crashCache.cleanUp();
(this.__get__mc()).mcCrashContainer._alpha = 100;
(this.__get__mc()).mcCrashContainer._xscale = 100;
(this.__get__mc()).mcCrashContainer._yscale = 100;
(this.__get__mc()).mcLivesMeter.takeAwayLife();
};
v2.setGameItemSpawnNodes = function () {
this._itemSpawnNodes = new Array();
this._itemSpawnNodes[0] = {'path': ['a1', 'a2', 'b1', 'b2', 'b3', 'b4', 'c1', 'c3', 'g1', 'g2'], 'node': [180, 180, 180, 180, 0, 0, 180, 0, 60, 60], 'scale': 80, 'x': 0, 'y': -100, 'a': 80, 'used': false, 'container': 'mcItemsBack'};
this._itemSpawnNodes[1] = {'path': ['b1', 'b3', 'd1', 'g2', 'c2', 'c4', 'd3', 'g4'], 'node': [90, 90, 60, 120, 0, 180, 90, 135], 'scale': 100, 'x': 90, 'y': 10, 'a': 100, 'used': false, 'container': 'mcItemsFront'};
this._itemSpawnNodes[2] = {'path': ['b2', 'b4', 'f1', 'f2', 'd2', 'g1'], 'node': [112.5, 60, 315, 225, 90, 135], 'scale': 100, 'x': -90, 'y': -45, 'a': 100, 'used': false, 'container': 'mcItemsFront'};
this._itemSpawnNodes[3] = {'path': ['f3', 'f4', 'd2', 'd4', 'g1'], 'node': [135, 45, 240, 292.5, 315], 'scale': 60, 'x': 90, 'y': -18, 'a': 80, 'used': false, 'container': 'mcItemsBack'};
this._itemSpawnNodes[4] = {'path': ['c2', 'c4', 'b1', 'b3', 'g4', 'd3', 'd1', 'g2'], 'node': [225, 315, 270, 270, 300, 240, 240, 300], 'scale': 60, 'x': -75, 'y': 15, 'a': 80, 'used': false, 'container': 'mcItemsBack'};
this._itemSpawnNodes[5] = {'path': ['c1', 'c3', 'd4', 'g3', 'd3', 'g4', 'f4', 'f3'], 'node': [45, 135, 120, 60, 120, 60, 270, 270], 'scale': 100, 'x': 0, 'y': 75, 'a': 100, 'used': false, 'container': 'mcItemsFront'};
};
v2.clearSpawnNodes = function () {
clearInterval(this._iidObjective);
clearInterval(this._iidBonus);
clearInterval(this._iidObstacle);
(this._objective.__get__mc()).removeMovieClip();
(this._bonus.__get__mc()).removeMovieClip();
(this._obstacle.__get__mc()).removeMovieClip();
for (var v2 in this._itemSpawnNodes) {
this._itemSpawnNodes[v2].used = false;
}
};
v2.chooseNode = function () {
var v2 = -1;
var v6 = this._itemSpawnNodes.length;
var v4 = 0;
var v3 = false;
do {
v2 = Math.floor(Math.random() * this._itemSpawnNodes.length);
trace('RANDOM SPAWN NODE: ' + v2);
trace('Node Used? : ' + this._itemSpawnNodes[v2].used);
++v4;
for (var v5 in this._itemSpawnNodes[v2].path) {
if (this._itemSpawnNodes[v2].path[v5] == this._pathMgr.getCurrentPathString()) {
v3 = true;
break;
}
}
if (v4 == v6) {
v2 = -1;
break;
}
} while (this._itemSpawnNodes[v2].used || v3);
return v2;
};
v2.spawnObjective = function () {
if (!this._objectiveSpawned) {
var v2 = this.chooseNode();
if (v2 == -1) {
clearInterval(this._iidObjective);
this._iidObjective = setInterval(this, 'spawnObjective', 1000);
return undefined;
}
this._itemSpawnNodes[v2].used = true;
var v5 = 'mc' + this._objectiveItem + '30';
var v3 = this._itemSpawnNodes[v2];
var v4 = (this.__get__mc())[v3.container];
var v6 = v4.getNextHighestDepth();
this._objective = src.game.ItemGame(v4.attachMovie(v5, 'mcObjectiveItem', v6));
this._objective.addEventListener('onDespawnComplete', mx.utils.Delegate.create(this, this.captureEvent));
this._objective.init('objective');
this._objective.setData(v3, v2);
this._objective.spawn();
this._sMgr.playPopUp();
this._objective.__set__id(this._objectiveItem);
this._objectiveSpawned = true;
}
};
v2.despawnObjective = function () {
trace('DESPAWN OBJECTIVE');
clearInterval(this._iidObjective);
this._objective.despawn(true);
};
v2.spawnBonus = function () {
trace('CURRENT SPAWN BONUS NUMBER : ' + this._bonusSpawnCount + '/' + this._bonusTotal);
if (!this._bonusSpawned && this._bonusPoints < 15 && this._bonusSpawnCount <= this._bonusTotal) {
var v3 = this.chooseNode();
if (v3 == -1) {
clearInterval(this._iidBonus);
this._iidBonus = setInterval(this, 'spawnBonus', 1000);
return undefined;
}
this._itemSpawnNodes[v3].used = true;
var v5 = this._itemSpawnNodes[v3];
var v6 = (this.__get__mc())[v5.container];
++this._bonusSpawnCount;
var v4 = 0;
var v2 = 'mc' + this._bonusItems[0] + '30';
trace('BONUS SPAWN COUNT: ' + this._bonusSpawnCount);
if (this._bonusSpawnCount % 3 == 0) {
if (this._bonusPoints < 13) {
v4 = this._bonusItems.length - 2;
v2 = 'mc' + this._bonusItems[this._bonusItems.length - 2] + '30';
} else {
v2 = 'mc' + this._bonusItems[0] + '30';
}
}
if (this._bonusSpawnCount % 5 == 0) {
if (this._bonusPoints < 11) {
v4 = this._bonusItems.length - 1;
v2 = 'mc' + this._bonusItems[this._bonusItems.length - 1] + '30';
} else {
v2 = 'mc' + this._bonusItems[0] + '30';
}
}
var v7 = v6.getNextHighestDepth();
this._bonus = src.game.ItemGame(v6.attachMovie(v2, 'mcBonusItem', v7));
this._bonus.addEventListener('onDespawnComplete', mx.utils.Delegate.create(this, this.captureEvent));
this._bonus.init('bonus');
this._bonus.setData(v5, v3);
this._bonus.spawn();
this._sMgr.playPopUp();
this._bonusSpawned = true;
this._bonus.__set__id(this._bonusItems[v4]);
trace('BONUS ID: ' + this._bonus.__get__id());
}
};
v2.despawnBonus = function () {
trace('DESPAWN BONUS');
clearInterval(this._iidBonus);
this._bonus.despawn(true);
};
v2.spawnObstacle = function () {
if (!this._obstacleSpawned) {
var v2 = this.chooseNode();
if (v2 == -1) {
clearInterval(this._iidObstacle);
this._iidObstacle = setInterval(this, 'spawnObstacle', 1000);
return undefined;
}
this._itemSpawnNodes[v2].used = true;
var v6 = 'mc' + this._obstacleItem + '30';
var v3 = this._itemSpawnNodes[v2];
var v4 = (this.__get__mc())[v3.container];
var v5 = v4.getNextHighestDepth();
this._obstacle = src.game.ItemGame(v4.attachMovie(v6, 'mcObstacleItem', v5));
this._obstacle.addEventListener('onDespawnComplete', mx.utils.Delegate.create(this, this.captureEvent));
this._obstacle.init('obstacle');
this._obstacle.setData(v3, v2);
this._obstacle.spawn();
this._obstacleSpawned = true;
clearInterval(this._iidObstacle);
this._iidObstacle = setInterval(this, 'despawnObstacle', this._despawnTime);
}
};
v2.despawnObstacle = function () {
trace('DESPAWN OBSTACLE');
clearInterval(this._iidObstacle);
this._obstacle.despawn(true);
};
v2.setGameItems = function () {
this._bonusSpawnCount = 0;
this._objectiveSpawned = false;
this._bonusSpawned = false;
this._obstacleSpawned = false;
clearInterval(this._iidObjective);
this._iidObjective = setInterval(this, 'spawnObjective', 1000);
clearInterval(this._iidBonus);
this._iidBonus = setInterval(this, 'spawnBonus', 1250);
clearInterval(this._iidObstacle);
this._iidObstacle = setInterval(this, 'spawnObstacle', 1750);
};
v2.onKeyDown = function () {
switch (Key.getCode()) {
case 32:
if (this._twitchGameOn && !this._levelStarted) {
this._twitchGameOn = false;
(this.__get__mc()).mcTwitchGame.stopTwitchGame();
}
break;
case 39:
if (!this._change && this._levelStarted) {
this._changeNode = this._pathMgr.getIntersectionNode('right', this._curNode, this._speed);
if (this._changeNode > -1) {
this._change = true;
}
}
break;
case 37:
if (!this._change && this._levelStarted) {
this._changeNode = this._pathMgr.getIntersectionNode('left', this._curNode, this._speed);
if (this._changeNode > -1) {
this._change = true;
}
}
break;
case 38:
if (this._speedSetting < 3 && this._levelStarted) {
(this.__get__mc()).mcSpeedMeter.onSpeedIncrease();
this._sMgr.playShiftUp();
++this._speedSetting;
if (this._speedSetting > 3) {
this._speedSetting = 3;
}
this._speed = this._speeds[this._speedSetting];
if (this._curNode % this._speed !== 0) {
this._curNode = this.findNextGoodNode(this._curNode);
}
}
break;
case 40:
if (this._speedSetting > 0 && this._levelStarted) {
(this.__get__mc()).mcSpeedMeter.onSpeedDecrease();
this._sMgr.playShiftDown();
--this._speedSetting;
if (this._speedSetting < 0) {
this._speedSetting = 0;
}
this._speed = this._speeds[this._speedSetting];
if (this._curNode % this._speed !== 0) {
this._curNode = this.findNextGoodNode(this._curNode);
}
}
break;
case 35:
if (Key.isDown(17)) {
this._curLevel = 10;
this.dispatchEvent({'type': 'onLevelEnd'});
}
break;
case 34:
if (Key.isDown(17)) {
this.dispatchEvent({'type': 'onLevelEnd'});
}
break;
default:
}
};
v2.resetRenderVars = function () {
this._change = false;
this._changeNode = -1;
this._curFrame = 1;
this._curNode = 0;
this._curNodeIndex = 0;
this._itemStringCount = 0;
this._speeds = new Array(22.5, 30, 45, 60);
this._speedSetting = 0;
this._speed = this._speeds[this._speedSetting];
};
v2.setNextFrame = function () {
this._curNode += this._speed;
if (this._curNode > 337.5) {
this._curNode = 0;
this._curNodeIndex = 0;
this._curFrame = 1;
} else {
var v3 = 0;
var v2 = this._curNodeIndex + 1;
while (v2 < 24) {
if (src.game.Engine._traceRender) {
trace('\n--------NEXT FRAME--');
trace('COUNT: ' + v3);
trace('NODE: ' + src.game.Engine.NODES[v2]);
trace('INDEX: ' + v2);
}
if (this._curNode == src.game.Engine.NODES[v2]) {
this._curFrame = v2 + 1;
this._curNodeIndex = v2;
break;
}
++v3;
++v2;
}
}
};
v2.findNextGoodNode = function (fromNode) {
var v3 = fromNode;
var v2 = this._curNodeIndex;
while (v2 < 24) {
if (src.game.Engine.NODES[v2] > fromNode && src.game.Engine.NODES[v2] % this._speed == 0) {
v3 = src.game.Engine.NODES[v2];
this._curNodeIndex = v2;
this._curFrame = v2 + 1;
break;
}
++v2;
}
if (v3 == fromNode) {
v3 = this._curNode + this._speed;
}
trace('NEXT GOOD NODE: ' + v3);
return v3;
};
v2.checkForItemHit = function (item) {
if (!item.__get__enabled()) {
return undefined;
}
var v4 = -1;
var v3 = false;
for (var v5 in item.paths) {
if (this._pathMgr.getCurrentPathString() == item.paths[v5]) {
v4 = Number(v5);
v3 = true;
break;
}
}
if (!v3) {
return undefined;
}
var v6 = item.nodes[v4];
var v8 = v6 - this._curNode;
if (Math.abs(v8) < this._speed) {
trace('HIT OBJECT');
if (item.__get__type() == 'objective') {
++this._itemStringCount;
this.dispatchEvent({'type': 'onAcquireObjective', 'target': item});
} else {
if (item.__get__type() == 'bonus') {
++this._itemStringCount;
this.dispatchEvent({'type': 'onAcquireBonus', 'target': item});
} else {
if (item.__get__type() == 'obstacle') {
this.dispatchEvent({'type': 'onHitObstacle', 'target': item});
}
}
}
}
if (this._itemStringCount == 3) {
var v7 = 'cheer' + ((this.__get__mc()).mcCrowd.getCheer()).toString();
(this.__get__mc()).mcCrowd.changeState(v7);
this._itemStringCount = 0;
}
};
v2.changeCrowdState = function (newState) {
clearInterval(this._iidCrowdState);
(this.__get__mc()).mcCrowd.gotoAndStop(newState);
this.crowdState = newState;
if (newState !== 'idle') {
this._iidCrowdState = setInterval(this, 'changeCrowdState', 5000, 'idle');
}
};
v2.mainLoop = function () {
var v4 = getTimer() - this.crowdStartTime;
if (v4 > src.game.Engine.CROWD_THRESHOLD) {
(this.__get__mc()).mcCrowd.changeState(src.game.Crowd.CROWD_BOO);
this.crowdStartTime = getTimer();
}
if (this._change && this._curNode == this._changeNode) {
trace('!!!!!!!!!!!!CHANGE PATH!!!!!!!!!!!!!!!');
var v2 = this._pathMgr.changePath();
this._curNodeIndex = v2.frame - 1;
if (src.game.Engine._traceRender) {
trace('NEW PATH: ' + v2.path);
trace('NEW NODE: ' + v2.node);
trace('NEW FRAME: ' + v2.frame);
trace('NEW INDEX: ' + v2.frame - 1);
}
if (v2.node % this._speed == 0) {
this._curFrame = v2.frame;
this._curNode = v2.node;
} else {
this._curNode = this.findNextGoodNode(v2.node);
}
this._change = false;
this._changeNode = -1;
this.crowdStartTime = getTimer();
}
var v3 = this._pathMgr.getCurrentPath();
if (src.game.Engine._traceRender) {
trace('\n------RENDER--');
trace('CUR PATH: ' + (v3.__get__mc())._name);
trace('CUR FRAME: ' + this._curFrame);
trace('CUR NODE: ' + this._curNode + '\n');
}
v3.renderFrame(this._curFrame);
this.checkForItemHit(this._objective);
this.checkForItemHit(this._bonus);
this.checkForItemHit(this._obstacle);
this.setNextFrame();
};
v1.MAX_LIVES = 3;
v1._traceRender = false;
v1.POINTS_OBJECTIVE = 5;
v1.DESPAWN_TIMES = new Array(3000, 3000, 3000, 3000, 3000, 4000, 4000, 4000, 5000, 5000);
v1.NUM_TWITCH_SLOW_ANIMS = 4;
v1.NUM_TWITCH_FAST_ANIMS = 4;
v1.NODES = new Array(0, 22.5, 30, 45, 60, 67.5, 90, 112.5, 120, 135, 150, 157.5, 180, 202.5, 210, 225, 240, 247.5, 270, 292.5, 300, 315, 330, 337.5);
v1.CROWD_THRESHOLD = 10000;
v2.addProperty('mc', v2.__get__mc, v2.__set__mc);
ASSetPropFlags(src.game.Engine.prototype, null, 1);
}
#endinitclip
}
movieClip 1920 __Packages.src.game.SoundMgr {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.SoundMgr) {
var v1 = function (mcTarget) {
this._obstacle = new Sound(mcTarget);
this._doh = new Sound(mcTarget);
this._scream = new Sound(mcTarget);
this._burp = new Sound(mcTarget);
this._stillHungry = new Sound(mcTarget);
this._forbiddenDonut = new Sound(mcTarget);
this._mmmDonuts = new Sound(mcTarget);
this._eating = new Sound(mcTarget);
this._mmmEating = new Sound(mcTarget);
this._wahah = new Sound(mcTarget);
this._mmhmm = new Sound(mcTarget);
this._mmmMmm = new Sound(mcTarget);
this._popUp = new Sound(mcTarget);
this._popOut = new Sound(mcTarget);
this._shiftUp = new Sound(mcTarget);
this._shiftDown = new Sound(mcTarget);
this._allBonusSounds = new Array(this._forbiddenDonut, this._mmmDonuts);
this._endLevelSounds = new Array(this._mmhmm, this._mmmMmm, this._laugh);
this._foodSounds = new Array(this._eating, this._mmmEating);
this._obstacleSounds = new Array(this._doh, this._scream);
this.attachSounds();
};
src.game.SoundMgr = v1;
var v2 = v1.prototype;
v2.attachSounds = function () {
this._obstacle.attachSound('obstacle');
this._doh.attachSound('doh');
this._scream.attachSound('scream');
this._burp.attachSound('burp');
this._stillHungry.attachSound('stillhungry');
this._forbiddenDonut.attachSound('forbiddenDonut');
this._mmmDonuts.attachSound('mmmDonuts');
this._eating.attachSound('eating');
this._mmmEating.attachSound('mmmEating');
this._wahah.attachSound('wahah');
this._mmhmm.attachSound('mmhmm');
this._mmmMmm.attachSound('mmmMmm');
this._laugh.attachSound('laugh');
this._popUp.attachSound('popup');
this._popOut.attachSound('popout');
this._shiftUp.attachSound('shiftUp');
this._shiftDown.attachSound('shiftDown');
};
v2.playShiftUp = function () {
this._shiftUp.start(0, 0);
};
v2.playShiftDown = function () {
this._shiftDown.start(0, 0);
};
v2.playObstacle = function () {
var v2 = Math.floor(Math.random() * this._obstacleSounds.length);
trace('OBSTACLE SOUND SEED: ' + v2);
var v3 = this._obstacleSounds[v2];
v3.start(0, 0);
this._obstacle.start(0, 0);
};
v2.playPopUp = function () {
this._popUp.start(0, 0);
};
v2.playPopOut = function () {
this._popOut.start(0, 0);
};
v2.playAllObjectives = function () {
this._wahah.start(0, 0);
};
v2.playDuffSound = function () {
this._burp.start(0, 0);
};
v2.playFoodSound = function () {
var v2 = Math.floor(Math.random() * this._foodSounds.length);
trace('FOOD SOUND SEED: ' + v2);
var v3 = this._foodSounds[v2];
v3.start(0, 0);
};
v2.playEndLevelSound = function () {
var v3 = Math.floor(Math.random() * this._endLevelSounds.length);
var v2 = this._endLevelSounds[v3];
v2.start(0, 0);
};
v2.playBonusSound = function () {
var v3 = Math.floor(Math.random() * this._allBonusSounds.length);
var v2 = this._allBonusSounds[v3];
v2.start(0, 0);
};
ASSetPropFlags(src.game.SoundMgr.prototype, null, 1);
}
#endinitclip
}
movieClip 1921 __Packages.src.game.CrashCache {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.CrashCache) {
var v1 = function (mcTarget) {
this._movies = new Array();
this._movieIndex = 0;
this._cacheCount = 4;
this._cacheContainer = mcTarget.createEmptyMovieClip('__CRASH_CACHE__', 123456);
this._cacheContainer._x = -9999;
this._cacheContainer._y = 0;
var v3 = this._cacheContainer.createEmptyMovieClip('5', 10);
var v2 = v3.attachMovie('crash5', '_mc', 0);
v2._x = 0;
v2._y = -42;
v2._visible = false;
v2.gotoAndStop(1);
this._movies.push('5');
this.initLoader();
this.loadNextMovie();
};
src.game.CrashCache = v1;
var v2 = v1.prototype;
v2.playCrashMovie = function () {
if (this._movieIndex > this._movies.length - 1) {
this._movieIndex = 0;
}
this._cacheContainer._x = 0;
var v2 = this._movies[this._movieIndex];
trace(this._movieIndex + ':' + v2);
this._cacheContainer[v2]._mc._visible = true;
this._cacheContainer[v2]._mc.gotoAndPlay(2);
++this._movieIndex;
};
v2.cleanUp = function () {
var v2 = this._movies[this._movieIndex - 1];
this._cacheContainer[v2]._mc._visible = false;
this._cacheContainer[v2]._mc.gotoAndStop(1);
this._cacheContainer._x = -9999;
};
v2.loadNextMovie = function () {
trace('LOAD NEXT MOVE: ' + this._cacheCount);
var v2 = this._cacheCount;
var v4 = this._cacheContainer.createEmptyMovieClip(String(v2), v2 * 2);
var v3 = v4.attachMovie('crash' + String(v2), '_mc', 1);
if (v3) {
this.onSwfLoaded(v3);
}
};
v2.onSwfComplete = function (target) {
trace('COMPLETE: ' + target);
};
v2.onSwfLoaded = function (target) {
trace('LOADED: ' + target);
trace('MOVIE: ' + this._cacheCount);
target._visible = false;
target._x = 0;
target._y = -42;
target.gotoAndStop(1);
this._movies.push(this._cacheCount.toString());
--this._cacheCount;
if (this._cacheCount > 0) {
this.loadNextMovie();
}
};
v2.onSwfProgress = function (target, bytesLoaded, bytesTotal) {};
v2.initLoader = function () {
this._mcl = new MovieClipLoader();
this._mclListener = new Object();
this._mclListener.onLoadInit = mx.utils.Delegate.create(this, this.onSwfLoaded);
this._mclListener.onLoadProgress = mx.utils.Delegate.create(this, this.onSwfProgress);
this._mclListener.onLoadComplete = mx.utils.Delegate.create(this, this.onSwfComplete);
this._mcl.addListener(this._mclListener);
};
ASSetPropFlags(src.game.CrashCache.prototype, null, 1);
}
#endinitclip
}
movieClip 1922 __Packages.net.indivision.event.FrameEventBeacon {
#initclip
if (!_global.net) {
_global.net = new Object();
}
if (!_global.net.indivision) {
_global.net.indivision = new Object();
}
if (!_global.net.indivision.event) {
_global.net.indivision.event = new Object();
}
if (!_global.net.indivision.event.FrameEventBeacon) {
var v1 = function () {};
net.indivision.event.FrameEventBeacon = v1;
var v2 = v1.prototype;
v1.initialize = function () {
var v4 = _global.MovieClip;
if (!_root.__FrameEventBeacon) {
mx.events.EventDispatcher.initialize(v4);
var v3 = _root.createEmptyMovieClip('__FrameEventBeacon', _root.getNextHighestDepth());
v3.onEnterFrame = function () {
_global.MovieClip.dispatchEvent({'type': 'onEnterFrame'});
};
}
};
ASSetPropFlags(net.indivision.event.FrameEventBeacon.prototype, null, 1);
}
#endinitclip
}
movieClip 1923 __Packages.src.game.LeaderBoard {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.LeaderBoard) {
var v1 = function (uID) {
this.getUser(uID);
};
src.game.LeaderBoard = v1;
var v2 = v1.prototype;
v2.getUser = function (uID) {
this._userID = uID;
};
v2.postScore = function (score) {
if (this._userID == undefined) {
return undefined;
}
var xmlResult = new XML();
xmlResult.ignoreWhite = true;
xmlResult.onLoad = function (success) {
if (success) {
trace('SUCCESS: ' + xmlResult);
} else {
trace('FAILURE');
}
};
var v2 = new LoadVars();
v2.user = this._userID;
v2.score = score;
v2.action = src.game.LeaderBoard.ACTION;
v2.sendAndLoad(src.game.LeaderBoard.LB_URL, xmlResult, 'POST');
};
v1.LB_URL = 'http://paradox65.com/simpsons/requests/addscore.php';
v1.ACTION = 'addscore';
ASSetPropFlags(src.game.LeaderBoard.prototype, null, 1);
}
#endinitclip
}
movieClip 1924 __Packages.src.game.Crowd {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.Crowd) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
this.init();
};
src.game.Crowd = v1;
src.game.Crowd extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.__get__state = function () {
return this._state;
};
v2.init = function () {
this._state = src.game.Crowd.CROWD_IDLE;
this._s = new Sound(this.__get__mc());
};
v2.getCheer = function () {
return Math.floor(Math.random() * 3) + 1;
};
v2.changeState = function (newState) {
trace('CROWD CHANGE STATE: ' + newState);
if (this._state !== src.game.Crowd.CROWD_IDLE) {
this._s.stop(this._state);
}
clearInterval(this._iid);
(this.__get__mc()).gotoAndStop(newState);
if (newState !== src.game.Crowd.CROWD_IDLE) {
this._s.attachSound(newState);
this._s.setVolume(85);
this._s.start(0, 0);
this._iid = setInterval(this, 'changeState', this._s.duration, src.game.Crowd.CROWD_IDLE);
}
this._state = newState;
};
v2.loopSound = function () {
this._s.start(0, 0);
};
v1.CROWD_IDLE = 'idle';
v1.CROWD_CHEER1 = 'cheer1';
v1.CROWD_CHEER2 = 'cheer2';
v1.CROWD_CHEER3 = 'cheer3';
v1.CROWD_BOO = 'boo';
v1.CROWD_WINCE = 'wince';
v2.addProperty('state', v2.__get__state, function () {});
ASSetPropFlags(src.game.Crowd.prototype, null, 1);
}
#endinitclip
}
movieClip 1925 __Packages.src.game.hud.GameCompletePanel {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.hud) {
_global.src.game.hud = new Object();
}
if (!_global.src.game.hud.GameCompletePanel) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
};
src.game.hud.GameCompletePanel = v1;
src.game.hud.GameCompletePanel extends src.game.hud.Panel;
var v2 = v1.prototype;
v2.setCopy = function (data) {
this.setTitle(data.attributes.title);
var v2 = new TextFormat();
v2.leading = 2;
v2.letterSpacing = 1;
this._btnLabel = data.buttons.panelBtn.attributes.label;
this._leaderFmt = new TextFormat();
this._leaderFmt.leading = -4;
this._leaderFmt.letterSpacing = 2;
this._leaderLbl = data.buttons.visitLeader.attributes.label;
(this.__get__mc()).mcVisitLeaderBoard.txtLabel.text = this._leaderLbl;
(this.__get__mc()).mcVisitLeaderBoard.txtLabel.setTextFormat(this._leaderFmt);
(this.__get__mc()).mcPlayAgainBtn.txtLabel.text = this._btnLabel;
(this.__get__mc()).mcPlayAgainBtn.txtLabel.setTextFormat(this._btnFormat);
(this.__get__mc()).txtSiteHeader.text = data.officialSite.attributes.title;
(this.__get__mc()).txtSiteHeader.setTextFormat(v2);
(this.__get__mc()).txtPointsHeader.text = data.totalPoints.attributes.title;
(this.__get__mc()).txtPointsHeader.setTextFormat(v2);
(this.__get__mc()).txtHighScoreHeader.text = data.highScores.attributes.title;
(this.__get__mc()).txtHighScoreHeader.setTextFormat(v2);
(this.__get__mc()).mcVisitLeaderBoard._visible = (this.__get__mc()).txtHighScoreHeader.text.length > 0;
};
v2.init = function () {
(this.__get__mc()).txtTotalPoints.text = '0';
this.initBtns();
};
v2.reset = function () {
(this.__get__mc())._yscale = 0;
(this.__get__mc())._xscale = 0;
(this.__get__mc())._visible = false;
};
v2.setTitle = function (title) {
(this.__get__mc()).txtTitle.text = title;
};
v2.setOfficialSiteURL = function (url) {
this._officialSiteURL = url;
};
v2.setLevelPoints = function (points) {
(this.__get__mc()).txtTotalPoints.text = points.toString();
};
v2.initBtns = function () {
var hook = this;
(this.__get__mc()).mcOfficialSite.onRelease = function () {
hook.openOfficialSite();
};
(this.__get__mc()).mcVisitLeaderBoard.mcHitArea.onRelease = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._leaderLbl;
this._parent.txtLabel.setTextFormat(hook._leaderFmt);
trace('Go Leader');
hook.changePage('leader');
};
(this.__get__mc()).mcVisitLeaderBoard.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._leaderLbl;
this._parent.txtLabel.setTextFormat(hook._leaderFmt);
};
(this.__get__mc()).mcVisitLeaderBoard.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._leaderLbl;
this._parent.txtLabel.setTextFormat(hook._leaderFmt);
};
(this.__get__mc()).mcVisitLeaderBoard.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._leaderLbl;
this._parent.txtLabel.setTextFormat(hook._leaderFmt);
};
(this.__get__mc()).mcVisitLeaderBoard.mcHitArea.onRollOut = (this.__get__mc()).mcVisitLeaderBoard.mcHitArea.onReleaseOutside;
(this.__get__mc()).mcPlayAgainBtn.mcHitArea.onRelease = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
trace('Go Home');
hook.goHome();
};
(this.__get__mc()).mcPlayAgainBtn.mcHitArea.onPress = function () {
this._parent.gotoAndStop('down');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPlayAgainBtn.mcHitArea.onRollOver = function () {
this._parent.gotoAndStop('over');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPlayAgainBtn.mcHitArea.onReleaseOutside = function () {
this._parent.gotoAndStop('up');
this._parent.txtLabel.text = hook._btnLabel;
this._parent.txtLabel.setTextFormat(hook._btnFormat);
};
(this.__get__mc()).mcPlayAgainBtn.mcHitArea.onRollOut = (this.__get__mc()).mcPlayAgainBtn.mcHitArea.onReleaseOutside;
};
v2.changePage = function (page) {
this.dispatchEvent({'type': 'onPageChange', 'target': page});
};
v2.openOfficialSite = function () {
var v2;
if (this._officialSiteURL.indexOf('http://') == -1) {
v2 = 'http://' + this._officialSiteURL;
} else {
v2 = this._officialSiteURL;
}
};
v2.onPanelAnimInComplete = function () {
trace('Game Complete Panel In');
};
v2.goHome = function () {
this.dispatchEvent({'type': 'onPageChange', 'target': 'home'});
};
ASSetPropFlags(src.game.hud.GameCompletePanel.prototype, null, 1);
}
#endinitclip
}
movieClip 1926 __Packages.src.game.TwitchGame {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.TwitchGame) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
this.origY = (this.__get__mc())._y;
(this.__get__mc())._visible = false;
};
src.game.TwitchGame = v1;
src.game.TwitchGame extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.setSpeed = function (speed) {
this._speed = speed;
};
v2.setCopy = function (data) {
this._speed = Number(data.attributes.markerSpeed);
var v3 = new TextFormat();
v3.letterSpacing = 1;
v3.leading = 1;
(this.__get__mc()).txtInstructions.htmlText = data.instructions._value;
(this.__get__mc()).txtInstructions.setTextFormat(v3);
var v2 = new TextFormat();
v2.letterSpacing = 1;
v2.leading = 2;
(this.__get__mc()).txtSlow.text = data.attributes.slowText;
(this.__get__mc()).txtSlow.setTextFormat(v2);
(this.__get__mc()).txtFast.text = data.attributes.fastText;
(this.__get__mc()).txtFast.setTextFormat(v2);
};
v2.stopTwitchGame = function () {
delete (this.__get__mc()).mcTwitchMeter.onEnterFrame;
var v2 = (this.__get__mc()).mcTwitchMeter.mcMarker;
trace('TWITCH STOP X: ' + v2._x);
if (v2._x >= 74 && v2._x <= 271) {
trace('JUST RIGHT');
this.dispatchEvent({'type': 'onTwitchSuccess', 'target': 'SUCCESS'});
} else {
if (v2._x < 74) {
trace('TOO SLOW');
this.dispatchEvent({'type': 'onTwitchFailure', 'target': 'SLOW'});
} else {
if (v2._x > 271) {
trace('TOO FAST');
this.dispatchEvent({'type': 'onTwitchFailure', 'target': 'FAST'});
}
}
}
};
v2.startTwitchGame = function () {
this.f = 1;
this._angle = 1.570796326794897;
(this.__get__mc()).mcTwitchMeter.onEnterFrame = mx.utils.Delegate.create(this, this.panMarker);
};
v2.panMarker = function () {
(this.__get__mc()).mcTwitchMeter.mcMarker._x = src.game.TwitchGame.CENTERX + Math.cos(this._angle) * src.game.TwitchGame.RANGE;
this._angle += this._speed;
};
v2.animRight = function () {
if (this._play) {
(this.__get__mc()).mcTwitchMeter.mcMarker._x = -20;
this._pt = new net.indivision.tween.PropertyTween();
this._pt.__set__target((this.__get__mc()).mcTwitchMeter.mcMarker);
this._pt.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, this._speed));
this._pt.alter(['_x'], [368], mx.utils.Delegate.create(this, this.animLeft));
}
};
v2.animLeft = function () {
if (this._play) {
(this.__get__mc()).mcTwitchMeter.mcMarker._x = 368;
this._pt = new net.indivision.tween.PropertyTween();
this._pt.__set__target((this.__get__mc()).mcTwitchMeter.mcMarker);
this._pt.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, this._speed));
this._pt.alter(['_x'], [-20], mx.utils.Delegate.create(this, this.animRight));
}
};
v2.loopMarker = function () {
if (this.f >= (this.__get__mc()).mcTwitchMeter.mcMarkerAnim._totalframes) {
this.f = 1;
}
(this.__get__mc()).mcTwitchMeter.mcMarkerAnim.gotoAndStop(this.f);
this.f += this._speed;
};
v2.slideUp = function () {
(this.__get__mc())._visible = true;
(this.__get__mc())._alpha = 100;
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Cubic.easeOut, 6));
v2.alter(['_y'], [323], mx.utils.Delegate.create(this, this.onGameUp));
};
v2.slideDown = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target(this.mc);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Cubic.easeIn, 6));
v2.alter(['_y'], [this.origY], mx.utils.Delegate.create(this, this.onGameDown));
};
v2.onGameUp = function () {
this.dispatchEvent({'type': 'onGameUp', 'target': this});
this.startTwitchGame();
};
v2.onGameDown = function () {
this.dispatchEvent({'type': 'onGameDown', 'target': this});
(this.__get__mc())._alpha = 0;
(this.__get__mc())._visible = false;
};
v1.UP_Y = 323;
v1.CENTERX = 173;
v1.RANGE = 195;
ASSetPropFlags(src.game.TwitchGame.prototype, null, 1);
}
#endinitclip
}
movieClip 1927 __Packages.src.game.hud.SpeedMeter {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.hud) {
_global.src.game.hud = new Object();
}
if (!_global.src.game.hud.SpeedMeter) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
};
src.game.hud.SpeedMeter = v1;
src.game.hud.SpeedMeter extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.setCopy = function (data) {
var v2 = new TextFormat();
v2.leading = 2;
v2.letterSpacing = 1;
(this.__get__mc()).txtLabel.text = data.attributes.title;
(this.__get__mc()).txtLabel.setTextFormat(v2);
};
v2.setSpeed = function (speed) {
this._curSpeed = speed;
(this.__get__mc()).mcSpeedDial._rotation = src.game.hud.SpeedMeter.ROTATION_DEG * (this._curSpeed - 1);
};
v2.onSpeedDecrease = function () {
if (this._curSpeed > 1) {
--this._curSpeed;
this.animRotation();
}
};
v2.onSpeedIncrease = function () {
if (this._curSpeed < 4) {
++this._curSpeed;
this.animRotation();
}
};
v2.animRotation = function () {
var v3 = src.game.hud.SpeedMeter.ROTATION_DEG * (this._curSpeed - 1);
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target((this.__get__mc()).mcSpeedDial);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Quad.easeOut, 8));
v2.alter(['_rotation'], [v3]);
};
v1.ROTATION_DEG = 45;
ASSetPropFlags(src.game.hud.SpeedMeter.prototype, null, 1);
}
#endinitclip
}
movieClip 1928 __Packages.com.robertpenner.easing.Quad {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.robertpenner) {
_global.com.robertpenner = new Object();
}
if (!_global.com.robertpenner.easing) {
_global.com.robertpenner.easing = new Object();
}
if (!_global.com.robertpenner.easing.Quad) {
var v1 = function () {};
com.robertpenner.easing.Quad = v1;
var v2 = v1.prototype;
v1.easeIn = function (t, b, c, d) {
t /= d;
return c * t * t + b;
};
v1.easeOut = function (t, b, c, d) {
t /= d;
return -c * t * (t - 2) + b;
};
v1.easeInOut = function (t, b, c, d) {
t /= d / 2;
if (t < 1) {
return (c / 2) * t * t + b;
}
return (-c / 2) * (--t * (t - 2) - 1) + b;
};
ASSetPropFlags(com.robertpenner.easing.Quad.prototype, null, 1);
}
#endinitclip
}
movieClip 1929 __Packages.src.game.hud.LivesMeter {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.hud) {
_global.src.game.hud = new Object();
}
if (!_global.src.game.hud.LivesMeter) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
};
src.game.hud.LivesMeter = v1;
src.game.hud.LivesMeter extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.setCopy = function (data) {
var v2 = new TextFormat();
v2.leading = 2;
v2.letterSpacing = 1;
(this.__get__mc()).txtLabel.text = data.attributes.title;
(this.__get__mc()).txtLabel.setTextFormat(v2);
};
v2.setLives = function (lives) {
if (lives < 0) {
trace('ERROR: Lives cannot be less than 0');
return undefined;
}
trace('Lives: ' + lives);
this._numLives = lives;
(this.__get__mc()).mcNumber.txtNumber.text = lives.toString();
};
v2.takeAwayLife = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target((this.__get__mc()).mcNumber);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Cubic.easeOut, 4));
v2.alter(['_xscale', '_yscale'], [3, 3], mx.utils.Delegate.create(this, this.animIn));
};
v2.decrementLives = function () {
this.setLives(--this._numLives);
};
v2.animIn = function () {
this.decrementLives();
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target((this.__get__mc()).mcNumber);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 2));
v2.alter(['_xscale', '_yscale'], [128, 128], mx.utils.Delegate.create(this, this.animBack));
};
v2.animBack = function () {
var v2 = new net.indivision.tween.PropertyTween();
v2.__set__target((this.__get__mc()).mcNumber);
v2.__set__motion(new net.indivision.tween.Motion(com.robertpenner.easing.Linear.easeNone, 3));
v2.alter(['_xscale', '_yscale'], [100, 100]);
if (this._numLives == 0) {
var v3 = new Object();
v3.reason = 'NO_LIVES_LEFT';
this.dispatchEvent({'type': 'onGameOver', 'target': v3});
} else {
this.dispatchEvent({'type': 'onContinueLevel'});
}
};
ASSetPropFlags(src.game.hud.LivesMeter.prototype, null, 1);
}
#endinitclip
}
movieClip 1930 __Packages.src.game.hud.TimeMeter {
#initclip
if (!_global.src) {
_global.src = new Object();
}
if (!_global.src.game) {
_global.src.game = new Object();
}
if (!_global.src.game.hud) {
_global.src.game.hud = new Object();
}
if (!_global.src.game.hud.TimeMeter) {
var v1 = function () {
super();
trace('__construct: ' + (this.__get__mc())._name);
this._fillWidth = (this.__get__mc()).mcTimeFill._width;
};
src.game.hud.TimeMeter = v1;
src.game.hud.TimeMeter extends net.indivision.core.MovieClipDispatcher;
var v2 = v1.prototype;
v2.setCopy = function (data) {
var v2 = new TextFormat();
v2.leading = 2;
v2.letterSpacing = 1;
(this.__get__mc()).txtLabel.text = data.attributes.title;
(this.__get__mc()).txtLabel.setTextFormat(v2);
};
v2.setLevel = function (n) {
(this.__get__mc()).mcLevelNum.txtNumber.text = n;
};
v2.setTime = function (ms) {
(this.__get__mc()).mcTimeFill._width = this._fillWidth;
var v2 = ms / 1000;
this._framesTotal = v2 * src.game.hud.TimeMeter.FPS;
this._framesNow = 0;
this._decrementScale = (this.__get__mc()).mcTimeFill._width / this._framesTotal;
trace('Timer Frames Total: ' + this._framesTotal);
trace('Timer Frames Decrement: ' + this._decrementScale);
this._timeTotal = ms;
this._timeLeft = this._timeTotal;
};
v2.startTimerFrames = function () {
(this.__get__mc()).onEnterFrame = mx.utils.Delegate.create(this, this.drainTimer);
};
v2.pauseTimerFrames = function () {
delete (this.__get__mc()).onEnterFrame;
};
v2.endTimerFrames = function () {
delete (this.__get__mc()).onEnterFrame;
};
v2.drainTimer = function () {
++this._framesNow;
(this.__get__mc()).mcTimeFill._width -= this._decrementScale;
if (this._framesNow > this._framesTotal) {
var v2 = new Object();
v2.reason = 'TIME_EXPIRED';
this.dispatchEvent({'type': 'onLevelEnd', 'target': v2});
delete (this.__get__mc()).onEnterFrame;
}
};
v2.startTimerInterval = function () {
clearInterval(this._iid);
setInterval(this, 'onSecondPassed', src.game.hud.TimeMeter.TIME_INTERVAL);
};
v2.endTimerInterval = function () {
clearInterval(this._iid);
};
v2.onSecondPassed = function () {
this._timeLeft -= src.game.hud.TimeMeter.TIME_INTERVAL;
var v2 = Math.floor((this._timeLeft / this._timeTotal) * 100);
(this.__get__mc()).mcTimeFill._xscale = v2;
};
v1.FPS = 15;
v1.TIME_INTERVAL = 100;
ASSetPropFlags(src.game.hud.TimeMeter.prototype, null, 1);
}
#endinitclip
}
frame 10 {
if (__unView_mc != undefined) {
__unView_mc.swapDepths(this.getNextHighestDepth());
__unView_mc.removeMovieClip();
}
stop();
}
movieClip 54 {
frame 1 {
stop();
}
}
movieClip 55 mcDevBtn {
#initclip
Object.registerClass('mcDevBtn', src.game.dev.DevBtn);
#endinitclip
}
movieClip 56 {
}
movieClip 59 mcDevIntersectBtn {
#initclip
Object.registerClass('mcDevIntersectBtn', src.game.dev.DevIntersectBtn);
#endinitclip
}
movieClip 60 {
}
movieClip 63 {
}
movieClip 64 mcDevConsole {
#initclip
Object.registerClass('mcDevConsole', src.game.dev.DevConsole);
#endinitclip
}
movieClip 66 mcScreenOverlay {
#initclip
Object.registerClass('mcScreenOverlay', src.game.hud.ScreenOverlay);
#endinitclip
}
movieClip 69 mcBaseball30 {
#initclip
Object.registerClass('mcBaseball30', src.game.ItemGame);
#endinitclip
}
movieClip 72 mcBasketball30 {
#initclip
Object.registerClass('mcBasketball30', src.game.ItemGame);
#endinitclip
}
movieClip 75 mcBottle30 {
#initclip
Object.registerClass('mcBottle30', src.game.ItemGame);
#endinitclip
}
movieClip 78 mcBowlingBall30 {
#initclip
Object.registerClass('mcBowlingBall30', src.game.ItemGame);
#endinitclip
}
movieClip 81 mcDonut30 {
#initclip
Object.registerClass('mcDonut30', src.game.ItemGame);
#endinitclip
}
movieClip 84 mcDuff30 {
#initclip
Object.registerClass('mcDuff30', src.game.ItemGame);
#endinitclip
}
movieClip 87 mcFish30 {
#initclip
Object.registerClass('mcFish30', src.game.ItemGame);
#endinitclip
}
movieClip 90 mcHotDog30 {
#initclip
Object.registerClass('mcHotDog30', src.game.ItemGame);
#endinitclip
}
movieClip 93 mcKrusty30 {
#initclip
Object.registerClass('mcKrusty30', src.game.ItemGame);
#endinitclip
}
movieClip 96 mcNuclearCore30 {
#initclip
Object.registerClass('mcNuclearCore30', src.game.ItemGame);
#endinitclip
}
movieClip 99 mcPacifier30 {
#initclip
Object.registerClass('mcPacifier30', src.game.ItemGame);
#endinitclip
}
movieClip 102 mcRemote30 {
#initclip
Object.registerClass('mcRemote30', src.game.ItemGame);
#endinitclip
}
movieClip 105 mcSax30 {
#initclip
Object.registerClass('mcSax30', src.game.ItemGame);
#endinitclip
}
movieClip 108 mcSkateboard30 {
#initclip
Object.registerClass('mcSkateboard30', src.game.ItemGame);
#endinitclip
}
movieClip 111 mcSlingShot30 {
#initclip
Object.registerClass('mcSlingShot30', src.game.ItemGame);
#endinitclip
}
movieClip 114 mcSquishee30 {
#initclip
Object.registerClass('mcSquishee30', src.game.ItemGame);
#endinitclip
}
movieClip 117 mcTeddyBear30 {
#initclip
Object.registerClass('mcTeddyBear30', src.game.ItemGame);
#endinitclip
}
movieClip 120 mcBaseball60 {
#initclip
Object.registerClass('mcBaseball60', src.game.ItemUI);
#endinitclip
}
movieClip 123 mcBasketball60 {
#initclip
Object.registerClass('mcBasketball60', src.game.ItemUI);
#endinitclip
}
movieClip 126 mcBottle60 {
#initclip
Object.registerClass('mcBottle60', src.game.ItemUI);
#endinitclip
}
movieClip 129 mcBowlingBall60 {
#initclip
Object.registerClass('mcBowlingBall60', src.game.ItemUI);
#endinitclip
}
movieClip 132 mcDonut60 {
#initclip
Object.registerClass('mcDonut60', src.game.ItemUI);
#endinitclip
}
movieClip 135 mcDuff60 {
#initclip
Object.registerClass('mcDuff60', src.game.ItemUI);
#endinitclip
}
movieClip 138 mcFish60 {
#initclip
Object.registerClass('mcFish60', src.game.ItemUI);
#endinitclip
}
movieClip 141 mcHotDog60 {
#initclip
Object.registerClass('mcHotDog60', src.game.ItemUI);
#endinitclip
}
movieClip 144 mcKrusty60 {
#initclip
Object.registerClass('mcKrusty60', src.game.ItemUI);
#endinitclip
}
movieClip 147 mcNuclearCore60 {
#initclip
Object.registerClass('mcNuclearCore60', src.game.ItemUI);
#endinitclip
}
movieClip 150 mcPacifier60 {
#initclip
Object.registerClass('mcPacifier60', src.game.ItemUI);
#endinitclip
}
movieClip 153 mcRemote60 {
#initclip
Object.registerClass('mcRemote60', src.game.ItemUI);
#endinitclip
}
movieClip 156 mcSax60 {
#initclip
Object.registerClass('mcSax60', src.game.ItemUI);
#endinitclip
}
movieClip 159 mcSkateboard60 {
#initclip
Object.registerClass('mcSkateboard60', src.game.ItemUI);
#endinitclip
}
movieClip 162 mcSlingShot60 {
#initclip
Object.registerClass('mcSlingShot60', src.game.ItemUI);
#endinitclip
}
movieClip 165 mcSquishee60 {
#initclip
Object.registerClass('mcSquishee60', src.game.ItemUI);
#endinitclip
}
movieClip 168 mcTeddyBear60 {
#initclip
Object.registerClass('mcTeddyBear60', src.game.ItemUI);
#endinitclip
}
movieClip 171 mcBrick30 {
#initclip
Object.registerClass('mcBrick30', src.game.ItemGame);
#endinitclip
}
movieClip 174 mcBuzzCola30 {
#initclip
Object.registerClass('mcBuzzCola30', src.game.ItemGame);
#endinitclip
}
movieClip 177 mcChocoBar30 {
#initclip
Object.registerClass('mcChocoBar30', src.game.ItemGame);
#endinitclip
}
movieClip 180 mcCookie30 {
#initclip
Object.registerClass('mcCookie30', src.game.ItemGame);
#endinitclip
}
movieClip 183 mcIceCream30 {
#initclip
Object.registerClass('mcIceCream30', src.game.ItemGame);
#endinitclip
}
movieClip 186 mcPizza30 {
#initclip
Object.registerClass('mcPizza30', src.game.ItemGame);
#endinitclip
}
movieClip 189 mcSandwich30 {
#initclip
Object.registerClass('mcSandwich30', src.game.ItemGame);
#endinitclip
}
movieClip 192 mcWrench30 {
#initclip
Object.registerClass('mcWrench30', src.game.ItemGame);
#endinitclip
}
movieClip 195 mcBrick60 {
#initclip
Object.registerClass('mcBrick60', src.game.ItemUI);
#endinitclip
}
movieClip 198 mcBuzzCola60 {
#initclip
Object.registerClass('mcBuzzCola60', src.game.ItemUI);
#endinitclip
}
movieClip 201 mcChocoBar60 {
#initclip
Object.registerClass('mcChocoBar60', src.game.ItemUI);
#endinitclip
}
movieClip 204 mcCookie60 {
#initclip
Object.registerClass('mcCookie60', src.game.ItemUI);
#endinitclip
}
movieClip 207 mcIceCream60 {
#initclip
Object.registerClass('mcIceCream60', src.game.ItemUI);
#endinitclip
}
movieClip 210 mcPizza60 {
#initclip
Object.registerClass('mcPizza60', src.game.ItemUI);
#endinitclip
}
movieClip 213 mcSandwich60 {
#initclip
Object.registerClass('mcSandwich60', src.game.ItemUI);
#endinitclip
}
movieClip 216 mcWrench60 {
#initclip
Object.registerClass('mcWrench60', src.game.ItemUI);
#endinitclip
}
movieClip 247 a1_s1 {
#initclip
Object.registerClass('a1_s1', src.game.Path);
#endinitclip
frame 1 {
stop();
}
}
movieClip 296 b1_s1 {
#initclip
Object.registerClass('b1_s1', src.game.Path);
#endinitclip
frame 1 {
stop();
}
}
movieClip 345 c1_s1 {
#initclip
Object.registerClass('c1_s1', src.game.Path);
#endinitclip
frame 1 {
stop();
}
}
movieClip 394 d1_s1 {
#initclip
Object.registerClass('d1_s1', src.game.Path);
#endinitclip
frame 1 {
stop();
}
}
movieClip 443 e1_s1 {
#initclip
Object.registerClass('e1_s1', src.game.Path);
#endinitclip
frame 1 {
stop();
}
}
movieClip 492 f1_s1 {
#initclip
Object.registerClass('f1_s1', src.game.Path);
#endinitclip
frame 1 {
stop();
}
}
movieClip 541 h1_s1 {
#initclip
Object.registerClass('h1_s1', src.game.Path);
#endinitclip
frame 1 {
stop();
}
}
movieClip 557 mcBeginLevelPanel {
#initclip
Object.registerClass('mcBeginLevelPanel', src.game.hud.BeginLevelPanel);
#endinitclip
}
movieClip 559 {
}
movieClip 561 {
}
movieClip 564 {
}
movieClip 567 {
frame 1 {
stop();
}
}
movieClip 575 {
}
movieClip 577 {
}
movieClip 578 {
}
movieClip 579 mcBeginLevelPanel2 {
#initclip
Object.registerClass('mcBeginLevelPanel2', src.game.hud.BeginLevelPanel);
#endinitclip
}
movieClip 585 {
}
movieClip 586 mcEndLevelItem {
}
movieClip 591 mcEndLevelPanel {
#initclip
Object.registerClass('mcEndLevelPanel', src.game.hud.EndLevelPanel);
#endinitclip
}
movieClip 597 mcGameOverPanel {
#initclip
Object.registerClass('mcGameOverPanel', src.game.hud.GameOverPanel);
#endinitclip
}
movieClip 599 mcObjectsPanelContainer {
}
movieClip 602 {
}
movieClip 606 {
}
movieClip 607 objects {
#initclip
Object.registerClass('objects', src.game.hud.ObjectsPanel);
#endinitclip
}
movieClip 610 {
}
movieClip 613 points {
#initclip
Object.registerClass('points', src.game.hud.PointsPanel);
#endinitclip
}
movieClip 615 {
}
movieClip 616 {
}
movieClip 617 mcCloudAnim {
frame 120 {
stop();
}
}
movieClip 621 {
}
movieClip 622 mcYouCrashed {
frame 24 {
_global.onYouCrashedComplete();
stop();
}
}
movieClip 729 fast1 {
frame 55 {
_global.twitchAnimComplete(false);
stop();
}
}
movieClip 826 fast2 {
frame 49 {
_global.twitchAnimComplete(false);
stop();
}
}
movieClip 917 fast3 {
frame 47 {
_global.twitchAnimComplete(false);
stop();
}
}
movieClip 1007 fast4 {
frame 44 {
_global.twitchAnimComplete(false);
stop();
}
}
movieClip 1102 slow1 {
frame 55 {
_global.twitchAnimComplete(false);
stop();
}
}
movieClip 1207 slow2 {
frame 55 {
_global.twitchAnimComplete(false);
stop();
}
}
movieClip 1316 slow3 {
frame 54 {
_global.twitchAnimComplete(false);
stop();
}
}
movieClip 1487 slow4 {
frame 85 {
_global.twitchAnimComplete(false);
stop();
}
}
movieClip 1590 twitchGood {
frame 51 {
_global.twitchAnimComplete(true);
}
}
movieClip 1597 crash1 {
frame 1 {
stop();
}
frame 71 {
_global.onCrashSequenceComplete();
stop();
}
}
movieClip 1602 crash2 {
frame 80 {
stop();
_global.onCrashSequenceComplete();
}
}
movieClip 1606 crash3 {
frame 1 {
stop();
}
frame 64 {
_global.onCrashSequenceComplete();
stop();
}
}
movieClip 1611 crash4 {
frame 1 {
stop();
}
frame 79 {
_global.onCrashSequenceComplete();
stop();
}
}
movieClip 1614 crash5 {
frame 59 {
_global.onCrashSequenceComplete();
stop();
}
}
movieClip 1615 {
frame 1 {
stop();
}
}
movieClip 1621 {
frame 24 {
stop();
}
}
movieClip 1631 {
frame 1 {
stop();
}
}
movieClip 1637 {
frame 1 {
stop();
}
}
movieClip 1643 {
frame 1 {
stop();
}
}
movieClip 1647 {
frame 1 {
stop();
}
}
movieClip 1648 intro {
#initclip
Object.registerClass('intro', src.home.HomeNav);
#endinitclip
frame 11 {
mcPlayGameBtn.txtLabel.text = _parent.mcNav._playBtnLbl;
mcPlayGameBtn.txtLabel.setTextFormat(_parent.mcNav._btnFormat);
}
frame 12 {
mcInstructionsBtn.txtLabel.text = _parent.mcNav._instructionsBtnLbl;
mcInstructionsBtn.txtLabel.setTextFormat(_parent.mcNav._btnFormat);
}
frame 13 {
mcOfficialSiteBtn.txtLabel.text = _parent.mcNav._officialSiteBtnLbl;
mcOfficialSiteBtn.txtLabel.setTextFormat(_parent.mcNav._btnFormat);
}
frame 14 {
mcPimpBtn.txtLabel.text = _parent.mcNav._pimpBtnLbl;
mcPimpBtn.txtLabel.setTextFormat(_parent.mcNav._btnFormat);
}
frame 30 {
_parent.mcNav.init();
stop();
}
}
movieClip 1650 {
}
movieClip 1652 {
}
movieClip 1654 {
}
movieClip 1656 {
}
movieClip 1658 {
}
movieClip 1660 {
}
movieClip 1661 {
}
movieClip 1663 {
}
movieClip 1666 {
}
movieClip 1674 {
}
movieClip 1677 {
}
movieClip 1680 {
}
movieClip 1681 {
}
movieClip 1682 {
}
movieClip 1685 {
}
movieClip 1697 {
frame 1 {
stop();
}
}
movieClip 1700 {
}
movieClip 1705 {
}
movieClip 1709 {
}
movieClip 1712 {
}
movieClip 1727 {
frame 1 {
var tf = new TextFormat();
tf.leading = 2;
tf.letterSpacing = 1;
if (_parent._parent._parent.pointsText !== undefined) {
txtPoints.text = '5 ' + _parent._parent._parent.pointsText;
}
txtPoints.setTextFormat(tf);
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 2 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 3 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 4 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 5 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 6 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 7 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 8 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 10 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 11 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 13 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 15 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 16 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 17 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 18 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 20 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 22 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 23 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 25 {
txtBonusHeader.text = _parent._parent._parent.bonusHeader;
txtBonusHeader.setTextFormat(tf);
}
frame 30 {
if (_parent._parent._parent.pointsText !== undefined) {
txtPoints.text = '5 ' + _parent._parent._parent.pointsText;
txtPoints.setTextFormat(tf);
}
txtObjectiveHeader.text = _parent._parent._parent.objectiveHeader;
txtObjectiveHeader.setTextFormat(tf);
}
}
movieClip 1728 {
frame 1 {
}
}
movieClip 1729 {
}
movieClip 1730 instruction {
#initclip
Object.registerClass('instruction', src.home.Instructions);
#endinitclip
frame 1 {
stop();
}
frame 9 {
stop();
trace('BONUS: ' + this.bonusHeader);
trace('OBJ: ' + this.objectiveHeader);
trace('POINTS: ' + this.pointsText);
}
frame 20 {
stop();
}
}
movieClip 1745 {
frame 1 {
stop();
}
}
movieClip 1746 {
}
movieClip 1747 mcPimp {
#initclip
Object.registerClass('mcPimp', src.home.Pimp);
#endinitclip
frame 1 {
mask_btn.useHandCursor = false;
}
frame 1 {
stop();
}
frame 9 {
stop();
}
frame 20 {
stop();
}
}
movieClip 1749 Home_mc {
#initclip
Object.registerClass('Home_mc', src.home.Home);
#endinitclip
frame 1 {
}
frame 25 {
stop();
}
}
movieClip 1754 {
}
movieClip 1755 {
}
movieClip 1756 {
frame 1 {
stop();
this.onMouseDown = function () {
play();
};
}
}
movieClip 1759 {
}
movieClip 1775 {
}
movieClip 1805 {
frame 15 {
stop();
}
}
movieClip 1806 mcCrowd {
#initclip
Object.registerClass('mcCrowd', src.game.Crowd);
#endinitclip
frame 1 {
stop();
}
}
movieClip 1815 {
}
movieClip 1816 level_highscores {
#initclip
Object.registerClass('level_highscores', src.game.hud.GameCompletePanel);
#endinitclip
}
movieClip 1822 {
}
movieClip 1825 {
}
movieClip 1827 {
}
movieClip 1829 {
}
movieClip 1830 {
}
movieClip 1834 twitch_back {
#initclip
Object.registerClass('twitch_back', src.game.TwitchGame);
#endinitclip
}
movieClip 1839 {
}
movieClip 1843 {
}
movieClip 1847 speed {
#initclip
Object.registerClass('speed', src.game.hud.SpeedMeter);
#endinitclip
}
movieClip 1854 {
}
movieClip 1857 lives2 {
#initclip
Object.registerClass('lives2', src.game.hud.LivesMeter);
#endinitclip
}
movieClip 1859 {
}
movieClip 1861 {
}
movieClip 1866 {
}
movieClip 1867 time {
#initclip
Object.registerClass('time', src.game.hud.TimeMeter);
#endinitclip
}
movieClip 1870 {
}
movieClip 1877 {
frame 1 {
stop();
}
}
movieClip 1879 {
}
movieClip 1880 {
frame 1 {
var game = new src.game.Engine(this, _global.user);
_global.twitchAnimComplete = function (success) {
trace('ROOT TWITCH ANIM COMPLETE: ' + success);
game.onTwitchAnimComplete(success);
};
_global.onCrashSequenceComplete = function () {
trace('ROOT CRASH MOVIE DONE');
game.onCrashComplete();
};
_global.onYouCrashedComplete = function () {
game.onYouCrashedComplete();
};
stop();
}
}