Frame 1
stop();
Stage.showMenu = false;
Frame 2
function SaveAllData() {
var _local1 = _root;
_local1.Lunatic.data.dataExists = _local1.dataExists;
_local1.Lunatic.data.highest = _local1.highest;
_local1.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) {
var _local1 = _root;
_local1.score++;
_local1.attachMovie("bullet", "bullet" + bulletCounter, bulletCounter);
_local1["bullet" + bulletCounter]._x = x;
_local1["bullet" + bulletCounter]._y = y;
_local1["bullet" + bulletCounter].speed = speed;
_local1["bullet" + bulletCounter].rotation = rotation;
_local1["bullet" + bulletCounter].spin = spin;
_local1["bullet" + bulletCounter].timer = int(timer);
_local1["bullet" + bulletCounter].trail = int(trail);
bulletCounter++;
if (bulletCounter > 5000) {
bulletCounter = 1000;
}
}
function randSplode(x, y) {
var _local1 = y;
var _local2 = x;
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(_local2, _local1, speed, i, spin, timer, trail);
i = i + times;
}
}
function clearAll() {
var _local1 = _root;
_local1.SaveAllData();
score = 0;
xScore = 0;
i = 1000;
while (i <= bulletCounter) {
_local1["bullet" + i].removeMovieClip();
i++;
}
}
trailCounter = 10000;
bulletCounter = 1000;
score = 0;
xScore = 0;
time = 0;
quality = "High";
onEnterFrame = function () {
var _local1 = _root;
_quality = quality;
if (xScore < score) {
xScore++;
}
if (xScore > highest) {
highest = xScore;
}
if (random(40) == 0) {
_local1.attachMovie("hotSpot", "bullet" + bulletCounter, bulletCounter);
_local1["bullet" + bulletCounter]._x = x;
_local1["bullet" + bulletCounter]._y = y;
bulletCounter++;
}
};
Instance of Symbol 68 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;
}
Instance of Symbol 77 MovieClip in Frame 3
on (release) {
if (_root.quality == "Low") {
_root.quality = "High";
} else if (_root.quality == "High") {
_root.quality = "Medium";
} else {
_root.quality = "Low";
}
}
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 () {
var _local1 = _root;
var _local2 = this;
if (trail > 0) {
trail--;
if (trail == 1) {
_local1.attachMovie("trail", "trail" + _local1.trailCounter, _local1.trailCounter);
_local1["trail" + _local1.trailCounter]._x = _local2._x;
_local1["trail" + _local1.trailCounter]._y = _local2._y;
_local1["trail" + _local1.trailCounter]._rotation = _local2._rotation;
_local1.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)) {
_local2.removeMovieClip();
}
if (_local2.hitTest(_local1.cross._x, _local1.cross._y, true)) {
_local1.death._alpha = 1000;
_local1.clearAll();
}
};
this.onUnload = function () {
var _local1 = _root;
var _local2 = this;
_local1.attachMovie("trail", "trail" + _local1.trailCounter, _local1.trailCounter);
_local1["trail" + _local1.trailCounter]._x = _local2._x;
_local1["trail" + _local1.trailCounter]._y = _local2._y;
_local1["trail" + _local1.trailCounter]._rotation = _local2._rotation;
_local1.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 () {
var _local1 = _root;
onRollOver = null;
i = iStart;
while (i < iStop) {
_local1["bullet" + i].removeMovieClip();
i++;
}
_local1.score = _local1.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 () {
var _local1 = this;
if ((_root.score / 2) > _local1._currentframe) {
_local1.nextFrame();
} else if (_root.score == 0) {
_local1.gotoAndStop(int(_local1._currentframe * 0.9));
}
};
Symbol 33 Button
on (release) {
_root.nextFrame();
}
Symbol 37 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 46 Button
on (press) {
getURL ("http://www.monkeyinthepants.com", "_blank");
}
Symbol 51 Button
on (press) {
getURL ("http://www.armorgames.com/index.html", "_blank");
}
Symbol 55 Button
on (release) {
_root.gotoAndStop(3);
}
Symbol 62 MovieClip Frame 1
_alpha = 0;
onEnterFrame = function () {
if (_alpha > 0) {
_alpha = (_alpha * 0.8);
}
};
Symbol 66 Button
on (release) {
_root.gotoAndStop(2);
}
Symbol 68 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 () {
var _local1 = this;
if ((music1.getVolume() == 100) && (_local1["music" + currentSound].position > (_local1["music" + currentSound].duration - 30))) {
_local1["music" + currentSound].stop();
currentTrack++;
if (currentTrack >= songTimeline.length) {
currentTrack = 0;
}
currentSound++;
if (currentSound > 2) {
currentSound = 1;
}
_local1["music" + currentSound].attachSound(songName + songTimeline[currentTrack]);
_local1["music" + currentSound].start(0, 0);
}
};
this.onUnload = function () {
var _local1 = this;
var _local2 = _root;
_local2.attachMovie("musicFadeOut", "fadeOutMusic", 999999);
_local2.fadeOutMusic.Mus = new Sound();
_local2.fadeOutMusic.Mus.attachSound(_local1.songName + _local1.songTimeline[_local1.currentTrack]);
_local2.fadeOutMusic.Mus.setVolume(100);
_local2.fadeOutMusic.songName = _local1.songName + _local1.songTimeline[_local1.currentTrack];
_local1.pos = _local1["music" + _local1.currentSound].position;
_local1["music" + currentSound].stop(songName + songTimeline[currentTrack]);
_local2.fadeOutMusic.Mus.start(_local1.pos / 1000, 0);
};
Symbol 70 MovieClip Frame 1
_alpha = 0;
onEnterFrame = function () {
if (_alpha > 0) {
_alpha = (_alpha * 0.9);
}
};