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;
var pv;
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);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&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 __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
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);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&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);
}
__com_mochibot__("9ef8cf21", this, 10301, true);
mochi.as2.MochiServices.connect("e5163ee7493dd072");
__com_mochibot__("2753ca4a", this, 10301, true);
intro._visible = false;
intro.stop();
intro.pelicula.stop();
_lockroot = true;
var myMenu = new ContextMenu();
myMenu.customItems.push(copyright);
myMenu.hideBuiltInItems();
_root.menu = myMenu;
_x = 0;
_y = 0;
_lockroot = true;
stop();
menubut.stop();
onEnterFrame = function () {
var amountLoaded = (_root.getBytesLoaded() / _root.getBytesTotal());
loadText.text = Math.round(amountLoaded * 100);
gear1._rotation = amountLoaded * 100;
bar._x = -180 + (amountLoaded * 300);
if (amountLoaded == 1) {
soundon();
if (intronewgame == undefined) {
intro._visible = true;
intro.play();
intro.pelicula.play();
intronewgame = 1;
}
gear1._visible = false;
loadText.text = "";
logo.play();
menubut.play();
onEnterFrame = undefined;
} else {
logo.stop();
loadText.text = Math.round(amountLoaded * 100);
}
};
gpaused = 1;
Frame 2
function startheromenu() {
speedwaytext._visible = true;
heromenu._x = 295;
heromenu._y = 120;
heromenu._visible = true;
heromenu.hero1.onRelease = function () {
endheromenu();
_root.herotype = 1;
};
heromenu.hero2.onRelease = function () {
endheromenu();
_root.herotype = 2;
};
heromenu.hero3.onRelease = function () {
endheromenu();
_root.herotype = 3;
};
heromenu.hero1.onRollOver = function () {
heromenu.heroinfo.text = "Army Plane: Pure Damage and no capabilities until higher level.";
};
heromenu.hero2.onRollOver = function () {
heromenu.heroinfo.text = "Police Copter: Lower Damage with good splash on multiple enemies.";
};
heromenu.hero3.onRollOver = function () {
heromenu.heroinfo.text = "Ice Copter: Lower Damage with good slow on single enemies.";
};
}
function endheromenu() {
heromenu._x = 500;
heromenu._y = 400;
heromenu._visible = false;
playerspawn.duplicateMovieClip("player", _root.getNextHighestDepth());
_root.player.gotoAndStop(_root.herotype);
_root.player.abletogo = true;
_root.player._x = 380;
_root.player._y = 275;
_root.gpaused = 0;
player._visible = true;
playerspawn._visible = false;
_root.cartxtfx._alpha = 100;
if (_root.difficulty == 1.2) {
spawnfirsttower();
}
}
function towerInfo(tower) {
_root.selectedTower = tower;
_root.ranger.visible = true;
_root.ranger._x = tower._x;
_root.ranger._y = tower._y;
_root.ranger._width = tower.range * 2;
_root.ranger._height = tower.range * 2;
_root.UpgradeTowerInfo._visible = true;
if (_root.selectedTower == _root.player) {
_root.UpgradeTowerInfo.SellButton._visible = false;
} else {
_root.UpgradeTowerInfo.SellButton._visible = true;
}
a = _root.selectedTower;
_root.UpgradeTowerInfo.SellButton.SellButtonText.text = ("Sell [$" + Math.round(a.cost * 0.75)) + "]";
if (tower.upgrades.length >= tower.level) {
_root.UpgradeTowerInfo.UpgradeInfoText.text = tower.upgrades[tower.level - 1][0];
_root.UpgradeTowerInfo.TowerInfoText.text = (((((("Damage: " + tower.damage) + "\rRange: ") + tower.range) + "\rSplash: ") + (tower.splash ? "Yes" : "No")) + "\rSlow: ") + (tower.slow ? "Yes" : "No");
_root.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.level - 1][1]) + "]";
_root.UpgradeTowerInfo.UpgradeButton._visible = true;
} else {
_root.UpgradeTowerInfo.f.text = "";
_root.UpgradeTowerInfo.UpgradeButton._visible = false;
_root.UpgradeTowerInfo.h.text = "";
}
}
function newLevel() {
_root.wave++;
if (_root.wave > _root.waves.length) {
_root.gotoAndStop(4);
_root.player._visible = false;
_root.deleteTowers();
_root.deleteCreeps();
return(undefined);
}
updateInfoBar();
_root.creepCount = 0;
_root.creepArray = [];
_root["spawnInterval" + _root.wave] = setInterval(_root, "spawn", _root.waves[_root.wave - 1][3], _root.wave, "creep1", _root.waves[_root.wave - 1][2], _root.waves[_root.wave - 1][1], _root.waves[_root.wave - 1][4]);
_root["spawned" + _root.wave] = _root.waves[_root.wave - 1][0];
}
function spawn(level, creep, speed, health, gold) {
if (_root["spawned" + level] == 0) {
clearInterval(_root["spawnInterval" + level]);
} else if (gpaused == 0) {
pointarrow._visible = false;
pointarrow.stop();
removeMovieClip(pointarrow);
_root["spawned" + level]--;
_root.creepCount++;
_root[creep].duplicateMovieClip("c" + _root.creepCount, 1000 + _root.creepCount);
c = _root["c" + _root.creepCount];
_root.creepArray[_root.creepArray.length] = c;
c.creep.gotoAndStop(_root.wave);
c._x = wp1._x;
c._y = wp1._y;
c.speed = speed * 1.2;
c.maxspeed = speed * 1.2;
c.targ = 2;
c.rnd = random(10);
c.health = (health / difficulty) * 1.2;
c.maxHealth = (health / difficulty) * 1.2;
c.isDead = 0;
c.gold = gold;
_root[creep].duplicateMovieClip("d" + _root.creepCount, _root.getNextHighestDepth());
cdepthfix = _root["d" + _root.creepCount];
_root.player.swapDepths(cdepthfix);
cdepthfix.removeMovieClip();
c.onEnterFrame = function () {
if (gpaused == 0) {
if (_root.deathhit.hitTest(this._x, this._y, true)) {
_root.lives = _root.lives - 1;
this.health = 0;
}
if (_root.lives == 0) {
_root.gotoAndStop(3);
_root.player._visible = false;
_root.deleteTowers();
_root.deleteCreeps();
onEnterFrame = undefined;
}
if (this.health <= 0) {
_root.kill(this);
}
if (this.speed < this.maxspeed) {
this.speed = this.speed + 0.1;
}
this.targX = (_root["wp" + this.targ]._x - 5) + this.rnd;
this.targY = (_root["wp" + this.targ]._y - 5) + this.rnd;
this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593;
this.r = this.dir + (Math.sin((getTimer() + (this.rnd * 100)) / 100) * 7);
if ((this.creep._rotation + 10) < this.r) {
this.creep._rotation = this.creep._rotation + 10;
} else if ((this.creep._rotation - 10) > this.r) {
this.creep._rotation = this.creep._rotation - 10;
} else {
this.creep._rotation = r;
}
this.rads = (this.dir * 3.141593) / 180;
this._x = this._x + (Math.cos(this.rads) * this.speed);
this._y = this._y + (Math.sin(this.rads) * this.speed);
d = Math.sqrt(Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2));
if (d < 5) {
this.targ++;
if (this.targ > 8) {
_root.leak(this);
}
}
this.health_bar.health._width = (25 / this.maxHealth) * this.health;
this.health_bar._visible = true;
}
};
}
}
function Explosion(type, x, y) {
i = 1;
while (i <= 3) {
_root.explosionCount++;
duplicateMovieClip (_root[type + "_explosion"], "explosion" + _root.explosionCount, 4900 + _root.explosionCount);
a = _root["explosion" + _root.explosionCount];
a._x = x;
a._y = y;
a.rads = random(360);
a.speed = (5 + random(20)) / 5;
a._rotation = a.rads;
a.onEnterFrame = function () {
this._x = this._x + (Math.cos(this.rads) * this.speed);
this._y = this._y + (Math.sin(this.rads) * this.speed);
this._alpha = this._alpha - 5;
if (this.speed > 0.5) {
this.speed = this.speed - 0.5;
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
};
i++;
}
if (_root.explosionCount > 100) {
_root.explosionCount = 0;
}
}
function fire(from, to, speed, acc, maxspeed, projectile, damage, splash, slow) {
_root.particleCount++;
_root[projectile].duplicateMovieClip("p" + _root.particleCount, 2000 + _root.particleCount);
if (_root.sfxon == true) {
if ((projectile == "projectile_cannonball") or (projectile == "projectile_grenade")) {
if (_root.mgsound._currentframe == 1) {
_root.mgsound.play();
} else {
_root.mgsound.gotoAndStop(1);
}
} else if (projectile == "projectile_fire") {
if (_root.flsound._currentframe == 1) {
_root.flsound.play();
} else {
_root.flsound.gotoAndStop(1);
}
} else if (projectile == "projectile_water") {
if (_root.wtsound._currentframe == 1) {
_root.wtsound.play();
} else {
_root.wtsound.gotoAndStop(1);
}
} else if ((projectile == "projectile_missile") or (projectile == "projectile_nuke")) {
if (_root.rtsound._currentframe == 1) {
_root.rtsound.play();
} else {
_root.rtsound.gotoAndStop(1);
}
} else if (projectile == "projectile_oil") {
if (_root.oilsound._currentframe == 1) {
_root.oilsound.play();
} else {
_root.oilsound.gotoAndStop(1);
}
} else if (projectile == "projectile_snow") {
if (_root.snsound._currentframe == 1) {
_root.snsound.play();
} else {
_root.snsound.gotoAndStop(1);
}
}
}
r = _root["p" + _root.particleCount];
dir = (Math.atan2(from._y - to._y, from._x - to._x) * 180) / 3.141593;
rads = (dir * 3.141593) / 180;
r._x = from._x;
r._y = from._y;
r._x = r._x - (Math.cos(rads) * (from._width / 2));
r._y = r._y - (Math.sin(rads) * (from._height / 2));
r.targ = to;
if (("" + to) == "") {
r.removeMovieClip();
}
r.speed = speed;
r.acc = acc;
r.maxspeed = maxspeed;
r.projectile = projectile;
r.damage = damage;
r.splash = splash;
r.slow = slow;
r.onEnterFrame = function () {
if (gpaused == 0) {
if (("" + this.targ) != "") {
this.targX = this.targ._x;
this.targY = this.targ._y;
} else if (("" + this.targX) == "undefined") {
this.removeMovieClip();
}
this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593;
this._rotation = this.dir + 90;
this.rads = (this.dir * 3.141593) / 180;
this._x = this._x + (Math.cos(this.rads) * this.speed);
this._y = this._y + (Math.sin(this.rads) * this.speed);
if (this.speed < this.maxspeed) {
this.speed = this.speed + this.acc;
}
d = Math.sqrt(Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2));
if (d < 10) {
Explosion(projectile, this._x, this._y);
if (this.slow > 0) {
this.targ.speed = (this.targ.maxspeed / 100) * (100 - this.slow);
}
if (this.splash > 0) {
i = 0;
while (i <= _root.creepArray.length) {
if ((("" + _root.creepArray[i]) != "") && (_root.creepArray[i] != this.targ)) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < this.splash) {
_root.creepArray[i].health = _root.creepArray[i].health - (this.damage * (1 - (d / this.splash)));
if (this.slow > 0) {
_root.creepArray[i].speed = (_root.creepArray[i].maxspeed / 100) * (100 - this.slow);
}
}
}
i++;
}
}
this.targ.health = this.targ.health - this.damage;
if (targ.health <= 0) {
targ.isDead = 1;
}
this.removeMovieClip();
}
if (_root.particleCount > 50) {
_root.particleCount = 0;
}
}
};
}
function kill(creep) {
_root.kills++;
if (_root.sfxon == true) {
if (_root.exsound._currentframe == 1) {
_root.exsound.play();
}
}
if (_root.kills >= _root.waves[_root.wave - 1][0]) {
_root.kills = 0;
_root.newLevel();
}
creep.onEnterFrame = function () {
_root.gold = _root.gold + creep.gold;
updateInfoBar();
this.removeMovieClip();
};
}
function leak(creep) {
_root.creepLeaks++;
creep._x = _root.wp0._x;
creep._y = _root.wp0._y;
creep.targ = 1;
}
function upgrade() {
a = _root.selectedTower;
b = a.level - 1;
if (int(a.upgrades[b][1]) <= _root.gold) {
a.cost = a.cost + int(a.upgrades[b][1]);
a.damage = int(a.upgrades[b][2]);
a.range = a.upgrades[b][3];
a.rate = a.upgrades[b][4];
a.splash = a.upgrades[b][5];
a.slow = a.upgrades[b][6];
a.level++;
_root.towerInfo(_root.selectedTower);
_root.gold = _root.gold - int(a.upgrades[b][1]);
updateInfoBar();
}
}
function sell() {
a = _root.selectedTower;
if (a != player) {
SellButton._visible = true;
_root.towerInfo(_root.selectedTower);
_root.gold = _root.gold + Math.round(a.cost * 0.75);
_root.UpgradeTowerInfo._visible = false;
a.removeMovieClip();
_root.ranger.visible = false;
_root.ranger._x = -1000;
tower = "";
updateInfoBar();
}
}
function spawnfirsttower() {
_root.towerCount++;
_root.tower_cannon.duplicateMovieClip("t" + _root.towerCount, 500 + _root.towerCount);
a = _root["t" + _root.towerCount];
a._x = 240;
a._y = 170;
a.active = 1;
a.cost = cost;
a.sellc = Math.round(a.cost * 0.75);
_root.gpaused = 0;
_root.updateInfoBar();
}
function deleteTowers() {
ti = 0;
while (ti <= _root.towerCount) {
removeMovieClip("t" + ti);
ti++;
}
_root.UpgradeTowerInfo._visible = false;
player.removeMovieClip();
}
function deleteCreeps() {
cri = 0;
while (cri <= _root.creepCount) {
removeMovieClip("c" + cri);
cri++;
}
_root.UpgradeTowerInfo._visible = false;
}
function updateInfoBar() {
_root.InfoBar.GoldAmount.text = _root.gold;
_root.InfoBar2.LivesAmount.text = _root.lives;
a = _root.selectedTower;
if (_root.gold >= 15) {
tb1.colorover.gotoAndStop(2);
if (_root.gold >= 20) {
tb2.colorover.gotoAndStop(2);
if (_root.gold >= 30) {
tb3.colorover.gotoAndStop(2);
if (_root.gold >= 35) {
tb4.colorover.gotoAndStop(2);
if (_root.gold >= 40) {
tb5.colorover.gotoAndStop(2);
if (_root.gold >= 65) {
tb6.colorover.gotoAndStop(2);
if (_root.gold >= 100) {
tb7.colorover.gotoAndStop(2);
if (_root.gold >= 200) {
tb8.colorover.gotoAndStop(2);
} else {
tb8.colorover.gotoAndStop(1);
}
} else {
tb7.colorover.gotoAndStop(1);
tb8.colorover.gotoAndStop(1);
}
} else {
tb6.colorover.gotoAndStop(1);
tb7.colorover.gotoAndStop(1);
tb8.colorover.gotoAndStop(1);
}
} else {
tb5.colorover.gotoAndStop(1);
tb6.colorover.gotoAndStop(1);
tb7.colorover.gotoAndStop(1);
tb8.colorover.gotoAndStop(1);
}
} else {
tb4.colorover.gotoAndStop(1);
tb5.colorover.gotoAndStop(1);
tb6.colorover.gotoAndStop(1);
tb7.colorover.gotoAndStop(1);
tb8.colorover.gotoAndStop(1);
}
} else {
tb3.colorover.gotoAndStop(1);
tb4.colorover.gotoAndStop(1);
tb5.colorover.gotoAndStop(1);
tb6.colorover.gotoAndStop(1);
tb7.colorover.gotoAndStop(1);
tb8.colorover.gotoAndStop(1);
}
} else {
tb2.colorover.gotoAndStop(1);
tb3.colorover.gotoAndStop(1);
tb4.colorover.gotoAndStop(1);
tb5.colorover.gotoAndStop(1);
tb6.colorover.gotoAndStop(1);
tb7.colorover.gotoAndStop(1);
tb8.colorover.gotoAndStop(1);
}
} else {
tb1.colorover.gotoAndStop(1);
tb2.colorover.gotoAndStop(1);
tb3.colorover.gotoAndStop(1);
tb4.colorover.gotoAndStop(1);
tb5.colorover.gotoAndStop(1);
tb6.colorover.gotoAndStop(1);
tb7.colorover.gotoAndStop(1);
tb8.colorover.gotoAndStop(1);
}
}
stop();
speedwaytext._visible = false;
var checktowers = 0;
var checktowers2 = 0;
var sfxon = true;
cartxtfx._alpha = 0;
var stucktest = 0;
optionsmenu._visible = false;
player._visible = false;
var lives = Math.round(30 * difficulty);
_root.waves = [[10, 50, 2.5, 1700, 1], [10, 100, 2.5, 2200, 1], [10, 150, 2, 2000, 1], [10, 250, 1.5, 2300, 1], [10, 300, 2.5, 2500, 1], [1, 500, 2.5, 2300, 25], [10, 350, 2.5, 2200, 2], [10, 450, 3.5, 3000, 2], [10, 550, 2.5, 1200, 2], [10, 650, 1.5, 2000, 2], [10, 750, 3.5, 3000, 2], [1, 1200, 3.5, 3000, 50], [10, 950, 2.5, 2000, 2], [10, 1150, 3.5, 4000, 2], [10, 1000, 2.5, 1500, 2], [10, 1550, 1.5, 2000, 2], [10, 1750, 3.5, 3000, 2], [3, 2000, 2.5, 1000, 50], [10, 2150, 2.5, 2000, 3], [10, 2550, 3.5, 5000, 3], [10, 2950, 2.5, 1500, 3], [10, 3350, 1.5, 2000, 3], [10, 3850, 2, 5000, 3], [1, 6500, 1.5, 3000, 200], [10, 3000, 2.5, 2000, 4], [10, 4000, 3.5, 5000, 4], [10, 5250, 2.5, 1500, 4], [10, 6050, 1.5, 2000, 4], [10, 6850, 2.5, 3000, 4], [1, 12500, 3.5, 3000, 400], [8, 9000, 2.5, 2000, 8], [5, 12000, 3.5, 3000, 8], [10, 12650, 2.5, 1200, 8], [10, 14250, 1.5, 2000, 8], [10, 15850, 2.5, 2000, 8], [1, 30450, 4.5, 3000, 1000]];
_root.wave = 0;
_root.towerCount = 0;
_root.selectedTower = "";
_root.creepCount = 0;
_root.creepArray = [];
_root.creepLeaks = 0;
_root.explosionCount = 0;
_root.particleCount = 0;
_root.kills = 0;
_root.gold = 30;
_root.gpaused = 1;
pointarrow._visible = true;
var herotype = 1;
startheromenu();
_root.newLevel();
options.onRelease = function () {
gpaused = 1;
optionsmenu.duplicateMovieClip("o" + _root.creepCount, _root.getNextHighestDepth());
o = _root["o" + _root.creepCount];
o._x = 295;
o._y = 120;
o.resumegame.onRelease = function () {
gpaused = 0;
o.removeMovieClip();
};
o.moregames.onRelease = function () {
getURL ("http://www.areaglegames.com", _blank);
};
o.exitgame.onRelease = function () {
deleteTowers();
deleteCreeps();
o.removeMovieClip();
_root.gotoAndStop(1);
player._visible = false;
};
o.resetcar.onRelease = function () {
_root.player._x = 380;
_root.player._y = 270;
};
};
onEnterFrame = function () {
if (_root.selectedTower == _root.player) {
if (marker.active != 1) {
_root.ranger._x = _root.player._x;
_root.ranger._y = _root.player._y;
}
}
if (ee1.hitTest(player)) {
_root.gold = _root.gold + 10;
ee1._x = -100;
updateInfoBar();
} else if (ee2.hitTest(player)) {
_root.gold = _root.gold + 20;
ee2._x = -100;
updateInfoBar();
} else if (ee3.hitTest(player)) {
_root.gold = _root.gold + 30;
ee3._x = -100;
updateInfoBar();
}
if (gpaused == 0) {
angle = player.angle1;
if (walls.hitTest(player._x + (Math.sin(angle / 57.2957795130823) * 20), player._y - (Math.cos(angle / 57.2957795130823) * 15), true)) {
if (forward == 1) {
forward = 0;
player.distance = player.distance * -0.5;
}
} else {
forward = 1;
}
if (walls.hitTest(player._x - (Math.sin(angle / 57.2957795130823) * 20), player._y + (Math.cos(angle / 57.2957795130823) * 15), true)) {
if (backwards == 1) {
backwards = 0;
player.distance = player.distance * -0.5;
}
} else {
backwards = 1;
}
}
};
Instance of Symbol 88 MovieClip "deselect" in Frame 2
on (press) {
_root.selectedTower = "";
_root.ranger._x = 3000;
_root.ranger._width = 10;
_root.ranger._height = 10;
_root.UpgradeTowerInfo._visible = false;
}
Instance of Symbol 107 MovieClip "playerspawn" in Frame 2
onClipEvent (load) {
var distance = 0;
var angle = 0;
var angle1 = 0;
var health = 100;
var topspeed = 10;
var accel = 0.2;
var handling = 7;
cost = 0;
range = 50;
rate = 5;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
if (_root.herotype == 1) {
damage = 3;
splash = 0;
slow = 0;
level = 1;
upgrades = [["Damage: 6\rRange: 60\rSplash:No\rSlow:No", 15, 6, 60, 5, 0, 0], ["Damage: 12\rRange: 70\rSplash:No\rSlow:No", 30, 12, 70, 5, 0, 0], ["Damage: 24\rRange: 80\rSplash:No\rSlow:No", 45, 24, 80, 5, 0, 0], ["Damage: 48\rRange: 90\rSplash:No\rSlow:No", 70, 48, 90, 5, 0, 0], ["Damage: 72\rRange: 100\rSplash:No\rSlow:No", 90, 72, 100, 5, 0, 0], ["Damage: 108\rRange: 110\rSplash:No\rSlow:No", 120, 108, 110, 5, 0, 0], ["Damage: 162\rRange: 120\rSplash:No\rSlow:No", 150, 162, 120, 5, 0, 0]];
}
if (_root.herotype == 2) {
damage = 2;
splash = 5;
slow = 0;
level = 1;
upgrades = [["Damage: 4\rRange: 60\rSplash:Yes\rSlow:No", 15, 4, 60, 5, 10, 0], ["Damage: 8\rRange: 70\rSplash:Yes\rSlow:No", 30, 8, 70, 5, 15, 0], ["Damage: 16\rRange: 80\rSplash:Yes\rSlow:No", 45, 16, 80, 5, 25, 0], ["Damage: 32\rRange: 90\rSplash:Yes\rSlow:No", 70, 32, 90, 5, 40, 0], ["Damage: 48\rRange: 100\rSplash:Yes\rSlow:No", 90, 48, 100, 5, 50, 0], ["Damage: 80\rRange: 110\rSplash:Yes\rSlow:No", 120, 80, 110, 5, 65, 0], ["Damage: 140\rRange: 120\rSplash:Yes\rSlow:No", 150, 140, 120, 5, 75, 0]];
}
if (_root.herotype == 3) {
damage = 2;
splash = 0;
slow = 5;
level = 1;
upgrades = [["Damage: 4\rRange: 60\rSplash:No\rSlow:Yes", 15, 4, 60, 5, 0, 10], ["Damage: 8\rRange: 70\rSplash:No\rSlow:Yes", 30, 8, 70, 5, 0, 15], ["Damage: 16\rRange: 80\rSplash:No\rSlow:Yes", 45, 16, 80, 5, 0, 25], ["Damage: 32\rRange: 90\rSplash:No\rSlow:Yes", 70, 32, 90, 5, 0, 40], ["Damage: 48\rRange: 100\rSplash:No\rSlow:Yes", 90, 48, 100, 5, 0, 50], ["Damage: 80\rRange: 110\rSplash:No\rSlow:Yes", 120, 80, 110, 5, 0, 65], ["Damage: 140\rRange: 120\rSplash:No\rSlow:Yes", 150, 140, 120, 5, 0, 75]];
}
}
on (press) {
_root.towerInfo(this);
}
onClipEvent (enterFrame) {
if (this.abletogo == true) {
this.gotoAndStop(_root.herotype);
if (_root.gpaused == 0) {
_rotation = angle;
angle1 = angle;
if (driving == 1) {
if (_root.cartxtfx._alpha >= 0) {
_root.cartxtfx._alpha = _root.cartxtfx._alpha - 1;
}
}
if (Key.isDown(38) or Key.isDown(87)) {
if (Math.abs(distance) < topspeed) {
driving = 1;
distance = distance - accel;
accel = accel + 0.05;
}
if (_root.forward == 1) {
_y = (_y + ((Math.cos(angle / 57.2957795130823) * distance) / 2));
_x = (_x - ((Math.sin(angle / 57.2957795130823) * distance) / 2));
} else if (accel != 0) {
accel = 0;
}
} else if (Key.isDown(40) or Key.isDown(83)) {
if (Math.abs(distance) < topspeed) {
driving = 1;
_root.cartxt.text = "";
distance = distance + accel;
accel = accel + 0.04;
}
if (_root.backwards == 1) {
_y = (_y + ((Math.cos(angle / 57.2957795130823) * distance) / 2));
_x = (_x - ((Math.sin(angle / 57.2957795130823) * distance) / 2));
} else if (accel != 0) {
accel = 0;
}
} else {
if (_root.backwards == 1) {
if (_root.forward == 1) {
_y = (_y + ((Math.cos(angle / 57.2957795130823) * distance) / 2));
_x = (_x - ((Math.sin(angle / 57.2957795130823) * distance) / 2));
}
}
distance = distance - (distance / 10);
if (Math.abs(distance) < 0.5) {
distance = 0;
}
accel = accel - (accel / 10);
}
if (Key.isDown(39) or Key.isDown(68)) {
angle = angle + (handling - (accel * 2));
}
if (Key.isDown(37) or Key.isDown(65)) {
angle = angle - (handling - (accel * 2));
}
if (_root.gpaused == 0) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _root.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
target = 1;
creep = _root.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
_root.fire(this, creep, 10, 1, 10, "projectile_hero", damage + _root.wave, splash, slow);
}
}
}
}
}
}
}
Instance of Symbol 125 MovieClip "info_message" in Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 138 MovieClip "UpgradeTowerInfo" in Frame 2
onClipEvent (load) {
_visible = false;
swapDepths(100000);
}
Instance of Symbol 207 MovieClip "tb1" in Frame 2
on (press) {
if (_root.gold >= 15) {
_root.marker.active = 1;
_root.marker.tower = "cannon";
_root.marker.cost = 15;
}
_root.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent.info_message.title.text = "Tank 15 Gold";
_parent.info_message.desc.text = "A tank which shoots bullets at the enemy cars with a very fast firing rate.";
_parent.info_message.type.text = "Normal";
_parent.info_message._visible = true;
}
on (rollOut) {
_parent.info_message._visible = false;
}
Instance of Symbol 210 MovieClip "tower_cannon" in Frame 2
onClipEvent (load) {
title = "Cannon Tower [Cost: $15]";
desc = "Medium attack speed with high damage and a high range";
type = "Ground";
cost = 15;
range = 100;
rate = 7;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
damage = 10;
splash = 0;
slow = 0;
level = 1;
upgrades = [["Damage: 20\rRange: 100\rSplash:No\rSlow:No", 20, 20, 100, 5, 0, 0], ["Damage: 40\rRange: 100\rSplash:No\rSlow:No", 30, 40, 100, 5, 0, 0], ["Damage: 80\rRange: 100\rSplash:No\rSlow:No", 55, 80, 100, 5, 0, 0], ["Damage: 160\rRange: 100\rSplash:Yes\rSlow:No", 85, 160, 100, 5, 40, 0]];
}
on (press) {
_root.towerInfo(this);
}
onClipEvent (enterFrame) {
if (_root.gpaused == 0) {
if ((active == 1) && (_root.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _root.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
target = 1;
creep = _root.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
_rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593);
_root.fire(this, creep, 10, 1, 10, "projectile_cannonball", damage, splash, slow);
}
}
}
}
}
}
Instance of Symbol 216 MovieClip "marker" in Frame 2
onClipEvent (load) {
active = 0;
notallowed = 0;
}
onClipEvent (enterFrame) {
if (active == 1) {
if (_root.gpaused == 0) {
_x = (int(_root._xmouse / 20) * 20);
_y = ((int(_root._ymouse / 20) * 20) + 10);
hitTestOnGrassMovieClip = _root.grass.hitTest(_x, _y, 1);
if (hitTestOnGrassMovieClip and (notallowed == 0)) {
gotoAndStop (1);
_root.ranger.gotoAndStop(1);
} else {
gotoAndStop (2);
_root.ranger.gotoAndStop(2);
}
ti = 0;
while (ti <= _root.towerCount) {
if (this.hitTest("t" + ti._x, "t" + ti._y, true)) {
notallowed = 1;
}
ti++;
}
_root.ranger._x = _x;
_root.ranger._y = _y;
_root.ranger._width = _root["tower_" + tower].range * 2;
_root.ranger._height = _root["tower_" + tower].range * 2;
}
}
}
on (release) {
hitTestOnGrassMovieClip = _root.grass.hitTest(_x, _y, 1);
hitTestOnDeSelectMovieClip = _root.deselect.hitTest(_x, _y, 1);
if (hitTestOnGrassMovieClip || (hitTestOnDeSelectMovieClip)) {
if (hitTestOnGrassMovieClip) {
if (notallowed == 0) {
_root.towerCount++;
_root["tower_" + tower].duplicateMovieClip("t" + _root.towerCount, 500 + _root.towerCount);
a = _root["t" + _root.towerCount];
a._x = _x;
a._y = _y;
a.active = 1;
a.cost = cost;
_root.gold = _root.gold - cost;
a.sellc = Math.round(a.cost * 0.75);
_root.gpaused = 0;
_root.updateInfoBar();
} else {
gotoAndStop (2);
_root.ranger.gotoAndStop(2);
}
active = 0;
_x = 1000;
_root.selectedTower = "";
_root.ranger._x = 1000;
_root.ranger._width = 10;
_root.ranger._height = 10;
} else {
active = 0;
_x = 1000;
_root.selectedTower = "";
_root.ranger._x = 1000;
_root.ranger._width = 10;
_root.ranger._height = 10;
}
}
}
Instance of Symbol 226 MovieClip "tb5" in Frame 2
on (press) {
if (_root.gold >= 40) {
_root.marker.active = 1;
_root.marker.tower = "fire";
_root.marker.cost = 40;
}
_root.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent.info_message.title.text = "Coal Truck 40 Gold";
_parent.info_message.desc.text = "A truck which launches hot coals at the enemy, slowing the car down to a fiery halt";
_parent.info_message.type.text = "Ground and Slow";
_parent.info_message._visible = true;
}
on (rollOut) {
_parent.info_message._visible = false;
}
Instance of Symbol 233 MovieClip "tower_fire" in Frame 2
onClipEvent (load) {
title = "Fire Tower [Cost: $40]";
desc = "Fast attack speed with moderate damage and low range, but can cause splash damage to nearby enemies";
type = "Ground + Splash";
cost = 40;
range = 80;
rate = 2;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
damage = 5;
splash = 40;
slow = 0;
level = 1;
upgrades = [["Damage: 11\rRange: 80\rSplash:Yes\rSlow:No", 45, 11, 80, 2, 50, 0], ["Damage: 20\rRange: 80\rSplash:Yes\rSlow:No", 75, 20, 80, 2, 60, 0], ["Damage: 35\rRange: 80\rSplash:Yes\rSlow:No", 95, 35, 80, 2, 60, 0], ["Damage: 60\rRange: 80\rSplash:Yes\rSlow:Yes", 125, 60, 80, 2, 60, 20]];
}
on (press) {
_root.towerInfo(this);
}
onClipEvent (enterFrame) {
if (_root.gpaused == 0) {
if ((active == 1) && (_root.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _root.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
target = 1;
creep = _root.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
_rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593);
_root.fire(this, creep, 10, 1, 10, "projectile_fire", damage, splash, slow);
}
}
}
}
}
}
Instance of Symbol 235 MovieClip "tb3" in Frame 2
on (press) {
if (_root.gold >= 30) {
_root.marker.active = 1;
_root.marker.tower = "water";
_root.marker.cost = 30;
}
_root.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent.info_message.title.text = "Fire Truck 30 Gold";
_parent.info_message.desc.text = "A fire truck which sprays water on the target, splashing the enemy car with water";
_parent.info_message.type.text = "Ground and Splash";
_parent.info_message._visible = true;
}
on (rollOut) {
_parent.info_message._visible = false;
}
Instance of Symbol 238 MovieClip "tower_water" in Frame 2
onClipEvent (load) {
title = "WaterTower [Cost: $30]";
desc = "Fast attack speed with low damage and low range, but can cause nearby enemies to slow and can be upgraded to do splash damage";
type = "Ground + Splash + Slow";
cost = 30;
range = 80;
rate = 2;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
damage = 2;
splash = 0;
slow = 25;
level = 1;
upgrades = [["Damage: 6\rRange: 80\rSplash:Yes\rSlow:Yes", 30, 5, 80, 2, 10, 40], ["Damage: 12\rRange: 80\rSplash:Yes\rSlow:Yes", 60, 10, 80, 2, 20, 60], ["Damage: 20\rRange: 80\rSplash:Yes\rSlow:Yes", 90, 16, 80, 2, 30, 65], ["Damage: 35\rRange: 80\rSplash:Yes\rSlow:Yes", 120, 25, 80, 2, 40, 70]];
}
on (press) {
_root.towerInfo(this);
}
onClipEvent (enterFrame) {
if (_root.gpaused == 0) {
if ((active == 1) && (_root.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _root.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
target = 1;
creep = _root.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
_rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593);
_root.fire(this, creep, 10, 1, 10, "projectile_water", damage, splash, slow);
}
}
}
}
}
}
Instance of Symbol 245 MovieClip "tower_missile" in Frame 2
onClipEvent (load) {
cost = 100;
range = 150;
rate = 2;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
damage = 35;
splash = 0;
slow = 0;
level = 1;
upgrades = [["Damage: 60\rRange: 150\rSplash:No\rSlow:No", 100, 60, 150, 2, 0, 0], ["Damage: 90\rRange: 150\rSplash:No\rSlow:No", 300, 90, 150, 2, 0, 0], ["Damage: 150\rRange: 150\rSplash:No\rSlow:No", 550, 150, 150, 2, 0, 0], ["Damage: 250\rRange: 150\rSplash:Yes\rSlow:No", 850, 250, 150, 2, 40, 0]];
}
on (press) {
_root.towerInfo(this);
}
onClipEvent (enterFrame) {
if (_root.gpaused == 0) {
if ((active == 1) && (_root.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _root.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
target = 1;
creep = _root.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
_rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593);
_root.fire(this, creep, 10, 1, 10, "projectile_missile", damage, splash, slow);
}
}
}
}
}
}
Instance of Symbol 249 MovieClip "tb7" in Frame 2
on (press) {
if (_root.gold >= 100) {
_root.marker.active = 1;
_root.marker.tower = "missile";
_root.marker.cost = 100;
}
_root.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent.info_message.title.text = "Missile Truck 100 Gold";
_parent.info_message.desc.text = "A truck which launches missiles at the enemy, obliterating them to peices";
_parent.info_message.type.text = "Ground";
_parent.info_message._visible = true;
}
on (rollOut) {
_parent.info_message._visible = false;
}
Instance of Symbol 251 MovieClip "tb2" in Frame 2
on (press) {
if (_root.gold >= 20) {
_root.marker.active = 1;
_root.marker.tower = "grenade";
_root.marker.cost = 20;
}
_root.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent.info_message.title.text = "Grenade Tank 20 Gold";
_parent.info_message.desc.text = "A tank which shoots grenades at the enemy cars with a slow firing rate.";
_parent.info_message.type.text = "Normal";
_parent.info_message._visible = true;
}
on (rollOut) {
_parent.info_message._visible = false;
}
Instance of Symbol 253 MovieClip "tb6" in Frame 2
on (press) {
if (_root.gold >= 65) {
_root.marker.active = 1;
_root.marker.tower = "snow";
_root.marker.cost = 65;
}
_root.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent.info_message.title.text = "Snow Plow 65 Gold";
_parent.info_message.desc.text = "A plow which launches snow at the enemy, freezing and slowing the car into an icy block";
_parent.info_message.type.text = "Ground and Slow";
_parent.info_message._visible = true;
}
on (rollOut) {
_parent.info_message._visible = false;
}
Instance of Symbol 255 MovieClip "tb4" in Frame 2
on (press) {
if (_root.gold >= 35) {
_root.marker.active = 1;
_root.marker.tower = "oil";
_root.marker.cost = 35;
}
_root.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent.info_message.title.text = "Oil Tanker 35 Gold";
_parent.info_message.desc.text = "An oil tanker which shoots barrels at the target, splashing the enemy car with sticky oil";
_parent.info_message.type.text = "Ground and Splash";
_parent.info_message._visible = true;
}
on (rollOut) {
_parent.info_message._visible = false;
}
Instance of Symbol 257 MovieClip "tb8" in Frame 2
on (press) {
if (_root.gold >= 200) {
_root.marker.active = 1;
_root.marker.tower = "nuke";
_root.marker.cost = 200;
}
_root.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent.info_message.title.text = "Nuclear Truck 200 Gold";
_parent.info_message.desc.text = "A truck which launches nuclear missiles at the enemy, seperating them atom by atom";
_parent.info_message.type.text = "Ground";
_parent.info_message._visible = true;
}
on (rollOut) {
_parent.info_message._visible = false;
}
Instance of Symbol 260 MovieClip "tower_grenade" in Frame 2
onClipEvent (load) {
cost = 20;
range = 75;
rate = 9;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
damage = 20;
splash = 0;
slow = 0;
level = 1;
upgrades = [["Damage: 40\rRange: 75\rSplash:No\rSlow:No", 15, 40, 75, 5, 0, 0], ["Damage: 80\rRange: 75\rSplash:No\rSlow:No", 30, 80, 75, 5, 0, 0], ["Damage: 160\rRange: 75\rSplash:No\rSlow:No", 45, 160, 75, 5, 0, 0], ["Damage: 320\rRange: 75\rSplash:Yes\rSlow:No", 75, 320, 75, 5, 40, 0]];
}
on (press) {
_root.towerInfo(this);
}
onClipEvent (enterFrame) {
if (_root.gpaused == 0) {
if ((active == 1) && (_root.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _root.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
target = 1;
creep = _root.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
_rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593);
_root.fire(this, creep, 10, 1, 10, "projectile_grenade", damage, splash, slow);
}
}
}
}
}
}
Instance of Symbol 265 MovieClip "tower_oil" in Frame 2
onClipEvent (load) {
cost = 35;
range = 100;
rate = 5;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
damage = 15;
splash = 0;
slow = 25;
level = 1;
upgrades = [["Damage: 30\rRange: 100\rSplash:No\rSlow:Yes", 35, 30, 100, 5, 0, 25], ["Damage: 60\rRange: 100\rSplash:No\rSlow:Yes", 70, 60, 100, 5, 0, 25], ["Damage: 120\rRange: 100\rSplash:No\rSlow:Yes", 105, 120, 100, 5, 0, 25], ["Damage: 240\rRange: 100\rSplash:Yes\rSlow:Yes", 200, 240, 100, 5, 40, 25]];
}
on (press) {
_root.towerInfo(this);
}
onClipEvent (enterFrame) {
if (_root.gpaused == 0) {
if ((active == 1) && (_root.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _root.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
target = 1;
creep = _root.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
_rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593);
_root.fire(this, creep, 10, 1, 10, "projectile_oil", damage, splash, slow);
}
}
}
}
}
}
Instance of Symbol 270 MovieClip "tower_snow" in Frame 2
onClipEvent (load) {
cost = 65;
range = 125;
rate = 3;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
damage = 12;
splash = 0;
slow = 50;
level = 1;
upgrades = [["Damage: 15\rRange: 125\rSplash:No\rSlow:Yes", 65, 15, 125, 5, 0, 50], ["Damage: 30\rRange: 125\rSplash:No\rSlow:Yes", 130, 30, 125, 5, 0, 50], ["Damage: 60\rRange: 125\rSplash:No\rSlow:Yes", 260, 60, 125, 5, 0, 50], ["Damage: 120\rRange: 125\rSplash:Yes\rSlow:Yes", 520, 120, 125, 5, 40, 50]];
}
on (press) {
_root.towerInfo(this);
}
onClipEvent (enterFrame) {
if (_root.gpaused == 0) {
if ((active == 1) && (_root.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _root.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
target = 1;
creep = _root.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
_rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593);
_root.fire(this, creep, 10, 1, 10, "projectile_snow", damage, splash, slow);
}
}
}
}
}
}
Instance of Symbol 273 MovieClip "tower_nuke" in Frame 2
onClipEvent (load) {
cost = 200;
range = 150;
rate = 2;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
damage = 75;
splash = 0;
slow = 0;
level = 1;
upgrades = [["Damage: 150\rRange: 150\rSplash:No\rSlow:No", 200, 150, 150, 2, 0, 0], ["Damage: 300\rRange: 150\rSplash:No\rSlow:No", 400, 300, 150, 2, 0, 0], ["Damage: 600\rRange: 150\rSplash:No\rSlow:No", 850, 600, 150, 2, 0, 0], ["Damage: 1200\rRange: 150\rSplash:Yes\rSlow:No", 1700, 1200, 150, 2, 40, 0]];
}
on (press) {
_root.towerInfo(this);
}
onClipEvent (enterFrame) {
if (_root.gpaused == 0) {
if ((active == 1) && (_root.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _root.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _root.creepArray[i]._x, 2) + Math.pow(this._y - _root.creepArray[i]._y, 2));
if (d < range) {
target = 1;
creep = _root.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > range) {
lastChecked = 999;
target = 0;
} else {
_rotation = ((Math.atan2(creep._y - this._y, creep._x - this._x) * 180) / 3.141593);
_root.fire(this, creep, 10, 1, 10, "projectile_nuke", damage, splash, slow);
}
}
}
}
}
}
Symbol 14 MovieClip Frame 30
stop();
Symbol 19 Button
on (release) {
_root.gotoAndStop(5);
}
Symbol 22 Button
on (release) {
getURL ("http://www.bunnygames.com/in.php?game=speedway_tower&zone=more", _blank);
}
Symbol 25 Button
on (release) {
var o = {n:[0, 15, 11, 1, 15, 5, 5, 9, 1, 1, 0, 7, 8, 14, 11, 13], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID});
}
Symbol 27 Button
on (release) {
_root.menubut.nextFrame();
}
Symbol 31 Button
on (release) {
_root.difficulty = 1.2;
_root.nextFrame();
}
Symbol 34 Button
on (release) {
_root.difficulty = 0.8;
_root.nextFrame();
}
Symbol 37 Button
on (release) {
_root.difficulty = 0.6;
_root.nextFrame();
}
Symbol 40 Button
on (release) {
_root.menubut.prevFrame();
}
Symbol 41 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 30
stop();
Symbol 41 MovieClip Frame 31
stop();
Symbol 52 Button
on (release) {
getURL ("http://www.bunnygames.com/in.php?game=speedway_tower&zone=bunny", _blank);
}
Symbol 70 MovieClip Frame 1
stop();
_root.soundon = function () {
if (soundtest == undefined) {
nextFrame();
}
};
Symbol 70 MovieClip Frame 2
nextFrame();
Symbol 70 MovieClip Frame 3
bgSound = new Sound(this);
bgSound.attachSound("sound1");
bgSound.start(0, 99);
playB.enabled = false;
stopB.enabled = true;
_root.sfxon = true;
slider.slideBar._y = -50;
soundtest = 1;
slider.slideBar.onEnterFrame = function () {
bgSound.setVolume(-(this._y * 2));
};
slider.slideBar.onPress = function () {
startDrag (this, false, this._x, -65, this._x, 0);
};
slider.slideBar.onRelease = (slider.slideBar.onReleaseOutside = function () {
stopDrag();
});
stopB.onRelease = function () {
_root.sfxon = false;
playB.enabled = true;
stopB.enabled = false;
};
playB.onRelease = function () {
_root.sfxon = true;
playB.enabled = false;
stopB.enabled = true;
};
Symbol 71 Button
on (release) {
getURL ("http://www.bunnygames.com/in.php?game=speedway_tower&zone=intro", _blank);
}
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 48
stop();
Symbol 81 MovieClip Frame 75
stop();
_root.intro._visible = false;
Symbol 378 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.0");
}
static function allowDomains(server) {
var hostname = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(hostname);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(hostname);
}
}
return(hostname);
}
static function get isNetworkAvailable() {
if (System.security) {
var o = System.security;
if (o.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var clipname = ("_mochiservices_com_" + id);
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servicesURL != undefined) {
_servicesURL = urlOptions().servicesURL;
}
allowDomains(_servicesURL);
_clip = clip.createEmptyMovieClip(clipname, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip((((_servicesURL + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var cb = pkg.callbackID;
var cblst = this._callbacks[cb];
if (!cblst) {
return(undefined);
}
var method = cblst.callbackMethod;
var obj = cblst.callbackObject;
if (obj && (typeof(method) == "string")) {
method = obj[method];
}
if (method != undefined) {
method.apply(obj, pkg.args);
}
delete this._callbacks[cb];
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
};
trace("connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var request;
var callback;
while (_sendChannel._queue.length > 0) {
request = _sendChannel._queue.shift();
delete callback;
if (request.callbackID != null) {
callback = _listenChannel._callbacks[request.callbackID];
}
delete _listenChannel._callbacks[request.callbackID];
if (error) {
handleError(request.args, callback.callbackObject, callback.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var opts = {};
if (_root.mochiad_options) {
var pairs = _root.mochiad_options.split("&");
var i = 0;
while (i < pairs.length) {
var kv = pairs[i].split("=");
opts[unescape(kv[0])] = unescape(kv[1]);
i++;
}
}
return(opts);
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var vars = new Object();
vars.mav = getVersion();
vars.swfv = btn.getSWFVersion() || 6;
vars.swfurl = btn._url;
vars.fv = System.capabilities.version;
vars.os = System.capabilities.os;
vars.lang = System.capabilities.language;
vars.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var i = 0;
for (var x in vars) {
if (i != 0) {
s = s + "&";
}
i++;
s = ((s + x) + "=") + escape(vars[x]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var nettest = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
nettest.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var clk = btn.createEmptyMovieClip("clk", 1001);
clk._alpha = 0;
clk.beginFill(1044735);
clk.moveTo(0, 0);
clk.lineTo(0, btn._height);
clk.lineTo(btn._width, btn._height);
clk.lineTo(btn._width, 0);
clk.lineTo(0, 0);
clk.endFill();
clk.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static var _servicesURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
}
Symbol 379 MovieClip [__Packages.mochi.as2.MochiScores] Frame 0
class mochi.as2.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if ((options.clip == null) || (options.clip == undefined)) {
options.clip = mochi.as2.MochiServices.clip;
}
if ((options.clip != mochi.as2.MochiServices.__get__clip()) || (mochi.as2.MochiServices.__get__childClip()._target == undefined)) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.connect(mochi.as2.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.as2.MochiDigits) {
options.score = options.score.value;
}
var n = Number(options.score);
if (isNaN(n)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'");
} else if ((n == Number.NEGATIVE_INFINITY) || (n == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(n) != n) {
trace(("WARNING: Submitted score '" + options.score) + "' will be truncated");
}
options.score = n;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.as2.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.as2.MochiServices.__get__clip().stop();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
mochi.as2.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.as2.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'");
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(score) != score) {
trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated");
}
score = Number(score);
}
mochi.as2.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var so = {};
var i;
var j;
var o;
var row_obj;
for (var item in scores) {
if (typeof(scores[item]) == "object") {
if ((scores[item].cols != null) && (scores[item].rows != null)) {
so[item] = [];
o = scores[item];
j = 0;
while (j < o.rows.length) {
row_obj = {};
i = 0;
while (i < o.cols.length) {
row_obj[o.cols[i]] = o.rows[j][i];
i++;
}
so[item].push(row_obj);
j++;
}
} else {
so[item] = {};
for (var param in scores[item]) {
so[item][param] = scores[item][param];
}
}
} else {
so[item] = scores[item];
}
}
return(so);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 380 MovieClip [__Packages.mochi.as2.MochiDigits] Frame 0
class mochi.as2.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var s = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = s.charCodeAt(index++) ^ Encoder;
if (index < s.length) {
Sibling = new mochi.as2.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var newEncode = int(2147483647 * Math.random());
Fragment = Fragment ^ (newEncode ^ Encoder);
Encoder = newEncode;
}
function toString() {
var s = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (s.concat(Sibling.toString())) : (s)));
}
}
Symbol 92 MovieClip Frame 2
stop();
Symbol 107 MovieClip Frame 1
onEnterFrame = function () {
spinning._rotation = spinning._rotation + 50;
};
stop();
Instance of Symbol 133 MovieClip "SellButton" in Symbol 138 MovieClip Frame 1
on (press) {
_root.sell();
}
Instance of Symbol 137 MovieClip "UpgradeButton" in Symbol 138 MovieClip Frame 1
on (press) {
_root.upgrade();
}
Symbol 198 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 299 Button
on (release) {
getURL ("http://www.bunnygames.com/in.php?game=speedway_tower&zone=more", _blank);
}
Symbol 310 MovieClip Frame 1
stop();
Symbol 310 MovieClip Frame 2
stop();
Symbol 310 MovieClip Frame 8
stop();
Symbol 312 MovieClip Frame 1
stop();
Symbol 312 MovieClip Frame 3
gotoAndStop (1);
Symbol 314 MovieClip Frame 1
stop();
Symbol 314 MovieClip Frame 3
gotoAndStop (1);
Symbol 316 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 3
gotoAndStop (1);
Symbol 318 MovieClip Frame 1
stop();
Symbol 318 MovieClip Frame 3
gotoAndStop (1);
Symbol 320 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 3
gotoAndStop (1);
Symbol 322 MovieClip Frame 1
stop();
Symbol 322 MovieClip Frame 3
gotoAndStop (1);
Symbol 337 Button
on (release) {
_root.gotoAndStop(2);
}
Symbol 338 Button
on (release) {
_root.gotoAndStop(1);
}
Symbol 344 MovieClip Frame 14
stop();
Symbol 345 MovieClip Frame 40
stop();
Symbol 346 MovieClip Frame 1
n = 8;
while (n < 50) {
duplicateMovieClip ("bluebit", "bluebit" + n, n);
setProperty("bluebit" + n, _rotation , random(360));
setProperty("bluebit" + n, _alpha , random(30) + 80);
setProperty("bluebit" + n, _xscale , 50 + Number(random(60)));
setProperty("bluebit" + n, _yscale , 50 + Number(random(60)));
tellTarget ("bluebit" + n) {
gotoAndPlay(random(5));
};
n++;
}
Symbol 352 MovieClip Frame 1
n = 8;
while (n < 80) {
duplicateMovieClip ("spinner", "spinner" + n, n);
setProperty("spinner" + n, _rotation , random(360));
setProperty("spinner" + n, _alpha , random(30) + 80);
setProperty("spinner" + n, _xscale , 50 + Number(random(60)));
setProperty("spinner" + n, _yscale , 50 + Number(random(60)));
tellTarget ("spinner" + n) {
gotoAndPlay(random(5));
};
n++;
}
Symbol 356 Button
on (release) {
var hardtoguessname = ((_root.lives * 1000) + ((_root.gold * 10) / _root.difficulty));
var o = {n:[0, 15, 11, 1, 15, 5, 5, 9, 1, 1, 0, 7, 8, 14, 11, 13], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, score:hardtoguessname});
_root.gotoAndStop(1);
}
Symbol 358 Button
on (release) {
_root.hb.gotoAndStop(2);
}
Symbol 359 Button
on (release) {
_root.difficulty = 1.2;
_root.gotoAndStop(2);
}
Symbol 360 Button
on (release) {
_root.difficulty = 0.8;
_root.gotoAndStop(2);
}
Symbol 361 Button
on (release) {
_root.difficulty = 0.6;
_root.gotoAndStop(2);
}
Symbol 362 MovieClip Frame 1
stop();
Symbol 377 MovieClip Frame 1
stop();
nextbtn.onRelease = function () {
nextFrame();
};
backbtn.onRelease = function () {
prevFrame();
};