Frame 1
function itemHandler1(obj, item) {
getURL ("http://www.cg3studios.net.tf/");
}
function reset() {
fi = 0;
kills = 0;
ttle = 0;
diff = 0;
hi = 0;
acc = 0;
lives = 3;
score = 0;
level = 1;
spot = 0;
i = 1000;
dX = 0;
dY = 0;
bc = 500;
_root.ship.thrust = 1;
_root.ship.decay = 0.97;
_root.ship.maxSpeed = 10;
_root.ship.ySpeed = 0;
_root.ship.xSpeed = 0;
_root.ship.shooting = false;
_root.ship.fire._visible = false;
_root.ship._x = 275;
_root.ship._y = 200;
}
function duperoid() {
_root.i++;
spot = random(3);
if (spot == 0) {
_root.dX = 0;
_root.dY = 0;
}
if (spot == 1) {
_root.dX = 550;
_root.dY = 0;
}
if (spot == 2) {
_root.dX = 0;
_root.dY = 400;
}
if (spot == 3) {
_root.dX = 550;
_root.dY = 400;
}
duplicateMovieClip (_root.roid, "roi" + _root.i, _root.i);
with (_root["roi" + _root.i]) {
_x = _root.dX;
_y = _root.dY;
}
}
function duperoidB() {
_root.i++;
duplicateMovieClip (_root.roidB, "roiB" + _root.i, _root.i);
with (_root["roiB" + _root.i]) {
_x = _root.dX;
_y = _root.dY;
}
}
function duperoidC() {
_root.i++;
duplicateMovieClip (_root.roidC, "roiC" + _root.i, _root.i);
with (_root["roiC" + _root.i]) {
_x = _root.dX;
_y = _root.dY;
}
}
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
item1 = new ContextMenuItem("CG3Studios", itemHandler1);
myMenu.customItems.push(item1);
_root.menu = myMenu;
var lives = 1;
var score = 0;
var i = 1000;
var dX = 0;
var dY = 0;
var spot = 0;
var bc = 500;
var fi = 0;
var hi = 0;
var level = 1;
var acc = 0;
var diff = 0;
var kills = 0;
var ttle = 0;
lives_hold.text = "Lives: " + lives;
score_hold.text = "Score: " + score;
level_hold.text = "Level: " + level;
acc_hold.text = ("Accuracy" + acc) + "%";
_root.onEnterFrame = function () {
Mouse.hide();
lives_hold.text = "Lives: " + lives;
score_hold.text = "Score: " + score;
level_hold.text = "Level: " + level;
acc = Math.round((hi / fi) * 100);
if (fi == 0) {
acc_hold.text = "Accuracy: 0%";
} else {
acc_hold.text = ("Accuracy: " + acc) + "%";
}
if (i > 1100) {
i = 100;
}
if (bc > 600) {
bc = 500;
}
if (lives < 0) {
_root.gotoAndStop("lose");
}
};
Instance of Symbol 2 MovieClip in Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 5);
_x = _root._xmouse;
_y = _root._ymouse;
}
Instance of Symbol 4 MovieClip in Frame 1
onClipEvent (enterFrame) {
_y = (_y + ((_root._ymouse - _y) / 3));
_x = (_x + ((_root._xmouse - _x) / 3));
}
Frame 2
play();
Frame 3
stop();
Frame 4
_root.score = _root.score + (((lives * 500) + (acc * 75)) + (level * 250));
_root.name_hold = "Your Name Here!";
Frame 5
ttle = 14;
kills = 0;
z = 0;
while (z < 2) {
duperoid();
z++;
}
Instance of Symbol 82 MovieClip "roidB" in Frame 5
onClipEvent (load) {
if (_root.diff == 0) {
var speed = 7;
}
if (_root.diff == 1) {
var speed = 7.5;
}
if (_root.diff == 2) {
var speed = 8;
}
var dead = false;
_rotation = random(360);
if (_name == "roidB") {
_x = 1000;
_y = 1000;
}
}
onClipEvent (enterFrame) {
if (_name != "roidB") {
_rotation = (_rotation+1);
for (i in _root) {
if (_root[i]._name.indexOf("las") != -1) {
if (_root[i].hitTest(this) && (dead == false)) {
_root.hi++;
_root[i].removeMovieClip();
_root.dX = _x;
_root.dY = _y;
_root.duperoidC();
_root.duperoidC();
this.gotoAndStop(2);
if (_root.diff == 0) {
_root.score = _root.score + 10;
}
if (_root.diff == 1) {
_root.score = _root.score + 15;
}
if (_root.diff == 2) {
_root.score = _root.score + 20;
}
dead = true;
}
}
}
if (((_root.ship.body.hitTest(this) && (_root.ship._currentframe == 1)) && (_root.ship.invs == 0)) && (dead == false)) {
_root.ship.play();
_root.dX = _x;
_root.dY = _y;
_root.duperoidC();
_root.duperoidC();
this.gotoAndStop(2);
dead = true;
}
YY = speed * Math.cos((Math.PI/180) * _rotation);
XX = speed * Math.sin((Math.PI/180) * _rotation);
if (_rotation > 180) {
_y = (_y + YY);
_x = (_x - XX);
} else {
_y = (_y - YY);
_x = (_x + XX);
}
if (_x > 550) {
_x = 0;
}
if (_x < 0) {
_x = 550;
}
if (_y > 400) {
_y = 0;
}
if (_y < 0) {
_y = 400;
}
if (_root.lives < 0) {
this.removeMovieClip();
}
if (this.death._currentframe == 7) {
this.removeMovieClip();
}
}
}
Instance of Symbol 82 MovieClip "roidC" in Frame 5
onClipEvent (load) {
if (_root.diff == 0) {
var speed = 9;
}
if (_root.diff == 1) {
var speed = 9;
}
if (_root.diff == 2) {
var speed = 10;
}
var dead = false;
_rotation = random(360);
if (_name == "roidC") {
_x = 1000;
_y = 1000;
}
}
onClipEvent (enterFrame) {
if (_name != "roidC") {
_rotation = (_rotation+1);
for (i in _root) {
if (_root[i]._name.indexOf("las") != -1) {
if (_root[i].hitTest(this) && (dead == false)) {
_root.hi++;
_root[i].removeMovieClip();
this.gotoAndStop(2);
if (_root.diff == 0) {
_root.score = _root.score + 15;
}
if (_root.diff == 1) {
_root.score = _root.score + 20;
}
if (_root.diff == 2) {
_root.score = _root.score + 25;
}
dead = true;
}
}
}
if (((_root.ship.body.hitTest(this) && (_root.ship._currentframe == 1)) && (_root.ship.invs == 0)) && (dead == false)) {
_root.ship.play();
this.gotoAndStop(2);
dead = true;
}
YY = speed * Math.cos((Math.PI/180) * _rotation);
XX = speed * Math.sin((Math.PI/180) * _rotation);
if (_rotation > 180) {
_y = (_y + YY);
_x = (_x - XX);
} else {
_y = (_y - YY);
_x = (_x + XX);
}
if (_x > 550) {
_x = 0;
}
if (_x < 0) {
_x = 550;
}
if (_y > 400) {
_y = 0;
}
if (_y < 0) {
_y = 400;
}
}
if (_root.lives < 0) {
this.removeMovieClip();
}
if (this.death._currentframe == 7) {
this.removeMovieClip();
}
}
Instance of Symbol 82 MovieClip "roid" in Frame 5
onClipEvent (load) {
if (_root.diff == 0) {
var speed = 3;
}
if (_root.diff == 1) {
var speed = 3.5;
}
if (_root.diff == 2) {
var speed = 4;
}
var dead = false;
_rotation = random(360);
if (_name == "roid") {
_x = 1000;
_y = 1000;
}
}
onClipEvent (enterFrame) {
if (_name != "roid") {
_rotation = (_rotation+1);
for (i in _root) {
if (_root[i]._name.indexOf("las") != -1) {
if (_root[i].hitTest(this) && (dead == false)) {
_root.hi++;
_root[i].removeMovieClip();
_root.dX = _x;
_root.dY = _y;
_root.duperoidB();
_root.duperoidB();
this.gotoAndStop(2);
if (_root.diff == 0) {
_root.score = _root.score + 5;
}
if (_root.diff == 1) {
_root.score = _root.score + 10;
}
if (_root.diff == 2) {
_root.score = _root.score + 15;
}
dead = true;
}
}
}
if (((_root.ship.body.hitTest(this) && (_root.ship._currentframe == 1)) && (_root.ship.invs == 0)) && (dead == false)) {
_root.ship.play();
_root.dX = _x;
_root.dY = _y;
_root.duperoidB();
_root.duperoidB();
this.gotoAndStop(2);
dead = true;
}
YY = speed * Math.cos((Math.PI/180) * _rotation);
XX = speed * Math.sin((Math.PI/180) * _rotation);
if (_rotation > 180) {
_y = (_y + YY);
_x = (_x - XX);
} else {
_y = (_y - YY);
_x = (_x + XX);
}
if (_x > 550) {
_x = 0;
}
if (_x < 0) {
_x = 550;
}
if (_y > 400) {
_y = 0;
}
if (_y < 0) {
_y = 400;
}
if (_root.lives < 0) {
this.removeMovieClip();
}
if (this.death._currentframe == 7) {
this.removeMovieClip();
}
}
}
Instance of Symbol 85 MovieClip "laser" in Frame 5
onClipEvent (load) {
this.cacheAsBitmap = true;
var spd = 20;
var time = 25;
_x = _root.ship._x;
_y = _root.ship._y;
_rotation = _root.ship._rotation;
if (_name == "laser") {
_x = 1000;
_y = 1000;
}
}
onClipEvent (enterFrame) {
if (_name != "laser") {
time--;
if (_rotation > 180) {
_y = (_y + (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x - (spd * Math.sin((Math.PI/180) * _rotation)));
} else {
_y = (_y - (spd * Math.cos((Math.PI/180) * _rotation)));
_x = (_x + (spd * Math.sin((Math.PI/180) * _rotation)));
}
if (((((_x > 550) || (_x < 0)) || (_y > 400)) || (_y < 0)) || (_root.lives < 0)) {
this.removeMovieClip();
}
}
}
Instance of Symbol 101 MovieClip "ship" in Frame 5
onClipEvent (load) {
thrust = 0.5;
decay = 0.98;
maxSpeed = 10;
ySpeed = 0;
xSpeed = 0;
invs = 15;
rot = 10;
shooting = false;
this.fire._visible = false;
swapDepths(9999);
_x = 275;
_y = 200;
}
onClipEvent (enterFrame) {
if (invs > 0) {
invs--;
this.shield._visible = true;
} else {
this.shield._visible = false;
}
if ((_currentframe == 1) || (_currentframe == 34)) {
_y = (_y - ySpeed);
_x = (_x + xSpeed);
if (Key.isDown(32) && (shooting == false)) {
_root.bc++;
duplicateMovieClip (_root.laser, "las" + _root.bc, _root.bc);
_root.fi++;
shooting = true;
}
((!Key.isDown(32)) ? ((shooting = false)) : null);
if (Key.isDown(16) && (warp == false)) {
_x = random(550);
_y = random(400);
warp = true;
}
((!Key.isDown(16)) ? ((warp = false)) : null);
if (Key.isDown(39)) {
_rotation = (_rotation + rot);
}
if (Key.isDown(37)) {
_rotation = (_rotation - rot);
}
if (Key.isDown(38)) {
xSpeed = xSpeed + (thrust * Math.sin(_rotation * (Math.PI/180)));
ySpeed = ySpeed + (thrust * Math.cos(_rotation * (Math.PI/180)));
this.fire._visible = true;
} else {
this.fire._visible = false;
xSpeed = xSpeed * decay;
ySpeed = ySpeed * decay;
}
speed = Math.sqrt((xSpeed * xSpeed) + (ySpeed * ySpeed));
if (speed > maxSpeed) {
xSpeed = xSpeed * (maxSpeed / speed);
ySpeed = ySpeed * (maxSpeed / speed);
}
if (_y < 0) {
_y = 399;
}
if (_y > 399) {
_y = 0;
}
if (_x < 0) {
_x = 549;
}
if (_x > 549) {
_x = 0;
}
} else {
this.fire._visible = false;
ySpeed = 0;
xSpeed = 0;
}
if (_root.lives < 0) {
this.removeMovieClip();
}
}
Instance of Symbol 107 MovieClip in Frame 5
onClipEvent (enterFrame) {
if (_root.kills == _root.ttle) {
_root.level++;
_root.nextFrame();
}
}
Frame 6
ttle = 21;
kills = 0;
z = 0;
while (z < 3) {
duperoid();
z++;
}
_root.ship.invs = 15;
Frame 7
ttle = 28;
kills = 0;
z = 0;
while (z < 4) {
duperoid();
z++;
}
_root.ship.invs = 15;
Frame 8
ttle = 35;
kills = 0;
z = 0;
while (z < 5) {
duperoid();
z++;
}
_root.ship.invs = 15;
Frame 9
ttle = 42;
kills = 0;
z = 0;
while (z < 6) {
duperoid();
z++;
}
_root.ship.invs = 15;
Frame 10
_root.score = _root.score + (((lives * 500) + (acc * 75)) + (level * 250));
_root.name_hold = "Your Name Here!";
if (_root.diff == 0) {
_root.score = _root.score + 1000;
}
if (_root.diff == 1) {
_root.score = _root.score + 2500;
}
if (_root.diff == 2) {
_root.score = _root.score + 5000;
}
Instance of Symbol 2 MovieClip in Frame 10
onClipEvent (enterFrame) {
_rotation = (_rotation + 5);
_x = _root._xmouse;
_y = _root._ymouse;
}
Instance of Symbol 4 MovieClip in Frame 10
onClipEvent (enterFrame) {
_y = (_y + ((_root._ymouse - _y) / 3));
_x = (_x + ((_root._xmouse - _x) / 3));
}
Symbol 11 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
KB_out = ((int(_root.getBytesLoaded() / 1000) + "/") + int(_root.getBytesTotal() / 1000)) + "";
if (PercentLoaded != 100) {
setProperty(barmask.bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 11 MovieClip Frame 2
gotoAndPlay (1);
Symbol 11 MovieClip Frame 3
_root.play();
Symbol 19 MovieClip Frame 7
stop();
Symbol 23 MovieClip Frame 7
stop();
Symbol 27 Button
on (release) {
gotoAndStop (3);
}
Symbol 31 Button
on (release) {
gotoAndStop (2);
}
Symbol 34 Button
on (release) {
getURL ("http://www.b.admhosting.net/scores/pyro/", "_blank");
}
Symbol 37 MovieClip Frame 7
stop();
Symbol 42 Button
on (release) {
_root.diff = 0;
_root.lives = 5;
_root.gotoAndStop("game");
}
Symbol 45 Button
on (release) {
_root.diff = 2;
_root.lives = 1;
_root.score = _root.score + 1000;
_root.gotoAndStop("game");
}
Symbol 48 Button
on (release) {
_root.diff = 1;
_root.lives = 3;
_root.score = _root.score + 500;
_root.gotoAndStop("game");
}
Symbol 49 MovieClip Frame 1
stop();
Symbol 59 Button
on (release) {
_root.reset();
_root.gotoAndStop("menu");
}
Symbol 68 Button
on (release) {
name = _root.name_hold;
score = _root.score;
if (name.length < 25) {
getURL ("http://b.admhosting.net/scores/pyro/submit.php", "_blank", "POST");
}
_root.reset();
_root.gotoAndStop("menu");
}
Symbol 81 MovieClip Frame 6
_root.kills++;
Symbol 82 MovieClip Frame 1
stop();
Instance of Symbol 73 MovieClip in Symbol 82 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(random(2) + 1);
}
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 22
_root.lives--;
Symbol 101 MovieClip Frame 33
_root.ship.invs = 25;
gotoAndStop (1);