Frame 1
function dist(x1, y1, x2, y2) {
return(Math.sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))));
}
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;
k = 0;
onEnterFrame = function () {
var _local2 = Math.floor(framesLoaded / 4) - 1;
afw._x = afw._x - (0.3 * ((afw._x - _root["b" + _local2]._x) / 2));
afw._y = afw._y - (0.3 * ((afw._y - _root["b" + _local2]._y) / 2));
cat.removeMovieClip();
createEmptyMovieClip("cat", k++);
cat.lineStyle(1, 13408512, 20);
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
framesLoaded = Math.ceil((loaded / total) * 100);
if ((framesLoaded >= 100) && (playMe.act == false)) {
playMe.act = true;
playMe.play();
}
perDisp = framesLoaded + "%";
i = 0;
while (i < 25) {
if (framesLoaded >= (i * 4)) {
_root["b" + i]._alpha = _root["b" + i]._alpha - (0.08 * ((_root["b" + i]._alpha - 100) / 2));
_root["b" + i]._x = _root["b" + i]._x - (0.3 * ((_root["b" + i]._x - _root["b" + i].mainX) / 2));
_root["b" + i]._y = _root["b" + i]._y - (0.3 * ((_root["b" + i]._y - _root["b" + i].mainY) / 2));
if (i != 0) {
cat.moveTo(_root["b" + i]._x, _root["b" + i]._y);
cat.lineTo(_root["b" + (i - 1)]._x, _root["b" + (i - 1)]._y);
}
}
base = 1.5;
if (_root["b" + i].hitTest(_xmouse, _ymouse)) {
if ((_xmouse - _root["b" + i]._x) > 0) {
t = 0;
while (t < 25) {
_root["b" + (i - t)]._x = _root["b" + (i - t)]._x - (base / (t + 1));
_root["b" + (i + t)]._x = _root["b" + (i + t)]._x - (base / (t + 1));
t++;
}
} else if ((_xmouse - _root["b" + i]._x) <= 0) {
t = 0;
while (t < 25) {
_root["b" + (i - t)]._x = _root["b" + (i - t)]._x + (base / (t + 1));
_root["b" + (i + t)]._x = _root["b" + (i + t)]._x + (base / (t + 1));
t++;
}
}
if ((_ymouse - _root["b" + i]._y) > 0) {
t = 0;
while (t < 25) {
_root["b" + (i - t)]._y = _root["b" + (i - t)]._y - (base / (t + 1));
_root["b" + (i + t)]._y = _root["b" + (i + t)]._y - (base / (t + 1));
t++;
}
} else if ((_ymouse - _root["b" + i]._y) <= 0) {
t = 0;
while (t < 25) {
_root["b" + (i - t)]._y = _root["b" + (i - t)]._y + (base / (t + 1));
_root["b" + (i + t)]._y = _root["b" + (i + t)]._y + (base / (t + 1));
t++;
}
}
}
i++;
}
};
i = 0;
while (i < 25) {
_root["b" + i].mainX = _root["b" + i]._x;
_root["b" + i].mainY = _root["b" + i]._y;
_root["b" + i]._x = random(Stage.width);
_root["b" + i]._y = random(Stage.height);
_root["b" + i]._alpha = 0;
_root["b" + i].act = true;
i++;
}
version = $version;
var osType;
var majorVersion;
var majorRevision;
var minorVersion;
var minorRevision;
osArray = version.split(" ");
osType = osArray[0];
versionArray = osArray[1].split(",");
majorVersion = versionArray[0];
majorRevision = versionArray[1];
minorVersion = versionArray[2];
minorRevision = versionArray[3];
function killAd() {
removeMovieClip(adBox);
}
function muteHandler() {
if (muted) {
globalSound.setVolume(0);
} else {
globalSound.setVolume(100);
}
}
stop();
var CPMStarPoolID = 1052;
var CPMStarSubPoolID = 5;
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
var globalSound = new Sound(this);
globalSound.setVolume(100);
muted = false;
Frame 2
stop();
onEnterFrame = function () {
for (var _local2 in _root) {
if (typeof(_root[_local2]) == "movieclip") {
_root[_local2].removeMovieClip();
}
}
};
Instance of Symbol 136 MovieClip in Frame 2
onClipEvent (enterFrame) {
this.onPress = function () {
getURL ("http://www.armorgames.com", "_blank");
};
}
Frame 3
function saveGame() {
savefile.data.ach1 = _root.ach1;
savefile.data.ach2 = _root.ach2;
savefile.data.ach3 = _root.ach3;
savefile.data.ach4 = _root.ach4;
savefile.data.ach5 = _root.ach5;
savefile.data.ach6 = _root.ach6;
savefile.data.ach7 = _root.ach7;
savefile.data.ach8 = _root.ach8;
i = 0;
while (i < myTimes.length) {
savefile.data.myTimes[i] = _root.myTimes[i];
savefile.data.levCodes[i] = _root.levCodes[i];
i++;
}
savefile.data.oldName = _root.oldName;
savefile.flush();
}
stop();
var ach1 = false;
var ach2 = false;
var ach3 = false;
var ach4 = false;
var ach5 = false;
var ach6 = false;
var ach7 = false;
var ach8 = false;
var oldName;
var myTimes = new Array();
var levCodes = new Array();
i = 0;
while (i < 30) {
myTimes.push(0);
levCodes.push(0);
i++;
}
var savefile = SharedObject.getLocal("compulse");
if ((savefile.data.oldName == undefined) || (oldName == "fewigmw")) {
savefile.data.myTimes = myTimes;
savefile.data.levCodes = levCodes;
trace(savefile.data.myTimes);
trace(savefile.data.levCodes);
gotoAndStop ("NOSAVEGAME");
savefile.flush();
} else {
trace(savefile.data.myTimes);
trace(savefile.data.levCodes);
ach1 = savefile.data.ach1;
ach2 = savefile.data.ach2;
ach3 = savefile.data.ach3;
ach4 = savefile.data.ach4;
ach5 = savefile.data.ach5;
ach6 = savefile.data.ach6;
ach7 = savefile.data.ach7;
ach8 = savefile.data.ach8;
oldName = savefile.data.oldName;
i = 0;
while (i < 30) {
_root.myTimes[i] = savefile.data.myTimes[i];
_root.levCodes[i] = savefile.data.levCodes[i];
i++;
}
gotoAndStop ("menu");
}
myMenu.customItems[0].enabled = false;
myMenu.customItems[1].enabled = false;
myMenu.customItems[2].enabled = false;
Frame 5
stop();
function getParTime(lev) {
parTime = parTimes[lev] - 1;
}
function generateScoreCard() {
rest = "";
rest = rest + "<BEGIN CODE>";
rest = rest + newline;
rest = rest + (((((((minorRevision + "/") + minorVersion) + "+") + majorRevision) + "/") + majorVersion) + "+");
switch (osType) {
case "WIN" :
rest = rest + 111;
break;
case "MAC" :
rest = rest + 222;
break;
case "LNX" :
rest = rest + 333;
default :
rest = rest + 666;
}
rest = rest + ",";
r = 0;
while (r < 30) {
rest = rest + (myTimes[r] + ",");
r++;
}
r = 0;
while (r < oldName.length) {
rest = rest + ord(oldName.charAt(r));
r++;
}
rest = rest + ",";
rest = rest + "a";
rest = rest + newline;
rest = rest + ((((((myProgress + "|") + tempNumber) + "|/|") + (((myProgress + 4) * myTimes[13]) + (((23 * myProgress) * myTimes[0]) * 1347234))) + "0") + tempNumber);
r = 0;
while (r < 30) {
rest = rest + ((((("\nL>" + r) + "|*|$>") + myTimes[r]) + "|C>") + levCodes[r]);
r++;
}
rest = rest + newline;
rest = rest + (oldName + "232923/32,");
cookie = 0;
r = 0;
while (r < 30) {
rest = rest + ((myTimes[r] % 2) + "-");
cookie = cookie + (myTimes[r] % 2);
r++;
}
if ((cookie % 2) == 0) {
rest = rest + "1>";
} else {
rest = rest + "0.";
}
rest = rest + newline;
rest = rest + "<END CODE>";
codeBox._visible = true;
codeBox.codeArea.text = rest;
}
var levChoice = 1;
onMouseDown = function () {
};
onEnterFrame = function () {
checkHit = false;
i = 1;
while (i < 31) {
if (_root["b" + i].hitTest(_root._xmouse, _root._ymouse)) {
blag._x = _xmouse;
blag._y = _ymouse;
blag._visible = true;
checkHit = true;
if (i < 10) {
blag.lev.text = "0" + i;
} else {
blag.lev.text = i;
}
if (myTimes[i - 1] == 0) {
blag.yTime.text = "X";
} else if (myTimes[i - 1] < 10) {
blag.yTime.text = "0" + myTimes[i - 1];
} else {
blag.yTime.text = myTimes[i - 1];
}
if (parTimes[i - 1] < 10) {
blag.pTime.text = "0" + parTimes[i - 1];
} else {
blag.pTime.text = parTimes[i - 1];
}
if (proScores[i - 1] < 10) {
blag.proTime.text = "0" + proScores[i - 1];
} else {
blag.proTime.text = proScores[i - 1];
}
if (myTimes[i - 1] == 0) {
blag.gotoAndStop(1);
} else if (myTimes[i - 1] <= parTimes[i - 1]) {
blag.gotoAndStop(3);
} else if (myTimes[i - 1] > 0) {
blag.gotoAndStop(2);
}
if ((myTimes[i - 1] <= proScores[i - 1]) && (myTimes[i - 1] != 0)) {
blag.gotoAndStop(4);
}
}
i++;
}
if (!checkHit) {
blag._visible = false;
}
};
stop();
i = 1;
while (i < 31) {
_root["b" + i].onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
levChoice = Number(this._name.substr(1, 2));
playAll = false;
whiteFade.play();
}
};
i++;
}
var ringsOnLevels = new Array();
ringsOnLevels.push(0);
ringsOnLevels.push(1);
ringsOnLevels.push(2);
ringsOnLevels.push(0);
ringsOnLevels.push(4);
ringsOnLevels.push(1);
ringsOnLevels.push(0);
ringsOnLevels.push(0);
ringsOnLevels.push(1);
ringsOnLevels.push(3);
ringsOnLevels.push(1);
ringsOnLevels.push(0);
ringsOnLevels.push(1);
ringsOnLevels.push(4);
ringsOnLevels.push(2);
ringsOnLevels.push(4);
ringsOnLevels.push(2);
ringsOnLevels.push(3);
ringsOnLevels.push(4);
ringsOnLevels.push(0);
ringsOnLevels.push(4);
ringsOnLevels.push(4);
ringsOnLevels.push(4);
ringsOnLevels.push(3);
ringsOnLevels.push(4);
ringsOnLevels.push(2);
ringsOnLevels.push(1);
ringsOnLevels.push(4);
ringsOnLevels.push(0);
ringsOnLevels.push(3);
var parTimes = new Array();
parTimes.push(2);
parTimes.push(3);
parTimes.push(2);
parTimes.push(2);
parTimes.push(4);
parTimes.push(6);
parTimes.push(4);
parTimes.push(2);
parTimes.push(4);
parTimes.push(5);
parTimes.push(6);
parTimes.push(4);
parTimes.push(7);
parTimes.push(12);
parTimes.push(3);
parTimes.push(5);
parTimes.push(6);
parTimes.push(7);
parTimes.push(9);
parTimes.push(10);
parTimes.push(4);
parTimes.push(7);
parTimes.push(8);
parTimes.push(9);
parTimes.push(4);
parTimes.push(5);
parTimes.push(7);
parTimes.push(9);
parTimes.push(2);
parTimes.push(10);
var proScores = new Array();
proScores.push(1);
proScores.push(2);
proScores.push(1);
proScores.push(1);
proScores.push(2);
proScores.push(4);
proScores.push(2);
proScores.push(1);
proScores.push(2);
proScores.push(2);
proScores.push(4);
proScores.push(2);
proScores.push(3);
proScores.push(7);
proScores.push(2);
proScores.push(2);
proScores.push(3);
proScores.push(5);
proScores.push(4);
proScores.push(6);
proScores.push(3);
proScores.push(5);
proScores.push(5);
proScores.push(4);
proScores.push(3);
proScores.push(3);
proScores.push(3);
proScores.push(7);
proScores.push(1);
proScores.push(7);
var myProgress = 0;
tapper = true;
i = 0;
while (i < 30) {
if (myTimes[i] > 0) {
_root["b" + (i + 1)].inside.gotoAndStop(2);
myProgress = myProgress + 1;
if (myTimes[i] <= parTimes[i]) {
_root["b" + (i + 1)].inside.gotoAndStop(3);
myProgress = myProgress + 1;
}
if (myTimes[i] <= proScores[i]) {
_root["b" + (i + 1)].inside.gotoAndStop(4);
myProgress = myProgress + 1;
}
}
i++;
}
myProgress = Math.floor(100 * (myProgress / 90));
var combinedProScore = 0;
var combinedParScore = 0;
tempNumber = 0;
i = 0;
while (i < 30) {
if (myTimes[i] != 0) {
tempNumber = tempNumber + myTimes[i];
combinedProScore = combinedProScore + proScores[i];
combinedParScore = combinedParScore + parTimes[i];
} else {
submit._visible = false;
}
i++;
}
if (tempNumber > combinedProScore) {
totMe.totS.text = Math.abs(combinedProScore - tempNumber) + " over Pro Score";
} else if (tempNumber < combinedProScore) {
totMe.totS.text = Math.abs(combinedProScore - tempNumber) + " under Pro Score";
} else {
totMe.totS.text = "At Pro Score";
}
if (tempNumber > combinedParScore) {
totMe.totP.text = Math.abs(combinedParScore - tempNumber) + " over Par Score";
} else if (tempNumber < combinedParScore) {
totMe.totP.text = Math.abs(combinedParScore - tempNumber) + " under Par Score";
} else {
totMe.totP.text = "At Par Score";
}
if (tempNumber > 99) {
totMe.trippy.text = tempNumber;
} else if (tempNumber > 9) {
totMe.trippy.text = "0" + tempNumber;
} else {
totMe.trippy.text = "00" + tempNumber;
}
bg.gotoAndStop(myProgress + 1);
if (myProgress >= 75) {
goodStar.gotoAndStop(2);
}
if (myProgress >= 100) {
goodStar2.gotoAndStop(2);
}
if (myProgress < 10) {
myProgressDisp = ("0" + myProgress) + "%";
} else {
myProgressDisp = myProgress + "%";
}
codeBox._visible = false;
rest = "";
Frame 6
function callDescriptions() {
var _local1 = "L" + level;
var _local2 = "Par Score: " + parTimes[level - 1];
parR.text = _local2;
proR.text = "Pro Score: " + proScores[level - 1];
descriptR.text = _local1;
if (Number(((totUp + totDown) + totLeft) + totRight) > parTimes[level - 1]) {
usedR = ("Total Used: <font color='#990000'>" + Number(((totUp + totDown) + totLeft) + totRight)) + "</font>";
} else {
usedR = ("Total Used: <font color='#FFFFFF'>" + Number(((totUp + totDown) + totLeft) + totRight)) + "</font>";
}
}
function resetCompulses() {
totLeft = (totRight = (totUp = (totDown = 0)));
holder.removeMovieClip();
createEmptyMovieClip("holder", k++);
compulses.splice(0, compulses.length);
}
function triggerInstantReplay() {
levelComplete.removeMovieClip();
levelMenu.removeMovieClip();
mainMode = "instantReplay";
globalPause = false;
cStatus = true;
resetMap();
playCounter = 0;
playMode = "paused";
shel = attachMovie("playControls", "playControls", k++);
}
function backToMenu() {
killSwitch();
gotoAndStop ("menu");
}
function replayLevel() {
globalPause = false;
cStatus = false;
resetButton._visible = true;
levelComplete.removeMovieClip();
levelMenu.removeMovieClip();
resetMap();
mainMode = "normal";
ball.gotoAndStop(1);
goButton._visible = true;
stopButton._visible = false;
resetRecordMemory();
}
function killSwitch() {
for (var _local2 in _root) {
if (typeof(_root[_local2]) == "movieclip") {
_root[_local2].removeMovieClip();
}
}
}
function closePlayControls() {
globalPause = true;
cStatus = false;
triggerLevelMenu();
resetMap();
mainMode = "normal";
playControls.removeMovieClip();
}
function nextLevel() {
level++;
levelDisp = "L" + level;
resetButton._visible = true;
clearBitmap();
resetCompulses();
callDescriptions();
levelComplete.removeMovieClip();
levelMenu.removeMovieClip();
levels.nextFrame();
globalPause = false;
cStatus = false;
stopButton._visible = false;
goButton._visible = true;
ball.gotoAndStop(1);
mainMode = "normal";
resetMap();
resetRecordMemory();
regenerateCodeMap();
}
function regenerateCodeMap() {
if (myTimes[level - 1] != 0) {
loadCode(levCodes[level - 1]);
}
}
function playPoints() {
if (playMode == "normalPlay") {
playCounter++;
}
if (playMode == "normalRewind") {
playCounter--;
}
if (playMode == "fastPlay") {
playCounter = playCounter + 4;
}
if (playMode == "fastRewind") {
playCounter = playCounter - 4;
}
if (playMode == "slowPlay") {
playCounter = playCounter + 0.5;
}
if (playMode == "slowRewind") {
playCounter = playCounter - 0.5;
}
ball._x = recordX[playCounter];
ball._y = recordY[playCounter];
if (playCounter > recordX.length) {
if (playLoop) {
playCounter = 0;
} else {
playCounter = recordX.length;
}
}
if (playCounter < 0) {
playCounter = 0;
}
}
function bitmapLine(startx, starty, endx, endy) {
(myX = Array());
(myY = Array());
x3 = (endx - startx) / 100;
y3 = (endy - starty) / 100;
a = 1;
while (a < 101) {
startx = startx + x3;
starty = starty + y3;
myX.push(startx);
myY.push(starty);
a++;
}
a = 1;
while (a < 101) {
bmp1.setPixel32(myX[a - 1], myY[a - 1], 872415231);
a++;
}
}
function clearBitmap() {
bmp1.fillRect(new flash.geom.Rectangle(0, 0, 550, 550), 0);
olderX = ball._x;
olderY = ball._y;
}
function drawPath() {
if (!hitBomb) {
bitmapLine(ball._x, ball._y, olderX, olderY);
olderX = ball._x;
olderY = ball._y;
}
}
function goalDetection() {
if (ball.hitTest(levels.goal.hitA)) {
globalPause = true;
shel = attachMovie("levelComplete", "levelComplete", k++);
shel._x = levels.goal._x;
shel._y = levels.goal._y;
tempNumber = Number(((totUp + totDown) + totLeft) + totRight);
generateLevelCode();
if (myTimes[level - 1] == 0) {
myTimes[level - 1] = tempNumber;
levCodes[level - 1] = levelCode;
} else if (myTimes[level - 1] >= tempNumber) {
myTimes[level - 1] = tempNumber;
levCodes[level - 1] = levelCode;
}
saveGame();
}
}
function triggerLevelMenu() {
shel = attachMovie("levelMenu", "levelMenu", k++);
shel._x = 93;
shel._y = 230;
shel.levelMenuDisp.text = ("Level " + level) + " Completed!";
}
function resetMap() {
ball._x = levels.startPoint._x;
ball._y = levels.startPoint._y;
xVel = 0;
yVel = 0;
totRings = ringsOnLevels[level - 1];
i = 1;
while (i <= totRings) {
levels.goal["ring" + i]._visible = false;
levels["rSwitch" + i]._visible = true;
i++;
}
i = totRings + 1;
while (i <= 4) {
levels.goal["ring" + i]._visible = true;
levels["rSwitch" + i]._visible = false;
i++;
}
i = 1;
while (i <= 4) {
levels["rSwitch" + i].gotoAndStop(1);
i++;
}
if (totRings != 0) {
levels.goal.gotoAndStop(2);
}
ringsCollected = 0;
}
function ringsHad() {
i = 1;
while (i <= 4) {
if (ball.hitTest(levels["rSwitch" + i])) {
if (levels["rSwitch" + i]._visible && (levels["rSwitch" + i]._currentframe == 1)) {
ringsCollected++;
levels.goal["ring" + i]._visible = true;
levels["rSwitch" + i].gotoAndStop(2);
shel = attachMovie("liner", "liner" + k, k++);
shel._x = 0;
shel._y = 0;
switch (i) {
case 1 :
hexy = 13209;
break;
case 2 :
hexy = 16711680 /* 0xFF0000 */;
break;
case 3 :
hexy = 13408512 /* 0xCC9900 */;
break;
case 4 :
hexy = 9657208 /* 0x935B78 */;
}
shel.flip.lineStyle(10, hexy, 50);
shel.flip.moveTo(levels["rSwitch" + i]._x, levels["rSwitch" + i]._y);
shel.flip.lineTo(levels._x + levels.goal._x, levels._y + levels.goal._y);
shel.flip.lineStyle(2, hexy, 100);
shel.flip.moveTo(levels["rSwitch" + i]._x, levels["rSwitch" + i]._y);
shel.flip.lineTo(levels._x + levels.goal._x, levels._y + levels.goal._y);
}
}
i++;
}
if (ringsCollected == totRings) {
levels.goal.gotoAndStop(1);
}
}
function resetRecordMemory() {
recordX.splice(0, recordX.length);
recordY.splice(0, recordY.length);
}
function record() {
recordX.push(ball._x);
recordY.push(ball._y);
}
function ballColors() {
ball.gotoAndStop(2);
}
function depths() {
drawArea.swapDepths(k++);
ball.swapDepths(k++);
}
function compulseReactions() {
i = 0;
while (i < compulses.length) {
tile = holder[compulses[i]];
if (tile.hitA.hitTest(ball)) {
switch (tile.type) {
case "left" :
xVel = xVel - boostSpeed;
break;
case "right" :
xVel = xVel + boostSpeed;
break;
case "up" :
yVel = yVel - boostSpeed;
break;
case "down" :
yVel = yVel + boostSpeed;
}
}
i++;
}
}
function boundaries() {
if ((ball._y + radius) > 460) {
yVel = -Math.abs(yVel);
ball._y = 460 - radius;
yDamper();
}
if ((ball._y - radius) < 10) {
yVel = Math.abs(yVel);
ball._y = 10 + radius;
yDamper();
}
if ((ball._x + radius) > 540) {
xVel = -Math.abs(xVel);
ball._x = 540 - radius;
xDamper();
}
if ((ball._x - radius) < 10) {
xVel = Math.abs(xVel);
ball._x = 10 + radius;
xDamper();
}
}
function ballVelocity() {
yVel = yVel + gravity;
ball._x = ball._x + xVel;
ball._y = ball._y + yVel;
}
function xDamper() {
xVel = xVel * 0.9;
if (Math.abs(xVel) > 2) {
rav.start(0, 1);
}
}
function yDamper() {
yVel = yVel * 0.9;
if (Math.abs(yVel) > 2) {
rav.start(0, 1);
}
}
function triggerStoppage() {
cStatus = false;
ball._visible = true;
ball.gotoAndStop(1);
resetMap();
resetRecordMemory();
goButton._visible = true;
stopButton._visible = false;
resetButton._visible = true;
}
function generateLevelCode() {
levelCode = "";
i = 0;
while (i < compulses.length) {
switch (holder[compulses[i]].type) {
case "left" :
tempMark = "L";
break;
case "right" :
tempMark = "R";
break;
case "up" :
tempMark = "U";
break;
case "down" :
tempMark = "D";
}
levelCode = levelCode + tempMark;
levelCode = levelCode + holder[compulses[i]]._x;
levelCode = levelCode + "x";
levelCode = levelCode + holder[compulses[i]]._y;
levelCode = levelCode + "|";
i++;
}
}
function loadCode(str) {
drawArea.clear();
clearBitmap();
resetCompulses();
kitty = str;
taft.splice(0, taft.length);
taftCounter = 0;
taftTemp = "";
g = 0;
while (g < kitty.length) {
tempChar = kitty.charAt(g);
if (tempChar == "|") {
taft.push(taftTemp);
taftTemp = "";
} else {
taftTemp = taftTemp + tempChar;
}
g++;
}
g = 0;
while (g < taft.length) {
stager = 0;
taftqx = "";
taftqy = "";
h = 0;
while (h < taft[g].length) {
if (h == 0) {
stager = 1;
switch (taft[g].charAt(h)) {
case "D" :
shel = holder.attachMovie("downTile", "l" + k, k++);
shel.type = "down";
totDown++;
compulses.push("l" + k);
break;
case "U" :
shel = holder.attachMovie("upTile", "l" + k, k++);
shel.type = "up";
totUp++;
compulses.push("l" + k);
break;
case "L" :
shel = holder.attachMovie("leftTile", "l" + k, k++);
shel.type = "left";
totLeft++;
compulses.push("l" + k);
break;
case "R" :
shel = holder.attachMovie("rightTile", "l" + k, k++);
shel.type = "right";
totRight++;
compulses.push("l" + k);
break;
default :
trace("ERROR");
}
} else if (stager == 1) {
if (taft[g].charAt(h) != "x") {
taftqx = taftqx + taft[g].charAt(h);
} else {
shel._x = Number(taftqx);
stager = 2;
}
} else if (stager == 2) {
taftqy = taftqy + taft[g].charAt(h);
if (h == (taft[g].length - 1)) {
shel._y = Number(taftqy);
trace(taftqy);
}
}
h++;
}
g++;
}
generateLevelCode();
}
stop();
var levelCode = "";
var ringSpeed = 3;
var cStatus = false;
var gravity = 0.3;
var gDirection = "down";
var xVel = 0;
var yVel = 0;
var boostSpeed = 1;
var radius = (ball._width / 2);
var totUp = 0;
var totDown = 0;
var totLeft = 0;
var totRight = 0;
var globalPause = false;
var level = levChoice;
var levelDisp = ("L" + level);
levels.gotoAndStop(level);
callDescriptions();
var recordX = new Array();
var recordY = new Array();
var playCounter = 0;
var playLoop = false;
var playMode = "paused";
var mainMode = "normal";
onEnterFrame = function () {
callDescriptions();
if (!globalPause) {
if (cStatus) {
if (mainMode == "normal") {
mainRings();
ballColors();
compulseReactions();
boundaries();
ballVelocity();
record();
depths();
goalDetection();
ringsHad();
drawPath();
} else if (mainMode == "instantReplay") {
playPoints();
}
}
}
};
var bmp1 = (new flash.display.BitmapData(550, 550, true, 0));
drawArea.attachBitmap(bmp1, k++);
var olderX = 0;
var olderY = 0;
var hitBomb = false;
var totRings = 0;
var ringsCollected = 0;
resetMap();
var compulses = new Array();
var rav = new Sound(this);
rav.attachSound("wood3");
var k = 0;
var foundLove = false;
var dropOne = true;
_root.createEmptyMovieClip("holder", k++);
onMouseDown = function () {
if ((!cStatus) && (!globalPause)) {
dropOne = true;
i = 0;
while (i < compulses.length) {
if (holder[compulses[i]].hitA.hitTest(_xmouse, _ymouse)) {
dropOne = false;
}
i++;
}
foundLove = false;
if (leftTileButton.hitA.hitTest(_xmouse, _ymouse)) {
shel = holder.attachMovie("leftTile", "l" + k, k++);
shel.type = "left";
foundLove = true;
totLeft++;
} else if (upTileButton.hitA.hitTest(_xmouse, _ymouse)) {
shel = holder.attachMovie("upTile", "l" + k, k++);
shel.type = "up";
foundLove = true;
totUp++;
} else if (rightTileButton.hitA.hitTest(_xmouse, _ymouse)) {
shel = holder.attachMovie("rightTile", "l" + k, k++);
shel.type = "right";
foundLove = true;
totRight++;
} else if (downTileButton.hitA.hitTest(_xmouse, _ymouse)) {
shel = holder.attachMovie("downTile", "l" + k, k++);
shel.type = "down";
foundLove = true;
totDown++;
} else {
i = 0;
while (i < compulses.length) {
if (holder[compulses[i]].hitA.hitTest(_xmouse, _ymouse)) {
holder[compulses[i]].startDrag();
}
i++;
}
}
if (foundLove) {
shel._x = _xmouse;
shel._y = _ymouse;
shel.startDrag(true);
compulses.push("l" + k);
}
}
trace(compulses);
};
onMouseUp = function () {
i = 0;
while (i < compulses.length) {
holder[compulses[i]].stopDrag();
if ((holder[compulses[i]]._y > 460) || (holder[compulses[i]]._x > 540)) {
switch (holder[compulses[i]].type) {
case "left" :
totLeft--;
break;
case "right" :
totRight--;
break;
case "up" :
totUp--;
break;
case "down" :
totDown--;
}
holder[compulses[i]].removeMovieClip();
compulses.splice(i, 1);
}
i++;
}
generateLevelCode();
};
goButton._visible = true;
stopButton._visible = false;
goButton.onRelease = function () {
hitBomb = false;
if ((!globalPause) && (mainMode == "normal")) {
drawArea.clear();
drawArea.moveTo(ball._x, ball._y);
clearBitmap();
cStatus = true;
stopButton._visible = true;
goButton._visible = false;
resetButton._visible = false;
}
};
stopButton.onRelease = function () {
if ((!globalPause) && (mainMode == "normal")) {
triggerStoppage();
}
};
resetButton.onRelease = function () {
if ((!globalPause) && (mainMode == "normal")) {
drawArea.clear();
clearBitmap();
resetCompulses();
generateLevelCode();
}
};
var taft = new Array();
var kitty = new String();
var taftCounter = 0;
var taftTemp = new String();
loadButton.onRelease = function () {
if ((!globalPause) && (mainMode == "normal")) {
loadCode(loadArea.text);
}
};
regenerateCodeMap();
Symbol 11 MovieClip [levelComplete] Frame 21
stop();
_root.triggerLevelMenu();
Symbol 19 Button
on (release) {
if (_root.level == 30) {
_root.backToMenu();
} else {
_root.nextLevel();
}
}
Symbol 21 Button
on (release) {
_root.replayLevel();
}
Symbol 23 Button
on (release) {
_root.triggerInstantReplay();
}
Symbol 28 Button
on (release) {
_root.backToMenu();
}
Symbol 31 MovieClip [levelMenu] Frame 20
stop();
Symbol 37 Button
on (release) {
_root.playMode = "paused";
}
Symbol 40 Button
on (release) {
_root.playMode = "slowPlay";
}
Symbol 41 Button
on (release) {
_root.playMode = "normalPlay";
}
Symbol 42 Button
on (release) {
_root.playMode = "fastPlay";
}
Symbol 43 Button
on (release) {
_root.playMode = "slowRewind";
}
Symbol 44 Button
on (release) {
_root.playMode = "normalRewind";
}
Symbol 45 Button
on (release) {
_root.playMode = "fastRewind";
}
Symbol 51 Button
on (release) {
_root.closePlayControls();
}
Symbol 52 MovieClip [playControls] Frame 15
stop();
Symbol 54 MovieClip [starX] Frame 1
xVel = random(10) - 5;
yVel = random(10) - 5;
grav = 0.3;
onEnterFrame = function () {
yVel = yVel + grav;
_x = (_x + xVel);
_y = (_y + yVel);
_alpha = (_alpha-1);
if (_alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 56 MovieClip [liner] Frame 30
this.removeMovieClip();
Symbol 59 MovieClip Frame 1
this._visible = false;
Symbol 80 MovieClip Frame 1
stop();
Symbol 100 Button
on (release) {
getURL ("http://www.armorgames.com/", "_blank");
}
Symbol 110 Button
on (release) {
_root.killAd();
_root.play();
}
Symbol 111 MovieClip Frame 1
stop();
act = false;
Symbol 111 MovieClip Frame 10
stop();
Symbol 121 MovieClip Frame 1
onEnterFrame = function () {
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
pfixEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(pfixEnd, domain.length);
if ((domain != "") && (domain != "armorgames.com")) {
_root.exclusive._visible = true;
} else {
_root.exclusive._visible = false;
}
};
this._alpha = 0;
Symbol 136 MovieClip Frame 126
_root.nextFrame();
Symbol 141 MovieClip Frame 1
stop();
Symbol 145 MovieClip [block] Frame 30
stop();
Symbol 148 MovieClip [blockBall] Frame 15
this.removeMovieClip();
Symbol 159 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (Key.isDown(32) && (_currentframe < 98)) {
gotoAndPlay(_currentframe + 2);
}
};
Symbol 159 MovieClip Frame 100
_parent.play();
stop();
Symbol 165 MovieClip [complete] Frame 1
_root.generateFacts();
Symbol 165 MovieClip [complete] Frame 30
stop();
filler.play();
Symbol 165 MovieClip [complete] Frame 50
if (_root.playAll) {
if (_root.level == 25) {
_root.gotoMenu();
this.removeMovieClip();
}
_root.resetStage();
_root.loadFadeOut();
this.removeMovieClip();
} else {
_root.gotoMenu();
this.removeMovieClip();
}
Symbol 169 MovieClip [loadFadeOut] Frame 1
onEnterFrame = function () {
this._x = _root.camera._x;
this._y = _root.camera._y;
};
Symbol 169 MovieClip [loadFadeOut] Frame 12
this.removeMovieClip();
Symbol 173 MovieClip [port-sign] Frame 10
this.removeMovieClip();
Symbol 175 MovieClip Frame 1
stop();
Symbol 197 Button
on (release) {
_root.savefile.data.oldName = _root.oldName;
play();
}
Symbol 199 Button
on (release) {
play();
}
Symbol 202 MovieClip Frame 1
_root.oldName = "Me";
Symbol 202 MovieClip Frame 10
stop();
Symbol 202 MovieClip Frame 108
_root.play();
Symbol 205 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 1
stop();
Symbol 214 MovieClip Frame 1
stop();
Symbol 219 Button
on (release) {
levChoice = 1;
playAll = true;
whiteFade.play();
}
Symbol 226 Button
on (release) {
oldName = "fewigmw";
gotoAndStop ("router");
}
Symbol 231 Button
on (release) {
generateScoreCard();
}
Symbol 239 Button
on (release) {
getURL ("http://armorblog.com/?p=320", "_blank");
}
Symbol 248 MovieClip Frame 10
stop();
Symbol 248 MovieClip Frame 45
_root.gotoAndStop("game");
Symbol 266 MovieClip Frame 1
stop();
Symbol 289 MovieClip Frame 1
this._alpha = 0;
Symbol 291 MovieClip Frame 1
onEnterFrame = function () {
this._rotation = this._rotation + (_root.ringSpeed * 2);
};
Symbol 292 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 15
stop();
Symbol 294 MovieClip Frame 1
onEnterFrame = function () {
this._rotation = this._rotation + (_root.ringSpeed * 1.75);
};
Symbol 295 MovieClip Frame 1
stop();
Symbol 295 MovieClip Frame 15
stop();
Symbol 297 MovieClip Frame 1
onEnterFrame = function () {
this._rotation = this._rotation + (_root.ringSpeed * 1.5);
};
Symbol 298 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 15
stop();
Symbol 300 MovieClip Frame 1
onEnterFrame = function () {
this._rotation = this._rotation + (_root.ringSpeed * 1.25);
};
Symbol 301 MovieClip Frame 1
stop();
Symbol 301 MovieClip Frame 10
stop();
Symbol 302 MovieClip Frame 1
stop();
Symbol 309 MovieClip Frame 1
onEnterFrame = function () {
this._rotation = this._rotation + 5;
};
myRot = 0;
Symbol 312 MovieClip Frame 6
stop();
Symbol 314 MovieClip Frame 1
stop();
this._name = "rSwitch1";
Symbol 317 MovieClip Frame 1
stop();
this._name = "rSwitch2";
Symbol 319 MovieClip Frame 1
onEnterFrame = function () {
if (this.hitA.hitTest(_root.ball)) {
if (_root.ball._visible == true) {
_root.ball._visible = false;
_root.hitBomb = true;
var _local3 = new Sound(this);
_local3.attachSound("BANJO");
_local3.start(0, 1);
i = 0;
while (i < 20) {
shel = _root.attachMovie("starX", "s" + _root.k, _root.k++);
shel._x = _root.ball._x;
shel._y = _root.ball._y;
i++;
}
}
_root.xVel = 0;
_root.yVel = 0;
_root.yVel = _root.yVel + _root.grav;
_root.triggerStoppage();
}
};
Symbol 325 MovieClip Frame 1
onEnterFrame = function () {
if (this.hitTest(_root.ball) && (_root.yVel > 0)) {
_root.yVel = -Math.abs(_root.yVel);
_root.ball._y = this._y - _root.radius;
_root.yDamper();
}
};
Symbol 327 MovieClip Frame 1
stop();
this._name = "rSwitch3";
Symbol 329 MovieClip Frame 1
stop();
this._name = "rSwitch4";
Symbol 336 MovieClip Frame 1
stop();
Symbol 340 MovieClip Frame 1
letter = _name.substr(0, 1);
number = _name.substr(1, 3000);
activeTimeOut = false;
onEnterFrame = function () {
if (activeTimeOut == true) {
if (!_root.ball.hitTest(this)) {
activeTimeOut = false;
}
tele.gotoAndStop(2);
} else {
tele.gotoAndStop(1);
if (this.hitTest(_root.ball)) {
var _local3 = new Sound(this);
_local3.attachSound("PIPE");
_local3.start(0, 1);
if (letter == "a") {
_root.levels["b" + number].activeTimeOut = true;
_root.ball._x = _root.levels["b" + number]._x;
_root.ball._y = _root.levels["b" + number]._y;
} else if (letter == "b") {
_root.levels["a" + number].activeTimeOut = true;
_root.ball._x = _root.levels["a" + number]._x;
_root.ball._y = _root.levels["a" + number]._y;
}
}
}
};
Symbol 344 MovieClip Frame 1
onEnterFrame = function () {
if (this.hitTest(_root.ball) && (_root.xVel > 0)) {
_root.xVel = -Math.abs(_root.xVel);
_root.ball._x = this._x - _root.radius;
_root.xDamper();
}
};
Symbol 349 MovieClip Frame 1
onEnterFrame = function () {
if (this.hitTest(_root.ball) && (_root.yVel < 0)) {
_root.yVel = Math.abs(_root.yVel);
_root.ball._y = this._y + _root.radius;
_root.yDamper();
}
};
Symbol 354 MovieClip Frame 1
onEnterFrame = function () {
if (this.hitTest(_root.ball) && (_root.xVel < 0)) {
_root.xVel = Math.abs(_root.xVel);
_root.ball._x = this._x + _root.radius;
_root.xDamper();
}
};
Symbol 368 MovieClip Frame 1
stop();
Symbol 379 Button
on (release) {
muted = !muted;
muteHandler();
}
Symbol 395 Button
on (release) {
_root.backToMenu();
}