Frame 1
stop();
Stage.showMenu = false;
MochiAd.showPreGameAd({id:"3ac7c3705836b0e2", res:"750x577", background:12838558, color:13308948, outline:5213198, no_bg:true});
Frame 3
var contentXML = new XML();
contentXML.ignoreWhite = true;
contentXML.load("http://www.eyegas.com/sproutifarts/sproutifarts.xml");
contentXML.onLoad = function (success) {
if (success) {
gotoAndStop ("setup");
} else {
gotoAndStop ("error");
}
};
stop();
Instance of Symbol 102 MovieClip [splat] in Frame 3
onClipEvent (load) {
stop();
}
Instance of Symbol 132 MovieClip [fartBonus] in Frame 3
onClipEvent (load) {
stop();
}
Frame 13
stop();
Frame 19
stop();
_global.mySproutifartsHandler = new SproutifartsHandler(this, contentXML);
Frame 41
trace("HERE!!!!!");
Symbol 528 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 529 MovieClip [__Packages.SproutifartsHandler] Frame 0
class SproutifartsHandler
{
var target_mc, mainXML, soundOn, allSound, mySharedObject, highScore;
function SproutifartsHandler (tg, xm) {
trace("New SproutifartsHandler");
target_mc = tg;
mainXML = xm;
soundOn = true;
_global.sounds = new SoundHandler(target_mc);
_global.sounds.setupSound("fart1", 100);
_global.sounds.setupSound("fart2", 100);
_global.sounds.setupSound("fart3", 100);
_global.sounds.setupSound("fart4", 100);
_global.sounds.setupSound("fart5", 100);
_global.sounds.setupSound("fart6", 100);
_global.sounds.setupSound("fart7", 100);
_global.sounds.setupSound("fart8", 100);
_global.sounds.setupSound("fart9", 100);
_global.sounds.setupSound("fart10", 100);
_global.sounds.setupSound("fart11", 100);
_global.sounds.setupSound("thud", 100);
_global.sounds.setupSound("eat1", 40);
_global.sounds.setupSound("eat2", 40);
_global.sounds.setupSound("chime", 100);
_global.sounds.setupSound("sting", 80);
_global.sounds.setupSound("SproutifartsTheme", 100);
allSound = new Sound();
setupSoundButton();
mySharedObject = SharedObject.getLocal("sproutifartsData");
highScore = mySharedObject.data.highScore;
trace("highScore :- " + highScore);
if (highScore == undefined) {
highScore = 0;
trace("setting highScore :- " + highScore);
mySharedObject.data.highScore = highScore;
}
mySharedObject.flush();
setupIntro();
target_mc.score_tf.text = 0;
}
function setupIntro() {
_global.sounds.playSound("SproutifartsTheme", 999);
target_mc.gotoAndStop("go");
target_mc.start_btn.onRelease = mx.utils.Proxy.create(this, startGame);
target_mc.hiScore_tf.text = "Your High Score: " + highScore;
}
function startGame() {
trace("startGame");
_global.sounds.fadeSound("SproutifartsTheme", "out", "1");
_global.mySproutifartGame = new SproutifartGame(target_mc, mainXML, this);
}
function gameFinished(score, who, how) {
trace("gameFinished");
target_mc.gotoAndStop("gameOver");
_global.mySproutifartGame.die();
target_mc.playAgain_btn.onRelease = mx.utils.Proxy.create(this, setupIntro);
var _local7;
var _local3;
trace("who :- " + who.getName());
if (how == "hunger") {
if (who.getPersonCode() == 4) {
_local3 = "cried because he got too hungry";
} else {
_local3 = "died of hunger";
}
} else if (how == "fart") {
if (who.getPersonCode() == 4) {
_local3 = "had a nappy explosion";
} else {
_local3 = "exploded";
}
}
target_mc.feedback_tf.text = ((("Whoops! Poor " + who.getName()) + " ") + _local3) + " and it's all your fault.";
if (score > highScore) {
trace("NEW HIGH SCORE!");
highScore = score;
mySharedObject.data.highScore = score;
trace("mySharedObject.data.highScore :- " + mySharedObject.data.highScore);
mySharedObject.flush();
target_mc.newHighScore_mc._visible = true;
target_mc.newHighScore_mc.scaleTo(0, 0);
target_mc.newHighScore_mc.scaleTo(100, 0.5, "easeOutBack", 1);
_global.sounds.playSound("chime", false, 1);
} else {
target_mc.newHighScore_mc._visible = false;
}
}
function setupSoundButton() {
target_mc.sound_mc.sound_btn.onRelease = mx.utils.Proxy.create(this, pressSound);
}
function pressSound() {
if (soundOn) {
target_mc.sound_mc.gotoAndStop("on");
allSound.setVolume(0);
soundOn = false;
} else {
target_mc.sound_mc.gotoAndStop("off");
allSound.setVolume(100);
soundOn = true;
}
target_mc.sound_mc.sound_btn.onRelease = mx.utils.Proxy.create(this, pressSound);
}
}
Symbol 530 MovieClip [__Packages.SoundHandler] Frame 0
class SoundHandler
{
var pauseLength, target_mc, currentSounds, toPlayQueue, nowPlaying, pauseInt;
function SoundHandler (tg) {
trace("NEW SOUNDS HANDLER ");
pauseLength = 40;
target_mc = tg;
currentSounds = new Array();
toPlayQueue = new Array();
target_mc.createEmptyMovieClip("soundClip_mc", target_mc.getNextHighestDepth());
nowPlaying = undefined;
}
function setupSound(linkage, vol) {
trace("Setup sound " + linkage);
if (vol == undefined) {
vol = 100;
}
currentSounds.push(new com.eyegas.SoundObj(target_mc.soundClip_mc, linkage, vol, this));
}
function playSound(sndId, queue, delay) {
var _local3 = 0;
while (_local3 < currentSounds.length) {
var _local4;
if (currentSounds[_local3].getName() == sndId) {
_local4 = _local3;
break;
}
_local3++;
}
if (queue && (nowPlaying != undefined)) {
toPlayQueue.push(currentSounds[_local4]);
} else {
clearQueue();
if (delay != undefined) {
pauseInt = setInterval(mx.utils.Proxy.create(this, playDelayedSound, _local4), delay * 1000);
} else {
currentSounds[_local4].playSound();
nowPlaying = currentSounds[_local4];
}
}
_root.footerText = nowPlaying.getCopy();
}
function stopSound(sndId) {
trace("***********");
trace("stop Sound");
trace("sndId :- " + sndId);
var _local2 = 0;
while (_local2 < currentSounds.length) {
var _local3;
if (currentSounds[_local2].getName() == sndId) {
_local3 = _local2;
break;
}
_local2++;
}
currentSounds[_local3].stopSound();
trace("currentSounds [n].getName () :- " + currentSounds[_local3].getName());
}
function fadeSound(sndId, inOrOut, fSp) {
trace("***********");
trace("fade Sound");
trace("sndId :- " + sndId);
var _local2 = 0;
while (_local2 < currentSounds.length) {
var _local3;
if (currentSounds[_local2].getName() == sndId) {
_local3 = _local2;
break;
}
_local2++;
}
currentSounds[_local3].fade(inOrOut, fSp);
trace("currentSounds [n].getName () :- " + currentSounds[_local3].getName());
}
function playDelayedSound(which) {
clearInterval(pauseInt);
currentSounds[which].playSound();
nowPlaying = currentSounds[which];
}
function donePlaying() {
if (toPlayQueue.length > 0) {
nowPlaying = toPlayQueue.shift();
pauseInt = setInterval(mx.utils.Proxy.create(this, playNextInQueue), pauseLength);
} else {
nowPlaying = undefined;
}
}
function playNextInQueue() {
nowPlaying.playSound();
_root.footerText = nowPlaying.getCopy();
clearInterval(pauseInt);
}
function clearQueue() {
clearInterval(pauseInt);
toPlayQueue = [];
}
function stopAll() {
clearQueue();
nowPlaying.stopSound();
nowPlaying = undefined;
}
function clearSoundsArray() {
var _local2 = 0;
while (_local2 < currentSounds.length) {
currentSounds[_local2].die();
delete currentSounds[_local2];
_local2++;
}
currentSounds = [];
}
function currentlyPlaying() {
if (nowPlaying == undefined) {
return(false);
}
return(true);
}
function die() {
clearSoundsArray();
clearQueue();
clearInterval(pauseInt);
removeMovieClip(target_mc.soundClip_mc);
}
}
Symbol 531 MovieClip [__Packages.com.eyegas.SoundObj] Frame 0
class com.eyegas.SoundObj
{
var target_mc, soundID, parentObj, vol, thisSound, fadeInt;
function SoundObj (tarMC, sndId, v, po) {
target_mc = tarMC;
soundID = sndId;
parentObj = po;
vol = v;
target_mc.createEmptyMovieClip(sndId + "_mc", tarMC.getNextHighestDepth());
thisSound = new Sound(target_mc[sndId + "_mc"]);
thisSound.attachSound(sndId);
if ((vol != undefined) && (vol != "")) {
setVol(vol);
} else {
setVol(100);
}
}
function playSound(times) {
if ((times == undefined) || (times == "")) {
thisSound.start(0, 1);
thisSound.onSoundComplete = mx.utils.Proxy.create(this, donePlaying);
} else {
thisSound.start(0, times);
}
}
function donePlaying() {
parentObj.donePlaying();
}
function getName() {
return(soundID);
}
function stopSound() {
thisSound.stop();
}
function fade(inOrOut, fSp) {
if ((inOrOut != undefined) && (inOrOut != "")) {
if (inOrOut == "out") {
fadeInt = setInterval(mx.utils.Proxy.create(this, fader, fSp, true), 40);
} else if (inOrOut == "in") {
fadeInt = setInterval(mx.utils.Proxy.create(this, fader, fSp, false), 40);
}
} else {
fadeInt = setInterval(mx.utils.Proxy.create(this, fader, 1, true), 40);
}
}
function fader(fSp, out) {
if (out) {
thisSound.setVolume(thisSound.getVolume() - fSp);
if (thisSound.getVolume() <= 0) {
clearInterval(fadeInt);
trace("finished fade out");
thisSound.stop();
thisSound.setVolume(vol);
}
} else {
thisSound.setVolume(thisSound.getVolume() + fSp);
if (thisSound.getVolume() >= vol) {
clearInterval(fadeInt);
trace("finished fade in");
}
}
}
function setVol(lev) {
thisSound.setVolume(lev);
}
}
Symbol 532 MovieClip [__Packages.mx.utils.Proxy] Frame 0
class mx.utils.Proxy
{
function Proxy () {
}
static function create(oTarget, fFunction) {
var aParameters = new Array();
var _local2 = 2;
while (_local2 < arguments.length) {
aParameters[_local2 - 2] = arguments[_local2];
_local2++;
}
var _local4 = function () {
var _local2 = arguments.concat(aParameters);
fFunction.apply(oTarget, _local2);
};
return(_local4);
}
}
Symbol 533 MovieClip [__Packages.SproutifartGame] Frame 0
class SproutifartGame
{
var target_mc, mainXML, parentObj, bonusTitles, bonusPoints, scorePerSprout, people, currentSprouts, currentLevel, dead, sproutCount, score, numberOfPeople, newSproutSpeed, sproutMaxSize, sproutMinSize, sproutMinSpeed, sproutMaxSpeed, peopleInLevel, targetSprouts, newSproutInt, pauseInt;
function SproutifartGame (tg, xm, po) {
trace("New Sproutifarts");
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing);
target_mc = tg;
mainXML = xm;
parentObj = po;
bonusTitles = new Array();
bonusPoints = new Array();
scorePerSprout = 10;
bonusTitles = ["LONG-WINDED!", "RIPPER!", "MEGA-SORE-ARSE!"];
bonusPoints = [100, 200, 500];
people = new Array();
currentSprouts = new Array();
currentLevel = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(mainXML, "content/startlevel").attributes.level;
trace("currentLevel :- " + currentLevel);
dead = false;
sproutCount = 1;
score = 0;
numberOfPeople = 4;
setupGameScreen();
setupNewLevel();
}
function setupGameScreen() {
target_mc.createEmptyMovieClip("sproutHolder_mc", 5);
target_mc.createEmptyMovieClip("shadowHolder_mc", 4);
}
function startInfo() {
trace("startInfo");
target_mc.info_mc.play();
target_mc.info_mc.alphaTo(100, 0.5, "easeOutCubic");
target_mc.info_mc.start_btn.enabled = true;
}
function setupNewLevel() {
trace("");
trace("setupNewLevel");
if (currentLevel <= 6) {
target_mc.gotoAndStop("level" + currentLevel);
} else {
target_mc.gotoAndStop("level7");
}
target_mc.score_tf.text = score;
target_mc.info_mc.stop();
target_mc.info_mc._alpha = 0;
var _local9 = new com.mosesSupposes.fuse.Fuse({scale:0, y:220, ease:"easeOutCubic", seconds:0}, {scale:500, ease:"easeOutBack", seconds:0.5}, {delay:2}, {y:530, scale:100, ease:"easeInOutCubic", seconds:0.5}, {scope:this, func:"startInfo"});
_local9.__set__target(target_mc.level_mc);
_local9.start();
var _local8 = new com.mosesSupposes.fuse.Fuse({scale:0, x:375, y:320, ease:"easeOutCubic", seconds:0}, {scale:200, ease:"easeOutBack", seconds:0.5}, {delay:2}, {x:619, y:533, scale:100, ease:"easeInOutCubic", seconds:0.5});
_local8.__set__target(target_mc.targetText_mc);
_local8.start();
_global.sounds.playSound("chime", false);
newSproutSpeed = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(mainXML, ("content/levels/level[@number = '" + currentLevel) + "']/sprouts").attributes.newsproutspeed;
trace("newSproutSpeed :- " + newSproutSpeed);
sproutMaxSize = Number(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(mainXML, ("content/levels/level[@number = '" + currentLevel) + "']/sprouts").attributes.maxsize);
sproutMinSize = Number(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(mainXML, ("content/levels/level[@number = '" + currentLevel) + "']/sprouts").attributes.minsize);
sproutMinSpeed = Number(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(mainXML, ("content/levels/level[@number = '" + currentLevel) + "']/sprouts").attributes.minspeed);
sproutMaxSpeed = Number(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(mainXML, ("content/levels/level[@number = '" + currentLevel) + "']/sprouts").attributes.maxspeed);
peopleInLevel = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(mainXML, ("content/levels/level[@number = '" + currentLevel) + "']/people").childNodes.length;
var _local3 = 1;
while (_local3 <= peopleInLevel) {
people[_local3] = new Person(target_mc[("person" + _local3) + "_mc"], _local3, this);
var _local5 = Number(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(mainXML, ((("content/levels/level[@number = '" + currentLevel) + "']/people/person[@number = '") + _local3) + "']").attributes.hungerperframe);
var _local4 = Number(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(mainXML, ((("content/levels/level[@number = '" + currentLevel) + "']/people/person[@number = '") + _local3) + "']").attributes.hungeroffpersprout);
var _local7 = Number(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(mainXML, ((("content/levels/level[@number = '" + currentLevel) + "']/people/person[@number = '") + _local3) + "']").attributes.windpersprout);
var _local6 = Number(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(mainXML, ((("content/levels/level[@number = '" + currentLevel) + "']/people/person[@number = '") + _local3) + "']").attributes.fartspeed);
people[_local3].setHungerPerFrame(_local5);
people[_local3].setHungerOffPerSprout(_local4);
people[_local3].setWindPerSprout(_local7);
people[_local3].setFartSpeed(_local6);
_local3++;
}
targetSprouts = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(mainXML, ("content/levels/level[@number = '" + currentLevel) + "']").attributes.targetsprouts;
target_mc.info_mc.start_btn.onRelease = mx.utils.Proxy.create(this, startLevel);
target_mc.info_mc.start_btn.enabled = false;
target_mc.level_mc.level_tf.text = "Level " + currentLevel;
if (currentLevel < 11) {
target_mc.targetText_mc.target_tf.text = ("Target: feed " + targetSprouts) + " sprouts.";
} else {
target_mc.targetText_mc.target_tf.text = "Target: TO THE DEATH!";
}
}
function startLevel() {
target_mc.info_mc.start_btn.enabled = false;
target_mc.info_mc.alphaTo(0, 0.5, "easeOutCubic");
startSprouts(true);
}
function startSprouts(tf) {
trace("startSprouts " + tf);
if (tf) {
newSprout();
newSproutInt = setInterval(mx.utils.Proxy.create(this, newSprout), newSproutSpeed * 1000);
var _local2 = 1;
while (_local2 <= peopleInLevel) {
people[_local2].startHunger(true);
people[_local2].enableFartButton(true);
_local2++;
}
} else {
clearInterval(newSproutInt);
}
}
function newSprout() {
var _local3 = getRand(sproutMinSize, sproutMaxSize);
var _local2 = getRand(sproutMinSpeed, sproutMaxSpeed);
currentSprouts.push(new Sprout(target_mc, sproutCount, this, _local3, _local2));
sproutCount++;
}
function hitTestSprout(sprout) {
var _local13 = false;
var _local2 = 1;
while (_local2 <= numberOfPeople) {
var _local7 = people[_local2].getMouthClip();
if (_local7.hitTest(_xmouse, _ymouse, true)) {
_local13 = true;
sprout.getEaten();
var _local3 = getPercentage(sproutMinSize - 20, sproutMaxSize, sprout.getSize());
var _local4 = getPercentage(sproutMinSpeed, sproutMaxSpeed + 2, sprout.getSpeed());
trace("");
trace("sizePercentage :- " + _local3);
trace("speedPercentage :- " + _local4);
people[_local2].eatSprout(_local3, _local4);
addScore(scorePerSprout);
targetSprouts--;
trace("targetSprouts :- " + targetSprouts);
if (targetSprouts > 1) {
target_mc.targetText_mc.target_tf.text = ("Target: feed " + targetSprouts) + " sprouts.";
} else if (targetSprouts == 1) {
target_mc.targetText_mc.target_tf.text = ("Target: feed " + targetSprouts) + " sprout.";
} else if (targetSprouts == 0) {
target_mc.targetText_mc.target_tf.text = "Level complete!";
endLevel();
var _local5 = new com.mosesSupposes.fuse.Fuse({x:600, scale:180, ease:"easeOutBack", seconds:0.5}, {delay:1});
_local5.__set__target(target_mc.targetText_mc);
_local5.start();
}
}
_local2++;
}
if (!_local13) {
sprout.getDropped();
}
}
function endLevel() {
trace("end level");
_global.sounds.playSound("sting", false);
startSprouts(false);
var _local4 = 0;
while (_local4 < currentSprouts.length) {
currentSprouts[_local4].fadeSprout();
_local4++;
}
var _local3 = 1;
while (_local3 <= numberOfPeople) {
people[_local3].enableFartButton(false);
people[_local3].startHunger(false);
people[_local3].die();
delete people[_local3];
_local3++;
}
people = [];
currentLevel++;
pauseInt = setInterval(mx.utils.Proxy.create(this, clearStage), 4000);
}
function clearStage() {
clearInterval(pauseInt);
target_mc.gotoAndStop("clear");
setupNewLevel();
}
function addScore(howMuch) {
score = score + howMuch;
trace("score :- " + score);
target_mc.score_tf.text = score;
}
function death(who, how) {
if (!dead) {
dead = true;
trace((("Death " + who.getPersonCode()) + " ") + how);
startSprouts(false);
var _local2 = 1;
while (_local2 <= numberOfPeople) {
people[_local2].enableFartButton(false);
people[_local2].startHunger(false);
people[_local2].die();
_local2++;
}
stopDrag();
var _local3 = 0;
while (_local3 < currentSprouts.length) {
currentSprouts[_local3].startMoving(false);
_local3++;
}
if (how == "hunger") {
who.hungerMeter.sirenFlash();
pauseInt = setInterval(mx.utils.Proxy.create(this, doDeathAnim, who, how), 1800);
} else if (how == "fart") {
who.fartMeter.sirenFlash();
doDeathAnim(who, how);
}
}
}
function doDeathAnim(who, how) {
clearInterval(pauseInt);
if (how == "hunger") {
who.hungerDeath();
pauseInt = setInterval(mx.utils.Proxy.create(this, allDone, who, how), 3000);
} else if (how == "fart") {
who.fartDeath();
pauseInt = setInterval(mx.utils.Proxy.create(this, allDone, who, how), 5000);
}
}
function doSplat(where) {
trace("doSplat");
target_mc.attachMovie("splat", "splat_mc", target_mc.getNextHighestDepth());
target_mc.splat_mc._x = where;
target_mc.splat_mc._y = 275;
}
function allDone(who, how) {
trace("allDone");
clearInterval(pauseInt);
parentObj.gameFinished(score, who, how);
}
function getLevel() {
return(currentLevel);
}
function getBonusText(which) {
return(bonusTitles[which - 1]);
}
function getBonusPoints(which) {
return(bonusPoints[which - 1]);
}
function sproutDrag(sprout_mc) {
var _local2 = 1;
while (_local2 <= numberOfPeople) {
var _local3 = people[_local2].getMouthClip();
if (_local3.hitTest(_xmouse, _ymouse, true)) {
people[_local2].sproutOverMouth(true);
} else {
people[_local2].sproutOverMouth(false);
}
_local2++;
}
}
function sproutDead(which) {
var _local4;
var _local2 = 0;
while (_local2 < currentSprouts.length) {
var _local3 = currentSprouts[_local2];
if (_local3 == which) {
_local4 = _local2;
}
_local2++;
}
currentSprouts.splice(_local4, 1);
trace("currentSprouts :- " + currentSprouts);
}
function getPercentage(minimumValue, maximumValue, what) {
return(((what - minimumValue) / (maximumValue - minimumValue)) * 100);
}
function getRand(low, high) {
return(Math.floor(Math.random() * (high - (low - 1))) + low);
}
function die() {
clearInterval(newSproutInt);
clearInterval(pauseInt);
removeMovieClip(target_mc.splat_mc);
var _local3 = 0;
while (_local3 < currentSprouts.length) {
currentSprouts[_local3].fadeSprout();
_local3++;
}
var _local2 = 1;
while (_local2 <= numberOfPeople) {
people[_local2].die();
_local2++;
}
}
}
Symbol 534 MovieClip [__Packages.com.mosesSupposes.fuse.FuseKitCommon] Frame 0
class com.mosesSupposes.fuse.FuseKitCommon
{
static var logOutput;
function FuseKitCommon () {
}
static function _cts() {
return("|_tint|_tintPercent|_brightness|_brightOffset|_contrast|_invertColor|_colorReset|_colorTransform|");
}
static function _resetTo100() {
return("|_alpha|_contrast|_invertColor|_tintPercent|_xscale|_yscale|_scale|");
}
static function _resetTo0() {
return("|_brightness|_brightOffset|_colorReset|_rotation|");
}
static function _underscoreable() {
return(_cts() + "_frame|_x|_y|_xscale|_yscale|_scale|_width|_height|_size|_rotation|_alpha|_fade|_visible|");
}
static function _cbprops() {
return("|skipLevel|cycles|roundResults|extra1|extra2|func|scope|args|startfunc|startscope|startargs|updfunc|updscope|updargs|");
}
static function _fuseEvents() {
return("|onStart|onStop|onPause|onResume|onAdvance|onComplete|");
}
static function _fuseprops() {
return("|command|label|delay|event|eventparams|target|addTarget|trigger|startAt|ease|easing|seconds|duration|time|");
}
static function _validateFuseCommand(c, inGroup, hasArg, outputLevel, simple) {
var _local1 = false;
var _local2 = false;
switch (c) {
case "start" :
case "stop" :
case "pause" :
case "resume" :
case "setStartProps" :
if (inGroup != true) {
_local1 = true;
}
break;
case "delay" :
case "trigger" :
if (simple == true) {
if (hasArg == true) {
_local1 = true;
}
} else {
_local2 = true;
}
inGroup = false;
break;
case "skipTo" :
if (!((hasArg == true) && (inGroup != true))) {
break;
}
_local1 = true;
}
if ((outputLevel > 0) && (_local1 == false)) {
error("109", c, inGroup, _local2);
}
return(_local1);
}
static function output(s) {
if (typeof(logOutput) == "function") {
logOutput(s);
} else {
trace(s);
}
}
static function error(errorCode) {
var _local3 = arguments[1];
var _local4 = arguments[2];
var _local6 = arguments[3];
if (VERBOSE != true) {
output(("[FuseKitCommon#" + errorCode) + "]");
return(undefined);
}
var _local2 = "";
var _local5 = newline;
switch (errorCode) {
case "001" :
_local2 = _local2 + "** ERROR: When using simpleSetup to extend prototypes, you must pass the Shortcuts class. **";
_local2 = _local2 + (_local5 + " import com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + " ZigoEngine.simpleSetup(Shortcuts);") + _local5);
break;
case "002" :
_local2 = _local2 + "** ZigoEngine.doShortcut: shortcuts missing. Use the setup commands: import com.mosesSupposes.fuse.*; ZigoEngine.register(Shortcuts); **";
break;
case "003" :
_local2 = _local2 + ((_local5 + "*** Error: DO NOT use #include \"lmc_tween.as\" with this version of ZigoEngine! ***") + _local5);
break;
case "004" :
_local2 = _local2 + (("** ZigoEngine.doTween - too few arguments [" + _local3) + "].");
if (Boolean(_local4) == true) {
_local2 = _local2 + " If you are trying to use Object Syntax without Fuse, pass FuseItem in your register() or simpleSetup() call. **";
} else {
_local2 = _local2 + " Object syntax call failed. **";
}
break;
case "005" :
_local2 = _local2 + (((("** ZigoEngine.doTween - missing targets[" + _local3) + "] and/or props[") + _local4) + "] **");
break;
case "006" :
_local2 = _local2 + (("** Error: easing shortcut string not recognized (\"" + _local3) + "\"). You may need to pass the in PennerEasing class during register or simpleSetup. **");
break;
case "007" :
_local2 = _local2 + (((("- ZigoEngine: Target locked [" + _local3) + "], ignoring tween call [") + _local4) + "]");
break;
case "008" :
_local2 = _local2 + "** You must register the Shortcuts class in order to use easy string-type callback parsing. **";
break;
case "009" :
_local2 = _local2 + (("** ZigoEngine: A callback parameter \"" + _local3) + "\" was not recognized. **");
break;
case "010" :
_local2 = _local2 + ((((("** " + ((_local3 == true) ? "ZigoEngine" : "FuseItem")) + " unable to parse ") + ((_local4 == 1) ? "callback[" : (String(_local4) + " callbacks["))) + _local6) + "]. Try using the syntax {scope:this, func:\"myFunction\"} **");
break;
case "011" :
_local2 = _local2 + (((("- ZigoEngine: Callbacks discarded via skipLevel 2 option [" + _local3) + "|") + _local4) + "].");
break;
case "012" :
_local2 = _local2 + (((((("- Engine set props or ignored no-change tween on: " + _local3) + ", props passed:[") + _local4) + "], endvals passed:[") + _local6) + "]");
break;
case "013" :
_local2 = _local2 + (((((("- Engine added tween on:\n\ttargets:[" + _local3) + "]\n\tprops:[") + _local4) + "]\n\tendvals:[") + _local6) + "]");
break;
case "014" :
_local2 = _local2 + "** Error: easing function passed is not usable with this engine. Functions need to follow the Robert Penner model. **";
break;
case "015" :
_local2 = _local2 + "** Error: The CustomEasing class must be passed during setup (register or simpleSetup) to use custom easing Arrays. **";
break;
case "016" :
_local2 = _local2 + (("[ ZigoEngine.TIME_MULTIPLIER: " + String(Number(Number(_local3) * 100))) + "% ]");
break;
case "101" :
_local2 = _local2 + "** ERROR: Fuse simpleSetup was removed in version 2.0! **";
_local2 = _local2 + (_local5 + " You must now use the following commands:");
_local2 = _local2 + ((_local5 + _local5) + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + (_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);");
_local2 = _local2 + ((_local5 + "Note that PennerEasing is optional, and FuseFMP is also accepted. (FuseFMP.simpleSetup is run automatically if included.)") + _local5);
break;
case "102" :
_local2 = _local2 + (((("** Fuse " + _local3) + " index or label not found (") + _local4) + ") or out of range. **");
break;
case "103" :
_local2 = _local2 + (((("** Fuse skipTo (" + _local3) + ") ignored - targets the current index (") + _local4) + "). **");
break;
case "104" :
_local2 = _local2 + (("** Fuse fastForward index out of play range (" + _local3) + ") - skipTo has been called instead. **");
break;
case "105" :
_local2 = _local2 + "** An unsupported Array method was called on Fuse. **";
break;
case "106" :
_local2 = _local2 + "** ERROR: You have not set up Fuse correctly. **";
_local2 = _local2 + (_local5 + "You must now use the following commands (PennerEasing is optional).");
_local2 = _local2 + (_local5 + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);") + _local5);
break;
case "107" :
_local2 = _local2 + "** Fuse :: id not found - Aborting open(). **";
break;
case "108" :
_local2 = _local2 + "** Fuse.startRecent: No recent Fuse found to start! **";
break;
case "109" :
_local2 = _local2 + (("** Command \"" + _local3) + "\" discarded. ");
if (_local4 == true) {
_local2 = _local2 + "Not allowed within a group. **";
} else if (_local6 == true) {
_local2 = _local2 + (("Not supported in Object Syntax, use the " + _local3) + " property instead. **");
} else {
_local2 = _local2 + "The command may be unrecognized or missing an argument. **";
}
break;
case "110" :
_local2 = _local2 + (((("** " + _local3) + " illegal Fuse property discarded:\"") + _local4) + "\". Bezier keywords other than x and y cannot be set as start values. **");
break;
case "112" :
_local2 = _local2 + "** Fuse: missing com.mosesSupposes.fuse.ZigoEngine! Cannot tween. **";
break;
case "113" :
_local2 = _local2 + "** FuseItem: A callback has been discarded. Actions with a command may only contain: label, delay, scope, args. **";
break;
case "115" :
_local2 = _local2 + ((_local3 + " overlapping prop discarded: ") + _local4);
break;
case "116" :
_local2 = _local2 + ("** FuseItem Error: Delays within groups (arrays) and start/update callbacks are not supported when using Fuse without ZigoEngine. Although you need to restructure your Fuse, it should be possible to achieve the same results. **" + _local5);
break;
case "117" :
_local2 = _local2 + (("** " + _local3) + ": infinite cycles are not allowed within Fuses - discarded. **");
break;
case "118" :
_local2 = _local2 + ((("** " + _local3) + ": No targets found!") + ((_local4 == true) ? " [Unable to set start props] **" : " [Skipping tween parameters in this action] **"));
break;
case "119" :
_local2 = _local2 + ((((("** " + _local3) + ": ") + ((_local4 == 1) ? "" : (_local4 + " actions in the group"))) + " missing targets") + ((_local6 == true) ? " during setStartProps **" : " **"));
break;
case "120" :
_local2 = _local2 + (((("** " + _local3) + ": conflict with \"") + _local4) + "\". Property might be doubled within a grouped-action array. **");
break;
case "121" :
_local2 = _local2 + "** Fuse timecode formatting requires \"00:\" formatting (example:\"01:01:33\" yields 61.33 seconds.) **";
break;
case "122" :
_local2 = _local2 + (("** Event \"" + _local3) + "\" reserved by Fuse. **");
break;
case "123" :
_local2 = _local2 + (("** A Fuse event parameter failed in " + _local3) + " **");
break;
case "124" :
_local2 = _local2 + (((("** " + _local3) + ": trigger:") + _local4) + " ignored - only one trigger is allowed per action **");
break;
case "125" :
_local2 = _local2 + (_local3 + " Warning - fastForward hit an item during its tween cycle, may malfunction.");
break;
case "201" :
_local2 = _local2 + (("**** FuseFMP cannot initialize argument " + _local3) + " (BitmapFilters cannot be applied to this object type) ****");
break;
case "202" :
_local2 = _local2 + (((("** FuseFMP error: A " + _local3) + " could not be created for ") + _local4) + " **");
break;
case "203" :
_local2 = _local2 + (("** FuseFMP.setFilterProps - too few arguments passed (" + _local3) + ") - minimum 2 required. **");
break;
case "204" :
_local2 = _local2 + (("** FuseFMP.setFilterProps could not locate the filter passed. (" + _local3) + ") **");
}
output(_local2);
}
static function parseCallback(callback, targets, outputLevel, callerIsEngine, addprefix) {
if (callback._vcb == true) {
return(callback);
}
var validCBs = {_vcb:true, skipLevel:_global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL, cycles:1};
if (callback == undefined) {
return(validCBs);
}
var cbErrors = [];
if (typeof(callback) == "object") {
if (((callback.skipLevel != undefined) && (typeof(callback.skipLevel) == "number")) && (callback.skipLevel != _global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL)) {
if ((callback.skipLevel >= 0) && (callback.skipLevel <= 2)) {
validCBs.skipLevel = callback.skipLevel;
}
}
if (callback.cycles != undefined) {
if ((typeof(callback.cycles) == "number") && (callback.cycles > -1)) {
validCBs.cycles = callback.cycles;
} else if (callback.cycles.toUpperCase() == "LOOP") {
validCBs.cycles = 0;
}
}
if (callback.extra1 != undefined) {
validCBs.extra1 = callback.extra1;
}
if (callback.extra2 != undefined) {
validCBs.extra2 = callback.extra2;
}
if ((callback.roundResults === true) || (callback.roundResults === false)) {
validCBs.roundResults = callback.roundResults;
}
} else {
callback = {func:callback};
}
var prefixes = ["start", "upd", ""];
var easyfuncparse = _global.com.mosesSupposes.fuse.Shortcuts.parseStringTypeCallback;
for (var i in prefixes) {
var prefix = prefixes[i];
var fstr = callback[prefix + "func"];
if (((fstr != undefined) && (typeof(fstr) == "string")) && (fstr.indexOf("(") > -1)) {
if (easyfuncparse != undefined) {
var efc = easyfuncparse(fstr);
if (efc.func != undefined) {
callback[prefix + "scope"] = efc.scope;
callback[prefix + "func"] = efc.func;
callback[prefix + "args"] = efc.args;
}
} else if (outputLevel > 0) {
error("008");
}
}
}
var basescope = callback.scope;
for (var i in callback) {
var fi = i.toLowerCase().indexOf("func");
if (fi > -1) {
var prefix = i.slice(0, fi);
var func = callback[i];
var args = callback[prefix + "args"];
var scope = ((callback[prefix + "scope"] == undefined) ? (basescope) : (callback[prefix + "scope"]));
if ((typeof(func) == "string") && (scope[func] == undefined)) {
for (var j in targets) {
var targ = targets[j];
if (typeof(targ[func]) == "function") {
scope = targ;
break;
}
if (typeof(targ._parent[func]) == "function") {
scope = targ._parent;
break;
}
}
if ((scope == undefined) && (_level0[func] != undefined)) {
scope = _level0;
}
if ((scope == undefined) && (_global[func] != undefined)) {
scope = _global;
}
}
if (typeof(func) != "function") {
if (typeof(scope[String(func)]) == "function") {
func = scope[String(func)];
} else {
func = eval (String(func));
}
}
if (func == undefined) {
cbErrors.push(String((((((((addprefix == null) ? (i) : (addprefix + i)) + ":") + ((typeof(callback[i]) == "string") ? (("\"" + callback[i]) + "\"") : (callback[i]))) + "/") + prefix) + "scope:") + scope));
} else {
if ((args != undefined) && (!(args instanceof Array))) {
args = [args];
}
if (prefix == "") {
prefix = "end";
}
validCBs[prefix] = {s:scope, f:func, a:args};
if (callerIsEngine == true) {
validCBs[prefix].id = ++cbTicker;
}
if (prefix == "start") {
validCBs.start.fired = false;
}
}
} else if (_cbprops().indexOf(("|" + i) + "|") == -1) {
error("009", i);
}
}
if ((cbErrors.length > 0) && (outputLevel > 0)) {
if (outputLevel > 0) {
error("010", callerIsEngine, cbErrors.length, cbErrors.toString());
}
}
return(validCBs);
}
static var VERSION = "Fuse Kit 2.1.3r1 Copyright (c) 2006 Moses Gunesch, MosesSupposes.com under MIT Open Source License";
static var VERBOSE = true;
static var ALL = "ALL";
static var ALLCOLOR = "ALLCOLOR";
static var cbTicker = 0;
}
Symbol 535 MovieClip [__Packages.com.mosesSupposes.fuse.ZigoEngine] Frame 0
class com.mosesSupposes.fuse.ZigoEngine
{
static var extensions, updateTime, tweenHolder, instance, _listeners, broadcastMessage, updateIntId;
function ZigoEngine () {
}
static function addListener(handler) {
AsBroadcaster.initialize(com.mosesSupposes.fuse.ZigoEngine);
addListener(handler);
}
static function removeListener(handler) {
}
static function isPlaying() {
return(_playing);
}
static function simpleSetup(shortcutsClass) {
if (arguments.length > 0) {
register.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
}
_global.ZigoEngine = com.mosesSupposes.fuse.ZigoEngine;
if (extensions.fuse != undefined) {
_global.Fuse = extensions.fuse;
}
if (extensions.fuseFMP != undefined) {
extensions.fuseFMP.simpleSetup();
}
initialize(MovieClip.prototype, Button.prototype, TextField.prototype);
if (extensions.shortcuts == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("001");
}
}
static function register(classReference) {
if (extensions == undefined) {
extensions = {};
}
var _local3 = "|fuse|fuseItem|fuseFMP|shortcuts|pennerEasing|customEasing|";
for (var _local4 in arguments) {
var _local2 = arguments[_local4].registryKey;
if ((extensions[_local2] == undefined) && (_local3.indexOf(("|" + _local2) + "|") > -1)) {
extensions[_local2] = arguments[_local4];
if ((_local2 == "fuseFMP") || (_local2 == "shortcuts")) {
Object(extensions[_local2]).initialize();
}
}
}
}
static function initialize(target) {
if (arguments.length > 0) {
initializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.addShortcutsTo.apply(extensions.shortcuts, arguments);
}
}
}
static function deinitialize(target) {
if ((arguments.length == 0) || (target == null)) {
arguments.push(MovieClip.prototype, Button.prototype, TextField.prototype);
}
deinitializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.removeShortcutsFrom.apply(extensions.shortcuts, arguments);
}
}
static function getUpdateInterval() {
return(updateTime);
}
static function setUpdateInterval(time) {
if (_playing) {
setup(true);
updateTime = time;
setup();
} else {
updateTime = time;
}
}
static function getControllerDepth() {
return(tweenHolder.getDepth());
}
static function setControllerDepth(depth) {
if ((depth == null) || (_global.isNaN(depth) == true)) {
depth = 6789;
}
if (Object(tweenHolder).proof != null) {
tweenHolder.swapDepths(depth);
} else {
tweenHolder = _root.createEmptyMovieClip("ZigoEnginePulse", depth);
}
}
static function doShortcut(targets, methodName) {
if (extensions.shortcuts == undefined) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("002");
}
return(null);
}
return(extensions.shortcuts.doShortcut.apply(extensions.shortcuts, arguments));
}
static function doTween(targets, props, endvals, seconds, ease, delay, callback) {
if (extensions.fuse.addBuildItem(arguments) == true) {
return(null);
}
if (TIME_MULTIPLIER != prevTimeMult) {
TIME_MULTIPLIER = Math.abs(TIME_MULTIPLIER);
if (_global.isNaN(TIME_MULTIPLIER) == true) {
TIME_MULTIPLIER = 1;
}
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("016", TIME_MULTIPLIER);
}
prevTimeMult = TIME_MULTIPLIER;
}
if ((instance == undefined) || ((Object(tweenHolder).proof == undefined) && (updateTime == undefined))) {
if ((MovieClip.prototype.tween != null) && (typeof(_global.$tweenManager) == "object")) {
com.mosesSupposes.fuse.FuseKitCommon.error("003");
}
instance = new com.mosesSupposes.fuse.ZManager();
_playing = false;
}
var _local4 = instance.paramsObj(targets, props, endvals, true);
var _local7 = (((_local4.tg[0] == null) || (_local4.tg.length == 0)) ? undefined : (_local4.tg));
if (((_local4.pa == undefined) || (_local7 == undefined)) || (arguments.length < 3)) {
if (((extensions.fuseItem != null) && (arguments.length == 1)) && (typeof(arguments[0]) == "object")) {
return(extensions.fuseItem.doTween(arguments[0]));
}
if (OUTPUT_LEVEL > 0) {
if (arguments.length < 3) {
com.mosesSupposes.fuse.FuseKitCommon.error("004", (((arguments.length == 1) && (arguments[0] == null)) ? "1 (null)" : (String(arguments.length))), Boolean(extensions.fuseItem == null));
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("005", _local7.toString(), _local4.pa.toString());
}
}
return(null);
}
if (_playing != true) {
setup();
}
if ((seconds == null) || (_global.isNaN(seconds) == true)) {
seconds = DURATION || 1;
} else if (seconds < 0.01) {
seconds = 0;
}
seconds = seconds * TIME_MULTIPLIER;
if (((delay < 0.01) || (delay == null)) || (_global.isNaN(delay) == true)) {
delay = 0;
}
delay = delay * TIME_MULTIPLIER;
var _local12 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(callback, _local7, OUTPUT_LEVEL, true);
var _local9;
if (typeof(ease) == "function") {
if (typeof(Function(ease).call(null, 1, 1, 1, 1)) == "number") {
_local9 = Function(ease);
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("014", ease);
}
} else if ((ease == null) || (ease == "")) {
if (EASING instanceof Function) {
_local9 = Function(EASING);
} else if (extensions.pennerEasing != undefined) {
ease = EASING;
}
}
if ((typeof(ease) == "string") && (ease != "")) {
if (extensions.pennerEasing[ease] != undefined) {
_local9 = extensions.pennerEasing[ease];
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("006", ease);
}
} else if (ease instanceof Array) {
if (extensions.customEasing != undefined) {
_local12.extra1 = ease;
if (typeof(ease[0]) == "number") {
_local9 = extensions.customEasing.precalced;
} else {
_local9 = extensions.customEasing.fromCurve;
}
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("015", ease);
}
}
if (typeof(_local9) != "function") {
_local9 = function (t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
};
}
if (_listeners.length > 0) {
broadcastMessage.call(com.mosesSupposes.fuse.ZigoEngine, "onTweenAdd", _local7, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
}
var _local6 = "";
for (var _local13 in _local7) {
var _local3 = _local7[_local13];
if (_local3.__zigoID__ == null) {
initializeTargets(_local3);
} else if (instance.getStatus("locked", _local3) == true) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("007", ((_local3._name != undefined) ? (_local3._name) : (_local3.toString())), _local4.pa.toString());
}
continue;
}
var _local5 = instance.addTween(_local3, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
_local6 = ((_local5 == null) ? "|" : (_local5 + "|")) + _local6;
}
_local6 = _local6.slice(0, -1);
return((((_local6 == "") || (_local6 == "|")) ? null : (_local6)));
}
static function removeTween(targs, props) {
instance.removeTween(targs, props);
}
static function isTweening(targ, prop) {
return(Boolean(instance.getStatus("active", targ, prop)));
}
static function getTweens(targ) {
if (instance == undefined) {
return(0);
}
return(Number(instance.getStatus("count", targ)));
}
static function lockTween(targ, setLocked) {
instance.alterTweens("lock", targ, setLocked == true);
}
static function isTweenLocked(targ) {
return(Boolean(instance.getStatus("locked", targ)));
}
static function ffTween(targs, props, suppressEndEvents) {
instance.alterTweens("ff", targs, props, null, suppressEndEvents);
}
static function skipTweenTo(seconds, targs, props) {
instance.alterTweens("skipTo", targs, props, false, false, seconds);
}
static function rewTween(targs, props, pauseFlag, suppressStartEvents) {
instance.alterTweens("rewind", targs, props, pauseFlag, suppressStartEvents);
}
static function isTweenPaused(targ, prop) {
return(Boolean(instance.getStatus("paused", targ, prop)));
}
static function pauseTween(targs, props) {
instance.alterTweens("pause", targs, props);
}
static function unpauseTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function resumeTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function setColorByKey(targetObj, type, amt, rgb) {
new Color(targetObj).setTransform(getColorTransObj(type, amt, rgb));
}
static function getColorTransObj(type, amt, rgb) {
switch (type) {
case "brightness" :
var _local3 = 100 - Math.abs(amt);
var _local4 = ((amt > 0) ? (255 * (amt / 100)) : 0);
return({ra:_local3, rb:_local4, ga:_local3, gb:_local4, ba:_local3, bb:_local4});
case "brightOffset" :
return({ra:100, rb:255 * (amt / 100), ga:100, gb:255 * (amt / 100), ba:100, bb:255 * (amt / 100)});
case "contrast" :
return({ra:amt, rb:128 - (1.28 * amt), ga:amt, gb:128 - (1.28 * amt), ba:amt, bb:128 - (1.28 * amt)});
case "invertColor" :
return({ra:100 - (2 * amt), rb:amt * 2.55, ga:100 - (2 * amt), gb:amt * 2.55, ba:100 - (2 * amt), bb:amt * 2.55});
case "tint" :
if (rgb == null) {
break;
}
var _local5;
if (typeof(rgb) == "string") {
if (rgb.charAt(0) == "#") {
rgb = rgb.slice(1);
}
rgb = ((rgb.charAt(1).toLowerCase() != "x") ? ("0x" + rgb) : (rgb));
}
_local5 = Number(rgb);
return({ra:100 - amt, rb:(_local5 >> 16) * (amt / 100), ga:100 - amt, gb:((_local5 >> 8) & 255) * (amt / 100), ba:100 - amt, bb:(_local5 & 255) * (amt / 100)});
}
return({rb:0, ra:100, gb:0, ga:100, bb:0, ba:100});
}
static function getColorKeysObj(targOrTransObj) {
var _local1 = ((targOrTransObj.ra != undefined) ? (targOrTransObj) : (new Color(targOrTransObj).getTransform()));
var _local6 = (_local1.ra == _local1.ga) && (_local1.ga == _local1.ba);
var _local8 = (_local1.rb == _local1.gb) && (_local1.gb == _local1.bb);
var _local3 = {tintPercent:Number(((_local6 == true) ? (100 - _local1.ra) : 0))};
if (_local3.tintPercent != 0) {
var _local5 = 100 / _local3.tintPercent;
_local3.tint = (((_local1.rb * _local5) << 16) | ((_local1.gb * _local5) << 8)) | (_local1.bb * _local5);
var _local2 = _local3.tint.toString(16);
var _local4 = 6 - _local2.length;
while ((_local4--) > 0) {
_local2 = "0" + _local2;
}
_local3.tintString = "0x" + _local2.toUpperCase();
}
if ((_local6 == true) && (_local8 == true)) {
if (_local1.ra < 0) {
_local3.invertColor = _local1.rb * 0.392156862745098;
} else if ((_local1.ra == 100) && (_local1.rb != 0)) {
_local3.brightOffset = _local1.rb * 0.392156862745098;
}
if (_local1.ra != 100) {
if ((_local1.rb == 0) || ((_local1.rb != 0) && (((255 * ((100 - _local1.ra) / 100)) - _local1.rb) <= 1))) {
_local3.brightness = ((_local1.rb != 0) ? (100 - _local1.ra) : (_local1.ra - 100));
}
if (((128 - (1.28 * _local1.ra)) - _local1.rb) <= 1) {
_local3.contrast = _local1.ra;
}
}
}
return(_local3);
}
static function initializeTargets() {
for (var _local5 in arguments) {
var _local4 = arguments[_local5];
if ((((_local4 == MovieClip.prototype) || (_local4 == Button.prototype)) || (_local4 == TextField.prototype)) || (_local4 == Object.prototype)) {
if (_local4.oldAddListener == undefined) {
if (_local4 == TextField.prototype) {
_local4.oldAddListener = _local4.addListener;
_global.ASSetPropFlags(_local4, "oldAddListener", 7, 1);
}
_local4.addListener = function (o) {
if (this.__zigoID__ == undefined) {
com.mosesSupposes.fuse.ZigoEngine.initializeTargets(this);
}
if (this instanceof TextField) {
Function(this.oldAddListener).call(this, o);
} else {
this.addListener(o);
}
};
if (_local4 == MovieClip.prototype) {
_global.ASSetPropFlags(_local4, "addListener", 7, 1);
}
}
} else if (_local4.__zigoID__ == undefined) {
_local4.__zigoID__ = zigoIDs;
_global.ASSetPropFlags(_local4, "__zigoID__", 7, 1);
zigoIDs++;
if ((_local4._listeners == null) || (_local4.addListener == null)) {
AsBroadcaster.initialize(_local4);
}
}
}
}
static function deinitializeTargets() {
for (var _local4 in arguments) {
var _local3 = arguments[_local4];
if (_local3.__zigoID__ != undefined) {
_global.ASSetPropFlags(_local3, "__zigoID__,_listeners,broadcastMessage,addListener,removeListener", 0, 2);
delete _local3.__zigoID__;
delete _local3._listeners;
delete _local3.broadcastMessage;
delete _local3.addListener;
delete _local3.removeListener;
}
if (_local3.oldAddListener != undefined) {
_global.ASSetPropFlags(_local3, "oldAddListener", 0, 2);
_local3.addListener = _local3.oldAddListener;
delete _local3.oldAddListener;
}
}
}
static function __mgrRelay(inst, method, args) {
if (inst == instance) {
Function(com.mosesSupposes.fuse.ZigoEngine[method]).apply(com.mosesSupposes.fuse.ZigoEngine, args);
}
}
static function setup(deinitFlag) {
if (deinitFlag == true) {
_playing = false;
clearInterval(updateIntId);
delete tweenHolder.onEnterFrame;
return(undefined);
}
instance.cleanUp();
clearInterval(updateIntId);
delete updateIntId;
if ((updateTime != null) && (updateTime > 0)) {
updateIntId = setInterval(instance, "update", updateTime);
} else {
if (Object(tweenHolder).proof == null) {
setControllerDepth(6789);
Object(tweenHolder).proof = 1;
}
var _inst = instance;
tweenHolder.onEnterFrame = function () {
_inst.update.call(_inst);
};
}
_playing = true;
instance.now = getTimer();
}
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION + ", ZigoEngine based on concepts by L.Zigo";
static var EASING = "easeOutQuint";
static var DURATION = 1;
static var TIME_MULTIPLIER = 1;
static var ROUND_RESULTS = false;
static var OUTPUT_LEVEL = 1;
static var AUTOSTOP = false;
static var SKIP_LEVEL = 0;
static var _playing = false;
static var zigoIDs = 0;
static var prevTimeMult = 1;
}
Symbol 536 MovieClip [__Packages.com.mosesSupposes.fuse.ZManager] Frame 0
class com.mosesSupposes.fuse.ZManager
{
var tweens, now;
function ZManager () {
tweens = {};
numTweens = 0;
}
function addTween(obj, props, endvals, seconds, ease, delay, callback) {
var _local24 = ((callback.skipLevel == undefined) ? 0 : (callback.skipLevel));
var _local44 = ((callback.cycles == undefined) ? 1 : (callback.cycles));
var _local30 = callback.extra1;
var _local29 = callback.extra2;
var _local23 = [];
var _local14 = _global.com.mosesSupposes.fuse.FuseFMP;
var _local43 = String(("|" + _local14.getAllShortcuts().join("|")) + "|");
var _local42 = com.mosesSupposes.fuse.FuseKitCommon._cts();
var _local25 = "";
var _local28 = "";
var _local22 = obj.__zigoID__;
var _local7 = tweens[String(_local22)];
if ((_local7 != undefined) && (com.mosesSupposes.fuse.ZigoEngine.AUTOSTOP == true)) {
if (obj._listeners.length > 0) {
for (var _local40 in _local7.props) {
_local23.unshift(_local40);
}
}
_local7.numProps = 0;
cleanUp(true);
}
for (var _local47 in props) {
var _local5 = props[_local47];
var _local4 = endvals[_local47];
var _local15 = 0;
if (_local5 == "_fade") {
_local5 = "_alpha";
_local15 = ((_local4 < 50) ? -1 : 1);
}
var _local16 = _local42.indexOf(("|" + _local5) + "|") > -1;
var _local18 = _local7.colorProp;
if (_local7 != undefined) {
if ((_local16 == true) && (_local18 != undefined)) {
_local23.unshift(_local18);
delete _local7.props[_local18];
delete _local7.colorProp;
_local7.numProps--;
} else if (_local7.props[_local5] != undefined) {
_local23.unshift(_local5);
delete _local7[_local5];
_local7.numProps--;
}
}
var _local3 = {c:-1, fmp:-1, complex:-1};
var _local11 = ((_local24 == 0) && ((seconds + delay) == 0)) || ((_local24 > 0) && (seconds == 0));
var _local10 = false;
var _local13 = (_local14 != undefined) && (_local43.indexOf(("|" + _local5) + "|") > -1);
var _local19 = (_local5.toLowerCase().indexOf("colors") > -1) && (_local4 instanceof Array);
var _local27 = ((_local13 == true) && (_local5.indexOf("lor") > -1)) && (_local5.charAt(2) != "l");
if (_local13 == true) {
_local3.fmp = _local14;
_local3.ps = _local14.getFilterProp(obj, _local5, true);
_local3.special = true;
}
if (((_local16 == true) || (_local19 == true)) || (_local27 && (_local11 == false))) {
_local3.complex = 1;
if (_local16 == true) {
_local3.c = new Color(obj);
_local3.ps = Color(_local3.c).getTransform();
var _local17 = ((((_local5 == "_tint") || (_local5 == "_tintPercent")) || (_local5 == "_colorReset")) ? "tint" : (_local5.slice(1)));
var _local9 = null;
var _local12 = null;
if (_local5 != "_colorTransform") {
if (_local17 == "tint") {
if (typeof(_local4) == "object") {
_local12 = _local4.tint;
_local9 = ((_global.isNaN(_local4.percent) == true) ? 100 : (_local4.percent));
} else if ((_local5 == "_tintPercent") || (_local5 == "_colorReset")) {
var _local20 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tintPercent;
if (_local5 == "_colorReset") {
_local9 = Math.min(_local20, 100 - Math.abs(Number(_local4)));
} else {
_local9 = ((typeof(_local4) == "string") ? ((_local20 || 0) + Number(_local4)) : Number(_local4));
}
_local9 = Math.max(0, Math.min(_local9, 100));
_local12 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tint || 0;
} else {
_local12 = _local4;
_local9 = 100;
}
} else {
_local9 = ((typeof(_local4) == "string") ? ((com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj)[_local17] || 0) + Number(_local4)) : (_local4));
}
_local4 = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj(_local17, _local9, _local12);
}
if (_local11 == true) {
if (_local5 == "_colorTransform") {
Color(_local3.c).setTransform(_local4);
} else {
com.mosesSupposes.fuse.ZigoEngine.setColorByKey(obj, _local17, _local9, _local12);
}
} else {
var _local21 = getChangeObj(_local3.ps, _local4, false, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local11 == true) {
_local14.setFilterProp(obj, _local5, _local4);
} else if (_local19 == true) {
_local3.c = 2;
_local3.ch = [];
for (var _local40 in _local4) {
if (_local4[_local40] != null) {
if (_local3.ps == null) {
_local3.ps = [];
}
_local3.ps[_local40] = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, ((_local3.ps[_local40] == null) ? obj[_local5][_local40] : _local3.ps[_local40]));
var _local21 = getChangeObj(_local3.ps[_local40], com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4[_local40]), true, false);
_local3.ch[_local40] = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
}
} else {
_local3.c = 1;
_local3.ps = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local3.ps);
var _local21 = getChangeObj(_local3.ps, com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4), true, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local5 == "_bezier_") {
removeTween(obj, "_x,_y", true);
if (_local11 == true) {
if ((_local4.x != null) && (_global.isNaN(Number(_local4.x)) == false)) {
obj._x = ((typeof(_local4.x) == "string") ? (obj._x + Number(_local4.x)) : (_local4.x));
}
if ((_local4.y != null) && (_global.isNaN(Number(_local4.y)) == false)) {
obj._y = ((typeof(_local4.y) == "string") ? (obj._y + Number(_local4.y)) : (_local4.y));
}
} else {
_local3.special = true;
_local3.ps = 0;
_local3.ch = 1;
_local3.bz = {sx:obj._x, sy:obj._y};
if ((_local4.x == null) || (_global.isNaN(Number(_local4.x)))) {
_local4.x = _local3.bz.sx;
}
if ((_local4.y == null) || (_global.isNaN(Number(_local4.y)))) {
_local4.y = _local3.bz.sy;
}
_local3.bz.chx = ((typeof(_local4.x) == "string") ? (Number(_local4.x)) : (_local4.x - _local3.bz.sx));
if (_global.isNaN(_local3.bz.chx) == true) {
_local3.bx.chx = 0;
}
_local3.bz.chy = ((typeof(_local4.y) == "string") ? (Number(_local4.y)) : (_local4.y - _local3.bz.sy));
if (_global.isNaN(_local3.bz.chy) == true) {
_local3.bx.chy = 0;
}
if ((_local4.controlX == null) || (_global.isNaN(Number(_local4.controlX)))) {
_local3.bz.ctrlx = _local3.bz.sx + (_local3.bz.chx / 2);
} else {
_local3.bz.ctrlx = ((typeof(_local4.controlX) == "string") ? (_local3.bz.sx + Number(_local4.controlX)) : (_local4.controlX));
}
if ((_local4.controlY == null) || (_global.isNaN(Number(_local4.controlY)))) {
_local3.bz.ctrly = _local3.bz.sy + (_local3.bz.chy / 2);
} else {
_local3.bz.ctrly = ((typeof(_local4.controlY) == "string") ? (_local3.bz.sy + Number(_local4.controlY)) : (_local4.controlY));
}
_local3.bz.ctrlx = _local3.bz.ctrlx - _local3.bz.sx;
_local3.bz.ctrly = _local3.bz.ctrly - _local3.bz.sy;
_local10 = (_local3.bz.chx + _local3.bz.chy) != 0;
}
} else {
if (typeof(_local4) == "object") {
_local3.complex = ((_local4 instanceof Array) ? 0 : 1);
}
if ((_local5 == "_x") || (_local5 == "_y")) {
removeTween(obj, "_bezier_", true);
}
if ((_local5 == "_frame") && (typeof(obj) == "movieclip")) {
_local3.ps = obj._currentframe;
_local3.special = true;
} else if (_local13 == false) {
if (_local3.complex > -1) {
_local3.ps = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local40 in _local4) {
_local3.ps[_local40] = obj[_local5][_local40];
}
} else {
_local3.ps = obj[_local5];
}
}
if (_local11 == true) {
if (_local13 == true) {
_local14.setFilterProp(obj, _local5, ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4)));
} else if (_local3.complex > -1) {
for (var _local40 in _local4) {
if ((_local4[_local40] != null) && (_global.isNaN(Number(_local4[_local40])) == false)) {
obj[_local5][_local40] = ((typeof(_local4[_local40]) == "string") ? (_local3.ps[_local40] + Number(_local4[_local40])) : _local4[_local40]);
if (_global.isNaN(obj[_local5][_local40]) == true) {
obj[_local5][_local40] = 0;
}
}
}
} else {
obj[_local5] = ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4));
if (_local15 == 1) {
obj._visible = true;
} else if (_local15 == -1) {
obj._visible = false;
}
}
} else if (_local3.complex > -1) {
var _local21 = getChangeObj(_local3.ps, _local4, _local13, _local3.complex == 0);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
} else {
if ((_local4 == null) || (_global.isNaN(Number(_local4)))) {
_local4 = _local3.ps;
}
_local3.ch = ((typeof(_local4) == "string") ? (Number(_local4)) : (Number(_local4) - _local3.ps));
if (_global.isNaN(_local3.ch) == true) {
_local3.ch = 0;
}
_local10 = _local3.ch != 0;
}
}
if (((_local24 == 0) && ((_local10 == true) || (_local11 == false))) || ((_local10 == true) && (_local11 == false))) {
if ((_local3.complex > -1) && (!(_local3.c === 2))) {
_local3.ps = [_local3.ps];
_local3.ch = [_local3.ch];
}
_local3.ts = now + (delay * 1000);
_local3.pt = -1;
_local3.d = seconds * 1000;
_local3.ef = ease;
_local3.sf = false;
_local3.cycles = _local44;
if (_local30 != undefined) {
_local3.e1 = _local30;
}
if (_local29 != undefined) {
_local3.e2 = _local29;
}
_local3.v = _local15;
if (callback.start != undefined) {
_local3.scb = callback.start;
}
if (callback.upd != undefined) {
_local3.ucb = callback.upd;
}
if (callback.end != undefined) {
_local3.ecb = callback.end;
}
if (callback.roundResults != undefined) {
_local3.rr = callback.roundResults;
}
if (tweens[String(_local22)] == undefined) {
_local7 = (tweens[String(_local22)] = {numProps:0, locked:false, targ:obj, targID:String(("\"" + ((obj._name != undefined) ? (obj._name) : (obj.toString()))) + "\""), targZID:_local22, props:{}});
numTweens++;
}
if (_local16 == true) {
_local7.colorProp = _local5;
}
_local7.props[_local5] = _local3;
_local7.numProps++;
_local25 = (_local5 + ",") + _local25;
_local28 = (((typeof(_local4) == "string") ? (("\"" + _local4) + "\"") : (_local4)) + ",") + _local28;
}
_local3 = undefined;
}
if ((_local7 == undefined) || (_local7.numProps <= 0)) {
cleanUp();
}
if ((_local23.length > 0) && (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)) {
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:obj, props:_local23, __zigoID__:_local22, during:"add"});
}
if (_local25 == "") {
if (_local24 == 2) {
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("011", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString());
}
} else {
var _local48 = obj._listeners.length > 0;
if (_local48 == true) {
obj.broadcastMessage("onTweenStart", {target:obj, props:props});
}
if (callback.start != undefined) {
callback.start.f.apply(callback.start.s, callback.start.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenUpdate", {target:obj, props:props});
}
if (callback.upd != undefined) {
callback.upd.f.apply(callback.upd.s, callback.upd.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenEnd", {target:obj, props:props});
}
if (callback.end != undefined) {
callback.end.f.apply(callback.end.s, callback.end.a);
}
}
cleanUp();
}
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
if (_local25 == "") {
com.mosesSupposes.fuse.FuseKitCommon.error("012", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString(), endvals.toString());
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("013", ((obj._name != undefined) ? (obj._name) : (obj.toString())), _local25.slice(0, -1), _local28.slice(0, -1));
}
}
return(((_local25 == "") ? null : (_local25.slice(0, -1))));
}
function removeTween(targs, props, noInit) {
var _local4 = {};
var _local12 = paramsObj(targs, props);
if (_local12.none == true) {
return(undefined);
}
var _local16 = _local12.all;
var _local17 = _local12.allprops;
var _local9 = ((_local16 == true) ? (tweens) : (Object(_local12.tg)));
var _local8 = false;
for (var _local20 in _local9) {
var _local3 = ((_local16 == true) ? (_local20) : (String(_local9[_local20].__zigoID__)));
var _local2 = tweens[_local3];
var _local6 = ((_local17 == true) ? (_local2.props) : (_local12.props));
for (var _local14 in _local6) {
var _local5 = (_local14 == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) && (_local2.colorProp != undefined);
if ((_local2.props[_local14] != undefined) || (_local5 == true)) {
if (_local4[_local3] == null) {
_local4[_local3] = [];
}
_local4[_local3].unshift(_local14);
if ((_local14 == _local2.colorProp) || (_local5 == true)) {
delete _local2.props[_local2.colorProp];
delete _local2.colorProp;
} else {
delete _local2.props[_local14];
}
_local2.numProps--;
if (_local2.numProps <= 0) {
_local8 = true;
break;
}
}
}
}
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
for (var _local19 in _local4) {
var _local7 = tweens[_local19].targ;
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local7.addProperty) == "function") ? (_local7) : (("[MISSING(\"" + tweens[_local19].targID) + "\")]")), props:_local4[_local19], __zigoID__:tweens[_local19].targZID, during:((noInit == true) ? "add" : "remove")});
}
}
if (_local8 == true) {
cleanUp(noInit);
}
}
function alterTweens(type, targs, props, pauseFlag, noEvents, skipTo) {
if (type == "lock") {
tweens[String(targs.__zigoID__)].locked = props;
return(undefined);
}
var _local11 = paramsObj(targs, props);
if (_local11.none == true) {
return(undefined);
}
var _local14 = _local11.all;
var _local15 = _local11.allprops;
var _local9 = ((_local14 == true) ? (tweens) : (Object(_local11.tg)));
var _local8 = 0;
for (var _local16 in _local9) {
var _local7 = ((_local14 == true) ? (_local16) : (String(_local9[_local16].__zigoID__)));
var _local5 = tweens[_local7];
var _local4 = ((_local15 == true) ? (_local5.props) : (_local11.props));
if (_local4.ALLCOLOR == true) {
_local4[_local5.colorProp] = true;
delete _local4.ALLCOLOR;
}
for (var _local10 in _local4) {
_local8++;
var _local2 = _local5.props[_local10];
if (type == "rewind") {
if (pauseFlag == true) {
_local2.pt = now;
}
_local2.ts = now;
if (noEvents != true) {
_local2.sf = false;
if (_local2.scb != undefined) {
_local2.scb.fired = false;
}
}
} else if (type == "ff") {
if (noEvents == true) {
_local2.suppressEnd = true;
}
_local2.o = true;
_local2.pt = -1;
_local2.ts = now - _local2.d;
} else if (type == "skipTo") {
_local2.ts = Math.min(now, (_local2.ts + (now - _local2.ts)) - (skipTo * 1000));
} else if (type == "pause") {
if (_local2.pt == -1) {
_local2.pt = now;
}
} else if (type == "unpause") {
if (_local2.pt != -1) {
_local2.ts = now - (_local2.pt - _local2.ts);
_local2.pt = -1;
}
}
}
}
if ((type == "ff") && (_local8 > 0)) {
update();
} else if ((type == "rewind") && (_local8 > 0)) {
update(true);
}
}
function getStatus(type, targ, param) {
if (targ == null) {
return(null);
}
var _local8 = String(targ).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
var _local4 = tweens[String(targ.__zigoID__)];
switch (type) {
case "paused" :
var _local2 = _local4.props;
if (param != null) {
if (_local2[String(param)] == undefined) {
return(false);
}
return(Boolean(_local2[String(param)].pt != -1));
}
for (var _local6 in _local2) {
if (_local2[_local6].pt != -1) {
return(true);
}
}
return(false);
case "active" :
if (param == null) {
return(Boolean(_local4 != undefined));
}
if (String(param).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
return(Boolean(_local4.colorProp != undefined));
}
return(Boolean(_local4.props[String(param)] != undefined));
case "count" :
if (!_local8) {
return(_local4.numProps);
}
var _local3 = 0;
for (var _local6 in tweens) {
_local3 = _local3 + tweens[_local6].numProps;
}
return(_local3);
case "locked" :
return(_local4.locked);
}
}
function update(force) {
var _local22 = {};
var _local24 = {};
var _local23 = {};
var _local15 = {};
var _local13 = {};
var _local14 = {};
var _local26 = false;
var _local20 = com.mosesSupposes.fuse.ZigoEngine.ROUND_RESULTS;
for (var _local35 in tweens) {
var _local12 = tweens[_local35];
var _local5 = _local12.targ;
var _local34 = _local12.props;
var _local21 = _local5._listeners.length > 0;
if (_local5.__zigoID__ == undefined) {
_local26 = true;
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
var _local25 = [];
for (var _local30 in _local34) {
_local25.unshift(_local30);
}
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local5.addProperty) == "function") ? (_local5) : (("[MISSING:" + _local12.targID) + "]")), props:_local25, __zigoID__:_local12.targZID, during:"update"});
}
continue;
}
for (var _local30 in _local34) {
var _local3 = _local34[_local30];
if (((_local3.ts > now) || (_local3.pt != -1)) && (force != true)) {
continue;
}
var _local9 = now >= (_local3.ts + _local3.d);
if (_local3.complex == -1) {
var _local6;
if (_local9 == true) {
_local6 = _local3.ps + _local3.ch;
if ((_local3.cycles > 1) || (_local3.cycles == 0)) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local3.ps = _local6;
_local3.ch = -_local3.ch;
_local3.ts = now;
_local9 = false;
}
} else {
_local6 = _local3.ef(now - _local3.ts, _local3.ps, _local3.ch, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local6) == false) {
if ((_local30 != "_bezier_") && ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false))))) {
_local6 = Math.round(Number(_local6));
}
if (_local3.special != true) {
_local5[_local30] = _local6;
} else if (_local3.fmp != -1) {
_local3.fmp.setFilterProp(_local5, _local30, _local6);
} else if (_local30 == "_bezier_") {
var _local10 = _local3.bz;
var _local18 = _local10.sx + (_local6 * (((2 * (1 - _local6)) * _local10.ctrlx) + (_local6 * _local10.chx)));
var _local17 = _local10.sy + (_local6 * (((2 * (1 - _local6)) * _local10.ctrly) + (_local6 * _local10.chy)));
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local18 = Math.round(Number(_local18));
_local17 = Math.round(Number(_local17));
}
_local5._x = _local18;
_local5._y = _local17;
} else if (_local30 == "_frame") {
MovieClip(_local5).gotoAndStop(Math.ceil(_local6));
}
}
} else {
var _local16 = (_local9 == true) && ((_local3.cycles > 1) || (_local3.cycles == 0));
var _local7 = [];
for (var _local27 in _local3.ch) {
var _local4 = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local28 in _local3.ch[_local27]) {
var _local8 = _local3.ch[_local27][_local28];
var _local11 = _local3.ps[_local27][_local28];
if (_local9 == true) {
_local4[_local28] = _local11 + _local8;
if (_local16 == true) {
_local3.ch[_local27][_local28] = -_local8;
}
} else {
_local4[_local28] = _local3.ef(now - _local3.ts, _local11, _local8, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local4[_local28]) == false) {
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local4[_local28] = Math.round(_local4[_local28]);
}
}
if ((_local3.fmp == -1) && (_local3.c == -1)) {
_local5[_local30][_local28] = _local4[_local28];
}
}
_local7.push(_local4);
if ((_local3.fmp == -1) && (_local3.c == 2)) {
_local5[_local30][_local27] = Number(((_local4.rb << 16) | (_local4.gb << 8)) | _local4.bb);
}
}
if (_local3.fmp != -1) {
if (_local3.c == 1) {
_local3.fmp.setFilterProp(_local5, _local30, ((_local7[0].rb << 16) | (_local7[0].gb << 8)) | _local7[0].bb);
} else if (_local3.c == 2) {
var _local19 = [];
for (var _local28 in _local7) {
_local19.unshift(((_local7[_local28].rb << 16) | (_local7[_local28].gb << 8)) | _local7[_local28].bb);
}
_local3.fmp.setFilterProp(_local5, _local30, _local19);
}
} else if (_local3.c != -1) {
_local3.c.setTransform(_local7[0]);
}
if (_local16 == true) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local9 = false;
_local3.ts = now;
_local3.ps = _local7;
}
}
if (_local3.sf == false) {
if (_local3.v != 0) {
_local5._visible = true;
}
if (_local21 == true) {
if (_local15[_local35] == undefined) {
_local15[_local35] = [_local5, []];
}
_local15[_local35][1].unshift(_local30);
}
_local3.sf = true;
}
if (_local3.scb.fired == false) {
_local22[String(_local3.scb.id)] = _local3.scb;
_local3.scb.fired = true;
}
if (_local21 == true) {
if (_local13[_local35] == undefined) {
_local13[_local35] = [_local5, []];
}
_local13[_local35][1].unshift(_local30);
}
if (_local3.ucb != undefined) {
_local24[String(_local3.ucb.id)] = _local3.ucb;
}
if (_local9 == true) {
if (_local3.v === -1) {
_local5._visible = false;
}
if (_local3.suppressEnd != true) {
if (_local21 == true) {
if (_local14[_local35] == undefined) {
_local14[_local35] = [_local5, []];
}
_local14[_local35][1].unshift(_local30);
}
if (_local3.ecb != undefined) {
_local23[String(_local3.ecb.id)] = _local3.ecb;
}
}
delete _local34[_local30];
if (_local30 == _local12.colorProp) {
delete _local12.colorProp;
}
_local12.numProps--;
if (_local12.numProps <= 0) {
_local26 = true;
}
}
delete _local3.suppressEnd;
}
}
for (var _local35 in _local15) {
_local15[_local35][0].broadcastMessage("onTweenStart", {target:_local15[_local35][0], props:_local15[_local35][1]});
}
for (var _local35 in _local22) {
_local22[_local35].f.apply(_local22[_local35].s, _local22[_local35].a);
}
for (var _local35 in _local13) {
_local13[_local35][0].broadcastMessage("onTweenUpdate", {target:_local13[_local35][0], props:_local13[_local35][1]});
}
for (var _local35 in _local24) {
_local24[_local35].f.apply(_local24[_local35].s, _local24[_local35].a);
}
for (var _local35 in _local14) {
_local14[_local35][0].broadcastMessage("onTweenEnd", {target:_local14[_local35][0], props:_local14[_local35][1]});
}
for (var _local35 in _local23) {
_local23[_local35].f.apply(_local23[_local35].s, _local23[_local35].a);
}
if (_local26) {
cleanUp();
}
now = getTimer();
}
function cleanUp(noInit) {
for (var _local4 in tweens) {
var _local2 = tweens[_local4].targ;
if ((tweens[_local4].numProps <= 0) || (_local2.__zigoID__ == undefined)) {
if ((((_local2 != undefined) && (_local2.tween == undefined)) && (noInit != true)) && (_local2._listeners.length <= 0)) {
com.mosesSupposes.fuse.ZigoEngine.deinitializeTargets(_local2);
}
delete tweens[_local4];
numTweens--;
}
}
if (numTweens <= 0) {
numTweens = 0;
delete tweens;
tweens = {};
if (noInit != true) {
com.mosesSupposes.fuse.ZigoEngine.__mgrRelay(this, "setup", [true]);
}
}
}
function paramsObj(targs, props, endvals, retainFade) {
var _local6 = {};
_local6.all = String(targs).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
_local6.none = Boolean(targs == null);
if (_local6.all == true) {
_local6.tg = [null];
} else {
_local6.tg = ((targs instanceof Array) ? (targs) : ([targs]));
for (var _local11 in _local6.tg) {
var _local7 = _local6.tg[_local11];
if ((_local7 == null) || (!((typeof(_local7) == "object") || (typeof(_local7) == "movieclip")))) {
_local6.tg.splice(Number(_local11), 1);
}
}
}
_local6.allprops = props == null;
var _local1;
var _local4;
var _local3 = {};
if (_local6.allprops == false) {
if ((typeof(props) == "string") && ((String(props).indexOf(" ") > -1) || (String(props).indexOf(",") > -1))) {
props = String(props.split(" ").join("")).split(",");
}
_local1 = ((props instanceof Array) ? (props.slice()) : ([props]));
if (endvals != undefined) {
if ((typeof(endvals) == "string") && ((String(endvals).indexOf(" ") > -1) || (String(endvals).indexOf(",") > -1))) {
endvals = String(endvals.split(" ").join("")).split(",");
}
_local4 = ((endvals instanceof Array) ? (endvals.slice()) : ([endvals]));
while (_local4.length < _local1.length) {
_local4.push(_local4[_local4.length - 1]);
}
_local4.splice(_local1.length, _local4.length - _local1.length);
}
for (var _local11 in _local1) {
var _local2 = Number(_local11);
if ((_local1[_local11] != "_scale") && (_local1[_local11] != "_size")) {
if (_local3[_local1[_local11]] == undefined) {
if ((_local1[_local11] == "_fade") && (retainFade != true)) {
_local1[_local11] = "_alpha";
}
if (String(_local1[_local11]).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
_local1[_local11] = com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR;
}
_local3[_local1[_local11]] = true;
} else {
_local1.splice(_local2, 1);
_local4.splice(_local2, 1);
}
} else {
var _local8 = String(_local1.splice(_local2, 1)[0]);
var _local5 = _local4.splice(_local2, 1)[0];
if (_local8 == "_scale") {
if (_local3._xscale == undefined) {
_local1.splice(_local2, 0, "_xscale");
_local4.splice(_local2, 0, _local5);
_local3._xscale = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_yscale");
_local4.splice(_local2, 0, _local5);
_local3._yscale = true;
}
}
if (_local8 == "_size") {
if (_local3._width == undefined) {
_local1.splice(_local2, 0, "_width");
_local4.splice(_local2, 0, _local5);
_local3._width = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_height");
_local4.splice(_local2, 0, _local5);
_local3._height = true;
}
}
}
}
for (var _local11 in _local1) {
if (((_local1[_local11] == "_xscale") && (_local3._width == true)) || ((_local1[_local11] == "_yscale") && (_local3._height == true))) {
_local1.splice(Number(_local11), 1);
_local4.splice(Number(_local11), 1);
delete _local3[_local1[_local11]];
}
}
}
_local6.pa = _local1;
_local6.va = _local4;
_local6.props = _local3;
return(_local6);
}
function getChangeObj(ps, ep, isFMP, useArray) {
var _local3 = {map:((useArray == true) ? ([]) : ({})), changed:false};
for (var _local7 in ep) {
if ((((((isFMP == true) && (_local7.charAt(1) == "b")) || (ep[_local7] != ps[_local7])) || (useArray == true)) && (ep[_local7] != null)) && (_global.isNaN(Number(ep[_local7])) == false)) {
_local3.map[_local7] = ((typeof(ep[_local7]) == "string") ? (Number(ep[_local7])) : (ep[_local7] - ps[_local7]));
if (_global.isNaN(_local3.map[_local7]) == true) {
_local3.map[_local7] = 0;
} else if (_local3.map[_local7] != 0) {
_local3.changed = true;
}
}
}
return(_local3);
}
var numTweens = 0;
}
Symbol 537 MovieClip [__Packages.com.mosesSupposes.fuse.Shortcuts] Frame 0
class com.mosesSupposes.fuse.Shortcuts
{
function Shortcuts () {
}
static function initialize() {
if (shortcuts == null) {
initShortcuts();
}
}
static function doShortcut(obj, methodName) {
initialize();
var _local5 = shortcuts[methodName];
if (_local5 == undefined) {
if (typeof(obj) == "movieclip") {
_local5 = mcshortcuts[methodName];
}
}
if (_local5 == undefined) {
return(null);
}
obj = arguments.shift();
methodName = String(arguments.shift());
if (!(obj instanceof Array)) {
obj = [obj];
}
var _local3 = "";
for (var _local6 in obj) {
var _local2 = String(_local5.apply(obj[_local6], arguments));
if ((_local2 != null) && (_local2.length > 0)) {
if (_local3.length > 0) {
_local3 = (_local2 + "|") + _local3;
} else {
_local3 = _local2;
}
}
}
return(((_local3 == "") ? null : (_local3)));
}
static function addShortcutsTo() {
initialize();
var _local5 = function (o, so) {
for (var _local5 in so) {
var _local2 = so[_local5];
if (_local2.getter || (_local2.setter)) {
o.addProperty(_local5, _local2.getter, _local2.setter);
_global.ASSetPropFlags(o, _local5, 3, 1);
} else {
o[_local5] = _local2;
_global.ASSetPropFlags(o, _local5, 7, 1);
}
}
};
for (var _local7 in arguments) {
var _local4 = arguments[_local7];
if ((_local4 == MovieClip.prototype) || (typeof(_local4) == "movieclip")) {
_local5(_local4, mcshortcuts);
}
_local5(_local4, shortcuts);
}
}
static function removeShortcutsFrom() {
initialize();
var _local5 = function (o, so) {
for (var _local5 in so) {
_global.ASSetPropFlags(o, _local5, 0, 2);
var _local2 = so[_local5];
if (_local2.getter || (_local2.setter)) {
o.addProperty(_local5, null, null);
}
delete o[_local5];
}
};
for (var _local7 in arguments) {
var _local3 = arguments[_local7];
if ((_local3 == MovieClip.prototype) || (typeof(_local3) == "movieclip")) {
_local5(_local3, mcshortcuts);
}
_local5(_local3, shortcuts);
}
}
static function parseStringTypeCallback(callbackStr) {
var evaluate = function (val) {
var first = val.charAt(0);
if ((first == val.slice(-1)) && ((first == "\"") || (first == "'"))) {
return(val.slice(1, -1));
}
if (val == "true") {
return(Object(true));
}
if (val == "false") {
return(Object(false));
}
if (val == "null") {
return(Object(null));
}
if (_global.isNaN(Number(val)) == false) {
return(Object(Number(val)));
}
return(Object(eval (val)));
};
var trimWhite = function (str) {
while (str.charAt(0) == " ") {
str = str.slice(1);
}
while (str.slice(-1) == " ") {
str = str.slice(0, -1);
}
return(str);
};
var evaluateList = function (list) {
var _local11 = [];
var _local4 = 0;
while (_local4 < list.length) {
var _local3 = list[_local4];
_local3 = trimWhite(_local3);
var _local5 = (_local3.charAt(0) == "{") && ((_local3.indexOf("}") > -1) || (_local3.indexOf(":") > -1));
var _local10 = _local3.charAt(0) == "[";
if ((_local5 || (_local10)) == true) {
var _local6 = ((_local5 == true) ? ({}) : ([]));
var _local2 = _local4;
while (_local2 < list.length) {
if (_local2 == _local4) {
_local3 = _local3.slice(1);
}
var _local1;
var _local8 = (_local1.slice(-1) == ((_local5 == true) ? "}" : "]")) || (_local2 == (list.length - 1));
if (_local8 == true) {
_local1 = _local1.slice(0, -1);
}
if ((_local5 == true) && (_local1.indexOf(":") > -1)) {
var _local7 = _local1.split(":");
_local6[trimWhite(_local7[0])] = evaluate(trimWhite(_local7[1]));
} else if (_local10 == true) {
_local6.push(evaluate(trimWhite(_local1)));
}
if (_local8 == true) {
_local11.push(_local6);
_local4 = _local2;
break;
}
_local2++;
}
} else {
_local11.push(evaluate(trimWhite(_local3)));
}
_local4++;
}
return(_local11);
};
var parts = callbackStr.split("(");
var p0 = parts[0];
var p1 = parts[1];
return({func:p0.slice(p0.lastIndexOf(".") + 1), scope:eval (p0.slice(0, p0.lastIndexOf("."))), args:evaluateList(p1.slice(0, p1.lastIndexOf(")")).split(","))});
}
static function initShortcuts() {
shortcuts = new Object();
var methods = {alphaTo:"_alpha", scaleTo:"_scale", sizeTo:"_size", rotateTo:"_rotation", brightnessTo:"_brightness", brightOffsetTo:"_brightOffset", contrastTo:"_contrast", colorTo:"_tint", tintPercentTo:"_tintPercent", colorResetTo:"_colorReset", invertColorTo:"_invertColor"};
var _local4 = _global.com.mosesSupposes.fuse.FuseFMP.getAllShortcuts();
var _local7 = {blur:1, blurX:1, blurY:1, strength:1, shadowAlpha:1, highlightAlpha:1, angle:1, distance:1, alpha:1, color:1};
for (var _local9 in _local4) {
if (_local7[_local4[_local9].split("_")[1]] === 1) {
methods[_local4[_local9] + "To"] = _local4[_local9];
}
}
var _local8 = {__resolve:function (name) {
var propName = methods[name];
return(function () {
var _local4 = _global.com.mosesSupposes.fuse.ZigoEngine.doTween.apply(com.mosesSupposes.fuse.ZigoEngine, new Array(this, propName).concat(arguments));
return(_local4);
});
}};
var _local5 = {__resolve:function (name) {
var _local3 = {setter:function (v) {
_global.com.mosesSupposes.fuse.ZigoEngine.doTween(this, ((name == "_tintString") ? "_tint" : (name)), v, 0);
}};
switch (name) {
case "_colorReset" :
_local3.getter = function () {
return(100 - _global.com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(this).tintPercent);
};
break;
case "_colorTransform" :
_local3.getter = function () {
return(Color(new Color(this)).getTransform());
};
break;
case "_fade" :
_local3.getter = function () {
return(this._alpha);
};
break;
case "_size" :
_local3.getter = function () {
return(((this._width == this._height) ? (this._width) : null));
};
break;
case "_scale" :
_local3.getter = function () {
return(((this._xscale == this._yscale) ? (this._xscale) : null));
};
break;
default :
_local3.getter = function () {
return(_global.com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(this)[name.slice(1)]);
};
}
return(_local3);
}};
for (var _local9 in methods) {
shortcuts[_local9] = _local8[_local9];
if ((_local9 != "alphaTo") && (_local9 != "rotateTo")) {
shortcuts[methods[_local9]] = _local5[methods[_local9]];
}
}
shortcuts._tintString = _local5._tintString;
shortcuts._colorTransform = _local5._colorTransform;
shortcuts._fade = _local5._fade;
shortcuts.tween = function (props, endVals, seconds, ease, delay, callback) {
if ((arguments.length == 1) && (typeof(props) == "object")) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween({target:this, action:props}));
}
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, props, endVals, seconds, ease, delay, callback));
};
shortcuts.removeTween = (shortcuts.stopTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.removeTween(this, props);
});
shortcuts.removeAllTweens = (shortcuts.stopAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.removeTween("ALL");
});
shortcuts.isTweening = function (prop) {
return(com.mosesSupposes.fuse.ZigoEngine.isTweening(this, prop));
};
shortcuts.getTweens = function () {
return(com.mosesSupposes.fuse.ZigoEngine.getTweens(this));
};
shortcuts.lockTween = function () {
com.mosesSupposes.fuse.ZigoEngine.lockTween(this, true);
};
shortcuts.unlockTween = function () {
com.mosesSupposes.fuse.ZigoEngine.lockTween(this, false);
};
shortcuts.isTweenLocked = function () {
return(com.mosesSupposes.fuse.ZigoEngine.isTweenLocked(this));
};
shortcuts.isTweenPaused = function (prop) {
return(com.mosesSupposes.fuse.ZigoEngine.isTweenPaused(this, prop));
};
shortcuts.pauseTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.pauseTween(this, props);
};
shortcuts.resumeTween = (shortcuts.unpauseTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.unpauseTween(this, props);
});
shortcuts.pauseAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.pauseTween("ALL");
};
shortcuts.resumeAllTweens = (shortcuts.unpauseAllTweens = function () {
com.mosesSupposes.fuse.ZigoEngine.unpauseTween("ALL");
});
shortcuts.ffTween = function (props) {
com.mosesSupposes.fuse.ZigoEngine.ffTween(this, props);
};
shortcuts.rewTween = function (props, suppressStartEvents) {
com.mosesSupposes.fuse.ZigoEngine.rewTween(this, props, false, suppressStartEvents);
};
shortcuts.rewAndPauseTween = function (props, suppressStartEvents) {
com.mosesSupposes.fuse.ZigoEngine.rewTween(this, props, true, suppressStartEvents);
};
shortcuts.skipTweenTo = function (seconds, props) {
com.mosesSupposes.fuse.ZigoEngine.skipTweenTo(seconds, this, props);
};
shortcuts.bezierTo = function (destX, destY, controlX, controlY, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_bezier_", {x:destX, y:destY, controlX:controlX, controlY:controlY}, seconds, ease, delay, callback));
};
shortcuts.colorTransformTo = function (ra, rb, ga, gb, ba, bb, aa, ab, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_colorTransform", {ra:ra, rb:rb, ga:ga, gb:gb, ba:ba, bb:bb, aa:aa, ab:ab}, seconds, ease, delay, callback));
};
shortcuts.tintTo = function (rgb, percent, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_tint", {tint:rgb, percent:percent}, seconds, ease, delay, callback));
};
shortcuts.slideTo = function (destX, destY, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_x,_y", [destX, destY], seconds, ease, delay, callback));
};
shortcuts.fadeIn = function (seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_fade", 100, seconds, ease, delay, callback));
};
shortcuts.fadeOut = function (seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_fade", 0, seconds, ease, delay, callback));
};
mcshortcuts = new Object();
mcshortcuts._frame = {getter:function () {
return(this._currentframe);
}, setter:function (v) {
this.gotoAndStop(Math.round(v));
}};
mcshortcuts.frameTo = function (endframe, seconds, ease, delay, callback) {
return(com.mosesSupposes.fuse.ZigoEngine.doTween(this, "_frame", ((endframe != undefined) ? (endframe) : (this._totalframes)), seconds, ease, delay, callback));
};
}
static var registryKey = "shortcuts";
static var shortcuts = null;
static var mcshortcuts = null;
}
Symbol 538 MovieClip [__Packages.com.mosesSupposes.fuse.PennerEasing] Frame 0
class com.mosesSupposes.fuse.PennerEasing
{
function PennerEasing () {
}
static function linear(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInQuad(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOutQuad(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOutQuad(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeInExpo(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOutExpo(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOutExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeOutInExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 1)) + b);
}
return(((c / 2) * (Math.pow(2, 10 * (t - 2)) + 1)) + b);
}
static function easeInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
static function easeOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static function easeOutInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
return(((0.5 * ((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + (c / 2)) + b);
}
return(((c / 2) + (0.5 * ((a * Math.pow(2, 10 * (t - 2))) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)))) + b);
}
static function easeInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static function easeOutInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) - s)) + 1)) + b);
}
static function easeOutBounce(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeInBounce(t, b, c, d) {
return((c - easeOutBounce(d - t, 0, c, d)) + b);
}
static function easeInOutBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeInBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOutBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutInBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeOutBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeInBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeInCubic(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOutCubic(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOutCubic(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function easeOutInCubic(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((t * t) * t) + 1)) + b);
}
static function easeInQuart(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOutQuart(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOutQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function easeOutInQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((((t * t) * t) * t) - 1)) + b);
}
t--;
return(((c / 2) * ((((t * t) * t) * t) + 1)) + b);
}
static function easeInQuint(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOutQuint(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOutQuint(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static function easeOutInQuint(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInSine(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOutSine(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOutSine(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutInSine(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.sin((Math.PI * t) / 2)) + b);
}
t--;
return((((-c) / 2) * (Math.cos((Math.PI * t) / 2) - 2)) + b);
}
static function easeInCirc(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOutCirc(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOutCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeOutInCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return(((c / 2) * Math.sqrt(1 - (t * t))) + b);
}
t--;
return(((c / 2) * (2 - Math.sqrt(1 - (t * t)))) + b);
}
static var registryKey = "pennerEasing";
}
Symbol 539 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPath] Frame 0
class com.xfactorstudio.xml.xpath.XPath
{
function XPath () {
}
static function selectNodes(context, path) {
var _local1 = new com.xfactorstudio.xml.xpath.types.Query(path);
return(_local1.execute([context]));
}
static function selectSingleNode(context, path) {
return(selectNodes(context, path)[0]);
}
static function selectNodesAsString(context, path) {
var _local2 = selectNodes(context, path);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = com.xfactorstudio.xml.xpath.XPathAxes.stringValue(_local2[_local1])[0];
_local1++;
}
return(_local2);
}
static function selectNodesAsNumber(context, path) {
var _local2 = selectNodes(context, path);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = com.xfactorstudio.xml.xpath.XPathFunctions.toNumber(com.xfactorstudio.xml.xpath.XPathAxes.stringValue(_local2[_local1])[0]);
_local1++;
}
return(_local2);
}
static function selectNodesAsBoolean(context, path) {
var _local3 = selectNodes(context, path);
var _local1 = 0;
while (_local1 < _local3.length) {
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.stringValue(_local3[_local1])[0];
_local3[_local1] = (((_local2.toUpperCase() == "TRUE") || (Number(_local2) == 1)) ? true : false);
_local1++;
}
return(_local3);
}
static function getNamedNodes(axis, name) {
var _local2 = new Array();
switch (name) {
case "*" :
var _local3 = 0;
while (_local3 < axis.length) {
if (axis[_local3].nodeType == 1) {
_local2.push(axis[_local3]);
}
_local3++;
}
break;
case "text()" :
_local3 = 0;
while (_local3 < axis.length) {
if (axis[_local3].nodeType == 3) {
_local2.push(axis[_local3]);
}
_local3++;
}
break;
case "node()" :
_local3 = 0;
while (_local3 < axis.length) {
_local2.push(axis[_local3]);
_local3++;
}
break;
default :
if (name.indexOf(":*") != -1) {
var _local5 = name.split(":*")[0];
_local3 = 0;
while (_local3 < axis.length) {
if (prefix(axis[_local3]) == _local5) {
_local2.push(axis[_local3]);
}
_local3++;
}
} else if (name.indexOf("*:") != -1) {
var _local6 = name.split("*:")[1];
_local3 = 0;
while (_local3 < axis.length) {
if (localName(axis[_local3]) == _local6) {
_local2.push(axis[_local3]);
}
_local3++;
}
} else {
_local3 = 0;
for(;;){
if (_local3 >= axis.length) {
break;
}
if (axis[_local3].nodeName == name) {
_local2.push(axis[_local3]);
}
_local3++;
};
}
}
return(_local2);
}
static function getDocumentElement(context) {
while (context.parentNode != null) {
context = context.parentNode;
}
if (context.firstChild.nodeName == null) {
return(context.firstChild.nextSibling);
}
return(context.firstChild);
}
static function getChildIndex(kid) {
var _local2 = kid.parentNode.childNodes;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == kid.nodeName) {
_local3++;
}
if (_local2[_local1] === kid) {
return(_local3);
}
_local1++;
}
return(0);
}
static function prefix(node) {
return(((node.nodeName.indexOf(":") != -1) ? (node.nodeName.split(":")[0]) : null));
}
static function localName(node) {
return(((node.nodeName.indexOf(":") != -1) ? (node.nodeName.split(":")[1]) : (node.nodeName)));
}
static function getXPath(n, attributeName) {
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.ancestorOrSelf(n);
var _local3 = "";
var _local1 = 1;
while (_local1 < _local2.length) {
switch (_local2[_local1].nodeType) {
case 1 :
_local3 = _local3 + ("/" + _local2[_local1].nodeName);
break;
case 3 :
_local3 = _local3 + "/text()";
}
_local1++;
}
if (attributeName != null) {
_local3 = _local3 + ("/@" + attributeName);
}
return(_local3);
}
static function getAbsoluteXPath(n, attributeName) {
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.ancestorOrSelf(n);
var _local3 = "";
var _local1 = 1;
while (_local1 < _local2.length) {
switch (_local2[_local1].nodeType) {
case 1 :
_local3 = _local3 + (((("/" + _local2[_local1].nodeName) + "[") + com.xfactorstudio.xml.xpath.types.Predicate.getIndexOfType(_local2[_local1])) + "]");
break;
case 3 :
_local3 = _local3 + "/text()";
}
_local1++;
}
if (attributeName != null) {
_local3 = _local3 + ("/@" + attributeName);
}
return(_local3);
}
}
Symbol 540 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.QueryPart] Frame 0
class com.xfactorstudio.xml.xpath.types.QueryPart
{
var childNodes, parentNode, nodeValue;
function QueryPart () {
childNodes = new Array();
}
function appendChild(child) {
childNodes.push(child);
childNodes[childNodes.length - 1].parentNode = this;
return(childNodes[childNodes.length - 1]);
}
function clone(obj) {
var _local2 = 0;
while (_local2 < childNodes.length) {
if (childNodes[_local2].nodeValue != null) {
obj.parentNode = parentNode;
obj.nodeValue = nodeValue;
obj.nodeName = nodeName;
obj.childNodes.push(childNodes[_local2].clone());
} else {
obj.childNodes.push(childNodes[_local2]);
}
_local2++;
}
}
function toString(tabs) {
if (tabs == null) {
tabs = "\t";
}
var _local3 = new Array();
_local3.push(newline);
_local3.push(tabs);
_local3.push("<");
_local3.push(nodeName);
_local3.push(">");
if (nodeValue != null) {
_local3.push(nodeValue);
}
var _local2 = 0;
while (_local2 < childNodes.length) {
if (childNodes[_local2] instanceof Array) {
_local3.push((((newline + tabs) + "\t<nodeset>") + childNodes[_local2]) + "</nodset>");
} else {
_local3.push(childNodes[_local2].toString(tabs + "\t"));
}
_local2++;
}
if (childNodes.length > 0) {
_local3.push(newline);
_local3.push(tabs);
}
_local3.push("</");
_local3.push(nodeName);
_local3.push(">");
return(_local3.join(""));
}
function execute(context) {
}
var nodeName = "querypart";
}
Symbol 541 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Query] Frame 0
class com.xfactorstudio.xml.xpath.types.Query extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var currentChild, nodeName, pathString, childNodes;
function Query (query) {
super();
com.xfactorstudio.xml.xpath.XPathFunctions.registerDefaultFunctions();
currentChild = this;
nodeName = "query";
pathString = query;
var _local3 = new com.xfactorstudio.xml.xpath.XPathLexer();
_local3.handler = this;
var _local4 = getTimer();
var _local5;
_local3.parse(pathString);
}
function onFunctionStart(name) {
onNotPath();
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Func(name));
}
function onComma() {
}
function onGroupStart() {
onNotPath();
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Group());
}
function onGroupEnd() {
while (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Group)) {
currentChild = currentChild.parentNode;
}
currentChild = currentChild.parentNode;
}
function onFunctionEnd() {
while (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Func)) {
currentChild = currentChild.parentNode;
}
currentChild = currentChild.parentNode;
}
function onIdentifier(name) {
if (name == ".") {
onAxis(com.xfactorstudio.xml.xpath.Axes.SELF);
onAxis(com.xfactorstudio.xml.xpath.Axes.CHILD);
} else {
onPathPart();
currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Identifier(name));
}
}
function onAxis(axis) {
onPathPart();
currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Axis(axis));
}
function onPredicateStart() {
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Predicate());
}
function onPredicateEnd() {
while (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Predicate)) {
currentChild = currentChild.parentNode;
}
currentChild = currentChild.parentNode;
}
function onOperator(type) {
onNotPath();
currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Operator(type));
}
function onLitteral(litteral) {
onNotPath();
currentChild.appendChild(litteral);
}
function onNumber(num) {
onNotPath();
currentChild.appendChild(num);
}
function onPathPart() {
if (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Path)) {
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Path());
}
}
function onNotPath() {
if (currentChild instanceof com.xfactorstudio.xml.xpath.types.Path) {
currentChild = currentChild.parentNode;
}
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Query();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local8 = new com.xfactorstudio.xml.xpath.types.Predicate();
var _local3 = 0;
while (_local3 < childNodes.length) {
_local8.appendChild(childNodes[_local3]);
_local3++;
}
var _local7 = new Array();
var _local2 = 0;
while (_local2 < context.length) {
var _local5 = _local8.clone();
var _local4 = com.xfactorstudio.xml.xpath.types.Predicate.staticEvaluate(_local5, context[_local2]);
if (_local4 instanceof Array) {
_local7 = _local7.concat(com.xfactorstudio.xml.xpath.types.Predicate.staticEvaluate(_local5, context[_local2], context));
} else {
_local7.push(_local4);
}
_local2++;
}
return(_local7);
}
}
Symbol 542 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathFunctions] Frame 0
class com.xfactorstudio.xml.xpath.XPathFunctions
{
function XPathFunctions () {
}
static function registerFunction(id, func) {
if (Tokens[id] == null) {
Functions.push(func);
Tokens[id] = Functions.length - 1;
} else {
throw new Error(("XPath Error: The function identifier (" + Tokens[id]) + ") is already in use");
}
}
static function registerDefaultFunctions() {
if (!defaultFunctionsInited) {
registerFunction("last", last);
registerFunction("position", position);
registerFunction("count", count);
registerFunction("id", id);
registerFunction("name", name);
registerFunction("string", string);
registerFunction("concat", concat);
registerFunction("starts-with", startsWith);
registerFunction("contains", contains);
registerFunction("substring-before", substringBefore);
registerFunction("substring-after", substringAfter);
registerFunction("substring", substring);
registerFunction("string-length", stringLength);
registerFunction("normalize-space", normalizeSpace);
registerFunction("translate", translate);
registerFunction("boolean", boolean);
registerFunction("not", Not);
registerFunction("true", True);
registerFunction("false", False);
registerFunction("lang", lang);
registerFunction("number", number);
registerFunction("sum", sum);
registerFunction("floor", floor);
registerFunction("ceiling", ceiling);
registerFunction("round", round);
registerFunction("local-name", localName);
registerFunction("namespaceURI", namespaceURI);
defaultFunctionsInited = true;
}
}
static function getFunction(i) {
return(Functions[i]);
}
static function last(args, context, nodeSet) {
return(Number(nodeSet.length));
}
static function position(args, context, nodeSet) {
return(com.xfactorstudio.xml.xpath.XPath.getChildIndex(context));
}
static function count(args, context, nodeSet) {
return(args[0].length);
}
static function id(args, context, nodeSet) {
}
static function name(args, context, nodeSet) {
var _local1 = ((args.length == 0) ? (context) : (args[0][0]));
return(_local1.nodeName);
}
static function localName(args, context, nodeSet) {
var _local2 = ((args.length == 0) ? (context) : (args[0][0]));
var _local1 = _local2.nodeName.split(":");
return(((_local1.length > 1) ? (_local1[1]) : (_local1[0])));
}
static function namespaceURI(args, context, nodeSet) {
var _local4 = ((args.length == 0) ? (context) : (args[0][0]));
var _local3 = _local4.nodeName.split(":")[0];
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.namespace(_local4);
var _local1 = 0;
while (_local1 < _local2.length) {
if (localName([[_local2[_local1]]]) == _local3) {
return(_local2[_local1].nodeValue);
}
_local1++;
}
}
static function toString(args) {
if (args instanceof Array) {
args = com.xfactorstudio.xml.xpath.XPathAxes.stringValue(args[0]).join("");
}
return(String(args));
}
static function string(args, context, nodeSet) {
return(toString(args[0]));
}
static function concat(args, context, nodeSet) {
var _local1 = 0;
while (_local1 < args.length) {
args[_local1] = toString(args[_local1]);
_local1++;
}
return(args.join(""));
}
static function startsWith(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(((args[0].substr(0, args[1].length) == args[1]) ? true : false));
}
static function contains(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(((args[0].indexOf(args[1]) != -1) ? true : false));
}
static function substringBefore(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(args[0].substr(0, args[0].indexOf(args[1])));
}
static function substringAfter(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(args[0].substr(args[0].indexOf(args[1]) + args[1].length, args[0].length));
}
static function substring(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(args[0].substr(args[1] - 1, Math.min(args[2], args[0].length)));
}
static function stringLength(args, context, nodeSet) {
args = toString(args[0]);
return(((args != null) ? (args.length) : (com.xfactorstudio.xml.xpath.XPathAxes.stringValue(context).length)));
}
static function normalizeSpace(args, context, nodeSet) {
args = toString(args[0]);
var _local1;
var _local3;
_local1 = 0;
while (_local1 < args.length) {
if (args.charCodeAt(_local1) < 33) {
_local3 = _local1;
while (args.charCodeAt(_local3) < 33) {
_local3++;
}
if (_local3 > (_local1 + 1)) {
args = args.split(args.substr(_local1, _local3 - _local1)).join(" ");
}
}
_local1++;
}
_local1 = 0;
while (args.charCodeAt(_local1) < 33) {
_local1++;
}
args = args.substr(_local1, args.length);
_local1 = args.length - 1;
while (args.charCodeAt(_local1) < 33) {
_local1--;
}
args = args.substr(0, _local1 + 1);
return(args);
}
static function translate(args, context, nodeSet) {
var _local3 = toString(args[0]);
var _local4 = toString(args[1]);
var _local2 = toString(args[2]);
return(_local3.split(_local4).join(_local2));
}
static function toNumber(args) {
if (args instanceof Array) {
args = toString(args);
}
switch (typeof(args)) {
case "string" :
return(Number(args));
case "boolean" :
return((args ? 1 : 0));
}
return(Number(args.toString()));
}
static function number(args, context, nodeSet) {
return(toNumber(args[0]));
}
static function sum(args, context, nodeSet) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < args[0].length) {
_local3 = _local3 + Number(com.xfactorstudio.xml.xpath.XPathAxes.stringValue(args[0][_local1])[0]);
_local1++;
}
return(_local3);
}
static function floor(args, context, nodeSet) {
args[0] = toNumber(args[0]);
return(Math.floor(Number(args[0])));
}
static function ceiling(args, context, nodeSet) {
args[0] = toNumber(args[0]);
return(Math.ceil(Number(args[0])));
}
static function round(args, context, nodeSet) {
args[0] = toNumber(args[0]);
return(Math.round(Number(args[0])));
}
static function toBoolean(args) {
return(boolean([args]));
}
static function boolean(args, context, nodeSet) {
args = args[0];
if (args instanceof Array) {
return(((args.length > 0) ? true : false));
}
switch (typeof(args)) {
case "number" :
return(((args != 0) ? true : false));
case "string" :
return(((args.length > 0) ? true : false));
}
return(args);
}
static function Not(args, context, nodeSet) {
args = args[0];
if ((args == "false") || (args == false)) {
return(true);
}
return(false);
}
static function True(args, context, nodeSet) {
return(true);
}
static function False(args, context, nodeSet) {
return(false);
}
static function lang(args, context, nodeSet) {
return(((com.xfactorstudio.xml.xpath.XPath.getNamedNodes(com.xfactorstudio.xml.xpath.XPathAxes.attribute(context), "*:lang")[0].toString() == args[0].toString()) ? true : false));
}
static var Tokens = new Object();
static var Names = [];
static var Functions = [];
static var defaultFunctionsInited = false;
}
Symbol 543 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathAxes] Frame 0
class com.xfactorstudio.xml.xpath.XPathAxes
{
function XPathAxes () {
}
static function ancestor(contextNode) {
var _local2 = new Array();
var _local1 = contextNode;
while (_local1 = _local1.parentNode , _local1 != null) {
if (_local1.nodeName != null) {
_local2.push(_local1);
}
}
_local2.reverse();
return(_local2);
}
static function namespace(contextNode) {
var _local4;
var _local3;
var _local5;
var _local12 = contextNode.parentNode;
if (_local12 != null) {
_local3 = namespace(_local12);
} else {
_local3 = new Array();
var _local13 = {parentNode:contextNode, nodeName:"xmlns:xml", nodeType:5, nodeValue:"http://www.w3.org/XML/1998/namespace", toString:function () {
return(this.nodeValue);
}};
_local3.push(_local13);
}
for (var _local11 in contextNode.attributes) {
if (_local11.substr(0, 5) == "xmlns") {
_local4 = {parentNode:contextNode, nodeName:_local11, nodeType:5, nodeValue:contextNode.attributes[_local11], toString:function () {
return(this.nodeValue);
}};
_local5 = -1;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].nodeName == _local4.nodeName) {
_local5 = _local2;
break;
}
_local2++;
}
if (_local5 != -1) {
if (_local4.nodeValue == "") {
_local3.splice(_local5, 1);
} else {
_local3[_local5] = _local4;
}
} else if (_local4.nodeValue != "") {
_local3.push(_local4);
}
}
}
return(_local3);
}
static function ancestorOrSelf(contextNode) {
var _local1 = ancestor(contextNode);
_local1.push(contextNode);
return(_local1);
}
static function attribute(contextNode) {
var _local7 = new Array();
for (var _local8 in contextNode.attributes) {
_local7.push({parentNode:contextNode, nodeName:_local8, nodeType:5, nodeValue:contextNode.attributes[_local8], toString:function () {
return(this.nodeValue);
}});
}
return(_local7);
}
static function child(contextNode) {
return(contextNode.childNodes);
}
static function stringValue(contextNode) {
var _local5 = contextNode.childNodes;
var _local4 = new Array();
var _local3;
switch (contextNode.nodeType) {
case 1 :
_local3 = new Array();
var _local1 = 0;
while (_local1 < contextNode.childNodes.length) {
switch (contextNode.childNodes[_local1].nodeType) {
case 3 :
_local3.push(contextNode.childNodes[_local1].nodeValue);
break;
case 1 :
_local3.push(stringValue(contextNode.childNodes[_local1]));
}
_local1++;
}
_local4.push(_local3.join(""));
break;
case 3 :
case 5 :
_local4.push(contextNode.nodeValue);
}
return(_local4);
}
static function descendant(contextNode) {
var _local4 = contextNode;
var _local5 = new Array();
var _local2 = 0;
while (_local2 < _local4.childNodes.length) {
if (_local4.childNodes[_local2].nodeType == 1) {
_local5.push(_local4.childNodes[_local2]);
var _local3 = descendant(_local4.childNodes[_local2]);
var _local1 = 0;
while (_local1 < _local3.length) {
_local5.push(_local3[_local1]);
_local1++;
}
}
_local2++;
}
return(_local5);
}
static function descendantOrSelf(contextNode) {
var _local1 = descendant(contextNode);
_local1.splice(0, 0, contextNode);
return(_local1);
}
static function following(contextNode) {
var _local6 = new Array();
var _local9 = followingSibling(contextNode);
var _local8 = ancestor(contextNode);
var _local7 = 0;
while (_local7 < _local9.length) {
var _local4 = descendantOrSelf(_local9[_local7]);
var _local3 = 0;
while (_local3 < _local4.length) {
_local6.push(_local4[_local3]);
_local3++;
}
_local7++;
}
_local7 = 0;
while (_local7 < _local8.length) {
var _local5 = followingSibling(_local8[_local7]);
var _local3 = 0;
while (_local3 < _local5.length) {
var _local2 = descendantOrSelf(_local5[_local3]);
var _local1 = 0;
while (_local1 < _local2.length) {
_local6.push(_local2[_local1]);
_local1++;
}
_local3++;
}
_local7++;
}
return(_local6);
}
static function followingSibling(contextNode) {
var _local2 = new Array();
var _local1 = contextNode;
while (_local1 = _local1.nextSibling , _local1 != null) {
_local2.push(_local1);
}
return(_local2);
}
static function parent(contextNode) {
return(new Array(contextNode.parentNode));
}
static function preceding(contextNode) {
var _local6 = new Array();
var _local9 = precedingSibling(contextNode);
var _local8 = ancestor(contextNode);
var _local7 = 0;
while (_local7 < _local8.length) {
var _local4 = precedingSibling(_local8[_local7]);
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = descendantOrSelf(_local4[_local3]);
var _local1 = 0;
while (_local1 < _local2.length) {
_local6.push(_local2[_local1]);
_local1++;
}
_local3++;
}
_local7++;
}
_local7 = 0;
while (_local7 < _local9.length) {
var _local5 = descendantOrSelf(_local9[_local7]);
var _local3 = 0;
while (_local3 < _local5.length) {
_local6.push(_local5[_local3]);
_local3++;
}
_local7++;
}
return(_local6);
}
static function precedingSibling(contextNode) {
var _local2 = new Array();
var _local1 = contextNode;
while (_local1 = _local1.previousSibling , _local1 != null) {
_local2.push(_local1);
}
_local2.reverse();
return(_local2);
}
static function self(contextNode) {
return([contextNode]);
}
static function root(contextNode) {
while (contextNode.parentNode != null) {
contextNode = contextNode.parentNode;
}
return([contextNode.firstChild]);
}
}
Symbol 544 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathLexer] Frame 0
class com.xfactorstudio.xml.xpath.XPathLexer
{
var functionNames, axisNames, operatorNames, path, tokenizer, lastToken, handler, lastOpenPeran;
function XPathLexer (path) {
functionNames = com.xfactorstudio.xml.xpath.XPathFunctions.Tokens;
axisNames = new com.xfactorstudio.xml.xpath.XPathAxisNames();
operatorNames = new com.xfactorstudio.xml.xpath.XPathPredicateOperator();
}
function parse(path) {
this.path = path;
tokenizer = new com.xfactorstudio.xml.xpath.Tokenizer(this.path);
var _local2;
while (tokenizer.hasMoreChars()) {
_local2 = tokenizer.nextToken();
switch (_local2.type) {
case com.xfactorstudio.xml.xpath.TokenTypes.SLASH :
onSlash(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.IDENTIFIER :
onIdentifier(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.AT :
onAt();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.AND :
case com.xfactorstudio.xml.xpath.TokenTypes.DIV :
case com.xfactorstudio.xml.xpath.TokenTypes.EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.MINUS :
case com.xfactorstudio.xml.xpath.TokenTypes.MOD :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.OR :
case com.xfactorstudio.xml.xpath.TokenTypes.PIPE :
case com.xfactorstudio.xml.xpath.TokenTypes.PLUS :
onOperator(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.INTEGER :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE :
onNumber(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.DOT :
onDot();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.DOT_DOT :
onDoubleDot();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON :
break;
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_SLASH :
onDoubleSlash(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.EOF :
break;
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET :
onLeftBracket(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN :
onLeftParen();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.LITERAL :
onLitteral(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_BRACKET :
onRightBracket();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_PAREN :
onRightParen();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.STAR :
if (tokenizer.LA(1) == ":") {
_local2.type = com.xfactorstudio.xml.xpath.TokenTypes.IDENTIFIER;
_local2.text = _local2.text + tokenizer.nextToken().text;
_local2.text = _local2.text + tokenizer.nextToken().text;
onIdentifier(_local2);
} else {
onStar();
break;
}
case com.xfactorstudio.xml.xpath.TokenTypes.DOLLAR :
case com.xfactorstudio.xml.xpath.TokenTypes.COMMA :
case com.xfactorstudio.xml.xpath.TokenTypes.SKIP :
}
lastToken = _local2;
}
}
function onSlash(t) {
switch (lastTokenType) {
case IDENTIFIER :
case PREDICATEEND :
case AXIS :
lastTokenType = OPERATOR;
break;
default :
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.ROOT);
lastTokenType = AXIS;
}
}
function onStar() {
switch (lastToken.type) {
case com.xfactorstudio.xml.xpath.TokenTypes.AT :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET :
case com.xfactorstudio.xml.xpath.TokenTypes.AND :
case com.xfactorstudio.xml.xpath.TokenTypes.DIV :
case com.xfactorstudio.xml.xpath.TokenTypes.EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.MINUS :
case com.xfactorstudio.xml.xpath.TokenTypes.MOD :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.OR :
case com.xfactorstudio.xml.xpath.TokenTypes.PIPE :
case com.xfactorstudio.xml.xpath.TokenTypes.PLUS :
handler.onOperator("*");
break;
default :
handler.onIdentifier("*");
}
}
function onAt() {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.ATTRIBUTE);
lastTokenType = AXIS;
}
function onDot() {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.SELF);
lastTokenType = AXIS;
}
function onDoubleDot() {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.PARENT);
lastTokenType = AXIS;
}
function onDoubleSlash(t) {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.DECENDANT_OR_SELF);
lastTokenType = AXIS;
}
function onNumber(t) {
handler.onNumber(Number(t.text));
lastTokenType = NUMBER;
}
function onIdentifier(t) {
var _local2 = t.text;
if (tokenizer.LA(1) == "(") {
switch (t.text) {
case "node" :
case "text" :
handler.onIdentifier(t.text + "()");
lastTokenType = IDENTIFIER;
tokenizer.nextToken();
tokenizer.nextToken();
return(undefined);
}
handler.onFunctionStart(functionNames[t.text]);
lastTokenType = FUNCTIONSTART;
lastOpenPeran = FUNCTIONSTART;
tokenizer.nextToken();
return(undefined);
}
if (tokenizer.LA(1) == ":") {
if (tokenizer.LA(2) == ":") {
_local2 = _local2 + tokenizer.nextToken().text;
handler.onAxis(axisNames[_local2]);
lastTokenType = AXIS;
return(undefined);
}
_local2 = _local2 + tokenizer.nextToken().text;
_local2 = _local2 + tokenizer.nextToken().text;
}
switch (lastTokenType) {
case AXIS :
case PREDICATESTART :
case GROUPSTART :
case FUNCTIONSTART :
case OPERATOR :
case -1 :
handler.onIdentifier(_local2);
lastTokenType = IDENTIFIER;
break;
}
}
function onRightParen() {
switch (lastOpenPeran) {
case GROUPSTART :
handler.onGroupEnd();
lastTokenType = GROUPEND;
break;
case FUNCTIONSTART :
handler.onFunctionEnd();
lastTokenType = FUNCTIONEND;
}
}
function onLeftParen() {
handler.onGroupStart();
lastTokenType = GROUPSTART;
lastOpenPeran = GROUPSTART;
}
function onLitteral(t) {
handler.onLitteral(t.text);
lastTokenType = LITTERAL;
}
function onLeftBracket(t) {
handler.onPredicateStart();
lastTokenType = PREDICATESTART;
}
function onRightBracket(t) {
handler.onPredicateEnd();
lastTokenType = PREDICATEEND;
}
function onOperator(t) {
handler.onOperator(operatorNames[t.text]);
lastTokenType = OPERATOR;
}
var lastTokenType = -1;
var inFunction = 0;
var inGroup = 0;
var inPredicate = 0;
static var AXIS = 0;
static var PREDICATESTART = 1;
static var PREDICATEEND = 2;
static var IDENTIFIER = 3;
static var FUNCTIONSTART = 4;
static var FUNCTIONEND = 5;
static var OPERATOR = 6;
static var COMMA = 7;
static var GROUPSTART = 8;
static var GROUPEND = 9;
static var NUMBER = 10;
static var LITTERAL = 11;
}
Symbol 545 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathAxisNames] Frame 0
class com.xfactorstudio.xml.xpath.XPathAxisNames
{
var ancestor::, ancestor-or-self::, attribute::, @, child::, descendant::, descendant-or-self::, //, following::, following-sibling::, parent::, .., preceding::, preceding-sibling::, self::, namespace::;
function XPathAxisNames () {
ancestor:: = com.xfactorstudio.xml.xpath.Axes.ANCESTOR;
ancestor-or-self:: = com.xfactorstudio.xml.xpath.Axes.ANCESTOR_OR_SELF;
attribute:: = com.xfactorstudio.xml.xpath.Axes.ATTRIBUTE;
@ = com.xfactorstudio.xml.xpath.Axes.ATTRIBUTE;
child:: = com.xfactorstudio.xml.xpath.Axes.CHILD;
descendant:: = com.xfactorstudio.xml.xpath.Axes.DECENDANT;
descendant-or-self:: = com.xfactorstudio.xml.xpath.Axes.DECENDANT_OR_SELF;
// = com.xfactorstudio.xml.xpath.Axes.DECENDANT_OR_SELF;
following:: = com.xfactorstudio.xml.xpath.Axes.FOLLOWING;
following-sibling:: = com.xfactorstudio.xml.xpath.Axes.FOLLOWING_SIBLING;
parent:: = com.xfactorstudio.xml.xpath.Axes.PARENT;
.. = com.xfactorstudio.xml.xpath.Axes.PARENT;
preceding:: = com.xfactorstudio.xml.xpath.Axes.PRECEDING;
preceding-sibling:: = com.xfactorstudio.xml.xpath.Axes.PRECEDING_SIBLING;
self:: = com.xfactorstudio.xml.xpath.Axes.SELF;
this["."] = com.xfactorstudio.xml.xpath.Axes.SELF;
namespace:: = com.xfactorstudio.xml.xpath.Axes.NAMESPACE;
}
}
Symbol 546 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Axes] Frame 0
class com.xfactorstudio.xml.xpath.Axes
{
function Axes () {
}
static function getName(index) {
switch (index) {
case 0 :
return("root");
case 1 :
return("ancestor");
case 2 :
return("ancestorOrSelf");
case 3 :
return("attribute");
case 4 :
return("child");
case 5 :
return("descendant");
case 6 :
return("descendantOrSelf");
case 7 :
return("following");
case 8 :
return("followingSibling");
case 9 :
return("parent");
case 10 :
return("preceding");
case 11 :
return("precedingSibling");
case 12 :
return("self");
case 13 :
return("namespace");
}
}
static var ROOT = 0;
static var ANCESTOR = 1;
static var ANCESTOR_OR_SELF = 2;
static var ATTRIBUTE = 3;
static var CHILD = 4;
static var DECENDANT = 5;
static var DECENDANT_OR_SELF = 6;
static var FOLLOWING = 7;
static var FOLLOWING_SIBLING = 8;
static var PARENT = 9;
static var PRECEDING = 10;
static var PRECEDING_SIBLING = 11;
static var SELF = 12;
static var NAMESPACE = 13;
}
Symbol 547 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathPredicateOperator] Frame 0
class com.xfactorstudio.xml.xpath.XPathPredicateOperator
{
var +, -, =, !, >, <, !=, >=, <=, *, mod, div, and, or, |;
function XPathPredicateOperator () {
+ = 200;
- = 201;
= = 202;
! = 203;
> = 204;
< = 205;
!= = 206;
>= = 207;
<= = 208;
* = 209;
mod = 210;
div = 211;
and = 212;
or = 213;
| = 214;
}
}
Symbol 548 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Tokenizer] Frame 0
class com.xfactorstudio.xml.xpath.Tokenizer
{
var xpath, currentPosition, endPosition;
function Tokenizer (xpath) {
setXPath(xpath);
}
function setXPath(xpath) {
this.xpath = xpath;
currentPosition = 0;
endPosition = xpath.length;
}
function nextToken() {
var _local2 = null;
do {
_local2 = null;
switch (LA(1)) {
case "$" :
_local2 = dollar();
break;
case "\"" :
case "'" :
_local2 = literal();
break;
case "/" :
_local2 = slashes();
break;
case "," :
_local2 = comma();
break;
case "(" :
_local2 = leftParen();
break;
case ")" :
_local2 = rightParen();
break;
case "[" :
_local2 = leftBracket();
break;
case "]" :
_local2 = rightBracket();
break;
case "+" :
_local2 = plus();
break;
case "-" :
_local2 = minus();
break;
case "<" :
case ">" :
_local2 = relationalOperator();
break;
case "=" :
_local2 = equals();
break;
case "!" :
if (LA(2) == "=") {
_local2 = notEquals();
} else {
_local2 = Not();
}
break;
case "|" :
_local2 = pipe();
break;
case "@" :
_local2 = at();
break;
case ":" :
if (LA(2) == ":") {
_local2 = doubleColon();
} else {
_local2 = colon();
}
break;
case "*" :
_local2 = star();
break;
case "." :
switch (LA(2)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
_local2 = numberTok();
break;
default :
_local2 = dots();
}
break;
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
_local2 = numberTok();
break;
case " " :
case "\t" :
case newline :
case "\r" :
_local2 = whitespace();
break;
default :
if (!isIdentifierStartChar(LA(1))) {
break;
}
_local2 = identifierOrOperatorName();
}
if (_local2 == null) {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.EOF, text:xpath.substring(currentPosition, endPosition)};
}
} while (_local2.type == com.xfactorstudio.xml.xpath.TokenTypes.SKIP);
previousToken = _local2;
return(_local2);
}
function identifierOrOperatorName() {
var _local2 = null;
if (previousToken != null) {
switch (previousToken.type) {
case com.xfactorstudio.xml.xpath.TokenTypes.AT :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET :
case com.xfactorstudio.xml.xpath.TokenTypes.AND :
case com.xfactorstudio.xml.xpath.TokenTypes.OR :
case com.xfactorstudio.xml.xpath.TokenTypes.MOD :
case com.xfactorstudio.xml.xpath.TokenTypes.DIV :
case com.xfactorstudio.xml.xpath.TokenTypes.COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.SLASH :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_SLASH :
case com.xfactorstudio.xml.xpath.TokenTypes.PIPE :
case com.xfactorstudio.xml.xpath.TokenTypes.DOLLAR :
case com.xfactorstudio.xml.xpath.TokenTypes.PLUS :
case com.xfactorstudio.xml.xpath.TokenTypes.MINUS :
case com.xfactorstudio.xml.xpath.TokenTypes.STAR :
case com.xfactorstudio.xml.xpath.TokenTypes.COMMA :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS :
_local2 = identifier();
break;
default :
_local2 = operatorName();
}
} else {
_local2 = identifier();
}
return(_local2);
}
function identifier() {
var _local2 = null;
var _local3 = currentPosition;
while (hasMoreChars()) {
if (isIdentifierChar(LA(1))) {
consume();
} else {
break;
}
}
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.IDENTIFIER, text:xpath.substring(_local3, currentPosition)};
return(_local2);
}
function operatorName() {
var _local2 = null;
switch (LA(1)) {
case "a" :
_local2 = And();
break;
case "o" :
_local2 = Or();
break;
case "m" :
_local2 = mod();
break;
case "d" :
_local2 = div();
}
return(_local2);
}
function mod() {
var _local2 = null;
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.MOD, text:"mod"};
consume();
consume();
consume();
return(_local2);
}
function div() {
var _local2 = null;
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DIV, text:xpath.substring(currentPosition, currentPosition + 3)};
consume();
consume();
consume();
return(_local2);
}
function And() {
var _local2 = null;
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.AND, text:"and"};
consume();
consume();
consume();
return(_local2);
}
function Or() {
var _local2 = null;
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.OR, text:"or"};
consume();
consume();
return(_local2);
}
function numberTok() {
var _local5 = currentPosition;
var _local2 = true;
var _local3 = true;
while (_local3) {
switch (LA(1)) {
case "." :
if (_local2) {
_local2 = false;
consume();
} else {
break;
}
break;
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
consume();
break;
default :
_local3 = false;
}
}
var _local4 = null;
if (_local2) {
_local4 = {type:com.xfactorstudio.xml.xpath.TokenTypes.INTEGER, text:xpath.substring(_local5, currentPosition)};
} else {
_local4 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE, text:xpath.substring(_local5, currentPosition)};
}
return(_local4);
}
function whitespace() {
consume();
while (hasMoreChars()) {
switch (LA(1)) {
case " " :
case "\t" :
case newline :
case "\r" :
consume();
continue;//outer level
}
return({type:com.xfactorstudio.xml.xpath.TokenTypes.SKIP, text:xpath.substring(0, 0)});
}
}
function comma() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.COMMA, text:","};
consume();
return(_local2);
}
function equals() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.EQUALS, text:"="};
consume();
return(_local2);
}
function minus() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.MINUS, text:"-"};
consume();
return(_local2);
}
function plus() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.PLUS, text:"+"};
consume();
return(_local2);
}
function dollar() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOLLAR, text:"$"};
consume();
return(_local2);
}
function pipe() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.PIPE, text:"|"};
consume();
return(_local2);
}
function at() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.AT, text:"@"};
consume();
return(_local2);
}
function colon() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.COLON, text:":"};
consume();
return(_local2);
}
function doubleColon() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON, text:"::"};
consume();
consume();
return(_local2);
}
function Not() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.NOT, text:"!"};
consume();
return(_local2);
}
function notEquals() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS, text:"!="};
consume();
consume();
return(_local2);
}
function relationalOperator() {
var _local2 = null;
switch (LA(1)) {
case "<" :
if (LA(2) == "=") {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS, text:"<="};
consume();
} else {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN, text:"<"};
}
consume();
break;
case ">" :
if (LA(2) == "=") {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS, text:">="};
consume();
} else {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN, text:">"};
}
consume();
}
return(_local2);
}
function star() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.STAR, text:"*"};
consume();
return(_local2);
}
function literal() {
var _local2 = null;
var _local5 = LA(1);
consume();
var _local6 = currentPosition;
while ((_local2 == null) && (hasMoreChars())) {
if (LA(1) == _local5) {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LITERAL, text:xpath.substring(_local6, currentPosition)};
}
consume();
}
return(_local2);
}
function dots() {
var _local2 = null;
switch (LA(2)) {
case "." :
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOT_DOT, text:".."};
consume();
consume();
break;
default :
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOT, text:"."};
consume();
}
return(_local2);
}
function leftBracket() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET, text:"["};
consume();
return(_local2);
}
function rightBracket() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_BRACKET, text:"]"};
consume();
return(_local2);
}
function leftParen() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN, text:"("};
consume();
return(_local2);
}
function rightParen() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_PAREN, text:")"};
consume();
return(_local2);
}
function slashes() {
var _local2 = null;
switch (LA(2)) {
case "/" :
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_SLASH, text:"//"};
consume();
consume();
break;
default :
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.SLASH, text:"/"};
consume();
}
return(_local2);
}
function LA(i) {
return(xpath.charAt(currentPosition + (i - 1)));
}
function consume() {
currentPosition++;
}
function hasMoreChars() {
return(currentPosition < endPosition);
}
function isIdentifierChar(c) {
return(isUnicodeIdentifierPart(c));
}
function isIdentifierStartChar(c) {
return("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".indexOf(c) != -1);
}
static function isUnicodeIdentifierPart(c) {
return("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".indexOf(c) != -1);
}
static function isNumber(c) {
return(!isNaN(c));
}
var previousToken = null;
}
Symbol 549 MovieClip [__Packages.com.xfactorstudio.xml.xpath.TokenTypes] Frame 0
class com.xfactorstudio.xml.xpath.TokenTypes
{
function TokenTypes () {
}
static function getName(i) {
switch (i) {
case AND :
return("AND");
case AT :
return("AT");
case COLON :
return("COLON");
case COMMA :
return("COMMA");
case DIV :
return("DIV");
case DOLLAR :
return("DOLLAR");
case DOT :
return("DOT");
case DOT_DOT :
return("DOT_DOT");
case DOUBLE :
return("DOUBLE");
case DOUBLE_COLON :
return("DOUBLE_COLON");
case DOUBLE_SLASH :
return("DOUBLE_SLASH");
case EOF :
return("EOF");
case EQUALS :
return("EQUALS");
case GREATER_THAN :
return("GREATER_THAN");
case GREATER_THAN_EQUALS :
return("GREATER_THAN_EQUALS");
case IDENTIFIER :
return("IDENTIFIER");
case INTEGER :
return("INTEGER");
case LEFT_BRACKET :
return("LEFT_BRACKET");
case LEFT_PAREN :
return("LEFT_PAREN");
case LESS_THAN :
return("LESS_THAN");
case LESS_THAN_EQUALS :
return("LESS_THAN_EQUALS");
case LITERAL :
return("LITERAL");
case MINUS :
return("MINUS");
case MOD :
return("MOD");
case NOT :
return("NOT");
case NOT_EQUALS :
return("NOT_EQUALS");
case OR :
return("OR");
case PIPE :
return("PIPE");
case PLUS :
return("PLUS");
case RIGHT_BRACKET :
return("RIGHT_BRACKET");
case RIGHT_PAREN :
return("RIGHT_PAREN");
case SKIP :
return("SKIP");
case SLASH :
return("SLASH");
case STAR :
return("STAR");
}
}
static var LEFT_PAREN = 1;
static var RIGHT_PAREN = 2;
static var LEFT_BRACKET = 3;
static var RIGHT_BRACKET = 4;
static var PLUS = 5;
static var MINUS = 6;
static var LESS_THAN = 7;
static var LESS_THAN_EQUALS = 8;
static var GREATER_THAN = 9;
static var GREATER_THAN_EQUALS = 10;
static var SLASH = 11;
static var DOUBLE_SLASH = 12;
static var DOT = 13;
static var DOT_DOT = 14;
static var IDENTIFIER = 15;
static var AT = 16;
static var PIPE = 17;
static var COLON = 18;
static var DOUBLE_COLON = 19;
static var STAR = 20;
static var EQUALS = 21;
static var NOT_EQUALS = 22;
static var NOT = 23;
static var DIV = 24;
static var MOD = 25;
static var DOLLAR = 26;
static var LITERAL = 27;
static var AND = 28;
static var OR = 29;
static var INTEGER = 30;
static var DOUBLE = 31;
static var COMMA = 32;
static var SKIP = -2;
static var EOF = -1;
}
Symbol 550 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Token] Frame 0
class com.xfactorstudio.xml.xpath.Token
{
var tokenType, parseText, tokenBegin, tokenEnd;
function Token (tokenType, parseText, tokenBegin, tokenEnd) {
setTokenType(tokenType);
setParseText(parseText);
setTokenBegin(tokenBegin);
setTokenEnd(tokenEnd);
}
function setTokenType(tokenType) {
this.tokenType = tokenType;
}
function getTokenType() {
return(tokenType);
}
function setParseText(parseText) {
this.parseText = parseText;
}
function getTokenText() {
return(parseText.substring(getTokenBegin(), getTokenEnd()));
}
function setTokenBegin(tokenBegin) {
this.tokenBegin = tokenBegin;
}
function getTokenBegin() {
return(tokenBegin);
}
function setTokenEnd(tokenEnd) {
this.tokenEnd = tokenEnd;
}
function getTokenEnd() {
return(tokenEnd);
}
function toString() {
return(((("[ (" + com.xfactorstudio.xml.xpath.TokenTypes.getName(tokenType)) + ") (") + getTokenText()) + ")");
}
}
Symbol 551 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Func] Frame 0
class com.xfactorstudio.xml.xpath.types.Func extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue, parentNode, childNodes;
function Func (name) {
super();
nodeValue = name;
}
function register() {
parentNode.hasFunctions = true;
}
function clone() {
var _local3 = new com.xfactorstudio.xml.xpath.types.Func(nodeValue);
super.clone(_local3);
return(_local3);
}
function execute(context, axis) {
var _local2 = 0;
while (_local2 < childNodes.length) {
switch (typeof(childNodes[_local2])) {
case "string" :
case "boolean" :
case "number" :
break;
default :
childNodes[_local2] = childNodes[_local2].execute(context);
}
_local2++;
}
return(com.xfactorstudio.xml.xpath.XPathFunctions.getFunction(nodeValue).call(this, childNodes, context[0], axis));
}
var nodeName = "function";
}
Symbol 552 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Group] Frame 0
class com.xfactorstudio.xml.xpath.types.Group extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var childNodes;
function Group () {
super();
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Group();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local7;
var _local5 = new com.xfactorstudio.xml.xpath.types.Predicate();
var _local2 = 0;
while (_local2 < childNodes.length) {
_local5.appendChild(childNodes[_local2]);
_local2++;
}
var _local8 = new Array();
var _local3 = 0;
while (_local3 < context.length) {
var _local4 = _local5.clone();
_local7 = com.xfactorstudio.xml.xpath.types.Predicate.staticEvaluate(_local4, context[_local3]);
_local3++;
}
return(_local7);
}
var nodeName = "group";
}
Symbol 553 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Predicate] Frame 0
class com.xfactorstudio.xml.xpath.types.Predicate extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var childNodes;
function Predicate () {
super();
}
function appendChild(child) {
childNodes.push(child);
childNodes[childNodes.length - 1].parentNode = this;
child.register();
return(childNodes[childNodes.length - 1]);
}
function execute(context) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < context.length) {
var _local5 = clone();
var _local2 = evaluate(_local5, context[_local3], context);
if (typeof(_local2) == "number") {
_local2 = _local2 == getChildIndex(context[_local3]);
} else {
_local2 = com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(_local2);
}
if (_local2) {
_local6.push(context[_local3]);
}
_local3++;
}
return(_local6);
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Predicate();
super.clone(_local2);
return(_local2);
}
static function staticEvaluate(test, contextNode, axis) {
solveGroups(test, contextNode);
solveFunctions(test, contextNode, axis);
solvePaths(test, contextNode);
solveUnions(test, contextNode);
solveMultiplicativeExpressions(test, contextNode);
solveAdditiveExpressions(test, contextNode);
solveRelationalExpressions(test, contextNode);
solveEqualityExpressions(test, contextNode);
solveLogicalAndExpressions(test, contextNode);
solveLogicalOrExpressions(test, contextNode);
return(test.childNodes[0]);
}
function evaluate(test, contextNode, axis) {
if (hasGroups) {
solveGroups(test, contextNode);
}
if (hasFunctions) {
solveFunctions(test, contextNode, axis);
}
if (hasPaths) {
solvePaths(test, contextNode);
}
if (hasUnions) {
solveUnions(test, contextNode);
}
if (hasMultiplicativeExpressions) {
solveMultiplicativeExpressions(test, contextNode);
}
if (hasAdditiveExpressions) {
solveAdditiveExpressions(test, contextNode);
}
if (hasRelationalExpressions) {
solveRelationalExpressions(test, contextNode);
}
if (hasEqualityExpressions) {
solveEqualityExpressions(test, contextNode);
}
if (hasLogicalAndExpressions) {
solveLogicalAndExpressions(test, contextNode);
}
if (hasLogicalOrExpressions) {
solveLogicalOrExpressions(test, contextNode);
}
return(test.childNodes[0]);
}
static function solveEqualityExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Operator) {
switch (test.childNodes[_local1].nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.EQUALS :
test.childNodes.splice(_local1 - 1, 3, isEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.NOT_EQUALS :
test.childNodes.splice(_local1 - 1, 3, isNotEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
}
_local1++;
}
}
static function solveMultiplicativeExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
switch (test.childNodes[_local1].nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.MULTIPLY :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) * Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.MOD :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) % Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.DIV :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) / Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveAdditiveExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
switch (test.childNodes[_local1].nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.PLUS :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) + Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.MINUS :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) - Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveLogicalAndExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1].nodeValue == com.xfactorstudio.xml.xpath.Operators.AND) {
var _local3 = ((isTrue(test.childNodes[_local1 - 1]) && (isTrue(test.childNodes[_local1 + 1]))) ? true : false);
test.childNodes.splice(_local1 - 1, 3, _local3);
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveLogicalOrExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1].nodeValue == com.xfactorstudio.xml.xpath.Operators.OR) {
var _local3 = ((isTrue(test.childNodes[_local1 - 1]) || (isTrue(test.childNodes[_local1 + 1]))) ? true : false);
test.childNodes.splice(_local1 - 1, 3, _local3);
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveRelationalExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
switch (test.childNodes[_local1].nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN :
test.childNodes.splice(_local1 - 1, 3, isGreaterThan(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN :
test.childNodes.splice(_local1 - 1, 3, isLessThan(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN_OR_EQUAL_TO :
test.childNodes.splice(_local1 - 1, 3, isGreaterThanOrEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN_OR_EQUAL_TO :
test.childNodes.splice(_local1 - 1, 3, isLessThanOrEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solvePaths(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Path) {
test.childNodes[_local1] = test.childNodes[_local1].execute([contextNode]);
}
_local1++;
}
}
static function solveUnions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Operator) {
if (test.childNodes[_local1].nodeValue == com.xfactorstudio.xml.xpath.Operators.UNION) {
test.childNodes[_local1 - 1] = test.childNodes[_local1 - 1].concat(test.childNodes[_local1 + 1]);
test.childNodes[_local1 - 1].sort(sortByIndexFunction);
test.childNodes.splice(_local1 - 1, 3, test.childNodes[_local1 - 1]);
_local1 = _local1 - 2;
}
}
_local1++;
}
}
static function solveGroups(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Group) {
var _local3 = test.childNodes[_local1].execute([contextNode]);
test.childNodes.splice(_local1, 1, _local3);
}
_local1++;
}
}
static function solveFunctions(test, contextNode, axis) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Func) {
var _local3 = test.childNodes[_local1].execute([contextNode], axis);
test.childNodes.splice(_local1, 1, _local3);
}
_local1++;
}
}
static function sortByIndexFunction(a, b) {
var _local3 = getDocumentOrder(a);
var _local2 = getDocumentOrder(b);
var _local1 = 0;
while (_local1 < _local3.length) {
if (_local2[_local1] == null) {
return(1);
}
if (_local3[_local1] > _local2[_local1]) {
return(1);
}
if (_local3[_local1] < _local2[_local1]) {
return(-1);
}
_local1++;
}
if (_local2.length > _local3.length) {
return(-1);
}
return(0);
}
static function isEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 == _local1.val2);
}
static function isNotEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 != _local1.val2);
}
static function isGreaterThan(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 > _local1.val2);
}
static function isLessThan(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 < _local1.val2);
}
static function isGreaterThanOrEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 >= _local1.val2);
}
static function isLessThanOrEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 <= _local1.val2);
}
static function getChildIndex(kid) {
var _local2 = kid.parentNode.childNodes;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == kid.nodeName) {
_local3++;
}
if (_local2[_local1] === kid) {
return(_local3);
}
_local1++;
}
return(0);
}
static function getDocumentOrder(kid) {
var _local2 = [];
while (kid.parentNode != null) {
_local2.push(getIndex(kid));
kid = kid.parentNode;
}
return(_local2.reverse());
}
static function getIndex(kid) {
var _local3 = kid.parentNode.childNodes;
var _local2 = 0;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2++;
if (_local3[_local1] === kid) {
return(_local2);
}
_local1++;
}
return(0);
}
static function getIndexOfType(kid) {
var _local2 = kid.parentNode.childNodes;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == kid.nodeName) {
_local3++;
if (_local2[_local1] === kid) {
return(_local3);
}
}
_local1++;
}
return(0);
}
static function convertForComparison(val1, val2) {
var _local2;
var _local1;
_local2 = typeof(val1);
_local1 = typeof(val2);
if ((_local2 == "boolean") || (_local1 == "boolean")) {
val1 = com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(val1);
val2 = com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(val2);
return({val1:val1, val2:val2});
}
if ((_local2 == "number") || (_local1 == "number")) {
val1 = com.xfactorstudio.xml.xpath.XPathFunctions.toNumber(val1);
val2 = com.xfactorstudio.xml.xpath.XPathFunctions.toNumber(val2);
return({val1:val1, val2:val2});
}
if ((_local2 == "string") || (_local1 == "string")) {
val1 = com.xfactorstudio.xml.xpath.XPathFunctions.toString(val1);
val2 = com.xfactorstudio.xml.xpath.XPathFunctions.toString(val2);
return({val1:val1, val2:val2});
}
return({val1:val1, val2:val2});
}
static function isTrue(test) {
return(com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(test));
}
var nodeName = "predicate";
var hasGroups = false;
var hasPaths = false;
var hasFunctions = false;
var hasUnions = false;
var hasAdditiveExpressions = false;
var hasMultiplicativeExpressions = false;
var hasRelationalExpressions = false;
var hasEqualityExpressions = false;
var hasLogicalAndExpressions = false;
var hasLogicalOrExpressions = false;
}
Symbol 554 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Operator] Frame 0
class com.xfactorstudio.xml.xpath.types.Operator extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue, parentNode;
function Operator (type) {
super();
nodeValue = type;
}
function register() {
switch (nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.EQUALS :
case com.xfactorstudio.xml.xpath.Operators.NOT_EQUALS :
parentNode.hasEqualityExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.MULTIPLY :
case com.xfactorstudio.xml.xpath.Operators.MOD :
case com.xfactorstudio.xml.xpath.Operators.DIV :
parentNode.hasMultiplicativeExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.PLUS :
case com.xfactorstudio.xml.xpath.Operators.MINUS :
parentNode.hasAdditiveExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.AND :
parentNode.hasLogicalAndExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.OR :
parentNode.hasLogicalOrExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN :
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN :
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN_OR_EQUAL_TO :
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN_OR_EQUAL_TO :
parentNode.hasRelationalExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.UNION :
parentNode.hasUnions = true;
}
}
function clone() {
return(this);
}
var nodeName = "operator";
}
Symbol 555 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Operators] Frame 0
class com.xfactorstudio.xml.xpath.Operators
{
function Operators () {
}
static var PLUS = 200;
static var MINUS = 201;
static var EQUALS = 202;
static var NOT = 203;
static var GREATER_THAN = 204;
static var LESS_THAN = 205;
static var NOT_EQUALS = 206;
static var GREATER_THAN_OR_EQUAL_TO = 207;
static var LESS_THAN_OR_EQUAL_TO = 208;
static var MULTIPLY = 209;
static var MOD = 210;
static var DIV = 211;
static var AND = 212;
static var OR = 213;
static var UNION = 214;
}
Symbol 556 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Path] Frame 0
class com.xfactorstudio.xml.xpath.types.Path extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var parentNode, childNodes;
function Path () {
super();
}
function register() {
parentNode.hasPaths = true;
}
function appendChild(child) {
if ((childNodes.length == 0) && (child.nodeValue == com.xfactorstudio.xml.xpath.Axes.SELF)) {
childNodes.push(new com.xfactorstudio.xml.xpath.types.Axis(com.xfactorstudio.xml.xpath.Axes.CHILD));
childNodes[childNodes.length - 1].parentNode = this;
}
if (((!(childNodes[childNodes.length - 1] instanceof com.xfactorstudio.xml.xpath.types.Axis)) && (!(child instanceof com.xfactorstudio.xml.xpath.types.Axis))) && (!(child instanceof com.xfactorstudio.xml.xpath.types.Predicate))) {
childNodes.push(new com.xfactorstudio.xml.xpath.types.Axis(com.xfactorstudio.xml.xpath.Axes.CHILD));
childNodes[childNodes.length - 1].parentNode = this;
}
childNodes.push(child);
childNodes[childNodes.length - 1].parentNode = this;
return(childNodes[childNodes.length - 1]);
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Path();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local2 = 0;
while (_local2 < childNodes.length) {
context = childNodes[_local2].execute(context);
_local2++;
}
return(context);
}
var nodeName = "path";
}
Symbol 557 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Axis] Frame 0
class com.xfactorstudio.xml.xpath.types.Axis extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue;
function Axis (axis) {
super();
nodeValue = axis;
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Axis();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < context.length) {
_local3 = _local3.concat(com.xfactorstudio.xml.xpath.XPathAxes[com.xfactorstudio.xml.xpath.Axes.getName(Number(nodeValue))].call(this, context[_local2]));
_local2++;
}
return(_local3);
}
var nodeName = "axis";
}
Symbol 558 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Identifier] Frame 0
class com.xfactorstudio.xml.xpath.types.Identifier extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue;
function Identifier (name) {
super();
nodeValue = name;
}
function execute(context) {
var _local2 = com.xfactorstudio.xml.xpath.XPath.getNamedNodes(context, nodeValue);
return(_local2);
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Identifier();
super.clone(_local2);
return(_local2);
}
var nodeName = "identifier";
}
Symbol 559 MovieClip [__Packages.com.mosesSupposes.fuse.Fuse] Frame 0
class com.mosesSupposes.fuse.Fuse extends Array
{
var _nID, _aDefaultTargs, length, scope, _nIndex, _oDel1, dispatchEvent, label, autoClear, duration, easing;
function Fuse (fuseAction) {
super();
mx.events.EventDispatcher.initialize(this);
_nID = registerInstance(this);
_nState = -1;
_aDefaultTargs = new Array();
if (arguments.length > 0) {
splice.apply(this, new Array(0, 0).concat(arguments));
}
var _local4 = ["concat", "join", "sort", "sortOn"];
for (var _local5 in _local4) {
com.mosesSupposes.fuse.Fuse.prototype[_local4[_local5]] = function () {
if (com.mosesSupposes.fuse.Fuse.OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("105");
}
};
}
}
function addEventListener(event, handler) {
}
function removeEventListener(event, handler) {
}
function destroy() {
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " destroy.");
}
stop(true);
splice(0, length);
_aDefaultTargs = null;
scope = null;
_global.ASSetPropFlags(this, null, 0, 7);
var _local4 = _nID;
for (var _local3 in this) {
delete this[_local3];
}
removeInstanceAt(_local4, true);
}
static function getInstance(idOrLabel) {
if (typeof(idOrLabel) == "number") {
return(_aInstances[idOrLabel]);
}
if (typeof(idOrLabel) == "string") {
for (var _local2 in _aInstances) {
if (com.mosesSupposes.fuse.Fuse(_aInstances[_local2]).label == idOrLabel) {
return(_aInstances[_local2]);
}
}
}
return(null);
}
static function getInstances(stateFilter, targets) {
var _local10 = (stateFilter == null) || (stateFilter.toUpperCase() == "ALL");
if (!(targets instanceof Array)) {
targets = arguments.slice(1);
}
var _local8 = [];
for (var _local11 in _aInstances) {
var _local5 = _aInstances[_local11];
if (_aInstances[_local11] == null) {
continue;
}
if ((_local10 == false) && (_local5.__get__state() != stateFilter)) {
continue;
}
var _local3 = targets.length == 0;
if (_local3 == false) {
if (_local3 == true) {
continue;
}
var _local2 = _local5.getActiveTargets(true);
for (var _local7 in targets) {
for (var _local6 in _local2) {
if (_local2[_local6] == targets[_local7]) {
_local3 = true;
break;
}
}
}
}
if (_local3 == true) {
_local8.unshift(_local5);
}
}
return(_local8);
}
function get id() {
return(_nID);
}
function get state() {
switch (_nState) {
case -1 :
return("stopped");
case 0 :
return("paused");
case 1 :
return("playing");
}
return(undefined);
}
function get currentIndex() {
return(_nIndex);
}
function get currentLabel() {
return(this[_nIndex].label);
}
function get target() {
return(((_aDefaultTargs.length == 1) ? (_aDefaultTargs[0]) : (_aDefaultTargs)));
}
function set target(t) {
delete _aDefaultTargs;
if (t != null) {
addTarget(t);
}
//return(target);
}
function addTarget(t) {
if (_aDefaultTargs == null) {
_aDefaultTargs = [];
}
if (arguments[0] instanceof Array) {
arguments=arguments[0];//parameter overwritten
arguments[0];
}
for (var _local5 in arguments) {
var _local3 = false;
for (var _local4 in _aDefaultTargs) {
if (arguments[_local5] == _aDefaultTargs[_local4]) {
_local3 = true;
break;
}
}
if (_local3 == false) {
_aDefaultTargs.push(arguments[_local5]);
}
}
}
function removeTarget(t) {
if ((_aDefaultTargs == null) || (_aDefaultTargs.length == 0)) {
return(undefined);
}
if (arguments[0] instanceof Array) {
arguments=arguments[0];//parameter overwritten
arguments[0];
}
for (var _local4 in arguments) {
for (var _local3 in _aDefaultTargs) {
if (arguments[_local4] == _aDefaultTargs[_local3]) {
_aDefaultTargs.splice(Number(_local3), 1);
}
}
}
}
function getActiveTargets(includeDefaults) {
if (_nState == -1) {
return([]);
}
var _local2;
if (includeDefaults == true) {
_local2 = _aDefaultTargs.slice();
} else {
_local2 = [];
}
return(com.mosesSupposes.fuse.FuseItem(this[_nIndex]).getActiveTargets(_local2));
}
function clone() {
var _local3 = [];
var _local2 = 0;
while (_local2 < length) {
_local3.push(com.mosesSupposes.fuse.FuseItem(this[_local2]).getInitObj());
_local2++;
}
var _local4 = new com.mosesSupposes.fuse.Fuse();
_local4.push.apply(_local4, _local3);
_local4.scope = scope;
_local4.__set__target(target);
return(_local4);
}
function push(fuseAction) {
splice.apply(this, new Array(length, 0).concat(arguments));
return(length);
}
function pushTween(targets, props, endvals, seconds, ease, delay, callback) {
push({__buildMode:true, tweenargs:arguments});
return(length);
}
function pop() {
var _local2 = com.mosesSupposes.fuse.FuseItem(this[length - 1]).getInitObj();
splice(length - 1, 1);
return(_local2);
}
function unshift(fuseAction) {
splice.apply(this, new Array(0, 0).concat(arguments));
return(length);
}
function shift() {
var _local2 = com.mosesSupposes.fuse.FuseItem(this[0]).getInitObj();
splice(0, 1);
return(_local2);
}
function splice(startIndex, deleteCount, fuseAction) {
stop(true);
var _local7 = Number(arguments.shift());
if (_local7 < 0) {
_local7 = length + _local7;
}
deleteCount = Number(arguments.shift());
var _local8 = new Array();
var _local5 = 0;
while (_local5 < arguments.length) {
var _local4 = ((arguments[_local5] instanceof com.mosesSupposes.fuse.Fuse) ? (arguments[_local5]) : (new com.mosesSupposes.fuse.FuseItem(_local7 + _local5, arguments[_local5], _nID)));
addEventListener("onStop", _local4);
addEventListener("evtSetStart", _local4);
_local8.push(_local4);
_local5++;
}
var _local6 = super.splice.apply(this, new Array(_local7, deleteCount).concat(_local8));
for (var _local9 in _local6) {
var _local4 = _local6[_local9];
removeEventListener("onStop", _local4);
removeEventListener("evtSetStart", _local4);
if (_local4 instanceof com.mosesSupposes.fuse.Fuse) {
_local4.removeEventListener("onComplete", _oDel1);
} else {
_local4.destroy();
}
}
_local5 = 0;
while (_local5 < length) {
com.mosesSupposes.fuse.FuseItem(this[_local5])._nItemID = _local5;
_local5++;
}
}
function slice(indexA, indexB) {
var _local6 = super.slice(indexA, indexB);
var _local5 = new Array();
var _local4 = 0;
while (_local4 < arguments.length) {
_local5.push(com.mosesSupposes.fuse.FuseItem(this[_local4]).getInitObj());
_local4++;
}
return(_local5);
}
function reverse() {
stop(true);
super.reverse();
var _local3 = 0;
while (_local3 < length) {
com.mosesSupposes.fuse.FuseItem(this[_local3])._nItemID = _local3;
_local3++;
}
}
function traceItems(indexA, indexB) {
var _local5 = "";
var _local4 = super.slice(indexA, indexB);
_local5 = _local5 + ((getHandle() + " traceItems:") + "\n----------\n");
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3] instanceof com.mosesSupposes.fuse.Fuse) {
_local5 = _local5 + (((((getHandle() + ">Item#") + _local3) + ": [Nested Fuse] ") + _local4[_local3]) + newline);
} else {
_local5 = _local5 + (_local4[_local3] + newline);
}
_local3++;
}
_local5 = _local5 + "----------";
com.mosesSupposes.fuse.FuseKitCommon.output(_local5);
}
function toString() {
return(((getHandle() + " (contains ") + length) + ((length == 1) ? " item)" : " items)"));
}
function setStartProps(trueOrItemIDs) {
var _local8 = ((arguments.length == 0) || (trueOrItemIDs === true)) || (trueOrItemIDs == com.mosesSupposes.fuse.FuseKitCommon.ALL);
dispatchEvent({target:this, type:"evtSetStart", all:_local8, filter:((trueOrItemIDs instanceof Array) ? (trueOrItemIDs) : arguments), curIndex:((_nState == 1) ? (_nIndex) : -1), targs:_aDefaultTargs, scope:scope});
}
function start(setStart) {
close();
stop(true);
_nState = 1;
if (length == 0) {
advance(false, true, false);
}
if ((setStart != null) && (setStart != false)) {
setStartProps.apply(this, arguments);
}
dispatchEvent({target:this, type:"onStart"});
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " start.");
}
playCurrentItem();
}
function stop() {
if (_nState != -1) {
var _local3 = 0;
while (_local3 < length) {
if (this[_local3] instanceof com.mosesSupposes.fuse.Fuse) {
com.mosesSupposes.fuse.Fuse(this[_local3]).removeEventListener("onComplete", _oDel1);
if (com.mosesSupposes.fuse.Fuse(this[_local3]).__get__state() == "playing") {
com.mosesSupposes.fuse.Fuse(this[_local3]).stop();
}
} else if ((_local3 == _nIndex) || (com.mosesSupposes.fuse.FuseItem(this[_local3]).hasTriggerFired() == true)) {
com.mosesSupposes.fuse.FuseItem(this[_local3]).stop();
}
_local3++;
}
}
var _local4 = _nState;
_nState = -1;
if ((!(arguments[0] === true)) && (_local4 != -1)) {
dispatchEvent({target:this, type:"onStop"});
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " stop.");
}
}
_nIndex = 0;
clearInterval(_nDelay);
_nTimeCache = (_nDelay = -1);
}
function skipTo(indexOrLabel) {
close();
var _local3 = normalizeIndex(indexOrLabel);
if (_local3 == null) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("102", "skipTo", String(indexOrLabel));
}
return(undefined);
}
if ((_local3 == _nIndex) && (arguments[1] === true)) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("103", String(indexOrLabel), _nIndex);
}
}
if (this[_nIndex] instanceof com.mosesSupposes.fuse.Fuse) {
com.mosesSupposes.fuse.Fuse(this[_nIndex]).removeEventListener("onComplete", _oDel1);
}
stop(true);
_nIndex = _local3;
var _local4 = _nState;
_nState = 1;
if (_local4 == -1) {
dispatchEvent({target:this, type:"onStart"});
}
playCurrentItem();
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output("skipTo:" + _local3);
}
}
function pause() {
if (_nState == 1) {
var _local2 = 0;
while (_local2 <= _nIndex) {
if ((this[_local2].state === "playing") || (this[_local2]._nPlaying > 0)) {
this[_local2].pause();
}
_local2++;
}
if (_nTimeCache != -1) {
_nTimeCache = _nTimeCache - getTimer();
clearInterval(_nDelay);
}
_nState = 0;
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " pause.");
}
dispatchEvent({target:this, type:"onPause"});
}
}
function resume() {
if (_nState != 0) {
return(undefined);
}
close();
_nState = 1;
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " resume.");
}
dispatchEvent({target:this, type:"onResume"});
if (_nTimeCache != -1) {
playCurrentItem(false, true);
}
var _local2 = 0;
while (_local2 <= _nIndex) {
if ((this[_local2] instanceof com.mosesSupposes.fuse.Fuse) && (this[_local2].state == "paused")) {
com.mosesSupposes.fuse.Fuse(this[_local2]).resume();
} else if (this[_local2]._nPlaying == 0) {
com.mosesSupposes.fuse.FuseItem(this[_local2]).pause(true);
}
_local2++;
}
}
function fastForward(resumeAtIndexOrLabel) {
var _local3 = ((resumeAtIndexOrLabel == null) ? (length) : (normalizeIndex(resumeAtIndexOrLabel)));
if (_local3 == null) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("102", "fastForward", String(resumeAtIndexOrLabel));
}
return(undefined);
}
if ((_local3 == 0) || (_local3 <= _nIndex)) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("104", _local3);
}
skipTo(_local3);
return(undefined);
}
clearInterval(_nDelay);
var _local2 = _nIndex;
while (_local2 < _local3) {
this[_local2].fastForward(null, _aDefaultTargs, scope);
advance(false, true, !((_local2 == (_local3 - 1)) && (_local3 < length)));
_local2++;
}
}
function getHandle() {
return("-Fuse" + ((label != undefined) ? ((" \"" + label) + "\"") : ("#" + String(_nID))));
}
function advance(wasTriggered, silentStop, isFF) {
if (_nState < 1) {
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((("** DEVELOPER ALERT: " + getHandle()) + " advance called out of turn! (state:") + state) + " currentIndex:") + currentIndex) + ") Please report this Fuse's details to MosesSupposes.com. **");
}
return(undefined);
}
var _local3 = false;
if ((_nIndex == (length - 1)) && (isFF != true)) {
var _local2 = length - 1;
while (_local2 > -1) {
if (com.mosesSupposes.fuse.FuseItem(this[_local2])._nPlaying > -1) {
return(undefined);
}
_local2--;
}
_local3 = true;
}
if ((wasTriggered == true) && (_local3 == false)) {
return(undefined);
}
if (this[_nIndex] instanceof com.mosesSupposes.fuse.Fuse) {
com.mosesSupposes.fuse.Fuse(this[_nIndex]).removeEventListener("onComplete", _oDel1);
}
if ((_nIndex + 1) >= length) {
stop(silentStop);
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " complete.");
}
_nIndex = length - 1;
dispatchEvent({target:this, type:"onComplete"});
if ((autoClear == true) || ((!(autoClear === false)) && (AUTOCLEAR == true))) {
destroy();
}
return(undefined);
}
_nIndex++;
if (isFF == true) {
return(undefined);
}
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output((getHandle() + " advance: ") + _nIndex);
}
dispatchEvent({target:this, type:"onAdvance"});
playCurrentItem();
}
function playCurrentItem(postDelay, resumeDelay) {
clearInterval(_nDelay);
if ((postDelay != true) || (resumeDelay == true)) {
var _local3 = 0;
if (resumeDelay != true) {
_local3 = (com.mosesSupposes.fuse.FuseItem(this[_nIndex]).evalDelay(scope) || 0) * 1000;
}
if ((_local3 > 0) || (resumeDelay == true)) {
if (resumeDelay == true) {
_local3 = _nTimeCache;
_nTimeCache = _nTimeCache + getTimer();
} else {
var _local4 = Math.abs(_global.com.mosesSupposes.fuse.ZigoEngine.TIME_MULTIPLIER);
if (_global.isNaN(_local4) == true) {
_local4 = 1;
}
_local3 = _local3 * _local4;
_nTimeCache = getTimer() + _local3;
}
_nDelay = setInterval(this, "playCurrentItem", _local3, true);
return(undefined);
}
}
_nTimeCache = (_nDelay = -1);
if (this[_nIndex] instanceof com.mosesSupposes.fuse.Fuse) {
if (_oDel1 == null) {
_oDel1 = mx.utils.Delegate.create(this, advance);
}
com.mosesSupposes.fuse.Fuse(this[_nIndex]).addEventListener("onComplete", _oDel1);
com.mosesSupposes.fuse.Fuse(this[_nIndex]).start(_aDefaultTargs, scope);
} else {
var _local6 = com.mosesSupposes.fuse.FuseItem(this[_nIndex]).startItem(_aDefaultTargs, scope, duration, easing);
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output((getHandle() + " props tweened: ") + _local6);
}
}
}
function evtSetStart(o) {
setStartProps.apply(this, o.filter);
}
static function open(fuseOrID) {
var _local3 = _global.com.mosesSupposes.fuse.ZigoEngine;
if (_local3 == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("106");
return(null);
}
_local3.register(com.mosesSupposes.fuse.Fuse, com.mosesSupposes.fuse.FuseItem);
if (_oBuildMode == null) {
_oBuildMode = {curID:-1, prevID:-1, curGroup:null};
} else if ((_oBuildMode != null) && (_oBuildMode.curID > -1)) {
close();
}
if (fuseOrID != null) {
if (fuseOrID instanceof com.mosesSupposes.fuse.Fuse) {
_oBuildMode.curID = fuseOrID.id;
} else if (getInstance(fuseOrID) != null) {
_oBuildMode.curID = getInstance(fuseOrID).id;
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("107");
return(null);
}
} else {
_oBuildMode.curID = (new com.mosesSupposes.fuse.Fuse()).id;
}
_oBuildMode.prevID = _oBuildMode.curID;
return(getInstance(_oBuildMode.curID));
}
static function openGroup(fuseOrID) {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
open(fuseOrID);
} else if (_oBuildMode.curGroup != null) {
closeGroup();
}
_oBuildMode.curGroup = new Array();
return(getInstance(_oBuildMode.curID));
}
static function closeGroup() {
if ((_oBuildMode.curGroup == null) || (!((_oBuildMode != null) && (_oBuildMode.curID > -1)))) {
return(undefined);
}
getInstance(_oBuildMode.curID).push(_oBuildMode.curGroup);
_oBuildMode.curGroup = null;
}
static function close() {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
return(undefined);
}
if (_oBuildMode.curGroup != null) {
closeGroup();
}
_oBuildMode.curID = -1;
}
static function closeAndStart(setStart) {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
return(undefined);
}
var _local2 = getInstance(_oBuildMode.curID);
close();
_local2.start.apply(_local2, arguments);
}
static function startRecent(setStart) {
var _local2 = getInstance(_oBuildMode.prevID);
if (_local2 != null) {
_local2.start.apply(_local2, arguments);
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("108");
}
}
static function addCommand(commandOrScope, indexOrFunc, argument) {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
return(undefined);
}
var _local4 = _oBuildMode.curGroup != null;
var _local2 = ((_local4 == true) ? (_oBuildMode.curGroup) : (getInstance(_oBuildMode.curID)));
if (typeof(commandOrScope) == "string") {
var _local7 = indexOrFunc != undefined;
var _local5 = com.mosesSupposes.fuse.FuseKitCommon._validateFuseCommand(String(commandOrScope), _local4, _local7, OUTPUT_LEVEL, true);
if (_local5 == true) {
_local2.push({__buildMode:true, command:commandOrScope, commandargs:indexOrFunc});
}
} else {
_local2.push({__buildMode:true, scope:commandOrScope, func:indexOrFunc, args:arguments.slice(2)});
}
}
static function addBuildItem(args) {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
return(false);
}
var _local1 = ((_oBuildMode.curGroup != null) ? (_oBuildMode.curGroup) : (getInstance(_oBuildMode.curID)));
if ((args.length == 1) && (typeof(args[0]) == "object")) {
_local1.push(args[0]);
} else {
_local1.push({__buildMode:true, tweenargs:args});
}
return(true);
}
function normalizeIndex(indexOrLabel) {
var _local4;
if (typeof(indexOrLabel) == "string") {
_local4 = -1;
var _local3 = 0;
while (_local3 < length) {
if (this[_local3].label == String(indexOrLabel)) {
_local4 = _local3;
break;
}
_local3++;
}
if (_local4 == -1) {
return(null);
}
} else {
_local4 = Number(indexOrLabel);
}
if ((_global.isNaN(_local4) == true) || (Math.abs(_local4) >= length)) {
return(null);
}
if (_local4 < 0) {
_local4 = Math.max(0, length + _local4);
}
return(_local4);
}
static function registerInstance(s) {
if (_aInstances == null) {
_aInstances = new Array();
}
return(_aInstances.push(s) - 1);
}
static function removeInstanceAt(id, isDestroyCall) {
if (isDestroyCall != true) {
com.mosesSupposes.fuse.Fuse(_aInstances[id]).destroy();
}
delete _aInstances[id];
}
static var registryKey = "fuse";
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION;
static var OUTPUT_LEVEL = 1;
static var AUTOCLEAR = false;
static var AUTOSTOP = true;
var _nState = -1;
var _nDelay = -1;
var _nTimeCache = -1;
static var _aInstances = null;
static var _oBuildMode = null;
}
Symbol 560 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 561 MovieClip [__Packages.com.mosesSupposes.fuse.FuseItem] Frame 0
class com.mosesSupposes.fuse.FuseItem
{
static var _ZigoEngine, _aInstances;
var _nItemID, _nFuseID, _initObj, _aProfiles, _oElements, _oTemps, _sImage, _aTweens, _oTwBeingAdded;
function FuseItem (id, o, fuseID) {
_ZigoEngine = _global.com.mosesSupposes.fuse.ZigoEngine;
_nItemID = id;
_nFuseID = fuseID;
_initObj = o;
_aProfiles = [];
_oElements = {aEvents:[]};
_oTemps = {};
if (!(o instanceof Array)) {
o = [o];
}
var _local19 = _global.com.mosesSupposes.fuse.Fuse;
_oTemps.outputLevel = ((_local19 != undefined) ? (_local19.OUTPUT_LEVEL) : (_global.com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL));
if (o.length == 1) {
var _local18 = o[0];
var _local12 = ((_local18.action != undefined) ? (_local18.action) : (_local18));
if ((_local12.__buildMode != true) && (_local12.command != undefined)) {
_oElements.command = _local12.command;
_oElements.scope = _local12.scope;
_oElements.args = _local12.args;
_sImage = " Elements:[" + ("command" + ((typeof(_local12.command) == "string") ? ((":\"" + _local12.command) + "\", ") : ", "));
if (_local12.delay != undefined) {
_sImage = _sImage + "delay, ";
_oElements.delay = _local12.delay;
}
_sImage = _sImage.slice(0, -2) + "]";
if ((_local12.func != undefined) && (_oTemps.outputLevel > 0)) {
com.mosesSupposes.fuse.FuseKitCommon.error("113");
}
return;
}
}
_oTemps.sImgS = "";
_oTemps.sImgE = "";
_oTemps.sImgB = "";
_oTemps.afl = 0;
_oTemps.ael = 0;
_oTemps.twDelayFlag = false;
_oTemps.nActions = o.length;
_oTemps.fuseProps = com.mosesSupposes.fuse.FuseKitCommon._fuseprops();
_oTemps.cbProps = com.mosesSupposes.fuse.FuseKitCommon._cbprops();
_oTemps.sUP = com.mosesSupposes.fuse.FuseKitCommon._underscoreable();
_oTemps.sCT = com.mosesSupposes.fuse.FuseKitCommon._cts();
_oTemps.bTriggerFound = false;
for (var _local17 in o) {
var _local3 = o[_local17];
if ((_local3.label != undefined) && (typeof(_local3.label) == "string")) {
_oElements.label = _local3.label;
}
var _local4;
var _local8 = Boolean(typeof(_local3.action) == "object");
if (_local8 == true) {
var _local7 = ((_local3.action instanceof Array) ? (_local3.action) : ([_local3.action]));
_local4 = {delay:_local3.delay, target:_local3.target, addTarget:_local3.addTarget, label:_local3.label, trigger:_local3.trigger};
for (var _local15 in _local7) {
var _local5 = parseProfile(_local7[_local15], _local4);
if (_local5 != undefined) {
_aProfiles.unshift(_local5);
}
}
} else {
var _local7 = _local3;
var _local5 = parseProfile(_local7, _local4);
if (_local5 != undefined) {
_aProfiles.unshift(_local5);
}
}
}
_sImage = "";
var _local16 = "";
if (_oTemps.afl > 0) {
_local16 = _local16 + ((_oTemps.afl > 1) ? (_oTemps.afl + " callbacks, ") : "callback, ");
}
if ((_oElements.delay != undefined) || (_oTemps.twDelayFlag == true)) {
_local16 = _local16 + "delay, ";
}
if (_oTemps.bTriggerFound == true) {
_local16 = _local16 + "trigger, ";
}
if (_oTemps.ael > 0) {
_local16 = _local16 + ((_oTemps.ael > 1) ? (_oTemps.ael + " events, ") : "event, ");
}
if (_local16 != "") {
_sImage = _sImage + ((" Elements:[" + _local16.slice(0, -2)) + "]");
}
if (_oTemps.sImgS != "") {
_sImage = _sImage + ((" StartProps:[" + _oTemps.sImgS.slice(0, -2)) + "]");
}
if (_oTemps.sImgE != "") {
_sImage = _sImage + ((" Props:[" + _oTemps.sImgE.slice(0, -2)) + "]");
}
if (_oTemps.sImgB != "") {
_sImage = _sImage + ((" Simple Syntax Props:[" + _oTemps.sImgB.slice(0, -1)) + "]");
}
if (_sImage.slice(-2) == ", ") {
_sImage = _sImage.slice(0, -2);
}
delete _oTemps;
}
static function doTween() {
for (var _local3 in arguments) {
if (typeof(arguments[_local3]) == "object") {
if (_aInstances == undefined) {
_aInstances = new Array();
}
var _local2 = new com.mosesSupposes.fuse.FuseItem(_aInstances.length, arguments[_local3], -1);
return(_local2.startItem());
}
}
}
function get label() {
return(_oElements.label);
}
function hasTriggerFired() {
return(_bTrigger == true);
}
function getInitObj() {
return(_initObj);
}
function getActiveTargets(targetList) {
if (_aTweens.length <= 0) {
return(targetList);
}
var _local3 = false;
for (var _local5 in _aTweens) {
for (var _local4 in targetList) {
if (targetList[_local4] == _aTweens[_local5].targ) {
_local3 = true;
break;
}
}
if (_local3 == false) {
targetList.unshift(_aTweens[_local5].targ);
}
}
return(targetList);
}
function toString() {
return(String((_sID() + ":") + _sImage));
}
function evalDelay(scope) {
var _local3 = _oElements.delay;
if (_local3 instanceof Function) {
_local3 = _local3.apply(((_oElements.delayscope != undefined) ? (_oElements.delayscope) : (scope)));
}
if (typeof(_local3) == "string") {
_local3 = parseClock(String(_local3));
}
if (_global.isNaN(Number(_local3)) == true) {
return(0);
}
return(Number(_local3));
}
function startItem(targs, scope, duration, easing) {
_ZigoEngine = _global.com.mosesSupposes.fuse.ZigoEngine;
var _local11 = _global.com.mosesSupposes.fuse.Fuse;
var _local5 = ((_local11 != undefined) ? (_local11.OUTPUT_LEVEL) : (_ZigoEngine.OUTPUT_LEVEL));
if (_oElements.command != null) {
var _local12 = _oElements.scope || (scope);
var _local10 = ((_oElements.command instanceof Function) ? (String(_oElements.command.apply(_local12))) : (String(_oElements.command)));
var _local6 = ((_oElements.args instanceof Function) ? (_oElements.args.apply(_local12)) : (_oElements.args));
var _local13 = com.mosesSupposes.fuse.FuseKitCommon._validateFuseCommand(_local10, _aProfiles.length > 0, (_local6 != null) && (!((_local6 instanceof Array) && (_local6.length == 0))), _local5, false);
if (_local13 == true) {
_nPlaying = 1;
if (!(_local6 instanceof Array)) {
_local6 = ((_local6 == null) ? ([]) : ([_local6]));
}
dispatchRequest(String(_local10), _local6);
}
if ((_local13 == false) || (_local10 == "setStartProps")) {
complete();
}
return(null);
}
if (_aTweens.length > 0) {
stop();
}
_ZigoEngine.addListener(this);
_nPlaying = 2;
var _local4 = null;
if (_aProfiles.length > 0) {
if (_ZigoEngine == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("112");
} else {
_local4 = doTweens(targs, scope, duration, easing, false, false);
}
}
_nPlaying = 1;
var _local3 = _oElements.aEvents;
for (var _local9 in _local3) {
if (((_local4 == null) && (_aTweens.length > 0)) && (_local3[_local9].skipLevel == 2)) {
continue;
}
fireEvents(_local3[_local9], scope, _local5, targs);
}
if (((_local4 == null) && (_aTweens.length <= 0)) && (_nPlaying == 1)) {
if (_local5 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((_sID() + " no tweens added - item done. [getTimer()=") + getTimer()) + "]");
}
complete();
}
return(_local4);
}
function stop() {
var _local2 = _nPlaying > -1;
_nPlaying = -1;
if (_local2 == true) {
onStop();
}
_ZigoEngine.removeListener(this);
}
static function removeInstance(id) {
com.mosesSupposes.fuse.FuseItem(_aInstances[id]).destroy();
delete _aInstances[id];
}
function onStop() {
_bStartSet = false;
for (var _local3 in _aTweens) {
var _local2 = _aTweens[_local3];
_local2.targ.removeListener(this);
_ZigoEngine.removeTween(_local2.targ, _local2.props);
delete _aTweens[_local3];
}
delete _aTweens;
_bTrigger = false;
}
function evtSetStart(o) {
if ((_sImage.indexOf("StartProps:") == -1) || (o.curIndex == _nItemID)) {
return(undefined);
}
if (o.all != true) {
var _local3 = false;
for (var _local4 in o.filter) {
if ((Number(o.filter[_local4]) == _nItemID) || (String(o.filter[_local4]) == _oElements.label)) {
_local3 = true;
}
}
if (_local3 == false) {
return(undefined);
}
}
_nPlaying = 2;
doTweens(o.targs, o.scope, null, null, true, false);
_nPlaying = -1;
_bStartSet = true;
}
function pause(resume) {
if (_nPlaying == -1) {
return(undefined);
}
_nPlaying = ((resume == true) ? 1 : 0);
for (var _local12 in _aTweens) {
var _local4 = _aTweens[_local12];
var _local2 = _local4.targ;
var _local3 = _local4.props;
if (resume == true) {
var _local5 = [];
var _local6 = _aTweens.length;
for (var _local8 in _local3) {
if (_ZigoEngine.isTweenPaused(_local2, _local3[_local8]) == false) {
_local5.push(_local3[_local8]);
}
}
if (_local5.length > 0) {
onTweenEnd({__zigoID__:_local4.targZID, props:_local5, isResume:true});
}
if (_aTweens.length == _local6) {
_local2.addListener(this);
_ZigoEngine.unpauseTween(_local2, _local4.props);
}
} else {
_local2.removeListener(this);
_ZigoEngine.pauseTween(_local2, _local4.props);
}
}
if ((resume == true) && (_aTweens.length <= 0)) {
complete();
} else if (resume == true) {
_ZigoEngine.addListener(this);
} else {
_ZigoEngine.removeListener(this);
}
}
function fastForward(ignore, targs, scope) {
if (_nPlaying == 1) {
for (var _local4 in _aTweens) {
var _local3 = _aTweens[_local4];
var _local2 = _local3.targ;
_local2.removeListener(this);
_ZigoEngine.ffTween(_local2, _local3.props, true);
}
return(undefined);
}
if (_nPlaying == 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("125", _nItemID);
}
_nPlaying = 2;
doTweens(targs, scope, null, null, false, true);
stop();
}
function destroy() {
var _local3 = _nPlaying > -1;
_nPlaying = -1;
for (var _local5 in _aTweens) {
var _local2 = _aTweens[_local5];
_local2.targ.removeListener(this);
if (_local3 == true) {
_ZigoEngine.removeTween(_local2.targ, _local2.props);
}
delete _aTweens[_local5];
}
for (var _local4 in this) {
delete this[_local4];
}
}
function dispatchRequest(type, args) {
var _local4 = _global.com.mosesSupposes.fuse.Fuse.getInstance(_nFuseID);
if ((!(args instanceof Array)) && (args != null)) {
args = new Array(args);
}
Function(_local4[type]).apply(_local4, args);
}
function _sID() {
var _local3;
if (_nFuseID == -1) {
_local3 = "-One-off tween ";
} else {
_local3 = _global.com.mosesSupposes.fuse.Fuse.getInstance(_nFuseID).getHandle();
}
_local3 = _local3 + (">Item #" + String(_nItemID));
if (_oElements.label != undefined) {
_local3 = _local3 + ((" \"" + _oElements.label) + "\"");
}
return(_local3);
}
function parseProfile(obj, aap) {
var _local40;
var _local2;
var _local8;
if (obj.__buildMode == true) {
if (obj.command != undefined) {
if (obj.command == "delay") {
_oElements.delay = obj.commandargs;
} else if (obj.command == "trigger") {
if (_oTemps.bTriggerFound == false) {
_oTemps.bTriggerFound = true;
return({trigger:obj.commandargs, _doTimer:true});
}
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("124", _sID(), obj.commandargs);
}
} else {
_oElements.command = obj.command;
_oElements.args = obj.commandargs;
}
}
if (obj.func != undefined) {
_oTemps.afl++;
_oElements.aEvents.unshift({scope:obj.scope, func:obj.func, args:obj.args});
}
if (obj.tweenargs != undefined) {
_oTemps.sImgB = _oTemps.sImgB + (obj.tweenargs[1].toString() + ",");
return(obj);
}
return(null);
}
var _local4 = {delay:((aap.delay != undefined) ? (aap.delay) : (obj.delay)), ease:obj.ease, seconds:obj.seconds, event:obj.event, eventparams:obj.eventparams, skipLevel:((((typeof(obj.skipLevel) == "number") && (obj.skipLevel >= 0)) && (obj.skipLevel <= 2)) ? (obj.skipLevel) : (_ZigoEngine.SKIP_LEVEL)), roundResults:obj.roundResults, oSP:{}, oEP:{}, oAFV:{}};
var _local22 = ((aap.trigger != undefined) ? (aap.trigger) : (obj.trigger));
if (_local22 != undefined) {
if (_oTemps.bTriggerFound == false) {
_local4.trigger = _local22;
_oTemps.bTriggerFound = true;
} else if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("124", _sID(), _local22);
}
}
if (_local4.delay == undefined) {
_local4.delay = obj.startAt;
}
if (_local4.ease == undefined) {
_local4.ease = obj.easing;
}
if (_local4.seconds == undefined) {
_local4.seconds = ((obj.duration != undefined) ? (obj.duration) : (obj.time));
}
if (aap.target != undefined) {
_local4.target = ((aap.target instanceof Array) ? (aap.target) : ([aap.target]));
} else if (obj.target != undefined) {
_local4.target = ((obj.target instanceof Array) ? (obj.target) : ([obj.target]));
}
if (obj.addTarget != undefined) {
_local4.addTarget = ((obj.addTarget instanceof Array) ? (obj.addTarget) : ([obj.addTarget]));
}
if (aap.addTarget != undefined) {
if (_local4.addTarget == undefined) {
_local4.addTarget = ((aap.addTarget instanceof Array) ? (aap.addTarget) : ([aap.addTarget]));
} else {
_local4.addTarget = ((_local4.addTarget instanceof Array) ? (_local4.addTarget.concat(aap.addTarget)) : (new Array(_local4.addTarget).concat(aap.addTarget)));
}
}
var _local15 = false;
for (_local2 in obj) {
var _local11 = obj[_local2];
if (_oTemps.cbProps.indexOf(("|" + _local2) + "|") > -1) {
if (_local2 != "skipLevel") {
_local4[_local2] = _local11;
}
continue;
}
if (_oTemps.fuseProps.indexOf(("|" + _local2) + "|") > -1) {
if (((_local2 == "command") && (_oTemps.nActions > 1)) && (_oTemps.outputLevel > 0)) {
com.mosesSupposes.fuse.FuseKitCommon.error("109", String(_local11), true);
}
continue;
}
if (typeof(_local11) == "object") {
var _local10 = ((_local11 instanceof Array) ? ([]) : ({}));
for (_local8 in _local11) {
_local10[_local8] = _local11[_local8];
}
_local11 = _local10;
}
var _local3;
var _local21;
if (_local2.indexOf("start_") == 0) {
if (((_local2 == "start_controlX") || (_local2 == "start_controlY")) || (_local2.indexOf("_bezier_") > -1)) {
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("110", _sID(), _local2);
}
continue;
}
_local2 = _local2.slice(6);
_local3 = _local4.oSP;
} else {
_local3 = _local4.oEP;
}
if ((ADD_UNDERSCORES == true) && (_oTemps.sUP.indexOf(("|_" + _local2) + "|") > -1)) {
_local2 = "_" + _local2;
}
if (_oTemps.sCT.indexOf(("|" + _local2) + "|") > -1) {
var _local13 = (_local2 == "_tintPercent") && (_local3.colorProp.p == "_tint");
var _local12 = (_local2 == "_tint") && (_local3.colorProp.p == "_tintPercent");
if (((_local3.colorProp == undefined) || (_local13 == true)) || (_local12 == true)) {
if (_local13 == true) {
_local3.colorProp = {p:"_tint", v:{tint:_local3.colorProp.v, percent:_local11}};
} else if (_local12 == true) {
_local3.colorProp = {p:"_tint", v:{tint:_local11, percent:_local3.colorProp.v}};
} else {
_local3.colorProp = {p:_local2, v:_local11};
}
_local15 = true;
} else if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), _local2);
}
} else if (_local11 != null) {
_local3[_local2] = _local11;
_local15 = true;
}
}
if ((_local15 == false) && ((_local4.trigger != undefined) || (((_local4.delay != undefined) || (_local4.seconds != undefined)) && (((_local4.startfunc != undefined) || (_local4.updfunc != undefined)) || ((_local4.func != undefined) && (_oTemps.nActions > 1)))))) {
if (_ZigoEngine == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("116");
} else {
if (_local4.func != undefined) {
_oTemps.afl++;
}
if (_local4.event != undefined) {
_oTemps.ael++;
}
_local4._doTimer = true;
if (_local4.delay != undefined) {
_oTemps.twDelayFlag = true;
}
return(_local4);
}
}
if (_local15 == true) {
var _local17 = _local4.oEP.colorProp != undefined;
var _local7 = 0;
while (_local7 < 2) {
var _local3 = ((_local7 == 0) ? (_local4.oSP) : (_local4.oEP));
var _local6 = ((_local7 == 0) ? (_oTemps.sImgS) : (_oTemps.sImgE));
var _local9 = _local3.colorProp.p;
if (_local9 != undefined) {
_local3[_local9] = _local3.colorProp.v;
delete _local3.colorProp;
}
if (((_local3._xscale != undefined) || (_local3._scale != undefined)) && ((_local3._width != undefined) || (_local3._size != undefined))) {
var _local14 = ((_local3._xscale != undefined) ? "_xscale" : "_scale");
delete _local3[_local14];
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), _local14);
}
}
if (((_local3._yscale != undefined) || (_local3._scale != undefined)) && ((_local3._height != undefined) || (_local3._size != undefined))) {
var _local14 = ((_local3._yscale != undefined) ? "_yscale" : "_scale");
delete _local3[_local14];
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), _local14);
}
}
if ((_local3._fade != undefined) && (_local3._alpha != undefined)) {
delete _local3._alpha;
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), "_alpha");
}
}
for (_local2 in _local3) {
if (_local6.indexOf(_local2 + ", ") == -1) {
_local6 = _local6 + (_local2 + ", ");
}
if (_local3 == _local4.oSP) {
if ((_local4.oEP[_local2] == undefined) && (!((_local2 == _local9) && (_local17 == true)))) {
_local4.oAFV[_local2] = true;
_local4.oEP[_local2] = [];
}
}
}
((_local7 == 0) ? ((_oTemps.sImgS = _local6)) : ((_oTemps.sImgE = _local6)));
_local7++;
}
return(_local4);
}
if ((_local4.delay != undefined) && (_oTemps.nActions == 1)) {
_oElements.delay = _local4.delay;
_oElements.delayscope = _local4.scope;
}
if (_local4.event != undefined) {
_oTemps.ael++;
_oElements.aEvents.unshift({scope:_local4.scope, e:_local4.event, ep:_local4.eventparams, skipLevel:_local4.skipLevel});
}
var _local23 = _oElements.aEvents.length;
if (_local4.func != undefined) {
_oElements.aEvents.push({func:_local4.func, scope:_local4.scope, args:_local4.args, skipLevel:_local4.skipLevel});
}
_oTemps.afl = _oTemps.afl + (_oElements.aEvents.length - _local23);
return(undefined);
}
function doTweens(targs, defaultScope, defaultSeconds, defaultEase, setStart, isFF) {
if (_aTweens == null) {
_aTweens = [];
}
var tba = ((_oTwBeingAdded = {}));
var ZE = _ZigoEngine;
var _local35 = function (target, props, endvals, seconds, ease, delay, callback) {
if (target.__zigoID__ == null) {
ZE.initializeTargets(target);
}
tba[target.__zigoID__] = true;
var _local3 = ZE.doTween.apply(ZE, arguments);
tba[target.__zigoID__] = false;
return(((_local3 == null) ? ([]) : (_local3.split(","))));
};
var _local74 = _global.com.mosesSupposes.fuse.Fuse;
var _local19 = ((_local74 != undefined) ? (_local74.OUTPUT_LEVEL) : (_ZigoEngine.OUTPUT_LEVEL));
var _local24 = "";
var _local66 = 0;
var _local8;
var _local5;
var _local6;
var _local75 = (_bStartSet != true) && ((setStart == true) || (_sImage.indexOf("StartProps:") > -1));
var _local51 = 0;
while (_local51 < _aProfiles.length) {
if (_nPlaying < 2) {
return(null);
}
var _local4 = _aProfiles[_local51];
if (_local4.__buildMode == true) {
var _local10 = _aProfiles[_local51].tweenargs;
var _local65 = _local24;
if ((_local10[6].cycles === 0) || (_local10[6].cycles.toUpperCase() == "LOOP")) {
delete _local10[6].cycles;
if (_local19 > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("117", _sID());
}
}
var _local60 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(_local10[6]);
if (!(_local10[0] instanceof Array)) {
_local10[0] = [_local10[0]];
}
for (_local8 in _local10[0]) {
if (isFF == true) {
_local35(_local10[0][_local8], _local10[1], _local10[2], 0, null, 0, {skipLevel:0});
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((("\n-" + _sID()) + " FF(simple syntax)\ttargets:[") + _local10[0][_local8]) + "]\tprops:[") + _local10[1]) + "]");
}
} else {
var _local17 = _local35(_local10[0][_local8], _local10[1], _local10[2], _local10[3], _local10[4], _local10[5], _local60);
if (_local17.length > 0) {
_aTweens.push({targ:_local10[0][_local8], props:_local17, targZID:_local10[0][_local8].__zigoID__});
_local10[0][_local8].addListener(this);
for (_local5 in _local17) {
if (_local24.indexOf(_local17[_local5] + ",") == -1) {
_local24 = _local24 + (_local17[_local5] + ",");
}
}
}
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((("\n-" + _sID()) + " TWEEN(simple syntax)\ttargets:[") + _local10[0][_local8]) + "]\tprops tweened:[") + _local17.toString()) + "]");
}
}
}
if ((isFF == false) && ((_local65 == _local24) || (_local24 == ""))) {
_local66++;
}
} else {
var _local23 = defaultScope;
var _local16 = [];
var _local52 = ((_local4.target == undefined) ? (targs) : (_local4.target));
var _local26 = [];
var _local54 = false;
for (_local8 in _local52) {
var _local7 = _local52[_local8];
_local26 = _local26.concat(((_local7 instanceof Function) ? (_local7.apply(_local23)) : (_local7)));
}
for (_local8 in _local4.addTarget) {
var _local7 = _local4.addTarget[_local8];
_local26 = _local26.concat(((_local7 instanceof Function) ? (_local7.apply(_local23)) : (_local7)));
}
for (_local8 in _local26) {
var _local7 = _local26[_local8];
if (_local7 != null) {
var _local40 = false;
for (_local5 in _local16) {
if (_local16[_local5] == _local7) {
_local40 = true;
break;
}
}
if (_local40 == false) {
_local16.unshift(_local7);
}
} else {
_local54 = true;
}
}
var _local56 = ((_local4._doTimer == true) && (_local16.length == 0)) && (isFF == false);
if ((_local54 == true) || ((_local16.length == 0) && (_local4._doTimer != true))) {
_local66++;
}
if (_local75 == true) {
for (_local8 in _local16) {
if (_nPlaying < 2) {
return(null);
}
var _local36 = _local16[_local8];
var _local33 = [];
var _local27 = [];
if (setStart == true) {
for (var _local63 in _local4.oEP) {
_global.com.mosesSupposes.fuse.FuseFMP.getFilterProp(_local36, _local63, true);
}
}
for (var _local64 in _local4.oSP) {
var _local7 = _local4.oSP[_local64];
if (_local7 instanceof Function) {
_local7 = _local7.apply(_local23);
}
if ((_local7 === true) || (_local7 === false)) {
_local36[_local64] = _local7;
if (_local4.oAFV[_local64] == true) {
for (_local6 in _local4.oEP[_local64]) {
if (_local4.oEP[_local64][_local6].targ == _local36) {
_local4.oEP[_local64].splice(Number(_local6), 1);
}
}
_local4.oEP[_local64].push({targ:_local36, val:"IGNORE", _isAF:true});
}
continue;
}
if (((_local4.oAFV[_local64] == true) && (!((_local64 == "_colorReset") && (_local7 == 100)))) && (!((_local64 == "_tintPercent") && (_local7 == 0)))) {
var _local20;
if ((_local64 == "_tint") || (_local64 == "_colorTransform")) {
_local20 = _ZigoEngine.getColorTransObj();
} else if ((String(com.mosesSupposes.fuse.FuseKitCommon._resetTo100()).indexOf(("|" + _local64) + "|") > -1) || ((_local64 == "_fade") && (_local7 < 50))) {
_local20 = 100;
} else if ((String(com.mosesSupposes.fuse.FuseKitCommon._resetTo0()).indexOf(("|" + _local64) + "|") > -1) || (_local64 == "_fade")) {
_local20 = 0;
} else {
var _local29 = _global.com.mosesSupposes.fuse.FuseFMP.getFilterProp(_local36, _local64, true);
if (_local29 != null) {
_local20 = _local29;
} else {
_local20 = ((_global.isNaN(_local36[_local64]) == false) ? _local36[_local64] : 0);
}
}
for (_local6 in _local4.oEP[_local64]) {
if (_local4.oEP[_local64][_local6].targ == _local36) {
_local4.oEP[_local64].splice(Number(_local6), 1);
}
}
_local4.oEP[_local64].push({targ:_local36, val:_local20, _isAF:true});
}
if (typeof(_local7) == "object") {
var _local28 = ((_local7 instanceof Array) ? ([]) : ({}));
for (_local6 in _local7) {
_local28[_local6] = ((_local7[_local6] instanceof Function) ? Function(_local7[_local6]).apply(_local23) : _local7[_local6]);
}
_local7 = _local28;
}
_local33.push(_local64);
_local27.push(_local7);
}
if (_local27.length > 0) {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output((((_sID() + " ") + _local36) + " SET STARTS: ") + [("[" + _local33) + "]", ("[" + _local27) + "]"]);
}
_local35(_local36, _local33, _local27, 0);
}
}
}
if (setStart == true) {
} else {
var _local25;
var _local50;
var _local32;
var _local12;
var _local49;
var _local21;
var _local43 = "";
if (isFF == false) {
if (_local4.scope != undefined) {
_local23 = _local4.scope;
}
_local50 = ((_local4.skipLevel instanceof Function) ? (_local4.skipLevel.apply(_local23)) : (_local4.skipLevel));
var _local71 = ((_local4.extra1 instanceof Function) ? (_local4.extra1.apply(_local23)) : (_local4.extra1));
var _local70 = ((_local4.extra2 instanceof Function) ? (_local4.extra2.apply(_local23)) : (_local4.extra2));
var _local72 = ((_local4.roundResults instanceof Function) ? (_local4.roundResults.apply(_local23)) : (_local4.roundResults));
_local32 = {skipLevel:_local50, extra1:_local71, extra2:_local70, roundResults:_local72};
_local12 = {skipLevel:_local50, extra1:_local71, extra2:_local70, roundResults:_local72};
if (_local4.cycles != undefined) {
var _local55 = ((_local4.cycles instanceof Function) ? (_local4.cycles.apply(_local23)) : (_local4.cycles));
if (((Number(_local55) == 0) || (String(_local55).toUpperCase() == "LOOP")) && (_local74 != undefined)) {
delete _local4.cycles;
if (_local19 > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("117", _sID());
}
} else {
_local32.cycles = (_local12.cycles = _local55);
}
}
if (((_local4.func != undefined) || (_local4.startfunc != undefined)) || (_local4.updfunc != undefined)) {
for (_local8 in _local4) {
if (_local8.indexOf("func") > -1) {
_local12[_local8] = _local4[_local8];
} else if (((_local8 == "startscope") || (_local8 == "updscope")) || (_local8.indexOf("args") > -1)) {
_local12[_local8] = _local4[_local8];
}
}
if (_local23 != undefined) {
if ((_local12.func != undefined) && (_local12.scope == undefined)) {
_local12.scope = _local23;
}
if ((_local12.updfunc != undefined) && (_local12.updscope == undefined)) {
_local12.updscope = _local23;
}
if ((_local12.startfunc != undefined) && (_local12.startscope == undefined)) {
_local12.startscope = _local23;
}
}
}
for (_local5 in _local12) {
_local43 = _local43 + (((_local5 + ":") + _local12[_local5]) + "|");
}
if (_local4.event != undefined) {
_local25 = {scope:_local4.scope, e:_local4.event, ep:_local4.eventparams, skipLevel:_local50};
}
_local49 = _local4.trigger === true;
_local21 = undefined;
if ((_local49 == false) && (_local4.trigger != undefined)) {
_local21 = ((_local4.trigger instanceof Function) ? (_local4.trigger.apply(_local23)) : (_local4.trigger));
if (typeof(_local21) == "string") {
_local21 = ((String(_local21).charAt(0) == "-") ? (-parseClock(String(_local21).slice(1))) : (parseClock(String(_local21))));
}
if (_global.isNaN(_local21) == true) {
_local21 = undefined;
}
}
}
var _local18;
var _local13;
var _local22;
var _local15;
var _local42 = false;
var _local53 = ((_local56 == false) ? (_local16) : ([0]));
var _local34 = -1;
for (_local8 in _local53) {
if (_nPlaying < 2) {
return(null);
}
if (isFF == false) {
if (_local4.ease != null) {
_local22 = _local4.ease;
if (_local22 instanceof Function) {
var _local44 = Function(_local22);
if (typeof(_local44(1, 1, 1, 1)) != "number") {
_local22 = _local44.apply(_local23);
}
}
}
if (_local22 == null) {
_local22 = defaultEase;
}
_local13 = ((_local4.seconds instanceof Function) ? (_local4.seconds.apply(_local23)) : (_local4.seconds));
if (_local13 != undefined) {
if (typeof(_local13) == "string") {
_local13 = parseClock(String(_local13));
}
if (_global.isNaN(_local13) == true) {
_local13 = _ZigoEngine.DURATION || 0;
}
}
if (_local13 == null) {
_local13 = defaultSeconds;
}
_local18 = ((_local4.delay instanceof Function) ? (_local4.delay.apply(_local23)) : (_local4.delay));
if (typeof(_local18) == "string") {
_local18 = parseClock(String(_local18));
}
if ((_local18 == null) || (_global.isNaN(_local18) == true)) {
_local18 = 0;
}
if (_local56 == true) {
continue;
}
}
var _local36 = _local53[_local8];
var _local9 = [];
var _local11 = [];
var _local46 = 0;
var _local14 = -2;
for (var _local64 in _local4.oEP) {
var _local7 = _local4.oEP[_local64];
if (_local7 instanceof Function) {
_local7 = _local7.apply(_local23);
}
if ((_local7 === true) || (_local7 === false)) {
if (_local15 == undefined) {
_local15 = {};
}
_local15[_local64] = _local7;
_local46++;
continue;
}
if (typeof(_local7) == "object") {
if (_local7[0]._isAF == true) {
for (_local6 in _local7) {
if (_local7[_local6].targ == _local36) {
_local7 = _local7[_local6].val;
break;
}
}
} else {
var _local28 = ((_local7 instanceof Array) ? [] : {});
for (_local6 in _local7) {
_local28[_local6] = ((_local7[_local6] instanceof Function) ? Function(_local7[_local6]).apply(_local23) : _local7[_local6]);
}
_local7 = _local28;
}
}
if (_local7 != "IGNORE") {
if (_local64 == "_bezier_") {
_local14 = _local9.length;
} else if ((_local14 == -2) && ((_local64 == "controlX") || (_local64 == "controlY"))) {
_local14 = -1;
}
_local9.push(_local64);
_local11.push(_local7);
}
}
if (_local11.length > 0) {
if (_local14 > -2) {
if (_local14 == -1) {
_local14 = _local9.length;
}
_local9[_local14] = "_bezier_";
if (typeof(_local11[_local14]) != "object") {
_local11[_local14] = {};
}
var _local37 = _local11[_local14];
for (_local5 in _local9) {
if ("|x|y|_x|_y|controlX|controlY|".indexOf(("|" + _local9[_local5]) + "|") > -1) {
if (_local9[_local5].charAt(0) == "_") {
_local9[_local5] = _local9[_local5].slice(-1);
}
if (typeof(_local37[_local9[_local5]]) == "number") {
if ((_local19 > 0) && ((_local34 == -1) || (_local34 == _local8))) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), _local9[_local5]);
_local34 = Number(_local8);
}
} else {
_local37[_local9[_local5]] = _local11[_local5];
}
_local9.splice(Number(_local5), 1);
_local11.splice(Number(_local5), 1);
}
}
}
if (isFF == true) {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((("\n-" + _sID()) + " FF\ttargets:[") + _local36) + "]\tprops:[") + _local9.toString()) + "]");
}
_local35(_local36, _local9, _local11, 0, null, 0, {skipLevel:0});
continue;
}
var _local31 = {caught:false, onTweenEnd:function (evto) {
this.caught = true;
}};
_local36.addListener(_local31);
var _local17 = _local35(_local36, _local9, _local11, _local13, _local22, _local18, _local12);
_local36.removeListener(_local31);
if (_local17.length == 0) {
if (_local31.caught == true) {
_local12 = _local32;
}
} else {
if (_local17.length > 0) {
var _local38 = {targ:_local36, props:_local17, bools:_local15, targZID:_local36.__zigoID__};
if (_local42 == false) {
_local12 = _local32;
_local38.event = _local25;
_local15 = undefined;
_local25 = _local15;
_local38.trigger = _local49;
}
_aTweens.push(_local38);
_local36.addListener(this);
_local42 = true;
for (_local5 in _local17) {
if (_local24.indexOf(_local17[_local5] + ",") == -1) {
_local24 = _local24 + (_local17[_local5] + ",");
}
}
}
if (_local19 == 3) {
var _local45 = _local9.toString();
if (_local17.length > _local9.length) {
_local45 = _local45 + (("\n\t[NO-CHANGE PROPS DISCARDED (disregard this for double props like _scale). KEPT:" + _local17.toString()) + "]");
}
var _local30 = "";
for (_local5 in _local11) {
_local30 = (((typeof(_local11[_local5]) == "string") ? (("\"" + _local11[_local5]) + "\"") : _local11[_local5]) + ", ") + _local30;
}
com.mosesSupposes.fuse.FuseKitCommon.output((("\n-" + _sID()) + " TWEEN:\n") + [("\t[getTimer():" + getTimer()) + "] ", "targ: " + _local36, "props: " + _local45, "endVals: " + _local30, "time: " + ((_local13 == undefined) ? _ZigoEngine.DURATION : _local13), "easing: " + ((_local22 == undefined) ? _ZigoEngine.EASING : _local22), "delay: " + ((_local18 == undefined) ? 0 : _local18), "callbacks: " + ((_local43 == "") ? "(none)" : _local43)].join("\n\t"));
}
}
_local31 = undefined;
}
}
if ((_global.isNaN(_local13) == true) || (_local4.seconds == null)) {
_local13 = 0;
}
var _local39 = _local18 + _local13;
if (_local21 != undefined) {
if (_local21 < 0) {
_local21 = _local21 + _local39;
}
if ((_local21 > 0) && ((_local39 == 0) || (_local21 < _local39))) {
if (_local39 == 0) {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((((((_sID() + " graft a timed trigger (") + _local21) + " sec). [has callback:") + (_local12 != _local32)) + ", has event:") + (_local25 != undefined)) + ", has booleans:") + (_local15 != undefined)) + "]");
}
doTimerTween(null, _local21, 0, true, _local15, _local12, _local25);
_local42 = true;
} else {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((_sID() + " graft a timed trigger (") + _local21) + " sec).");
}
doTimerTween(null, _local21, 0, true);
}
} else if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((_sID() + " timed trigger discarded: out of range. [") + _local21) + "/") + _local39) + "]");
}
}
if ((_local42 == false) && (((_local12 != _local32) || (_local25 != undefined)) || (_local15 != undefined))) {
if ((_local50 == 0) && (_local39 > 0)) {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((((((_sID() + " no props tweened - graft a delay (") + _local39) + " sec). [has callback:") + (_local12 != _local32)) + ", has event:") + (_local25 != undefined)) + ", has booleans:") + (_local15 != undefined)) + "]");
}
doTimerTween(_local16, _local13, _local18, _local49, _local15, _local12, _local25);
} else {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((((_sID() + " no props tweened, executing nontween items. [has callback:") + (_local12 != _local32)) + ", has event:") + (_local25 != undefined)) + ", has booleans:") + (_local15 != undefined)) + "]");
}
for (_local8 in _local16) {
for (_local5 in _local15) {
_local16[_local8][_local5] = _local15[_local5];
}
}
if (_local50 < 2) {
if (_local12 != undefined) {
fireEvents(_local12, _local23, _local19, _local16);
}
if (_local25 != undefined) {
fireEvents(_local25, _local23, _local19);
}
}
}
}
}
}
_local51++;
}
if ((_local66 > 0) && (_local19 > 0)) {
if ((_local66 == _aProfiles.length) && (_local24 == "")) {
com.mosesSupposes.fuse.FuseKitCommon.error("118", _sID(), setStart);
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("119", _sID(), _local66, _local75);
}
}
tba = undefined;
_oTwBeingAdded = undefined;
return(((_local24 == "") ? null : (_local24.slice(0, -1))));
}
function doTimerTween(actualTargets, duration, delay, trigger, booleans, callback, event) {
var _local2 = {__TweenedDelay:0};
_ZigoEngine.initializeTargets(_local2);
_aTweens.push({targ:_local2, props:["__TweenedDelay"], trigger:trigger, bools:booleans, event:event, actualTargs:actualTargets, targZID:_local2.__zigoID__});
var _local3 = _ZigoEngine.doTween(_local2, "__TweenedDelay", 1, duration, null, delay, callback) == null;
if (_local3 == true) {
onTweenEnd({target:_local2, props:["__TweenedDelay"]});
} else {
_local2.addListener(this);
}
}
function onTweenEnd(o, doAutoStop) {
if (_nPlaying < 1) {
return(undefined);
}
var _local12 = _global.com.mosesSupposes.fuse.Fuse;
var _local8 = ((_local12 != undefined) ? (_local12.OUTPUT_LEVEL) : (_ZigoEngine.OUTPUT_LEVEL));
var _local11 = ((!(o.__zigoID__ === undefined)) ? (o.__zigoID__) : (o.target.__zigoID__));
for (var _local19 in _aTweens) {
var _local3 = _aTweens[_local19];
if (_local3.targZID == _local11) {
for (var _local18 in o.props) {
var _local7 = _local3.props;
for (var _local16 in _local7) {
var _local5 = _local7[_local16];
if (_local5 == o.props[_local18]) {
_local7.splice(Number(_local16), 1);
if (doAutoStop == true) {
var _local6 = _local12.getInstance(_nFuseID);
var _local10 = (((_bTrigger == true) && (o.during == "add")) && (_local6[_local6.currentIndex]._oTwBeingAdded[_local11] === true)) && (_local6.state == "playing");
if (_local10 == false) {
_local3.targ.removeListener(this);
for (var _local19 in _aTweens) {
if (_aTweens[_local19].targZID == _local11) {
for (var _local18 in o.props) {
for (var _local16 in _aTweens[_local19].props) {
if (_aTweens[_local19].props[_local16] == o.props[_local18]) {
_aTweens[_local19].props.splice(Number(_local16), 1);
}
}
}
if (_aTweens[_local19].props.length == 0) {
_aTweens.splice(Number(_local19), 1);
}
}
}
if (_local8 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(_sID() + " triggering auto-stop due to interruption");
}
if ((_local6.autoClear == true) || ((!(_local6.autoClear === false)) && (_local12.AUTOCLEAR == true))) {
dispatchRequest("destroy");
} else {
dispatchRequest("stop");
}
return(undefined);
}
if (_local8 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((("note -" + _sID()) + " interrupted one of its own properties \"") + _local5) + "\". (Autostop not triggered.)");
}
}
if ((_nPlaying == 2) && (_local5 != "__TweenedDelay")) {
if (_local8 > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("120", _sID(), _local5);
}
}
if (_local7.length == 0) {
if (_local3.event != undefined) {
fireEvents(_local3.event, null, _local8);
}
if (_local5 == "__TweenedDelay") {
_ZigoEngine.deinitializeTargets(_local3.targ);
delete _local3.targ;
for (var _local14 in _local3.bools) {
for (var _local13 in _local3.actualTargs) {
_local3.actualTargs[_local13][_local14] = _local3.bools[_local14];
}
}
} else {
var _local9 = false;
for (var _local14 in _local3.bools) {
_local3.targ[_local14] = _local3.bools[_local14];
}
for (var _local15 in _aTweens) {
if ((_local15 != _local19) && (_aTweens[_local15].targ == _local3.targ)) {
_local9 = true;
}
}
if (_local9 == false) {
_local3.targ.removeListener(this);
}
}
if (_local3.trigger == true) {
if (((_bTrigger == false) && (o.isResume != true)) && (_aTweens.length > 1)) {
_bTrigger = true;
if (_local8 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(_sID() + " trigger fired!");
}
var breakChainInt;
breakChainInt = setInterval(function (fi) {
clearInterval(breakChainInt);
fi.dispatchRequest("advance", [false, false, false]);
}, 1, this);
}
}
_aTweens.splice(Number(_local19), 1);
}
}
}
}
}
}
if (((_aTweens.length == 0) && (_nPlaying == 1)) && (o.isResume != true)) {
complete(_local8);
}
}
function onTweenInterrupt(o) {
if (_nPlaying == -1) {
return(undefined);
}
var _local4 = _global.com.mosesSupposes.fuse.Fuse;
var _local6 = _local4.getInstance(_nFuseID);
var _local8 = (_local6.autoStop == true) || ((!(_local6.autoStop === false)) && (_local4.AUTOSTOP == true));
var _local3 = o.__zigoID__;
var _local9 = ((_local4 != undefined) ? (_local4.OUTPUT_LEVEL) : (_ZigoEngine.OUTPUT_LEVEL));
if ((_local8 == true) || ((!(_local8 === false)) && (_local4.AUTOSTOP == true))) {
onTweenEnd(o, true);
return(undefined);
}
if (typeof(o.target) != "string") {
onTweenEnd(o);
return(undefined);
}
for (var _local5 in _aTweens) {
if (_aTweens[_local5].targZID == _local3) {
_aTweens.splice(Number(_local5), 1);
}
}
if ((_aTweens.length == 0) && (_nPlaying == 1)) {
complete(_local9);
}
}
function complete(outputLevel) {
if (outputLevel == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(_sID() + " complete.");
}
var breakChainInt;
breakChainInt = setInterval(function (fi, trigger) {
clearInterval(breakChainInt);
var _local1 = fi._nPlaying;
if (trigger != true) {
if (_local1 < 1) {
return(undefined);
}
}
fi.stop();
if (_local1 > 0) {
fi.dispatchRequest("advance", [trigger, false, false]);
}
}, 1, this, _bTrigger);
}
function parseClock(str) {
if (str.indexOf(":") != 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("121");
return(_ZigoEngine.DURATION || 0);
}
var _local4 = 0;
var _local3 = str.split(":");
_local3.reverse();
var _local2;
if ((String(_local3[0]).length == 2) && (_global.isNaN(_local2 = Math.abs(Number(_local3[0]))) == false)) {
_local4 = _local4 + (_local2 / 100);
}
if (((String(_local3[1]).length == 2) && (_global.isNaN(_local2 = Math.abs(Number(_local3[1]))) == false)) && (_local2 < 60)) {
_local4 = _local4 + _local2;
}
if (((String(_local3[2]).length == 2) && (_global.isNaN(_local2 = Math.abs(Number(_local3[2]))) == false)) && (_local2 < 60)) {
_local4 = _local4 + (_local2 * 60);
}
if (((String(_local3[3]).length == 2) && (_global.isNaN(_local2 = Math.abs(Number(_local3[3]))) == false)) && (_local2 < 24)) {
_local4 = _local4 + (_local2 * 3600);
}
return(_local4);
}
function fireEvents(o, scope, outputLevel, targets) {
if (o.scope == undefined) {
o.scope = scope;
}
if (o.e == undefined) {
var _local3 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(o, targets, outputLevel, false);
if (_local3.start.f != null) {
_local3.start.f.apply(_local3.start.s, _local3.start.a);
}
if (_local3.upd.f != null) {
_local3.upd.f.apply(_local3.upd.s, _local3.upd.a);
}
if (_local3.end.f != null) {
_local3.end.f.apply(_local3.end.s, _local3.end.a);
}
} else {
var _local6 = ((o.e instanceof Function) ? (String(o.e.apply(scope))) : (String(o.e)));
if ((_local6 != "undefined") && (_local6.length > 0)) {
if (String(com.mosesSupposes.fuse.FuseKitCommon._fuseEvents()).indexOf(("|" + _local6) + "|") > -1) {
if (outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("122", _local6);
}
} else {
var _local7 = _global.com.mosesSupposes.fuse.Fuse.getInstance(_nFuseID);
var _local5 = ((o.ep instanceof Function) ? (o.ep.apply(scope)) : (o.ep));
if ((_local5 == null) || (typeof(_local5) != "object")) {
_local5 = {};
}
_local5.target = _local7;
_local5.type = _local6;
_local7.dispatchEvent.call(_local7, _local5);
}
} else if (outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("123", _sID());
}
}
}
static var registryKey = "fuseItem";
static var ADD_UNDERSCORES = true;
var _nPlaying = -1;
var _bStartSet = false;
var _bTrigger = false;
}
Symbol 562 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 563 MovieClip [__Packages.Person] Frame 0
class Person
{
var person_mc, showFartHelpSensorTime, scorePerFartFrame, personCode, parentObj, mouthArea_mc, fartHelpOn, startX, startY, nowFarting, fartMeter, hungerMeter, fartButton_btn, hungerOffPerSprout, hungerPerFrame, windPerSprout, fartSpeed, hungerPauseOnEating, fartShakeMax, hungerInt, fartInt, fartMeterStart, fartButtonDownTime, fartSound, fartMeterEnd;
function Person (pc, cd, po) {
trace("New Person");
person_mc = pc;
showFartHelpSensorTime = 300;
scorePerFartFrame = 1;
personCode = cd;
parentObj = po;
mouthArea_mc = person_mc.mouth_mc;
fartHelpOn = false;
mouthArea_mc._visible = false;
startX = person_mc._x;
startY = person_mc._y;
nowFarting = false;
fartMeter = new Meter(this, person_mc._parent[("fartMeter" + personCode) + "_mc"]);
hungerMeter = new Meter(this, person_mc._parent[("hungerMeter" + personCode) + "_mc"]);
fartButton_btn = person_mc._parent[("fart" + personCode) + "_btn"];
fartButton_btn.onPress = mx.utils.Proxy.create(this, pressFart, true);
fartButton_btn.onRelease = (fartButton_btn.onReleaseOutside = mx.utils.Proxy.create(this, pressFart, false));
fartButton_btn.enabled = false;
hungerOffPerSprout = 20;
hungerPerFrame = 1;
windPerSprout = 20;
fartSpeed = 1;
hungerPauseOnEating = 200;
fartShakeMax = 5;
}
function hungerDeath() {
person_mc.gotoAndPlay("dead");
if (personCode != 4) {
person_mc.slideTo(null, 750, 1, "easeInCubic", 0, hitFloor);
person_mc.crown_mc.slideTo(null, -250, 1, "easeInQuad", 0);
person_mc.crown_mc.rotateTo(180, 1, "easeInCubic", 0);
}
}
function hitFloor() {
trace("hitFloor");
_root._y = _root._y + 30;
_root.slideTo(null, 0, "easeInOutCubic");
_global.sounds.playSound("thud", false);
}
function fartDeath() {
trace("fartDeath");
person_mc.gotoAndPlay("fartDeath");
}
function eatSprout(sizePercentage, speedPercentage) {
mouthArea_mc.scaleTo(120, 0);
mouthArea_mc.scaleTo(100, 0.5, "easeOutCubic");
var _local3 = hungerOffPerSprout * (sizePercentage / 100);
var _local4 = windPerSprout * ((100 - speedPercentage) / 100);
trace("hungerOff :- " + _local3);
trace("wind :- " + _local4);
hungerMeter.levelAdd(-_local3, true);
fartMeter.levelAdd(_local4, true);
startHunger(false);
hungerInt = setInterval(mx.utils.Proxy.create(this, startHunger, true), hungerPauseOnEating);
person_mc.gotoAndPlay("eat");
var _local5 = getRand(1, 2);
_global.sounds.playSound("eat" + _local5, false);
}
function increaseHunger() {
hungerMeter.levelAdd(hungerPerFrame);
if (hungerMeter.getLevel() >= 100) {
trace("Hunger alert!");
parentObj.death(this, "hunger");
} else if (fartMeter.getLevel() >= 100) {
trace("fartAlert!");
parentObj.death(this, "fart");
}
}
function startHunger(tf) {
if (tf) {
clearInterval(hungerInt);
hungerInt = setInterval(mx.utils.Proxy.create(this, increaseHunger), 40);
} else {
clearInterval(hungerInt);
}
}
function pressFart(tf) {
trace("pressFart " + tf);
if (tf) {
if (fartMeter.getLevel() > 0) {
nowFarting = true;
fartInt = setInterval(mx.utils.Proxy.create(this, farting), 40);
person_mc.gotoAndStop("fart");
fartMeterStart = fartMeter.getLevel();
trace("fartMeterStart :- " + fartMeterStart);
if ((parentObj.getLevel() < 3) && (!fartHelpOn)) {
trace("listen for fart help");
fartButtonDownTime = getTimer();
}
fartSound = getRand(1, 11);
trace("fartSound :- " + fartSound);
_global.sounds.playSound("fart" + fartSound, false);
}
} else if (nowFarting) {
trace("Stopping the fart");
_global.sounds.stopSound("fart" + fartSound);
person_mc.gotoAndPlay("fartPlay");
clearInterval(fartInt);
person_mc._x = startX;
person_mc._y = startY;
nowFarting = false;
if ((getTimer() - fartButtonDownTime) < showFartHelpSensorTime) {
trace("need to show fart help");
showFartHelp(true);
}
fartMeterEnd = fartMeter.getLevel();
var _local3 = fartMeterStart - fartMeterEnd;
trace("fartLength :- " + _local3);
if (_local3 >= 90) {
awardBonus(3);
} else if (_local3 > 75) {
awardBonus(2);
} else if (_local3 > 60) {
awardBonus(1);
}
if (fartHelpOn && (_local3 > 10)) {
trace("OKAY YOU'VE GOT IT!");
showFartHelp(false);
}
}
}
function awardBonus(level) {
trace("awardBonus " + level);
removeMovieClip(person_mc._parent.fartBonus_mc);
person_mc._parent.attachMovie("fartBonus", "fartBonus_mc", 100001);
var _local2 = person_mc._parent.fartBonus_mc;
_local2._x = fartMeter.getClip()._x + 50;
_local2._y = fartMeter.getClip()._y + 20;
var _local4 = parentObj.getBonusPoints(level);
var _local6 = parentObj.getBonusText(level);
_local2.text_mc.gotoAndStop(level);
_local2.text_mc.title_tf.text = _local6;
_local2.text_mc.bonus_tf.text = _local4;
var _local5 = new com.mosesSupposes.fuse.Fuse({scale:0, rotation:0, ease:"easeOutElastic", seconds:0}, {scale:100, rotation:15, ease:"easeOutElastic", seconds:1.5}, {scale:0, rotation:-45, ease:"easeInBack", seconds:0.5}, {scope:this, func:"removeBonus"});
_local5.__set__target(_local2);
_local5.start();
parentObj.addScore(_local4);
}
function removeBonus() {
trace("removing bonus clip");
removeMovieClip(person_mc._parent.fartBonus_mc);
}
function farting() {
fartMeter.levelAdd(-fartSpeed);
person_mc._x = getRand(startX - fartShakeMax, startX + fartShakeMax);
person_mc._y = getRand(startY - fartShakeMax, startY + fartShakeMax);
parentObj.addScore(scorePerFartFrame);
if (fartMeter.getLevel() <= 0) {
fartMeter.setLevel(0);
pressFart(false);
}
}
function showFartHelp(tf) {
trace("showFartHelp");
if (tf) {
fartHelpOn = true;
person_mc._parent.attachMovie("holdFartButton", "fartHelp_mc", 100000);
person_mc._parent.fartHelp_mc._x = 557;
person_mc._parent.fartHelp_mc._y = 297;
} else {
fartHelpOn = false;
removeMovieClip(person_mc._parent.fartHelp_mc);
}
}
function setHungerPerFrame(hn) {
hungerPerFrame = hn;
}
function setHungerOffPerSprout(ho) {
hungerOffPerSprout = ho;
}
function setWindPerSprout(wd) {
windPerSprout = wd;
}
function setFartSpeed(fs) {
fartSpeed = fs;
trace("fartSpeed :- " + fartSpeed);
}
function getPersonCode() {
return(personCode);
}
function getRand(low, high) {
return(Math.floor(Math.random() * (high - (low - 1))) + low);
}
function getName() {
if (personCode == 1) {
return("Mr Sproutifart");
}
if (personCode == 2) {
return("Mrs Sproutifart");
}
if (personCode == 3) {
return("old Granny Poopants");
}
if (personCode == 4) {
return("Baby Sproutifart");
}
}
function sproutOverMouth(tf) {
if (tf) {
person_mc.gotoAndStop("eat");
} else {
person_mc.gotoAndStop(1);
}
}
function enableFartButton(tf) {
if (tf) {
fartButton_btn.enabled = true;
} else {
fartButton_btn.enabled = false;
}
}
function getMouthClip() {
return(mouthArea_mc);
}
function die() {
showFartHelp(false);
removeMovieClip(person_mc._parent.fartBonus_mc);
clearInterval(hungerInt);
clearInterval(fartInt);
}
}
Symbol 564 MovieClip [__Packages.Meter] Frame 0
class Meter
{
var meter_mc, parentObj, level;
function Meter (po, mc) {
trace("New Meter");
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing);
meter_mc = mc;
parentObj = po;
level = 0;
updateMeter();
}
function setLevel(lv) {
level = lv;
updateMeter();
}
function levelAdd(amount, slideThere) {
level = level + amount;
if (level > 100) {
level = 100;
}
if (level < 0) {
level = 0;
}
updateMeter(slideThere);
}
function updateMeter(slideThere) {
if (slideThere) {
var _local3 = Math.round(level);
trace((("destFrame :- " + _local3) + " ") + meter_mc);
var _local4 = new com.mosesSupposes.fuse.Fuse({y:100 - level, ease:"easeOutCubic", seconds:0.2});
var _local2 = new com.mosesSupposes.fuse.Fuse({frame:_local3, ease:"easeOutCubic", seconds:0.2});
_local4.__set__target(meter_mc.mask_mc);
_local2.__set__target(meter_mc.level_mc);
_local4.start();
_local2.start();
} else {
meter_mc.mask_mc._y = 100 - level;
meter_mc.level_mc.gotoAndStop(Math.round(level));
}
}
function sirenFlash() {
meter_mc.gotoAndPlay("flash");
}
function getClip() {
return(meter_mc);
}
function getLevel() {
return(level);
}
}
Symbol 565 MovieClip [__Packages.Sprout] Frame 0
class Sprout
{
var target_mc, parentObj, code, beingDragged, sSpeed, sSize, dir, sprout_mc, shadow_mc, mveInt;
function Sprout (tg, cd, pa, sz, sp) {
target_mc = tg;
parentObj = pa;
code = cd;
beingDragged = false;
sSpeed = sp;
sSize = sz;
var _local2 = Math.floor(Math.random() * 2);
if (_local2 == 1) {
dir = true;
} else {
dir = false;
}
target_mc.sproutHolder_mc.attachMovie("sprout" + getRand(1, 3), "sprout" + code, cd);
target_mc.shadowHolder_mc.attachMovie("shadow", "shadow" + code, cd);
sprout_mc = target_mc.sproutHolder_mc["sprout" + code];
shadow_mc = target_mc.shadowHolder_mc["shadow" + code];
sprout_mc.leg1_mc.gotoAndPlay("walk2");
sprout_mc.scaleTo(sSize, 0);
shadow_mc.scaleTo(sSize, 0);
if (dir) {
sprout_mc._x = -20;
} else {
sprout_mc._x = 770;
sprout_mc._xscale = -sSize;
}
sprout_mc._y = 515 - (sprout_mc._height / 2);
shadow_mc._x = sprout_mc._x;
shadow_mc._y = 512;
var thisObj = this;
shadow_mc.onEnterFrame = function () {
this._x = thisObj.sprout_mc._x;
};
startMoving(true);
enableButton(true);
}
function enableButton(tf) {
if (tf) {
sprout_mc.onPress = mx.utils.Proxy.create(this, pickupSprout, true);
}
}
function pickupSprout(tf) {
if (tf) {
startMoving(false);
beingDragged = true;
startDrag (sprout_mc, true, 0, 0, 750, 550);
sprout_mc.onMouseUp = mx.utils.Proxy.create(this, pickupSprout, false);
shadow_mc.alphaTo(0, 0.5, "easeOutCubic");
shadow_mc.scaleTo(140, 0.5, "easeOutCubic");
sprout_mc.onMouseMove = mx.utils.Proxy.create(parentObj, parentObj.sproutDrag, sprout_mc);
} else {
stopDrag();
delete sprout_mc.onMouseUp;
delete sprout_mc.onMouseMove;
delete sprout_mc.onPress;
parentObj.hitTestSprout(this);
}
}
function getEaten() {
sprout_mc.scaleTo(0, 0.5, "easeOutCubic", 0, mx.utils.Proxy.create(this, die));
sprout_mc.rotateTo(180, 0.5, "easeOutCubic");
}
function getDropped() {
sprout_mc.slideTo(null, 570, 0.5, "easeInQuad", 0, mx.utils.Proxy.create(this, die));
}
function startMoving(tf) {
if (tf) {
mveInt = setInterval(mx.utils.Proxy.create(this, mve), 40);
} else {
clearInterval(mveInt);
stopDrag();
delete sprout_mc.onMouseUp;
delete sprout_mc.onMouseMove;
delete sprout_mc.onPress;
sprout_mc.leg1_mc.stop();
sprout_mc.leg2_mc.stop();
sprout_mc.stop();
}
}
function mve() {
if (dir) {
sprout_mc._x = sprout_mc._x + sSpeed;
} else {
sprout_mc._x = sprout_mc._x - sSpeed;
}
}
function getCode() {
return(code);
}
function getSpeed() {
return(sSpeed);
}
function getSize() {
return(sSize);
}
function getRand(low, high) {
return(Math.floor(Math.random() * (high - (low - 1))) + low);
}
function fadeSprout() {
sprout_mc.alphaTo(0, 0.5, "easeOutCubic", 0, mx.utils.Proxy.create(this, die));
shadow_mc.alphaTo(0, 0.5, "easeOutCubic");
}
function die() {
trace("sprout die");
removeMovieClip(sprout_mc);
removeMovieClip(shadow_mc);
clearInterval(mveInt);
parentObj.sproutDead(this);
}
}
Symbol 20 MovieClip Frame 1
stop();
Symbol 22 MovieClip [meter] Frame 1
stop();
Symbol 22 MovieClip [meter] Frame 52
stop();
Symbol 41 MovieClip Frame 1
stop();
Symbol 102 MovieClip [splat] Frame 13
stop();
Symbol 110 MovieClip [holdFartButton] Frame 16
stop();
Symbol 122 MovieClip Frame 1
stop();
Symbol 132 MovieClip [fartBonus] Frame 17
stop();
Symbol 142 Button
on (release) {
getURL ("http://www.eyegas.com");
}
Symbol 153 MovieClip Frame 1
stop();
Symbol 217 MovieClip Frame 1
stop();
Symbol 268 MovieClip Frame 1
stop();
Symbol 304 MovieClip Frame 1
stop();
Symbol 358 MovieClip Frame 1
stop();
Symbol 365 MovieClip Frame 69
stop();
Symbol 409 MovieClip Frame 1
stop();
Symbol 409 MovieClip Frame 37
gotoAndStop (1);
Symbol 409 MovieClip Frame 51
gotoAndStop (1);
Symbol 409 MovieClip Frame 63
stop();
Symbol 409 MovieClip Frame 107
stop();
_global.mySproutifartGame.doSplat(this._x);
Symbol 445 MovieClip Frame 96
stop();
Symbol 451 MovieClip Frame 50
stop();
Symbol 457 MovieClip Frame 48
stop();
Symbol 477 MovieClip Frame 1
stop();
Symbol 477 MovieClip Frame 39
gotoAndStop (1);
Symbol 477 MovieClip Frame 53
gotoAndStop (1);
Symbol 477 MovieClip Frame 63
stop();
Symbol 477 MovieClip Frame 105
stop();
_global.mySproutifartGame.doSplat(this._x);
Symbol 484 MovieClip Frame 65
stop();
Symbol 498 MovieClip Frame 1
stop();
Symbol 498 MovieClip Frame 38
gotoAndStop (1);
Symbol 498 MovieClip Frame 52
gotoAndStop (1);
Symbol 498 MovieClip Frame 62
stop();
Symbol 498 MovieClip Frame 105
stop();
_global.mySproutifartGame.doSplat(this._x);
Symbol 504 MovieClip Frame 65
stop();
Symbol 519 MovieClip Frame 1
stop();
Symbol 519 MovieClip Frame 41
gotoAndStop (1);
Symbol 519 MovieClip Frame 55
gotoAndStop (1);
Symbol 519 MovieClip Frame 77
stop();
Symbol 519 MovieClip Frame 109
stop();
Symbol 526 MovieClip Frame 65
stop();
Symbol 527 MovieClip Frame 16
stop();