Frame 1
stop();
numplayers = 2;
trans1 = new Object();
trans2 = new Object();
temp = new Object();
player = 1;
Instance of Symbol 4 MovieClip in Frame 1
onClipEvent (load) {
bx = _x;
by = _y;
if (duplicate != false) {
i = 0;
while (100 >= i) {
n = 0;
while (100 >= n) {
_root.level++;
duplicateMovieClip (this, "color" + _root.level, _root.level);
mc = eval ("_root.color" + _root.level);
mc._x = ((i / 5) + bx) + 20;
mc._y = ((n / 5) + by) + 20;
mc.r = i;
mc.g = n;
mc.b = 0;
mc.duplicate = false;
n = n + 10;
}
i = i + 10;
}
i = 100;
while (i >= 0) {
n = 100;
while (n >= 0) {
_root.level++;
duplicateMovieClip (this, "color" + _root.level, _root.level);
mc = eval ("_root.color" + _root.level);
mc._x = (20 - (n / 5)) + bx;
mc._y = ((i / 5) + by) + 20;
mc.r = 0;
mc.g = i;
mc.b = n;
mc.duplicate = false;
n = n - 10;
}
i = i - 10;
}
i = 100;
while (i >= 0) {
n = 100;
while (n >= 0) {
_root.level++;
duplicateMovieClip (this, "color" + _root.level, _root.level);
mc = eval ("_root.color" + _root.level);
mc._x = (20 - (i / 5)) + bx;
mc._y = (20 - (n / 5)) + by;
mc.r = n;
mc.g = 0;
mc.b = i;
mc.duplicate = false;
n = n - 10;
}
i = i - 10;
}
} else {
c = new Color(this);
trans = new Object();
trans.ra = r;
trans.ga = g;
trans.ba = b;
c.setTransform(trans);
}
}
Instance of Symbol 6 MovieClip in Frame 1
onClipEvent (load) {
c = new Color(this);
}
onClipEvent (enterFrame) {
c.setTransform(_root.temp);
}
Instance of Symbol 28 MovieClip "stats" in Frame 1
onClipEvent (load) {
_visible = false;
this.swapDepths(100000010);
}
onClipEvent (enterFrame) {
if (_visible) {
accry1 = Math.round((_root.ship1.hits / _root.ship1.shots) * 100, 1);
accry2 = Math.round((_root.ship2.hits / _root.ship2.shots) * 100, 1);
}
}
Frame 2
stop();
Instance of Symbol 30 MovieClip "shot" in Frame 2
onClipEvent (load) {
xd = Math.sin(radangle) * 16;
yd = (-Math.cos(radangle)) * 16;
c = new Color(this);
mytrans = eval ("_root.trans" + pn);
c.setTransform(mytrans);
if (pn == 1) {
t = 2;
} else {
t = 1;
}
target = eval ("_root.ship" + t);
creator = eval ("_root.ship" + pn);
}
onClipEvent (enterFrame) {
if (fired) {
_x = (_x + xd);
_y = (_y + yd);
if ((((_x < -2) || (502 < _x)) || (_y < -2)) || (502 < _y)) {
removeMovieClip(this);
}
if (target.hitTest(_x, _y)) {
target.shield--;
creator.hits++;
removeMovieClip(this);
}
}
}
Instance of Symbol 32 MovieClip "ship2" in Frame 2
onClipEvent (load) {
this.swapDepths(100000000 + pn);
shield = 5;
pn = 2;
c = new Color(this);
if (pn == 1) {
c.setTransform(_root.trans1);
} else {
c.setTransform(_root.trans2);
}
maxspeed = 12;
maxtime = 10;
rspeed = 5;
vel = 0;
accel = 1;
wins = 0;
shots = 0;
hits = 0;
pup = 0;
}
onClipEvent (enterFrame) {
if (mode == "stop") {
}
if (mode == "dead") {
_x = (_x + xd);
_y = (_y + yd);
_alpha = (_alpha - 10);
_xscale = (_xscale - 10);
if (0 >= _alpha) {
removeMovieClip(this);
}
} else if (mode == "die") {
_alpha = (_alpha - 2);
if (0 >= _alpha) {
_x = 5000000;
mode = "stop";
_visible = false;
_root.win._visible = true;
if ((pn == 1) && (done == false)) {
_root.win.winner = 2;
_root.ship2.wins++;
done = true;
} else if (done == false) {
_root.win.winner = 1;
_root.ship1.wins++;
done = true;
}
}
i = 0;
while (i < 3) {
_root.level++;
duplicateMovieClip (this, "dead" + _root.level, _root.level);
mc = eval ("_root.dead" + _root.level);
mc.xd = (Math.random() * (100 - _alpha)) / 10;
mc.yd = (Math.random() * (100 - _alpha)) / 10;
if (Math.random() < 0.5) {
mc.xd = mc.xd * -1;
}
if (Math.random() < 0.5) {
mc.yd = mc.yd * -1;
}
mc.pn = pn;
mc.mode = "dead";
i++;
}
} else if (fade) {
_alpha = (_alpha - 10);
_xscale = (_xscale - 5);
if (0 >= _alpha) {
removeMovieClip(this);
}
} else {
if (Key.isDown(65)) {
_rotation = (_rotation - rspeed);
}
if (Key.isDown(68)) {
_rotation = (_rotation + rspeed);
}
radangle = (_rotation / 180) * Math.PI;
if (Key.isDown(87)) {
vel = vel + (0.5 * accel);
} else if (Key.isDown(83)) {
vel = vel - (0.5 * accel);
} else if (0 < vel) {
vel = vel - (0.25 * accel);
} else if (vel < 0) {
vel = vel + (0.25 * accel);
}
timer--;
if (Key.isDown(Key.SPACE) && (timer < 1)) {
shots++;
_root.level++;
duplicateMovieClip (_root.shot, "shot" + _root.level, _root.level);
mc = eval ("_root.shot" + _root.level);
mc.fired = true;
mc.radangle = radangle;
mc._x = _x + ((Math.sin(radangle) * _width) / 2);
mc._y = _y - ((Math.cos(radangle) * _height) / 2);
mc.pn = pn;
timer = maxtime;
}
if (maxspeed < vel) {
vel = maxspeed;
} else if (vel < (-maxspeed)) {
vel = -maxspeed;
}
_x = (_x + (Math.sin(radangle) * vel));
_y = (_y - (Math.cos(radangle) * vel));
if (540 < _x) {
_x = -40;
} else if (_x < -40) {
_x = 540;
}
if (540 < _y) {
_y = -40;
} else if (_y < -40) {
_y = 540;
}
_root.level++;
duplicateMovieClip (this, "fader" + _root.level, _root.level);
mc = eval ("_root.fader" + _root.level);
mc.fade = true;
mc._alpha = Math.abs(vel * 6);
if (0 >= shield) {
mode = "die";
}
}
}
Instance of Symbol 40 MovieClip "win" in Frame 2
onClipEvent (load) {
_visible = false;
this.swapDepths(100000003);
}
onClipEvent (enterFrame) {
myname = eval ("_root.name" + winner);
}
Instance of Symbol 42 MovieClip in Frame 2
onClipEvent (load) {
timer = 500;
}
onClipEvent (enterFrame) {
if (active) {
if (this.hitTest(_root.ship1)) {
_root.ship1.shield++;
_root.ship1.pup++;
removeMovieClip(this);
} else if (this.hitTest(_root.ship2)) {
_root.ship2.shield++;
_root.ship2.pup++;
removeMovieClip(this);
}
} else {
timer--;
if (0 >= timer) {
_root.level++;
duplicateMovieClip (this, "powerup" + _root.level, _root.level);
mc = eval ("_root.powerup" + _root.level);
mc._x = 10 + (Math.random() * 480);
mc._y = 10 + (Math.random() * 480);
mc.active = true;
timer = 400;
}
}
}
Instance of Symbol 44 MovieClip in Frame 2
onClipEvent (load) {
timer = 400;
}
onClipEvent (enterFrame) {
if (active) {
if (this.hitTest(_root.ship1)) {
_root.ship1.maxspeed = _root.ship1.maxspeed + 2;
_root.ship1.pup++;
removeMovieClip(this);
} else if (this.hitTest(_root.ship2)) {
_root.ship2.maxspeed = _root.ship2.maxspeed + 2;
_root.ship2.pup++;
removeMovieClip(this);
}
} else {
timer--;
if (0 >= timer) {
_root.level++;
duplicateMovieClip (this, "powerup" + _root.level, _root.level);
mc = eval ("_root.powerup" + _root.level);
mc._x = 10 + (Math.random() * 480);
mc._y = 10 + (Math.random() * 480);
mc.active = true;
timer = 400;
}
}
}
Instance of Symbol 46 MovieClip in Frame 2
onClipEvent (load) {
timer = 300;
}
onClipEvent (enterFrame) {
if (active) {
if (this.hitTest(_root.ship1)) {
_root.ship1.maxtime--;
_root.ship1.pup++;
removeMovieClip(this);
} else if (this.hitTest(_root.ship2)) {
_root.ship2.maxtime--;
_root.ship2.pup++;
removeMovieClip(this);
}
} else {
timer--;
if (0 >= timer) {
_root.level++;
duplicateMovieClip (this, "powerup" + _root.level, _root.level);
mc = eval ("_root.powerup" + _root.level);
mc._x = 10 + (Math.random() * 480);
mc._y = 10 + (Math.random() * 480);
mc.active = true;
timer = 400;
}
}
}
Instance of Symbol 51 MovieClip in Frame 2
onClipEvent (load) {
this.swapDepths(100000004);
}
Instance of Symbol 52 MovieClip in Frame 2
onClipEvent (load) {
if (duplicate != false) {
i = 0;
while (50 >= i) {
_root.level++;
duplicateMovieClip (this, "star" + _root.level, _root.level);
mc = eval ("_root.star" + _root.level);
mc._x = Math.random() * 500;
mc._y = Math.random() * 500;
mc._alpha = (mc._xscale = (mc._yscale = Math.random() * 100));
mc.duplicate = false;
i++;
}
}
}
Instance of Symbol 54 MovieClip in Frame 2
onClipEvent (load) {
timer = 200;
}
onClipEvent (enterFrame) {
if (active) {
if (this.hitTest(_root.ship1)) {
_root.ship1.accel = _root.ship1.accel + 0.5;
_root.ship1.rspeed++;
_root.ship1.pup++;
removeMovieClip(this);
} else if (this.hitTest(_root.ship2)) {
_root.ship2.accel = _root.ship2.accel + 0.5;
_root.ship2.rspeed++;
_root.ship2.pup++;
removeMovieClip(this);
}
} else {
timer--;
if (0 >= timer) {
_root.level++;
duplicateMovieClip (this, "powerup" + _root.level, _root.level);
mc = eval ("_root.powerup" + _root.level);
mc._x = 10 + (Math.random() * 480);
mc._y = 10 + (Math.random() * 480);
mc.active = true;
timer = 400;
}
}
}
Instance of Symbol 55 MovieClip "ship1" in Frame 2
onClipEvent (load) {
this.swapDepths(100000000 + pn);
shield = 5;
pn = 1;
c = new Color(this);
if (pn == 1) {
c.setTransform(_root.trans1);
} else {
c.setTransform(_root.trans2);
}
maxspeed = 12;
maxtime = 10;
rspeed = 5;
vel = 0;
accel = 1;
wins = 0;
shots = 0;
hits = 0;
pup = 0;
done = false;
}
onClipEvent (enterFrame) {
if (mode == "stop") {
}
if (mode == "dead") {
_x = (_x + xd);
_y = (_y + yd);
_alpha = (_alpha - 10);
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
if (0 >= _alpha) {
removeMovieClip(this);
}
} else if (mode == "die") {
_alpha = (_alpha - 2);
if (0 >= _alpha) {
_x = 5000000;
mode = "stop";
_visible = false;
_root.win._visible = true;
if ((pn == 1) && (done == false)) {
_root.win.winner = 2;
_root.ship2.wins++;
done = true;
} else if (done == false) {
_root.win.winner = 1;
_root.ship1.wins++;
done = true;
}
}
i = 0;
while (i < 3) {
_root.level++;
duplicateMovieClip (this, "dead" + _root.level, _root.level);
mc = eval ("_root.dead" + _root.level);
mc.xd = (Math.random() * (100 - _alpha)) / 10;
mc.yd = (Math.random() * (100 - _alpha)) / 10;
if (Math.random() < 0.5) {
mc.xd = mc.xd * -1;
}
if (Math.random() < 0.5) {
mc.yd = mc.yd * -1;
}
mc.pn = pn;
mc.mode = "dead";
i++;
}
} else if (fade) {
_alpha = (_alpha - 10);
_yscale = (_yscale - 5);
_xscale = (_xscale - 5);
if (0 >= _alpha) {
removeMovieClip(this);
}
} else {
if (Key.isDown(Key.LEFT)) {
_rotation = (_rotation - rspeed);
}
if (Key.isDown(Key.RIGHT)) {
_rotation = (_rotation + rspeed);
}
radangle = (_rotation / 180) * Math.PI;
if (Key.isDown(Key.UP)) {
vel = vel + (0.5 * accel);
} else if (Key.isDown(Key.DOWN)) {
vel = vel - (0.5 * accel);
} else if (0 < vel) {
vel = vel - (0.25 * accel);
} else if (vel < 0) {
vel = vel + (0.25 * accel);
}
timer--;
if (Key.isDown(Key.SHIFT) && (timer < 1)) {
shots++;
_root.level++;
duplicateMovieClip (_root.shot, "shot" + _root.level, _root.level);
mc = eval ("_root.shot" + _root.level);
mc.fired = true;
mc.radangle = radangle;
mc._x = _x + ((Math.sin(radangle) * _width) / 2);
mc._y = _y - ((Math.cos(radangle) * _height) / 2);
mc.pn = pn;
timer = maxtime;
}
if (maxspeed < vel) {
vel = maxspeed;
} else if (vel < (-maxspeed)) {
vel = -maxspeed;
}
_x = (_x + (Math.sin(radangle) * vel));
_y = (_y - (Math.cos(radangle) * vel));
if (540 < _x) {
_x = -40;
} else if (_x < -40) {
_x = 540;
}
if (540 < _y) {
_y = -40;
} else if (_y < -40) {
_y = 540;
}
_root.level++;
duplicateMovieClip (this, "fader" + _root.level, _root.level);
mc = eval ("_root.fader" + _root.level);
mc.fade = true;
mc._alpha = Math.abs(vel * 6);
if (0 >= shield) {
mode = "die";
}
}
}
Symbol 3 Button
on (rollOver) {
_root.temp.ra = r;
_root.temp.ga = g;
_root.temp.ba = b;
}
on (release) {
if (_root.player == 1) {
_root.trans1.ra = r;
_root.trans1.ga = g;
_root.trans1.ba = b;
_root.name1 = _root.name;
_root.name1x = _root.name + ":";
_root.name = "";
_root.player++;
} else {
_root.trans2.ra = r;
_root.trans2.ga = g;
_root.trans2.ba = b;
_root.name2 = _root.name;
_root.name2x = _root.name + ":";
_root.player++;
i = 0;
while (i < 400) {
mc = eval ("_root.color" + i);
if (mc._name != _name) {
removeMovieClip(mc);
}
i++;
}
_root.play();
removeMovieClip(this);
}
}
Symbol 27 Button
on (release) {
_visible = false;
}
Symbol 37 Button
on (release) {
_root.ship1.mode = "";
_root.ship2.mode = "";
_root.ship1.shield = 5;
_root.ship2.shield = 5;
_root.ship1._y = (_root.ship2._y = 250);
_root.ship1._x = 31;
_root.ship1._rotation = 90;
_root.ship2._x = 469;
_root.ship2._rotation = -90;
_root.ship1._visible = (_root.ship2._visible = true);
_root.ship1._alpha = (_root.ship2._alpha = 100);
_root.ship1.maxspeed = 12;
_root.ship1.maxtime = 10;
_root.ship1.rspeed = 5;
_root.ship1.vel = 0;
_root.ship1.accel = 1;
_root.ship2.maxspeed = 12;
_root.ship2.maxtime = 10;
_root.ship2.rspeed = 5;
_root.ship2.vel = 0;
_root.ship2.accel = 1;
_root.ship1.done = false;
_root.ship2.done = false;
_visible = false;
}
Symbol 39 Button
on (release) {
_root.stats._visible = true;
}