Frame 1
stop();
Stage.showMenu = false;
Frame 2
function SaveAllData() {
_root.Lunatic.data.dataExists = _root.dataExists;
_root.Lunatic.data.highest = _root.highest;
_root.Lunatic.flush();
}
function declareAllData() {
_root.dataExists = true;
_root.highest = 0;
}
function loadAllData() {
_root.highest = _root.Lunatic.data.highest;
}
stop();
clearAll();
onEnterFrame = null;
_root.Lunatic = SharedObject.getLocal("lunatic");
_root.dataExists = _root.Lunatic.data.dataExists;
if (dataExists != true) {
declareAllData();
} else {
loadAllData();
}
Frame 3
function makeBullet(x, y, speed, rotation, spin, timer, trail) {
_root.score++;
_root.attachMovie("bullet", "bullet" + bulletCounter, bulletCounter);
_root["bullet" + bulletCounter]._x = x;
_root["bullet" + bulletCounter]._y = y;
_root["bullet" + bulletCounter].speed = speed;
_root["bullet" + bulletCounter].rotation = rotation;
_root["bullet" + bulletCounter].spin = spin;
_root["bullet" + bulletCounter].timer = int(timer);
_root["bullet" + bulletCounter].trail = int(trail);
bulletCounter++;
if (bulletCounter > 5000) {
bulletCounter = 1000;
}
}
function randSplode(x, y) {
times = random(60) + 20;
trail = random(20);
if (trail <= 5) {
trail = 0;
}
timer = random(100);
if (timer < 10) {
timer = 0;
}
spin = random(10);
speed = random(5) + 1;
i = 0;
while (i <= 360) {
makeBullet(x, y, speed, i, spin, timer, trail);
i = i + times;
}
}
function clearAll() {
_root.SaveAllData();
score = 0;
xScore = 0;
i = 1000;
while (i <= bulletCounter) {
_root["bullet" + i].removeMovieClip();
i++;
}
}
trailCounter = 10000;
bulletCounter = 1000;
score = 0;
xScore = 0;
time = 0;
_quality = "Medium";
onEnterFrame = function () {
if (xScore < score) {
xScore++;
}
if (xScore > highest) {
highest = xScore;
}
if (random(40) == 0) {
_root.attachMovie("hotSpot", "bullet" + bulletCounter, bulletCounter);
_root["bullet" + bulletCounter]._x = x;
_root["bullet" + bulletCounter]._y = y;
bulletCounter++;
}
};
Instance of Symbol 85 MovieClip in Frame 3
//component parameters
onClipEvent (initialize) {
songName = "loop";
songPieces = 2;
songTimeline = [];
songTimeline[0] = 1;
songTimeline[1] = 1;
songTimeline[2] = 2;
songTimeline[3] = 2;
songTimeline[4] = 3;
songTimeline[5] = 3;
}
Symbol 5 MovieClip [musicFadeOut] Frame 1
_visible = false;
onEnterFrame = function () {
if (Mus.getVolume() > 0) {
Mus.setVolume(Mus.getVolume() - 10);
} else {
Mus.stop(songName);
Mus.setVolume(100);
this.removeMovieClip();
}
};
Symbol 7 MovieClip [trail] Frame 1
_alpha = 50;
onEnterFrame = function () {
_alpha = (_alpha - 5);
if (_alpha <= 0) {
this.removeMovieClip();
}
};
Symbol 8 MovieClip [bullet] Frame 1
oTimer = timer;
oTrail = trail;
life = 400;
onEnterFrame = function () {
if (trail > 0) {
trail--;
if (trail == 1) {
_root.attachMovie("trail", "trail" + _root.trailCounter, _root.trailCounter);
_root["trail" + _root.trailCounter]._x = this._x;
_root["trail" + _root.trailCounter]._y = this._y;
_root["trail" + _root.trailCounter]._rotation = this._rotation;
_root.trailCounter++;
trail = oTrail;
}
}
if (timer > 0) {
timer--;
if (timer == 1) {
spin = spin * -1;
timer = oTimer;
}
}
rotation = rotation + spin;
_rotation = (-rotation);
if (rotation > 360) {
rotation = rotation - 360;
} else if (rotation < 0) {
rotation = rotation + 360;
}
_x = (_x + (Math.cos((rotation * Math.PI) / 180) * speed));
_y = (_y - (Math.sin((rotation * Math.PI) / 180) * speed));
life--;
if (((((_x < -20) || (_x > 420)) || (_y < -20)) || (_y > 320)) || (life <= 0)) {
this.removeMovieClip();
}
if (this.hitTest(_root.cross._x, _root.cross._y, true)) {
_root.death._alpha = 1000;
_root.clearAll();
}
};
this.onUnload = function () {
_root.attachMovie("trail", "trail" + _root.trailCounter, _root.trailCounter);
_root["trail" + _root.trailCounter]._x = this._x;
_root["trail" + _root.trailCounter]._y = this._y;
_root["trail" + _root.trailCounter]._rotation = this._rotation;
_root.trailCounter++;
};
Symbol 13 MovieClip [hotSpot] Frame 1
_x = random(400);
_y = random(300);
Symbol 13 MovieClip [hotSpot] Frame 35
iStart = _root.bulletCounter;
_root.randSplode(_x, _y);
if (random(2) == 0) {
_root.randSplode(_x, _y);
}
iStop = _root.bulletCounter;
Symbol 13 MovieClip [hotSpot] Frame 48
this.onRollOver = function () {
onRollOver = null;
i = iStart;
while (i < iStop) {
_root["bullet" + i].removeMovieClip();
i++;
}
_root.score = _root.score + 10;
_alpha = 75;
onEnterFrame = function () {
_alpha = (_alpha-1);
_alpha = (_alpha * 0.85);
_xscale = (_xscale * 1.15);
_yscale = (_yscale * 1.15);
if (_alpha <= 1) {
this.removeMovieClip();
}
};
};
Symbol 25 MovieClip Frame 1
stop();
onEnterFrame = function () {
if ((_root.score / 2) > this._currentframe) {
this.nextFrame();
} else if (_root.score == 0) {
this.gotoAndStop(int(this._currentframe * 0.9));
}
};
Symbol 33 Button
on (release) {
_root.nextFrame();
}
Symbol 37 MovieClip Frame 1
_alpha = 0;
onEnterFrame = function () {
_alpha = (_alpha + 10);
};
Symbol 39 Button
on (press) {
getURL ("http://www.gamesofgondor.com", "_blank");
}
Symbol 43 MovieClip Frame 1
lastX = _x;
lastY = _y;
onEnterFrame = function () {
if ((((_x < -10) || (_x > 410)) || (_y < -10)) || (_y > 310)) {
_root.cheater._alpha = 100;
_root.clearAll();
}
Mouse.hide();
_x = (_x + ((_parent._xmouse - _x) * 0.75));
_y = (_y + ((_parent._ymouse - _y) * 0.75));
ring._x = (lastX - _x) / 2;
ring._y = (lastY - _y) / 2;
ring2._x = (lastX - _x) / 5;
ring2._y = (lastY - _y) / 5;
ring._alpha = ring._alpha + ((Math.abs((lastX - _x) + ((lastY - _y) * 5)) - ring._alpha) * 0.25);
ring._xscale = (ring._alpha / 3) + 80;
ring._yscale = ring._xscale;
ring2._alpha = ring2._alpha + ((Math.abs((lastX - _x) + ((lastY - _y) * 10)) - ring2._alpha) * 0.75);
lastX = _x;
lastY = _y;
};
Symbol 75 Button
on (release) {
_root.gotoAndStop(3);
}
Symbol 80 MovieClip Frame 1
_alpha = 0;
onEnterFrame = function () {
if (_alpha > 0) {
_alpha = (_alpha * 0.8);
}
};
Symbol 84 Button
on (release) {
_root.gotoAndStop(2);
}
Symbol 85 MovieClip Frame 1
_visible = false;
if ((!songTimeline.length) > 0) {
songTimeline = new Array();
i = 0;
while (i < (songPieces * 8)) {
songTimeline[i] = int(i / 8) + 1;
i++;
}
}
currentTrack = -1;
currentSound = 1;
music1 = new Sound();
music2 = new Sound();
onEnterFrame = function () {
if ((music1.getVolume() == 100) && (this["music" + currentSound].position > (this["music" + currentSound].duration - 30))) {
this["music" + currentSound].stop();
currentTrack++;
if (currentTrack >= songTimeline.length) {
currentTrack = 0;
}
currentSound++;
if (currentSound > 2) {
currentSound = 1;
}
this["music" + currentSound].attachSound(songName + songTimeline[currentTrack]);
this["music" + currentSound].start(0, 0);
}
};
this.onUnload = function () {
_root.attachMovie("musicFadeOut", "fadeOutMusic", 999999);
_root.fadeOutMusic.Mus = new Sound();
_root.fadeOutMusic.Mus.attachSound(this.songName + this.songTimeline[this.currentTrack]);
_root.fadeOutMusic.Mus.setVolume(100);
_root.fadeOutMusic.songName = this.songName + this.songTimeline[this.currentTrack];
this.pos = this["music" + this.currentSound].position;
this["music" + currentSound].stop(songName + songTimeline[currentTrack]);
_root.fadeOutMusic.Mus.start(this.pos / 1000, 0);
};
Symbol 87 MovieClip Frame 1
_alpha = 0;
onEnterFrame = function () {
if (_alpha > 0) {
_alpha = (_alpha * 0.9);
}
};
Symbol 98 Button
on (press) {
getURL ("http://www.gamesofgondor.com", "_blank");
}