Frame 1
maximumStage = 0;
stageSelect = 0;
Frame 2
function limitCheck() {
if (stageSelect < 1) {
btnPrev._alpha = 50;
btnPrev.enabled = false;
} else {
btnPrev._alpha = 100;
btnPrev.enabled = true;
}
if (stageSelect == maximumStage) {
btnNext._alpha = 50;
btnNext.enabled = false;
} else {
btnNext._alpha = 100;
btnNext.enabled = true;
}
}
stop();
btnStart.onRelease = function () {
Mouse.hide();
chosenStage = stageSelect;
gotoAndStop (3);
};
stageSelect = 0;
stageNum.text = stageSelect + 1;
limitCheck();
btnNext.onRelease = function () {
if (btnNext.enabled) {
stageSelect++;
limitCheck();
stageNum.text = stageSelect + 1;
}
};
btnPrev.onRelease = function () {
if (btnPrev.enabled) {
stageSelect--;
limitCheck();
stageNum.text = stageSelect + 1;
}
};
Frame 3
stop();
Symbol 69 MovieClip Frame 8
stop();
Symbol 74 MovieClip Frame 1
stop();
Symbol 74 MovieClip Frame 14
gotoAndStop (1);
Symbol 74 MovieClip Frame 32
gotoAndStop (1);
Symbol 74 MovieClip Frame 51
gotoAndStop (1);
Symbol 74 MovieClip Frame 52
play();
Symbol 81 MovieClip Frame 49
gotoAndPlay ("loop");
Symbol 94 MovieClip Frame 26
stop();
Symbol 95 MovieClip Frame 26
stop();
Symbol 97 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 2
play();
Symbol 112 MovieClip Frame 17
gotoAndStop (1);
Symbol 120 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 2
play();
Symbol 120 MovieClip Frame 15
stop();
Symbol 120 MovieClip Frame 16
play();
Symbol 120 MovieClip Frame 30
stop();
Symbol 120 MovieClip Frame 31
play();
Symbol 120 MovieClip Frame 37
rx = 150 + random(100);
ry = 150 + random(100);
this._parent.spawnExplosion(rx, ry, 1, 20, 0, 0);
Symbol 120 MovieClip Frame 40
rx = 150 + random(100);
ry = 150 + random(100);
this._parent.spawnExplosion(rx, ry, 1, 15, 0, 0);
Symbol 120 MovieClip Frame 43
rx = 150 + random(100);
ry = 150 + random(100);
this._parent.spawnExplosion(rx, ry, 1, 10, 0, 0);
Symbol 120 MovieClip Frame 48
rx = 150 + random(100);
ry = 150 + random(100);
this._parent.spawnExplosion(rx, ry, 1, 8, 0, 0);
Symbol 120 MovieClip Frame 56
rx = 150 + random(100);
ry = 150 + random(100);
this._parent.spawnExplosion(rx, ry, 1, 4, 0, 0);
Symbol 120 MovieClip Frame 60
rx = 150 + random(100);
ry = 150 + random(100);
this._parent.spawnExplosion(rx, ry, 1, 3, 0, 0);
Symbol 120 MovieClip Frame 66
rx = 150 + random(100);
ry = 150 + random(100);
this._parent.spawnExplosion(rx, ry, 1, 1, 0, 0);
Symbol 120 MovieClip Frame 68
rx = 150 + random(100);
ry = 150 + random(100);
this._parent.spawnExplosion(rx, ry, 1, 4, 0, 0);
Symbol 120 MovieClip Frame 82
rx = 150 + random(100);
ry = 150 + random(100);
this._parent.spawnExplosion(rx, ry, 1, 6, 0, 0);
Symbol 120 MovieClip Frame 93
rx = 150 + random(100);
ry = 150 + random(100);
this._parent.spawnExplosion(rx, ry, 1, 3, 0, 0);
Symbol 120 MovieClip Frame 98
rx = 150 + random(100);
ry = 150 + random(100);
this._parent.spawnExplosion(rx, ry, 1, 3, 0, 0);
Symbol 120 MovieClip Frame 113
rx = 150 + random(100);
ry = 150 + random(100);
this._parent.spawnExplosion(rx, ry, 1, 3, 0, 0);
Symbol 120 MovieClip Frame 137
fScore.finalScore.text = ("" + _parent.theFinalScore) + "";
fScore.finalRating.text = ("" + _parent.theFinalRating) + "";
Mouse.show();
Symbol 120 MovieClip Frame 245
stop();
btnOK.onRelease = function () {
_parent._parent.gotoAndStop(2);
};
Symbol 124 MovieClip Frame 1
ln = 1;
this["pattern" + ln] = [2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[2], [25]];
this["name" + ln] = "yellow bentines";
ln++;
this["pattern" + ln] = [5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[5], [22]];
this["name" + ln] = "double helix";
ln++;
this["pattern" + ln] = [6, 6, 6, 6, 1, 1, 1, 1, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[6], [24]];
this["name" + ln] = "slit scan";
ln++;
this["pattern" + ln] = [4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1];
this["blobs" + ln] = [[4, 3], [23]];
this["name" + ln] = "positive negative";
ln++;
this["pattern" + ln] = [8, 8, 8, 1, 1, 3, 3, 3, 1, 1, 8, 8, 8, 1, 1, 3, 3, 3, 1, 1];
this["blobs" + ln] = [[8, 3], [21]];
this["name" + ln] = "isotopic balance";
ln++;
this["pattern" + ln] = [2, 2, 2, 2, 1, 1, 3, 3, 3, 3, 1, 1, 8, 8, 8, 8, 1, 1, 1, 1];
this["blobs" + ln] = [[2, 3, 8], [23]];
this["name" + ln] = "neopolitan";
ln++;
this["pattern" + ln] = [1, 1, 1, 6, 6, 6, 8, 8, 8, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[6, 8, 2], [25]];
this["name" + ln] = "thermostat";
ln++;
this["pattern" + ln] = [2, 2, 1, 3, 3, 3, 1, 1, 1, 4, 4, 4, 1, 5, 5, 5, 1, 1, 1, 2];
this["blobs" + ln] = [[2, 3, 4, 5], [24]];
this["name" + ln] = "gordon is a moron";
ln++;
this["pattern" + ln] = [5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[5], [15]];
this["name" + ln] = "revenge of the nerds";
ln++;
this["pattern" + ln] = [7, 7, 7, 7, 9, 9, 9, 9, 4, 4, 4, 4, 6, 6, 6, 6, 1, 1, 1, 1];
this["blobs" + ln] = [[7, 9, 4, 6], [24]];
this["name" + ln] = "the jungle came alive and took him";
ln++;
this["pattern" + ln] = [10, 10, 10, 1, 1, 1, 1, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[10, 5], [22]];
this["name" + ln] = "you're lying through your teeth";
ln++;
this["pattern" + ln] = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7];
this["blobs" + ln] = [[7], [1]];
this["name" + ln] = "love will torus apart";
ln++;
this["pattern" + ln] = [6, 6, 6, 6, 2, 2, 2, 2, 5, 5, 5, 5, 7, 7, 7, 7, 9, 9, 9, 9];
this["blobs" + ln] = [[6, 2, 5, 7, 9], [23]];
this["name" + ln] = "rod, jane and freddy";
ln++;
this["pattern" + ln] = [1, 1, 1, 1, 4, 4, 4, 4, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[4, 3], [18]];
this["name" + ln] = "kraetschmer-huffman";
ln++;
this["pattern" + ln] = [6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1];
this["blobs" + ln] = [[6, 3], [16]];
this["name" + ln] = "zeroes and ones";
ln++;
this["pattern" + ln] = [6, 6, 8, 8, 2, 2, 5, 5, 3, 3, 9, 9, 7, 7, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[6, 8, 2, 5, 3, 9, 7], [27]];
this["name" + ln] = "mass spectrometry";
ln++;
this["pattern" + ln] = [8, 8, 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[8], [14]];
this["name" + ln] = "the curious orange";
ln++;
this["pattern" + ln] = [8, 8, 8, 8, 1, 1, 7, 7, 1, 1, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[8, 8, 5, 5, 7], [18]];
this["name" + ln] = "terrahawks";
ln++;
this["pattern" + ln] = [9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10];
this["blobs" + ln] = [[9, 10], [22]];
this["name" + ln] = "james brown is dead";
ln++;
this["pattern" + ln] = [3, 7, 7, 1, 1, 1, 1, 1, 1, 2, 2, 6, 6, 1, 1, 1, 1, 1, 1, 3];
this["blobs" + ln] = [[3, 7, 2, 6], [21]];
this["name" + ln] = "the flowers are still standing";
ln++;
this["pattern" + ln] = [2, 2, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 2, 2];
this["blobs" + ln] = [[2, 2, 6], [17]];
this["name" + ln] = "international bestseller";
ln++;
this["pattern" + ln] = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
this["blobs" + ln] = [[10], [1]];
this["name" + ln] = "friendly bacteria";
ln++;
this["pattern" + ln] = [8, 8, 1, 1, 1, 1, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[8, 6], [20]];
this["name" + ln] = "rule of thumb";
ln++;
this["pattern" + ln] = [8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[8], [16]];
this["name" + ln] = "ule f humb";
ln++;
this["pattern" + ln] = [2, 2, 2, 2, 2, 2, 2, 2, 10, 10, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10];
this["blobs" + ln] = [[2, 2, 10], [15]];
this["name" + ln] = "delia smith's perfect poached egg";
ln++;
this["pattern" + ln] = [10, 10, 10, 3, 3, 9, 9, 9, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[10, 3, 3, 3, 9], [18]];
this["name" + ln] = "diffraction pattern";
ln++;
this["pattern" + ln] = [9, 9, 3, 3, 1, 1, 1, 1, 3, 3, 9, 9, 7, 7, 1, 1, 1, 1, 7, 7];
this["blobs" + ln] = [[9, 3, 7], [18]];
this["name" + ln] = "bravais lattice i";
ln++;
this["pattern" + ln] = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
this["blobs" + ln] = [[6], [1]];
this["name" + ln] = "four minute warning";
ln++;
this["pattern" + ln] = [9, 9, 3, 3, 1, 1, 1, 1, 1, 1, 6, 6, 1, 1, 1, 1, 1, 1, 7, 7];
this["blobs" + ln] = [[9, 3, 7, 6], [18]];
this["name" + ln] = "bravais lattice ii";
ln++;
this["pattern" + ln] = [1, 1, 1, 1, 1, 1, 1, 6, 1, 6, 1, 6, 1, 6, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[6], [23]];
this["name" + ln] = "quantum diffraction";
ln++;
this["pattern" + ln] = [6, 6, 8, 8, 2, 2, 8, 8, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[6, 8, 2], [19]];
this["name" + ln] = "fusion reactor";
ln++;
this["pattern" + ln] = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 9, 9];
this["blobs" + ln] = [[4, 4, 4, 4, 4, 4, 4, 4, 4, 9], [1]];
this["name" + ln] = "probabilities";
ln++;
this["pattern" + ln] = [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12];
this["blobs" + ln] = [[12], [1]];
this["name" + ln] = "dark matter";
ln++;
this["pattern" + ln] = [12, 12, 12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[12], [18]];
this["name" + ln] = "rift";
ln++;
this["pattern" + ln] = [12, 12, 12, 12, 1, 1, 1, 1, 1, 1, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[12, 6], [20]];
this["name" + ln] = "dark energy";
ln++;
this["pattern" + ln] = [12, 12, 12, 1, 1, 1, 1, 1, 4, 4, 4, 1, 3, 3, 3, 1, 1, 1, 1, 1];
this["blobs" + ln] = [[4, 4, 3, 3, 12], [20]];
this["name" + ln] = "calabi-yau manifold";
ln++;
this["pattern" + ln] = [12, 12, 12, 12, 12, 12, 12, 12, 2, 2, 2, 2, 6, 6, 6, 6, 12, 12, 12, 12];
this["blobs" + ln] = [[12, 12, 12, 2, 6], [17]];
this["name" + ln] = "up quark";
ln++;
this["pattern" + ln] = [12, 12, 12, 12, 12, 12, 12, 12, 12, 2, 2, 8, 8, 6, 6, 12, 12, 12, 12, 12];
this["blobs" + ln] = [[12, 12, 12, 2, 6, 8], [16]];
this["name" + ln] = "down quark";
ln++;
this["pattern" + ln] = [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 4, 12, 12, 12, 12, 12, 12, 12];
this["blobs" + ln] = [[12, 12, 12, 4], [14]];
this["name" + ln] = "strange quark";
ln++;
this["pattern" + ln] = [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 3, 12, 12, 12, 12, 12, 12, 12, 12];
this["blobs" + ln] = [[12, 12, 3], [12]];
this["name" + ln] = "antistrange quark";
ln++;
this["pattern" + ln] = [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 7, 12, 12, 12, 12, 12, 12, 12, 12];
this["blobs" + ln] = [[12, 7], [12]];
this["name" + ln] = "singularity";
ln++;
this["pattern" + ln] = [12, 12, 1, 7, 7, 9, 9, 9, 4, 4, 4, 4, 4, 4, 9, 9, 9, 7, 7, 1];
this["blobs" + ln] = [[12, 12, 12, 12, 7, 9, 4, 4], [18]];
this["name" + ln] = "forty-two";
ln++;
function fpsCalc() {
frameMeter = frameCount;
frameCount = 0;
}
function drawSegments() {
count = 0;
limit = 20;
while (count < limit) {
duplicateMovieClip (actorBank, ["segment" + this.count], segmentDepth + count);
this["segment" + count].gotoAndStop(2);
this["segment" + count].actor.gotoAndStop(1);
this["segment" + count]._x = 200;
this["segment" + count]._y = 200;
this["segment" + count]._rotation = 18 * count;
count++;
}
}
function rampItUp() {
this.patternStage++;
if (this.patternStage > (this._parent.maximumStage + 1)) {
this._parent.maximumStage++;
}
this.skipIt = 0;
if (this.patternStage > this.totalPatterns) {
this.skipIt = 1;
this.snd_welldone.start(0, 0);
this.theFinalScore = this.roundScore;
this.theFinalRating = this.getRating(this.theFinalScore);
clearInterval(this.theInterval);
this.theMessage.theName.text = "experiment complete";
segCount = 0;
segLimit = 20;
while (segCount < segLimit) {
this["segment" + segCount].gotoAndStop(5);
this["segment" + segCount].actor.gotoAndStop(11);
this["segment" + segCount].actor.overlay.gotoAndPlay("failure");
segCount++;
}
this.theMessage.gotoAndPlay("gameOver");
this.spawnExplosion(200, 200, 1, 80, 0, 0);
removeMovieClip(this.actionWatch);
}
if (this.skipIt == 0) {
currentPattern = this["pattern" + this.patternStage];
currentBlobs = this["blobs" + this.patternStage];
blobsThisRound = 0;
this.theMessage.theName.text = (("" + this.patternStage) + " - ") + this["name" + this.patternStage];
this.snd_level.start(0, 0);
this.score = this.score + 1000;
if (this.scoreVelo < 0) {
this.scoreVelo = 0;
}
}
}
function applyPattern() {
count = 0;
limit = 20;
while (count < limit) {
this["segment" + count].actor.gotoAndStop(this.currentPattern[count]);
this["segment" + count].myColour = this.currentPattern[count];
count++;
}
}
function spawnExplosion(xo, yo, colour, particles, gx, gy) {
count = 0;
while (count < particles) {
duplicateMovieClip (actorBank, ["particle" + this.exploDepth], this.exploDepth);
this["particle" + this.exploDepth].gotoAndStop(4);
this["particle" + this.exploDepth].actor.gotoAndStop(colour);
if (colour == 1) {
this["particle" + this.exploDepth].actor.particle.particle.gotoAndPlay(random(11) + 1);
}
this["particle" + this.exploDepth]._x = xo;
this["particle" + this.exploDepth]._y = yo;
myDirection = random(20);
this["particle" + this.exploDepth].myxv = this.vct[myDirection][0];
this["particle" + this.exploDepth].myyv = this.vct[myDirection][1];
this["particle" + this.exploDepth].myxg = gx * 0.1;
this["particle" + this.exploDepth].myyg = gy * 0.1;
this["particle" + this.exploDepth].mySpeed = (2 + random(25)) / 10;
myScale = 10 + random(40);
this["particle" + this.exploDepth]._xscale = myScale;
this["particle" + this.exploDepth]._yscale = myScale;
this["particle" + this.exploDepth].myFuse = 25;
this["particle" + this.exploDepth].onEnterFrame = function () {
this._x = this._x + (this.myxv * this.mySpeed);
this._y = this._y + (this.myyv * this.mySpeed);
this.myxv = this.myxv - this.myxg;
this.myyv = this.myyv - this.myyg;
this.myFuse--;
if (this.myFuse < 1) {
removeMovieClip(this);
}
};
this.exploDepth++;
if (this.exploDepth > (this.exploOrigin + 999)) {
this.exploDepth = this.exploOrigin;
}
count++;
}
}
function stageWatcher() {
if (this.changing == 2) {
this.changing = 0;
this.stage = this.stageLimit - this.stageRamp;
}
if ((this.changing == 1) && (this.blobsAlive == 0)) {
this.rampItUp();
if (this.skipIt == 0) {
this.applyPattern();
segCount = 0;
segLimit = 20;
while (segCount < segLimit) {
this["segment" + segCount].actor.overlay.gotoAndPlay("stageFlash");
segCount++;
}
this.changing = 2;
}
}
if (this.stage > this.stageLimit) {
this.stageLimit = this.stageLimit + this.stageRamp;
this.changing = 1;
}
}
function getRating(sc) {
if (sc < 1000) {
rt = "waste of oxygen";
}
if (sc > 999) {
rt = "dead skin cell";
}
if (sc > 1999) {
rt = "pondlife";
}
if (sc > 2999) {
rt = "phlegm";
}
if (sc > 3999) {
rt = "bacteria";
}
if (sc > 4999) {
rt = "compost";
}
if (sc > 5999) {
rt = "mouldy sandwich";
}
if (sc > 6999) {
rt = "pocket fluff";
}
if (sc > 7999) {
rt = "pez dispenser";
}
if (sc > 8999) {
rt = "floppy disk";
}
if (sc > 9999) {
rt = "lab rat";
}
if (sc > 12499) {
rt = "do you want fries with that?";
}
if (sc > 14999) {
rt = "pencil sharpener";
}
if (sc > 17499) {
rt = "estate agent";
}
if (sc > 19999) {
rt = "caged primate";
}
if (sc > 24999) {
rt = "shaven monkey";
}
if (sc > 29999) {
rt = "exceptional monkey";
}
if (sc > 34999) {
rt = "gm monkey";
}
if (sc > 39999) {
rt = "toilet cleaner";
}
if (sc > 44999) {
rt = "dinnerlady";
}
if (sc > 49999) {
rt = "vending machine repairman";
}
if (sc > 54999) {
rt = "lab receptionist";
}
if (sc > 59999) {
rt = "dropout student";
}
if (sc > 64999) {
rt = "work experience chump";
}
if (sc > 69999) {
rt = "wannabe scientist";
}
if (sc > 74999) {
rt = "have-a-go scientist";
}
if (sc > 79999) {
rt = "scrapethrough student";
}
if (sc > 84999) {
rt = "office temp";
}
if (sc > 89999) {
rt = "lab intern";
}
if (sc > 94999) {
rt = "lab assistant";
}
if (sc > 99999) {
rt = "trainee technician";
}
if (sc > 109999) {
rt = "lab technician";
}
if (sc > 119999) {
rt = "head technician";
}
if (sc > 129999) {
rt = "physics geek";
}
if (sc > 139999) {
rt = "professor";
}
if (sc > 149999) {
rt = "celebrity physicist";
}
if (sc > 159999) {
rt = "theoretical physicist";
}
if (sc > 169999) {
rt = "quantum engineer";
}
if (sc > 179999) {
rt = "evil genius";
}
if (sc > 189999) {
rt = "crazed experimentor";
}
if (sc > 199999) {
rt = "fusion pioneer";
}
if (sc > 209999) {
rt = "enhanced human";
}
if (sc > 219999) {
rt = "megalomaniac";
}
if (sc > 229999) {
rt = "human 2.0 alpha";
}
if (sc > 239999) {
rt = "a danger to society";
}
if (sc > 249999) {
rt = "human 2.0 beta";
}
if (sc > 499999) {
rt = "(classified)";
}
if (sc > 999999) {
rt = "spacetime anomaly";
}
return(rt);
}
stop();
duplicateMovieClip (blackblock, "block2", 30000);
this.block2._x = 0;
this.block2._y = 0;
this._parent.createEmptyMovieClip("fader", 20000);
this._parent.fader.theValue = 0;
this._parent.fader.onEnterFrame = function () {
this.diff = 100 - this.theValue;
this.theValue = this.theValue + Math.ceil(this.diff / 20);
if (this.theValue > 99) {
this._parent.game._alpha = 100;
removeMovieClip(this);
} else {
this._parent.game._alpha = this.theValue;
}
this._parent.game.block2._y = -800;
};
frameCount = 0;
fpsCounter = setInterval(this, "fpsCalc", 1000);
snd_t1 = new Sound();
snd_t1.attachSound("segment notes_Seq01.wav");
snd_t2 = new Sound();
snd_t2.attachSound("segment notes_Seq02.wav");
snd_t3 = new Sound();
snd_t3.attachSound("segment notes_Seq03.wav");
snd_t4 = new Sound();
snd_t4.attachSound("segment notes_Seq04.wav");
snd_t5 = new Sound();
snd_t5.attachSound("segment notes_Seq05.wav");
snd_t6 = new Sound();
snd_t6.attachSound("segment notes_Seq06.wav");
snd_t7 = new Sound();
snd_t7.attachSound("segment notes_Seq07.wav");
snd_t8 = new Sound();
snd_t8.attachSound("segment notes_Seq08.wav");
snd_t9 = new Sound();
snd_t9.attachSound("segment notes_Seq09.wav");
snd_t10 = new Sound();
snd_t10.attachSound("segment notes_Seq10.wav");
snd_t11 = new Sound();
snd_t11.attachSound("segment notes_Seq11.wav");
snd_t12 = new Sound();
snd_t12.attachSound("segment notes_Seq12.wav");
snd_t13 = new Sound();
snd_t13.attachSound("segment notes_Seq13.wav");
snd_t14 = new Sound();
snd_t14.attachSound("segment notes_Seq14.wav");
snd_t15 = new Sound();
snd_t15.attachSound("segment notes_Seq15.wav");
snd_t16 = new Sound();
snd_t16.attachSound("segment notes_Seq16.wav");
snd_t17 = new Sound();
snd_t17.attachSound("segment notes_Seq17.wav");
snd_t18 = new Sound();
snd_t18.attachSound("segment notes_Seq18.wav");
snd_t19 = new Sound();
snd_t19.attachSound("segment notes_Seq19.wav");
snd_t20 = new Sound();
snd_t20.attachSound("segment notes_Seq20.wav");
snd_t21 = new Sound();
snd_t21.attachSound("segment notes_Seq21.wav");
snd_t22 = new Sound();
snd_t22.attachSound("segment notes_Seq22.wav");
snd_t23 = new Sound();
snd_t23.attachSound("segment notes_Seq23.wav");
snd_t24 = new Sound();
snd_t24.attachSound("segment notes_Seq24.wav");
snd_t25 = new Sound();
snd_t25.attachSound("segment notes_Seq25.wav");
snd_t26 = new Sound();
snd_t26.attachSound("segment notes_Seq26.wav");
snd_t27 = new Sound();
snd_t27.attachSound("segment notes_Seq27.wav");
snd_t28 = new Sound();
snd_t28.attachSound("segment notes_Seq28.wav");
snd_t29 = new Sound();
snd_t29.attachSound("segment notes_Seq29.wav");
snd_t30 = new Sound();
snd_t30.attachSound("segment notes_Seq30.wav");
snd_t31 = new Sound();
snd_t31.attachSound("segment notes_Seq31.wav");
snd_t32 = new Sound();
snd_t32.attachSound("segment notes_Seq32.wav");
snd_t33 = new Sound();
snd_t33.attachSound("segment notes_Seq33.wav");
snd_t34 = new Sound();
snd_t34.attachSound("segment notes_Seq34.wav");
snd_t35 = new Sound();
snd_t35.attachSound("segment notes_Seq35.wav");
snd_t36 = new Sound();
snd_t36.attachSound("segment notes_Seq36.wav");
snd_t37 = new Sound();
snd_t37.attachSound("segment notes_Seq37.wav");
snd_level = new Sound();
snd_level.attachSound("level change.wav");
snd_gameover = new Sound();
snd_gameover.attachSound("gameover.wav");
snd_maxnudge = new Sound();
snd_maxnudge.attachSound("maxnudge.wav");
snd_welldone = new Sound();
snd_welldone.attachSound("welldone.wav");
snd_b1 = new Sound();
snd_b1.attachSound("bad collisions_Seq01.wav");
snd_b2 = new Sound();
snd_b2.attachSound("bad collisions_Seq02.wav");
snd_b3 = new Sound();
snd_b3.attachSound("bad collisions_Seq03.wav");
snd_b4 = new Sound();
snd_b4.attachSound("bad collisions_Seq04.wav");
snd_b5 = new Sound();
snd_b5.attachSound("bad collisions_Seq05.wav");
snd_b6 = new Sound();
snd_b6.attachSound("bad collisions_Seq06.wav");
snd_b7 = new Sound();
snd_b7.attachSound("bad collisions_Seq07.wav");
snd_b8 = new Sound();
snd_b8.attachSound("bad collisions_Seq08.wav");
segmentDepth = 10000;
score = -1000;
stage = 0;
stageRamp = 45;
stageLimit = stage + stageRamp;
changing = 0;
blobsAlive = 0;
blobsThisRound = 0;
blobsLimit = stageRamp;
drawSegments();
totalPatterns = ln - 1;
patternStage = this._parent.chosenStage;
skipIt = 0;
rampItUp();
applyPattern();
rotating = 0;
keyWatchDown = new Object();
keyWatchDown.onKeyDown = function () {
k = Key.getCode();
if (k == 37) {
_parent.rotating = -1;
}
if (k == 39) {
_parent.rotating = 1;
}
};
Key.addListener(keyWatchDown);
keyWatchUp = new Object();
keyWatchUp.onKeyUp = function () {
k = Key.getCode();
if (k == 37) {
_parent.rotating = 0;
}
if (k == 39) {
_parent.rotating = 0;
}
};
Key.addListener(keyWatchUp);
this.createEmptyMovieClip("actionWatch", 2000);
actionWatch.spawnCount = 30;
actionWatch.spawnOrigin = 3000;
actionWatch.spawnDepth = 3000;
goodNudge = 35;
badNudge = 40;
scoreVelo = 0;
actionWatch.onEnterFrame = function () {
this._parent.frameCount++;
if (this._parent.scoreVelo > 200) {
this._parent.scoreVelo = 200;
this._parent.score = this._parent.score + 500;
this._parent.theMessage.maxOut.gotoAndPlay("maxOut");
this._parent.snd_maxnudge.start(0, 0);
}
if (this._parent.scoreVelo > 0) {
this._parent.score = this._parent.score + (this._parent.scoreVelo / 50);
}
this._parent.roundScore = Math.round(this._parent.score);
if (this._parent.scoreVelo < -199) {
this._parent.snd_gameover.start(0, 0);
this._parent.theFinalScore = this._parent.roundScore;
this._parent.theFinalRating = this._parent.getRating(this._parent.theFinalScore);
clearInterval(this._parent.theInterval);
this._parent.theMessage.theName.text = "structural failure";
segCount = 0;
segLimit = 20;
while (segCount < segLimit) {
this._parent["segment" + segCount].gotoAndStop(5);
this._parent["segment" + segCount].actor.gotoAndStop(11);
this._parent["segment" + segCount].actor.overlay.gotoAndPlay("failure");
segCount++;
}
this._parent.theMessage.gotoAndPlay("gameOver");
this._parent.spawnExplosion(200, 200, 1, 80, 0, 0);
removeMovieClip(this);
}
this._parent.theMessage.theScore.text = this._parent.roundScore;
percentage = (((this._parent.scoreVelo + 200) / 400) * 100) - 50;
this._parent.theMessage.gague._xscale = percentage * 2;
this._parent.theMessage.badGague._alpha = (-(percentage * 2)) + 20;
this._parent.theMessage.goodGague._alpha = (percentage * 2) + 20;
this._parent.nudgeFactor = 90 - ((percentage + 50) * 0.8);
this.spawnCount--;
if (((this.spawnCount < 0) && (this._parent.changing == 0)) && (this._parent.blobsThisRound < this._parent.blobsLimit)) {
this._parent.blobsThisRound++;
this._parent.blobsAlive++;
this._parent.stage++;
this.spawnDepth++;
if (this.spawnDepth > 3999) {
this.spawnDepth = this.spawnOrigin;
}
duplicateMovieClip (this._parent.actorBank, ["blob" + this.spawnDepth], this.spawnDepth);
this._parent["blob" + this.spawnDepth].gotoAndStop(3);
myColour = this._parent.currentBlobs[0][random(this._parent.currentBlobs[0].length)];
this._parent["blob" + this.spawnDepth].myColour = myColour;
this._parent["blob" + this.spawnDepth].myClock = 51;
this._parent["blob" + this.spawnDepth].actor.gotoAndStop(myColour);
this._parent["blob" + this.spawnDepth]._x = 200;
this._parent["blob" + this.spawnDepth]._y = 200;
this._parent["blob" + this.spawnDepth]._rotation = random(360);
myDirection = random(20);
this._parent["blob" + this.spawnDepth].myxv = this._parent.vct[myDirection][0];
this._parent["blob" + this.spawnDepth].myyv = this._parent.vct[myDirection][1];
this._parent["blob" + this.spawnDepth].onEnterFrame = function () {
this._x = this._x + (this.myxv * 1.85);
this._y = this._y + (this.myyv * 1.85);
this.myClock--;
if (this.myClock < 1) {
segCount = 0;
segLimit = 20;
while (segCount < segLimit) {
if (this.collide.hitTest(this._parent["segment" + segCount].collide)) {
if (!(this.myColour === this._parent["segment" + segCount].myColour)) {
this._parent.theMessage.gotoAndPlay("bad");
this._parent.scoreVelo = this._parent.scoreVelo - this._parent.badNudge;
this._parent["segment" + segCount].actor.overlay.gotoAndPlay("bad");
this._parent.spawnExplosion(this._x, this._y, 1, 20, this.myxv, this.myyv);
randSound = random(8) + 1;
this._parent["snd_b" + randSound].start(0, 0);
} else {
this._parent.theMessage.gotoAndPlay("good");
positiveNudge = this._parent.goodNudge * (Math.pow(100, this._parent.nudgeFactor / 100) / 50);
this._parent.scoreVelo = this._parent.scoreVelo + positiveNudge;
this._parent.stage++;
this._parent["segment" + segCount].actor.overlay.gotoAndPlay("good");
this._parent.spawnExplosion(this._x, this._y, this.myColour, 4, this.myxv, this.myyv);
randSound = random(37) + 1;
this._parent["snd_t" + randSound].start(0, 0);
}
this._parent.blobsAlive--;
removeMovieClip(this);
}
segCount++;
}
}
};
this.spawnCount = this._parent.currentBlobs[1][0];
}
if (_parent.rotating == -1) {
buffer = this._parent.currentPattern.shift();
this._parent.currentPattern.push(buffer);
this._parent.applyPattern();
}
if (_parent.rotating == 1) {
buffer = this._parent.currentPattern.pop();
this._parent.currentPattern.unshift(buffer);
this._parent.applyPattern();
}
};
exploDepth = 20000;
exploOrigin = 20000;
theInterval = setInterval(this, "stageWatcher", 3000);
vct = [[0, 1], [0.309016994, 0.951056516], [0.587785252, 0.809016994], [0.809016994, 0.587785252], [0.951056516, 0.309016994], [1, 0], [0.951056516, -0.309016994], [0.809016994, -0.587785252], [0.587785252, -0.809016994], [0.309016994, -0.951056516], [0, -1], [-0.309016994, -0.951056516], [-0.587785252, -0.809016994], [-0.809016994, -0.587785252], [-0.951056516, -0.309016994], [-1, 0], [-0.951056516, 0.309016994], [-0.809016994, 0.587785252], [-0.587785252, 0.809016994], [-0.309016994, 0.951056516]];