Frame 1
Security.allowDomain("*");
MochiAd.showPreGameAd({id:"189cf906a433f118", 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 = "sudoku";
vNum = "1.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.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 = "sudoku";
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 "points" :
pointsSnd.start();
return;
case "explode" :
a = random(2) + 1;
eval (("explode" + a) + "Snd").start();
return;
case "energy" :
energySnd.start();
return;
case "mouseOver" :
mouseOverSnd.start();
return;
case "mouseDown" :
mouseDownSnd.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;
}
userCompletedPuzzlesAmount = storage.data.userCompletedPuzzles;
if (userCompletedPuzzlesAmount == undefined) {
storage.data.userCompletedPuzzles = 0;
userCompletedPuzzlesAmount = 0;
}
trace("userCompletedPuzzlesAmount = " + userCompletedPuzzlesAmount);
mouseOverSnd = attachSoundFromLibrary("mouseOver.wav");
mouseDownSnd = attachSoundFromLibrary("mouseDownSnd.wav");
explode1Snd = attachSoundFromLibrary("explode1Snd.wav");
explode2Snd = attachSoundFromLibrary("explode2Snd.wav");
explode3Snd = attachSoundFromLibrary("explode3Snd.wav");
pointsSnd = attachSoundFromLibrary("pointsSnd.wav");
energySnd = attachSoundFromLibrary("energySnd.wav");
jumpSnd = attachSoundFromLibrary("jumpSnd.wav");
Frame 7
_quality = "HIGH";
this.playBtn.onRelease = function () {
gotoAndPlay (23);
playSound("mouseDown");
};
this.playBtn.onRollOver = function () {
playSound("mouseOver");
};
this.reset_btn.onRelease = function () {
playSound("mouseDown");
_root.userCompletedPuzzlesAmount = 0;
resetclip.gotoAndPlay(2);
storage.data.userCompletedPuzzles = 0;
storage.flush();
};
this.reset_btn.onRollOver = function () {
playSound("mouseOver");
};
yourHighTextBox.text = yourhigh;
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");
};
yourHighTextBox.text = userCompletedPuzzlesAmount;
Frame 22
stop();
Frame 23
function randomize(_a) {
var _local1 = _a.length;
if (_local1 == 0) {
return(undefined);
}
_b = new Array();
while (_local1-- , _local1) {
var _local3 = Math.floor(Math.random() * (_local1 + 1));
var _local5 = _a[_local1];
var _local4 = _a[_local3];
_a[_local1] = _local4;
_a[_local3] = _local5;
}
return(_a);
}
function setup() {
failsMarker._visible = false;
makingAMarker = false;
pauseBtnClip.onPress = function () {
startPause();
};
var _local4;
var _local2;
var _local1;
var _local5;
var _local3;
resetBtnClip.onRelease = function () {
gameState = "setup";
};
yourNumberStyle = new TextFormat();
baseNumberStyle = new TextFormat();
yourNumberStyle.color = 3355443 /* 0x333333 */;
yourNumberStyle.color = 16776960 /* 0xFFFF00 */;
baseNumberStyle.color = 16777215 /* 0xFFFFFF */;
baseNumberStyle.color = 0;
updateTextBoxes();
}
function startPause() {
if (gameState == "playing") {
pauseClip = attachMovie("paused_clip", "paused_clip", 10000);
pauseClip._alpha = 25;
gs.TweenLite.to(pauseClip, 0.75, {_alpha:100});
pauseClip._x = 320;
pauseClip._y = 240;
var _local1 = getTimer();
totalTimePlayed = totalTimePlayed + Math.floor((_local1 - startTime) / 1000);
pauseClip.onRelease = function () {
gameState = "unpause game";
};
gameState = "game paused";
}
}
function fillPositionWithValue(_num) {
if (makingAMarker) {
if (_num == 0) {
currenClipSelected.textBox.text = "";
} else {
currenClipSelected.textBox.text = _num;
}
hideNumberEntry();
makingAMarker = false;
} else if (_num == 0) {
currenClipSelected.textBox.text = "";
currenClipSelected.markitHotspot1._visible = true;
currenClipSelected.markitHotspot2._visible = true;
currenClipSelected.markitHotspot3._visible = true;
currenClipSelected.markitHotspot4._visible = true;
playersArray[currenClipSelected.y][currenClipSelected.x] = _num;
} else {
trace("evaluateSquare(_num) = " + evaluateSquare(_num));
if (evaluateSquare(_num)) {
currenClipSelected.markitHotspot1._visible = false;
currenClipSelected.markitHotspot2._visible = false;
currenClipSelected.markitHotspot3._visible = false;
currenClipSelected.markitHotspot4._visible = false;
currenClipSelected.textBox.text = _num;
playersArray[currenClipSelected.y][currenClipSelected.x] = _num;
currenClipSelected.textBox.setTextFormat(yourNumberStyle);
hideNumberEntry();
evaluateGrid();
playSound("energy");
} else {
trace("PLAYER GUESSED WRONG!");
hideNumberEntry();
gameState = "player guessed wrong";
}
}
}
function evaluateSquare(_num) {
return(_num == answerArray[currenClipSelected.y][currenClipSelected.x]);
}
function evaluateGrid() {
n = 0;
var _local1 = true;
i = 0;
while (i < 9) {
j = 0;
while (j < 9) {
_p = playersArray[i][j];
_a = answerArray[i][j];
if (_p != _a) {
_local1 = false;
}
j++;
}
i++;
}
if (_local1) {
trace("GRID IS SOLVED!!");
gameState = "grid solved";
}
}
function setupSelector() {
numberPicker.closeBtn.onPress = function () {
hideNumberEntry();
};
i = 1;
while (i < 10) {
var _t = eval ("numberPicker.n" + i);
_t.num = i;
_t.onRollOver = function () {
this.gotoAndStop(2);
};
_t.onRollOut = function () {
this.gotoAndStop(1);
};
_t.onPress = function () {
fillPositionWithValue(this.num);
};
i++;
}
numberPicker.clearBtn.onRelease = function () {
fillPositionWithValue(0);
};
numberPicker.clearBtn.onRollOver = function () {
this.gotoAndStop(2);
};
numberPicker.clearBtn.onRollOut = function () {
this.gotoAndStop(1);
};
}
function tellPlayer(_string) {
_clip = attachMovie("tellPlayerClip", "tellPlayerClip", 1000);
_clip._xscale = (_clip._yscale = 10);
_clip._x = 240;
_clip._y = 240;
_clip.textBox.text = _string;
_clip.textBox.autoSize = true;
gs.TweenLite.to(_clip, 0.75, {_xscale:100, _yscale:100, ease:mx.transitions.easing.Back.easeOut});
gs.TweenLite.to(_clip, 0.75, {_alpha:0, delay:3, overwrite:false});
_clip.dropShadowClip._width = (_clip.tellPlayerClipBack._width = _clip.textBox._width + 25);
_clip.dropShadowClip._height = _clip.textBox._height + 10;
_clip.dropShadowClip._y = 8;
_clip.tellPlayerClipBack._height = _clip.textBox._height + 25;
_clip.textBox._x = (-_clip.textBox._width) / 2;
_clip.textBox._y = ((-_clip.textBox._height) / 2) + 3;
}
function mouseUpFunc() {
hideNumberEntry();
}
function hideClip(_clip) {
_clip._visible = false;
trace(("_clip - " + _clip) + " is hidden");
}
function hideNumberEntry() {
gs.TweenLite.to(numberPicker, 0.25, {_alpha:0, onComplete:hideClip, onCompleteParams:[numberPicker]});
currenClipSelected.gotoAndStop(1);
i = 1;
while (i < 10) {
var _t = eval ("numberPicker.n" + i);
_t.gotoAndStop(1);
i++;
}
}
function updateTextBoxes() {
hintsTextBox.text = hintsLeft;
scoreTextBox.text = score;
puzzlesCompleted.text = userCompletedPuzzlesAmount;
}
function displayTime() {
var _local3 = getTimer();
timePassed = totalTimePlayed + Math.floor((_local3 - startTime) / 1000);
var _local2 = Math.floor(timePassed / 60);
var _local1 = timePassed - (_local2 * 60);
if (_local1 < 10) {
timePassedString = (_local2 + ":0") + _local1;
} else if (_local1 < 60) {
timePassedString = (_local2 + ":") + _local1;
}
if (_local2 > 60) {
gameState = "game over";
}
timeClip.timerTextBox.text = timePassedString;
}
function loop() {
switch (gameState) {
case "playing" :
x = _xmouse;
y = _ymouse;
dx = x - numberPicker._x;
dy = y - numberPicker._y;
if ((((dx < -30) || (dx > 120)) || (dy < -30)) || (dy > 115)) {
hideNumberEntry();
}
displayTime();
break;
case "player guessed wrong" :
failsMarker._visible = true;
failsMarker._width = (failsMarker._height = 60);
gs.TweenLite.to(failsMarker, 2, {_xscale:1, _yscale:1, ease:mx.transitions.easing.Back.easeIn, onComplete:hideClip, onCompleteParams:[failsMarker]});
tellPlayer("wrong!");
hintsLeft--;
gameState = "wait for wrong delay";
count = 30;
break;
case "wait for wrong delay" :
count--;
if (count < 1) {
if (hintsLeft < 0) {
hintsLeft = 0;
gameState = "game over";
} else {
updateTextBoxes();
gameState = "playing";
}
}
break;
case "setup" :
setup();
gameState = "setup level choice";
break;
case "setup level choice" :
difficultyChoiceClip = attachMovie("difficultyChoice", "difficultyChoice", 10000);
difficultyChoiceClip.clip1.onRelease = function () {
makeLevelChoice(1);
};
difficultyChoiceClip.clip2.onRelease = function () {
makeLevelChoice(2);
};
difficultyChoiceClip.clip3.onRelease = function () {
makeLevelChoice(3);
};
difficultyChoiceClip._x = 240;
difficultyChoiceClip._y = 240;
gameState = "wait for level choice";
break;
case "wait for level choice" :
break;
case "wait for level choice" :
break;
case "setup level" :
sub_n = 0;
if (level == undefined) {
level = 1;
}
scoreTextBox.text = score;
levelTextBox.text = level;
xOffset = 0;
yOffset = 0;
playersArray = new Array();
answerArray = new Array();
generateGrid();
generateSudoku();
hideNumbers();
displayNumbers();
setupSelector();
totalTimePlayed = 0;
startTime = getTimer();
hintsLeft = 5;
_leveltext = "easy";
switch (level) {
case 1 :
hintsLeft = 5;
_leveltext = "easy";
break;
case 2 :
_leveltext = "medium";
hintsLeft = 3;
break;
case 3 :
_leveltext = "hard";
hintsLeft = 1;
break;
case 4 :
_leveltext = "very hard";
hintsLeft = 0;
}
levelTextBox.text = _leveltext;
hintsTextBox.text = hintsLeft;
tellPlayer(_leveltext + "\nsudoku");
gameState = "playing";
break;
case "game paused" :
break;
case "game over" :
tellPlayer("game over");
count = 60;
gameState = "game over wait";
break;
case "game over wait" :
count--;
if (count < 1) {
gotoAndPlay (24);
gameState = "game over screen";
}
break;
case "game over screen" :
break;
case "unpause game" :
removeMovieClip(pauseClip);
startTime = getTimer();
trace("startTime = " + startTime);
gameState = "playing";
break;
case "grid solved" :
tellPlayer("grid complete!");
gameState = "grid solved wait";
count = 90;
var _local3 = getTimer();
timePassed = totalTimePlayed + Math.floor((_local3 - startTime) / 1000);
var _local2 = Math.floor(timePassed / 60);
var _local1 = timePassed - (_local2 * 60);
if (_local1 < 10) {
totalTimePlayedText = (_local2 + ":0") + _local1;
} else if (_local1 < 60) {
totalTimePlayedText = (_local2 + ":") + _local1;
}
break;
case "grid solved wait" :
count--;
if (count < 1) {
gameState = "game complete screen";
gotoAndPlay (33);
}
break;
case "game complete screen" :
}
}
function makeLevelChoice(_num) {
level = _num;
removeMovieClip(difficultyChoiceClip);
gameState = "setup level";
}
function displayNumberPad(_clip) {
if (gameState == "playing") {
trace("displayNumberPad");
numberPicker._visible = true;
makingAMarker = false;
numberPicker.gotoAndStop(1);
currenClipSelected.gotoAndStop(1);
if (_clip.val == 0) {
gs.TweenLite.to(numberPicker, 0.5, {_alpha:100});
currenClipSelected = _clip;
_clip.gotoAndStop(2);
var _local3 = _xmouse;
var _local1 = _ymouse;
if (_local1 > (470 - numberPicker._height)) {
_local1 = 470 - numberPicker._height;
}
numberPicker._x = _local3;
numberPicker._y = _local1;
} else {
hideNumberEntry();
}
}
}
function displayNumbers() {
n = 0;
i = 0;
while (i < 9) {
answerArray[i] = new Array();
playersArray[i] = new Array();
j = 0;
while (j < 9) {
_t = tileArray[i][j];
_t.val = hiddenArray[n];
playersArray[i][j] = hiddenArray[n];
answerArray[i][j] = answerGrid[n];
if (hiddenArray[n] > 0) {
_t.textBox.text = _t.val;
_t.textBox.setTextFormat(baseNumberStyle);
_t.emptyMarker._visible = false;
_t.markitHotspot1._visible = false;
_t.markitHotspot2._visible = false;
_t.markitHotspot3._visible = false;
_t.markitHotspot4._visible = false;
} else {
_t.textBox.setTextFormat(yourNumberStyle);
_t.textBox.text = "";
_t.emptyMarker._visible = true;
_t.markitHotspot1._visible = true;
_t.markitHotspot2._visible = true;
_t.markitHotspot3._visible = true;
_t.markitHotspot4._visible = true;
}
_t.x = j;
_t.y = i;
n++;
j++;
}
i++;
}
}
function hideNumbers() {
hiddenArray = new Array();
i = 0;
while (i < 81) {
hiddenArray[i] = answerGrid[i];
i++;
}
hideAmount = 17 + (level * 13);
if (hideAmount > 65) {
hideAmount = 65;
}
while (hideAmount > 0) {
var _local4 = Math.floor(Math.random() * 81);
var _local3 = Math.floor(Math.random() * 81);
var _local2 = Math.floor(Math.random() * 81);
var _local1 = Math.floor(((_local4 + _local3) + _local2) / 3);
_local1 = Math.floor(Math.random() * 81);
if (hiddenArray[_local1] != 0) {
hiddenArray[_local1] = 0;
hideAmount--;
}
}
}
function generateSudoku() {
answerGrid = new Array(81);
fmt0 = [6, 8, 9, 7, 5, 4, 2, 3, 1, 3, 5, 7, 6, 2, 1, 9, 8, 4, 2, 1, 4, 3, 9, 8, 5, 6, 7, 9, 6, 1, 2, 4, 3, 7, 5, 8, 5, 7, 3, 9, 8, 6, 1, 4, 2, 4, 2, 8, 1, 7, 5, 3, 9, 6, 8, 3, 2, 4, 1, 9, 6, 7, 5, 1, 4, 6, 5, 3, 7, 8, 2, 9, 7, 9, 5, 8, 6, 2, 4, 1, 3];
fmt1 = [5, 7, 2, 8, 4, 6, 9, 3, 1, 4, 9, 6, 3, 1, 5, 7, 2, 8, 8, 3, 1, 9, 2, 7, 4, 5, 6, 9, 6, 5, 2, 8, 1, 3, 4, 7, 1, 2, 7, 4, 6, 3, 8, 9, 5, 3, 8, 4, 5, 7, 9, 1, 6, 2, 6, 5, 8, 1, 9, 4, 2, 7, 3, 2, 4, 3, 7, 5, 8, 6, 1, 9, 7, 1, 9, 6, 3, 2, 5, 8, 4];
fmt2 = [2, 3, 1, 8, 9, 4, 5, 7, 6, 5, 9, 4, 7, 2, 6, 8, 3, 1, 8, 6, 7, 5, 3, 1, 4, 9, 2, 6, 1, 5, 2, 8, 9, 7, 4, 3, 3, 4, 2, 6, 7, 5, 1, 8, 9, 7, 8, 9, 1, 4, 3, 6, 2, 5, 4, 2, 6, 9, 5, 8, 3, 1, 7, 1, 7, 3, 4, 6, 2, 9, 5, 8, 9, 5, 8, 3, 1, 7, 2, 6, 4];
fmt3 = [4, 6, 5, 9, 1, 2, 8, 3, 7, 2, 7, 3, 8, 5, 4, 1, 6, 9, 9, 8, 1, 6, 3, 7, 4, 2, 5, 5, 2, 8, 4, 6, 1, 9, 7, 3, 6, 4, 7, 2, 9, 3, 5, 1, 8, 3, 1, 9, 5, 7, 8, 6, 4, 2, 8, 5, 2, 3, 4, 6, 7, 9, 1, 1, 9, 4, 7, 2, 5, 3, 8, 6, 7, 3, 6, 1, 8, 9, 2, 5, 4];
fmt = new Array(81);
r = Math.floor(Math.random() * 4);
fmt = eval ("fmt" + r);
cnv = new Array(10);
i = 1;
while (i <= 9) {
cnv[i] = i;
i++;
}
i = 1;
while (i <= 9) {
r = 1 + Math.floor(Math.random() * 9);
tmp = cnv[i];
cnv[i] = cnv[r];
cnv[r] = tmp;
i++;
}
i = 0;
while (i < 81) {
d = fmt[i];
answerGrid[i] = cnv[d];
i++;
}
}
function setMarker(_clip) {
if (_clip._parent.val == 0) {
makingAMarker = true;
numberPicker._visible = true;
numberPicker.gotoAndStop(2);
gs.TweenLite.to(numberPicker, 0.5, {_alpha:100});
currenClipSelected = _clip;
var _local2 = _xmouse;
var _local1 = _ymouse;
if (_local1 > (470 - numberPicker._height)) {
_local1 = 470 - numberPicker._height;
}
numberPicker._x = _local2;
numberPicker._y = _local1;
} else {
hideNumberEntry();
}
}
function generateGrid() {
n = 1;
tileSize = 45;
backing2._x = (backing2._y = (backing._x = (backing._y = (tileHolder._x = (tileHolder._y = (480 - (9 * tileSize)) / 2)))));
tileArray = new Array();
backing2._width = (backing2._height = (backing._width = (backing._height = 9 * tileSize)));
i = 0;
while (i < 9) {
var _local2 = new Array();
j = 0;
while (j < 9) {
t = tileHolder.attachMovie("tile", "t" + n, n);
t._x = tileSize * j;
t._y = tileSize * i;
t.emptyMarker.onPress = function () {
displayNumberPad(this._parent);
};
_local2.push(t);
t.val = 0;
t.emptyMarker._width = (t.emptyMarker._height = (t.gridBorder._width = (t.gridBorder._height = tileSize)));
t.markitHotspot2._x = tileSize - 15;
t.markitHotspot3._y = tileSize - 15;
t.markitHotspot4._x = tileSize - 15;
t.markitHotspot4._y = tileSize - 15;
t.markitHotspot1.textBox.text = "";
t.markitHotspot2.textBox.text = "";
t.markitHotspot3.textBox.text = "";
t.markitHotspot4.textBox.text = "";
t.markitHotspot1.onPress = function () {
setMarker(this);
};
t.markitHotspot2.onPress = function () {
setMarker(this);
};
t.markitHotspot3.onPress = function () {
setMarker(this);
};
t.markitHotspot4.onPress = function () {
setMarker(this);
};
n++;
j++;
}
tileArray.push(_local2);
i++;
}
lineHolder = tileHolder.createEmptyMovieClip("lines", 200);
lineHolder.lineStyle(5, 0, 100, true, "none", "none");
lineHolder._x = 0;
lineHolder._y = 0;
(gridSize = 3 * tileSize);
lineHolder.moveTo(gridSize, 0);
lineHolder.lineTo(gridSize, gridSize * 3);
lineHolder.moveTo(gridSize * 2, 0);
lineHolder.lineTo(gridSize * 2, gridSize * 3);
lineHolder.moveTo(0, gridSize);
lineHolder.lineTo(gridSize * 3, gridSize);
lineHolder.moveTo(0, gridSize * 2);
lineHolder.lineTo(gridSize * 3, gridSize * 2);
}
hintsLeft = 0;
stop();
var currenClipSelected;
var yourNumberStyle;
var baseNumberStyle;
var score = 0;
var count = 0;
var gameState = "setup";
failsMarker._visible = false;
loopInt = setInterval(this, "loop", 30);
Frame 25
_quality = "high";
this.playBtn.onRelease = function () {
playSound("mouseDown");
removeMovieClip(highHolder);
gotoAndPlay (23);
};
this.playBtn.onRollOver = function () {
playSound("mouseOver");
};
if (userCompletedPuzzlesAmount != undefined) {
yourHighestText = ("you've solved " + userCompletedPuzzlesAmount) + " puzzles";
} else {
yourHighestText = " ";
}
Frame 32
stop();
Frame 33
_quality = "high";
if (_url.slice(0, 4) != "file") {
getURL (("javascript:pageTracker._trackPageview('/gameCompleted/" + gameName) + "');");
}
userCompletedPuzzlesAmount++;
storage.data.userCompletedPuzzles = userCompletedPuzzlesAmount;
this.playBtn.onRelease = function () {
playSound("mouseDown");
removeMovieClip(highHolder);
gotoAndPlay (23);
};
this.playBtn.onRollOver = function () {
playSound("mouseOver");
};
if (userCompletedPuzzlesAmount >= 5) {
score = userCompletedPuzzlesAmount;
t = this.createEmptyMovieClip("highHolder", 1000);
loadMovie ("http://www.terrypaton.com/highscores/highscoreSubmit.swf", highHolder);
t._x = 50;
t._y = 320;
submitMessage._visible = false;
}
if (userCompletedPuzzlesAmount != undefined) {
yourHighestText = ("you've solved " + userCompletedPuzzlesAmount) + " puzzles";
} else {
yourHighestText = " ";
}
storage.flush();
timeTextBox.text = "Your time was " + totalTimePlayedText;
Frame 41
stop();
Symbol 164 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 165 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 166 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 167 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 168 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 169 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 170 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 171 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 172 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 10
Object.registerClass("letter", letterClass);
#endinitclip
Symbol 17 Button
on (release) {
_root.pausebtnpress();
}
Symbol 21 MovieClip [paused_clip] Frame 1
stop();
Symbol 45 MovieClip [tile] Frame 1
stop();
Symbol 54 MovieClip Frame 1
stop();
Symbol 66 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 66 MovieClip Frame 92
_root.play();
Symbol 76 MovieClip Frame 1
stop();
Symbol 95 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 146 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 151 MovieClip Frame 1
stop();