Frame 1
function checkPreloader() {
var _local3 = this.getBytesLoaded();
var _local2 = this.getBytesTotal();
percent = Math.floor((_local3 / _local2) * 100);
mProgressBar._xscale = (_local3 / _local2) * 100;
if (_local3 >= _local2) {
clearInterval(nPreloaderInterval);
play();
}
}
stop();
var percent = 0;
var nPreloaderInterval = setInterval(this, "checkPreloader", 10);
Frame 2
stop();
Symbol 10 MovieClip Frame 5
stop();
Symbol 22 MovieClip Frame 1
function center() {
gotoAndStop (1);
}
function breakRight() {
if (myState != 1) {
gotoAndPlay ("breakRight");
}
}
function breakLeft() {
if (myState != 2) {
gotoAndPlay ("breakLeft");
}
}
stop();
myState = 0;
Symbol 22 MovieClip Frame 2
myState = 1;
Symbol 22 MovieClip Frame 8
stop();
Symbol 22 MovieClip Frame 13
myState = 2;
Symbol 22 MovieClip Frame 19
stop();
Symbol 29 MovieClip Frame 1
function turnOff() {
gotoAndStop (1);
}
function turnOn() {
if (myState == 0) {
gotoAndPlay (2);
}
}
stop();
myState = 0;
Symbol 29 MovieClip Frame 2
myState = 1;
Symbol 29 MovieClip Frame 6
stop();
Symbol 34 MovieClip Frame 1
function moveEyes(dir) {
if (dir != undefined) {
head.eyes.gotoAndStop(dir);
} else {
head.eyes.gotoAndStop(5);
}
}
function checkEyes() {
if (_parent.xSpeed > 1) {
xFactor = 3;
} else if (_parent.xSpeed < -1) {
xFactor = 1;
} else {
xFactor = 2;
}
if (_parent.ySpeed < -1) {
yFactor = 0;
} else if (_parent.ySpeed > 1) {
yFactor = 2;
} else {
yFactor = 1;
}
ar = eval ("c" + xFactor);
eyeDir = ar[yFactor];
moveEyes(eyeDir);
trace(eyeDir);
}
function mepSmall() {
if (allowSound == 1) {
gotoAndPlay ("one");
}
}
function mepBig() {
if (allowSound == 1) {
gotoAndPlay ("two");
}
}
c1 = Array();
c2 = Array();
c3 = Array();
c1 = [7, 4, 1];
c2 = [8, 5, 2];
c3 = [9, 6, 3];
Symbol 34 MovieClip Frame 3
checkEyes();
Symbol 34 MovieClip Frame 12
checkEyes();
allowSound = 1;
gotoAndPlay (5);
Symbol 34 MovieClip Frame 19
allowSound = 0;
Symbol 34 MovieClip Frame 26
checkEyes();
Symbol 34 MovieClip Frame 34
gotoAndPlay (5);
Symbol 34 MovieClip Frame 52
allowSound = 0;
Symbol 34 MovieClip Frame 64
checkEyes();
Symbol 34 MovieClip Frame 75
gotoAndPlay (5);
Symbol 37 MovieClip [rocket] Frame 1
function turnOn() {
if (myState == 0) {
myState = 1;
gotoAndPlay (2);
}
}
function turnOff() {
if (myState == 1) {
gotoAndPlay ("meOff");
}
}
stop();
myState = 0;
Symbol 37 MovieClip [rocket] Frame 2
myState = 1;
Symbol 37 MovieClip [rocket] Frame 7
stop();
Symbol 37 MovieClip [rocket] Frame 8
myState = 0;
Symbol 37 MovieClip [rocket] Frame 12
gotoAndStop (1);
Symbol 50 MovieClip [ship] Frame 1
function init() {
theta = 270;
this._rotation = theta;
this._x = _parent.shipX;
this._y = _parent.shipY;
myRadius = 48;
gravity = 0.08;
ySpeed = 0;
xSpeed = 0;
flying = 0;
crashed = 0;
zAngleSpeed = 0;
health = _parent.shipHealth;
fuel = _parent.shipFuel;
velocity = Math.abs(xSpeed) + Math.abs(ySpeed);
collision = 0;
collisionArray = new Array();
collisionArray = [0, 0];
padCollide = 0;
mass = 0.2;
wo = 0;
safeX = 0;
safeY = 0;
oldX = 0;
oldY = 0;
allowFlight = 1;
}
function killMe() {
_parent.shipFuel = fuel;
_parent.shipHealth = health;
if (fuel < 32) {
_parent.shipFuel = 42;
}
if (health < 42) {
_parent.shipHealth = 52;
}
_parent.shipDied();
this.removeMovieClip();
}
function splode() {
trace("SPLODE! crashed = " + crashed);
if (crashed == 0) {
crashed = 1;
allowFlight = 0;
gotoAndPlay ("asplode");
flying = 0;
this.removeOnEnterFrame;
}
}
function thrust(mag) {
if (!flying) {
zAngleSpeed = 0;
flying = 1;
}
xSpeed = xSpeed + (0.25 * Math.cos((theta * Math.PI) / 180));
ySpeed = ySpeed + (0.25 * Math.sin((theta * Math.PI) / 180));
fuel = fuel - 0.1;
}
function attitudeThrust(dir) {
if (dir == "R") {
zAngleSpeed = zAngleSpeed + 0.28;
} else {
zAngleSpeed = zAngleSpeed - 0.28;
}
}
function grav() {
ySpeed = ySpeed + gravity;
}
function fixTheta() {
if (theta > 360) {
theta = theta - 360;
return(undefined);
}
if (theta < 0) {
theta = 360 - theta;
}
}
function checkCollision(woInput) {
whichObject = eval ("_parent.p" + woInput);
distance_x = Math.abs(_x - whichObject._x);
distance_y = Math.abs(_y - whichObject._y);
distance = Math.sqrt((distance_x * distance_x) + (distance_y * distance_y));
collideTest = com.sprites.CollisionDetection.checkForCollision(this.hitBox, whichObject.hitBox, 255);
if (collideTest != null) {
useBumperBlock = 0;
if (collisionArray[woInput] == 1) {
useBumperBlock = 1;
}
collisionArray[woInput] = 1;
flying = 1;
_parent.manage_bounce(this, whichObject, 1, flying, useBumperBlock);
damage(3);
} else {
safeXp = this._x;
safeYp = this._y;
collisionArray[woInput] = 0;
}
}
function bumperBlock(bx, by, theRadius) {
xx = this._x - bx;
yy = this._y - by;
theta1 = Math.atan2(yy, xx);
xxx = theRadius * Math.cos(theta1);
yyy = theRadius * Math.sin(theta1);
this._x = bx + xxx;
this._y = by + yyy;
}
function testLanding() {
padCollide = 1;
velocity = Math.abs(xSpeed) + Math.abs(ySpeed);
radAlt = _parent.pad._y - _y;
if (((((((radAlt < (myRadius - 14)) || (radAlt > (myRadius - 6))) || (ySpeed > 3)) || (theta < 242)) || (theta > 298)) || ((_x - _parent.pad._x) < 25)) || ((_x - _parent.pad._x) > 190)) {
xSpeed = xSpeed * -0.7;
ySpeed = ySpeed * -0.7;
this._x = safeX;
this._y = safeY;
theta = safeTheta;
zAngleSpeed = 0;
damage(velocity + 2);
} else {
this._y = (_parent.pad._y - myRadius) + 7;
landed();
}
}
function landed() {
flying = 0;
xSpeed = 0;
ySpeed = 0;
theta = 270;
this._rotation = theta;
zAngleSpeed = 0;
padCollide = 0;
getFuel();
allowFlight = 0;
gotoAndPlay ("iveLanded");
}
function damage(howMuch) {
myDamage = Math.round(howMuch);
health = health - myDamage;
if (health < 0) {
_parent.dashBoard.gotoAndPlay("loopy");
this.splode();
}
}
function move() {
oldX = _x;
oldY = _y;
this._x = this._x + xSpeed;
this._y = this._y + ySpeed;
theta = theta + zAngleSpeed;
this._rotation = theta;
rot = this._rotation;
zAngleSpeed = zAngleSpeed * 0.92;
screenWrap();
}
function screenWrap() {
if (this._x > 785) {
this._x = 16;
}
if (this._x < 15) {
this._x = 784;
}
if (this._y > 585) {
this._y = 15;
}
if (this._y < 14) {
this._y = 584;
}
}
function getFuel() {
_parent.pad.startFueling();
}
function keys() {
if (Key.isDown(80)) {
_parent.pauser.play();
}
if ((Key.isDown(38) && (fuel > 0)) && (allowFlight)) {
thrust(4);
playThrust();
this.rocket.turnOn();
mep.throttle.turnOn();
} else {
this.rocket.turnOff();
mep.throttle.turnOff();
}
if (Key.isDown(37)) {
attitudeThrust("L");
mep.joystick.breakLeft();
} else if (Key.isDown(39)) {
attitudeThrust("R");
mep.joystick.breakRight();
} else {
this.thrusters.thrust(0);
mep.joystick.center();
}
}
function checkSpriteCollision() {
drawin.clear();
var collisionRect = com.sprites.CollisionDetection.checkForCollision(this.hitBox, _parent.pad.hitBox, 255);
if (collisionRect) {
with (drawin) {
beginFill(65280, 20);
lineStyle(0, 65280, 40);
moveTo(collisionRect.x, collisionRect.y);
lineTo(collisionRect.x + collisionRect.width, collisionRect.y);
lineTo(collisionRect.x + collisionRect.width, collisionRect.y + collisionRect.height);
lineTo(collisionRect.x, collisionRect.y + collisionRect.height);
lineTo(collisionRect.x, collisionRect.y);
}
}
}
function lilMep() {
mep.mepSmall();
trace("MEP!");
}
function bigMep() {
mep.mepBig();
trace("MEP!!!");
}
function playBounce(arg) {
if (crashed == 0) {
if (arg) {
gotoAndPlay ("padBounce");
} else {
myBounce = "bounce" + _parent.level;
gotoAndPlay(myBounce);
}
}
}
function playThrust() {
gotoAndPlay ("thrustSound");
}
function playArtifactSound() {
gotoAndPlay ("artifact");
}
createEmptyMovieClip("drawin", 10000);
onEnterFrame = function () {
tt = getTimer();
fixTheta();
myPlanet = eval ("_parent.p" + wo);
if (wo == 1) {
wo = 0;
} else {
wo = 1;
}
if (!_parent.pauseMe) {
checkCollision(wo);
if (flying) {
move();
grav();
if (_parent.checkPadCollision() != null) {
testLanding();
playBounce(true);
} else {
padCollide = 0;
safeX = this._x;
safeY = this._y;
safeTheta = theta;
}
if (_parent.checkWallCollision() != null) {
playBounce(false);
damage(9);
if (Math.random() > 0.66) {
bigMep();
} else if (Math.random() > 0.5) {
lilMep();
}
ySpeed = ySpeed * -0.7;
xSpeed = xSpeed * -0.7;
_x = oldX;
_y = oldY;
theta = safeTheta;
zAngleSpeed = 0;
}
}
keys();
} else if (Key.isDown(80)) {
_parent.pauser.play();
}
ttl = getTimer() - tt;
};
hitBox._visible = 0;
this._alpha = 0;
var tweenInShip = (new mx.transitions.Tween(this, "_alpha", none, this._alpha, 100, 10, false));
Symbol 50 MovieClip [ship] Frame 2
stop();
init();
Symbol 50 MovieClip [ship] Frame 6
stop();
Symbol 50 MovieClip [ship] Frame 15
stop();
Symbol 50 MovieClip [ship] Frame 22
stop();
Symbol 50 MovieClip [ship] Frame 29
stop();
Symbol 50 MovieClip [ship] Frame 36
stop();
Symbol 50 MovieClip [ship] Frame 43
stop();
Symbol 50 MovieClip [ship] Frame 50
stop();
Symbol 50 MovieClip [ship] Frame 58
stop();
Symbol 50 MovieClip [ship] Frame 67
stop();
Symbol 50 MovieClip [ship] Frame 76
stop();
Symbol 50 MovieClip [ship] Frame 86
stop();
Symbol 50 MovieClip [ship] Frame 91
trace("I am sploding!!");
play();
Symbol 50 MovieClip [ship] Frame 114
trace("I done sploded");
Symbol 50 MovieClip [ship] Frame 123
killMe();
Symbol 57 MovieClip [padTankFuel] Frame 1
function showLevel(percentage) {
myStop = percentage + 1;
gotoAndStop(myStop);
}
stop();
Symbol 61 MovieClip Frame 1
function startAni() {
myState = 1;
play();
}
function stopAni() {
myState = 0;
}
stop();
myState = 0;
Symbol 61 MovieClip Frame 12
if (myState == 1) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 63 MovieClip Frame 1
function startAni() {
myState = 1;
play();
}
function stopAni() {
myState = 0;
}
stop();
myState = 0;
Symbol 63 MovieClip Frame 12
if (myState == 1) {
gotoAndPlay (2);
} else {
gotoAndStop (1);
}
Symbol 66 MovieClip [padTankFixer] Frame 1
function showLevel(percentage) {
myStop = percentage + 1;
gotoAndStop(myStop);
}
stop();
Symbol 71 MovieClip Frame 1
Symbol 74 MovieClip Frame 1
stop();
Symbol 75 MovieClip Frame 105
gotoAndPlay (1);
Symbol 76 MovieClip [pad simple] Frame 1
function getLevels() {
myFuel = _parent.fuel;
myFixer = _parent.fixer;
myFuelPercent = Math.floor((myFuel / _parent.padMaxFuel) * 100);
myFixerPercent = Math.floor((myFixer / _parent.padMaxFixer) * 100);
if (myFuelPercent < 1) {
myFuelPercent = 0;
}
if (myFuelPercent > 99) {
myFuelPercent = 100;
}
if (myFixerPercent < 1) {
myFixerPercent = 0;
}
if (myFixerPercent > 99) {
myFixerPercent = 100;
}
showLevels(myFuelPercent, myFixerPercent);
trace("PAD: myFuelPercent = " + myFuelPercent);
}
function showLevels(fuel, fixer) {
trace("pad: showLevels: fuel= " + fuel);
padGraphics.tankFuel.showLevel(fuel);
padGraphics.tankFixer.showLevel(fixer);
}
function startFueling() {
gotoAndPlay (3);
}
function fuelShip() {
myFuel = _parent.fuel;
if (myFuel > 0) {
padGraphics.fuelAni.startAni();
} else {
padGraphics.fuelAni.stopAni();
}
if (myFuel >= basicUnit) {
_parent.ship.fuel = _parent.ship.fuel + basicUnit;
_parent.fuel = _parent.fuel - basicUnit;
} else if (myFuel > 0) {
_parent.ship.fuel = _parent.ship.fuel + myFuel;
_parent.fuel = 0;
padGraphics.fuelAni.stopAni();
}
}
function fixShip() {
myFixer = _parent.fixer;
if (myFixer > 0) {
padGraphics.fixerAni.startAni();
} else {
padGraphics.fixerAni.stopAni();
}
if (myFixer >= basicUnit) {
_parent.ship.health = _parent.ship.health + basicUnit;
_parent.fixer = _parent.fixer - basicUnit;
} else if (myFixer > 0) {
_parent.ship.health = _parent.ship.health + myFixer;
_parent.fixer = 0;
padGraphics.fixerAni.stopAni();
}
}
function checkCollision(woInput) {
whichObject = eval ("_parent.p" + woInput);
distance_x = Math.abs((_x + 125) - whichObject._x);
distance_y = Math.abs((_y + 40) - whichObject._y);
distance = Math.sqrt((distance_x * distance_x) + (distance_y * distance_y));
if ((distance <= (myRadius + whichObject.myRadius)) && (this.collisionArray[woInput] == 0)) {
shield.gotoAndPlay(2);
this.collisionArray[woInput] = 1;
whichObject.xSpeed = -1 * whichObject.xSpeed;
whichObject.ySpeed = -1 * whichObject.ySpeed;
} else if (distance > (myRadius + whichObject.myRadius)) {
this.collisionArray[woInput] = 0;
}
}
hitBox._alpha = 0;
myX = this._x;
basicUnit = 2;
myFuel = _parent.fuel;
myFixer = _parent.fixer;
myFuelPercent = Math.floor((myFuel / _parent.padMaxFuel) * 100);
myFixerPercent = Math.floor((myFixer / _parent.padMaxFixer) * 100);
collision = 0;
collisionArray = new Array();
collisionArray = [0, 0];
wo = 0;
mass = 5;
myRadius = 200;
onEnterFrame = function () {
myPlanet = eval ("_parent.p" + wo);
if (wo == 1) {
wo = 0;
} else {
wo = 1;
}
};
Symbol 76 MovieClip [pad simple] Frame 2
getLevels();
stop();
padGraphics.fuelAni.stopAni();
padGraphics.fixerAni.stopAni();
Symbol 76 MovieClip [pad simple] Frame 4
if (_parent.ship.fuel < 100) {
fuelShip();
} else {
padGraphics.fuelAni.stopAni();
}
if (_parent.ship.health < 100) {
fixShip();
} else {
padGraphics.fixerAni.stopAni();
}
Symbol 76 MovieClip [pad simple] Frame 5
getLevels();
Symbol 76 MovieClip [pad simple] Frame 7
if (((((_parent.ship.fuel > 99) && (_parent.ship.health > 99)) || ((_parent.fuel < 1) && (_parent.ship.health > 99))) || ((_parent.fixer < 1) && (_parent.ship.fuel > 99))) || ((_parent.fixer < 1) && (_parent.fuel < 1))) {
_parent.doneFueling();
play();
} else {
gotoAndPlay ("loopy");
}
Symbol 76 MovieClip [pad simple] Frame 15
gotoAndStop (2);
Symbol 77 MovieClip [pad] Frame 1
function getLevels() {
myFuel = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents.pad.fuel;
myFixer = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents.pad.fixer;
myFuelPercent = Math.floor((myFuel / _parent.padMaxFuel) * 100);
myFixerPercent = Math.floor((myFixer / _parent.padMaxFixer) * 100);
if (myFuelPercent < 1) {
myFuelPercent = 0;
}
if (myFuelPercent > 99) {
myFuelPercent = 100;
}
if (myFixerPercent < 1) {
myFixerPercent = 0;
}
if (myFixerPercent > 99) {
myFixerPercent = 100;
}
showLevels(myFuelPercent, myFixerPercent);
trace("PAD: myFuelPercent = " + myFuelPercent);
}
function showLevels(fuel, fixer) {
trace("pad: showLevels: fuel= " + fuel);
padGraphics.tankFuel.showLevel(fuel);
padGraphics.tankFixer.showLevel(fixer);
}
function startFueling() {
gotoAndPlay ("loopy");
}
function fuelShip() {
myFuel = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents.pad.fuel;
if (myFuel > 0) {
padGraphics.fuelAni.startAni();
} else {
padGraphics.fuelAni.stopAni();
}
if (myFuel >= basicUnit) {
_parent.ship.fuel = _parent.ship.fuel + basicUnit;
_parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents.pad.fuel = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents.pad.fuel - basicUnit;
} else if (myFuel > 0) {
_parent.ship.fuel = _parent.ship.fuel + myFuel;
_parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents.pad.fuel = 0;
padGraphics.fuelAni.stopAni();
}
}
function fixShip() {
myFixer = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents.pad.fixer;
if (myFixer > 0) {
padGraphics.fixerAni.startAni();
} else {
padGraphics.fixerAni.stopAni();
}
if (myFixer >= basicUnit) {
_parent.ship.health = _parent.ship.health + basicUnit;
_parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents.pad.fixer = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents.pad.fixer - basicUnit;
} else if (myFixer > 0) {
_parent.ship.health = _parent.ship.health + myFixer;
_parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents.pad.fixer = 0;
padGraphics.fixerAni.stopAni();
}
}
function checkCollision(woInput) {
whichObject = eval ("_parent.p" + woInput);
distance_x = Math.abs((_x + 125) - whichObject._x);
distance_y = Math.abs((_y + 40) - whichObject._y);
distance = Math.sqrt((distance_x * distance_x) + (distance_y * distance_y));
if ((distance <= (myRadius + whichObject.myRadius)) && (this.collisionArray[woInput] == 0)) {
shield.gotoAndPlay(2);
this.collisionArray[woInput] = 1;
whichObject.xSpeed = -1 * whichObject.xSpeed;
whichObject.ySpeed = -1 * whichObject.ySpeed;
} else if (distance > (myRadius + whichObject.myRadius)) {
this.collisionArray[woInput] = 0;
}
}
hitBox._alpha = 0;
myX = this._x;
basicUnit = 2;
myFuel = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents.pad.fuel;
myFixer = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents.pad.fixer;
myFuelPercent = Math.floor((myFuel / _parent.padMaxFuel) * 100);
myFixerPercent = Math.floor((myFixer / _parent.padMaxFixer) * 100);
collision = 0;
collisionArray = new Array();
collisionArray = [0, 0];
wo = 0;
mass = 5;
myRadius = 200;
onEnterFrame = function () {
myPlanet = eval ("_parent.p" + wo);
if (wo == 1) {
wo = 0;
} else {
wo = 1;
}
checkCollision(wo);
};
Symbol 77 MovieClip [pad] Frame 2
getLevels();
stop();
padGraphics.fuelAni.stopAni();
padGraphics.fixerAni.stopAni();
Symbol 77 MovieClip [pad] Frame 3
if (_parent.ship.fuel < 100) {
fuelShip();
} else {
padGraphics.fuelAni.stopAni();
}
if (_parent.ship.health < 100) {
fixShip();
} else {
padGraphics.fixerAni.stopAni();
}
Symbol 77 MovieClip [pad] Frame 4
getLevels();
Symbol 77 MovieClip [pad] Frame 6
if (((_parent.ship.fuel > 99) && (_parent.ship.health > 99)) || (_parent.ship.flying == 1)) {
gotoAndStop (2);
} else {
gotoAndPlay ("loopy");
}
Symbol 80 MovieClip [planet1] Frame 1
function checkCollision() {
distance_x = Math.abs(_x - _parent.p1._x);
distance_y = Math.abs(_y - _parent.p1._y);
distance = Math.sqrt((distance_x * distance_x) + (distance_y * distance_y));
if ((distance <= (myRadius + _parent.p1.myRadius)) && ((this.collision == 0) || (_parent.p1.collision == 0))) {
this.collision = 1;
_parent.p1.collision = 1;
_parent.manage_bounce(this, _parent.p1);
} else if (distance > (myRadius + _parent.p1.myRadius)) {
this.collision = 0;
_parent.p1.collision = 0;
}
}
function move() {
_x = (_x + xSpeed);
_y = (_y + ySpeed);
wrap();
}
function wrap() {
if (_x > 820) {
_x = -100;
}
if (_x < -100) {
_x = 820;
}
if (_y > 640) {
_y = -100;
}
if (_y < -100) {
_y = 640;
}
}
xSpeed = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents[this._name].xSpeed;
ySpeed = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents[this._name].ySpeed;
collision = 0;
mass = 1;
myRadius = Math.floor((this._width / 2) - 1);
if (this._name == "p0") {
otherPlanet = _parent.p1;
} else {
otherPlanet = _parent.p0;
}
if (this._name == "p0") {
onEnterFrame = function () {
checkCollision();
move();
};
} else {
onEnterFrame = function () {
move();
};
}
Symbol 83 MovieClip [planet2] Frame 1
function checkCollision() {
distance_x = Math.abs(_x - _parent.p1._x);
distance_y = Math.abs(_y - _parent.p1._y);
distance = Math.sqrt((distance_x * distance_x) + (distance_y * distance_y));
if ((distance <= (myRadius + _parent.p1.myRadius)) && ((this.collision == 0) || (_parent.p1.collision == 0))) {
this.collision = 1;
_parent.p1.collision = 1;
_parent.manage_bounce(this, _parent.p1);
} else if (distance > (myRadius + _parent.p1.myRadius)) {
this.collision = 0;
_parent.p1.collision = 0;
}
}
function move() {
_x = (_x + xSpeed);
_y = (_y + ySpeed);
wrap();
}
function wrap() {
if (_x > 820) {
_x = -100;
}
if (_x < -100) {
_x = 820;
}
if (_y > 640) {
_y = -100;
}
if (_y < -100) {
_y = 640;
}
}
xSpeed = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents[this._name].xSpeed;
ySpeed = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents[this._name].ySpeed;
collision = 0;
mass = 1;
myRadius = Math.floor((this._width / 2) - 1);
if (this._name == "p0") {
otherPlanet = _parent.p1;
} else {
otherPlanet = _parent.p0;
}
if (this._name == "p0") {
onEnterFrame = function () {
checkCollision();
move();
};
} else {
onEnterFrame = function () {
move();
};
}
Symbol 86 MovieClip [planet3] Frame 1
function checkCollision() {
distance_x = Math.abs(_x - _parent.p1._x);
distance_y = Math.abs(_y - _parent.p1._y);
distance = Math.sqrt((distance_x * distance_x) + (distance_y * distance_y));
if ((distance <= (myRadius + _parent.p1.myRadius)) && ((this.collision == 0) || (_parent.p1.collision == 0))) {
this.collision = 1;
_parent.p1.collision = 1;
_parent.manage_bounce(this, _parent.p1);
} else if (distance > (myRadius + _parent.p1.myRadius)) {
this.collision = 0;
_parent.p1.collision = 0;
}
}
function move() {
_x = (_x + xSpeed);
_y = (_y + ySpeed);
wrap();
}
function wrap() {
if (_x > 820) {
_x = -100;
}
if (_x < -100) {
_x = 820;
}
if (_y > 640) {
_y = -100;
}
if (_y < -100) {
_y = 640;
}
}
xSpeed = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents[this._name].xSpeed;
ySpeed = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents[this._name].ySpeed;
collision = 0;
mass = 1;
myRadius = Math.floor((this._width / 2) - 1);
if (this._name == "p0") {
otherPlanet = _parent.p1;
} else {
otherPlanet = _parent.p0;
}
if (this._name == "p0") {
onEnterFrame = function () {
checkCollision();
move();
};
} else {
onEnterFrame = function () {
move();
};
}
Symbol 89 MovieClip [planet4] Frame 1
function checkCollision() {
distance_x = Math.abs(_x - _parent.p1._x);
distance_y = Math.abs(_y - _parent.p1._y);
distance = Math.sqrt((distance_x * distance_x) + (distance_y * distance_y));
if ((distance <= (myRadius + _parent.p1.myRadius)) && ((this.collision == 0) || (_parent.p1.collision == 0))) {
this.collision = 1;
_parent.p1.collision = 1;
_parent.manage_bounce(this, _parent.p1);
} else if (distance > (myRadius + _parent.p1.myRadius)) {
this.collision = 0;
_parent.p1.collision = 0;
}
}
function move() {
_x = (_x + xSpeed);
_y = (_y + ySpeed);
wrap();
}
function wrap() {
if (_x > 820) {
_x = -100;
}
if (_x < -100) {
_x = 820;
}
if (_y > 640) {
_y = -100;
}
if (_y < -100) {
_y = 640;
}
}
xSpeed = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents[this._name].xSpeed;
ySpeed = _parent.screens.rows[_parent.currentRow].colum[_parent.currentColum].contents[this._name].ySpeed;
collision = 0;
mass = 1;
myRadius = Math.floor((this._width / 2) - 1);
if (this._name == "p0") {
otherPlanet = _parent.p1;
} else {
otherPlanet = _parent.p0;
}
if (this._name == "p0") {
onEnterFrame = function () {
checkCollision();
move();
};
} else {
onEnterFrame = function () {
move();
};
}
Symbol 94 MovieClip [object3] Frame 1
function checkHit() {
if (this.hitTest(_parent.ship.hitBox)) {
delete this.onEnterFrame;
doMyThing();
_parent.ship.playArtifactSound();
if (Math.random() > 0.5) {
_parent.ship.lilMep();
}
}
}
function doMyThing() {
var _local8 = new mx.transitions.Tween(this, "_xscale", false, this._xscale, 300, howLong, false);
var _local7 = new mx.transitions.Tween(this, "_yscale", false, this._yscale, 300, howLong, false);
var _local6 = new mx.transitions.Tween(this, "_x", false, this._x, this._x - (0.5 * this._width), howLong, false);
var _local5 = new mx.transitions.Tween(this, "_y", false, this._y, this._y - (0.5 * this._height), howLong, false);
var _local4 = new mx.transitions.Tween(this, "_rotation", false, this._rotation, 360, howLong, false);
var _local3 = new mx.transitions.Tween(this, "_alpha", false, this._alpha, 0, howLong, false);
_local3.onMotionFinished = function () {
_parent.checkGoal();
};
}
howLong = 10;
this.onEnterFrame = function () {
checkHit();
};
Symbol 97 MovieClip [object2] Frame 1
function checkHit() {
if (this.hitTest(_parent.ship.hitBox)) {
delete this.onEnterFrame;
doMyThing();
_parent.ship.playArtifactSound();
if (Math.random() > 0.5) {
_parent.ship.lilMep();
}
}
}
function doMyThing() {
var _local8 = new mx.transitions.Tween(this, "_xscale", false, this._xscale, 300, howLong, false);
var _local7 = new mx.transitions.Tween(this, "_yscale", false, this._yscale, 300, howLong, false);
var _local6 = new mx.transitions.Tween(this, "_x", false, this._x, this._x - (0.5 * this._width), howLong, false);
var _local5 = new mx.transitions.Tween(this, "_y", false, this._y, this._y - (0.5 * this._height), howLong, false);
var _local4 = new mx.transitions.Tween(this, "_rotation", false, this._rotation, 360, howLong, false);
var _local3 = new mx.transitions.Tween(this, "_alpha", false, this._alpha, 0, howLong, false);
_local3.onMotionFinished = function () {
_parent.checkGoal();
};
}
howLong = 10;
this.onEnterFrame = function () {
checkHit();
};
Symbol 100 MovieClip [object1] Frame 1
function checkHit() {
if (this.hitTest(_parent.ship.hitBox)) {
delete this.onEnterFrame;
doMyThing();
_parent.ship.playArtifactSound();
if (Math.random() > 0.5) {
_parent.ship.lilMep();
}
}
}
function doMyThing() {
var _local8 = new mx.transitions.Tween(this, "_xscale", false, this._xscale, 300, howLong, false);
var _local7 = new mx.transitions.Tween(this, "_yscale", false, this._yscale, 300, howLong, false);
var _local6 = new mx.transitions.Tween(this, "_x", false, this._x, this._x - (0.5 * this._width), howLong, false);
var _local5 = new mx.transitions.Tween(this, "_y", false, this._y, this._y - (0.5 * this._height), howLong, false);
var _local4 = new mx.transitions.Tween(this, "_rotation", false, this._rotation, 360, howLong, false);
var _local3 = new mx.transitions.Tween(this, "_alpha", false, this._alpha, 0, howLong, false);
_local3.onMotionFinished = function () {
_parent.checkGoal();
};
}
howLong = 10;
this.onEnterFrame = function () {
checkHit();
};
Symbol 200 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 201 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 202 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 203 MovieClip [__Packages.com.sprites.CollisionDetection] Frame 0
class com.sprites.CollisionDetection
{
function CollisionDetection () {
}
static function checkForCollision(p_clip1, p_clip2, p_alphaTolerance) {
if (p_alphaTolerance == undefined) {
p_alphaTolerance = 255;
}
var _local4 = p_clip1.getBounds(_root);
var _local3 = p_clip2.getBounds(_root);
if (((_local4.xMax < _local3.xMin) || (_local3.xMax < _local4.xMin)) || ((_local4.yMax < _local3.yMin) || (_local3.yMax < _local4.yMin))) {
return(null);
}
var _local2 = {};
_local2.xMin = Math.max(_local4.xMin, _local3.xMin);
_local2.xMax = Math.min(_local4.xMax, _local3.xMax);
_local2.yMin = Math.max(_local4.yMin, _local3.yMin);
_local2.yMax = Math.min(_local4.yMax, _local3.yMax);
var _local7 = new flash.display.BitmapData(_local2.xMax - _local2.xMin, _local2.yMax - _local2.yMin, false);
var _local5 = p_clip1.transform.concatenatedMatrix;
_local5.tx = _local5.tx - _local2.xMin;
_local5.ty = _local5.ty - _local2.yMin;
_local7.draw(p_clip1, _local5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, p_alphaTolerance));
_local5 = p_clip2.transform.concatenatedMatrix;
_local5.tx = _local5.tx - _local2.xMin;
_local5.ty = _local5.ty - _local2.yMin;
_local7.draw(p_clip2, _local5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, p_alphaTolerance), "difference");
var _local6 = _local7.getColorBoundsRect(4294967295, 4278255615);
if (_local6.width == 0) {
return(null);
}
_local6.x = _local6.x + _local2.xMin;
_local6.y = _local6.y + _local2.yMin;
return(_local6);
}
}
Symbol 106 MovieClip Frame 2
stop();
Symbol 106 MovieClip Frame 3
play();
Symbol 106 MovieClip Frame 7
_parent.togglePause();
Symbol 109 MovieClip Frame 1
function checkIt() {
if (_parent.pauseMe == 1) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Symbol 109 MovieClip Frame 2
stop();
Symbol 119 Button
on (release) {
getURL ("http://AE4RV.com", "_blank");
}
Symbol 127 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 8
stop();
trace("leveler is in GTFO mode!");
Symbol 128 MovieClip Frame 1
function showLevel() {
this.swapDepths(_parent.getNextHighestDepth());
levelerStatic.gotoAndStop(_parent.level + 1);
this._alpha = 100;
this._visible = 1;
gotoAndPlay (2);
}
function hideLevel() {
this._alpha = 0;
this._visible = 0;
trace("leveler has executed hideLevel");
}
stop();
Symbol 131 MovieClip Frame 1
function playWhich(arg) {
stopAllSounds();
gotoAndStop(arg);
}
stopAllSounds();
stop();
Symbol 131 MovieClip Frame 15
trace("Space is the place");
Symbol 137 MovieClip Frame 1
function doIt(inTheRoad) {
gotoAndStop(inTheRoad + 1);
}
Symbol 140 MovieClip Frame 1
function doIt(inTheRoad) {
gotoAndStop(inTheRoad + 1);
}
Symbol 147 MovieClip Frame 1
function showLives() {
this.gotoAndStop(_parent._parent.lives + 1);
}
stop();
Symbol 148 MovieClip Frame 1
function updateHealth() {
health = Math.round(_parent.ship.health);
if (health < 1) {
health = 0;
}
healthBar.doIt(health);
}
function updateFuel() {
fuel = Math.round(_parent.ship.fuel);
fuelBar.doIt(fuel);
}
function updateLives() {
livesViewer.showLives();
}
health = 100;
fuel = 100;
updateHealth();
updateFuel();
Symbol 148 MovieClip Frame 3
updateHealth();
updateFuel();
Symbol 148 MovieClip Frame 8
gotoAndPlay ("loopy");
Symbol 153 MovieClip Frame 1
function checkHit() {
if (this.hitTest(_parent.ship.hitBox)) {
delete this.onEnterFrame;
doMyThing();
_parent.ship.playArtifactSound();
if (Math.random() > 0.5) {
_parent.ship.lilMep();
}
}
}
function doMyThing() {
var _local8 = new mx.transitions.Tween(this, "_xscale", false, this._xscale, 300, howLong, false);
var _local7 = new mx.transitions.Tween(this, "_yscale", false, this._yscale, 300, howLong, false);
var _local6 = new mx.transitions.Tween(this, "_x", false, this._x, this._x - (0.5 * this._width), howLong, false);
var _local5 = new mx.transitions.Tween(this, "_y", false, this._y, this._y - (0.5 * this._height), howLong, false);
var _local4 = new mx.transitions.Tween(this, "_rotation", false, this._rotation, 360, howLong, false);
var _local3 = new mx.transitions.Tween(this, "_alpha", false, this._alpha, 0, howLong, false);
_local3.onMotionFinished = function () {
_parent.checkGoal();
};
}
howLong = 10;
this.onEnterFrame = function () {
checkHit();
};
Symbol 156 MovieClip Frame 1
if (initMe != 1) {
initMe = 1;
loops = 0;
}
play();
Symbol 156 MovieClip Frame 5
trace("loops = " + loops);
Symbol 156 MovieClip Frame 10
if (_parent.ship.flying == 1) {
stop();
_parent.hideHeyDummy();
trace("hey dummy stopped");
}
Symbol 156 MovieClip Frame 18
if (_parent.ship.flying == 1) {
stop();
_parent.hideHeyDummy();
}
Symbol 156 MovieClip Frame 24
loops = loops + 1;
trace("loops = " + loops);
if (loops > 2) {
trace("HEY DUMMY");
if (_parent.ship.flying == 0) {
_parent.showHeyDummy();
gotoAndPlay (3);
} else {
stop();
_parent.hideHeyDummy();
}
}
Symbol 179 Button
on (release) {
gotoAndPlay ("startIt");
}
Symbol 189 MovieClip Frame 1
if (inity != 1) {
inity = 1;
myLoopers = 0;
}
Symbol 189 MovieClip Frame 35
myLoopers++;
if (myLoopers > 3) {
stop();
}
Symbol 195 MovieClip Frame 3
stop();
mySuffix = Math.floor(this._x / 100);
Symbol 199 MovieClip Frame 1
function togglePause() {
pauseMe = !pauseMe;
pauseIndicator.checkIt();
}
function levelUp() {
level++;
}
function mixRandy() {
r = function () {
return((random(2) * 2) - 1);
};
randy.sort(r);
}
function checkPadPlacement(xIn, yIn) {
screens.rows[xIn].colum[yIn].contents.pad.x = 290;
screens.rows[xIn].colum[yIn].contents.pad.y = 290;
if (Math.random() > 0.66) {
screens.rows[xIn].colum[yIn].contents.pad.exists = 1;
} else {
screens.rows[xIn].colum[yIn].contents.pad.exists = 0;
}
if ((xIn == homeRow) && (yIn == homeColum)) {
screens.rows[xIn].colum[yIn].contents.pad.exists = 1;
}
if ((xIn == mazeGoalRow) && (yIn == mazeGoalColum)) {
screens.rows[xIn].colum[yIn].contents.pad.exists = 1;
}
}
function setPadConsumables(xIn, yIn) {
if ((xIn == homeRow) && (xIn == homeColum)) {
fuelToAdd = padMaxFuel;
fixerToAdd = padMaxFixer;
} else {
fuelToAdd = Math.floor(Math.random() * padMaxFuel);
fixerToAdd = Math.floor(Math.random() * padMaxFixer);
}
screens.rows[xIn].colum[yIn].contents.pad.fuel = fuelToAdd;
screens.rows[xIn].colum[yIn].contents.pad.fixer = fixerToAdd;
}
function checkArtifactPlacement(xIn, yIn) {
screens.rows[xIn].colum[yIn].contents.a0.x = 360;
screens.rows[xIn].colum[yIn].contents.a0.y = 200;
}
function removeArtifact() {
screens.rows[currentRow].colum[currentColum].contents.a0.exists = 0;
}
function changeRow(addToCurrent1) {
rememberChanges();
currentRow = currentRow + addToCurrent1;
if (currentRow > maxRows) {
currentRow = 0;
}
if (currentRow < 0) {
currentRow = maxRows;
}
changeScreens("y");
}
function changeColum(addToCurrent2) {
rememberChanges();
currentColum = currentColum + addToCurrent2;
if (currentColum > maxColums) {
currentColum = 0;
}
if (currentColum < 0) {
currentColum = maxColums;
}
changeScreens("x");
}
function rememberChanges() {
screens.rows[currentRow].colum[currentColum].contents.p0.xSpeed = p0.xSpeed;
screens.rows[currentRow].colum[currentColum].contents.p0.ySpeed = p0.ySpeed;
screens.rows[currentRow].colum[currentColum].contents.p0.x = p0._x;
screens.rows[currentRow].colum[currentColum].contents.p0.y = p0._y;
screens.rows[currentRow].colum[currentColum].contents.p1.xSpeed = p1.xSpeed;
screens.rows[currentRow].colum[currentColum].contents.p1.ySpeed = p1.ySpeed;
screens.rows[currentRow].colum[currentColum].contents.p1.x = p1._x;
screens.rows[currentRow].colum[currentColum].contents.p1.y = p1._y;
}
function changeScreens(xORy) {
p0.removeMovieClip();
p1.removeMovieClip();
pad.removeMovieClip();
a0.removeMovieClip();
populateScreen(xORy);
}
function populateScreen(xORy) {
currentDepth++;
trace("xORy = " + xORy);
walls.updateRoom(currentRow);
walls.updateDoors();
if (xORy == "y") {
if (ship._y < 300) {
ship._x = walls.roomMC.north._x + 130;
trace(("North Door X = " + walls.roomMC.north._x) + 130);
} else {
ship._x = walls.roomMC.south._x + 130;
trace(("South Door X = " + walls.roomMC.south._x) + 1300);
}
}
if (xORy == "x") {
if (ship._x < 400) {
ship._y = walls.roomMC.west._y + 110;
} else {
ship._y = walls.roomMC.east._y + 110;
}
}
ship._visible = 1;
myPlanet = "planet" + screens.rows[currentRow].colum[currentColum].contents.p0.planetType;
p0._x = screens.rows[currentRow].colum[currentColum].contents.p0.x;
p0._y = screens.rows[currentRow].colum[currentColum].contents.p0.y;
currentDepth++;
myPlanet = "planet" + screens.rows[currentRow].colum[currentColum].contents.p1.planetType;
p1._x = screens.rows[currentRow].colum[currentColum].contents.p1.x;
p1._y = screens.rows[currentRow].colum[currentColum].contents.p1.y;
if (screens.rows[currentRow].colum[currentColum].contents.pad.exists == 1) {
placePad();
}
if (screens.rows[currentRow].colum[currentColum].contents.a0.exists == 1) {
currentDepth++;
myArt = "object" + screens.rows[currentRow].colum[currentColum].contents.a0.aType;
myX = screens.rows[currentRow].colum[currentColum].contents.a0.x;
myY = screens.rows[currentRow].colum[currentColum].contents.a0.y;
this.attachMovie(myArt, "a0", currentDepth, {_x:myX, _y:myY});
}
}
function placePad() {
currentDepth++;
this.attachMovie("pad simple", "pad", currentDepth);
pad._x = padX;
pad._y = padY;
}
function manage_bounce(ball, ball2, isShip, shipFlying, useBumperBlock) {
dx = ball._x - ball2._x;
dy = ball._y - ball2._y;
collisionision_angle = Math.atan2(dy, dx);
magnitude_1 = Math.sqrt((ball.xSpeed * ball.xSpeed) + (ball.ySpeed * ball.ySpeed));
magnitude_2 = Math.sqrt((ball2.xSpeed * ball2.xSpeed) + (ball2.ySpeed * ball2.ySpeed));
direction_1 = Math.atan2(ball.ySpeed, ball.xSpeed);
direction_2 = Math.atan2(ball2.ySpeed, ball2.xSpeed);
new_xspeed_1 = magnitude_1 * Math.cos(direction_1 - collisionision_angle);
new_yspeed_1 = magnitude_1 * Math.sin(direction_1 - collisionision_angle);
new_xspeed_2 = magnitude_2 * Math.cos(direction_2 - collisionision_angle);
new_yspeed_2 = magnitude_2 * Math.sin(direction_2 - collisionision_angle);
final_xspeed_1 = (((ball.mass - ball2.mass) * new_xspeed_1) + ((ball2.mass + ball2.mass) * new_xspeed_2)) / (ball.mass + ball2.mass);
final_xspeed_2 = (((ball.mass + ball.mass) * new_xspeed_1) + ((ball2.mass - ball.mass) * new_xspeed_2)) / (ball.mass + ball2.mass);
final_yspeed_1 = new_yspeed_1;
final_yspeed_2 = new_yspeed_2;
ball.xSpeed = (Math.cos(collisionision_angle) * final_xspeed_1) + (Math.cos(collisionision_angle + (Math.PI/2)) * final_yspeed_1);
ball.ySpeed = (Math.sin(collisionision_angle) * final_xspeed_1) + (Math.sin(collisionision_angle + (Math.PI/2)) * final_yspeed_1);
ball2.xSpeed = (Math.cos(collisionision_angle) * final_xspeed_2) + (Math.cos(collisionision_angle + (Math.PI/2)) * final_yspeed_2);
ball2.ySpeed = (Math.sin(collisionision_angle) * final_xspeed_2) + (Math.sin(collisionision_angle + (Math.PI/2)) * final_yspeed_2);
trace("Ball.xSpeed = " + ball.xSpeed);
if ((isShip == 1) && (shipFlying == 1)) {
if (useBumperBlock == 0) {
ship._x = ship.safeXp;
ship._y = ship.safeYp;
} else {
ship.bumperBlock(ball2._x, ball2._y, ball2.myRadius * 2);
}
}
}
function endGame() {
gotoAndPlay ("gameOver");
}
function winGame() {
gotoAndPlay ("winGame");
}
function shipDied() {
lives = lives - 1;
dashBoard.updateLives();
if (lives < 1) {
endGame();
} else {
createShip();
}
}
function createShip() {
currentDepth++;
this.attachMovie("ship", "ship", currentDepth);
}
function populateScreens() {
j = 0;
while (j <= maxRows) {
k = 0;
while (k <= maxColums) {
mixRandy();
populationArray = new Array();
populationArray[randy[0]] = "p0";
populationArray[randy[1]] = "p1";
populationArray[randy[2]] = "pad";
populationArray[randy[3]] = "a0";
subCont = populationArray[0];
screens.rows[j].colum[k].contents[subCont] = new Object();
screens.rows[j].colum[k].contents[subCont].x = (Math.random() * 240) + 10;
screens.rows[j].colum[k].contents[subCont].y = (Math.random() * 150) + 15;
screens.rows[j].colum[k].contents[subCont].quadrant = 1;
screens.rows[j].colum[k].contents[subCont].xSpeed = 2;
screens.rows[j].colum[k].contents[subCont].ySpeed = 2;
screens.rows[j].colum[k].contents[subCont].exists = 1;
subCont = populationArray[1];
screens.rows[j].colum[k].contents[subCont] = new Object();
screens.rows[j].colum[k].contents[subCont].x = (Math.random() * 200) + 410;
screens.rows[j].colum[k].contents[subCont].y = (Math.random() * 150) + 15;
screens.rows[j].colum[k].contents[subCont].quadrant = 2;
screens.rows[j].colum[k].contents[subCont].xSpeed = 2;
screens.rows[j].colum[k].contents[subCont].ySpeed = -2;
screens.rows[j].colum[k].contents[subCont].exists = 1;
subCont = populationArray[2];
screens.rows[j].colum[k].contents[subCont] = new Object();
screens.rows[j].colum[k].contents[subCont].x = (Math.random() * 200) + 10;
screens.rows[j].colum[k].contents[subCont].y = (Math.random() * 170) + 290;
screens.rows[j].colum[k].contents[subCont].quadrant = 3;
screens.rows[j].colum[k].contents[subCont].xSpeed = -2;
screens.rows[j].colum[k].contents[subCont].ySpeed = 2;
screens.rows[j].colum[k].contents[subCont].exists = 1;
subCont = populationArray[3];
screens.rows[j].colum[k].contents[subCont] = new Object();
screens.rows[j].colum[k].contents[subCont].x = (Math.random() * 200) + 410;
screens.rows[j].colum[k].contents[subCont].y = (Math.random() * 150) + 290;
screens.rows[j].colum[k].contents[subCont].quadrant = 4;
screens.rows[j].colum[k].contents[subCont].xSpeed = -2;
screens.rows[j].colum[k].contents[subCont].ySpeed = -2;
screens.rows[j].colum[k].contents[subCont].exists = 1;
screens.rows[j].colum[k].contents.p0.planetType = randy[0] + 1;
screens.rows[j].colum[k].contents.p1.planetType = randy[1] + 1;
screens.rows[j].colum[k].contents.a0.aType = Math.floor((Math.random() * 3) + 1);
checkPadPlacement(j, k);
setPadConsumables(j, k);
checkArtifactPlacement(j, k);
k++;
}
j++;
}
}
function checkPadCollision() {
drawin.clear();
testy = com.sprites.CollisionDetection.checkForCollision(ship.hitBox, pad.hitBox, 255);
var _local1 = com.sprites.CollisionDetection.checkForCollision(ship.hitBox, pad.hitBox, 255);
return(testy);
}
function checkWallCollision() {
testy = com.sprites.CollisionDetection.checkForCollision(ship.hitBox, walls, 255);
return(testy);
}
pauseMe = 0;
n = 1;
e = 3;
w = 2;
s = 4;
firstRun = 1;
maxRows = 3;
maxColums = 3;
level = 0;
lives = 3;
padMaxFuel = 150;
padMaxFixer = 150;
shipHealth = 100;
shipFuel = 75;
currentRow = 1;
currentColum = 1;
homeRow = 1;
homeColum = 1;
currentDepth = 1001;
fuel = padMaxFuel;
fixer = padMaxFixer;
randy = newArray();
randy = [0, 1, 2, 3];
screens = new Object();
screens.rows = new Array();
j = 0;
while (j <= maxRows) {
screens.rows[j] = new Object();
screens.rows[j].colum = new Array();
k = 0;
while (k <= maxColums) {
screens.rows[j].colum[k] = new Object();
screens.rows[j].colum[k].contents = new Object();
k++;
}
j++;
}
j = 0;
while (j <= maxRows) {
k = 0;
while (k <= maxColums) {
screens.rows[j].colum[k].contents.mazeFeatures = new Object();
screens.rows[j].colum[k].contents.mazeFeatures.n = 0;
screens.rows[j].colum[k].contents.mazeFeatures.e = 0;
screens.rows[j].colum[k].contents.mazeFeatures.s = 0;
screens.rows[j].colum[k].contents.mazeFeatures.w = 0;
screens.rows[j].colum[k].contents.mazeFeatures.visited = 0;
k++;
}
j++;
}
stopAllSounds();
padExists = false;
createEmptyMovieClip("drawin", 10000);
Symbol 199 MovieClip Frame 2
shipHealth = 100;
shipFuel = 75;
fuel = padMaxFuel;
fixer = padMaxFixer;
intro.onPress = function () {
gotoAndPlay ("secondStart");
};
stopAllSounds();
Symbol 199 MovieClip Frame 15
stop();
onEnterFrame = function () {
if (Key.isDown(38)) {
delete this.onEnterFrame;
play();
}
};
Symbol 199 MovieClip Frame 16
delete this.onEnterFrame;
Symbol 199 MovieClip Frame 24
level = 0;
nextLevel = "LEVEL 1";
stopAllSounds();
leveler.showLevel();
Symbol 199 MovieClip Frame 94
function showHeyDummy() {
heyDummy._visible = 1;
var _local1 = new mx.transitions.Tween(heyDummy, "_alpha", none, heyDummy._alpha, 100, 8, false);
}
function hideHeyDummy() {
heyDummy._alpha = 0;
heyDummy._visible = 0;
}
function showPad() {
placePad();
pad._alpha = 0;
pad._visible = 1;
var _local1 = new mx.transitions.Tween(pad, "_alpha", none, pad._alpha, 100, 8, false);
}
function setupNewScreen() {
removeMovieClip(pad);
removeMovieClip(ship);
pad._alpha = 0;
pad._visible = 0;
dashBoard.updateLives();
createShip();
padExists = false;
leveler.hideLevel();
trace("Just set leveler to 0");
}
function doneFueling() {
shipFuel = ship.fuel;
shipHealth = ship.health;
leveler.showLevel();
var _local1 = new mx.transitions.Tween(null, "_x", null, 0, 0, 66, false);
_local1.onMotionFinished = function () {
removeMovieClip(ship);
leveler._visible = 0;
play();
};
}
function checkGoal() {
artifacts = artifacts + 1;
trace("ARTIFACTS = " + artifacts);
if (artifacts >= goal) {
showPad();
}
}
jukebox.playWhich("two");
leveler._visible = 0;
padExists = false;
goal = 1;
artifacts = 0;
shipX = 310;
shipY = 185;
padX = 420;
padY = 400;
stop();
setupNewScreen();
level = 1;
nextLevel = "LEVEL 2";
hideHeyDummy();
Symbol 199 MovieClip Frame 96
stop();
goal = 2;
artifacts = 0;
leveler._visible = 0;
shipX = 240;
shipY = 200;
padX = 450;
padY = 300;
setupNewScreen();
level = 2;
nextLevel = "LEVEL 3";
Symbol 199 MovieClip Frame 98
stop();
goal = 3;
artifacts = 0;
leveler._visible = 0;
shipX = 51;
shipY = 225;
padX = 541;
padY = 220;
setupNewScreen();
level = 3;
nextLevel = "LEVEL 4";
Symbol 199 MovieClip Frame 100
stop();
goal = 4;
artifacts = 0;
leveler._visible = 0;
shipX = 233;
shipY = 225;
padX = 423;
padY = 331;
setupNewScreen();
level = 4;
nextLevel = "LEVEL 5";
Symbol 199 MovieClip Frame 102
stop();
goal = 4;
artifacts = 0;
leveler._visible = 0;
shipX = 70;
shipY = 265;
padX = 300;
padY = 290;
setupNewScreen();
level = 5;
nextLevel = "LEVEL 6";
Symbol 199 MovieClip Frame 104
stop();
goal = 4;
artifacts = 0;
leveler._visible = 0;
shipX = 320;
shipY = 460;
padX = 230;
padY = 515;
setupNewScreen();
level = 6;
nextLevel = "LEVEL 7";
Symbol 199 MovieClip Frame 106
stop();
goal = 4;
artifacts = 0;
leveler._visible = 0;
shipX = 100;
shipY = 330;
padX = 520;
padY = 295;
level = 7;
setupNewScreen();
Symbol 199 MovieClip Frame 108
stopAllSounds();
removeMovieClip(pad);
Symbol 199 MovieClip Frame 118
stop();
Symbol 199 MovieClip Frame 125
removeMovieClip(pad);
stopAllSounds();
Symbol 199 MovieClip Frame 135
stop();
Instance of Symbol 197 MovieClip in Symbol 199 MovieClip Frame 167
onClipEvent (enterFrame) {
if (this.hitTest(_parent.ship.hitArea)) {
_parent.ship.splode();
}
}
Instance of Symbol 197 MovieClip in Symbol 199 MovieClip Frame 167
onClipEvent (enterFrame) {
if (this.hitTest(_parent.ship.hitArea)) {
_parent.ship.splode();
}
}
Instance of Symbol 198 MovieClip in Symbol 199 MovieClip Frame 167
/* no clip actions */