Frame 1
_quality = "BEST";
_global.beat1 = false;
_global.beat2 = false;
_global.beat3 = false;
_global.winCount = 0;
_global.barrelNum = 10;
stop();
Frame 2
stop();
Frame 9
stop();
Frame 24
stop();
Symbol 10 MovieClip [kongFallClip] Frame 1
Symbol 18 MovieClip [smlB] Frame 1
theDrag = function () {
_parent.draggin = true;
startDrag (this, false, 0, 0, 720, 500);
};
stopTheDrag = function () {
_parent.draggin = false;
stopDrag();
};
barrelSpot.onPress = function () {
if (_parent.barrelsClickable == true) {
theDrag();
}
};
barrelSpot.onRelease = function () {
if (_parent.barrelsClickable == true) {
_parent.BarrelHitWall(_name);
if (this._parent._parent.obClip.hitTest(_x, _y, true)) {
_parent.swapWallBarrel(_name);
}
stopTheDrag();
}
};
tabSpot.onPress = function () {
if (_parent.barrelsClickable == true) {
onMouseMove = function () {
_rotation = ((Math.atan2(_parent._ymouse - _y, _parent._xmouse - _x) * 180) / Math.PI);
};
}
};
tabSpot.onRelease = function () {
if (_parent.barrelsClickable == true) {
_parent.BarrelHitWall(_name);
onMouseMove = null;
}
};
tabSpot.onReleaseOutside = function () {
if (_parent.barrelsClickable == true) {
_parent.BarrelHitWall(_name);
onMouseMove = null;
}
};
stop();
Symbol 19 MovieClip [ball] Frame 1
kiddy.onEnterFrame = function () {
kiddy._rotation = kiddy._rotation + 40;
};
dixie.onEnterFrame = function () {
dixie._rotation = dixie._rotation + 25;
};
Symbol 23 MovieClip [smlBWALLanim] Frame 7
this.onEnterFrame = function () {
_alpha = (_alpha - 30);
if (_alpha <= 0) {
removeMovieClip(this);
}
};
Symbol 24 MovieClip Frame 1
s = 1;
while (s < 30) {
smokey = attachMovie("smokePar", "smokePar" + s, s);
smokey._x = random(20) - 15;
smokey._y = -21 - random(2);
theScale = random(150) + 75;
smokey._xscale = theScale;
smokey._yscale = theScale;
smokey._alpha = random(50) + 50;
theTime = Math.random(2);
theRise = random(20) + 5;
smokey.xVelocity = 0;
smokey.xAccel = 0;
smokey.xPos = smokey._y;
smokey.aVelocity = 0;
smokey.aAccel = 0;
smokey.aPos = smokey._alpha;
smokey.k = 0.8;
smokey.x1 = smokey._y - theRise;
smokey.a1 = 0;
smokey.m = 2 + theTime;
smokey.decay = 0.1;
smokey.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
this.aAccel = (-(this.k / this.m)) * (this.aPos - this.a1);
this.aVelocity = this.aVelocity * this.decay;
this.aVelocity = this.aVelocity + this.aAccel;
this.aPos = this.aPos + this.aVelocity;
this._alpha = this.aPos;
if (this._alpha <= 1) {
removeMovieClip(this);
}
};
s++;
}
Symbol 25 MovieClip [smlBanim] Frame 19
this.onEnterFrame = function () {
_alpha = (_alpha - 30);
if (_alpha <= 0) {
removeMovieClip(this);
}
};
Symbol 31 MovieClip [firePars] Frame 1
stop();
Symbol 31 MovieClip [firePars] Frame 2
stop();
Symbol 31 MovieClip [firePars] Frame 3
stop();
Symbol 42 MovieClip Frame 10
stop();
Symbol 42 MovieClip Frame 17
stop();
Symbol 42 MovieClip Frame 24
gotoAndStop ("intro");
Symbol 54 MovieClip Frame 1
var fireCount = 1;
Symbol 54 MovieClip Frame 3
fireCount++;
var flamey = attachMovie("firePars", "firePars" + fireCount, fireCount);
flamey._x = -12;
flamey._y = -22;
flamey._xscale = 30;
flamey._yscale = 30;
flamey.gotoAndStop(random(3) + 1);
flamey.yVelocity = 0;
flamey.yAccel = 0;
flamey.yPos = flamey._y;
flamey.xVelocity = 0;
flamey.xAccel = 0;
flamey.xPos = flamey._x;
flamey.ysVelocity = 0;
flamey.ysAccel = 0;
flamey.ysPos = flamey._yscale;
flamey.xsVelocity = 0;
flamey.xsAccel = 0;
flamey.xsPos = flamey._xscale;
flamey.aVelocity = 0;
flamey.aAccel = 0;
flamey.aPos = flamey._alpha;
flamey.x1 = -40 + (random(10) - 5);
flamey.y1 = -85;
flamey.ys1 = 100;
flamey.xs1 = 100;
flamey.a1 = 0;
flamey.k = 0.8;
flamey.ak = 0.6;
flamey.m = 6;
flamey.decay = 0;
flamey.onEnterFrame = function () {
this.yAccel = (-(this.k / this.m)) * (this.yPos - this.y1);
this.yVelocity = this.yVelocity * this.decay;
this.yVelocity = this.yVelocity + this.yAccel;
this.yPos = this.yPos + this.yVelocity;
this._y = this.yPos;
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._x = this.xPos;
this.ysAccel = (-(this.k / this.m)) * (this.ysPos - this.ys1);
this.ysVelocity = this.ysVelocity * this.decay;
this.ysVelocity = this.ysVelocity + this.ysAccel;
this.ysPos = this.ysPos + this.ysVelocity;
this._yscale = this.ysPos;
this.xsAccel = (-(this.k / this.m)) * (this.xsPos - this.xs1);
this.xsVelocity = this.xsVelocity * this.decay;
this.xsVelocity = this.xsVelocity + this.xsAccel;
this.xsPos = this.xsPos + this.xsVelocity;
this._xscale = this.xsPos;
this.aAccel = (-(this.ak / this.m)) * (this.aPos - this.a1);
this.aVelocity = this.aVelocity * this.decay;
this.aVelocity = this.aVelocity + this.aAccel;
this.aPos = this.aPos + this.aVelocity;
this._alpha = this.aPos;
if (this._alpha <= 10) {
removeMovieClip(this);
}
};
Symbol 54 MovieClip Frame 5
gotoAndPlay (2);
Symbol 60 MovieClip Frame 8
_global.fire.start();
Symbol 60 MovieClip Frame 16
stop();
Symbol 61 MovieClip Frame 1
onEnterFrame = function () {
var _local5 = _parent._parent.getBytesLoaded();
var _local4 = _parent._parent.getBytesTotal();
var _local6 = (_local5 / _local4) * 100;
var _local7 = int(_local6) + "%";
var _local3 = 150 * (int(_local6) * 0.01);
wickFire._x = _local3;
mask._x = _local3;
if (_local5 >= _local4) {
_local7 = "100%";
play();
delete this.onEnterFrame;
}
};
stop();
Symbol 61 MovieClip Frame 15
_parent.play();
stop();
Symbol 62 MovieClip Frame 1
Symbol 62 MovieClip Frame 16
stop();
Symbol 62 MovieClip Frame 18
_parent.play();
stop();
Symbol 70 Button
on (release) {
gotoAndPlay ("gameOn");
_parent.gotoAndPlay("gameOn");
}
Symbol 71 Button
on (release) {
gotoAndPlay ("instructions");
}
Symbol 82 Button
on (release) {
_parent.gotoAndPlay("instructionsOut");
}
Symbol 90 Button
on (release) {
getURL ("http://www.donkeykongcountry.com", "_blank");
}
Symbol 99 Button
on (release) {
gotoAndPlay ("gameOnAgain");
_parent.gotoAndPlay("gameOn");
}
Symbol 100 MovieClip Frame 9
stop();
Symbol 100 MovieClip Frame 18
stop();
Symbol 100 MovieClip Frame 27
gotoAndPlay ("wannaPlay");
Symbol 100 MovieClip Frame 28
stop();
Symbol 100 MovieClip Frame 40
gotoAndPlay ("barrelIn");
Symbol 100 MovieClip Frame 48
stop();
Symbol 100 MovieClip Frame 49
dixieClip.xVelocity = 0;
dixieClip.xAccel = 0;
dixieClip.xPos = dixieClip._x;
dixieClip.k = 0.8;
dixieClip.x1 = 276;
dixieClip.m = 4;
dixieClip.decay = 0.5;
dixieClip.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._x = this.xPos;
if (this._x <= (this.x1 + 1)) {
}
};
c3Logo.xVelocity = 0;
c3Logo.xAccel = 0;
c3Logo.xPos = c3Logo._y;
c3Logo.k = 0.4;
c3Logo.x1 = 168;
c3Logo.m = 4;
c3Logo.decay = 0.5;
c3Logo.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
if (this._y <= (this.x1 + 1)) {
}
};
kongrats.xVelocity = 0;
kongrats.xAccel = 0;
kongrats.xPos = kongrats._y;
kongrats.k = 0.8;
kongrats.x1 = 102;
kongrats.m = 3;
kongrats.decay = 0.5;
kongrats.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
if (this._y <= (this.x1 + 1)) {
}
};
blast.xVelocity = 0;
blast.xAccel = 0;
blast.xPos = blast._y;
blast.k = 0.8;
blast.x1 = 143;
blast.m = 3;
blast.decay = 0.5;
blast.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
if (this._y <= (this.x1 + 1)) {
}
};
_global.fuse.stop();
_global.letter.start();
Symbol 100 MovieClip Frame 50
stop();
Symbol 100 MovieClip Frame 51
dixieClip.xVelocity = 0;
dixieClip.xAccel = 0;
dixieClip.xPos = dixieClip._x;
dixieClip.k = 0.8;
dixieClip.x1 = 510;
dixieClip.m = 4;
dixieClip.decay = 0.5;
dixieClip.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._x = this.xPos;
if (this._x <= (this.x1 + 1)) {
}
};
c3Logo.xVelocity = 0;
c3Logo.xAccel = 0;
c3Logo.xPos = c3Logo._y;
c3Logo.k = 0.4;
c3Logo.x1 = 326;
c3Logo.m = 4;
c3Logo.decay = 0.5;
c3Logo.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
if (this._y <= (this.x1 + 1)) {
}
};
kongrats.xVelocity = 0;
kongrats.xAccel = 0;
kongrats.xPos = kongrats._y;
kongrats.k = 0.8;
kongrats.x1 = -84;
kongrats.m = 3;
kongrats.decay = 0.5;
kongrats.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
if (this._y <= (this.x1 + 1)) {
}
};
blast.xVelocity = 0;
blast.xAccel = 0;
blast.xPos = blast._y;
blast.k = 0.8;
blast.x1 = -37;
blast.m = 3;
blast.decay = 0.5;
blast.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
if (this._y <= (this.x1 + 1)) {
}
};
Symbol 100 MovieClip Frame 62
gotoAndStop ("clear");
Symbol 100 MovieClip Frame 63
dixieClip.xVelocity = 0;
dixieClip.xAccel = 0;
dixieClip.xPos = dixieClip._x;
dixieClip.k = 0.8;
dixieClip.x1 = 266;
dixieClip.m = 4;
dixieClip.decay = 0.5;
dixieClip.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._x = this.xPos;
if (this._x <= (this.x1 + 1)) {
}
};
c3Logo.xVelocity = 0;
c3Logo.xAccel = 0;
c3Logo.xPos = c3Logo._y;
c3Logo.k = 0.4;
c3Logo.x1 = 168;
c3Logo.m = 4;
c3Logo.decay = 0.5;
c3Logo.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
if (this._y <= (this.x1 + 1)) {
}
};
tooBad.xVelocity = 0;
tooBad.xAccel = 0;
tooBad.xPos = tooBad._y;
tooBad.k = 0.8;
tooBad.x1 = 35;
tooBad.m = 3;
tooBad.decay = 0.5;
tooBad.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
if (this._y <= (this.x1 + 1)) {
}
};
blast.xVelocity = 0;
blast.xAccel = 0;
blast.xPos = blast._y;
blast.k = 0.8;
blast.x1 = 113;
blast.m = 3;
blast.decay = 0.5;
blast.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
if (this._y <= (this.x1 + 1)) {
}
};
_global.fuse.stop();
_global.ouch.start();
Symbol 100 MovieClip Frame 64
stop();
Symbol 100 MovieClip Frame 65
dixieClip.xVelocity = 0;
dixieClip.xAccel = 0;
dixieClip.xPos = dixieClip._x;
dixieClip.k = 0.8;
dixieClip.x1 = 510;
dixieClip.m = 4;
dixieClip.decay = 0.5;
dixieClip.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._x = this.xPos;
if (this._x <= (this.x1 + 1)) {
}
};
c3Logo.xVelocity = 0;
c3Logo.xAccel = 0;
c3Logo.xPos = c3Logo._y;
c3Logo.k = 0.4;
c3Logo.x1 = 326;
c3Logo.m = 4;
c3Logo.decay = 0.5;
c3Logo.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
if (this._y <= (this.x1 + 1)) {
}
};
tooBad.xVelocity = 0;
tooBad.xAccel = 0;
tooBad.xPos = tooBad._y;
tooBad.k = 0.8;
tooBad.x1 = -84;
tooBad.m = 3;
tooBad.decay = 0.5;
tooBad.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
if (this._y <= (this.x1 + 1)) {
}
};
blast.xVelocity = 0;
blast.xAccel = 0;
blast.xPos = blast._y;
blast.k = 0.8;
blast.x1 = -37;
blast.m = 3;
blast.decay = 0.5;
blast.onEnterFrame = function () {
this.xAccel = (-(this.k / this.m)) * (this.xPos - this.x1);
this.xVelocity = this.xVelocity * this.decay;
this.xVelocity = this.xVelocity + this.xAccel;
this.xPos = this.xPos + this.xVelocity;
this._y = this.xPos;
if (this._y <= (this.x1 + 1)) {
}
};
Symbol 100 MovieClip Frame 82
gotoAndStop ("clear");
Symbol 115 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 2
stop();
Instance of Symbol 124 MovieClip in Symbol 125 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent.theBarryNum = _global.barrelNum;
}
Symbol 134 MovieClip Frame 1
stop();
Symbol 134 MovieClip Frame 3
stop();
Symbol 148 MovieClip Frame 7
stop();
Symbol 151 MovieClip Frame 7
stop();
Symbol 154 MovieClip Frame 7
stop();
Symbol 155 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 2
_parent.wallCount = 9;
stop();
Symbol 155 MovieClip Frame 3
_parent.wallCount = 10;
stop();
Symbol 155 MovieClip Frame 4
_parent.wallCount = 17;
stop();
Symbol 164 MovieClip Frame 1
function BarrelHitWall(theClipName) {
this.theB = 0;
while (this.theB < 20) {
var _local3 = this[theClipName];
var _local2 = new Object();
_local2.x = _local3["bht" + theB]._x;
_local2.y = _local3["bht" + theB]._y;
_local3.localToGlobal(_local2);
if (theHit == true) {
trace(hitX);
}
if (this.wallsClip.hitTest(_local2.x, _local2.y, true)) {
swapWallBarrel(theClipName);
}
this.theB++;
}
if (wallsClip.hitTest(_local2.x, _local2.y, true)) {
var theHit = true;
return(theHit);
}
}
_parent.frameClip.gotoAndPlay("timerIn");
var timeMod = 0;
_global.barrelNum = 10;
var barrelCount = 0;
var wallCount = 0;
var boundCount = 3;
var mapNum = 1;
var coinCount = 0;
var coinXPosArray1 = new Array(75, 75, 160, 255, 331, 407, 407, 331, 255, 160, 128, 160, 255, 331);
var coinYPosArray1 = new Array(119, 164, 164, 164, 164, 164, 115, 115, 115, 115, 86, 57, 55, 56);
var coinXPosArray2 = new Array(22, 22, 82, 84, 85, 142, 142, 142, 206, 206, 206, 206, 266, 268, 268, 268, 328, 328, 327);
var coinYPosArray2 = new Array(140, 223, 91, 140, 223, 30, 80, 140, 28, 80, 140, 190, 28, 80, 140, 190, 28, 113, 176);
var coinXPosArray3 = new Array(82, 82, 82, 22, 141, 204, 204, 204, 140, 173, 140, 202, 273, 330, 330, 258, 258, 341, 347, 306, 394);
var coinYPosArray3 = new Array(37, 90, 149, 150, 150, 150, 192, 97, 97, 63, 27, 27, 24, 24, 76, 76, 189, 189, 134, 133, 133);
var coinNum = coinXPosArray1.length;
var newBarrel;
var barrelsClickable = true;
var youWon = false;
var firing = false;
var draggin = false;
signsClip.swapDepths(5501);
gameOver = function () {
removeMovieClip(newBarrel);
signsClip.gotoAndStop("lose");
_parent.timerClip.gotoAndStop("gameOver");
turnButtonsOff();
_parent.introClip.gotoAndPlay("gameOver");
_parent.gotoAndPlay("fadeGameOut");
_parent.frameClip.gotoAndPlay("timerOut");
resetGame();
};
gameWinner = function () {
_global.letter.start();
_parent.timerClip.gotoAndStop("gameOver");
turnButtonsOff();
_global["beat" + _global.winCount] = true;
if (_global.winCount >= 3) {
_global.beat1 = false;
_global.beat2 = false;
_global.beat3 = false;
_global.winCount = 0;
}
_parent.introClip.gotoAndPlay("gameWin");
_parent.gotoAndPlay("fadeGameOut");
_parent.frameClip.gotoAndPlay("timerOut");
};
dropIt = function () {
BarrelHitWall(newBarrel._name);
var _local2 = newBarrel._x;
var _local1 = newBarrel._y;
var _local3 = newBarrel._rotation;
draggin = false;
removeMovieClip(newBarrel);
newBarrel = attachMovie("smlB", "smlBarrel" + (barrelCount - 1), barrelCount + 2500);
newBarrel._x = _local2;
newBarrel._y = _local1;
newBarrel._rotation = _local3;
if (wallsClip.hitTest(newBarrel._x, newBarrel._y, true)) {
swapWallBarrel(newBarrel._name);
}
if (obClip.hitTest(newBarrel._x, newBarrel._y, true)) {
swapWallBarrel(newBarrel._name);
}
BarrelHitWall(newBarrel._name);
};
timesUp = function () {
if (draggin == true) {
dropIt();
}
turnButtonsOff();
if (firing == false) {
firing = true;
_parent.kongsClip.play();
}
};
makeMap = function () {
if (_global.beat1 == true) {
timeMod = 100;
mapNum = 2;
_global.barrelNum = 20;
if (_global.beat2 == true) {
timeMod = 125;
mapNum = 3;
barrelNum = 25;
}
if (_global.beat3 == true) {
timeMod = 50;
mapNum = 1;
_global.barrelNum = 10;
}
} else {
timeMod = 50;
mapNum = 1;
_global.barrelNum = 10;
}
coinNum = this["coinXPosArray" + mapNum].length;
makeCoins(mapNum);
wallsClip.gotoAndPlay(mapNum + 1);
};
startGame = function () {
youWon = false;
turnButtonsOn();
makeMap();
};
resetGame = function () {
cb = 0;
while (cb < barrelCount) {
removeMovieClip(this["smlBarrel" + cb]);
cb++;
}
cc = 0;
while (cc < coinNum) {
removeMovieClip(this["coin" + cc]);
cc++;
}
coinCount = 0;
wallsClip.gotoAndPlay(1);
};
makeCoins = function (mapNum) {
mc = 0;
while (mc < coinNum) {
elCoino = attachMovie("coin", "coin" + mc, mc + 2000);
elCoino._x = this["coinXPosArray" + mapNum][mc];
elCoino._y = this["coinYPosArray" + mapNum][mc];
mc++;
}
};
checkForWinner = function () {
if (coinCount == coinNum) {
if (youWon == false) {
gameWinner();
youWon = true;
}
} else {
_global.ouch.start();
gameOver();
}
};
turnButtonsOff = function () {
fireButton.onRelease = null;
fireButton.onPress = null;
barrelButton.onPress = null;
barrelButton.onReleaseOutside = null;
barrelButton.onRelease = null;
barrelsClickable = false;
};
turnButtonsOn = function () {
barrelsClickable = true;
fireButton.onPress = function () {
_parent.fireButtonG.gotoAndStop("down");
};
fireButton.onRelease = function () {
if (firing == false) {
firing = true;
_parent.kongsClip.play();
_parent.fireButtonG.gotoAndStop("up");
turnButtonsOff();
}
};
fireButton.onReleaseOutside = function () {
_parent.fireButtonG.gotoAndStop("up");
};
barrelButton.onReleaseOutside = function () {
BarrelHitWall(newBarrel._name);
var _local3 = newBarrel._x;
var _local2 = newBarrel._y;
draggin = false;
removeMovieClip(newBarrel);
newBarrel = this._parent.attachMovie("smlB", "smlBarrel" + (barrelCount - 1), barrelCount + 2500);
newBarrel._x = _local3;
newBarrel._y = _local2;
if (this._parent.wallsClip.hitTest(newBarrel._x, newBarrel._y, true)) {
trace("wall hit");
}
if (this._parent.obClip.hitTest(newBarrel._x, newBarrel._y, true)) {
swapWallBarrel(newBarrel._name);
trace("bound hit");
}
BarrelHitWall(newBarrel._name);
};
barrelButton.onRelease = function () {
BarrelHitWall(newBarrel._name);
draggin = false;
var _local3 = newBarrel._x;
var _local2 = newBarrel._y;
if (this._parent.wallsClip.hitTest(newBarrel._x, newBarrel._y, true)) {
}
if (this._parent.obClip.hitTest(newBarrel._x, newBarrel._y, true)) {
swapWallBarrel(newBarrel._name);
}
removeMovieClip(newBarrel);
newBarrel = this._parent.attachMovie("smlB", "smlBarrel" + (barrelCount - 1), barrelCount + 2500);
newBarrel._x = _local3;
newBarrel._y = _local2;
BarrelHitWall(newBarrel._name);
};
barrelButton.onPress = function () {
if (_global.barrelNum > 0) {
_global.barrelNum--;
trace(_global.barrelNum);
draggin = true;
newBarrel = _parent.attachMovie("smlB", "smlBarrel" + barrelCount, barrelCount + 2500);
newBarrel._x = _parent._xmouse;
newBarrel._y = _parent._ymouse;
startDrag (newBarrel, false, 0, 0, 720, 500);
barrelCount++;
}
};
};
swapKongs = function (theKx, theKy, theKrot) {
kongFallClip = attachMovie("kongFallClip", "kongFallClip", 10);
kongFallClip._x = theKx;
kongFallClip._y = theKy;
kongFallClip._rotation = theKrot;
kongFallClip.onEnterFrame = function () {
if (this._y >= 600) {
this.removeMovieClip();
}
};
};
fireBarrel = function (barrelN) {
var _local9 = 10;
var _local19 = 100;
var _local13 = this["smlBarrel" + barrelN]._x;
var _local12 = this["smlBarrel" + barrelN]._y;
var _local8 = this["smlBarrel" + barrelN]._rotation - 90;
var _local11 = Math.cos((_local8 * Math.PI) / 180);
var _local10 = Math.sin((_local8 * Math.PI) / 180);
var _local18 = _local13 + (25 * _local11);
var _local17 = _local12 + (25 * _local10);
var _local15 = _local9 * _local11;
var _local14 = _local9 * _local10;
theBall = this.attachMovie("ball", ball, 10);
theBall._x = _local18;
theBall._y = _local17;
theBall._rotation = _local8 + 90;
theBall.xVelocity = _local15;
theBall.yVelocity = _local14;
theBall.onEnterFrame = function () {
this.c = 0;
while (this.c < (this._parent.coinNum + 1)) {
if (this._parent["coin" + this.c].hitTest(this._x, this._y, true)) {
this._parent.coinCount++;
this._parent["coin" + this.c].removeMovieClip();
_global.plink.start();
}
this.c++;
}
b = 0;
while (b < this._parent.barrelCount) {
if (this._parent["smlBarrel" + b].hitTest(this._x, this._y, true)) {
this.bc = 0;
while (this.bc < this._parent.coinNum) {
var _local3 = this._parent["coin" + this.bc];
if (this._parent["smlBarrel" + b].hitTest(_local3)) {
this._parent.coinCount++;
this._parent["coin" + this.bc].removeMovieClip();
_global.plink.start();
}
this.bc++;
}
_global.fire.start();
var _local6 = this._parent["smlBarrel" + b]._x;
var _local5 = this._parent["smlBarrel" + b]._y;
var _local4 = this._parent["smlBarrel" + b]._rotation;
var _local7 = this._parent["smlBarrel" + b].getDepth();
fireBarrel(b);
newBarrel = attachMovie("smlBanim", "smlBanim" + b, _local7);
newBarrel._x = _local6;
newBarrel._y = _local5;
newBarrel._rotation = _local4;
}
b++;
}
if (this._parent.obClip.hitTest(this._x, this._y, true)) {
if (this._parent.youWon == false) {
_global.ouch.start();
this._parent.gameOver();
}
this.removeMovieClip();
}
if (this._parent.wallsClip["wallsClip" + this._parent.mapNum].hitTest(this._x, this._y, true)) {
_global.ouch.start();
this._parent.gameOver();
this._parent.swapKongs(this._x, this._y, this._rotation);
this.removeMovieClip();
}
if (this._parent.theExit.hitTest(this._x, this._y, true)) {
checkForWinner();
}
this._x = this._x + this.xVelocity;
this._y = this._y + this.yVelocity;
};
};
swapWallBarrel = function (theBarName) {
_global.barrelNum++;
var _local3 = this[theBarName];
var _local6 = _local3._x;
var _local5 = _local3._y;
var _local4 = _local3._rotation;
var _local7 = _local3.getDepth();
newBarrel2 = attachMovie("smlBWALLanim", "smlBWALLanim" + barrelCount, _local7);
newBarrel2._x = _local6;
newBarrel2._y = _local5;
newBarrel2._rotation = _local4;
};
_global.plink = new Sound(this);
_global.plink.attachSound("plink");
_global.fuse = new Sound(this);
_global.fuse.attachSound("fuse");
_global.ouch = new Sound(this);
_global.ouch.attachSound("ouch");
_global.fire = new Sound(this);
_global.fire.attachSound("fire");
_global.letter = new Sound(this);
_global.letter.attachSound("letter");
startGame();
Symbol 168 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 9
_parent.theGame.fireBarrel("Start");
_global.fire.start();
_parent.startBar.gotoAndPlay("puff");
Symbol 168 MovieClip Frame 10
stop();
Symbol 177 MovieClip Frame 1
Symbol 177 MovieClip Frame 4
_global.fuse.start(0, 99999);
stop();
Instance of Symbol 175 MovieClip "timerControl" in Symbol 177 MovieClip Frame 4
onClipEvent (load) {
yVelocity = 0;
yAccel = 0;
yPos = _parent.wickFire._y;
k = 0.1;
y1 = 13;
m = 175;
decay = 0;
}
onClipEvent (enterFrame) {
yAccel = (-(k / m)) * (yPos - y1);
yVelocity = yVelocity * decay;
yVelocity = yVelocity + yAccel;
yPos = yPos + yVelocity;
_parent.wickFire._y = yPos;
_parent.wickFire._x = _parent.wickFire._x + 0.1;
_parent.mask._x = _parent.mask._x + 0.1;
if (_parent.wickFire._x >= -17) {
_parent.gotoAndPlay("fuseTween");
}
}
Symbol 177 MovieClip Frame 6
tweenfireX.stop();
Symbol 177 MovieClip Frame 174
_parent.theGame.timesUp();
_global.fuse.stop();
stop();
Symbol 177 MovieClip Frame 175
tweenfireX.stop();
stop();