Frame 1
_quality = "LOW";
Symbol 239 MovieClip Frame 1
stop();
Symbol 240 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;
lemmingPointer.id = totalLemmings;
if (totalLemmings == maxLemmings) {
_root.entranceBox.gotoAndStop(1);
}
}
}
stop();
Symbol 240 MovieClip Frame 2
creationLoop();
if (endlevelcountdown) {
endlevelcountdown--;
if (!endlevelcountdown) {
_root.levelGrid.endLevel();
}
}
Symbol 240 MovieClip Frame 3
gotoAndPlay (2);
Symbol 244 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);
trace("HERE");
_parent.soundClips.musicloop.startloop(0, 1000);
}
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, ownerclip, dontdelete) {
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 == ".") {
if (!dontdelete) {
this[newName].removeMovieClip();
}
} else {
this.attachMovie(blockId[object], newName, 1000 + newid);
blockPointer = this[newName];
blockPointer._x = x * blockWidth;
blockPointer._y = y * blockHeight;
blockPointer.ownerclip = ownerclip;
blockPointer.gotoAndStop(newStyle);
blockPointer.xgrid = x;
blockPointer.ygrid = y;
}
}
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(((("originalLine[" + x) + "]=\"") + line[x]) + "\"");
}
for (x in styleline) {
trace(((("originalStyle[" + x) + "]=\"") + 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] = "....xxxxxxx....";
originalLine[3] = "x.............x";
originalLine[4] = "xx....xxx....xx.";
originalLine[5] = "xxxx.......xxxx.";
originalLine[6] = "...x.......x...";
originalLine[7] = "...x.......x...";
originalLine[8] = "o.xxxxx.xxxx...";
originalLine[9] = ".............xd";
originalStyle[0] = "...............";
originalStyle[1] = ".......A.......";
originalStyle[2] = "....ABAGABA....";
originalStyle[3] = "D.............D";
originalStyle[4] = "ED....AHA....DE";
originalStyle[5] = "FFAA.......AAFF";
originalStyle[6] = "...C.......C...";
originalStyle[7] = "...C.......C...";
originalStyle[8] = "o.AAAAA.AAAAA..";
originalStyle[9] = ".............AA";
o1 = 0;
o2 = 2;
o3 = 0;
o4 = 0;
o5 = 0;
startlemmings = 8;
neededlemmings = 3;
} else if (levelnum == 2) {
_root.backgrounds.gotoAndStop(2);
originalLine[0] = "...............";
originalLine[1] = "..............e";
originalLine[2] = "d............xx";
originalLine[3] = "xxxxxx...xxxdxx";
originalLine[4] = "o....x..xxxxxxx.";
originalLine[5] = ".....x..........";
originalLine[6] = "r....x.........";
originalLine[7] = "xx...xxxxx.....";
originalLine[8] = ".........xr...x";
originalLine[9] = "xxxxxxxx.......";
originalStyle[0] = "...............";
originalStyle[1] = "..............A";
originalStyle[2] = "ALLL.........DDx";
originalStyle[3] = "AAAAAD...IJKAEE";
originalStyle[4] = "o....E..AAAAAFF";
originalStyle[5] = ".....E..........";
originalStyle[6] = "r....E.........";
originalStyle[7] = "AA...FAAAD.....";
originalStyle[8] = ".........Fr...A";
originalStyle[9] = "IJJJJJJK.......";
o1 = 0;
o2 = 2;
o3 = 0;
o4 = 1;
o5 = 1;
startlemmings = 8;
neededlemmings = 4;
} else if (levelnum == 3) {
_root.backgrounds.gotoAndStop(3);
originalLine[0] = "ox........xxxx.";
originalLine[1] = ".x.......xxxxxx";
originalLine[2] = ".xe............";
originalLine[3] = ".xxdxxxx........";
originalLine[4] = ".xxxxxxxxx....l";
originalLine[5] = ".........xr....";
originalLine[6] = ".........x....l";
originalLine[7] = "x..x..x..xr....";
originalLine[8] = "x..x..x.......l";
originalLine[9] = "xxxxxxxxxx....d";
originalStyle[0] = "oE........MNNO.";
originalStyle[1] = ".E.......BAHABA";
originalStyle[2] = ".EA............";
originalStyle[3] = ".EDAMNNO.......";
originalStyle[4] = ".FFAAAAAAD....l";
originalStyle[5] = ".........Er....";
originalStyle[6] = ".........E....l";
originalStyle[7] = "D..D..D..Fr....";
originalStyle[8] = "E..E..E.......l";
originalStyle[9] = "FAAFAAFAAA....A";
o1 = 1;
o2 = 0;
o3 = 0;
o4 = 0;
o5 = 0;
startlemmings = 8;
neededlemmings = 5;
} else if (levelnum == 4) {
_root.backgrounds.gotoAndStop(4);
originalLine[0] = "e..............";
originalLine[1] = "t..............";
originalLine[2] = "...............";
originalLine[3] = "d.....xxxxx...l";
originalLine[4] = "xxxx.......xx..";
originalLine[5] = "o..xx..........";
originalLine[6] = ".....xd........";
originalLine[7] = "xxxx..x...x...s";
originalLine[8] = "xxxxx..x.xxx...";
originalLine[9] = "xxxxxx...xxxd..";
originalStyle[0] = "B..............";
originalStyle[1] = "t..............";
originalStyle[2] = "...............";
originalStyle[3] = "A.....PPPPP...l";
originalStyle[4] = "PPPP.......PP..";
originalStyle[5] = "o..PP..........";
originalStyle[6] = ".....PA........";
originalStyle[7] = "DDDD..P...P...s";
originalStyle[8] = "EEEED..P.PPP...";
originalStyle[9] = "FFFFFA...PPPA..";
o1 = 0;
o2 = 1;
o3 = 0;
o4 = 0;
o5 = 0;
startlemmings = 8;
neededlemmings = 6;
}
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);
var styleValue = (tempStyle.charCodeAt(0) - 64);
if (tempBlock != ".") {
this.attachMovie(blockId[tempBlock], newName, 1000 + newid);
blockPointer = this[newName];
blockPointer._x = x * blockWidth;
blockPointer._y = y * blockHeight;
blockPointer.gotoAndStop(styleValue);
blockPointer.moveItemButtonHolder._visible = false;
}
x++;
}
y++;
}
}
stop();
Instance of Symbol 81 MovieClip in Symbol 244 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.enterFrameFunc();
}
Symbol 244 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 248 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 251 MovieClip Frame 1
stop();
Symbol 261 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(dragFromStage) {
if (dragFromStage) {
objectsLeft++;
}
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() {
trace("--> ITEM DROP CALLED");
if (objectsLeft || (_root.levelEditor)) {
if (gridOk()) {
_root.levelGrid.setGrid(xgrid, ygrid, objectType, this);
_root.soundClips.dropItem.start();
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.moveItemButtonHolder._visible = false;
graphicElement.item.stop();
Instance of Symbol 81 MovieClip in Symbol 261 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.enterFrameFunc();
}
Symbol 266 Button
on (press) {
_root.levelEditor = false;
_root.levelGrid.storeLevel();
_root.levelGrid.startGame();
}
Symbol 268 Button
on (press) {
deleteBox.toggleDelete();
styleBox.styleOff();
}
Symbol 269 Button
on (press) {
deleteBox.deleteOff();
styleBox.toggleStyle();
}
Symbol 273 Button
on (press) {
deleteHere();
}
Symbol 274 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 81 MovieClip in Symbol 274 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.enterFrameFunc();
}
Symbol 275 Button
on (press) {
_root.levelGrid.printGrid();
}
Symbol 277 Button
on (press) {
changeHere();
}
Symbol 278 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 81 MovieClip in Symbol 278 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.enterFrameFunc();
}
Symbol 279 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 261 MovieClip "o1" in Symbol 279 MovieClip Frame 1
onClipEvent (load) {
objectType = "t";
objectLink = "trampoline";
objectName = "LOW JUMP";
pixelOffset = 12;
}
Instance of Symbol 261 MovieClip "o2" in Symbol 279 MovieClip Frame 1
onClipEvent (load) {
objectType = "s";
objectLink = "superTrampoline";
objectName = " HIGH JUMP";
pixelOffset = 7;
}
Instance of Symbol 261 MovieClip "o4" in Symbol 279 MovieClip Frame 1
onClipEvent (load) {
objectType = "l";
objectLink = "leftTrampoline";
objectName = "LEFT JUMP";
pixelOffset = 9;
}
Instance of Symbol 261 MovieClip "o5" in Symbol 279 MovieClip Frame 1
onClipEvent (load) {
objectType = "r";
objectLink = "rightTrampoline";
objectName = "RIGHT JUMP";
pixelOffset = 7;
}
Symbol 279 MovieClip Frame 2
i = 1;
while (8 >= i) {
this["o" + i]._visible = true;
i++;
}
Symbol 279 MovieClip Frame 5
deleteBox._visible = false;
Instance of Symbol 261 MovieClip "o6" in Symbol 279 MovieClip Frame 5
onClipEvent (load) {
objectType = "d";
objectLink = "deathSymbol";
objectName = "DEATH";
pixelOffset = 0;
}
Instance of Symbol 261 MovieClip "o7" in Symbol 279 MovieClip Frame 5
onClipEvent (load) {
objectType = "e";
objectLink = "levelExit";
objectName = "EXIT";
pixelOffset = 0;
}
Instance of Symbol 261 MovieClip "o8" in Symbol 279 MovieClip Frame 5
onClipEvent (load) {
objectType = "o";
objectLink = "levelEntrance";
objectName = "ENTRANCE";
pixelOffset = 0;
}
Instance of Symbol 261 MovieClip "o3" in Symbol 279 MovieClip Frame 5
onClipEvent (load) {
objectType = "x";
objectLink = "block1";
objectName = "BLOCKER";
pixelOffset = 15;
}
Symbol 285 Button
on (press) {
gotoAndStop ("instructions");
}
Symbol 286 Button
on (press) {
_root.levelGrid.playLevel(1);
_root.scoreBox.livesLeft = 2;
_root.scoreBox.showLives();
}
Symbol 293 Button
on (press) {
_quality = "LOW";
_root.levelGrid.playLevel(1);
_root.scoreBox.livesLeft = 2;
_root.scoreBox.showLives();
}
Symbol 322 MovieClip Frame 1
function levelSuccess(_currentLevel, _gameIsOver) {
currentLevel = _currentLevel;
gameIsOver = _gameIsOver;
_root.objectPanel.gotoAndStop(1);
_root.scoreBox._visible = false;
trace("CALL TO FADE OUT");
_parent.soundClips.musicloop.fadeout();
gotoAndPlay ("levelcomplete");
_visible = true;
}
function levelFailure(_currentLevel, _gameIsOver) {
currentLevel = _currentLevel;
gameIsOver = _gameIsOver;
_root.objectPanel.gotoAndStop(1);
_root.scoreBox._visible = false;
currentLevel = _currentLevel;
trace("CALL TO FADE OUT");
_parent.soundClips.musicloop.fadeout();
gotoAndPlay ("levelfailure");
_visible = true;
}
loadVariables ("instructions.txt", this);
_root.scoreBox._visible = false;
gameIsOver = false;
_root.scoreBox.totalScore = 0;
totalScore = 0;
totalSaved = 0;
totalDead = 0;
stop();
Symbol 322 MovieClip Frame 12
_quality = "HIGH";
Symbol 322 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 322 MovieClip Frame 59
if (!gameIsOver) {
stop();
}
Symbol 322 MovieClip Frame 97
feedbackText = ((("You've " + 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 322 MovieClip Frame 109
gname = "castledoomSte";
gscore = totalScore;
getURL ("index.php?act=Arcade&do=newscore", "_self", "POST");
stop();
Symbol 322 MovieClip Frame 125
levelmessage = ("LEVEL " + currentLevel) + " FAILED";
livesleft = _root.scoreBox.livesLeft;
lemmingsRescued = _root.scoreBox.lemmingsRescued;
maxlemmings = _root.lemmingLayer.maxlemmings;
lemmingsRescuedText = (lemmingsRescued + " / ") + maxlemmings;
Symbol 322 MovieClip Frame 154
if (!gameIsOver) {
stop();
}
Symbol 322 MovieClip Frame 184
Symbol 322 MovieClip Frame 238
gname = "castledoomSte";
gscore = totalScore;
getURL ("index.php?act=Arcade&do=newscore", "_self", "POST");
stop();
Symbol 325 MovieClip Frame 1
stop();
Symbol 333 MovieClip Frame 1
stop();
Symbol 336 Button
on (press) {
_root.lemmingLayer.removeLemmings();
_root.levelEditor = true;
stopTimer();
_root.objectPanel.setEditObjects();
_root.levelGrid.resetGame();
}
Symbol 337 Button
on (press) {
if (_root.soundOn) {
_root.soundOn = false;
gotoAndStop (2);
stopMusic();
} else {
_root.soundOn = true;
gotoAndStop (1);
startMusic();
}
}
Symbol 339 MovieClip Frame 1
function startMusic() {
_root.soundClips.musicloop.fadeIn();
}
function stopMusic() {
_root.soundClips.musicloop.fadeOut();
}
_root.soundOn = true;
stop();
Symbol 340 Button
on (press) {
_root.lemmingLayer.pauseLemmings();
}
Symbol 341 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 81 MovieClip in Symbol 341 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.enterFrameFunc();
}
Symbol 343 MovieClip Frame 1
function startloop(p1, p2) {
soundObject.setVolume(maxVolume);
if (_root.soundOn) {
soundObject.start(p1, p2);
}
currentVolume = maxVolume;
playing = true;
}
function start(p1, p2) {
soundObject.setVolume(maxVolume);
if (_root.soundOn) {
soundObject.start(p1, p2);
}
currentVolume = maxVolume;
}
function stop() {
soundObject.stop();
}
function fadeIn() {
aimVolume = maxVolume;
if ((!playing) and _root.soundOn) {
playing = true;
soundObject.start(0, 1000);
soundObject.setVolume(0);
currentVolume = 0;
gotoAndPlay (2);
}
}
function fadeOut() {
trace("FADING OUT");
aimVolume = 0;
if (playing) {
gotoAndPlay (2);
}
}
soundObject = new Sound(this);
soundObject.attachSound(soundName);
playing = false;
maxVolume = 100;
fadeStep = 2;
stop();
Symbol 343 MovieClip Frame 2
trace((("CV " + currentVolume) + ", AV ") + aimVolume);
if (currentVolume < aimVolume) {
currentVolume = currentVolume + fadeStep;
if (currentVolume >= aimVolume) {
stop();
}
} else {
currentVolume = currentVolume - fadeStep;
if (0 >= currentVolume) {
playing = false;
soundObject.stop();
stop();
}
}
soundObject.setVolume(currentVolume);
Symbol 343 MovieClip Frame 3
gotoAndPlay (2);
Symbol 344 MovieClip Frame 1
Instance of Symbol 343 MovieClip "musicloop" in Symbol 344 MovieClip Frame 1
onClipEvent (load) {
soundName = "musicloop";
}
Instance of Symbol 343 MovieClip "trampoline" in Symbol 344 MovieClip Frame 1
onClipEvent (load) {
soundName = "trampolineSound";
}
Instance of Symbol 343 MovieClip "splat" in Symbol 344 MovieClip Frame 1
onClipEvent (load) {
soundName = "splatSound";
}
Instance of Symbol 343 MovieClip "upTrampoline" in Symbol 344 MovieClip Frame 1
onClipEvent (load) {
soundName = "upTrampolineSound";
}
Instance of Symbol 343 MovieClip "lemmingExit" in Symbol 344 MovieClip Frame 1
onClipEvent (load) {
soundName = "lemmingExit";
}
Instance of Symbol 343 MovieClip "supertrampolineSound" in Symbol 344 MovieClip Frame 1
onClipEvent (load) {
soundName = "supertrampolineSound";
}
Instance of Symbol 343 MovieClip "dropitem" in Symbol 344 MovieClip Frame 1
onClipEvent (load) {
soundName = "dropitem";
}
Instance of Symbol 343 MovieClip "yippee" in Symbol 344 MovieClip Frame 1
onClipEvent (load) {
soundName = "yippee";
}
Instance of Symbol 343 MovieClip "dogbark" in Symbol 344 MovieClip Frame 1
onClipEvent (load) {
soundName = "dogbark";
}
Instance of Symbol 343 MovieClip "catmeow" in Symbol 344 MovieClip Frame 1
onClipEvent (load) {
soundName = "catmeow";
}
Symbol 15 MovieClip Frame 1
stop();
Symbol 17 Button
on (press) {
trace("owner clip is " + _parent.ownerclip);
_parent.ownerclip.dragItem(true);
_root.levelGrid.setGrid(_parent.xgrid, _parent.ygrid, ".", this._parent, true);
_parent._alpha = 0;
}
on (release, releaseOutside) {
trace("owner clip is " + _parent.ownerclip);
_parent.ownerclip.dropItem();
trace("UP");
this._parent.removeMovieClip();
}
Symbol 25 MovieClip Frame 1
stop();
Symbol 26 MovieClip [superTrampoline] Frame 1
Symbol 31 MovieClip Frame 1
stop();
Symbol 32 MovieClip [trampoline] Frame 1
Symbol 66 MovieClip Frame 1
gotoAndStop(1 + random(_totalframes));
Symbol 67 MovieClip [block1] Frame 1
Symbol 70 MovieClip [levelEntrance] Frame 1
if (!_parent._parent.objectBox) {
_root.lemmingLayer.lemmingEntranceX = _x + 20;
_root.lemmingLayer.lemmingEntranceY = _y - 5;
_root.entranceBox = this;
}
stop();
Instance of Symbol 81 MovieClip in Symbol 82 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent._y--;
}
Symbol 82 MovieClip Frame 41
stop();
Symbol 84 MovieClip Frame 10
gotoAndPlay (1);
Symbol 84 MovieClip Frame 26
stop();
Symbol 84 MovieClip Frame 40
gotoAndPlay ("angelloop");
Symbol 84 MovieClip Frame 45
stop();
Symbol 92 MovieClip Frame 10
gotoAndPlay (1);
Symbol 92 MovieClip Frame 26
stop();
Symbol 92 MovieClip Frame 40
gotoAndPlay ("angelloop");
Symbol 92 MovieClip Frame 45
stop();
Symbol 100 MovieClip Frame 10
gotoAndPlay (1);
Symbol 100 MovieClip Frame 25
stop();
Symbol 100 MovieClip Frame 39
gotoAndPlay ("angelloop");
Symbol 100 MovieClip Frame 44
stop();
Symbol 108 MovieClip Frame 10
gotoAndPlay (1);
Symbol 108 MovieClip Frame 25
stop();
Symbol 108 MovieClip Frame 39
gotoAndPlay ("angelloop");
Symbol 108 MovieClip Frame 44
stop();
Symbol 116 MovieClip Frame 10
gotoAndPlay (1);
Symbol 116 MovieClip Frame 25
stop();
Symbol 116 MovieClip Frame 39
gotoAndPlay ("angelloop");
Symbol 116 MovieClip Frame 44
stop();
Symbol 124 MovieClip Frame 10
gotoAndPlay (1);
Symbol 124 MovieClip Frame 25
stop();
Symbol 124 MovieClip Frame 39
gotoAndPlay ("angelloop");
Symbol 124 MovieClip Frame 44
stop();
Symbol 132 MovieClip Frame 10
gotoAndPlay (1);
Symbol 132 MovieClip Frame 25
stop();
Symbol 132 MovieClip Frame 39
gotoAndPlay ("angelloop");
Symbol 132 MovieClip Frame 44
stop();
Symbol 140 MovieClip Frame 10
gotoAndPlay (1);
Symbol 140 MovieClip Frame 25
stop();
Symbol 140 MovieClip Frame 39
gotoAndPlay ("angelloop");
Symbol 140 MovieClip Frame 44
stop();
Symbol 141 MovieClip Frame 1
_parent.soundname = "yippee";
gotoAndStop(_parent.id);
Symbol 141 MovieClip Frame 2
_parent.soundname = "yippee";
Symbol 141 MovieClip Frame 3
_parent.soundname = "yippee";
Symbol 141 MovieClip Frame 4
_parent.soundname = "yippee";
Symbol 141 MovieClip Frame 5
_parent.soundname = "catmeow";
Symbol 141 MovieClip Frame 6
_parent.soundname = "catmeow";
Symbol 141 MovieClip Frame 7
_parent.soundname = "dogbark";
Symbol 141 MovieClip Frame 8
_parent.soundname = "dogbark";
Symbol 142 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 = null;
_root.soundClips.splat.start();
}
function exitLemming() {
trace("playing " + soundname);
_root.soundClips[soundname].start();
_root.scoreBox.lemmingsOut--;
_root.scoreBox.lemmingsRescued++;
if ((_root.scoreBox.lemmingsOut == 0) and (_parent.totalLemmings == _parent.maxLemmings)) {
_parent.endlevelcountdown = 30;
}
if (_root.levelGrid.currentLevel == 4) {
trace("IN BALLOON");
_y = -1;
stop();
} else {
trace("KILLING LEMMING");
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") {
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) {
}
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 142 MovieClip [lemming] Frame 2
collisionTest();
Symbol 142 MovieClip [lemming] Frame 3
gotoAndPlay (2);
Symbol 157 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 17
gotoAndPlay (1);
Symbol 170 MovieClip Frame 1
stop();
Symbol 180 MovieClip Frame 1
stop();
Symbol 223 MovieClip [dancer] Frame 1
animation.gotoAndPlay(1 + random(20));
Symbol 223 MovieClip [dancer] Frame 2
animation.gotoAndPlay(1 + random(20));