Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
function itemHandler1(obj, item) {
getURL ("http://www.arcadereign.com/index.php?pageid=2", "_blank");
}
function itemHandler2(obj, item) {
getURL ("http://www.arcadereign.com/games/631/rpg-tower-defense.html", "_blank");
}
function itemHandler3(obj, item) {
getURL ("http://www.arcadereign.com/games/568/super-metal-armor.html", "_blank");
}
_global.ad_preloaded_showed = false;
_global.mochiads_obj = {id:"a745476928bd09c8", res:"640x480"};
_global.mochiads_id = function () {
return(_global.mochiads_obj.id);
};
MochiAd.showPreloaderAd({id:_global.mochiads_id(), res:_global.mochiads_obj.res, ad_timeout:2000, ad_finished:function () {
_global.ad_preloaded_showed = true;
}});
__com_mochibot__("358c7904", this, 10301, true);
var my_cm = new ContextMenu(menuHandler);
my_cm.builtInItems.zoom = false;
my_cm.builtInItems.print = false;
my_cm.builtInItems.quality = false;
my_cm.builtInItems.play = false;
my_cm.builtInItems.loop = false;
my_cm.builtInItems.rewind = false;
my_cm.builtInItems.forward_back = false;
my_cm.customItems.push(new ContextMenuItem("More games", itemHandler1));
my_cm.customItems.push(new ContextMenuItem("RPG Tower Defense", itemHandler2));
my_cm.customItems.push(new ContextMenuItem("Super Metal Armor", itemHandler3));
this.menu = my_cm;
stop();
Frame 2
stop();
Frame 3
musicON = true;
sfxON = true;
MusicLoop = new Sound(_root);
MusicLoop.attachSound("musicloop1");
MusicLoop.setVolume(50);
sidemenuMC._visible = false;
if (!playedbefore) {
bestHeight = 0;
KeySetup = new Object();
KeySetup.left = 37;
KeySetup.right = 39;
KeySetup.jump = 38;
} else if (playedbefore) {
cutsceneMC.gotoAndStop("end");
}
playBTN.onPress = function () {
gotoAndStop ("game");
};
FadeMusicIn = function () {
};
FadeMusicOut = function () {
};
MuteMusicToggle = function () {
if (musicON) {
MusicLoop.stop();
UI.muteMUSIC.gotoAndStop(3);
musicON = false;
} else {
MusicLoop.start(0, 9999);
UI.muteMUSIC.gotoAndStop(1);
musicON = true;
}
};
MuteSFXToggle = function () {
if (sfxON) {
UI.muteSFX.gotoAndStop(3);
sfxON = false;
} else {
UI.muteSFX.gotoAndStop(1);
sfxON = true;
}
};
UI.muteSFX.onPress = function () {
MuteSFXToggle();
};
UI.muteMUSIC.onPress = function () {
MuteMusicToggle();
};
UI.muteMUSIC.onRollOver = function () {
if (musicON) {
UI.muteMUSIC.gotoAndStop(2);
} else {
UI.muteMUSIC.gotoAndStop(4);
}
};
UI.muteMUSIC.onRollOut = function () {
if (musicON) {
UI.muteMUSIC.gotoAndStop(1);
} else {
UI.muteMUSIC.gotoAndStop(3);
}
};
UI.muteSFX.onRollOver = function () {
if (sfxON) {
UI.muteSFX.gotoAndStop(2);
} else {
UI.muteSFX.gotoAndStop(4);
}
};
UI.muteSFX.onRollOut = function () {
if (sfxON) {
UI.muteSFX.gotoAndStop(1);
} else {
UI.muteSFX.gotoAndStop(3);
}
};
MuteMusicToggle();
stop();
Frame 4
sidemenuMC._visible = true;
sidemenuMC.heightDisplay = bestHeight + "m";
if (playedbefore) {
cutsceneMC.gotoAndStop("end");
}
if (firewallMC) {
firewallMC.removeMovieClip();
}
stop();
Frame 5
keyCodes = new Array(16, 17, 18, 32, 37, 38, 39, 40, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 109, 110, 111);
keyBoardValues = new Array("SHIFT", "CTRL", "ALT", "SPACE", "LEFT", "UP", "RIGHT", "DOWN", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "NUM 0", "NUM 1", "NUM 2", "NUM 3", "NUM 4", "NUM 5", "NUM 6", "NUM 7", "NUM 8", "NUM 9", "NUM *", "NUM +", "NUM -", "NUM .", "NUM /");
keySelected = "none";
leftbutton.onPress = function () {
keySelected = "left";
leftbutton.gotoAndStop("selected");
rightbutton.gotoAndStop("normal");
jumpbutton.gotoAndStop("normal");
};
rightbutton.onPress = function () {
keySelected = "right";
rightbutton.gotoAndStop("selected");
leftbutton.gotoAndStop("normal");
jumpbutton.gotoAndStop("normal");
};
jumpbutton.onPress = function () {
keySelected = "jump";
jumpbutton.gotoAndStop("selected");
leftbutton.gotoAndStop("normal");
rightbutton.gotoAndStop("normal");
};
NewKeyListener = new Object();
NewKeyListener.onKeyDown = function () {
keyUnchecked = true;
if (!(keySelected === "none")) {
i = 0;
while (i < keyCodes.length) {
if (Key.getCode() == keyCodes[i]) {
keyUnchecked = false;
keyValue = keyBoardValues[i];
break;
}
i++;
}
if (!keyUnchecked) {
leftbutton.gotoAndStop("normal");
rightbutton.gotoAndStop("normal");
jumpbutton.gotoAndStop("normal");
if (keySelected == "left") {
_root.leftKey = keyValue;
_root.KeySetup.left = Key.getCode();
} else if (keySelected == "right") {
_root.rightKey = keyValue;
_root.KeySetup.right = Key.getCode();
} else if (keySelected == "jump") {
_root.jumpKey = keyValue;
_root.KeySetup.jump = Key.getCode();
}
keySelected = "none";
}
}
};
Key.addListener(NewKeyListener);
stop();
Frame 6
stop();
Frame 7
function CircleToCircleDetection(target1, radius1, target2, radius2) {
var _local26 = false;
var _local9 = _root.xspeed;
var _local7 = _root.yspeed;
var _local8 = target2.xspeed;
var _local6 = target2.yspeed;
var _local5 = target1._x;
var _local3 = target1._y;
var _local4 = target2._x;
var _local2 = target2._y;
var _local14 = radius1 + radius2;
var _local21 = (((-2 * _local9) * _local8) + (_local9 * _local9)) + (_local8 * _local8);
var _local20 = ((((-2 * _local5) * _local8) - ((2 * _local4) * _local9)) + ((2 * _local5) * _local9)) + ((2 * _local4) * _local8);
var _local19 = (((-2 * _local5) * _local4) + (_local5 * _local5)) + (_local4 * _local4);
var _local18 = (((-2 * _local7) * _local6) + (_local7 * _local7)) + (_local6 * _local6);
var _local17 = ((((-2 * _local3) * _local6) - ((2 * _local2) * _local7)) + ((2 * _local3) * _local7)) + ((2 * _local2) * _local6);
var _local24 = (((-2 * _local3) * _local2) + (_local3 * _local3)) + (_local2 * _local2);
var _local13 = _local21 + _local18;
var _local10 = _local20 + _local17;
var _local23 = (_local19 + _local24) - (_local14 * _local14);
var _local15 = Math.sqrt((_local10 * _local10) - ((4 * _local13) * _local23));
var _local12 = ((-_local10) + _local15) / (2 * _local13);
var _local11 = ((-_local10) - _local15) / (2 * _local13);
if ((_local12 > 0) && (_local12 <= 1)) {
var _local25 = _local12;
var _local22 = true;
}
if ((_local11 > 0) && (_local11 <= 1)) {
if ((_local25 == null) || (_local11 < _local12)) {
var _local25 = _local11;
var _local22 = true;
}
}
if (_local22) {
return(true);
}
}
deadPlayer = false;
xspeed = 0;
yspeed = 0;
max_yspeed = 15;
min_yspeed = -25;
gravity = 2;
walk_speed = 6;
jump_available = false;
double_jump_available = false;
jumpDelay = 10;
jumpTimer = 0;
jumpTimerON = false;
jump_release = false;
dir_facing = "Right";
jump_power = 24;
double_jump_power = 24;
level = new Array();
scrollDelay = 80;
oldestPlatform = 0;
bottomOfScreenY = 480;
distanceMoved = 0;
fireballs = new Array();
fireballIDs = 0;
scrollMul = 135;
scrollSpeed = 2;
stat_height = 0;
yscroll = 0;
statDisp = 0;
player_height = 0;
visiblePlatforms = new Array();
deathTimer = 100;
currDeathTime = 0;
pushingUP = false;
_root.createEmptyMovieClip("lev", 1000);
lev.attachMovie("game_walls_MC", "game_walls_MC", lev.getNextHighestDepth(), {_x:265, _y:305});
level[0] = new Array(1, 1, 1, 1, 1);
level[1] = new Array(1, 0, 1, 0, 1);
level[2] = new Array(0, 1, 0, 1, 0);
level[3] = new Array(1, 0, 0, 1, 0);
level[4] = new Array(0, 1, 0, 1, 0);
level[5] = new Array(1, 0, 0, 1, 0);
level[6] = new Array(0, 1, 1, 1, 0);
nextLevel = 7;
lastlevelshown = true;
SFX_death = new Sound(_root);
SFX_death.attachSound("deathSND");
SFX_jump = new Sound(_root);
SFX_jump.attachSound("jumpSND");
GameOver = function () {
lev.removeMovieClip();
player.removeMovieClip();
i = 0;
while (i < fireballs.length) {
_root[fireballs[i]].removeMovieClip();
i++;
}
gotoAndStop ("menu");
};
Array.prototype.exchange = function (i, j) {
if (i != j) {
with (this[i]) {
this[i] = this[j];
this[j] = valueOf();
}
}
};
Array.prototype.shuffle = function () {
var _local2 = this.length - 1;
if (_local2) {
do {
this.exchange(_local2, Math.floor(Math.random() * (_local2 + 1)));
_local2--;
} while (_local2);
}
};
CreateNewLevel = function (mod) {
oldPOS = -160;
y = Number(nextLevel);
platN = random(2) + 2;
level[y] = new Array();
i = 0;
while (i < 5) {
if (platN > 0) {
level[y].push(1);
platN--;
} else {
platN--;
level[y].push(0);
}
i++;
}
level[y].shuffle();
newYpos = visiblePlatforms[visiblePlatforms.length - 1]._y - 100;
posGap = oldPOS - newYpos;
newYpos = newYpos + posGap;
i = 0;
while (i <= visiblePlatforms.length) {
visiblePlatforms[i]._y = visiblePlatforms[i]._y + posGap;
i++;
}
if (lastlevelshown) {
if (random(6) == 0) {
lastlevelshown = false;
attachTrue = false;
} else {
lastlevelshown = true;
attachTrue = true;
}
} else {
lastlevelshown = true;
attachTrue = true;
}
x = 0;
while (x < 5) {
if (level[y][x] == 1) {
if (attachTrue) {
place_brick = lev.attachMovie("platform1_MC", "platform_" + lev.getNextHighestDepth(), lev.getNextHighestDepth(), {_x:(x * 73) + 120, _y:newYpos});
place_brick.yLevel = y;
place_brick.gotoAndStop(random(10) + 1);
visiblePlatforms.push(place_brick);
} else {
place_brick = lev.attachMovie("platform_blank_MC", "platform_" + lev.getNextHighestDepth(), lev.getNextHighestDepth(), {_x:(x * 73) + 120, _y:newYpos});
place_brick.yLevel = y;
visiblePlatforms.push(place_brick);
}
}
x++;
}
nextLevel++;
};
RemoveOldestLevel = function () {
i = 0;
while (i < visiblePlatforms.length) {
if (visiblePlatforms[i].yLevel == oldestPlatform) {
visiblePlatforms[i].removeMovieClip();
visiblePlatforms[i].splice(i, 1);
}
i++;
}
oldestPlatform++;
};
y = 0;
while (y <= 6) {
x = 0;
while (x < 5) {
if (level[y][x] == 1) {
place_brick = lev.attachMovie("platform1_MC", "platform_" + lev.getNextHighestDepth(), lev.getNextHighestDepth(), {_x:(x * 73) + 120, _y:((-y) * 100) + 440});
place_brick.yLevel = y;
place_brick.gotoAndStop(random(10) + 1);
visiblePlatforms.push(place_brick);
} else if (level[y][x] == 2) {
}
x++;
}
y++;
}
AttachFireball = function () {
fbPos = random(5);
fbID = fireballIDs;
_root.attachMovie("fireball_MC", "fireball" + fbID, Number(3000) + Number(fbID), {_x:(fbPos * 73) + 120, _y:440});
fireballs.push("fireball" + fbID);
_root["fireball" + fbID].xspeed = 0;
_root["fireball" + fbID].yspeed = 4;
if (fireballIDs < 20) {
fireballIDs++;
} else {
fireballIDs = 0;
}
};
RemoveFireball = function (targ) {
};
_root.attachMovie("firewallMC", "firewallMC", 4000, {_x:280, _y:560});
_root.attachMovie("player", "player", 1500, {_x:120, _y:400});
player.gotoAndStop("stand" + dir_facing);
player.upperbody.gotoAndStop("stand");
player.onEnterFrame = function () {
if (scrollDelay <= 0) {
if (this._y < 100) {
pushingUP = true;
yscroll = scrollSpeed + 3;
} else {
pushingUP = false;
yscroll = scrollSpeed;
}
i = 0;
while (i <= visiblePlatforms.length) {
visiblePlatforms[i]._y = visiblePlatforms[i]._y + yscroll;
i++;
}
if (!deadPlayer) {
stat_height = stat_height + yscroll;
statDisp = Math.floor(stat_height / 10);
}
distanceMoved = distanceMoved + yscroll;
if (distanceMoved >= 100) {
ymod = distanceMoved - 100;
RemoveOldestLevel();
CreateNewLevel(ymod);
if (travelDist <= 50) {
fbRand = 9;
} else if (travelDist <= 100) {
fbRand = random(8);
} else if (travelDist <= 200) {
fbRand = random(7);
} else if (travelDist <= 350) {
fbRand = random(6);
} else if (travelDist <= 550) {
fbRand = random(5);
} else if (travelDist <= 800) {
fbRand = random(4);
} else {
fbRand = 0;
}
if (fbRand == 0) {
AttachFireball();
}
distanceMoved = 0;
if (scrollSpeed < 5.5) {
scrollSpeed = scrollSpeed + 0.03;
}
}
} else {
scrollDelay--;
}
if (fireballs.length > 0) {
i = 0;
while (i < fireballs.length) {
if (_root[fireballs[i]]._y < -30) {
_root[fireballs[i]].removeMovieClip();
fireballs.splice(i, 1);
}
if (!pushingUP) {
_root[fireballs[i]].yspeed = scrollSpeed;
_root[fireballs[i]]._y = _root[fireballs[i]]._y - _root[fireballs[i]].yspeed;
} else {
_root[fireballs[i]].yspeed = scrollSpeed - 1.5;
_root[fireballs[i]]._y = _root[fireballs[i]]._y - _root[fireballs[i]].yspeed;
}
if ((_root[fireballs[i]].hitTest(this._x, this._y, true) or _root[fireballs[i]].hitTest(this._x - 10, this._y, true)) or _root[fireballs[i]].hitTest(this._x + 10, this._y, true)) {
this.upperbody.fire1.gotoAndPlay("loop");
this.upperbody.fire2.gotoAndPlay("loop");
deadPlayer = true;
SFX_death.start();
}
i++;
}
}
if (!deadPlayer) {
if (this._y > 420) {
this.upperbody.fire1.gotoAndPlay("loop");
this.upperbody.fire2.gotoAndPlay("loop");
deadPlayer = true;
SFX_death.start();
}
if (Key.isDown(KeySetup.left)) {
if (jump_available) {
this.gotoAndStop("walkLeft");
if (((!holding) and (!throwing)) and (!pickup)) {
player.upperbody.gotoAndStop("walk");
}
} else {
this.gotoAndStop("jumpLeft");
player.upperbody.gotoAndStop("jump");
}
dir_facing = "Left";
xspeed = -walk_speed;
} else if (Key.isDown(KeySetup.right)) {
if (jump_available) {
this.gotoAndStop("walkRight");
if (((!holding) and (!throwing)) and (!pickup)) {
player.upperbody.gotoAndStop("walk");
}
} else {
this.gotoAndStop("jumpRight");
player.upperbody.gotoAndStop("jump");
}
dir_facing = "Right";
xspeed = walk_speed;
} else if (jump_available) {
this.gotoAndStop("stand" + dir_facing);
if (((!holding) and (!throwing)) and (!pickup)) {
player.upperbody.gotoAndStop("stand");
}
}
if (jumpTimerON) {
if (Key.isDown(KeySetup.jump)) {
} else {
jump_release = true;
}
if (jumpTimer < jumpDelay) {
jumpTimer++;
} else {
jumpTimerON = false;
}
}
if (Key.isDown(KeySetup.jump) and (jump_available or double_jump_available)) {
if (jumpTimerON) {
} else {
if (jump_available) {
SFX_jump.start(0, 1);
jump_available = false;
yspeed = -(jump_power - yscroll);
jumpTimerON = true;
jumpTimer = 0;
jump_release = false;
} else if ((double_jump_available and jump_release) and (!jumpTimerON)) {
SFX_jump.start(0, 1);
double_jump_available = false;
yspeed = -(double_jump_power - yscroll);
}
if (dir_facing == "Right") {
this.gotoAndStop("jumpRight");
player.upperbody.gotoAndStop("jump");
} else if (dir_facing == "Left") {
this.gotoAndStop("jumpLeft");
player.upperbody.gotoAndStop("jump");
}
}
}
yspeed = yspeed + gravity;
yspeed = Math.min(yspeed, max_yspeed);
yspeed = Math.max(yspeed, min_yspeed);
while (_root.lev.hitTest(this._x, (this._y + (this._height / 4)) + yspeed, true)) {
yspeed--;
if (!jump_available) {
}
jump_available = true;
double_jump_available = true;
jump_release = false;
jumpTimerON = false;
jump_release = false;
}
while (_root.lev.hitTest((this._x - (this._width / 4)) + xspeed, this._y, true)) {
xspeed++;
}
while (_root.lev.hitTest((this._x + (this._width / 4)) + xspeed, this._y, true)) {
xspeed--;
}
while (_root.lev.hitTest(this._x, (this._y - (this._height / 4)) + yspeed, true)) {
yspeed++;
}
yspeed = Math.min(yspeed, max_yspeed);
yspeed = Math.max(yspeed, min_yspeed);
this._y = this._y + yspeed;
this._x = this._x + xspeed;
} else if (currDeathTime < deathTimer) {
currDeathTime++;
this._y = this._y + 8;
this.gotoAndStop("jump" + dir_facing);
this.upperbody.gotoAndStop("jump");
} else {
GameOver();
}
if (!deadPlayer) {
player_height = player_height - yspeed;
player_height = player_height + yscroll;
travelDist = Math.floor(player_height / 20);
sidemenuMC.heightDisplay = travelDist + "m";
if (travelDist > _root.bestHeight) {
_root.bestHeight = travelDist;
}
}
xspeed = 0;
};
firewallMC.swapDepths(4000);
UI.swapDepths(5000);
sidemenuMC.swapDepths(6000);
stop();
Symbol 8 MovieClip [spring_MC] Frame 1
stop();
Symbol 51 MovieClip [firewallMC] Frame 87
stop();
Symbol 61 Button [arcade_btn]
on (release) {
getURL ("http://arcadereign.com/", "_blank");
}
Symbol 76 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 2
stop();
Symbol 76 MovieClip Frame 3
stop();
Symbol 76 MovieClip Frame 4
stop();
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 2
stop();
Symbol 85 MovieClip Frame 3
stop();
Symbol 85 MovieClip Frame 4
stop();
Symbol 91 MovieClip Frame 1
stop();
Symbol 91 MovieClip Frame 23
stop();
Symbol 102 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 7
gotoAndPlay ("loop");
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 2
stop();
Symbol 106 MovieClip Frame 3
stop();
Symbol 116 MovieClip [player] Frame 1
stop();
Symbol 116 MovieClip [player] Frame 2
stop();
Symbol 116 MovieClip [player] Frame 3
stop();
Symbol 116 MovieClip [player] Frame 4
stop();
Symbol 116 MovieClip [player] Frame 5
stop();
Symbol 116 MovieClip [player] Frame 6
stop();
Symbol 116 MovieClip [player] Frame 7
stop();
Symbol 142 Button
on (release) {
_root.nextFrame();
}
Symbol 143 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
currB = Math.floor(_root.getBytesLoaded() / 1024);
totalB = Math.floor(_root.getBytesTotal() / 1024);
loadStatus = ((currB + "kb / ") + totalB) + "kb";
} else if (_global.ad_preloaded_showed) {
gotoAndStop ("loaded");
}
Symbol 143 MovieClip Frame 2
gotoAndPlay (1);
Symbol 143 MovieClip Frame 3
stop();
Symbol 206 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("1.5");
}
static function showPreloaderAd(options) {
trace("showPreloaderAd.1.5");
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();
}};
options = _parseOptions(options, _local27);
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_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 = function (width, height) {
};
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) {
_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 showTimedAd(options) {
trace("<showTimedAd />1.5");
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();
}};
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_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.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) {
_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 _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 _local25 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local25);
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 _local24 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local24);
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) {
cb = parseInt(cb);
var _local4 = this._callbacks[cb];
if (!_local4) {
return(undefined);
}
delete this._callbacks[cb];
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 _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
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 _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_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++;
}
}
return(_local4);
}
}
Symbol 147 Button
on (release) {
getURL ("http://arcadereign.com/", "_blank");
}
Symbol 148 MovieClip Frame 165
_root.nextFrame();
Symbol 162 MovieClip Frame 1
if (_root.playedbefore) {
gotoAndStop ("end");
}
Instance of Symbol 116 MovieClip [player] in Symbol 162 MovieClip Frame 181
onClipEvent (enterFrame) {
gotoAndStop ("walkLeft");
upperbody.gotoAndStop("walk");
}
Instance of Symbol 116 MovieClip [player] in Symbol 162 MovieClip Frame 205
onClipEvent (enterFrame) {
gotoAndStop ("standLeft");
upperbody.gotoAndStop("stand");
}
Symbol 162 MovieClip Frame 372
if (_root.playedbefore) {
gotoAndStop ("end");
}
Instance of Symbol 116 MovieClip [player] in Symbol 162 MovieClip Frame 372
onClipEvent (enterFrame) {
gotoAndStop ("walkRight");
upperbody.gotoAndStop("walk");
}
Symbol 162 MovieClip Frame 428
_root.playedbefore = true;
_root.gotoAndStop("menu");
stop();
Symbol 167 MovieClip Frame 185
stop();
Symbol 171 Button
on (press) {
gotoAndStop ("game");
}
Symbol 176 Button
on (press) {
_root.gotoAndStop("options");
}
Symbol 180 Button
on (press) {
gotoAndStop ("help");
}
Symbol 184 Button
on (release) {
getURL ("http://arcadereign.com/", "_blank");
}
Symbol 199 Button
on (press) {
gotoAndStop ("menu");
}
Symbol 202 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 2
stop();