Frame 1
Security.allowDomain("*");
MochiAd.showPreGameAd({id:"6754498f52510a20", res:"640x480"});
Frame 2
function gameMenu(menu, obj) {
getURL (_root.webSite, "_blank");
}
function qualityHigh() {
_quality = "high";
}
function qualityLow() {
_quality = "low";
}
this._lockroot = true;
gameName = "dna";
vNum = "1.01";
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 = "dna";
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 clearDNA() {
a = ballArray.length + 1;
n = 0;
while (n < a) {
tc = ballArray[n];
removeMovieClip(tc);
n++;
}
}
function drawDNA() {
linesClip.clear();
linesClip.lineStyle(3, "0xFFFFFF", 30);
a = ballArray.length + 1;
n = 0;
while (n < a) {
tc = ballArray[n];
if (tc.hidden) {
tc._visible = false;
} else {
tc._visible = true;
}
tc.updatePosition();
tc2 = ballArray[n + 1];
if (tc2.hidden) {
tc2._visible = false;
} else {
tc2._visible = true;
}
tc2.updatePosition();
linesClip.moveTo(tc2._x, tc2._y);
linesClip.lineTo(tc._x, tc._y);
n = n + 2;
}
}
function setupDNA(x, y, clip, hidden) {
trace("setupDNA");
ballArray = new Array();
rotDisplace = amountofLoops * 2;
n = 0;
while (n < amountOfDna) {
t = clip.attachMovie("ball", "b" + n, n + 100);
t.gotoAndStop(1);
var _local1 = n / 565.486677646163;
dx = Math.cos(_local1) * 50;
rot = n * rotDisplace;
t.setup(x, y + ((n / 2) * ypsacing), xsize, ysize, rot, speed, hidden);
ballArray.push(t);
t = clip.attachMovie("ball", "b" + (n + 1), (n + 100) + 1);
t.gotoAndStop(2);
_local1 = (n / 180) * Math.PI;
dx = Math.cos(_local1) * 50;
rot = (n * rotDisplace) - 180;
t.setup(x, y + ((n / 2) * ypsacing), xsize, ysize, rot, speed, hidden);
ballArray.push(t);
n = n + 2;
}
linesClip = clip.createEmptyMovieClip("linesClip", 1);
}
function playSound(temp) {
trace("Playing sound - " + temp);
switch (temp) {
case "points" :
pointsSnd.start();
break;
case "peiceCollected" :
peiceCollectedSnd.start();
break;
case "levelComplete" :
levelCompleteSound.start();
break;
case "levelFailed" :
levelFailedSnd.start();
break;
case "bonusPoints" :
bonusPointsSnd.start();
break;
case "mouseOver" :
mouseOverSnd.start();
break;
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;
}
peiceCollectedSnd = attachSoundFromLibrary("peiceCollectedSnd.wav");
levelFailedSnd = attachSoundFromLibrary("levelFailedSnd.wav");
bonusPointsSnd = attachSoundFromLibrary("bonusPointsSnd.wav");
mouseOverSnd = attachSoundFromLibrary("mouseOverSnd.wav");
mouseDownSnd = attachSoundFromLibrary("mouseDownSnd.wav");
levelCompleteSound = attachSoundFromLibrary("levelCompleteSound.wav");
Frame 7
helpClip._y = -320;
howToPlay.onRollOver = function () {
gs.TweenLite.to(helpClip, 0.5, {_y:0});
playSound("mouseOver");
};
howToPlay.onRollOut = function () {
gs.TweenLite.to(helpClip, 0.5, {_y:-320});
playSound("mouseDown");
};
_quality = "HIGH";
this.playBtn.onRelease = function () {
gotoAndPlay (23);
playSound("mouseDown");
};
this.playBtn.onRollOver = function () {
playSound("mouseOver");
};
this.reset_btn.onRelease = function () {
playSound("mouseDown");
_root.yourhigh = 0;
trace(yourhigh);
resetclip.gotoAndPlay(2);
storage.data.myhighscore = 0;
storage.flush();
};
this.reset_btn.onRollOver = function () {
playSound("mouseOver");
};
yourHighTextBox.text = yourhigh;
amountOfDna = 60;
amountofLoops = 3;
ypsacing = 15;
speed = 0.5;
xsize = 100;
ysize = 10;
setupDNA(0, -220, DNAClip, false);
DNAClip.onEnterFrame = function () {
drawDNA();
this._rotation = this._rotation + 0.15;
};
DNAClip._x = 320;
DNAClip._y = 180;
Frame 22
stop();
Frame 23
function drawMouseTrail() {
mouseTrailBitmapData.copyPixels(trailBitmap, new flash.geom.Rectangle(0, 0, 18, 18), new flash.geom.Point(_xmouse - 8, _ymouse - 8));
}
function displayLevel() {
boxNum = 1;
trace("dislay box");
waitingForBoxNum = 0;
n = displayArray.length;
boxNum = 1;
rolledTrueArray = new Array();
detectionArray = new Array();
lastFrame = 2;
i = 0;
while (i < n) {
cord1 = displayArray[i];
cord2 = displayArray[i + 1];
t = boxHolder.attachMovie("box", "box" + boxNum, boxNum);
gs.TweenLite.killTweensOf(t);
t.stopTween();
t._x = baseX + (cord1 * boxSize);
t._y = baseY + (cord2 * boxSize);
boxNum++;
if (i == 0) {
t.gotoAndStop(20);
} else if (i == (n - 2)) {
t.gotoAndStop(21);
} else {
if (lastFrame == 2) {
lastFrame = 1;
} else {
lastFrame = 2;
}
t.gotoAndStop(lastFrame);
}
if ((i > 0) && (i < (n - 2))) {
var _local1 = (Math.random() * 100) + 60;
t._xscale = (t._yscale = _local1);
}
t.textBox.text = i / 2;
detectionArray.push(t);
i = i + 2;
}
n = bonusArray.length;
bonusArrayClips = new Array();
i = 0;
while (i < n) {
cord1 = bonusArray[i];
cord2 = bonusArray[i + 1];
t = boxHolder.attachMovie("box", "box" + boxNum, boxNum);
gs.TweenLite.killTweensOf(t);
t.stopTween();
t._x = baseX + (cord1 * boxSize);
t._y = baseY + (cord2 * boxSize);
boxNum++;
t.gotoAndStop(22);
bonusArrayClips.push(t);
i = i + 2;
}
amountOfBoxes = detectionArray.length;
startBoxTime = getTimer();
if (level == 1) {
timeAllowed = 10000;
maxBoxTime = startBoxTime + timeAllowed;
} else {
timeAllowed = amountOfBoxes * (1000 - (level * 25));
trace("timeAllowed = " + timeAllowed);
maxBoxTime = startBoxTime + timeAllowed;
}
}
function randomLoc() {
var _local1 = new flash.geom.Point();
_local1.x = Math.floor(Math.random() * gridXSize);
_local1.y = Math.floor(Math.random() * gridYSize);
return(_local1);
}
function playingLoop() {
if ((gameState == "playing") || (gameState == "drawing")) {
currentTime = getTimer();
percentage = timeAllowed + startBoxTime;
val1 = currentTime - startBoxTime;
percentage = val1 / timeAllowed;
drawPieChart(0, 0, 50, 360 - (percentage * 360));
if (currentTime > maxBoxTime) {
playSound("levelFailed");
gameState = "level failed";
}
}
drawDNA();
switch (gameState) {
case "playing" :
return;
case "drawing" :
return;
case "start drawing" :
gameState = "drawing";
return;
case "stop drawing" :
gameState = "playing";
return;
case "level complete" :
var n = bonusArrayClips.length;
while (n--) {
var tc = bonusArrayClips[n];
removeMovieClip(tc);
}
var timeLeft = Math.floor((maxBoxTime - currentTime) / 10);
trace("SUCCESS");
score = score + ((amountOfBoxes * 10) + timeLeft);
scoreTextBox.text = score;
clickForNextLvl._visible = true;
gs.TweenLite.to(clickForNextLvl, 0.75, {_alpha:100});
delay = 20;
gameState = "level complete wait";
return;
case "wait for player to click" :
return;
case "setup level" :
mouseTrailBitmapData.applyFilter(mouseTrailBitmapData, mouseTrailBitmapData.rectangle, new flash.geom.Point(0, 0), filter);
clickForNextLvl._alpha = 0;
clickForNextLvl._visible = false;
gridXSize = 9;
gridYSize = 9;
levelTextBox.text = level;
i = 0;
while (i < 100) {
removeMovieClip(eval ("boxHolder.box" + i));
i++;
}
choice = Math.floor(instructionsArray.length * Math.random());
levelArray = new Array();
var j = 0;
while (j < 8) {
levelArray[j] = new Array();
tempArray = new Array();
var i = 0;
while (i < 8) {
tempArray.push(-1);
i++;
}
levelArray[j] = tempArray;
j++;
}
displayArray = new Array();
var amountOfPeices = (level + 4);
K = 0;
while (K < amountOfPeices) {
var tPoint = randomLoc();
while (levelArray[tPoint.y][tPoint.x] != -1) {
var tPoint = randomLoc();
}
levelArray[tPoint.y][tPoint.x] = K;
displayArray.push(tPoint.x);
displayArray.push(tPoint.y);
K++;
}
clearDNA();
amountOfDna = amountOfPeices * 2;
amountofLoops = 3;
ypsacing = 200 / (amountOfDna / 2);
trace("ypsacing = " + ypsacing);
if (ypsacing > 20) {
ypsacing = 20;
}
speed = 1;
xsize = 40;
ysize = 10;
setupDNA(555, 190, DNAClip, true);
freeSpaces = 81 - (displayArray.length / 2);
trace("freeSpaces = " + freeSpaces);
bonusArray = new Array();
if (freeSpaces > 2) {
var amountOfBonuses = Math.floor(freeSpaces * 0.1);
if (amountOfBonuses < 2) {
amountOfBonuses = 2;
}
trace("amountOfBonuses = " + amountOfBonuses);
K = 0;
while (K < amountOfBonuses) {
var tPoint = randomLoc();
while (levelArray[tPoint.y][tPoint.x] != -1) {
var tPoint = randomLoc();
}
levelArray[tPoint.y][tPoint.x] = 99;
bonusArray.push(tPoint.x);
bonusArray.push(tPoint.y);
K++;
}
}
displayLevel();
circle = clock.createEmptyMovieClip("circle", 1);
gameState = "playing";
return;
case "level complete wait" :
if (delay > 0) {
delay--;
mouseTrailBitmapData.applyFilter(mouseTrailBitmapData, mouseTrailBitmapData.rectangle, new flash.geom.Point(0, 0), filter);
}
return;
case "level failed" :
i = 0;
while (i < 100) {
gs.TweenLite.to(eval ("boxHolder.box" + i), 0.75, {_x:Math.random() * 640, _y:550, _rotation:Math.random() * 720});
i++;
}
delay = 60;
lives--;
livesTextBox.text = lives;
gameState = "level failed wait";
return;
case "level failed wait" :
mouseTrailBitmapData.applyFilter(mouseTrailBitmapData, mouseTrailBitmapData.rectangle, new flash.geom.Point(0, 0), filter);
delay--;
if (delay < 1) {
if (lives < 1) {
gameState = "game over";
} else {
gameState = "setup level";
}
}
return;
case "game over" :
gameState = "game over wait";
gotoAndPlay (24);
return;
case "game over wait" :
return;
case "next level" :
level++;
gameState = "setup level";
return;
case "setup" :
mouseTrailBitmapData = new flash.display.BitmapData(640, 480, false, 16777215);
mouseTrailBitmapData.draw(background);
trace("mouseTrailBitmapData = " + mouseTrailBitmapData);
trailBitmap = new flash.display.BitmapData(25, 25, true, 13421772);
trailBitmap.draw(mouseTrail);
mouseTrailHolder.attachBitmap(mouseTrailBitmapData, 1);
lives = 3;
livesTextBox.text = lives;
clickForNextLvl.onPress = function () {
playSound("mouseOver");
if (gameState == "level complete wait") {
gameState = "next level";
}
};
clickForNextLvl.onRollOver = function () {
playSound("mouseOver");
};
level = 1;
levelTextBox.text = level;
i = 0;
while (i < 100) {
removeMovieClip(eval ("boxHolder.box" + i));
i++;
}
choice = Math.floor(instructionsArray.length * Math.random());
displayPlayBox(choice);
circle = this.createEmptyMovieClip("circle", 100);
gameState = "setup level";
}
}
function onFinishTween(parameter2_mc) {
removeMovieClip(parameter2_mc);
}
function mouseMoving() {
var _local2 = bonusArrayClips.length;
while (_local2--) {
var _local1 = bonusArrayClips[_local2];
if (_local1.hitTest(_xmouse, _ymouse)) {
playSound("bonusPoints");
score = score + 100;
scoreTextBox.text = score;
bonusArrayClips.splice(_local2, 1);
gs.TweenLite.to(_local1, 0.5, {_alpha:0, _xscale:_local1._xscale + 50, _yscale:_local1._yscale + 50, onComplete:onFinishTween, onCompleteParams:[_local1]});
}
}
if (gameState == "playing") {
firstClip = detectionArray[0];
if (firstClip.hitTest(_xmouse, _ymouse)) {
gs.TweenLite.to(firstClip, 0.5, {_alpha:0, _xscale:firstClip._xscale - 50, _yscale:firstClip._yscale - 50, onComplete:onFinishTween, onCompleteParams:[firstClip]});
trace("first box clicked");
playSound("peiceCollected");
gameState = "start drawing";
mouseTrailNum = 0;
_local2 = waitingForBoxNum * 2;
var _local1 = ballArray[_local2];
_local1.hidden = false;
_local1 = ballArray[_local2 + 1];
_local1.hidden = false;
waitingForBoxNum++;
}
}
if (gameState == "drawing") {
drawMouseTrail();
shouldBeTouchingClip = detectionArray[waitingForBoxNum];
if (shouldBeTouchingClip.hitTest(_xmouse, _ymouse)) {
playSound("peiceCollected");
gs.TweenLite.to(shouldBeTouchingClip, 0.5, {_alpha:0, _xscale:shouldBeTouchingClip._xscale + 50, _yscale:shouldBeTouchingClip._yscale + 50, onComplete:onFinishTween, onCompleteParams:[shouldBeTouchingClip]});
_local2 = waitingForBoxNum * 2;
var _local1 = ballArray[_local2];
_local1.hidden = false;
_local1 = ballArray[_local2 + 1];
_local1.hidden = false;
waitingForBoxNum++;
if (waitingForBoxNum >= amountOfBoxes) {
playSound("levelComplete");
gameState = "level complete";
}
}
}
}
function mouseTrailClass() {
}
function drawPieChart(x, y, r, angle) {
circle.clear();
circle.lineStyle(0.5, 0);
circle.beginFill(16777215, 100);
circle.moveTo(0, 0);
circle.lineTo(r, 0);
var _local8 = Math.floor(angle / 30);
var _local9 = angle - (_local8 * 30);
var _local7 = 0.268;
var _local1 = 0;
while (_local1 < _local8) {
var _local3 = r * Math.cos(((_local1 + 1) * 30) * TO_RADIANS);
var _local4 = r * Math.sin(((_local1 + 1) * 30) * TO_RADIANS);
var _local6 = _local3 + ((r * _local7) * Math.cos((((_local1 + 1) * 30) - 90) * TO_RADIANS));
var _local5 = _local4 + ((r * _local7) * Math.sin((((_local1 + 1) * 30) - 90) * TO_RADIANS));
circle.curveTo(_local6, _local5, _local3, _local4);
_local1++;
}
if (_local9 > 0) {
_local7 = Math.tan((_local9 / 2) * TO_RADIANS);
var _local3 = r * Math.cos(((_local1 * 30) + _local9) * TO_RADIANS);
var _local4 = r * Math.sin(((_local1 * 30) + _local9) * TO_RADIANS);
var _local6 = _local3 + ((r * _local7) * Math.cos((((_local1 * 30) + _local9) - 90) * TO_RADIANS));
var _local5 = _local4 + ((r * _local7) * Math.sin((((_local1 * 30) + _local9) - 90) * TO_RADIANS));
circle.curveTo(_local6, _local5, _local3, _local4);
}
circle.lineTo(0, 0);
circle.endFill();
circle._rotation = -90;
circle._x = x;
circle._y = y;
}
var blurX = 2;
var blurY = 2;
var quality = 1;
var filter = (new flash.filters.BlurFilter(blurX, blurY, quality));
filterArray.push(filter);
r = 100;
angle = 90;
x = 200;
y = 200;
rotation = 0;
var countSum = 0;
var TO_RADIANS = (Math.PI/180);
stop();
var level;
var gameState = "setup";
instructionsArray = new Array();
score = 0;
var levelArray;
baseX = 50;
baseY = 50;
boxSize = 50;
choice = 1;
playSound("bonusPointsSnd");
onMouseMove = mouseMoving;
mouseTrailClass.prototype = new MovieClip();
mouseTrailClass.prototype.onLoad = function () {
this._rotation = Math.random() * 360;
this.cacheAsBitmap = true;
};
mouseTrailClass.prototype.onEnterFrame = function () {
if (this._alpha < 5) {
removeMovieClip(this);
}
};
Object.registerClass("mouseTrail", mouseTrailClass);
onMouseDown = mousePress;
onMouseUp = mouseRelease;
onEnterFrame = playingLoop;
Frame 24
if (false) {
}
Frame 25
System.security.allowDomain("*");
delete onEnterFrame;
_quality = "high";
if (score > yourhigh) {
yourhigh = score;
storage.data.myhighscore = score;
}
playBtn.onRelease = function () {
playSound("mouseDown");
removeMovieClip(highHolder);
gotoAndPlay (23);
};
playBtn.onRollOver = function () {
playSound("mouseOver");
};
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) {
yourHighestText = "YOUR HIGHEST SCORE: " + yourhigh;
} else {
yourHighestText = " ";
}
yourHighestTextBox.text = yourHighestText;
storage.flush();
stop();
Frame 32
stop();
Symbol 145 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 146 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 147 MovieClip [__Packages.ballClass] Frame 0
class ballClass extends MovieClip
{
var hidden, x, y, xsize, ysize, rot, speed, _visible, _x, dx, _y, dy, _yscale, _xscale, swapDepths;
function ballClass () {
super();
}
function setup(_tx, _ty, _xsize, _ysize, _rot, _speed, _hidden) {
hidden = _hidden;
x = _tx;
y = _ty;
xsize = _xsize;
ysize = _ysize;
rot = _rot;
speed = _speed;
if (hidden) {
_visible = true;
}
}
function updatePosition() {
rot = rot + speed;
if (rot > 360) {
rot = rot - 360;
}
if (rot < 0) {
rot = rot + 360;
}
calculateDir();
_x = x + dx;
_y = y + dy;
var _local3 = ((rot + 90) / 180) * Math.PI;
var _local2 = 80 + (Math.cos(_local3) * 20);
_yscale = (_xscale = _local2);
swapDepths((_local2 * 4) + 100);
}
function calculateDir() {
var _local2 = (rot / 180) * Math.PI;
dx = Math.cos(_local2) * xsize;
_local2 = (rot / 180) * Math.PI;
dy = Math.sin(_local2) * ysize;
}
}
Symbol 148 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 149 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 150 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 151 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 152 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 153 MovieClip [__Packages.gs.TweenLite] Frame 0
class gs.TweenLite
{
static var _e, _gc;
var tweenID, endTargetID, vars, duration, delay, target, _endTarget, onComplete, onCompleteParams, onUpdate, onUpdateParams, onStart, onStartParams, tweens, extraTweens, initTime, _active, _sound, color, colorParts, 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);
onComplete = $vars.onComplete;
onCompleteParams = $vars.onCompleteParams || ([]);
onUpdate = $vars.onUpdate;
onUpdateParams = $vars.onUpdateParams || ([]);
onStart = $vars.onStart;
onStartParams = $vars.onStartParams || ([]);
if (vars.ease == undefined) {
vars.ease = easeOut;
} else if (typeof(vars.ease) != "function") {
trace(("ERROR: You cannot use '" + vars.ease) + "' for the TweenLite ease property. Only functions are accepted.");
}
if (typeof(vars.autoAlpha) == "number") {
vars._alpha = vars.autoAlpha;
} else if (typeof(vars._autoAlpha) == "number") {
vars._alpha = (vars.autoAlpha = vars._autoAlpha);
}
tweens = {};
extraTweens = {};
initTime = getTimer();
if (vars.runBackwards == true) {
initTweenVals();
}
_active = false;
var _local8 = active;
if (($duration == 0) && (delay == 0)) {
if ((typeof($vars.autoAlpha) == "number") && (target._alpha == 0)) {
target._visible = false;
}
if (onComplete) {
onComplete.apply(null, onCompleteParams);
}
removeTween(this);
} else {
if (_e._visible != false) {
if (!_root.tweenLite_mc) {
var _local6 = _root.getNextHighestDepth() || 9999;
_e = _root.createEmptyMovieClip("tweenLite_mc", _local6);
_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 = [];
for (var _local29 in vars) {
if (vars[_local29] instanceof Array) {
_local7 = vars[_local29];
break;
}
}
var _local28 = _local7.length;
var _local2 = 0;
while (_local2 < _local28) {
if ((target[_local2] != _local7[_local2]) && (target[_local2] != undefined)) {
tweens[_local2.toString()] = {o:target, s:target[_local2], c:_local7[_local2] - target[_local2], e:vars.ease};
}
_local2++;
}
} else {
for (var _local29 in vars) {
if ((_local29 == "volume") && (typeof(target) == "movieclip")) {
_sound = new Sound(target);
var _local9 = new gs.TweenLite(this, duration, {volumeProxy:vars[_local29], ease:easeOut, delay:_local5, overwrite:false, runBackwards:vars.runBackwards});
_local9.endTarget = target;
} else if ((_local29.toLowerCase() == "mccolor") && ((typeof(target) == "movieclip") || (target instanceof TextField))) {
color = new Color(target);
colorParts = color.getTransform();
var _local15 = colorParts;
var _local6;
var _local4;
if ((vars[_local29] == null) || (vars[_local29] == "")) {
_local4 = vars._alpha || (target._alpha);
if (vars._alpha != undefined) {
delete vars._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[_local29] >> 16, gb:(vars[_local29] >> 8) & 255, bb:vars[_local29] & 255, ra:0, ga:0, ba:0, ease:vars.ease, delay:_local5, overwrite:false, runBackwards:vars.runBackwards};
}
var _local10 = new gs.TweenLite(_local15, 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 ((((((((((((_local29 == "delay") || (_local29 == "ease")) || (_local29 == "overwrite")) || (_local29 == "onComplete")) || (_local29 == "onCompleteParams")) || (_local29 == "runBackwards")) || (_local29 == "onUpdate")) || (_local29 == "onUpdateParams")) || (_local29 == "autoAlpha")) || (_local29 == "_autoAlpha")) || (_local29 == "onStart")) || (_local29 == "onStartParams")) {
} else if (target[_local29] != undefined) {
if (typeof(vars[_local29]) == "number") {
_local8 = vars[_local29] - target[_local29];
} else {
_local8 = Number(vars[_local29]);
}
tweens[_local29] = {o:target, s:target[_local29], c:_local8, e:vars.ease};
} else {
extraTweens[_local29] = {o:target, s:0, c:0, e:vars.ease, v:vars[_local29]};
}
}
}
if (vars.runBackwards == true) {
var _local3;
for (var _local29 in tweens) {
_local3 = tweens[_local29];
_local3.s = _local3.s + _local3.c;
_local3.c = _local3.c * -1;
_local3.o[_local29] = _local3.e(0, _local3.s, _local3.c, duration);
}
if (onUpdate != undefined) {
onUpdate.apply(null, 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) {
delete _all[getID($tg, true)];
}
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 _local3 = (t - startTime) / 1000;
if (_local3 > duration) {
_local3 = duration;
}
var _local2;
for (var _local4 in tweens) {
_local2 = tweens[_local4];
_local2.o[_local4] = _local2.e(_local3, _local2.s, _local2.c, duration);
}
if (onUpdate != undefined) {
onUpdate.apply(null, onUpdateParams);
}
if (_local3 == duration) {
if ((typeof(vars.autoAlpha) == "number") && (target._alpha == 0)) {
target._visible = false;
}
if (onComplete) {
onComplete.apply(null, onCompleteParams);
}
removeTween(this);
}
}
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 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 (onStart != undefined) {
onStart.apply(null, 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.3;
static var _all = new Object();
static var _cnt = -16000;
static var killDelayedCallsTo = killTweensOf;
}
Symbol 6 MovieClip [letter] Frame 1
#initclip 10
Object.registerClass("letter", letterClass);
#endinitclip
Symbol 50 MovieClip [ball] Frame 1
#initclip 11
Object.registerClass("ball", ballClass);
#endinitclip
Symbol 59 MovieClip Frame 1
stop();
Symbol 63 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 63 MovieClip Frame 92
_root.play();
Symbol 79 MovieClip Frame 1
stop();
Symbol 98 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();