Frame 1
_root.jumpCountMax = 1;
stop();
myLoaded = Math.round(getBytesLoaded());
myTotal = Math.round(getBytesTotal());
if (myLoaded >= myTotal) {
gotoAndStop (2);
} else {
gotoAndPlay (1);
}
Frame 2
stop();
Instance of Symbol 12 MovieClip in Frame 2
onClipEvent (enterFrame) {
if (Key.isDown(32)) {
_root.play();
}
}
Frame 63
stop();
Instance of Symbol 17 MovieClip "hero" in Frame 63
onClipEvent (load) {
gravity = 25;
speed = 13;
jumpSpeed = 0;
jumpSpeedReset = 45;
cKey = 67;
wKey = 87;
aKey = 65;
sKey = 83;
dKey = 68;
key1 = 49;
key2 = 50;
num1 = 97;
num2 = 98;
var remote = Wii.getRemote(0);
var remote2 = Wii.getRemote(1);
remote.setKeyMapping(WiiRemote.BUTTON_UP, 38);
remote.setKeyMapping(WiiRemote.BUTTON_MINUS, 49);
remote.setKeyMapping(WiiRemote.BUTTON_PLUS, 67);
jump = false;
walk = false;
faceRight = true;
key1Press = false;
key2Press = false;
_root.doorIn = false;
_root.questionMark = false;
cKeyPress = false;
}
onClipEvent (enterFrame) {
if (!_root.doorIn) {
if ((((remote.isDown(WiiRemote.BUTTON_MINUS) or Key.isDown(key1)) or Key.isDown(num1)) && (_root.camFocus == false)) && (!keyOnePress)) {
_root.camFocus = true;
keyOnePress = true;
} else if ((((remote.isDown(WiiRemote.BUTTON_MINUS) or Key.isDown(key1)) or Key.isDown(num1)) && (_root.camFocus == true)) && (!keyOnePress)) {
_root.camFocus = false;
keyOnePress = true;
}
if (((!remote.isDown(WiiRemote.BUTTON_MINUS)) && (!Key.isDown(num1))) && (!Key.isDown(key1))) {
keyOnePress = false;
}
}
if (investigate) {
_root.joe.gotoAndStop(5);
}
if (!_root.doorIn) {
if (faceRight) {
_root.joe._xscale = 100;
} else if (!faceRight) {
_root.joe._xscale = -100;
}
} else {
_root.joe._xscale = -100;
}
if (!onGround) {
_y = (_y + (gravity - jumpSpeed));
_root.joe.gotoAndStop(4);
} else if ((!walk) && (!investigate)) {
_root.joe.gotoAndStop(1);
}
if (_x > (550 + _root.scrollVarX)) {
_root.joePointer._x = 540 + _root.scrollVarX;
_root.joePointer._xscale = -100;
_root.joePointer._visible = true;
_root.joePointer._y = _y;
} else if (_x < (0 + _root.scrollVarX)) {
_root.joePointer._x = 10 + _root.scrollVarX;
_root.joePointer._xscale = 100;
_root.joePointer._visible = true;
_root.joePointer._y = _y;
} else {
_root.joePointer._visible = false;
}
if (_y > (400 + _root.scrollVarY)) {
_root.joePointer3._x = _x;
_root.joePointer3._visible = true;
_root.joePointer3._y = 390 + _root.scrollVarY;
} else {
_root.joePointer3._visible = false;
}
if (_y < (0 + _root.scrollVarY)) {
_root.joePointer2._visible = true;
_root.joePointer2._x = _x;
_root.joePointer2._y = 10 + _root.scrollVarY;
} else {
_root.joePointer2._visible = false;
}
_global.camMoveJoe(speed);
if ((jumpSpeed > 0) && ((remote.isDown(WiiRemote.BUTTON_UP) or (Key.isDown(wKey) && (_root.coop == 0))) or (remote2.isDown(WiiRemote.BUTTON_2) or (Key.isDown(wKey) && (_root.coop == 1))))) {
jumpSpeed = jumpSpeed - 2;
} else if ((jumpSpeed > 0) && ((!(remote.isDown(WiiRemote.BUTTON_UP) or (Key.isDown(wKey) && (_root.coop == 0)))) or (!(remote2.isDown(WiiRemote.BUTTON_2) or (Key.isDown(wKey) && (_root.coop == 1)))))) {
jumpSpeed = jumpSpeed - 4;
}
if (jumpSpeed <= gravity) {
jump = false;
}
if (!_root.doorIn) {
if ((Key.isDown(dKey) or (remote.isDown(WiiRemote.BUTTON_RIGHT) && (_root.coop == 0))) or (Key.isDown(dKey) or (remote2.isDown(WiiRemote.BUTTON_DOWN) && (_root.coop == 1)))) {
investigate = false;
_x = (_x + speed);
if (onGround) {
_root.joe.gotoAndStop(2);
}
walk = true;
faceRight = true;
} else if ((Key.isDown(aKey) or (remote.isDown(WiiRemote.BUTTON_LEFT) && (_root.coop == 0))) or (Key.isDown(aKey) or (remote2.isDown(WiiRemote.BUTTON_UP) && (_root.coop == 1)))) {
investigate = false;
_x = (_x - speed);
if (onGround) {
_root.joe.gotoAndStop(2);
}
walk = true;
faceRight = false;
} else {
walk = false;
}
if (((((Key.isDown(sKey) or remote.isDown(WiiRemote.BUTTON_DOWN)) && (_root.coop == 0)) or ((Key.isDown(sKey) or remote2.isDown(WiiRemote.BUTTON_1)) && (_root.coop == 1))) && (!_root.downPress)) && (onGround)) {
_root.downPress = true;
if (this.hitTest(_root.door) && (key)) {
_root.stop();
_root.door.gotoAndStop(2);
_root.doorIn = true;
key = false;
investigate = true;
} else if (this.hitTest(_root.redButton)) {
_root.redButton.play();
_root.bb.play();
_root.bb2.play();
_root.bb3.play();
_root.hero2Move = 1;
_root.hero2Bound.gotoAndStop(2);
} else if (onGround) {
if ((!_root.questionMark) && (!investigate)) {
duplicateMovieClip (_root.question, "poop", getNextHighestDepth());
}
investigate = true;
}
} else if (!((Key.isDown(sKey) or remote.isDown(WiiRemote.BUTTON_DOWN)) or remote2.isDown(WiiRemote.BUTTON_LEFT))) {
_root.downPress = false;
}
if ((((Key.isDown(wKey) or remote.isDown(WiiRemote.BUTTON_UP)) or remote2.isDown(WiiRemote.BUTTON_2)) && (jumpCount != _root.jumpCountMax)) && (!jumpKeyDown)) {
investigate = false;
jumpCount = jumpCount + 1;
jumpKeyDown = true;
jumpSpeed = jumpSpeedReset;
jump = true;
} else if (!((Key.isDown(wKey) or remote.isDown(WiiRemote.BUTTON_UP)) or remote2.isDown(WiiRemote.BUTTON_2))) {
jumpKeyDown = false;
}
if (((_root.ground.hitTest(_x + -4, _y + _height, true) && (!jump)) or (_root.ground.hitTest(_x + 2, _y + _height, true) && (!jump))) or (_root.ground.hitTest(_x + 8, _y + _height, true) && (!jump))) {
while ((_root.ground.hitTest(_x + -4, _y + (_height - 1), true) or _root.ground.hitTest(_x + 2, _y + (_height - 1), true)) or _root.ground.hitTest(_x + 8, _y + (_height - 1), true)) {
_y = (_y-1);
}
_y = (_y + 4);
onGround = true;
jumpSpeed = 15;
jumpCount = 0;
} else {
onGround = false;
while (jumpCount == 0) {
jumpCount = 1;
}
}
if ((_root.leftWall.hitTest(_x + 8, _y + 40, true) or _root.leftWall.hitTest(_x + 16, _y + 30, true)) or _root.leftWall.hitTest(_x + 16, _y + 16, true)) {
while ((_root.leftWall.hitTest(_x + 7, _y + 40, true) or _root.leftWall.hitTest(_x + 15, _y + 30, true)) or _root.leftWall.hitTest(_x + 15, _y + 30, true)) {
_x = (_x-1);
}
}
if ((_root.rightWall.hitTest(_x + -16, _y + 16, true) or _root.rightWall.hitTest(_x + -16, _y + 30, true)) or _root.rightWall.hitTest(_x + -6, _y + 40, true)) {
while ((_root.rightWall.hitTest(_x + -15, _y + 16, true) or _root.rightWall.hitTest(_x + -15, _y + 30, true)) or _root.rightWall.hitTest(_x + -5, _y + 40, true)) {
_x = (_x+1);
}
}
if ((_root.celing.hitTest(_x + 16, _y, true) or _root.celing.hitTest(_x + 0, _y, true)) or _root.celing.hitTest(_x + -16, _y + 0, true)) {
while ((_root.celing.hitTest(_x + 16, _y - 1, true) or _root.celing.hitTest(_x + 0, _y - 1, true)) or _root.celing.hitTest(_x + -16, _y - 1, true)) {
_y = (_y+1);
}
if (jumpSpeed > 6) {
jumpSpeed = 6;
}
}
}
if (_root.joe.hitTest(_root.bedtime)) {
_root.doorIn = true;
_root.joe.gotoAndStop(6);
onGround = true;
_root.joe._xscale = -100;
unloadMovie (_root.bedtime);
}
}
Instance of Symbol 25 MovieClip "question" in Frame 63
onClipEvent (load) {
if (_name == "poop") {
this._x = _root.hero._x - 18;
this._y = _root.hero._y + 6;
_root.questionMark = true;
} else {
_visible = false;
}
i = 0;
}
onClipEvent (enterFrame) {
if (_name == "poop") {
i++;
if (i < 4) {
this._y = this._y - 15;
}
if ((i > 10) && (this._alpha != 0)) {
this._alpha = 0;
} else if ((i > 10) && (this._alpha != 100)) {
this._alpha = 100;
}
if (i > 18) {
_root.questionMark = false;
}
if (i == 19) {
unloadMovie (this);
}
}
}
Instance of Symbol 68 MovieClip "joe" in Frame 63
onClipEvent (enterFrame) {
_x = _root.hero._x;
_y = _root.hero._y;
}
Frame 152
stop();
Symbol 59 MovieClip Frame 2
stop();
Symbol 61 MovieClip Frame 2
stop();
Symbol 67 MovieClip Frame 4
stop();
_root.play();
Symbol 68 MovieClip Frame 1
stop();
Symbol 68 MovieClip Frame 5
stop();
Symbol 68 MovieClip Frame 6
stop();