Combined Code
movieClip 7 {
}
movieClip 10 {
}
movieClip 18 foreground {
frame 1 {
stop();
}
}
movieClip 20 cross {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 21 foreground {
frame 1 {
stop();
}
}
frame 1 {
stop();
loadMovie('sjb_intro.swf', 'intro_load');
/:point_value = 100;
_root.bg_sounds.gotoAndStop('intermission');
}
movieClip 28 {
}
movieClip 39 {
}
button 42 {
on (release, keyPress '<Enter>') {
if (/:password == 'QNR411XT' or /:password == 'qnr411xt' or /:password == 'qnr4' or /:password == 'QNR4') {
loadVariables('images/warp1.txt', _root.warp_load);
_root.gotoAndStop('start_asteroids_bonus');
/:password = '';
}
if (/:password == '3LKUB2WI' or /:password == '3lkub2wi' or /:password == '3LKUB2W1' or /:password == '3lkub2w1' or /:password == '3LKU' or /:password == '3lku') {
loadVariables('images/warp2.txt', _root.warp_load);
_root.gotoAndStop('start_asteroids3');
/:password = '';
}
if (/:password == 'KMTPJGRS' or /:password == 'kmtpjgrs' or /:password == 'kmtp' or /:password == 'KMTP') {
loadVariables('images/warp3.txt', _root.warp_load);
_root.gotoAndPlay('start_asteroids4');
/:password = '';
}
if (/:password == 'mccarthy') {
tellTarget ('_root.print_mc') {
gotoAndPlay('win3');
}
_root.gotoAndPlay('print');
/:password = '';
}
if (/:password == 'pender') {
tellTarget ('_root.print_mc') {
gotoAndPlay('win3');
}
_root.gotoAndPlay('print');
/:password = '';
}
if (/:password == 'grall') {
tellTarget ('_root.print_mc') {
gotoAndPlay('win3');
}
_root.gotoAndPlay('print');
/:password = '';
}
if (!(/:password eq '')) {
loadVariables('images/wrong.txt', _root.warp_load);
_root.wrong_password.gotoAndPlay(2);
/:password = '';
} else {
_root.gotoAndStop('one');
}
}
}
movieClip 43 {
frame 30 {
gotoAndPlay(1);
}
frame 31 {
stop();
}
}
instance loading of movieClip 43 {
onClipEvent (enterFrame) {
/:percent = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
/:FrameLoad = Math.round(/:percent) + '%';
if (/:percent >= 100) {
tellTarget ('_root.loading') {
gotoAndStop(31);
}
}
}
onClipEvent (mouseMove) {
if (/:percent >= 100) {
tellTarget ('_root.loading') {
gotoAndStop(31);
}
}
}
}
button 49 {
on (release) {
tellTarget ('_root.music_on_off') {
gotoAndStop('on');
}
tellTarget ('_root.bg_sounds') {
gotoAndStop('soundoff');
}
}
}
button 53 {
on (release) {
tellTarget ('_root.music_on_off') {
gotoAndStop('off');
}
tellTarget ('_root.bg_sounds') {
gotoAndStop('intermission');
}
}
}
movieClip 54 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
button 55 {
on (release, keyPress '<Enter>') {
if (/:password == 'QNR411XT' or /:password == 'qnr411xt') {
loadVariables('images/warp1.txt', _root.warp_load);
tellTarget ('_root.print_mc') {
gotoAndPlay('win1');
}
_root.gotoAndPlay('print');
/:password = '';
}
if (/:password == '3LKUB2WI' or /:password == '3lkub2wi' or /:password == '3LKUB2W1' or /:password == '3lkub2w1') {
loadVariables('images/warp2.txt', _root.warp_load);
tellTarget ('_root.print_mc') {
gotoAndPlay('win2');
}
_root.gotoAndPlay('print');
/:password = '';
}
if (/:password == 'KMTPJGRS' or /:password == 'kmtpjgrs') {
loadVariables('images/warp3.txt', _root.warp_load);
tellTarget ('_root.print_mc') {
gotoAndPlay('win3');
}
_root.gotoAndPlay('print');
/:password = '';
}
if (/:password == 'mccarthy') {
tellTarget ('_root.print_mc') {
gotoAndPlay('win3');
}
_root.gotoAndPlay('print');
/:password = '';
}
if (/:password == 'pender') {
tellTarget ('_root.print_mc') {
gotoAndPlay('win3');
}
_root.gotoAndPlay('print');
/:password = '';
}
if (/:password == 'grall') {
tellTarget ('_root.print_mc') {
gotoAndPlay('win3');
}
_root.gotoAndPlay('print');
/:password = '';
}
if (!(/:password eq '')) {
loadVariables('images/wrong.txt', _root.warp_load);
_root.wrong_password.gotoAndPlay(2);
/:password = '';
} else {
_root.gotoAndStop('one');
}
}
}
button 66 {
on (release) {
tellTarget ('warpcodes') {
gotoAndPlay(2);
}
}
}
movieClip 72 {
frame 1 {
stop();
/:sound = 0;
}
frame 2 {
stop();
/:sound = 0;
}
frame 3 {
stop();
/:sound = 0;
}
frame 4 {
stop();
stopAllSounds();
/:sound = 1;
}
}
movieClip 75 {
}
movieClip 79 {
frame 1 {
stop();
}
frame 10 {
gotoAndPlay(1);
}
}
button 84 {
on (release) {
gotoAndPlay(1);
}
}
button 93 {
on (release) {
gotoAndStop(1);
}
}
movieClip 94 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 104 {
}
button 113 {
on (release) {
getURL('http://www.kidscom.com/', '');
}
}
button 124 {
on (release) {
loadMovieNum('print:#bframe', 0);
}
}
button 126 {
on (release) {
gotoAndPlay(1);
_root.gotoAndPlay('start_asteroids_bonus');
}
}
button 128 {
on (release) {
gotoAndPlay(1);
_root.gotoAndPlay('start_asteroids3');
}
}
button 136 {
on (release) {
gotoAndPlay(1);
_root.gotoAndPlay('start_asteroids4');
}
}
button 146 {
on (release) {
getURL('javascript:earn_points()', '');
}
}
movieClip 158 {
frame 1 {
stop();
}
frame 2 {
stop();
Mouse.show();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('intermission');
}
}
frame 3 {
stop();
Mouse.show();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('intermission');
}
}
frame 4 {
stop();
Mouse.show();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('intermission');
}
}
frame 5 {
Mouse.show();
Score = /:Score;
Name = /:Name;
loadVariables('http://www.kidscom.com/cgi-bin/kidskashgames/specandtra/score.pl', '_root', 'POST');
}
frame 9 {
if (Number(eof) == Number('true')) {
eof = '';
stop();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('intermission');
}
}
stop();
}
}
button 161 {
on (release) {
gotoAndStop(1);
_root.foreground._visible = true;
_root.foreground2._visible = true;
_root.foreground3._visible = true;
_root.foreground4._visible = true;
Mouse.hide();
}
}
movieClip 169 {
}
movieClip 178 {
frame 1 {
stop();
/:pause = false;
}
frame 2 {
stop();
/:pause = true;
}
}
movieClip 183 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 15 {
gotoAndStop(1);
}
}
movieClip 184 {
}
instance warp_load of movieClip 184 {
onClipEvent (data) {
trace(code);
}
}
button 191 {
on (release) {
if (/:pause == false) {
tellTarget ('instruct_land') {
gotoAndPlay(2);
}
/:pause = true;
_root.foreground._visible = false;
_root.foreground2._visible = false;
_root.foreground3._visible = false;
_root.foreground4._visible = false;
Mouse.show();
} else {
tellTarget ('instruct_land') {
gotoAndStop(1);
}
/:pause = false;
_root.foreground._visible = true;
_root.foreground2._visible = true;
_root.foreground3._visible = true;
_root.foreground4._visible = true;
}
}
}
button 193 {
on (release) {
_root.gotoAndPlay('print');
stopAllSounds();
_root.removeAllRocks();
_root.removeAllbullets();
Mouse.show();
loadMovie('', 'foreground');
loadMovie('', 'foreground2');
loadMovie('', 'foreground3');
loadMovie('', 'cursor');
loadMovie('', 'cursorB');
loadMovie('', 'cursor2');
loadMovie('', 'cursor3');
loadMovie('', 'cursor4');
loadMovie('', 'cursor5');
loadMovie('', 'cursor6');
loadMovie('', 'foreground4');
loadMovie('', 'cursor7');
tellTarget ('_root.print_mc') {
gotoAndPlay('high_score');
}
tellTarget ('instruct_land') {
gotoAndStop(1);
}
}
}
button 195 {
on (release) {
stopAllSounds();
_root.removeAllRocks();
_root.removeAllbullets();
Mouse.show();
loadMovie('', 'foreground');
loadMovie('', 'foreground2');
loadMovie('', 'foreground3');
loadMovie('', 'cursor');
loadMovie('', 'cursorB');
loadMovie('', 'cursor2');
loadMovie('', 'cursor3');
loadMovie('', 'cursor4');
loadMovie('', 'cursor5');
loadMovie('', 'cursor6');
loadMovie('', 'foreground4');
loadMovie('', 'cursor7');
level = 0;
damage = 0;
hits = 0;
/:Score = 0;
_root.instruct_land.gotoAndStop(1);
_root.print_mc.gotoAndStop(1);
gotoAndStop(1);
}
}
button 197 {
on (release) {
getURL('/games/games.html', '');
}
}
frame 2 {
stop();
}
button 204 {
on (release) {
nextFrame();
}
}
frame 3 {
stop();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('shooter');
}
}
button 209 {
on (press) {
_root.initGame();
nextFrame();
}
}
frame 4 {
function initGame() {
bullets = new Array();
rocks = new Array();
attachMovie('cross', 'cursor', 10);
_root.foreground.swapDepths(9999999);
_root.cursor.swapDepths(9999998);
level = 0;
damage = 0;
hits = 0;
foreground.displayHits = hits;
foreground.displayDamage = damage;
Mouse.hide();
}
function moveCursor() {
cursor._x = _xmouse;
cursor._y = _ymouse;
}
function check_win() {
if (hits >= 8) {
removeAllRocks();
removeAllbullets();
loadMovie('', 'cursor');
Mouse.show();
_root.gotoAndPlay('asteroids_1_done');
}
}
function fire() {
Mouse.hide();
x = _xmouse;
y = _ymouse;
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 50, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 500, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
}
function moveBullets() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].dist *= 0.4;
if (bullets[i].dist < 0.01) {
checkForHit(bullets[i].destx, bullets[i].desty);
_root[bullets[i].clip].removeMovieClip();
bullets.splice(i, 1);
} else {
bullets[i].x = bullets[i].dist * bullets[i].startx + (1 - bullets[i].dist) * bullets[i].destx;
bullets[i].y = bullets[i].dist * bullets[i].starty + (1 - bullets[i].dist) * bullets[i].desty;
_root[bullets[i].clip]._x = bullets[i].x;
_root[bullets[i].clip]._y = bullets[i].y;
}
--i;
}
}
function createRock() {
startx = Math.random() * 50 + 250;
starty = Math.random() * 50 + 175;
destx = Math.random() * 1100 - 275;
desty = Math.random() * 800;
++level;
rock.duplicateMovieClip('rock' + level, level++);
f = int(random(3));
if (f == 0) {
f = 1;
}
_root['rock' + level].gotoAndStop(f);
rocks.push({'startx': startx, 'starty': starty, 'destx': destx, 'desty': desty, 'dist': 0.01, 'clip': 'rock' + level});
}
function moveRocks() {
i = rocks.length - 1;
while (i >= 0) {
rocks[i].dist *= 1.1;
if (1 < rocks[i].dist) {
if (0 < rocks[i].destx and rocks[i].destx < 550 and 0 < rocks[i].desty and rocks[i].desty < 400) {
_root[rocks[i].clip].gotoAndPlay('explode blue');
++damage;
foreground.displayDamage = damage;
if (damage >= 5) {
removeAllRocks();
removeAllbullets();
Mouse.show();
loadMovie('', 'foreground');
loadMovie('', 'cursor');
gotoAndStop(27);
}
} else {
_root[rocks[i].clip].removeMovieClip();
}
rocks.splice(i, 1);
} else {
rocks[i].x = (1 - rocks[i].dist) * rocks[i].startx + rocks[i].dist * rocks[i].destx;
rocks[i].y = (1 - rocks[i].dist) * rocks[i].starty + rocks[i].dist * rocks[i].desty;
_root[rocks[i].clip]._x = rocks[i].x;
_root[rocks[i].clip]._y = rocks[i].y;
_root[rocks[i].clip]._xscale = 100 * rocks[i].dist;
_root[rocks[i].clip]._yscale = 100 * rocks[i].dist;
}
--i;
}
}
function checkForHit(x, y) {
j = rocks.length - 1;
while (j >= 0) {
if (_root[rocks[j].clip].hitTest(x, y)) {
++hits;
foreground.displayHits = hits;
_root[rocks[j].clip].gotoAndPlay('explode red');
rocks.splice(j, 1);
/:Score += /:point_value;
}
--j;
}
}
function killRock(clip) {
clip.removeMovieClip();
}
function removeAllRocks() {
i = rocks.length - 1;
while (i >= 0) {
_root[rocks[i].clip].removeMovieClip();
--i;
}
}
function removeAllbullets() {
i = bullets.length - 1;
while (i >= 0) {
_root[bullets[i].clip].removeMovieClip();
--i;
}
}
stop();
}
button 213 {
on (keyPress '<Space>') {
fire();
}
on (keyPress 'q') {
_root.cheat.gotoAndPlay(2);
damage = 0;
}
on (keyPress 'p') {
if (/:point_value == 100) {
_root.cheat.gotoAndPlay(2);
/:point_value = 200;
}
}
on (keyPress 'b') {
if (_root.bullet._xscale < 400) {
_root.cheat.gotoAndPlay(2);
_root.bullet._xscale *= 2;
_root.bullet._yscale *= 2;
}
}
}
movieClip 215 {
}
instance of movieClip 215 {
onClipEvent (load) {
_root.initGame();
}
onClipEvent (enterFrame) {
if (/:pause == false) {
_root.moveCursor();
_root.moveBullets();
if (Math.random() < 0.1) {
_root.createRock();
}
_root.moveRocks();
_root.check_win();
} else {}
}
}
movieClip 228 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 8 {
_root.killRock(this);
stop();
}
frame 14 {
_root.killRock(this);
stop();
}
}
movieClip 230 {
}
frame 5 {
stop();
}
button 236 {
on (release) {
loadMovie('', 'foreground');
_root.gotoAndStop('start_landing');
}
}
frame 6 {
function startGame() {
gameLevel = 1;
startLevel();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('intermission');
} else {
stopAllSounds();
}
}
function startLevel() {
gotoAndStop('level' + gameLevel);
ship._x = 275;
ship._y = 65;
ship.dx = 0;
ship.dy = 0;
gravity = 0.05;
fuel = 100;
showFuel();
hitPoints = new Array();
hitPoints.push({'x': -9, 'y': 13});
hitPoints.push({'x': 9, 'y': 13});
hitPoints.push({'x': 0, 'y': -10});
hitPoints.push({'x': -8, 'y': -7});
hitPoints.push({'x': 8, 'y': -7});
footPoints = new Array();
footPoints.push({'x': -9, 'y': 13});
footPoints.push({'x': 9, 'y': 13});
pads = new Array();
i = 0;
while (i < 3) {
pads.push(_root['pad' + i]);
++i;
}
}
function moveShip() {
shipThrusters();
shipMovement();
checkForLand();
checkForCrash();
}
function shipThrusters() {
if (fuel < 0) {
ship.gotoAndStop('normal');
} else {
if (Key.isDown(Key.UP)) {
ship.dy -= 0.4;
ship.gotoAndStop('up');
fuel -= 2;
showFuel();
} else {
if (Key.isDown(Key.LEFT)) {
ship.dx -= 0.2;
ship.gotoAndStop('left');
fuel -= 1;
showFuel();
} else {
if (Key.isDown(Key.RIGHT)) {
ship.dx += 0.2;
ship.gotoAndStop('right');
fuel -= 1;
showFuel();
} else {
ship.gotoAndStop('normal');
}
}
}
}
if (Key.isDown(75)) {
_root.cheat.gotoAndPlay(2);
fuel = 100;
showFuel();
}
}
function shipMovement() {
ship.dy += gravity;
ship._x += ship.dx;
ship._y += ship.dy;
}
function checkForLand() {
landed = true;
i = 0;
while (i < footPoints.length) {
footDown = false;
j = 0;
while (j < pads.length) {
if (pads[j].hitTest(ship._x + footPoints[i].x, ship._y + footPoints[i].y, true)) {
footDown = true;
break;
}
++j;
}
if (!footDown) {
landed = false;
break;
}
++i;
}
if (3 < ship.dy) {
landed = false;
}
if (landed) {
tellTarget ('_root.print_mc') {
gotoAndPlay('win1');
}
gotoAndPlay(28);
++gameLevel;
/:Score += /:point_value;
}
}
function checkForCrash() {
if (!landed) {
i = 0;
while (i < hitPoints.length) {
if (activeground.hitTest(ship._x + hitPoints[i].x, ship._y + hitPoints[i].y, true)) {
ship.gotoAndPlay('explode');
lives -= 1;
if (0 >= lives) {
gotoAndStop(27);
break;
} else {
gotoAndPlay(8);
break;
}
}
++i;
}
}
}
function showFuel() {
gauge.meter._xscale = fuel;
}
stop();
lives = 3;
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('intermission');
}
}
movieClip 239 {
}
movieClip 245 {
}
movieClip 246 {
}
movieClip 248 {
}
movieClip 255 {
}
button 258 {
on (press) {
startGame();
}
}
frame 7 {
stop();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('lander');
}
}
movieClip 265 {
}
movieClip 271 {
}
movieClip 281 {
frame 40 {
gotoAndPlay(1);
}
}
movieClip 282 {
frame 1 {
stop();
}
frame 40 {
stop();
}
}
movieClip 284 {
}
instance of movieClip 284 {
onClipEvent (load) {
_root.startLevel();
}
onClipEvent (enterFrame) {
if (/:pause == false) {
_root.moveShip();
}
}
}
frame 8 {
stop();
}
button 287 {
on (press) {
startGame();
}
}
frame 9 {
stop();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('shooter');
} else {
stopAllSounds();
}
}
button 293 {
on (press) {
damage = 0;
hits = 0;
nextFrame();
}
}
frame 10 {
function initGameB() {
bullets = new Array();
rockBs = new Array();
level = 0;
attachMovie('cross', 'cursorB', 10);
_root.foreground2.swapDepths(9999999);
_root.cursorB.swapDepths(9999998);
damage = 0;
hits = 0;
foreground.displayHits = hits;
foreground.displayDamage = damage;
Mouse.hide();
}
function movecursorB() {
cursorB._x = _xmouse;
cursorB._y = _ymouse;
}
function check_win() {
if (hits >= 10) {
removeAllRocks();
removeAllbullets();
loadMovie('', 'cursorB');
Mouse.show();
nextFrame();
}
}
function fireB() {
Mouse.hide();
x = _xmouse;
y = _ymouse;
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 50, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 500, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
}
function moveBulletsB() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].dist *= 0.4;
if (bullets[i].dist < 0.01) {
checkForHit(bullets[i].destx, bullets[i].desty);
_root[bullets[i].clip].removeMovieClip();
bullets.splice(i, 1);
} else {
bullets[i].x = bullets[i].dist * bullets[i].startx + (1 - bullets[i].dist) * bullets[i].destx;
bullets[i].y = bullets[i].dist * bullets[i].starty + (1 - bullets[i].dist) * bullets[i].desty;
_root[bullets[i].clip]._x = bullets[i].x;
_root[bullets[i].clip]._y = bullets[i].y;
}
--i;
}
}
function createRockB() {
startx = Math.random() * 50 + 250;
starty = Math.random() * 50 + 175;
destx = Math.random() * 1100 - 275;
desty = Math.random() * 800;
++level;
rockB.duplicateMovieClip('rockB' + level, level++);
f = int(random(8));
if (f == 0) {
f = 1;
}
_root['rockB' + level].gotoAndStop(f);
rockBs.push({'startx': startx, 'starty': starty, 'destx': destx, 'desty': desty, 'dist': 0.01, 'clip': 'rockB' + level});
}
function moveRocksB() {
i = rockBs.length - 1;
while (i >= 0) {
rockBs[i].dist *= 1.1;
if (1 < rockBs[i].dist) {
if (0 < rockBs[i].destx and rockBs[i].destx < 550 and 0 < rockBs[i].desty and rockBs[i].desty < 400) {
_root[rockBs[i].clip].gotoAndPlay('explode blue');
++damage;
foreground2.displayDamage = damage;
if (damage >= 5) {
removeAllRocks();
removeAllbullets();
Mouse.show();
loadMovie('', 'foreground2');
loadMovie('', 'cursorB');
gotoAndStop(27);
}
} else {
_root[rockBs[i].clip].removeMovieClip();
}
rockBs.splice(i, 1);
} else {
rockBs[i].x = (1 - rockBs[i].dist) * rockBs[i].startx + rockBs[i].dist * rockBs[i].destx;
rockBs[i].y = (1 - rockBs[i].dist) * rockBs[i].starty + rockBs[i].dist * rockBs[i].desty;
_root[rockBs[i].clip]._x = rockBs[i].x;
_root[rockBs[i].clip]._y = rockBs[i].y;
_root[rockBs[i].clip]._xscale = 100 * rockBs[i].dist;
_root[rockBs[i].clip]._yscale = 100 * rockBs[i].dist;
}
--i;
}
}
function checkForHit(x, y) {
j = rockBs.length - 1;
while (j >= 0) {
if (_root[rockBs[j].clip].hitTest(x, y)) {
++hits;
foreground2.displayHits = hits;
_root[rockBs[j].clip].gotoAndPlay('explode red');
rockBs.splice(j, 1);
/:Score += /:point_value * 2;
}
--j;
}
}
function killRock(clip) {
clip.removeMovieClip();
}
function removeAllRocks() {
i = rockBs.length - 1;
while (i >= 0) {
_root[rockBs[i].clip].removeMovieClip();
--i;
}
}
function removeAllbullets() {
i = bullets.length - 1;
while (i >= 0) {
_root[bullets[i].clip].removeMovieClip();
--i;
}
}
stop();
}
button 295 {
on (keyPress '<Space>') {
fireB();
}
on (keyPress 'q') {
_root.cheat.gotoAndPlay(2);
damage = 0;
}
on (keyPress 'p') {
if (/:point_value == 100) {
_root.cheat.gotoAndPlay(2);
/:point_value = 200;
}
}
on (keyPress 'b') {
if (_root.bullet._xscale < 400) {
_root.cheat.gotoAndPlay(2);
_root.bullet._xscale *= 2;
_root.bullet._yscale *= 2;
}
}
}
movieClip 296 {
}
instance of movieClip 296 {
onClipEvent (load) {
_root.initGameB();
}
onClipEvent (enterFrame) {
if (/:pause == false) {
_root.moveCursorB();
_root.moveBulletsB();
if (Math.random() < 0.1) {
_root.createRockB();
}
_root.moveRocksB();
_root.check_win();
}
}
}
movieClip 314 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 14 {
_root.killRock(this);
stop();
}
frame 20 {
_root.killRock(this);
stop();
}
}
movieClip 317 {
frame 4 {
gotoAndPlay(3);
}
}
frame 11 {
stop();
}
frame 12 {
function initGame2() {
bullets = new Array();
rock2s = new Array();
level = 0;
attachMovie('cross', 'cursor2', 10);
_root.foreground2.swapDepths(9999999);
_root.cursor2.swapDepths(9999998);
damage = 0;
hits = 0;
foreground.displayHits = hits;
foreground.displayDamage = damage;
Mouse.hide();
}
function moveCursor2() {
cursor2._x = _xmouse;
cursor2._y = _ymouse;
}
function check_win() {
if (hits >= 10) {
removeAllRocks();
removeAllbullets();
loadMovie('', 'cursor2');
Mouse.show();
nextFrame();
}
}
function fire2() {
Mouse.hide();
x = _xmouse;
y = _ymouse;
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 50, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 500, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
}
function moveBullets2() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].dist *= 0.4;
if (bullets[i].dist < 0.01) {
checkForHit(bullets[i].destx, bullets[i].desty);
_root[bullets[i].clip].removeMovieClip();
bullets.splice(i, 1);
} else {
bullets[i].x = bullets[i].dist * bullets[i].startx + (1 - bullets[i].dist) * bullets[i].destx;
bullets[i].y = bullets[i].dist * bullets[i].starty + (1 - bullets[i].dist) * bullets[i].desty;
_root[bullets[i].clip]._x = bullets[i].x;
_root[bullets[i].clip]._y = bullets[i].y;
}
--i;
}
}
function createRock2() {
startx = Math.random() * 50 + 250;
starty = Math.random() * 50 + 175;
destx = Math.random() * 1100 - 275;
desty = Math.random() * 800;
++level;
rock2.duplicateMovieClip('rock2' + level, level++);
f = int(random(3));
if (f == 0) {
f = 1;
}
_root['rock2' + level].gotoAndStop(f);
rock2s.push({'startx': startx, 'starty': starty, 'destx': destx, 'desty': desty, 'dist': 0.01, 'clip': 'rock2' + level});
}
function moveRocks2() {
i = rock2s.length - 1;
while (i >= 0) {
rock2s[i].dist *= 1.1;
if (1 < rock2s[i].dist) {
if (0 < rock2s[i].destx and rock2s[i].destx < 550 and 0 < rock2s[i].desty and rock2s[i].desty < 400) {
_root[rock2s[i].clip].gotoAndPlay('explode blue');
++damage;
foreground2.displayDamage = damage;
if (damage >= 5) {
removeAllRocks();
removeAllbullets();
Mouse.show();
loadMovie('', 'foreground2');
loadMovie('', 'cursor2');
gotoAndStop(27);
}
} else {
_root[rock2s[i].clip].removeMovieClip();
}
rock2s.splice(i, 1);
} else {
rock2s[i].x = (1 - rock2s[i].dist) * rock2s[i].startx + rock2s[i].dist * rock2s[i].destx;
rock2s[i].y = (1 - rock2s[i].dist) * rock2s[i].starty + rock2s[i].dist * rock2s[i].desty;
_root[rock2s[i].clip]._x = rock2s[i].x;
_root[rock2s[i].clip]._y = rock2s[i].y;
_root[rock2s[i].clip]._xscale = 100 * rock2s[i].dist;
_root[rock2s[i].clip]._yscale = 100 * rock2s[i].dist;
}
--i;
}
}
function checkForHit(x, y) {
j = rock2s.length - 1;
while (j >= 0) {
if (_root[rock2s[j].clip].hitTest(x, y)) {
++hits;
foreground2.displayHits = hits;
_root[rock2s[j].clip].gotoAndPlay('explode red');
rock2s.splice(j, 1);
/:Score += /:point_value + 100;
}
--j;
}
}
function killRock(clip) {
clip.removeMovieClip();
}
function removeAllRocks() {
i = rock2s.length - 1;
while (i >= 0) {
_root[rock2s[i].clip].removeMovieClip();
--i;
}
}
function removeAllbullets() {
i = bullets.length - 1;
while (i >= 0) {
_root[bullets[i].clip].removeMovieClip();
--i;
}
}
stop();
}
button 319 {
on (keyPress '<Space>') {
fire2();
}
on (keyPress 'q') {
_root.cheat.gotoAndPlay(2);
damage = 0;
}
on (keyPress 'p') {
if (/:point_value == 100) {
_root.cheat.gotoAndPlay(2);
/:point_value = 200;
}
}
on (keyPress 'b') {
if (_root.bullet._xscale < 400) {
_root.cheat.gotoAndPlay(2);
_root.bullet._xscale *= 2;
_root.bullet._yscale *= 2;
}
}
}
movieClip 320 {
}
instance of movieClip 320 {
onClipEvent (load) {
_root.initGame2();
}
onClipEvent (enterFrame) {
if (/:pause == false) {
_root.moveCursor2();
_root.moveBullets2();
if (Math.random() < 0.1) {
_root.createRock2();
}
_root.moveRocks2();
_root.check_win();
}
}
}
movieClip 329 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 8 {
_root.killRock(this);
stop();
}
frame 14 {
_root.killRock(this);
stop();
}
}
frame 13 {
stop();
}
button 330 {
on (press) {
damage = 0;
hits = 0;
nextFrame();
}
}
frame 14 {
function initGame3() {
bullets = new Array();
rock3s = new Array();
level = 0;
attachMovie('cross', 'cursor3', 10);
_root.foreground2.swapDepths(9999999);
_root.cursor3.swapDepths(9999998);
damage = 0;
hits = 0;
foreground.displayHits = hits;
foreground.displayDamage = damage;
Mouse.hide();
}
function moveCursor3() {
cursor3._x = _xmouse;
cursor3._y = _ymouse;
}
function check_win() {
if (hits >= 15) {
removeAllRocks();
removeAllbullets();
loadMovie('', 'cursor3');
gotoAndStop(15);
Mouse.show();
}
}
function fire3() {
Mouse.hide();
x = _xmouse;
y = _ymouse;
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 50, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 500, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
}
function moveBullets3() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].dist *= 0.4;
if (bullets[i].dist < 0.01) {
checkForHit(bullets[i].destx, bullets[i].desty);
_root[bullets[i].clip].removeMovieClip();
bullets.splice(i, 1);
} else {
bullets[i].x = bullets[i].dist * bullets[i].startx + (1 - bullets[i].dist) * bullets[i].destx;
bullets[i].y = bullets[i].dist * bullets[i].starty + (1 - bullets[i].dist) * bullets[i].desty;
_root[bullets[i].clip]._x = bullets[i].x;
_root[bullets[i].clip]._y = bullets[i].y;
}
--i;
}
}
function createRock3() {
startx = Math.random() * 50 + 250;
starty = Math.random() * 50 + 175;
destx = Math.random() * 1100 - 275;
desty = Math.random() * 800;
++level;
rock3.duplicateMovieClip('rock3' + level, level++);
f = int(random(4));
if (f == 0) {
f = 1;
}
_root['rock3' + level].gotoAndStop(f);
rock3s.push({'startx': startx, 'starty': starty, 'destx': destx, 'desty': desty, 'dist': 0.01, 'clip': 'rock3' + level});
}
function moveRocks3() {
i = rock3s.length - 1;
while (i >= 0) {
rock3s[i].dist *= 1.1;
if (1 < rock3s[i].dist) {
if (0 < rock3s[i].destx and rock3s[i].destx < 550 and 0 < rock3s[i].desty and rock3s[i].desty < 400) {
_root[rock3s[i].clip].gotoAndPlay('explode blue');
++damage;
foreground2.displayDamage = damage;
if (damage >= 5) {
removeAllRocks();
removeAllbullets();
Mouse.show();
loadMovie('', 'foreground2');
loadMovie('', 'cursor3');
gotoAndStop(27);
}
} else {
_root[rock3s[i].clip].removeMovieClip();
}
rock3s.splice(i, 1);
} else {
rock3s[i].x = (1 - rock3s[i].dist) * rock3s[i].startx + rock3s[i].dist * rock3s[i].destx;
rock3s[i].y = (1 - rock3s[i].dist) * rock3s[i].starty + rock3s[i].dist * rock3s[i].desty;
_root[rock3s[i].clip]._x = rock3s[i].x;
_root[rock3s[i].clip]._y = rock3s[i].y;
_root[rock3s[i].clip]._xscale = 100 * rock3s[i].dist;
_root[rock3s[i].clip]._yscale = 100 * rock3s[i].dist;
}
--i;
}
}
function checkForHit(x, y) {
j = rock3s.length - 1;
while (j >= 0) {
if (_root[rock3s[j].clip].hitTest(x, y)) {
++hits;
foreground2.displayHits = hits;
_root[rock3s[j].clip].gotoAndPlay('explode red');
rock3s.splice(j, 1);
/:Score += /:point_value + 100;
}
--j;
}
}
function killRock(clip) {
clip.removeMovieClip();
}
function removeAllRocks() {
i = rock3s.length - 1;
while (i >= 0) {
_root[rock3s[i].clip].removeMovieClip();
--i;
}
}
function removeAllbullets() {
i = bullets.length - 1;
while (i >= 0) {
_root[bullets[i].clip].removeMovieClip();
--i;
}
}
stop();
}
button 333 {
on (keyPress '<Space>') {
fire3();
}
on (keyPress 'q') {
_root.cheat.gotoAndPlay(2);
damage = 0;
}
on (keyPress 'p') {
if (/:point_value == 100) {
_root.cheat.gotoAndPlay(2);
/:point_value = 200;
}
}
on (keyPress 'b') {
if (_root.bullet._xscale < 400) {
_root.cheat.gotoAndPlay(2);
_root.bullet._xscale *= 2;
_root.bullet._yscale *= 2;
}
}
}
movieClip 334 {
}
instance of movieClip 334 {
onClipEvent (load) {
_root.initGame3();
}
onClipEvent (enterFrame) {
if (/:pause == false) {
_root.moveCursor3();
_root.moveBullets3();
if (Math.random() < 0.1) {
_root.createRock3();
}
_root.moveRocks3();
_root.check_win();
}
}
}
movieClip 344 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 9 {
_root.killRock(this);
stop();
}
frame 15 {
_root.killRock(this);
stop();
}
}
frame 15 {
function startGame() {
stopAllSounds();
gameLevel = 2;
startLevel();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('intermission');
} else {
stopAllSounds();
}
}
function startLevel() {
gotoAndStop('level' + gameLevel);
ship._x = 275;
ship._y = 65;
ship.dx = 0;
ship.dy = 0;
gravity = 0.1;
fuel = 100;
showFuel();
hitPoints = new Array();
hitPoints.push({'x': -9, 'y': 13});
hitPoints.push({'x': 9, 'y': 13});
hitPoints.push({'x': 0, 'y': -10});
hitPoints.push({'x': -8, 'y': -7});
hitPoints.push({'x': 8, 'y': -7});
footPoints = new Array();
footPoints.push({'x': -9, 'y': 13});
footPoints.push({'x': 9, 'y': 13});
pads = new Array();
i = 0;
while (i < 3) {
pads.push(_root['pad' + i]);
++i;
}
}
function moveShip() {
shipThrusters();
shipMovement();
checkForLand();
checkForCrash();
}
function shipThrusters() {
if (fuel < 0) {
ship.gotoAndStop('normal');
} else {
if (Key.isDown(Key.UP)) {
ship.dy -= 0.4;
ship.gotoAndStop('up');
fuel -= 2;
showFuel();
} else {
if (Key.isDown(Key.LEFT)) {
ship.dx -= 0.2;
ship.gotoAndStop('left');
fuel -= 1;
showFuel();
} else {
if (Key.isDown(Key.RIGHT)) {
ship.dx += 0.2;
ship.gotoAndStop('right');
fuel -= 1;
showFuel();
} else {
ship.gotoAndStop('normal');
}
}
}
}
if (Key.isDown(75)) {
_root.cheat.gotoAndPlay(2);
fuel = 100;
showFuel();
}
}
function shipMovement() {
ship.dy += gravity;
ship._x += ship.dx;
ship._y += ship.dy;
}
function checkForLand() {
landed = true;
i = 0;
while (i < footPoints.length) {
footDown = false;
j = 0;
while (j < pads.length) {
if (pads[j].hitTest(ship._x + footPoints[i].x, ship._y + footPoints[i].y, true)) {
footDown = true;
break;
}
++j;
}
if (!footDown) {
landed = false;
break;
}
++i;
}
if (3 < ship.dy) {
landed = false;
}
if (landed) {
tellTarget ('_root.print_mc') {
gotoAndPlay('win2');
}
gotoAndPlay(28);
++gameLevel;
/:Score += /:point_value + 400;
}
}
function checkForCrash() {
if (!landed) {
i = 0;
while (i < hitPoints.length) {
if (activeground.hitTest(ship._x + hitPoints[i].x, ship._y + hitPoints[i].y, true)) {
ship.gotoAndPlay('explode');
lives -= 1;
if (0 >= lives) {
gotoAndStop(27);
break;
} else {
gotoAndStop(8);
break;
}
}
++i;
}
}
}
function showFuel() {
gauge.meter._xscale = fuel;
}
stop();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('intermission');
}
lives = 3;
}
button 345 {
on (release) {
loadMovie('', 'foreground2');
startGame();
}
}
frame 16 {
stop();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('lander');
}
}
movieClip 347 {
}
movieClip 349 {
}
movieClip 351 {
}
instance of movieClip 351 {
onClipEvent (load) {
_root.startLevel();
}
onClipEvent (enterFrame) {
_root.moveShip();
}
}
instance of movieClip 284 {
onClipEvent (load) {
_root.startLevel();
}
onClipEvent (enterFrame) {
if (/:pause == false) {
_root.moveShip();
}
}
}
frame 17 {
stop();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('shooter');
} else {
stopAllSounds();
}
}
button 352 {
on (press) {
damage = 0;
hits = 0;
nextFrame();
}
}
frame 18 {
function initGame4() {
bullets = new Array();
rock4s = new Array();
attachMovie('cross', 'cursor4', 10);
_root.foreground3.swapDepths(9999999);
_root.cursor4.swapDepths(9999998);
level = 0;
damage = 0;
hits = 0;
foreground.displayHits = hits;
foreground.displayDamage = damage;
Mouse.hide();
}
function moveCursor4() {
cursor4._x = _xmouse;
cursor4._y = _ymouse;
}
function check_win() {
if (hits >= 20) {
removeAllRocks();
removeAllbullets();
loadMovie('', 'cursor4');
Mouse.show();
_root.gotoAndPlay('asteroids_3_done');
}
}
function fire4() {
Mouse.hide();
x = _xmouse;
y = _ymouse;
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 50, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 500, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
}
function moveBullets4() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].dist *= 0.4;
if (bullets[i].dist < 0.01) {
checkForHit(bullets[i].destx, bullets[i].desty);
_root[bullets[i].clip].removeMovieClip();
bullets.splice(i, 1);
} else {
bullets[i].x = bullets[i].dist * bullets[i].startx + (1 - bullets[i].dist) * bullets[i].destx;
bullets[i].y = bullets[i].dist * bullets[i].starty + (1 - bullets[i].dist) * bullets[i].desty;
_root[bullets[i].clip]._x = bullets[i].x;
_root[bullets[i].clip]._y = bullets[i].y;
}
--i;
}
}
function createRock4() {
startx = Math.random() * 50 + 250;
starty = Math.random() * 50 + 175;
destx = Math.random() * 1100 - 275;
desty = Math.random() * 800;
++level;
rock4.duplicateMovieClip('rock4' + level, level++);
f = int(random(4));
if (f == 0) {
f = 1;
}
_root['rock4' + level].gotoAndStop(f);
rock4s.push({'startx': startx, 'starty': starty, 'destx': destx, 'desty': desty, 'dist': 0.01, 'clip': 'rock4' + level});
}
function moveRocks4() {
i = rock4s.length - 1;
while (i >= 0) {
rock4s[i].dist *= 1.1;
if (1 < rock4s[i].dist) {
if (0 < rock4s[i].destx and rock4s[i].destx < 550 and 0 < rock4s[i].desty and rock4s[i].desty < 400) {
_root[rock4s[i].clip].gotoAndPlay('explode blue');
++damage;
foreground3.displayDamage = damage;
if (damage >= 5) {
removeAllRocks();
removeAllbullets();
Mouse.show();
loadMovie('', 'foreground3');
loadMovie('', 'cursor4');
gotoAndStop(27);
}
} else {
_root[rock4s[i].clip].removeMovieClip();
}
rock4s.splice(i, 1);
} else {
rock4s[i].x = (1 - rock4s[i].dist) * rock4s[i].startx + rock4s[i].dist * rock4s[i].destx;
rock4s[i].y = (1 - rock4s[i].dist) * rock4s[i].starty + rock4s[i].dist * rock4s[i].desty;
_root[rock4s[i].clip]._x = rock4s[i].x;
_root[rock4s[i].clip]._y = rock4s[i].y;
_root[rock4s[i].clip]._xscale = 100 * rock4s[i].dist;
_root[rock4s[i].clip]._yscale = 100 * rock4s[i].dist;
}
--i;
}
}
function checkForHit(x, y) {
j = rock4s.length - 1;
while (j >= 0) {
if (_root[rock4s[j].clip].hitTest(x, y)) {
++hits;
foreground3.displayHits = hits;
_root[rock4s[j].clip].gotoAndPlay('explode red');
rock4s.splice(j, 1);
/:Score += /:point_value + 200;
}
--j;
}
}
function killRock(clip) {
clip.removeMovieClip();
}
function removeAllRocks() {
i = rock4s.length - 1;
while (i >= 0) {
_root[rock4s[i].clip].removeMovieClip();
--i;
}
}
function removeAllbullets() {
i = bullets.length - 1;
while (i >= 0) {
_root[bullets[i].clip].removeMovieClip();
--i;
}
}
stop();
}
button 354 {
on (keyPress '<Space>') {
fire4();
}
on (keyPress 'q') {
_root.cheat.gotoAndPlay(2);
damage = 0;
}
on (keyPress 'p') {
if (/:point_value == 100) {
_root.cheat.gotoAndPlay(2);
/:point_value = 200;
}
}
on (keyPress 'b') {
if (_root.bullet._xscale < 400) {
_root.cheat.gotoAndPlay(2);
_root.bullet._xscale *= 2;
_root.bullet._yscale *= 2;
}
}
}
movieClip 355 {
}
instance of movieClip 355 {
onClipEvent (load) {
_root.initGame4();
}
onClipEvent (enterFrame) {
if (/:pause == false) {
_root.moveCursor4();
_root.moveBullets4();
if (Math.random() < 0.1) {
_root.createRock4();
}
_root.moveRocks4();
_root.check_win();
}
}
}
movieClip 366 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 9 {
_root.killRock(this);
stop();
}
frame 15 {
_root.killRock(this);
stop();
}
}
frame 19 {
stop();
level = 0;
}
frame 20 {
function initGame5() {
bullets = new Array();
rock5s = new Array();
attachMovie('cross', 'cursor5', 10);
_root.foreground3.swapDepths(9999999);
_root.cursor5.swapDepths(9999998);
level = 0;
damage = 0;
hits = 0;
foreground.displayHits = hits;
foreground.displayDamage = damage;
Mouse.hide();
}
function moveCursor5() {
cursor5._x = _xmouse;
cursor5._y = _ymouse;
}
function check_win() {
if (hits >= 25) {
removeAllRocks();
removeAllbullets();
loadMovie('', 'cursor5');
Mouse.show();
nextFrame();
}
}
function fire5() {
Mouse.hide();
x = _xmouse;
y = _ymouse;
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 50, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 500, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
}
function moveBullets5() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].dist *= 0.4;
if (bullets[i].dist < 0.01) {
checkForHit(bullets[i].destx, bullets[i].desty);
_root[bullets[i].clip].removeMovieClip();
bullets.splice(i, 1);
} else {
bullets[i].x = bullets[i].dist * bullets[i].startx + (1 - bullets[i].dist) * bullets[i].destx;
bullets[i].y = bullets[i].dist * bullets[i].starty + (1 - bullets[i].dist) * bullets[i].desty;
_root[bullets[i].clip]._x = bullets[i].x;
_root[bullets[i].clip]._y = bullets[i].y;
}
--i;
}
}
function createRock5() {
startx = Math.random() * 50 + 250;
starty = Math.random() * 50 + 175;
destx = Math.random() * 1100 - 275;
desty = Math.random() * 800;
++level;
rock5.duplicateMovieClip('rock5' + level, level++);
f = int(random(4));
if (f == 0) {
f = 1;
}
_root['rock5' + level].gotoAndStop(f);
rock5s.push({'startx': startx, 'starty': starty, 'destx': destx, 'desty': desty, 'dist': 0.01, 'clip': 'rock5' + level});
}
function moveRocks5() {
i = rock5s.length - 1;
while (i >= 0) {
rock5s[i].dist *= 1.1;
if (1 < rock5s[i].dist) {
if (0 < rock5s[i].destx and rock5s[i].destx < 550 and 0 < rock5s[i].desty and rock5s[i].desty < 400) {
_root[rock5s[i].clip].gotoAndPlay('explode blue');
++damage;
foreground3.displayDamage = damage;
if (damage >= 5) {
removeAllRocks();
removeAllbullets();
Mouse.show();
loadMovie('', 'foreground3');
loadMovie('', 'cursor5');
gotoAndStop(27);
}
} else {
_root[rock5s[i].clip].removeMovieClip();
}
rock5s.splice(i, 1);
} else {
rock5s[i].x = (1 - rock5s[i].dist) * rock5s[i].startx + rock5s[i].dist * rock5s[i].destx;
rock5s[i].y = (1 - rock5s[i].dist) * rock5s[i].starty + rock5s[i].dist * rock5s[i].desty;
_root[rock5s[i].clip]._x = rock5s[i].x;
_root[rock5s[i].clip]._y = rock5s[i].y;
_root[rock5s[i].clip]._xscale = 100 * rock5s[i].dist;
_root[rock5s[i].clip]._yscale = 100 * rock5s[i].dist;
}
--i;
}
}
function checkForHit(x, y) {
j = rock5s.length - 1;
while (j >= 0) {
if (_root[rock5s[j].clip].hitTest(x, y)) {
++hits;
foreground3.displayHits = hits;
_root[rock5s[j].clip].gotoAndPlay('explode red');
rock5s.splice(j, 1);
/:Score += /:point_value + 300;
}
--j;
}
}
function killRock(clip) {
clip.removeMovieClip();
}
function removeAllRocks() {
i = rock5s.length - 1;
while (i >= 0) {
_root[rock5s[i].clip].removeMovieClip();
--i;
}
}
function removeAllbullets() {
i = bullets.length - 1;
while (i >= 0) {
_root[bullets[i].clip].removeMovieClip();
--i;
}
}
stop();
}
button 368 {
on (keyPress '<Space>') {
fire5();
}
on (keyPress 'q') {
_root.cheat.gotoAndPlay(2);
damage = 0;
}
on (keyPress 'p') {
if (/:point_value == 100) {
_root.cheat.gotoAndPlay(2);
/:point_value = 200;
}
}
on (keyPress 'b') {
if (_root.bullet._xscale < 400) {
_root.cheat.gotoAndPlay(2);
_root.bullet._xscale *= 2;
_root.bullet._yscale *= 2;
}
}
}
movieClip 369 {
}
instance of movieClip 369 {
onClipEvent (load) {
_root.initGame5();
}
onClipEvent (enterFrame) {
if (/:pause == false) {
_root.moveCursor5();
_root.moveBullets5();
if (Math.random() < 0.1) {
_root.createRock5();
}
_root.moveRocks5();
_root.check_win();
}
}
}
movieClip 379 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 9 {
_root.killRock(this);
stop();
}
frame 15 {
_root.killRock(this);
stop();
}
}
frame 21 {
function startGame() {
stopAllSounds();
gameLevel = 3;
startLevel();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('intermission');
} else {
stopAllSounds();
}
}
function startLevel() {
gotoAndStop('level' + gameLevel);
ship._x = 275;
ship._y = 65;
ship.dx = 0;
ship.dy = 0;
gravity = 0.15;
fuel = 100;
showFuel();
hitPoints = new Array();
hitPoints.push({'x': -9, 'y': 13});
hitPoints.push({'x': 9, 'y': 13});
hitPoints.push({'x': 0, 'y': -10});
hitPoints.push({'x': -8, 'y': -7});
hitPoints.push({'x': 8, 'y': -7});
footPoints = new Array();
footPoints.push({'x': -9, 'y': 13});
footPoints.push({'x': 9, 'y': 13});
pads = new Array();
i = 0;
while (i < 3) {
pads.push(_root['pad' + i]);
++i;
}
}
function moveShip() {
shipThrusters();
shipMovement();
checkForLand();
checkForCrash();
}
function shipThrusters() {
if (fuel < 0) {
ship.gotoAndStop('normal');
} else {
if (Key.isDown(Key.UP)) {
ship.dy -= 0.4;
ship.gotoAndStop('up');
fuel -= 2;
showFuel();
} else {
if (Key.isDown(Key.LEFT)) {
ship.dx -= 0.2;
ship.gotoAndStop('left');
fuel -= 1;
showFuel();
} else {
if (Key.isDown(Key.RIGHT)) {
ship.dx += 0.2;
ship.gotoAndStop('right');
fuel -= 1;
showFuel();
} else {
ship.gotoAndStop('normal');
}
}
}
}
if (Key.isDown(75)) {
_root.cheat.gotoAndPlay(2);
fuel = 100;
showFuel();
}
}
function shipMovement() {
ship.dy += gravity;
ship._x += ship.dx;
ship._y += ship.dy;
}
function checkForLand() {
landed = true;
i = 0;
while (i < footPoints.length) {
footDown = false;
j = 0;
while (j < pads.length) {
if (pads[j].hitTest(ship._x + footPoints[i].x, ship._y + footPoints[i].y, true)) {
footDown = true;
break;
}
++j;
}
if (!footDown) {
landed = false;
break;
}
++i;
}
if (3 < ship.dy) {
landed = false;
}
if (landed) {
tellTarget ('_root.print_mc') {
gotoAndPlay('win3');
}
gotoAndPlay(28);
++gameLevel;
/:Score += /:point_value + 900;
}
}
function checkForCrash() {
if (!landed) {
i = 0;
while (i < hitPoints.length) {
if (activeground.hitTest(ship._x + hitPoints[i].x, ship._y + hitPoints[i].y, true)) {
ship.gotoAndPlay('explode');
lives -= 1;
if (0 >= lives) {
gotoAndStop(27);
break;
} else {
gotoAndPlay(8);
break;
}
}
++i;
}
}
}
function showFuel() {
gauge.meter._xscale = fuel;
}
stop();
lives = 3;
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('intermission');
}
}
button 380 {
on (release) {
loadMovie('', 'foreground3');
startGame();
}
}
frame 22 {
stop();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('lander');
}
}
movieClip 381 {
}
movieClip 383 {
}
instance of movieClip 284 {
onClipEvent (load) {
_root.startLevel();
}
onClipEvent (enterFrame) {
if (/:pause == false) {
_root.moveShip();
}
}
}
frame 23 {
stop();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('shooter');
} else {
stopAllSounds();
}
}
frame 24 {
function initGame6() {
level = 0;
bullets = new Array();
rock6s = new Array();
attachMovie('cross', 'cursor6', 10);
_root.foreground4.swapDepths(9999999);
_root.cursor6.swapDepths(9999998);
damage = 0;
hits = 0;
foreground.displayHits = hits;
foreground.displayDamage = damage;
Mouse.hide();
}
function moveCursor6() {
cursor6._x = _xmouse;
cursor6._y = _ymouse;
}
function check_win() {
if (hits >= 30) {
removeAllRocks();
removeAllbullets();
loadMovie('', 'cursor6');
Mouse.show();
nextFrame();
}
}
function fire6() {
Mouse.hide();
x = _xmouse;
y = _ymouse;
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 50, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 500, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
}
function moveBullets6() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].dist *= 0.4;
if (bullets[i].dist < 0.01) {
checkForHit(bullets[i].destx, bullets[i].desty);
_root[bullets[i].clip].removeMovieClip();
bullets.splice(i, 1);
} else {
bullets[i].x = bullets[i].dist * bullets[i].startx + (1 - bullets[i].dist) * bullets[i].destx;
bullets[i].y = bullets[i].dist * bullets[i].starty + (1 - bullets[i].dist) * bullets[i].desty;
_root[bullets[i].clip]._x = bullets[i].x;
_root[bullets[i].clip]._y = bullets[i].y;
}
--i;
}
}
function createrock6() {
startx = Math.random() * 50 + 250;
starty = Math.random() * 50 + 175;
destx = Math.random() * 1100 - 275;
desty = Math.random() * 800;
++level;
rock6.duplicateMovieClip('rock6' + level, level++);
f = int(random(4));
if (f == 0) {
f = 1;
}
_root['rock6' + level].gotoAndStop(f);
rock6s.push({'startx': startx, 'starty': starty, 'destx': destx, 'desty': desty, 'dist': 0.01, 'clip': 'rock6' + level});
}
function moveRocks6() {
i = rock6s.length - 1;
while (i >= 0) {
rock6s[i].dist *= 1.1;
if (1 < rock6s[i].dist) {
if (0 < rock6s[i].destx and rock6s[i].destx < 550 and 0 < rock6s[i].desty and rock6s[i].desty < 400) {
_root[rock6s[i].clip].gotoAndPlay('explode blue');
++damage;
foreground4.displayDamage = damage;
if (damage >= 5) {
removeAllRocks();
removeAllbullets();
Mouse.show();
loadMovie('', 'foreground4');
loadMovie('', 'cursor6');
gotoAndStop(27);
}
} else {
_root[rock6s[i].clip].removeMovieClip();
}
rock6s.splice(i, 1);
} else {
rock6s[i].x = (1 - rock6s[i].dist) * rock6s[i].startx + rock6s[i].dist * rock6s[i].destx;
rock6s[i].y = (1 - rock6s[i].dist) * rock6s[i].starty + rock6s[i].dist * rock6s[i].desty;
_root[rock6s[i].clip]._x = rock6s[i].x;
_root[rock6s[i].clip]._y = rock6s[i].y;
_root[rock6s[i].clip]._xscale = 100 * rock6s[i].dist;
_root[rock6s[i].clip]._yscale = 100 * rock6s[i].dist;
}
--i;
}
}
function checkForHit(x, y) {
j = rock6s.length - 1;
while (j >= 0) {
if (_root[rock6s[j].clip].hitTest(x, y)) {
++hits;
foreground4.displayHits = hits;
_root[rock6s[j].clip].gotoAndPlay('explode red');
rock6s.splice(j, 1);
/:Score += /:point_value + 400;
}
--j;
}
}
function killRock(clip) {
clip.removeMovieClip();
}
function removeAllRocks() {
i = rock6s.length - 1;
while (i >= 0) {
_root[rock6s[i].clip].removeMovieClip();
--i;
}
}
function removeAllbullets() {
i = bullets.length - 1;
while (i >= 0) {
_root[bullets[i].clip].removeMovieClip();
--i;
}
}
stop();
}
button 387 {
on (keyPress '<Space>') {
_root.fire6();
}
on (keyPress 'q') {
_root.cheat.gotoAndPlay(2);
damage = 0;
}
on (keyPress 'p') {
if (/:point_value == 100) {
_root.cheat.gotoAndPlay(2);
/:point_value = 200;
}
}
on (keyPress 'b') {
if (_root.bullet._xscale < 400) {
_root.cheat.gotoAndPlay(2);
_root.bullet._xscale *= 2;
_root.bullet._yscale *= 2;
}
}
}
movieClip 388 {
}
instance of movieClip 388 {
onClipEvent (load) {
_root.initGame6();
}
onClipEvent (enterFrame) {
if (/:pause == false) {
_root.moveCursor6();
_root.moveBullets6();
if (Math.random() < 0.1) {
_root.createRock6();
}
_root.moveRocks6();
_root.check_win();
}
}
}
movieClip 399 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 9 {
_root.killRock(this);
stop();
}
frame 15 {
_root.killRock(this);
stop();
}
}
frame 25 {
stop();
level = 0;
}
frame 26 {
function initGame7() {
level = 0;
bullets = new Array();
rock7s = new Array();
attachMovie('cross', 'cursor7', 10);
_root.foreground4.swapDepths(9999999);
_root.cursor7.swapDepths(9999998);
damage = 0;
hits = 0;
foreground.displayHits = hits;
foreground.displayDamage = damage;
Mouse.hide();
}
function moveCursor7() {
cursor7._x = _xmouse;
cursor7._y = _ymouse;
}
function fire7() {
Mouse.hide();
x = _xmouse;
y = _ymouse;
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 50, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
++level;
bullet.duplicateMovieClip('bullet' + level, level);
bullets.push({'startx': 500, 'starty': 350, 'destx': x, 'desty': y, 'dist': 1, 'clip': 'bullet' + level});
}
function moveBullets7() {
i = bullets.length - 1;
while (i >= 0) {
bullets[i].dist *= 0.4;
if (bullets[i].dist < 0.01) {
checkForHit(bullets[i].destx, bullets[i].desty);
_root[bullets[i].clip].removeMovieClip();
bullets.splice(i, 1);
} else {
bullets[i].x = bullets[i].dist * bullets[i].startx + (1 - bullets[i].dist) * bullets[i].destx;
bullets[i].y = bullets[i].dist * bullets[i].starty + (1 - bullets[i].dist) * bullets[i].desty;
_root[bullets[i].clip]._x = bullets[i].x;
_root[bullets[i].clip]._y = bullets[i].y;
}
--i;
}
}
function createrock7() {
startx = Math.random() * 50 + 250;
starty = Math.random() * 50 + 175;
destx = Math.random() * 1100 - 275;
desty = Math.random() * 800;
++level;
rock7.duplicateMovieClip('rock7' + level, level++);
f = int(random(33));
if (f == 0) {
f = 1;
}
_root['rock7' + level].gotoAndStop(f);
rock7s.push({'startx': startx, 'starty': starty, 'destx': destx, 'desty': desty, 'dist': 0.01, 'clip': 'rock7' + level});
}
function moveRocks7() {
i = rock7s.length - 1;
while (i >= 0) {
rock7s[i].dist *= 1.1;
if (1 < rock7s[i].dist) {
if (0 < rock7s[i].destx and rock7s[i].destx < 550 and 0 < rock7s[i].desty and rock7s[i].desty < 400) {
_root[rock7s[i].clip].gotoAndPlay('explode blue');
++damage;
foreground4.displayDamage = damage;
if (damage >= 5) {
removeAllRocks();
removeAllbullets();
Mouse.show();
loadMovie('', 'foreground4');
loadMovie('', 'cursor7');
gotoAndStop(27);
}
} else {
_root[rock7s[i].clip].removeMovieClip();
}
rock7s.splice(i, 1);
} else {
rock7s[i].x = (1 - rock7s[i].dist) * rock7s[i].startx + rock7s[i].dist * rock7s[i].destx;
rock7s[i].y = (1 - rock7s[i].dist) * rock7s[i].starty + rock7s[i].dist * rock7s[i].desty;
_root[rock7s[i].clip]._x = rock7s[i].x;
_root[rock7s[i].clip]._y = rock7s[i].y;
_root[rock7s[i].clip]._xscale = 100 * rock7s[i].dist;
_root[rock7s[i].clip]._yscale = 100 * rock7s[i].dist;
}
--i;
}
}
function checkForHit(x, y) {
j = rock7s.length - 1;
while (j >= 0) {
if (_root[rock7s[j].clip].hitTest(x, y)) {
++hits;
foreground4.displayHits = hits;
_root[rock7s[j].clip].gotoAndPlay('explode red');
rock7s.splice(j, 1);
/:Score += /:point_value + 900;
}
--j;
}
}
function killRock(clip) {
clip.removeMovieClip();
}
function removeAllRocks() {
i = rock7s.length - 1;
while (i >= 0) {
_root[rock7s[i].clip].removeMovieClip();
--i;
}
}
function removeAllbullets() {
i = bullets.length - 1;
while (i >= 0) {
_root[bullets[i].clip].removeMovieClip();
--i;
}
}
stop();
}
movieClip 426 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
frame 10 {
stop();
}
frame 11 {
stop();
}
frame 12 {
stop();
}
frame 13 {
stop();
}
frame 14 {
stop();
}
frame 15 {
stop();
}
frame 16 {
stop();
}
frame 17 {
stop();
}
frame 18 {
stop();
}
frame 19 {
stop();
}
frame 20 {
stop();
}
frame 21 {
stop();
}
frame 22 {
stop();
}
frame 23 {
stop();
}
frame 24 {
stop();
}
frame 25 {
stop();
}
frame 26 {
stop();
}
frame 27 {
stop();
}
frame 28 {
stop();
}
frame 29 {
stop();
}
frame 30 {
stop();
}
frame 31 {
stop();
}
frame 32 {
stop();
}
frame 38 {
_root.killRock(this);
stop();
}
frame 44 {
_root.killRock(this);
stop();
}
}
button 427 {
on (keyPress '<Space>') {
fire7();
}
on (keyPress 'q') {
_root.cheat.gotoAndPlay(2);
damage = 0;
}
on (keyPress 'p') {
if (/:point_value == 100) {
_root.cheat.gotoAndPlay(2);
/:point_value = 200;
}
}
on (keyPress 'b') {
if (_root.bullet._xscale < 400) {
_root.cheat.gotoAndPlay(2);
_root.bullet._xscale *= 2;
_root.bullet._yscale *= 2;
}
}
}
movieClip 428 {
}
instance of movieClip 428 {
onClipEvent (load) {
_root.initGame7();
}
onClipEvent (enterFrame) {
if (/:pause == false) {
_root.moveCursor7();
_root.moveBullets7();
if (Math.random() < 0.1) {
_root.createRock7();
}
_root.moveRocks7();
}
}
}
frame 27 {
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('intermission');
}
stop();
}
button 432 {
on (release) {
loadMovieNum('specandtra.swf', 0);
}
}
button 436 {
on (release) {
tellTarget ('_root.print_mc') {
gotoAndPlay('high_score');
}
_root.gotoAndPlay('print');
}
}
frame 28 {
stop();
}