Frame 1
function reportQuality(reportingMC, qualityLevel) {
reportingMC._parent.traySlider.reportQuality(reportingMC, qualityLevel);
}
function startLevel() {
_root.daisy.removeMovieClip();
_root.attachMovie("DaisyMC", "daisy", 50000);
_root.daisy._x = 200;
_root.daisy._y = 170;
_root.pregame._visible = false;
_root.levelActive = true;
_root.levelStartTime = getTimer();
_root.clockMC.reset();
}
function setupLevel() {
switch (_root.currentLevel) {
case 1 :
_root.normalGoal = 2;
_root.tutorialSpaghetti._visible = true;
_root.tutorialPizza._visible = false;
_root.realPizza._visible = false;
_root.realLasagna._visible = false;
_root.totalLevelTime = 5;
break;
case 2 :
_root.normalGoal = 2;
_root.tutorialSpaghetti._visible = false;
_root.tutorialPizza._visible = true;
_root.totalLevelTime = 5;
break;
case 3 :
_root.tutorialSpaghetti._visible = false;
_root.tutorialPizza._visible = false;
_root.realPizza._visible = true;
_root.realLasagna._visible = true;
_root.normalGoal = 4;
_root.totalLevelTime = 5;
}
_root.goalTxt.text = _root.normalGoal;
}
function genericLoop() {
this.start();
}
function cartLoopHandler() {
trace("cartLoopHandler");
this.start();
}
function muteSound(theSndObj) {
theSndObj.onSoundComplete = null;
theSndObj.setTransform(_global.muteSound);
}
function playSound(sndName, loopHandler) {
trace((("playSound " + sndName) + " ") + _root.soundIndex);
_root.soundSlots[_root.soundIndex].stopSound();
_root.soundSlots[_root.soundIndex] = null;
var _local3 = new Sound(_root);
_local3.attachSound(sndName);
_local3.name = sndName;
_local3.chanNum = _root.soundIndex;
_local3.stopSound = function () {
trace("stopping " + this.name);
this.stop(this.name);
_root.soundSlots[this.chanNum] = undefined;
};
var _local4 = new Object();
_local4.ll = _root.soundVolume;
_local4.lr = 0;
_local4.rr = _root.soundVolume;
_local4.rl = 0;
_local3.setTransform(_local4);
_local3.start();
if (loopHandler != null) {
_local3.onSoundComplete = loopHandler;
}
_root.soundSlots[_root.soundIndex] = _local3;
_root.soundIndex++;
if (_root.soundIndex >= 12) {
_root.soundIndex = 0;
}
return(_local3);
}
Frame 3
if (_root.letThemPass != 1) {
_root.currentLevel = 1;
}
_root.checkinHappinessBoost = 10;
_root.examHappinessBoost = 10;
_root.treatHappinessBoost = 10;
_root.normalDecay = 0.25;
_root.patientDecay = 0.2;
_root.impatientDecay = 0.3;
_root.soundVolume = 85;
_root.cartSndObj = null;
_root.soundIndex = 0;
_root.soundSlots = new Array(12);
i = 0;
while (i < 12) {
_root.soundSlots[i] = new Sound();
i++;
}
_root.tutorialStep = 1;
if (_root.backLoop == undefined) {
_root.backLoop = new Sound();
_root.backLoop.attachSound("backgroundloop");
var mySoundTransformObjectHalf = new Object();
mySoundTransformObjectHalf.ll = 50;
mySoundTransformObjectHalf.lr = 0;
mySoundTransformObjectHalf.rr = 50;
mySoundTransformObjectHalf.rl = 0;
_root.backLoop.setTransform(mySoundTransformObjectHalf);
_root.backLoop.start();
_root.backLoop.onSoundComplete = genericLoop;
}
_global.muteSound = new Object();
muteSound.ll = 0;
muteSound.lr = 0;
muteSound.rr = 0;
muteSound.rl = 0;
if (_root.letThemPass != 1) {
_root.letThemPass = 0;
stop();
} else {
_root.letThemPass = 0;
}
Frame 4
_root.setupLevel();
_root.endLevel._visible = false;
_root.sellsheet._visible = false;
if (_root.currentLevel >= 4) {
_root.sellsheet._visible = true;
_root.sellsheet.gotoAndPlay(2);
stop();
}
_root.endlevel._visible = false;
_root.levelActive = false;
_root.levelStartTime = getTimer();
Frame 5
secondsElapsed = int((getTimer() - _root.levelStartTime) / 1000);
secondsRemaining = (_root.totalLevelTime * 60) - secondsElapsed;
if (secondsRemaining < 0) {
secondsRemaining = 0;
}
timeStr = int(secondsRemaining / 60) + ":";
if ((secondsRemaining % 60) < 10) {
timeStr = timeStr + "0";
}
timeStr = timeStr + (secondsRemaining % 60);
_root.timerTxt.text = timeStr;
if (secondsRemaining <= 0) {
_root.letThemPass = 1;
if (_root.currentLevel == 1) {
_root.endLevel.setFeedback(1, "spaghetti", 0);
} else {
_root.endLevel.setFeedback(1, "pizza", 0);
}
_root.endLevel.go();
}
Frame 6
gotoAndPlay (5);
Symbol 27 MovieClip [timerClock] Frame 1
function reset() {
this.ch.clockhalfright._rotation = 180;
this.ch.clockhalfright._visible = true;
this.ch.clockhalfleft._rotation = 0;
this.ch.clockhalfleft._visible = false;
clockhalfshield._visible = true;
clockhand._rotation = 0;
}
this.startTime = getTimer();
this.totalClockTime = 3000;
Symbol 27 MovieClip [timerClock] Frame 2
timeperc = (getTimer() - this.startTime) / this.totalClockTime;
if (timeperc > 1) {
timeperc = 1;
}
if (timeperc == 1) {
this.ch.clockhalfright._rotation = 0;
this.ch.clockhalfright._visible = true;
this.ch.clockhalfleft._rotation = 0;
this.ch.clockhalfleft._visible = true;
clockhalfshield._visible = false;
clockhand._rotation = 0;
if (this.fireWhenDone) {
_root.daisy.examComplete(this.targetGhost);
}
this.removeMovieClip();
return(undefined);
}
if (timeperc < 0.5) {
this.ch.clockhalfleft._visible = false;
this.ch.clockhalfright._visible = true;
this.ch.clockhalfright._rotation = 180 + (180 * (timeperc * 2));
clockhalfshield._visible = true;
} else {
this.ch.clockhalfright._rotation = 0;
this.ch.clockhalfright._visible = true;
this.ch.clockhalfleft._rotation = 180 + (180 * ((timeperc - 0.5) * 2));
this.ch.clockhalfleft._visible = true;
clockhalfshield._visible = false;
}
clockhand._rotation = 360 * timeperc;
Symbol 27 MovieClip [timerClock] Frame 3
gotoAndPlay (2);
Symbol 35 MovieClip Frame 1
this._alpha = 0;
stop();
Symbol 41 Button
on (release) {
_root.playSound("clicksnd");
_root.gotoAndPlay(4);
}
Symbol 44 MovieClip Frame 1
stop();
Symbol 48 Button
on (release) {
_root.daisy.queueDest("room2cab");
}
Symbol 51 MovieClip Frame 1
function reportQuality(reportingMC, qualityLevel) {
trace((((("reportqual " + reportingMC) + " ") + qualityLevel) + " ") + this.numComplete);
this.qualityReports.push(qualityLevel);
reportingMC.gotoAndStop(1);
reportingMC._visible = false;
this.numComplete++;
if (this.numComplete == 1) {
_parent.desiredX = 336;
_parent.grabFrame(_parent.act2);
} else if (this.numComplete == 1) {
_parent.desiredX = 336;
_parent.grabFrame(_parent.act3);
} else if (this.numComplete == 3) {
_parent.desiredX = 451;
_parent.act4._visible = true;
_parent.act4._x = 140;
_parent.grabFrame(_parent.act4);
} else if (this.numComplete == 4) {
_parent.desiredX = 451;
_parent.act4._visible = false;
_parent.act5._visible = true;
_parent.act5._x = 22;
_parent.grabFrame(_parent.act5);
} else if (this.numComplete == 5) {
_parent.tutorial5._visible = true;
_parent.tutorial5._x = -122;
_parent.desiredX = 451;
_parent.act6._visible = true;
_parent.act6._x = 22;
_parent.grabFrame(_parent.act6);
} else if (this.numComplete == 6) {
_parent.fin._x = 22;
_parent.desiredX = 451;
_parent.fin.go();
_parent.activityFrame._visible = false;
}
return(undefined);
while (i < this.activities.length) {
if (this.activities[i].completed == false) {
return(undefined);
}
i++;
}
}
function addActivity(actMC) {
trace(("addActivity " + actMC) + " ");
actMC.completed = false;
actMC.targetSlot = 5;
this.activities.push(actMC);
}
this.activities = new Array();
this.qualityReports = new Array();
this.numComplete = 0;
Symbol 51 MovieClip Frame 3
gotoAndPlay (2);
Symbol 69 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 1
function seekMouse() {
if (this.lockedToMouse == false) {
return(undefined);
}
this._y = _parent._ymouse;
if (this._y < 21) {
this._y = 21;
} else if (this._y > 74) {
this._y = 74;
}
if (this._y < this.oldY) {
_root.playSound("knead");
}
diffY = Math.abs(this.oldY - this._y);
this.oldY = this._y;
_parent.reportDelta(diffY);
}
this.lockedToMouse = false;
this.oldY = this._y;
Symbol 72 MovieClip Frame 2
seekMouse();
Symbol 72 MovieClip Frame 3
seekMouse();
gotoAndPlay (2);
Symbol 82 MovieClip Frame 1
function getElapsedTime() {
if (this.startTime <= 0) {
return(0);
}
return(getTimer() - this.startTime);
}
function reportDelta(theDelt) {
this.totalDelta = this.totalDelta + theDelt;
if (this.totalDelta >= this.desiredDelta) {
trace((this.totalDelta + " ") + this.desiredDelta);
rollingPin.lockedToMouse = false;
_parent.tutorial1.go();
_root.reportQuality(this, 100);
return(undefined);
}
completePerc = this.totalDelta / this.desiredDelta;
slider._x = 17 + (87 * completePerc);
if ((int(completePerc * 8) + 1) > this.doughStage) {
this.doughStage = int(completePerc * 8) + 1;
doughroll.gotoAndStop(this.doughStage);
}
}
this.totalDelta = 0;
this.desiredDelta = 280;
this.doughStage = 1;
this.firedTut = false;
stop();
Instance of Symbol 35 MovieClip in Symbol 82 MovieClip Frame 1
on (release) {
_parent.rollingPin.lockedToMouse = false;
}
on (rollOver) {
_parent._parent.grabFrame(_parent);
}
on (press) {
_parent.rollingPin.lockedToMouse = true;
if (_parent.firedTut == false) {
trace(_parent._parent.tutorial1);
_parent.firedTut = true;
_parent._parent.tutorial1.go();
}
return(undefined);
}
Symbol 82 MovieClip Frame 2
Symbol 82 MovieClip Frame 3
gotoAndPlay (2);
Symbol 105 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 2
stop();
Symbol 135 MovieClip Frame 1
function getElapsedTime() {
if (this.startTime <= 0) {
return(0);
}
return(getTimer() - this.startTime);
}
this.numChops = 0;
choppedgarlic._visible = false;
stop();
Instance of Symbol 35 MovieClip in Symbol 135 MovieClip Frame 1
on (release) {
_parent.mincer.gotoAndStop(1);
}
on (rollOver) {
_parent._parent.grabFrame(_parent);
}
on (press) {
if (_parent.numChops > 10) {
return(undefined);
}
_parent.mincer.gotoAndStop(2);
_parent.numChops++;
_parent.choppedgarlic._visible = true;
_parent.choppedgarlic.gotoAndStop(_parent.numChops);
if (_parent.numChops > 10) {
_parent.wholegarlic._visible = false;
_root.reportQuality(_parent, 100);
_parent._parent.tutorial2._visible = false;
_parent._parent.tutorial3._visible = true;
} else {
_parent.wholegarlic.gotoAndStop(_parent.numChops);
}
completePerc = _parent.numChops / 11;
if (completePerc < 1) {
_parent.slider._x = 17 + (87 * completePerc);
_root.playSound("chop");
}
}
Symbol 135 MovieClip Frame 2
Symbol 135 MovieClip Frame 3
gotoAndPlay (2);
Symbol 156 MovieClip Frame 1
stop();
Symbol 177 MovieClip Frame 1
stop();
Symbol 183 MovieClip Frame 1
stop();
Symbol 183 MovieClip Frame 2
stop();
Symbol 184 MovieClip Frame 1
function getElapsedTime() {
if (this.startTime <= 0) {
return(0);
}
return(getTimer() - this.startTime);
}
this.numChops = 0;
choppedgarlic._visible = false;
stop();
Instance of Symbol 35 MovieClip in Symbol 184 MovieClip Frame 1
on (release) {
_parent.mincer.gotoAndStop(1);
}
on (rollOver) {
_parent._parent.grabFrame(_parent);
}
on (press) {
if (_parent.numChops > 10) {
return(undefined);
}
if (_parent.numChops == 0) {
_parent._parent.tutorial2.go();
}
_parent.mincer.gotoAndStop(2);
_parent.numChops++;
_parent.choppedgarlic._visible = true;
_parent.choppedgarlic.gotoAndStop(_parent.numChops);
if (_parent.numChops > 10) {
_parent.wholegarlic._visible = false;
_root.reportQuality(_parent, 100);
_parent._parent.tutorial2.go();
} else {
_parent.wholegarlic.gotoAndStop(_parent.numChops);
}
completePerc = _parent.numChops / 11;
if (completePerc < 1) {
_parent.slider._x = 17 + (87 * completePerc);
_root.playSound("chop");
}
}
Symbol 184 MovieClip Frame 2
Symbol 184 MovieClip Frame 3
gotoAndPlay (2);
Symbol 220 MovieClip Frame 1
stop();
Symbol 225 MovieClip Frame 1
function getElapsedTime() {
if (this.startTime <= 0) {
return(0);
}
return(getTimer() - this.startTime);
}
this.trackMouse = false;
this.currAngle = 0;
this.engaged = false;
stop();
Instance of Symbol 35 MovieClip in Symbol 225 MovieClip Frame 1
on (press) {
_parent.trackMouse = true;
if (_parent.engaged == false) {
_root.playSound("stir");
this.trackMouse = true;
_parent._parent.tutorial3.go();
_parent.circleHint._visible = false;
_parent.engaged = true;
_parent.gotoAndPlay(2);
}
}
on (release) {
_parent.trackMouse = false;
}
Symbol 225 MovieClip Frame 2
if (this.trackMouse == false) {
return(undefined);
}
var opp = (-(_ymouse - stirCont._y));
var adj = (_xmouse - stirCont._x);
res = Math.atan2(opp, adj) * 57.2957795130823;
if (res < 0) {
res = res + 360;
}
if (res > this.currAngle) {
frameC = int(res / 45) + 1;
stirCont.stiranim.gotoAndStop(frameC);
this.currAngle = res;
slider._x = 17 + (87 * (res / 360));
if (frameC >= 8) {
_parent.tutorial3.go();
this.trackMouse = false;
}
}
Symbol 225 MovieClip Frame 3
gotoAndPlay (2);
Symbol 231 MovieClip Frame 1
function getElapsedTime() {
if (this.startTime <= 0) {
return(0);
}
return(getTimer() - this.startTime);
}
function go() {
subtotal = 0;
i = 0;
while (i < _parent.traySlider.qualityReports.length) {
subtotal = subtotal + _parent.traySlider.qualityReports[i];
i++;
}
totalQuality = subtotal / _parent.traySlider.qualityReports.length;
if (totalQuality >= 90) {
this.totalStars = 5;
} else {
this.totalStars = int((totalQuality - 10) / 23) + 1;
}
this.totalDuration = (totalStars * 1000) + 4000;
startX = 21.5 + ((5 - totalStars) * 10.25);
i = 1;
while (i <= totalStars) {
eval ("star" + i)._x = startX + ((i - 1) * 20.5);
i++;
}
trace((((((((("totalQual " + totalQuality) + " ") + totalStars) + " ") + startX) + " ") + subtotal) + " ") + _parent.traySlider.qualityReports.length);
this.startTime = getTimer();
_root.endLevel.setFeedback(1, "pizza", totalStars);
gotoAndPlay (2);
}
this.startTime = -1;
this.starStage = 0;
this.totalDuration = 13000;
star1._visible = false;
star2._visible = false;
star3._visible = false;
star4._visible = false;
star5._visible = false;
stop();
Instance of Symbol 35 MovieClip in Symbol 231 MovieClip Frame 1
on (rollOver) {
_parent._parent.grabFrame(_parent);
}
on (release) {
if (_parent.startTime == -1) {
trace("wee2");
_parent.startTime = getTimer();
_parent.gotoAndPlay(2);
_parent._parent.tutorial3.go();
} else {
trace((_parent.arrow1._visible + " ") + _parent.arrow1.bouncy);
if ((_parent.arrow1._visible == true) && (_parent.arrow1.bouncy == true)) {
_parent.arrow1._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
_parent._parent.tutorial3.go();
} else if ((_parent.arrow2._visible == true) && (_parent.arrow2.bouncy == true)) {
_parent.arrow2._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
} else if ((_parent.arrow3._visible == true) && (_parent.arrow3.bouncy == true)) {
_parent.arrow3._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
}
}
}
Symbol 231 MovieClip Frame 2
if (this.getElapsedTime() > ((this.totalStars * 1000) + 3000)) {
_root.endLevel.go();
this.gotoAndStop(1);
} else if (((this.getElapsedTime() > 5000) && (this.starStage < 5)) && (this.totalStars >= 5)) {
trace("star 5");
this.starStage = 5;
star5._visible = true;
_root.playSound("starpop");
if (this.totalStars == 5) {
_root.playSound("endLevelSFX");
}
} else if (((this.getElapsedTime() > 4000) && (this.starStage < 4)) && (this.totalStars >= 4)) {
trace("star 4");
this.starStage = 4;
star4._visible = true;
_root.playSound("starpop");
if (this.totalStars == 4) {
_root.playSound("endLevelSFX");
}
} else if (((this.getElapsedTime() > 3000) && (this.starStage < 3)) && (this.totalStars >= 3)) {
trace("star 3");
this.starStage = 3;
star3._visible = true;
_root.playSound("starpop");
if (this.totalStars == 3) {
_root.playSound("endLevelSFX");
}
} else if (((this.getElapsedTime() > 2000) && (this.starStage < 2)) && (this.totalStars >= 2)) {
trace("star 2");
this.starStage = 2;
star2._visible = true;
_root.playSound("starpop");
if (this.totalStars == 2) {
_root.playSound("endLevelSFX");
}
} else if (((this.getElapsedTime() > 1000) && (this.starStage < 1)) && (this.totalStars >= 1)) {
trace("star 1");
this.starStage = 1;
star1._visible = true;
_root.playSound("starpop");
if (this.totalStars == 1) {
_root.playSound("endLevelSFX");
}
}
completePerc = (getTimer() - this.startTime) / this.totalDuration;
if (completePerc >= 1) {
trace("star stopped");
stop();
}
Symbol 231 MovieClip Frame 3
gotoAndPlay (2);
Symbol 238 MovieClip Frame 1
this.bouncy = false;
stop();
Symbol 238 MovieClip Frame 2
this.bouncy = true;
Symbol 238 MovieClip Frame 8
gotoAndPlay (2);
Symbol 243 MovieClip Frame 1
this.bouncy = false;
stop();
Symbol 243 MovieClip Frame 2
this.bouncy = true;
Symbol 243 MovieClip Frame 8
gotoAndPlay (2);
Symbol 246 MovieClip Frame 1
function disappear() {
this._alpha = this._alpha - 2;
if (this._alpha <= 0) {
this.gotoAndStop(1);
}
}
function go() {
this._visible = true;
this._alpha = 100;
this.gotoAndPlay(2);
}
this._visible = false;
stop();
Symbol 246 MovieClip Frame 2
disappear();
Symbol 246 MovieClip Frame 3
disappear();
gotoAndPlay (2);
Symbol 247 MovieClip Frame 1
function getElapsedTime() {
if (this.startTime <= 0) {
return(0);
}
return(getTimer() - this.startTime);
}
this.startTime = -1;
this.arrowStage = 0;
this.numClicks = 0;
this.currAngle = 0;
this.boilOn = false;
this.trackMouse = false;
stirCont._visible = false;
this.totalDuration = 15000;
sauceBoil._visible = false;
stop();
Instance of Symbol 35 MovieClip in Symbol 247 MovieClip Frame 1
on (rollOver) {
_parent._parent.grabFrame(_parent);
}
on (press) {
if ((_parent.arrow2._visible == true) && (_parent.arrow2.bouncy == true)) {
_parent.trackMouse = true;
}
}
on (release) {
if (_parent.startTime == -1) {
trace("wee2");
_parent.startTime = getTimer();
_parent.gotoAndPlay(2);
_parent._parent.tutorial4.go();
} else {
trace((_parent.arrow1._visible + " ") + _parent.arrow1.bouncy);
if ((_parent.arrow1._visible == true) && (_parent.arrow1.bouncy == true)) {
_parent.arrow1._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
_root.playSound("shake");
} else if ((_parent.arrow2._visible == true) && (_parent.arrow2.bouncy == true)) {
_parent.trackMouse = false;
_parent.numClicks++;
} else if ((_parent.arrow3._visible == true) && (_parent.arrow3.bouncy == true)) {
_parent.arrow3._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
_root.playSound("shake");
}
}
}
Symbol 247 MovieClip Frame 2
if ((this.getElapsedTime() > 4000) && (sauceBoil._visible == false)) {
sauceBoil._visible = true;
}
if ((this.getElapsedTime() > 12400) && (this.arrowStage < 6)) {
this.arrowStage = 6;
arrow3._visible = false;
} else if ((this.getElapsedTime() > 10000) && (this.arrowStage < 5)) {
this.arrowStage = 5;
arrow3.gotoAndPlay(2);
this.boilLoop.stopSound();
this.boilLoop = _root.playSound("simmerhigh", _root.genericLoop);
} else if ((this.getElapsedTime() > 8000) && (this.arrowStage < 4)) {
this.arrowStage = 4;
stirCont._visible = false;
this.trackMouse = false;
arrow2._visible = false;
} else if ((this.getElapsedTime() > 5800) && (this.arrowStage < 3)) {
this.arrowStage = 3;
stirCont._visible = true;
arrow2.gotoAndPlay(2);
this.boilLoop.stopSound();
this.boilLoop = _root.playSound("simmermedium", _root.genericLoop);
_root.playSound("stir");
} else if (this.getElapsedTime() > 5800) {
if (this.trackMouse == true) {
var opp = (-(_ymouse - stirCont._y));
var adj = (_xmouse - stirCont._x);
res = Math.atan2(opp, adj) * 57.2957795130823;
if (res < 0) {
res = res + 360;
}
if (res > this.currAngle) {
if ((res - this.currAngle) > 30) {
this.currAngle = this.currAngle + 30;
} else {
this.currAngle = res;
}
frameC = int(this.currAngle / 45) + 1;
stirCont.stiranim.gotoAndStop(frameC);
if (frameC >= 8) {
this.trackMouse = false;
}
}
}
} else if ((this.getElapsedTime() > 3700) && (this.arrowStage < 2)) {
this.arrowStage = 2;
arrow1._visible = false;
} else if ((this.getElapsedTime() > 2000) && (this.arrowStage < 1)) {
this.arrowStage = 1;
arrow1.gotoAndPlay(2);
}
completePerc = (getTimer() - this.startTime) / this.totalDuration;
if (completePerc >= 1) {
this.boilLoop.stopSound();
_parent.tutorial4.go();
} else {
slider._x = 17 + (90 * completePerc);
}
if (this.boilOn == false) {
this.boilOn = true;
this.boilLoop = _root.playSound("simmerlow", _root.genericLoop);
}
Symbol 247 MovieClip Frame 3
gotoAndPlay (2);
Symbol 250 MovieClip Frame 1
function shift() {
this.desiredX = targetMC._x;
if (this._x != this.desiredX) {
if (this._x < this.desiredX) {
this._x = this._x + 20;
if (this._x > this.desiredX) {
this._x = this.desiredX;
}
} else if (this._x > this.desiredX) {
this._x = this._x - 20;
if (this._x < this.desiredX) {
this._x = this.desiredX;
}
}
}
}
this.desiredX = 22;
Symbol 250 MovieClip Frame 2
shift();
Symbol 250 MovieClip Frame 3
shift();
gotoAndPlay (2);
Symbol 251 MovieClip Frame 1
this.onRelease = function () {
};
this.useHandCursor = false;
this._alpha = 0;
stop();
Symbol 265 Button
on (release) {
this._visible = false;
_parent.shiftAllowed = true;
_parent.tutorial2._visible = true;
}
Symbol 266 MovieClip Frame 1
stop();
function go() {
this.nextFrame();
}
Symbol 266 MovieClip Frame 2
stop();
Symbol 266 MovieClip Frame 3
stop();
Symbol 267 MovieClip Frame 1
garlicBlock.useHandCursor = false;
stop();
function go() {
this.nextFrame();
}
Instance of Symbol 35 MovieClip "garlicBlock" in Symbol 267 MovieClip Frame 1
on (release) {
}
Symbol 267 MovieClip Frame 2
stop();
Symbol 267 MovieClip Frame 3
garlicBlock._visible = false;
stop();
Symbol 272 Button
on (release) {
_root.reportQuality(_parent.act5, 100);
_parent.tutorial4._visible = true;
this._visible = false;
}
Symbol 273 MovieClip Frame 1
stop();
function go() {
trace("go");
this.nextFrame();
}
Symbol 273 MovieClip Frame 2
stop();
Symbol 273 MovieClip Frame 3
stop();
Symbol 279 Button
on (release) {
numC = _parent.act5.numClicks;
if (numC > 3) {
numC = 3;
}
_root.reportQuality(_parent.act5, 100 * (numC / 3));
this._visible = false;
}
Symbol 280 MovieClip Frame 1
stop();
function go() {
trace("go");
this.nextFrame();
}
Symbol 280 MovieClip Frame 2
stop();
Symbol 280 MovieClip Frame 3
stop();
Symbol 283 Button
on (release) {
_root.reportQuality(_parent.act5, 100);
this._visible = false;
}
Symbol 284 MovieClip Frame 1
stop();
function go() {
trace("go");
this.nextFrame();
}
Symbol 284 MovieClip Frame 2
stop();
Symbol 284 MovieClip Frame 3
stop();
Symbol 289 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 1
function getElapsedTime() {
if (this.startTime <= 0) {
return(0);
}
return(getTimer() - this.startTime);
}
this.startTime = -1;
this.totalDuration = 20000;
this.cookStage = 1;
stop();
Instance of Symbol 35 MovieClip in Symbol 302 MovieClip Frame 1
on (rollOver) {
_parent._parent.grabFrame(_parent);
}
on (release) {
if (_parent.startTime == -1) {
_parent.startTime = getTimer();
_parent.gotoAndPlay(2);
_parent.ovenSnd = _root.playSound("ovenloop", _root.genericLoop);
} else {
completePerc = ((getTimer() - _parent.startTime) / _parent.totalDuration) * 100;
trace(completePerc);
_parent._parent.tutorial5._visible = false;
_parent.ovenSnd.stopSound();
if ((completePerc >= 72) && (completePerc <= 78)) {
_root.reportQuality(_parent, 100);
} else if (completePerc > 78) {
_root.reportQuality(_parent, 100 - (completePerc - 78));
} else {
_root.reportQuality(_parent, 100 - (100 - completePerc));
}
}
}
Symbol 302 MovieClip Frame 2
if ((this.getElapsedTime() > 2000) && (this.cookStage == 1)) {
ovenMC.gotoAndStop(2);
_root.playSound("ovenstart");
this.cookStage = 2;
} else if ((this.getElapsedTime() > 8000) && (this.cookStage == 2)) {
pizzaMC.gotoAndStop(2);
this.cookStage = 3;
} else if ((this.getElapsedTime() > 18000) && (this.cookStage == 3)) {
pizzaMC.gotoAndStop(3);
this.cookStage = 4;
}
completePerc = (getTimer() - this.startTime) / this.totalDuration;
if (completePerc >= 1) {
this.boilLoop.stopSound();
_root.reportQuality(this, 75);
} else {
slider._x = 17 + (90 * completePerc);
}
Symbol 302 MovieClip Frame 3
gotoAndPlay (2);
Symbol 303 MovieClip Frame 1
function shiftPieces(howMuch) {
howMuch = howMuch * -1;
act1._x = act1._x + howMuch;
act2._x = act2._x + howMuch;
act3._x = act3._x + howMuch;
act4._x = act4._x + howMuch;
tutorial1._x = tutorial1._x + howMuch;
tutorial2._x = tutorial2._x + howMuch;
tutorial3._x = tutorial3._x + howMuch;
tutorial4._x = tutorial4._x + howMuch;
activityFrame._x = activityFrame._x + howMuch;
}
function shift() {
if (this.shiftAllowed != true) {
return(undefined);
}
diffX = this._x - this.desiredX;
if (diffX != 0) {
if (Math.abs(diffX) <= 10) {
this._x = this.desiredX;
shiftPieces(-1 * diffX);
} else if (this._x < this.desiredX) {
this._x = this._x + 10;
shiftPieces(10);
} else if (this._x > this.desiredX) {
this._x = this._x - 10;
shiftPieces(-10);
}
}
}
function grabFrame(who) {
activityFrame.targetMC = who;
}
act2._visible = true;
act3._visible = true;
act4._visible = false;
act5._visible = false;
act6._visible = false;
this.desiredX = 221;
this.shiftAllowed = false;
tutorial2._visible = false;
tutorial3._visible = false;
tutorial4._visible = false;
tutorial5._visible = false;
Symbol 303 MovieClip Frame 2
traySlider.addActivity(act1);
traySlider.addActivity(act2);
traySlider.addActivity(act3);
traySlider.addActivity(act4);
traySlider.addActivity(act5);
traySlider.addActivity(act6);
Symbol 303 MovieClip Frame 3
shift();
Symbol 303 MovieClip Frame 4
shift();
gotoAndPlay (3);
Symbol 304 MovieClip Frame 1
function reportQuality(reportingMC, qualityLevel) {
this.qualityReports.push(qualityLevel);
reportingMC.gotoAndStop(1);
reportingMC._visible = false;
trace((((((("reportqual " + reportingMC) + " ") + qualityLevel) + " ") + this.numComplete) + " ") + this.qualityReports.length);
this.numComplete++;
if (this.numComplete == 1) {
_parent.desiredX = 336;
_parent.grabFrame(_parent.act2);
} else if (this.numComplete == 2) {
_parent.grabFrame(_parent.act3);
} else if (this.numComplete == 3) {
_parent.grabFrame(_parent.act4);
_parent.desiredX = 451;
_parent.act4._visible = true;
_parent.act4._x = 140;
} else if (this.numComplete == 4) {
_parent.fin._x = 22;
_parent.desiredX = 451;
_parent.fin.go();
_parent.activityFrame._visible = false;
}
return(undefined);
while (i < this.activities.length) {
if (this.activities[i].completed == false) {
return(undefined);
}
i++;
}
}
function addActivity(actMC) {
trace(("addActivity " + actMC) + " ");
actMC.completed = false;
actMC.targetSlot = 5;
this.activities.push(actMC);
}
this.activities = new Array();
this.qualityReports = new Array();
this.numComplete = 0;
Symbol 304 MovieClip Frame 3
gotoAndPlay (2);
Symbol 311 MovieClip Frame 1
stop();
Symbol 335 MovieClip Frame 1
stop();
Symbol 335 MovieClip Frame 2
stop();
Symbol 335 MovieClip Frame 3
stop();
Symbol 338 MovieClip Frame 1
stop();
Symbol 339 MovieClip Frame 1
function getElapsedTime() {
if (this.startTime <= 0) {
return(0);
}
return(getTimer() - this.startTime);
}
this.startTime = -1;
this.noodleStage = 0;
this.waterStage = 1;
this.totalDuration = 20000;
cookedNoodles._visible = false;
stop();
Instance of Symbol 35 MovieClip in Symbol 339 MovieClip Frame 1
on (rollOver) {
_parent._parent.grabFrame(_parent);
}
on (release) {
if (_parent.startTime == -1) {
_parent._parent.tutorial1.go();
_parent.startTime = getTimer();
_parent.gotoAndPlay(2);
} else {
completePerc = ((getTimer() - _parent.startTime) / _parent.totalDuration) * 100;
trace(completePerc);
_parent.boilLoop.stopSound();
if ((completePerc >= 72) && (completePerc <= 78)) {
_root.reportQuality(_parent, 100);
trace("wweeee 5");
} else if (completePerc > 78) {
_root.reportQuality(_parent, 100 - (completePerc - 78));
trace("wweeee 6");
} else {
_root.reportQuality(_parent, 100 - (100 - completePerc));
trace("wweeee 7");
}
_parent._parent.tutorial1.go();
}
}
Symbol 339 MovieClip Frame 2
if ((this.getElapsedTime() > 8000) && (this.noodleStage == 1)) {
this.noodleStage = 2;
noodlesRaw._visible = false;
cookedNoodles._visible = true;
}
if ((this.getElapsedTime() > 2000) && (this.waterStage == 1)) {
this.boilLoop.stopSound();
this.boilLoop = _root.playSound("boilmedium", _root.genericLoop);
this.waterStage = 2;
water.gotoAndStop(2);
} else if ((this.getElapsedTime() > 10000) && (this.waterStage == 2)) {
this.waterStage = 3;
water.gotoAndStop(3);
this.boilLoop.stopSound();
this.boilLoop = _root.playSound("boilfast", _root.genericLoop);
}
completePerc = (getTimer() - this.startTime) / this.totalDuration;
if (completePerc >= 1) {
this.boilLoop.stopSound();
_root.reportQuality(this, 75);
this._parent.tutorial1.go();
} else {
slider._x = 17 + (90 * completePerc);
}
if (this.noodleStage == 0) {
this.boilLoop = _root.playSound("boilslow", _root.genericLoop);
this.noodleStage = 1;
}
Symbol 339 MovieClip Frame 3
gotoAndPlay (2);
Symbol 340 MovieClip Frame 1
function getElapsedTime() {
if (this.startTime <= 0) {
return(0);
}
return(getTimer() - this.startTime);
}
this.startTime = -1;
this.arrowStage = 0;
this.numClicks = 0;
this.boilOn = false;
this.totalDuration = 15000;
sauceBoil._visible = false;
stop();
Instance of Symbol 35 MovieClip in Symbol 340 MovieClip Frame 1
on (rollOver) {
_parent._parent.grabFrame(_parent);
}
on (release) {
if (_parent.startTime == -1) {
trace("wee2");
_parent.startTime = getTimer();
_parent.gotoAndPlay(2);
_parent._parent.tutorial3.go();
} else {
trace((_parent.arrow1._visible + " ") + _parent.arrow1.bouncy);
if ((_parent.arrow1._visible == true) && (_parent.arrow1.bouncy == true)) {
_parent.arrow1._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
_parent._parent.tutorial3.go();
} else if ((_parent.arrow2._visible == true) && (_parent.arrow2.bouncy == true)) {
_parent.arrow2._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
} else if ((_parent.arrow3._visible == true) && (_parent.arrow3.bouncy == true)) {
_parent.arrow3._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
}
}
}
Symbol 340 MovieClip Frame 2
if (this.getElapsedTime() > 4000) {
sauceBoil._visible = true;
}
if ((this.getElapsedTime() > 12400) && (this.arrowStage < 6)) {
this.arrowStage = 6;
arrow3._visible = false;
} else if ((this.getElapsedTime() > 10000) && (this.arrowStage < 5)) {
this.arrowStage = 5;
arrow3.gotoAndPlay(2);
this.boilLoop.stopSound();
this.boilLoop = _root.playSound("simmerhigh", _root.genericLoop);
} else if ((this.getElapsedTime() > 8000) && (this.arrowStage < 4)) {
this.arrowStage = 4;
arrow2._visible = false;
} else if ((this.getElapsedTime() > 5800) && (this.arrowStage < 3)) {
this.arrowStage = 3;
arrow2.gotoAndPlay(2);
this.boilLoop.stopSound();
this.boilLoop = _root.playSound("simmermedium", _root.genericLoop);
} else if ((this.getElapsedTime() > 3700) && (this.arrowStage < 2)) {
this.arrowStage = 2;
arrow1._visible = false;
} else if ((this.getElapsedTime() > 2000) && (this.arrowStage < 1)) {
this.arrowStage = 1;
arrow1.gotoAndPlay(2);
}
completePerc = (getTimer() - this.startTime) / this.totalDuration;
if (completePerc >= 1) {
trace("wee?");
_parent.tutorial3._visible = false;
_parent.tutorial4._visible = true;
this.boilLoop.stopSound();
_root.reportQuality(this, 100 * (this.numClicks / 3));
} else {
slider._x = 17 + (90 * completePerc);
}
if (this.boilOn == false) {
this.boilOn = true;
this.boilLoop = _root.playSound("simmerlow", _root.genericLoop);
}
Symbol 340 MovieClip Frame 3
gotoAndPlay (2);
Symbol 343 MovieClip Frame 1
function getElapsedTime() {
if (this.startTime <= 0) {
return(0);
}
return(getTimer() - this.startTime);
}
function go() {
subtotal = 0;
i = 0;
while (i < _parent.traySlider.qualityReports.length) {
subtotal = subtotal + _parent.traySlider.qualityReports[i];
i++;
}
totalQuality = subtotal / _parent.traySlider.qualityReports.length;
if (totalQuality >= 90) {
this.totalStars = 5;
} else {
this.totalStars = int((totalQuality - 10) / 23) + 1;
}
this.totalDuration = (totalStars * 1000) + 4000;
startX = 21.5 + ((5 - totalStars) * 10.25);
i = 1;
while (i <= totalStars) {
eval ("star" + i)._x = startX + ((i - 1) * 20.5);
i++;
}
trace((((((((("totalQual " + totalQuality) + " ") + totalStars) + " ") + startX) + " ") + subtotal) + " ") + _parent.traySlider.qualityReports.length);
this.startTime = getTimer();
_root.endLevel.setFeedback(1, "spaghetti", totalStars);
gotoAndPlay (2);
}
this.startTime = -1;
this.starStage = 0;
this.totalDuration = 13000;
star1._visible = false;
star2._visible = false;
star3._visible = false;
star4._visible = false;
star5._visible = false;
stop();
Instance of Symbol 35 MovieClip in Symbol 343 MovieClip Frame 1
on (rollOver) {
_parent._parent.grabFrame(_parent);
}
on (release) {
if (_parent.startTime == -1) {
trace("wee2");
_parent.startTime = getTimer();
_parent.gotoAndPlay(2);
_parent._parent.tutorial3.go();
} else {
trace((_parent.arrow1._visible + " ") + _parent.arrow1.bouncy);
if ((_parent.arrow1._visible == true) && (_parent.arrow1.bouncy == true)) {
_parent.arrow1._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
_parent._parent.tutorial3.go();
} else if ((_parent.arrow2._visible == true) && (_parent.arrow2.bouncy == true)) {
_parent.arrow2._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
} else if ((_parent.arrow3._visible == true) && (_parent.arrow3.bouncy == true)) {
_parent.arrow3._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
}
}
}
Symbol 343 MovieClip Frame 2
if (this.getElapsedTime() > ((this.totalStars * 1000) + 3000)) {
_root.endLevel.go();
this.gotoAndStop(1);
} else if (((this.getElapsedTime() > 5000) && (this.starStage < 5)) && (this.totalStars >= 5)) {
trace("star 5");
this.starStage = 5;
star5._visible = true;
_root.playSound("starpop");
if (this.totalStars == 5) {
_root.playSound("endLevelSFX");
}
} else if (((this.getElapsedTime() > 4000) && (this.starStage < 4)) && (this.totalStars >= 4)) {
trace("star 4");
this.starStage = 4;
star4._visible = true;
_root.playSound("starpop");
if (this.totalStars == 4) {
_root.playSound("endLevelSFX");
}
} else if (((this.getElapsedTime() > 3000) && (this.starStage < 3)) && (this.totalStars >= 3)) {
trace("star 3");
this.starStage = 3;
star3._visible = true;
_root.playSound("starpop");
if (this.totalStars == 3) {
_root.playSound("endLevelSFX");
}
} else if (((this.getElapsedTime() > 2000) && (this.starStage < 2)) && (this.totalStars >= 2)) {
trace("star 2");
this.starStage = 2;
star2._visible = true;
_root.playSound("starpop");
if (this.totalStars == 2) {
_root.playSound("endLevelSFX");
}
} else if (((this.getElapsedTime() > 1000) && (this.starStage < 1)) && (this.totalStars >= 1)) {
trace("star 1");
this.starStage = 1;
star1._visible = true;
_root.playSound("starpop");
if (this.totalStars == 1) {
_root.playSound("endLevelSFX");
}
}
completePerc = (getTimer() - this.startTime) / this.totalDuration;
if (completePerc >= 1) {
trace("star stopped");
stop();
}
Symbol 343 MovieClip Frame 3
gotoAndPlay (2);
Symbol 344 Button
on (release) {
this._visible = false;
}
Symbol 347 MovieClip Frame 1
stop();
function go() {
this.nextFrame();
}
Symbol 354 MovieClip Frame 1
stop();
function go() {
this.nextFrame();
}
Symbol 354 MovieClip Frame 2
stop();
Symbol 354 MovieClip Frame 3
stop();
Symbol 361 MovieClip Frame 1
garlicBlock.useHandCursor = false;
stop();
function go() {
this.nextFrame();
}
Instance of Symbol 35 MovieClip "garlicBlock" in Symbol 361 MovieClip Frame 1
on (release) {
}
Symbol 361 MovieClip Frame 2
stop();
Symbol 361 MovieClip Frame 3
garlicBlock._visible = false;
stop();
Symbol 367 MovieClip Frame 1
stop();
function go() {
this.nextFrame();
}
Symbol 367 MovieClip Frame 2
stop();
Symbol 367 MovieClip Frame 3
stop();
Symbol 368 MovieClip Frame 1
function shiftPieces(howMuch) {
howMuch = howMuch * -1;
act1._x = act1._x + howMuch;
act2._x = act2._x + howMuch;
act3._x = act3._x + howMuch;
act4._x = act4._x + howMuch;
tutorial1._x = tutorial1._x + howMuch;
tutorial2._x = tutorial2._x + howMuch;
tutorial3._x = tutorial3._x + howMuch;
tutorial4._x = tutorial4._x + howMuch;
activityFrame._x = activityFrame._x + howMuch;
}
function shift() {
if (this.shiftAllowed != true) {
return(undefined);
}
diffX = this._x - this.desiredX;
if (diffX != 0) {
if (Math.abs(diffX) <= 10) {
this._x = this.desiredX;
shiftPieces(-1 * diffX);
} else if (this._x < this.desiredX) {
this._x = this._x + 10;
shiftPieces(10);
} else if (this._x > this.desiredX) {
this._x = this._x - 10;
shiftPieces(-10);
}
}
}
function grabFrame(who) {
activityFrame.targetMC = who;
}
act2._visible = true;
act3._visible = true;
act4._visible = false;
this.desiredX = 221;
this.shiftAllowed = false;
tutorial2._visible = false;
tutorial3._visible = false;
tutorial4._visible = false;
Symbol 368 MovieClip Frame 2
traySlider.addActivity(act1);
traySlider.addActivity(act2);
traySlider.addActivity(act3);
traySlider.addActivity(act4);
Symbol 368 MovieClip Frame 3
shift();
Symbol 368 MovieClip Frame 4
shift();
gotoAndPlay (3);
Symbol 369 MovieClip Frame 1
function reportQuality(reportingMC, qualityLevel) {
trace((((("reportqual " + reportingMC) + " ") + qualityLevel) + " ") + this.numComplete);
this.qualityReports.push(qualityLevel);
reportingMC.gotoAndStop(1);
reportingMC._visible = false;
this.numComplete++;
if (this.numComplete == 3) {
_parent.desiredX = 451;
_parent.act4._visible = true;
_parent.act4._x = 258;
_parent.grabFrame(_parent.act4);
} else if (this.numComplete == 4) {
_parent.desiredX = 451;
_parent.act4._visible = false;
_parent.act5._visible = true;
_parent.act5._x = 22;
_parent.grabFrame(_parent.act5);
} else if (this.numComplete >= 5) {
_parent.fin._x = 22;
_parent.desiredX = 451;
_parent.fin.go();
_parent.activityFrame._visible = false;
}
return(undefined);
while (i < this.activities.length) {
if (this.activities[i].completed == false) {
return(undefined);
}
i++;
}
}
function addActivity(actMC) {
trace(("addActivity " + actMC) + " ");
actMC.completed = false;
actMC.targetSlot = 5;
this.activities.push(actMC);
}
this.activities = new Array();
this.qualityReports = new Array();
this.numComplete = 0;
Symbol 369 MovieClip Frame 3
gotoAndPlay (2);
Symbol 370 MovieClip Frame 1
function getElapsedTime() {
if (this.startTime <= 0) {
return(0);
}
return(getTimer() - this.startTime);
}
this.startTime = -1;
this.arrowStage = 0;
this.numClicks = 0;
this.currAngle = 0;
this.boilOn = false;
this.trackMouse = false;
stirCont._visible = false;
this.totalDuration = 15000;
sauceBoil._visible = false;
stop();
Instance of Symbol 35 MovieClip in Symbol 370 MovieClip Frame 1
on (rollOver) {
_parent._parent.grabFrame(_parent);
}
on (press) {
if ((_parent.arrow2._visible == true) && (_parent.arrow2.bouncy == true)) {
_parent.trackMouse = true;
}
}
on (release) {
if (_parent.startTime == -1) {
trace("wee2");
_parent.startTime = getTimer();
_parent.gotoAndPlay(2);
_parent._parent.tutorial4.go();
} else {
trace((_parent.arrow1._visible + " ") + _parent.arrow1.bouncy);
if ((_parent.arrow1._visible == true) && (_parent.arrow1.bouncy == true)) {
_parent.arrow1._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
_root.playSound("shake");
} else if ((_parent.arrow2._visible == true) && (_parent.arrow2.bouncy == true)) {
_parent.trackMouse = false;
_parent.numClicks++;
} else if ((_parent.arrow3._visible == true) && (_parent.arrow3.bouncy == true)) {
_parent.arrow3._visible = false;
_parent.numClicks++;
_parent.dropgarlic.go();
_root.playSound("shake");
}
}
}
Symbol 370 MovieClip Frame 2
if ((this.getElapsedTime() > 4000) && (sauceBoil._visible == false)) {
sauceBoil._visible = true;
}
if ((this.getElapsedTime() > 12400) && (this.arrowStage < 6)) {
this.arrowStage = 6;
arrow3._visible = false;
} else if ((this.getElapsedTime() > 10000) && (this.arrowStage < 5)) {
this.arrowStage = 5;
arrow3.gotoAndPlay(2);
this.boilLoop.stopSound();
this.boilLoop = _root.playSound("simmerhigh", _root.genericLoop);
} else if ((this.getElapsedTime() > 8000) && (this.arrowStage < 4)) {
this.arrowStage = 4;
stirCont._visible = false;
this.trackMouse = false;
arrow2._visible = false;
} else if ((this.getElapsedTime() > 5800) && (this.arrowStage < 3)) {
this.arrowStage = 3;
stirCont._visible = true;
arrow2.gotoAndPlay(2);
this.boilLoop.stopSound();
this.boilLoop = _root.playSound("simmermedium", _root.genericLoop);
_root.playSound("stir");
} else if (this.getElapsedTime() > 5800) {
if (this.trackMouse == true) {
var opp = (-(_ymouse - stirCont._y));
var adj = (_xmouse - stirCont._x);
res = Math.atan2(opp, adj) * 57.2957795130823;
if (res < 0) {
res = res + 360;
}
if (res > this.currAngle) {
if ((res - this.currAngle) > 30) {
this.currAngle = this.currAngle + 30;
} else {
this.currAngle = res;
}
frameC = int(this.currAngle / 45) + 1;
stirCont.stiranim.gotoAndStop(frameC);
if (frameC >= 8) {
this.trackMouse = false;
}
}
}
} else if ((this.getElapsedTime() > 3700) && (this.arrowStage < 2)) {
this.arrowStage = 2;
arrow1._visible = false;
} else if ((this.getElapsedTime() > 2000) && (this.arrowStage < 1)) {
this.arrowStage = 1;
arrow1.gotoAndPlay(2);
}
completePerc = (getTimer() - this.startTime) / this.totalDuration;
if (completePerc >= 1) {
this.boilLoop.stopSound();
_root.reportQuality(this, (this.numClicks / 3) * 100);
} else {
slider._x = 17 + (90 * completePerc);
}
if (this.boilOn == false) {
this.boilOn = true;
this.boilLoop = _root.playSound("simmerlow", _root.genericLoop);
}
Symbol 370 MovieClip Frame 3
gotoAndPlay (2);
Symbol 371 MovieClip Frame 1
function shiftPieces(howMuch) {
howMuch = howMuch * -1;
act1._x = act1._x + howMuch;
act2._x = act2._x + howMuch;
act3._x = act3._x + howMuch;
act4._x = act4._x + howMuch;
tutorial1._x = tutorial1._x + howMuch;
tutorial2._x = tutorial2._x + howMuch;
tutorial3._x = tutorial3._x + howMuch;
tutorial4._x = tutorial4._x + howMuch;
activityFrame._x = activityFrame._x + howMuch;
}
function shift() {
diffX = this._x - this.desiredX;
if (diffX != 0) {
if (Math.abs(diffX) <= 10) {
this._x = this.desiredX;
shiftPieces(-1 * diffX);
} else if (this._x < this.desiredX) {
this._x = this._x + 10;
shiftPieces(10);
} else if (this._x > this.desiredX) {
this._x = this._x - 10;
shiftPieces(-10);
}
}
}
function grabFrame(who) {
activityFrame.targetMC = who;
}
act2._visible = true;
act3._visible = true;
act4._visible = false;
act5._visible = false;
act6._visible = false;
this.desiredX = 221;
this.shiftAllowed = false;
tutorial2._visible = false;
tutorial3._visible = false;
tutorial4._visible = false;
tutorial5._visible = false;
Symbol 371 MovieClip Frame 2
traySlider.addActivity(act1);
traySlider.addActivity(act2);
traySlider.addActivity(act3);
traySlider.addActivity(act4);
traySlider.addActivity(act5);
traySlider.addActivity(act6);
Symbol 371 MovieClip Frame 3
shift();
Symbol 371 MovieClip Frame 4
shift();
gotoAndPlay (3);
Symbol 380 MovieClip Frame 1
function showText(thumbsUp) {
trace("eee");
if (thumbsUp == true) {
txt.text = "It's a thumbs up!";
} else {
txt.text = "It's a thumbs down.";
}
}
stop();
Symbol 385 MovieClip Frame 1
stop();
Symbol 387 Button
on (release) {
this._visible = false;
if (_root.letThemPass == 0) {
_root.currentLevel++;
_root.gotoAndPlay(4);
} else {
_root.gotoAndPlay(3);
}
}
Symbol 391 MovieClip Frame 1
function setFeedback(whatSlot, whatDish, numStars) {
feedback1.text = "The highlight of the meal was the Spaghetti Marinara. Easily the best this reviewer has tasted.";
feedback2.text = "";
this.numStarsTotal = this.numStarsTotal + numStars;
totalStars.text = this.numStarsTotal;
if ((whatSlot == 1) && (whatDish == "pizza")) {
item1.gotoAndStop(2);
feedback1.text = "The highlight of the meal was the Pizza Formaggio. Easily the best this reviewer has tasted.";
feedback2.text = "";
}
if (numStars < _root.normalGoal) {
feedback1.text = "You need to work on your skills in the kitchen. Give it another try!";
thumbsText.showText(false);
thumbsDown._visible = true;
_root.letThemPass = 1;
} else {
thumbsText.showText(true);
thumbsDown._visible = false;
}
i = 1;
while (i <= 5) {
if (i > numStars) {
eval ((("star" + whatSlot) + "") + i)._visible = false;
} else {
eval ((("star" + whatSlot) + "") + i)._visible = true;
}
i++;
}
}
function go() {
this._visible = true;
this.numStarsTotal = 0;
}
this.numStarsTotal = 0;
stop();
Symbol 737 Button
on (release) {
_root.gotoAndStop(3);
}
Symbol 738 MovieClip Frame 1
stop();
Symbol 738 MovieClip Frame 169
stop();