Frame 1
stop();
Frame 2
function armRotation() {
_root.kong.arm.gotoAndStop(2);
_root.kong.arm._rotation = 0;
}
function turnMove() {
var _local1 = _root;
var _local2 = _global;
if (Key.isDown(37) && (_local2.gamePlay == true)) {
turnSpeed = turnSpeed + 2.75;
_local1.kong.cannon._rotation = _local1.kong.cannon._rotation - turnSpeed;
} else if (Key.isDown(39) && (_local2.gamePlay == true)) {
turnSpeed = turnSpeed + 2.75;
_local1.kong.cannon._rotation = _local1.kong.cannon._rotation + turnSpeed;
}
if (Key.isDown(32) && (_local2.gamePlay == true)) {
thePower = thePower + 9.5;
if (thePower > 100) {
thePower = 100;
}
_local1.kong.cannon.power = thePower;
_local1.powerBar.power = thePower;
_local1.kong.arm.gotoAndStop(3);
}
}
function startRound() {
Key.addListener(keyListener);
currentTurn = setInterval(turnMove, 80);
}
function addBall(theCastle) {
var _local1 = this;
_global.spin1.start(0, 1);
speed0 = ((thePower / 5.5) + 6) + Math.random();
v++;
name = "ball1";
var _local3 = _local1.kong.cannon._rotation;
var cosA = math.cos((_local3 * math.pi) / 180);
var _local2 = math.sin((_local3 * math.pi) / 180);
var x = (_local1.kong.startX + (_local1[theCastle].shaftNose * cosA));
var y = (_local1.kong.startY + (_local1[theCastle].shaftNose * _local2));
var xVel = (speed0 * cosA);
var yVel = (speed0 * _local2);
duplicateMovieClip (ball, name + v, v);
_local1[name + v]._x = x;
_local1[name + v]._y = y;
_local1[name + v].xVelocity = xVel;
_local1[name + v].yVelocity = yVel;
_local1[name + v].theRotate = (Math.random() * 8) + 6;
}
function theHit(theName) {
var _local1 = theName;
var _local2 = this;
var _local3 = _global;
theHitTest = false;
if (theBarrel.innerBarrel.hotZone.hitTest(_local2[_local1]._x, _local2[_local1]._y, true) && (theBarrel.timerBar._xscale > 0)) {
theBarrel.innerBarrel.hitFlare.play();
_local3.barrelsHit++;
scoreBoard.barrelCount--;
_local3.grandTotal = _local3.grandTotal + scoreIncr;
moveBarrel();
_local2[_local1].removeMovieClip();
_local3.inBarrel.start(0, 1);
theHitTest = true;
return(theHitTest);
}
if (theBarrel.innerBarrel.bounceZone.hitTest(_local2[_local1]._x, _local2[_local1]._y, true)) {
_local2[_local1].xVelocity = _local2[_local1].xVelocity - random(4);
_local2[_local1].yVelocity = _local2[_local1].yVelocity * -1;
hitRndm = random(2);
if (hitRndm == 1) {
_local3.bounce1.start(0, 1);
} else {
_local3.bounce2.start(0, 1);
}
theHitTest = true;
}
if (theBarrel.innerBarrel.bounceZone2.hitTest(_local2[_local1]._x, _local2[_local1]._y, true)) {
_local2[_local1].yVelocity = Math.abs(_local2[_local1].yVelocity) + 3;
hitRndm = random(2);
if (hitRndm == 1) {
_local3.bounce1.start(0, 1);
} else {
_local3.bounce2.start(0, 1);
}
theHitTest = true;
}
return(undefined);
}
function moveBarrel() {
theBarrel.theState = "moveUp";
}
function roundEndBox() {
_root.tallyBoxMC.play();
theBarrel.theState = "roundOver";
}
function roundUp() {
var _local1 = _global;
_local1.gamePlay = true;
roundNumber++;
_local1.bananasTossed = 0;
_local1.barrelsHit = 0;
_local1.barrelsMissed = 0;
scoreBoard.theScore = _local1.theGrandTotal;
if (theBarrel.barrelSpeed <= 0.87) {
theBarrel.barrelSpeed = theBarrel.barrelSpeed + 0.03;
}
if (scoreBoard.roundTimer.roundSpeed <= 0.115) {
scoreBoard.roundTimer.roundSpeed = scoreBoard.roundTimer.roundSpeed + 0.0025;
}
scoreBoard.barrelCount = roundBarrelAmount;
scoreBoard.roundTimer.roundTimerBar._xscale = 100;
theBarrel.theState = "moveUp";
}
function resetGame() {
var _local1 = _global;
_local1.gamePlay = true;
_local1.bananasTossed = 0;
_local1.barrelsHit = 0;
_local1.barrelsMissed = 0;
_local1.grandTotal = 0;
theBarrel.barrelSpeed = 0.16;
scoreBoard.roundTimer.roundSpeed = 0.03;
scoreBoard.barrelCount = 10;
roundBarrelAmount = 10;
theBarrel.theState = "moveUp";
}
_global.gamePlay = true;
v = 1;
roundNumber = 1;
theBarrel.barrelSpeed = 0.16;
scoreBoard.roundTimer.roundSpeed = 0.03;
scoreBoard.barrelCount = 10;
roundBarrelAmount = 10;
scoreIncr = 100;
_global.grandTotal = 0;
_global.bananasTossed = 0;
_global.barrelsHit = 0;
_global.barrelsMissed = 0;
keyListener = new Object();
keyListener.onKeyUp = function () {
turnSpeed = 1;
var _local1 = Key.getCode();
if ((_local1 == 32) && (_global.gamePlay == true)) {
_global.bananasTossed++;
armRotation();
addBall(turnName);
thePower = 0;
_root.powerBar.power = 0;
}
};
_global.spin1 = new Sound();
_global.spin1.attachSound("spin1");
_global.spin1.setVolume(30);
_global.bounce1 = new Sound();
_global.bounce1.attachSound("bounce1");
_global.bounce1.setVolume(30);
_global.bounce2 = new Sound();
_global.bounce2.attachSound("bounce2");
_global.bounce2.setVolume(30);
_global.inBarrel = new Sound();
_global.inBarrel.attachSound("inBarrel");
_global.inBarrel.setVolume(30);
_global.cheer = new Sound();
_global.cheer.attachSound("cheer");
_global.cheer.setVolume(30);
_global.monkeyCall = new Sound();
_global.monkeyCall.attachSound("monkeyCall");
_global.monkeyCall.setVolume(30);
_global.jungleBeat = new Sound();
_global.jungleBeat.attachSound("jungleBeat");
_global.jungleBeat.setVolume(90);
Instance of Symbol 115 MovieClip "ball" in Frame 2
onClipEvent (load) {
gravity = 0.7;
theHit = false;
this._alpha = 100;
}
onClipEvent (enterFrame) {
if (_name != "ball") {
_x = (_x + xVelocity);
_y = (_y + ((yVelocity = yVelocity + gravity)));
_rotation = (_rotation + theRotate);
theHit = _parent.theHit(_name);
}
if (((_x > 600) || (_x < 0)) || (_y > 400)) {
_root.bananaHisses++;
removeMovieClip(this);
}
}
Instance of Symbol 125 MovieClip "statusBoard" in Frame 2
/* no clip actions */
Instance of Symbol 38 MovieClip "scoreBoard" in Frame 2
onClipEvent (load) {
this.swapDepths(10000);
}
Instance of Symbol 44 MovieClip "powerBar" in Frame 2
onClipEvent (load) {
this.swapDepths(10001);
power = 0;
}
onClipEvent (enterFrame) {
powerMeter._yscale = power;
speed = power;
}
Instance of Symbol 154 MovieClip "tallyBoxMC" in Frame 2
onClipEvent (load) {
this.swapDepths(10015);
}
Instance of Symbol 168 MovieClip "gameOverMC" in Frame 2
onClipEvent (load) {
this.swapDepths(10010);
}
Instance of Symbol 54 MovieClip in Frame 2
onClipEvent (load) {
_global.jungleBeat.start();
_root.musicOn = true;
this.swapDepths(10003);
}
onClipEvent (enterFrame) {
_global.jungleBeat.onSoundComplete = function () {
if (_root.musicOn == true) {
_global.jungleBeat.start();
}
};
}
Frame 3
startRound();
stop();
Symbol 37 MovieClip Frame 1
this.onEnterFrame = function () {
roundTimerBar._xscale = roundTimerBar._xscale - roundSpeed;
if ((roundTimerBar._xscale < 0) && (_global.gamePLay == true)) {
_root.gameOverMC.play();
}
if (_global.gamePlay == false) {
roundTimerBar._xscale = 100;
}
};
Symbol 38 MovieClip Frame 1
this.onEnterFrame = function () {
var _local1 = _global;
theScore = _local1.grandTotal;
if ((barrelCount <= 0) && (_local1.gamePlay == true)) {
_local1.timeLeft = roundTimer.roundTimerBar._xscale;
_root.roundEndBox();
_local1.gamePlay = false;
}
};
Symbol 48 Button
on (release) {
}
Symbol 51 Button
on (release) {
_root.musicOn = false;
_global.jungleBeat.stop();
gotoAndStop (2);
}
Symbol 53 Button
on (release) {
_root.musicOn = true;
_global.jungleBeat.start();
gotoAndStop (1);
}
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 2
stop();
Symbol 65 MovieClip Frame 7
_parent.gotoAndStop(1);
_root.kong.arm._rotation = 0;
trace(_root.kong.arm._rotation);
stop();
Symbol 68 MovieClip Frame 1
stop();
Symbol 68 MovieClip Frame 2
stop();
Symbol 68 MovieClip Frame 3
stop();
Symbol 77 MovieClip Frame 4
stop();
Symbol 77 MovieClip Frame 8
stop();
Symbol 77 MovieClip Frame 12
stop();
Instance of Symbol 77 MovieClip in Symbol 78 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (12);
frameLabels = new Array("lookLeft", "lookRight", "lookStraight");
}
onClipEvent (enterFrame) {
directionNum = random(3);
randomTime = random(150);
if (randomTime == 5) {
if (previousNum == directionNum) {
directionNum = directionNum + 1;
}
gotoAndPlay(frameLabels[directionNum]);
previousNum = directionNum;
}
}
Symbol 83 Button
on (release) {
_global.inBarrel.start();
play();
}
Symbol 84 MovieClip Frame 13
stop();
Symbol 84 MovieClip Frame 23
_parent.play();
Symbol 85 MovieClip Frame 1
stop();
Instance of Symbol 26 MovieClip in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
_global.gamePlay = false;
_parent.stop();
}
onClipEvent (enterFrame) {
bytesLoaded = _root.getBytesLoaded();
KbytesLoaded = "Loading " + (int(_root.getBytesLoaded() / 1024) + "kb");
bytesTotal = _root.getBytesTotal();
KbytesTotal = "of " + (int(_root.getBytesTotal() / 1024) + "kb");
percentSetup = (bytesLoaded / bytesTotal) * 100;
percentage = int(percentSetup) + "%";
this.loaderBar._xscale = percentSetup;
if (bytesLoaded == bytesTotal) {
_parent.play();
}
}
Instance of Symbol 54 MovieClip in Symbol 85 MovieClip Frame 33
onClipEvent (load) {
_global.jungleBeat.start();
_root.musicOn = true;
this.swapDepths(10003);
}
onClipEvent (enterFrame) {
_global.jungleBeat.onSoundComplete = function () {
if (_root.musicOn == true) {
_global.jungleBeat.start();
}
};
}
Symbol 85 MovieClip Frame 34
Instance of Symbol 54 MovieClip in Symbol 85 MovieClip Frame 39
onClipEvent (load) {
_global.jungleBeat.start();
_root.musicOn = true;
this.swapDepths(20003);
}
onClipEvent (enterFrame) {
_global.jungleBeat.onSoundComplete = function () {
if (_root.musicOn == true) {
_global.jungleBeat.start();
}
};
}
Symbol 85 MovieClip Frame 54
stop();
Symbol 85 MovieClip Frame 55
_root.play();
Symbol 93 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 1
yVelocity = 0;
yAccel = 0;
yPos = _y;
k = 0.08;
y1 = _y;
m = 0.9;
decay = 0.8;
this.onEnterFrame = function () {
var _local1 = _global;
timerBar._xscale = timerBar._xscale - barrelSpeed;
if ((timerBar._xscale < 0) && (_local1.gamePlay == true)) {
_local1.barrelsMissed++;
trace(_local1.barrelsMissed);
theState = "moveUp";
timerBar._xscale = 100;
}
switch (theState) {
case "moveUp" :
_y = (_y - 10);
if (_y < -20) {
innerBarrel.gotoAndStop(random(5) + 1);
theState = "rePossision";
}
return;
case "rePossision" :
_x = (random(220) + 325);
y1 = random(230) + 70;
yPos = _y;
theState = "reset";
timerBar._xscale = 100;
return;
case "reset" :
yAccel = (-(k / m)) * (yPos - y1);
yVelocity = yVelocity * decay;
yVelocity = yVelocity + yAccel;
yPos = yPos + yVelocity;
_y = yPos;
return;
case "roundOver" :
timerBar._xscale = 100;
_y = (_y - 10);
if (_y < -60) {
theState = "waitUp";
}
return;
case "waitUp" :
timerBar._xscale = 100;
return;
}
};
stop();
Symbol 118 MovieClip Frame 1
shotCoordY = _y;
shotCoordX = _x;
startX = this._x;
startY = this._y;
shaftNose = 40;
stop();
Instance of Symbol 117 MovieClip "cannon" in Symbol 118 MovieClip Frame 1
onClipEvent (load) {
power = 0;
}
onClipEvent (enterFrame) {
speed = power;
}
Instance of Symbol 77 MovieClip in Symbol 118 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (12);
frameLabels = new Array("lookLeft", "lookRight", "lookStraight");
}
onClipEvent (enterFrame) {
directionNum = random(3);
randomTime = random(150);
if (randomTime == 5) {
if (previousNum == directionNum) {
directionNum = directionNum + 1;
}
gotoAndPlay(frameLabels[directionNum]);
previousNum = directionNum;
}
}
Symbol 125 MovieClip Frame 1
function launchStatus() {
m = 4;
_visible = true;
scaleTarget = 100;
alphaTarget = 100;
statusBoard = setInterval(springIn, 30);
}
function prossesMessage() {
if (_parent.hitTag == undefined) {
announceTurn();
} else {
announceHit();
}
}
function announceHit() {
theText = ("You hit the " + _parent.hitTag) + " ,sweet1";
clearInterval(theTimer);
theTimer = setInterval(announceTurn, 1800);
}
function announceTurn() {
theText = ("it's " + _parent.turnName) + "'s turn!";
clearInterval(theTimer);
theTimer = setInterval(endStatus, 1800);
}
function endStatus() {
m = 2;
theText = "";
clearInterval(theTimer);
scaleTarget = 5;
alphaTarget = 5;
statusBoard = setInterval(springIn, 30);
}
function startTurn() {
_visible = false;
_parent.startTurn();
}
this._alpha = 5;
this._xscale = 5;
this._yscale = 5;
_visible = false;
xVelocity = 0;
yVelocity = 0;
xAccel = 0;
yAccel = 0;
startScale = _xscale;
startAlpha = _alpha;
k = 0.9;
scaleTarget = 100;
alphaTarget = 100;
m = 4;
decay = 0;
springIn = function () {
xAccel = (-(k / m)) * (startScale - scaleTarget);
yAccel = (-(k / m)) * (startAlpha - alphaTarget);
xVelocity = xVelocity * decay;
yVelocity = yVelocity * decay;
xVelocity = xVelocity + xAccel;
yVelocity = yVelocity + yAccel;
startScale = startScale + xVelocity;
startAlpha = startAlpha + yVelocity;
_xscale = startScale;
_yscale = startScale;
_alpha = startAlpha;
if (startScale > 99) {
clearInterval(statusBoard);
prossesMessage();
} else if (startScale < 6) {
clearInterval(statusBoard);
startTurn();
}
};
Symbol 127 MovieClip Frame 1
roundHeadText = (" Round " + _root.roundNumber) + " Complete!";
Symbol 151 Button
on (release) {
_parent.play();
_root.roundUp();
}
Symbol 152 Button
on (release) {
_global.inBarrel.start();
_parent.play();
_root.roundUp();
}
Symbol 153 MovieClip Frame 9
count++;
if (count >= 80) {
count = 0;
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 153 MovieClip Frame 13
Symbol 153 MovieClip Frame 17
_global.inBarrel.start();
Symbol 153 MovieClip Frame 20
timebonusScore.timeBonus = Math.floor(_global.timeLeft * 5);
Symbol 153 MovieClip Frame 23
_global.inBarrel.start();
Symbol 153 MovieClip Frame 25
count++;
if (count >= 30) {
count = 0;
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 153 MovieClip Frame 30
_global.inBarrel.start();
Symbol 153 MovieClip Frame 33
accuracyScore.accuracy = Math.floor((_root.roundBarrelAmount / _global.bananasTossed) * 1000);
Symbol 153 MovieClip Frame 36
_global.inBarrel.start();
Symbol 153 MovieClip Frame 38
count++;
if (count >= 30) {
count = 0;
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 153 MovieClip Frame 43
_global.inBarrel.start();
Symbol 153 MovieClip Frame 46
barrelsmissedScore.barrelsmissed = _global.barrelsMissed * -100;
Symbol 153 MovieClip Frame 49
_global.inBarrel.start();
Symbol 153 MovieClip Frame 51
count++;
if (count >= 30) {
count = 0;
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 153 MovieClip Frame 56
_global.inBarrel.start();
Symbol 153 MovieClip Frame 59
roundtotalScore.roundTotal = (barrelsmissedScore.barrelsmissed + accuracyScore.accuracy) + timebonusScore.timeBonus;
Symbol 153 MovieClip Frame 62
_global.inBarrel.start();
Symbol 153 MovieClip Frame 64
count++;
if (count >= 30) {
count = 0;
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 153 MovieClip Frame 76
_global.inBarrel.start();
Symbol 153 MovieClip Frame 79
grandtotalScore.grandTotal = _global.grandTotal;
Symbol 153 MovieClip Frame 82
_global.inBarrel.start();
Symbol 153 MovieClip Frame 84
if (grandtotalScore.grandTotal >= (roundtotalScore.roundTotal + _global.grandTotal)) {
grandtotalScore.grandTotal = roundtotalScore.roundTotal + _global.grandTotal;
_global.grandTotal = roundtotalScore.roundTotal + _global.grandTotal;
} else {
grandtotalScore.grandTotal = grandtotalScore.grandTotal + 9;
gotoAndPlay(_currentframe - 1);
}
Symbol 153 MovieClip Frame 89
_global.inBarrel.start();
stop();
Symbol 154 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 2
_global.cheer.start();
Symbol 154 MovieClip Frame 10
stop();
Symbol 167 MovieClip Frame 1
sendscore = new LoadVars();
sendscore.gscore = grandTotal;
sendscore.gname = "BananaTossibpg";
sendscore.send("index.php?act=Arcade&do=newscore", "_self", "POST");
Symbol 168 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 2
_global.gamePlay = false;
_root.theBarrel.theState = "roundOver";
Symbol 168 MovieClip Frame 19
stop();