Frame 1
Security.allowDomain("*");
MochiAd.showPreGameAd({id:"a9c4d3e16f6ec603", res:"640x480"});
Frame 2
function gameMenu(menu, obj) {
getURL (_root.webSite, "_blank");
}
function qualityHigh() {
_quality = "high";
}
function qualityLow() {
_quality = "low";
}
this._lockroot = true;
var gameName = "flipit";
vNum = "1.03";
gameQuality = "AUTO";
_quality = "HIGH";
authorsSite = "http://www.terrypaton.com";
var menu_cm = new ContextMenu();
menu_cm.customItems.push(new ContextMenuItem(authorsSite, gameMenu));
menu_cm.customItems.push(new ContextMenuItem("HIGH Quality", qualityHigh));
menu_cm.customItems.push(new ContextMenuItem("LOW Quality", qualityLow));
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 = "flipit";
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 playSound(temp) {
switch (temp) {
case "flip" :
a = random(2) + 1;
eval (("flip" + a) + "Snd").start();
return;
case "level complete" :
levelCompleteSnd.start();
return;
case "mouseOver" :
mouseOverSnd.start();
return;
case "mouseDown" :
mouseDownSnd.start();
return;
case "out of bonus" :
outOfBonusSnd.start();
}
}
function attachSoundFromLibrary(idname) {
var _local2 = new Sound(this);
_local2.attachSound(idname);
return(_local2);
}
storage = SharedObject.getLocal(gameName + "storage");
yourhigh = storage.data.myhighscore;
if (yourhigh == undefined) {
storage.data.myhighscore = 0;
yourhigh = 0;
}
levelsUnlocked = storage.data.levelsUnlocked;
if (levelsUnlocked == undefined) {
storage.data.levelsUnlocked = 1;
levelsUnlocked = 1;
}
mouseOverSnd = attachSoundFromLibrary("mouseOver.wav");
mouseDownSnd = attachSoundFromLibrary("mouseDownSnd.wav");
flip1Snd = attachSoundFromLibrary("flipTileSnd1.wav");
flip2Snd = attachSoundFromLibrary("flipTileSnd2.wav");
flip3Snd = attachSoundFromLibrary("flipTileSnd3.wav");
levelCompleteSnd = attachSoundFromLibrary("levelCompleteSound.wav");
outOfBonusSnd = attachSoundFromLibrary("outOfBonus.wav");
Frame 7
_quality = "HIGH";
this.playBtn.onRelease = function () {
playSound("mouseDown");
if (levelsUnlocked > 1) {
gotoAndPlay (23);
} else {
gotoAndPlay (24);
}
};
this.playBtn.onRollOver = function () {
playSound("mouseOver");
};
this.reset_btn.onRelease = function () {
playSound("mouseDown");
_root.yourhigh = 0;
yourHighTextBox.text = yourhigh;
trace(yourhigh);
resetclip.gotoAndPlay(2);
storage.data.myhighscore = 0;
storage.flush();
};
this.reset_btn.onRollOver = function () {
playSound("mouseOver");
};
yourHighTextBox.text = yourhigh;
this.playBtn.onRollOver = function () {
playSound("mouseOver");
this.gotoAndStop(2);
};
this.playBtn.onRollOut = function () {
this.gotoAndStop(1);
};
playBtn.gotoAndStop(1);
helpClip._y = -340;
howToPlay.onRollOver = function () {
gs.TweenLite.to(helpClip, 0.5, {_y:0});
playSound("mouseOver");
};
howToPlay.onRollOut = function () {
gs.TweenLite.to(helpClip, 0.5, {_y:-340});
playSound("mouseDown");
};
Frame 22
stop();
Frame 23
function goPlay(temp) {
i = 0;
while (i < 51) {
removeMovieClip(eval ("l" + i));
i++;
}
level = temp;
musicTrack.stop();
gotoAndPlay (24);
}
if (levelsUnlocked == 1) {
level = 1;
musicTrack.stop();
gotoAndPlay (24);
} else {
i = 0;
while (i < 30) {
ty = Math.floor(i / 6);
tx = i - (ty * 6);
attachMovie("lvlBtn", "l" + i, i);
eval ("l" + i)._x = (155 + (tx * 55)) + 25;
eval ("l" + i)._y = 180 + (ty * 55);
eval ("l" + i).num = i + 1;
if (i >= levelsUnlocked) {
eval ("l" + i).gotoAndStop(2);
} else {
eval ("l" + i).gotoAndStop(1);
eval ("l" + i).btn.onRelease = function () {
trace(this._parent._parent);
goPlay(this._parent.num);
};
eval ("l" + i).btn.onRollOver = function () {
playSound("mouseOver");
};
eval ("l" + i).btn.onPress = function () {
playSound("mouseDown");
};
}
if (i != (level - 1)) {
eval ("l" + i).ind._visible = false;
}
i++;
}
}
stop();
Frame 24
function setup() {
textBoxHolder._y = -120;
gs.TweenLite.to(textBoxHolder, 0.5, {_y:0});
scoreBackPanel._y = -80;
gs.TweenLite.to(scoreBackPanel, 0.5, {_y:0});
endGameBtn._y = 520;
gs.TweenLite.to(endGameBtn, 0.5, {_y:450});
resetLevelBtn._y = 520;
gs.TweenLite.to(resetLevelBtn, 0.5, {_y:450});
flipitGameTitle._y = -95;
gs.TweenLite.to(flipitGameTitle, 0.5, {_y:-3.2});
endGameBtn.onRelease = function () {
gameState = "game over";
};
endGameBtn.onRollOver = function () {
this.gotoAndStop(2);
};
endGameBtn.onRollOut = function () {
this.gotoAndStop(1);
};
gridArray = new Array();
bl = "bl";
wh = "wh";
gridArray[1] = new Array(0, 0, bl, 0, 1, bl, 0, 2, bl, 0, 3, bl, 1, 0, bl, 1, 1, wh, 1, 2, wh, 1, 3, bl, 2, 0, bl, 2, 1, wh, 2, 2, wh, 2, 3, bl, 3, 0, bl, 3, 1, bl, 3, 2, bl, 3, 3, bl);
gridArray[2] = new Array(0, 0, wh, 0, 1, bl, 0, 2, bl, 0, 3, wh, 1, 0, bl, 1, 1, bl, 1, 2, bl, 1, 3, bl, 2, 0, bl, 2, 1, bl, 2, 2, bl, 2, 3, bl, 3, 0, wh, 3, 1, bl, 3, 2, bl, 3, 3, wh);
gridArray[3] = new Array(0, 0, bl, 0, 1, wh, 0, 2, wh, 0, 3, bl, 1, 0, wh, 1, 1, bl, 1, 2, bl, 1, 3, wh, 2, 0, wh, 2, 1, bl, 2, 2, bl, 2, 3, wh, 3, 0, bl, 3, 1, wh, 3, 2, wh, 3, 3, bl);
gridArray[4] = new Array(0, 0, bl, 0, 1, wh, 0, 2, wh, 0, 3, wh, 1, 0, wh, 1, 1, bl, 1, 2, wh, 1, 3, wh, 2, 0, wh, 2, 1, wh, 2, 2, bl, 2, 3, wh, 3, 0, wh, 3, 1, wh, 3, 2, wh, 3, 3, bl);
gridArray[5] = new Array(0, 0, bl, 0, 1, wh, 0, 2, wh, 0, 3, bl, 1, 0, wh, 1, 1, wh, 1, 2, wh, 1, 3, wh, 2, 0, wh, 2, 1, wh, 2, 2, wh, 2, 3, wh, 3, 0, wh, 3, 1, wh, 3, 2, wh, 3, 3, wh, 4, 0, bl, 4, 1, wh, 4, 2, wh, 4, 3, bl);
gridArray[6] = new Array(0, 0, bl, 0, 1, wh, 0, 2, wh, 0, 3, bl, 1, 0, bl, 1, 1, wh, 1, 2, bl, 1, 3, wh, 2, 0, wh, 2, 1, wh, 2, 2, wh, 2, 3, wh, 3, 0, bl, 3, 1, wh, 3, 2, bl, 3, 3, wh, 4, 0, bl, 4, 1, wh, 4, 2, wh, 4, 3, bl);
gridArray[6] = new Array(0, 0, wh, 0, 1, bl, 0, 2, bl, 0, 3, wh, 1, 0, bl, 1, 1, bl, 1, 2, bl, 1, 3, bl, 2, 0, bl, 2, 1, wh, 2, 2, wh, 2, 3, bl, 3, 0, bl, 3, 1, bl, 3, 2, bl, 3, 3, bl, 4, 0, wh, 4, 1, bl, 4, 2, bl, 4, 3, wh);
gridArray[7] = new Array(0, 0, wh, 0, 1, wh, 0, 2, wh, 0, 3, wh, 1, 0, bl, 1, 1, wh, 1, 2, wh, 1, 3, bl, 2, 0, wh, 2, 1, wh, 2, 2, wh, 2, 3, wh, 3, 0, bl, 3, 1, wh, 3, 2, wh, 3, 3, bl, 4, 0, wh, 4, 1, wh, 4, 2, wh, 4, 3, wh);
gridArray[8] = new Array(0, 0, wh, 0, 1, wh, 0, 2, bl, 0, 3, wh, 1, 0, bl, 1, 1, wh, 1, 2, bl, 1, 3, bl, 2, 0, wh, 2, 1, bl, 2, 2, wh, 2, 3, wh, 3, 0, bl, 3, 1, wh, 3, 2, bl, 3, 3, bl, 4, 0, wh, 4, 1, wh, 4, 2, bl, 4, 3, wh);
gridArray[9] = new Array(0, 0, bl, 0, 1, bl, 0, 2, bl, 0, 3, bl, 1, 0, bl, 1, 1, wh, 1, 2, wh, 1, 3, bl, 2, 0, bl, 2, 1, bl, 2, 2, bl, 2, 3, bl, 3, 0, bl, 3, 1, wh, 3, 2, wh, 3, 3, bl, 4, 0, bl, 4, 1, bl, 4, 2, bl, 4, 3, bl);
gridArray[10] = new Array(0, 0, bl, 0, 1, bl, 0, 2, wh, 0, 3, wh, 0, 4, bl, 1, 0, wh, 1, 1, wh, 1, 2, bl, 1, 3, bl, 1, 4, wh, 2, 0, bl, 2, 1, bl, 2, 2, bl, 2, 3, bl, 2, 4, bl, 3, 0, bl, 3, 1, bl, 3, 2, bl, 3, 3, bl, 3, 4, bl, 4, 0, wh, 4, 1, bl, 4, 2, bl, 4, 3, wh, 4, 4, wh, 5, 0, bl, 5, 1, wh, 5, 2, wh, 5, 3, bl, 5, 4, bl);
gridArray[11] = new Array(0, 0, wh, 0, 1, wh, 0, 2, bl, 0, 3, wh, 0, 4, wh, 1, 0, bl, 1, 1, bl, 1, 2, wh, 1, 3, bl, 1, 4, bl, 2, 0, wh, 2, 1, bl, 2, 2, bl, 2, 3, bl, 2, 4, wh, 3, 0, bl, 3, 1, bl, 3, 2, wh, 3, 3, bl, 3, 4, bl, 4, 0, wh, 4, 1, wh, 4, 2, bl, 4, 3, wh, 4, 4, wh);
gridArray[12] = new Array(0, 0, bl, 0, 1, wh, 0, 2, bl, 0, 3, wh, 0, 4, bl, 1, 0, bl, 1, 1, bl, 1, 2, wh, 1, 3, bl, 1, 4, bl, 2, 0, wh, 2, 1, wh, 2, 2, wh, 2, 3, wh, 2, 4, wh, 3, 0, wh, 3, 1, wh, 3, 2, wh, 3, 3, wh, 3, 4, wh, 4, 0, bl, 4, 1, bl, 4, 2, wh, 4, 3, bl, 4, 4, bl, 5, 0, bl, 5, 1, wh, 5, 2, bl, 5, 3, wh, 5, 4, bl);
gridArray[13] = new Array(0, 0, wh, 0, 1, wh, 0, 2, wh, 0, 3, wh, 0, 4, wh, 1, 0, bl, 1, 1, bl, 1, 2, bl, 1, 3, bl, 1, 4, bl, 2, 0, bl, 2, 1, bl, 2, 2, bl, 2, 3, bl, 2, 4, bl, 3, 0, bl, 3, 1, bl, 3, 2, bl, 3, 3, bl, 3, 4, bl, 4, 0, bl, 4, 1, bl, 4, 2, bl, 4, 3, bl, 4, 4, bl, 5, 0, wh, 5, 1, wh, 5, 2, wh, 5, 3, wh, 5, 4, wh);
gridArray[14] = new Array(0, 0, wh, 0, 1, wh, 0, 2, bl, 0, 3, wh, 0, 4, wh, 1, 0, wh, 1, 1, bl, 1, 2, wh, 1, 3, bl, 1, 4, wh, 2, 0, wh, 2, 1, bl, 2, 2, wh, 2, 3, bl, 2, 4, wh, 3, 0, wh, 3, 1, bl, 3, 2, wh, 3, 3, bl, 3, 4, wh, 4, 0, wh, 4, 1, bl, 4, 2, wh, 4, 3, bl, 4, 4, wh, 5, 0, wh, 5, 1, wh, 5, 2, bl, 5, 3, wh, 5, 4, wh);
gridArray[15] = new Array(0, 0, wh, 0, 1, bl, 0, 2, bl, 0, 3, bl, 0, 4, bl, 0, 5, wh, 1, 0, bl, 1, 1, bl, 1, 2, wh, 1, 3, wh, 1, 4, bl, 1, 5, bl, 2, 0, bl, 2, 1, wh, 2, 2, bl, 2, 3, bl, 2, 4, wh, 2, 5, bl, 3, 0, bl, 3, 1, wh, 3, 2, bl, 3, 3, bl, 3, 4, wh, 3, 5, bl, 4, 0, bl, 4, 1, bl, 4, 2, wh, 4, 3, wh, 4, 4, bl, 4, 5, bl, 5, 0, wh, 5, 1, bl, 5, 2, bl, 5, 3, bl, 5, 4, bl, 5, 5, wh);
gridArray[16] = new Array(0, 0, bl, 0, 1, wh, 0, 2, bl, 0, 3, bl, 0, 4, wh, 0, 5, bl, 1, 0, bl, 1, 1, wh, 1, 2, bl, 1, 3, bl, 1, 4, wh, 1, 5, bl, 2, 0, bl, 2, 1, wh, 2, 2, wh, 2, 3, wh, 2, 4, wh, 2, 5, bl, 3, 0, bl, 3, 1, wh, 3, 2, wh, 3, 3, wh, 3, 4, wh, 3, 5, bl, 4, 0, bl, 4, 1, wh, 4, 2, bl, 4, 3, bl, 4, 4, wh, 4, 5, bl, 5, 0, bl, 5, 1, wh, 5, 2, bl, 5, 3, bl, 5, 4, wh, 5, 5, bl);
gridArray[17] = new Array(0, 0, bl, 0, 1, bl, 0, 2, wh, 0, 3, wh, 0, 4, bl, 0, 5, bl, 1, 0, bl, 1, 1, bl, 1, 2, bl, 1, 3, bl, 1, 4, bl, 1, 5, bl, 2, 0, wh, 2, 1, bl, 2, 2, bl, 2, 3, bl, 2, 4, bl, 2, 5, wh, 3, 0, wh, 3, 1, bl, 3, 2, bl, 3, 3, bl, 3, 4, bl, 3, 5, wh, 4, 0, bl, 4, 1, bl, 4, 2, bl, 4, 3, bl, 4, 4, bl, 4, 5, bl, 5, 0, bl, 5, 1, bl, 5, 2, wh, 5, 3, wh, 5, 4, bl, 5, 5, bl);
gridArray[18] = new Array(0, 0, bl, 0, 1, bl, 0, 2, bl, 0, 3, bl, 0, 4, bl, 0, 5, bl, 1, 0, bl, 1, 1, bl, 1, 2, bl, 1, 3, bl, 1, 4, bl, 1, 5, bl, 2, 0, wh, 2, 1, wh, 2, 2, wh, 2, 3, wh, 2, 4, wh, 2, 5, wh, 3, 0, wh, 3, 1, wh, 3, 2, wh, 3, 3, wh, 3, 4, wh, 3, 5, wh, 4, 0, bl, 4, 1, bl, 4, 2, bl, 4, 3, bl, 4, 4, bl, 4, 5, bl, 5, 0, bl, 5, 1, bl, 5, 2, bl, 5, 3, bl, 5, 4, bl, 5, 5, bl);
gridArray[19] = new Array(0, 0, wh, 0, 1, bl, 0, 2, bl, 0, 3, wh, 0, 4, bl, 0, 5, wh, 1, 0, bl, 1, 1, bl, 1, 2, bl, 1, 3, bl, 1, 4, bl, 1, 5, bl, 2, 0, bl, 2, 1, bl, 2, 2, bl, 2, 3, bl, 2, 4, bl, 2, 5, wh, 3, 0, wh, 3, 1, bl, 3, 2, bl, 3, 3, bl, 3, 4, bl, 3, 5, bl, 4, 0, bl, 4, 1, bl, 4, 2, bl, 4, 3, bl, 4, 4, bl, 4, 5, bl, 5, 0, wh, 5, 1, bl, 5, 2, wh, 5, 3, bl, 5, 4, bl, 5, 5, wh);
gridArray[20] = new Array(0, 0, wh, 0, 1, bl, 0, 2, bl, 0, 3, bl, 0, 4, bl, 0, 5, wh, 1, 0, bl, 1, 1, bl, 1, 2, bl, 1, 3, bl, 1, 4, bl, 1, 5, bl, 2, 0, wh, 2, 1, bl, 2, 2, wh, 2, 3, wh, 2, 4, bl, 2, 5, wh, 3, 0, bl, 3, 1, bl, 3, 2, bl, 3, 3, bl, 3, 4, bl, 3, 5, bl, 4, 0, wh, 4, 1, bl, 4, 2, wh, 4, 3, wh, 4, 4, bl, 4, 5, wh, 5, 0, bl, 5, 1, bl, 5, 2, bl, 5, 3, bl, 5, 4, bl, 5, 5, bl, 6, 0, wh, 6, 1, bl, 6, 2, bl, 6, 3, bl, 6, 4, bl, 6, 5, wh);
gridArray[21] = new Array(0, 0, bl, 0, 1, wh, 0, 2, wh, 0, 3, wh, 0, 4, wh, 0, 5, bl, 1, 0, wh, 1, 1, wh, 1, 2, bl, 1, 3, bl, 1, 4, wh, 1, 5, wh, 2, 0, wh, 2, 1, wh, 2, 2, bl, 2, 3, bl, 2, 4, wh, 2, 5, wh, 3, 0, wh, 3, 1, wh, 3, 2, wh, 3, 3, wh, 3, 4, wh, 3, 5, wh, 4, 0, wh, 4, 1, wh, 4, 2, bl, 4, 3, bl, 4, 4, wh, 4, 5, wh, 5, 0, wh, 5, 1, wh, 5, 2, bl, 5, 3, bl, 5, 4, wh, 5, 5, wh, 6, 0, bl, 6, 1, wh, 6, 2, wh, 6, 3, wh, 6, 4, wh, 6, 5, bl);
gridArray[22] = new Array(0, 0, wh, 0, 1, bl, 0, 2, bl, 0, 3, wh, 0, 4, bl, 0, 5, bl, 1, 0, wh, 1, 1, wh, 1, 2, wh, 1, 3, wh, 1, 4, bl, 1, 5, bl, 2, 0, wh, 2, 1, wh, 2, 2, wh, 2, 3, bl, 2, 4, bl, 2, 5, bl, 3, 0, wh, 3, 1, wh, 3, 2, bl, 3, 3, bl, 3, 4, wh, 3, 5, wh, 4, 0, bl, 4, 1, bl, 4, 2, bl, 4, 3, wh, 4, 4, wh, 4, 5, wh, 5, 0, bl, 5, 1, bl, 5, 2, wh, 5, 3, wh, 5, 4, wh, 5, 5, wh, 6, 0, bl, 6, 1, bl, 6, 2, wh, 6, 3, bl, 6, 4, bl, 6, 5, wh);
gridArray[23] = new Array(0, 0, bl, 0, 1, bl, 0, 2, bl, 0, 3, bl, 0, 4, bl, 0, 5, bl, 1, 0, bl, 1, 1, bl, 1, 2, bl, 1, 3, bl, 1, 4, bl, 1, 5, bl, 2, 0, bl, 2, 1, bl, 2, 2, bl, 2, 3, bl, 2, 4, bl, 2, 5, bl, 3, 0, wh, 3, 1, wh, 3, 2, wh, 3, 3, wh, 3, 4, wh, 3, 5, wh, 4, 0, bl, 4, 1, bl, 4, 2, bl, 4, 3, bl, 4, 4, bl, 4, 5, bl, 5, 0, bl, 5, 1, bl, 5, 2, bl, 5, 3, bl, 5, 4, bl, 5, 5, bl, 6, 0, bl, 6, 1, bl, 6, 2, bl, 6, 3, bl, 6, 4, bl, 6, 5, bl);
gridArray[24] = new Array(0, 0, wh, 0, 1, bl, 0, 2, wh, 0, 3, wh, 0, 4, bl, 0, 5, bl, 1, 0, wh, 1, 1, wh, 1, 2, wh, 1, 3, wh, 1, 4, wh, 1, 5, wh, 2, 0, bl, 2, 1, wh, 2, 2, bl, 2, 3, wh, 2, 4, bl, 2, 5, wh, 3, 0, bl, 3, 1, bl, 3, 2, wh, 3, 3, wh, 3, 4, bl, 3, 5, bl, 4, 0, wh, 4, 1, bl, 4, 2, wh, 4, 3, bl, 4, 4, wh, 4, 5, bl, 5, 0, wh, 5, 1, wh, 5, 2, wh, 5, 3, wh, 5, 4, wh, 5, 5, wh, 6, 0, bl, 6, 1, bl, 6, 2, wh, 6, 3, wh, 6, 4, bl, 6, 5, wh);
gridArray[25] = new Array(0, 0, wh, 0, 1, bl, 0, 2, bl, 0, 3, bl, 0, 4, bl, 1, 0, bl, 1, 1, wh, 1, 2, bl, 1, 3, bl, 1, 4, bl, 2, 0, bl, 2, 1, bl, 2, 2, bl, 2, 3, wh, 2, 4, bl, 3, 0, wh, 3, 1, bl, 3, 2, bl, 3, 3, bl, 3, 4, bl, 4, 0, wh, 4, 1, bl, 4, 2, wh, 4, 3, bl, 4, 4, wh, 5, 0, bl, 5, 1, wh, 5, 2, bl, 5, 3, wh, 5, 4, wh, 6, 0, bl, 6, 1, bl, 6, 2, wh, 6, 3, wh, 6, 4, bl, 7, 0, bl, 7, 1, wh, 7, 2, bl, 7, 3, bl, 7, 4, bl, 8, 0, bl, 8, 1, bl, 8, 2, wh, 8, 3, bl, 8, 4, wh);
gridArray[26] = new Array(0, 0, bl, 0, 1, bl, 0, 2, bl, 0, 3, bl, 0, 4, bl, 1, 0, wh, 1, 1, bl, 1, 2, wh, 1, 3, bl, 1, 4, wh, 2, 0, wh, 2, 1, wh, 2, 2, wh, 2, 3, wh, 2, 4, wh, 3, 0, bl, 3, 1, bl, 3, 2, bl, 3, 3, bl, 3, 4, bl, 4, 0, bl, 4, 1, wh, 4, 2, bl, 4, 3, wh, 4, 4, bl, 5, 0, bl, 5, 1, bl, 5, 2, bl, 5, 3, bl, 5, 4, bl, 6, 0, wh, 6, 1, wh, 6, 2, wh, 6, 3, wh, 6, 4, wh, 7, 0, wh, 7, 1, bl, 7, 2, wh, 7, 3, bl, 7, 4, wh, 8, 0, bl, 8, 1, bl, 8, 2, bl, 8, 3, bl, 8, 4, bl);
gridArray[27] = new Array(0, 0, bl, 0, 1, bl, 0, 2, bl, 0, 3, bl, 0, 4, bl, 1, 0, wh, 1, 1, wh, 1, 2, wh, 1, 3, wh, 1, 4, wh, 2, 0, wh, 2, 1, bl, 2, 2, wh, 2, 3, bl, 2, 4, wh, 3, 0, bl, 3, 1, wh, 3, 2, bl, 3, 3, wh, 3, 4, bl, 4, 0, bl, 4, 1, bl, 4, 2, wh, 4, 3, bl, 4, 4, bl, 5, 0, bl, 5, 1, wh, 5, 2, bl, 5, 3, wh, 5, 4, bl, 6, 0, wh, 6, 1, bl, 6, 2, wh, 6, 3, bl, 6, 4, wh, 7, 0, wh, 7, 1, wh, 7, 2, wh, 7, 3, wh, 7, 4, wh, 8, 0, bl, 8, 1, bl, 8, 2, bl, 8, 3, bl, 8, 4, bl);
gridArray[28] = new Array(0, 0, bl, 0, 1, wh, 0, 2, wh, 0, 3, wh, 0, 4, bl, 1, 0, wh, 1, 1, bl, 1, 2, bl, 1, 3, bl, 1, 4, wh, 2, 0, bl, 2, 1, wh, 2, 2, wh, 2, 3, wh, 2, 4, bl, 3, 0, wh, 3, 1, wh, 3, 2, bl, 3, 3, wh, 3, 4, wh, 4, 0, bl, 4, 1, bl, 4, 2, wh, 4, 3, bl, 4, 4, bl, 5, 0, wh, 5, 1, wh, 5, 2, bl, 5, 3, wh, 5, 4, wh, 6, 0, bl, 6, 1, wh, 6, 2, wh, 6, 3, wh, 6, 4, bl, 7, 0, wh, 7, 1, bl, 7, 2, bl, 7, 3, bl, 7, 4, wh, 8, 0, bl, 8, 1, wh, 8, 2, wh, 8, 3, wh, 8, 4, bl);
gridArray[29] = new Array(0, 0, bl, 0, 1, bl, 0, 2, bl, 0, 3, bl, 0, 4, bl, 1, 0, bl, 1, 1, wh, 1, 2, bl, 1, 3, wh, 1, 4, bl, 2, 0, bl, 2, 1, wh, 2, 2, wh, 2, 3, wh, 2, 4, bl, 3, 0, bl, 3, 1, wh, 3, 2, wh, 3, 3, wh, 3, 4, bl, 4, 0, bl, 4, 1, wh, 4, 2, bl, 4, 3, wh, 4, 4, bl, 5, 0, bl, 5, 1, wh, 5, 2, wh, 5, 3, wh, 5, 4, bl, 6, 0, bl, 6, 1, wh, 6, 2, wh, 6, 3, wh, 6, 4, bl, 7, 0, bl, 7, 1, wh, 7, 2, bl, 7, 3, wh, 7, 4, bl, 8, 0, bl, 8, 1, bl, 8, 2, bl, 8, 3, bl, 8, 4, bl);
gridArray[30] = new Array(0, 0, wh, 0, 1, wh, 0, 2, wh, 0, 3, wh, 0, 4, wh, 1, 0, bl, 1, 1, wh, 1, 2, wh, 1, 3, wh, 1, 4, bl, 2, 0, wh, 2, 1, wh, 2, 2, bl, 2, 3, wh, 2, 4, wh, 3, 0, bl, 3, 1, bl, 3, 2, wh, 3, 3, bl, 3, 4, bl, 4, 0, bl, 4, 1, bl, 4, 2, wh, 4, 3, bl, 4, 4, bl, 5, 0, bl, 5, 1, bl, 5, 2, wh, 5, 3, bl, 5, 4, bl, 6, 0, wh, 6, 1, wh, 6, 2, bl, 6, 3, wh, 6, 4, wh, 7, 0, bl, 7, 1, wh, 7, 2, wh, 7, 3, wh, 7, 4, bl, 8, 0, wh, 8, 1, wh, 8, 2, wh, 8, 3, wh, 8, 4, wh);
if (levelEdit) {
trace(gridArray.length);
level = gridArray.length;
level = 11;
createEmptyArray();
} else if (level == undefined) {
level = 1;
}
firstPlayMessage._alpha = 0;
if (level == 1) {
gs.TweenLite.to(firstPlayMessage, 1, {_alpha:100, delay:2});
}
clipSize = 50;
score = 0;
resetLevelBtn.onRelease = function () {
if (gameState == "playing") {
gameState = "reset level";
}
};
resetLevelBtn.onRollOver = function () {
this.gotoAndStop(2);
};
resetLevelBtn.onRollOut = function () {
this.gotoAndStop(1);
};
}
function getLevelDimensions() {
if (level < 5) {
levelXSize = 4;
levelYSize = 4;
}
if ((level > 4) && (level < 10)) {
levelXSize = 5;
levelYSize = 4;
}
if ((level > 9) && (level < 15)) {
levelXSize = 6;
levelYSize = 5;
}
if ((level > 14) && (level < 20)) {
levelXSize = 6;
levelYSize = 6;
}
if ((level > 19) && (level < 25)) {
levelXSize = 7;
levelYSize = 6;
}
if ((level > 24) && (level < 31)) {
levelXSize = 9;
levelYSize = 5;
}
}
function setupGrid() {
removeMovieClip(levelCompleteClipRef);
if (level > levelsUnlocked) {
storage.data.levelsUnlocked = level;
levelsUnlocked = level;
storage.flush();
}
outOfBonusSndPlayed = false;
if (level > 1) {
gs.TweenLite.to(firstPlayMessage, 3, {_alpha:0});
}
trace("setup grid");
getLevelDimensions();
n = gridArray[level].length;
clipNum = 1;
clipArray = new Array();
var _local9 = {x:50, y:50};
tilesWidth = levelXSize * clipSize;
tilesHigh = levelYSize * clipSize;
trace(tilesWidth);
xOffset = ((640 - tilesWidth) / 2) - 25;
if (level < 25) {
yOffset = (75 + ((405 - tilesHigh) / 2)) - 25;
} else {
yOffset = (55 + ((405 - tilesHigh) / 2)) - 25;
}
i = 0;
while (i < n) {
tx = gridArray[level][i];
ty = gridArray[level][i + 1];
tileType = gridArray[level][i + 2];
t = tileHolder.attachMovie("tile", ("t" + tx) + ty, clipNum);
t.x = tx;
t.y = ty;
t._x = 320;
t._y = 550;
t._rotation = Math.random() * 360;
gs.TweenLite.to(t, 0.5, {_x:(xOffset + (tx * clipSize)) + 50, _y:(yOffset + (ty * clipSize)) + 50, _xscale:100, _yscale:100, _rotation:0, _alpha:100, delay:(i / 3) / 10});
clipArray.push(t);
t.flipHotspot.onPress = function () {
testFlip(this._parent);
};
if (tileType.toLowerCase() == bl) {
tileType = "black";
}
if (tileType.toLowerCase() == wh) {
tileType = "white";
}
t.setFace(tileType);
clipNum++;
i = i + 3;
}
thisLevelsTiles = n / 3;
flipBonus = thisLevelsTiles * 50;
}
function createEmptyArray() {
trace("setting up");
getLevelDimensions();
gridArray[level] = new Array();
var k = 0;
while (k < levelXSize) {
var l = 0;
while (l < levelYSize) {
var tc = eval (("tileHolder.t" + k) + l);
colourRef = "wh";
gridArray[level].push(k, l, colourRef);
l++;
}
k++;
}
}
function compileArray() {
outputArray = new Array();
var k = 0;
while (k < 20) {
var l = 0;
while (l < 20) {
var tc = eval (("tileHolder.t" + k) + l);
if (tc != undefined) {
colourRef = tc.getFace();
if (colourRef == "white") {
colourRef = "wh";
} else {
colourRef = "bl";
}
outputArray.push(tc.x, tc.y, colourRef);
}
l++;
}
k++;
}
trace(((("gridArray[" + level) + "] = new Array(") + outputArray) + ")");
}
function testFlip(_clip) {
if (gameState == "playing") {
playSound("flip");
_clip.swapDepths(1000);
_clip.flipTile();
thisTX = _clip.x;
thisTY = _clip.y;
flipArray(thisTX, thisTY);
tf = eval (("tileHolder.t" + (thisTX - 1)) + (thisTY - 0));
tf.flipTile();
tf = eval (("tileHolder.t" + (thisTX + 1)) + (thisTY - 0));
tf.flipTile();
tf = eval (("tileHolder.t" + (thisTX + 0)) + (thisTY - 1));
tf.flipTile();
tf = eval (("tileHolder.t" + (thisTX + 0)) + (thisTY + 1));
tf.flipTile();
levelFlipCount++;
flipBonus = flipBonus - 10;
if (flipBonus <= 0) {
flipBonus = 0;
if (outOfBonusSndPlayed == false) {
playSound("out of bonus");
outOfBonusSndPlayed = true;
}
}
updateDisplay();
testIfLevelComplete();
}
}
function updateDisplay() {
if (levelFlipCount < 10000) {
textBoxHolder.levelFlipCountText.text = levelFlipCount;
} else {
textBoxHolder.levelFlipCountText.text = "9999";
}
textBoxHolder.levelText.text = level;
textBoxHolder.scoreText.text = score;
textBoxHolder.flipBonusText.text = flipBonus;
}
function testIfLevelComplete() {
var _local2 = clipArray.length;
amountTilesWhite = 0;
targetAmountofTiles = thisLevelsTiles;
while (_local2--) {
var _local1 = clipArray[_local2];
if (_local1.getFace() == "white") {
amountTilesWhite++;
}
}
if (amountTilesWhite >= targetAmountofTiles) {
gameState = "level complete";
}
}
function removeClip(_clip) {
removeMovieClip(_clip);
}
function removeAllTiles(_num) {
var _local2 = clipArray.length;
amountTilesWhite = 0;
targetAmountofTiles = thisLevelsTiles;
while (_local2--) {
var _local1 = clipArray[_local2];
if (_num == undefined) {
gs.TweenLite.to(_local1, 0.5, {_x:320, _y:-30, delay:_local2 / 20, ease:mx.transitions.easing.Back.easeIn, onComplete:removeClip, onCompleteParams:[_local1]});
}
if (_num == 1) {
gs.TweenLite.to(_local1, 0.5, {_xscale:200, _yscale:200, _alpha:0, delay:_local2 / 20, ease:mx.transitions.easing.Back.easeIn, onComplete:removeClip, onCompleteParams:[_local1]});
}
}
timeNeededForTransition = Math.ceil(((clipArray.length / 20) + 0.5) * frameRate);
trace("max time = " + timeNeededForTransition);
}
function loop() {
switch (gameState) {
case "playing" :
break;
case "game over" :
gs.TweenLite.to(textBoxHolder, 0.5, {_y:-120});
gs.TweenLite.to(scoreBackPanel, 0.5, {_y:-80});
gs.TweenLite.to(endGameBtn, 0.5, {_y:520});
gs.TweenLite.to(resetLevelBtn, 0.5, {_y:520});
gs.TweenLite.to(flipitGameTitle, 0.5, {_y:-95});
gs.TweenLite.to(firstPlayMessage, 0.5, {_alpha:0});
removeAllTiles(1);
count = timeNeededForTransition;
gameState = "game over wait";
break;
case "game over wait" :
count--;
if (count < 1) {
gotoAndPlay (25);
delete onEnterFrame;
gameState = "game over screen";
}
break;
case "reset level" :
removeAllTiles(1);
count = timeNeededForTransition;
gameState = "reset level wait";
break;
case "reset level wait" :
count--;
if (count < 1) {
setupGrid();
gameState = "setup level";
}
break;
case "level complete" :
trace("level complete");
playSound("level complete");
levelCompleteClipRef = attachMovie("levelCompleteClip", "levelCompleteClip", 100);
levelCompleteClipRef._x = 320;
levelCompleteClipRef._y = 260;
levelCompleteClipRef._alpha = 0;
levelCompleteClipRef._xscale = (levelCompleteClipRef._yscale = 10);
gs.TweenLite.to(levelCompleteClipRef, 0.5, {delay:0.5, _xscale:100, _yscale:100, _alpha:100, ease:mx.transitions.easing.Back.easeOut});
if (flipBonus > 0) {
fbt = attachMovie("flipBonusTellText", "flipBonusTellText", 101);
fbt.textBox.text = "flip bonus: " + flipBonus;
score = score + flipBonus;
fbt._y = 99;
fbt._x = 850;
gs.TweenLite.to(fbt, 0.5, {delay:0.5, _x:625, ease:mx.transitions.easing.Back.easeOut});
}
levelBonus = level * 100;
lbt = attachMovie("levelBonusTellText", "levelBonusTellText", 102);
lbt._y = 82;
lbt._x = 850;
lbt.textBox.text = "level bonus: " + levelBonus;
gs.TweenLite.to(lbt, 0.5, {_x:625, ease:mx.transitions.easing.Back.easeOut});
score = score + levelBonus;
count = 70;
updateDisplay();
gameState = "level complete wait";
break;
case "level complete wait" :
count--;
if (count < 1) {
gs.TweenLite.to(levelCompleteClipRef, 0.5, {_xscale:150, _yscale:150, _alpha:0, ease:mx.transitions.easing.Back.easeIn, onComplete:removeClip, onCompleteParams:[levelCompleteClipRef]});
gs.TweenLite.to(lbt, 0.5, {delay:0.25, _x:850, ease:mx.transitions.easing.Back.easeIn, onComplete:removeClip, onCompleteParams:[levelCompleteClipRef]});
gs.TweenLite.to(fbt, 0.5, {_x:850, ease:mx.transitions.easing.Back.easeIn, onComplete:removeClip, onCompleteParams:[levelCompleteClipRef]});
trace("level cleanup wait");
removeAllTiles();
count = timeNeededForTransition;
gameState = "level cleanup wait";
}
break;
case "level cleanup wait" :
count--;
if (count < 1) {
level++;
gs.TweenLite.to(textBoxHolder.levelText, 0.5, {_xscale:150, _yscale:150, ease:mx.transitions.easing.Back.easeOut});
gs.TweenLite.to(textBoxHolder.levelText, 0.5, {delay:0.51, overwrite:false, _xscale:100, _yscale:100, overwrite:false});
gameState = "setup level";
}
if (level > 30) {
gameState = "game complete";
}
break;
case "game complete" :
removeAllTiles();
count = timeNeededForTransition;
gameState = "game complete wait";
break;
case "game complete wait" :
count--;
if (count < 1) {
gotoAndPlay (34);
delete onEnterFrame;
gameState = "game completed";
}
break;
case "setup" :
gameState = "setup level";
break;
case "setup level" :
gameState = "playing";
setupGrid();
levelFlipCount = 0;
updateDisplay();
}
}
stop();
var tileType;
var gridArray;
var clipArray;
var tx;
var ty;
var i;
var n;
var clipNum;
var clipSize;
var thisLevelsTiles;
var amountTilesWhite;
var levelBonus;
var flipBonus;
var t;
var gameState;
var lastClipTurned;
var frameRate;
var outOfBonusSndPlayed;
gameState = "setup";
onMouseMove = mouseMoveTest;
onEnterFrame = loop;
frameRate = 37;
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (levelEdit) {
trace("output for that level");
compileArray();
}
};
Key.addListener(keyListener);
setup();
Frame 25
gameOverText._alpha = 0;
gameOverText._xscale = (gameOverText._yscale = 200);
gs.TweenLite.to(gameOverText, 0.5, {_alpha:100, _yscale:100, _xscale:100, ease:mx.transitions.easing.Back.easeOut});
scoreboxes._alpha = 0;
gs.TweenLite.to(scoreboxes, 0.5, {delay:0.75, _alpha:100});
yourHighestTextBox._alpha = 0;
gs.TweenLite.to(yourHighestTextBox, 0.5, {delay:1, _alpha:100});
playBtn._alpha = 0;
playBtn._xscale = (playBtn._yscale = 200);
gs.TweenLite.to(playBtn, 0.5, {delay:1, _alpha:100, _yscale:100, _xscale:100, ease:mx.transitions.easing.Back.easeOut});
_quality = "best";
if (score > yourhigh) {
yourhigh = score;
storage.data.myhighscore = score;
}
this.playBtn.onRelease = function () {
playSound("mouseDown");
removeMovieClip(highHolder);
if (levelsUnlocked > 1) {
gotoAndPlay (23);
} else {
gotoAndPlay (24);
}
};
this.playBtn.onRollOver = function () {
playSound("mouseOver");
this.gotoAndStop(2);
};
this.playBtn.onRollOut = function () {
this.gotoAndStop(1);
};
playBtn.gotoAndStop(1);
if (score > 1000) {
t = this.createEmptyMovieClip("highHolder", 1000);
loadMovie ("http://www.terrypaton.com/highscores/highscoreSubmit.swf", highHolder);
t._x = 50;
t._y = 320;
}
if (yourhigh != undefined) {
yourHighestTextBox.text = "YOUR HIGHEST SCORE: " + yourhigh;
} else {
yourHighestTextBox.text = " ";
}
storage.flush();
Frame 33
stop();
Frame 34
gameCompleteText._alpha = 0;
gameCompleteText._xscale = (gameCompleteText._yscale = 200);
gs.TweenLite.to(gameCompleteText, 0.5, {_alpha:100, _yscale:100, _xscale:100, ease:mx.transitions.easing.Back.easeOut});
scoreBoxes2._alpha = 0;
gs.TweenLite.to(scoreBoxes2, 0.5, {delay:0.75, _alpha:100});
yourHighestTextBox._alpha = 0;
gs.TweenLite.to(yourHighestTextBox, 0.5, {delay:1, _alpha:100});
playBtn._alpha = 0;
playBtn._xscale = (playBtn._yscale = 200);
gs.TweenLite.to(playBtn, 0.5, {delay:1, _alpha:100, _yscale:100, _xscale:100, ease:mx.transitions.easing.Back.easeOut});
_quality = "best";
if (_url.slice(0, 4) != "file") {
getURL (("javascript:pageTracker._trackPageview('/gameCompleted/" + gameName) + "');");
}
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");
this.gotoAndStop(2);
};
this.playBtn.onRollOut = function () {
this.gotoAndStop(1);
};
playBtn.gotoAndStop(1);
if (score > 1000) {
t = this.createEmptyMovieClip("highHolder", 1000);
loadMovie ("http://www.terrypaton.com/highscores/highscoreSubmit.swf", highHolder);
t._x = 50;
t._y = 320;
}
if (yourhigh != undefined) {
yourHighestTextBox.text = "YOUR HIGHEST SCORE: " + yourhigh;
} else {
yourHighestTextBox.text = " ";
}
storage.flush();
clipNum = 0;
i = 0;
while (i < 11) {
t = tileHolder.attachMovie("tile", "t" + clipNum, clipNum);
t._x = (i * 64) + 20;
t._y = -60;
t._rotation = Math.random() * 360;
clipNum++;
var n = Math.floor(Math.random() * 10);
if (n < 5) {
t.gotoAndStop("black");
} else {
t.gotoAndStop("white");
}
gs.TweenLite.to(t, 0.5, {_y:5, delay:(i / 10) + (Math.random() * 1.5)});
i++;
}
i = 0;
while (i < 11) {
t = tileHolder.attachMovie("tile", "t" + clipNum, clipNum);
t._x = (i * 64) + 20;
t._y = 535;
t._rotation = Math.random() * 360;
clipNum++;
var n = Math.floor(Math.random() * 10);
if (n < 5) {
t.gotoAndStop("black");
} else {
t.gotoAndStop("white");
}
gs.TweenLite.to(t, 0.5, {_y:475, delay:(i / 10) + (Math.random() * 1.5)});
i++;
}
i = 0;
while (i < 6) {
t = tileHolder.attachMovie("tile", "t" + clipNum, clipNum);
t._x = -65;
t._y = (i * 64) + 75;
gs.TweenLite.to(t, 0.5, {_x:5, delay:((i / 3) / 10) + (Math.random() * 1.5)});
t._rotation = Math.random() * 360;
clipNum++;
var n = Math.floor(Math.random() * 10);
if (n < 5) {
t.gotoAndStop("black");
} else {
t.gotoAndStop("white");
}
gs.TweenLite.to(t, 0.5, {_x:5, delay:i / 10});
i++;
}
i = 0;
while (i < 6) {
t = tileHolder.attachMovie("tile", "t" + clipNum, clipNum);
t._x = 695;
t._y = (i * 64) + 75;
t._rotation = Math.random() * 360;
clipNum++;
var n = Math.floor(Math.random() * 10);
if (n < 5) {
t.gotoAndStop("black");
} else {
t.gotoAndStop("white");
}
gs.TweenLite.to(t, 0.5, {_x:635, delay:(i / 10) + (Math.random() * 1.5)});
i++;
}
Frame 42
stop();
Symbol 194 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 195 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 196 MovieClip [__Packages.tileClass] Frame 0
class tileClass extends MovieClip
{
var faceDisplayed, gotoAndStop, gotoAndPlay;
function tileClass () {
super();
}
function getFace() {
return(faceDisplayed);
}
function setFace(_val) {
faceDisplayed = _val;
if (faceDisplayed == "white") {
gotoAndStop("white");
} else if (faceDisplayed == "black") {
gotoAndStop("black");
}
}
function flipTile() {
if (faceDisplayed == "white") {
faceDisplayed = "black";
gotoAndPlay("turnBlack");
} else if (faceDisplayed == "black") {
faceDisplayed = "white";
gotoAndPlay("turnWhite");
}
}
}
Symbol 197 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 198 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 199 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 200 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 201 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 202 MovieClip [__Packages.gs.TweenLite] Frame 0
class gs.TweenLite
{
static var _e, _gc;
var tweenID, endTargetID, vars, duration, delay, target, _endTarget, tweens, extraTweens, initTime, _active, color, colorParts, _sound, startTime, __get__endTarget;
function TweenLite ($target, $duration, $vars) {
_cnt++;
tweenID = "tw" + _cnt;
endTargetID = getID($target, true);
if (($vars.overwrite != false) && ($target != undefined)) {
delete _all[endTargetID];
_all[endTargetID] = {info:[$target, endTargetID]};
}
_all[endTargetID][tweenID] = this;
vars = $vars;
duration = $duration;
delay = $vars.delay || 0;
if ($duration == 0) {
duration = 0.001;
if (delay == 0) {
vars.runBackwards = true;
}
}
target = (_endTarget = $target);
if (typeof(vars.ease) != "function") {
vars.ease = easeOut;
}
if (vars.easeParams != undefined) {
vars.proxiedEase = vars.ease;
vars.ease = easeProxy;
}
if (vars.mcColor != undefined) {
vars.tint = vars.mcColor;
}
if (typeof(vars.autoAlpha) == "number") {
vars._alpha = vars.autoAlpha;
}
tweens = {};
extraTweens = {};
initTime = getTimer();
if (vars.runBackwards == true) {
initTweenVals();
}
_active = false;
if (($duration == 0) && (delay == 0)) {
complete(true);
} else {
if (_e._visible != false) {
if (!_root.tweenLite_mc) {
var _local5 = _root.getNextHighestDepth() || 9999;
_e = _root.createEmptyMovieClip("tweenLite_mc", _local5);
_e.swapDepths(-1);
} else {
_e = _root.tweenLite_mc;
}
_e._visible = false;
clearInterval(_gc);
_gc = setInterval(killGarbage, 2000);
}
_e.onEnterFrame = executeAll;
}
}
function initTweenVals() {
var _local5 = delay - ((getTimer() - initTime) / 1000);
var _local8;
if (target instanceof Array) {
var _local7 = vars.endArray || ([]);
var _local2 = 0;
while (_local2 < _local7.length) {
if ((target[_local2] != _local7[_local2]) && (target[_local2] != undefined)) {
tweens[_local2.toString()] = {o:target, s:target[_local2], c:_local7[_local2] - target[_local2]};
}
_local2++;
}
} else {
for (var _local27 in vars) {
if ((((((((((((((_local27 == "delay") || (_local27 == "ease")) || (_local27 == "overwrite")) || (_local27 == "onComplete")) || (_local27 == "onCompleteParams")) || (_local27 == "runBackwards")) || (_local27 == "onUpdate")) || (_local27 == "onUpdateParams")) || (_local27 == "autoAlpha")) || (_local27 == "_autoAlpha")) || (_local27 == "onStart")) || (_local27 == "onStartParams")) || (_local27 == "easeParams")) || (_local27 == "mcColor")) {
} else if ((_local27 == "tint") && ((typeof(target) == "movieclip") || (target instanceof TextField))) {
color = new Color(target);
colorParts = color.getTransform();
var _local6;
var _local4;
if ((vars[_local27] == null) || (vars[_local27] == "")) {
if (vars._alpha != undefined) {
_local4 = vars._alpha;
delete vars._alpha;
delete tweens._alpha;
} else {
_local4 = target._alpha;
}
_local6 = {rb:0, gb:0, bb:0, ra:_local4, ga:_local4, ba:_local4, ease:vars.ease, delay:_local5, overwrite:false, runBackwards:vars.runBackwards};
} else {
_local6 = {rb:vars[_local27] >> 16, gb:(vars[_local27] >> 8) & 255, bb:vars[_local27] & 255, ra:0, ga:0, ba:0, ease:vars.ease, delay:_local5, overwrite:false, runBackwards:vars.runBackwards};
}
var _local10 = new gs.TweenLite(colorParts, duration, _local6);
var _local11 = new gs.TweenLite(this, duration, {colorProxy:1, delay:_local5, overwrite:false, runBackwards:vars.runBackwards});
_local10.endTarget = (_local11.endTarget = target);
} else if ((_local27 == "volume") && (typeof(target) == "movieclip")) {
_sound = new Sound(target);
var _local9 = new gs.TweenLite(this, duration, {volumeProxy:vars[_local27], ease:easeOut, delay:_local5, overwrite:false, runBackwards:vars.runBackwards});
_local9.endTarget = target;
} else if (target[_local27] != undefined) {
if (typeof(vars[_local27]) == "number") {
_local8 = vars[_local27] - target[_local27];
} else {
_local8 = Number(vars[_local27]);
}
tweens[_local27] = {o:target, s:target[_local27], c:_local8};
} else {
extraTweens[_local27] = {o:target, s:0, c:0, v:vars[_local27]};
}
}
}
if (vars.runBackwards == true) {
var _local3;
for (var _local27 in tweens) {
_local3 = tweens[_local27];
_local3.s = _local3.s + _local3.c;
_local3.c = _local3.c * -1;
_local3.o[_local27] = _local3.s;
}
if (vars.onUpdate != undefined) {
vars.onUpdate.apply(null, vars.onUpdateParams);
}
}
if (typeof(vars.autoAlpha) == "number") {
target._visible = !((vars.runBackwards == true) && (target._alpha == 0));
}
}
static function to($target, $duration, $vars) {
return(new gs.TweenLite($target, $duration, $vars));
}
static function from($target, $duration, $vars) {
$vars.runBackwards = true;
return(new gs.TweenLite($target, $duration, $vars));
}
static function delayedCall($delay, $onComplete, $onCompleteParams) {
return(new gs.TweenLite($onComplete, 0, {delay:$delay, onComplete:$onComplete, onCompleteParams:$onCompleteParams, overwrite:false}));
}
static function removeTween($t) {
_all[$t.endTargetID][$t.tweenID] = {active:false};
delete _all[$t.endTargetID][$t.tweenID];
}
static function killTweensOf($tg, $complete) {
var _local3 = getID($tg, true);
if ($complete) {
var _local1 = _all[_local3];
for (var _local2 in _local1) {
_local1[_local2].complete(false);
}
}
delete _all[_local3];
}
function complete($skipRender) {
if ($skipRender != true) {
startTime = 0;
render(duration * 1000);
return(undefined);
}
if ((typeof(vars.autoAlpha) == "number") && (target._alpha == 0)) {
target._visible = false;
}
if (vars.onComplete) {
vars.onComplete.apply(null, vars.onCompleteParams);
}
removeTween(this);
}
static function getID($tg, $lookup) {
var _local3;
if ($lookup) {
var _local1 = _all;
if (typeof($tg) == "movieclip") {
if (_local1[String($tg)] != undefined) {
return(String($tg));
}
_local3 = String($tg);
_all[_local3] = {info:[$tg, _local3]};
return(_local3);
}
for (var _local4 in _local1) {
if (_local1[_local4].info[0] == $tg) {
return(_local4);
}
}
}
_cnt++;
_local3 = "t" + _cnt;
_all[_local3] = {info:[$tg, _local3]};
return(_local3);
}
function render(t) {
var _local4 = (t - startTime) / 1000;
if (_local4 > duration) {
_local4 = duration;
}
var _local2;
var _local3 = vars.ease(_local4, 0, 1, duration);
for (var _local5 in tweens) {
_local2 = tweens[_local5];
_local2.o[_local5] = _local2.s + (_local3 * _local2.c);
}
if (vars.onUpdate != undefined) {
vars.onUpdate.apply(null, vars.onUpdateParams);
}
if (_local4 == duration) {
complete(true);
}
}
static function executeAll() {
var _local2 = _all;
var _local3 = getTimer();
var _local1;
for (var _local5 in _local2) {
for (var _local4 in _local2[_local5]) {
_local1 = _local2[_local5][_local4];
if (_local1.active) {
_local1.render(_local3);
}
}
}
}
static function killGarbage() {
if (_e.onEnterFrame != null) {
var _local1 = _all;
var _local2;
var _local3;
var _local5;
var _local6 = 0;
var _local4 = 0;
for (_local3 in _local1) {
_local4 = 0;
for (_local5 in _local1[_local3]) {
_local2 = _local1[_local3][_local5];
if (_local2.tweens == undefined) {
} else {
_local4++;
}
}
if (_local4 == 0) {
delete _local1[_local3];
} else {
_local6++;
}
}
if (_local6 == 0) {
_e.onEnterFrame = null;
}
}
}
static function easeOut($t, $b, $c, $d) {
$t = $t / $d;
return((((-$c) * $t) * ($t - 2)) + $b);
}
function easeProxy($t, $b, $c, $d) {
var _local3 = this;
return(_local3.proxiedEase.apply(null, arguments.concat(_local3.easeParams)));
}
function get active() {
if (_active) {
return(true);
}
if (((getTimer() - initTime) / 1000) > delay) {
_active = true;
startTime = initTime + (delay * 1000);
if (vars.runBackwards != true) {
initTweenVals();
} else if (typeof(vars.autoAlpha) == "number") {
target._visible = true;
}
if (duration == 0.001) {
startTime = startTime - 1;
}
if (vars.onStart != undefined) {
vars.onStart.apply(null, vars.onStartParams);
}
return(true);
}
return(false);
}
function set endTarget($t) {
_all[endTargetID][tweenID] = {active:false};
delete _all[endTargetID][tweenID];
endTargetID = getID($t, true);
_endTarget = $t;
_all[endTargetID][tweenID] = this;
//return(__get__endTarget());
}
function set volumeProxy($n) {
_sound.setVolume($n);
//return(volumeProxy);
}
function get volumeProxy() {
return(_sound.getVolume());
}
function set colorProxy($n) {
color.setTransform(colorParts);
//return(colorProxy);
}
function get colorProxy() {
return(0);
}
static var version = 5.8;
static var _all = new Object();
static var _cnt = -16000;
static var killDelayedCallsTo = killTweensOf;
}
Symbol 203 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 6 MovieClip [letter] Frame 1
#initclip 11
Object.registerClass("letter", letterClass);
#endinitclip
Symbol 60 MovieClip [tile] Frame 1
#initclip 12
Object.registerClass("tile", tileClass);
#endinitclip
stop();
Symbol 60 MovieClip [tile] Frame 11
stop();
Symbol 71 Button
on (rollOver) {
this.bState = true;
}
on (rollOut) {
this.bState = false;
}
Symbol 82 MovieClip Frame 1
stop();
Symbol 94 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 94 MovieClip Frame 92
_root.play();
Symbol 111 MovieClip Frame 1
stop();
Symbol 148 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 161 MovieClip Frame 1
stop();
Symbol 163 MovieClip Frame 1
stop();