Frame 1
function clearScreen() {
removeMovieClip(Interface);
removeMovieClip(Map);
}
function levelUp() {
bakersHelped = 0;
if (mapNum < 3) {
mapNum++;
} else {
mapNum = 1;
}
if (mascotTypes < 5) {
mascotTypes++;
}
if ((numOfMascots + 1) < 10) {
numOfMascots++;
}
if ((level % 2) == 0) {
if (mascotChaseSpeed < playerSpeed) {
mascotSpeed++;
mascotChaseSpeed++;
}
}
mascotChaseRadius = mascotChaseRadius + 2;
removeMovieClip(Map);
setupMap();
SFX.gotoAndPlay("Music1");
gotoAndPlay ("Play");
}
function loseLife() {
if ((lives - 1) >= 0) {
lives--;
removeMovieClip(Map.Player);
var _local1 = 1;
while (_local1 <= numOfMascots) {
removeMovieClip(Map["Mascot" + _local1]);
_local1++;
}
gotoAndPlay ("Play");
} else {
gotoAndPlay ("GameOver");
}
}
function helpBaker(theBaker) {
SFX.gotoAndPlay("HelpBaker");
theBaker.gotoAndPlay("Helped");
bakersHelped++;
score = score + bakerPointValue;
if (bakersHelped == numOfBakers) {
stopAllSounds();
SFX.gotoAndPlay("Music3");
Interface.gotoAndPlay("FullyCharged");
mascotsCaught = 0;
var _local2 = 1;
while (_local2 <= numOfMascots) {
_root.Map["Mascot" + _local2].gotoAndStop("Scared");
_root.Map["Mascot" + _local2].hunted = true;
_local2++;
}
}
}
function catchMascot(theMascot) {
mascotsCaught++;
SFX.gotoAndPlay("GetMascot");
var _local2 = mascotsCaught * mascotPointValue;
score = score + _local2;
var _local4 = theMascot._x;
var _local3 = theMascot._y - 15;
Map.attachMovie("pointsclip", "PointsClip" + mascotsCaught, pointsClipDepth + mascotsCaught);
removeMovieClip(theMascot);
var _local1 = Map["PointsClip" + mascotsCaught];
_local1.points = _local2;
_local1._x = _local4;
_local1._y = _local3;
}
function setupMap() {
_root.attachMovie("map", "Map", 1);
var _local4 = 1;
while (_local4 <= mapHeight) {
var _local6 = _root[(("level" + mapNum) + "Row") + _local4];
var _local3 = 1;
while (_local3 <= mapWidth) {
var _local5 = whatNumber(_local3, _local4);
if (_local6[_local3 - 1] > 1) {
Map.attachMovie("maptile" + _local6[_local3 - 1], "MapTile" + _local5, (_local4 * 1000) + _local3);
theMapTile = Map["MapTile" + _local5];
theMapTile._x = (_local3 * tileWidth) - (tileWidth / 2);
theMapTile._y = (_local4 * tileHeight) - (tileWidth / 2);
if (_local6[_local3 - 1] == 2) {
theMapTile.onEnterFrame = function () {
if (this._currentframe == 1) {
if (this.Collider.hitTest(Map.Player.Collider)) {
_root.helpBaker(this);
}
}
};
}
} else if (_local6[_local3 - 1] == 0) {
freeTiles.push(_local5);
}
_local3++;
}
_local4++;
}
}
function spawnMascot() {
do {
match = false;
var _local5 = randInt(0, freeTiles.length);
var _local7 = freeTiles[_local5];
var _local3 = whatRow(_local7);
var _local4 = whatColumn(_local7);
var _local8 = Math.abs(Map.Player.currentRow - _local3);
var _local9 = Math.abs(Map.Player.currentColumn - _local4);
if ((_local9 <= 6) && (_local8 <= 4)) {
match = true;
}
} while (match == true);
_local7 = whatNumber(_local4, _local3);
var _local6 = randInt(1, mascotTypes);
Map.attachMovie("mascot" + _local6, "Mascot" + mascotIndex, ((_local3 * 1000) + mascotDepth) + _local4);
theMascot = Map["Mascot" + mascotIndex];
mascotsActive.push(theMascot);
theMascot._x = (_local4 * tileWidth) - tileHalf;
theMascot._y = (_local3 * tileHeight) - tileHalf;
theMascot.myIndex = mascotIndex;
theMascot.currentTile = _local7;
theMascot.currentRow = _local3;
theMascot.currentColumn = _local4;
theMascot.currentDir = "Down";
theMascot.speed = mascotSpeed;
theMascot.chase = false;
theMascot.hunted = false;
theMascot.onEnterFrame = function () {
if (gameInPlay) {
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);
var _local3 = Map.Player.currentRow - this.currentRow;
var _local4 = Map.Player.currentColumn - this.currentColumn;
if (!this.hunted) {
if ((Math.abs(_local4) <= mascotChaseRadius) && (Math.abs(_local3) <= mascotChaseRadius)) {
this.chase = true;
} else {
this.chase = false;
}
}
if (this.chase) {
this.speed = mascotChaseSpeed;
if (this.currentTile != this.lastTile) {
this.currentDir = chooseMascotDir(this);
}
} else {
this.speed = mascotSpeed;
}
moveClip(this);
if (this.Collider.hitTest(Map.Player.Collider)) {
if (this._currentframe == 1) {
gotoAndPlay ("LoseLife");
} else {
_root.catchMascot(this);
}
}
}
this.swapDepths(((this.currentRow * 1000) + _root.mascotDepth) + this.currentColumn);
};
if (mascotIndex < mascotIndexMax) {
mascotIndex++;
} else {
mascotIndex = 1;
}
}
function centerMap(theSpeed) {
if (theSpeed == undefined) {
theSpeed = 1;
}
var _local1 = new Object({x:Map.Player._x, y:Map.Player._y});
Map.Player._parent.localToGlobal(_local1);
var _local4 = _local1.x;
var _local3 = _local1.y;
Map._x = Map._x + ((centerX - _local4) / theSpeed);
Map._y = Map._y + ((centerY - _local3) / theSpeed);
}
function chooseMascotDir(theClip) {
var _local1 = Map.Player.currentRow - theClip.currentRow;
var _local2 = Map.Player.currentColumn - theClip.currentColumn;
if ((_local2 < 0) && (_local1 < 0)) {
if (Math.abs(_local2) < Math.abs(_local1)) {
dir = "Up";
} else if (Math.abs(_local2) > Math.abs(_local1)) {
dir = "Left";
} else if (randInt(1, 2) == 1) {
theClip.currentDir = "Up";
} else {
theClip.currentDir = "Left";
}
} else if ((_local2 == 0) && (_local1 < 0)) {
dir = "Up";
} else if ((_local2 > 0) && (_local1 < 0)) {
if (Math.abs(_local2) < Math.abs(_local1)) {
dir = "Up";
} else if (Math.abs(_local2) > Math.abs(_local1)) {
dir = "Right";
} else if (randInt(1, 2) == 1) {
theClip.currentDir = "Up";
} else {
theClip.currentDir = "Right";
}
} else if ((_local2 > 0) && (_local1 == 0)) {
dir = "Right";
} else if ((_local2 > 0) && (_local1 > 0)) {
if (Math.abs(_local2) < Math.abs(_local1)) {
dir = "Down";
} else if (Math.abs(_local2) > Math.abs(_local1)) {
dir = "Right";
} else if (randInt(1, 2) == 1) {
theClip.currentDir = "Down";
} else {
theClip.currentDir = "Right";
}
} else if ((_local2 == 0) && (_local1 > 0)) {
dir = "Down";
} else if ((_local2 < 0) && (_local1 > 0)) {
if (Math.abs(_local2) < Math.abs(_local1)) {
dir = "Down";
} else if (Math.abs(_local2) > Math.abs(_local1)) {
dir = "Left";
} else if (randInt(1, 2) == 1) {
theClip.currentDir = "Down";
} else {
theClip.currentDir = "Left";
}
} else if ((_local2 < 0) && (_local1 == 0)) {
dir = "Left";
}
if (theClip.hunted == true) {
if (dir == "Left") {
dir = "Right";
} else if (dir == "Right") {
dir = "Left";
} else if (dir == "Up") {
dir = "Down";
} else if (dir == "Down") {
dir = "Up";
}
}
return(dir);
}
function moveClip(theClip) {
theClip.obstacleHit = false;
if (theClip.currentDir == "Up") {
var _local4 = theClip._x;
var _local3 = theClip._y - theClip.speed;
var _local18 = _local4;
var _local16 = _local3 - tileHalf;
var _local14 = _local4 - tileEdge;
var _local13 = _local3 - tileEdge;
var _local20 = _local4 + tileEdge;
var _local19 = _local3 - tileEdge;
} else if (theClip.currentDir == "Down") {
var _local4 = theClip._x;
var _local3 = theClip._y + theClip.speed;
var _local18 = _local4;
var _local16 = _local3 + tileHalf;
var _local14 = _local4 - tileEdge;
var _local13 = _local3 + tileEdge;
var _local20 = _local4 + tileEdge;
var _local19 = _local3 + tileEdge;
} else if (theClip.currentDir == "Left") {
var _local4 = theClip._x - theClip.speed;
var _local3 = theClip._y;
var _local18 = _local4 - tileHalf;
var _local16 = _local3;
var _local8 = _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 _local18 = _local4 + tileHalf;
var _local16 = _local3;
var _local8 = _local4 + tileEdge;
var _local29 = _local3 - tileEdge;
var _local30 = _local4 + tileEdge;
var _local27 = _local3 + tileEdge;
}
var _local7 = theClip.Anim.Clip._currentframe;
if (theClip == Map.Player) {
theClip.gotoAndStop(theClip.currentDir);
theClip.Anim.gotoAndPlay(_local7);
} else {
theClip.Clip.gotoAndStop(theClip.currentDir);
theClip.Clip.Anim.gotoAndPlay(_local7);
}
var _local6 = Math.ceil(_local16 / tileHeight);
var _local5 = Math.ceil(_local18 / tileWidth);
var _local10 = _root[(("level" + mapNum) + "Row") + _local6];
if ((theClip.currentDir == "Up") || (theClip.currentDir == "Down")) {
var _local21 = Math.ceil(_local13 / tileHeight);
var _local25 = Math.ceil(_local14 / tileWidth);
var _local28 = _root[(("level" + mapNum) + "Row") + _local21];
var _local24 = Math.ceil(_local19 / tileHeight);
var _local17 = Math.ceil(_local20 / tileWidth);
var _local9 = _root[(("level" + mapNum) + "Row") + _local24];
} else if ((theClip.currentDir == "Left") || (theClip.currentDir == "Right")) {
var _local12 = Math.ceil(_local29 / tileHeight);
var _local15 = Math.ceil(_local8 / tileWidth);
var _local26 = _root[(("level" + mapNum) + "Row") + _local12];
var _local22 = Math.ceil(_local27 / tileHeight);
var _local23 = Math.ceil(_local30 / tileWidth);
var _local11 = _root[(("level" + mapNum) + "Row") + _local22];
}
if ((_local6 > 0) && (_local6 <= mapHeight)) {
if ((_local5 > 0) && (_local5 <= mapWidth)) {
if (_local10[_local5 - 1] == 0) {
if ((theClip.currentDir == "Up") || (theClip.currentDir == "Down")) {
if ((_local28[_local25 - 1] != 0) || (_local9[_local17 - 1] != 0)) {
var _local4 = ((theClip.currentColumn - 1) * tileWidth) + tileHalf;
}
} else if ((theClip.currentDir == "Left") || (theClip.currentDir == "Right")) {
if ((_local26[_local15 - 1] != 0) || (_local11[_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 (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 decrementTimer() {
chargeTimeLeft--;
if (chargeTimeLeft == 0) {
gotoAndPlay ("EndLevel");
}
}
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);
attachMovie("sfxclip", "SFX", 10001);
var soundOn = true;
var GameSFX = new Sound(SFX);
_global.path = "http://dev.ytv.com/";
_global.gameID = 238;
funcHITBOX = function (arEvent, arAction) {
lString = ((("javascript: _hbLink ('/flash/" + arEvent.toLowerCase()) + "/") + arAction.toLowerCase()) + "','left','0,0,0,0')";
};
funcSoundToggle = function () {
if (_root.soundOn) {
_root.GameSFX.setVolume(0);
_root.soundOn = false;
Interface.MuteButton.gotoAndStop("Off");
} else {
_root.GameSFX.setVolume(100);
_root.soundOn = true;
Interface.MuteButton.gotoAndStop("On");
}
};
funcSubmitScore = function (tempstring) {
var _local2 = new LoadVars();
_local2.onLoad = function (success) {
if (success) {
_root.gotoAndStop("HiScores");
}
};
_local2.load(tempstring);
};
Instance of Symbol 236 MovieClip "ProgressBar" in Frame 1
onClipEvent (enterFrame) {
gotoAndStop(Math.round((_root._framesloaded / _root._totalframes) * 100));
}
Frame 10
if (_framesloaded == _totalframes) {
SFX.gotoAndPlay("Music1");
gotoAndStop ("Title");
} else {
gotoAndPlay(_currentframe - 5);
}
Frame 15
stop();
Frame 25
stop();
Instance of Symbol 278 MovieClip in Frame 25
onClipEvent (load) {
stop();
}
Instance of Symbol 143 MovieClip in Frame 26
onClipEvent (load) {
gotoAndPlay(_root.randInt(1, this._totalframes));
}
Instance of Symbol 61 MovieClip in Frame 26
onClipEvent (load) {
gotoAndPlay(_root.randInt(1, this._totalframes));
}
Instance of Symbol 100 MovieClip in Frame 26
onClipEvent (load) {
gotoAndPlay(_root.randInt(1, this._totalframes));
}
Frame 35
funcLoadScores = function () {
var _local5 = new LoadVars();
_local5.onLoad = function (success) {
if (success) {
i = 0;
while (i < 10) {
var _local2 = main[("score" + i) + "_mc"];
_local2.rank_txt.text = String(i + 1);
var _local3 = this["name" + i];
trace((_local3 + " ") + i);
if ((_local3 == null) || (_local3 == undefined)) {
_local2.name_txt.text = "AA";
_local2.score_txt.text = 0;
} else {
_local2.name_txt.text = this["name" + i];
_local2.score_txt.text = this["score" + i];
}
_local2._visible = true;
i++;
}
} else {
alert("NOMO");
}
};
var _local6 = (_global.path + "gamepad/play/games/getGameHighScores.asp?gameID=") + _global.gameID;
_local5.load(_local6);
};
stop();
Instance of Symbol 295 MovieClip "List" in Frame 35
onClipEvent (data) {
i = 0;
while (this["name" + i] != null) {
duplicateMovieClip (scoreWindow.ListEntry, "entry" + i, i * 99999);
this.scoreWindow["entry" + i].Entry = this["name" + i];
this.scoreWindow["entry" + i].Score = this["score" + i];
this.scoreWindow["entry" + i].Place = i + 1;
this.scoreWindow["entry" + i]._y = 25 * i;
i++;
}
ymin = scoreWindow._y - 50;
ymax = (ymin - scoreWindow._height) + 190;
}
onClipEvent (load) {
this.scoreWindow.listentry._visible = false;
}
onClipEvent (load) {
loadVariables ((_global.path + "games/getGameHighScores.asp?gameID=") + _global.gameID, this);
}
Frame 45
if (!_root.soundOn) {
_root.funcSoundToggle();
}
var level = 1;
var mapNum = 1;
var lives = 3;
var score = 0;
var bakersHelped = 0;
var numOfBakers = 10;
var bakerPointValue = 100;
var mascotPointValue = 10;
var mascotsCaught = 0;
var timerUnit = 1000;
var chargeTimeLeft = 0;
var gameInPlay = false;
var pointsClipDepth = 10000;
var playerStartRow = 23;
var playerStartColumn = 23;
var playerSpeed = 8;
var playerDepth = 75;
var playerBusy = false;
var mascotsActive = [];
var numOfMascots = 4;
var mascotIndex = 1;
var mascotIndexMax = 10;
var mascotSpeed = 2;
var mascotChaseSpeed = 5;
var mascotChaseRadius = 40;
var mascotDepth = 80;
var mascotTypes = 1;
var mapWidth = 45;
var mapHeight = 45;
var tileWidth = 50;
var tileHeight = 50;
var tileHalf = 25;
var tileEdge = 24;
var numOfTiles = (mapWidth * mapHeight);
var freeTiles = [];
var junctionTiles = [];
var centerX = 275;
var centerY = 225;
var level1Row1 = [8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 0, 0, 0, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 8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, 8, 8, 8, 0, 0];
var level3Row40 = [0, 8, 0, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 8, 8, 0, 8, 0, 3, 1, 1, 0, 8, 0, 8, 8, 0, 0, 5, 1, 1, 0, 8, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 8];
var level3Row41 = [0, 8, 0, 8, 8, 8, 8, 0, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 8, 0, 8, 8, 0, 0, 1, 1, 1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 4, 1, 1, 0, 8];
var level3Row42 = [0, 0, 0, 8, 0, 0, 0, 0, 1, 1, 1, 0, 0, 8, 8, 0, 8, 0, 1, 1, 1, 0, 8, 0, 8, 8, 0, 0, 1, 1, 1, 0, 8, 0, 8, 8, 8, 8, 8, 0, 1, 1, 1, 0, 8];
var level3Row43 = [0, 8, 8, 8, 0, 8, 8, 0, 1, 1, 1, 0, 0, 8, 8, 0, 8, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 8, 8, 0, 0, 0, 0, 1, 1, 1, 0, 8];
var level3Row44 = [0, 8, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 0, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8, 8, 8, 8, 0, 0, 8, 8, 8, 8, 8, 0, 8, 8, 0, 8, 8, 0, 0, 0, 0, 0, 8];
var level3Row45 = [0, 0, 0, 0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0, 0, 0, 8, 8, 0, 8, 8, 8, 8, 8, 8, 8, 8];
attachMovie("interface", "Interface", 10000);
setupMap();
gotoAndPlay ("Play");
Frame 55
Map.attachMovie("player", "Player", (playerStartRow * 100) + 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;
mascotsActive = [];
mascotIndex = 1;
var i = 1;
while (i <= numOfMascots) {
spawnMascot();
i++;
}
centerMap();
Interface.gotoAndPlay("GetReady");
stop();
Interface.onEnterFrame = function () {
this.bakersText = (_root.bakersHelped + "/") + _root.numOfBakers;
};
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";
moveClip(this);
} else if (Key.isDown(40)) {
this.currentDir = "Down";
moveClip(this);
} else if (Key.isDown(37)) {
this.currentDir = "Left";
moveClip(this);
} else if (Key.isDown(39)) {
this.currentDir = "Right";
moveClip(this);
} else {
this.gotoAndStop("Idle");
}
}
centerMap(4);
this.swapDepths(((this.currentRow * 1000) + playerDepth) + this.currentColumn);
};
Frame 65
gameInPlay = false;
SFX.gotoAndPlay("LoseLife");
Map.Player.gotoAndPlay("LoseLife");
stop();
Frame 75
gameInPlay = false;
clearInterval(timerCode);
Interface.gotoAndPlay("TimesUp");
Map.Player.gotoAndStop("Idle");
stop();
Frame 85
gameInPlay = false;
stopAllSounds();
clearInterval(timerCode);
SFX.gotoAndPlay("GameOver");
Interface.gotoAndPlay("GameOver");
stop();
Symbol 7 MovieClip [sfxclip] Frame 1
stop();
Symbol 7 MovieClip [sfxclip] Frame 6
gotoAndStop (1);
Symbol 7 MovieClip [sfxclip] Frame 16
gotoAndStop (1);
Symbol 7 MovieClip [sfxclip] Frame 26
gotoAndStop (1);
Symbol 7 MovieClip [sfxclip] Frame 36
gotoAndStop (1);
Symbol 7 MovieClip [sfxclip] Frame 46
gotoAndStop (1);
Symbol 7 MovieClip [sfxclip] Frame 56
gotoAndStop (1);
Symbol 21 Button
on (release) {
_root.funcSoundToggle();
}
Symbol 24 MovieClip Frame 1
stop();
Symbol 24 MovieClip Frame 5
stop();
Symbol 44 Button
on (release) {
tempstring = (((((_global.path + "games/writeGameHighScore.asp?gameID=") + _global.gameID) + "&name=") + _root.name) + "&score=") + _root.score;
_root.funcSubmitScore(tempstring);
_root.clearScreen();
}
Symbol 47 MovieClip [interface] Frame 1
stop();
Symbol 47 MovieClip [interface] Frame 75
_root.gameInPlay = true;
gotoAndStop (1);
Symbol 47 MovieClip [interface] Frame 130
_root.chargeTimeLeft = 10;
_root.timerCode = setInterval(_root.decrementTimer, _root.timerUnit);
stop();
Symbol 47 MovieClip [interface] Frame 265
_root.levelUp();
stop();
Symbol 47 MovieClip [interface] Frame 335
Selection.setFocus("nameField");
nameField.restrict = "A-Z 0-9";
stop();
Symbol 76 MovieClip [mascot2] Frame 1
stop();
Symbol 76 MovieClip [mascot2] Frame 10
stop();
Symbol 91 MovieClip [mascot5] Frame 1
stop();
Symbol 91 MovieClip [mascot5] Frame 10
stop();
Symbol 112 MovieClip [mascot4] Frame 1
stop();
Symbol 112 MovieClip [mascot4] Frame 10
stop();
Symbol 135 MovieClip [mascot3] Frame 1
stop();
Symbol 135 MovieClip [mascot3] Frame 10
stop();
Symbol 154 MovieClip [mascot1] Frame 1
stop();
Symbol 154 MovieClip [mascot1] Frame 10
stop();
Symbol 182 MovieClip [player] Frame 1
stop();
Symbol 182 MovieClip [player] Frame 50
play();
Symbol 182 MovieClip [player] Frame 100
_root.loseLife();
stop();
Symbol 196 MovieClip [maptile2] Frame 1
stop();
Symbol 196 MovieClip [maptile2] Frame 30
stop();
Symbol 198 MovieClip [maptile8] Frame 1
stop();
Symbol 217 MovieClip [pointsclip] Frame 30
removeMovieClip(this);
Symbol 236 MovieClip Frame 1
stop();
Symbol 243 Button
on (rollOver) {
SFX.gotoAndPlay("RollOver");
}
on (press) {
_root.funcHITBOX("play_activity", "play_from_main");
SFX.gotoAndPlay("Click");
}
on (release) {
gotoAndPlay ("Start");
}
Symbol 248 Button
on (rollOver) {
SFX.gotoAndPlay("RollOver");
}
on (press) {
_root.funcHITBOX("instructions", "view_instructions");
SFX.gotoAndPlay("Click");
}
on (release) {
gotoAndPlay ("HowTo");
}
Symbol 252 Button
on (rollOver) {
SFX.gotoAndPlay("RollOver");
}
on (press) {
SFX.gotoAndPlay("Click");
}
on (release) {
score = null;
gotoAndPlay ("HiScores");
}
Symbol 269 Button
on (rollOver) {
SFX.gotoAndPlay("RollOver");
}
on (press) {
SFX.gotoAndPlay("Click");
}
on (release) {
gotoAndPlay ("Title");
}
Symbol 277 Button
on (release) {
nextFrame();
}
Symbol 279 Button
on (release) {
prevFrame();
}
Symbol 293 Button
on (press) {
if (scoreWindow._y > ymax) {
scoreWindow._y = scoreWindow._y - 50;
}
}
Symbol 294 Button
on (press) {
if (scoreWindow._y < ymin) {
scoreWindow._y = scoreWindow._y + 50;
}
}
Symbol 310 Button
on (press) {
if (_root.soundOn) {
_root.funcSoundToggle();
}
getURL ("http://player.theplatform.com/ps/player/pds/J793WzjKTz", "_blank");
}