Frame 1
local = new LocalConnection();
domain = local.domain();
var fs = domain.indexOf("funschool.kaboose");
var fsdev = domain.indexOf("fundev.kaboose");
var zk = domain.indexOf("zeeks");
var dev = domain.indexOf("localhost");
function clearScreen() {
removeMovieClip("Interface");
removeMovieClip("Map");
}
function levelUp() {
level++;
if (rosesNeeded < 12) {
rosesNeeded++;
Interface.RosesNeededMeter.gotoAndStop(rosesNeeded + 1);
}
if (rosesMax > rosesMin) {
rosesMax--;
} else {
rosesMax = rosesMin;
}
if (pedestriansActive.length < pedestriansMax) {
spawnPedestrian();
}
}
function setupMap() {
_root.attachMovie("map", "Map", 1);
var _local3 = 1;
while (_local3 <= mapHeight) {
var _local5 = _root["mapRow" + _local3];
var _local2 = 1;
while (_local2 <= mapWidth) {
var _local4 = whatNumber(_local2, _local3);
if (_local5[_local2 - 1] == 0) {
freeTiles.push(_local4);
}
_local2++;
}
_local3++;
}
}
function selectAddress() {
lastHouse = destinationHouse;
do {
match = false;
destinationHouse = randInt(1, numOfHouses);
if (destinationHouse == lastHouse) {
match = true;
}
} while (match == true);
var _local2 = Math.ceil(destinationHouse / 10);
Interface.DestinationIcon.HouseIcon.gotoAndStop(_local2);
var _local1 = destinationHouse % 10;
if (_local1 == 0) {
_local1 = 10;
}
Interface.DestinationIcon.houseNumber = _local1;
}
function spawnRose(theID) {
do {
match = false;
var _local4 = randInt(0, freeTiles.length);
var _local1 = freeTiles[_local4];
var _local2 = whatRow(_local1);
var _local3 = whatColumn(_local1);
var _local5 = Math.abs(Map.Player.currentRow - _local2);
var _local6 = Math.abs(Map.Player.currentColumn - _local3);
if ((_local6 <= 6) && (_local5 <= 4)) {
match = true;
}
} while (match == true);
freeTiles.splice(_local4, 1);
Map.attachMovie("rose", "Rose" + theID, theID);
theRose = Map["Rose" + theID];
theRose.myID = theID;
rosesActive.push(theRose);
theRose._x = (_local3 * tileWidth) - 25;
theRose._y = (_local2 * tileHeight) - 25;
theRose.currentTile = _local1;
theRose.currentRow = _local2;
theRose.currentColumn = _local3;
}
function spawnPedestrian() {
do {
match = false;
var _local6 = randInt(0, freeTiles.length);
var _local10 = freeTiles[_local6];
var _local4 = whatRow(_local10);
var _local5 = whatColumn(_local10);
var _local7 = Math.abs(Map.Player.currentRow - _local4);
var _local8 = Math.abs(Map.Player.currentColumn - _local5);
if ((_local8 <= 6) && (_local7 <= 4)) {
match = true;
}
} while (match == true);
_local10 = whatNumber(_local5, _local4);
var _local9 = randInt(1, pedestrianTypes);
Map.attachMovie("pedestrian" + _local9, "Pedestrian" + pedestrianIndex, ((_local4 * 100) + pedestrianDepth) + pedestrianIndex);
thePedestrian = Map["Pedestrian" + pedestrianIndex];
pedestriansActive.push(thePedestrian);
thePedestrian._x = (_local5 * tileWidth) - 25;
thePedestrian._y = (_local4 * tileHeight) - 25;
thePedestrian.myIndex = pedestrianIndex;
thePedestrian.currentTile = _local10;
thePedestrian.currentRow = _local4;
thePedestrian.currentColumn = _local5;
thePedestrian.currentDir = "Down";
thePedestrian.speed = pedestrianSpeed;
thePedestrian.onEnterFrame = function () {
if (gameInPlay) {
this.Anim.Clip.play();
this.lastDir = this.currentDir;
this.lastTile = this.currentTile;
this.currentRow = Math.ceil(this._y / tileHeight);
this.currentColumn = Math.ceil(this._x / tileWidth);
this.currentTile = whatNumber(this.currentColumn, this.currentRow);
if (this.currentTile != this.lastTile) {
var _local3 = 0;
while (_local3 < junctionTiles.length) {
if (junctionTiles[_local3] == this.currentRow) {
var _local2 = 0;
while (_local2 < junctionTiles.length) {
if (junctionTiles[_local2] == this.currentColumn) {
if (randInt(1, 2) == 2) {
this.currentDir = choosePedestrianDir(this);
}
break;
}
_local2++;
}
}
_local3++;
}
}
moveClip(this);
} else {
this.Anim.Clip.stop();
}
};
if (pedestrianIndex < pedestrianIndexMax) {
pedestrianIndex++;
} else {
pedestrianIndex = 1;
}
}
function pickupRose(theRose) {
rosesHeld++;
if (rosesHeld < rosesNeeded) {
SFX.gotoAndPlay("PickupRose");
} else {
SFX.gotoAndPlay("FinishBouquet");
}
Interface.RosesHeldMeter.nextFrame();
score = score + roseValue;
freeTiles.push(theRose.currentTile);
var _local2 = theRose.myID;
removeMovieClip(theRose);
removeRose(theRose);
if (rosesActive.length < rosesMax) {
spawnRose(_local2);
}
}
function finishDelivery() {
rosesDelivered = rosesDelivered + rosesNeeded;
deliveriesMade++;
if ((deliveriesMade % levelUpEvery) == 0) {
levelUp();
}
selectAddress();
gameInPlay = true;
}
function removeBouquet() {
score = score + (bouquetValue + (rosesNeeded * 1));
rosesHeld = 0;
Interface.RosesHeldMeter.gotoAndStop(1);
addTime(bouquetTime);
}
function removeRose(theRose) {
var _local1 = 0;
while (_local1 < rosesActive.length) {
if (rosesActive[_local1] == theRose) {
rosesActive.splice(_local1, 1);
}
_local1++;
}
}
function choosePedestrianDir(theClip) {
var _local1 = randInt(1, 4);
if (_local1 == 1) {
dir = "Up";
} else if (_local1 == 2) {
dir = "Down";
} else if (_local1 == 3) {
dir = "Left";
} else {
dir = "Right";
}
return(dir);
}
function moveClip(theClip) {
theClip.obstacleHit = false;
if (theClip.currentDir == "Up") {
var _local4 = theClip._x;
var _local3 = theClip._y - theClip.speed;
var _local17 = _local4;
var _local15 = _local3 - tileHalf;
var _local13 = _local4 - tileEdge;
var _local12 = _local3 - tileEdge;
var _local20 = _local4 + tileEdge;
var _local18 = _local3 - tileEdge;
} else if (theClip.currentDir == "Down") {
var _local4 = theClip._x;
var _local3 = theClip._y + theClip.speed;
var _local17 = _local4;
var _local15 = _local3 + tileHalf;
var _local13 = _local4 - tileEdge;
var _local12 = _local3 + tileEdge;
var _local20 = _local4 + tileEdge;
var _local18 = _local3 + tileEdge;
} else if (theClip.currentDir == "Left") {
var _local4 = theClip._x - theClip.speed;
var _local3 = theClip._y;
var _local17 = _local4 - tileHalf;
var _local15 = _local3;
var _local7 = _local4 - tileEdge;
var _local29 = _local3 - tileEdge;
var _local30 = _local4 - tileEdge;
var _local27 = _local3 + tileEdge;
} else if (theClip.currentDir == "Right") {
var _local4 = theClip._x + theClip.speed;
var _local3 = theClip._y;
var _local17 = _local4 + tileHalf;
var _local15 = _local3;
var _local7 = _local4 + tileEdge;
var _local29 = _local3 - tileEdge;
var _local30 = _local4 + tileEdge;
var _local27 = _local3 + tileEdge;
}
var _local19 = theClip.Anim.Clip._currentframe;
theClip.Anim.gotoAndStop(theClip.currentDir);
theClip.Anim.Clip.gotoAndPlay(_local19);
var _local6 = Math.ceil(_local15 / tileHeight);
var _local5 = Math.ceil(_local17 / tileWidth);
var _local9 = _root["mapRow" + _local6];
if ((theClip.currentDir == "Up") || (theClip.currentDir == "Down")) {
var _local21 = Math.ceil(_local12 / tileHeight);
var _local25 = Math.ceil(_local13 / tileWidth);
var _local28 = _root["mapRow" + _local21];
var _local24 = Math.ceil(_local18 / tileHeight);
var _local16 = Math.ceil(_local20 / tileWidth);
var _local8 = _root["mapRow" + _local24];
} else if ((theClip.currentDir == "Left") || (theClip.currentDir == "Right")) {
var _local11 = Math.ceil(_local29 / tileHeight);
var _local14 = Math.ceil(_local7 / tileWidth);
var _local26 = _root["mapRow" + _local11];
var _local22 = Math.ceil(_local27 / tileHeight);
var _local23 = Math.ceil(_local30 / tileWidth);
var _local10 = _root["mapRow" + _local22];
}
if ((_local6 > 0) && (_local6 <= mapHeight)) {
if ((_local5 > 0) && (_local5 <= mapWidth)) {
if (_local9[_local5 - 1] == 0) {
if ((theClip.currentDir == "Up") || (theClip.currentDir == "Down")) {
if ((_local28[_local25 - 1] != 0) || (_local8[_local16 - 1] != 0)) {
var _local4 = ((theClip.currentColumn - 1) * tileWidth) + tileHalf;
}
} else if ((theClip.currentDir == "Left") || (theClip.currentDir == "Right")) {
if ((_local26[_local14 - 1] != 0) || (_local10[_local23 - 1] != 0)) {
var _local3 = ((theClip.currentRow - 1) * tileHeight) + tileHalf;
}
}
} else if ((theClip.currentDir == "Up") || (theClip.currentDir == "Down")) {
theClip.obstacleHit = true;
var _local3 = ((theClip.currentRow - 1) * tileHeight) + tileHalf;
} else if ((theClip.currentDir == "Left") || (theClip.currentDir == "Right")) {
theClip.obstacleHit = true;
var _local4 = ((theClip.currentColumn - 1) * tileWidth) + tileHalf;
}
} else {
theClip.obstacleHit = true;
var _local4 = ((theClip.currentColumn - 1) * tileWidth) + tileHalf;
}
} else {
theClip.obstacleHit = true;
var _local3 = ((theClip.currentRow - 1) * tileHeight) + tileHalf;
}
if (theClip != Map.Player) {
if (theClip.Collider.hitTest(Map.Player.Collider)) {
if (Map.Player._currentframe == 1) {
if (rosesHeld > 0) {
rosesHeld--;
score = score - roseValue;
Interface.RosesHeldMeter.prevFrame();
Map.Player.gotoAndPlay("Hit");
SFX.gotoAndPlay("Bump");
Map.attachMovie("whack", "Whack", 9000);
Map.Whack._x = Map.Player._x;
Map.Whack._y = Map.Player._y;
if (Map.Player.currentDir == "Left") {
Map.Whack._xscale = -100;
} else if (Map.Player.currentDir == "Right") {
Map.Whack._xscale = 100;
} else if (randInt(1, 2) == 2) {
Map.Whack._xscale = -100;
}
}
}
}
}
if (theClip != Map.Player) {
if (theClip.obstacleHit) {
if (theClip.currentDir == "Up") {
if (randInt(1, 2) == 1) {
theClip.currentDir = "Left";
} else {
theClip.currentDir = "Right";
}
} else if (theClip.currentDir == "Down") {
if (randInt(1, 2) == 1) {
theClip.currentDir = "Left";
} else {
theClip.currentDir = "Right";
}
} else if (theClip.currentDir == "Left") {
if (randInt(1, 2) == 1) {
theClip.currentDir = "Up";
} else {
theClip.currentDir = "Down";
}
} else if (theClip.currentDir == "Right") {
if (randInt(1, 2) == 1) {
theClip.currentDir = "Up";
} else {
theClip.currentDir = "Down";
}
}
}
}
theClip._x = _local4;
theClip._y = _local3;
}
function centerMap(theSpeed) {
if (theSpeed == undefined) {
theSpeed = 1;
}
var _local2 = new Object({x:Map.Player._x, y:Map.Player._y});
Map.Player._parent.localToGlobal(_local2);
var _local4 = _local2.x;
var _local3 = _local2.y;
Map._x = Map._x + ((centerX - _local4) / theSpeed);
Map._y = Map._y + ((centerY - _local3) / theSpeed);
Fence._x = Fence._x + ((centerX - _local4) / theSpeed);
Fence._y = Fence._y + ((centerY - _local3) / theSpeed);
}
function addTime(secsAdded) {
minutesLeft = minutesLeft + Math.floor(secsAdded / 60);
secondsLeft = secondsLeft + (secsAdded % 60);
minutesLeft = minutesLeft + Math.floor(secondsLeft / 60);
secondsLeft = secondsLeft % 60;
}
function decrementTimer() {
if (gameInPlay) {
if (secondsLeft == 0) {
if (minutesLeft == 0) {
clearInterval(timerCode);
gotoAndPlay ("GameOver");
} else {
secondsLeft = 59;
minutesLeft--;
}
} else {
secondsLeft--;
}
}
}
function setTimerDigits(theMins, theSecs, theClip) {
minutesText = String(theMins);
secondsText = String(theSecs);
if (minutesText.length < 2) {
theClip.mins1 = "";
theClip.mins2 = minutesText;
} else {
theClip.mins1 = minutesText.substr(0, 1);
theClip.mins2 = minutesText.substr(1, 1);
}
if (secondsText.length < 2) {
theClip.secs1 = "0";
theClip.secs2 = secondsText;
} else {
theClip.secs1 = secondsText.substr(0, 1);
theClip.secs2 = secondsText.substr(1, 1);
}
if ((theMins <= freakOutMins) && (theSecs <= freakOutSecs)) {
SFX.gotoAndPlay("StartTimerFreakOut");
theClip.gotoAndStop("FreakOut");
} else {
SFX.gotoAndPlay("StopTimerFreakOut");
theClip.gotoAndStop("Normal");
}
}
function whatNumber(theColumn, theRow) {
var _local1 = ((theRow - 1) * mapWidth) + theColumn;
return(_local1);
}
function whatRow(theTile) {
var _local1 = Math.ceil(theTile / mapWidth);
return(_local1);
}
function whatColumn(theTile) {
var _local1 = theTile % mapWidth;
if (_local1 == 0) {
_local1 = mapWidth;
}
return(_local1);
}
function randInt(num0, num1) {
if (arguments.length == 1) {
return(Math.round(Math.random() * num0));
}
return(Math.round(Math.random() * Math.abs(num0 - num1)) + num0);
}
function shuffle(theArray) {
i = 0;
while (i < (theArray.length - 1)) {
var _local2 = Math.round(Math.random() * i);
var _local3 = theArray[i];
theArray[i] = theArray[_local2];
theArray[_local2] = _local3;
i++;
}
return(theArray);
}
fscommand ("allowscale", false);
Music.gotoAndPlay("StartTitle");
if ((fs >= 0) || (fsdev >= 0)) {
highBTN._visible = false;
} else {
highBTN._visible = true;
}
stop();
var trackerVars_get = new LoadVars();
var trackerVars_send = new LoadVars();
trackerVars_send.gameID = _root.gameID;
trackerVars_get.onLoad = function (success) {
if (success) {
}
};
addGamePlay = function () {
trackerVars_send.sendAndLoad(_root.trackerURL, trackerVars_get, "POST");
};
_global.home = this;
gk1 = "extremeFlorist";
loadVariables (userInfoURL, this.getNextHighestDepth());
gotKey = true;
_global.loadScores = function (score, obj) {
delete home.scoreList;
home.scoreList = new LoadVars();
home.scoreList.onLoad = function (success) {
if (success) {
for (var _local1 in home.scoreList) {
}
setScores(1, obj);
} else {
setScores(0, obj);
}
};
if (score != undefined) {
home.scoreList.load(score);
} else {
var _local2 = (home.highScoresURL + "?gk=") + home.gk1;
home.scoreList.load(_local2);
}
};
_global.getScores = function (score, obj) {
if ((score != undefined) || (score != null)) {
var _local1 = score;
var _local3 = (((((((((home.highScoresURL + "?gk=") + home.gk1) + "&uk=") + home.userKey) + "&s=") + _local1) + "&es=") + encrypt(_local1)) + "&sd=") + home.seed;
loadScores(_local3, obj);
} else {
loadScores(null, obj);
}
};
_global.setScores = function (type, obj) {
if (type) {
if (home.scoreList.rank != undefined) {
home.returnedInfo = "Good Job, you've made the list. Your RANK is " + home.scoreList.rank;
} else {
home.returnedInfo = "You're score did not make the list";
}
var _local1 = 1;
while (_local1 <= 10) {
obj["total_" + _local1] = (home.scoreList[("hs_" + _local1) + "_score"] + " pts - ") + home.scoreList[("hs_" + _local1) + "_username"];
_local1++;
}
}
};
_global.encrypt = function (encScore) {
encScore = encScore.toString();
my_date = new Date();
my_date.hours = my_date.getUTCHours();
my_date.minutes = my_date.getUTCMinutes();
my_date.seconds = my_date.getUTCSeconds();
if (my_date.seconds < 10) {
my_date.seconds = "0" + my_date.seconds;
}
if (my_date.minutes < 10) {
my_date.minutes = "0" + my_date.minutes;
}
if (my_date.hours < 10) {
my_date.hours = "0" + my_date.hours;
}
home.seed = ((((my_date.hours + ":") + my_date.minutes) + ":") + my_date.seconds) + ":28";
charList = new Array(2, 8, 10, 5, 4, 1, 11, 7);
keyChars = new Array();
i = 0;
while (i < 8) {
var _local1 = charList[i];
keyChars.push(seed.charAt(_local1 - 1));
i++;
}
snafuText = "";
i = 0;
while (i < encScore.length) {
tempHolder = keyChars.shift();
keyChars.push(tempHolder);
tempName = "ascii" + i;
tempName = encScore.charCodeAt(i) + Math.round(tempHolder);
snafuText = snafuText + String.fromCharCode(tempName);
i++;
}
return(snafuText);
};
Frame 10
stop();
Frame 20
recapText = ((("You made " + deliveriesMade) + " deliveries, and delivered a total of ") + rosesDelivered) + " roses!";
recapScore = score;
Frame 30
SFX.gotoAndPlay("StopTimerFreakOut");
Music.gotoAndPlay("StartTitle");
if (score == null) {
}
stop();
Frame 40
var level = 1;
var score = 0;
var gameInPlay = false;
var destinationHouse = 0;
var lastHouse = 0;
var roseValue = 5;
var bouquetValue = 50;
var bouquetTime = 10;
var deliveriesMade = 0;
var rosesDelivered = 0;
var levelUpEvery = 2;
var playerStartRow = 13;
var playerStartColumn = 21;
var playerSpeed = 8;
var playerDepth = 8000;
var playerBusy = false;
var pedestriansActive = [];
var pedestriansAtStart = 3;
var pedestriansMax = 50;
var pedestrianIndex = 1;
var pedestrianIndexMax = 50;
var pedestrianSpeed = 3;
var pedestrianDepth = 1000;
var pedestrianTypes = 4;
var rosesActive = [];
var rosesMin = 20;
var rosesMax = 50;
var rosesNeeded = 1;
var rosesHeld = 0;
var leftEdge = 0;
var rightEdge = 1250;
var topEdge = 0;
var bottomEdge = 1250;
var centerX = 275;
var centerY = 175;
var minutesLeft = 2;
var secondsLeft = 0;
var freakOutMins = 0;
var freakOutSecs = 20;
var timerUnit = 1000;
var tileWidth = 50;
var tileHeight = 50;
var tileHalf = 25;
var tileEdge = 24;
var mapWidth = 41;
var mapHeight = 25;
var numOfTiles = (mapWidth * mapHeight);
var numO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 1, 1, 1, 1, 1, 1, 1, 0];
var mapRow24 = [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0];
var mapRow25 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
attachMovie("interface", "Interface", 10000);
Interface.RosesNeededMeter.gotoAndStop(rosesNeeded + 1);
Interface.RosesHeldMeter.gotoAndStop(1);
gotoAndPlay ("Play");
Frame 50
setupMap();
i = 1;
while (i <= numOfHouses) {
theHouse = Map["House" + i];
var houseNumber = (i % 10);
if (houseNumber == 0) {
houseNumber = 10;
}
theHouse.myID = houseNumber;
theHouse.gotoAndStop(Math.ceil(i / 10));
i++;
}
Map.attachMovie("player", "Player", playerDepth);
Map.Player._x = ((playerStartColumn - 1) * tileWidth) + tileHalf;
Map.Player._y = ((playerStartRow - 1) * tileHeight) + tileHalf;
Map.Player.currentRow = playerStartRow;
Map.Player.currentColumn = playerStartColumn;
Map.Player.speed = playerSpeed;
Map.Player.Anim.gotoAndStop("Down");
Map.Player.Anim.Clip.gotoAndStop(1);
var i = 1;
while (i <= pedestriansAtStart) {
spawnPedestrian();
i++;
}
var i = 1;
while (i <= rosesMax) {
spawnRose(i);
i++;
}
centerMap();
setTimerDigits(minutesLeft, secondsLeft, Interface.GameTimer);
selectAddress();
Interface.gotoAndPlay("GetReady");
Interface.DestinationIcon.gotoAndStop(1);
stop();
Interface.onEnterFrame = function () {
if (gameInPlay) {
setTimerDigits(minutesLeft, secondsLeft, Interface.GameTimer);
if ((rosesHeld == rosesNeeded) && (gameInPlay)) {
this.DestinationIcon.play();
} else {
this.DestinationIcon.gotoAndStop(1);
}
}
};
Map.Player.onEnterFrame = function () {
if (gameInPlay) {
this.lastX = this._x;
this.lastY = this._y;
this.lastDir = this.currentDir;
this.currentRow = Math.ceil(this._y / tileHeight);
this.currentColumn = Math.ceil(this._x / tileWidth);
this.currentTile = whatNumber(this.currentColumn, this.currentRow);
if (Key.isDown(38)) {
this.currentDir = "Up";
this.Anim.Clip.play();
moveClip(this);
} else if (Key.isDown(40)) {
this.currentDir = "Down";
this.Anim.Clip.play();
moveClip(this);
} else if (Key.isDown(37)) {
this.currentDir = "Left";
this.Anim.Clip.play();
moveClip(this);
} else if (Key.isDown(39)) {
this.currentDir = "Right";
this.Anim.Clip.play();
moveClip(this);
} else {
this.Anim.Clip.gotoAndStop(1);
this.Anim.gotoAndStop("Down");
}
if (rosesHeld < rosesNeeded) {
var _local2 = 0;
while (_local2 <= (rosesActive.length - 1)) {
theRose = rosesActive[_local2];
if (this.Collider.hitTest(theRose)) {
pickupRose(theRose);
break;
}
_local2++;
}
} else {
var _local2 = 0;
while (_local2 <= numOfHouses) {
theHouse = Map["House" + _local2];
if (_local2 == destinationHouse) {
if (this.Collider.hitTest(theHouse.Collider)) {
gameInPlay = false;
this.gotoAndStop(1);
this.Anim.gotoAndStop("Up");
this.Anim.Clip.gotoAndStop(1);
theHouse.Door.gotoAndPlay("Deliver");
break;
}
}
_local2++;
}
}
}
centerMap(4);
};
Frame 60
gameInPlay = false;
stopAllSounds();
clearInterval(timerCode);
SFX.gotoAndPlay("GameOver");
Map.Player.gotoAndStop("GameOver");
Interface.gotoAndPlay("GameOver");
stop();
Symbol 19 MovieClip Frame 1
if (!_root.gameInPlay) {
stop();
}
Symbol 20 MovieClip Frame 1
stop();
Symbol 20 MovieClip Frame 10
stop();
Symbol 23 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 6
stop();
Symbol 27 MovieClip Frame 1
stop();
Symbol 34 MovieClip Frame 1
stop();
Symbol 49 MovieClip [interface] Frame 1
stop();
Symbol 49 MovieClip [interface] Frame 75
stopAllSounds();
_root.SFX.gotoAndPlay("Go");
_root.Music.gotoAndPlay("StartInGame");
_root.timerCode = setInterval(_root.decrementTimer, _root.timerUnit);
_root.gameInPlay = true;
Symbol 49 MovieClip [interface] Frame 110
gotoAndStop (1);
Symbol 49 MovieClip [interface] Frame 250
_root.gotoAndStop("Recap");
_root.clearScreen();
Symbol 74 MovieClip Frame 1
stop();
Symbol 74 MovieClip Frame 8
stop();
Symbol 79 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 8
stop();
Symbol 86 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 8
stop();
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 8
stop();
Symbol 93 MovieClip Frame 1
stop();
Symbol 97 MovieClip Frame 4
_root.SFX.gotoAndPlay("Deliver");
Symbol 97 MovieClip Frame 8
stop();
Symbol 98 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 5
stopAllSounds();
_root.SFX.gotoAndPlay("DoorKnock");
_root.Music.gotoAndPlay("StartWaiting");
Symbol 98 MovieClip Frame 50
DoorPerson.gotoAndStop(_root.randInt(1, _root.pedestrianTypes));
_root.SFX.gotoAndPlay("DoorOpen");
Symbol 98 MovieClip Frame 85
DoorPerson.Anim.play();
_root.removeBouquet();
Symbol 98 MovieClip Frame 145
stopAllSounds();
_root.SFX.gotoAndPlay("DoorClose");
_root.Music.gotoAndPlay("StartInGame");
_root.finishDelivery();
Symbol 104 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 111 MovieClip [pedestrian] Frame 1
stop();
Symbol 117 MovieClip Frame 1
stop();
Symbol 118 MovieClip [pedestrian4] Frame 1
stop();
Symbol 123 MovieClip Frame 1
stop();
Symbol 124 MovieClip [pedestrian2] Frame 1
stop();
Symbol 133 MovieClip Frame 1
stop();
Symbol 134 MovieClip [pedestrian3] Frame 1
stop();
Symbol 140 MovieClip Frame 1
stop();
Symbol 141 MovieClip [pedestrian1] Frame 1
stop();
Symbol 151 MovieClip Frame 1
stop();
Symbol 153 MovieClip [player] Frame 1
stop();
Symbol 153 MovieClip [player] Frame 10
stop();
Symbol 153 MovieClip [player] Frame 20
play();
Symbol 153 MovieClip [player] Frame 61
gotoAndStop (1);
Symbol 155 MovieClip [whack] Frame 15
removeMovieClip(this);
Symbol 188 Button
on (rollOver) {
SFX.gotoAndPlay("RollOver");
}
on (press) {
SFX.gotoAndPlay("Click");
}
on (release) {
_root.addGamePlay();
gotoAndPlay ("Start");
}
Symbol 192 Button
on (rollOver) {
SFX.gotoAndPlay("RollOver");
}
on (press) {
SFX.gotoAndPlay("Click");
}
on (release) {
score = null;
gotoAndPlay ("HiScores");
}
Symbol 195 Button
on (rollOver) {
SFX.gotoAndPlay("RollOver");
}
on (press) {
SFX.gotoAndPlay("Click");
}
on (release) {
gotoAndPlay ("HowTo");
}
Symbol 216 MovieClip Frame 1
stop();
Symbol 216 MovieClip Frame 6
gotoAndStop (1);
Symbol 216 MovieClip Frame 16
gotoAndStop (1);
Symbol 216 MovieClip Frame 26
gotoAndStop (1);
Symbol 216 MovieClip Frame 36
gotoAndStop (1);
Symbol 216 MovieClip Frame 46
gotoAndStop (1);
Symbol 216 MovieClip Frame 56
gotoAndStop (1);
Symbol 216 MovieClip Frame 66
gotoAndStop (1);
Symbol 216 MovieClip Frame 76
gotoAndStop (1);
Symbol 216 MovieClip Frame 86
gotoAndStop (1);
Symbol 216 MovieClip Frame 96
gotoAndStop (1);
Symbol 216 MovieClip Frame 106
gotoAndStop (1);
Symbol 216 MovieClip Frame 116
gotoAndStop (1);
Symbol 216 MovieClip Frame 131
gotoAndStop (1);
Symbol 222 MovieClip Frame 1
stop();
Symbol 222 MovieClip Frame 6
gotoAndStop (1);
Symbol 222 MovieClip Frame 15
gotoAndStop (1);
Symbol 222 MovieClip Frame 26
gotoAndStop (1);
Symbol 226 Button
on (rollOver) {
SFX.gotoAndPlay("RollOver");
}
on (press) {
SFX.gotoAndPlay("Click");
}
on (release) {
gotoAndPlay ("Title");
}
Symbol 235 Button
on (rollOver) {
SFX.gotoAndPlay("RollOver");
}
on (press) {
SFX.gotoAndPlay("Click");
}
on (release) {
gotoAndPlay ("Title");
}