Frame 1
playbtn_mc.label = "play game";
playbtn_mc.releaseFunc = function () {
skillLevel = 1;
gotoAndPlay ("start");
};
secret_btn.onRelease = function () {
gotoAndStop ("chooselevel");
};
helpbtn_mc.label = "how to play";
helpbtn_mc.releaseFunc = function () {
gotoAndStop ("howtoplay1");
};
franktown_btn.onRelease = function () {
getURL ("http://www.franktownrocks.com", "_blank");
};
stop();
Frame 2
function startGame(sl) {
skillLevel = sl;
gotoAndPlay ("start");
}
chooselevelTxt.text = "choose your skill level";
backbtn_mc.label = "back";
backbtn_mc.releaseFunc = function () {
gotoAndStop ("intro");
};
level1_mc.label = "level 1";
level1_mc.releaseFunc = function () {
startGame(1);
};
level2_mc.label = "level 2";
level2_mc.releaseFunc = function () {
startGame(2);
};
level3_mc.label = "level 3";
level3_mc.releaseFunc = function () {
startGame(3);
};
Frame 3
nextbtn_mc.label = "next";
nextbtn_mc.releaseFunc = function () {
gotoAndStop ("howtoplay2");
};
nextbtn_mc.setLabel("next");
close_btn.onRelease = function () {
gotoAndStop ("intro");
};
Frame 4
backbtn_mc.label = "back";
backbtn_mc.releaseFunc = function () {
gotoAndStop ("howtoplay1");
};
nextbtn_mc.label = "next";
nextbtn_mc.releaseFunc = function () {
gotoAndStop ("howtoplay3");
};
nextbtn_mc.setLabel("next");
close_btn.onRelease = function () {
gotoAndStop ("intro");
};
Frame 5
backbtn_mc.label = "back";
backbtn_mc.releaseFunc = function () {
gotoAndStop ("howtoplay2");
};
close_btn.onRelease = function () {
gotoAndStop ("intro");
};
Frame 6
main_mc.skillLevel = skillLevel;
Frame 7
stop();
Symbol 8 MovieClip Frame 1
stop();
Symbol 14 MovieClip Frame 1
this._visible = false;
Symbol 30 MovieClip [pizza_cutter] Frame 1
stop();
Symbol 43 MovieClip Frame 1
Symbol 46 MovieClip [pizza] Frame 1
function isOver(t) {
var _local4 = _parent._parent._xmouse;
var _local3 = _parent._parent._ymouse;
if (this.hitTest(t)) {
if (left_mc.hitTest(_local4, _local3, true)) {
dotline_mc._alpha = 100;
left_mc._alpha = 25;
right_mc._alpha = 0;
side = "left";
} else if (right_mc.hitTest(_local4, _local3, true)) {
dotline_mc._alpha = 100;
left_mc._alpha = 0;
right_mc._alpha = 25;
side = "right";
} else {
left_mc._alpha = 0;
right_mc._alpha = 0;
dotline_mc._alpha = 0;
side = false;
}
} else {
left_mc._alpha = 0;
right_mc._alpha = 0;
dotline_mc._alpha = 0;
side = false;
}
return(side);
}
stop();
status = false;
c = 0;
crust = false;
Symbol 46 MovieClip [pizza] Frame 2
crust = true;
Symbol 46 MovieClip [pizza] Frame 12
_parent.sfx_mc.playSound("crustdrop");
Symbol 46 MovieClip [pizza] Frame 17
stop();
Symbol 46 MovieClip [pizza] Frame 35
stop();
Symbol 46 MovieClip [pizza] Frame 37
this.onRollOver = undefined;
this.onRollOut = undefined;
this.onPress = undefined;
Symbol 46 MovieClip [pizza] Frame 40
play();
Symbol 46 MovieClip [pizza] Frame 48
function watchRotation() {
this.onMouseMove = function () {
var _local5 = this._xmouse - -3;
var _local4 = -1 * (this._ymouse - -4);
var _local3 = Math.atan2(_local4, _local5);
_local3 = Math.round((_local3 / Math.PI) * 180);
_local3 = 180 - _local3;
var _local2 = 0;
while (_local2 < angles.length) {
if (Math.abs(_local3 - angles[_local2]) < 10) {
cutter_mc.gotoAndStop(_local2 + 1);
cutangle = _local2;
cutter_mc._y = cutY[_local2];
cutter_mc._x = cutX[_local2];
}
_local2++;
}
};
}
function storeCut(n) {
if (cutsmade[n] != 1) {
cutsmade[n] = 1;
}
var _local3 = 0;
while (_local3 < 6) {
if (cutsmade[_local3] == 0) {
return(undefined);
}
_local3++;
}
stopCut();
cutter_mc._visible = false;
_parent._parent.cuttingComplete(this);
}
function stopCut() {
cutter_mc.stopDrag();
this.onMouseUp = undefined;
this.onMouseMove = undefined;
cutter_mc._x = cutter_mc.ox;
cutter_mc._y = cutter_mc.oy;
watchRotation();
}
stop();
var j = 0;
while (j < 6) {
cuts_mc[("cut" + j) + "_mc"]._visible = false;
j++;
}
cuts_mc._alpha = 100;
cutter_mc.ox = cutter_mc._x;
cutter_mc.oy = cutter_mc._y;
cutsmade = new Array(0, 0, 0, 0, 0, 0);
angles = new Array(0, 50, 135, 180, 227, 315);
cutX = new Array(-208, -78, 78, 208, 78, -78);
cutY = new Array(0, -80, -80, 0, 80, 80);
watchRotation();
this.onMouseDown = function () {
cutter_mc.y = cutter_mc._y;
cutter_mc.x = cutter_mc._x;
cutter_mc.startDrag(false);
this.onMouseMove = function () {
if ((cutangle == 3) || (cutangle == 0)) {
cutter_mc._y = cutter_mc.y;
} else {
cutter_mc._x = cutter_mc.x - ((Math.abs(cutter_mc._y - cutter_mc.y) / 80) * cutter_mc.x);
}
if (cutangle < 3) {
goal = cutangle + 3;
} else {
goal = cutangle - 3;
}
var _local1 = cuts_mc["hit" + goal];
if (cutter_mc.hit_mc.hitTest(_local1)) {
cuts_mc[("cut" + goal) + "_mc"]._visible = true;
storeCut(cutangle);
storeCut(goal);
}
if (cutter_mc.hit_mc.hitTest(cuts_mc.hit6)) {
cuts_mc[("cut" + cutangle) + "_mc"]._visible = true;
storeCut(cutangle);
}
};
this.onMouseUp = stopCut;
};
Symbol 46 MovieClip [pizza] Frame 66
this.removeMovieClip();
stop();
Symbol 57 MovieClip Frame 1
stop();
Symbol 69 MovieClip Frame 1
stop();
Symbol 70 MovieClip [bin] Frame 1
function setTopping(ing) {
label_mc.gotoAndStop(ing);
contents_mc.gotoAndStop(ing);
}
setTopping(this.topping);
stop();
this.onRollOver = function () {
gotoAndPlay ("on");
};
this.onRollOut = (this.onDragOut = function () {
gotoAndPlay ("off");
});
this.onPress = function () {
_parent._parent.pickupTopping(this);
this.onMouseUp = function () {
_parent._parent.putdownTopping();
this.onMouseUp = undefined;
};
};
Symbol 70 MovieClip [bin] Frame 7
stop();
Symbol 70 MovieClip [bin] Frame 12
stop();
Symbol 74 MovieClip [fullsize_order] Frame 1
function showOrder() {
ordernumTxt.text = "#" + this.num;
j = 0;
while (j < order.length) {
toppingscount++;
showTopping(this.order[j]);
j++;
}
}
function showTopping(top) {
var _local6 = 30;
var _local3 = 30;
var _local4 = 22;
this.attachMovie("order_line", "line" + toppingscount, toppingscount);
var _local2 = this["line" + toppingscount];
_local2._y = ((toppingscount - 1) * _local6) + _local3;
_local2._x = _local4;
_local2.symbol_mc.gotoAndStop(top.topping);
_local2.toppingTxt.text = top.topping;
if (top.sides == 1) {
_local2.attachMovie("half_symbol", "half_mc", 1);
_local2.half_mc._x = _local2.toppingTxt._x + _local2.toppingTxt.textWidth;
}
_local2.crossedout_mc._visible = false;
return(_local2);
}
stop();
toppingscount = 0;
showOrder();
Symbol 77 MovieClip [order_slip] Frame 1
function init() {
var _local2 = 40;
var _local3 = Math.round(Math.random() * _local2) - (_local2 / 2);
this._rotation = _local3;
ordernumTxt.text = "#" + this.num;
toppingscount = 0;
}
stop();
init();
Symbol 89 MovieClip [toppings] Frame 1
stop();
Symbol 90 MovieClip [pizza_topping] Frame 1
stop();
Symbol 93 MovieClip Frame 1
this._visible = false;
this._rotation = Math.round((Math.random() * 6) - 3);
Symbol 100 MovieClip [message] Frame 37
this.removeMovieClip();
Symbol 111 MovieClip Frame 1
function setLabel(t) {
this.label = t;
btn_mc.labelTxt.text = t;
}
function disable() {
gotoAndStop ("disabled");
}
function enable() {
gotoAndStop (1);
}
stop();
this.onRollOver = function () {
gotoAndPlay ("on");
};
this.onRollOut = function () {
gotoAndPlay ("off");
};
this.onPress = function () {
gotoAndStop ("down");
};
this.onRelease = function () {
gotoAndStop ("up");
releaseFunc();
};
if (disabled) {
disable();
}
setLabel(this.label);
Symbol 111 MovieClip Frame 6
stop();
Symbol 111 MovieClip Frame 11
stop();
Symbol 111 MovieClip Frame 23
this.onRollOver = undefined;
this.onRollOut = undefined;
this.onPress = undefined;
this.onRelease = undefined;
Symbol 140 MovieClip [endlevel_screen] Frame 1
stop();
Symbol 140 MovieClip [endlevel_screen] Frame 2
btn_mc.setLabel("next level");
btn_mc.releaseFunc = _parent.nextLevel;
Symbol 140 MovieClip [endlevel_screen] Frame 3
btn_mc.setLabel("next level");
btn_mc.releaseFunc = _parent.nextLevel;
Symbol 140 MovieClip [endlevel_screen] Frame 4
btn_mc.setLabel("continue");
btn_mc.releaseFunc = _parent.showResults;
Symbol 140 MovieClip [endlevel_screen] Frame 5
btn_mc.setLabel("continue");
btn_mc.releaseFunc = _parent.showResults;
Symbol 140 MovieClip [endlevel_screen] Frame 6
btn_mc.setLabel("continue");
btn_mc.releaseFunc = _parent.showResults;
Symbol 140 MovieClip [endlevel_screen] Frame 7
btn_mc.setLabel("GO!");
btn_mc.releaseFunc = function () {
getURL ("http://www.franktownrocks.com", "_blank");
};
franktown_btn.onRelease = function () {
getURL ("http://www.franktownrocks.com", "_blank");
};
_parent.showScore(this);
scoreTxt.text = _parent.totalscore;
Symbol 149 MovieClip [pizza_ind] Frame 1
stop();
Symbol 149 MovieClip [pizza_ind] Frame 11
this.removeMovieClip();
Symbol 152 MovieClip [modal] Frame 1
this.onRollOver = function () {
};
this.useHandCursor = false;
stop();
Symbol 301 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 302 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 303 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 304 MovieClip [__Packages.mx.transitions.easing.Elastic] Frame 0
class mx.transitions.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
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;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
static function easeOut(t, b, c, d, a, p) {
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;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOut(t, b, c, d, a, p) {
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;
var _local7 = p / 4;
} else {
var _local7 = (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) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static var version = "1.1.0.52";
}
Symbol 305 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(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 var version = "1.1.0.52";
}
Symbol 306 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 222 MovieClip Frame 1
function startTimer(n) {
isBlinking = false;
var displayTime = "";
if (n < 10) {
displayTime = "0" + n;
} else {
displayTime = n;
}
this.startTime = getTimer();
this.totalTime = n;
timerTxt.text = displayTime;
this.onEnterFrame = function () {
if (_parent._parent.levelEnded) {
stopTimer();
}
var _local4 = Math.floor((getTimer() - this.startTime) / 1000);
var _local3 = this.totalTime - _local4;
if (_local3 < 10) {
displayTime = "0" + _local3;
} else {
displayTime = _local3;
}
timerTxt.text = displayTime;
if ((_local3 < 3) && (!isBlinking)) {
gotoAndPlay ("blinkgreen");
isBlinking = true;
}
if (_local3 == 0) {
_parent._parent.prepareForRemoval(_parent.inUse);
startburnTimer();
}
};
var _local5 = _parent._parent._parent.oventimers_mc[("otimer" + this._parent.num) + "_mc"];
if (_local5) {
_local5.startTimer(n);
}
}
function stopTimer() {
this.onEnterFrame = undefined;
this.gotoAndStop(1);
this.timerTxt.text = "";
var _local3 = _parent._parent._parent.oventimers_mc[("otimer" + this._parent.num) + "_mc"];
if (_local3) {
_local3.stopTimer();
}
}
function startburnTimer() {
this.gotoAndPlay("blinkred");
var _local5 = _parent._parent._parent.oventimers_mc[("otimer" + this._parent.num) + "_mc"];
if (_local5) {
_local5.startburnTimer();
}
this.totalTime = 10;
this.startTime = getTimer();
this.onEnterFrame = function () {
var _local4 = Math.floor((getTimer() - this.startTime) / 1000);
var _local3 = this.totalTime - _local4;
if (_local3 < 10) {
displayTime = "0" + _local3;
} else {
displayTime = _local3;
}
timerTxt.text = displayTime;
if (_parent._parent.levelEnded) {
stopTimer();
}
if (_local4 >= totalTime) {
this.onEnterFrame = undefined;
this.gotoAndStop(1);
if (_parent._parent._name == "main_mc") {
_parent._parent.burntPizza(this._parent);
}
}
};
}
stop();
timerTxt.text = "";
Symbol 222 MovieClip Frame 17
gotoAndPlay ("blinkgreen");
Symbol 222 MovieClip Frame 19
isBlinking = true;
Symbol 222 MovieClip Frame 33
gotoAndPlay ("blinkred");
Symbol 226 MovieClip Frame 1
this._visible = false;
stop();
Symbol 226 MovieClip Frame 2
this._visible = true;
Symbol 227 MovieClip Frame 1
function playSmoke() {
smoke_mc.gotoAndPlay("on");
}
stop();
Symbol 247 MovieClip Frame 1
stop();
Symbol 247 MovieClip Frame 19
stop();
Symbol 254 MovieClip Frame 1
stop();
this._visible = false;
Symbol 254 MovieClip Frame 2
this._visible = true;
play();
Symbol 254 MovieClip Frame 8
stop();
Symbol 258 MovieClip Frame 1
stop();
this._visible = false;
Symbol 258 MovieClip Frame 2
this._visible = true;
play();
Symbol 258 MovieClip Frame 8
stop();
Symbol 265 MovieClip Frame 1
stop();
Symbol 265 MovieClip Frame 31
stop();
Symbol 267 MovieClip Frame 1
function moveLadle() {
var _local4 = _xmouse;
var _local3 = _ymouse;
if (_local3 > 5) {
_local3 = 5;
}
this._x = _local4;
this._y = _local3;
side = _parent.pizza_mc.isOver(this);
}
pan_mc = this;
ladle_mc.origX = ladle_mc._x;
ladle_mc.origY = ladle_mc._y;
ladle_mc.origA = ladle_mc._rotation;
ladle_mc.origDepth = ladle_mc._de;
ladle_mc.onRollOver = function () {
this._y = this.origY - 10;
};
ladle_mc.onRollOut = function () {
this._y = this.origY;
};
ladle_mc.onPress = function () {
side = false;
twx.stop();
twy.stop();
this.onEnterFrame = moveLadle;
this.gotoAndPlay("on");
this.onMouseUp = function () {
this.onEnterFrame = undefined;
this.onMouseUp = undefined;
this.gotoAndStop("off");
twx.stop();
twy.stop();
twx = new mx.transitions.Tween(this, "_x", mx.transitions.easing.Strong.easeOut, this.origX + 10, this.origX, 1, true);
twy = new mx.transitions.Tween(this, "_y", mx.transitions.easing.Strong.easeOut, this.origY - 20, this.origY, 1, true);
if (side) {
_parent.addTopping("sauce", side);
}
};
};
Symbol 278 MovieClip Frame 1
function playSound(s) {
gotoAndStop(s);
sf = setInterval(function () {
gotoAndStop (1);
clearInterval(sf);
}, 300);
}
stop();
Symbol 279 MovieClip Frame 1
function initLevel() {
levelEnded = false;
currentLoc = "prep";
numOrders = 0;
orderUp = false;
currentOrder = 0;
allOrders = new Array();
maxmistakes = 5;
mistakes = 0;
pizzasMade = 0;
pizzasCompleted = 0;
if (!skillLevel) {
skillLevel = 1;
}
var _local2 = new Array(10, 15, 15);
pizzaGoal = _local2[skillLevel - 1];
if (skillLevel == 3) {
doOven = true;
} else {
doOven = false;
}
if (doOven) {
_parent.oventimers_mc._visible = true;
}
SMI = setInterval(function () {
clearInterval(SMI);
showMessage("Get Ready!");
}, 1500);
OI = setInterval(addOrdertoStack, 3000);
NPI = setInterval(function () {
clearInterval(NPI);
newPizza();
}, 1500);
_parent.info_mc.initPizzasLeft(pizzaGoal);
_parent.info_mc.updateWaiting();
_parent.info_mc.resetMistakes();
_parent.info_mc.showLevel(skillLevel);
_parent.info_mc.updateScore(totalscore);
toppingScore = 50;
pizzaMadeScore = 500;
pizzaCutScore = 500;
}
function createToppingBins() {
var _local3 = 0;
var _local4 = 90;
var _local1 = 0;
while (_local1 < 8) {
bins_mc.attachMovie("bin", "bin" + _local1, _local1);
var _local2 = bins_mc["bin" + _local1];
_local2.topping = toppings[_local1];
_local2._x = _local3;
_local3 = _local3 + _local4;
_local1++;
}
}
function pickupTopping(t) {
main_mc.attachMovie("toppings", "pickup_mc", 6000);
var _local2 = main_mc.pickup_mc;
_local2._yscale = (_local2._xscale = 60);
_local2.gotoAndStop(t.topping);
_local2.topping = t.topping;
_local2._x = main_mc._xmouse - (_local2._width / 2);
_local2._y = main_mc._ymouse - (_local2._height / 2);
_local2.onEnterFrame = function () {
this._x = main_mc._xmouse - (this._width / 2);
this._y = main_mc._ymouse - (this._height / 2);
pizza_mc.isOver(this);
};
}
function putdownTopping() {
if (((!pizza_mc.crust) || (!o_mc)) || (pizza_mc.isComplete)) {
pickup_mc.removeMovieClip();
return(undefined);
}
var _local1 = pizza_mc.isOver(pickup_mc);
if (_local1) {
addTopping(pickup_mc.topping, _local1);
}
pickup_mc.removeMovieClip();
}
function scoreRiser(num) {
var _local1 = main_mc.getNextHighestDepth();
main_mc.attachMovie("score_riser", "sr" + _local1, _local1);
var sr = main_mc["sr" + _local1];
sr._x = main_mc._xmouse;
sr._y = main_mc._ymouse;
sr.scoreTxt.text = num;
var _local4 = new mx.transitions.Tween(sr, "_y", mx.transitions.easing.None.easeOut, sr._y, sr._y - 150, 0.6, true);
var _local2 = new mx.transitions.Tween(sr, "_alpha", mx.transitions.easing.None.easeOut, 100, 0, 0.6, true);
_local2.onMotionFinished = function () {
sr.removeMovieClip();
};
totalscore = totalscore + num;
main_mc._parent.info_mc.updateScore(totalscore);
}
function showMessage(phrase, duration) {
var _local1 = main_mc._parent.getNextHighestDepth();
main_mc._parent.attachMovie("message", "message" + _local1, _local1);
var _local2 = main_mc._parent["message" + _local1];
_local2.msg.messageTxt.text = phrase;
_local2._x = 100;
_local2._y = 223;
}
function goModal(n) {
modal_mc.gotoAndStop("on" + n);
modal_mc.swapDepths(main_mc.getNextHighestDepth());
}
function endModal() {
modal_mc.gotoAndStop("off");
}
function loseGame(n) {
goModal(2);
LGI = setInterval(function () {
clearInterval(LGI);
sfx_mc.playSound("aww");
main_mc.attachMovie("endlevel_screen", "endlevel_mc", main_mc.getNextHighestDepth());
endlevel_mc.gotoAndStop("fired" + n);
endlevel_mc._x = 454;
endlevel_mc._y = 271;
ELTWx = new mx.transitions.Tween(endlevel_mc, "_xscale", mx.transitions.easing.Elastic.easeOut, 1, 100, 1, true);
ELTWy = new mx.transitions.Tween(endlevel_mc, "_yscale", mx.transitions.easing.Elastic.easeOut, 1, 100, 1, true);
}, 1500);
levelEnded = true;
clearInterval(OI);
if (currentLoc == "ovens") {
gotoPrep();
}
}
function endLevel() {
goModal(1);
sfx_mc.playSound("yeah");
main_mc.attachMovie("endlevel_screen", "endlevel_mc", main_mc.getNextHighestDepth());
endlevel_mc.gotoAndStop("end" + skillLevel);
endlevel_mc._x = 454;
endlevel_mc._y = 271;
ELTWx = new mx.transitions.Tween(endlevel_mc, "_xscale", mx.transitions.easing.Elastic.easeOut, 1, 100, 1, true);
ELTWy = new mx.transitions.Tween(endlevel_mc, "_yscale", mx.transitions.easing.Elastic.easeOut, 1, 100, 1, true);
levelEnded = true;
clearInterval(OI);
if (currentLoc == "ovens") {
gotoPrep();
}
}
function nextLevel() {
skillLevel++;
endModal();
clearOrders();
endlevel_mc.removeMovieClip();
initLevel();
}
function gotoOvens() {
GOTW = new mx.transitions.Tween(main_mc, "_x", mx.transitions.easing.Strong.easeOut, 0, -900, 0.5, true);
if (!pizzaReadyForOven) {
prepbtn_mc._visible = true;
} else {
prepbtn_mc.gotoAndStop("off");
}
currentLoc = "ovens";
}
function gotoPrep() {
if (ovensbtn_mc._visible == false) {
ovensbtn_mc.gotoAndPlay("on");
}
GOTW = new mx.transitions.Tween(main_mc, "_x", mx.transitions.easing.Strong.easeOut, -900, 0, 0.4, true);
if (!pizzaReadyForOven) {
prepbtn_mc._visible = true;
} else {
prepbtn_mc.gotoAndStop("off");
}
currentLoc = "prep";
}
function showResults(t) {
endlevel_mc.gotoAndStop("results");
franks = 10 * Math.ceil(totalscore / 1000);
frankcount = 0;
SRI = setInterval(function () {
frankcount++;
endlevel_mc.frankcountTxt.text = frankcount;
if (frankcount == franks) {
clearInterval(SRI);
}
}, 50);
}
totalscore = 0;
Symbol 279 MovieClip Frame 2
function newPizza() {
pizzas_mc.attachMovie("pizza", "pizza" + pizzasMade, pizzas_mc.getNextHighestDepth());
pizza_mc = pizzas_mc["pizza" + pizzasMade];
pizza_mc.gotoAndStop(1);
pizza_mc.num = pizzasMade;
var _local1 = new mx.transitions.Tween(pizza_mc, "_x", mx.transitions.easing.Strong.easeOut, -218, 441, 0.5, true);
_local1.onMotionFinished = function () {
pizza_mc.gotoAndPlay("drop_crust");
};
pizza_mc.numToppings = 0;
pizza_mc.toppingsAdded = new Array();
NPI = setInterval(showOrder, 200);
sfx_mc.playSound("slide");
}
function hidePizza(newwhencomplete) {
pizza_mc.oy = 100;
pizza_mc.ox = 1240;
var _local1 = new mx.transitions.Tween(pizza_mc, "_x", mx.transitions.easing.Strong.easeOut, pizza_mc._x, pizza_mc.ox, 1, true);
var _local2 = new mx.transitions.Tween(pizza_mc, "_y", mx.transitions.easing.Strong.easeOut, pizza_mc._y, pizza_mc.oy, 0.6, true);
_local1.onMotionFinished = function () {
if (newwhencomplete) {
if (doOven && (pizza_mc.num == (pizzasMade - 1))) {
prepareForOven(pizza_mc);
gotoOvens();
} else {
pizza_mc.removeMovieClip();
}
newPizza();
} else {
pizza_mc.removeMovieClip();
}
};
}
function cookPizza(mc) {
var _local2 = mc.toppings_mc;
var _local3 = _local2.attachMovie("pizza_topping", "t20", 30);
_local3.gotoAndStop("left");
_local3.toppings_mc.gotoAndStop("meltedcheese");
var _local1 = _local2.attachMovie("pizza_topping", "t20", 31);
_local1.gotoAndStop("right");
_local1.toppings_mc.gotoAndStop("meltedcheese");
}
function addTopping(topping, side) {
var _local7 = pizza_mc.toppings_mc;
if (pizza_mc.toppingsAdded[side + topping]) {
pizza_mc.isOver(null);
sfx_mc.playSound("wrongtopping");
return(undefined);
}
var _local8;
if (!updateOrder(topping)) {
showMessage("Oh No! You messed up!", 2);
mistakes++;
_parent.info_mc.updateMistakes(mistakes);
if (mistakes == maxmistakes) {
loseGame(1);
}
sfx_mc.playSound("wrongtopping");
pizza_mc.isOver(null);
hidePizza(true);
return(undefined);
}
scoreRiser(toppingScore);
sfx_mc.playSound("toppingdrop");
pizza_mc.numToppings++;
var _local6 = pizza_mc.numToppings;
var _local3 = _local6 + 5;
if ((topping == "cheese") && (side == "left")) {
_local3 = 3;
} else if ((topping == "cheese") && (side == "right")) {
_local3 = 4;
} else if ((topping == "sauce") && (side == "left")) {
_local3 = 1;
} else if ((topping == "sauce") && (side == "right")) {
_local3 = 2;
}
_local7.attachMovie("pizza_topping", "t" + _local6, _local3);
var _local5 = _local7["t" + _local6];
_local5._x = 0;
_local5._y = 0;
_local5.gotoAndStop(side);
_local5.toppings_mc.gotoAndStop(topping);
pizza_mc.toppingsAdded[side + topping] = 1;
pizza_mc.isOver(null);
if (isOrderComplete()) {
completePizza();
}
}
function completePizza() {
pizzasMade++;
if (skillLevel < 3) {
showMessage("Good Job!", 2);
pizzasCompleted++;
scoreRiser(pizzaMadeScore);
}
pizza_mc.isComplete = true;
_parent.info_mc.updatePizzas(pizzasCompleted);
pizza_mc.gotoAndPlay("complete");
sfx_mc.playSound("pizzadone");
var makeNewPizza = true;
if (pizzasCompleted == pizzaGoal) {
makeNewPizza = false;
ELI = setInterval(function () {
clearInterval(ELI);
endLevel();
}, 2500);
}
SOI = setInterval(function () {
clearInterval(SOI);
hideOrder();
hidePizza(makeNewPizza);
}, 500);
}
function burntPizza(mc) {
var _local2 = mc.inUse;
mistakes++;
_parent.info_mc.updateMistakes(mistakes);
if (mistakes == maxmistakes) {
loseGame(1);
}
showMessage("A Pizza Just Burned!", 2);
_local2.gotoAndPlay("burnt");
_local2.onRollOver = undefined;
_local2.onRollOut = undefined;
_local2.onPress = undefined;
mc.inUse = undefined;
mc.playSmoke();
mc.timer_mc.stopTimer();
}
function addOrdertoStack() {
numOrders++;
orderinc = 75;
orderx = 640;
clearInterval(OI);
if (allOrders.length >= 8) {
loseGame(2);
return(undefined);
}
var _local6 = generateOrder(numOrders);
orders_mc.attachMovie("order_slip", "oslip" + numOrders, numOrders);
var _local2 = orders_mc["oslip" + numOrders];
_local2.num = numOrders;
_local2.order = _local6;
allOrders.push(_local2);
_parent.info_mc.updateWaiting();
var _local3 = allOrders.length - 1;
var _local4 = orderx - (orderinc * _local3);
var _local5 = new mx.transitions.Tween(_local2, "_x", mx.transitions.easing.Strong.easeOut, -60, _local4, 1, true);
_local5.onMotionFinished = function () {
if (!o_mc) {
showOrder();
}
};
orderInterval = getOrderDelay();
OI = setInterval(addOrdertoStack, orderInterval);
}
function generateOrder() {
var _local6 = new Array();
var _local3 = new Array();
var _local8 = new Array(2, 4, 6);
var _local9 = skillLevel - 1;
_local6[0] = createOrderTopping("sauce", 2);
_local6[1] = createOrderTopping("cheese", 2);
var _local5 = false;
var _local7 = Math.floor(Math.random() * _local8[_local9]) + 1;
var _local2 = 1;
while (_local2 <= _local7) {
do {
var r = (Math.floor(Math.random() * (toppings.length - 1)) + 1);
} while (_local3[toppings[r]] == 1);
var _local1 = 2;
if ((skillLevel > 1) && (!_local5)) {
var _local4 = Math.floor(Math.random() * 6);
if (_local4) {
_local1 = 1;
}
_local5 = true;
}
_local6.push(createOrderTopping(toppings[r], _local1));
_local3[toppings[r]] = 1;
_local2++;
}
return(_local6);
}
function createOrderTopping(topping, sides) {
var _local1 = new Object();
_local1.topping = topping;
_local1.sides = sides;
_local1.sideson = 0;
return(_local1);
}
function getOrderDelay() {
var _local1 = skillLevel - 1;
var _local5 = new Array(12000, 9000, 22000);
var _local3 = new Array(7000, 5000, 10000);
var _local2 = _local5[_local1];
_local3[_local1] = _local3[_local1] - (30 * pizzasMade);
if (_local3[_local1] < 0) {
_local3[_local1] = 0;
}
var _local6 = Math.round(Math.random() * _local3[_local1]);
_local2 = _local2 + _local6;
var _local4 = pizzasMade * 40;
_local2 = _local2 - _local4;
return(_local2);
}
function showOrder() {
clearInterval(NPI);
if (o_mc) {
resetOrder();
return(undefined);
}
if (allOrders.length == 0) {
clearInterval(OI);
addOrdertoStack();
return(undefined);
}
var _local5 = allOrders.shift();
sfx_mc.playSound("orderup");
main_mc.attachMovie("fullsize_order", "o_mc", 5000);
orderUp = true;
o_mc._xscale = (o_mc._yscale = 40);
o_mc._y = _local5._y + 120;
o_mc._x = _local5._x - 50;
o_mc.order = _local5.order;
o_mc.num = _local5.num;
o_mc._rotation = _local5._rotation;
_local5.removeMovieClip();
var _local9 = new mx.transitions.Tween(o_mc, "_xscale", mx.transitions.easing.Strong.easeOut, 35, 85, 0.5, true);
var _local8 = new mx.transitions.Tween(o_mc, "_yscale", mx.transitions.easing.Strong.easeOut, 35, 85, 0.5, true);
var _local10 = new mx.transitions.Tween(o_mc, "_rotation", mx.transitions.easing.Strong.easeOut, o_mc._rotation, 0, 0.5, true);
var _local7 = new mx.transitions.Tween(o_mc, "_x", mx.transitions.easing.Strong.easeOut, o_mc._x, 635, 0.5, true);
var _local6 = new mx.transitions.Tween(o_mc, "_y", mx.transitions.easing.Strong.easeOut, o_mc._y, 160, 0.5, true);
var _local1 = 0;
while (_local1 < allOrders.length) {
var _local2 = allOrders[_local1];
var _local3 = orderx - (orderinc * _local1);
var _local4 = new mx.transitions.Tween(_local2, "_x", mx.transitions.easing.Strong.easeOut, _local2._x, _local3, 0.5, true);
_local1++;
}
}
function resetOrder() {
var _local1 = 0;
while (_local1 < o_mc.order.length) {
o_mc.order[_local1].sideson = 0;
o_mc["line" + (_local1 + 1)].crossedout_mc._visible = false;
_local1++;
}
}
function hideOrder() {
orderUp = false;
_parent.info_mc.updateWaiting();
var _local2 = new mx.transitions.Tween(o_mc, "_x", mx.transitions.easing.Strong.easeIn, o_mc._x, 900, 0.5, true);
_local2.onMotionFinished = function () {
o_mc.removeMovieClip();
};
}
function updateOrder(topping) {
var _local3 = o_mc.order;
var _local1 = 0;
while (_local1 < _local3.length) {
var _local2 = _local3[_local1];
if ((_local2.topping == topping) && (_local2.sideson < _local2.sides)) {
o_mc.order[_local1].sideson++;
if (o_mc.order[_local1].sideson == o_mc.order[_local1].sides) {
o_mc["line" + (_local1 + 1)].crossedout_mc._visible = true;
sfx_mc.playSound("pencil");
}
return(true);
}
_local1++;
}
return(false);
}
function isOrderComplete() {
var _local2 = o_mc.order;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].sideson < _local2[_local1].sides) {
return(false);
}
_local1++;
}
return(true);
}
function clearOrders() {
o_mc.removeMovieClip();
if (allOrders.length) {
var _local1 = 0;
while (_local1 < allOrders.length) {
allOrders[_local1].removeMovieClip();
_local1++;
}
}
}
main_mc = this;
score = 0;
toppings = new Array("cheese", "pepperoni", "onion", "bacon", "pepper", "chicken", "mushroom", "ham");
createToppingBins();
initLevel();
Symbol 279 MovieClip Frame 3
function prepareForRemoval(mc) {
mc.onRollOver = function () {
mc.gotoAndStop("inovenon");
};
mc.onRollOut = function () {
mc.gotoAndStop("inovenoff");
};
mc.onPress = function () {
if (cutteronTable || (pizzaReadyForOven)) {
return(undefined);
}
prepbtn_mc.gotoAndStop("off");
this.pizzaIn.timer_mc.stopTimer();
this.pizzaIn.inUse = undefined;
this.gotoAndStop("cut");
cookPizza(this);
var _local5 = new mx.transitions.Tween(mc, "_xscale", mx.transitions.easing.Strong.easeOut, mc._xscale, 100, 0.6, true);
var _local4 = new mx.transitions.Tween(mc, "_yscale", mx.transitions.easing.Strong.easeOut, mc._yscale, 100, 0.6, true);
var _local3 = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeOut, mc._x, 1340, 0.6, true);
var _local2 = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, mc._y, 50, 0.6, true);
cutteronTable = true;
mc.onRollOver = undefined;
mc.onRollOut = undefined;
mc.onPress = undefined;
};
}
function prepareForOven(mc) {
pizzaReadyForOven = true;
mc.gotoAndStop("preoven");
pizzas_mc.shadow.removeMovieClip();
pizzas_mc.attachMovie("pizzashadow", "shadow", pizzas_mc.getNextHighestDepth());
var shadow = pizzas_mc.shadow;
mc.swapDepths(shadow);
shadow._x = mc.ox + 3;
shadow._y = mc.oy + 3;
mc.onRollOver = function () {
ROY = new mx.transitions.Tween(this, "_y", mx.transitions.easing.Strong.easeOut, this.oy, this.oy - 20, 0.25, true);
};
mc.onRollOut = function () {
ROY = new mx.transitions.Tween(mc, "_y", mx.transitions.easing.Strong.easeOut, mc._y, mc.oy, 0.25, true);
};
mc.onPress = function () {
this.onMouseMove = function () {
var _local3 = checkHitWithOvens(this);
this.pizzaIn = _local3;
this._x = pizzas_mc._xmouse;
this._y = pizzas_mc._ymouse;
if (!_local3) {
if (this._y < -150) {
this._y = -150;
}
} else if (this._y < -160) {
this._y = -160;
}
var _local2 = 100 - (((this.oy - this._y) / 250) * 70);
this._xscale = (this._yscale = _local2);
shadow._x = this._x;
shadow._y = this._y + (200 - (2 * _local2));
shadow._yscale = (shadow._xscale = this._yscale);
shadow._alpha = _local2;
updateAfterEvent();
};
mc.onMouseUp = function () {
this.onMouseMove = undefined;
this.onMouseUp = undefined;
checkHitWithOvens(mc);
pizzaReadyForOven = false;
if (this.pizzaIn) {
this.pizzaIn.inUse = this;
this.gotoAndStop("inOven");
ovenmask.removeMovieClip();
this._yscale = this._xscale - 14;
this._y = -148;
this._x = this.pizzaIn._x + 100;
this.pizzaIn.timer_mc.startTimer(oventimer_seconds);
if (emptyOven()) {
prepbtn_mc.gotoAndPlay("on");
}
shadow.removeMovieClip();
} else {
this._x = this.ox;
this._y = this.oy;
this._xscale = (this._yscale = 100);
shadow._x = mc.ox + 3;
shadow._y = mc.oy + 3;
shadow._xscale = (shadow._yscale = (shadow._alpha = 100));
}
};
};
}
function emptyOven() {
var _local1 = 0;
while (_local1 < 3) {
var _local2 = main_mc[("oven" + _local1) + "_mc"];
if (!_local2.inUse) {
return(_local2);
}
_local1++;
}
return(false);
}
function checkHitWithOvens(mc) {
var _local4 = false;
ovenmask.removeMovieClip();
var _local2 = 0;
while (_local2 < 3) {
var _local1 = main_mc[("oven" + _local2) + "_mc"];
var _local3 = _local1._x + (_local1._width / 2);
if (mc.hit_mc.hitTest(_local1.hit_mc) && (!_local1.inUse)) {
_local4 = _local1;
}
_local2++;
}
return(_local4);
}
function cuttingComplete(mc) {
CPTW = new mx.transitions.Tween(mc, "_x", mx.transitions.easing.Strong.easeIn, mc._x, mc._x + 800, 1, true);
cutteronTable = false;
prepbtn_mc.gotoAndPlay("on");
showMessage("Good Job!", 2);
scoreRiser(pizzaCutScore);
sfx_mc.playSound("bell");
pizzasCompleted++;
_parent.info_mc.updatePizzas(pizzasCompleted);
if (pizzasCompleted == pizzaGoal) {
ELI = setInterval(function () {
endLevel();
clearInterval(ELI);
}, 1000);
}
CPTW.onMotionFinished = function () {
mc.removeMovieClip();
};
}
stop();
oventimer_seconds = 15;
var j = 0;
while (j <= 3) {
main_mc[("oven" + j) + "_mc"].inUse = false;
main_mc[("oven" + j) + "_mc"].num = j;
j++;
}
prepbtn_mc.back_btn.onRelease = function () {
gotoPrep();
};
ovensbtn_mc.back_btn.onRelease = function () {
gotoOvens();
};
Symbol 284 MovieClip Frame 1
stop();
Symbol 289 MovieClip Frame 1
function updateWaiting() {
var _local2 = _parent.main_mc.allOrders.length;
if (_parent.main_mc.orderUp) {
_local2++;
}
waitingTxt.text = _local2;
}
function updatePizzas(n) {
var _local2 = _parent.main_mc.pizzaGoal - (n - 1);
pizzasleft_mc["p" + _local2].play();
}
function updateMistakes(n) {
mistakes_mc["m" + n].gotoAndPlay("on");
}
function resetMistakes() {
var _local1 = 1;
while (_local1 <= 5) {
mistakes_mc["m" + _local1].gotoAndStop(1);
_local1++;
}
}
function showLevel(n) {
level_mc.gotoAndStop(n);
}
function initPizzasLeft(num) {
var _local4 = this.createEmptyMovieClip("pizzasleft_mc", 1);
_local4._x = 120;
_local4._y = 25;
var _local2 = 1;
while (_local2 <= num) {
var _local3 = _local4.attachMovie("pizza_ind", "p" + _local2, _local2);
_local3._x = _local2 * 10;
_local2++;
}
}
function updateScore(n) {
scoreTxt.text = n;
}
Symbol 290 MovieClip Frame 1
this._visible = false;
stop();
Symbol 290 MovieClip Frame 2
this._visible = false;
Symbol 297 MovieClip Frame 1
music_sound = new Sound(_parent.music_mc);
music_sound.setVolume(100);
mute_btn.onRelease = function () {
gotoAndStop (2);
};
stop();
Symbol 297 MovieClip Frame 2
music_sound = new Sound(_parent.music_mc);
music_sound.setVolume(0);
mute_btn.onRelease = function () {
gotoAndStop (1);
};