Frame 1
function clean() {
for (i in _root) {
_root[i].removeMovieClip();
}
}
_root.clean();
c = 1;
while (c < 30) {
_root.star.duplicateMovieClip("boxx" + c, c);
_root["boxx" + c]._x = random(550);
_root["boxx" + c]._y = 50 + random(300);
_root["boxx" + c].gotoAndStop(random(3) + 1);
c = c + 1;
}
_root.dir = 2;
Mouse.show();
stop();
Instance of Symbol 41 MovieClip "star" in Frame 1
onClipEvent (load) {
speed = random(6) + 2;
}
onClipEvent (enterFrame) {
if (_x < -20) {
speed = random(6) + 2;
_x = 520;
_y = (50 + random(300));
gotoAndStop(random(3) + 1);
if (random(50) == 2) {
gotoAndStop (4);
speed = 20;
} else if (random(150) == 5) {
gotoAndStop (5);
speed = 1;
}
}
_x = (_x - speed);
}
Frame 2
enemyNumber = 4;
i = 0;
while (i < enemyNumber) {
duplicateMovieClip ("enemy", "new" + i, 30 + i);
i++;
}
_root.bonus1 = false;
_root.bonus2 = false;
_root.bonus3 = false;
shield = 100;
score = 0;
level = 1;
weapon = "laser";
Mouse.hide();
stop();
Instance of Symbol 48 MovieClip "enemyLaser" in Frame 2
onClipEvent (load) {
speed = 15;
}
onClipEvent (enterFrame) {
if (_name != "enemyLaser") {
if (!_root.shipDead) {
if (this.hitTest(_root.ship)) {
_root.ship.play();
_root.shield--;
removeMovieClip(this);
}
}
_x = (_x - speed);
if (_x < -10) {
removeMovieClip(this);
}
}
}
Instance of Symbol 60 MovieClip in Frame 2
onClipEvent (load) {
oldx = _x;
speed = 0;
go = true;
tf = _totalframes;
s = random(tf) + 1;
laserNames = ["laser", "green laser", "double laser", "triple laser"];
}
onClipEvent (enterFrame) {
_rotation = (_rotation + speed);
if (this.hitTest(_root.ship) and (b1.flag == false)) {
crf = _currentframe;
tempo = 0;
hit = true;
b1.gotoAndPlay(2);
if (crf == 1) {
_root.bonus1 = true;
_root.bonus2 = false;
_root.weapon = laserNames[crf];
} else if (crf == 2) {
_root.bonus2 = true;
_root.bonus1 = false;
_root.weapon = laserNames[crf];
}
if (crf == 3) {
_root.bonus3 = true;
_root.bonus1 = false;
_root.bonus2 = false;
_root.weapon = laserNames[crf];
}
b1.flag = true;
}
_x = (_x - speed);
if (hit) {
if (400 < (++tempo)) {
_root.bonus1 = false;
_root.bonus2 = false;
_root.bonus3 = false;
hit = false;
_root.weapon = laserNames[0];
}
}
if (((random(100) + 1) == 2) and go) {
speed = random(10) + 1;
go = false;
gotoAndStop(s);
} else if (_x < -10) {
_x = oldx;
speed = 0;
_y = (random(300) + 20);
s = random(tf) + 1;
b1.gotoAndStop(1);
go = true;
}
}
Instance of Symbol 67 MovieClip "aimer" in Frame 2
onClipEvent (load) {
oldx = _x;
speed = 1;
go = true;
}
onClipEvent (enterFrame) {
rn = _root.firePower;
_x = (_x + speed);
if (((random(rn) + 1) == 2) and go) {
go = false;
} else if (600 < _x) {
_x = oldx;
_y = (random(300) + 20);
go = true;
} else if (!go) {
count = 1000 + (_root.count++);
_root.orb.duplicateMovieClip("orb" + count, count++);
_root["orb" + count]._x = this._x;
_root["orb" + count]._y = this._y;
go = true;
}
}
Instance of Symbol 75 MovieClip "orb" in Frame 2
onClipEvent (load) {
function difference() {
dx = _root.ship._x - _x;
dy = _root.ship._y - _y;
speed = 60;
a = _root.aimer.speed;
}
function hitCheck() {
if (this.hitTest(_root.ship) and flag) {
_root.shield--;
_root.ship.play();
electro.play();
}
}
flag = true;
difference();
}
onClipEvent (enterFrame) {
if (_name != "orb") {
_rotation = (_rotation + 5);
_x = (_x + ((dx / speed) * a));
_y = (_y + ((dy / speed) * a));
if ((600 < _x) or (_x < -10)) {
removeMovieClip(this);
}
if ((550 < _y) or (_y < 0)) {
removeMovieClip(this);
}
hitCheck();
}
}
Instance of Symbol 84 MovieClip "ship" in Frame 2
onClipEvent (load) {
soundLaser1 = new Sound();
soundLaser1.attachSound("sound1");
soundLaser2 = new Sound();
soundLaser2.attachSound("sound2");
soundLaser3 = new Sound();
soundLaser3.attachSound("sound3");
soundLaser4 = new Sound();
soundLaser4.attachSound("sound4");
speed = 6;
_root.shipDead = false;
sy = _y;
ang = 0;
Redge = 550 - (_width / 2);
Ledge = 0 + (_width / 2);
Uedge = 400 - (_height / 2);
Dedge = 0 + (_height / 2);
}
onClipEvent (enterFrame) {
sh = 101 - _root.shield;
_root.scudo.gotoAndStop(sh);
_y = (sy + (4 * Math.cos((ang = ang + 0.092))));
c = _root.score;
if (c == 200) {
_root.level = 2;
} else if (c == 300) {
_root.level = 3;
} else if (c == 400) {
_root.level = 4;
} else if (c == 500) {
_root.level = 5;
_root.gotoAndStop("boss1");
}
if (0 >= _root.shield) {
_root.shipDead = true;
gotoAndStop (4);
}
if (Key.isDown(40) and (_y < (Uedge - 50))) {
_y = (_y + speed);
sy = sy + speed;
}
if (Key.isDown(38) and ((Dedge + 50) < _y)) {
_y = (_y - speed);
sy = sy - speed;
}
if (Key.isDown(39) and (_x < Redge)) {
_x = (_x + speed);
}
if (Key.isDown(37) and (Ledge < _x)) {
_x = (_x - speed);
}
if (Key.isDown(32)) {
if (!a) {
shotCount++;
depth = (shotCount % 100) + 100;
_root.attachMovie("laser", "sparo" + shotCount, depth);
_root["sparo" + shotCount]._x = this._x + (_width - 45);
_root["sparo" + shotCount]._y = this._y;
a = true;
if (_root.bonus1) {
_root["sparo" + shotCount].gotoAndStop(2);
soundLaser1.start();
} else if (_root.bonus2) {
_root["sparo" + shotCount].gotoAndStop(3);
soundLaser2.start();
} else if (_root.bonus3) {
_root["sparo" + shotCount].gotoAndStop(4);
soundLaser4.start();
} else {
_root["sparo" + shotCount].gotoAndStop(1);
soundLaser3.start();
}
}
} else {
a = false;
}
}
Instance of Symbol 94 MovieClip "enemy" in Frame 2
onClipEvent (load) {
function reset() {
s = _root.level;
this.gotoAndStop(s);
ship.gotoAndStop(1);
speed = random(10) + 2;
_y = (random(300) + _height);
_x = (550 + _y);
maxfireRand = 200;
_root.firePower = maxfireRand / s;
}
maxx = _root._width + random(40);
maxy = (_root._height / 2) - _height;
sy = random(400) + 10;
reset();
}
onClipEvent (enterFrame) {
if (_name != "enemy") {
if (this.ship._currentframe == 1) {
_y = (sy + (speed * Math.cos((speed = speed + 0.092))));
if (this.hitTest(_root.ship)) {
ship.gotoAndStop(2);
_root.ship.play();
_root.shield--;
}
if ((random(_root.firePower) + 1) == 2) {
shotCount++;
depth = (shotCount % 100) + 200;
duplicateMovieClip (_root.enemyLaser, "enemyBum" + shotCount, depth);
_root["enemyBum" + shotCount]._x = this._x - 40;
_root["enemyBum" + shotCount]._y = this._y;
}
}
_x = (_x - speed);
if (_x < -10) {
reset();
}
}
}
Frame 3
stop();
Instance of Symbol 103 MovieClip in Frame 3
onClipEvent (load) {
function followShip() {
_x = (_x-1);
if ((_x-1) < 300) {
_x = 300;
}
m = true;
my_pos = _root.ship._y + 80;
my = my_pos;
if (my < _y) {
dy = _y - my;
} else {
dy = my - _y;
}
moveSpeedy = dy / 20;
if (my < _y) {
_y = (_y - moveSpeedy);
} else {
_y = (_y + moveSpeedy);
}
}
killed = 0;
xdir = random(3) + 1;
x_speed = 3;
speed = random(3) + 1;
y = 0;
count = 0;
sl = _root.ship.shotCount;
MCColor = new Color(this);
oldColor = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
newColor = {ra:"100", rb:"50", ga:"100", gb:"24", ba:"100", bb:"83", aa:"100", ab:"0"};
}
onClipEvent (enterFrame) {
followShip();
if (this.hitTest(_root.ship)) {
_root.shield = _root.shield - 1;
}
bl = _root.ship.shotCount;
i = sl + count;
while (bl >= i) {
if (hitTest(_root["sparo" + i])) {
count++;
_root.score = _root.score + 10;
_root["sparo" + i].removeMovieClip();
MCColor.setTransform(newColor);
}
i++;
}
y = y + 1;
if (5 < y) {
MCColor.setTransform(oldColor);
y = 0;
}
if (count >= 50) {
gotoAndStop (2);
}
}
Frame 4
Mouse.show();
stop();
Symbol 7 MovieClip Frame 2
stop();
Symbol 14 MovieClip [laser] Frame 1
stop();
Instance of Symbol 7 MovieClip "fire" in Symbol 14 MovieClip [laser] Frame 1
onClipEvent (load) {
n = _root.enemyNumber;
speed = 10;
}
onClipEvent (enterFrame) {
i = 0;
while (i < n) {
if (_root["new" + i].ship._currentframe == 1) {
if (this.hitTest(_root["new" + i])) {
_root.score = _root.score + 10;
_root["new" + i].ship.gotoAndPlay(2);
removeMovieClip(_parent);
}
}
i++;
}
if (550 >= _parent._x) {
_parent._x = _parent._x + speed;
} else {
removeMovieClip(_parent);
}
}
Symbol 14 MovieClip [laser] Frame 2
stop();
Instance of Symbol 9 MovieClip in Symbol 14 MovieClip [laser] Frame 2
onClipEvent (load) {
n = _root.enemyNumber;
speed = 10;
}
onClipEvent (enterFrame) {
i = 0;
while (i < n) {
if (_root["new" + i].ship._currentframe == 1) {
if (this.hitTest(_root["new" + i])) {
_root.score = _root.score + 10;
_root["new" + i].ship.gotoAndPlay(2);
removeMovieClip(_parent);
}
}
i++;
}
if (550 >= _parent._x) {
_parent._x = _parent._x + speed;
} else {
removeMovieClip(_parent);
}
}
Symbol 14 MovieClip [laser] Frame 3
stop();
Instance of Symbol 11 MovieClip "ball2" in Symbol 14 MovieClip [laser] Frame 3
onClipEvent (load) {
n = _root.enemyNumber;
speed = 10;
}
onClipEvent (enterFrame) {
_y = (_y + 1);
i = 0;
while (i < n) {
if (_root["new" + i].ship._currentframe == 1) {
if (this.hitTest(_root["new" + i])) {
_root.score = _root.score + 10;
_root["new" + i].ship.gotoAndPlay(2);
this.gotoAndStop(2);
}
}
i++;
}
if (550 >= _parent._x) {
_parent._x = _parent._x + speed;
} else {
removeMovieClip(_parent);
}
}
Instance of Symbol 11 MovieClip "ball1" in Symbol 14 MovieClip [laser] Frame 3
onClipEvent (load) {
n = _root.enemyNumber;
speed = 10;
}
onClipEvent (enterFrame) {
_y = (_y - 1);
i = 0;
while (i < n) {
if (_root["new" + i].ship._currentframe == 1) {
if (this.hitTest(_root["new" + i])) {
_root.score = _root.score + 10;
_root["new" + i].ship.gotoAndPlay(2);
this.gotoAndStop(2);
}
}
i++;
}
if (550 >= _parent._x) {
_parent._x = _parent._x + speed;
} else {
removeMovieClip(_parent);
}
}
Symbol 14 MovieClip [laser] Frame 4
stop();
Instance of Symbol 13 MovieClip in Symbol 14 MovieClip [laser] Frame 4
onClipEvent (load) {
n = _root.enemyNumber;
speed = 10;
}
onClipEvent (enterFrame) {
_y = (_y - 2);
i = 0;
while (i < n) {
if (_root["new" + i].ship._currentframe == 1) {
if (this.hitTest(_root["new" + i])) {
_root.score = _root.score + 10;
_root["new" + i].ship.gotoAndPlay(2);
this.gotoAndStop(2);
}
}
i++;
}
if (550 >= _parent._x) {
_parent._x = _parent._x + speed;
} else {
removeMovieClip(_parent);
}
}
Instance of Symbol 13 MovieClip in Symbol 14 MovieClip [laser] Frame 4
onClipEvent (load) {
n = _root.enemyNumber;
speed = 10;
}
onClipEvent (enterFrame) {
i = 0;
while (i < n) {
if (_root["new" + i].ship._currentframe == 1) {
if (this.hitTest(_root["new" + i])) {
_root.score = _root.score + 10;
_root["new" + i].ship.gotoAndPlay(2);
this.gotoAndStop(2);
}
}
i++;
}
if (550 >= _parent._x) {
_parent._x = _parent._x + speed;
} else {
removeMovieClip(_parent);
}
}
Instance of Symbol 13 MovieClip in Symbol 14 MovieClip [laser] Frame 4
onClipEvent (load) {
n = _root.enemyNumber;
speed = 10;
}
onClipEvent (enterFrame) {
_y = (_y + 2);
i = 0;
while (i < n) {
if (_root["new" + i].ship._currentframe == 1) {
if (this.hitTest(_root["new" + i])) {
_root.score = _root.score + 10;
_root["new" + i].ship.gotoAndPlay(2);
this.gotoAndStop(2);
}
}
i++;
}
if (550 >= _parent._x) {
_parent._x = _parent._x + speed;
} else {
removeMovieClip(_parent);
}
}
Symbol 19 MovieClip Frame 11
stop();
Symbol 20 MovieClip [ship2] Frame 1
stop();
Symbol 20 MovieClip [ship2] Frame 2
stop();
Symbol 24 MovieClip [exlplosion] Frame 12
Symbol 24 MovieClip [exlplosion] Frame 13
_root.gotoAndStop("gameover");
Symbol 30 Button
on (release) {
gotoAndPlay (2);
}
Symbol 41 MovieClip Frame 1
stop();
Instance of Symbol 40 MovieClip in Symbol 41 MovieClip Frame 5
onClipEvent (enterFrame) {
_rotation = (_rotation + 0.3);
}
Symbol 48 MovieClip Frame 2
stop();
Symbol 53 MovieClip Frame 1
flag = false;
stop();
Symbol 53 MovieClip Frame 10
stop();
Symbol 56 MovieClip Frame 1
flag = false;
stop();
Symbol 56 MovieClip Frame 10
stop();
Symbol 59 MovieClip Frame 1
flag = false;
stop();
Symbol 59 MovieClip Frame 10
stop();
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 2
stop();
Symbol 60 MovieClip Frame 3
stop();
Symbol 67 MovieClip Frame 1
_rotation = (_rotation + 2);
Symbol 74 MovieClip Frame 1
stop();
Symbol 74 MovieClip Frame 6
_parent.flag = false;
removeMovieClip(_parent);
Symbol 75 MovieClip Frame 2
stop();
Symbol 84 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 3
gotoAndStop (1);
Symbol 88 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 2
stop();
Symbol 90 MovieClip Frame 1
rot = true;
stop();
Symbol 90 MovieClip Frame 2
rot = false;
stop();
Symbol 93 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 2
stop();
Symbol 94 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 2
stop();
Symbol 94 MovieClip Frame 3
stop();
Instance of Symbol 90 MovieClip "ship" in Symbol 94 MovieClip Frame 3
onClipEvent (enterFrame) {
if (rot) {
_rotation = (_rotation + 5);
}
}
Symbol 94 MovieClip Frame 4
stop();
Symbol 99 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 23
_root.gotoAndStop("win");
Symbol 103 MovieClip Frame 1
stop();
Instance of Symbol 99 MovieClip in Symbol 103 MovieClip Frame 1
onClipEvent (enterFrame) {
if (random(40) == 1) {
this.play();
}
}
Symbol 103 MovieClip Frame 2
stop();
Symbol 105 Button
on (release) {
gotoAndPlay (1);
}