Frame 1
_root.getStarted._visible = false;
stop();
Frame 2
onEnterFrame = function () {
_global.tips = true;
_global.skipTitle = false;
gotoAndStop ("splash");
};
var soundHolder;
var menuSFX;
var boostSFX;
var bgMusic;
var starSFX;
var jumpSFX;
var crashSFX;
var flagSFX;
var boomSFX;
menuSFX = new Sound(soundHolder);
menuSFX.attachSound("menu");
boostSFX = new Sound(soundHolder);
boostSFX.attachSound("boost");
starSFX = new Sound(soundHolder);
starSFX.attachSound("pickup");
crashSFX = new Sound(soundHolder);
crashSFX.attachSound("crash");
jumpSFX = new Sound(soundHolder);
jumpSFX.attachSound("jump");
flagSFX = new Sound(soundHolder);
flagSFX.attachSound("plant");
boomSFX = new Sound(soundHolder);
boomSFX.attachSound("boom");
bgMusic = new Sound(soundHolder);
bgMusic.attachSound("hds");
Frame 3
stop();
onEnterFrame = function () {
};
Frame 4
stop();
function submitScore(name, score) {
var _local3 = new MD5((score.toString() + name) + score.toString());
var _local1 = new LoadVars();
var _local2 = new LoadVars();
_local2.onLoad = function (success) {
if (success) {
}
};
_local1.g = "ph";
_local1.n = name;
_local1.s = score;
_local1.k = _local3.getChecksum();
_local1.sendAndLoad("http://beastgames.org/setscore.php", _local2, "POST");
}
function springForward() {
if (t < 18) {
jumper._x = 280 + ((((-1 * (t - 10)) * (t - 10)) + 100) / 2);
jumper._y = 202 + ((((t - 10) * (t - 10)) - 100) / 2);
jumper._xscale = (t / 30) * 280;
jumper._yscale = (t / 30) * 280;
jumper._rotation = 135 - (t / 2);
t = t + 0.5;
} else if (!animDone) {
animDone = true;
main.startB._visible = true;
main.instructionB._visible = true;
main.scoresB._visible = true;
t = 20;
} else if (bPushed) {
t++;
if (t < 23) {
} else if (t < 60) {
jumper._x = jumper._x + ((t - 23) / 2);
jumper._y = jumper._y - ((t - 23) / 2);
} else {
i = 0;
while (i < letters.length) {
removeMovieClip(_root[letters[i]]);
i++;
}
removeMovieClip("jumper");
removeMovieClip("links");
removeMovieClip("main");
delete letters;
_root.boostSFX.stop();
_root.gotoAndStop(bTarget);
}
}
}
function attachRadial(obj, angle) {
obj._x = (main.moon._x + main._x) + ((moonSize / 2) * Math.cos((angle * Math.PI) / 180));
obj._y = (main.moon._y + main._y) + ((moonSize / 2) * Math.sin((angle * Math.PI) / 180));
}
function rotatedScale(angle) {
return(Math.abs(Math.sin((angle * Math.PI) / 180)) + Math.abs(Math.cos((angle * Math.PI) / 180)));
}
function inLetter(obj) {
obj._rotation = obj._rotation + 2;
attachRadial(obj, obj._rotation - 90);
var _local2 = letterSize * rotatedScale(obj._rotation);
obj.inner._height = letterSize;
obj.inner._width = 1.5 * letterSize;
obj.inner._x = 0;
obj.inner._y = 0;
}
var depth = 0;
var titleStr = "PLANET HOPPER";
var strLen = titleStr.length;
var ang = 190;
var letters = new Array();
var i;
var t = 0;
var counter = 0;
var moonSize;
var letterSize = 120;
var iColor = 16711680;
var fColor = 16776960;
var jAttached = false;
var animDone = false;
var bPushed = false;
var titleHalted = false;
var bTarget;
var upReleased = true;
var downReleased = true;
attachMovie("mainlinks", "links", 112358, {_x:0, _y:0});
attachMovie("titleGFX", "main", depth, {_x:-28, _y:5});
depth++;
moonSize = main.moon._width;
onEnterFrame = function () {
if (_global.skipTitle) {
ang = 14;
while (titleStr.length > 0) {
attachMovie("holder", "letter_" + titleStr.length, depth, {_rotation:ang + 90});
_root["letter_" + titleStr.length].inner.char = titleStr.slice(-1);
var _local3 = new TextFormat();
_local3.color = ((iColor * (1 - (titleStr.length / strLen))) + (fColor * (titleStr.length / strLen))) & 16776960;
_root["letter_" + titleStr.length].inner.box.setTextFormat(_local3);
depth++;
letters.push("letter_" + titleStr.length);
inLetter(_root["letter_" + titleStr.length]);
ang = ang - (155 / strLen);
titleStr = titleStr.slice(0, titleStr.length - 1);
}
if (t < 20) {
t = 20;
attachMovie("titleJ", "jumper", depth, {_x:301.85, _y:180.1, _xscale:163.3, _yscale:163.3, _rotation:126.25});
depth++;
}
springForward();
} else {
while (titleStr.length > 0) {
attachMovie("holder", "letter_" + titleStr.length, depth, {_rotation:ang + 90});
_root["letter_" + titleStr.length].inner.char = titleStr.slice(-1);
var _local3 = new TextFormat();
_local3.color = ((iColor * (1 - (titleStr.length / strLen))) + (fColor * (titleStr.length / strLen))) & 16776960;
_root["letter_" + titleStr.length].inner.box.setTextFormat(_local3);
depth++;
letters.push("letter_" + titleStr.length);
ang = ang - (155 / strLen);
titleStr = titleStr.slice(0, titleStr.length - 1);
}
if (!titleHalted) {
i = 0;
while (i < letters.length) {
inLetter(_root[letters[i]]);
if (((i == (letters.length - 1)) && (_root[letters[i]]._x > 50)) && (_root[letters[i]]._y < 500)) {
titleHalted = true;
}
i++;
}
} else if (jAttached) {
springForward();
} else {
attachMovie("titleJ", "jumper", depth, {_x:280, _y:202, _xscale:0, _yscale:0, _rotation:135});
depth++;
jAttached = true;
}
}
};
Frame 5
stop();
var demoTimer = 0;
floater.stop();
flagplanet.gotoAndStop(4);
runplanet.gotoAndStop(3);
onEnterFrame = function () {
if (demoTimer < 80) {
floater._rotation++;
demoTimer++;
} else if (demoTimer < 120) {
floater._rotation--;
demoTimer++;
} else if (demoTimer < 150) {
floater.gotoAndStop("boost");
demoTimer++;
} else if (demoTimer < 190) {
floater._rotation--;
floater.gotoAndStop("float");
demoTimer++;
} else {
demoTimer = 0;
floater.gotoAndStop("float");
}
runplanet._rotation++;
};
Frame 6
stop();
Frame 7
stop();
Frame 8
stop();
function dist(x1, y1, x2, y2) {
xdist = x2 - x1;
ydist = y2 - y1;
distance = Math.sqrt((xdist * xdist) + (ydist * ydist));
}
function angle(x1, y1, x2, y2) {
ad = x2 - x1;
op = y2 - y1;
ang = Math.atan2(op, ad);
ang = ang * 57.2957795130823;
}
function anglexy(ang) {
ang = ang / 57.2957795130823;
xmov = Math.cos(ang);
ymov = Math.sin(ang);
}
function randomBoom(BoomXLoc, BoomYLoc, BoomNum, BoomSpeed, BoomSize, BoomLife, BoomAct, BoomColorSet) {
n = 0;
while (n < BoomNum) {
randPartDir = Math.random() * 360;
uni.particle.attachMovie("part", "part" + ptcnt, ptcnt++, {_x:BoomXLoc, _y:BoomYLoc, spd:BoomSpeed, ang:Math.random() * 360, life:BoomLife, sz:BoomSize, act:BoomAct});
new Color(uni.particle["part" + ptcnt]).setRGB(BoomColorSet[random(BoomColorSet.length)]);
n++;
}
}
function randomVarBoom(BoomXLoc, BoomYLoc, BoomNum, BoomSpeed, BoomSize, BoomLife, BoomSpdVar, BoomSizeVar, BoomAct, BoomColorSet) {
if (BoomSpdVar > BoomSpeed) {
BoomSpdVar = BoomSpeed;
}
n = 0;
while (n < BoomNum) {
randPartDir = Math.random() * 360;
uni.particle.attachMovie("part", "part" + ptcnt, ptcnt++, {_x:BoomXLoc, _y:BoomYLoc, spd:BoomSpeed + ((Math.random() * (BoomSpdVar * 2)) - BoomSpdVar), ang:Math.random() * 360, life:BoomLife, sz:BoomSize + ((Math.random() * (BoomSizeVar * 2)) - BoomSizeVar), act:BoomAct});
new Color(uni.particle["part" + ptcnt]).setRGB(BoomColorSet[random(BoomColorSet.length)]);
n++;
}
}
function drawCircle(c, iX, iY, r, fr) {
var _local5 = 0.414213562373095;
var _local3;
var _local4;
var _local9;
var _local8;
c.lineStyle(0, 13823487, 100 * Math.pow((fr - r) / fr, 2));
colors = [39423, 39423, 13823487, 51];
fillType = "radial";
alphas = [(70 * (fr - r)) / fr, 0, (((fr - r) < (fr / 3)) ? ((150 * (fr - r)) / fr) : 50), 0];
ratios = [30, 180 + ((r / fr) * 75), 200 + ((r / fr) * 55), 245 + ((r / fr) * 10)];
spreadMethod = "pad";
interpolationMethod = "RGB";
focalPointRatio = 0;
matrix = {matrixType:"box", x:iX - r, y:iY - r, w:2 * r, h:2 * r, r:0};
c.beginGradientFill(fillType, colors, alphas, ratios, matrix, spreadMethod, interpolationMethod, focalPointRatio);
c.moveTo(iX + r, iY);
var _local1 = 45;
while (_local1 <= 360) {
_local3 = r * Math.cos((_local1 * Math.PI) / 180);
_local4 = r * Math.sin((_local1 * Math.PI) / 180);
_local9 = _local3 + ((r * _local5) * Math.cos(((_local1 - 90) * Math.PI) / 180));
_local8 = _local4 + ((r * _local5) * Math.sin(((_local1 - 90) * Math.PI) / 180));
c.curveTo(_local9 + iX, _local8 + iY, _local3 + iX, _local4 + iY);
_local1 = _local1 + 45;
}
c.endFill();
}
function circleBoom(boomX, boomY, initR, finR, life) {
var _local2 = uni.blastZone.createEmptyMovieClip("cBoom_" + cDepth, cDepth);
_local2.r = initR;
_local2.ir = initR;
_local2.fr = finR;
_local2.life = life;
_local2.bmX = boomX;
_local2.bmY = boomY;
_local2._x = 0;
_local2._y = 0;
_local2.init = false;
_local2.onEnterFrame = function () {
if (this.init) {
removeMovieClip(this.circle);
}
if ((this.fr - this.r) < ((this.fr - this.ir) * 0.02)) {
removeMovieClip(this);
} else {
this.init = true;
this.createEmptyMovieClip("circle", 0);
this.circle._x = this.boomX;
this.circle._y = this.boomY;
drawCircle(this.circle, this.bmX, this.bmY, this.r, this.fr);
this.r = this.r + ((this.fr - this.r) / life);
}
};
cDepth++;
}
part = function () {
};
part.prototype = new MovieClip();
part.prototype.onLoad = function () {
if (!this.life) {
this.life = 10;
}
if (this.sz > 2) {
this._width = this.sz;
this._height = this.sz;
} else {
this.sz = 2;
this._width = this.sz;
this._height = this.sz;
}
this._rotation = Math.random() * 360;
this.cnt = 100;
this.ang = this.ang / 57.2957795130823;
this.spd = this.spd * ((random(4) + 8) / 10);
this.xmv = Math.cos(this.ang) * this.spd;
this.ymv = Math.sin(this.ang) * this.spd;
if (!this.act) {
this.onEnterFrame = function () {
this._x = this._x + this.xmv;
this._y = this._y + this.ymv;
if (this.cnt > 0) {
this.cnt = this.cnt - ((100 / this.life) * 2);
} else {
this._xscale = this._xscale - ((100 / this.life) * 2);
this._yscale = this._yscale - ((100 / this.life) * 2);
if (this._xscale < 1) {
this.removeMovieClip();
}
}
};
} else if (this.act == "slow") {
this.mxmv = this.xmv;
this.mymv = this.ymv;
this.onEnterFrame = function () {
this._x = this._x + this.xmv;
this._y = this._y + this.ymv;
this.xmv = (this.mxmv * ((this.cnt + this._xscale) / 2)) / 100;
this.ymv = (this.mymv * ((this.cnt + this._xscale) / 2)) / 100;
this.xmv = this.xmv * 0.9;
this.ymv = this.ymv * 0.9;
this._alpha = this._alpha - (100 / (this.life * 4));
if (this.cnt > 0) {
this.cnt = this.cnt - ((100 / this.life) * 2);
} else {
this._xscale = this._xscale - ((100 / this.life) * 2);
this._yscale = this._yscale - ((100 / this.life) * 2);
if (this._xscale < 1) {
this.removeMovieClip();
}
}
};
} else if (this.act == "fall") {
this.onEnterFrame = function () {
this._x = this._x + this.xmv;
this._rotation = this._rotation + this.xmv;
this._y = this._y + this.ymv;
this.ymv = this.ymv + 0.5;
if (this.cnt > 0) {
this.cnt = this.cnt - ((100 / this.life) * 2);
} else {
this._xscale = this._xscale - ((100 / this.life) * 2);
this._yscale = this._yscale - ((100 / this.life) * 2);
if (this._xscale < 1) {
this.removeMovieClip();
}
}
};
}
};
Object.registerClass("part", part);
var cDepth = 0;
function helpTards() {
helpT = 0;
msgBub.gotoAndPlay("show");
bub1.gotoAndPlay("show");
bub2.gotoAndPlay("show");
help._visible = true;
}
function hideHelp() {
msgBub.gotoAndPlay("hide");
bub1.gotoAndPlay("hide");
bub2.gotoAndPlay("hide");
}
function moveHelp() {
var _local2 = uni.jumper._x + uni._x;
var _local1 = uni.jumper._y + uni._y;
var _local5 = Math.atan2(250 - _local1, 250 - _local2);
var _local4 = Math.cos(_local5);
var _local3 = Math.sin(_local5);
targX = _local2 + (200 * _local4);
targY = _local1 + (200 * _local3);
msgBub._x = msgBub._x + ((targX - msgBub._x) / 15);
msgBub._y = msgBub._y + ((targY - msgBub._y) / 15);
bub1._x = bub1._x + (((_local2 + (65 * _local4)) - bub1._x) / 12);
bub1._y = bub1._y + (((_local1 + (100 * _local3)) - bub1._y) / 12);
bub2._x = bub2._x + (((_local2 + (35 * _local4)) - bub2._x) / 10);
bub2._y = bub2._y + (((_local1 + (75 * _local3)) - bub2._y) / 10);
}
function maxHP(level) {
return(30 + (level * 10));
}
function flagCap() {
return(10 + (5 * flagLVL));
}
function updateHUD() {
hud.helm._width = (equipLength * helmHP) / 30;
hud.suit._width = (equipLength * suitHP) / 30;
hud.boot._width = (equipLength * bootHP) / 30;
hud.O2._height = (barLength * O2) / maxO2;
hud.score = score;
hud.money = "$" + wallet;
}
function calculateGrav(M, r) {
return((((G * M) * M) * M) / (r * r));
}
function hitCircle(circle) {
var _local2 = circle._x + circle._parent._x;
var _local1 = circle._y + circle._parent._y;
ur = [uni.jumper._x + (rDist * Math.cos(((uni.jumper._rotation * Math.PI) / 180) - rAng)), uni.jumper._y + (rDist * Math.sin(((uni.jumper._rotation * Math.PI) / 180) - rAng))];
lr = [uni.jumper._x + (rDist * Math.cos(((uni.jumper._rotation * Math.PI) / 180) + rAng)), uni.jumper._y + (rDist * Math.sin(((uni.jumper._rotation * Math.PI) / 180) + rAng))];
ul = [uni.jumper._x + (lDist * Math.cos(((uni.jumper._rotation * Math.PI) / 180) - lAng)), uni.jumper._y + (lDist * Math.sin(((uni.jumper._rotation * Math.PI) / 180) - lAng))];
ll = [uni.jumper._x + (lDist * Math.cos(((uni.jumper._rotation * Math.PI) / 180) + lAng)), uni.jumper._y + (lDist * Math.sin(((uni.jumper._rotation * Math.PI) / 180) + lAng))];
urHit = Math.sqrt(((ur[0] - _local2) * (ur[0] - _local2)) + ((ur[1] - _local1) * (ur[1] - _local1))) < circle.r;
lrHit = Math.sqrt(((lr[0] - _local2) * (lr[0] - _local2)) + ((lr[1] - _local1) * (lr[1] - _local1))) < circle.r;
ulHit = Math.sqrt(((ul[0] - _local2) * (ul[0] - _local2)) + ((ul[1] - _local1) * (ul[1] - _local1))) < circle.r;
llHit = Math.sqrt(((ll[0] - _local2) * (ll[0] - _local2)) + ((ll[1] - _local1) * (ll[1] - _local1))) < circle.r;
return(((urHit || (lrHit)) || (ulHit)) || (llHit));
}
function takeDamage(damage) {
if (!invincible) {
if (helmHP > 0) {
helmHP = helmHP - ((helmStr * damage) / (1 + (helmLVL / 2)));
} else {
suitHP = suitHP - ((0.3 * helmStr) * damage);
bootHP = bootHP - ((0.1 * helmStr) * damage);
}
}
if (helmHP < 0) {
helmHP = 0;
}
if (suitHP < 0) {
suitHP = 0;
}
if (bootHP < 0) {
bootHP = 0;
}
hud.helm._width = (equipLength * helmHP) / 30;
hud.suit._width = (equipLength * suitHP) / 30;
hud.boot._width = (equipLength * bootHP) / 30;
crashSFX.start(0, 1);
}
function manageO2(recharge) {
if (recharge) {
if (O2 < maxO2) {
O2 = O2 + 1;
} else {
O2 = maxO2;
}
} else if (O2 > 0) {
O2 = O2 - 0.025;
if (O2 < (maxO2 / 2)) {
suitHP = suitHP - (0.01 / (suitLVL + 1));
if (suitHP <= 0) {
suitHP = 0;
suitLVL = 0;
}
}
} else {
O2 = 0;
isAlive = false;
}
updateHUD();
}
function scroll() {
while ((uni.jumper._x + uni._x) < LEFT_BOUND) {
uni._x++;
}
while ((uni.jumper._x + uni._x) > RIGHT_BOUND) {
uni._x--;
}
while ((uni.jumper._y + uni._y) < TOP_BOUND) {
uni._y++;
}
while ((uni.jumper._y + uni._y) > BOTTOM_BOUND) {
uni._y--;
}
}
function updateStats() {
maxMultiplier = ((multiplier > maxMultiplier) ? (multiplier) : (maxMultiplier));
maxHelm = ((helmLVL > maxHelm) ? (helmLVL) : (maxHelm));
maxSuit = ((suitLVL > maxSuit) ? (suitLVL) : (maxSuit));
maxBoot = ((bootLVL > maxBoot) ? (bootLVL) : (maxBoot));
if ((prevHP[0] > 0) && (helmHP == 0)) {
brokenCount++;
}
if ((prevHP[1] > 0) && (suitHP == 0)) {
brokenCount++;
}
if ((prevHP[2] > 0) && (bootHP == 0)) {
brokenCount++;
}
}
function shopArrow() {
var _local2 = Math.atan2((shopPlanet._y + (1000 * shopPos[1])) - uni.jumper._y, (shopPlanet._x + (1000 * shopPos[0])) - uni.jumper._x);
_root.guide._x = ((60 * Math.cos(_local2)) + uni.jumper._x) + uni._x;
_root.guide._y = ((60 * Math.sin(_local2)) + uni.jumper._y) + uni._y;
_root.guide._rotation = (_local2 * 180) / Math.PI;
}
function checkVitals() {
var _local1 = 0;
if (helmHP <= 0) {
_local1++;
}
if (suitHP <= 0) {
_local1++;
}
if (bootHP <= 0) {
_local1++;
}
if (_local1 > 1) {
isAlive = false;
}
}
function gControls() {
if (pauseReleased && (Key.isDown(80))) {
togglePause();
pauseReleased = false;
}
if (!Key.isDown(80)) {
pauseReleased = true;
}
if (!(Key.isDown(87) || (Key.isDown(38)))) {
boostSFX.stop("boost");
jumpReleased = true;
boostReleased = true;
}
if (!(Key.isDown(83) || (Key.isDown(40)))) {
flagReleased = true;
}
if (!Key.isDown(32)) {
shopTrans = false;
}
}
function fControls() {
if (Key.isDown(32)) {
shopTrans = true;
}
if (Key.isDown(65) || (Key.isDown(37))) {
uni.jumper._rotation = uni.jumper._rotation - 10;
}
if (Key.isDown(68) || (Key.isDown(39))) {
uni.jumper._rotation = uni.jumper._rotation + 10;
}
if ((Key.isDown(87) || (Key.isDown(38))) && (jumpReleased)) {
jMech.xvel = jMech.xvel + (0.8 * Math.cos(((uni.jumper._rotation + 180) * Math.PI) / 180));
jMech.yvel = jMech.yvel + (0.8 * Math.sin(((uni.jumper._rotation + 180) * Math.PI) / 180));
boosts--;
i = 0;
while (i < 4) {
uni.exhaust.attachMovie("je", "je" + exhauCnt, exhauCnt, {_rotation:random(360), _x:uni.jumper._x, _y:uni.jumper._y});
curExh = uni.exhaust["je" + exhauCnt];
anglexy(uni.jumper._rotation);
curExh.xmv = xmov * 5;
curExh.ymv = ymov * 5;
curExh.onEnterFrame = function () {
this._x = this._x + this.xmv;
this._y = this._y + this.ymv;
};
exhauCnt++;
i++;
}
if (boostReleased) {
boostSFX.start(0, 10000);
}
boostReleased = false;
uni.jumper.gotoAndStop("boost");
}
gControls();
}
function pControls() {
myAngle = Math.atan2((myPlanet._y + myPlanet._parent._y) - uni.jumper._y, (myPlanet._x + myPlanet._parent._x) - uni.jumper._x);
if (((!shopTrans) && (Key.isDown(32))) && (myPlanet.pType == "shop")) {
openShop();
isShopping = true;
shopTrans = true;
} else if (((((((Key.isDown(65) || (Key.isDown(83))) || (Key.isDown(87))) || (Key.isDown(68))) || (Key.isDown(37))) || (Key.isDown(39))) || (Key.isDown(38))) || (Key.isDown(40))) {
jMech.aacc = 0;
if (Key.isDown(65) || (Key.isDown(37))) {
jMech.aacc = jMech.aacc - 0.2;
uni.jumper.gotoAndStop("run");
}
if (Key.isDown(68) || (Key.isDown(39))) {
jMech.aacc = jMech.aacc + 0.2;
uni.jumper.gotoAndStop("run");
}
if (((Key.isDown(83) || (Key.isDown(40))) && (flagReleased)) && (flagsOnHand > 0)) {
plantFlag();
flagReleased = false;
}
if ((!(Key.isDown(65) || (Key.isDown(37)))) && (!(Key.isDown(68) || (Key.isDown(39))))) {
uni.jumper.gotoAndStop("on_planet");
}
if (((Key.isDown(87) || (Key.isDown(38))) && (jumpReleased)) && (boostReleased)) {
var _local1 = (bootLVL / 8) + 1;
jMech.xvel = _local1 * ((8 * Math.cos(myAngle + Math.PI)) + ((1 * jMech.avel) * Math.cos(myAngle - (Math.PI/2))));
jMech.yvel = _local1 * ((8 * Math.sin(myAngle + Math.PI)) + ((1 * jMech.avel) * Math.sin(myAngle - (Math.PI/2))));
floating = true;
prevPlanet = myPlanet;
myPlanet = null;
myAngle = null;
uni.jumper.gotoAndStop("jump");
jumpReleased = false;
jumpSFX.start(0, 1);
}
} else {
jMech.aacc = 0;
jMech.avel = jMech.avel * 0.94;
uni.jumper.gotoAndStop("on_planet");
}
gControls();
}
function sControls() {
if ((!shopTrans) && (Key.isDown(32))) {
closeShop();
isShopping = false;
shopTrans = true;
}
gControls();
}
function openShop() {
shop._visible = true;
}
function closeShop() {
shop._visible = false;
shop.gotoAndStop("main");
}
function togglePause() {
isPaused = !isPaused;
_root.pauseText._visible = isPaused;
}
function flNumFunc() {
this._x = uni._x + this.truex;
this._y = uni._y + this.truey;
this._rotation++;
this._alpha = this._alpha - 3;
this._xscale = (1000 / this._alpha) + 60;
this._yscale = this._xscale;
if (this._alpha < 3) {
removeMovieClip(this);
}
}
function floatScore(obj, num, sx, sy, multiplier, color, iR) {
obj.attachMovie("flScore", "score_" + flDepth, flDepth, {_rotation:iR, _x:sx + uni._x, _y:sy + uni._y, truex:sx, truey:sy, _xscale:0, _yscale:0, score:num, mult:((multiplier > 1) ? ("x" + multiplier) : ""), onEnterFrame:flNumFunc});
obj["score_" + flDepth].scoreBox.setTextFormat(color);
flDepth++;
}
function plantFlag() {
if (!myPlanet.claimed) {
myPlanet.attachMovie("flag", "pFlag", 1, {_x:myPlanet.r * Math.cos(myAngle + Math.PI), _y:myPlanet.r * Math.sin(myAngle + Math.PI), _rotation:((myAngle * 180) / Math.PI) + randBetween(-15, 15)});
flagsOnHand--;
flags++;
wallet = wallet + int(myPlanet.r * 2);
score = score + (myPlanet.r * 4);
circleBoom(uni.jumper._x, uni.jumper._y, 10, 120, 5);
var _local1 = new TextFormat();
_local1.color = 16704035 /* 0xFEE223 */;
floatScore(floatNum, "+" + (myPlanet.r * 4), uni.jumper._x + (10 * Math.cos(myAngle + Math.PI)), uni.jumper._y + (10 * Math.sin(myAngle + Math.PI)), 1, _local1, uni.jumper._rotation - 90);
myPlanet.claimed = true;
flagSFX.start(0, 1);
}
}
function moveJumper() {
var _local1;
jMech.xvel = jMech.xvel + gVector.x;
jMech.yvel = jMech.yvel + gVector.y;
_local1 = maxFVelSq / ((jMech.xvel * jMech.xvel) + (jMech.yvel * jMech.yvel));
if (_local1 < 1) {
_local1 = Math.sqrt(_local1);
jMech.xvel = jMech.xvel * _local1;
jMech.yvel = jMech.yvel * _local1;
}
uni.jumper._x = uni.jumper._x + jMech.xvel;
uni.jumper._y = uni.jumper._y + jMech.yvel;
}
function moveOnSurface() {
var _local1;
myAngle = Math.atan2((myPlanet._y + myPlanet._parent._y) - uni.jumper._y, (myPlanet._x + myPlanet._parent._x) - uni.jumper._x);
jMech.avel = jMech.avel + jMech.aacc;
if (jMech.avel > maxVel) {
jMech.avel = maxVel;
} else if ((-jMech.avel) > maxVel) {
jMech.avel = -maxVel;
}
_local1 = jMech.avel / myPlanet.r;
myAngle = myAngle + _local1;
uni.jumper._yscale = ((jMech.avel < 0) ? 50 : -50);
uni.jumper._x = (myPlanet._x + myPlanet._parent._x) + (myPlanet.r * Math.cos(myAngle + Math.PI));
uni.jumper._y = (myPlanet._y + myPlanet._parent._y) + (myPlanet.r * Math.sin(myAngle + Math.PI));
uni.jumper._rotation = (myAngle * 180) / Math.PI;
}
function moveToSurface(px, py, r) {
var _local1 = new flash.geom.Point(px - uni.jumper._x, py - uni.jumper._y);
boostSFX.stop("boost");
_local1.normalize(-1 * r);
myAngle = Math.atan2(_local1.y, _local1.x) + Math.PI;
uni.jumper._x = px + _local1.x;
uni.jumper._y = py + _local1.y;
uni.jumper._rotation = (myAngle * 180) / Math.PI;
uni.jumper.gotoAndStop("on_planet");
boosts = 30;
}
function collectStars() {
var _local1;
_local1 = 0;
while (_local1 < localGalaxy[1][1].myStars.length) {
if (localGalaxy[1][1].myStars[_local1].hitTest(uni.jumper)) {
score = score + ((localGalaxy[1][1].myStars[_local1]._width * 4) * multiplier);
wallet = wallet + ((localGalaxy[1][1].myStars[_local1]._width * 10) * multiplier);
randomBoom(localGalaxy[1][1].myStars[_local1]._x + localGalaxy[1][1]._x, localGalaxy[1][1].myStars[_local1]._y + localGalaxy[1][1]._y, 10, 10, 3, 30, "slow", PartColors);
var _local2 = new TextFormat();
_local2.color = 6750105 /* 0x66FF99 */;
floatScore(floatNum, "+$" + (localGalaxy[1][1].myStars[_local1]._width * 10), localGalaxy[1][1].myStars[_local1]._x + localGalaxy[1][1]._x, localGalaxy[1][1].myStars[_local1]._y + localGalaxy[1][1]._y, multiplier, _local2, 0);
multiplier++;
starSFX.start(0, 1);
removeMovieClip(localGalaxy[1][1].myStars[_local1]);
}
_local1++;
}
}
function generateMap() {
var _local2;
var _local1;
var _local3;
if (!uni.jumper.hitTest(localGalaxy[1][1])) {
found = false;
_local2 = 0;
while (_local2 < localGalaxy.length) {
_local1 = 0;
while (_local1 < localGalaxy[0].length) {
if (uni.jumper.hitTest(localGalaxy[_local2][_local1])) {
found = true;
break;
}
_local1++;
}
if (found) {
break;
}
_local2++;
}
centerAbs[0] = localGalaxy[_local2][_local1].c;
centerAbs[1] = localGalaxy[_local2][_local1].r;
if ((Math.abs(shopPos[0] - centerAbs[0]) > 1) || (Math.abs(shopPos[1] - centerAbs[1]) > 1)) {
shopExpired = true;
}
if ((_local2 != 1) && (_local1 != 1)) {
removeMovieClip(localGalaxy[0][2 - _local1]);
removeMovieClip(localGalaxy[1][2 - _local1]);
removeMovieClip(localGalaxy[2][2 - _local1]);
removeMovieClip(localGalaxy[2 - _local2][1]);
removeMovieClip(localGalaxy[2 - _local2][_local1]);
localGalaxy[2 - _local2][2 - _local1] = localGalaxy[1][1];
localGalaxy[2 - _local2][1] = localGalaxy[1][_local1];
localGalaxy[1][2 - _local1] = localGalaxy[_local2][1];
localGalaxy[1][1] = localGalaxy[_local2][_local1];
localGalaxy[_local2][2 - _local1] = null;
localGalaxy[_local2][1] = null;
localGalaxy[_local2][_local1] = null;
localGalaxy[1][_local1] = null;
localGalaxy[2 - _local2][_local1] = null;
if (shopExpired) {
_local3 = randBetween(0, 4);
switch (_local3) {
case 0 :
shopPos[0] = 2 - _local1;
shopPos[1] = _local2;
break;
case 1 :
shopPos[0] = 1;
shopPos[1] = _local2;
break;
case 2 :
shopPos[0] = _local1;
shopPos[1] = _local2;
break;
case 3 :
shopPos[0] = _local1;
shopPos[1] = 1;
break;
case 4 :
shopPos[0] = _local1;
shopPos[1] = 2 - _local2;
}
shopPos[0] = shopPos[0] + (centerAbs[0] - 1);
shopPos[1] = shopPos[1] + (centerAbs[1] - 1);
}
} else if (_local1 != 1) {
removeMovieClip(localGalaxy[0][2 - _local1]);
removeMovieClip(localGalaxy[1][2 - _local1]);
removeMovieClip(localGalaxy[2][2 - _local1]);
localGalaxy[0][2 - _local1] = localGalaxy[0][1];
localGalaxy[1][2 - _local1] = localGalaxy[1][1];
localGalaxy[2][2 - _local1] = localGalaxy[2][1];
localGalaxy[0][1] = localGalaxy[0][_local1];
localGalaxy[1][1] = localGalaxy[1][_local1];
localGalaxy[2][1] = localGalaxy[2][_local1];
localGalaxy[0][_local1] = null;
localGalaxy[1][_local1] = null;
localGalaxy[2][_local1] = null;
if (shopExpired) {
_local3 = randBetween(0, 2);
shopPos[0] = (_local1 + centerAbs[0]) - 1;
shopPos[1] = (_local3 + centerAbs[1]) - 1;
}
} else if (_local2 != 1) {
localGalaxy[2 - _local2][0].removeMovieClip();
localGalaxy[2 - _local2][1].removeMovieClip();
localGalaxy[2 - _local2][2].removeMovieClip();
localGalaxy[2 - _local2][0] = localGalaxy[1][0];
localGalaxy[2 - _local2][1] = localGalaxy[1][1];
localGalaxy[2 - _local2][2] = localGalaxy[1][2];
localGalaxy[1][0] = localGalaxy[_local2][0];
localGalaxy[1][1] = localGalaxy[_local2][1];
localGalaxy[1][2] = localGalaxy[_local2][2];
localGalaxy[_local2][0] = null;
localGalaxy[_local2][1] = null;
localGalaxy[_local2][2] = null;
if (shopExpired) {
_local3 = randBetween(0, 2);
shopPos[0] = (_local3 + centerAbs[0]) - 1;
shopPos[1] = (_local2 + centerAbs[1]) - 1;
}
}
}
delete localPlanets;
localPlanets = new Array();
_local2 = 0;
while (_local2 < localGalaxy.length) {
_local1 = 0;
while (_local1 < localGalaxy[0].length) {
if (localGalaxy[_local2][_local1] == null) {
makeSector(_local1, _local2);
}
k = 0;
while (k < localGalaxy[_local2][_local1].myPlanets.length) {
localPlanets.push(localGalaxy[_local2][_local1].myPlanets[k]);
k++;
}
_local1++;
}
_local2++;
}
}
function makeSector(col, row) {
var _local3 = _root.uni.attachMovie("sector", (("sector_" + ((centerAbs[0] + col) - 1)) + "_") + ((centerAbs[1] + row) - 1), depth, {c:(centerAbs[0] + col) - 1, r:(centerAbs[1] + row) - 1, _x:((centerAbs[0] + col) - 1) * sectorW, _y:((centerAbs[1] + row) - 1) * sectorH});
_local3.myLabel.c = _local3.c;
_local3.myLabel.r = _local3.r;
_local3.myLabel._visible = false;
depth++;
var _local2;
var _local4;
var _local15 = (shopExpired && (shopPos[0] == _local3.c)) && (shopPos[1] == _local3.r);
var _local19;
var _local7 = 0;
_local3.myPlanets = new Array();
var _local6 = [null, null, null, null];
_local2 = 0;
while (_local2 < 3) {
_local4 = randBetween(0, _local6.length - 1);
_local6[_local4] = randBetween(sectorH / 8, (sectorH / 3) - playerSize);
_local2++;
}
_local2 = 0;
while (_local2 < _local6.length) {
if (_local6[_local2] != null) {
var _local12 = randBetween((0 + (_local6[_local2] / 2)) + playerSize, ((sectorW / 2) - (_local6[_local2] / 2)) - playerSize);
var _local11 = randBetween((0 + (_local6[_local2] / 2)) + playerSize, ((sectorH / 2) - (_local6[_local2] / 2)) - playerSize);
if ((_local2 == _local4) && (_local15)) {
newPlanet = _local3.attachMovie("planet2", (((("planet_" + col) + "_") + row) + "_") + _local2, _local7++);
newPlanet.pType = "shop";
_root.shopPlanet = newPlanet;
shopExpired = false;
} else {
newPlanet = _local3.attachMovie("planet", (((("planet_" + col) + "_") + row) + "_") + _local2, _local7++);
newPlanet.pType = "normal";
}
newPlanet.base._width = _local6[_local2];
newPlanet.base._height = _local6[_local2];
newPlanet._x = (((_local2 % 2) * sectorW) / 2) + _local12;
newPlanet._y = ((Math.floor(_local2 / 2) * sectorH) / 2) + _local11;
newPlanet.r = _local6[_local2] / 2;
newPlanet.claimed = false;
_local3.myPlanets.push(newPlanet);
}
_local2++;
}
var _local5;
_local3.myStars = new Array();
var _local10;
var _local18 = 0;
_local2 = 0;
while (_local2 < _local3.myPlanets.length) {
_local10 = 4 * randBetween(10, 16);
aStep = randBetween(10, 31) / 10;
rStep = randBetween(10, 40);
initDist = _local3.myPlanets[_local2].r + randBetween(5, 30);
initAng = randBetween(-30, 30) / 10;
_local4 = 0;
while (_local4 < _local10) {
newStar = _local3.attachMovie("star", (("star" + _local2) + "_") + _local4, _local7++, {_x:(((rStep * _local4) + initDist) * Math.cos(initAng + (aStep * _local4))) + _local3.myPlanets[_local2]._x, _y:(((rStep * _local4) + initDist) * Math.sin(initAng + (aStep * _local4))) + _local3.myPlanets[_local2]._y});
newStar._width = randBetween(4, 8);
newStar._height = newStar._width;
if (((newStar._x < 985) && (newStar._x > 15)) && ((newStar._y < 985) && (newStar._y > 15))) {
_local5 = 0;
while (_local5 < _local3.myPlanets.length) {
if (_local3.myPlanets[_local5].hitTest(newStar)) {
removeMovieClip(newStar);
} else {
_local3.myStars.push(newStar);
}
_local5++;
}
} else {
removeMovieClip(newStar);
}
_local4++;
}
_local2++;
}
localGalaxy[row][col] = _local3;
}
function randBetween(min, max) {
return(Math.floor((Math.random() * ((max - min) + 1)) + min));
}
var jump_cnt = 0;
var prevPlanet = null;
var help;
var msgBub;
var bub1;
var bub2;
var helpT;
var invincible = true;
var startTimer = 40;
var playerSize;
var rDist;
var lDist;
var rAng;
var lAng;
var G = 0.013;
var maxVel = 13;
var maxFVelSq = 625;
var localPlanets = new Array();
var gVector;
var jMech = {xvel:0, yvel:0, avel:0, aacc:0};
var myPlanet = null;
var myAngle = null;
var floating = true;
var boosts = 30;
var boostCounter = 0;
var flags = 0;
var myRoto;
var helmLVL = 0;
var suitLVL = 0;
var bootLVL = 0;
var flagLVL = 0;
var barLength = 300;
var equipLength = 95;
var helmHP = maxHP(helmLVL);
var suitHP = maxHP(suitLVL);
var bootHP = maxHP(bootLVL);
var prevHP = [maxHP(helmLVL), maxHP(suitLVL), maxHP(bootLVL)];
var flagsOnHand = flagCap();
var helmStr = 0.35;
var maxO2 = 100;
var O2 = maxO2;
var score = 0;
var wallet = 0;
var multiplier = 1;
var maxMultiplier = 1;
var maxHelm = 0;
var maxSuit = 0;
var maxBoot = 0;
var brokenCount = 0;
var myTotalScore;
var spaceReleased = true;
var pauseReleased = true;
var jumpReleased = true;
var boostReleased = true;
var flagReleased = true;
var shopTrans = false;
var isShopping = false;
var isPaused = false;
var isAlive = true;
var localGalaxy = [[null, null, null], [null, null, null], [null, null, null]];
var centerAbs = [0, 0];
var sectorW = 1000;
var sectorH = 1000;
var depth = 0;
var found;
var shopPos = [0, 0];
var shopPlanet = null;
var shopExpired = true;
var shopGuide = false;
var flDepth = 0;
var died = false;
var tallied = false;
var scored = false;
var hiscored = false;
var boomSetup = false;
var t = 0;
var LEFT_BOUND = 120;
var RIGHT_BOUND = 380;
var TOP_BOUND = 150;
var BOTTOM_BOUND = 380;
var i;
var j;
_root.createEmptyMovieClip("soundHolder", depth);
depth++;
_root.createEmptyMovieClip("musicHolder", depth);
depth++;
bgMusic.start(0, 1000);
_root.createEmptyMovieClip("uni", depth);
uni._x = 0;
uni._y = 0;
depth++;
_root.attachMovie("pointer", "guide", depth, {_x:uni._x + uni.jumper._x, _y:uni._y + uni.jumper._y});
depth++;
uni.createEmptyMovieClip("exhaust", depth);
exhauCnt = 0;
depth++;
_root.attachMovie("HUD", "hud", depth, {_x:0, _y:0});
depth++;
uni.attachMovie("hero", "jumper", depth, {_x:275, _y:200});
depth++;
_root.createEmptyMovieClip("floatNum", depth);
depth++;
help = _root.createEmptyMovieClip(helpHolder, depth++);
help._x = 0;
help._y = 0;
help._alpha = 90;
help._visible = false;
depth++;
bub2 = help.attachMovie("miniBubble1", "mini_bubble_2", depth, {_x:uni.jumper._x + uni._x, _y:uni.jumper._y + uni._y, _xscale:50, _yscale:50, _rotation:60});
depth++;
bub1 = help.attachMovie("miniBubble2", "mini_bubble_1", depth, {_x:uni.jumper._x + uni._x, _y:uni.jumper._y + uni._y});
depth++;
msgBub = help.attachMovie("helpBubble", "help_bubble_" + depth, depth, {_x:uni.jumper._x + uni._x, _y:uni.jumper._y + uni._y});
depth++;
_root.attachMovie("enterShopHelp", "shopTip", depth, {_x:0, _y:400, _visible:false});
depth++;
_root.attachMovie("ShopMenu", "shop", depth, {_x:0, _y:0});
depth++;
_root.attachMovie("pause", "pauseText", depth, {_x:250, _y:250});
depth++;
uni.jumper._width = uni.jumper._width / 2;
uni.jumper._height = uni.jumper._height / 2;
uni.jumper.gotoAndStop("float");
playerSize = ((uni.jumper._height > uni.jumper._width) ? (uni.jumper._height) : (uni.jumper._width));
rDist = uni.jumper._height / 2;
lDist = Math.sqrt(((uni.jumper._height / 2) * (uni.jumper._height / 2)) + (uni.jumper._width * uni.jumper._width));
rAng = (Math.PI/2);
lAng = Math.atan2((-uni.jumper._height) / 2, -uni.jumper._width);
shop._visible = false;
uni.createEmptyMovieClip("blastZone", depth);
depth++;
uni.blastZone._x = 0;
uni.blastZone._y = 0;
uni.createEmptyMovieClip("particle", depth);
depth++;
ptcnt = 0;
ptmax = 1000;
PartColors = new Array(16777215, 16777215);
_root.uni.particle.onEnterFrame = function () {
if (ptcnt > ptmax) {
ptcnt = 0;
}
};
makeSector(1, 1);
_root.pauseText._visible = false;
onEnterFrame = function () {
if (startTimer > 0) {
startTimer--;
if (startTimer == 0) {
invincible = false;
}
}
if (!isAlive) {
if (help._visible) {
help._visible = false;
}
if (!Key.isDown(32)) {
spaceReleased = true;
}
if (hiscored) {
removeMovieClip(_root.guide);
removeMovieClip(_root.uni);
removeMovieClip(_root.hud);
removeMovieClip(_root.shop);
removeMovieClip(_root.pauseText);
removeMovieClip(_root.card);
removeMovieClip(_root.submitBox);
delete localPlanets;
gotoAndStop ("title");
} else if (scored) {
} else if (died) {
if ((card.totalFlag && (Key.isDown(32))) && (spaceReleased)) {
spaceReleased = false;
attachMovie("highScoreDialog", "submitBox", depth, {_x:125, _y:150});
depth++;
scored = true;
} else if (Key.isDown(32) && (spaceReleased)) {
spaceReleased = false;
card.skipCnt = true;
}
} else if (boomSetup) {
t++;
died = t > 65;
if (died) {
_root.attachMovie("scorecard", "card", depth, {_x:0, _y:0});
depth++;
}
} else {
boostSFX.stop("boost");
var _local7 = [_root.uni.jumper._x, _root.uni.jumper._y];
removeMovieClip(_root.uni.jumper);
removeMovieClip(help);
removeMovieClip(msgBub);
removeMovieClip(bub1);
removeMovieClip(bub2);
removeMovieClip(shopTip);
PartColors = new Array(14674175, 16777215);
randomBoom(_local7[0], _local7[1], 12, 15, 3, 50, "slow", PartColors);
circleBoom(_local7[0], _local7[1], 10, 200, 8);
bgMusic.stop();
boomSFX.start(0, 0);
boomSetup = true;
}
} else if (isPaused) {
gControls();
} else if (isShopping) {
shopTip._visible = false;
if (help._visible) {
help._visible = false;
}
sControls();
} else {
if (help._visible) {
if (helpT == 200) {
hideHelp();
}
helpT++;
}
var _local3;
var _local6;
var _local5;
prevHP[0] = helmHP;
prevHP[1] = suitHP;
prevHP[2] = bootHP;
gVector = new flash.geom.Point(0, 0);
if (floating) {
fControls();
} else {
pControls();
}
collectStars();
updateHUD();
if (floating) {
shopTip._visible = false;
_local3 = 0;
while (_local3 < localPlanets.length) {
_local5 = new flash.geom.Point((localPlanets[_local3]._x + localPlanets[_local3]._parent._x) - uni.jumper._x, (localPlanets[_local3]._y + localPlanets[_local3]._parent._y) - uni.jumper._y);
_local6 = calculateGrav(localPlanets[_local3].r, _local5.length);
_local5.normalize(_local6);
gVector = gVector.add(_local5);
_local3++;
}
moveJumper();
_local3 = 0;
while (_local3 < localPlanets.length) {
if (hitCircle(localPlanets[_local3])) {
myRoto = uni.jumper._rotation;
multiplier = 1;
moveToSurface(localPlanets[_local3]._x + localPlanets[_local3]._parent._x, localPlanets[_local3]._y + localPlanets[_local3]._parent._y, localPlanets[_local3].r);
myPlanet = localPlanets[_local3];
if (myPlanet == prevPlanet) {
jump_cnt++;
} else {
jump_cnt = 0;
}
if ((_global.tips && (jump_cnt >= 5)) && (!help._visible)) {
helpTards();
jump_cnt = 0;
}
floating = false;
var _local4 = Math.sqrt((jMech.xvel * jMech.xvel) + (jMech.yvel * jMech.yvel));
if ((Math.abs(((myAngle * 180) / Math.PI) - myRoto) > 60) && ((360 - Math.abs(((myAngle * 180) / Math.PI) - myRoto)) > 60)) {
takeDamage((_local4 * _local4) / 25);
}
jMech.avel = _local4 * Math.sin(myAngle - Math.atan2(jMech.yvel, jMech.xvel));
jMech.xvel = 0;
jMech.yvel = 0;
manageO2(true);
break;
}
manageO2(false);
_local3++;
}
} else {
shopTip._visible = myPlanet.pType == "shop";
multiplier = 1;
moveOnSurface();
manageO2(true);
}
generateMap();
scroll();
shopArrow();
checkVitals();
updateStats();
moveHelp();
}
};
Frame 9
stop();
Frame 10
stop();
onEnterFrame = function () {
};
Symbol 13 Button [HS_Sub]
on (release) {
x = new LoadVars();
x.n = newName.toLowerCase();
x.s = int(_root.myTotalScore);
x.sendAndLoad("http://hiscore.gamesnow.biz/planethopper_submit.php", x, "POST");
_root.menuSFX.start(0, 0);
_root.hiscored = true;
}
Symbol 18 Button
on (release) {
_root.menuSFX.start(0, 0);
_root.hiscored = true;
}
Symbol 27 MovieClip [je] Frame 10
this.removeMovieClip();
Symbol 36 MovieClip Frame 1
if (random(2) == 0) {
this._xscale = this._xscale * -1;
}
if (random(2) == 0) {
this._yscale = this._yscale * -1;
}
this.gotoAndStop(Math.floor(Math.random() * 6) + 2);
Symbol 73 Button
on (release) {
_root.menuSFX.start(0, 0);
_root.closeShop();
_root.isShopping = false;
_root.shopTrans = true;
}
Symbol 77 Button
on (release) {
_root.menuSFX.start(0, 0);
gotoAndStop ("repairs");
}
Symbol 80 Button
on (release) {
_root.menuSFX.start(0, 0);
gotoAndStop ("upgrades");
}
Symbol 90 Button
on (release) {
if (price <= _root.wallet) {
_root.menuSFX.start(0, 0);
purchaseFunc();
} else {
gotoAndStop ("no");
}
}
Symbol 91 MovieClip Frame 1
var purchaseFunc;
var price;
stop();
Symbol 91 MovieClip Frame 2
stop();
Symbol 95 MovieClip Frame 1
var buyable = true;
stop();
Symbol 95 MovieClip Frame 2
stop();
var price;
onEnterFrame = function () {
cost = ((price == 0) ? "" : ("$" + price));
if (buyable) {
buy.gotoAndStop("yes");
} else {
buy.gotoAndStop("no");
}
};
Symbol 96 Button
on (release) {
_root.menuSFX.start(0, 0);
gotoAndStop ("main");
}
Symbol 97 Button
on (release) {
_root.menuSFX.start(0, 0);
var myPrice = (5000 * Math.pow(2, _root.flagLVL));
if (_root.flags < (10 * Math.pow(2, _root.flagLVL))) {
infoBar.gotoAndStop("message");
infoBar.buyable = false;
infoBar.message = ("You need to plant " + ((10 * Math.pow(2, _root.flagLVL)) - _root.flags)) + " more flags to unlock this upgrade.";
} else if (myPrice > _root.wallet) {
infoBar.gotoAndStop("selected");
infoBar.buyable = false;
infoBar.description = "Insufficient funds.";
} else {
infoBar.gotoAndStop("selected");
infoBar.buyable = true;
infoBar.description = "Increase the number of flags you can carry.";
}
infoBar.price = myPrice;
infoBar.name = "Flag Capacity Upgrade " + (_root.flagLVL + 1);
infoBar.buy.purchaseFunc = function () {
_root.wallet = _root.wallet - myPrice;
infoBar.gotoAndStop("message");
infoBar.message = "Flag capacity upgraded!";
infoBar.name = "Flag Capacity Upgrade " + (_root.flagLVL + 1);
_root.flagLVL++;
_root.flagsOnHand = _root.flagCap();
_root.updateHUD();
};
}
Symbol 98 Button
on (release) {
_root.menuSFX.start(0, 0);
var myPrice = (5000 * Math.pow(2, _root.bootLVL));
if (_root.bootHP == 0) {
infoBar.gotoAndStop("selected");
infoBar.buyable = false;
infoBar.description = "You must repair your boots before they can be upgraded.";
} else if (_root.flags < (10 * Math.pow(2, _root.bootLVL))) {
infoBar.gotoAndStop("message");
infoBar.buyable = false;
infoBar.message = ("You need to plant " + ((10 * Math.pow(2, _root.bootLVL)) - _root.flags)) + " more flags to unlock this upgrade.";
} else if (myPrice > _root.wallet) {
infoBar.gotoAndStop("selected");
infoBar.buyable = false;
infoBar.description = "Insufficient funds.";
} else {
infoBar.gotoAndStop("selected");
infoBar.buyable = true;
infoBar.description = "Upgrade your jumping ability by buying some nice new boots.";
}
infoBar.price = myPrice;
infoBar.name = "Boot Upgrade " + (_root.bootLVL + 1);
infoBar.buy.purchaseFunc = function () {
_root.wallet = _root.wallet - myPrice;
infoBar.gotoAndStop("message");
infoBar.message = "Boots upgraded!";
infoBar.name = "Boot Upgrade " + (_root.bootLVL + 1);
_root.bootLVL++;
_root.bootHP = _root.maxHP(_root.bootLVL);
_root.updateHUD();
};
}
Symbol 99 Button
on (release) {
_root.menuSFX.start(0, 0);
var myPrice = (5000 * Math.pow(2, _root.suitLVL));
if (_root.suitHP == 0) {
infoBar.gotoAndStop("selected");
infoBar.buyable = false;
infoBar.description = "You must repair your suit before it can be upgraded.";
} else if (_root.flags < (10 * Math.pow(2, _root.suitLVL))) {
infoBar.gotoAndStop("message");
infoBar.buyable = false;
infoBar.message = ("You need to plant " + ((10 * Math.pow(2, _root.suitLVL)) - _root.flags)) + " more flags to unlock this upgrade.";
} else if (myPrice > _root.wallet) {
infoBar.gotoAndStop("selected");
infoBar.buyable = false;
infoBar.description = "Insufficient funds.";
} else {
infoBar.gotoAndStop("selected");
infoBar.buyable = true;
infoBar.description = "Upgrade your suit to insulate against the cold.";
}
infoBar.price = myPrice;
infoBar.name = "Suit Upgrade " + (_root.suitLVL + 1);
infoBar.buy.purchaseFunc = function () {
_root.wallet = _root.wallet - myPrice;
infoBar.gotoAndStop("message");
infoBar.message = "Suit upgraded!";
infoBar.name = "Suit Upgrade " + (_root.suitLVL + 1);
_root.suitLVL++;
_root.suitHP = _root.maxHP(_root.suitLVL);
_root.updateHUD();
};
}
Symbol 100 Button
on (release) {
_root.menuSFX.start(0, 0);
var myPrice = (5000 * Math.pow(2, _root.helmLVL));
if (_root.helmHP == 0) {
infoBar.gotoAndStop("selected");
infoBar.buyable = false;
infoBar.description = "You must repair your helmet before it can be upgraded.";
} else if (_root.flags < (10 * Math.pow(2, _root.helmLVL))) {
infoBar.gotoAndStop("message");
infoBar.buyable = false;
infoBar.message = ("You need to plant " + ((10 * Math.pow(2, _root.helmLVL)) - _root.flags)) + " more flags to unlock this upgrade.";
} else if (myPrice > _root.wallet) {
infoBar.gotoAndStop("selected");
infoBar.buyable = false;
infoBar.description = "Insufficient funds.";
} else {
infoBar.gotoAndStop("selected");
infoBar.buyable = true;
infoBar.description = "Upgrade the strength of your helmet to protect your head from collisions.";
}
infoBar.price = myPrice;
infoBar.name = "Helmet Upgrade " + (_root.helmLVL + 1);
infoBar.buy.purchaseFunc = function () {
_root.wallet = _root.wallet - myPrice;
infoBar.gotoAndStop("message");
infoBar.message = "Helmet upgraded!";
infoBar.name = "Helmet Upgrade " + (_root.helmLVL + 1);
_root.helmLVL++;
_root.helmHP = _root.maxHP(_root.helmLVL);
_root.updateHUD();
};
}
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 2
stop();
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 2
stop();
Symbol 111 MovieClip Frame 3
stop();
Symbol 111 MovieClip Frame 4
stop();
Symbol 112 Button
on (release) {
_root.menuSFX.start(0, 0);
var myPrice = Math.round(50 * (_root.maxHP(_root.helmLVL) - _root.helmHP));
if (_root.helmHP == 0) {
myPrice = Math.round(100 * _root.maxHP(_root.helmLVL));
}
if (myPrice <= 0) {
infoBar.buyable = false;
infoBar.gotoAndStop("message");
infoBar.message = "Your helmet is already in perfect condition.";
} else if (_root.wallet == 0) {
infoBar.gotoAndStop("selected");
infoBar.buyable = false;
myPrice = 0;
infoBar.price = 0;
infoBar.description = "Insufficient Funds.";
} else if (_root.helmHP == 0) {
infoBar.gotoAndStop("selected");
infoBar.buyable = _root.wallet >= myPrice;
infoBar.price = myPrice;
infoBar.description = "Replace your broken helmet.";
} else if (myPrice > _root.wallet) {
infoBar.gotoAndStop("selected");
infoBar.buyable = true;
myPrice = _root.wallet;
infoBar.price = myPrice;
infoBar.description = ("Repair your helmet before it breaks. (" + (Math.round(((_root.wallet / 50) / _root.maxHP(_root.helmLVL)) * 1000) / 10)) + "%)";
} else {
infoBar.gotoAndStop("selected");
infoBar.buyable = true;
infoBar.price = myPrice;
infoBar.description = "Repair your helmet before it breaks. (Full)";
}
infoBar.name = "Helmet Repair";
infoBar.buy.purchaseFunc = function () {
_root.wallet = _root.wallet - myPrice;
infoBar.buyable = false;
infoBar.gotoAndStop("message");
infoBar.message = ((_root.helmHP == 0) ? "Helmet replaced!" : "Helmet repaired!");
infoBar.name = "Helmet Repair";
if (myPrice < Math.round(50 * (_root.maxHP(_root.helmLVL) - _root.helmHP))) {
_root.helmHP = _root.helmHP + Math.round(myPrice / 50);
} else {
_root.helmHP = _root.maxHP(_root.helmLVL);
}
_root.helmHP = ((_root.helmHP > _root.maxHP(_root.helmLVL)) ? (_root.maxHP(_root.helmLVL)) : (_root.helmHP));
_root.updateHUD();
};
}
Symbol 113 Button
on (release) {
_root.menuSFX.start(0, 0);
var myPrice = (100 * (_root.flagCap() - _root.flagsOnHand));
var flagCount = (_root.flagCap() - _root.flagsOnHand);
if (myPrice <= 0) {
infoBar.buyable = false;
infoBar.gotoAndStop("message");
infoBar.message = "You're already carrying the maximum number of flags.";
} else if (_root.wallet < 100) {
infoBar.gotoAndStop("selected");
infoBar.buyable = false;
myPrice = 0;
infoBar.price = 0;
infoBar.description = "Insufficient Funds.";
} else if (myPrice > _root.wallet) {
infoBar.gotoAndStop("selected");
infoBar.buyable = true;
flagCount = Math.floor(_root.wallet / 100);
myPrice = 100 * flagCount;
infoBar.price = myPrice;
infoBar.description = ("Replenish your supply of flags. (" + flagCount) + " flags)";
} else {
infoBar.gotoAndStop("selected");
infoBar.buyable = true;
infoBar.price = myPrice;
infoBar.description = ("Replenish your supply of flags. (" + flagCount) + " flags)";
}
infoBar.name = "Restock Flags";
infoBar.buy.purchaseFunc = function () {
_root.wallet = _root.wallet - myPrice;
infoBar.buyable = false;
infoBar.gotoAndStop("message");
infoBar.message = "Flags restocked!";
infoBar.name = "Restock Flags";
_root.flagsOnHand = _root.flagsOnHand + flagCount;
_root.flagsOnHand = ((_root.flagsOnHand > _root.flagCap()) ? (_root.flagCap()) : (_root.flagsOnHand));
_root.updateHUD();
};
}
Symbol 114 Button
on (release) {
_root.menuSFX.start(0, 0);
var myPrice = Math.round(50 * (_root.maxHP(_root.bootLVL) - _root.bootHP));
if (_root.bootHP == 0) {
myPrice = Math.round(100 * _root.maxHP(_root.bootLVL));
}
if (myPrice <= 0) {
infoBar.buyable = false;
infoBar.gotoAndStop("message");
infoBar.message = "Your boots are already in perfect condition.";
} else if (_root.wallet == 0) {
infoBar.gotoAndStop("selected");
infoBar.buyable = false;
myPrice = 0;
infoBar.price = 0;
infoBar.description = "Insufficient Funds.";
} else if (_root.bootHP == 0) {
infoBar.gotoAndStop("selected");
infoBar.buyable = _root.wallet >= myPrice;
infoBar.price = myPrice;
infoBar.description = "Replace your broken boots.";
} else if (myPrice > _root.wallet) {
infoBar.gotoAndStop("selected");
infoBar.buyable = true;
myPrice = _root.wallet;
infoBar.price = myPrice;
infoBar.description = ("Repair your boots before they break. (" + (Math.round(((_root.wallet / 50) / _root.maxHP(_root.bootLVL)) * 1000) / 10)) + "%)";
} else {
infoBar.gotoAndStop("selected");
infoBar.buyable = true;
infoBar.price = myPrice;
infoBar.description = "Repair your boots before they break. (Full)";
}
infoBar.name = "Boots Repair";
infoBar.buy.purchaseFunc = function () {
_root.wallet = _root.wallet - myPrice;
infoBar.buyable = false;
infoBar.gotoAndStop("message");
infoBar.message = ((_root.bootHP == 0) ? "Boots replaced!" : "Boots repaired!");
infoBar.name = "Boots Repair";
if (myPrice < Math.round(50 * (_root.maxHP(_root.bootLVL) - _root.bootHP))) {
_root.bootHP = _root.bootHP + Math.round(myPrice / 50);
} else {
_root.bootHP = _root.maxHP(_root.bootLVL);
}
_root.bootHP = ((_root.bootHP > _root.maxHP(_root.bootLVL)) ? (_root.maxHP(_root.bootLVL)) : (_root.bootHP));
_root.updateHUD();
};
}
Symbol 115 Button
on (release) {
_root.menuSFX.start(0, 0);
var myPrice = Math.round(50 * (_root.maxHP(_root.suitLVL) - _root.suitHP));
if (_root.suitHP == 0) {
myPrice = Math.round(100 * _root.maxHP(_root.suitLVL));
}
if (myPrice <= 0) {
infoBar.buyable = false;
infoBar.gotoAndStop("message");
infoBar.message = "Your suit is already in perfect condition.";
} else if (_root.wallet == 0) {
infoBar.gotoAndStop("selected");
infoBar.buyable = false;
myPrice = 0;
infoBar.price = 0;
infoBar.description = "Insufficient Funds.";
} else if (_root.suitHP == 0) {
infoBar.gotoAndStop("selected");
infoBar.buyable = _root.wallet >= myPrice;
infoBar.price = myPrice;
infoBar.description = "Replace your broken suit.";
} else if (myPrice > _root.wallet) {
infoBar.gotoAndStop("selected");
infoBar.buyable = true;
myPrice = _root.wallet;
infoBar.price = myPrice;
infoBar.description = ("Repair your suit before it breaks. (" + (Math.round(((_root.wallet / 50) / _root.maxHP(_root.suitLVL)) * 1000) / 10)) + "%)";
} else {
infoBar.gotoAndStop("selected");
infoBar.buyable = true;
infoBar.price = myPrice;
infoBar.description = "Repair your suit before it breaks. (Full)";
}
infoBar.name = "Suit Repair";
infoBar.buy.purchaseFunc = function () {
_root.wallet = _root.wallet - myPrice;
infoBar.buyable = false;
infoBar.gotoAndStop("message");
infoBar.message = ((_root.suitHP == 0) ? "Suit replaced!" : "Suit repaired!");
infoBar.name = "Suit Repair";
if (myPrice < Math.round(50 * (_root.maxHP(_root.suitLVL) - _root.suitHP))) {
_root.suitHP = _root.suitHP + Math.round(myPrice / 50);
} else {
_root.suitHP = _root.maxHP(_root.suitLVL);
}
_root.suitHP = ((_root.suitHP > _root.maxHP(_root.suitLVL)) ? (_root.maxHP(_root.suitLVL)) : (_root.suitHP));
_root.updateHUD();
};
}
Symbol 116 MovieClip [ShopMenu] Frame 1
stop();
Symbol 116 MovieClip [ShopMenu] Frame 2
stop();
onEnterFrame = function () {
if (_root.flags < (10 * Math.pow(2, _root.helmLVL))) {
helmBG.gotoAndStop("disabled");
} else if (_root.helmHP == 0) {
helmBG.gotoAndStop("broken");
} else {
helmBG.gotoAndStop("perfect");
}
if (_root.flags < (10 * Math.pow(2, _root.suitLVL))) {
suitBG.gotoAndStop("disabled");
} else if (_root.suitHP == 0) {
suitBG.gotoAndStop("broken");
} else {
suitBG.gotoAndStop("perfect");
}
if (_root.flags < (10 * Math.pow(2, _root.bootLVL))) {
bootBG.gotoAndStop("disabled");
} else if (_root.bootHP == 0) {
bootBG.gotoAndStop("broken");
} else {
bootBG.gotoAndStop("perfect");
}
if (_root.flags < (10 * Math.pow(2, _root.flagLVL))) {
flagBG.gotoAndStop("disabled");
} else {
flagBG.gotoAndStop("perfect");
}
helmBG.lvl = _root.helmLVL + 1;
suitBG.lvl = _root.suitLVL + 1;
bootBG.lvl = _root.bootLVL + 1;
flagBG.lvl = _root.flagLVL + 1;
helmBG.iType.gotoAndStop("upgrade");
suitBG.iType.gotoAndStop("upgrade");
bootBG.iType.gotoAndStop("upgrade");
flagBG.iType.gotoAndStop("upgrade");
};
Symbol 116 MovieClip [ShopMenu] Frame 3
stop();
var helmState;
var suitState;
var bootState;
var flagState;
onEnterFrame = function () {
if (_root.helmHP == 0) {
helmBG.gotoAndStop("broken");
helmState = 2;
} else if (_root.helmHP == _root.maxHP(_root.helmLVL)) {
helmBG.gotoAndStop("perfect");
helmState = 0;
} else {
helmBG.gotoAndStop("damaged");
helmState = 1;
}
if (_root.suitHP == 0) {
suitBG.gotoAndStop("broken");
suitState = 2;
} else if (_root.suitHP == _root.maxHP(_root.suitLVL)) {
suitBG.gotoAndStop("perfect");
suitState = 0;
} else {
suitBG.gotoAndStop("damaged");
suitState = 1;
}
if (_root.bootHP == 0) {
bootBG.gotoAndStop("broken");
bootState = 2;
} else if (_root.bootHP == _root.maxHP(_root.bootLVL)) {
bootBG.gotoAndStop("perfect");
bootState = 0;
} else {
bootBG.gotoAndStop("damaged");
bootState = 1;
}
if (_root.flagsOnHand == 0) {
flagBG.gotoAndStop("broken");
flagState = 2;
} else if (_root.flagsOnHand == _root.flagCap()) {
flagBG.gotoAndStop("perfect");
flagState = 0;
} else {
flagBG.gotoAndStop("damaged");
flagState = 1;
}
helmBG.lvl = "";
suitBG.lvl = "";
bootBG.lvl = "";
flagBG.lvl = "";
helmBG.iType.gotoAndStop("repair");
suitBG.iType.gotoAndStop("repair");
bootBG.iType.gotoAndStop("repair");
flagBG.iType.gotoAndStop("repair");
};
Symbol 126 MovieClip [logoPlanet] Frame 1
var mySize = 0;
onEnterFrame = function () {
inner._width = mySize;
inner._height = mySize;
};
Symbol 131 Button
on (rollOver) {
_root.menuSFX.start(0, 0);
}
on (release) {
_root.menuSFX.start(0, 0);
_root.bPushed = true;
_root.bTarget = "highscores";
_root.boostSFX.start(0, 1000);
}
Symbol 134 Button
on (rollOver) {
_root.menuSFX.start(0, 0);
}
on (release) {
_global.skipTitle = true;
_root.menuSFX.start(0, 0);
_root.bPushed = true;
_root.bTarget = "inst1";
_root.boostSFX.start(0, 1000);
}
Symbol 137 Button
on (rollOver) {
_root.menuSFX.start(0, 0);
}
on (release) {
_root.menuSFX.start(0, 0);
_root.bPushed = true;
_root.bTarget = (_global.skipTitle ? "game" : "inst1");
_global.skipTitle = true;
_root.boostSFX.start(0, 1000);
}
Symbol 141 MovieClip [titleGFX] Frame 1
startB._visible = false;
instructionB._visible = false;
scoresB._visible = false;
Symbol 168 MovieClip [scorecard] Frame 1
var baseScore = 0;
var flagsPlanted = 0;
var maxMult = 0;
var maxUp = 0;
var partsBroken = 0;
var inc = ((_root.score < 0) ? (-1 * Math.ceil(Math.sqrt(Math.abs(_root.score)))) : (Math.ceil(Math.sqrt(_root.score))));
var baseFlag = false;
var flagsFlag = false;
var multFlag = false;
var upFlag = false;
var brokenFlag = false;
var totalFlag = false;
var skipCnt = false;
var sum;
onEnterFrame = function () {
pressSpace._visible = totalFlag && (!_root.scored);
if (totalFlag) {
_root.myTotalScore = totalScore;
} else if (brokenFlag) {
totalScore = totalScore + inc;
if ((Math.abs(totalScore) >= Math.abs(sum)) || (skipCnt)) {
totalScore = sum;
totalFlag = true;
}
} else if (upFlag) {
partsBroken++;
brokenScore = -3000 * partsBroken;
if ((partsBroken > _root.brokenCount) || (skipCnt)) {
partsBroken = _root.brokenCount;
brokenScore = -3000 * partsBroken;
brokenFlag = true;
sum = (((baseScore + flagScore) + multScore) + upScore) + brokenScore;
inc = ((sum < 0) ? (-1 * Math.ceil(Math.sqrt(Math.abs(sum)))) : (Math.ceil(Math.sqrt(sum))));
}
} else if (multFlag) {
maxUp++;
upScore = 2000 * maxUp;
if ((maxUp > ((_root.maxHelm + _root.maxSuit) + _root.maxBoot)) || (skipCnt)) {
maxUp = (_root.maxHelm + _root.maxSuit) + _root.maxBoot;
upScore = 2000 * maxUp;
upFlag = true;
}
} else if (flagsFlag) {
maxMult++;
multScore = 500 * maxMult;
if ((maxMult > (_root.maxMultiplier - 1)) || (skipCnt)) {
maxMult = _root.maxMultiplier - 1;
multScore = 500 * maxMult;
multFlag = true;
}
} else if (baseFlag) {
flagsPlanted++;
flagScore = 100 * flagsPlanted;
if ((flagsPlanted > _root.flags) || (skipCnt)) {
flagsPlanted = _root.flags;
flagScore = 100 * flagsPlanted;
flagsFlag = true;
}
} else {
baseScore = baseScore + inc;
if ((Math.abs(baseScore) >= Math.abs(_root.score)) || (skipCnt)) {
baseScore = _root.score;
baseFlag = true;
}
}
};
Symbol 179 MovieClip [helpBubble] Frame 31
stop();
Symbol 179 MovieClip [helpBubble] Frame 62
_parent._visible = false;
stop();
Symbol 181 MovieClip [miniBubble2] Frame 21
stop();
Symbol 181 MovieClip [miniBubble2] Frame 42
stop();
Symbol 182 MovieClip [miniBubble1] Frame 11
stop();
Symbol 182 MovieClip [miniBubble1] Frame 22
stop();
Symbol 188 Button
on (release) {
getURL ("http://www.gamesnow.biz/free_website_games.html", "_blank");
}
Symbol 190 Button
on (release) {
getURL ("http://www.gamesnow.biz", "_blank");
}
Symbol 193 Button
on (release) {
getURL ("http://www.gamesnow.biz", "_blank");
}
Symbol 204 MovieClip Frame 10
this._parent.gotoAndStop("float");
Symbol 206 MovieClip Frame 10
this._parent.gotoAndStop("float");
Symbol 215 MovieClip Frame 1
onEnterFrame = function () {
if (_root.isPaused || (_root.isShopping)) {
stop();
} else {
play();
}
};
Symbol 215 MovieClip Frame 4
if (Math.abs(_root.jMech.avel) < 8) {
_root.bootHP = _root.bootHP - (0.1 / (_root.bootLVL + 1));
} else {
_root.bootHP = _root.bootHP - (0.2 / (_root.bootLVL + 1));
}
if (_root.bootHP <= 0) {
_root.bootHP = 0;
_root.bootLVL = 0;
}
_root.updateHUD();
Symbol 215 MovieClip Frame 8
if (Math.abs(_root.jMech.avel) < 8) {
gotoAndPlay (13);
}
Symbol 215 MovieClip Frame 19
if (Math.abs(_root.jMech.avel) < 8) {
_root.bootHP = _root.bootHP - (0.1 / (_root.bootLVL + 1));
} else {
_root.bootHP = _root.bootHP - (0.2 / (_root.bootLVL + 1));
}
if (_root.bootHP <= 0) {
_root.bootHP = 0;
_root.bootLVL = 0;
}
_root.updateHUD();
Symbol 215 MovieClip Frame 23
if (Math.abs(_root.jMech.avel) < 8) {
gotoAndPlay (28);
}
Symbol 240 MovieClip [flag] Frame 1
if (random(2) == 0) {
this._yscale = this._yscale * -1;
}
this.gotoAndStop(Math.floor(Math.random() * 5) + 2);
Symbol 248 Button
on (release) {
_root.gotoAndStop("checkURL");
}
Symbol 249 Button
on (release) {
_root.gotoAndStop("checkURL");
}
Symbol 250 MovieClip Frame 1
if (!this._visible) {
stop();
}
Symbol 250 MovieClip Frame 33
stop();
Symbol 264 Button
on (release) {
getURL ("http://www.gamesnow.biz", "_blank");
}
Symbol 266 MovieClip Frame 1
stepp = 0;
var CPMStarContentSpotID = "547Q50C8D0D9";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
Instance of Symbol 259 MovieClip "loaderbar" in Symbol 266 MovieClip Frame 1
onClipEvent (load) {
var started = false;
}
onClipEvent (enterFrame) {
_parent.loaderbar.gotoAndStop(_parent.stepp);
if ((_root.getBytesLoaded() / _root.getBytesTotal()) > (_parent.stepp / 100)) {
_parent.stepp++;
}
if (_parent.stepp >= 100) {
_root.getStarted._visible = true;
if (!started) {
_root.getStarted.play();
started = true;
}
}
}
Symbol 388 MovieClip [__Packages.MD5] Frame 0
class MD5
{
var _checksum;
function MD5 (string) {
function RotateLeft(lValue, iShiftBits) {
return((lValue << iShiftBits) | (lValue >>> (32 - iShiftBits)));
}
function AddUnsigned(lX, lY) {
var _local5;
var _local4;
var _local3;
var _local2;
var _local1;
_local3 = lX & 2147483648;
_local2 = lY & 2147483648;
_local5 = lX & 1073741824;
_local4 = lY & 1073741824;
_local1 = (lX & 1073741823) + (lY & 1073741823);
if (_local5 & _local4) {
return(((_local1 ^ 2147483648) ^ _local3) ^ _local2);
}
if (_local5 | _local4) {
if (_local1 & 1073741824) {
return(((_local1 ^ 3221225472) ^ _local3) ^ _local2);
}
return(((_local1 ^ 1073741824) ^ _local3) ^ _local2);
}
return((_local1 ^ _local3) ^ _local2);
}
function F(x, y, z) {
return((x & y) | ((~x) & z));
}
function G(x, y, z) {
return((x & z) | (y & (~z)));
}
function H(x, y, z) {
return((x ^ y) ^ z);
}
function I(x, y, z) {
return(y ^ (x | (~z)));
}
function FF(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
return(AddUnsigned(RotateLeft(a, s), b));
}
function GG(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
return(AddUnsigned(RotateLeft(a, s), b));
}
function HH(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
return(AddUnsigned(RotateLeft(a, s), b));
}
function II(a, b, c, d, x, s, ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
return(AddUnsigned(RotateLeft(a, s), b));
}
function ConvertToWordArray(string) {
var _local2;
var _local5 = string.length;
var _local8 = _local5 + 8;
var _local9 = (_local8 - (_local8 % 64)) / 64;
var _local7 = (_local9 + 1) * 16;
var _local3 = Array(_local7 - 1);
var _local4 = 0;
var _local1 = 0;
while (_local1 < _local5) {
_local2 = (_local1 - (_local1 % 4)) / 4;
_local4 = (_local1 % 4) * 8;
_local3[_local2] = _local3[_local2] | (string.charCodeAt(_local1) << _local4);
_local1++;
}
_local2 = (_local1 - (_local1 % 4)) / 4;
_local4 = (_local1 % 4) * 8;
_local3[_local2] = _local3[_local2] | (128 << _local4);
_local3[_local7 - 2] = _local5 << 3;
_local3[_local7 - 1] = _local5 >>> 29;
return(_local3);
}
function WordToHex(lValue) {
var _local3 = "";
var _local2 = "";
var _local4;
var _local1;
_local1 = 0;
while (_local1 <= 3) {
_local4 = (lValue >>> (_local1 * 8)) & 255;
_local2 = "0" + _local4.toString(16);
_local3 = _local3 + _local2.substr(_local2.length - 2, 2);
_local1++;
}
return(_local3);
}
function Utf8Encode(string) {
var _local2 = "";
var _local3 = 0;
while (_local3 < string.length) {
var _local1 = string.charCodeAt(_local3);
if (_local1 < 128) {
_local2 = _local2 + String.fromCharCode(_local1);
} else if ((_local1 > 127) && (_local1 < 2048)) {
_local2 = _local2 + String.fromCharCode((_local1 >> 6) | 192);
_local2 = _local2 + String.fromCharCode((_local1 & 63) | 128);
} else {
_local2 = _local2 + String.fromCharCode((_local1 >> 12) | 224);
_local2 = _local2 + String.fromCharCode(((_local1 >> 6) & 63) | 128);
_local2 = _local2 + String.fromCharCode((_local1 & 63) | 128);
}
_local3++;
}
return(_local2);
}
var _local7 = Array();
var _local6;
var _local36;
var _local37;
var _local38;
var _local35;
var _local5;
var _local4;
var _local3;
var _local2;
var _local22 = 7;
var _local20 = 12;
var _local17 = 17;
var _local14 = 22;
var _local21 = 5;
var _local18 = 9;
var _local15 = 14;
var _local12 = 20;
var _local19 = 4;
var _local16 = 11;
var _local13 = 16;
var _local11 = 23;
var _local26 = 6;
var _local25 = 10;
var _local24 = 15;
var _local23 = 21;
string = Utf8Encode(string);
_local7 = ConvertToWordArray(string);
_local5 = 1732584193 /* 0x67452301 */;
_local4 = 4023233417;
_local3 = 2562383102;
_local2 = 271733878 /* 0x10325476 */;
_local6 = 0;
while (_local6 < _local7.length) {
_local36 = _local5;
_local37 = _local4;
_local38 = _local3;
_local35 = _local2;
_local5 = FF(_local5, _local4, _local3, _local2, _local7[_local6 + 0], _local22, 3614090360);
_local2 = FF(_local2, _local5, _local4, _local3, _local7[_local6 + 1], _local20, 3905402710);
_local3 = FF(_local3, _local2, _local5, _local4, _local7[_local6 + 2], _local17, 606105819);
_local4 = FF(_local4, _local3, _local2, _local5, _local7[_local6 + 3], _local14, 3250441966);
_local5 = FF(_local5, _local4, _local3, _local2, _local7[_local6 + 4], _local22, 4118548399);
_local2 = FF(_local2, _local5, _local4, _local3, _local7[_local6 + 5], _local20, 1200080426);
_local3 = FF(_local3, _local2, _local5, _local4, _local7[_local6 + 6], _local17, 2821735955);
_local4 = FF(_local4, _local3, _local2, _local5, _local7[_local6 + 7], _local14, 4249261313);
_local5 = FF(_local5, _local4, _local3, _local2, _local7[_local6 + 8], _local22, 1770035416);
_local2 = FF(_local2, _local5, _local4, _local3, _local7[_local6 + 9], _local20, 2336552879);
_local3 = FF(_local3, _local2, _local5, _local4, _local7[_local6 + 10], _local17, 4294925233);
_local4 = FF(_local4, _local3, _local2, _local5, _local7[_local6 + 11], _local14, 2304563134);
_local5 = FF(_local5, _local4, _local3, _local2, _local7[_local6 + 12], _local22, 1804603682);
_local2 = FF(_local2, _local5, _local4, _local3, _local7[_local6 + 13], _local20, 4254626195);
_local3 = FF(_local3, _local2, _local5, _local4, _local7[_local6 + 14], _local17, 2792965006);
_local4 = FF(_local4, _local3, _local2, _local5, _local7[_local6 + 15], _local14, 1236535329);
_local5 = GG(_local5, _local4, _local3, _local2, _local7[_local6 + 1], _local21, 4129170786);
_local2 = GG(_local2, _local5, _local4, _local3, _local7[_local6 + 6], _local18, 3225465664);
_local3 = GG(_local3, _local2, _local5, _local4, _local7[_local6 + 11], _local15, 643717713);
_local4 = GG(_local4, _local3, _local2, _local5, _local7[_local6 + 0], _local12, 3921069994);
_local5 = GG(_local5, _local4, _local3, _local2, _local7[_local6 + 5], _local21, 3593408605);
_local2 = GG(_local2, _local5, _local4, _local3, _local7[_local6 + 10], _local18, 38016083);
_local3 = GG(_local3, _local2, _local5, _local4, _local7[_local6 + 15], _local15, 3634488961);
_local4 = GG(_local4, _local3, _local2, _local5, _local7[_local6 + 4], _local12, 3889429448);
_local5 = GG(_local5, _local4, _local3, _local2, _local7[_local6 + 9], _local21, 568446438);
_local2 = GG(_local2, _local5, _local4, _local3, _local7[_local6 + 14], _local18, 3275163606);
_local3 = GG(_local3, _local2, _local5, _local4, _local7[_local6 + 3], _local15, 4107603335);
_local4 = GG(_local4, _local3, _local2, _local5, _local7[_local6 + 8], _local12, 1163531501);
_local5 = GG(_local5, _local4, _local3, _local2, _local7[_local6 + 13], _local21, 2850285829);
_local2 = GG(_local2, _local5, _local4, _local3, _local7[_local6 + 2], _local18, 4243563512);
_local3 = GG(_local3, _local2, _local5, _local4, _local7[_local6 + 7], _local15, 1735328473);
_local4 = GG(_local4, _local3, _local2, _local5, _local7[_local6 + 12], _local12, 2368359562);
_local5 = HH(_local5, _local4, _local3, _local2, _local7[_local6 + 5], _local19, 4294588738);
_local2 = HH(_local2, _local5, _local4, _local3, _local7[_local6 + 8], _local16, 2272392833);
_local3 = HH(_local3, _local2, _local5, _local4, _local7[_local6 + 11], _local13, 1839030562);
_local4 = HH(_local4, _local3, _local2, _local5, _local7[_local6 + 14], _local11, 4259657740);
_local5 = HH(_local5, _local4, _local3, _local2, _local7[_local6 + 1], _local19, 2763975236);
_local2 = HH(_local2, _local5, _local4, _local3, _local7[_local6 + 4], _local16, 1272893353);
_local3 = HH(_local3, _local2, _local5, _local4, _local7[_local6 + 7], _local13, 4139469664);
_local4 = HH(_local4, _local3, _local2, _local5, _local7[_local6 + 10], _local11, 3200236656);
_local5 = HH(_local5, _local4, _local3, _local2, _local7[_local6 + 13], _local19, 681279174);
_local2 = HH(_local2, _local5, _local4, _local3, _local7[_local6 + 0], _local16, 3936430074);
_local3 = HH(_local3, _local2, _local5, _local4, _local7[_local6 + 3], _local13, 3572445317);
_local4 = HH(_local4, _local3, _local2, _local5, _local7[_local6 + 6], _local11, 76029189);
_local5 = HH(_local5, _local4, _local3, _local2, _local7[_local6 + 9], _local19, 3654602809);
_local2 = HH(_local2, _local5, _local4, _local3, _local7[_local6 + 12], _local16, 3873151461);
_local3 = HH(_local3, _local2, _local5, _local4, _local7[_local6 + 15], _local13, 530742520);
_local4 = HH(_local4, _local3, _local2, _local5, _local7[_local6 + 2], _local11, 3299628645);
_local5 = II(_local5, _local4, _local3, _local2, _local7[_local6 + 0], _local26, 4096336452);
_local2 = II(_local2, _local5, _local4, _local3, _local7[_local6 + 7], _local25, 1126891415);
_local3 = II(_local3, _local2, _local5, _local4, _local7[_local6 + 14], _local24, 2878612391);
_local4 = II(_local4, _local3, _local2, _local5, _local7[_local6 + 5], _local23, 4237533241);
_local5 = II(_local5, _local4, _local3, _local2, _local7[_local6 + 12], _local26, 1700485571);
_local2 = II(_local2, _local5, _local4, _local3, _local7[_local6 + 3], _local25, 2399980690);
_local3 = II(_local3, _local2, _local5, _local4, _local7[_local6 + 10], _local24, 4293915773);
_local4 = II(_local4, _local3, _local2, _local5, _local7[_local6 + 1], _local23, 2240044497);
_local5 = II(_local5, _local4, _local3, _local2, _local7[_local6 + 8], _local26, 1873313359);
_local2 = II(_local2, _local5, _local4, _local3, _local7[_local6 + 15], _local25, 4264355552);
_local3 = II(_local3, _local2, _local5, _local4, _local7[_local6 + 6], _local24, 2734768916);
_local4 = II(_local4, _local3, _local2, _local5, _local7[_local6 + 13], _local23, 1309151649);
_local5 = II(_local5, _local4, _local3, _local2, _local7[_local6 + 4], _local26, 4149444226);
_local2 = II(_local2, _local5, _local4, _local3, _local7[_local6 + 11], _local25, 3174756917);
_local3 = II(_local3, _local2, _local5, _local4, _local7[_local6 + 2], _local24, 718787259);
_local4 = II(_local4, _local3, _local2, _local5, _local7[_local6 + 9], _local23, 3951481745);
_local5 = AddUnsigned(_local5, _local36);
_local4 = AddUnsigned(_local4, _local37);
_local3 = AddUnsigned(_local3, _local38);
_local2 = AddUnsigned(_local2, _local35);
_local6 = _local6 + 16;
}
var _local47 = ((WordToHex(_local5) + WordToHex(_local4)) + WordToHex(_local3)) + WordToHex(_local2);
_checksum = _local47.toLowerCase();
}
function getChecksum() {
return(_checksum);
}
}
Symbol 274 MovieClip Frame 3
_parent.bgGallop.setVolume(_parent.bgVolume);
_parent.bgGallop.start(0, 0);
Symbol 292 MovieClip Frame 1
bgGallop = new Sound(this);
bgGallop.attachSound("bggallop");
bgVolume = 20;
Symbol 292 MovieClip Frame 66
bgVolume = 20;
Symbol 292 MovieClip Frame 79
bgVolume = 30;
Symbol 292 MovieClip Frame 113
bgVolume = 40;
Symbol 292 MovieClip Frame 344
_root.gotoAndStop("title");
Symbol 294 Button
on (release) {
getURL ("http://beastgames.org/", "_blank");
}
Symbol 308 Button
on (release) {
_root.menuSFX.start(0, 0);
gotoAndStop ("title");
}
Symbol 311 Button
on (release) {
_root.menuSFX.start(0, 0);
gotoAndStop ("inst2");
}
Symbol 314 Button
on (release) {
_root.menuSFX.start(0, 0);
gotoAndStop ("inst1");
}
Symbol 315 Button
on (release) {
_root.menuSFX.start(0, 0);
gotoAndStop ("inst3");
}
Symbol 332 Button
on (release) {
_root.menuSFX.start(0, 0);
gotoAndStop ("inst2");
}
Symbol 335 Button
on (release) {
_root.menuSFX.start(0, 0);
gotoAndStop ("game");
}
Symbol 348 Button
on (release) {
_root.menuSFX.start(0, 0);
gotoAndStop ("title");
}
Symbol 384 MovieClip Frame 1
var c = new LoadVars();
var i = new LoadVars();
c.sendAndLoad("http://hiscore.gamesnow.biz/planethopper_get.php", i, "POST");
i.onLoad = function () {
name1 = i.name1;
score1 = i.score1;
name2 = i.name2;
score2 = i.score2;
name3 = i.name3;
score3 = i.score3;
name4 = i.name4;
score4 = i.score4;
name5 = i.name5;
score5 = i.score5;
name6 = i.name6;
score6 = i.score6;
name7 = i.name7;
score7 = i.score7;
name8 = i.name8;
score8 = i.score8;
name9 = i.name9;
score9 = i.score9;
name10 = i.name10;
score10 = i.score10;
};
stop();
Symbol 384 MovieClip Frame 2
stop();