Combined Code
movieClip 3 {
}
movieClip 8 {
}
movieClip 9 {
}
movieClip 15 {
}
movieClip 16 {
}
movieClip 18 {
}
button 20 {
on (release) {
target = '_blank';
getURL('http://www.newgrounds.com/collection/madness', '_blank');
}
}
movieClip 27 {
frame 29 {
gotoAndPlay(1);
}
frame 65 {
gotoAndPlay('ready_loop');
}
frame 85 {
_root.play();
}
}
movieClip 30 {
}
movieClip 31 {
}
movieClip 32 {
}
button 33 {
on (press) {
_root.loader.hank.gotoAndPlay('go');
play();
}
}
movieClip 34 {
frame 1 {
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop('loaded');
_root.loader.hank.gotoAndPlay('ready');
}
}
frame 2 {
gotoAndPlay(1);
}
frame 5 {
stop();
}
}
frame 2 {
stop();
}
button 37 {
on (release) {
gotoAndStop(3);
}
}
frame 3 {
_root.health = 100;
stop();
}
movieClip 47 {
frame 50 {
gotoAndPlay(1);
}
}
movieClip 54 {
}
movieClip 62 {
}
movieClip 63 {
}
movieClip 65 {
}
movieClip 66 {
}
movieClip 69 {
instance health of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 63 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health -= 5;
}
}
}
instance of movieClip 63 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health -= 5;
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 63 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health -= 5;
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 10;
loadMovie('', this);
}
}
}
instance of movieClip 47 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.character)) {
_root.health += 20;
loadMovie('', this);
}
}
}
}
movieClip 71 {
frame 1 {
stop();
}
}
movieClip 74 {
frame 1 {
function camControl() {
parentColor.setTransform(camColor.getTransform());
var v3 = sX / this._width;
var v4 = sY / this._height;
_parent._x = cX - this._x * v3;
_parent._y = cY - this._y * v4;
_parent._xscale = 100 * v3;
_parent._yscale = 100 * v4;
}
function resetStage() {
var v2 = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0};
parentColor.setTransform(v2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = 'exactFit';
var cX = Stage.width / 2;
var cY = Stage.height / 2;
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
this.onUnload = resetStage;
}
}
instance of movieClip 74 {
onClipEvent (enterFrame) {
_y = _y + (_root.character._y - _y);
_x = _x + (_root.character._x - _x);
}
}
movieClip 80 {
}
movieClip 82 {
}
movieClip 83 {
}
movieClip 100 {
frame 1 {
stop;
}
frame 23 {
gotoAndPlay(2);
}
}
movieClip 104 {
}
movieClip 105 {
instance of movieClip 83 {
onClipEvent (enterFrame) {
this._xscale = _root.health;
if (_root.health < 0) {
_root.health = 0;
_root.gotoAndStop(4);
}
}
}
instance char of movieClip 100 {
onClipEvent (load) {
speed = 6;
isJumping = false;
jumpSpeed = 0;
startY = _y;
scale = _xscale;
}
onClipEvent (enterFrame) {
if (isJumping) {
_y = _y + jumpSpeed;
jumpSpeed += 1;
if (_y >= startY) {
speed = 6;
}
speed = 6;
}
if (Key.isDown(39)) {
play();
} else {
stop();
}
}
}
instance of movieClip 100 {
onClipEvent (load) {
speed = 6;
isJumping = false;
jumpSpeed = 0;
startY = _y;
scale = _xscale;
}
onClipEvent (enterFrame) {
if (isJumping) {
_y = _y + jumpSpeed;
jumpSpeed += 1;
if (_y >= startY) {
speed = 6;
}
speed = 6;
}
if (Key.isDown(37)) {
play();
} else {
stop();
}
}
}
instance of movieClip 104 {
onClipEvent (load) {
speed = 6;
isJumping = false;
jumpSpeed = 0;
startY = _y;
scale = _xscale;
}
onClipEvent (enterFrame) {
if (isJumping) {
_y = _y + jumpSpeed;
jumpSpeed += 1;
if (_y >= startY) {
speed = 6;
}
speed = 6;
}
if (Key.isDown(38)) {
play();
} else {
stop();
}
}
}
}
instance character of movieClip 105 {
onClipEvent (load) {
var ground = _root.ground;
var grav = 0;
var gravity = 2;
var speed = 10;
var maxJump = -20;
var touchingGround = false;
}
onClipEvent (enterFrame) {
_y = _y + grav;
grav += gravity;
while (ground.hitTest(_x, _y, true)) {
_y = _y - gravity;
grav = 0;
}
if (ground.hitTest(_x, _y + 5, true)) {
touchingGround = true;
} else {
touchingGround = false;
}
if (Key.isDown(39)) {
_x = _x + speed;
gotoAndStop(2);
}
if (Key.isDown(37)) {
_x = _x - speed;
gotoAndStop(3);
}
if (Key.isDown(38) && touchingGround) {
grav = maxJump;
gotoAndStop(4);
}
if (!rightKeyisDown && leftKeyisDown && !upKeyisDown) {
gotoAndStop(1);
}
if (ground.hitTest(_x + _width / 2, _y - _height / 2, true)) {
_x = _x - speed;
}
if (ground.hitTest(_x - _width / 2, _y - _height / 2, true)) {
_x = _x + speed;
}
if (ground.hitTest(_x, _y - height, true)) {
grav = 3;
}
}
}
button 108 {
on (release) {
gotoAndStop(2);
}
}