Frame 1
stop();
Frame 8
fuelGauge.gotoAndStop(1);
Instance of Symbol 25 MovieClip in Frame 8
onClipEvent (enterFrame) {
_rotation = _parent.ship._rotation;
}
Instance of Symbol 45 MovieClip in Frame 8
onClipEvent (enterFrame) {
_width = Math.abs(_parent.ship.xmove);
_height = Math.abs(_parent.ship.ymove);
if (_parent.ship.xmove < 0) {
_xscale = (Math.abs(_xscale) * -1);
}
if (_parent.ship.ymove < 0) {
_yscale = (Math.abs(_yscale) * -1);
}
}
Frame 39
baseAmount = ship._width + 10;
padIncrement = 5;
maxLevel = 20;
if (level < maxLevel) {
gap = baseAmount + (padIncrement * (maxLevel - level));
} else {
gap = baseAmount;
}
leftMark._x = random(550 - gap);
rightMark._x = leftMark._x + gap;
pad._x = leftMark._x;
pad._width = gap;
ship._x = random(500) + 25;
while ((leftMark._x < ship._x) && (ship._x < rightMark._x)) {
ship._x = random(500) + 25;
}
stop();
Instance of Symbol 59 MovieClip "ship" in Frame 39
onClipEvent (load) {
function accelerate() {
angle = ((_rotation / 360) * 2) * Math.PI;
xmove = xmove + (power * Math.sin(angle));
ymove = ymove + ((-power) * Math.cos(angle));
}
function useFuel(amount) {
fuelUsed = fuelUsed + amount;
if (fuelUsed >= fuelmax) {
empty = 1;
thrust.gotoAndStop(1);
}
fuelRatio = fuelUsed / fuelMax;
_parent.fuelGauge.gotoAndStop(Math.round(fuelRatio * (_root.fuelGauge._totalFrames - 1)) + 1);
}
function move() {
ymove = ymove + gravity;
hypotenuse = Math.sqrt((xmove * xmove) + (ymove * ymove));
if (maxVelocity < hypotenuse) {
xmove = xmove * (maxVelocity / hypotenuse);
ymove = ymove * (maxVelocity / hypotenuse);
}
_x = (_x + xmove);
_y = (_y + ymove);
if (maxRotation < rmove) {
rmove = maxRotation;
} else if (rmove < (-maxRotation)) {
rmove = -maxRotation;
}
this._rotation = this._rotation + rmove;
rmove = rmove * rotationalFriction;
}
function wrap() {
if ((_x < ((-_width) * 0.5)) && (xmove < 0)) {
_x = (550 + (_width * 0.5));
} else if (((550 + (_width * 0.5)) < _x) && (0 < xmove)) {
_x = ((-_width) * 0.5);
}
}
function dangerCheck() {
errors = 0;
if (ysafety < Math.abs(ymove)) {
errors++;
_parent.ydanger._visible = 1;
} else {
_parent.ydanger._visible = 0;
}
if (xsafety < Math.abs(xmove)) {
errors++;
_parent.xdanger._visible = 1;
} else {
_parent.xdanger._visible = 0;
}
if ((spinsafety < Math.abs(rmove)) || (anglesafety < Math.abs(_rotation))) {
errors++;
_parent.rdanger._visible = 1;
} else {
_parent.rdanger._visible = 0;
}
if ((_x < (_parent.leftMark._x + (_width * 0.5))) || ((_parent.rightmark._x - (_width * 0.5)) < _x)) {
errors++;
}
}
function altitudeCheck() {
altitude = Math.round(_parent.land._y - (_y + (0.5 * _height)));
if (0 >= altitude) {
impact = 1;
if (errors) {
crash();
} else {
touchDown();
}
}
}
function touchDown() {
thrust.gotoAndStop(1);
_rotation = 0;
_y = (_parent.land._y - (0.5 * _height));
altitude = 0;
_parent.level++;
_parent.win.gotoAndPlay(2);
}
function crash() {
altitude = 0;
_parent.flash.play();
gotoAndPlay ("crash");
}
gravity = (0.01 * _parent.level) + 0.05;
power = 3 * gravity;
fuelMax = 1000;
maxVelocity = 15;
maxRotation = 10;
rotationalFriction = 0.95;
ysafety = 1.5;
xsafety = 0.6;
spinsafety = 1;
anglesafety = 8;
}
onClipEvent (enterFrame) {
if ((!empty) && (!impact)) {
if (Key.isDown(37)) {
rmove = rmove - 0.5;
useFuel(1);
}
if (Key.isDown(39)) {
rmove = rmove + 0.5;
useFuel(1);
}
if (Key.isDown(38)) {
accelerate();
thrust.nextFrame();
useFuel(2);
} else {
thrust.prevFrame();
}
}
if (!impact) {
move();
wrap();
dangerCheck();
altitudeCheck();
}
}
Symbol 6 Button
on (release) {
level = 1;
gotoAndPlay ("level");
}
Symbol 16 MovieClip Frame 1
stop();
Symbol 23 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 5
_root.gotoAndStop("menu");
Symbol 51 MovieClip Frame 1
stop();
Symbol 59 MovieClip Frame 1
stop();
Symbol 59 MovieClip Frame 60
_parent.lives.nextFrame();
_parent.gotoAndPlay("level");
Symbol 66 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 53
_parent.gotoAndplay("level");