Frame 1
MochiAd.showPreGameAd({id:"a8602f15dc306df6", res:"640x480"});
Frame 2
function gameMenu(menu, obj) {
getURL (_root.authorsSite, "_blank");
}
this._lockroot = true;
gameName = "fireaway";
vNum = "1.01";
flashVersionsNeeded = 8;
legalDomain = "http://www.terrypaton.com";
authorName = "Terry Paton";
authorContact = "terry@terrypaton.com";
authorsSite = "http://www.terrypaton.com";
gameLocation = _root._url.substr(0, legalDomain.length);
gameQuality = "AUTO";
var menu_cm = new ContextMenu();
menu_cm.customItems.push(new ContextMenuItem(authorsSite, gameMenu));
menu_cm.hideBuiltInItems();
_root.menu = menu_cm;
this._lockroot = true;
if (gameLocation != legalDomain) {
}
Frame 3
loadingClip.onLoad = function () {
};
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();
}
};
wordString = "FIRE AWAY!";
stringLength = wordString.length;
wordOffset = (stringLength * 20) / 2;
this.createEmptyMovieClip("loadingHolder", 1);
loadingHolder._x = (320 - wordOffset) + 10;
loadingHolder._y = 175;
i = 0;
while (i < stringLength) {
t = loadingHolder.attachMovie("letter", "l" + i, i);
t._x = i * 20;
t.angle = i;
t.Lvar.text = wordString.charAt(i);
t._xscale = (t._yscale = 200);
i++;
}
stop();
Frame 4
if (false) {
}
Frame 6
function attachSoundFromLibrary(idname) {
var _local2 = new Sound(this);
_local2.attachSound(idname);
return(_local2);
}
var hitwallsnd = attachSoundFromLibrary("hitwallsound.wav");
var cannonFireSnd = attachSoundFromLibrary("cannonFire.wav");
var crash2Snd = attachSoundFromLibrary("crash2.wav");
var groundsnd = attachSoundFromLibrary("groundsnd.wav");
var chickenSnd = attachSoundFromLibrary("chicken.wav");
var trampSnd = attachSoundFromLibrary("tramp.wav");
var gameOverSnd = attachSoundFromLibrary("gameOverSnd.wav");
var treeSnd = attachSoundFromLibrary("treeSnd.wav");
storage = SharedObject.getLocal("fireAwaystore");
yourhigh = storage.data.myhighscore;
if (yourhigh == undefined) {
storage.data.myhighscore = 0;
yourhigh = 0;
}
Frame 7
blackBar.playBtn.onRelease = function () {
play();
};
Frame 24
if (false) {
}
Frame 25
stop();
Frame 26
if (false) {
}
Frame 45
gotoAndPlay (46);
Frame 46
function setupLevel() {
_quality = "high";
btellNum = 200;
ground = 400;
distanceTraveled = 0;
playerAngle = -(random(50) + 20);
playerSpeed = 40;
playerSpeed = random(20) + 10;
tmpAngle = (playerAngle * Math.PI) / 180;
bx = playerSpeed * Math.cos(tmpAngle);
by = playerSpeed * Math.sin(tmpAngle);
enemyNum = 100;
px = 100;
py = ground;
dist = 0;
stageLength = 40;
i = 0;
while (i < Math.floor(stageLength / 5)) {
t = scrollHolder.back.attachMovie("background1", "b" + i, i);
t._x = i * 640;
t.gotoAndStop(i + 1);
i++;
}
i = 0;
while (i < 40) {
t = scrollHolder.land.attachMovie("tile", "t" + i, i);
t._x = i * 640;
t.gotoAndStop(i + 1);
i++;
}
scrollHolder.cacheAsBitmap = true;
enemyLayer = enemyHolder;
t = attachMovie("tellPlayer", "tellPlayer", 10);
t.textBox.text = "LEVEL " + level;
_global.tileSpeed = 5;
scrollHolder.land.attachMovie("cannon", "cannon", 1000);
scrollHolder.land.cannon._y = ground + 33;
scrollHolder.land.cannon._x = 100;
tx = scrollHolder.land.cannon.cannonBody._x;
ty = scrollHolder.land.cannon.cannonBody._y;
var _local2 = {x:tx, y:ty};
scrollHolder.land.cannon.localToGlobal(_local2);
tpx = _xmouse - _local2.x;
tpy = _ymouse - _local2.y;
radians = Math.atan2(tpy, tpx);
tAngle = (radians * 180) / Math.PI;
if (tAngle < -70) {
tAngle = -70;
} else if (tAngle > -10) {
tAngle = -10;
}
scrollHolder.land.cannon.cannonBody._rotation = tAngle;
scrollHolder.land.cannon.shadow.cannonBody2._rotation = tAngle;
}
onEnterFrame = function () {
switch (this.gameState) {
case "flying" :
playerHolder.ballShadow._x = px + 10;
playerHolder.ballShadow._alpha = py / 8;
barrow._x = px;
if (py < 0) {
barrow._visible = true;
} else {
barrow._visible = false;
}
if (bx > 0) {
bx = bx - 0.05;
}
by = by + 0.5;
py = py + by;
if (py > ground) {
groundsnd.start();
py = ground;
playerSpeed = playerSpeed * 0.7;
playerAngle = playerAngle - 180;
if (playerAngle < 0) {
playerAngle = 360 + playerAngle;
}
tmpAngle = (playerAngle * Math.PI) / 180;
by = playerSpeed * Math.sin(tmpAngle);
}
if (Math.abs(playerSpeed) < 0.5) {
gameState = "shot complete";
}
playerHolder.player._y = py;
playerHolder.player._x = px;
distanceTraveled = distanceTraveled - bx;
scrollHolder.land._x = distanceTraveled;
scrollHolder.back._x = distanceTraveled / 6;
scrollHolder.cloudHolder._x = distanceTraveled / 12;
distanceTraveledReport = Math.floor(Math.abs(distanceTraveled) / 10) + "m";
return;
case "aiming" :
tx = scrollHolder.land.cannon.cannonBody._x;
ty = scrollHolder.land.cannon.cannonBody._y;
var myPoint = {x:tx, y:ty};
scrollHolder.land.cannon.localToGlobal(myPoint);
tpx = _xmouse - myPoint.x;
tpy = _ymouse - myPoint.y;
radians = Math.atan2(tpy, tpx);
tAngle = (radians * 180) / Math.PI;
if (tAngle < -70) {
tAngle = -70;
} else if (tAngle > -10) {
tAngle = -10;
}
scrollHolder.cloudHolder._x = scrollHolder.cloudHolder._x - 0.25;
if (scrollHolder.cloudHolder._x < -1280) {
scrollHolder.cloudHolder._x = 0;
}
scrollHolder.land.cannon.cannonBody._rotation = tAngle;
scrollHolder.land.cannon.shadow.cannonBody2._rotation = tAngle;
dx = myPoint.x - _xmouse;
dy = myPoint.y - _ymouse;
dist = Math.floor(Math.sqrt((dx * dx) + (dy * dy)));
maximumDistance = 350;
powerLevel = (dist / maximumDistance) * 100;
if (powerLevel > 100) {
powerLevel = 100;
}
scrollHolder.land.cannon.cannonBody.powerMeter.powerBar._xscale = powerLevel;
scrollHolder.land._x = distanceTraveled;
return;
case "lose life" :
playerExplodeSnd.start();
removeMovieClip(playerHolder.tellBonus);
t = playerHolder.attachMovie("playerExplosion", "playerExplosion", 101);
t._x = px;
t._y = py;
px = 250;
py = 520;
playerHolder.player._x = 250;
playerHolder.player._y = 520;
t = attachMovie("tellPlayer", "tellPlayer", 9);
t.textBox.text = "LIFE LOST";
lives--;
livesIndicator.gotoAndStop(lives + 1);
if (lives < 0) {
lives = 0;
gameState = "game over";
} else {
energyBar.energyBar_clip._yscale = (playerEnergy = 100);
gameState = "start again wait";
saCount = 100;
}
return;
case "start again wait" :
saCount--;
if (saCount < 1) {
gameState = "playing";
}
return;
case "game over" :
delete gameState;
score = (round1Score + round2Score) + round3Score;
if (score > yourhigh) {
yourhigh = score;
storage.data.myhighscore = score;
storage.flush();
}
gameOverSnd.start();
t = attachMovie("gameOverClip", "gameOverClip", 10);
t._x = 320;
t._y = 240;
if (score >= 999) {
t.enterHigh._visible = true;
} else {
t.enterHigh._visible = false;
}
t.playBtn.onRelease = function () {
gameState = "reset game";
};
gameState = "game over wait";
return;
case "game over wait" :
return;
case "setup" :
hitPoints = 0;
roundNum = 1;
round1Score = 0;
round2Score = 0;
round3Score = 0;
turnNum = 1;
score = 0;
var container = setUpContainer();
var window = (new flash.geom.Rectangle(0, 0, 640, 480));
scrollHolder.scrollRect = window;
gameState = "start round";
return;
case "start round" :
setupLevel();
scoreChart._visible = true;
playerHolder.player.hit._visible = false;
scoreChart.roundNumber.text = "ROUND " + roundNum;
gameState = "aiming";
return;
case "level complete" :
lcw = 90;
t = attachMovie("tellPlayer", "tellPlayer", 10);
t.textBox.text = "COMPLETE!";
this.gameState = "level complete wait";
return;
case "level complete wait" :
lcw--;
if (lcw < 1) {
level++;
if (level > 5) {
trace("game completed");
gotoAndPlay (46);
} else {
this.gameState = "start next level";
}
}
return;
case "start next level" :
gameState = "aiming";
return;
case "reset game" :
removeMovieClip("gameOverClip");
i = 0;
while (i < 10) {
removeMovieClip(eval ("scrollHolder.land.flag" + i));
i++;
}
gameState = "setup";
return;
case "shot complete" :
_quality = "high";
removeMovieClip(playerHolder.player);
removeMovieClip(playerHolder.ballShadow);
t = scrollHolder.land.attachMovie("flag", "flag" + roundNum, 1000 + roundNum);
t.gotoAndStop(roundNum);
t._x = Math.abs(distanceTraveled) + px;
t._y = ground + 40;
attachMovie("roundSummary", "roundSummary", 100);
roundSummary.roundText.text = ("ROUND " + roundNum) + " SCORE";
scoreChart._visible = false;
_root.currentRoundScore = hitPoints + Math.abs(Math.floor(distanceTraveled / 10));
_root.RdistanceTraveledReport = distanceTraveledReport;
RhitPoints = hitPoints;
if (roundNum == 1) {
round1Score = currentRoundScore;
} else if (roundNum == 2) {
round2Score = currentRoundScore;
} else if (roundNum == 3) {
round3Score = currentRoundScore;
}
distanceTraveled = 0;
distanceTraveledReport = Math.floor(Math.abs(distanceTraveled) / 10) + "m";
hitPoints = 0;
shotCompleteWait = 90;
gameState = "shot complete wait";
return;
case "shot complete wait" :
if (shotCompleteWait < 70) {
if (scrollHolder.land._x < 0) {
scrollHolder.land._x = scrollHolder.land._x + Math.abs(scrollHolder.land._x / 20);
scrollHolder.back._x = scrollHolder.back._x + Math.abs(scrollHolder.back._x / 20);
scrollHolder.cloudHolder._x = Math.abs(scrollHolder.cloudHolder._x / 20);
}
}
shotCompleteWait--;
if (shotCompleteWait < 1) {
roundNum++;
if (roundNum < 4) {
gameState = "start round";
} else {
gameState = "game over";
}
}
return;
case "bulletTime start" :
gameState = "bulletTime";
if (bx > 0) {
bx = bx - 0.02;
}
scrollHolder.land._x = distanceTraveled;
scrollHolder.back._x = distanceTraveled / 6;
scrollHolder.cloudHolder._x = distanceTraveled / 12;
distanceTraveledReport = Math.floor(Math.abs(distanceTraveled) / 10) + "m";
gameState = "flying";
return;
case "bulletTime" :
bc--;
if (bc < 1) {
gameState = "flying";
}
return;
}
};
function testHit(clipTarget, itemType) {
if (gameState == "flying") {
var _local2 = itemType.substring(0, 4);
if (clipTarget.HOTspot.hitTest(playerHolder.player)) {
trace("you hit a " + itemType);
bc = 0;
switch (_local2) {
case "tree" :
playerSpeed = playerSpeed * 0.5;
bc = 1;
tval = "HIT\nTREE!";
tval = "50";
hitPoints = hitPoints + 50;
treeSnd.start();
break;
case "tram" :
trampSnd.start();
playerSpeed = playerSpeed * 1.5;
playerSpeed = Math.abs(playerSpeed);
trace(playerSpeed);
if (playerSpeed < 15) {
playerSpeed = playerSpeed + 20;
}
if (playerSpeed > 50) {
playerSpeed = 50;
}
playerAngle = 180 - playerAngle;
if ((playerAngle < 270) && (playerAngle > 180)) {
playerAngle = playerAngle + 30;
}
if (playerAngle < 0) {
playerAngle = 360 + playerAngle;
}
playerAngle = -50;
tmpAngle = (playerAngle * Math.PI) / 180;
by = playerSpeed * Math.sin(tmpAngle);
bc = 10;
tval = "TRAMP\nBOOST";
clipTarget.trampBurst.gotoAndPlay(2);
tval = "200";
hitPoints = hitPoints + 200;
break;
case "wall" :
playerAngle = playerAngle - 180;
if (playerAngle < 0) {
playerAngle = 360 + playerAngle;
}
playerSpeed = playerSpeed * 0.25;
tmpAngle = (playerAngle * Math.PI) / 180;
bx = playerSpeed * Math.cos(tmpAngle);
by = playerSpeed * Math.sin(tmpAngle);
px = px - bx;
hitwallsnd.start();
tval = "HIT\nWALL!";
gameState = "wait";
tval = "100";
hitPoints = hitPoints + 100;
break;
case "poin" :
hitPoints = hitPoints + 300;
tval = "BONUS\nPOINTS";
tval = "300";
clipTarget._visible = false;
chickenSnd.start();
break;
}
t = playerHolder.attachMovie("bonusTell", "b" + btellNum, btellNum);
t._x = px;
t._y = py;
t.textBox.text = tval;
btellNum++;
clipTarget.hitState = true;
gameState = "bulletTime start";
}
}
}
onMouseUp = function () {
if (gameState == "aiming") {
_quality = "low";
crash2Snd.start();
scrollHolder.land.cannon.cannonBody.powerMeter._visible = false;
scrollHolder.land.cannon.cannonBody.cannonBlast.gotoAndPlay(2);
gameState = "flying";
playerAngle = tAngle;
playerSpeed = powerLevel / 2;
tmpAngle = (playerAngle * Math.PI) / 180;
pbx = 100 * Math.cos(tmpAngle);
pby = 100 * Math.sin(tmpAngle);
playerHolder.attachMovie("player", "player", 100);
tmpAngle = (playerAngle * Math.PI) / 180;
bx = playerSpeed * Math.cos(tmpAngle);
by = playerSpeed * Math.sin(tmpAngle);
px = scrollHolder.land.cannon._x + pbx;
scrollHolder.land.cannon.cannonBlast.gotoAndPlay(2);
py = (scrollHolder.land.cannon._y - 80) + pby;
playerHolder.player._x = px;
playerHolder.player._y = py;
playerHolder.attachMovie("ballShadow", "ballShadow", 99);
playerHolder.ballShadow._y = ground + 10;
}
};
Frame 52
gameState = "setup";
restart.onRelease = function () {
_root.gotoAndPlay(1);
};
stop();
Frame 53
if (false) {
}
Symbol 201 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 202 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 203 MovieClip [__Packages.bonusTellClass] Frame 0
class bonusTellClass extends MovieClip
{
var speed, _x, starBurst, removeMovieClip;
function bonusTellClass () {
super();
}
function onLoad() {
speed = 0.5;
}
function onEnterFrame() {
_x = _x - speed;
speed = speed * 1.1;
starBurst._rotation = starBurst._rotation + speed;
if (_x < -20) {
removeMovieClip();
}
}
}
Symbol 204 MovieClip [__Packages.itemClass] Frame 0
class itemClass extends MovieClip
{
var HOTspot, _name, x, _x, y, _y, hitState, _rotation;
function itemClass () {
super();
}
function onLoad() {
HOTspot._visible = false;
_name = _name + String(random(10000));
x = _x;
y = _y;
hitState = false;
trace(_name);
if (_name == "points") {
_rotation = random(360);
}
}
function onEnterFrame() {
if (!hitState) {
_root.testHit(this, _name);
}
}
}
Symbol 205 MovieClip [__Packages.instructionClass] Frame 0
class instructionClass extends MovieClip
{
var _visible;
function instructionClass () {
super();
}
function onLoad() {
if (_root.instrtSeen == true) {
_visible = false;
}
}
function onEnterFrame() {
if (_root.instrtSeen == undefined) {
if (_root.gameState == "flying") {
_root.instrtSeen = true;
}
}
if (_root.instrtSeen == true) {
_visible = false;
}
}
}
Symbol 206 MovieClip [__Packages.roundSummaryClass] Frame 0
class roundSummaryClass extends MovieClip
{
var speed, _x, _y, c, _alpha, removeMovieClip;
function roundSummaryClass () {
super();
}
function onLoad() {
speed = 1;
_x = 320;
_y = 240;
c = 90;
_alpha = 10;
}
function onEnterFrame() {
c--;
if (c < 1) {
_alpha = _alpha - 5;
if (_alpha < 10) {
removeMovieClip();
}
} else if (_alpha < 100) {
speed = speed * 1.1;
_alpha = _alpha + speed;
if (_alpha > 100) {
_alpha = 100;
}
}
}
}
Symbol 207 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 208 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 209 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 210 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 211 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 10 MovieClip [letter] Frame 1
#initclip 12
Object.registerClass("letter", letterClass);
#endinitclip
Symbol 22 MovieClip [wall] Frame 1
#initclip 19
Object.registerClass("wall", itemClass);
#endinitclip
Symbol 25 MovieClip [bonusTell] Frame 1
#initclip 13
Object.registerClass("bonusTell", bonusTellClass);
#endinitclip
Symbol 28 MovieClip [item] Frame 1
#initclip 14
Object.registerClass("item", itemClass);
#endinitclip
Symbol 72 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 84 MovieClip [trampoline] Frame 1
#initclip 15
Object.registerClass("trampoline", itemClass);
#endinitclip
Symbol 96 MovieClip [cactus] Frame 1
#initclip 16
Object.registerClass("cactus", itemClass);
#endinitclip
this.gotoAndStop(Math.floor(Math.random() * 4) + 1);
Symbol 101 MovieClip [instructions] Frame 1
#initclip 17
Object.registerClass("instructions", instructionClass);
#endinitclip
Symbol 129 MovieClip [roundSummary] Frame 1
#initclip 18
Object.registerClass("roundSummary", roundSummaryClass);
#endinitclip
Symbol 137 MovieClip Frame 13
stop();
Symbol 154 MovieClip [gameOverClip] Frame 1
t = this.createEmptyMovieClip("highHolder", 1000);
getURL (("javascript:pageTracker._trackPageview('/gameCompleted/" + _root.gameName) + "');");
loadMovie ("http://www.terrypaton.com/highscores/highscoreSubmit.swf", highHolder);
t._x = 53;
t._y = 104;
Symbol 162 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 1
_root.stop();
trace(this);
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 167 MovieClip Frame 28
rotDiv = 12;
fxNum = this._parent.getNextHighestDepth();
this._parent.createEmptyMovieClip("fxholder" + fxNum, fxNum);
i = 0;
while (i < 50) {
t = eval ("this._parent.fxholder" + fxNum).attachMovie("fireWorksParticle", "fx" + i, i + (100 * fxNum));
t._x = 320;
t._y = 240;
t.gotoAndStop(3);
t.rot = i * rotDiv;
t.fxtype = 1;
i++;
}
Symbol 167 MovieClip Frame 92
_root.play();
Symbol 186 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 200 MovieClip Frame 31
stop();