Frame 1
$myVersion = $version;
var my_flashversion = $myVersion;
FV = my_flashversion.charAt(4);
if (FV < 8) {
NeedFlash8._x = 250;
stop();
}
_root.VolumeOff = false;
_root.Initial = 0;
_root.Volume = 70;
Frame 2
if (_root.getBytesLoaded() != _root.getBytesTotal()) {
gotoAndPlay (1);
}
Frame 3
_root.Initial = 0;
myURL = _url;
OkDomain = "nationlocation.com";
if (myURL.indexOf(OkDomain) != -1) {
_root.GameStolen = false;
} else {
_root.GameStolen = true;
}
stop();
Frame 8
_root.MENUITEMSound = new Sound();
_root.MENUITEMSound.attachSound("MENUITEM");
_root.MENUITEMSound.setVolume(Volume);
Frame 9
gotoAndPlay (8);
Frame 10
function Initialize() {
a1 = (a2 = (a3 = (a4 = (a5 = (a6 = (a7 = (a8 = (a9 = (a10 = (a11 = (a12 = 0)))))))))));
b1 = (b2 = 0);
fpstotal = 0;
b3 = fps;
MoveVert = 0;
GameScore = 0;
GameScreenX = 600;
GameScreenY = 520;
NumMonkies = 10;
alp = 0;
bally._visible = false;
GLT = -3;
GameLevel = -3;
Branch._x = 10000;
GameScore = 0;
StartMonkey = NumMonkies;
PleaseWait = true;
Splash._x = 398;
LevelComplete = false;
TrampMove = 20;
LevelSkip = false;
BranchActive = false;
TallyTime = false;
BranchClock = 0;
TrampActive = false;
LeafActive = false;
Ropes.stop();
AirGravityY = 1;
TurboActive = false;
FezzActive = false;
TimeBarIncrementor = 0.05;
TimeBarIncrementor = TimeBarIncrementor - 0.0001;
if (TimeBarIncrementor < 0.025) {
TimeBarIncrementor = 0.025;
}
TimeBar._xscale = 100;
TimeBar._x = 558;
TimeBar._y = 57;
TimeBarX = TimeBar._x;
Tick = 0;
Turbo = 0;
InitialJump = true;
GameFlipped = false;
OnBalloon = false;
_root.PublishedLevel = 1;
Splash._y = 254;
TouchingCounter = 0;
swear = false;
Initial = 5;
Flip = false;
FlipConstant = 12;
Wind = false;
RopeStart = 0;
Floating = false;
BananaActive = false;
Monkey._xscale = 50;
Monkey._yscale = 50;
Rope = new Array();
RopeSpeed = new Array();
RopeXData = new Array();
RopeYData = new Array();
RScaleData = new Array();
RopeDirection = new Array();
RGravity = new Array();
RopeData();
SetupSounds();
SetupFirstLevel();
}
function SetupSounds() {
ShortLoungeSound = new Sound();
ShortLoungeSound.attachSound("ShortLounge");
ShortLoungeSound.setVolume(Volume);
SWIPEDSound = new Sound();
SWIPEDSound.attachSound("SWIPED");
SWIPEDSound.setVolume(Volume);
THUDSound = new Sound();
THUDSound.attachSound("THUD");
THUDSound.setVolume(Volume);
harpSound = new Sound();
harpSound.attachSound("harp");
harpSound.setVolume(Volume);
golfSound = new Sound();
golfSound.attachSound("golf");
golfSound.setVolume(Volume);
BLUEJAYSound = new Sound();
BLUEJAYSound.attachSound("BLUEJAY");
BLUEJAYSound.setVolume(Volume);
eagleSound = new Sound();
eagleSound.attachSound("eagle");
eagleSound.setVolume(Volume);
CRICKETSound = new Sound();
CRICKETSound.attachSound("CRICKET");
CRICKETSound.setVolume(Volume);
canarySound = new Sound();
canarySound.attachSound("canary");
canarySound.setVolume(Volume);
cardinalSound = new Sound();
cardinalSound.attachSound("cardinal");
cardinalSound.setVolume(Volume);
finchSound = new Sound();
finchSound.attachSound("finch");
finchSound.setVolume(Volume);
hsparowSound = new Sound();
hsparowSound.attachSound("hsparow");
hsparowSound.setVolume(Volume);
woodpeckerSound = new Sound();
woodpeckerSound.attachSound("woodpecker");
woodpeckerSound.setVolume(Volume);
windSound = new Sound();
windSound.attachSound("wind");
windSound.setVolume(Volume);
teleportSound = new Sound();
teleportSound.attachSound("teleport");
teleportSound.setVolume(Volume);
POPSound = new Sound();
POPSound.attachSound("POP");
POPSound.setVolume(Volume);
chirpSound = new Sound();
chirpSound.attachSound("chirp");
chirpSound.setVolume(Volume);
hitSound = new Sound();
hitSound.attachSound("hit");
hitSound.setVolume(Volume);
DRUMSound = new Sound();
DRUMSound.attachSound("DRUM");
DRUMSound.setVolume(Volume);
BOINGSound = new Sound();
BOINGSound.attachSound("BOING");
BOINGSound.setVolume(Volume);
APPLAUSESound = new Sound();
APPLAUSESound.attachSound("APPLAUSE");
APPLAUSESound.setVolume(Volume);
}
function BirdSounds() {
r = random(5);
if (r == 0) {
CRICKETSound.start();
}
if (r == 1) {
canarySound.start();
}
if (r == 2) {
cardinalSound.start();
}
if (r == 3) {
finchSound.start();
}
if (r == 4) {
hsparowSound.start();
}
}
function RareBirdSounds() {
r = random(3);
if (r == 0) {
eagleSound.start();
}
if (r == 1) {
BLUEJAYSound.start();
}
if (r == 2) {
woodpeckerSound.start();
}
}
function MakeWind() {
windSound.start();
Wind = true;
WindCounter = 0;
}
function SetupFirstLevel() {
Rope[0]._y = 2700;
PleaseWait = true;
PlaceTree();
Jumping = false;
BCount = 0;
Swinging = false;
InFlight = false;
BalloonActive = false;
BalloonLaunch = false;
GenerateBackground();
GenTramp();
CheckHit = 0;
CheckOn = 0;
FezzActive = false;
FTimer = 0;
}
function NextLevel() {
CheckHit = 0;
CheckOn = 0;
TimeBarIncrementor = 0.05;
TimeBarIncrementor = TimeBarIncrementor - 0.0001;
if (TimeBarIncrementor < 0.025) {
TimeBarIncrementor = 0.025;
}
TimeBar._xscale = 100;
TimeBar._x = 558;
TimeBar._y = 57;
TimeBarX = TimeBar._x;
Tick = 0;
Wind = false;
Branch._y = -500;
BranchActive = false;
LevelSkip = false;
BananaActive = false;
GameLevel++;
BranchActive = false;
if (GameLevel == 15) {
NoMore.gotoAndPlay(2);
}
if (GameLevel > 14) {
GameFlipped = true;
GameLevel = -3;
GLT = -3;
_root.PlusThreeMonkies._visible = false;
}
AirGravityY = 1;
PleaseWait = false;
TowerStartPosition();
LastRope = 0;
MoveVert = 0;
LeafActive = false;
FezzActive = false;
InFlight = false;
Turbo = 0;
Swinging = false;
Flip = false;
TouchingCounter = 0;
Monkey._x = 300;
Monkey._y = 400;
InitialJump = true;
ClearBalloon();
Jumping = false;
Monkey._rotation = 0;
MouseButton = false;
PlaceTree();
Jumping = false;
BCount = 0;
Swinging = false;
InFlight = false;
BalloonActive = false;
BalloonLaunch = false;
RopeData();
GenerateBackground();
StartMonkey = NumMonkies;
GenTramp();
}
function SmallTree() {
GLT++;
if (GLT == -2) {
STree0a._x = 277;
STree0a._y = 254;
}
if (GLT == -1) {
STree00a._x = 273;
STree00a._y = 295;
}
if (GLT == 0) {
STree1._x = 280;
STree1._y = 262;
}
if (GLT == 1) {
STree0._x = 283;
STree0._y = 262;
}
if (GLT == 2) {
STree2._x = 276;
STree2._y = 259;
}
if (GLT == 3) {
STree3._x = 277;
STree3._y = 264;
}
if (GLT == 4) {
STree4._x = 344;
STree4._y = 282;
}
if (GLT == 5) {
STree5._x = 272;
STree5._y = 257;
}
if (GLT == 6) {
STree6._x = 262;
STree6._y = 278;
}
if (GLT == 7) {
STree7._x = 281;
STree7._y = 269;
}
if (GLT == 8) {
STree8._x = 269;
STree8._y = 261;
}
if (GLT == 9) {
STree9._x = 278;
STree9._y = 307;
}
if (GLT == 10) {
STree10._x = 278;
STree10._y = 307;
}
if (GLT == 11) {
STree11._x = 272;
STree11._y = 301;
}
if (GLT == 12) {
STree12._x = 285;
STree12._y = 295;
}
if (GLT == 13) {
STree00a._x = 273;
STree00a._y = 295;
}
if (GLT == 14) {
STree14._x = 285;
STree14._y = 290;
}
if (GLT == 15) {
STree00a._x = 273;
STree00a._y = 295;
}
}
function PlaceTree() {
if (GameLevel == -3) {
Tree000a._visible = true;
Tower = Tree000a;
Tree14._visible = false;
}
if (GameLevel == -2) {
Tree0a._visible = true;
Tower = Tree0a;
Tree000a._visible = false;
}
if (GameLevel == -1) {
Tree00a._visible = true;
Tower = Tree00a;
Tree0a._visible = false;
}
if (GameLevel == 0) {
Tree0._visible = true;
Tower = Tree0;
Tree00a._visible = false;
}
if (GameLevel == 1) {
Tree1._visible = true;
Tower = Tree1;
Tree0._visible = false;
}
if (GameLevel == 2) {
Tree2._visible = true;
Tower = Tree2;
Tree1._visible = false;
}
if (GameLevel == 3) {
Tree3._visible = true;
Tower = Tree3;
Tree2._visible = false;
}
if (GameLevel == 4) {
Tree4._visible = true;
Tower = Tree4;
Tree3._visible = false;
}
if (GameLevel == 5) {
Tree5._visible = true;
Tower = Tree5;
Tree4._visible = false;
}
if (GameLevel == 6) {
Tree6._visible = true;
Tower = Tree6;
Tree5._visible = false;
}
if (GameLevel == 7) {
Tree7._visible = true;
Tower = Tree7;
Tree6._visible = false;
}
if (GameLevel == 8) {
Tree8._visible = true;
Tower = Tree8;
Tree7._visible = false;
}
if (GameLevel == 9) {
Tree9._visible = true;
Tower = Tree9;
Tree8._visible = false;
}
if (GameLevel == 10) {
Tree10._visible = true;
Tower = Tree10;
Tree9._visible = false;
}
if (GameLevel == 11) {
Tree11._visible = true;
Tower = Tree11;
Tree10._visible = false;
}
if (GameLevel == 12) {
Tree12._visible = true;
Tower = Tree12;
Tree11._visible = false;
}
if (GameLevel == 13) {
Tree00a._visible = true;
Tower = Tree00a;
Tree12._visible = false;
}
if (GameLevel == 14) {
Tree14._visible = true;
Tower = Tree14;
Tree00a._visible = false;
}
Tower._x = 200;
Tower._y = 500;
Tower._xscale = 10;
Tower._yscale = 10;
Preview = true;
TreeHouseLoader();
}
function PreviewTower() {
Tower._y = Tower._y - 13;
Tower._x = Tower._x - 2;
Tower._xscale = Tower._xscale + 1;
Tower._yscale = Tower._yscale + 1;
TowerStartPosition();
}
function TowerStartPosition() {
Tower._xscale = 100;
Tower._yscale = 100;
Tower._x = 20;
Tower._y = -770;
Preview = false;
PleaseWait = false;
LoadUpRopeData();
i = RopeStart;
while (i < MaxRopes) {
GenerateRopes();
i++;
}
Monkey.gotoAndPlay(2);
}
function SwingRope() {
i = RopeStart;
while (i < MaxRopes) {
Rope[i]._rotation = Rope[i]._rotation + RopeSpeed[i];
if (Rope[i]._rotation > 0) {
RopeSpeed[i] = RopeSpeed[i] - RGravity[i];
} else {
RopeSpeed[i] = RopeSpeed[i] + RGravity[i];
}
i++;
}
if ((TurboActive == true) and (TurboTotal > 0)) {
alp++;
if (alp > 2) {
Rope[RH]._alpha = 10;
}
if (alp > 3) {
Rope[RH]._alpha = 100;
alp = 0;
}
}
}
function RopeCollisionCheck() {
RH = -1;
i = RopeStart;
while (i < MaxRopes) {
if (LastRope != i) {
if (InitialJump == true) {
if (Rope[i].hitTest(Monkey)) {
RH = i;
TouchingCounter = 0;
Centerizer();
InitialJump = false;
}
}
CheckHit = CheckHit + CheckOn;
if (CheckHit > 90) {
CheckHittOK = true;
} else {
CheckHittOK = false;
}
if ((CheckHittOK == true) or (InitialJump == true)) {
if (Rope[i].hitTest(MonkeyTouch)) {
RH = i;
TouchingCounter = 0;
CheckHit = 0;
CheckOn = 0;
CheckHittOK = false;
}
}
}
i++;
}
if (TreeHouse.hitTest(MonkeyTouch) or (LevelSkip == true)) {
i = _root.RopeStart + 1;
while (i < _root.MaxRopes) {
_root.Rope[i]._x = 10000;
_root.Rope[i]._y = 10000;
i++;
}
LevelComplete = true;
Branch._y = -500;
Banana._x = -2000;
Leaf._y = -2000;
CheatSkip._x = 200;
LevelSkip = false;
Rope[0]._y = 2000;
GameScore = GameScore + 100;
TrampA._x = 3000;
TrampB._x = 3000;
Fezz.gotoAndStop(1);
PleaseWait = true;
Monkey.gotoAndStop(1);
TreeHouse.play();
}
}
function JumpingMonkey() {
if ((Jumping == false) and (MouseButton == true)) {
MouseButton = false;
Jumping = true;
SWIPEDSound.start();
Monkey.gotoAndPlay(51);
InitialJump = true;
}
RopeCollisionCheck();
if (RH > -1) {
Jumping = true;
if (RScaleData[RH] == 1) {
Rope[RH].gotoAndStop(3);
}
if (RScaleData[RH] == 2) {
Rope[RH].gotoAndStop(3);
}
RopePosition = 3;
Swinging = true;
Monkey.gotoAndStop(1);
}
}
function Centerizer() {
ScrollSpeed = 6;
if ((Monkey._y > 520) and (AirSpeedY > 9)) {
ScrollSpeed = AirSpeedY + 1;
MSpeedMax++;
if ((MSpeedMax == 1) and (InFlight == true)) {
Monkey.gotoAndPlay(111);
}
} else {
MSpeedMax = 0;
}
if (Monkey._x > (GameScreenX - 300)) {
Xadjuster = -ScrollSpeed;
AdjustX();
}
if (Monkey._x < 300) {
Xadjuster = ScrollSpeed;
AdjustX();
}
if (Monkey._y > (GameScreenY - 150)) {
Yadjuster = -ScrollSpeed;
AdjustY();
}
if (Monkey._y < 300) {
Yadjuster = ScrollSpeed;
AdjustY();
}
}
function RopeCenterizer() {
RopePlus = 50;
if ((Rope[RH]._y > 520) and (AirSpeedY > 9)) {
ScrollSpeed = AirSpeedY + 1;
}
if (Rope[RH]._x > (GameScreenX - 300)) {
Xadjuster = -ScrollSpeed;
AdjustX();
}
if (Rope[RH]._x < 300) {
Xadjuster = ScrollSpeed;
AdjustX();
}
if ((Rope[RH]._y + RopePlus) > (GameScreenY - 150)) {
Yadjuster = -ScrollSpeed;
AdjustY();
}
if ((Rope[RH]._y + RopePlus) < 300) {
Yadjuster = ScrollSpeed;
AdjustY();
}
}
function AdjustX() {
i = RopeStart;
while (i < MaxRopes) {
Rope[i]._x = Rope[i]._x + Xadjuster;
i++;
}
Tower._x = Tower._x + Xadjuster;
Monkey._x = Monkey._x + Xadjuster;
TreeHouse._x = TreeHouse._x + Xadjuster;
Balloon._x = Balloon._x + Xadjuster;
Banana._x = Banana._x + Xadjuster;
Fezz._x = Fezz._x + Xadjuster;
Leaf._x = Leaf._x + Xadjuster;
Branch._x = Branch._x + Xadjuster;
TrampA._x = TrampA._x + Xadjuster;
TrampB._x = TrampB._x + Xadjuster;
}
function AdjustY() {
i = RopeStart;
while (i < MaxRopes) {
Rope[i]._y = Rope[i]._y + Yadjuster;
i++;
}
Tower._y = Tower._y + Yadjuster;
Monkey._y = Monkey._y + Yadjuster;
TreeHouse._y = TreeHouse._y + Yadjuster;
Balloon._y = Balloon._y + Yadjuster;
Banana._y = Banana._y + Yadjuster;
Fezz._y = Fezz._y + Yadjuster;
Leaf._y = Leaf._y + Yadjuster;
Branch._y = Branch._y + Yadjuster;
TrampA._y = TrampA._y + Yadjuster;
TrampB._y = TrampB._y + Yadjuster;
}
function MagicFloat() {
Yadjuster = 25;
AdjustY();
}
function SwingJump() {
MouseButton = false;
InFlight = true;
SWIPEDSound.start();
Monkey._rotation = Rope[RH]._rotation;
Rope[RH]._alpha = 100;
if (TurboActive == true) {
TurboTotal--;
Turbo = 8;
if (TurboTotal < 0) {
TurboActive = false;
Turbo = 0;
}
}
if (RScaleData[RH] == 1) {
Rope[RH].gotoAndStop(2);
}
if (RScaleData[RH] == 2) {
Rope[RH].gotoAndStop(1);
}
SwapMonkey();
Monkey.gotoAndPlay(80);
}
function SwapMonkey() {
if (RopePosition == 3) {
InFlight = true;
LastRope = RH;
XDist = 1.4;
YDist = 125;
Power = 17.5;
}
if (RopePosition == 4) {
InFlight = true;
LastRope = RH;
XDist = 1.1;
YDist = 100;
Power = 14.5;
}
if (RopePosition == 5) {
InFlight = true;
LastRope = RH;
XDist = 0.7;
YDist = 90;
Power = 12.5;
}
if (RopePosition == 6) {
InFlight = true;
LastRope = RH;
XDist = 0.7;
YDist = 90;
Power = 12.5;
}
if (RopePosition == 7) {
InFlight = true;
LastRope = RH;
XDist = 0.4;
YDist = 80;
Power = 10.5;
}
if (MonkeyFacingLeft == true) {
Power = Power * -1;
}
Angle = Rope[RH]._rotation;
Monkey._x = Rope[RH]._x - (Angle * XDist);
Monkey._y = (Rope[RH]._y + YDist) - Math.abs(Angle);
AirSpeedX = Power;
if (MonkeyFacingLeft == true) {
AirSpeedX = ((100 - Angle) * Power) * 0.012;
AirSpeedY = (Angle * Power) * 0.015;
AirSpeedY = (AirSpeedY - (RopeSpeed[RH] * 1.1)) - Turbo;
LockFacingLeft = true;
if (AirSpeedY < -15) {
if (random(10) == 0) {
Flip = true;
}
}
if (Angle < 0) {
AirSpeedX = (Power * 0.09) - RopeSpeed[RH];
AirSpeedY = (-Power) * 0.01;
AirSpeedY = AirSpeedY + (RopeSpeed[RH] - 5);
}
} else {
AirSpeedY = -Power;
AirSpeedX = Power;
AirSpeedX = ((100 + Angle) * Power) * 0.012;
AirSpeedY = (Angle * Power) * 0.015;
AirSpeedY = (AirSpeedY + (RopeSpeed[RH] * 1.1)) - Turbo;
LockFacingLeft = false;
if (AirSpeedY < -15) {
if (random(10) == 0) {
Flip = true;
}
}
if (Angle > 0) {
AirSpeedX = (Power * 0.09) - RopeSpeed[RH];
AirSpeedY = Power * 0.01;
AirSpeedY = AirSpeedY + (RopeSpeed[RH] - 5);
}
}
AirGravityX = 0;
}
function WhereRopeLanding() {
golfSound.start();
if (RH == 0) {
OnBalloon = true;
}
AirGravityY = 1;
InFlight = false;
TrampActive = false;
Flip = false;
FlipConstant = 12;
if (RScaleData[RH] == 2) {
pw = Math.abs(Rope[RH]._x) - Math.abs(MonkeyTouch._x);
pw = Math.abs(pw);
tw = Math.abs(MonkeyTouch._y) - Math.abs(Rope[RH]._y);
tw = Math.abs(tw);
if (pw > tw) {
rw = pw;
} else {
rw = tw;
}
if (rw > 70) {
Rope[RH].gotoAndStop(3);
RopePosition = 3;
}
if ((rw <= 70) and (rw > 40)) {
Rope[RH].gotoAndStop(4);
RopePosition = 4;
}
if (rw <= 40) {
Rope[RH].gotoAndStop(5);
RopePosition = 5;
}
}
if (RScaleData[RH] == 1) {
pw = Math.abs(Rope[RH]._x) - Math.abs(MonkeyTouch._x);
pw = Math.abs(pw);
tw = Math.abs(MonkeyTouch._y) - Math.abs(Rope[RH]._y);
tw = Math.abs(tw);
if (pw > tw) {
rw = pw;
} else {
rw = tw;
}
if (rw > 50) {
Rope[RH].gotoAndStop(6);
RopePosition = 6;
}
if (rw <= 50) {
Rope[RH].gotoAndStop(7);
RopePosition = 7;
}
}
Swinging = true;
Monkey.gotoAndStop(1);
TrampA.gotoAndStop(1);
TrampB.gotoAndStop(1);
}
function ClearBalloon() {
if ((OnBalloon == true) and (InFlight == false)) {
CheckHit = 100;
SwingJump();
}
OnBalloon = false;
Balloon._x = 2700;
Rope[0]._y = 2700;
BalloonActive = false;
BCount = 0;
}
function RestartAfterCrash() {
GenTramp();
TrampA.gotoAndStop(1);
TrampB.gotoAndStop(1);
TrampActive = false;
Fezz.gotoAndStop(1);
NumMonkies--;
Wind = false;
AirGravityY = 1;
PleaseWait = false;
LeafActive = false;
TowerStartPosition();
Branch._y = 11700;
LastRope = 0;
InFlight = false;
Swinging = false;
Flip = false;
TouchingCounter = 0;
Leaf.gotoAndStop(1);
Banana.gotoAndStop(1);
Monkey._x = 300;
Monkey._y = 400;
Turbo = 0;
TrampActive = false;
TurboActive = false;
FezzActive = false;
InitialJump = true;
ClearBalloon();
Jumping = false;
Monkey._rotation = 0;
BranchActive = false;
MouseButton = false;
TreeHouseLoader();
}
function FlyingEngine() {
OnBalloon = false;
RopeCollisionCheck();
if (RH > -1) {
WhereRopeLanding();
}
if (LockFacingLeft == false) {
if (Flip == true) {
Monkey._rotation = Monkey._rotation - FlipConstant;
FlipConstant = FlipConstant - 0.1;
if (FlipConstant < 0.1) {
FlipConstant = 0.1;
}
}
Monkey._rotation = Monkey._rotation + 2;
Monkey._xscale = 50;
AirSpeedY = AirSpeedY + AirGravityY;
Monkey._x = Monkey._x + AirSpeedX;
Monkey._y = Monkey._y + AirSpeedY;
} else {
if (Flip == true) {
Monkey._rotation = Monkey._rotation + FlipConstant;
FlipConstant = FlipConstant - 0.1;
if (FlipConstant < 0.1) {
FlipConstant = 0.1;
}
}
Monkey._rotation = Monkey._rotation - 2;
Monkey._xscale = -50;
AirSpeedY = AirSpeedY + AirGravityY;
Monkey._x = Monkey._x + AirSpeedX;
Monkey._y = Monkey._y + AirSpeedY;
}
if (((Tower._y < -690) and (Monkey._y > 480)) and (InFlight == true)) {
i = 0;
while (i < 5) {
Centerizer();
i++;
}
Monkey._rotation = 0;
THUDSound.start();
TrampA.gotoAndStop(1);
TrampB.gotoAndStop(1);
PleaseWait = true;
Monkey.gotoAndPlay(121);
}
if (TrampActive == true) {
Monkey._rotation = 0;
}
}
function BalloonGenerator() {
BalloonActive = true;
Balloon._x = random(400) + 100;
Balloon._y = 600;
BalloonSpeed = random(2) + 2;
Rope[0].gotoAndStop(2);
}
function BalloonEngine() {
Balloon._y = Balloon._y - BalloonSpeed;
if (random(6) == 0) {
Balloon._x = (Balloon._x + random(5)) - 2;
}
Rope[0]._x = Balloon._x;
Rope[0]._y = Balloon._y;
BCount++;
if ((BCount > 300) and (random(100) == 0)) {
Balloon.gotoAndPlay(2);
POPSound.start();
}
}
function BananaGenerator() {
BananaActive = true;
Banana._x = random(600);
Banana._y = random(420);
Banana._rotation = 0;
BTimer = 0;
Banana.gotoAndStop(2);
}
function BananaEngine() {
Banana._rotation = Banana._rotation + 10;
BTimer++;
if (bally.hitTest(Banana) or MonkeyTouch.hitTest(Banana)) {
TurboActive = true;
teleportSound.start();
TurboTotal = 3;
Banana._rotation = 0;
Banana.gotoAndPlay(5);
BananaActive = false;
}
if (BTimer > 150) {
Banana.gotoAndPlay(3);
BananaActive = false;
}
}
function FezzGenerator() {
FezzActive = true;
Fezz._x = random(600);
Fezz._y = random(420);
Fezz._rotation = 100;
Fezz.gotoAndStop(2);
}
function FezzEngine() {
Fezz._rotation = Fezz._rotation + 15;
if (Rope[RH].hitTest(Fezz) or MonkeyTouch.hitTest(Fezz)) {
FezzActive = false;
APPLAUSESound.start();
NumMonkies++;
Fezz._rotation = 0;
Fezz.gotoAndPlay(3);
FTimer = 0;
}
if (FTimer > 2400) {
Fezz._rotation = 0;
Fezz.gotoAndStop(1);
FTimer = 0;
FezzActive = false;
}
}
function SwingEngine() {
aRopeSpeed = RopeSpeed[RH];
if (aRopeSpeed < 0) {
Rope[RH]._xscale = 100;
if (MonkeyFacingLeft == true) {
MoveVert++;
}
MonkeyFacingLeft = false;
} else {
Rope[RH]._xscale = -100;
if (MonkeyFacingLeft == false) {
MoveVert++;
}
MonkeyFacingLeft = true;
}
if (MoveVert > 1) {
MoveVertOnRope();
}
if (((MouseButton == true) and (TrampActive == false)) and (InFlight == true)) {
MouseButton = false;
if (Monkey._x > 300) {
if (Monkey._x > TrampB._x) {
TrampB._x = TrampB._x + TrampMove;
}
if (Monkey._x < TrampB._x) {
TrampB._x = TrampB._x - TrampMove;
}
TrampB.nextFrame();
}
if (Monkey._x < 300) {
if (Monkey._x > TrampA._x) {
TrampA._x = TrampA._x + TrampMove;
}
if (Monkey._x < TrampA._x) {
TrampA._x = TrampA._x - TrampMove;
}
TrampA.nextFrame();
}
}
if ((MouseButton == true) and (InFlight == false)) {
CheckOn = 1;
MoveVert = 0;
if ((BalloonActive == false) and (random(30) == 0)) {
BalloonGenerator();
}
if (PublishedLevel > 1) {
if (((BananaActive == false) and (TurboActive == false)) and (random(9) == 0)) {
BananaGenerator();
}
}
if (PublishedLevel > 0) {
if ((LeafActive == false) and (random(9) == 0)) {
GenLeaf();
}
}
SwingJump();
}
if (InFlight == true) {
FlyingEngine();
Centerizer();
} else {
RopeCenterizer();
}
bally._x = Rope[RH]._x;
bally._y = Rope[RH]._y;
bally._rotation = Rope[RH]._rotation;
if ((MouseButton == true) and (InFlight == true)) {
MouseButton = false;
}
}
function MoveVertOnRope() {
MoveVert = 0;
if (RopePosition == 3) {
RopePosition++;
Rope[RH].gotoAndStop(4);
OldPosition = 3;
} else if ((RopePosition == 4) and (OldPosition == 3)) {
RopePosition++;
Rope[RH].gotoAndStop(5);
} else {
if ((RopePosition == 4) and (OldPosition == 5)) {
RopePosition--;
Rope[RH].gotoAndStop(3);
}
if (RopePosition == 5) {
RopePosition--;
Rope[RH].gotoAndStop(4);
OldPosition = 5;
}
}
if (RopePosition == 6) {
RopePosition++;
Rope[RH].gotoAndStop(7);
} else if (RopePosition == 7) {
RopePosition--;
Rope[RH].gotoAndStop(6);
}
}
function ClearAll() {
Fezz.gotoAndStop(1);
Banana._visible = false;
i = RopeStart;
while (i < MaxRopes) {
Rope[i]._visible = false;
i++;
}
Backgrounder._visible = false;
MountainsClouds._visible = false;
Balloon._visible = false;
Monkey._visible = false;
}
function MonkeyTouchDrawer() {
if (LockFacingLeft == true) {
MonkeyTouch._x = Monkey._x - 20;
MonkeyTouch._y = Monkey._y - 10;
} else {
MonkeyTouch._x = Monkey._x + 20;
MonkeyTouch._y = Monkey._y - 10;
}
}
function TimeElapse() {
Tick++;
if (Tick > 2) {
Tick = 0;
TimeBar._xscale = TimeBar._xscale - TimeBarIncrementor;
TimeBarX = TimeBarX - (TimeBarIncrementor * 0.4);
TimeBar._x = TimeBarX;
if (TimeBar._xscale < 0) {
TimeBar._xscale = 0;
}
}
}
function DoTally() {
TimeBonus._x = 460;
TimeBar._xscale = TimeBar._xscale - 1.2;
TimeBar._x = TimeBar._x - 0.44;
_root.GameScore = _root.GameScore + 2;
chirpSound.start();
if (TimeBar._xscale < 0) {
TimeBar._xscale = -1;
TallyTime = false;
TimeBonus._x = 2180;
_root.CelebratingMonkies._x = -135;
_root.CelebratingMonkies._y = -100;
if (_root.StartMonkey == _root.NumMonkies) {
_root.GameScore = _root.GameScore + 100;
SafeMonkey._x = 35;
}
if (_root.GameFlipped == false) {
_root.NumMonkies = _root.NumMonkies + 3;
_root.PlusThreeMonkies._x = 35;
} else {
OneMonkey._x = 35;
_root.NumMonkies++;
}
_root.CelebratingMonkies.gotoAndStop(2);
}
}
function GenLeaf() {
Leaf._x = random(600);
Leaf._y = -50;
LeafAccel = random(4) + 3;
LeafActive = true;
Leaf.gotoAndPlay(2);
}
function LeafEngine() {
if (bally.hitTest(Leaf) or MonkeyTouch.hitTest(Leaf)) {
GameScore = GameScore + 50;
LeafActive = false;
Leaf.gotoAndPlay(61);
DRUMSound.start();
}
Leaf._y = Leaf._y + LeafAccel;
if (Leaf._x > Monkey._x) {
Leaf._x = Leaf._x + 2;
} else {
Leaf._x = Leaf._x - 2;
}
if (Leaf._y > 600) {
Leaf.gotoAndStop(1);
LeafActive = false;
}
}
function BranchGen() {
if (InitialJump == false) {
BranchClock = 0;
Branch._x = random(600);
Branch._y = -50;
BranchAccel = 5 + (GameLevel / 5);
if (BranchAccel > 10) {
BranchAccel = 10;
}
BranchActive = true;
Branch._rotation = 0;
BranchRot = BranchRot * 0.2;
BranchArmed = true;
ballyA._x = Branch._x - 55;
ballyA._y = Branch._y;
ballyB._x = Branch._x;
ballyB._y = Branch._y + 2;
ballyC._x = Branch._x + 70;
ballyC._y = Branch._y + 13;
ballyA._visible = false;
ballyB._visible = false;
ballyC._visible = false;
}
}
function BranchEngine() {
if (BranchArmed == true) {
ballyA._x = Branch._x - 55;
ballyA._y = Branch._y;
ballyB._x = Branch._x;
ballyB._y = Branch._y + 2;
ballyC._x = Branch._x + 70;
ballyC._y = Branch._y + 13;
if (((bally.hitTest(ballyA) or bally.hitTest(ballyB)) or bally.hitTest(ballyC)) or MonkeyTouch.hitTest(Branch)) {
hitSound.start();
InFlight = true;
LastRope = RH;
CheckHit = 100;
Monkey._x = Rope[RH]._x - (Angle * XDist);
Monkey._y = (Rope[RH]._y + YDist) - Math.abs(Angle);
AirSpeedY = 3;
AirSpeedX = 0;
if (RScaleData[RH] == 1) {
Rope[RH].gotoAndStop(2);
}
if (RScaleData[RH] == 2) {
Rope[RH].gotoAndStop(1);
}
Monkey.gotoAndPlay(111);
BranchArmed = false;
}
}
Branch._y = Branch._y + BranchAccel;
if (PublishedLevel > 15) {
if (Branch._x > Monkey._x) {
Branch._x = Branch._x - 1;
} else {
Branch._x = Branch._x + 1;
}
}
if (Branch._y > 700) {
Branch._y = 11700;
BranchActive = false;
}
}
function GenTramp() {
TrampB._x = random(600) + 700;
TrampA._x = random(600) - 700;
TrampA._y = 350;
TrampB._y = 350;
}
function TrampLaunchA() {
AirSpeedX = TempAirSpeedX;
AirSpeedY = TempAirSpeedY;
AirGravityY = TempAirGravityY * 0.8;
Monkey.gotoAndStop(182);
Monkey._y = 290;
Monkey._x = TrampA._x;
RH = 0;
Monkey._rotation = 0;
}
function TrampLaunchB() {
AirSpeedX = TempAirSpeedX;
AirSpeedY = TempAirSpeedY;
AirGravityY = TempAirGravityY * 0.8;
Monkey.gotoAndStop(182);
Monkey._y = 290;
Monkey._x = TrampB._x;
Monkey._rotation = 0;
RH = 0;
}
function TrampVars() {
Monkey.gotoAndStop(1);
TempAirSpeedY = AirSpeedY;
TempAirSpeedX = AirSpeedX;
TempAirGravityY = AirGravityY * -1;
TempAirSpeedY = TempAirSpeedY * -1;
TempAirSpeedX = TempAirSpeedX * -1;
TempAirGravityY = TempAirGravityY * -1;
AirSpeedY = 0;
AirSpeedX = 0;
AirGravityY = 0;
TrampActive = true;
BOINGSound.start();
}
function TrampEngine() {
if ((PleaseWait == false) and TrampA.hitTest(MonkeyTouch)) {
TrampA.gotoAndPlay(4);
TrampVars();
}
if ((PleaseWait == false) and TrampB.hitTest(MonkeyTouch)) {
TrampB.gotoAndPlay(4);
TrampVars();
}
}
function Main() {
if (TallyTime == true) {
DoTally();
}
if (NumMonkies < 0) {
ClearAll();
PleaseWait = true;
_root.gotoAndPlay(12);
}
Angle = Rope[RH]._rotation;
if (Preview == true) {
PreviewTower();
}
if (PleaseWait == false) {
SwingRope();
TimeElapse();
MonkeyTouchDrawer();
FTimer++;
if ((InitialJump == false) and (TrampActive == false)) {
TrampEngine();
}
if (Swinging == false) {
JumpingMonkey();
}
if (Swinging == true) {
SwingEngine();
}
if (Floating == true) {
MagicFloat();
InFlight = false;
}
if (BalloonActive == true) {
BalloonEngine();
}
if (((FTimer > 2000) and (InitialJump == false)) and (FezzActive == false)) {
FezzGenerator();
}
if (FezzActive == true) {
FezzEngine();
}
if (LeafActive == true) {
LeafEngine();
}
if (random(450) == 0) {
BirdSounds();
}
if (random(2000) == 0) {
RareBirdSounds();
}
tmpGL = PublishedLevel;
if (tmpGL > 11) {
tmpGL = 11;
}
BranchClock = (BranchClock + tmpGL) + 2;
if (BranchActive == false) {
Branch._y = 4000;
}
if ((BananaActive == true) and (TurboActive == false)) {
BananaEngine();
}
if ((BranchActive == false) and (BranchClock > 6000)) {
BranchGen();
}
if (BranchActive == true) {
BranchEngine();
}
if (((Tower._y > 250) and (Wind == false)) and (random(50) == 0)) {
MakeWind();
}
if (Wind == true) {
WindCounter++;
if (WindCounter > 250) {
Wind = false;
}
}
}
}
function GenerateRopes() {
duplicateMovieClip (Ropes, "MC" + i, i);
setProperty("MC" + i, _x , RopeXData[i]);
setProperty("MC" + i, _y , RopeYData[i]);
Rope[i] = this["MC" + i];
RopeSpeed[i] = random(1.99) + 5;
RGravity[i] = 0.3;
r = random(6);
if (random(2) == 0) {
Rope[i]._rotation = 40 + r;
} else {
Rope[i]._rotation = -40 - r;
}
if (RScaleData[i] == 1) {
Rope[i].gotoAndStop(2);
}
if (RScaleData[i] == 2) {
Rope[i].gotoAndStop(1);
}
Rope[0].gotoAndStop(2);
}
function LoadUpRopeData() {
RopeXData[0] = 100;
RopeYData[0] = 600;
RScaleData[0] = 1;
if (GameLevel == -3) {
MaxRopes = 19;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD000a[i - 1];
RopeYData[i] = RYD000a[i - 1];
RScaleData[i] = RSD000a[i - 1];
i++;
}
}
if (GameLevel == -2) {
MaxRopes = 19;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD0a[i - 1];
RopeYData[i] = RYD0a[i - 1];
RScaleData[i] = RSD0a[i - 1];
i++;
}
}
if (GameLevel == -1) {
MaxRopes = 27;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD00a[i - 1];
RopeYData[i] = RYD00a[i - 1];
RScaleData[i] = RSD00a[i - 1];
i++;
}
}
if (GameLevel == 0) {
MaxRopes = 19;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD0[i - 1];
RopeYData[i] = RYD0[i - 1];
RScaleData[i] = RSD0[i - 1];
i++;
}
}
if (GameLevel == 1) {
MaxRopes = 28;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD1[i - 1];
RopeYData[i] = RYD1[i - 1];
RScaleData[i] = RSD1[i - 1];
i++;
}
}
if (GameLevel == 2) {
MaxRopes = 23;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD2[i - 1];
RopeYData[i] = RYD2[i - 1];
RScaleData[i] = RSD2[i - 1];
i++;
}
}
if (GameLevel == 3) {
MaxRopes = 23;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD3[i - 1];
RopeYData[i] = RYD3[i - 1];
RScaleData[i] = RSD3[i - 1];
i++;
}
}
if (GameLevel == 4) {
MaxRopes = 27;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD4[i - 1];
RopeYData[i] = RYD4[i - 1];
RScaleData[i] = RSD4[i - 1];
i++;
}
}
if (GameLevel == 5) {
MaxRopes = 20;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD5[i - 1];
RopeYData[i] = RYD5[i - 1];
RScaleData[i] = RSD5[i - 1];
i++;
}
}
if (GameLevel == 6) {
MaxRopes = 29;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD6[i - 1];
RopeYData[i] = RYD6[i - 1];
RScaleData[i] = RSD6[i - 1];
i++;
}
}
if (GameLevel == 7) {
MaxRopes = 23;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD7[i - 1];
RopeYData[i] = RYD7[i - 1];
RScaleData[i] = RSD7[i - 1];
i++;
}
}
if (GameLevel == 8) {
MaxRopes = 28;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD8[i - 1];
RopeYData[i] = RYD8[i - 1];
RScaleData[i] = RSD8[i - 1];
i++;
}
}
if (GameLevel == 9) {
MaxRopes = 28;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD9[i - 1];
RopeYData[i] = RYD9[i - 1];
RScaleData[i] = RSD9[i - 1];
i++;
}
}
if (GameLevel == 10) {
MaxRopes = 27;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD10[i - 1];
RopeYData[i] = RYD10[i - 1];
RScaleData[i] = RSD10[i - 1];
i++;
}
}
if (GameLevel == 11) {
MaxRopes = 28;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD11[i - 1];
RopeYData[i] = RYD11[i - 1];
RScaleData[i] = RSD11[i - 1];
i++;
}
}
if (GameLevel == 12) {
MaxRopes = 27;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD12[i - 1];
RopeYData[i] = RYD12[i - 1];
RScaleData[i] = RSD12[i - 1];
i++;
}
}
if (GameLevel == 13) {
MaxRopes = 27;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD13[i - 1];
RopeYData[i] = RYD13[i - 1];
RScaleData[i] = RSD13[i - 1];
i++;
}
}
if (GameLevel == 14) {
MaxRopes = 26;
i = RopeStart + 1;
while (i < MaxRopes) {
RopeXData[i] = RXD14[i - 1];
RopeYData[i] = RYD14[i - 1];
RScaleData[i] = RSD14[i - 1];
i++;
}
}
}
function RopeData() {
RXD000a = new Array(278, -87, 629, 123, 641, -66, 343, 499, -81, 679, 194, 83, 167, -28, 479, 160, 515, 45);
RYD000a = new Array(183, 190, -14, -1919, -238, -376, -12, -2611, -103, 148, -2667, 97, -275, -2085, 162, -85, -2454, -1698);
RSD000a = new Array(2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
RXD00a = new Array(278, 627, 327, 451, 601, 585, 480, 68, 679, 231, 83, 322, 18, 479, 330, 554, 5, 313, 281, 90, 223, 305, -31, -98, 361, 181, 268);
RYD00a = new Array(183, -365, -2151, -544, -761, -127, -928, -129, 28, -2197, 97, -768, -1084, 122, -89, -1166, -399, -2291, -323, -839, -2341, -2345, -596, -9, -2349, -586, -2210);
RSD00a = new Array(2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
RXD0a = new Array(280, 277, -104, 121, 437, 635, 846, 286, -290, 16, 252, -314, 661, 227, 81, 474, 500);
RYD0a = new Array(163, 1218, 6, 64, 22, -79, -183, 1184, -221, -259, -143, 37, -397, -359, -491, -535, -284);
RSD0a = new Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2);
RXD0 = new Array(293.95, 479.2, 99, 303.3, 560, 600, 47.35, 269.3, 380, 445.25, 214, -52.6, 646.75, 380, 129.35, 485, 0, -155);
RYD0 = new Array(168.25, 44.6, 0, -53.35, -120, -500, -175.35, -293.3, -450, -381.3, -821.35, -475.2, -859.3, -660, -599.15, -833, 160, -290);
RSD0 = new Array(2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2);
RXD1 = new Array(278, 779, 77, 1147, 1335, 555, -170, 1004, 615, 892, 163, 671, -522, 459, -411, 997, -88, -319, 1238, 547, 166, -15, 806, 1, 349, -186, -628);
RYD1 = new Array(155, -238, -243, -594, -520, -394, -834, -720, -79, -1229, -42, -933, -674, 62, -325, -333, -473, -724, -269, -1095, -1195, -1029, -791, 4, -1289, -170, -388);
RSD1 = new Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
RXD2 = new Array(308, 243, 675, 476, 677, 844, 63, -516, 326, 554, 683, 767, 17, -298, -91, 196, 484, 266, 736, 388, 348, 943);
RYD2 = new Array(196, 18, -1141, 29, 9, -190, -938, -558, -193, -193, -338, -485, -243, -375, -542, -606, -602, -830, -762, -1046, -1248, -634);
RSD2 = new Array(2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
RXD3 = new Array(333.95, 479.2, 165.3, 42.35, 180.35, 52.35, 149.35, 209.35, 352.35, 580.35, 709.35, 598.05, 419.05, 223.05, 94.05, 222, 389.9, 491.9, 641.85, 473.9, 373.95, 648.85);
RYD3 = new Array(168.25, 114.6, 106.65, 59, -73, -181, -426.25, -326.25, -221, -221, -326.25, -434.95, -504.95, -596.9, -750.7, -914.65, -1030.6, -1178.55, -1310.55, -1414.45, -1556.4, -861.9);
RSD3 = new Array(2, 2, 1, 2, 2, 2, 1, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2);
RXD4 = new Array(229, 315, 83, 224, 16, -250, -399, -235, -59, 132, 58, -103, -407, 31, -193, -800, -285, -563, -716, -1088, -1291, -1556, -173, -1337, -1450);
RYD4 = new Array(172, 15, -119, -280, -352, -465, -593, -770, -658, -828, -994, -1209, -1270, -1471, -1522, -1680, -1680, -1720, -1301, -1667, -1342, -1223, -219, -1613, -1430);
RSD4 = new Array(2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2);
RXD5 = new Array(302, 512, -99, 669, 795, 76, -150, 17, -306, 653, 4, 71, 974, 264, -128, 491, -419, -223, -121, 5, 887, -284);
RYD5 = new Array(174, 93, -41, -127, -518, 89, -418, -588, -260, -692, -315, -979, -75, -1075, -1644, -1306, -1489, -1789, -841, -1827, -342, -1608);
RSD5 = new Array(2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2);
RXD6 = new Array(322, 532, 1442, 689, 820, 990, 1050, 815, 456, 589, 1001, 1235, 715, 1720, 2033, 1174, 1758, 1945, 1529, 1319, 1505, 1654, 1884, 907, 1127, 1305, 1464, 1765);
RYD6 = new Array(174, 93, -334, -127, -899, -1099, -1300, -568, -130, -418, -746, -2020, -692, -2111, -966, -365, -985, -716, -1171, -1406, -1522, -533, -1185, -290, -1577, -1784, -2099, -337);
RSD6 = new Array(2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2);
RXD7 = new Array(214, 304, 520, 449, 795, 952, -414, -250, 225, 653, 429, 51, -234, -55, -128, 69, -419, -223, 362, 5, 647, 564);
RYD7 = new Array(170, -38, -477, -247, -496, -733, -522, -808, -560, -718, -956, -819, -1326, -1049, -1644, -1552, -1489, -1789, -1746, -1827, -254, -1925);
RSD7 = new Array(2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2);
RXD8 = new Array(332, 192, 32, -100, -566, 501, -309, 394, 688, 1151, -660, 472, 108, -498, -368, -549, 858, 141, 1319, -164, 1013, 324, -431, -401);
RYD8 = new Array(161, 37, 39, -979, -412, -727, -930, -241, -632, -290, -651, 27, -993, -874, 36, -116, -572, -242, -335, 83, -444, -889, -535, -254);
RSD8 = new Array(2, 2, 1, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2);
RXD9 = new Array(280, 563, 390, 645, 40, 268, 563, 234, 394, 325, 239, 790, 369, 402, 369, 218, 92, 413, 717, 537, 450, 208, 888, 230, 370, 199, 619);
RYD9 = new Array(138, -727, -598, -1211, -2333, -2172, -2753, -2530, -324, -3118, -485, -1274, -2745, -27, -1719, -2923, -1346, -2053, -870, -1428, -2426, -1190, -1072, -145, -1346, -1615, -1815);
RSD9 = new Array(2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2);
RXD10 = new Array(322, 452, -57, 459, 435, 266, 209, -58, 775, 715, -248, -54, 440, -221, -254, 136, 899, 897, 454, -55, -242, 707, -46, -31, 805, 218);
RYD10 = new Array(174, -30, -2066, -347, -828, -470, -678, -746, -1844, -692, -1913, -1186, -649, -1601, -996, -1299, -926, -1554, -1333, -1781, -2315, -1097, -1452, -2547, -1297, -171);
RSD10 = new Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
RXD11 = new Array(312, 172, 495, -147, 171, -294, 521, -153, 890, 865, 1156, 1143, -300, 424, 377, 1098, 1055, 891, 506, 465, 943, 963, 1057, 963, 276, -419, -453);
RYD11 = new Array(161, -43, -2568, -72, -931, -388, -1143, -1006, -2393, -1140, -3011, -2183, -787, -2084, -941, -2607, -1367, -1793, -1740, -2351, -2139, -1609, -1961, -2887, -1885, -539, -222);
RSD11 = new Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
RXD12 = new Array(280, 811, 618, 739, 1307, 1078, 1035, 1486, 458, -633, 239, 942, -9, 182, 773, -925, 141, 1292, 1078, 879, -409, 1130, 1188, 310, -182, 460, 646);
RYD12 = new Array(150, -615, -374, -1377, -2006, -2399, -1628, -2223, -254, -1836, -485, -1156, -1896, 10, -2507, -1759, -2216, -2366, -813, -1555, -2069, -1854, -1057, -125, -2137, -2361, -2215);
RSD12 = new Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
RXD13 = new Array(278, 627, 513, 451, 95, 585, 480, 68, 679, 371, 105, 322, 260, 479, -61, 558, 5, 319, 281, 420, 465, 110, -67, 89, 649, 181, 268);
RYD13 = new Array(183, -365, -2739, -544, -1662, -127, -946, -129, 28, -2857, -2471, -768, -1491, 122, -2250, -1126, -399, -2623, -323, -1319, -2409, -2787, -1835, -2019, -2583, -586, -2210);
RSD13 = new Array(2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
RXD14 = new Array(342, 1272, 521, 1086, 941, 600, 1280, 202, 765, 377, -78, 1146, 1376, 469, -896, 1379, 46, -740, 945, -151, 1580, -320, -529, -807, 751, 1444, 229);
RYD14 = new Array(163, -263, -1050, -383, -1295, -76, -866, 15, -138, -1252, -1034, -1189, -575, 20, -650, -1107, -158, -879, -240, -221, -689, -399, -440, -351, -1185, -875, -1065);
RSD14 = new Array(2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
}
function TreeHouseLoader() {
if (GameLevel == -3) {
TreeHouse._x = 389;
TreeHouse._y = -150;
}
if (GameLevel == -1) {
TreeHouse._x = 266;
TreeHouse._y = -993;
}
if (GameLevel == -2) {
TreeHouse._x = 239;
TreeHouse._y = -605;
}
if (GameLevel == 0) {
TreeHouse._x = 400;
TreeHouse._y = -1000;
}
if (GameLevel == 1) {
TreeHouse._x = 707;
TreeHouse._y = -1380;
}
if (GameLevel == 2) {
TreeHouse._x = 150;
TreeHouse._y = -1367;
}
if (GameLevel == 3) {
TreeHouse._x = 390;
TreeHouse._y = -1705.45;
}
if (GameLevel == 4) {
TreeHouse._x = -1706;
TreeHouse._y = -1294;
}
if (GameLevel == 5) {
TreeHouse._x = 305;
TreeHouse._y = -1409;
}
if (GameLevel == 6) {
TreeHouse._x = 1514;
TreeHouse._y = -2299;
}
if (GameLevel == 7) {
TreeHouse._x = 105;
TreeHouse._y = -2034;
}
if (GameLevel == 8) {
TreeHouse._x = 1427;
TreeHouse._y = -421;
}
if (GameLevel == 9) {
TreeHouse._x = 292;
TreeHouse._y = -3269;
}
if (GameLevel == 10) {
TreeHouse._x = -161;
TreeHouse._y = -2742;
}
if (GameLevel == 11) {
TreeHouse._x = 1071;
TreeHouse._y = -3194;
}
if (GameLevel == 12) {
TreeHouse._x = -1265;
TreeHouse._y = -1690;
}
if (GameLevel == 13) {
TreeHouse._x = 256;
TreeHouse._y = -2970;
}
if (GameLevel == 14) {
TreeHouse._x = -305;
TreeHouse._y = -1200;
}
}
function GenerateBackground() {
duplicateMovieClip (Background, "MC213", 213);
setProperty("MC213", _x , 1000);
setProperty("MC213", _y , 1000);
Backgrounder = this.MC213;
Backgrounder._visible = true;
Backgrounder._x = 311;
Backgrounder._y = 2;
duplicateMovieClip (DamageBar, "MC214", 214);
setProperty("MC214", _x , 357);
setProperty("MC214", _y , 20);
DamageBarer = this.MC214;
DamageBarer._xscale = 0;
duplicateMovieClip (FireMens, "MC215", 215);
setProperty("MC215", _x , -200);
setProperty("MC215", _y , -209);
FireMen = this.MC215;
FireMen.gotoAndStop(3);
FireMens.gotoAndStop(3);
}
SpeedIndicator._xscale = fps * 10;
if (fps < 10) {
a1++;
}
if ((fps > 10) and (fps < 11)) {
a2++;
}
if ((fps > 11) and (fps < 12)) {
a3++;
}
if ((fps > 12) and (fps < 13)) {
a4++;
}
if ((fps > 13) and (fps < 14)) {
a5++;
}
if ((fps > 14) and (fps < 15)) {
a6++;
}
if ((fps > 15) and (fps < 16)) {
a7++;
}
if ((fps > 16) and (fps < 17)) {
a8++;
}
if ((fps > 17) and (fps < 18)) {
a9++;
}
if ((fps > 18) and (fps < 19)) {
a10++;
}
if ((fps > 19) and (fps < 20)) {
a11++;
}
if (fps > 20) {
a12++;
}
b1++;
b2 = b2 + fps;
b3 = b2 / b1;
fpstotal++;
if (Initial < 1) {
Initialize();
}
if (Initial > 1) {
Main();
}
Instance of Symbol 366 MovieClip "Keyboard" in Frame 10
onClipEvent (enterFrame) {
if (Key.isDown(33) and (InitialJump == true)) {
_root.LevelSkip = true;
}
if (Key.isDown(80)) {
_root.PleaseWait = true;
_root.UnPause._y = 220;
}
}
Instance of Symbol 368 MovieClip "Mouse" in Frame 10
onClipEvent (mouseDown) {
if (_root.PleaseWait == false) {
if (_root.Floating == false) {
_root.MouseButton = true;
}
}
}
Instance of Symbol 370 MovieClip in Frame 10
onClipEvent (mouseUp) {
if ((_root.PleaseWait == false) and (_root.EnemyRemaining > 0)) {
_root.MouseButton = false;
_root.Fire = true;
if (_root.ClubActive == true) {
_root.Fire = false;
}
}
}
Frame 11
gotoAndPlay (10);
Frame 12
_root.Volume = 0;
_root.SetUpSounds();
if (_root.GameScore > 500) {
_root.BlackBox._y = 2293;
}
stop();
submitButton.onRelease = function () {
user = _root.playerInput.text;
score = _root.GameScore;
ran = random(10000) + 5000;
if ((user.indexOf("fuck") != -1) or (user.indexOf("shit") != -1)) {
swear = true;
}
if (user == _root.ContinueFig) {
swear = true;
}
if ((user.indexOf("fuk") != -1) or (user.indexOf("pussy") != -1)) {
swear = true;
}
if ((user.indexOf("bitch") != -1) or (user.indexOf("cunt") != -1)) {
swear = true;
}
if ((user.indexOf("nigg") != -1) or (user.indexOf("ass") != -1)) {
swear = true;
}
if ((user.indexOf("dick") != -1) or (user.indexOf("cock") != -1)) {
swear = true;
}
if ((user.indexOf("butthole") != -1) or (user.indexOf("piss") != -1)) {
swear = true;
}
if ((user.indexOf("penis") != -1) or (user.indexOf("vagina") != -1)) {
swear = true;
}
if ((user.indexOf("hitler") != -1) or (user.indexOf("jewish") != -1)) {
swear = true;
}
if ((user.indexOf("mother") != -1) or (user.indexOf("f*") != -1)) {
swear = true;
}
if ((user.indexOf("f.u.") != -1) or (user.indexOf("dik") != -1)) {
swear = true;
}
if ((user.indexOf("FUCK") != -1) or (user.indexOf("SHIT") != -1)) {
swear = true;
}
if ((user.indexOf("FUC") != -1) or (user.indexOf("Fuck") != -1)) {
swear = true;
}
if ((user.indexOf("Bitch") != -1) or (user.indexOf("Cunt") != -1)) {
swear = true;
}
if ((user.indexOf("Nigg") != -1) or (user.indexOf("Ass") != -1)) {
swear = true;
}
if ((user.indexOf("Dick") != -1) or (user.indexOf("Cock") != -1)) {
swear = true;
}
if ((user.indexOf("Butthole") != -1) or (user.indexOf("fUc") != -1)) {
swear = true;
}
if ((user.indexOf("FuC") != -1) or (user.indexOf("fUC") != -1)) {
swear = true;
}
if ((user.indexOf("CUNT") != -1) or (user.indexOf("F*") != -1)) {
swear = true;
}
if ((user.indexOf("Mother") != -1) or (user.indexOf("NIGG") != -1)) {
swear = true;
}
if ((user.indexOf("F.U.") != -1) or (user.indexOf("f.U.") != -1)) {
swear = true;
}
if ((user.indexOf("Negro") != -1) or (user.indexOf("NEGRO") != -1)) {
swear = true;
}
if ((user.indexOf("F. U.") != -1) or (user.indexOf("F U") != -1)) {
swear = true;
}
if ((user.indexOf("F U") != -1) or (user.indexOf("F u") != -1)) {
swear = true;
}
if ((user.indexOf("F u") != -1) or (user.indexOf("f u") != -1)) {
swear = true;
}
if ((user.indexOf("f u") != -1) or (user.indexOf("f u") != -1)) {
swear = true;
}
if ((user.indexOf("F. u") != -1) or (user.indexOf("F. U") != -1)) {
swear = true;
}
rscore = Number(Number(ran) + Number(score));
checkString = (user + rscore.toString()) + ran.toString();
checksum = makechecksum(checkString);
encScore = encode(rscore.toString(), "ScorePass");
encUser = encode(user, "UserPass");
encRan = encode(ran.toString(), "RandomPass");
encCheckSum = encode(checkSum.toString(), "CheckPass");
sendData = new LoadVars();
sendData.playerOutput = user;
sendData.vers = 1;
sendData.score = score.toString();
sendData.user = user;
sendData.e1 = encRan;
sendData.e2 = encScore;
sendData.e3 = encUser;
sendData.e4 = encCheckSum;
sendData.cache = random(10000);
statusText.text = "Sending Data...\nPlease wait.";
sendData.onLoad = function () {
if (sendData.result == "added") {
statusText.text = "Player Score Added.";
_root.playerInput.text = "";
_root.scoreInput.text = "";
} else {
statusText.text = "Error adding score.";
}
};
if (swear == true) {
swearMovie._x = 250;
}
if (swear == false) {
sendData.sendAndLoad("http://www.nationlocation.com/AIRMONKEY/insertscore.php", sendData, "POST");
trace(score);
_root.submitButton._visible = false;
}
};
Frame 13
gotoAndPlay ("GameOver");
Symbol 29 MovieClip Frame 1
setProperty(this, _xscale , (_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
Symbol 29 MovieClip Frame 2
gotoAndPlay (1);
Symbol 71 MovieClip Frame 165
stop();
_root.gotoAndPlay("SplashFrame");
Symbol 91 Button
on (press) {
positiontext.scroll = positiontext.scroll - 1;
playertext.scroll = playertext.scroll - 1;
scoretext.scroll = scoretext.scroll - 1;
_root.ScrollUp = true;
}
on (release) {
_root.ScrollUp = false;
}
Symbol 95 Button
on (press) {
positiontext.scroll = positiontext.scroll + 1;
playertext.scroll = playertext.scroll + 1;
scoretext.scroll = scoretext.scroll + 1;
_root.ScrollDown = true;
}
on (release) {
_root.ScrollDown = false;
}
Symbol 96 MovieClip Frame 1
stop();
loadData = new LoadVars();
statustext.text = "Highscore board only works at NationLocation.com. \n\nIf no scores appear, then my game has been stolen. \n\nPlease play this game from my site www.NationLocation.com \n\nThanks Nation.";
loadData.onLoad = function () {
if (loadData.result == "okay") {
statustext.text = "";
var _local2 = 0;
while (_local2 <= 99) {
positiontext.text = positiontext.text + ((_local2 + 1) + newline);
playertext.text = playertext.text + (loadData["player" + _local2] + newline);
scoretext.text = scoretext.text + (loadData["score" + _local2] + newline);
TextCounter.text = TextCounter.text + _local2;
_root.Stolen = false;
_local2++;
}
} else {
NLStolen._x = 400;
_root.Stolen = true;
}
};
loadData.load("http://www.nationlocation.com/AIRMONKEY/showscores.php?" + Math.round(Math.random() * 1000000));
Symbol 102 Button
on (press) {
positiontextAT.scroll = positiontextAT.scroll - 1;
playertextAT.scroll = playertextAT.scroll - 1;
scoretextAT.scroll = scoretextAT.scroll - 1;
_root.ScrollUpAT = true;
}
on (release) {
_root.ScrollUpAT = false;
}
Symbol 103 Button
on (press) {
positiontextAT.scroll = positiontextAT.scroll + 1;
playertextAT.scroll = playertextAT.scroll + 1;
scoretextAT.scroll = scoretextAT.scroll + 1;
_root.ScrollDownAT = true;
}
on (release) {
_root.ScrollDownAT = false;
}
Symbol 104 MovieClip Frame 1
stop();
dog = 0;
loadData = new LoadVars();
statustext.text = "Loading scoreboard.\nPlease wait.";
loadData.onLoad = function () {
if (loadData.result == "okay") {
statustext.text = "";
var _local2 = 0;
while (_local2 <= 99) {
dog++;
positiontextAT.text = positiontextAT.text + ((_local2 + 1) + newline);
playertextAT.text = playertextAT.text + (loadData["player" + _local2] + newline);
scoretextAT.text = scoretextAT.text + (loadData["score" + _local2] + newline);
if (dog == 1) {
_root.Leader = playertextAT.text;
_root.LeaderScore = scoretextAT.text;
}
TextCounterAT.text = TextCounterAT.text + _local2;
_local2++;
}
} else {
statustextAT.text = "Highscores not loading? Play from www.NationLocation.com";
}
};
loadData.load("http://www.nationlocation.com/AIRMONKEY/showscoresat.php?" + Math.round(Math.random() * 1000000));
Symbol 113 Button
on (release) {
_root.Splash._visible = false;
_root.MENUITEMSound.start();
_root.scoretable2._visible = false;
if (_root.VolumeOff == true) {
_root.Volume = 0;
}
if (_root.VolumeOff == false) {
_root.Volume = 35;
}
_root.InstructionClip._x = 310;
_root.InstructionClip.play();
}
Instance of Symbol 96 MovieClip "scoretable" in Symbol 137 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ScrollDown == true) {
positiontext.scroll = positiontext.scroll + 1;
playertext.scroll = playertext.scroll + 1;
scoretext.scroll = scoretext.scroll + 1;
}
if (_root.ScrollUp == true) {
positiontext.scroll = positiontext.scroll - 1;
playertext.scroll = playertext.scroll - 1;
scoretext.scroll = scoretext.scroll - 1;
}
}
Instance of Symbol 104 MovieClip in Symbol 137 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.ScrollDownAT == true) {
positiontextAT.scroll = positiontextAT.scroll + 1;
playertextAT.scroll = playertextAT.scroll + 1;
scoretextAT.scroll = scoretextAT.scroll + 1;
}
if (_root.ScrollUpAT == true) {
positiontextAT.scroll = positiontextAT.scroll - 1;
playertextAT.scroll = playertextAT.scroll - 1;
scoretextAT.scroll = scoretextAT.scroll - 1;
}
}
Symbol 142 Button
on (release) {
gotoAndStop (14);
}
Symbol 144 Button
on (release) {
_root.MENUITEMSound.start();
_root.gotoAndPlay("mainframe");
}
Symbol 148 Button
on (release) {
gotoAndPlay (308);
}
Symbol 162 MovieClip Frame 10
stop();
Symbol 167 MovieClip Frame 110
stop();
Symbol 179 MovieClip Frame 139
stop();
Symbol 187 MovieClip Frame 1
stop();
Symbol 187 MovieClip Frame 28
_root.TallyTime = true;
Symbol 189 Button
on (release) {
_root.gotoAndPlay("mainframe");
}
Symbol 211 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 263
Treehouse2.play();
Symbol 211 MovieClip Frame 307
stop();
Symbol 211 MovieClip Frame 308
stop();
Symbol 312 Button
on (release) {
_root.Volume = 60;
_root.SetupSounds();
_root.MouseButton = false;
}
Symbol 324 Button
on (release) {
_root.Volume = 0;
_root.SetupSounds();
trace(_root.Volume);
_root.MouseButton = false;
}
Symbol 384 MovieClip Frame 1
stop();
Symbol 384 MovieClip Frame 2
stop();
Symbol 387 MovieClip Frame 1
stop();
Symbol 387 MovieClip Frame 3
_root.ClearBalloon();
Symbol 419 Button
on (release) {
_root.PlusThreeMonkies._x = -2000;
_root.SafeMonkey._x = -4000;
_root.CheatSkip._x = 2000;
_root.OneMonkey._x = 2000;
_root.CelebratingMonkies.gotoAndPlay(3);
_root.NoRaise = true;
}
Symbol 425 MovieClip Frame 15
stop();
Symbol 451 MovieClip Frame 1
stop();
Symbol 451 MovieClip Frame 2
_root.windSound.stop();
_root.ShortLoungeSound.start();
_root.Monkey.gotoAndStop(1);
_root.Rope[0]._y = 2000;
stop();
Symbol 451 MovieClip Frame 3
_root.MSB.stop();
Symbol 451 MovieClip Frame 20
_root.LevelNext._x = 300;
_root.LevelNext._y = 270;
_root.PleaseWait = true;
_root.PublishedLevel++;
_root.SmallTree();
_root.ShortLoungeSound.stop();
_root.CelebratingMonkies.gotoAndStop(1);
Symbol 459 MovieClip Frame 1
stop();
Symbol 459 MovieClip Frame 2
stop();
Symbol 459 MovieClip Frame 3
gotoAndPlay (1);
Symbol 459 MovieClip Frame 40
Symbol 471 Button
on (release) {
_root.PleaseWait = false;
_root.MouseButton = false;
_root.LevelNext._x = -2000;
_root.STree0._y = -2000;
_root.STree1._y = -2000;
_root.STree2._y = -2000;
_root.STree3._y = -2000;
_root.STree4._y = -2000;
_root.STree5._y = -2000;
_root.STree6._y = -2000;
_root.STree7._y = -2000;
_root.STree8._y = -2000;
_root.STree9._y = -2000;
_root.STree10._y = -2000;
_root.STree11._y = -2000;
_root.STree12._y = -2000;
_root.STree13._y = -2000;
_root.STree14._y = -2000;
_root.STree0a._y = -2000;
_root.STree00a._y = -2000;
_root.NextLevel();
}
Symbol 477 MovieClip Frame 1
stop();
Symbol 514 MovieClip Frame 49
gotoAndPlay (2);
Symbol 514 MovieClip Frame 74
_root.Jumping = false;
_root.MouseButton = false;
gotoAndPlay (1);
Symbol 514 MovieClip Frame 110
stop();
Symbol 514 MovieClip Frame 120
gotoAndPlay (111);
Symbol 514 MovieClip Frame 121
_root.harpSound.start();
Symbol 514 MovieClip Frame 181
_root.RestartAfterCrash();
stop();
Symbol 514 MovieClip Frame 182
stop();
Symbol 527 MovieClip Frame 1
stop();
Symbol 527 MovieClip Frame 60
gotoAndPlay (2);
Symbol 551 MovieClip Frame 1
stop();
Symbol 551 MovieClip Frame 2
stop();
Symbol 551 MovieClip Frame 3
gotoAndPlay (1);
Symbol 551 MovieClip Frame 11
_root.TrampLaunchA();
Symbol 564 MovieClip Frame 1
stop();
Symbol 564 MovieClip Frame 2
stop();
Symbol 564 MovieClip Frame 3
gotoAndPlay (1);
Symbol 564 MovieClip Frame 11
_root.TrampLaunchB();
Symbol 566 MovieClip Frame 1
stop();
Symbol 566 MovieClip Frame 2
stop();
Symbol 566 MovieClip Frame 31
_root.FezzActive = false;
Symbol 568 Button
on (release) {
_root.UnPause._y = 2000;
_root.PleaseWait = false;
}
Symbol 603 Button
on (release) {
_root.MENUITEMSound.start();
getURL ("http://www.nationlocation.com/AIRMONKEY/AirMonkey.html");
}