Frame 1
_root.musicenabled = true;
_root.effectsenabled = true;
_root.uzicheat = false;
_root.destsite = "newgrounds";
stop();
Frame 2
stop();
but01.delay = false;
but01._alpha = 0;
Instance of Symbol 45 MovieClip in Frame 2
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
pent.knife._rotation = (loaded * 360) / total;
pent.knifeshad._rotation = (loaded * 360) / total;
percent = (loaded * 100) / total;
if (percent >= 100) {
if (can1._currentframe == 1) {
can1.gotoAndPlay(2);
_root.but01.selectabl = true;
}
}
if (percent >= 90) {
if (can10._currentframe == 1) {
can10.gotoAndPlay(2);
}
}
if (percent >= 80) {
if (can9._currentframe == 1) {
can9.gotoAndPlay(2);
}
}
if (percent >= 70) {
if (can8._currentframe == 1) {
can8.gotoAndPlay(2);
}
}
if (percent >= 60) {
if (can7._currentframe == 1) {
can7.gotoAndPlay(2);
}
}
if (percent >= 50) {
if (can6._currentframe == 1) {
can6.gotoAndPlay(2);
}
}
if (percent >= 40) {
if (can5._currentframe == 1) {
can5.gotoAndPlay(2);
}
}
if (percent >= 30) {
if (can4._currentframe == 1) {
can4.gotoAndPlay(2);
}
}
if (percent >= 20) {
if (can3._currentframe == 1) {
can3.gotoAndPlay(2);
}
}
if (percent >= 10) {
if (can2._currentframe == 1) {
can2.gotoAndPlay(2);
}
}
}
Instance of Symbol 54 MovieClip "but01" in Frame 2
onClipEvent (enterFrame) {
if ((delay == false) && (selectabl == true)) {
delay = true;
_alpha = 30;
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_alpha = 100;
this.useHandCursor = true;
}
}
}
on (rollOver) {
if (selectabl == true) {
_alpha = 100;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (selectabl == true) {
_alpha = 30;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (press) {
if (selectabl == true) {
gotoAndStop (2);
this.useHandCursor = false;
selectabl = false;
_root.fadeobjectnew.gotoAndPlay(51);
}
}
Frame 3
fakesound = new Sound();
fakesound.setVolume(100);
Frame 4
stopAllSounds();
introplayer = new Sound();
introplayer.setVolume(0);
if (_root.musicenabled == true) {
introplayer.attachSound("intromusic");
introplayer.start(0, 9999);
}
buttween.gotoAndPlay(2);
disableall = function () {
buttween.but01.selectabl = false;
buttween.but02.selectabl = false;
buttween.but03.selectabl = false;
buttween.but04.selectabl = false;
};
Instance of Symbol 159 MovieClip in Frame 4
onClipEvent (enterFrame) {
vol = _root.introplayer.getVolume();
if ((_root.fader._currentframe <= 50) && (vol < 100)) {
_root.introplayer.setVolume(vol + 2);
}
if ((_root.fader._currentframe > 50) && (vol > 0)) {
_root.introplayer.setVolume(vol - 2);
}
}
Instance of Symbol 166 MovieClip "buttween" in Frame 4
onClipEvent (enterFrame) {
if (this._currentframe <= 59) {
}
}
Instance of Symbol 171 MovieClip in Frame 4
onClipEvent (load) {
if (_root.destsite == "gondor") {
_visible = false;
}
}
Frame 5
stop();
if (_root.uzicheat == true) {
wizard.arm.gotoAndStop(3);
currentspell = 3;
buildspeed = 25;
wizard.head.hat.gotoAndStop(2);
radar.playerblip.gotoAndStop(8);
} else {
wizard.arm.gotoAndStop(2);
currentspell = 2;
buildspeed = 12;
}
wizard.starttofade = undefined;
gameframe = _root._currentframe;
towerhealthcounter._visible = true;
cooldowncounter._visible = true;
towerhealthlogo._visible = true;
timeholder._visible = true;
tower._visible = true;
wizard._visible = true;
cooldown = 0;
warner._visible = true;
radar._visible = true;
mil = 0;
mild = "00";
sec = 0;
secd = "00";
min = 0;
numberofcorpses = 0;
mind = "00";
hour = 0;
pdsize = 0;
makedrag = 0;
towerhealth = 1000;
dragonsize = 0;
soundobj = new Sound();
soundobj.setVolume(0);
if (_root.musicenabled == true) {
soundobj.attachSound("music");
soundobj.start(0, 1000);
}
cel = 0;
num = 1;
ycam = 0;
xcam = 0;
enproj = 0;
currentvel = 0;
handfurther = 100;
lookshock = 0;
xcam = (225 - _xmouse) + (random(currentvel * 2) - currentvel);
ycam = (175 - _ymouse) + (random(currentvel * 2) - currentvel);
enemylist = new Array();
this.shake = function (mag) {
if (mag > currentvel) {
currentvel = mag;
}
};
this.squelch = function () {
stopAllSounds();
};
this.playsound = function (effect) {
if (_root.effectsenabled == true) {
soundobj.attachSound(effect);
soundobj.start();
}
};
this.lookshocker = function (forcerotation, force) {
if ((Math.sin((Math.PI/180) * forcerotation) * force) < 0) {
lookshock = lookshock + ((-Math.sin((Math.PI/180) * forcerotation)) * force);
} else {
lookshock = lookshock + (Math.sin((Math.PI/180) * forcerotation) * force);
}
};
createEmptyMovieClip("fakebullet", 68000);
shooting = function () {
playsound("gun");
fakebullet.bulletx = wizard.xpos + (Math.sin((Math.PI/180) * (wizard.arm._rotation + 90)) * 30);
fakebullet.bullety = (wizard.ypos - 60) - (Math.cos((Math.PI/180) * (wizard.arm._rotation + 90)) * 30);
fakebullet.xshift = Math.sin((Math.PI/180) * (wizard.arm._rotation + 90)) * 10;
fakebullet.yshift = (-Math.cos((Math.PI/180) * (wizard.arm._rotation + 90))) * 10;
fakebullet._rotation = wizard.arm._rotation;
bmoves = 100;
trace("shoot");
while (bmoves > 0) {
bmoves--;
fakebullet.bulletx = fakebullet.bulletx + (Math.sin((Math.PI/180) * (wizard.arm._rotation + 90)) * 6.5);
fakebullet.bullety = fakebullet.bullety - (Math.cos((Math.PI/180) * (wizard.arm._rotation + 90)) * 6.5);
d = 0;
if (enemylist.length > 0) {
while (d < enemylist.length) {
fakebullet._x = fakebullet.bulletx + xcam;
fakebullet._y = fakebullet.bullety + ycam;
if (eval ("enemy" + String(enemylist[d])).hitTest(fakebullet._x, fakebullet._y, true)) {
makeeffect("forcehit", fakebullet.bulletx, fakebullet.bullety, this._rotation, 0, 0, 0, 0, 60);
eval ("enemy" + String(enemylist[d])).health = eval ("enemy" + String(enemylist[d])).health - 5;
eval ("enemy" + String(enemylist[d])).hitfromx = fakebullet.xshift;
eval ("enemy" + String(enemylist[d])).hitfromy = fakebullet.yshift;
bmoves = 0;
}
d++;
}
}
}
fakebullet._x = 9999999 /* 0x98967F */;
fakebullet._y = 9999999 /* 0x98967F */;
};
this.force = function (xposy, yposy, force) {
if (enemylist.length > 0) {
el = 0;
while (el < enemylist.length) {
xdist = xposy - eval ("enemy" + el).xpos;
ydist = yposy - eval ("enemy" + el).ypos;
pdist = Math.sqrt((xdist * xdist) + (ydist * ydist));
if (pdist < (force * 10)) {
}
el++;
}
}
};
this.killall = function () {
funcnum = 0;
while (funcnum <= enemylist.length) {
removeMovieClip(eval ("enemy" + enemylist[funcnum]));
funcnum++;
}
trace("function ran");
funcnum = 300;
while (funcnum > -2) {
removeMovieClip(eval ("effect" + funcnum));
funcnum--;
}
removeMovieClip("proj1");
removeMovieClip("proj2");
removeMovieClip("proj3");
removeMovieClip("proj4");
removeMovieClip("proj0");
};
this.makeenemy = function (breed) {
thedragonsize = (100 + random(dragonsize)) + dragonsize;
e = 0;
while (eval ("enemy" + e)._visible != undefined) {
e++;
}
attachMovie(breed, "enemy" + e, e);
enemylist[enemylist.length] = e;
enemylist = enemylist.sort();
eval ("enemy" + e).idnum = e;
if (breed == "dragonpup") {
temprandom = random(2);
if (temprandom == 1) {
eval ("enemy" + e).xpos = 850 + thedragonsize;
eval ("enemy" + e).facedir = 1;
} else {
eval ("enemy" + e).xpos = -395 - thedragonsize;
eval ("enemy" + e).facedir = -1;
}
eval ("enemy" + e).ypos = 200 - random(400);
radar.attachMovie("eblip", "blip" + e, e);
eval ("enemy" + e)._x = eval ("enemy" + e).xpos + xcam;
eval ("enemy" + e)._y = eval ("enemy" + e).ypos + ycam;
eval ("radar.blip" + e)._x = (eval ("enemy" + e).xpos - 225) / 10;
eval ("radar.blip" + e)._y = (eval ("enemy" + e).ypos - 170) / 10;
eval ("enemy" + e)._xscale = eval ("enemy" + e).facedir * thedragonsize;
eval ("enemy" + e)._yscale = thedragonsize;
eval ("enemy" + e).xshift = 0;
eval ("enemy" + e).yshift = 0;
eval ("enemy" + e).health = thedragonsize / 3;
eval ("enemy" + e).createEmptyMovieClip("imaginary", 12);
eval ("enemy" + e).movecount = 0;
eval ("enemy" + e).myid = e;
eval ("enemy" + e).firecount = random(99);
eval ("enemy" + e).onEnterFrame = function () {
if (this.health <= 0) {
removeMovieClip(eval ("_root.radar.blip" + this.myid));
makeeffect("splode", this.xpos, this.ypos, this._rotation);
playsound("diedrag");
playsound("boom");
attachMovie("corpse", "corpse" + numberofcorpses, numberofcorpses + 1500);
eval ("corpse" + numberofcorpses)._xscale = this._xscale;
eval ("corpse" + numberofcorpses)._yscale = this._yscale;
eval ("corpse" + numberofcorpses).xpos = this.xpos;
eval ("corpse" + numberofcorpses).ypos = this.ypos;
eval ("corpse" + numberofcorpses)._x = this.xpos + xcam;
eval ("corpse" + numberofcorpses)._y = this.ypos + ycam;
eval ("corpse" + numberofcorpses)._rotation = this._rotation;
eval ("corpse" + numberofcorpses).xshift = this.hitfromx;
eval ("corpse" + numberofcorpses).yshift = this.hitfromy;
eval ("corpse" + numberofcorpses).onEnterFrame = function () {
if (_root._currentframe != gameframe) {
removeMovieClip(this);
}
this.yshift = this.yshift + 1;
this.xshift = this.xshift / 1.1;
this.xpos = this.xpos + this.xshift;
this.ypos = this.ypos + this.yshift;
this._x = this.xpos + xcam;
this._y = this.ypos + ycam;
this._rotation = this._rotation + (3 * (this._xscale / 100));
if (this.ypos > 800) {
playsound("thump");
shake(3);
removeMovieClip(this);
}
};
numberofcorpses++;
removeMovieClip(this);
}
this.xpos = this.xpos + this.xshift;
this.ypos = this.ypos + this.yshift;
this.xshift = this.xshift / 1.1;
this.yshift = this.yshift / 1.1;
this.rdist = this.imaginary._rotation - this._rotation;
this._rotation = this._rotation + (this.rdist / 10);
this.movecount = this.movecount + random(5);
if ((this.movecount > 15) && (this.fireman == true)) {
this.fireman = false;
this.firecount = this.firecount + (random(5) + random((this._yscale - 100) / 5));
if (this.firecount > 100) {
eval ("_root.radar.blip" + this.myid).eb.warner.gotoAndPlay(2);
if (this.facedir == 1) {
makeeffect("shockwave", this.xpos + ((Math.sin((Math.PI/180) * (this._rotation - 90)) * 25) * (this._xscale / 100)), this.ypos + ((Math.cos((Math.PI/180) * (this._rotation - 90)) * 25) * (this._xscale / 100)), this._rotation + 180);
} else {
makeeffect("shockwave", this.xpos + ((Math.sin((Math.PI/180) * (this._rotation - 90)) * 25) * (this._xscale / 100)), this.ypos + ((Math.cos((Math.PI/180) * (this._rotation - 90)) * 25) * (this._xscale / 100)), this._rotation);
}
playsound("launchfire");
attachMovie("fireball", "enbullet" + enproj, enproj + 1000);
eval ("enbullet" + enproj).xpos = this.xpos + ((Math.sin((Math.PI/180) * (this._rotation - 90)) * 26) * (this._xscale / 100));
eval ("enbullet" + enproj)._x = eval ("enbullet" + enproj).xpos;
eval ("enbullet" + enproj).ypos = this.ypos + ((Math.cos((Math.PI/180) * (this._rotation - 90)) * 26) * (this._xscale / 100));
eval ("enbullet" + enproj)._y = eval ("enbullet" + enproj).ypos;
eval ("enbullet" + enproj).facedir = this.facedir;
eval ("enbullet" + enproj)._rotation = this._rotation;
eval ("enbullet" + enproj)._xscale = -this._xscale;
eval ("enbullet" + enproj)._yscale = this._yscale;
eval ("enbullet" + enproj).hitsleft = 1 + ((this._yscale - 100) / 25);
eval ("enbullet" + enproj).popaway = function () {
makeeffect("splode", this.xpos, this.ypos, this._rotation, 0, 0, 0, 0, this._yscale * 0.75);
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, (this._yscale * 0.1) + (this._yscale * 0.9));
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, (this._yscale * 0.1) + (this._yscale * 0.9));
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, (this._yscale * 0.1) + (this._yscale * 0.9));
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, (this._yscale * 0.1) + (this._yscale * 0.9));
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, (this._yscale * 0.1) + (this._yscale * 0.9));
playsound("lilbang");
shake(2);
};
eval ("enbullet" + enproj).explode = function () {
makeeffect("splode", this.xpos, this.ypos, this._rotation, 0, 0, 0, 0, this._yscale * 0.75);
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, (this._yscale * 0.1) + (this._yscale * 0.9));
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, (this._yscale * 0.1) + (this._yscale * 0.9));
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, (this._yscale * 0.1) + (this._yscale * 0.9));
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, (this._yscale * 0.1) + (this._yscale * 0.9));
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, (this._yscale * 0.1) + (this._yscale * 0.9));
playsound("lilbang");
shake(10);
};
eval ("enbullet" + enproj).onEnterFrame = function () {
if (_root._currentframe != gameframe) {
removeMovieClip(this);
}
this._x = this.xpos + xcam;
this._y = this.ypos + ycam;
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (spacstat == "now")) {
this.hitsleft--;
makeeffect("forcehit", wizard.xpos + (Math.sin((Math.PI/180) * (wizard.arm._rotation + 90)) * handfurther), (wizard.ypos - 60) - (Math.cos((Math.PI/180) * (wizard.arm._rotation + 90)) * handfurther), wizard.arm._rotation);
makeeffect("forcehit", _root._xmouse - xcam, _root._ymouse - ycam, 0, 0, 0, 0, 0, 100);
playsound("forcepop");
if (this.hitsleft <= 0) {
this.popaway();
removeMovieClip(this);
}
}
if (this.facedir == -1) {
this.xpos = this.xpos + (Math.sin((Math.PI/180) * (this._rotation + 90)) * 7);
this.ypos = this.ypos - (Math.cos((Math.PI/180) * (this._rotation + 90)) * 7);
} else {
this.xpos = this.xpos + (Math.sin((Math.PI/180) * (this._rotation - 90)) * 7);
this.ypos = this.ypos - (Math.cos((Math.PI/180) * (this._rotation - 90)) * 7);
}
if (this.ypos > 460) {
this.explode();
this.removeMovieClip();
} else if (((this.ypos < -400) || (this.xpos > 1300)) || (this.xpos < -700)) {
this.removeMovieClip();
} else if (_root.tower.hitTest(this._x, this._y, true)) {
this.explode();
towerhealth = towerhealth - ((this._yscale - 25) * 2);
this.removeMovieClip();
}
};
enproj++;
this.firecount = 0;
}
}
if (this.movecount > 30) {
this.fireman = true;
this.movecount = 0;
if (this.facedir == -1) {
this.ydist = this.ypos - wizard.ypos;
this.yshift = (random((-this.ydist) / 30) - ((-this.ydist) / 90)) - random(3);
this.xdist = this.xpos - (wizard.xpos - 50);
this.xshift = ((random((-this.xdist) / 30) - 3) + random(11)) - 5;
this.dist = Math.sqrt((this.xdist * this.xdist) + (this.ydist * this.ydist));
if (this.ydist < 0) {
this.angle = (Math.PI*2) - Math.acos(this.xdist / this.dist);
} else {
this.angle = Math.acos(this.xdist / this.dist);
}
this.imaginary._rotation = ((((this.angle * 180) / Math.PI) + 180) - 10) + random(20);
}
if (this.facedir == 1) {
this.ydist = this.ypos - wizard.ypos;
this.yshift = (random((-this.ydist) / 30) - ((-this.ydist) / 90)) - random(3);
this.xdist = (wizard.xpos + 50) - this.xpos;
this.xshift = (((-random((-this.xdist) / 30)) + 3) + random(11)) - 5;
this.dist = Math.sqrt((this.xdist * this.xdist) + (this.ydist * this.ydist));
if (this.ydist < 0) {
this.angle = (Math.PI*2) - Math.acos(this.xdist / this.dist);
} else {
this.angle = Math.acos(this.xdist / this.dist);
}
this.imaginary._rotation = (((((-this.angle) * 180) / Math.PI) + 180) - 10) + random(20);
}
}
this._x = this.xpos + xcam;
this._y = this.ypos + ycam;
eval ("_root.radar.blip" + this.myid)._x = (this.xpos - 225) / 10;
eval ("_root.radar.blip" + this.myid)._y = (this.ypos - 170) / 10;
if (this.hitTest(proj1._x, proj1._y, true) && (proj1._visible)) {
this.hitfromx = proj1.xshift;
this.hitfromy = proj1.yshift;
proj1.explode();
removeMovieClip(proj1);
this.health = this.health - 10;
} else if (this.hitTest(proj2._x, proj2._y, true) && (proj2._visible)) {
this.hitfromx = proj2.xshift;
this.hitfromy = proj2.yshift;
proj2.explode();
removeMovieClip(proj2);
this.health = this.health - 10;
} else if (this.hitTest(proj3._x, proj3._y, true) && (proj3._visible)) {
this.hitfromx = proj3.xshift;
this.hitfromy = proj3.yshift;
proj3.explode();
removeMovieClip(proj3);
this.health = this.health - 10;
} else if (this.hitTest(proj4._x, proj4._y, true) && (proj4._visible)) {
this.hitfromx = proj4.xshift;
this.hitfromy = proj4.yshift;
proj4.explode();
removeMovieClip(proj4);
this.health = this.health - 10;
} else if (this.hitTest(proj0._x, proj0._y, true) && (proj0._visible)) {
this.hitfromx = proj0.xshift;
this.hitfromy = proj0.yshift;
proj0.explode();
removeMovieClip(proj0);
this.health = this.health - 10;
}
};
}
if (breed == "orc") {
temprandom = random(2);
if (temprandom == 1) {
eval ("enemy" + e).xpos = 850;
eval ("enemy" + e).facedir = 1;
} else {
eval ("enemy" + e).xpos = -395;
eval ("enemy" + e).facedir = -1;
}
eval ("enemy" + e).ypos = 440;
eval ("enemy" + e)._xscale = eval ("enemy" + e).facedir * 90;
eval ("enemy" + e)._yscale = 90;
eval ("enemy" + e).onEnterFrame = function () {
if ((this.xpos > 140) && (this.xpos < 310)) {
if (this._currentframe < 43) {
this.gotoAndPlay(43);
}
} else {
this.xpos = this.xpos - (this.facedir * 3);
}
this._x = this.xpos + xcam;
this._y = this.ypos + ycam;
if (this.hitTest(proj1._x, proj1._y, true) && (proj1._visible)) {
proj1.explode();
removeMovieClip(proj1);
removeMovieClip(this);
} else if (this.hitTest(proj2._x, proj2._y, true) && (proj2._visible)) {
proj2.explode();
removeMovieClip(proj2);
removeMovieClip(this);
} else if (this.hitTest(proj3._x, proj3._y, true) && (proj3._visible)) {
proj3.explode();
removeMovieClip(proj3);
removeMovieClip(this);
} else if (this.hitTest(proj4._x, proj4._y, true) && (proj4._visible)) {
proj4.explode();
removeMovieClip(proj4);
removeMovieClip(this);
} else if (this.hitTest(proj0._x, proj0._y, true) && (proj0._visible)) {
proj0.explode();
removeMovieClip(proj0);
removeMovieClip(this);
}
};
}
};
this.makeeffect = function (pic, xps, yps, rot, ashift, xshift, yshift, rshift, scale) {
if (current >= 100) {
current = 0;
}
attachMovie(pic, "effect" + current, current + 80000);
eval ("effect" + current)._xscale = scale;
eval ("effect" + current)._yscale = scale;
eval ("effect" + current).xpos = xps;
eval ("effect" + current).ypos = yps;
if (ashift == undefined) {
ashift = 0;
}
eval ("effect" + current).ashift = ashift;
if (xshift == undefined) {
xshift = 0;
}
eval ("effect" + current).xshift = xshift;
if (yshift == undefined) {
yshift = 0;
}
eval ("effect" + current).yshift = yshift;
if (rshift == undefined) {
rshift = 0;
}
eval ("effect" + current).rshift = rshift;
eval ("effect" + current)._x = xps + xcam;
eval ("effect" + current)._y = yps + ycam;
eval ("effect" + current)._rotation = rot;
eval ("effect" + current).onEnterFrame = function () {
this.xpos = this.xpos + Number(this.xshift);
this.ypos = this.ypos + Number(this.yshift);
this._x = this.xpos + xcam;
this._y = this.ypos + ycam;
this._alpha = this._alpha - Number(this.ashift);
this._rotation = this._rotation - Number(this.rshift);
};
current++;
};
this.onEnterFrame = function () {
currentvel = currentvel / 1.1;
lookshock = lookshock / 1.05;
xcam = (225 - _xmouse) + (random(currentvel * 2) - currentvel);
ycam = ((175 - _ymouse) + (random(currentvel * 2) - currentvel)) + (lookshock * 5);
if (cooldown < 100) {
if ((cooldown + buildspeed) >= 100) {
cooldown = 100;
cooldowncounter.percent._xscale = 100;
} else {
cooldown = cooldown + buildspeed;
cooldowncounter.percent._xscale = cooldown;
}
}
if (enemylist.length > 0) {
cel++;
if (eval ("enemy" + String(enemylist[cel]))._visible == undefined) {
enemylist.splice(cel, 1);
}
if (cel >= (enemylist.length - 1)) {
cel = -1;
}
}
if (Key.isDown(32) && (spacstat == "free")) {
spacstat = "now";
} else if (Key.isDown(32) && (spacstat == "now")) {
spacstat = "down";
} else if (!Key.isDown(32)) {
spacstat = "free";
}
if (_currentframe == gameframe) {
mil = mil + 3;
if (mil >= 100) {
mil = mil - 100;
makedrag++;
if (makedrag > 4) {
makedrag = 0;
makeenemy("dragonpup");
}
sec++;
if (sec >= 60) {
sec = 0;
min++;
if (min >= 60) {
min = 0;
hour++;
}
if (min < 10) {
mind = "0" + min;
} else {
mind = String(min);
}
}
if (sec < 10) {
secd = "0" + sec;
} else {
secd = String(sec);
}
}
if (mil < 10) {
mild = "0" + mil;
} else {
mild = String(mil);
}
timedisplay = (((((hour + ":") + mind) + ":") + secd) + ":") + mild;
}
pdsize++;
if (pdsize > 100) {
dragonsize++;
pdsize = 0;
}
};
this.onMouseUp = function () {
holdown = false;
};
this.onMouseDown = function () {
holdown = true;
temprand = random(60) + 20;
if ((((cooldown >= 100) && (!((wizard.arm._rotation > 32) && (wizard.arm._rotation < 137)))) && (_root._currentframe == gameframe)) && (currentspell == 2)) {
firecheck = 5;
if (num == 5) {
num = 0;
}
while (firecheck > 0) {
if (eval ("proj" + num)._visible == undefined) {
castspell(currentspell);
cooldown = 0;
firecheck = 0;
num++;
} else {
firecheck--;
}
}
}
};
this.castspell = function (curspell) {
if (curspell == 1) {
attachMovie("fireball", "proj" + num, num + 600);
playsound("fireballsound");
shake(2);
makeeffect("shockwave", wizard.xpos + (Math.sin((Math.PI/180) * (wizard.arm._rotation + 90)) * handfurther), (wizard.ypos - 60) - (Math.cos((Math.PI/180) * (wizard.arm._rotation + 90)) * handfurther), wizard.arm._rotation);
eval ("proj" + num).xpos = wizard.xpos + (Math.sin((Math.PI/180) * (wizard.arm._rotation + 90)) * handfurther);
eval ("proj" + num).ypos = (wizard.ypos - 60) - (Math.cos((Math.PI/180) * (wizard.arm._rotation + 90)) * handfurther);
eval ("proj" + num)._rotation = wizard.arm._rotation;
eval ("proj" + num).cycle = random(360) - 180;
eval ("proj" + num).explode = function () {
force(this.xpos, this.ypos, 10);
makeeffect("splode", this.xpos, this.ypos, this._rotation);
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, 10 + random(90));
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, 10 + random(90));
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, 10 + random(90));
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, 10 + random(90));
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, random(10) - 5, random(10) - 5, 0, 10 + random(90));
playsound("boom");
shake(20);
};
eval ("proj" + num).onEnterFrame = function () {
this.flam = this.flam + random(5);
if (this.flam >= 5) {
this.flam = 0;
makeeffect("flamdot", this.xpos, this.ypos, 90, 5, 0, random(3), 0, 30 + random(90));
}
this.xpos = this.xpos + (Math.sin((Math.PI/180) * (this._rotation + 90)) * 8);
this.ypos = this.ypos - (Math.cos((Math.PI/180) * (this._rotation + 90)) * 8);
this._x = this.xpos + this._parent.xcam;
this._y = this.ypos + this._parent.ycam;
if (this.ypos > 460) {
this.explode();
this.removeMovieClip();
} else if (((this.ypos < -400) || (this.xpos > 850)) || (this.xpos < -400)) {
this.removeMovieClip();
}
this.cycle = this.cycle + (18 + random(3));
if (this.cycle > 360) {
this.cycle = this.cycle - 360;
}
this._rotation = this._rotation + (Math.sin((Math.PI/180) * this.cycle) * 1.5);
};
}
if (((curspell == 2) && (_root._currentframe == gameframe)) && (!((wizard.arm._rotation > 32) && (wizard.arm._rotation < 137)))) {
attachMovie("spark", "proj" + num, num + 200);
playsound("sparkplay");
lookshocker(wizard.arm._rotation + 90, 5);
shake(1);
makeeffect("shockwave2", wizard.xpos + (Math.sin((Math.PI/180) * (wizard.arm._rotation + 90)) * handfurther), (wizard.ypos - 60) - (Math.cos((Math.PI/180) * (wizard.arm._rotation + 90)) * handfurther), wizard.arm._rotation);
temprand = random(60) + 20;
eval ("proj" + num).xpos = wizard.xpos + (Math.sin((Math.PI/180) * (wizard.arm._rotation + 90)) * handfurther);
eval ("proj" + num).ypos = (wizard.ypos - 60) - (Math.cos((Math.PI/180) * (wizard.arm._rotation + 90)) * handfurther);
eval ("proj" + num)._x = (wizard.xpos + (Math.sin((Math.PI/180) * (wizard.arm._rotation + 90)) * handfurther)) + xcam;
eval ("proj" + num)._y = ((wizard.ypos - 60) - (Math.cos((Math.PI/180) * (wizard.arm._rotation + 90)) * handfurther)) + ycam;
eval ("proj" + num)._rotation = wizard.arm._rotation;
eval ("proj" + num).cycle = random(360) - 180;
eval ("proj" + num).explode = function () {
shake(5);
makeeffect("sparksplode", (this.xpos - 10) + random(5), (this.ypos - 10) + random(5), this._rotation);
makeeffect("twinkle", this.xpos, this.ypos, random(360), 10, random(7) - 3, random(7) - 3, -10 + random(20), 10 + random(90));
makeeffect("twinkle", this.xpos, this.ypos, random(360), 10, random(7) - 3, random(7) - 3, -10 + random(20), 10 + random(90));
makeeffect("twinkle", this.xpos, this.ypos, random(360), 10, random(7) - 3, random(7) - 3, -10 + random(20), 10 + random(90));
makeeffect("twinkle", this.xpos, this.ypos, random(360), 10, random(7) - 3, random(7) - 3, -10 + random(20), 10 + random(90));
makeeffect("twinkle", this.xpos, this.ypos, random(360), 10, random(7) - 3, random(7) - 3, -10 + random(20), 10 + random(90));
playsound("sparkpop");
};
eval ("proj" + num).onEnterFrame = function () {
this.twink = this.twink + random(5);
if (this.twink >= 5) {
this.twink = 0;
makeeffect("twinkle", this.xpos, this.ypos, random(360), 10, 0, random(3), -10 + random(20), 10 + random(90));
}
this.xpos = this.xpos + (Math.sin((Math.PI/180) * (this._rotation + 90)) * 16);
this.xshift = Math.sin((Math.PI/180) * (this._rotation + 90)) * 16;
this.ypos = this.ypos - (Math.cos((Math.PI/180) * (this._rotation + 90)) * 16);
this.yshift = (-Math.cos((Math.PI/180) * (this._rotation + 90))) * 16;
this._x = this.xpos + this._parent.xcam;
this._y = this.ypos + this._parent.ycam;
if ((((this.ypos < -400) || (this.xpos > 850)) || (this.xpos < -400)) || (this.ypos > 600)) {
this.removeMovieClip();
}
this.cycle = this.cycle + (18 + random(3));
if (this.cycle > 360) {
this.cycle = this.cycle - 360;
}
this._rotation = this._rotation + (Math.sin((Math.PI/180) * this.cycle) * 1.5);
};
}
};
Instance of Symbol 175 MovieClip in Frame 5
onClipEvent (load) {
xpos = _x;
ypos = _y;
_x = (xpos + (_parent.xcam / 2));
_y = (ypos + (_parent.ycam / 2));
}
onClipEvent (enterFrame) {
_x = (xpos + (_parent.xcam / 2));
_y = (ypos + (_parent.ycam / 2));
}
Instance of Symbol 196 MovieClip "wizard" in Frame 5
onClipEvent (load) {
swapDepths(50001);
xpos = _x;
ypos = _y;
trace("wizy " + ypos);
_x = (xpos + _parent.xcam);
_y = (ypos + _parent.ycam);
}
onClipEvent (enterFrame) {
if (((((_root.holdown == true) && (_root.cooldown >= 100)) && (_root.currentspell == 3)) && (_root._currentframe == _root.gameframe)) && (!((arm._rotation > 32) && (arm._rotation < 137)))) {
arm.gotoAndPlay(3);
_root.shake(1);
_root.lookshocker(arm._rotation + 90, 0.5);
_root.cooldown = 0;
_root.shooting();
}
_x = (xpos + _parent.xcam);
_y = (ypos + _parent.ycam);
if (_parent.towerhealth <= 0) {
if (starttofade == undefined) {
_root.towerhealthcounter._visible = false;
_root.cooldowncounter._visible = false;
_root.towerhealthlogo._visible = false;
_root.timeholder._visible = false;
_root.warner._visible = false;
_root.fadeobject.gotoAndPlay(50);
_root.playsound("rumble");
starttofade = true;
}
_parent.shake(10);
}
}
Instance of Symbol 198 MovieClip "tower" in Frame 5
onClipEvent (load) {
swapDepths(50002);
xpos = _x;
ypos = _y;
trace("castlex" + ypos);
_x = (xpos + _parent.xcam);
_y = (ypos + _parent.ycam);
}
onClipEvent (enterFrame) {
_x = (xpos + _parent.xcam);
_y = (ypos + _parent.ycam);
}
Instance of Symbol 202 MovieClip "cooldowncounter" in Frame 5
onClipEvent (load) {
swapDepths(60002);
}
Instance of Symbol 205 MovieClip "towerhealthcounter" in Frame 5
onClipEvent (load) {
swapDepths(60003);
}
Instance of Symbol 12 MovieClip [radarobj] "radar" in Frame 5
onClipEvent (load) {
swapDepths(60027);
}
Instance of Symbol 209 MovieClip "timeholder" in Frame 5
onClipEvent (load) {
swapDepths(60001);
}
Instance of Symbol 211 MovieClip "towerhealthlogo" in Frame 5
onClipEvent (load) {
swapDepths(60004);
}
Instance of Symbol 150 MovieClip "fadeobject" in Frame 5
onClipEvent (load) {
swapDepths(200000);
}
onClipEvent (enterFrame) {
swapDepths(200000);
vol = _root.soundobj.getVolume();
if ((_currentframe <= 50) && (vol < 100)) {
_root.soundobj.setVolume(vol + 2);
}
if (((_currentframe > 50) && (_currentframe < 99)) && (vol > 0)) {
_root.soundobj.setVolume(vol - 2);
}
}
Instance of Symbol 237 MovieClip in Frame 6
on (press) {
_root.gotoAndStop(1);
}
Frame 7
holdy.NAME0 = "OOOOOOOO";
holdy.NAME1 = "OOOOOOOO";
holdy.NAME2 = "OOOOOOOO";
holdy.NAME3 = "OOOOOOOO";
holdy.NAME4 = "OOOOOOOO";
holdy.NAME5 = "OOOOOOOO";
holdy.NAME6 = "OOOOOOOO";
holdy.NAME7 = "OOOOOOOO";
holdy.NAME8 = "OOOOOOOO";
holdy.NAME9 = "OOOOOOOO";
holdy.SCORE0 = "OOOOOOOO";
holdy.SCORE1 = "OOOOOOOO";
holdy.SCORE2 = "OOOOOOOO";
holdy.SCORE3 = "OOOOOOOO";
holdy.SCORE4 = "OOOOOOOO";
holdy.SCORE5 = "OOOOOOOO";
holdy.SCORE6 = "OOOOOOOO";
holdy.SCORE7 = "OOOOOOOO";
holdy.SCORE8 = "OOOOOOOO";
holdy.SCORE9 = "OOOOOOOO";
if (destsite == "gondor") {
holdy.loadVariables("../read.php", "GET");
}
but01.delay = false;
but01._alpha = 30;
Instance of Symbol 224 MovieClip "but01" in Frame 7
onClipEvent (enterFrame) {
if ((delay == false) && (selectabl == true)) {
delay = true;
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_alpha = 100;
this.useHandCursor = true;
}
}
}
on (rollOver) {
if (selectabl == true) {
_alpha = 100;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (selectabl == true) {
_alpha = 30;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (press) {
if (selectabl == true) {
_root.gotoframe = "splash";
gotoAndStop (2);
this.useHandCursor = false;
selectabl = false;
_root.faderer.gotoAndPlay(50);
}
}
Instance of Symbol 277 MovieClip "faderer" in Frame 7
onClipEvent (enterFrame) {
if ((_root.holdy.NAME1 != "OOOOOOOO") && (_currentframe == 1)) {
play();
}
}
Frame 8
but01.delay = false;
but01._alpha = 30;
Instance of Symbol 224 MovieClip "but01" in Frame 8
onClipEvent (enterFrame) {
if ((delay == false) && (selectabl == true)) {
delay = true;
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_alpha = 100;
this.useHandCursor = true;
}
}
}
on (rollOver) {
if (selectabl == true) {
_alpha = 100;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (selectabl == true) {
_alpha = 30;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (press) {
if (selectabl == true) {
_root.gotoframe = "splash";
gotoAndStop (2);
this.useHandCursor = false;
selectabl = false;
_root.fader.gotoAndPlay(50);
}
}
Instance of Symbol 288 MovieClip in Frame 9
onClipEvent (load) {
if (_root.effectsenabled == true) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
on (release) {
if (_currentframe == 1) {
_root.effectsenabled = false;
gotoAndStop (2);
} else {
_root.effectsenabled = true;
gotoAndStop (1);
}
}
Instance of Symbol 288 MovieClip in Frame 9
onClipEvent (load) {
if (_root.musicenabled == true) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
on (release) {
if (_currentframe == 1) {
_root.musicenabled = false;
gotoAndStop (2);
} else {
_root.musicenabled = true;
gotoAndStop (1);
}
}
Instance of Symbol 288 MovieClip in Frame 9
onClipEvent (load) {
if (_quality == "HIGH") {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
on (release) {
if (_currentframe == 1) {
_quality = "LOW";
gotoAndStop (2);
} else {
_quality = "HIGH";
gotoAndStop (1);
}
}
Instance of Symbol 293 MovieClip in Frame 9
on (release) {
if (_root.uzicheat == false) {
_root.uzicheat = true;
} else {
_root.uzicheat = false;
}
}
Symbol 4 MovieClip Frame 1
stop();
Instance of Symbol 4 MovieClip "warner" in Symbol 6 MovieClip Frame 1
onClipEvent (load) {
swapDepths(60011);
}
Symbol 7 MovieClip [eblip] Frame 44
stop();
Symbol 11 MovieClip Frame 7
gotoAndPlay (1);
Symbol 13 MovieClip Frame 5
if (_root._currentframe == 1) {
loaded = _root.getBytesLoaded();
upto = _root.getBytesTotal();
if (loaded == upto) {
_root.gotoAndStop(3);
} else if (_root._framesloaded >= 1) {
_root.gotoAndStop(2);
} else {
gotoAndPlay (1);
}
}
Symbol 21 MovieClip Frame 1
stop();
Symbol 44 MovieClip Frame 1
stop();
Symbol 44 MovieClip Frame 3
gotoAndPlay(random(10) + 7);
Symbol 44 MovieClip Frame 18
gotoAndPlay (3);
Symbol 54 MovieClip Frame 1
stop();
Symbol 57 MovieClip Frame 50
stop();
Symbol 57 MovieClip Frame 100
_root.gotoAndStop(_root._currentframe + 1);
Symbol 73 MovieClip Frame 1
stop();
Symbol 83 MovieClip [splode] Frame 11
removeMovieClip(this);
Symbol 86 MovieClip [sparksplode] Frame 10
removeMovieClip(this);
Symbol 91 MovieClip [forcehit] Frame 10
removeMovieClip(this);
Symbol 97 MovieClip [shockwave] Frame 9
removeMovieClip(this);
Symbol 103 MovieClip [shockwave2] Frame 9
removeMovieClip(this);
Symbol 118 MovieClip [flamdot] Frame 24
removeMovieClip(this);
Symbol 127 MovieClip [twinkle] Frame 11
removeMovieClip(this);
Symbol 146 MovieClip Frame 177
stop();
Instance of Symbol 146 MovieClip in Symbol 149 MovieClip Frame 1
on (press) {
getURL ("http://www.gamesofgondor.com", "_blank");
}
Symbol 149 MovieClip Frame 210
_root.gotoAndStop(4);
Symbol 150 MovieClip Frame 50
stop();
Symbol 150 MovieClip Frame 100
removeMovieClip(_root.tower);
removeMovieClip(_root.wizard);
removeMovieClip(_root.towerhealthcounter);
removeMovieClip(_root.towerhealthlogo);
removeMovieClip(_root.timeholder);
removeMovieClip(_root.warner);
removeMovieClip(_root.cooldowncounter);
removeMovieClip(_root.radar);
_root.endscore = (_root.mil + (_root.sec * 100)) + (_root.min * 6000);
_root.killall();
trace("Exited");
stopAllSounds();
_root.soundobj.setVolume(100);
_root.gotoAndStop("gameover");
removeMovieClip(_root.fadeobject);
Symbol 159 MovieClip Frame 60
_root.buttween.but01.selectabl = true;
_root.buttween.but02.selectabl = true;
_root.buttween.but03.selectabl = true;
_root.buttween.but04.selectabl = true;
Symbol 159 MovieClip Frame 91
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 163 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 60
stop();
Instance of Symbol 54 MovieClip "but01" in Symbol 166 MovieClip Frame 60
onClipEvent (load) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_alpha = 100;
this.useHandCursor = true;
} else {
_alpha = 30;
}
}
on (rollOver) {
if (selectabl == true) {
_alpha = 100;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (selectabl == true) {
_alpha = 30;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (press) {
if (selectabl == true) {
_root.gotoframe = "game";
gotoAndStop (2);
this.useHandCursor = false;
_root.disableall();
_root.fader.gotoAndPlay(50);
}
}
Instance of Symbol 161 MovieClip "but02" in Symbol 166 MovieClip Frame 60
onClipEvent (load) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_alpha = 100;
this.useHandCursor = true;
} else {
_alpha = 30;
}
}
on (rollOver) {
if (selectabl == true) {
_alpha = 100;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (selectabl == true) {
_alpha = 30;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (press) {
if (selectabl == true) {
_root.gotoframe = "help";
gotoAndStop (2);
this.useHandCursor = false;
_root.disableall();
_root.fader.gotoAndPlay(50);
}
}
Instance of Symbol 163 MovieClip "but03" in Symbol 166 MovieClip Frame 60
onClipEvent (load) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_alpha = 100;
this.useHandCursor = true;
} else {
_alpha = 30;
}
}
on (rollOver) {
if (selectabl == true) {
_alpha = 100;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (selectabl == true) {
_alpha = 30;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (press) {
if (selectabl == true) {
_root.gotoframe = "settings";
gotoAndStop (2);
this.useHandCursor = false;
_root.disableall();
_root.fader.gotoAndPlay(50);
}
}
Instance of Symbol 165 MovieClip "but04" in Symbol 166 MovieClip Frame 60
onClipEvent (load) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_alpha = 100;
this.useHandCursor = true;
} else {
_alpha = 30;
}
}
on (rollOver) {
if (selectabl == true) {
_alpha = 100;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (selectabl == true) {
_alpha = 30;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (press) {
if (selectabl == true) {
_root.gotoframe = "scores";
gotoAndStop (2);
this.useHandCursor = false;
_root.disableall();
_root.fader.gotoAndPlay(50);
}
}
Instance of Symbol 169 MovieClip in Symbol 171 MovieClip Frame 1
onClipEvent (load) {
_alpha = 20;
}
on (rollOver) {
_alpha = 100;
}
on (rollOut) {
_alpha = 20;
}
on (release) {
getURL ("http://www.gamesofgondor.com", "_blank");
}
Symbol 172 MovieClip Frame 50
stop();
Symbol 172 MovieClip Frame 100
_root.introplayer.stop("intromusic");
_root.introplayer.setVolume(100);
_root.gotoAndStop(_root.gotoframe);
Symbol 175 MovieClip Frame 1
stop();
Symbol 185 MovieClip Frame 1
stop();
Instance of Symbol 182 MovieClip "beard1" in Symbol 186 MovieClip Frame 1
onClipEvent (load) {
repair = function () {
if (_parent._yscale == -100) {
_rotation = ((_parent._rotation - 180) - 20);
} else {
_rotation = ((-_parent._rotation) - 20);
}
};
}
onClipEvent (enterFrame) {
if (_parent._yscale == -100) {
_rotation = ((_parent._rotation - 180) - 20);
} else {
_rotation = ((-_parent._rotation) - 20);
}
}
Instance of Symbol 182 MovieClip "beard2" in Symbol 186 MovieClip Frame 1
onClipEvent (load) {
repair = function () {
if (_parent._yscale == -100) {
_rotation = ((_parent._rotation - 180) + 10);
} else {
_rotation = ((-_parent._rotation) + 10);
}
};
}
onClipEvent (enterFrame) {
if (_parent._yscale == -100) {
_rotation = ((_parent._rotation + 180) + 10);
} else {
_rotation = ((-_parent._rotation) + 10);
}
}
Symbol 195 MovieClip Frame 2
stop();
Symbol 195 MovieClip Frame 3
stop();
Symbol 195 MovieClip Frame 5
gotoAndStop (3);
Instance of Symbol 186 MovieClip "head" in Symbol 196 MovieClip Frame 1
onClipEvent (enterFrame) {
dx = _parent._x - _root._xmouse;
dy = (_parent._y - _root._ymouse) - 90;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dy < 0) {
angle = (Math.PI*2) - Math.acos(dx / dist);
} else {
angle = Math.acos(dx / dist);
}
this._rotation = ((angle * 180) / Math.PI) + 180;
if ((_rotation > -135) && (_rotation < -90)) {
_rotation = -134;
beard1.repair();
beard2.repair();
} else if ((_rotation < -45) && (_rotation >= -90)) {
_rotation = -46;
beard1.repair();
beard2.repair();
} else if ((_rotation > 60) && (_rotation <= 90)) {
_rotation = 60;
beard1.repair();
beard2.repair();
} else if ((_rotation < 120) && (_rotation > 90)) {
_rotation = 120;
beard1.repair();
beard2.repair();
}
}
Instance of Symbol 195 MovieClip "arm" in Symbol 196 MovieClip Frame 1
onClipEvent (enterFrame) {
dx = _parent._x - _root._xmouse;
dy = (_parent._y - _root._ymouse) - 63;
dist = Math.sqrt((dx * dx) + (dy * dy));
if (dy < 0) {
angle = (Math.PI*2) - Math.acos(dx / dist);
} else {
angle = Math.acos(dx / dist);
}
this._rotation = ((angle * 180) / Math.PI) + 180;
_root.radar.playerblip._rotation = this._rotation;
if ((this._rotation < 90) && (this._rotation > -90)) {
_yscale = 100;
_parent.head._yscale = 100;
_parent.torso._xscale = 100;
} else {
_yscale = -100;
_parent.head._yscale = -100;
_parent.torso._xscale = -100;
}
}
Instance of Symbol 204 MovieClip "percent" in Symbol 205 MovieClip Frame 1
onClipEvent (enterFrame) {
this._xscale = _parent._parent.towerhealth / 10;
}
Symbol 222 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 1
stop();
Symbol 231 MovieClip Frame 1
stop();
Instance of Symbol 222 MovieClip "but01" in Symbol 231 MovieClip Frame 1
onClipEvent (load) {
checkchars = function () {
i = 0;
valid = true;
while (i < _parent.nameinput.length) {
if ((((_parent.nameinput.charCodeAt(i) >= 97) && (_parent.nameinput.charCodeAt(i) <= 122)) || ((_parent.nameinput.charCodeAt(i) >= 65) && (_parent.nameinput.charCodeAt(i) <= 90))) || ((_parent.nameinput.charCodeAt(i) >= 48) && (_parent.nameinput.charCodeAt(i) <= 57))) {
} else {
valid = false;
}
i++;
}
if (valid == false) {
return(false);
}
return(true);
};
}
onClipEvent (enterFrame) {
if ((delay == false) && (selectabl == true)) {
delay = true;
_alpha = 30;
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_alpha = 100;
this.useHandCursor = true;
}
}
}
on (rollOver) {
if (selectabl == true) {
_alpha = 100;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (selectabl == true) {
_alpha = 30;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (press) {
if (selectabl == true) {
if ((((checkchars() == true) && (_parent.nameinput != "")) && (_parent.nameinput != " ")) && (_parent.nameinput != undefined)) {
trace((">" + _parent.nameinput) + "<");
gotoAndStop (2);
_parent.gotoAndStop(2);
this.useHandCursor = false;
selectabl = false;
_parent.holdy.winscore = _root.endscore;
_parent.holdy.winname = _parent.nameinput;
if (_root.uzicheat == false) {
_parent.holdy.loadVariables("../write.php", "GET");
}
}
}
}
Instance of Symbol 224 MovieClip "but02" in Symbol 231 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((delay == false) && (selectabl == true)) {
delay = true;
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_alpha = 100;
this.useHandCursor = true;
}
}
}
on (rollOver) {
if (selectabl == true) {
_alpha = 100;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (selectabl == true) {
_alpha = 30;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (press) {
if (selectabl == true) {
gotoAndStop (2);
this.useHandCursor = false;
selectabl = false;
_root.destin = "splash";
_parent._parent.gotoAndPlay(126);
}
}
Instance of Symbol 226 MovieClip "holdy" in Symbol 231 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 230 MovieClip in Symbol 231 MovieClip Frame 2
onClipEvent (enterFrame) {
if (_parent.holdy.recieved == "okay") {
_root.destin = "scores";
trace("score recieved");
_root.zoombox.gotoAndPlay(126);
}
}
Symbol 234 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 1
_root.myscore = "SCORE: " + _root.endscore;
recscore = undefined;
Symbol 235 MovieClip Frame 99
submitter.but01.selectabl = false;
submitter.but01._alpha = 30;
submitter.but02.selectabl = false;
submitter.but02._alpha = 30;
Symbol 235 MovieClip Frame 125
stop();
if ((_root.uzicheat == false) && (_root.destsite == "gondor")) {
submitter.but01.selectabl = true;
submitter.but01._alpha = 30;
}
submitter.but02.selectabl = true;
submitter.but02._alpha = 30;
Instance of Symbol 234 MovieClip in Symbol 235 MovieClip Frame 125
onClipEvent (load) {
if (_root.uzicheat == true) {
gotoAndStop (2);
}
if (_root.destsite == "newgrounds") {
gotoAndStop (3);
}
}
Symbol 235 MovieClip Frame 143
_root.gotoAndStop(_root.destin);
Symbol 274 MovieClip Frame 5
gotoAndPlay (1);
Symbol 274 MovieClip Frame 6
stop();
Symbol 277 MovieClip Frame 1
stop();
if (_root.destsite == "newgrounds") {
texty.gotoAndStop(6);
}
Instance of Symbol 276 MovieClip in Symbol 277 MovieClip Frame 1
on (release) {
_root.gotoAndStop(4);
}
Symbol 277 MovieClip Frame 50
stop();
_root.but01.selectabl = true;
Symbol 277 MovieClip Frame 100
_root.gotoAndStop("splash");
Symbol 280 MovieClip Frame 50
stop();
_root.but01.selectabl = true;
Symbol 280 MovieClip Frame 100
_root.gotoAndStop("splash");