Instance of Symbol 19 MovieClip "shell" in Frame 1 (1.21 KiB) ●
onClipEvent (enterFrame) {
if (1 < _currentframe) {
_x = (_x + deltax);
_y = (_y + deltay);
if ((((640 < _x) or (_x < -20)) or (480 < _y)) or (_y < -20)) {
this.gotoAndStop(1);
}
xdistance = _x - centerx;
ydistance = centery - _y;
distance = (xdistance * xdistance) + (ydistance * ydistance);
if (distance < 14400) {
whichring = 1;
while (whichring < 4) {
i = 1;
while (i < 13) {
section = eval ((("_root.ring" add whichring) add ".section") add i);
if ((((section.action eq "normal") or (section.action eq "normalgrowing")) or (section.action eq "boldgrowing")) or (section.action eq "bold")) {
if (hitTest(section)) {
framebuffer = 0;
this.gotoAndPlay(1);
break;
}
}
i++;
}
whichring++;
}
} else if (_currentframe == 2) {
this.gotoAndPlay(3);
shellsound.start();
}
if (_root.ship._currentframe == 1) {
if (this.hitTest(_root.ship) or this.hitTest(_root.doppelganger)) {
_root.killtheship();
}
}
currentframe = _currentframe;
}
}
onClipEvent (load) {
centerx = _root.centerx;
centery = _root.centery;
centerradius = 120;
shellsound = new Sound();
shellsound.attachSound("shell");
}
Instance of Symbol 46 MovieClip "ring3" in Frame 1 (3.73 KiB) ●
onClipEvent (enterFrame) {
function aretheremines() {
testinghits = 1;
while (testinghits < 13) {
section = eval ("section" add testinghits);
if ((section.mined == true) and ((section.action eq "normal") or (section.action eq "bold"))) {
section.mined = false;
section.mine._visible = false;
angle = this._rotation + ((testinghits - 1) * 30);
angleinrads = ((-angle) * Math.PI) / 180;
adjustedx = 140 * Math.cos(angleinrads);
adjustedy = 140 * Math.sin(angleinrads);
findamine(adjustedx, adjustedy);
return;
}
testinghits++;
}
}
function findamine(bulletx, bullety) {
testminecounter = 1;
while (3 >= testminecounter) {
testmine = eval ("_root.mine" add testminecounter);
if (testmine._currentframe == 1) {
break;
}
testminecounter++;
}
testmine._x = _root.centerx + bulletx;
testmine._y = _root.centery + bullety;
theangle = Math.atan2(bullety, bulletx);
testmine.gotoAndPlay(2);
testmine.myangle = theangle;
testmine.deltax = 10 * Math.cos(testmine.myangle);
testmine.deltay = 10 * Math.sin(testmine.myangle);
}
function countmyhits() {
howmanyhit = 0;
testinghits = 1;
while (testinghits < 13) {
section = eval ("section" add testinghits);
framenow = section._currentframe;
if (((framenow >= 185) and (framenow < 248)) or ((framenow >= 93) and (104 >= framenow))) {
howmanyhit++;
}
testinghits++;
}
if ((howmanyhit >= 12) and (_root.collapsing != true)) {
this.refresh();
}
}
function refresh() {
_root.riser.start();
j = 1;
while (j < 13) {
section = eval ("section" add j);
oldsection = eval ("_root.ring2.section" add j);
if (oldsection.mined) {
section.mined = true;
oldsection.mined = false;
}
if ((oldsection.action eq "bold") or (oldsection.action eq "normal")) {
section.action = eval ("_root.ring2.section" add j).action add "growing";
section.color = "amber";
} else if ((oldsection.action eq "boldgrowing") or (oldsection.action eq "normalgrowing")) {
section.action = oldsection.action;
section.color = "amber";
} else {
section.action = "broken";
section.color = "amber";
}
nextframe = section.color add section.action;
section.gotoAndPlay(nextframe);
if (section.mined) {
section.mine._visible = true;
} else {
section.mine._visible = false;
}
j++;
}
_root.ring3.rotationdelta = _root.ring2.rotationdelta;
_root.ring3._rotation = _root.ring2._rotation;
_root.ring3.howmanyhit = 0;
_root.ring2.refresh();
}
if (howmanyhit >= 12) {
this.refresh();
}
_rotation = (_rotation + rotationdelta);
if (rotationdelta < 0) {
if (rotationdelta < (-mymaximum)) {
rotationdelta = rotationdelta + 0.1;
} else if ((-mymaximum) < rotationdelta) {
rotationdelta = rotationdelta - 0.1;
}
} else if (mymaximum < rotationdelta) {
rotationdelta = rotationdelta - 0.1;
} else if (rotationdelta < mymaximum) {
rotationdelta = rotationdelta + 0.1;
}
countmyhits();
if ((timervar < (Math.random() * 1000)) && (_root.ship._currentframe == 1)) {
aretheremines();
}
}
onClipEvent (load) {
timervar = 990;
howmanyhit = 0;
i = 1;
while (i < 12) {
duplicateMovieClip ("section1", "section" add (i + 1), i);
eval ("section" add (i + 1))._rotation = eval ("section" add (i + 1))._rotation + (i * 30);
i++;
}
whichsection = 1;
while (whichsection < 13) {
section = eval ("_root.ring3.section" add whichsection);
section.color = "red";
section.action = "normal";
section.mine._visible = false;
section.mined = false;
properframe = section.color add section.action;
section.gotoAndStop(properframe);
section.gotoAndStop(75);
whichsection++;
}
_root.ring3.rotationdelta = 6;
mymaximum = 6;
}
Instance of Symbol 47 MovieClip "ring2" in Frame 1 (3.22 KiB) ●
onClipEvent (enterFrame) {
function aretheremines() {
testinghits = 1;
while (testinghits < 13) {
section = eval ("section" add testinghits);
if ((section.mined == true) and ((section.action eq "normal") or (section.action eq "bold"))) {
section.mined = false;
section.mine._visible = false;
angle = this._rotation + ((testinghits - 1) * 30);
whichsection = 1;
while (whichsection < 13) {
section = eval ("_root.ring3.section" add whichsection);
if ((section.mined != true) and ((section.action eq "normal") or (section.action eq "bold"))) {
section.mined = true;
section.mine._visible = true;
break;
}
whichsection++;
}
return;
}
testinghits++;
}
}
function countmyhits() {
howmanyhit = 0;
testinghits = 1;
while (testinghits < 13) {
section = eval ("section" add testinghits);
framenow = section._currentframe;
if (((framenow >= 185) and (framenow < 248)) or ((framenow >= 93) and (104 >= framenow))) {
howmanyhit++;
}
testinghits++;
}
if ((howmanyhit >= 12) and (_root.collapsing != true)) {
this.refresh();
}
}
function refresh() {
_root.riser.start();
j = 1;
while (j < 13) {
section = eval ("_root.ring2.section" add j);
oldsection = eval ("_root.ring1.section" add j);
if (oldsection.mined) {
section.mined = true;
oldsection.mined = false;
}
if ((oldsection.action eq "bold") or (oldsection.action eq "normal")) {
section.action = eval ("_root.ring1.section" add j).action add "growing";
section.color = "yellow";
} else if ((oldsection.action eq "boldgrowing") or (oldsection.action eq "normalgrowing")) {
section.action = oldsection.action;
section.color = "yellow";
} else {
section.action = "broken";
section.color = "amber";
}
nextframe = section.color add section.action;
section.gotoAndPlay(nextframe);
if (section.mined) {
section.mine._visible = true;
} else {
section.mine._visible = false;
}
j++;
}
rotationdelta = _root.ring1.rotationdelta;
_rotation = _root.ring1._rotation;
howmanyhit = 0;
_root.ring1.refresh();
}
_rotation = (_rotation + rotationdelta);
if (rotationdelta < 0) {
if (rotationdelta < (-mymaximum)) {
rotationdelta = rotationdelta + 0.1;
} else if ((-mymaximum) < rotationdelta) {
rotationdelta = rotationdelta - 0.1;
}
} else if (mymaximum < rotationdelta) {
rotationdelta = rotationdelta - 0.1;
} else if (rotationdelta < mymaximum) {
rotationdelta = rotationdelta + 0.1;
}
countmyhits();
if ((timervar < (Math.random() * 1000)) && (_root.ship._currentframe == 1)) {
aretheremines();
}
}
onClipEvent (load) {
timervar = 990;
i = 1;
while (i < 12) {
duplicateMovieClip ("section1", "section" add (i + 1), i);
eval ("section" add (i + 1))._rotation = eval ("section" add (i + 1))._rotation + (i * 30);
i++;
}
whichsection = 1;
while (whichsection < 13) {
section = eval ("this.section" add whichsection);
section.color = "amber";
section.action = "normal";
section.mine._visible = false;
properframe = section.color add section.action;
section.gotoAndStop(properframe);
whichsection++;
}
rotationdelta = -7;
mymaximum = 7;
}
Instance of Symbol 48 MovieClip "ring1" in Frame 1 (2.48 KiB) ●
onClipEvent (enterFrame) {
function aretheremines() {
testinghits = 1;
while (testinghits < 13) {
section = eval ("section" add testinghits);
if ((section.mined == true) and ((section.action eq "normal") or (section.action eq "bold"))) {
section.mined = false;
section.mine._visible = false;
angle = this._rotation + ((testinghits - 1) * 30);
whichsection = 1;
while (whichsection < 13) {
section = eval ("_root.ring2.section" add whichsection);
if ((section.mined != true) and ((section.action eq "normal") or (section.action eq "bold"))) {
section.mined = true;
section.mine._visible = true;
break;
}
whichsection++;
}
return;
}
testinghits++;
}
}
function countmyhits() {
howmanyhit = 0;
testinghits = 1;
while (testinghits < 13) {
section = eval ("section" add testinghits);
framenow = section._currentframe;
if (((framenow >= 185) and (framenow < 248)) or ((framenow >= 93) and (104 >= framenow))) {
howmanyhit++;
}
testinghits++;
}
if ((howmanyhit >= 12) and (_root.collapsing != true)) {
this.refresh();
}
}
function refresh() {
_root.riser.start();
_root.ring1.section1.mined = true;
j = 1;
while (j < 13) {
section = eval ("_root.ring1.section" add j);
section.action = "normal";
section.color = "yellow";
section.gotoAndPlay("yellowgrowing");
if (section.mined) {
section.mine._visible = true;
} else {
section.mine._visible = false;
}
j++;
}
_root.ring1.howmanyhit = 0;
_root.ring1.rotationdelta = _root.ring1.rotationdelta * -1;
}
_rotation = (_rotation + rotationdelta);
countmyhits();
if ((timervar < (Math.random() * 1000)) && (_root.ship._currentframe == 1)) {
aretheremines();
}
}
onClipEvent (load) {
timervar = 990;
i = 1;
while (i < 12) {
duplicateMovieClip ("section1", "section" add (i + 1), i);
eval ("section" add (i + 1))._rotation = eval ("section" add (i + 1))._rotation + (i * 30);
i++;
}
radius = (_width + _height) * 0.25;
centerx = _root.centerx;
centery = _root.centery;
whichsection = 1;
while (whichsection < 13) {
section = eval ("this.section" add whichsection);
section.color = "yellow";
section.action = "normal";
section.mine._visible = false;
properframe = section.color add section.action;
section.gotoAndStop(properframe);
_root.ring1.section1.mined = true;
_root.ring1.section1.mine._visible = true;
whichsection++;
}
rotationdelta = 8;
}
Instance of Symbol 65 MovieClip "ship" in Frame 1 (2.51 KiB) ●
onClipEvent (enterFrame) {
function bounce() {
bouncesound.start();
normal = Math.atan2(ydistance, xdistance);
ballangle = Math.atan2(-mydeltay, mydeltax);
normaltodegrees = (normal * 180) / Math.PI;
ballangletodegrees = 180 + ((ballangle * 180) / Math.PI);
angledifference = normaltodegrees - ballangletodegrees;
_rotation = (-(normaltodegrees + angledifference));
totalspeed = Math.sqrt((mydeltax * mydeltax) + (mydeltay * mydeltay));
mydeltax = totalspeed * Math.cos((_rotation * Math.PI) / 180);
mydeltay = totalspeed * Math.sin((_rotation * Math.PI) / 180);
_x = (_root.centerx + ((centerradius * 1.4) * Math.cos(normal)));
_y = (_root.centery - ((centerradius * 1.4) * Math.sin(normal)));
}
function checkkeys() {
if (Key.isDown(Key.LEFT) && (_currentframe == 1)) {
_rotation = (_rotation - 18);
}
if (Key.isDown(Key.RIGHT) && (_currentframe == 1)) {
_rotation = (_rotation + 18);
}
if (Key.isDown(Key.SPACE)) {
if (((_currentframe == 1) && (readytoshoot)) && (_root.cannon._currentframe < 10)) {
fire.start();
i = 1;
while (i < 20) {
if (_root["bullet" add i]._currentframe == 1) {
freebullet = "bullet" add i;
break;
}
i++;
}
_root[freebullet].play();
readytoshoot = false;
}
} else {
readytoshoot = true;
}
if ((Key.isDown(Key.UP) && (_root.cannon._currentframe < 10)) && (_currentframe == 1)) {
myangle = (Math.PI/180) * _rotation;
mydeltax = mydeltax + (myspeed * Math.cos(myangle));
mydeltay = mydeltay + (myspeed * Math.sin(myangle));
}
}
mydeltay = mydeltay * 0.94;
mydeltax = mydeltax * 0.94;
_y = (_y + mydeltay);
_x = (_x + mydeltax);
if (_x < -30) {
_x = (_x + 640);
} else if (670 < _x) {
_x = (_x - 640);
}
if (_y < -30) {
_y = (_y + 480);
} else if (510 < _y) {
_y = (_y - 480);
}
if (_currentframe == 1) {
checkkeys();
}
xdistance = _x - _root.centerx;
ydistance = _root.centery - _y;
distance = (xdistance * xdistance) + (ydistance * ydistance);
if ((Math.sqrt(distance) < centerradius) && ((centerradius * 0.5) < Math.sqrt(distance))) {
bouncesound.start();
bounce();
}
}
onClipEvent (load) {
radius = (_width + _height) * 0.25;
centerx = _root.centerx;
centery = _root.centery;
centerradius = 120;
fire = new Sound(_root.ship);
fire.attachSound("littlezap");
boom = new Sound(_root.ship);
boom.attachsound("shipboom");
bouncesound = new Sound(_root.ship);
bouncesound.attachSound("bounce");
}
Instance of Symbol 66 MovieClip "doppelganger" in Frame 1 (956 B)
onClipEvent (enterFrame) {
function showdoppelganger() {
this.gotoAndStop(_root.ship._currentframe);
_rotation = _root.ship._rotation;
}
if (610 < _root.ship._x) {
showdoppelganger();
doppelgangerneeded = true;
_x = (_root.ship._x - 640);
_y = _root.ship._y;
} else if (_root.ship._x < 30) {
showdoppelganger();
doppelgangerneeded = true;
_x = (_root.ship._x + 640);
_y = _root.ship._y;
} else {
doppelgangerneeded = false;
}
if (450 < _root.ship._y) {
showdoppelganger();
doppelgangerneeded = true;
_x = _root.ship._x;
_y = (_root.ship._y - 480);
} else if (_root.ship._y < 30) {
showdoppelganger();
doppelgangerneeded = true;
_x = _root.ship._x;
_y = (_root.ship._y + 480);
}
if (!doppelgangerneeded) {
this.gotoAndStop(200);
}
}
onClipEvent (load) {
radius = (_width + _height) * 0.25;
centerx = _root.centerx;
centery = _root.centery;
centerradius = 120;
gotoAndStop (200);
}
Instance of Symbol 88 MovieClip "cannon" in Frame 1 (882 B)
onClipEvent (enterFrame) {
shipx = _root.ship._x - _root.centerx;
shipy = _root.centery - _root.ship._y;
angle = Math.atan2(shipy, shipx);
angleindegrees = (angle * 180) / Math.PI;
anglegap = angleindegrees - (-_rotation);
_rotation = (_rotation - (anglegap / 26));
if ((((Math.abs(anglegap) < 20) && (_root.shell._currentframe < 2)) && (_currentframe == 2)) && (_root.ship._currentframe == 1)) {
if (0 < _root.ring1.howmanyhit) {
_root.shell._x = _root.centerx;
_root.shell._y = _root.centery;
_root.shell.gotoAndStop(2);
_root.shell.deltax = 16 * Math.cos(-angle);
_root.shell.deltay = 16 * Math.sin(-angle);
}
}
}
onClipEvent (load) {
_rotation = -180;
centerradius = 100;
collapsestart = new Sound();
collapsestart.attachSound("collapsestart");
cannonboom = new Sound();
cannonboom.attachSound("cannonboom");
}
Instance of Symbol 91 MovieClip "bullet" in Frame 1 (4.69 KiB) ●
onClipEvent (enterFrame) {
function collapserings() {
whichring = 1;
while (whichring < 4) {
whichsection = 1;
while (whichsection < 13) {
section = eval ((("_root.ring" add whichring) add ".section") add whichsection);
if ((section.action ne "broken") and (section.action ne "breaking")) {
section.gotoAndPlay(section.color add "collapsing");
} else {
section.action = "normal";
}
whichsection++;
}
whichring++;
}
}
function findamine(whichring, whichsection) {
testminecounter = 1;
while (3 >= testminecounter) {
testmine = eval ("_root.mine" add testminecounter);
if (testmine._currentframe == 1) {
break;
}
testminecounter++;
}
bulletx = _x - centerx;
bullety = centery - _y;
theangle = Math.atan2(bullety, bulletx);
theangle = (theangle * 180) / Math.PI;
ringmomentum = eval ("_root.ring" add whichring).rotationdelta;
theangle = theangle - (ringmomentum * 3);
if (theangle < 0) {
theangle = theangle + 360;
}
if (360 < theangle) {
theangle = theangle - 360;
}
theangle = (theangle * Math.PI) / 180;
testmine._x = centerx + (130 * Math.cos(theangle));
testmine._y = centery - (130 * Math.sin(theangle));
testmine.gotoAndPlay(2);
ringmomentuminrads = (ringmomentum * Math.PI) / 180;
ringmomentuminrads = ringmomentuminrads * 2;
_root.mine1.myangle = theangle;
testmine.deltax = 1 * Math.cos(testmine.myangle);
testmine.deltay = 1 * Math.sin(testmine.myangle);
}
if (_currentframe == 2) {
angleinrads = (_root.ship._rotation * Math.PI) / 180;
deltax = (15 * Math.cos(angleinrads)) + _root.ship.mydeltax;
deltay = (15 * Math.sin(angleinrads)) + _root.ship.mydeltay;
radius = _root.ship._width * 0.6;
_x = (_root.ship._x + (radius * Math.cos(angleinrads)));
_y = (_root.ship._y + (radius * Math.sin(angleinrads)));
} else if (1 < _currentframe) {
_x = (_x + deltax);
_y = (_y + deltay);
if (670 < _x) {
_x = (_x - 640);
} else if (_x < -30) {
_x = (_x + 640);
}
if (510 < _y) {
_y = (_y - 480);
} else if (_y < -30) {
_y = (_y + 480);
}
xdistance = _x - _root.centerx;
ydistance = _root.centery - _y;
distance = (xdistance * xdistance) + (ydistance * ydistance);
if (distance < 576) {
if (_root.cannon._currentframe < 11) {
_root.collapsing = true;
i = 1;
while (i < 7) {
_root["bullet" add i].gotoAndStop(1);
i++;
}
_root.cannon.gotoAndPlay("explosion");
_root.mine1.gotoAndStop(1);
_root.mine2.gotoAndStop(1);
_root.mine3.gotoAndStop(1);
_root.mine1._x = -100;
_root.mine2._x = -100;
_root.mine3._x = -100;
_root.cannon.collapsestart.start();
collapserings();
}
} else if (distance < 14400) {
whichring = 1;
while (whichring < 4) {
i = 1;
while (i < 13) {
section = eval ((("_root.ring" add whichring) add ".section") add i);
if ((((section.action eq "normal") or (section.action eq "normalgrowing")) or (section.action eq "boldgrowing")) or (section.action eq "bold")) {
if (hitTest(section)) {
framebuffer = 0;
if (section.action eq "normal") {
section.action = "bold";
_root.score = _root.score + 20;
_root.sectionhit.start();
} else if (section.action eq "bold") {
section.action = "breaking";
_root.score = _root.score + 50;
_root.sectionbreak.start();
if (section.mined) {
section.mined = false;
section.mine._visible = false;
findamine(whichring, i);
}
} else if (eval ((("_root.ring" add whichring) add ".section") add i).action eq "normalgrowing") {
section.action = "boldgrowing";
_root.score = _root.score + 20;
_root.sectionhit.start();
framebuffer = section._currentframe - growingframes[section.color];
} else if (section.action eq "boldgrowing") {
_root.score = _root.score + 50;
_root.sectionbreak.start();
if (section.color eq "yellow") {
section.color = "amber";
} else if (section.color eq "amber") {
section.color = "red";
}
section.action = "broken";
if (section.mined) {
section.mined = false;
section.mine._visible = false;
findamine();
}
}
section.gotoAndPlay(section.color add section.action);
section.gotoAndPlay(section._currentframe + framebuffer);
this.gotoAndPlay(1);
_root.showscore();
break;
}
}
i++;
}
whichring++;
}
}
}
}
onClipEvent (load) {
growingframes = new Array();
growingframes.yellow = 30;
growingframes.amber = 58;
centerx = _root.centerx;
centery = _root.centery;
centerradius = 120;
}
Instance of Symbol 92 MovieClip "mine1" in Frame 1 (2.16 KiB) ●
onClipEvent (enterFrame) {
function plantamine(whichring) {
whichsection = 1;
while (whichsection < 13) {
section = eval ((("_root.ring" add whichring) add ".section") add whichsection);
if ((section.mined != true) and ((section.action eq "normal") or (section.action eq "bold"))) {
section.mined = true;
section.mine._visible = true;
return;
}
whichsection++;
}
}
if (1 < _currentframe) {
if (1 < _root.ship._currentframe) {
gotoAndStop (1);
}
_x = (_x + deltax);
_y = (_y + deltay);
if (_x < -10) {
_x = (_x + 640);
}
if (650 < _x) {
_x = (_x - 640);
}
if (_y < -10) {
_y = (_y + 480);
}
if (490 < _y) {
_y = (_y - 480);
}
distancefromshipx = _root.ship._x - _x;
distancefromshipy = _root.ship._y - _y;
deltax = deltax + ((distancefromshipx * (Math.random() * 9)) / 1000);
deltay = deltay + ((distancefromshipy * (Math.random() * 9)) / 1000);
deltax = deltax * 0.9;
deltay = deltay * 0.9;
if (_currentframe < 6) {
i = 1;
while (i < 7) {
testedbullet = eval ("_root.bullet" add i);
if (1 < testedbullet._currentframe) {
distancefrombulletx = _x - testedbullet._x;
distancefrombullety = _y - testedbullet._y;
distancefrombulletsquared = (distancefrombulletx * distancefrombulletx) + (distancefrombullety * distancefrombullety);
if (distancefrombulletsquared < 144) {
this.gotoAndPlay("exploding");
mydeath.start();
_root.ring1.timervar--;
_root.ring2.timervar--;
_root.ring3.timervar--;
testedbullet.gotoAndStop(1);
plantamine(1);
plantamine(1);
}
}
i++;
}
}
if (_currentframe < 6) {
distancefromshipx = _x - _root.ship._x;
distancefromshipy = _y - _root.ship._y;
distancefromshipsquared = (distancefromshipx * distancefromshipx) + (distancefromshipy * distancefromshipy);
if ((distancefromshipsquared < 400) and (_root.ship._currentframe == 1)) {
this.gotoAndPlay("exploding");
plantamine(1);
_root.killtheship();
}
}
}
}
onClipEvent (load) {
myvelocity = 0.5;
deltax = 0;
deltay = 0;
mydeath = new Sound();
mydeath.attachSound("minedeath");
}
Frame 3 (3.03 KiB) ●
function startnewgame() {
_root.ring1.timervar = 990;
_root.ring2.timervar = 990;
_root.ring3.timervar = 990;
lives = 3;
score = 0;
showlives();
showscore();
hum1.start(0, 1000);
hum2.start(0.25, 1000);
sectioncolors = ["yellow", "amber", "red"];
whichring = 1;
while (whichring < 4) {
whichsection = 1;
while (whichsection < 13) {
currentsection = eval ((("_root.ring" add whichring) add ".section") add whichsection);
currentsection.color = sectioncolors[whichring - 1];
currentsection.action = "normal";
currentsection.mined = false;
properframe = currentsection.color add currentsection.action;
currentsection.gotoAndStop(properframe);
currentsection.mine._visible = false;
whichsection++;
}
whichring++;
}
_root.ring1.section1.mined = true;
_root.ring1.section1.mine._visible = true;
}
function killtheship() {
_root.mine1.gotoAndStop(1);
_root.mine2.gotoAndStop(1);
_root.mine3.gotoAndStop(1);
_root.mine1._x = -100;
_root.mine2._x = -100;
_root.mine3._x = -100;
if (_root.ring1.section1.mined == false) {
_root.ring1.section1.mined = true;
_root.ring1.section1.mine._visible = true;
}
_root.ship.gotoAndPlay(3);
_root.ship.boom.start();
_root.ship.mydeltax = 0;
_root.ship.mydeltay = 0;
lives = lives - 1;
if (0 >= lives) {
_root.ship.gameover = true;
_root.gameover.gotoAndPlay(2);
}
d.start();
showlives();
}
function showlives() {
i = 1;
while (i < 7) {
if (i < lives) {
_root["scoreship" add i].gotoAndStop(2);
} else {
_root["scoreship" add i].gotoAndStop(1);
}
i++;
}
}
function showscore() {
i = 1;
while (i < 9) {
myscore = score % Math.pow(10, i);
myscore = int(myscore / Math.pow(10, i - 1));
eval ("_root.digit" add i).gotoAndStop(myscore + 1);
i++;
}
}
i = 1;
while (i < 7) {
duplicateMovieClip (_root.bullet, "bullet" add i, ++availablelevel);
_root["bullet" add i].gotoAndStop(1);
i++;
}
centerx = _root.cannon._x;
centery = _root.cannon._y;
i = 2;
while (i < 9) {
duplicateMovieClip (_root.digit1, "digit" add i, ++availablelevel);
_root["digit" add i].gotoAndStop(1);
_root["digit" add i]._x = _root["digit" add i]._x - ((i - 1) * (_root.digit1._width + 4));
i++;
}
i = 2;
while (i < 7) {
duplicateMovieClip (_root.scoreship1, "scoreship" add i, ++availablelevel);
_root["scoreship" add i].gotoAndStop(2);
_root["scoreship" add i]._x = _root.scoreship1._x + ((i - 1) * 25);
i++;
}
duplicateMovieClip (_root.mine1, "mine2", ++availablelevel);
duplicateMovieClip (_root.mine1, "mine3", ++availablelevel);
_root.ship.gotoAndStop(100);
sectionhit = new Sound();
sectionhit.attachSound("sectionhit");
sectionbreak = new Sound();
sectionbreak.attachSound("sectionbreak");
d = new Sound();
d.attachSound("death");
riser = new Sound();
riser.attachSound("riser");
hum1 = new Sound(_root.cannon);
hum2 = new Sound(_root.cannon);
hum1.attachSound("hum");
hum2.attachSound("hum");
hum1.setVolume(40);
hum2.setVolume(40);
startnewgame();
Frame 4 (8 B)
stop();
Symbol 19 MovieClip Frame 1 (8 B)
stop();
Symbol 19 MovieClip Frame 3 (32 B)
gotoAndPlay(_currentframe + 1);
Symbol 19 MovieClip Frame 9 (17 B)
gotoAndPlay (3);
Symbol 45 MovieClip Frame 1 (1 B)
Symbol 45 MovieClip Frame 19 (8 B)
stop();
Symbol 45 MovieClip Frame 47 (46 B)
color = "amber";
action = "normal";
stop();
Symbol 45 MovieClip Frame 75 (44 B)
color = "red";
action = "normal";
stop();
Symbol 45 MovieClip Frame 96 (39 B)
action = "broken";
gotoAndStop (212);
Symbol 45 MovieClip Frame 105 (8 B)
stop();
Symbol 45 MovieClip Frame 129 (44 B)
color = "amber";
action = "bold";
stop();
Symbol 45 MovieClip Frame 131 (44 B)
color = "amber";
action = "bold";
stop();
Symbol 45 MovieClip Frame 154 (42 B)
color = "red";
action = "bold";
stop();
Symbol 45 MovieClip Frame 156 (42 B)
color = "red";
action = "bold";
stop();
Symbol 45 MovieClip Frame 160 (42 B)
color = "red";
action = "bold";
stop();
Symbol 45 MovieClip Frame 185 (8 B)
stop();
Symbol 45 MovieClip Frame 187 (17 B)
gotoAndPlay (2);
Symbol 45 MovieClip Frame 193 (39 B)
action = "broken";
gotoAndStop (201);
Symbol 45 MovieClip Frame 201 (8 B)
stop();
Symbol 45 MovieClip Frame 205 (8 B)
stop();
Symbol 45 MovieClip Frame 212 (8 B)
stop();
Symbol 45 MovieClip Frame 216 (8 B)
stop();
Symbol 45 MovieClip Frame 226 (39 B)
action = "broken";
gotoAndStop (237);
Symbol 45 MovieClip Frame 237 (8 B)
stop();
Symbol 45 MovieClip Frame 241 (8 B)
stop();
Symbol 45 MovieClip Frame 315 (8 B)
stop();
Symbol 45 MovieClip Frame 382 (8 B)
stop();
Symbol 45 MovieClip Frame 451 (8 B)
stop();
Symbol 46 MovieClip Frame 3 (8 B)
stop();
Symbol 47 MovieClip Frame 3 (8 B)
stop();
Symbol 48 MovieClip Frame 3 (8 B)
stop();
Symbol 65 MovieClip Frame 1 (22 B)
myspeed = 2;
stop();
Symbol 65 MovieClip Frame 33 (79 B)
if (0 < _root.lives) {
gotoAndStop (1);
} else {
gotoAndStop (100);
}
Symbol 65 MovieClip Frame 116 (8 B)
stop();
Symbol 66 MovieClip Frame 1 (22 B)
myspeed = 2;
stop();
Symbol 66 MovieClip Frame 33 (79 B)
if (0 < _root.lives) {
gotoAndStop (1);
} else {
gotoAndStop (100);
}
Symbol 66 MovieClip Frame 116 (8 B)
stop();
Symbol 87 MovieClip Frame 32 (8 B)
stop();
Symbol 88 MovieClip Frame 10 (17 B)
gotoAndPlay (1);
Symbol 88 MovieClip Frame 11 (32 B)
gotoAndPlay(_currentframe + 1);
Symbol 88 MovieClip Frame 28 (20 B)
cannonboom.start();
Symbol 88 MovieClip Frame 34 (108 B)
i = 2;
while (i < 40) {
duplicateMovieClip ("dust1", "dust" add i, i);
i++;
}
cannonboom.start();
Instance of Symbol 87 MovieClip "dust1" in Symbol 88 MovieClip Frame 34 (219 B)
onClipEvent (enterFrame) {
_x = (_x + deltax);
_y = (_y + deltay);
deltax = deltax * 0.9;
deltay = deltay * 0.9;
}
onClipEvent (load) {
deltax = -30 + (Math.Random() * 60);
deltay = -30 + (Math.Random() * 60);
}
Symbol 88 MovieClip Frame 65 (71 B)
i = 1;
while (i < 40) {
removeMovieClip("dust" add i);
i++;
}
Symbol 88 MovieClip Frame 91 (617 B)
whichring = 1;
while (whichring < 4) {
whichsection = 1;
while (whichsection < 13) {
section = eval ((("_root.ring" add whichring) add ".section") add whichsection);
section.action = "normal";
if (whichring == 1) {
section.gotoAndPlay("yellowgrowing");
} else if (whichring == 2) {
section.gotoAndPlay("yellownormalgrowing");
} else {
section.gotoAndPlay("ambernormalgrowing");
}
if (section.mined) {
section.mine._visible = true;
} else {
section.mine._visible = false;
}
whichsection++;
}
whichring++;
}
gotoAndPlay (1);
_root.collapsing = false;
Symbol 91 MovieClip Frame 1 (8 B)
stop();
Symbol 91 MovieClip Frame 30 (17 B)
gotoAndStop (1);
Symbol 92 MovieClip Frame 1 (8 B)
stop();
Symbol 92 MovieClip Frame 5 (17 B)
gotoAndPlay (2);
Symbol 92 MovieClip Frame 13 (47 B)
_x = -100;
_y = -100;
this.gotoAndStop(1);
Symbol 103 MovieClip Frame 1 (8 B)
stop();
Symbol 105 MovieClip Frame 1 (8 B)
stop();
Symbol 132 MovieClip Frame 1 (8 B)
stop();
Symbol 134 Button (172 B)
on (press) {
gotoAndStop (1);
_root.setupnewgame();
_root.ship.gotoAndPlay(1);
_root.startnewgame();
for (i in /gameover) {
_root.gameover[i].removeMovieClip();
}
}
Symbol 135 MovieClip Frame 1 (1 B)
Symbol 135 MovieClip Frame 2 (780 B)
function maketext(whichstring, whichclip) {
i = 0;
while (i < whichstring.length) {
duplicateMovieClip (whichclip, whichclip add i, _root.availablelevel++);
eval (whichclip add i)._x = eval (whichclip)._x + (i * 20);
with (eval (whichclip add i)) {
framelabel = whichstring.substring(i, i + 1);
gotoAndStop(framelabel);
}
i++;
}
}
Gameover = new String("game over");
Clickscreen = new String("click anywhere onscreen");
ToStart = new String("to start new game");
arrowkeystring = new String("arrow keys move ship");
spacebarstring = new String("spacebar fires missiles");
maketext(Gameover, "game");
maketext(Clickscreen, "click");
maketext(ToStart, "start");
maketext(arrowkeystring, "arrowkeys");
maketext(spacebarstring, "spacebar");
Symbol 135 MovieClip Frame 3 (8 B)
stop();