Frame 1
function createSound(target, sndName, sndType, defaultVol, extension) {
if (((target == undefined) || (sndName == undefined)) || (sndType == undefined)) {
return(undefined);
}
if (extension == undefined) {
extension = "Snd";
}
target.createEmptyMovieClip(sndName + "Container", target.getNextHighestDepth());
target[sndName + extension] = new Sound(target[sndName + "Container"]);
target[sndName + extension].attachSound((sndName + ".") + sndType);
if (defaultVol != undefined) {
target[sndName + extension].setVolume(defaultVol);
}
}
function playReverse(mc) {
mc.stop();
if (mc._currentframe == 1) {
return(undefined);
}
mc.onEnterFrame = function () {
this.prevFrame();
if (this._currentframe == 1) {
delete this.onEnterFrame;
}
};
}
function gotoAndPlayReverse(mc, frame) {
if (frame != undefined) {
mc.gotoAndStop(frame);
} else {
mc.stop();
}
if (mc._currentframe == 1) {
return(undefined);
}
mc.onEnterFrame = function () {
this.prevFrame();
if (this._currentframe == 1) {
delete this.onEnterFrame;
}
};
}
function initSound(snd, mc, fileName, streaming) {
snd.onLoad = function (success) {
if (success) {
snd.start();
} else {
trace("Sound load failed");
}
};
mc.loopSound = function () {
if (snd != undefined) {
snd.start();
}
};
snd.loadSound(fileName, streaming);
snd.onSoundComplete = mc.loopSound;
}
function fadeInSound(snd, mc) {
delete mc.onEnterFrame;
if (snd == undefined) {
return(undefined);
}
mc.onEnterFrame = function () {
snd.setVolume(snd.getVolume() + 1);
if (snd.getVolume() >= 50) {
delete this.onEnterFrame;
}
};
}
function fadeOutSound(snd, mc) {
delete mc.onEnterFrame;
if (snd == undefined) {
return(undefined);
}
mc.onEnterFrame = function () {
snd.setVolume(snd.getVolume() - 1);
if (snd.getVolume() <= 0) {
delete this.onEnterFrame;
}
};
}
function endTween() {
_root.tweeningActive = false;
}
function timedTrigger(func, interval, repeat) {
function tick() {
tickCount++;
if (tickCount == repeat) {
clearInterval(trigInt);
clearInterval(countInt);
}
}
var tickCount = 0;
var trigInt = setInterval(func, interval);
var countInt = setInterval(tick, interval);
return(trigInt);
}
function minutesToMilli(minutes) {
var _local1 = (minutes * 60) * 1000;
return(_local1);
}
function secondsToMilli(seconds) {
var _local1 = seconds * 1000;
return(_local1);
}
function alphaIn(mc, time, delay, func) {
mc._fade = 0;
mc._visible = true;
mc.fadeIn(time, "easeInQuad", delay, func);
}
function alphaOut(mc, time, delay, func) {
mc.fadeOut(time, "easeOutQuad", delay, func);
}
function transformFromTo(mc, sx, sy, fx, fy, time, delay, func) {
mc._x = sx;
mc._y = sy;
mc._visible = true;
mc.slideTo(fx, fy, time, "easeOutQuad", delay, func);
}
function transformToFrom(mc, fx, fy, sx, sy, time, delay, func) {
mc._x = sx;
mc._y = sy;
mc._visible = true;
mc.slideTo(fx, fy, time, "easeOutQuad", delay, func);
}
function bubbleIn(mc, time, delay, scale) {
if (scale == undefined) {
scale = 100;
}
mc._alpha = 100;
mc._visible = true;
mc._xscale = 0;
mc._yscale = 0;
mc.tween("_xscale", scale, time, "easeOutElastic", delay);
mc.tween("_yscale", scale, time, "easeOutElastic", delay);
}
function scaleOut(mc, time, delay, func) {
mc.tween("_xscale", 0, time, "easeOutElastic", delay);
mc.tween("_yscale", 0, time, "easeOutElastic", delay);
}
function twistIn(mc, time, delay) {
mc._visible = true;
mc._scale = 500;
mc._brightOffset = 100;
mc._rotation = -50;
mc._alpha = 0;
mc.scaleTo(100, time, "easeOutBack", delay);
mc.alphaTo(100, time / 2, "linear", delay);
mc.colorResetTo(100, time * 1.5, "linear", delay);
mc.rotateTo(0, time, "easeOutBack", delay);
}
function twistOut(mc, time, delay) {
mc.scaleTo(500, time, "easeInBack", delay);
mc.alphaTo(0, time / 2, "linear", delay + (time / 2));
mc.colorResetTo(100, time * 1.5, "linear", delay);
mc.rotateTo(-50, time, "easeInBack", delay);
}
function visibleIn(mc, delay) {
function makeVisible() {
mc._visible = true;
}
mc._visible = false;
timedTrigger(makeVisible, secondsToMilli(delay), 1);
}
function visibleOut(mc, delay) {
function makeInvisible() {
mc._visible = false;
}
mc._visible = true;
timedTrigger(makeInvisible, secondsToMilli(delay), 1);
}
function objectsInvisible(mc) {
for (i in mc) {
if (mc[i] instanceof MovieClip) {
mc[i]._visible = false;
mc[i].stop();
}
}
}
function objectsVisible(mc) {
for (i in mc) {
if (mc[i] instanceof MovieClip) {
mc[i]._visible = true;
}
}
}
com.mosesSupposes.fuse.ZigoEngine.simpleSetup(com.mosesSupposes.fuse.Shortcuts, com.mosesSupposes.fuse.PennerEasing, com.mosesSupposes.fuse.FuseFMP);
rollOverScale.onRollOver = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
this.onEnterFrame = function () {
if (this._xscale < 110) {
this._xscale = this._xscale + 2;
this._yscale = this._yscale + 2;
} else {
delete this.onEnterFrame;
}
};
};
rollOverScale.onRollOut = function () {
this.onEnterFrame = function () {
if (this._xscale > 100) {
this._xscale = this._xscale - 2;
this._yscale = this._yscale - 2;
} else {
delete this.onEnterFrame;
}
};
};
rollOverBright.onRollOver = function () {
if (this._brightOffset == undefined) {
this.brightOffsetTo(2, 0, Elastic.easeOut);
}
this.onEnterFrame = function () {
if (this._brightOffset < 10) {
this._brightOffset = this._brightOffset + 2;
} else {
delete this.onEnterFrame;
}
};
};
rollOverBright.onRollOut = function () {
this.onEnterFrame = function () {
if (this._brightOffset > 0) {
this._brightOffset = this._brightOffset - 2;
} else {
this._brightOffset = 0;
delete this.onEnterFrame;
}
};
};
rollOverTint.onRollOver = function () {
this.onEnterFrame = function () {
if (this._tintPercent < 10) {
this._tintPercent++;
} else {
delete this.onEnterFrame;
}
};
};
rollOverTint.onRollOut = function () {
this.onEnterFrame = function () {
if (this._tintPercent > 0) {
this._tintPercent--;
} else {
delete this.onEnterFrame;
}
};
};
rollOverBrightPlay.onRollOver = function () {
if (this._brightOffset == undefined) {
this.brightOffsetTo(2, 0, Elastic.easeOut);
}
this.gotoAndPlay("rOver");
this.onEnterFrame = function () {
if (this._brightOffset < 12) {
this._brightOffset = this._brightOffset + 2;
} else {
delete this.onEnterFrame;
}
};
};
rollOverBrightPlay.onRollOut = function () {
this.gotoAndPlay("rOut");
this.onEnterFrame = function () {
if (this._brightOffset > 0) {
this._brightOffset = this._brightOffset - 2;
} else {
this._brightOffset = 0;
delete this.onEnterFrame;
}
};
};
rollOverBasic.onRollOver = function () {
this.gotoAndStop(2);
};
rollOverBasic.onRollOut = function () {
this.gotoAndStop(1);
};
var localData = SharedObject.getLocal("tattooGame");
var buttonArray = new Array(title.portraitMale, title.portraitFemale, title.loadSaveGame.yesBtn, title.loadSaveGame.noBtn, instructions.nextBtn, owner.difficultyEasyBtn, owner.difficultyNormalBtn, owner.difficultyHardBtn, tattooInfo.acceptBtn, tattooInfo.declineBtn, game.radioBtn, game.pauseBtn, pause.continueBtn, pause.quitBtn, winGame.playAgainBtn, loseGame.tryAgainBtn, goodEnd.nextBtn, averageEnd.nextBtn, badEnd.nextBtn, soundBtn);
var muteSound = false;
var mousePressed = false;
var mousePressedTimer = 0;
var customer = new Array();
var x = 0;
while (x <= 10) {
customer[x] = new Object();
customer[x].tattoo = new Array();
var y = 0;
while (y <= 3) {
customer[x].tattoo[y] = new Object();
y++;
}
x++;
}
var painToleranceHigh = 0.85;
var painToleranceAverage = 1;
var painToleranceLow = 1.25;
var cNum = 1;
var tNum = 1;
customer[cNum].painGain = painToleranceHigh;
customer[cNum].tattoo[1].info = "This guy is a chef. He wants an abstract flame tattoo on his back to represent how cooking is important in his life.\nPain tolerance: High";
customer[cNum].tattoo[1].bodyPart = game.fatGuyBack;
customer[cNum].tattoo[1].bodyPartPosX = -28;
customer[cNum].tattoo[1].bodyPartPosY = -12;
customer[cNum].tattoo[2].info = "A return customer, he wants a tattoo of a carrot on his arm. He says it is a versatile vegetable.\nPain tolerance: High";
customer[cNum].tattoo[2].bodyPart = game.bigGuyArm;
customer[cNum].tattoo[2].bodyPartPosX = -148;
customer[cNum].tattoo[2].bodyPartPosY = -176;
customer[cNum].tattoo[3].info = "The chef dude returns again, this time he wants a tattoo of his new restaraunts logo on his leg. He is calling it Marie's after his wife.\nPain tolerance: High";
customer[cNum].tattoo[3].bodyPart = game.bigGuyLeg;
customer[cNum].tattoo[3].bodyPartPosX = -32;
customer[cNum].tattoo[3].bodyPartPosY = -14;
cNum++;
customer[cNum].painGain = painToleranceAverage;
customer[cNum].tattoo[1].info = "This guy is way into sports. He wants a soccer ball tattoo on his arm.\nPain tolerance: Average";
customer[cNum].tattoo[1].bodyPart = game.bigGuyArm;
customer[cNum].tattoo[1].bodyPartPosX = -112;
customer[cNum].tattoo[1].bodyPartPosY = -816;
customer[cNum].tattoo[2].info = "A returning customer, he wants a tattoo of a running shoe with wings on his leg. He hopes it will bring him good luck during tryouts.\nPain tolerance: Average";
customer[cNum].tattoo[2].bodyPart = game.fitGuyLeg;
customer[cNum].tattoo[2].bodyPartPosX = -50;
customer[cNum].tattoo[2].bodyPartPosY = -86;
customer[cNum].tattoo[3].info = "The soccer dude returns again, this time he wants a tattoo of a horse's head on his back.\nPain tolerance: Average";
customer[cNum].tattoo[3].bodyPart = game.fitGuyBody;
customer[cNum].tattoo[3].bodyPartPosX = 26;
customer[cNum].tattoo[3].bodyPartPosY = -157;
cNum++;
customer[cNum].painGain = painToleranceLow;
customer[cNum].tattoo[1].info = "This patriotic Irishman wants a tattoo of the Irish flag on his leg.\nPain tolerance: Low";
customer[cNum].tattoo[1].bodyPart = game.fitGuyLegPale;
customer[cNum].tattoo[1].bodyPartPosX = -126;
customer[cNum].tattoo[1].bodyPartPosY = -590;
customer[cNum].tattoo[2].info = "A previous customer returns, he wants a tattoo of two horseshoes on his shoulder to signify luck. He is a bit of a gambler.\nPain tolerance: Low";
customer[cNum].tattoo[2].bodyPart = game.fitGuyBodyPale;
customer[cNum].tattoo[2].bodyPartPosX = -409;
customer[cNum].tattoo[2].bodyPartPosY = -4;
customer[cNum].tattoo[3].info = "The Irish dude returns again, this time he wants a tattoo of a four-leaf clover on his arm. He is going to Vegas in a week!\nPain tolerance: Low";
customer[cNum].tattoo[3].bodyPart = game.bigGuyBodySidePale;
customer[cNum].tattoo[3].bodyPartPosX = -88;
customer[cNum].tattoo[3].bodyPartPosY = -58;
cNum++;
customer[cNum].painGain = painToleranceAverage;
customer[cNum].tattoo[1].info = "This girl wants a lion's head tattoo on her arm. It represents loyalty.\nPain tolerance: Average";
customer[cNum].tattoo[1].bodyPart = game.womanArmAsian;
customer[cNum].tattoo[1].bodyPartPosX = -115;
customer[cNum].tattoo[1].bodyPartPosY = -51;
customer[cNum].tattoo[2].info = "A previous customer, she wants an abstract tribal tattoo on her leg.\nPain tolerance: Average";
customer[cNum].tattoo[2].bodyPart = game.womanLegAsian;
customer[cNum].tattoo[2].bodyPartPosX = 5;
customer[cNum].tattoo[2].bodyPartPosY = -945;
customer[cNum].tattoo[3].info = "She's back and says she is addicted to your work. She wants an asian dragon tattoo on her back. It is a symbol of power, courtage, strength, and strong will.\nPain tolerance: Average";
customer[cNum].tattoo[3].bodyPart = game.womanBackAsian;
customer[cNum].tattoo[3].bodyPartPosX = -150;
customer[cNum].tattoo[3].bodyPartPosY = -5;
cNum++;
customer[cNum].painGain = painToleranceLow;
customer[cNum].tattoo[1].info = "This young girl wants a flower tattoo on her back.\nPain tolerance: Low";
customer[cNum].tattoo[1].bodyPart = game.womanBack;
customer[cNum].tattoo[1].bodyPartPosX = -148;
customer[cNum].tattoo[1].bodyPartPosY = -5;
customer[cNum].tattoo[2].info = "A previous customer, she wants a butterfly tattoo on her arm. She says it symbolizes change and new beginnings.\nPain tolerance: Low";
customer[cNum].tattoo[2].bodyPart = game.womanArm;
customer[cNum].tattoo[2].bodyPartPosX = -145;
customer[cNum].tattoo[2].bodyPartPosY = -657;
customer[cNum].tattoo[3].info = "She's back. She wants yet another butterfly tattoo on her other arm. She says it symbolizes freedom and joy.\nPain tolerance: Low";
customer[cNum].tattoo[3].bodyPart = game.womanArm;
customer[cNum].tattoo[3].bodyPartPosX = -120;
customer[cNum].tattoo[3].bodyPartPosY = -42;
cNum++;
customer[cNum].painGain = painToleranceHigh;
customer[cNum].tattoo[1].info = "This sad looking girl wants a broken heart tattoo on her leg. Seems like she just had a relationship end.\nPain tolerance: High";
customer[cNum].tattoo[1].bodyPart = game.womanLegPale;
customer[cNum].tattoo[1].bodyPartPosX = 18;
customer[cNum].tattoo[1].bodyPartPosY = -981;
customer[cNum].tattoo[2].info = "A previous customer, she wants a weeping skull tattoo on her arm. Creepy.\nPain tolerance: High";
customer[cNum].tattoo[2].bodyPart = game.womanArmPale;
customer[cNum].tattoo[2].bodyPartPosX = -24;
customer[cNum].tattoo[2].bodyPartPosY = -890;
customer[cNum].tattoo[3].info = "The goth girl is back, this time she wants a dragon tattoo on her back. She says it is a protector watching over her.\nPain tolerance: High";
customer[cNum].tattoo[3].bodyPart = game.womanBackPale;
customer[cNum].tattoo[3].bodyPartPosX = -148;
customer[cNum].tattoo[3].bodyPartPosY = -5;
cNum++;
customer[cNum].painGain = painToleranceAverage;
customer[cNum].tattoo[1].info = "This girl is really into books. She wants a bookworm tattoo on her arm to celebrate her new teaching job.\nPain tolerance: Average";
customer[cNum].tattoo[1].bodyPart = game.womanArm;
customer[cNum].tattoo[1].bodyPartPosX = -164;
customer[cNum].tattoo[1].bodyPartPosY = -595;
customer[cNum].tattoo[2].info = "A previous customer, she wants a lily tattoo on her back. A lily is a symbol of chastity and virtue.\nPain tolerance: Average";
customer[cNum].tattoo[2].bodyPart = game.womanBack;
customer[cNum].tattoo[2].bodyPartPosX = -148;
customer[cNum].tattoo[2].bodyPartPosY = -5;
customer[cNum].tattoo[3].info = "The bookworm is back, this time she wants a tattoo of an angel in front of the moon on her leg. She says the angel is a protector.\nPain tolerance: Average";
customer[cNum].tattoo[3].bodyPart = game.womanLeg;
customer[cNum].tattoo[3].bodyPartPosX = 92;
customer[cNum].tattoo[3].bodyPartPosY = -15;
cNum++;
customer[cNum].painGain = painToleranceHigh;
customer[cNum].tattoo[1].info = "This guy looks like he works out often. He wants a star tattoo on his leg, it represent honor.\nPain tolerance: High";
customer[cNum].tattoo[1].bodyPart = game.bigGuyLeg;
customer[cNum].tattoo[1].bodyPartPosX = -126;
customer[cNum].tattoo[1].bodyPartPosY = -890;
customer[cNum].tattoo[2].info = "A previous customer, he reveals he is into speed racing, and wants a checkered flag tattoo on his back to celebrate a race he won recently.\nPain tolerance: High";
customer[cNum].tattoo[2].bodyPart = game.fitGuyBody;
customer[cNum].tattoo[2].bodyPartPosX = -116;
customer[cNum].tattoo[2].bodyPartPosY = -430;
customer[cNum].tattoo[3].info = "The racing fan is back, this time he wants a lightning bolt tattoo on his arm.\nPain tolerance: High";
customer[cNum].tattoo[3].bodyPart = game.bigGuyArm;
customer[cNum].tattoo[3].bodyPartPosX = 21;
customer[cNum].tattoo[3].bodyPartPosY = -940;
cNum++;
customer[cNum].painGain = painToleranceHigh;
customer[cNum].tattoo[1].info = "This guy wants a moon tattoo on his arm, to represent rebirth and immortality.\nPain tolerance: High";
customer[cNum].tattoo[1].bodyPart = game.bigGuyArm;
customer[cNum].tattoo[1].bodyPartPosX = -81;
customer[cNum].tattoo[1].bodyPartPosY = -188;
customer[cNum].tattoo[2].info = "A previous customer, he wants a tattoo of an anchor on his back to represent his time in the Navy.\nPain tolerance: High";
customer[cNum].tattoo[2].bodyPart = game.fatGuyBack;
customer[cNum].tattoo[2].bodyPartPosX = -28;
customer[cNum].tattoo[2].bodyPartPosY = -12;
customer[cNum].tattoo[3].info = "The big guy is back, this time he wants a snake tattoo on his other leg.\nPain tolerance: High";
customer[cNum].tattoo[3].bodyPart = game.bigGuyLeg;
customer[cNum].tattoo[3].bodyPartPosX = -146;
customer[cNum].tattoo[3].bodyPartPosY = -587;
cNum++;
customer[cNum].painGain = painToleranceLow;
customer[cNum].tattoo[1].info = "This girl is into music. She wants a diamond tattoo on her back. A diamond represents consistency. She wants more consistency in the music she plays.\nPain tolerance: Low";
customer[cNum].tattoo[1].bodyPart = game.womanLegPale;
customer[cNum].tattoo[1].bodyPartPosX = -5;
customer[cNum].tattoo[1].bodyPartPosY = -752;
customer[cNum].tattoo[2].info = "A previous customer, she wants a treble clef tattoo on her leg.\nPain tolerance: Low";
customer[cNum].tattoo[2].bodyPart = game.womanBodyPale;
customer[cNum].tattoo[2].bodyPartPosX = -194;
customer[cNum].tattoo[2].bodyPartPosY = -575;
customer[cNum].tattoo[3].info = "The music fan is back, this time she wants a bleeding rose tattoo on her arm. She says it represents love and pain.\nPain tolerance: Low";
customer[cNum].tattoo[3].bodyPart = game.womanArmPale;
customer[cNum].tattoo[3].bodyPartPosX = -122;
customer[cNum].tattoo[3].bodyPartPosY = -195;
cNum++;
var inkBlobColor = new Array();
inkBlobColor[1] = 14578768 /* 0xDE7450 */;
inkBlobColor[2] = 7417367 /* 0x712E17 */;
inkBlobColor[3] = 14134577 /* 0xD7AD31 */;
inkBlobColor[4] = 16724736 /* 0xFF3300 */;
inkBlobColor[5] = 10765090 /* 0xA44322 */;
inkBlobColor[6] = 10429513 /* 0x9F2449 */;
inkBlobColor[7] = 26316;
inkBlobColor[8] = 6272073 /* 0x5FB449 */;
inkBlobColor[9] = 10040268 /* 0x9933CC */;
inkBlobColor[10] = 16763904 /* 0xFFCC00 */;
inkBlobColor[11] = 16092195 /* 0xF58C23 */;
inkBlobColor[12] = 32832;
inkBlobColor[13] = 16777215 /* 0xFFFFFF */;
inkBlobColor[14] = 0;
inkBlobColor[15] = 15361268 /* 0xEA64F4 */;
inkBlobColor[16] = 12303291 /* 0xBBBBBB */;
inkBlobColor[17] = 6710886 /* 0x666666 */;
inkBlobColor[18] = 6724044 /* 0x6699CC */;
game.stroke.stroke1.size = 4;
game.stroke.stroke2.size = 8;
game.stroke.stroke3.size = 12;
game.stroke.stroke4.size = 16;
game.stroke.stroke5.size = 20;
game.stroke.stroke6.size = 2;
var curCustomer = 0;
var curTattoo = 0;
var gameStat = -1;
var gCount = 0;
var gameDifficulty = 1;
var playSound = true;
soundLoop = function () {
this.start();
};
var x = 1;
while (x <= 10) {
var sndStr = (("customer" + x) + "ouch");
createSound(this, sndStr, "wav");
var sndStr = (("customer" + x) + "ouchHi");
createSound(this, sndStr, "wav");
var sndStr = ("musicCustomer" + x);
createSound(this, sndStr, "mp3", 75, "");
this["musicCustomer" + x].onSoundComplete = soundLoop;
x++;
}
var x = 1;
while (x <= 4) {
var sndStr = ("ownerAngry" + x);
createSound(this, sndStr, "wav", 100, "snd");
var sndStr = ("ownerMeh" + x);
createSound(this, sndStr, "wav", 100, "snd");
var sndStr = ("ownerHappy" + x);
createSound(this, sndStr, "wav", 100, "snd");
x++;
}
createSound(this, "failWarn", "wav");
createSound(this, "rollOver", "wav", 50);
createSound(this, "tattooDraw", "wav", 40);
tattooDrawSnd.onSoundComplete = soundLoop;
var tattooDrawPlaying = false;
createSound(this, "ownerIntro", "wav");
createSound(this, "ownerGoodEnd", "wav");
createSound(this, "ownerMehEnd", "wav");
createSound(this, "ownerBadEnd", "wav");
createSound(this, "ownerChoose", "wav");
createSound(this, "ownerWarning1", "wav", 100, "snd");
createSound(this, "ownerWarning2", "wav", 100, "snd");
createSound(this, "ownerIdle1", "wav", 100, "snd");
createSound(this, "ownerIdle2", "wav", 100, "snd");
var musicMenuContainer = this.createEmptyMovieClip("musicMenuContainer", this.getNextHighestDepth());
var musicMenu = new Sound(musicMenuContainer);
musicMenu.attachSound("musicMenu.mp3");
musicMenu.onSoundComplete = soundLoop;
musicMenu.setVolume(50);
var musicCustomerSelectContainer = this.createEmptyMovieClip("musicCustomerSelectContainer", this.getNextHighestDepth());
var musicCustomerSelect = new Sound(musicCustomerSelectContainer);
musicCustomerSelect.attachSound("musicCustomerSelect.mp3");
musicCustomerSelect.onSoundComplete = soundLoop;
musicCustomerSelect.setVolume(50);
function showGamePillLogo() {
addictingGamesLogo._visible = false;
gamePillLogo._visible = true;
gamePillLogo.gotoAndPlay(1);
}
function showAGlogo() {
gamePillLogo._visible = false;
addictingGamesLogo._visible = true;
addictingGamesLogo.gotoAndPlay(1);
}
addictingGamesLogo.onPress = function () {
getURL ("http://www.addictinggames.com", "_blank");
};
function showTitle() {
hideScreens();
stopMusic();
if (playSound == true) {
musicMenu.start(0, 9999);
}
prevMusic = musicMenu;
_root.tweeningActive = true;
var _local2 = 0;
title.anim.gotoAndStop(1);
title.anim._visible = true;
title.anim._alpha = 100;
alphaIn(title, 0.5, _local2);
_local2 = _local2 + 0.8;
transformFromTo(title.parchment, 143, -500, 143, 89, 0.5, _local2);
_local2 = _local2 + 0.25;
timedTrigger(playTitleAnim, _local2 * 1000, 1);
_local2 = _local2 + 0.25;
if (checkSavedGame() == false) {
transformFromTo(title.portraitMale, 135, 600, 190, 355, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(title.portraitFemale, 536, 600, 449, 341, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(title.birds, 3, 500, 3, 225, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaIn(title.chooseBanner, 0.3, _local2);
_local2 = _local2 + 0.3;
title.loadSaveGame._y = 600;
} else {
transformFromTo(title.birds, 3, 500, 3, 225, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(title.loadSaveGame, 160, 600, 160, 274, 0.5, _local2);
_local2 = _local2 + 0.25;
title.portraitMale._y = 600;
title.portraitFemale._y = 600;
title.chooseBanner._alpha = 0;
}
timedTrigger(endTween, _local2 * 1000, 1);
}
function playTitleAnim() {
title.anim.gotoAndPlay(2);
}
title.portraitMale.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
playerGender = 1;
showInstructions();
};
title.portraitFemale.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
playerGender = 2;
showInstructions();
};
title.loadSaveGame.yesBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
_root.tweeningActive = true;
var _local2 = 0;
alphaOut(title.startBtn, 0.3, _local2);
_local2 = _local2 + 0.3;
transformToFrom(title.loadSaveGame, 160, 600, 160, 274, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaOut(title.anim, 0.25, _local2);
transformFromTo(title.birds, 3, 225, 3, 500, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(title.parchment, 143, 89, 143, -500, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaOut(title, 0.25, _local2);
_local2 = _local2 + 0.5;
timedTrigger(newGame, _local2 * 1000, 1);
_local2 = _local2 + 0.3;
timedTrigger(showCustomers, _local2 * 1000, 1);
};
title.loadSaveGame.noBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
clearSave();
_root.tweeningActive = true;
var _local2 = 0;
transformToFrom(title.loadSaveGame, 160, 600, 160, 274, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(title.portraitMale, 135, 600, 190, 355, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(title.portraitFemale, 536, 600, 449, 341, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaIn(title.chooseBanner, 0.3, _local2);
_local2 = _local2 + 0.3;
timedTrigger(endTween, _local2 * 1000, 1);
};
function showInstructions() {
_root.tweeningActive = true;
var _local2 = 0;
instructions.paper.gotoAndStop(1);
alphaOut(title.startBtn, 0.3, _local2);
_local2 = _local2 + 0.3;
transformFromTo(title.portraitMale, 190, 355, 135, 600, 0.5, _local2);
transformFromTo(title.portraitFemale, 449, 341, 536, 600, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaOut(title.anim, 0.25, _local2);
alphaOut(title.chooseBanner, 0.2, _local2);
transformFromTo(title.birds, 3, 225, 3, 500, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(title.parchment, 143, 89, 143, -500, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaOut(title, 0.25, _local2);
_local2 = _local2 + 0.5;
alphaIn(instructions, 0.25, _local2);
_local2 = _local2 + 0.5;
transformFromTo(instructions.bg.couch, 392, 1166, 392, 736, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(instructions.bg.bookcase, 1027, 801, 1027, 541, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(instructions.paper, -380, 150, 133, 0, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaIn(instructions.nextBtn, 0.25, _local2);
_local2 = _local2 + 0.25;
timedTrigger(endTween, _local2 * 1000, 1);
}
instructions.nextBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
_root.tweeningActive = true;
var _local2 = 0;
alphaOut(instructions.nextBtn, 0.25, _local2);
_local2 = _local2 + 0.25;
transformFromTo(instructions.paper, 133, 0, -380, 150, 0.5, _local2);
transformFromTo(instructions.bg.couch, 392, 736, 392, 1166, 0.5, _local2);
transformFromTo(instructions.bg.bookcase, 1027, 541, 1027, 801, 0.5, _local2);
_local2 = _local2 + 0.5;
alphaOut(instructions, 0.25, _local2);
_local2 = _local2 + 0.5;
alphaIn(owner, 0.5, _local2);
_local2 = _local2 + 0.5;
transformFromTo(owner.owner, 260, 500, 260, 24, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(owner.ownerText, -275, 24, 45, 24, 0.5, _local2);
_local2 = _local2 + 0.25;
twistIn(owner.chooseDifficultyText, 0.5, _local2);
alphaIn(owner.difficultyEasyBtn, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaIn(owner.difficultyNormalBtn, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaIn(owner.difficultyHardBtn, 0.5, _local2);
_local2 = _local2 + 0.25;
timedTrigger(playOwnerIntro, _local2 * 1000, 1);
alphaIn(owner.nextBtn, 0.25, _local2);
_local2 = _local2 + 0.25;
timedTrigger(endTween, _local2 * 1000, 1);
};
function playOwnerIntro() {
if (playSound == true) {
ownerIntroSnd.start();
}
prevMusic = ownerIntroSnd;
}
function showGoodEnd() {
gameStat = -1;
game._visible = false;
stopAllSounds();
tattooDrawSnd.setVolume(0);
if (playSound == true) {
musicMenu.start();
}
outOfBoundsTimer = 0;
_root.tweeningActive = true;
var _local2 = 0;
alphaIn(goodEnd, 0.25, _local2);
_local2 = _local2 + 0.25;
transformFromTo(goodEnd.owner, 260, 500, 260, 24, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(goodEnd.ownerText, -275, 24, 45, 24, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaIn(goodEnd.nextBtn, 0.5, _local2);
_local2 = _local2 + 0.25;
if (playSound == true) {
ownerGoodEndSnd.start();
}
timedTrigger(endTween, _local2 * 1000, 1);
}
function showAverageEnd() {
gameStat = -1;
game._visible = false;
stopAllSounds();
tattooDrawSnd.setVolume(0);
if (playSound == true) {
musicMenu.start();
}
outOfBoundsTimer = 0;
_root.tweeningActive = true;
var _local2 = 0;
alphaIn(averageEnd, 0.25, _local2);
_local2 = _local2 + 0.25;
transformFromTo(averageEnd.owner, 260, 500, 260, 24, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(averageEnd.ownerText, -275, 24, 45, 24, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaIn(averageEnd.nextBtn, 0.5, _local2);
_local2 = _local2 + 0.25;
if (playSound == true) {
ownerMehEndSnd.start();
}
timedTrigger(endTween, _local2 * 1000, 1);
}
function showBadEnd() {
gameStat = -1;
game._visible = false;
stopAllSounds();
tattooDrawSnd.setVolume(0);
if (playSound == true) {
musicMenu.start();
}
outOfBoundsTimer = 0;
customer[curCustomer].tattoo[curTattoo].score = 0;
if ((lives - 1) > 0) {
if ((lives - 1) == 1) {
if (playSound == true) {
ownerWarning2snd.start();
}
badEnd.ownerText.livesText.text = ("YOU'VE GOT " + (lives - 1)) + " CHANCE LEFT!";
} else {
if (playSound == true) {
ownerWarning1snd.start();
}
badEnd.ownerText.livesText.text = ("YOU'VE GOT " + (lives - 1)) + " CHANCES LEFT.";
}
} else {
if (playSound == true) {
ownerBadEndSnd.start();
}
badEnd.ownerText.livesText.text = "You're outta here!";
}
_root.tweeningActive = true;
var _local2 = 0;
alphaIn(badEnd, 0.25, _local2);
_local2 = _local2 + 0.25;
transformFromTo(badEnd.owner, 260, 500, 260, 24, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(badEnd.ownerText, -275, 24, 24, 24, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaIn(badEnd.livesText, 0.25, _local2);
alphaIn(badEnd.nextBtn, 0.5, _local2);
_local2 = _local2 + 0.25;
timedTrigger(endTween, _local2 * 1000, 1);
}
owner.difficultyEasyBtn.onPress = function () {
_root.tweeningActive = true;
var _local2 = 0;
gameDifficulty = 0;
newGame();
alphaOut(owner, 0.25, _local2);
_local2 = _local2 + 0.25;
timedTrigger(showCustomers, _local2 * 1000, 1);
};
owner.difficultyNormalBtn.onPress = function () {
_root.tweeningActive = true;
var _local2 = 0;
gameDifficulty = 1;
newGame();
alphaOut(owner, 0.25, _local2);
_local2 = _local2 + 0.25;
timedTrigger(showCustomers, _local2 * 1000, 1);
};
owner.difficultyHardBtn.onPress = function () {
_root.tweeningActive = true;
var _local2 = 0;
gameDifficulty = 2;
newGame();
alphaOut(owner, 0.25, _local2);
_local2 = _local2 + 0.25;
timedTrigger(showCustomers, _local2 * 1000, 1);
};
goodEnd.nextBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
saveGame();
hideScreens();
showCustomers();
};
averageEnd.nextBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
saveGame();
hideScreens();
showCustomers();
};
badEnd.nextBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
lives--;
if (lives > 0) {
saveGame();
hideScreens();
showCustomers();
} else {
clearSave();
gameLose();
}
};
function setupCustomers() {
var _local1 = 1;
while (_local1 <= 10) {
customers["customer" + _local1].startX = customers["customer" + _local1]._x;
customers["customer" + _local1].startY = customers["customer" + _local1]._y;
_local1++;
}
customers.customer1.polaroidPos = 8;
customers.customer2.polaroidPos = 9;
customers.customer3.polaroidPos = 10;
customers.customer4.polaroidPos = 11;
customers.customer5.polaroidPos = 12;
customers.customer6.polaroidPos = 13;
customers.customer7.polaroidPos = 14;
customers.customer8.polaroidPos = 1;
customers.customer9.polaroidPos = 2;
customers.customer10.polaroidPos = 3;
customers.customer1.caption.text = "THE CHEF";
customers.customer2.caption.text = "TONY THE TIGER";
customers.customer3.caption.text = "LUCKY LUKE";
customers.customer4.caption.text = "TANYA";
customers.customer5.caption.text = "SHERRY CHERRY";
customers.customer6.caption.text = "DARK DIANE";
customers.customer7.caption.text = "SMARTY SUSAN";
customers.customer8.caption.text = "FRANK THE TANK";
customers.customer9.caption.text = "GRIZZLY GORD";
customers.customer10.caption.text = "BETTY BOP";
}
function showCustomers() {
stopMusic();
if (playSound == true) {
musicCustomerSelect.start(0, 9999);
}
prevMusic = musicCustomerSelect;
customers.difficultyDisplay.gotoAndStop(gameDifficulty + 1);
var _local6 = true;
var _local3 = 1;
while (_local3 <= 10) {
doneCust = true;
var _local4 = 1;
while (_local4 <= 3) {
if (customer[_local3].tattoo[_local4].score == 0) {
_local6 = false;
doneCust = false;
}
_local4++;
}
if (doneCust == false) {
customers["customer" + _local3].checkMark._alpha = 0;
customers["customer" + _local3].whiteOut._alpha = 0;
} else {
customers["customer" + _local3].checkMark._alpha = 100;
customers["customer" + _local3].whiteOut._alpha = 30;
}
_local3++;
}
if (_local6 == true) {
gameWin();
} else {
_root.tweeningActive = true;
var _local5 = 0;
if (playSound == true) {
ownerChooseSnd.start();
}
hideScreens();
alphaIn(customers, 0.5, _local5);
_local5 = _local5 + 0.5;
transformFromTo(customers.bg.couch, -500, 680, 275, 353, 0.5, _local5);
transformFromTo(customers.bg.bookcase, 1000, 680, 713, 218, 0.5, _local5);
_local5 = _local5 + 0.15;
transformFromTo(customers.board, 85, 530, 85, 13, 0.5, _local5);
_local5 = _local5 + 0.25;
_local3 = 1;
while (_local3 <= 10) {
transformFromTo(customers["customer" + _local3], 361, 512, customers["customer" + _local3].startX, customers["customer" + _local3].startY, 0.5, _local5);
_local5 = _local5 + 0.2;
customers["customer" + _local3].num = _local3;
customers["customer" + _local3].gotoAndStop(customers["customer" + _local3].polaroidPos);
customers["customer" + _local3].filters = dropShadowFilter.filters;
if (customers["customer" + _local3].checkMark._alpha == 0) {
customers["customer" + _local3].useHandCursor = true;
} else {
customers["customer" + _local3].useHandCursor = false;
}
customers["customer" + _local3].onPress = function () {
if (this.checkMark._alpha == 0) {
var _local2 = 1;
while (_local2 <= 3) {
if (this._parent._parent.customer[this.num].tattoo[_local2].score == 0) {
showTattooInfo(this.num, _local2);
return(undefined);
}
_local2++;
}
}
};
customers["customer" + _local3].onRollOver = function () {
if (this.checkMark._alpha == 0) {
this.filters = glowFilter.filters;
}
};
customers["customer" + _local3].onRollOut = function () {
this.filters = shadowFilter.filters;
};
customers["customer" + _local3].onReleaseOutside = function () {
this.filters = dropShadowFilter.filters;
};
_local3++;
}
timedTrigger(endTween, _local5 * 1000, 1);
}
}
function showTattooInfo(cNum, tNum) {
if (_root.tweeningActive == true) {
return(undefined);
}
tattooInfo.custNum = cNum;
tattooInfo.tattooNum = tNum;
var _local2 = 1;
while (_local2 <= 3) {
tattooInfo["postIt" + _local2].tattooSample.removeMovieClip();
tattooInfo["postIt" + _local2].attachMovie((("tattoo" + cNum) + "-") + _local2, "tattooSample", tattooInfo["postIt" + _local2].getNextHighestDepth());
tattooInfo["postIt" + _local2].tattooSample.gotoAndStop(2);
while ((tattooInfo["postIt" + _local2].tattooSample._width > 70) || (tattooInfo["postIt" + _local2].tattooSample._height > 70)) {
tattooInfo["postIt" + _local2].tattooSample._xscale = tattooInfo["postIt" + _local2].tattooSample._xscale / 1.025;
tattooInfo["postIt" + _local2].tattooSample._yscale = tattooInfo["postIt" + _local2].tattooSample._yscale / 1.025;
}
tattooInfo["postIt" + _local2].tattooSample._x = 50 - (tattooInfo["postIt" + _local2].tattooSample._width / 2);
tattooInfo["postIt" + _local2].tattooSample._y = 38 - (tattooInfo["postIt" + _local2].tattooSample._height / 2);
if (_local2 != tNum) {
tattooInfo["postIt" + _local2].tattooSample._alpha = 40;
}
if (_local2 == tNum) {
tattooInfo["postIt" + _local2].tattooSample.filters = glowFilter.filters;
}
tattooInfo["postIt" + _local2].checkMark.removeMovieClip();
if (customer[cNum].tattoo[_local2].score != 0) {
tattooInfo["postIt" + _local2].attachMovie("checkMark", "checkMark", tattooInfo["postIt" + _local2].getNextHighestDepth());
tattooInfo["postIt" + _local2].checkMark._x = 50 - (tattooInfo["postIt" + _local2].checkMark._width / 2);
tattooInfo["postIt" + _local2].checkMark._y = 38 - (tattooInfo["postIt" + _local2].checkMark._height / 2);
tattooInfo["postIt" + _local2].checkMark.filters = shadowFilter.filters;
}
_local2++;
}
tattooInfo.text.text = customer[cNum].tattoo[tNum].info;
tattooInfo.portrait.gotoAndStop(cNum);
tattooInfo.portrait.caption.text = customers["customer" + cNum].caption.text;
tattooInfo._visible = true;
transformFromTo(tattooInfo, 0, -500, 0, -5, 0.5, 0.25);
}
setupCustomers();
tattooInfo.acceptBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
if (playSound == true) {
ownerGoodChoiceSnd.start();
}
curCustomer = tattooInfo.custNum;
curTattoo = tattooInfo.tattooNum;
_root.tweeningActive = true;
var _local3 = 0;
transformFromTo(tattooInfo, 0, -5, 0, 500, 0.5, _local3);
_local3 = _local3 + 0.5;
alphaOut(customers.weekText, 0.25, 0);
var _local2 = 10;
while (_local2 >= 1) {
transformToFrom(customers["customer" + _local2], 361, 512, customers["customer" + _local2].startX, customers["customer" + _local2].startY, 0.3, _local3);
_local3 = _local3 + 0.1;
_local2--;
}
transformToFrom(customers.board, 85, 530, 85, 13, 0.5, _local3);
_local3 = _local3 + 0.25;
transformFromTo(customers.bg.couch, 275, 353, -500, 680, 0.5, _local3);
transformFromTo(customers.bg.bookcase, 713, 218, 1000, 680, 0.5, _local3);
_local3 = _local3 + 0.25;
timedTrigger(newCustomer, _local3 * 1000, 1);
};
tattooInfo.declineBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
_root.tweeningActive = true;
var _local2 = 0;
transformFromTo(tattooInfo, 0, 0, 0, 500, 0.5, _local2);
_local2 = _local2 + 0.5;
timedTrigger(endTween, _local2 * 1000, 1);
};
tattooInfo.bg.onPress = function () {
};
tattooInfo.bg.useHandCursor = false;
function newGame() {
lives = 3;
if (game.haxorBtn._visible == true) {
lives = 3000;
}
var _local2 = 1;
while (_local2 <= 10) {
var _local1 = 1;
while (_local1 <= 3) {
customer[_local2].tattoo[_local1].score = 0;
_local1++;
}
_local2++;
}
if (checkSavedGame() == true) {
loadGame();
}
if (gameDifficulty == 0) {
scoreMultiplier = 1.7;
custSatMultiplier = 10;
failWarningLength = 15;
completePhaseOnePercent = 20;
completePhaseTwoPercent = 15;
shakeDelay = 12;
}
if (gameDifficulty == 1) {
scoreMultiplier = 1.5;
custSatMultiplier = 15;
failWarningLength = 10;
completePhaseOnePercent = 17;
completePhaseTwoPercent = 13;
shakeDelay = 16;
}
if (gameDifficulty == 2) {
scoreMultiplier = 1.3;
custSatMultiplier = 20;
failWarningLength = 5;
completePhaseOnePercent = 14;
completePhaseTwoPercent = 11;
shakeDelay = 20;
}
}
function newCustomer() {
hideScreens();
_root.tweeningActive = true;
var _local5 = 0;
alphaIn(game, 0.5, _local5);
_local5 = _local5 + 0.5;
transformFromTo(game.topParchment, 60, -120, 60, 6, 0.3, _local5);
_local5 = _local5 + 0.3;
alphaIn(game.shakeMeter, 0.5, _local5);
alphaIn(game.painMeter, 0.5, _local5);
alphaIn(game.customerSatisfaction, 0.5, _local5);
alphaIn(game.timeElapsed, 0.5, _local5);
_local5 = _local5 + 0.25;
alphaIn(game.pauseBtn, 0.5, _local5);
_local5 = _local5 + 0.25;
transformFromTo(game.stroke, -4, 480, -4, 350, 0.3, _local5);
_local5 = _local5 + 0.3;
transformFromTo(game.sample, 424, 485, 424, 314, 0.3, _local5);
_local5 = _local5 + 0.3;
transformFromTo(game.completionMeter, 610, 480, 610, 228, 0.3, _local5);
_local5 = _local5 + 0.3;
alphaIn(game.progressText, 0.5, _local5 + 0.25);
_local5 = _local5 + 0.3;
game.phaseBanner.text.text = "PHASE 1\nOUTLINE";
game.phaseBanner.fillMeterText._visible = true;
transformFromTo(game.phaseBanner, 185, -180, 185, 140, 0.5, _local5);
phaseBannerTimer = 0;
_local5 = _local5 + 0.3;
timedTrigger(endTween, _local5 * 1000, 1);
tattooDrawPlaying = false;
tattooDrawSnd.stop();
tattooDrawSnd.setVolume(40);
stopMusic();
curMusic = Math.round(Math.random() * 9) + 1;
if (playSound == true) {
playCustomerMusic();
}
game.endBanner._visible = false;
tattooPhase = 0;
game.ink._visible = false;
painMeter = 0;
maxPain = 0;
maxPainTimer = 0;
shakeMeter = 0;
shakeDir = 0;
shakeTimer = -180;
randSnd = 0;
prevRandSnd = 0;
ouchSndTimer = 0;
failWarningTimer = -1;
game.failWarn._alpha = 0;
game.painWarn._alpha = 0;
idleTimer = 0;
outOfBoundsTimer = 0;
custSat = 1;
timeElapsed = 0;
setTimeElapsed();
quickGradeTimer = -480;
ownerCommentTimer = 0;
finalScore = 100;
game.painMeter.gotoAndStop(1);
game.shakeMeter.gotoAndStop(1);
game.customerSatisfaction.gotoAndStop(1);
game.completionMeter.gotoAndStop(1);
var _local7 = new TextFormat();
_local7.letterSpacing = 2;
game.customerSatisfaction.text.htmlText = "CUSTOMER\nSATISFACTION";
game.customerSatisfaction.text.setTextFormat(_local7);
game.hand._rotation = 0;
game.hand._alpha = 100;
game.hand._visible = true;
var _local4 = 1;
while (_local4 <= 18) {
game.ink["inkBlob" + _local4].num = _local4;
game.ink["inkBlob" + _local4].onPress = function () {
curInk = this.num;
curColor = inkBlobColor[this.num];
var _local2 = 1;
while (_local2 <= 18) {
game.ink["inkBlob" + _local2].filters = null;
_local2++;
}
this.filters = game.glowFilter.filters;
};
_local4++;
}
_local4 = 1;
while (_local4 <= 6) {
game.stroke["stroke" + _local4].num = _local4;
game.stroke["stroke" + _local4].onPress = function () {
curStroke = this.num;
curStrokeSize = this.size;
var _local2 = 1;
while (_local2 <= 6) {
game.stroke["stroke" + _local2].filters = null;
_local2++;
}
this.filters = game.glowFilter.filters;
};
_local4++;
}
game.stroke.stroke1.onPress();
game.ink.inkBlob14.onPress();
_local7 = new TextFormat();
_local7.letterSpacing = 1;
game.sample.text.text = "MATCH THE OUTLINE";
game.sample.text.setTextFormat(_local7);
game.sample.tattoo.removeMovieClip();
game.sample.attachMovie((("tattoo" + curCustomer) + "-") + curTattoo, "tattoo", game.sample.getNextHighestDepth());
game.sample.tattoo.gotoAndStop(1);
game.sample.tattoo.outline._visible = false;
while ((game.sample.tattoo._width > 82) || (game.sample.tattoo._height > 82)) {
game.sample.tattoo._xscale = game.sample.tattoo._xscale / 1.025;
game.sample.tattoo._yscale = game.sample.tattoo._yscale / 1.025;
}
game.sample.tattoo._x = 78 - (game.sample.tattoo._width / 2);
game.sample.tattoo._y = 64 - (game.sample.tattoo._height / 2);
game.tattooColor.gotoAndStop(((curCustomer - 1) * 3) + curTattoo);
game.tattooColor._x = game[(("tattoo" + curCustomer) + "_") + curTattoo]._x;
game.tattooColor._y = game[(("tattoo" + curCustomer) + "_") + curTattoo]._y;
game.tattooColor._visible = false;
_local4 = 1;
while (_local4 <= 10) {
var _local3 = 1;
while (_local3 <= 3) {
game[(("tattoo" + _local4) + "_") + _local3]._visible = false;
_local3++;
}
_local4++;
}
var _local6 = new Array(game.fatGuyBack, game.bigGuyLeg, game.bigGuyArm, game.bigGuyBodySide, game.bigGuyBodySidePale, game.fitGuyLeg, game.fitGuyBody, game.fitGuyLegPale, game.fitGuyBodyPale, game.womanArm, game.womanLeg, game.womanBody, game.womanBack, game.womanArmRaised, game.womanArmPale, game.womanLegPale, game.womanBackPale, game.womanArmAsian, game.womanLegAsian, game.womanBackAsian);
_local4 = 0;
while (_local4 < _local6.length) {
_local6[_local4]._visible = false;
_local4++;
}
game.bodyPart = customer[curCustomer].tattoo[curTattoo].bodyPart;
trace(game.bodyPart);
game.bodyPart._x = customer[curCustomer].tattoo[curTattoo].bodyPartPosX;
game.bodyPart._y = customer[curCustomer].tattoo[curTattoo].bodyPartPosY;
game.bodyPart._visible = true;
game[(("tattoo" + curCustomer) + "_") + curTattoo]._visible = true;
game[(("tattoo" + curCustomer) + "_") + curTattoo].gotoAndStop(1);
game[(("tattoo" + curCustomer) + "_") + curTattoo].outline._visible = false;
game[(("tattoo" + curCustomer) + "_") + curTattoo]._alpha = 35;
game.drawArea.removeMovieClip();
game.createEmptyMovieClip("drawArea", game.getNextHighestDepth());
maxDepth = game.drawArea.getDepth();
depthCount = maxDepth + 32;
game[(("tattoo" + curCustomer) + "_") + curTattoo].swapDepths(depthCount);
depthCount++;
game.hand.swapDepths(depthCount);
depthCount++;
game.phaseBanner.swapDepths(depthCount);
depthCount++;
game.failWarn.swapDepths(depthCount);
depthCount++;
game.painWarn.swapDepths(depthCount);
depthCount++;
totalAccuracy = getTotalTattooAccuracy();
game.complete.mask._x = -100;
mousePressed = false;
gameStat = 0;
}
function getTotalTattooAccuracy() {
var _local5 = game[(("tattoo" + curCustomer) + "_") + curTattoo]._width;
var _local6 = game[(("tattoo" + curCustomer) + "_") + curTattoo]._height;
var _local3 = new flash.display.BitmapData(_local5, _local6, false, 16711422);
if (tattooPhase == 0) {
_local3.draw(game[(("tattoo" + curCustomer) + "_") + curTattoo]);
}
if (tattooPhase == 1) {
_local3.draw(game.tattooColor);
}
var _local4 = 0;
var _local2 = 0;
while (_local2 < _local6) {
var _local1 = 0;
while (_local1 < _local5) {
tattooPixel = _local3.getPixel(_local1, _local2);
if (tattooPixel != 16711422) {
_local4++;
}
_local1 = _local1 + 4;
}
_local2 = _local2 + 4;
}
_local3.dispose();
trace("totalAccuracy: " + _local4);
return(_local4);
}
function isInkColor(color) {
if (((((((((((((((((color != inkBlobColor[1]) && (color != inkBlobColor[2])) && (color != inkBlobColor[3])) && (color != inkBlobColor[4])) && (color != inkBlobColor[5])) && (color != inkBlobColor[6])) && (color != inkBlobColor[7])) && (color != inkBlobColor[8])) && (color != inkBlobColor[9])) && (color != inkBlobColor[10])) && (color != inkBlobColor[11])) && (color != inkBlobColor[12])) && (color != inkBlobColor[13])) && (color != inkBlobColor[15])) && (color != inkBlobColor[16])) && (color != inkBlobColor[17])) && (color != inkBlobColor[18])) {
return(false);
}
return(true);
}
function gradePlayer(testType) {
var _local7 = game[(("tattoo" + curCustomer) + "_") + curTattoo]._x;
var _local6 = game[(("tattoo" + curCustomer) + "_") + curTattoo]._y;
var _local5 = game[(("tattoo" + curCustomer) + "_") + curTattoo]._width;
var _local8 = game[(("tattoo" + curCustomer) + "_") + curTattoo]._height;
var _local11 = 640;
var _local10 = 480;
var _local3 = new flash.display.BitmapData(_local5, _local8, false, 16711422);
var _local4 = new flash.display.BitmapData(_local11, _local10, false, 16711422);
if (tattooPhase == 0) {
_local3.draw(game[(("tattoo" + curCustomer) + "_") + curTattoo]);
}
if (tattooPhase == 1) {
_local3.draw(game.tattooColor);
}
_local4.draw(game.drawArea);
accuracy = 0;
totalAcc = 0;
incomplete = 0;
if (testType == "quick") {
var _local2 = 0;
while (_local2 < _local8) {
var _local1 = 0;
while (_local1 < _local5) {
tattooPixel = _local3.getPixel(_local1, _local2);
drawPixel = _local4.getPixel(_local1 + _local7, _local2 + _local6);
if (tattooPixel < 16711422) {
if (!isInkColor(tattooPixel)) {
tattooPixel = 0;
}
}
if (drawPixel < 16711422) {
if (!isInkColor(drawPixel)) {
drawPixel = 0;
}
}
if (drawPixel != 16711422) {
totalAcc++;
if (tattooPixel == drawPixel) {
accuracy++;
}
} else if (tattooPixel != 16711422) {
incomplete++;
}
_local1 = _local1 + 4;
}
_local2 = _local2 + 4;
}
}
if (testType == "final") {
var _local2 = 0;
while (_local2 < _local8) {
var _local1 = 0;
while (_local1 < _local5) {
tattooPixel = _local3.getPixel(_local1, _local2);
drawPixel = _local4.getPixel(_local1 + _local7, _local2 + _local6);
if (tattooPixel < 16711422) {
if (!isInkColor(tattooPixel)) {
tattooPixel = 0;
}
}
if (drawPixel < 16711422) {
if (!isInkColor(drawPixel)) {
drawPixel = 0;
}
}
if (tattooPixel != 16711422) {
totalAcc++;
if (tattooPixel == drawPixel) {
accuracy++;
}
if (drawPixel == 16711422) {
incomplete++;
}
}
_local1 = _local1 + 4;
}
_local2 = _local2 + 4;
}
}
_local3.dispose();
_local4.dispose();
if (tattooPhase == 0) {
incompleteScore = Math.round((incomplete / totalAccuracy) * 100);
finalScore = Math.round(((accuracy / totalAcc) * 100) - ((custSat - 1) * custSatMultiplier));
finalScore = finalScore * scoreMultiplier;
if (isNaN(finalScore)) {
finalScore = 100;
}
customer[curCustomer].tattoo[curTattoo].outlineScore = finalScore;
trace("---");
trace((((("incomplete: " + incomplete) + "/") + totalAccuracy) + "=") + incompleteScore);
trace((("accuracy: " + accuracy) + "/") + totalAcc);
trace("outlineScore: " + customer[curCustomer].tattoo[curTattoo].outlineScore);
if (testType == "quick") {
return(finalScore);
}
showPhaseTwo();
} else if (tattooPhase == 1) {
incompleteScore = Math.round((incomplete / totalAccuracy) * 100);
finalScore = Math.round(((accuracy / totalAcc) * 100) - ((custSat - 1) * custSatMultiplier));
finalScore = finalScore * scoreMultiplier;
if (isNaN(finalScore)) {
finalScore = 100;
}
customer[curCustomer].tattoo[curTattoo].colorScore = finalScore;
customer[curCustomer].tattoo[curTattoo].score = Math.round((customer[curCustomer].tattoo[curTattoo].outlineScore + customer[curCustomer].tattoo[curTattoo].colorScore) / 2);
trace("---");
trace((((("incomplete: " + incomplete) + "/") + totalAccuracy) + "=") + incompleteScore);
trace((("accuracy: " + accuracy) + "/") + totalAcc);
trace("colorScore: " + customer[curCustomer].tattoo[curTattoo].colorScore);
if (testType == "quick") {
return(finalScore);
}
showPhaseThree();
}
}
function showPhaseTwo() {
tattooPhase = 1;
game.phaseBanner.text.text = "PHASE 2\nCOLOR";
game.phaseBanner.fillMeterText._visible = true;
transformFromTo(game.phaseBanner, 185, -180, 185, 140, 0.5, 0);
phaseBannerTimer = 0;
totalAccuracy = getTotalTattooAccuracy();
quickGradeTimer = -480;
ownerCommentTimer = 0;
incompleteScore = 100;
game.completionMeter.gotoAndStop(1);
alphaIn(game.ink, 0.25, 0);
game.sample.tattoo.gotoAndStop(2);
var _local1 = new TextFormat();
_local1.letterSpacing = 1;
game.sample.text.text = "MATCH THE COLORS";
game.sample.text.setTextFormat(_local1);
game[(("tattoo" + curCustomer) + "_") + curTattoo]._alpha = 100;
game[(("tattoo" + curCustomer) + "_") + curTattoo].outline._visible = true;
game.drawArea.removeMovieClip();
game.createEmptyMovieClip("drawArea", game.getNextHighestDepth());
maxDepth = game.drawArea.getDepth();
depthCount = maxDepth + 32;
game[(("tattoo" + curCustomer) + "_") + curTattoo].swapDepths(depthCount);
depthCount++;
game.hand.swapDepths(depthCount);
depthCount++;
game.phaseBanner.swapDepths(depthCount);
depthCount++;
game.failWarn.swapDepths(depthCount);
depthCount++;
game.painWarn.swapDepths(depthCount);
depthCount++;
mousePressed = false;
}
function showPhaseThree() {
alphaOut(game.hand, 0.25, 0);
game.endBanner._visible = true;
transformFromTo(game.endBanner, 243, -180, 243, 243, 0.5, 0);
endBannerTimer = 0;
game.drawArea.removeMovieClip();
game.tattooColor._visible = true;
game.tattooColor._alpha = 100;
game[(("tattoo" + curCustomer) + "_") + curTattoo].outline._visible = false;
gameStat = 2;
}
function endGame() {
gameStat = -1;
if (game.haxorBtn._visible == true) {
customer[curCustomer].tattoo[curTattoo].score = 100;
showGoodEnd();
return(undefined);
}
if (customer[curCustomer].tattoo[curTattoo].score >= 80) {
showGoodEnd();
} else if ((customer[curCustomer].tattoo[curTattoo].score >= 60) && (customer[curCustomer].score < 80)) {
showMehEnd();
} else if (customer[curCustomer].tattoo[curTattoo].score < 60) {
badEnd.ownerText.text.text = "What are you doing out there?! That was a mess!";
showBadEnd();
}
}
function setTimeElapsed() {
var _local1 = Math.floor(timeElapsed / 60);
var _local2 = Math.floor(_local1 / 60);
_local1 = _local1 - (_local2 * 60);
game.timeElapsed.digit1.gotoAndStop(_local2 + 1);
game.timeElapsed.digit2.gotoAndStop(Math.floor(_local1 / 10) + 1);
game.timeElapsed.digit3.gotoAndStop((_local1 - (Math.floor(_local1 / 10) * 10)) + 1);
}
function playOuchSnd() {
if (playSound == false) {
return(undefined);
}
if (ouchSndTimer > 0) {
return(undefined);
}
ouchSndTimer = 100;
ouchSnd = Math.floor(Math.random() * 2);
if (ouchSnd == 0) {
this[("customer" + curCustomer) + "ouchSnd"].start();
} else {
this[("customer" + curCustomer) + "ouchHiSnd"].start();
}
}
function checkSavedGame() {
trace(localData.data.saveDate);
if ((localData.data.saveDate == undefined) || (localData.data.saveDate == "")) {
return(false);
}
return(true);
}
function loadGame() {
var _local2 = 1;
while (_local2 <= 10) {
var _local1 = 1;
while (_local1 <= 3) {
customer[_local2].tattoo[_local1].score = localData.data[((("c" + _local2) + "t") + _local1) + "score"];
_local1++;
}
_local2++;
}
lives = localData.data.lives;
gameDifficulty = localData.data.gameDifficulty;
}
function saveGame() {
var _local3 = new Date();
var _local2 = 1;
while (_local2 <= 10) {
var _local1 = 1;
while (_local1 <= 3) {
localData.data[((("c" + _local2) + "t") + _local1) + "score"] = customer[_local2].tattoo[_local1].score;
_local1++;
}
_local2++;
}
localData.data.lives = lives;
localData.data.gameDifficulty = gameDifficulty;
localData.data.saveDate = _local3.getDate();
localData.flush();
}
function clearSave() {
localData.data.saveDate = "";
localData.flush();
}
var mouseX = 0;
var mouseY = 0;
var mouseHide = false;
this.onEnterFrame = function () {
if (gameStat == -1) {
if (mouseHide == true) {
Mouse.show(true);
mouseHide = false;
}
}
if (gameStat == 2) {
if (endBannerTimer != -1) {
endBannerTimer++;
if (endBannerTimer == 240) {
transformFromTo(game.endBanner, 243, 243, 243, 500, 0.5, 0, endGame);
}
}
}
if (gameStat == 0) {
if (phaseBannerTimer != -1) {
phaseBannerTimer++;
if (phaseBannerTimer == 240) {
transformFromTo(game.phaseBanner, 185, 140, 185, 500, 0.5, 0);
phaseBannerTimer = -1;
}
}
oldMouseX = mouseX;
mouseX = _xmouse;
oldMouseY = mouseY;
mouseY = _ymouse;
game.hand._rotation = game.hand._rotation + ((mouseY - oldMouseY) / 4);
if (game.hand._rotation > 16) {
game.hand._rotation = 16;
}
if (game.hand._rotation < -16) {
game.hand._rotation = -16;
}
if (ouchSndTimer > 0) {
ouchSndTimer--;
}
if (failWarningTimer != -1) {
failWarningTimer--;
var _local1 = 0;
while (_local1 <= 15) {
if (failWarningTimer == (_local1 * 60)) {
failWarnSnd.start();
}
_local1++;
}
if (failWarningTimer == 0) {
badEnd.ownerText.text.text = "What a disaster! You can't make a mess like that!";
showBadEnd();
}
game.failWarn.failTimer.text = Math.floor(failWarningTimer / 60) + 1;
}
quickGradeTimer++;
if (quickGradeTimer == 120) {
quickGrade = gradePlayer("quick");
quickGradeTimer = 0;
if (((quickGrade <= 30) && (quickGrade != 0)) && (incompleteScore < 80)) {
if (failWarningTimer == -1) {
failWarningTimer = failWarningLength * 60;
failWarnSnd.start();
alphaIn(game.failWarn, 0.25, 0);
}
} else {
failWarningTimer = -1;
alphaOut(game.failWarn, 0.25, 0);
}
if ((incompleteScore <= completePhaseOnePercent) && (tattooPhase == 0)) {
gradePlayer("final");
} else if ((incompleteScore <= completePhaseTwoPercent) && (tattooPhase == 1)) {
gradePlayer("final");
} else if (incompleteScore < 90) {
var _local2 = 6 - Math.round(finalScore / 20);
if (_local2 > 5) {
_local2 = 5;
}
if (_local2 < 1) {
_local2 = 1;
}
var _local3 = new TextFormat();
_local3.letterSpacing = 2;
game.customerSatisfaction.text.htmlText = Math.round(finalScore) + "%\nSATISFACTION";
game.customerSatisfaction.text.setTextFormat(_local3);
game.customerSatisfaction.gotoAndStop(_local2);
game.completionMeter.gotoAndStop((100 - incompleteScore) + 1);
}
}
if ((oldMouseX == mouseX) && (oldMouseY == mouseY)) {
idleTimer++;
}
if ((playSound == true) && (totalAcc > 0)) {
ownerCommentTimer++;
}
if ((ownerCommentTimer >= 960) && (mousePressed == true)) {
ownerCommentTimer = 0;
if (idleTimer >= 1200) {
randSnd = Math.floor(Math.random() * 2);
if (randSnd == 0) {
ownerIdle1snd.start();
} else if (randSnd == 1) {
ownerIdle2snd.start();
}
idleTimer = 0;
return(undefined);
}
idleTimer = 0;
while (randSnd == prevRandSnd) {
randSnd = Math.floor(Math.random() * 4);
}
prevRandSnd = randSnd;
if (quickGrade >= 90) {
if (randSnd == 0) {
ownerHappy1snd.start();
} else if (randSnd == 1) {
ownerHappy2snd.start();
} else if (randSnd == 2) {
ownerHappy3snd.start();
} else {
ownerHappy4snd.start();
}
} else if (quickGrade >= 70) {
if (randSnd == 0) {
ownerMeh1snd.start();
} else if (randSnd == 1) {
ownerMeh2snd.start();
} else if (randSnd == 2) {
ownerMeh3snd.start();
} else {
ownerMeh4snd.start();
}
} else if (quickGrade >= 50) {
if (randSnd == 0) {
ownerAngry1snd.start();
} else if (randSnd == 1) {
ownerAngry2snd.start();
} else if (randSnd == 2) {
ownerAngry3snd.start();
} else {
ownerAngry4snd.start();
}
}
}
if (painMeter > 0) {
painMeter = painMeter - 0.5;
}
if ((Math.floor(painMeter) == 50) && (mousePressed == true)) {
playOuchSnd();
}
if ((Math.floor(painMeter) == 75) && (mousePressed == true)) {
playOuchSnd();
}
if ((Math.floor(painMeter) == 99) && (mousePressed == true)) {
playOuchSnd();
}
if (painMeter >= 60) {
if (game.painWarn._alpha == 0) {
failWarnSnd.start();
}
if (painWarnVisible != true) {
alphaIn(game.painWarn, 0.25, 0);
painWarnVisible = true;
}
}
if (painMeter <= 10) {
if (painWarnVisible == true) {
alphaOut(game.painWarn, 0.25, 0);
painWarnVisible = false;
}
}
if (painMeter >= 100) {
painMeter = 100;
maxPainTimer++;
if (maxPainTimer >= 120) {
playOuchSnd();
badEnd.ownerText.text.text = "Are you trying to get me sued?! You can't hold the needle down that long!";
showBadEnd();
return(undefined);
}
}
if (painMeter > maxPain) {
maxPain = painMeter;
}
game.painMeter.gotoAndStop(Math.floor(painMeter / 2));
shakeTimer++;
if ((shakeTimer == 60) && (shakeDir == 1)) {
shakeDir = 0;
shakeTimer = 0;
}
if ((shakeTimer == (shakeDelay * 60)) && (shakeDir == 0)) {
shakeDir = 1;
shakeTimer = 0;
}
if (shakeDir == 1) {
shakeMeter = shakeMeter + 4;
}
if (shakeDir == 0) {
shakeMeter = shakeMeter - 4;
}
if (shakeMeter < 0) {
shakeMeter = 0;
}
if (shakeMeter > 100) {
shakeMeter = 100;
}
game.shakeMeter.gotoAndStop(Math.round(shakeMeter / 2));
shakeX = Math.random() * (shakeMeter / 50);
if (Math.round(Math.random() * 2) == 0) {
shakeX = shakeX * -1;
}
shakeY = Math.random() * (shakeMeter / 50);
if (Math.round(Math.random() * 2) == 0) {
shakeY = shakeY * -1;
}
timeElapsed++;
setTimeElapsed();
timeSec = Math.floor(timeElapsed / 60);
custSat = (1 + Math.floor(timeSec / 240)) + Math.floor(maxPain / 50);
if (mouseHide == false) {
Mouse.hide();
mouseHide = true;
}
game.hand.xOld = game.hand._x;
game.hand.yOld = game.hand._y;
game.hand._x = _xmouse + shakeX;
game.hand._y = _ymouse + shakeY;
game.redCover._alpha = Math.round(outOfBoundsTimer / 2);
if (outOfBoundsTimer == 0) {
game.redCover._visible = false;
} else {
game.redCover._visible = true;
}
if ((mousePressed == true) && (phaseBannerTimer == -1)) {
if (game[(("tattoo" + curCustomer) + "_") + curTattoo].hitTest(game.hand._x, game.hand._y)) {
game.drawArea.moveTo(game.hand.xOld, game.hand.yOld);
game.drawArea.lineStyle(curStrokeSize, curColor, 100, false, "normal", "round", "round");
if ((game.hand.xOld == game.hand._x) && (game.hand.yOld == game.hand._y)) {
game.drawArea.lineTo(game.hand._x - 1, game.hand._y);
} else {
game.drawArea.lineTo(game.hand._x, game.hand._y);
}
painMeter = painMeter + customer[curCustomer].painGain;
if (((game[(("tattoo" + curCustomer) + "_") + curTattoo].hitTest(game.hand._x, game.hand._y, true) == false) && (tattooPhase == 0)) || ((game.tattooColor.hitTest(game.hand._x, game.hand._y, true) == false) && (tattooPhase == 1))) {
outOfBoundsTimer++;
if (outOfBoundsTimer >= 90) {
badEnd.ownerText.text.text = "What are you doing?! You massacred it! You can't go out of the lines like that!";
showBadEnd();
}
}
if ((tattooDrawPlaying == false) && (playSound == true)) {
tattooDrawSnd.start();
tattooDrawPlaying = true;
}
}
} else {
if (tattooDrawPlaying == true) {
tattooDrawSnd.stop();
tattooDrawPlaying = false;
}
if (outOfBoundsTimer > 0) {
outOfBoundsTimer = outOfBoundsTimer - 1;
}
}
}
};
game.radioBtn.onPress = function () {
stopMusic();
if (playSound == true) {
curMusic++;
if (curMusic > 10) {
curMusic = 1;
}
this._parent._parent["musicCustomer" + curMusic].start(0, 9999);
prevMusic = this._parent._parent["musicCustomer" + curMusic];
}
};
game.haxorBtn.onPress = function () {
gradePlayer("final");
};
game.pauseBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
stopAllSounds();
gameStat = -1;
pause._visible = true;
};
pause.continueBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
if (gameStat == -1) {
if (playSound == true) {
prevMusic.start();
}
mousePressed = false;
gameStat = 0;
pause._visible = false;
}
};
pause.quitBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
gameStat = -1;
hideScreens();
showTitle();
};
pause.bg.onPress = function () {
};
pause.bg.useHandCursor = false;
function gameWin() {
var _local4 = 0;
var _local5 = 0;
var _local3 = 1;
while (_local3 <= 10) {
var _local2 = 1;
while (_local2 <= 3) {
_local4 = _local4 + customer[_local3].tattoo[_local2].score;
_local5++;
_local2++;
}
_local3++;
}
_local4 = _local4 / _local5;
trace("averageScore: " + _local4);
if (_local4 >= 120) {
grade = "A+++";
} else if (_local4 >= 110) {
grade = "A++";
} else if (_local4 >= 100) {
grade = "A+";
} else if (_local4 >= 90) {
grade = "A";
} else if (_local4 >= 80) {
grade = "B";
} else if (_local4 >= 70) {
grade = "C";
} else if (_local4 >= 60) {
grade = "D";
} else if (_local4 >= 50) {
grade = "E";
} else {
grade = "F";
}
if (gameDifficulty == 1) {
winGame.board.paper.text.text = "Great work! Now try again on Apprentice difficulty!";
}
if (gameDifficulty == 2) {
winGame.board.paper.text.text = "Nice job! You've proven you can tattoo with the best of them.";
}
if (gameDifficulty == 3) {
winGame.board.paper.text.text = "Amazing! You are a master of tattooing. Congratulations!";
}
winGame.board.paper.grade.text = grade;
winGame.board.portrait.gotoAndStop(playerGender);
hideScreens();
_root.tweeningActive = true;
var _local6 = 0;
alphaIn(winGame, 0.25, _local6);
_local6 = _local6 + 0.25;
transformFromTo(winGame.board.paper, 320, 480, 122, 34, 0.5, _local6);
_local6 = _local6 + 0.25;
transformFromTo(winGame.board.newHiresSticky, -200, 480, 29, 19, 0.5, _local6);
_local6 = _local6 + 0.25;
transformFromTo(winGame.board.portrait, -200, 480, 219, 152, 0.5, _local6);
_local6 = _local6 + 0.25;
transformFromTo(winGame.board.ribbon, -200, 480, -4, 277, 0.5, _local6);
_local6 = _local6 + 0.25;
timedTrigger(endTween, _local6 * 1000, 1);
}
function gameLose() {
hideScreens();
_root.tweeningActive = true;
var _local2 = 0;
loseGame.board.portrait.gotoAndStop(playerGender);
alphaIn(loseGame, 0.25, _local2);
_local2 = _local2 + 0.25;
transformFromTo(loseGame.board.paper, 320, 480, 122, 34, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(loseGame.board.newHiresSticky, -200, 480, 29, 19, 0.5, _local2);
_local2 = _local2 + 0.25;
transformFromTo(loseGame.board.portrait, -200, 480, 219, 152, 0.5, _local2);
_local2 = _local2 + 0.25;
alphaIn(loseGame.tryAgainBtn, 0.25, _local2);
_local2 = _local2 + 0.25;
timedTrigger(endTween, _local2 * 1000, 1);
}
winGame.playAgainBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
hideScreens();
showTitle();
};
loseGame.tryAgainBtn.onPress = function () {
if (_root.tweeningActive == true) {
return(undefined);
}
hideScreens();
showTitle();
};
function initMain() {
gameStat = -1;
hideScreens();
soundBtn._visible = false;
agLogoBtn._visible = false;
var _local2 = 0;
while (_local2 < buttonArray.length) {
buttonArray[_local2].onRollOver = function () {
this.filters = glowFilter.filters;
if (playSound == true) {
rollOverSnd.start();
}
};
buttonArray[_local2].onRollOut = function () {
this.filters = null;
};
buttonArray[_local2].onReleaseOutside = function () {
this.filters = null;
};
_local2++;
}
instructions.paper.gotoAndStop(1);
tattooInfo.portrait.stop();
tattooInfo.tattooBg.stop();
game.shakeMeter.gotoAndStop(1);
game.painMeter.gotoAndStop(1);
game.customerSatisfaction.gotoAndStop(1);
game.timeElapsed.digit1.gotoAndStop(1);
game.timeElapsed.digit2.gotoAndStop(1);
game.timeElapsed.digit3.gotoAndStop(1);
game.completionMeter.gotoAndStop(1);
winGame.board.portrait.gotoAndStop(1);
loseGame.board.portrait.gotoAndStop(1);
game.sample.gotoAndStop(1);
game.sample.tattoo.gotoAndStop(1);
showAGlogo();
game.haxorBtn._visible = false;
}
function playCustomerMusic() {
this["musicCustomer" + curMusic].start(0, 9999);
prevMusic = this["musicCustomer" + curMusic];
}
function stopMusic() {
musicMenu.stop();
musicCustomerSelect.stop();
var _local2 = 1;
while (_local2 <= 10) {
this["musicCustomer" + _local2].stop();
_local2++;
}
}
function hideScreens() {
objectsInvisible(this);
soundBtn._visible = true;
agLogoBtn._visible = true;
}
initMain();
var mouseListener = new Object();
mouseListener.onMouseDown = function () {
mousePressed = true;
};
mouseListener.onMouseUp = function () {
mousePressed = false;
};
Mouse.addListener(mouseListener);
soundBtn.onPress = function () {
playSound = !playSound;
if (playSound) {
prevMusic.start();
this.gotoAndStop(1);
} else {
stopAllSounds();
this.gotoAndStop(2);
}
};
Symbol 68 MovieClip [ParticleObj] Frame 24
removeMovieClip(this);
stop();
Symbol 615 MovieClip Frame 1
stop();
Symbol 615 MovieClip Frame 41
stop();
Symbol 640 Button
on (press) {
getURL ("http://www.addictinggames.com", blank);
}
Symbol 643 MovieClip Frame 1
stop();
Symbol 665 MovieClip Frame 1
stop();
Symbol 665 MovieClip Frame 260
stop();
this._parent.showTitle();
Symbol 806 MovieClip Frame 200
this._parent.showGamePillLogo();
stop();
Symbol 807 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 808 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 809 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 810 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 811 MovieClip [__Packages.com.mosesSupposes.fuse.FuseFMP] Frame 0
class com.mosesSupposes.fuse.FuseFMP
{
static var _classes, _shortcuts, _getter, _setter;
function FuseFMP () {
}
static function simpleSetup() {
initialize(MovieClip.prototype, Button.prototype, TextField.prototype);
_global.FuseFMP = com.mosesSupposes.fuse.FuseFMP;
for (var _local2 in _classes) {
_global[_local2] = _classes[_local2];
}
}
static function initialize(target) {
if (_classes == undefined) {
_shortcuts = {getFilterName:function (f) {
return(com.mosesSupposes.fuse.FuseFMP.getFilterName(f));
}, getFilterIndex:function (f) {
return(com.mosesSupposes.fuse.FuseFMP.getFilterIndex(this, f));
}, getFilter:function (f, createNew) {
return(com.mosesSupposes.fuse.FuseFMP.getFilter(this, f, createNew));
}, writeFilter:function (f, pObj) {
return(com.mosesSupposes.fuse.FuseFMP.writeFilter(this, f, pObj));
}, removeFilter:function (f) {
return(com.mosesSupposes.fuse.FuseFMP.removeFilter(this, f));
}, getFilterProp:function (prop, createNew) {
return(com.mosesSupposes.fuse.FuseFMP.getFilterProp(this, prop, createNew));
}, setFilterProp:function (prop, v) {
com.mosesSupposes.fuse.FuseFMP.setFilterProp(this, prop, v);
}, setFilterProps:function (fOrPObj, pObj) {
com.mosesSupposes.fuse.FuseFMP.setFilterProps(this, fOrPObj, pObj);
}, traceAllFilters:function () {
com.mosesSupposes.fuse.FuseFMP.traceAllFilters();
}};
_classes = {BevelFilter:flash.filters.BevelFilter, BlurFilter:flash.filters.BlurFilter, ColorMatrixFilter:flash.filters.ColorMatrixFilter, ConvolutionFilter:flash.filters.ConvolutionFilter, DisplacementMapFilter:flash.filters.DisplacementMapFilter, DropShadowFilter:flash.filters.DropShadowFilter, GlowFilter:flash.filters.GlowFilter, GradientBevelFilter:flash.filters.GradientBevelFilter, GradientGlowFilter:flash.filters.GradientGlowFilter};
_getter = {__resolve:function (name) {
var _local4 = function () {
var _local3 = this;
if (_local3.filters != undefined) {
var _local2 = name.split("_");
if (_local2[1] == "blur") {
_local2[1] = "blurX";
}
return(com.mosesSupposes.fuse.FuseFMP.getFilter(this, _local2[0] + "Filter", false)[_local2[1]]);
}
};
return(_local4);
}};
_setter = {__resolve:function (name) {
var _local3 = function (val) {
var _local2 = this;
if (_local2.filters != undefined) {
com.mosesSupposes.fuse.FuseFMP.setFilterProp(this, name, val);
}
};
return(_local3);
}};
}
if (arguments[0] == null) {
return(undefined);
}
var _local6 = [MovieClip, Button, TextField];
for (var _local13 in arguments) {
var _local7 = false;
for (var _local10 in _local6) {
if ((arguments[_local13] instanceof _local6[_local10]) || (arguments[_local13] == Function(_local6[_local10]).prototype)) {
_local7 = true;
break;
}
}
if (!_local7) {
com.mosesSupposes.fuse.FuseKitCommon.error("201", _local13);
continue;
}
for (var _local11 in _classes) {
var _local5 = new _classes[_local11]();
for (var _local8 in _local5) {
if (typeof(_local5[_local8]) == "function") {
continue;
}
var _local4 = (_local11.substr(0, -6) + "_") + _local8;
arguments[_local13].addProperty(_local4, _getter[_local4], _setter[_local4]);
_global.ASSetPropFlags(arguments[_local13], _local4, 3, 1);
if (_local8 == "blurX") {
_local4 = _local4.slice(0, -1);
arguments[_local13].addProperty(_local4, _getter[_local4], _setter[_local4]);
_global.ASSetPropFlags(arguments[_local13], _local4, 3, 1);
}
}
}
for (var _local9 in _shortcuts) {
arguments[_local13][_local9] = _shortcuts[_local9];
_global.ASSetPropFlags(arguments[_local13], _local9, 7, 1);
}
}
}
static function deinitialize() {
if (_classes == undefined) {
return(undefined);
}
if (arguments.length == 0) {
arguments.push(MovieClip.prototype, Button.prototype, TextField.prototype);
}
for (var _local8 in arguments) {
for (var _local7 in _classes) {
var _local4 = new _classes[_local7]();
for (var _local5 in _local4) {
if (typeof(_local4[_local5]) == "function") {
continue;
}
var _local3 = (_local7.substr(0, -6) + "_") + _local5;
_global.ASSetPropFlags(arguments[_local8], _local3, 0, 2);
arguments[_local8].addProperty(_local3, null, null);
delete arguments[_local8][_local3];
}
}
for (var _local6 in _shortcuts) {
_global.ASSetPropFlags(arguments[_local8], _local6, 0, 2);
delete arguments[_local8][_local6];
}
}
}
static function getFilterName(instance) {
if (_classes == undefined) {
initialize(null);
}
for (var _local1 in _classes) {
if (instance.__proto__ == Function(_classes[_local1]).prototype) {
return(_local1);
}
}
return(null);
}
static function getFilterIndex(target, filter) {
if (_classes == undefined) {
initialize(null);
}
filter = getInstance(filter);
if (filter === null) {
return(-1);
}
var _local2 = target.filters;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].__proto__ == filter.__proto__) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function getFilter(target, filter, createNew) {
var _local1 = getFilterIndex(target, filter);
if (_local1 == -1) {
if (createNew != true) {
return(null);
}
_local1 = writeFilter(target, filter);
if (_local1 == -1) {
return(null);
}
}
return(target.filters[_local1]);
}
static function writeFilter(target, filter, propsObj) {
if (_classes == undefined) {
initialize(null);
}
filter = getInstance(filter);
if (filter === null) {
return(-1);
}
var _local4 = target.filters;
var _local2 = getFilterIndex(target, filter);
if (_local2 == -1) {
_local4.push(filter);
} else {
_local4[_local2] = filter;
}
target.filters = _local4;
if (typeof(propsObj) == "object") {
setFilterProps(target, filter, propsObj);
}
_local2 = getFilterIndex(target, filter);
return(_local2);
}
static function removeFilter(target, filter) {
if (_classes == undefined) {
initialize(null);
}
filter = getInstance(filter);
var _local2 = target.filters;
var _local1 = getFilterIndex(target, filter);
if (_local1 == -1) {
return(false);
}
_local2.splice(_local1, 1);
target.filters = _local2;
return(true);
}
static function getFilterProp(target, propname, createNew) {
var _local1 = propname.split("_");
if (_local1[1] == "blur") {
_local1[1] = "blurX";
}
return(getFilter(target, _local1[0] + "Filter", createNew)[_local1[1]]);
}
static function setFilterProp(target, propname, value) {
if (_classes == undefined) {
initialize(null);
}
var _local8 = propname.split("_");
var _local5 = _local8[0] + "Filter";
if (_classes[_local5] == undefined) {
return(undefined);
}
var _local2 = new _classes[_local5]();
if ((BLUR_ZERO == true) && (_local5 == "BlurFilter")) {
_local2.blurX = (_local2.blurY = 0);
}
var _local6 = _local8[1];
var _local1 = target.filters.length || 0;
while (_local1-- , _local1 > -1) {
if (target.filters[_local1].__proto__ == _local2.__proto__) {
_local2 = target.filters[_local1];
break;
}
}
if (_local2 == null) {
com.mosesSupposes.fuse.FuseKitCommon.error("202", _local5, target);
}
if (_local6 == "blur") {
_local2.blurX = value;
_local2.blurY = value;
} else {
if ((typeof(value) == "string") && (_local6.toLowerCase().indexOf("color") > -1)) {
if (value.charAt(0) == "#") {
value = value.slice(1);
}
value = ((value.charAt(1).toLowerCase() != "x") ? (Number("0x" + value)) : (Number(value)));
}
_local2[_local6] = value;
}
var _local7 = target.filters;
if (_local1 == -1) {
_local7.push(_local2);
} else {
_local7[_local1] = _local2;
}
target.filters = _local7;
}
static function setFilterProps(target, filterOrPropsObj, propsObj) {
if (arguments.length < 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("203", arguments.length);
return(undefined);
}
if (_classes == undefined) {
initialize(null);
}
var _local10 = new Object();
var _local11 = arguments.length == 2;
if (_local11 == false) {
var _local14 = getFilterName(getInstance(filterOrPropsObj));
if (_classes[_local14] == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("204", filterOrPropsObj);
return(undefined);
}
_local10[_local14] = 1;
} else {
propsObj = filterOrPropsObj;
for (var _local12 in propsObj) {
var _local14 = _local12.split("_")[0] + "Filter";
if ((_classes[_local14] != undefined) && (_local10[_local14] == undefined)) {
_local10[_local14] = 1;
}
}
}
if (!(target instanceof Array)) {
target = [target];
}
for (var _local15 in target) {
var _local5 = target[_local15];
for (var _local14 in _local10) {
var _local3 = new _classes[_local14]();
if ((BLUR_ZERO == true) && (_local14 == "BlurFilter")) {
_local3.blurX = (_local3.blurY = 0);
}
var _local4 = _local5.filters.length || 0;
while (_local4-- , _local4 > -1) {
if (_local5.filters[_local4].__proto__ == _local3.__proto__) {
_local3 = _local5.filters[_local4];
break;
}
}
if (_local3 == null) {
com.mosesSupposes.fuse.FuseKitCommon.error("202", _local14, _local5);
continue;
}
var _local7 = String(_local14).slice(0, -6) + "_";
for (var _local12 in propsObj) {
var _local6 = _local12.indexOf(_local7) == 0;
if ((_local11 == true) && (_local6 == false)) {
continue;
}
var _local2 = propsObj[_local12];
if (_local6 == true) {
var _local12 = _local12.slice(_local7.length);
}
if (_local12 == "blur") {
_local3.blurX = _local2;
_local3.blurY = _local2;
} else {
if ((typeof(_local2) == "string") && (_local12.toLowerCase().indexOf("color") > -1)) {
if (_local2.charAt(0) == "#") {
_local2 = _local2.slice(1);
}
_local2 = ((_local2.charAt(1).toLowerCase() != "x") ? (Number("0x" + _local2)) : (Number(_local2)));
}
_local3[_local12] = _local2;
}
}
var _local8 = _local5.filters;
if (_local4 == -1) {
_local8.push(_local3);
} else {
_local8[_local4] = _local3;
}
_local5.filters = _local8;
}
}
}
static function getAllShortcuts() {
if (_classes == undefined) {
initialize(null);
}
var _local2 = [];
for (var _local4 in _classes) {
var _local1 = new _classes[_local4]();
for (var _local3 in _local1) {
if (typeof(_local1[_local3]) == "function") {
continue;
}
_local2.push((_local4.substr(0, -6) + "_") + _local3);
if (_local3 == "blurX") {
_local2.push(_local4.substr(0, -6) + "_blur");
}
}
}
return(_local2);
}
static function traceAllFilters() {
if (_classes == undefined) {
initialize(null);
}
var _local1 = "------ FuseFMP filter properties ------\n";
for (var _local4 in _classes) {
_local1 = _local1 + _local4;
var _local2 = new _classes[_local4]();
for (var _local3 in _local2) {
if (typeof(_local2[_local3]) == "function") {
continue;
}
_local1 = _local1 + ((("\t- " + _local4.substr(0, -6)) + "_") + _local3);
if (_local3 == "blurX") {
_local1 = _local1 + (("\t- " + _local4.substr(0, -6)) + "_blur");
}
}
_local1 = _local1 + newline;
}
com.mosesSupposes.fuse.FuseKitCommon.output(_local1);
}
static function getInstance(filter) {
if (filter instanceof flash.filters.BitmapFilter) {
return(flash.filters.BitmapFilter(filter));
}
if (typeof(filter) == "function") {
for (var _local4 in _classes) {
if (filter == _classes[_local4]) {
var _local1 = new _classes[_local4]();
if ((BLUR_ZERO == true) && (_local4 == "BlurFilter")) {
_local1.blurX = (_local1.blurY = 0);
}
return(_local1);
}
}
}
if (typeof(filter) == "string") {
var _local3 = String(filter);
if (_local3.substr(-6) != "Filter") {
_local3 = _local3 + "Filter";
}
for (var _local4 in _classes) {
if (_local4 == _local3) {
var _local1 = new _classes[_local4]();
if ((BLUR_ZERO == true) && (_local4 == "BlurFilter")) {
_local1.blurX = (_local1.blurY = 0);
}
return(_local1);
}
}
}
return(null);
}
static var registryKey = "fuseFMP";
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION;
static var BLUR_ZERO = true;
}
Symbol 812 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";
}