Frame 1
_quality = "LOW";
Symbol 10 MovieClip Frame 1
stop();
Symbol 17 MovieClip Frame 1
stop();
Symbol 18 MovieClip [superTrampoline] Frame 1
Symbol 23 MovieClip Frame 1
stop();
Symbol 24 MovieClip [trampoline] Frame 1
Symbol 37 MovieClip [block1] Frame 1
Symbol 40 MovieClip [levelEntrance] Frame 1
if (!_parent._parent.objectBox) {
_root.lemmingLayer.lemmingEntranceX = _x + 20;
_root.lemmingLayer.lemmingEntranceY = _y - 5;
_root.entranceBox = this;
}
stop();
Symbol 61 MovieClip Frame 10
gotoAndPlay (1);
Symbol 61 MovieClip Frame 26
stop();
Symbol 61 MovieClip Frame 40
gotoAndPlay (34);
Symbol 61 MovieClip Frame 45
stop();
Symbol 70 MovieClip Frame 10
gotoAndPlay (1);
Symbol 70 MovieClip Frame 26
stop();
Symbol 70 MovieClip Frame 40
gotoAndPlay (34);
Symbol 70 MovieClip Frame 45
stop();
Symbol 79 MovieClip Frame 10
gotoAndPlay (1);
Symbol 79 MovieClip Frame 25
stop();
Symbol 79 MovieClip Frame 39
gotoAndPlay (33);
Symbol 79 MovieClip Frame 44
stop();
Symbol 80 MovieClip Frame 1
gotoAndStop(1 + random(_totalframes));
Symbol 81 MovieClip [lemming] Frame 1
function killLemming() {
_root.scoreBox.lemmingsOut--;
if (_root.scoreBox.lemmingsOut < 0) {
_root.scoreBox.lemmingsOut = 0;
}
if ((_root.scoreBox.lemmingsOut == 0) and (_parent.totalLemmings == _parent.maxLemmings)) {
_parent.endlevelcountdown = 30;
}
allLemmings.lemmingGraphic.gotoAndPlay("dead");
deathcountdown = 40;
collisionTest = function () {
deathcountdown--;
if (0 >= deathcountdown) {
_alpha = 50;
allLemmings.lemmingGraphic.gotoAndPlay("angel");
deathdirection = 2 - random(5);
if (0 < deathdirection) {
allLemmings.lemmingGraphic._xscale = 100;
} else {
allLemmings.lemmingGraphic._xscale = -100;
}
collisionTest = function () {
_y = (_y-1);
_x = (_x + deathdirection);
};
}
};
_root.soundClips.splat.start();
}
function exitLemming() {
_root.scoreBox.lemmingsOut--;
_root.scoreBox.lemmingsRescued++;
if ((_root.scoreBox.lemmingsOut == 0) and (_parent.totalLemmings == _parent.maxLemmings)) {
_parent.endlevelcountdown = 30;
}
this.removeMovieClip();
}
function animateObject() {
var blockName = ((("block_" + ygrid) + "_") + xgrid);
_root.levelGrid[blockName].blockGraphic.play();
}
function checkObjects() {
var currentSquare = _root.levelGrid.gridValue(xgrid, ygrid);
if (currentSquare == "t") {
ymom = -6.5;
_y = (_y + ymom);
if (Math.abs(xmom) < walkSpeed) {
if (goingRight) {
xmom = walkSpeed;
} else {
xmom = -walkSpeed;
}
}
onGround = false;
_root.soundClips.upTrampoline.start();
allLemmings.lemmingGraphic.gotoAndStop(1);
animateObject();
} else if (currentSquare == "s") {
ymom = -10;
if (Math.abs(xmom) < walkSpeed) {
if (goingRight) {
xmom = walkSpeed;
} else {
xmom = -walkSpeed;
}
}
_y = (_y + ymom);
onGround = false;
_root.soundClips.supertrampolineSound.start();
allLemmings.lemmingGraphic.gotoAndStop(1);
animateObject();
} else if (currentSquare == "l") {
ymom = -6;
xmom = -5.2;
_y = (_y + ymom);
_x = (_x + xmom);
onGround = false;
goingRight = false;
_root.soundClips.trampoline.start();
allLemmings.lemmingGraphic._xscale = -100;
allLemmings.lemmingGraphic.gotoAndStop(1);
animateObject();
} else if (currentSquare == "r") {
ymom = -6;
xmom = 5.2;
_y = (_y + ymom);
_x = (_x + xmom);
goingRight = true;
onGround = false;
_root.soundClips.trampoline.start();
allLemmings.lemmingGraphic._xscale = 100;
allLemmings.lemmingGraphic.gotoAndStop(1);
animateObject();
} else if (currentSquare == "d") {
animateObject();
killLemming();
} else if (currentSquare == "e") {
_root.soundClips.lemmingExit.start();
exitLemming();
} else {
return(false);
}
return(true);
}
function collisionTest() {
xmom = xmom * friction;
ymom = ymom + gravity;
_y = (_y + ymom);
xgrid = Math.floor(_x / _root.levelGrid.blockWidth);
xrem = _x - (xgrid * _root.levelGrid.blockWidth);
ygrid = Math.floor(_y / _root.levelGrid.blockHeight);
yrem = _y - (ygrid * _root.levelGrid.blockHeight);
if (checkObjects()) {
} else {
if (0 < ymom) {
var squareBelow = _root.levelGrid.gridValue(xgrid, ygrid + 1);
if ((squareBelow == "x") || (ygrid == 9)) {
_y = ((ygrid * _root.levelGrid.blockWidth) - 0.01);
if (ymomDeath < ymom) {
killLemming();
}
ymom = 0;
onGround = true;
allLemmings.lemmingGraphic.play();
} else {
allLemmings.lemmingGraphic.gotoAndStop("fall");
onGround = false;
}
} else if (ymom < 0) {
var currentSquare = _root.levelGrid.gridValue(xgrid, ygrid);
var squareAbove = _root.levelGrid.gridValue(xgrid, ygrid - 1);
if (currentSquare == "x") {
_y = (((ygrid + 1) * _root.levelGrid.blockWidth) - blockCeiling);
ymom = gravity;
} else if ((squareAbove == "x") and (2 >= yrem)) {
_y = (_y + (-ymom));
ymom = gravity;
}
}
if (onGround) {
if (goingRight) {
xmom = walkSpeed;
} else {
xmom = -walkSpeed;
}
}
lastx = _x;
_x = (_x + xmom);
if (xmom and ((_root.levelGrid.blockWidth - (lemmingWidth / 2)) < xrem)) {
var squareRight = _root.levelGrid.gridValue(xgrid + 1, ygrid);
if (yrem >= blockCeiling) {
squareRight = ".";
}
if (!onGround) {
var squareBelowRight = _root.levelGrid.gridValue(xgrid + 1, ygrid + 1);
} else {
squareBelowRight = null;
}
if (((((squareRight == "x") || (squareBelowRight == "x")) || (squareRight == "r")) || (squareBelowRight == "r")) || (xgrid == 14)) {
xmom = -Math.abs(xmom);
_x = (_x + (xmom * 2));
xmom = xmom / 2;
allLemmings.lemmingGraphic._xscale = -100;
goingRight = false;
}
} else if ((xmom < 0) and (xrem < (lemmingWidth / 2))) {
var squareLeft = _root.levelGrid.gridValue(xgrid - 1, ygrid);
if (yrem >= blockCeiling) {
squareLeft = ".";
}
if (!onGround) {
var squareBelowLeft = _root.levelGrid.gridValue(xgrid - 1, ygrid + 1);
} else {
squareBelowLeft = null;
}
if (((((squareLeft == "x") || (squareBelowLeft == "x")) || (squareLeft == "l")) || (squareBelowLeft == "l")) || (xgrid == 0)) {
xmom = Math.abs(xmom);
_x = (_x + (xmom * 2));
xmom = xmom / 2;
allLemmings.lemmingGraphic._xscale = 100;
goingRight = true;
}
}
}
}
lemmingWidth = 16;
lemmingHeight = 24;
gravity = 0.3;
friction = 0.99;
ymomDeath = 8;
xmom = 0;
ymom = 0;
goingRight = true;
onGround = false;
allLemmings.lemmingGraphic.gotoAndStop(1);
walkSpeed = 2;
blockCeiling = _root.levelGrid.blockHeight - lemmingHeight;
Symbol 81 MovieClip [lemming] Frame 2
collisionTest();
Symbol 81 MovieClip [lemming] Frame 3
gotoAndPlay (2);
Symbol 89 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 17
gotoAndPlay (1);
Symbol 102 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 1
stop();
Symbol 155 MovieClip [dancer] Frame 1
animation.gotoAndPlay(1 + random(20));
Symbol 155 MovieClip [dancer] Frame 2
animation.gotoAndPlay(1 + random(20));
Symbol 205 MovieClip Frame 1
stop();
Instance of Symbol 193 MovieClip in Symbol 205 MovieClip Frame 4
onClipEvent (load) {
gotoAndPlay (11);
}
Instance of Symbol 193 MovieClip in Symbol 205 MovieClip Frame 4
onClipEvent (load) {
gotoAndPlay (11);
}
Instance of Symbol 193 MovieClip in Symbol 205 MovieClip Frame 4
onClipEvent (load) {
gotoAndPlay (11);
}
Symbol 209 MovieClip Frame 1
var startTime = getTimer();
var numFrames = 0;
var recentSetting = 10;
var recentNumFrames = 0;
var recentStartTime = startTime;
function calcFPS() {
numFrames++;
var now = getTimer();
elapsedSeconds = (now - startTime) / 1000;
actualFPS = numFrames / elapsedSeconds;
recentNumFrames++;
if (recentNumFrames == recentSetting) {
var recentElapsedSeconds = ((now - recentStartTime) / 1000);
recentFPSoutput = int(recentNumFrames / recentElapsedSeconds);
recentStartTime = now;
recentNumFrames = 0;
}
}
Instance of Symbol 206 MovieClip "callCalcFPS" in Symbol 209 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.calcFPS();
}
Symbol 210 MovieClip Frame 1
function pauseLemmings() {
if (paused) {
paused = false;
_root.scoreBox.paused = false;
_root.objectPanel.showButtons();
_root.betweenGamePage._visible = false;
for (i in this) {
this[i].play();
}
play();
} else {
paused = true;
_root.scoreBox.paused = true;
_root.objectPanel.hideButtons();
_root.betweenGamePage._visible = true;
_root.betweenGamePage.gotoAndStop("paused");
for (i in this) {
this[i].stop();
this[i].allLemmings.lemmingGraphic.stop();
}
stop();
}
}
function nukeLemmings() {
for (i in this) {
this[i].killLemming();
endlevelcountdown = 30;
}
totalLemmings = maxlemmings;
paused = false;
play();
}
function removeLemmings() {
for (i in this) {
this[i].removeMovieClip();
}
stop();
}
function startLemmings() {
removeLemmings();
totalLemmings = 0;
lemmingDelay = 30;
creationWait = lemmingDelay;
_parent.scoreBox.lemmingsOut = 0;
_parent.scoreBox.lemmingsRescued = 0;
paused = false;
play();
}
function creationLoop() {
creationWait--;
if ((creationWait == 0) and (totalLemmings < maxLemmings)) {
_root.entranceBox.gotoAndStop(2);
totalLemmings++;
_parent.scoreBox.lemmingsOut++;
creationWait = lemmingDelay;
this.attachMovie("lemming", "lemming" + totalLemmings, totalLemmings);
lemmingPointer = this["lemming" + totalLemmings];
lemmingPointer._x = lemmingEntranceX;
lemmingPointer._y = lemmingEntranceY;
if (totalLemmings == maxLemmings) {
_root.entranceBox.gotoAndStop(1);
}
}
}
stop();
Symbol 210 MovieClip Frame 2
creationLoop();
if (endlevelcountdown) {
endlevelcountdown--;
if (!endlevelcountdown) {
_root.levelGrid.endLevel();
}
}
Symbol 210 MovieClip Frame 3
gotoAndPlay (2);
Symbol 215 MovieClip Frame 1
function endLevel() {
_root.scoreBox.stopTimer();
_root.lemmingLayer.removeLemmings();
if (_root.scoreBox.lemmingsRescued >= neededlemmings) {
nextLevel();
} else {
_root.scoreBox.livesLeft--;
_root.scoreBox.showLives();
if (0 >= _root.scoreBox.livesLeft) {
endGame();
} else {
repeatLevel();
}
}
}
function endGame() {
_root.betweenGamePage.levelFailure(currentLevel, true);
}
function repeatLevel() {
trace("same level called");
_root.betweenGamePage.levelFailure(currentLevel);
pageCountdown = 120;
enterFrameFunc = function () {
pageCountdown--;
if (0 >= pageCountdown) {
_root.betweenGamePage._visible = false;
playLevel(currentLevel);
enterFrameFunc = null;
}
};
}
function nextLevel() {
trace("next level called");
currentLevel++;
if (currentLevel == 5) {
_root.betweenGamePage.levelSuccess(currentLevel - 1, true);
} else {
_root.betweenGamePage.levelSuccess(currentLevel - 1);
pageCountdown = 120;
enterFrameFunc = function () {
pageCountdown--;
if (0 >= pageCountdown) {
_root.betweenGamePage._visible = false;
playLevel(currentLevel);
enterFrameFunc = null;
}
};
}
}
function playLevel(levelnum) {
_root.objectPanel.gotoAndStop("play");
currentLevel = levelnum;
url = ("levellayout" + levelnum) + ".txt";
loadLevel(levelnum);
_root.betweenGamePage._visible = false;
}
function startGame() {
_root.objectPanel.gotoAndStop("play");
_parent.lemmingLayer.maxLemmings = startlemmings;
_parent.lemmingLayer.startLemmings();
_root.scoreBox._visible = true;
_root.scoreBox.startTimer();
if (currentLevel == 1) {
var showHelp = true;
} else {
var showHelp = false;
}
_root.objectPanel.setNumObjects(o1, o2, o3, o4, o5, showHelp);
}
function resetGame() {
_root.scoreBox._visible = false;
for (i in this) {
this[i].removeMovieClip();
}
line = new Array();
_root.scoreBox.lemmingsNeeded = neededlemmings;
for (x in originalLine) {
line[x] = originalLine[x];
}
setupGrid();
if (!_root.levelEditor) {
startGame();
} else {
_root.objectPanel.gotoAndStop("edit");
_root.scoreBox._visible = false;
}
}
function gridValue(x, y) {
return(line[y].substring(x, x + 1));
}
function setGrid(x, y, object) {
newStyle = 1;
line[y] = (line[y].substring(0, x) + object) + line[y].substring(x + 1, length(line[y]));
styleline[y] = (styleline[y].substring(0, x) + newStyle) + styleline[y].substring(x + 1, length(styleline[y]));
var newid = ((y * blockHeight) + x);
var newName = ((("block_" + y) + "_") + x);
if (object == ".") {
this[newName].removeMovieClip();
} else {
this.attachMovie(blockId[object], newName, 1000 + newid);
blockPointer = this[newName];
blockPointer._x = x * blockWidth;
blockPointer._y = y * blockHeight;
blockPointer.gotoAndStop(newStyle);
}
}
function changeStyle(x, y) {
var newid = ((y * blockHeight) + x);
var newName = ((("block_" + y) + "_") + x);
var blockPointer = this[newName];
var currentStyle = blockPointer._currentframe;
if (currentStyle == blockPointer._totalframes) {
var nextStyle = 1;
} else {
nextStyle = currentStyle + 1;
}
blockPointer.gotoAndStop(nextStyle);
styleline[y] = (styleline[y].substring(0, x) + nextStyle) + styleline[y].substring(x + 1, length(styleline[y]));
}
function storeLevel() {
for (x in line) {
originalLine[x] = line[x];
}
}
function printGrid() {
for (x in line) {
trace(line[x]);
}
trace("styletxt=");
for (x in styleline) {
trace(styleline[x]);
}
}
function loadLevel(levelnum) {
originalLine = new Array();
originalStyle = new Array();
line = new Array();
styleline = new Array();
if (levelnum == 1) {
_root.backgrounds.gotoAndStop(1);
originalLine[0] = "...............";
originalLine[1] = ".......e.......";
originalLine[2] = "r....xxxxx....l";
originalLine[3] = "....lx...xr....";
originalLine[4] = "r.............l";
originalLine[5] = "xx.xxxx.xxxx.xx";
originalLine[6] = "xx...........xx";
originalLine[7] = "...............";
originalLine[8] = "..o..xxxxx.....";
originalLine[9] = "dx...........xd";
originalStyle[0] = "........1..11..";
originalStyle[1] = ".1.....11..11.1";
originalStyle[2] = "111..4444441..1";
originalStyle[3] = "..11144..449.11";
originalStyle[4] = "1..11111..11.11";
originalStyle[5] = "441444414444.44";
originalStyle[6] = "441111111111144";
originalStyle[7] = ".....1.11......";
originalStyle[8] = "1.11444444.11..";
originalStyle[9] = "141111111111142";
o1 = 4;
o2 = 4;
o3 = 3;
o4 = 4;
o5 = 4;
startlemmings = 10;
neededlemmings = 5;
} else if (levelnum == 2) {
_root.backgrounds.gotoAndStop(2);
originalLine[0] = "........x......";
originalLine[1] = "..v..vv.x....x.";
originalLine[2] = "xxxxxxxoxx...x.";
originalLine[3] = "......d.....xx.";
originalLine[4] = "......xxx..xxx.";
originalLine[5] = "r..x.ex..xx....";
originalLine[6] = "x...xx.........";
originalLine[7] = "...............";
originalLine[8] = "...............";
originalLine[9] = "......xddx....l";
originalStyle[0] = "111111114111111";
originalStyle[1] = "112113114112241";
originalStyle[2] = "444444444412241";
originalStyle[3] = "111111111112441";
originalStyle[4] = "111112444224441";
originalStyle[5] = "424424411441111";
originalStyle[6] = "412444111111111";
originalStyle[7] = "111111111111111";
originalStyle[8] = "111111111111111";
originalStyle[9] = "......4124....l";
o1 = 2;
o2 = 2;
o3 = 2;
o4 = 2;
o5 = 2;
startlemmings = 13;
neededlemmings = 5;
} else if (levelnum == 3) {
_root.backgrounds.gotoAndStop(3);
originalLine[0] = "o..............";
originalLine[1] = "...............";
originalLine[2] = "xxxx..xx.......";
originalLine[3] = "...x..xxxxdddd.";
originalLine[4] = "...xxxx......x.";
originalLine[5] = "...exd.......x.";
originalLine[6] = "x...x...d....x.";
originalLine[7] = "x.......xr..xx.";
originalLine[8] = "xx......d......";
originalLine[9] = "xxxxxxxxxxxxxxx";
originalStyle[0] = "111111111111111";
originalStyle[1] = "111111111111111";
originalStyle[2] = "444411441111111";
originalStyle[3] = "111411444444441";
originalStyle[4] = "111444411111141";
originalStyle[5] = "111144111111141";
originalStyle[6] = "411141112111141";
originalStyle[7] = "411111144111441";
originalStyle[8] = "441111121111111";
originalStyle[9] = "444444444444444";
o1 = 4;
o2 = 1;
o3 = 0;
o4 = 2;
o5 = 2;
startlemmings = 17;
neededlemmings = 10;
} else if (levelnum == 4) {
_root.backgrounds.gotoAndStop(4);
originalLine[0] = "...........xo..";
originalLine[1] = "...........xx.x";
originalLine[2] = ".xx..x....lx..x";
originalLine[3] = "..xddxr....x.xe";
originalLine[4] = "x..xxx....lx.x.";
originalLine[5] = "...d.xr.d....x.";
originalLine[6] = ".xxxxxxxxxxxxx.";
originalLine[7] = "...............";
originalLine[8] = "...............";
originalLine[9] = "x..dxd..xxxxxxx";
originalStyle[0] = "111111111114111";
originalStyle[1] = "111111111114114";
originalStyle[2] = "144114111114114";
originalStyle[3] = "114444111114141";
originalStyle[4] = "411444111114141";
originalStyle[5] = "111644115111141";
originalStyle[6] = "144444444444441";
originalStyle[7] = "111111111111111";
originalStyle[8] = "111111111111111";
originalStyle[9] = "411241144444444";
o1 = 4;
o2 = 2;
o3 = 0;
o4 = 2;
o5 = 2;
startlemmings = 20;
neededlemmings = 20;
}
for (x in originalLine) {
line[x] = originalLine[x];
styleline[x] = originalStyle[x];
}
resetGame();
}
function setupGrid() {
blockHeight = 32;
blockWidth = 32;
blockId = new Array();
blockId.x = "block1";
blockId.o = "levelEntrance";
blockId.t = "trampoline";
blockId.s = "superTrampoline";
blockId.d = "deathSymbol";
blockId.e = "levelExit";
blockId.l = "leftTrampoline";
blockId.r = "rightTrampoline";
blockId.v = "dancer";
gridHeight = line.length;
gridWidth = length(line[0]);
var y = 0;
while (y < gridHeight) {
var x = 0;
while (x < length(line[0])) {
var newid = ((y * blockHeight) + x);
var newName = ((("block_" + y) + "_") + x);
var tempBlock = line[y].substring(x, x + 1);
var tempStyle = styleline[y].substring(x, x + 1);
if (tempBlock != ".") {
this.attachMovie(blockId[tempBlock], newName, 1000 + newid);
blockPointer = this[newName];
blockPointer._x = x * blockWidth;
blockPointer._y = y * blockHeight;
blockPointer.gotoAndStop(tempStyle);
}
x++;
}
y++;
}
}
stop();
Instance of Symbol 214 MovieClip in Symbol 215 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.enterFrameFunc();
}
Symbol 215 MovieClip Frame 5
originalLine = leveltxt.split(newline);
originalStyle = styletxt.split(newline);
for (i in originalLine) {
originalLine[i] = originalLine[i].substring(0, 15);
originalStyle[i] = originalStyle[i].substring(0, 15);
}
line = new Array();
styleline = new Array();
for (x in originalLine) {
line[x] = originalLine[x];
styleline[x] = originalStyle[x];
}
resetGame();
Symbol 218 Button
on (press) {
_parent.deleteBox.deleteOff();
_parent.styleBox.styleOff();
dragItem();
hideRollover();
}
on (release, releaseOutside) {
dropItem();
}
on (rollOver) {
_parent.helpRollover._visible = false;
if (objectsLeft || (_root.levelEditor)) {
objectBoxBackground.gotoAndStop(2);
showRollover();
}
}
on (rollOut) {
objectBoxBackground.gotoAndStop(1);
hideRollover();
}
Symbol 221 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 1
function gridOk() {
xgrid = Math.floor(_parent._xmouse / 32);
ygrid = Math.floor(_parent._ymouse / 32);
_x = (xgrid * 32);
_y = (ygrid * 32);
currentGridValue = _root.levelGrid.gridValue(xgrid, ygrid);
belowGridValue = _root.levelGrid.gridValue(xgrid, ygrid + 1);
if ((currentGridValue == ".") and ((((belowGridValue == "x") || (belowGridValue == "d")) || (_root.levelEditor)) || (ygrid == 9))) {
return(true);
}
return(false);
}
function dragItem() {
if (objectsLeft || (_root.levelEditor)) {
dragObjectOutline._visible = false;
numberIndicator._visible = false;
objectBoxBackground._visible = false;
_alpha = 80;
enterFrameFunc = function () {
if (gridOk()) {
invalidChoice._visible = false;
} else {
invalidChoice._visible = true;
}
};
}
}
function dropItem() {
if (objectsLeft || (_root.levelEditor)) {
if (gridOk()) {
_root.levelGrid.setGrid(xgrid, ygrid, objectType);
if (!_root.levelEditor) {
objectsLeft--;
if (!objectsLeft) {
_alpha = 20;
}
}
}
_x = startX;
_y = startY;
if (objectsLeft) {
_alpha = 100;
}
invalidChoice._visible = false;
if (!_root.levelEditor) {
numberIndicator._visible = true;
}
objectBoxBackground._visible = true;
enterFrameFunc = null;
dragObjectOutline._visible = true;
}
}
function showRollover() {
objectRollOver._visible = true;
}
function hideRollover() {
objectRollOver._visible = false;
}
invalidChoice._visible = false;
objectRollOver._visible = false;
objectRollOver.rollOverText._x = pixelOffset;
objectsLeft = 3;
if (_root.levelEditor) {
objectsLeft = "";
}
startX = _x;
startY = _y;
objectBox = true;
graphicElement.attachMovie(objectLink, "item", 1);
graphicElement.item.stop();
Instance of Symbol 214 MovieClip in Symbol 230 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.enterFrameFunc();
}
Symbol 235 Button
on (press) {
_root.levelEditor = false;
_root.levelGrid.storeLevel();
_root.levelGrid.startGame();
}
Symbol 237 Button
on (press) {
deleteBox.toggleDelete();
styleBox.styleOff();
}
Symbol 238 Button
on (press) {
deleteBox.deleteOff();
styleBox.toggleStyle();
}
Symbol 242 Button
on (press) {
deleteHere();
}
Symbol 243 MovieClip Frame 1
function gridOk() {
xgrid = Math.floor(_parent._xmouse / 32);
ygrid = Math.floor(_parent._ymouse / 32);
_x = (xgrid * 32);
_y = (ygrid * 32);
if (9 < ygrid) {
_visible = false;
} else {
_visible = true;
}
currentGridValue = _root.levelGrid.gridValue(xgrid, ygrid);
belowGridValue = _root.levelGrid.gridValue(xgrid, ygrid + 1);
}
function toggleDelete() {
if (!deleting) {
_visible = true;
deleting = true;
enterFrameFunc = function () {
gridOk();
};
} else {
deleting = false;
enterFrameFunc = null;
_visible = false;
}
}
function deleteOff() {
deleting = false;
enterFrameFunc = null;
_visible = false;
}
function deleteHere() {
_root.levelGrid.setGrid(xgrid, ygrid, ".");
}
Instance of Symbol 214 MovieClip in Symbol 243 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.enterFrameFunc();
}
Symbol 244 Button
on (press) {
_root.levelGrid.printGrid();
}
Symbol 246 Button
on (press) {
changeHere();
}
Symbol 247 MovieClip Frame 1
function gridOk() {
xgrid = Math.floor(_parent._xmouse / 32);
ygrid = Math.floor(_parent._ymouse / 32);
_x = (xgrid * 32);
_y = (ygrid * 32);
if (9 < ygrid) {
_visible = false;
} else {
_visible = true;
}
}
function toggleStyle() {
if (!changingStyle) {
_visible = true;
changingStyle = true;
enterFrameFunc = function () {
gridOk();
};
} else {
changingStyle = false;
enterFrameFunc = null;
_visible = false;
}
}
function styleOff() {
changingStyle = false;
enterFrameFunc = null;
_visible = false;
}
function changeHere() {
_root.levelGrid.changeStyle(xgrid, ygrid);
}
Instance of Symbol 214 MovieClip in Symbol 247 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.enterFrameFunc();
}
Symbol 248 MovieClip Frame 1
function setNumObjects(n1, n2, n3, n4, n5, showHelp) {
o1.objectsLeft = n1;
o2.objectsLeft = n2;
o3.objectsLeft = n3;
o4.objectsLeft = n4;
o5.objectsLeft = n5;
i = 1;
while (5 >= i) {
var objectPointer = this["o" + i];
objectPointer.numberIndicator._visible = true;
if (objectPointer.objectsLeft == 0) {
objectPointer._alpha = 20;
objectPointer.numberIndicator._visible = false;
} else {
objectPointer._alpha = 100;
}
i++;
}
if (showHelp) {
helpRollover._visible = true;
} else {
helpRollover._visible = false;
}
}
function setEditObjects() {
i = 1;
while (8 >= i) {
this["o" + i].objectsLeft = "";
this["o" + i].numberIndicator._visible = false;
i++;
}
}
function hideButtons() {
i = 1;
while (8 >= i) {
this["o" + i]._visible = false;
i++;
}
helpRollover._visible = false;
}
function showButtons() {
i = 1;
while (8 >= i) {
this["o" + i]._visible = true;
i++;
}
}
hideButtons();
stop();
Instance of Symbol 230 MovieClip "o1" in Symbol 248 MovieClip Frame 1
onClipEvent (load) {
objectType = "t";
objectLink = "trampoline";
objectName = "LOW JUMP";
pixelOffset = 12;
}
Instance of Symbol 230 MovieClip "o2" in Symbol 248 MovieClip Frame 1
onClipEvent (load) {
objectType = "s";
objectLink = "superTrampoline";
objectName = " HIGH JUMP";
pixelOffset = 7;
}
Instance of Symbol 230 MovieClip "o3" in Symbol 248 MovieClip Frame 1
onClipEvent (load) {
objectType = "x";
objectLink = "block1";
objectName = "BLOCKER";
pixelOffset = 15;
}
Instance of Symbol 230 MovieClip "o4" in Symbol 248 MovieClip Frame 1
onClipEvent (load) {
objectType = "l";
objectLink = "leftTrampoline";
objectName = "LEFT JUMP";
pixelOffset = 9;
}
Instance of Symbol 230 MovieClip "o5" in Symbol 248 MovieClip Frame 1
onClipEvent (load) {
objectType = "r";
objectLink = "rightTrampoline";
objectName = "RIGHT JUMP";
pixelOffset = 7;
}
Symbol 248 MovieClip Frame 2
i = 1;
while (8 >= i) {
this["o" + i]._visible = true;
i++;
}
Symbol 248 MovieClip Frame 5
deleteBox._visible = false;
Instance of Symbol 230 MovieClip "o6" in Symbol 248 MovieClip Frame 5
onClipEvent (load) {
objectType = "d";
objectLink = "deathSymbol";
objectName = "DEATH";
pixelOffset = 0;
}
Instance of Symbol 230 MovieClip "o7" in Symbol 248 MovieClip Frame 5
onClipEvent (load) {
objectType = "e";
objectLink = "levelExit";
objectName = "EXIT";
pixelOffset = 0;
}
Instance of Symbol 230 MovieClip "o8" in Symbol 248 MovieClip Frame 5
onClipEvent (load) {
objectType = "o";
objectLink = "levelEntrance";
objectName = "ENTRANCE";
pixelOffset = 0;
}
Symbol 254 Button
on (press) {
_root.levelGrid.playLevel(1);
_root.scoreBox.livesLeft = 3;
_root.scoreBox.showLives();
}
Symbol 257 Button
on (release) {
poptarget = "http://www.bbc.co.uk/choice/games/roadies/index.shtml";
poptarget = escape(poptarget);
jump = ("JavaScript: popmailwin('http://www.bbc.co.uk/cgi-bin/navigation/mailto.pl?REFERER=" + poptarget) + "','Mailer')";
getURL (jump);
}
Symbol 260 Button
on (press) {
gotoAndStop (12);
}
Symbol 264 Button
on (release) {
poptarget = "http://www.bbc.co.uk/choice/games/roadies/index.shtml";
poptarget = escape(poptarget);
jump = ("JavaScript: popmailwin('http://www.bbc.co.uk/cgi-bin/navigation/mailto.pl?REFERER=" + poptarget) + "','Mailer')";
getURL (jump);
}
Symbol 278 Button
on (release) {
poptarget = "http://www.bbc.co.uk/choice/games/roadies/index.shtml";
poptarget = escape(poptarget);
jump = ("JavaScript: popmailwin('http://www.bbc.co.uk/cgi-bin/navigation/mailto.pl?REFERER=" + poptarget) + "','Mailer')";
getURL (jump);
}
Symbol 288 MovieClip Frame 1
function levelSuccess(_currentLevel, _gameIsOver) {
currentLevel = _currentLevel;
gameIsOver = _gameIsOver;
_root.objectPanel.gotoAndStop(1);
_root.scoreBox._visible = false;
gotoAndPlay (17);
_visible = true;
}
function levelFailure(_currentLevel, _gameIsOver) {
currentLevel = _currentLevel;
gameIsOver = _gameIsOver;
_root.objectPanel.gotoAndStop(1);
_root.scoreBox._visible = false;
currentLevel = _currentLevel;
gotoAndPlay (125);
_visible = true;
}
_root.scoreBox._visible = false;
gameIsOver = false;
_root.scoreBox.totalScore = 0;
totalScore = 0;
totalSaved = 0;
totalDead = 0;
stop();
Symbol 288 MovieClip Frame 17
levelmessage = ("LEVEL " + currentLevel) + " COMPLETE";
timeleft = _root.scoreBox.timeleft;
lemmingsRescued = _root.scoreBox.lemmingsRescued;
maxlemmings = _root.lemmingLayer.maxlemmings;
lemmingsRescuedText = (lemmingsRescued + " / ") + maxlemmings;
levelScore = (timeleft * 25) + (lemmingsRescued * 100);
_root.scoreBox.totalScore = _root.scoreBox.totalScore + levelScore;
totalScore = _root.scoreBox.totalScore;
totalSaved = totalSaved + lemmingsRescued;
totalDead = totalDead + (maxlemmings - lemmingsRescued);
Symbol 288 MovieClip Frame 59
if (!gameIsOver) {
stop();
}
Symbol 288 MovieClip Frame 97
feedbackText = ((("You got " + totalSaved) + " Roadies to the gig on time, while ") + totalDead) + " Roadies ended up in rock 'n roll heaven. Can you do better if you try again?";
Symbol 288 MovieClip Frame 109
stop();
Symbol 288 MovieClip Frame 125
levelmessage = ("LEVEL " + currentLevel) + " FAILED";
livesleft = _root.scoreBox.livesLeft;
lemmingsRescued = _root.scoreBox.lemmingsRescued;
maxlemmings = _root.lemmingLayer.maxlemmings;
lemmingsRescuedText = (lemmingsRescued + " / ") + maxlemmings;
Symbol 288 MovieClip Frame 154
if (!gameIsOver) {
stop();
}
Symbol 288 MovieClip Frame 184
Symbol 288 MovieClip Frame 238
gotoAndStop (1);
Symbol 296 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 1
stop();
Symbol 303 Button
on (press) {
_root.lemmingLayer.removeLemmings();
_root.levelEditor = true;
stopTimer();
_root.objectPanel.setEditObjects();
_root.levelGrid.resetGame();
}
Symbol 309 Button
on (press) {
_root.lemmingLayer.nukeLemmings();
}
Symbol 316 Button
on (press) {
_root.lemmingLayer.pauseLemmings();
}
Symbol 317 MovieClip Frame 1
function startTimer() {
timeleft = 100;
timerLoop = 31;
paused = false;
timeBar.gotoAndStop(100);
enterFrameFunc = function () {
if (!paused) {
timerLoop--;
}
if (!timerLoop) {
timeleft--;
timeBar.gotoAndStop(100 - timeleft);
if (!timeleft) {
stopTimer();
_root.levelGrid.endLevel();
}
timerLoop = 31;
}
};
}
function stopTimer() {
enterFrameFunc = null;
}
function showLives() {
livesClip.gotoAndStop(livesLeft);
}
Instance of Symbol 214 MovieClip in Symbol 317 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.enterFrameFunc();
}
Symbol 319 MovieClip Frame 1
trampoline = new Sound(this);
trampoline.attachSound("trampolineSound");
splat = new Sound(this);
splat.attachSound("splatSound");
upTrampoline = new Sound(this);
upTrampoline.attachSound("upTrampolineSound");
lemmingExit = new Sound(this);
lemmingExit.attachSound("lemmingExit");
musicloop = new Sound(this);
supertrampolineSound = new Sound(this);
supertrampolineSound.attachSound("supertrampolineSound");