Frame 1
stop();
Frame 26
if (this._target != "/") {
stop();
}
Frame 27
function handHold() {
startDrag ("hand");
Mouse.hide();
hand.dragging = 1;
}
function handRelease() {
stopDrag();
Mouse.show();
hand.dragging = 0;
}
function setDefaults() {
wind = 1.5;
springStrength = 15;
weight = 1;
sway = 0;
slapSpeed = 50;
bigSlapSpeed = 200;
offScreenX = -200;
_root.introText = "Oh Baby!\r Slap some sense into me!";
}
function resetHand() {
hand.destX = startX;
hand.destY = startY;
_root.bax.handState = "auto";
}
function offScreenHand() {
hand.destX = offscreenX;
hand.destY = hand._y;
_root.bax.handState = "autoOff";
}
function checkOffscreen() {
if ((((hand._x < -10) || (hand._x > 900)) || (hand._y < 30)) || (hand._y > 310)) {
resetHand();
}
}
function swayHand() {
if (bax.handState != "autoOff") {
checkOffscreen();
}
getAccel();
handFrame = hand._currentframe;
handFrameOffset = (handFrame - 51) * -1;
spring = (handFrameOffset / springStrength) * fps.speedFactor;
if (handFrame < 51) {
spring = Math.max(1, spring);
} else if (handFrame > 51) {
spring = Math.min(-1, spring);
} else {
spring = 0;
}
sway = vNew / wind;
sway = sway + spring;
handFrameNew = handFrame + sway;
handFrameNew = Math.max(handFrameNew, 1);
handFrameNew = Math.min(handFrameNew, 100);
hand.gotoAndStop(Math.round(handFrameNew));
checkHit();
}
function checkHit() {
if ((hand._x > 10) && (hand._x < 350)) {
if (Key.isDown(72)) {
vNew = 690;
} else {
vNew = Math.floor(vNew);
}
if ((slapSpeed < vNew) && (monkeyUp)) {
resultText = ("You just slapped Obama " + vNew) + " nigga feet down da alley!";
monkey.gotoAndPlay("hit");
monkeyUp = 0;
handRelease();
offScreenHand();
}
}
}
function getAccel() {
xOld = xNew;
xNew = hand._x;
vNew = (xOld - xNew) / fps.speedFactor;
}
fscommand ("allowscale", 0);
fscommand ("fullscreen", 0);
fscommand ("showMenu", 1);
setDefaults();
Instance of Symbol 38 MovieClip "monkey" in Frame 27
onClipEvent (load) {
this.gotoAndPlay("endGoodTime");
}
Instance of Symbol 57 MovieClip "hand" in Frame 27
onClipEvent (load) {
gotoAndStop (51);
_parent.startX = this._x;
_parent.startY = this._y;
_parent.xOld = this._x;
_parent.xNew = this._x;
_parent.vNew = 0;
}
Frame 28
_quality = "HIGH";
Frame 148
quality = "high";
stop();
Instance of Symbol 60 MovieClip "bax" in Frame 148
onClipEvent (load) {
handState = "ready";
}
onClipEvent (mouseDown) {
if ((handState == "ready") || (handState == "endAuto")) {
_parent.handHold();
handState = "drag";
}
}
onClipEvent (mouseUp) {
_parent.handRelease();
if (handState == "drag") {
_parent.resetHand();
}
}
onClipEvent (enterFrame) {
_parent.swayHand();
}
Instance of Symbol 63 MovieClip "fps" in Frame 148
onClipEvent (load) {
targetFPS = 100;
targetDelay = 1000 / targetFPS;
}
onClipEvent (enterFrame) {
currentTicks = getTimer();
frameDelay = currentTicks - oldTicks;
speedFactor = frameDelay / targetDelay;
if (speedFactor <= 0) {
speedFactor = 1;
}
oldTicks = currentTicks;
}
Instance of Symbol 70 MovieClip "result" in Frame 148
onClipEvent (load) {
this.gotoAndStop("off");
}
Symbol 5 MovieClip Frame 1
bytes_loaded = Math.round(_root.getBytesLoaded());
bytes_total = Math.round(_root.getBytesTotal());
getPercent = bytes_loaded / bytes_total;
loadBar._width = getPercent * 170;
loadText = Math.round(getPercent * 100) + "%";
if (bytes_loaded == bytes_total) {
_root.play();
}
Symbol 5 MovieClip Frame 2
gotoAndPlay (1);
Symbol 38 MovieClip Frame 1
_parent.monkeyUp = 1;
stop();
Symbol 38 MovieClip Frame 20
_root.result.gotoAndPlay("on");
Symbol 38 MovieClip Frame 131
_root.result.gotoAndStop("off");
Symbol 38 MovieClip Frame 157
_parent.resetHand();
gotoAndStop (1);
Symbol 38 MovieClip Frame 173
startGoodTime = getTimer();
Symbol 38 MovieClip Frame 191
_root.result.gotoAndPlay("onBig");
Symbol 38 MovieClip Frame 208
if ((getTimer() - startGoodTime) > 9000) {
gotoAndPlay (214);
}
Symbol 38 MovieClip Frame 210
gotoAndPlay (192);
Symbol 38 MovieClip Frame 230
play();
Symbol 38 MovieClip Frame 232
_root.result.gotoAndStop("off");
Symbol 38 MovieClip Frame 263
_parent.resetHand();
gotoAndStop (1);
Instance of Symbol 48 MovieClip "spring" in Symbol 57 MovieClip Frame 1
onClipEvent (load) {
gain = 6;
xSpeed = 0;
ySpeed = 0;
this._visible = 0;
}
onClipEvent (enterFrame) {
if (((_root.bax.handState == "auto") || (_root.bax.handState == "endAuto")) || (_root.bax.handState == "autoOff")) {
slow = 6.1 * gain;
var dX = (_parent.destX - _parent._x);
xSpeed = ((xSpeed + dx) * gain) / slow;
var dY = (_parent.destY - _parent._y);
ySpeed = ((ySpeed + dy) * gain) / slow;
_parent._x = _parent._x + xSpeed;
_parent._y = _parent._y + ySpeed;
if ((((dx * dx) + (dy * dy)) < 2) && (_root.bax.handState != "autoOff")) {
_root.bax.handState = "endAuto";
}
}
}
Symbol 70 MovieClip Frame 1
_root._quality = "HIGH";
Symbol 70 MovieClip Frame 24
stop();
Symbol 70 MovieClip Frame 30
_root._quality = "HIGH";
Symbol 70 MovieClip Frame 53
stop();
Symbol 70 MovieClip Frame 95
_root._quality = "LOW";
stop();