Frame 1
MochiAd.showPreGameAd({id:"2ede3375c0d8558e", res:"640x480"});
Frame 2
function gameMenu(menu, obj) {
getURL (_root.authorsSite, "_blank");
}
this._lockroot = true;
var gameName = "blokz2";
vNum = "2.02";
gameQuality = "AUTO";
_quality = "HIGH";
authorsSite = "http://www.terrypaton.com";
var menu_cm = new ContextMenu();
menu_cm.customItems.push(new ContextMenuItem(authorsSite, gameMenu));
menu_cm.hideBuiltInItems();
_root.menu = menu_cm;
legalDomain = "http://www.terrypaton.com";
gameLocation = _root._url.substr(0, legalDomain.length);
if (gameLocation != legalDomain) {
}
Frame 3
gameLoadingName = "blokz 2";
loadingClip.onEnterFrame = function () {
pL = Math.floor((this._parent.getBytesLoaded() / this._parent.getBytesTotal()) * 100);
if (pL < 100) {
this.mask._xscale = (pL / 100) * 100;
this._parent.stop();
} else {
i = 0;
while (i < stringLength) {
removeMovieClip(eval ("loadingHolder.l" + i));
i++;
}
this._parent.play();
}
};
stringLength = gameLoadingName.length;
wordOffset = (stringLength * 20) / 2;
this.createEmptyMovieClip("loadingHolder", 1);
loadingHolder._x = (320 - wordOffset) + 10;
loadingHolder._y = 160;
i = 0;
while (i < stringLength) {
t = loadingHolder.attachMovie("letter", "l" + i, i);
t._x = i * 20;
t.angle = i;
t.Lvar.text = gameLoadingName.charAt(i);
t._xscale = (t._yscale = 200);
i++;
}
stop();
Frame 6
function attachSoundFromLibrary(idname) {
var _local2 = new Sound(this);
_local2.attachSound(idname);
return(_local2);
}
function playSound(temp) {
switch (temp) {
case "ultra combo" :
bonus5Snd.start();
break;
case "hyper combo" :
bonus5Snd.start();
break;
case "super combo" :
bonus5Snd.start();
break;
case "combo" :
bonus5Snd.start();
break;
case "mega combo" :
bonus5Snd.start();
break;
case "column bomb" :
explode4Snd.start();
break;
case "row bomb" :
explode4Snd.start();
break;
case "bomb" :
explode4Snd.start();
break;
case "clock" :
clockSnd.start();
break;
case "mouseOver" :
mouseOverSnd.start();
break;
case "mouseDown" :
mouseDownSnd.start();
break;
case "pop1" :
bonus4Snd.start();
break;
case "pop2" :
bonus6Snd.start();
break;
case "pop3" :
bonus7Snd.start();
break;
case "bad press" :
a = Math.floor(Math.random() * 2) + 1;
this[("wrongPress" + a) + "Snd"].start();
break;
case "good press" :
goodPressSnd.start();
break;
case "next level" :
levelAnnounceSnd.start();
break;
case "level complete" :
levelAnnounceSnd.start();
break;
case "land" :
break;
case "time warning" :
timeWarningSnd.start();
break;
case "game over" :
gameOverSnd.start();
}
}
var temp = gameName.split(" ");
storeName = temp.join("");
storage = SharedObject.getLocal(storeName + "storage");
yourhigh = storage.data.myhighscore;
if (yourhigh == undefined) {
storage.data.myhighscore = 0;
yourhigh = 0;
}
mouseOverSnd = attachSoundFromLibrary("mouseOver.wav");
mouseDownSnd = attachSoundFromLibrary("mouseDown.wav");
bonus1Snd = attachSoundFromLibrary("bonus1.wav");
bonus2Snd = attachSoundFromLibrary("bonus2.wav");
bonus3Snd = attachSoundFromLibrary("bonus3.wav");
bonus4Snd = attachSoundFromLibrary("bonus4.wav");
bonus5Snd = attachSoundFromLibrary("bonus5.wav");
bonus6Snd = attachSoundFromLibrary("bonus6.wav");
bonus7Snd = attachSoundFromLibrary("bonus7.wav");
explode1Snd = attachSoundFromLibrary("explode1.wav");
explode2Snd = attachSoundFromLibrary("explode2.wav");
explode3Snd = attachSoundFromLibrary("explode3.wav");
explode4Snd = attachSoundFromLibrary("explode4.wav");
clockSnd = attachSoundFromLibrary("moreTime.wav");
wrongPress2Snd = attachSoundFromLibrary("wrongPress2.wav");
gameOverSnd = attachSoundFromLibrary("gameOver.wav");
goodPressSnd = attachSoundFromLibrary("goodPress.wav");
levelAnnounceSnd = attachSoundFromLibrary("levelAnnounce.wav");
levelCompleteSnd = attachSoundFromLibrary("levelComplete.wav.wav");
landSndSnd = attachSoundFromLibrary("landSnd.wav");
timeWarningSnd = attachSoundFromLibrary("timeWarning.wav");
Frame 7
_quality = "HIGH";
this.playBtn.onRelease = function () {
gotoAndPlay (23);
playSound("mouseDown");
};
this.playBtn.onRollOver = function () {
playSound("mouseOver");
};
this.yourHighClip.reset_btn.onRelease = function () {
playSound("mouseDown");
_root.yourhigh = 0;
trace(yourhigh);
yourHighClip.resetclip.gotoAndPlay(2);
storage.data.myhighscore = 0;
storage.flush();
};
this.yourHighClip.reset_btn.onRollOver = function () {
playSound("mouseOver");
};
Frame 22
stop();
Frame 23
function findX(xNum) {
return(265 + Math.floor((xNum * blokzSize) + 10));
}
function getX(xNum) {
return(Math.floor(((xNum - 10) - 265) / blokzSize));
}
function getY(yNum) {
return(Math.floor((yNum - 15) / blokzSize));
}
function findY(yNum) {
return(Math.floor((yNum * blokzSize) + 15));
}
function addPoints(tempPoints, tempClip) {
score = score + tempPoints;
scoreText.text = score;
pointsLoc = pointsHolder.getNextHighestDepth();
tp = pointsHolder.attachMovie("points", "p" + pointsLoc, pointsLoc);
tp.gotoAndStop(1);
if (tempPoints > 20000) {
tp.gotoAndStop(2);
}
if (tempPoints > 50000) {
tp.gotoAndStop(3);
}
if (tempPoints > 100000) {
tp.gotoAndStop(4);
}
if (tempClip == undefined) {
tempx = _root._xmouse;
tempy = _root._ymouse - 20;
} else {
tempx = tempClip._x;
tempy = tempClip._y;
}
tp._x = tempx;
this["tween" + pointsLoc] = new Object();
this["tween" + pointsLoc] = new mx.transitions.Tween(tp, "_y", mx.transitions.easing.Strong.easeIn, tempy - 20, tempy - 40, 1.5, true);
new mx.transitions.Tween(tp, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 1.5, true);
tp.textBox.text = tempPoints;
this["tween" + pointsLoc].clipName = tp;
this["tween" + pointsLoc].onMotionFinished = function () {
removeMovieClip(this.clipName);
};
this.scorePanel.clip.scoreText.text = score;
scorePanel._rotation = random(30) - 15;
scorePanel.gotoAndPlay(2);
scorePanel.clip.scoreBackBox._width = String(score).length * 29;
}
function addTimePoints(tempPoints) {
score = score + tempPoints;
scoreText.text = score;
pointsLoc = pointsHolder.getNextHighestDepth();
tp = pointsHolder.attachMovie("timePoints", "p" + pointsLoc, pointsLoc);
tp.gotoAndStop(1);
tempx = timerDial._x;
tempy = timerDial._y;
tp._x = tempx;
this["tween" + pointsLoc] = new Object();
this["tween" + pointsLoc] = new mx.transitions.Tween(tp, "_y", mx.transitions.easing.Strong.easeIn, tempy - 20, tempy - 40, 3.5, true);
new mx.transitions.Tween(tp, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 3.5, true);
tp.textBox.text = tempPoints;
this["tween" + pointsLoc].clipName = tp;
this["tween" + pointsLoc].onMotionFinished = function () {
removeMovieClip(this.clipName);
};
}
function fpsReport() {
fps = "fps: " + fpsCounter;
fpsCounter = 0;
}
function testPlayerClick() {
if (gameState == "playing") {
xmouse = getX(_xmouse);
ymouse = getY(_ymouse);
if (gridData[ymouse][xmouse][0] > 0) {
theClickedType = gridData[ymouse][xmouse][0];
if (theClickedType < 10) {
testJoining(ymouse, xmouse);
}
if (theClickedType == 10) {
playSound("bomb");
trace("a bomb has been pressed");
bombExplode = blockHolder.attachMovie("bombExplosion", "bombExplosion", 10000);
bombExplode._x = _xmouse;
bombExplode._y = _ymouse;
eraseArray = new Array(-1, -1, 0, -1, 1, -1, -1, 0, 0, 0, 1, 0, -1, 1, 0, 1, 1, 1);
addPoints(500);
bloop = 0;
while (bloop < eraseArray.length) {
tempC = gridData[ymouse + eraseArray[bloop + 1]][xmouse + eraseArray[bloop]][1];
if (tempC != undefined) {
gridData[ymouse + eraseArray[bloop + 1]][xmouse + eraseArray[bloop]][1] = undefined;
gridData[ymouse + eraseArray[bloop + 1]][xmouse + eraseArray[bloop]][0] = 0;
this["tween" + ri] = new Object();
this["bombtween" + bloop] = new mx.transitions.Tween(tempC, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 0.5, true);
this["bombtween" + bloop].clipName = tempC;
this["bombtween" + bloop].onMotionFinished = function () {
removeMovieClip(this.clipName);
};
}
bloop = bloop + 2;
}
} else if (theClickedType == 11) {
trace("player clicked a clock");
playSound("clock");
levelTime = levelTime + 10000;
if (levelTime > levelMaxTime) {
levelTime = levelMaxTime;
}
timeClip._y = 368 - ((levelTime / levelMaxTime) * 217);
tempC = gridData[ymouse][xmouse][1];
if (tempC != undefined) {
gridData[ymouse][xmouse][1] = undefined;
gridData[ymouse][xmouse][0] = 0;
this["clockTween" + blockNum] = new Object();
this["clockTween" + blockNum].clipName = tempC;
this["clockTween" + blockNum] = new mx.transitions.Tween(tempC, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, 1, true);
new mx.transitions.Tween(tempC, "_xscale", mx.transitions.easing.Strong.easeOut, 100, 200, 1, true);
new mx.transitions.Tween(tempC, "_yscale", mx.transitions.easing.Strong.easeOut, 100, 200, 1, true);
new mx.transitions.Tween(tempC, "_y", mx.transitions.easing.Strong.easeOut, tempC._y, tempC._y + 12, 1, true);
new mx.transitions.Tween(tempC, "_x", mx.transitions.easing.Strong.easeOut, tempC._x, tempC._x + 12, 1, true);
this["clockTween" + blockNum].onMotionFinished = function () {
removeMovieClip(this.clipName);
};
}
blockNum++;
} else if (theClickedType == 12) {
playSound("row bomb");
trace("player clicked a row bomb");
addPoints(500);
bloop = 0;
while (bloop < gridWidth) {
tempC = gridData[ymouse][bloop][1];
if (tempC != undefined) {
gridData[ymouse][bloop][1] = undefined;
gridData[ymouse][bloop][0] = 0;
bombExplode = blockHolder.attachMovie("smallBombExplosion", "be" + bloop, 10000 + bloop);
bombExplode._x = tempC._x + 12;
bombExplode._y = tempC._y + 12;
removeMovieClip(tempC);
}
bloop++;
}
} else if (theClickedType == 13) {
playSound("column bomb");
trace("player clicked a column bomb");
addPoints(500);
bloop = 0;
while (bloop < gridHeight) {
tempC = gridData[bloop][xmouse][1];
if (tempC != undefined) {
gridData[bloop][xmouse + eraseArray[bloop]][1] = undefined;
gridData[bloop][xmouse][0] = 0;
bombExplode = blockHolder.attachMovie("smallBombExplosion", "be" + bloop, 10000 + bloop);
bombExplode._x = tempC._x + 12;
bombExplode._y = tempC._y + 12;
removeMovieClip(tempC);
}
bloop++;
}
}
theClickedClip = gridData[ymouse][xmouse][1];
}
}
}
function testJoining(ytemp, xtemp) {
amountJoined = 0;
pressedNum = gridData[ytemp][xtemp][0];
pressedClip = gridData[ytemp][xtemp][1];
testedArray = new Array();
ti = 0;
while (ti < gridHeight) {
testedArray[ti] = new Array();
ti++;
}
holderArray = new Array();
holderArray.push(xtemp);
holderArray.push(ytemp);
tarNum = 0;
tc = 0;
testNum = 0;
spdTest1 = getTimer();
while (tarNum < holderArray.length) {
tx = holderArray[tarNum];
ty = holderArray[tarNum + 1];
testedArray[ty][tx] = 1;
if (testedArray[ty - 1][tx] != 1) {
if (gridData[ty - 1][tx][0] == pressedNum) {
amountJoined++;
holderArray.push(tx);
holderArray.push(ty - 1);
testedArray[ty - 1][tx] = 1;
}
}
if (testedArray[ty + 1][tx] != 1) {
if (gridData[ty + 1][tx][0] == pressedNum) {
amountJoined++;
holderArray.push(tx);
holderArray.push(ty + 1);
testedArray[ty + 1][tx] = 1;
}
}
if (testedArray[ty][tx - 1] != 1) {
if (gridData[ty][tx - 1][0] == pressedNum) {
amountJoined++;
holderArray.push(tx - 1);
holderArray.push(ty);
testedArray[ty][tx - 1] = 1;
}
}
if (testedArray[ty][tx + 1] != 1) {
if (gridData[ty][tx + 1][0] == pressedNum) {
amountJoined++;
holderArray.push(tx + 1);
holderArray.push(ty);
testedArray[ty][tx + 1] = 1;
}
}
tarNum = tarNum + 2;
}
if (amountJoined > 0) {
remainingBalls = remainingBalls - (amountJoined + 1);
theAngle = Math.random() * 90;
theSpeed = 3;
theGravity = 0.7;
theType = 1;
if (amountJoined > 10) {
theLevel = pointsHolder.getNextHighestDepth();
f1 = pointsHolder.attachMovie("fizzCircle", "f" + theLevel, theLevel);
f1.setProperties(_xmouse, _ymouse, theAngle, 0, 0, 10);
theLevel++;
}
if (amountJoined > 20) {
f1 = pointsHolder.attachMovie("fizzCircle", "f" + theLevel, theLevel);
f1.setProperties(_xmouse, _ymouse, theAngle - 90, 0, 0, 10);
f1._xscale = (f1._yscale = 120);
f1._alpha = 50;
theLevel++;
}
if (amountJoined > 40) {
f1 = pointsHolder.attachMovie("fizzCircle", "f" + theLevel, theLevel);
f1.setProperties(_xmouse, _ymouse, theAngle - 45, 0, 0, 10);
f1._xscale = (f1._yscale = 120);
f1._alpha = 50;
}
trace("adding points + " + ((amountJoined * amountJoined) * 10));
ri = 0;
while (ri < holderArray.length) {
tx = holderArray[ri];
ty = holderArray[ri + 1];
theType = gridData[ty][tx][0];
popClip = gridData[ty][tx][1];
theLevel = pointsHolder.getNextHighestDepth();
f1 = pointsHolder.attachMovie("fizz", "f" + theLevel, theLevel);
f1.setProperties(popClip._x + 23, popClip._y + 23, theAngle + (ri * 45), theSpeed + (Math.random() * 5), theGravity, theType);
this["tween" + ri] = new Object();
popTime = 0.7;
removeMovieClip(popClip);
gridData[ty][tx][0] = 0;
gridData[ty][tx][1] = undefined;
ri = ri + 2;
}
}
spdTest2 = getTimer();
theMessage = "";
if (amountJoined > 20) {
theMessage = "SUPER COMBO!";
playSound("super combo");
}
if (amountJoined > 30) {
theMessage = "MADNESS!";
playSound("mega combo");
}
if (amountJoined > 50) {
theMessage = "NUTZ!";
playSound("ultra combo");
}
if (amountJoined > 70) {
theMessage = "BONKERS!";
playSound("hyper combo");
}
if (amountJoined > 80) {
theMessage = "HYPER-BONKERS!";
playSound("hyper combo");
}
if (amountJoined > 90) {
theMessage = "BONKERS!";
playSound("hyper combo");
}
if (amountJoined > 100) {
theMessage = "BONKERS!";
playSound("hyper combo");
}
if (amountJoined > 110) {
theMessage = "BONKERS!";
playSound("hyper combo");
}
if (theMessage != "") {
tellPlayer(theMessage);
}
if (amountJoined > 0) {
playSound("good press");
if (amountJoined < 10) {
playSound("pop1");
} else if ((amountJoined > 9) && (amountJoined < 20)) {
playSound("pop2");
} else if (amountJoined > 19) {
playSound("pop3");
}
addPoints((amountJoined * amountJoined) * 10);
} else {
playSound("bad press");
}
}
function setup() {
level = 1;
score = 0;
}
function setupLevel() {
blockHolder._visible = true;
clockWobble.stop();
clockClip._rotation = 0;
timeWarnClip._visible = false;
clockClip.sand._visible = true;
playSound("next level");
i = 0;
while (i < 1000) {
removeMovieClip("gridHolder.g" + i);
removeMovieClip("blockHolder.b" + i);
i++;
}
if (level == 1) {
blobsArray = new Array(1, 2, 3);
remainingBalls = 350;
levelMaxTime = 40000;
}
if (level == 2) {
blobsArray = new Array(2, 3, 4);
remainingBalls = 250;
levelMaxTime = 50000;
}
if (level == 3) {
blobsArray = new Array(5, 2);
remainingBalls = 400;
levelMaxTime = 60000;
}
if (level == 4) {
levelVariety = 3;
blobsArray = new Array(1, 2, 5);
remainingBalls = 400;
levelMaxTime = 50000;
}
if (level == 5) {
levelVariety = 3;
blobsArray = new Array(1, 3, 5, 4);
remainingBalls = 250;
levelMaxTime = 100000 /* 0x0186A0 */;
}
if (level == 6) {
levelVariety = 3;
blobsArray = new Array(1, 2, 3, 4);
remainingBalls = 400;
levelMaxTime = 80000 /* 0x013880 */;
}
if (level == 7) {
levelVariety = 3;
blobsArray = new Array(5, 1, 3, 4);
remainingBalls = 590;
levelMaxTime = 50000;
}
if (level == 8) {
blobsArray = new Array(1, 5, 2, 6);
remainingBalls = 620;
levelMaxTime = 80000 /* 0x013880 */;
}
if (level == 9) {
levelVariety = 3;
blobsArray = new Array(2, 3, 4, 5);
remainingBalls = 800;
levelMaxTime = 90000 /* 0x015F90 */;
}
if (level == 10) {
levelVariety = 3;
blobsArray = new Array(1, 2, 3, 4, 6);
remainingBalls = 1000;
levelMaxTime = 150000 /* 0x0249F0 */;
}
timeWarning = false;
ballLeftClip.gotoAndStop(1);
levelTime = levelMaxTime;
clockClip.top._yscale = (levelTime / levelMaxTime) * 100;
clockClip.bottom._yscale = 100 - ((levelTime / levelMaxTime) * 100);
blockNum = 0;
blockCount = (blockDelay = 30);
blockCount = (blockDelay = 10);
gridWidth = 14;
gridHeight = 18;
arrayNum = 0;
gridData = new Array();
requiredLevelGems = 0;
i = 0;
while (i < gridHeight) {
gridData[i] = new Array();
j = 0;
while (j < gridWidth) {
if (i > 0) {
fb._x = findX(j);
fb._y = findY(i);
}
gridData[i][j] = new Array();
typeOfBlock = Math.floor(Math.random() * blobsArray.length) + 1;
typeOfBlock = blobsArray[Math.floor(Math.random() * blobsArray.length)];
clipToAttach = "block" + typeOfBlock;
clipToAttach = "block1";
tempClip = blockHolder.attachMovie(clipToAttach, "b" + blockNum, blockNum);
tempClip.gotoAndStop(typeOfBlock);
tempClip._rotation = (Math.random() * 6) - 3;
tempClip._x = findX(j);
tempClip._y = findY(i);
gridData[i][j] = new Array();
gridData[i][j][0] = typeOfBlock;
gridData[i][j][1] = tempClip;
blockNum++;
arrayNum++;
j++;
}
i++;
}
}
function addBlock() {
fill = 0;
while (fill < gridWidth) {
gridLoc = Math.floor(Math.random() * gridWidth);
gridLoc = fill;
if (gridData[0][fill][0] == 0) {
typeOfBlock = Math.floor(Math.random() * levelVariety) + 1;
typeOfBlock = blobsArray[Math.floor(Math.random() * blobsArray.length)];
clipToAttach = "block1";
if (Math.floor(Math.random() * 50) == 0) {
switch (Math.floor(Math.random() * 4)) {
case 0 :
clipToAttach = "bomb";
typeOfBlock = 10;
break;
case 1 :
clipToAttach = "clock";
typeOfBlock = 11;
break;
case 2 :
clipToAttach = "rowBomb";
typeOfBlock = 12;
break;
case 3 :
clipToAttach = "columnBomb";
typeOfBlock = 13;
}
}
tempClip = blockHolder.attachMovie(clipToAttach, "b" + blockNum, blockNum);
tempClip._rotation = (Math.random() * 6) - 3;
tempClip.gotoAndStop(typeOfBlock);
tempClip._x = findX(gridLoc);
tempClip._y = findY(0);
gridData[0][gridLoc] = new Array();
gridData[0][gridLoc][0] = typeOfBlock;
gridData[0][gridLoc][1] = tempClip;
blockNum++;
}
fill++;
}
}
function scanBlocks() {
objectsThatCanMove = 0;
testMoveObjects = 0;
i = gridHeight - 1;
while (i > -1) {
j = 0;
while (j < gridWidth) {
if (gridData[i][j][0] > 0) {
testMoveObjects++;
theFallDistance = 0;
h = i + 1;
while (h < (gridHeight + 1)) {
if (gridData[h][j][0] == 0) {
theFallDistance = h;
} else {
h = 1000;
}
h++;
}
if (theFallDistance > 0) {
objectsThatCanMove++;
theClipName = gridData[i][j][1];
theX = findX(i);
theY = findY(theFallDistance);
theTime = (theFallDistance / 3) * 0.3;
theTime = 0.5;
new mx.transitions.Tween(theClipName, "_y", mx.transitions.easing.None.easeIn, theClipName._y, theY, theTime, true);
gridData[theFallDistance][j][0] = gridData[i][j][0];
gridData[theFallDistance][j][1] = theClipName;
gridData[i][j][0] = 0;
gridData[i][j][1] = undefined;
}
}
j++;
}
i--;
}
}
function tellPlayer(tempWords) {
tm = pointsHolder.attachMovie("tellPlayer", "tellPlayer", pointsHolder.getNextHighestDepth());
tm._rotation = (Math.random() * 10) - 5;
tm.theTween = new mx.transitions.Tween(tm, "_alpha", mx.transitions.easing.Strong.easeIn, 100, 0, 2, true);
tm.theTween1 = new mx.transitions.Tween(tm, "_xscale", mx.transitions.easing.Strong.easeOut, 100, 120, 2, true);
tm.theTween2 = new mx.transitions.Tween(tm, "_yscale", mx.transitions.easing.Strong.easeOut, 100, 120, 2, true);
tm.theTween.clipName = tm;
tm.theTween.onMotionFinished = function () {
removeMovieClip(this.clipName);
trace(this.clipName);
};
tm.textBox.text = tempWords;
tm.tellPlayerBack._width = tempWords.length * 14;
tm._x = 138;
tm._y = 437;
messageLoc++;
}
_quality = "medium";
blokzSize = 25;
gameLoop = function () {
fpsCounter++;
switch (gameState) {
case "playing" :
levelTime = levelTime - timeReduce;
if (levelTime < 10001) {
if (timeWarning == false) {
timeWarnClip._visible = true;
playSound("time warning");
clockWobble = new mx.transitions.Tween(clockClip, "_rotation", mx.transitions.easing.Back.easeInOut, -10, 10, 0.75, true);
clockWobble.onMotionFinished = function () {
this.yoyo();
};
timeWarning = true;
}
if (levelTime < 0) {
gameState = "game over";
break;
}
}
timeDisplay = Math.floor(levelTime / 1000);
timeText.text = timeDisplay;
timeClip._y = 368 - ((levelTime / levelMaxTime) * 217);
blockCount--;
if (blockCount < 1) {
blockCount = blockDelay;
addBlock();
scanBlocks();
}
if (remainingBalls < 0) {
remainingBalls = 0;
}
if (remainingBalls == 0) {
bonus = Math.floor((levelMaxTime - levelTime) * 0.5);
trace("END OF LEVEL BONUS = " + bonus);
gameState = "level complete";
tellPlayer("level complete");
}
break;
case "setup" :
setup();
gameState = "setup level";
break;
case "level announce" :
if ((level != 4) || (level != 8)) {
tellPlayer("Level " + level);
} else {
tellPlayer("BONUS LEVEL " + level);
}
lac = 30;
gameState = "level announce wait";
break;
case "level announce wait" :
lac--;
if (lac < 1) {
gameState = "playing";
}
break;
case "game over" :
playSound("game over");
tellPlayer("Game Over");
gow = 60;
gameState = "game over wait";
break;
case "game over wait" :
gow--;
if (gow < 1) {
trace("game over");
gotoAndPlay (24);
delete theGameLoop;
gameState = "null";
}
break;
case "lose life" :
gameState = "lose life wait";
break;
case "lose life wait" :
gameState = "setup level";
break;
case "setup level" :
setupLevel();
gameState = "level announce";
break;
case "level complete" :
blockHolder._visible = false;
playSound("level complete");
tellPlayer("Level complete");
timeText.text = 0;
new mx.transitions.Tween(timeClip, "_y", mx.transitions.easing.Strong.easeOut, timeClip._y, 151, 3, true);
addTimePoints(bonus);
purgeArray = new Array();
theNum = 0;
i = 0;
while (i < gridHeight) {
j = 0;
while (j < gridWidth) {
tClip = (purgeArray[theNum] = gridData[i][j][1]);
tClip._alpha = 50;
theNum++;
j++;
}
i++;
}
lcw = (gridHeight * gridWidth) / 3;
theNum = 0;
gameState = "level complete wait 1";
break;
case "level complete wait 1" :
clipName = purgeArray[theNum];
clipName.theTween = new mx.transitions.Tween(clipName, "_alpha", mx.transitions.easing.Strong.easeOut, 50, 0, 1, true);
clipName.theTween.clipName = clipName;
clipName.theTween.onMotionFinished = function () {
removeMovieClip(this.clipName);
trace(this.clipName);
};
theNum++;
clipName = purgeArray[theNum];
clipName.theTween = new mx.transitions.Tween(clipName, "_alpha", mx.transitions.easing.Strong.easeOut, 50, 0, 1, true);
clipName.theTween.clipName = clipName;
clipName.theTween.onMotionFinished = function () {
removeMovieClip(this.clipName);
trace(this.clipName);
};
theNum++;
clipName = purgeArray[theNum];
clipName.theTween = new mx.transitions.Tween(clipName, "_alpha", mx.transitions.easing.Strong.easeOut, 50, 0, 1, true);
clipName.theTween.clipName = clipName;
clipName.theTween.onMotionFinished = function () {
removeMovieClip(this.clipName);
trace(this.clipName);
};
theNum++;
lcw--;
lcw--;
if (lcw < 1) {
lcw = 35;
gameState = "level complete wait 2";
}
break;
case "level complete wait 2" :
lcw--;
if (lcw < 1) {
gameState = "next level";
}
break;
case "next level" :
level++;
if (level > 10) {
gameState = "game complete";
} else {
setupLevel();
gameState = "level announce";
}
break;
case "game complete" :
playSound("game over");
tellPlayer("Game Complete");
gow = 60;
gameState = "game complete wait";
break;
case "game complete wait" :
gow--;
if (gow < 1) {
trace("game over");
gotoAndPlay (33);
delete theGameLoop;
gameState = "null";
}
break;
}
};
fpsCounter = 0;
var intervalId;
var duration = 1000;
fpsInt = setInterval(this, "fpsReport", duration);
clearInterval(theGameLoop);
gameTimeDelay = 33;
gameTimeDelay = 20;
theGameLoop = setInterval(this, "gameLoop", gameTimeDelay);
timeReduce = gameTimeDelay;
onMouseDown = function () {
testPlayerClick();
};
gameState = "setup";
messageLoc = 1000;
stop();
Frame 25
_quality = "high";
if (score > yourhigh) {
yourhigh = score;
storage.data.myhighscore = score;
}
this.playBtn.onRelease = function () {
playSound("mouseDown");
removeMovieClip(highHolder);
gotoAndPlay (23);
};
this.playBtn.onRollOver = function () {
playSound("mouseOver");
};
if (score > 100000) {
t = this.createEmptyMovieClip("highHolder", 1000);
loadMovie ("http://www.terrypaton.com/highscores/highscoreSubmit.swf", highHolder);
t._x = 50;
t._y = 320;
}
if (yourhigh != undefined) {
yourHighestText = "YOUR HIGHEST SCORE: " + yourhigh;
} else {
yourHighestText = " ";
}
storage.flush();
Frame 32
stop();
Frame 33
_quality = "high";
if (score > yourhigh) {
yourhigh = score;
storage.data.myhighscore = score;
}
this.playBtn.onRelease = function () {
playSound("mouseDown");
removeMovieClip(highHolder);
gotoAndPlay (23);
};
this.playBtn.onRollOver = function () {
playSound("mouseOver");
};
if (score > 100000) {
t = this.createEmptyMovieClip("highHolder", 1000);
loadMovie ("http://www.terrypaton.com/highscores/highscoreSubmit.swf", highHolder);
t._x = 50;
t._y = 320;
}
if (yourhigh != undefined) {
yourHighestText = "YOUR HIGHEST SCORE: " + yourhigh;
} else {
yourHighestText = " ";
}
storage.flush();
Frame 41
stop();
Symbol 229 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.3");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}};
options = _parseOptions(options, _local27);
if ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0) {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
}
Symbol 230 MovieClip [__Packages.letterClass] Frame 0
class letterClass extends MovieClip
{
var centerY, radiusY, speed, y, _y, x, _x, angle;
function letterClass () {
super();
}
function onLoad() {
centerY = 48;
radiusY = 5;
speed = 0.05;
y = _y;
x = _x;
}
function onEnterFrame() {
if (angle != undefined) {
y = centerY + (Math.sin(angle) * radiusY);
angle = angle + speed;
_x = x;
_y = y;
}
}
}
Symbol 231 MovieClip [__Packages.fizzClass] Frame 0
class fizzClass extends MovieClip
{
var rotSpeed, explode, radians, angle, xspeed, velocity, yspeed, gravity, x, y, removeMovieClip, _x, _y, typeOfSkeet, _xscale, _yscale, _rotation, _alpha;
function fizzClass () {
super();
rotSpeed = 2;
}
function setProperties(newX, newY, newAngle, newVelocity, newGravity, newTypeOfSkeet) {
explode = false;
var _local2 = this;
_local2.x = newX;
_local2.y = newY;
_local2.angle = newAngle;
_local2.velocity = newVelocity;
_local2.gravity = newGravity;
calculateTrig();
updatePosition();
_local2.typeOfSkeet = newTypeOfSkeet;
_local2.gotoAndStop(newTypeOfSkeet);
}
function calculateTrig() {
radians = (angle / 180) * Math.PI;
xspeed = Math.cos(radians) * velocity;
yspeed = Math.sin(radians) * velocity;
}
function onEnterFrame() {
updatePosition();
}
function updatePosition() {
yspeed = yspeed + gravity;
x = x + xspeed;
y = y + yspeed;
if ((((y > 490) || (x > 650)) || (x < -10)) || (y < -10)) {
removeMovieClip();
}
_x = x;
_y = y;
if (typeOfSkeet == 10) {
_xscale = (_yscale = _yscale + 5);
_rotation = _rotation + rotSpeed;
rotSpeed = rotSpeed + 1;
_alpha = _alpha - rotSpeed;
if (_alpha < 5) {
removeMovieClip();
}
} else {
_rotation = angle;
}
}
}
Symbol 232 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 233 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 234 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 235 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 236 MovieClip [__Packages.mx.transitions.easing.Bounce] Frame 0
class mx.transitions.easing.Bounce
{
function Bounce () {
}
static function easeOut(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
if (t < (d / 2)) {
return((easeIn(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOut((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static var version = "1.1.0.52";
}
Symbol 237 MovieClip [__Packages.mx.transitions.easing.Back] Frame 0
class mx.transitions.easing.Back
{
function Back () {
}
static function easeIn(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOut(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 238 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 6 MovieClip [letter] Frame 1
#initclip 11
Object.registerClass("letter", letterClass);
#endinitclip
Symbol 43 MovieClip [bombExplosion] Frame 24
removeMovieClip(this);
Symbol 44 MovieClip [fizz] Frame 1
#initclip 13
Object.registerClass("fizz", fizzClass);
#endinitclip
Symbol 46 MovieClip [fizzCircle] Frame 1
#initclip 12
Object.registerClass("fizzCircle", fizzClass);
#endinitclip
Symbol 53 MovieClip [smallBombExplosion] Frame 18
removeMovieClip(this);
Symbol 83 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 1
_root.stop();
new mx.transitions.Tween(this.head, "_rotation", mx.transitions.easing.Bounce.easeOut, 0, 180, 0.7, true);
new mx.transitions.Tween(this.head, "_y", mx.transitions.easing.Bounce.easeOut, this.head._y - 200, this.head._y, 1, true);
new mx.transitions.Tween(this.head, "_x", mx.transitions.easing.Strong.easeOut, (Math.random() * 640) - 320, 0, 1, true);
Symbol 87 MovieClip Frame 92
_root.play();
Symbol 118 MovieClip Frame 1
this.onPress = function () {
getURL ("http://www.terrypaton.com", "_blank");
};
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.stop();
Symbol 120 MovieClip Frame 1
stop();
Symbol 200 MovieClip Frame 1
stop();