Frame 2
stop();
Frame 3
clown = false;
stop();
var bc = 1000;
totl = 40;
bcc = 1;
time = 0;
phealth = 0;
ehealth = 0;
bgSound = new Sound(this);
bgSound.attachSound("sound1");
onEnterFrame = function () {
if (ehealth > 200) {
gotoAndPlay (6);
}
if (phealth > 100) {
gotoAndStop (4);
}
if (ehealth == 100) {
ded._x = zom1._x;
ded._y = zom1._y;
ehealth = ehealth + 1;
}
if (ehealth > 100) {
clown = true;
zom1.gotoAndPlay(12);
g1.removeMovieClip();
}
time++;
if (time == 30) {
bcc++;
if (bcc > 100) {
bcc = 1;
}
duplicateMovieClip ("bl1", "bl" + bcc, bcc);
if (g1._y < 500) {
g1.gotoAndPlay(2);
}
time = 0;
}
};
_root.onMouseDown = function () {
bc++;
if (bc > 100) {
bc = 1;
}
duplicateMovieClip ("bullet", "b" + bc, bc);
_root.player.gotoAndPlay(2);
};
Instance of Symbol 98 MovieClip "ded" in Frame 3
onClipEvent (enterFrame) {
_y = (_y - 3);
_alpha = (_alpha - 1);
}
Instance of Symbol 132 MovieClip "p2" in Frame 3
onClipEvent (load) {
xvl = 0;
vl = 0;
ht = 0;
}
onClipEvent (enterFrame) {
if (_y < 240) {
vl = vl + 1;
}
if (240 < _y) {
_y = 240;
ht = 0;
}
_y = (_y + vl);
_x = (_x + xvl);
xvl = xvl * 0.95;
if (xvl > 0) {
_xscale = 100;
} else {
_xscale = -100;
}
if (_x > 500) {
xvl = -1;
}
if (_x < 50) {
xvl = xvl * -1;
}
if (Key.isDown(37)) {
xvl = xvl - 0.3;
}
if (Key.isDown(38)) {
if (ht == 0) {
vl = -14;
ht = 1;
}
}
if (Key.isDown(39)) {
xvl = xvl + 0.3;
}
}
Instance of Symbol 139 MovieClip "player" in Frame 3
onClipEvent (enterFrame) {
if (_rotation > 180) {
_xscale = -100;
}
_x = _root.p2._x;
_y = _root.p2._y;
Xd = _root._xmouse - _x;
Yd = _root._ymouse - _y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
updateAfterEvent();
}
Instance of Symbol 141 MovieClip "bullet" in Frame 3
onClipEvent (load) {
spd = 20;
_x = _root.player._x;
_y = _root.player._y;
_rotation = _root.player._rotation;
ebu = 1;
}
onClipEvent (enterFrame) {
if (_y > 400) {
this.removeMovieClip();
}
if (_y < 0) {
this.removeMovieClip();
}
if (_x > 550) {
this.removeMovieClip();
}
if (_x < 0) {
this.removeMovieClip();
}
if (_root.clo1.hitTest(this._x, this._y, true)) {
_root.clo1.gotoAndPlay(2);
_root.ehealth = _root.ehealth + 2;
}
if (_root.zom1.hitTest(this._x, this._y, true)) {
_root.zom1.gotoAndPlay(2);
_root.ehealth = _root.ehealth + 2;
}
if (_name == "bullet") {
_x = -1000;
} else if (_rotation > 180) {
_y = (_y + ((spd * Math.cos((Math.PI/180) * _rotation)) * 2));
_x = (_x - ((spd * Math.sin((Math.PI/180) * _rotation)) * 2));
} else {
_y = (_y - ((spd * Math.cos((Math.PI/180) * _rotation)) * 2));
_x = (_x + ((spd * Math.sin((Math.PI/180) * _rotation)) * 2));
}
if ((((_x > Stage.width) || (_x < 0)) || (_y < 0)) || (_y > Stage.height)) {
this.removeMovieClip();
}
if (this.hitTest(_root["enemyspawn" + a])) {
_root.enemywentboom.gotoAndPlay(2);
_root.attachMovie("enemyblowup", "enemyblowup" + ebu, this.swapDepths._root.getNextHighestDepth(), {_x:_root["enemyspawn" + a]._x, _y:_root["enemyspawn" + a]._y});
_root["enemyspawn" + a].swapDepths(_root.getNextHighestDepth());
_root["enemyspawn" + a].removeMovieClip();
this.getNextHighestDepth();
this.removeMovieClip();
}
}
Instance of Symbol 166 MovieClip "zom1" in Frame 3
onClipEvent (load) {
acc = 0;
}
onClipEvent (enterFrame) {
if (_root.clown == true) {
gotoAndPlay (12);
this.removeMovieClip();
_y = (_y + 10000);
}
if (_root.clown == false) {
if (_x > 500) {
acc = -1;
}
if (_x < 50) {
acc = 1;
}
if (acc > 0) {
_xscale = -100;
} else {
_xscale = 100;
}
if (_x > _root.player._x) {
acc = acc - 0.1;
_root.g1._xscale = -100;
} else {
acc = acc + 0.1;
_root.g1._xscale = 100;
}
_x = (_x + acc);
}
}
Instance of Symbol 174 MovieClip "g1" in Frame 3
onClipEvent (enterFrame) {
if (_rotation > 180) {
_xscale = -100;
} else {
_xscale = 100;
}
_x = _root.zom1._x;
_y = _root.zom1._y;
Xd = _root.p2._x - _x;
Yd = _root.p2._y - _y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
updateAfterEvent();
}
Instance of Symbol 175 MovieClip "bl1" in Frame 3
onClipEvent (load) {
spd = 10;
_x = _root.g1._x;
_y = _root.g1._y;
_rotation = _root.g1._rotation;
ebu = 1;
}
onClipEvent (enterFrame) {
if (_root.p2.hitTest(this._x, this._y, true)) {
_root.p2.gotoAndPlay(2);
_root.phealth = _root.phealth + 2;
}
if (_y > 400) {
_root.g1._x = _root.g1._x + (spd * Math.sin((Math.PI/180) * _rotation));
_root.g1.vel = _root.g1.vel - 40;
}
if (_name == "bullet") {
_x = -1000;
} else if (_rotation > 180) {
_y = (_y + ((spd * Math.cos((Math.PI/180) * _rotation)) * 2));
_x = (_x - ((spd * Math.sin((Math.PI/180) * _rotation)) * 2));
} else {
_y = (_y - ((spd * Math.cos((Math.PI/180) * _rotation)) * 2));
_x = (_x + ((spd * Math.sin((Math.PI/180) * _rotation)) * 2));
}
if ((((_x > Stage.width) || (_x < 0)) || (_y < 0)) || (_y > Stage.height)) {
this.removeMovieClip();
}
if (this.hitTest(_root["enemyspawn" + a])) {
_root.enemywentboom.gotoAndPlay(2);
_root.attachMovie("enemyblowup", "enemyblowup" + ebu, this.swapDepths._root.getNextHighestDepth(), {_x:_root["enemyspawn" + a]._x, _y:_root["enemyspawn" + a]._y});
_root["enemyspawn" + a].swapDepths(_root.getNextHighestDepth());
_root["enemyspawn" + a].removeMovieClip();
this.getNextHighestDepth();
this.removeMovieClip();
}
}
Instance of Symbol 185 MovieClip in Frame 3
onClipEvent (enterFrame) {
gotoAndStop(_root.ehealth);
}
Instance of Symbol 188 MovieClip in Frame 3
onClipEvent (enterFrame) {
gotoAndStop(_root.phealth);
}
Instance of Symbol 194 MovieClip "clo1" in Frame 3
onClipEvent (load) {
acc = 0;
}
onClipEvent (enterFrame) {
if (_root.clown == true) {
if (_y < 280) {
_y = (_y + 10);
}
}
if (_x > 500) {
acc = -1;
}
if (_x < 50) {
acc = 1;
}
if (acc > 0) {
_xscale = -100;
} else {
_xscale = 100;
}
if (_x > _root.player._x) {
acc = acc - 0.1;
_root.g2._xscale = -100;
} else {
acc = acc + 0.1;
_root.g2._xscale = 100;
}
_x = (_x + acc);
}
Instance of Symbol 197 MovieClip "g2" in Frame 3
onClipEvent (enterFrame) {
if (_root.clown == true) {
if (_x > (_root.p2._x - 20)) {
if (_y > 250) {
if (_x < (_root.p2._x + 20)) {
_root.phealth = _root.phealth + 1;
}
}
}
}
if (_rotation > 180) {
_xscale = -100;
} else {
_xscale = 100;
}
_x = _root.clo1._x;
_y = _root.clo1._y;
Xd = _root.p2._x - _x;
Yd = _root.p2._y - _y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
updateAfterEvent();
}
Frame 4
stop();
Frame 5
stop();
Frame 6
music.setVolume(0);
play();
Frame 232
stop();
Frame 233
var bc = 1000;
_root.onMouseDown = function () {
bc++;
if (bc > 100) {
bc = 1;
}
duplicateMovieClip ("bullet", "b" + bc, bc);
_root.bulletshot.gotoAndPlay(2);
_root.player.gotoAndPlay(2);
};
Instance of Symbol 132 MovieClip "p2" in Frame 233
onClipEvent (load) {
xvl = 0;
vl = 0;
ht = 0;
}
onClipEvent (enterFrame) {
if (_y < 240) {
vl = vl + 1;
}
if (240 < _y) {
_y = 240;
ht = 0;
}
_y = (_y + vl);
_x = (_x + xvl);
xvl = xvl * 0.95;
if (xvl > 0) {
_xscale = 100;
} else {
_xscale = -100;
}
if (_x > 500) {
xvl = -1;
}
if (_x < 50) {
xvl = xvl * -1;
}
if (Key.isDown(37)) {
xvl = xvl - 0.3;
}
if (Key.isDown(38)) {
if (ht == 0) {
vl = -14;
ht = 1;
}
}
if (Key.isDown(39)) {
xvl = xvl + 0.3;
}
}
Instance of Symbol 139 MovieClip "player" in Frame 233
onClipEvent (enterFrame) {
if (_rotation > 180) {
_xscale = -100;
}
_x = _root.p2._x;
_y = _root.p2._y;
Xd = _root._xmouse - _x;
Yd = _root._ymouse - _y;
radAngle = Math.atan2(Yd, Xd);
_rotation = int(((radAngle * 360) / (Math.PI*2)) + 90);
updateAfterEvent();
}
Instance of Symbol 141 MovieClip "bullet" in Frame 233
onClipEvent (load) {
spd = 20;
_x = _root.player._x;
_y = _root.player._y;
_rotation = _root.player._rotation;
ebu = 1;
}
onClipEvent (enterFrame) {
if (_y > 400) {
this.removeMovieClip();
}
if (_y < 0) {
this.removeMovieClip();
}
if (_x > 550) {
this.removeMovieClip();
}
if (_x < 0) {
this.removeMovieClip();
}
if (_root.clo1.hitTest(this._x, this._y, true)) {
_root.clo1.gotoAndPlay(2);
_root.ehealth = _root.ehealth + 2;
}
if (_root.zom1.hitTest(this._x, this._y, true)) {
_root.zom1.gotoAndPlay(2);
_root.ehealth = _root.ehealth + 2;
}
if (_name == "bullet") {
_x = -1000;
} else if (_rotation > 180) {
_y = (_y + ((spd * Math.cos((Math.PI/180) * _rotation)) * 2));
_x = (_x - ((spd * Math.sin((Math.PI/180) * _rotation)) * 2));
} else {
_y = (_y - ((spd * Math.cos((Math.PI/180) * _rotation)) * 2));
_x = (_x + ((spd * Math.sin((Math.PI/180) * _rotation)) * 2));
}
if ((((_x > Stage.width) || (_x < 0)) || (_y < 0)) || (_y > Stage.height)) {
this.removeMovieClip();
}
if (this.hitTest(_root["enemyspawn" + a])) {
_root.enemywentboom.gotoAndPlay(2);
_root.attachMovie("enemyblowup", "enemyblowup" + ebu, this.swapDepths._root.getNextHighestDepth(), {_x:_root["enemyspawn" + a]._x, _y:_root["enemyspawn" + a]._y});
_root["enemyspawn" + a].swapDepths(_root.getNextHighestDepth());
_root["enemyspawn" + a].removeMovieClip();
this.getNextHighestDepth();
this.removeMovieClip();
}
}
Symbol 42 Button
on (press) {
getURL ("http://www.newgrounds.com/collection/madnessday2007", (target = "_blank"));
}
Symbol 51 MovieClip Frame 29
gotoAndPlay (1);
Symbol 51 MovieClip Frame 65
gotoAndPlay ("ready_loop");
Symbol 51 MovieClip Frame 85
_root.play();
Symbol 58 Button
on (press) {
_root.loader.hank.gotoAndPlay("go");
play();
}
Symbol 59 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
_root.loader.hank.gotoAndPlay("ready");
}
Symbol 59 MovieClip Frame 2
gotoAndPlay (1);
Symbol 59 MovieClip Frame 5
stop();
Instance of Symbol 63 MovieClip in Symbol 72 MovieClip Frame 1
onClipEvent (load) {
var x = 0;
var y = 0;
}
onClipEvent (enterFrame) {
x = Math.round(Math.random() * 3);
if (x == 1) {
_visible = false;
} else {
_visible = true;
y = Math.random() * 30;
_yscale = (_yscale + (y - 15));
_y = (Math.random() * 400);
}
}
Symbol 81 Button
on (press) {
getURL ("http://www.newgrounds.com/collection/madness.html", "_blank");
}
Symbol 85 Button
on (press) {
_root.gotoAndStop(3);
}
Symbol 89 Button
on (press) {
_root.gotoAndStop(233);
}
Symbol 108 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 1
stop();
Instance of Symbol 108 MovieClip in Symbol 131 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndStop(_root.suit);
}
Instance of Symbol 114 MovieClip in Symbol 131 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndStop(_root.beard);
}
Instance of Symbol 120 MovieClip in Symbol 131 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndStop(_root.glasses);
}
Instance of Symbol 130 MovieClip in Symbol 131 MovieClip Frame 1
onClipEvent (enterFrame) {
gotoAndStop(_root.hat);
}
Symbol 132 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 10
gotoAndStop (1);
Symbol 166 MovieClip Frame 35
stop();
Symbol 174 MovieClip Frame 1
stop();
Symbol 185 MovieClip Frame 1
stop();
Symbol 185 MovieClip Frame 101
stop();
_root.clown = true;
_root.white.gotoAndPlay(1);
Symbol 185 MovieClip Frame 200
_root.gotoAndStop((_root._currentframe = _root._currentframe + 3));
Symbol 188 MovieClip Frame 1
stop();
Symbol 188 MovieClip Frame 100
_root.gotoAndStop((_root._currentframe = _root._currentframe + 1));
Symbol 194 MovieClip Frame 1
stop();
Symbol 200 MovieClip Frame 50
stop();
Symbol 205 Button
on (press) {
_root.gotoAndStop(3);
}
Symbol 217 MovieClip Frame 227
stop();
Symbol 230 Button
on (press) {
_root.gotoAndStop(2);
}