Frame 1
_quality = "medium";
men = new ContextMenu();
hi = new ContextMenuItem("Quality: High", function () {
_quality = "HIGH";
});
med = new ContextMenuItem("Quality: Medium", function () {
_quality = "MEDIUM";
});
lo = new ContextMenuItem("Quality: Low", function () {
_quality = "LOW";
});
sfb = new ContextMenuItem("SuperFlashBros.net", function () {
getURL ("http://www.superflashbros.net", "_blank");
}, true);
agms = new ContextMenuItem("ArmorGames.com", function () {
getURL ("http://www.armorgames.com", "_blank");
});
agm = new ContextMenuItem("Play More Games!", function () {
getURL ("http://www.armorgames.com", "_blank");
});
men.hideBuiltInItems();
men.customItems.push(hi);
men.customItems.push(med);
men.customItems.push(lo);
men.customItems.push(sfb);
men.customItems.push(agms);
men.customItems.push(agm);
_root.menu = men;
_root.tabEnabled = false;
Instance of Symbol 192 MovieClip in Frame 1
onClipEvent (load) {
this.onRelease = function () {
getURL ("http://www.armorgames.com", "_blank");
};
}
Instance of Symbol 195 MovieClip in Frame 1
onClipEvent (load) {
this.onRelease = function () {
getURL ("http://www.superflashbros.net", "_blank");
};
}
Frame 2
if (_root.getBytesLoaded() != _root.getBytesTotal()) {
gotoAndPlay (1);
}
Frame 3
stopAllSounds();
stop();
Instance of Symbol 207 MovieClip in Frame 3
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.game_str = "main";
_root.gotoAndPlay("intro");
};
}
Instance of Symbol 207 MovieClip in Frame 3
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.game_str = "lander";
_root.gotoAndPlay("lander");
};
}
Instance of Symbol 207 MovieClip in Frame 3
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.game_str = "asteroids";
_root.gotoAndPlay("asteroids");
};
}
Instance of Symbol 207 MovieClip in Frame 3
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
getURL ("http://www.superflashbros.net", "_blank");
};
}
Instance of Symbol 207 MovieClip in Frame 3
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
getURL ("http://www.armorgames.com", "_blank");
};
}
Instance of Symbol 207 MovieClip in Frame 3
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
getURL ("http://www.armorgames.com", "_blank");
};
}
Instance of Symbol 207 MovieClip in Frame 4
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.gotoAndPlay("skip");
};
}
Frame 1324
_root.game = new SpaceZebraGame(new flash.geom.Point(280, 1025), 615, _root.moonHolder_mc, _root.james_mc);
stop();
Instance of Symbol 393 MovieClip "timer" in Frame 1324
onClipEvent (load) {
function addScore() {
_root.score = _root.score + 100;
}
function hurtScore() {
_root.score = _root.score - 100;
}
start_time = getTimer();
min = 0;
min_up = false;
ended = false;
_root.score = 0;
display_score = 0;
}
onClipEvent (enterFrame) {
now = getTimer();
time = 100000 - (now - start_time);
secs = Math.round(time / 1000);
if (secs < 60) {
min = 0;
}
if (secs > 59) {
min = 1;
secs = secs - 60;
}
if (secs > 59) {
min = 2;
secs = secs - 60;
}
if ((secs == 0) && (min == 0)) {
_root.game.endGame();
ended = true;
_visible = false;
_root.final_score = _root.score;
}
if (secs < 10) {
secs = "0" + secs;
}
display = (min + ":") + secs;
if (!ended) {
this.txt.text = display;
}
if (_root.score < 0) {
_root.score = 0;
}
if (display_score != _root.score) {
if (display_score > _root.score) {
speed = -20;
} else if (display_score < _root.score) {
speed = 20;
}
display_score = display_score + speed;
}
display = Math.round(display_score);
if (Math.round(display_score) < 1000000) {
display = "0" + display;
}
if (Math.round(display_score) < 100000) {
display = "0" + display;
}
if (Math.round(display_score) < 10000) {
display = "0" + display;
}
if (Math.round(display_score) < 1000) {
display = "0" + display;
}
if (Math.round(display_score) < 100) {
display = "0" + display;
}
if (Math.round(display_score) < 10) {
display = "0" + display;
}
this.stxt.text = display;
}
Frame 1325
_root.game = new LanderGame(new flash.geom.Point(280, 1025), 615, _root.moonHolder_mc, _root.james_mc);
stop();
Frame 1326
_root.game = new AsteroidsGame(new flash.geom.Point(275, 200), _root.james_mc);
stop();
_root.localTo;
Instance of Symbol 418 MovieClip "timer" in Frame 1326
onClipEvent (load) {
min = 0;
ended = false;
started = false;
this.onEnterFrame = function () {
if (started && (!ended)) {
now = getTimer();
time = now - start_time;
secs = Math.round(time / 1000);
hsecs = Math.round(time / 10) - (Math.round(time / 1000) * 100);
if (hsecs < 0) {
hsecs = hsecs + 100;
}
if (hsecs < 10) {
hsecs = "0" + hsecs;
}
if (secs < 100) {
if (secs < 10) {
secs = "00" + secs;
} else {
secs = "0" + secs;
}
}
display = (secs + ".") + hsecs;
this.txt.text = display;
}
};
}
Frame 1327
stop();
Instance of Symbol 446 MovieClip "scoretable" in Frame 1327
onClipEvent (load) {
__top10_send__ = new LoadVars();
__top10_receive__ = new LoadVars();
__top10_url_1__ = "http://www.armorbot.com/flashcomm";
__top10_url_2__ = "/top10_b";
if (_root.game_str == "main") {
__top10_send__.hid = 1120;
__top10_send__.kid = "ROLYQS";
} else if (_root.game_str == "lander") {
__top10_send__.hid = 1121;
__top10_send__.kid = "MOIBBG";
} else if (_root.game_str == "asteroids") {
__top10_send__.hid = 1122;
__top10_send__.kid = "XLZDYP";
}
__top10_send__.sendAndLoad(__top10_url_1__ + __top10_url_2__, __top10_receive__, "POST");
__top10_receive__.onLoad = function (success) {
if (success) {
_root.scoretable.gotoAndStop(2);
i = 1;
while (i < 9) {
_root.scoretable["n" + i].text = __top10_receive__["name" + i];
_root.scoretable["s" + i].text = Number(__top10_receive__["score" + i]) / 100;
i++;
}
} else {
_root.scoretable.gotoAndStop(3);
}
};
}
Instance of Symbol 448 MovieClip in Frame 1327
onClipEvent (load) {
this.score.text = _root.final_score;
if (_root.game == "deep sea diving") {
this.score.text = this.score.text + "m";
}
}
Instance of Symbol 207 MovieClip in Frame 1327
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
stopAllSounds();
_root.gotoAndStop(_root.game_str);
};
}
Instance of Symbol 207 MovieClip in Frame 1327
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.gotoAndStop("menu");
};
}
Instance of Symbol 207 MovieClip in Frame 1327
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
getURL ("http://www.armorgames.com", "_blank");
};
}
Instance of Symbol 207 MovieClip in Frame 1327
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
if (_root.game_str == "main") {
getURL ("http://armorbot.com/mytable/?id=1120", "_blank");
} else if (_root.game_str == "lander") {
getURL ("http://armorbot.com/mytable/?id=1121", "_blank");
} else if (_root.game_str == "asteroids") {
getURL ("http://armorbot.com/mytable/?id=1122", "_blank");
}
};
}
Symbol 25 MovieClip Frame 5
stop();
Symbol 29 MovieClip Frame 17
stop();
Symbol 40 MovieClip Frame 16
this._parent._parent.removeMovieClip();
Symbol 41 MovieClip Frame 1
stop();
Symbol 49 MovieClip Frame 1
stop();
Symbol 76 MovieClip [Ship_mc] Frame 1
#initclip 10
Object.registerClass("Ship_mc", Ship);
#endinitclip
Symbol 169 MovieClip Frame 10
this._parent.isFalling = false;
this._parent.onEnterFrame = this._parent.act;
this._parent.gotoAndStop("stand");
Symbol 170 MovieClip [SpaceJames] Frame 1
#initclip 9
Object.registerClass("SpaceJames", SpaceZebra);
#endinitclip
stop();
Symbol 462 MovieClip [__Packages.classes.james.Zebra] Frame 0
class classes.james.Zebra extends MovieClip
{
var speedX_float, speedY_float, gravity_float, speedXMax_float, speedYMax_float, _xscale, _x, _y, isJumping, gotoAndStop;
function Zebra (Void) {
super();
speedX_float = 0;
speedY_float = 0;
gravity_float = 1;
speedXMax_float = 1;
speedYMax_float = 1;
}
function get speedX() {
return(speedX_float);
}
function get speedY() {
return(speedY_float);
}
function simulate(p_factor_float) {
var _local2 = p_factor_float || 1;
accelerateY(gravity_float * _local2);
accelerateX(((-speedX_float) * _local2) / 40);
moveX(speedX_float * _local2);
moveY(speedY_float * _local2);
if (speedX_float != 0) {
_xscale = 100 - (200 * (speedX_float < 0));
}
if (groundTest()) {
accelerateX(((-speedX_float) * _local2) / 5);
hitGround();
speedY_float = 0;
while (groundTest()) {
moveY(-0.1);
}
} else {
airFrames();
}
}
function accelerateX(p_x_float) {
speedX_float = speedX_float + p_x_float;
if (speedX_float < (-speedXMax_float)) {
speedX_float = -speedXMax_float;
}
if (speedX_float > speedXMax_float) {
speedX_float = speedXMax_float;
}
}
function accelerateY(p_y_float) {
speedY_float = speedY_float + p_y_float;
if (speedY_float < (-speedYMax_float)) {
speedY_float = -speedYMax_float;
}
if (speedY_float > speedYMax_float) {
speedY_float = speedYMax_float;
}
}
function moveX(p_x_float) {
_x = _x + p_x_float;
}
function moveY(p_y_float) {
_y = _y + p_y_float;
}
function control(Void) {
}
function cameraFollow(Void) {
}
function groundTest() {
return(false);
}
function hitGround(Void) {
isJumping = false;
if ((speedX_float < 0.05) && (speedX_float > -0.05)) {
gotoAndStop("stand");
speedX_float = 0;
} else {
gotoAndStop("walk");
}
}
function airFrames(Void) {
if (isJumping) {
gotoAndStop("jump");
}
}
}
Symbol 463 MovieClip [__Packages.SpaceZebra] Frame 0
class SpaceZebra extends classes.james.Zebra
{
var controls, gravity_float, speedXMax_float, speedYMax_float, planet_mc, darkMatter_mc, meteor_mc, onEnterFrame, game, isEnded, simulate, _x, _y, speedX_float, speedY_float, isJumping, isUpHeld, isHovering, isFalling, accelerateY, accelerateX, gotoAndStop;
function SpaceZebra (Void) {
super();
controls = new classes.Controls();
controls.registerKey("UP");
controls.registerKey("LEFT");
controls.registerKey("RIGHT");
gravity_float = 0.2;
speedXMax_float = 0.4;
speedYMax_float = 5;
}
function init(p_planet_mc, p_darkMatter_mc, p_meteor_mc, p_game) {
planet_mc = p_planet_mc;
darkMatter_mc = p_darkMatter_mc;
meteor_mc = p_meteor_mc;
onEnterFrame = act;
game = p_game;
}
function act(Void) {
if (isEnded) {
endAct();
onEnterFrame = endAct;
return(undefined);
}
control();
simulate();
hitCheck();
}
function endAct(Void) {
isEnded = true;
simulate();
}
function hitCheck(Void) {
for (var _local7 in darkMatter_mc) {
if (darkMatter_mc[_local7].darkMatter._currentframe != 7) {
var _local6 = darkMatter_mc[_local7]._rotation + darkMatter_mc._rotation;
if ((_local6 < 5) && (_local6 > -5)) {
var _local3 = new flash.geom.Point(_x, _y);
darkMatter_mc[_local7].globalToLocal(_local3);
var _local5 = _local3.x - darkMatter_mc[_local7].darkMatter._x;
var _local4 = _local3.y - darkMatter_mc[_local7].darkMatter._y;
if (Math.sqrt((_local5 * _local5) + (_local4 * _local4)) < 40) {
_root.timer.addScore();
darkMatter_mc[_local7].darkMatter.gotoAndStop(7);
}
}
}
}
for (var _local7 in meteor_mc) {
if ((meteor_mc[_local7].meteor._currentframe < 4) || (meteor_mc[_local7].asteroid._currentframe == 1)) {
var _local6 = meteor_mc[_local7]._rotation + meteor_mc._rotation;
if ((_local6 < 5) && (_local6 > -5)) {
var _local3 = new flash.geom.Point(_x, _y);
meteor_mc[_local7].globalToLocal(_local3);
if (meteor_mc[_local7].meteor) {
var _local5 = _local3.x - meteor_mc[_local7].meteor._x;
var _local4 = _local3.y - meteor_mc[_local7].meteor._y;
} else {
var _local5 = _local3.x - meteor_mc[_local7].asteroid._x;
var _local4 = _local3.y - meteor_mc[_local7].asteroid._y;
}
if (Math.sqrt((_local5 * _local5) + (_local4 * _local4)) < 40) {
speedX_float = 0;
speedY_float = 0;
_root.timer.hurtScore();
if (meteor_mc[_local7].asteroid) {
_root.timer.hurtScore();
_root.timer.hurtScore();
}
meteor_mc[_local7].meteor.gotoAndStop(meteor_mc[_local7].meteor._currentframe + 3);
meteor_mc[_local7].asteroid.gotoAndStop(2);
}
}
}
}
}
function jump(Void) {
isJumping = true;
isUpHeld = true;
speedY_float = -15;
moveY(-10);
}
function control(Void) {
var _local2 = controls.getKeys();
if (((_local2.UP && (!isJumping)) && (!isUpHeld)) && (!isHovering)) {
isJumping = true;
isUpHeld = true;
speedY_float = -15;
moveY(-10);
} else if (((_local2.UP && (isJumping)) && (!isUpHeld)) && (!isHovering)) {
isHovering = true;
isUpHeld = true;
isFalling = true;
}
if (isHovering && (isUpHeld)) {
accelerateY(-0.6);
}
if (isUpHeld && (!_local2.UP)) {
isUpHeld = false;
isHovering = false;
}
if (_local2.LEFT && (!_local2.RIGHT)) {
accelerateX(-0.1);
} else if ((!_local2.LEFT) && (_local2.RIGHT)) {
accelerateX(0.1);
}
}
function moveX(p_x_float) {
if (p_x_float != 0) {
game.rotateLevel(-p_x_float);
}
}
function moveY(p_y_float) {
_y = _y + p_y_float;
if (_y < 30) {
_y = 30;
speedY_float = 0;
}
}
function groundTest() {
if (planet_mc.hitTest(_x, _y + 15, true)) {
return(true);
}
return(false);
}
function hitGround(Void) {
game.hitGround();
isJumping = false;
isHovering = false;
if (isFalling) {
onEnterFrame = null;
speedX_float = 0;
gotoAndStop("getUp");
} else if ((speedX_float < 0.05) && (speedX_float > -0.05)) {
gotoAndStop("stand");
speedX_float = 0;
} else {
gotoAndStop("walk");
}
}
function airFrames(Void) {
if (isJumping) {
if (isHovering) {
gotoAndStop("hover");
} else if (isFalling) {
gotoAndStop("fall");
} else {
gotoAndStop("jump");
}
}
}
function cameraFollow(Void) {
}
}
Symbol 464 MovieClip [__Packages.SpaceZebraGame] Frame 0
class SpaceZebraGame
{
var centerPoint, radius_float, moon1_mc, moon2_mc, james_mc, darkMatter_mc, meteors_mc, radRatio_float, angle_float;
function SpaceZebraGame (p_centerPoint, p_radius_float, p_moon_mc, p_james_mc) {
centerPoint = p_centerPoint;
radius_float = p_radius_float;
moon1_mc = p_moon_mc.moon1_mc;
moon2_mc = p_moon_mc.moon2_mc;
james_mc = p_james_mc;
setupClips();
james_mc.init(p_moon_mc, darkMatter_mc, meteors_mc, this);
radRatio_float = (Math.PI/180);
rotateLevel(0);
}
function setupClips(Void) {
_root.stuffHolder_mc._x = centerPoint.x;
_root.stuffHolder_mc._y = centerPoint.y;
darkMatter_mc = _root.stuffHolder_mc.createEmptyMovieClip("darkMatter_mc", _root.stuffHolder_mc.getNextHighestDepth());
meteors_mc = _root.stuffHolder_mc.createEmptyMovieClip("meteors_mc", _root.stuffHolder_mc.getNextHighestDepth());
}
function rotateLevel(p_dAngle_float) {
angle_float = angle_float + p_dAngle_float;
moon1_mc._rotation = moon1_mc._rotation + p_dAngle_float;
moon2_mc._rotation = moon2_mc._rotation + p_dAngle_float;
if (moon1_mc._rotation > 48) {
moon1_mc._rotation = moon1_mc._rotation - 96;
} else if (moon1_mc._rotation < -48) {
moon1_mc._rotation = moon1_mc._rotation + 96;
}
if (moon2_mc._rotation > 48) {
moon2_mc._rotation = moon2_mc._rotation - 96;
} else if (moon2_mc._rotation < -48) {
moon2_mc._rotation = moon2_mc._rotation + 96;
}
moon1_mc._x = centerPoint.x + (radius_float * Math.sin(radRatio_float * (moon1_mc._rotation - 24)));
moon1_mc._y = centerPoint.y - (radius_float * Math.cos(radRatio_float * (moon1_mc._rotation - 24)));
moon2_mc._x = centerPoint.x + (radius_float * Math.sin(radRatio_float * (moon2_mc._rotation - 24)));
moon2_mc._y = centerPoint.y - (radius_float * Math.cos(radRatio_float * (moon2_mc._rotation - 24)));
darkMatter_mc._rotation = darkMatter_mc._rotation + p_dAngle_float;
meteors_mc._rotation = meteors_mc._rotation + p_dAngle_float;
var _local8 = Math.random() < 0.045;
var _local9 = Math.random() < 0.045;
var _local11 = Math.random() < 0.01;
var _local10 = p_dAngle_float < 0;
if (_local8 && (!_local9)) {
var _local5 = darkMatter_mc.attachMovie("darkMatterHolder", "darkMatter" + darkMatter_mc.getNextHighestDepth(), darkMatter_mc.getNextHighestDepth());
_local5.darkMatter._y = -((radius_float + (Math.random() * 250)) + 120);
_local5.darkMatter.gotoAndStop(Math.floor(Math.random() * 4.99) + 1);
_local5.darkMatter.eyes_mc.gotoAndPlay(Math.floor(Math.random() * 38) + 1);
_local5._rotation = ((-darkMatter_mc._rotation) + (_local10 * 48)) - 24;
}
if (_local9 && (!_local8)) {
var _local3 = meteors_mc.attachMovie("meteorHolder", "meteor" + meteors_mc.getNextHighestDepth(), meteors_mc.getNextHighestDepth());
_local3.meteor._y = -((radius_float + (Math.random() * 200)) + 180);
_local3.meteor.gotoAndStop(Math.floor(Math.random() * 2.99) + 1);
var t_spinSpeed = ((Math.random() * 10) - 5);
_local3.meteor.onEnterFrame = function () {
this._rotation = this._rotation + t_spinSpeed;
};
_local3._rotation = ((-meteors_mc._rotation) + (_local10 * 48)) - 24;
}
if (_local11) {
var _local7 = meteors_mc.attachMovie("asteroidHolder", "Asteroid" + meteors_mc.getNextHighestDepth(), meteors_mc.getNextHighestDepth());
_local7.asteroid._y = -(radius_float + 500);
_local7.asteroid.onEnterFrame = function () {
this._y = this._y + 10;
if (this._y > -750) {
this.gotoAndStop(2);
this.onEnterFrame = null;
}
};
_local7._rotation = -meteors_mc._rotation;
}
for (var _local6 in darkMatter_mc) {
var _local2 = darkMatter_mc[_local6]._rotation + darkMatter_mc._rotation;
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 > 24) || (_local2 < -24)) {
darkMatter_mc[_local6].removeMovieClip();
}
}
for (var _local6 in meteors_mc) {
var _local2 = meteors_mc[_local6]._rotation + meteors_mc._rotation;
if (_local2 > 180) {
_local2 = _local2 - 360;
}
if (_local2 < -180) {
_local2 = _local2 + 360;
}
if ((_local2 > 24) || (_local2 < -24)) {
meteors_mc[_local6].removeMovieClip();
}
}
}
function endGame(Void) {
james_mc.onEnterFrame = james_mc.endAct;
_root.ship_mc.onEnterFrame = function () {
this._x = this._x + 8;
if (this._x > 150) {
this.gotoAndStop(2);
}
if (this._x > 280) {
_root.james_mc._visible = false;
this.gotoAndStop(3);
}
if (this._x > 600) {
stopAllSounds();
_root.gotoAndStop("scores");
}
};
}
function hitGround(Void) {
}
}
Symbol 465 MovieClip [__Packages.classes.Controls] Frame 0
class classes.Controls
{
var regKeys_obj, keyCodes_obj;
function Controls (Void) {
regKeys_obj = {};
keyCodes_obj = {};
keyCodes_obj.Q = 81;
keyCodes_obj.W = 87;
keyCodes_obj.E = 69;
keyCodes_obj.R = 82;
keyCodes_obj.T = 84;
keyCodes_obj.Y = 89;
keyCodes_obj.U = 85;
keyCodes_obj.I = 73;
keyCodes_obj.O = 79;
keyCodes_obj.P = 80;
keyCodes_obj.A = 65;
keyCodes_obj.S = 83;
keyCodes_obj.D = 68;
keyCodes_obj.F = 70;
keyCodes_obj.G = 71;
keyCodes_obj.H = 72;
keyCodes_obj.J = 74;
keyCodes_obj.K = 75;
keyCodes_obj.L = 76;
keyCodes_obj.Z = 90;
keyCodes_obj.X = 88;
keyCodes_obj.C = 67;
keyCodes_obj.V = 86;
keyCodes_obj.B = 66;
keyCodes_obj.N = 78;
keyCodes_obj.M = 77;
}
function getKeys(Void) {
var _local2 = {};
for (var _local3 in regKeys_obj) {
_local2[_local3] = Key.isDown(regKeys_obj[_local3]);
}
return(_local2);
}
function registerKey(p_key_str) {
regKeys_obj[p_key_str] = Key[p_key_str] || (keyCodes_obj[p_key_str]);
}
}
Symbol 466 MovieClip [__Packages.Ship] Frame 0
class Ship extends MovieClip
{
var controls, game, onEnterFrame, _rotation, isUpHeld;
function Ship (Void) {
super();
controls = new classes.Controls();
controls.registerKey("UP");
controls.registerKey("LEFT");
controls.registerKey("RIGHT");
}
function init(p_game) {
game = p_game;
onEnterFrame = act;
}
function act(Void) {
game.addAsteroids();
game.hitCheck();
control();
}
function control(Void) {
var _local2 = controls.getKeys();
if (_local2.LEFT && (!_local2.RIGHT)) {
_rotation = _rotation - 8;
} else if ((!_local2.LEFT) && (_local2.RIGHT)) {
_rotation = _rotation + 8;
}
if (_local2.UP && (!isUpHeld)) {
game.fireBullet();
isUpHeld = true;
}
if (isUpHeld && (!_local2.UP)) {
isUpHeld = false;
}
}
}
Symbol 467 MovieClip [__Packages.LanderGame] Frame 0
class LanderGame
{
var centerPoint, radius_float, moon1_mc, moon2_mc, james_mc, radRatio_float, post1_mc, post2_mc, angle_float, isEnded;
function LanderGame (p_centerPoint, p_radius_float, p_moon_mc, p_james_mc) {
centerPoint = p_centerPoint;
radius_float = p_radius_float;
moon1_mc = p_moon_mc.moon1_mc;
moon2_mc = p_moon_mc.moon2_mc;
james_mc = p_james_mc;
setupClips();
james_mc.gotoAndStop("hover");
radRatio_float = (Math.PI/180);
rotateLevel(0);
}
function init(Void) {
james_mc.init(moon1_mc._parent, null, null, this);
james_mc.jump();
}
function setupClips(Void) {
_root.stuffHolder_mc._x = centerPoint.x;
_root.stuffHolder_mc._y = centerPoint.y;
post1_mc = _root.stuffHolder_mc.attachMovie("post", "post1", _root.stuffHolder_mc.getNextHighestDepth());
post2_mc = _root.stuffHolder_mc.attachMovie("post", "post2", _root.stuffHolder_mc.getNextHighestDepth());
post1_mc._rotation = 10;
post2_mc._rotation = 40;
post1_mc.post._y = -720;
post2_mc.post._y = -720;
post1_mc.post._yscale = 50;
post2_mc.post._xscale = -100;
}
function rotateLevel(p_dAngle_float) {
angle_float = angle_float + p_dAngle_float;
_root.stuffHolder_mc._rotation = _root.stuffHolder_mc._rotation + p_dAngle_float;
moon1_mc._rotation = moon1_mc._rotation + p_dAngle_float;
moon2_mc._rotation = moon2_mc._rotation + p_dAngle_float;
if (moon1_mc._rotation > 48) {
moon1_mc._rotation = moon1_mc._rotation - 96;
} else if (moon1_mc._rotation < -48) {
moon1_mc._rotation = moon1_mc._rotation + 96;
}
if (moon2_mc._rotation > 48) {
moon2_mc._rotation = moon2_mc._rotation - 96;
} else if (moon2_mc._rotation < -48) {
moon2_mc._rotation = moon2_mc._rotation + 96;
}
moon1_mc._x = centerPoint.x + (radius_float * Math.sin(radRatio_float * (moon1_mc._rotation - 24)));
moon1_mc._y = centerPoint.y - (radius_float * Math.cos(radRatio_float * (moon1_mc._rotation - 24)));
moon2_mc._x = centerPoint.x + (radius_float * Math.sin(radRatio_float * (moon2_mc._rotation - 24)));
moon2_mc._y = centerPoint.y - (radius_float * Math.cos(radRatio_float * (moon2_mc._rotation - 24)));
}
function hitGround(Void) {
if (!isEnded) {
var _local3 = _root.stuffHolder_mc._rotation + 25;
_local3 = Math.sqrt(_local3 * _local3);
_local3 = 15 - _local3;
var _local4 = 5 - james_mc.speedY;
_root.final_score = Math.round((_local3 * (1 + _local4)) * 1000);
if (_root.final_score < 0) {
_root.final_score = 0;
}
endGame();
}
}
function endGame(Void) {
isEnded = true;
james_mc.onEnterFrame = james_mc.endAct;
_root.ship_mc.onEnterFrame = function () {
this._x = this._x + 8;
if (this._x > 150) {
this.gotoAndStop(2);
}
if (this._x > 280) {
_root.james_mc._visible = false;
this.gotoAndStop(3);
}
if (this._x > 600) {
stopAllSounds();
_root.gotoAndStop("scores");
}
};
}
}
Symbol 468 MovieClip [__Packages.AsteroidsGame] Frame 0
class AsteroidsGame
{
var centerPoint, james_mc, radRatio_float, asteroids_mc, bullets_mc, isEnded;
function AsteroidsGame (p_centerPoint, p_james_mc) {
centerPoint = p_centerPoint;
james_mc = p_james_mc;
setupClips();
radRatio_float = (Math.PI/180);
}
function init(Void) {
james_mc.init(this);
}
function addAsteroids(Void) {
var _local3 = Math.random() < 0.045;
if (_local3) {
var _local2 = asteroids_mc.attachMovie("meteorHolder", "asteroid" + asteroids_mc.getNextHighestDepth(), asteroids_mc.getNextHighestDepth());
_local2._rotation = Math.random() * 360;
_local2.meteor._y = -350;
_local2.meteor.gotoAndStop(Math.floor(Math.random() * 1.99) + 2);
var t_spin = ((Math.random() * 10) - 5);
var t = this;
_local2.meteor.onEnterFrame = function () {
this._rotation = this._rotation + t_spin;
this._y = this._y + 2;
if (this._y > -30) {
this.gotoAndStop(this._currentframe + 3);
t.endGame();
}
};
}
}
function hitCheck(Void) {
for (var _local7 in bullets_mc) {
var _local5 = new flash.geom.Point(bullets_mc[_local7].bullet._x, bullets_mc[_local7].bullet._y - 10);
bullets_mc[_local7].localToGlobal(_local5);
for (var _local6 in asteroids_mc) {
if (asteroids_mc[_local6].meteor._currentframe < 4) {
var _local2 = new flash.geom.Point(_local5.x, _local5.y);
asteroids_mc[_local6].globalToLocal(_local2);
var _local4 = _local2.x;
var _local3 = _local2.y - asteroids_mc[_local6].meteor._y;
if (Math.sqrt((_local4 * _local4) + (_local3 * _local3)) < (asteroids_mc[_local6].meteor._width / 2)) {
if (asteroids_mc[_local6].meteor._currentframe == 3) {
asteroids_mc[_local6].meteor.gotoAndStop(2);
bullets_mc[_local7].removeMovieClip();
break;
}
asteroids_mc[_local6].meteor.gotoAndStop(asteroids_mc[_local6].meteor._currentframe + 3);
asteroids_mc[_local6].meteor.onEnterFrame = null;
bullets_mc[_local7].removeMovieClip();
break;
}
}
}
}
}
function setupClips(Void) {
_root.stuffHolder_mc._x = centerPoint.x;
_root.stuffHolder_mc._y = centerPoint.y;
asteroids_mc = _root.stuffHolder_mc.createEmptyMovieClip("asteroids_mc", _root.stuffHolder_mc.getNextHighestDepth());
bullets_mc = _root.stuffHolder_mc.createEmptyMovieClip("bullets_mc", _root.stuffHolder_mc.getNextHighestDepth());
james_mc._x = centerPoint.x;
james_mc._y = centerPoint.y;
}
function fireBullet(Void) {
var _local2 = bullets_mc.attachMovie("bulletHolder", "bullet" + bullets_mc.getNextHighestDepth(), bullets_mc.getNextHighestDepth());
_local2._rotation = james_mc._rotation;
_local2.bullet.onEnterFrame = function () {
this._y = this._y - 10;
if (this._y < -350) {
this._parent.removeMovieClip();
}
};
}
function endGame(Void) {
isEnded = true;
james_mc._rotation = 0;
james_mc.gotoAndStop(3);
_root.timer.ended = true;
_root.final_score = Number(_root.timer.display);
james_mc.onEnterFrame = function () {
this._x = this._x + 8;
if (this._x > 600) {
stopAllSounds();
_root.gotoAndStop("scores");
}
};
}
}
Symbol 469 MovieClip [__Packages.ab20] Frame 0
class ab20
{
function ab20 () {
}
static function fr(str, find, replace, limit) {
var _local2 = str;
var _local3;
var _local4;
var _local9;
if (!(typeof(find) === "string")) {
if (replace === undefined) {
replace = [""];
} else if (typeof(replace) === "string") {
replace = [replace];
}
} else {
find = [find];
replace = [replace];
}
_local9 = find.length;
var _local1 = 0;
var _local5 = 0;
while (_local1 < _local9) {
while (_local4 = _local2.indexOf(find[_local1]) , !(_local4 === -1)) {
if ((!(limit === undefined)) && (_local5 >= limit)) {
break;
}
_local3 = new Array(_local2.substring(0, _local4), _local2.substr(_local4, find[_local1].length), _local2.substr(_local4 + find[_local1].length));
_local3[1] = ((replace[_local1] === undefined) ? "" : (replace[_local1]));
_local2 = (_local3[0] + _local3[1]) + _local3[2];
_local5++;
}
_local1++;
_local5 = 0;
}
return(_local2);
}
static function encodeNum(num) {
var _local11 = getTimer();
var _local6 = ["aZ", "Zy", "Zx"];
var _local7 = ["zH", "jY", "uH"];
var _local4 = ["Ah", "Xh", "hO"];
var _local5 = ["Ub", "Bu", "Cb"];
var _local8 = ["Qc", "Pc", "Pe"];
var _local9 = ["Ei", "Ie", "Ef"];
var _local3 = ["Fk", "kG", "Kg"];
var _local13 = ["Jl", "Lm", "Mn"];
var _local12 = ["No", "Np", "Qp"];
var _local2 = ["Rs", "St", "Sw"];
var _local14 = random(3);
num = String(num);
num = fr(num, "9", _local6[random(3)], 1);
num = fr(num, "9", _local6[random(3)], 1);
num = fr(num, "9", _local6[random(3)], 1);
num = fr(num, "9", _local6[random(3)], 1);
num = fr(num, "9", _local6[random(3)], 1);
num = fr(num, "9", _local6[random(3)], 1);
num = fr(num, "8", _local7[random(3)], 1);
num = fr(num, "8", _local7[random(3)], 1);
num = fr(num, "8", _local7[random(3)], 1);
num = fr(num, "8", _local7[random(3)], 1);
num = fr(num, "8", _local7[random(3)], 1);
num = fr(num, "7", _local4[random(3)], 1);
num = fr(num, "7", _local4[random(3)], 1);
num = fr(num, "7", _local4[random(3)], 1);
num = fr(num, "7", _local4[random(3)], 1);
num = fr(num, "7", _local4[random(3)], 1);
num = fr(num, "7", _local4[random(3)], 1);
num = fr(num, "7", _local4[random(3)], 1);
num = fr(num, "7", _local4[random(3)], 1);
num = fr(num, "6", _local5[random(3)], 1);
num = fr(num, "6", _local5[random(3)], 1);
num = fr(num, "6", _local5[random(3)], 1);
num = fr(num, "6", _local5[random(3)], 1);
num = fr(num, "6", _local5[random(3)], 1);
num = fr(num, "6", _local5[random(3)], 1);
if (_local14 == 1) {
num = fr(num, "5", _local8[0]);
} else {
num = fr(num, "5", _local8[random(3)]);
}
num = fr(num, "4", _local9[random(3)]);
num = fr(num, "3", _local3[random(3)], 1);
num = fr(num, "3", _local3[random(3)], 1);
num = fr(num, "3", _local3[random(3)], 1);
num = fr(num, "3", _local3[random(3)], 1);
num = fr(num, "3", _local3[random(3)], 1);
num = fr(num, "3", _local3[random(3)], 1);
num = fr(num, "3", _local3[random(3)], 1);
num = fr(num, "3", _local3[random(3)], 1);
num = fr(num, "2", _local13[random(3)]);
num = fr(num, "1", _local12[random(3)]);
num = fr(num, "0", _local2[random(3)], 1);
num = fr(num, "0", _local2[random(3)], 1);
num = fr(num, "0", _local2[random(3)], 1);
num = fr(num, "0", _local2[random(3)], 1);
num = fr(num, "0", _local2[random(3)], 1);
num = fr(num, "0", _local2[random(3)], 1);
num = fr(num, "0", _local2[random(3)], 1);
num = fr(num, "0", _local2[random(3)], 1);
num = fr(num, "0", _local2[random(3)], 1);
var _local10 = getTimer() - _local11;
num = (num + "Dd") + _local10;
return(num);
}
static function encodeStr8bytes(str) {
var _local1 = 0;
var _local4 = str.length;
var _local3 = "%";
var _local2 = ["%", "$", "#", "@"];
while (_local1 < _local4) {
_local3 = _local3 + (str.charCodeAt(_local1) + _local2[random(_local2.length)]);
_local1++;
}
return(_local3);
}
static function decodeStr8bytes(str) {
str = ("PIE" + str) + "PIE";
str = fr(str, "%", "D");
str = fr(str, "$", "D");
str = fr(str, "#", "D");
str = fr(str, "@", "D");
str = fr(str, "PIED", "");
str = fr(str, "DPIE", "");
var _local3 = str.split("D");
var _local4 = "";
var _local1 = 0;
var _local5 = _local3.length;
while (_local1 < _local5) {
_local4 = _local4 + String(String.fromCharCode(_local3[_local1]));
_local1++;
}
return(_local4);
}
static function decodeNum(str) {
var _local2 = ["aZ", "Zy", "Zx", "zH", "jY", "uH", "Ah", "Xh", "hO", "Ub", "Bu", "Cb", "Qc", "Pc", "Pe", "Ei", "Ie", "Ef", "Fk", "kG", "Kg", "Jl", "Lm", "Mn", "No", "Np", "Qp", "Rs", "St", "Sw"];
str = String(str);
str = str.split("Dd");
str = str[0];
str = fr(str, _local2[0], "9");
str = fr(str, _local2[1], "9");
str = fr(str, _local2[2], "9");
str = fr(str, _local2[3], "8");
str = fr(str, _local2[4], "8");
str = fr(str, _local2[5], "8");
str = fr(str, _local2[6], "7");
str = fr(str, _local2[7], "7");
str = fr(str, _local2[8], "7");
str = fr(str, _local2[9], "6");
str = fr(str, _local2[10], "6");
str = fr(str, _local2[11], "6");
str = fr(str, _local2[12], "5");
str = fr(str, _local2[13], "5");
str = fr(str, _local2[14], "5");
str = fr(str, _local2[15], "4");
str = fr(str, _local2[16], "4");
str = fr(str, _local2[17], "4");
str = fr(str, _local2[18], "3");
str = fr(str, _local2[19], "3");
str = fr(str, _local2[20], "3");
str = fr(str, _local2[21], "2");
str = fr(str, _local2[22], "2");
str = fr(str, _local2[23], "2");
str = fr(str, _local2[24], "1");
str = fr(str, _local2[25], "1");
str = fr(str, _local2[26], "1");
str = fr(str, _local2[27], "0");
str = fr(str, _local2[28], "0");
str = fr(str, _local2[29], "0");
var _local3 = Number(str);
return(_local3);
}
}
Symbol 207 MovieClip Frame 1
stop();
Symbol 404 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 2
stop();
Symbol 408 MovieClip Frame 1
stop();
Symbol 410 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 1
stop();
Symbol 416 MovieClip Frame 1
stop();
Instance of Symbol 408 MovieClip in Symbol 416 MovieClip Frame 1
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_parent.gotoAndStop(3);
};
}
Instance of Symbol 410 MovieClip in Symbol 416 MovieClip Frame 1
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_parent.gotoAndStop(2);
};
}
Instance of Symbol 412 MovieClip in Symbol 416 MovieClip Frame 1
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.gotoAndStop("menu");
};
}
Instance of Symbol 415 MovieClip in Symbol 416 MovieClip Frame 2
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_parent.gotoAndStop(1);
};
}
Symbol 416 MovieClip Frame 3
_root.game.init();
stop();
Symbol 420 MovieClip Frame 1
stop();
Instance of Symbol 408 MovieClip in Symbol 420 MovieClip Frame 1
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_parent.gotoAndStop(3);
};
}
Instance of Symbol 410 MovieClip in Symbol 420 MovieClip Frame 1
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_parent.gotoAndStop(2);
};
}
Instance of Symbol 412 MovieClip in Symbol 420 MovieClip Frame 1
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.gotoAndStop("menu");
};
}
Instance of Symbol 415 MovieClip in Symbol 420 MovieClip Frame 2
onClipEvent (load) {
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_parent.gotoAndStop(1);
};
}
Symbol 420 MovieClip Frame 3
_root.timer.started = true;
_root.timer.start_time = getTimer();
_root.game.init();
stop();
Symbol 446 MovieClip Frame 1
stop();
Symbol 458 MovieClip Frame 1
stop();
Instance of Symbol 207 MovieClip in Symbol 458 MovieClip Frame 1
onClipEvent (load) {
send_score = new LoadVars();
send_score.x = ab20.encodeNum(Number(_root.final_score) * 100);
if (_root.game_str == "main") {
send_score.c = 1120;
send_score.v = "ROLYQS";
} else if (_root.game_str == "lander") {
send_score.c = 1121;
send_score.v = "MOIBBG";
} else if (_root.game_str == "asteroids") {
send_score.c = 1122;
send_score.v = "XLZDYP";
}
send_score.onLoad = function (success) {
if (success) {
_root.scoretable.__top10_send__.sendAndLoad(_root.scoretable.__top10_url_1__ + _root.scoretable.__top10_url_2__, _root.scoretable.__top10_receive__, "POST");
} else {
_root.scoretable.gotoAndStop(3);
}
};
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
_root.scoretable.gotoAndStop(1);
send_score.z = _parent.name_in.text;
_parent.name_var = _parent.name_in.text;
send_score.sendAndLoad("http://armorbot.com/s_b", send_score, "POST");
_parent.gotoAndStop(2);
};
}
Symbol 458 MovieClip Frame 2
name_text.text = name_var;
Symbol 461 MovieClip Frame 2
stop();