Frame 1
fscommand ("allowscale", "false");
if (_root._framesloaded >= _root._totalframes) {
gotoAndPlay (3);
}
Frame 2
gotoAndPlay (1);
Frame 3
var angle;
var x;
var y;
_root.score = 0;
_root.dif = 27;
shotspeed = 10;
sine_lookup_table = "0.000/.0175/.0349/.0523/.0698/.0872/.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000";
mouse_x = _x - scr_ctr_x;
mouse_y = _y - scr_ctr_y;
gotoAndStop (3);
Instance of Symbol 11 MovieClip in Frame 3
/* no clip actions */
Instance of Symbol 24 MovieClip "Cannon" in Frame 3
onClipEvent (enterFrame) {
if (Key.isDown(68)) {
if (this._x < 200) {
this._x = this._x + 3;
}
}
if (Key.isDown(65)) {
if (this._x > 23) {
this._x = this._x - 3;
}
}
}
Instance of Symbol 32 MovieClip "body" in Frame 3
onClipEvent (load) {
moveSpeed = 10;
_root.laser._visible = false;
laserCounter = 1;
scrollx = _root.mainGround.ground._width / 3;
scrollStart = false;
maxLasers = 4;
depthCounter = 1;
}
onClipEvent (enterFrame) {
if (Key.isDown(17) and (gunCounter <= maxLasers)) {
gunCounter++;
_root.gun.duplicateMovieClip("star" + depthCounter, depthCounter);
_root["star" + depthCounter]._visible = true;
depthCounter++;
if (depthCounter > maxLasers) {
depthCounter = 1;
}
}
if (Key.isDown(68)) {
if (this._x < 200) {
this._x = this._x + 3;
}
}
if (Key.isDown(65)) {
if (this._x > 25) {
this._x = this._x - 3;
}
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 68) {
scrollStart = false;
}
}
Instance of Symbol 35 MovieClip in Frame 3
onClipEvent (enterFrame) {
this._x = _root.missile._x + 20;
this._y = _root.missile._y;
if (this.hitTest(_root.body)) {
_root.gamover = true;
}
}
Instance of Symbol 43 MovieClip "missile" in Frame 3
onClipEvent (load) {
function reset() {
this._x = 550;
this._y = random(300);
enemySpeed = (random(5) + 1) + int(_root.timr / 1000);
this.gotoAndStop(1);
}
reset();
}
onClipEvent (enterFrame) {
if (this._x > 550) {
reset();
}
this._x = this._x - enemySpeed;
if (this._y < (150 + random(100))) {
this._y++;
}
if (this._x < -10) {
reset();
}
if (this.hitTest(_root.body)) {
_root.gamover = true;
}
}
Instance of Symbol 44 MovieClip in Frame 3
onClipEvent (enterFrame) {
this._x = _root.missile._x + 70;
this._y = _root.missile._y - 20;
}
Instance of Symbol 49 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (_root.timr > (_root.next + _root.dif)) {
this._visible = true;
}
if (_root.timr < (_root.next + _root.dif)) {
this._visible = false;
}
_root.acc = int((_root.hitnum / _root.shotnum) * 100);
}
Instance of Symbol 57 MovieClip "tiss" in Frame 3
onClipEvent (enterFrame) {
if (_root.timr < (_root.next + _root.dif)) {
_root.alfa = (_root.timr / (_root.next + _root.dif)) * 100;
this._alpha = _root.alfa;
}
if (_root.timr > (_root.next + _root.dif)) {
this._alpha = 100;
}
}
Instance of Symbol 91 MovieClip "gover" in Frame 3
onClipEvent (enterFrame) {
if (_root.gamover) {
this._visible = true;
_root.gamover = false;
}
}
Instance of Symbol 97 MovieClip "cur" in Frame 3
onClipEvent (load) {
Mouse.hide();
startDrag (cur, true);
}
Instance of Symbol 98 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (_root.gun._y < 375) {
removeMovieClip(_root.gun);
}
if (Key.isDown(65)) {
if (this._x < 203) {
this._x = this._x + 3;
}
}
if (Key.isDown(37)) {
if (this._x > 23) {
this._x = this._x - 3;
}
}
x = this._xmouse;
y = this._ymouse * -1;
angle = Math.atan(y / x) / (Math.PI/180);
if (x < 0) {
angle = angle + 180;
}
if ((x >= 0) && (y < 0)) {
angle = angle + 360;
}
_root.angletext = int(angle);
updateAfterEvent();
}
Instance of Symbol 98 MovieClip in Frame 3
onClipEvent (load) {
timr = 0;
timer = 0;
}
onClipEvent (enterFrame) {
timer++;
_root.timr = timer;
}
Symbol 22 MovieClip Frame 1
my_x = _x;
my_y = _y;
xx++;
my_y = (my_y ^ 2) + (0.23 * xx);
_x = (Number(my_x) + Number(xmov));
_y = (Number(my_y) + Number(ymov));
if (((my_x > 550) or (my_x < 0)) or (my_y > 390)) {
removeMovieClip(star);
}
if (this.hitTest(_root.missile)) {
_root.score = _root.score + 50;
sSound = new Sound(this);
sSound.setVolume(20);
sSound.attachSound("Blowup");
sSound.start(0, 1);
_root.hitnum++;
removeMovieClip(star);
_root.missile._x = 600;
_root.missile._y = _root.missile._y + random(50);
}
Symbol 22 MovieClip Frame 2
gotoAndPlay (1);
Symbol 24 MovieClip Frame 1
gunx = _x;
guny = _y;
sx = getProperty("../cur", _x);
sy = getProperty("../cur", _y);
mouse_x = getProperty("../cur", _x) - gunx;
mouse_y = getProperty("../cur", _y) - guny;
if (Number(mouse_x) < 0) {
abs_mouse_x = Number(mouse_x) + Number(mouse_x * -2);
xsign = -1;
} else {
abs_mouse_x = mouse_x;
xsign = 1;
}
if (Number(mouse_y) < 0) {
abs_mouse_y = Number(mouse_y) + Number(mouse_y * -2);
ysign = -1;
} else {
abs_mouse_y = mouse_y;
ysign = 1;
}
input = Number(abs_mouse_x * abs_mouse_x) + Number(abs_mouse_y * abs_mouse_y);
call("sqrt");
hyp = output;
sin_theta = abs_mouse_y / hyp;
counter = 0;
found = 0;
while (!found) {
if (Number(substring(..:sine_lookup_table, Number(counter * 6) + 1, 5)) <= Number(sin_theta)) {
angle = counter;
} else {
found = 1;
}
counter = Number(counter) + 1;
}
if (Number(sx) < Number(gunx)) {
angle = Number(90 - angle) + 90;
}
if (Number(sy) > Number(guny)) {
angle = Number(angle) + 180;
} else {
angle = Number(90 - angle) + 90;
}
_rotation = angle;
if (Key.isDown(32) and (_root.timr > (_root.next + _root.dif))) {
_root.score = _root.score - 15;
_root.shotnum++;
bgSound = new Sound(this);
bgSound.attachSound("Luger");
bgSound.start(0, 1);
_root.next = _root.timr;
shotcount++;
shotname = Number(shotname) + 1;
if (Number(shotname) >= 1000) {
shotname = 1;
}
duplicateMovieClip ("../star", "shot" add shotname, shotname);
if (Number(abs_mouse_x) >= Number(abs_mouse_y)) {
Set(("../shot" add shotname) add ":xmov", ..:shotspeed * xsign);
Set(("../shot" add shotname) add ":ymov", (..:shotspeed * (abs_mouse_y / abs_mouse_x)) * ysign);
} else {
Set(("../shot" add shotname) add ":ymov", ..:shotspeed * ysign);
Set(("../shot" add shotname) add ":xmov", (..:shotspeed * (abs_mouse_x / abs_mouse_y)) * xsign);
}
setProperty("../shot" add shotname, _x , gunx);
setProperty("../shot" add shotname, _y , guny);
}
Symbol 24 MovieClip Frame 2
gotoAndPlay (1);
Symbol 24 MovieClip Frame 8
n = 1;
counter = 0;
while (Number(counter) < 11) {
n = n - (((n * n) - input) / (2 * n));
counter = Number(counter) + 1;
}
output = n;
Symbol 64 Button
on (release) {
_root.score = 0;
_root.timer = 0;
_root.timr = 0;
_root.missile._x = 550;
_root.gover._visible = false;
}
Symbol 71 Button
on (release) {
_root.dif = 15;
}
Symbol 75 Button
on (release) {
_root.dif = 27;
}
Symbol 79 Button
on (release) {
_root.dif = 50;
}