Combined Code
movieClip 4 {
}
movieClip 9 {
}
button 10 {
on (release) {
getURL('http://www.newgrounds.com', '_blank');
}
}
movieClip 11 {
}
button 19 {
on (release) {
_root.play();
}
}
movieClip 20 {
frame 1 {
function timerHandler() {
if (!loadingComplete) {
var v2 = _root.getBytesLoaded() / _root.getBytesTotal();
bar._xscale = 100 * v2;
if (v2 == 1) {
loadingComplete = true;
if (AUTO_PLAY) {
startMovie();
return undefined;
}
gotoAndStop('loaded');
return undefined;
}
}
}
function startMovie() {
_root.play();
}
_root.stop();
stop();
var AUTO_PLAY = false;
var loadingComplete = false;
timerHandler();
}
instance of movieClip 11 {
onClipEvent (enterFrame) {
_parent.timerHandler();
}
}
frame 2 {
stop();
}
}
frame 3 {
stop();
}
frame 3 {
stop();
}
frame 3 {
var yspeed = 0;
var xspeed = 0;
var gravity = 1;
var jump = -15;
var accspeed = 1;
var maxspeed = 15;
var friction = 1;
var scrollingright = false;
var scrollingleft = false;
var scrollspeed = 15;
onEnterFrame = function () {
player._y += yspeed;
player._x += xspeed;
yspeed += gravity;
if (player.hitTest(ground) || player.hitTest(platform)) {
if (Key.isDown(38)) {
yspeed = jump;
} else {
yspeed = 0;
}
}
if (Key.isDown(37)) {
xspeed -= accspeed;
} else {
if (Key.isDown(39)) {
xspeed += accspeed;
} else {
if (xspeed < 0) {
xspeed += friction;
}
if (xspeed > 0) {
xspeed -= friction;
}
}
}
if (xspeed >= maxspeed) {
xspeed = maxspeed;
scrollingright = true;
}
if (xspeed < maxspeed) {
scrollingright = false;
}
if (xspeed > -maxspeed) {
scrollingleft = false;
}
if (scrollingright) {
player._x -= scrollspeed;
}
if (Key.isDown(13)) {
gotoAndPlay('reset');
}
};
}
movieClip 22 {
}
instance of movieClip 22 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.gotoAndPlay('reset');
}
}
}
movieClip 26 {
}
movieClip 28 {
}
movieClip 30 {
instance wall2 of movieClip 28 {
onClipEvent (enterFrame) {
if (_root.player.hitTest(this)) {
_root.xspeed = 8;
}
}
}
instance wall1 of movieClip 28 {
onClipEvent (enterFrame) {
if (_root.player.hitTest(this)) {
_root.xspeed = -8;
}
}
}
instance platform of movieClip 28 {
onClipEvent (enterFrame) {
if (_root.player.hitTest(this)) {
if (Key.isDown(38)) {
_root.yspeed = _root.jump;
} else {
_root.yspeed = 0;
}
}
}
}
instance bottom of movieClip 28 {
onClipEvent (enterFrame) {
if (_root.player.hitTest(this)) {
_root.yspeed = -_root.yspeed;
}
}
}
}
movieClip 32 {
}
movieClip 33 {
instance of movieClip 32 {
onClipEvent (enterFrame) {
if (_root.player.hitTest(this)) {
_root.yspeed = _root.jump - 5;
}
}
}
}
movieClip 35 {
}
movieClip 36 {
instance of movieClip 22 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.gotoAndPlay('part2spawner');
}
}
}
instance of movieClip 35 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.gotoAndStop('gumba');
}
}
}
}
instance of movieClip 36 {
onClipEvent (enterFrame) {
if (_root.scrollingright) {
this._x -= _root.scrollspeed;
}
if (_root.scrollingleft) {
this._x += _root.scrollspeed;
}
}
}
movieClip 41 {
}
movieClip 42 {
}
frame 5 {
stop();
}
movieClip 46 {
instance of movieClip 22 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.gotoAndPlay('bossfightspawner');
}
}
}
instance of movieClip 35 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.gotoAndStop('gumba');
}
}
}
instance of movieClip 35 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.gotoAndStop('gumba');
}
}
}
instance of movieClip 35 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.gotoAndStop('gumba');
}
}
}
instance of movieClip 35 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.gotoAndStop('gumba');
}
}
}
instance of movieClip 35 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.gotoAndStop('gumba');
}
}
}
}
instance of movieClip 46 {
onClipEvent (enterFrame) {
if (_root.scrollingright) {
this._x -= _root.scrollspeed;
}
if (_root.scrollingleft) {
this._x += _root.scrollspeed;
}
}
}
frame 7 {
stop();
}
movieClip 49 {
instance of movieClip 35 {
onClipEvent (enterFrame) {
if (this.hitTest(_root.player)) {
_root.gotoAndStop('gumba');
}
}
}
}
instance of movieClip 49 {
onClipEvent (enterFrame) {
if (_root.scrollingright) {
this._x -= _root.scrollspeed;
}
if (_root.scrollingleft) {
this._x += _root.scrollspeed;
}
}
}
frame 9 {
_root.gotoAndStop('start');
}
instance of movieClip 42 {
onClipEvent (load) {
if (Key.isDown(13)) {
_root.gotoAndStop(1);
}
}
}