Frame 1
function goTo() {
getURL ("http://www.mofunzone.com/");
}
var newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
newMenu.customItems.push(new ContextMenuItem("MoFunZone.com - Play More Games", goTo));
this.menu = newMenu;
function strToBool(conv) {
if (conv == "true") {
conv = true;
return(conv);
}
if (conv == "false") {
conv = false;
return(conv);
}
}
function strToNum(conv) {
if (conv == "1") {
conv = 1;
return(conv);
}
if (conv == "2") {
conv = 2;
return(conv);
}
}
_root.gamedemo = false;
_root.webdemo = false;
_root.so = SharedObject.getLocal("se");
if (_root.so.data.gamesave != true) {
_root.maxconti = 5;
_root.so.data.continuecount = _root.maxconti;
}
_root.continuecount = _root.so.data.continuecount;
moreGame = function () {
getURL ("http://www.mofunzone.com/", "_blank");
};
_root.onEnterFrame = function () {
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
_root.onEnterFrame = null;
gotoAndPlay (3);
} else {
_root.bytesloadedresult = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
_root.preloadergage.gotoAndStop(_root.bytesloadedresult + 5);
}
};
stop();
Frame 72
Frame 83
_root.displaymode = 1;
_root.pa_setting.window.gotoAndStop(strToNum(_root.win_act));
_root.pa_setting.full_low.gotoAndStop(strToNum(_root.low_act));
_root.pa_setting.full_mid.gotoAndStop(strToNum(_root.mid_act));
_root.pa_setting.full_high.gotoAndStop(strToNum(_root.high_act));
_root.pa_setting.q_low.gotoAndStop(strToNum(_root.q_low));
_root.pa_setting.q_mid.gotoAndStop(strToNum(_root.q_mid));
_root.pa_setting.q_high.gotoAndStop(strToNum(_root.q_high));
if (strToNum(_root.q_low) == 2) {
_root._quality = "LOW";
}
if (strToNum(_root.q_mid) == 2) {
_root._quality = "MEDIUM";
}
if (strToNum(_root.q_high) == 2) {
_root._quality = "HIGH";
}
_root.pa_setting.b_cancel.onRelease = function () {
_root.pa_setting.window.gotoAndStop(strToNum(_root.win_act));
_root.pa_setting.full_low.gotoAndStop(strToNum(_root.low_act));
_root.pa_setting.full_mid.gotoAndStop(strToNum(_root.mid_act));
_root.pa_setting.full_high.gotoAndStop(strToNum(_root.high_act));
_root.pa_setting.q_low.gotoAndStop(strToNum(_root.q_low));
_root.pa_setting.q_mid.gotoAndStop(strToNum(_root.q_mid));
_root.pa_setting.q_high.gotoAndStop(strToNum(_root.q_high));
if (strToNum(_root.q_low) == 2) {
_root._quality = "LOW";
}
if (strToNum(_root.q_mid) == 2) {
_root._quality = "MEDIUM";
}
if (strToNum(_root.q_high) == 2) {
_root._quality = "HIGH";
}
_root.pa_setting._visible = false;
};
_root.pa_setting.b_ok.onRelease = function () {
_root.pa_setting._visible = false;
_root.displaymode = (((_root.pa_setting.window._currentframe * 1000) + (_root.pa_setting.full_low._currentframe * 100)) + (_root.pa_setting.full_mid._currentframe * 10)) + _root.pa_setting.full_high._currentframe;
fscommand ("open", "config.txt");
fscommand ("write", _root.displaymode);
fscommand ("close");
fscommand ("open", "saveconfig.txt");
fscommand ("write", (((((("win_act=" + _root.pa_setting.b_window._currentframe) + "&low_act=") + _root.pa_setting.b_fulllow._currentframe) + "&mid_act=") + _root.pa_setting.b_fullmid._currentframe) + "&high_act=") + _root.pa_setting.b_fullhigh._currentframe);
fscommand ("close");
fscommand ("open", "savequality.txt");
fscommand ("write", (((("q_low=" + _root.pa_setting.b_qlow._currentframe) + "&q_mid=") + _root.pa_setting.b_qmid._currentframe) + "&q_high=") + _root.pa_setting.b_qhigh._currentframe);
fscommand ("close");
};
function buMoreGame() {
getURL ("http://www.mofunzone.com/", "_blank");
}
stop();
stopAllSounds();
_root.pa_warning._visible = false;
_root.pa_setting._visible = false;
_root.pa_help._visible = false;
_root.b_start0.onRelease = function () {
if (((_root.pa_setting._visible != true) and (_root.so.data.gamesave != true)) or (_root.so.data.continuecount == 0)) {
_root.gamemode = "story";
_root.so.data.gamesave = false;
_root.so.data.continuecount = _root.maxconti;
play();
} else if (_root.pa_warning.opened != true) {
_root.attachMovie("M in_panel_warning", "pa_warning", _root.getNextHighestDepth());
_root.pa_warning._x = 320;
_root.pa_warning._y = 240;
_root.pa_warning.opened = true;
}
};
_root.b_start1.onRelease = function () {
if (_root.pa_setting._visible != true) {
_root.gamemode = "survival";
}
};
if ((((_root.so.data.gamesave != true) or (_root.gamedemo == true)) or (_root.webdemo == true)) or (_root.so.data.continuecount == 0)) {
_root.b_continue._alpha = 25;
_root.in_concount._alpha = 25;
} else {
_root.b_continue._alpha = 255;
_root.in_concount._alpha = 255;
}
_root.b_continue.onRelease = function () {
if (((_root.so.data.gamesave == true) and (_root.b_continue._alpha >= 100)) and (_root.pa_warning.opened != true)) {
_root.so.data.continued = true;
_root.so.data.continuecount--;
if (_root.so.data.continuecount == 0) {
_root.so.data.gamesave = false;
}
play();
}
};
_root.b_setting.onRelease = function () {
_root.pa_setting._visible = true;
};
if (_root.gamedemo == true) {
_root.b_seti._alpha = 25;
}
_root.b_help.onRelease = function () {
if (((_root.pa_setting._visible != true) and (_root.pa_help._visible != true)) and (_root.pa_warning.opened != true)) {
_root.attachMovie("M dialog_help", "dialog_help", _root.getNextHighestDepth());
_root.dialog_help._x = 320;
_root.dialog_help._y = 240;
}
};
_root.b_quit.onRelease = function () {
fscommand ("quit");
};
if (_root.gamedemo == true) {
_root.b_quit._visible = false;
}
_root.b_highscores.onRelease = function () {
getURL ("http://www.mofunzone.com/game_scores/blackhole_trek/highscores.shtml", "_blank");
};
_root.b_more.onRelease = function () {
moreGame();
};
Frame 84
stop();
_root.b_easy.onRelease = function () {
_root.difflevel = 0.8;
_root.scorebonus = 0.6;
play();
};
_root.b_normal.onRelease = function () {
_root.difflevel = 1;
_root.scorebonus = 1;
play();
};
_root.b_hard.onRelease = function () {
_root.difflevel = 1.3;
_root.scorebonus = 1.5;
play();
};
Frame 85
Frame 88
_root.today = new Date();
_root.EPOCH_TIME = _root.today.getTime();
function levelIni() {
removeMovieClip(_root.gobj);
_root.attachMovie("M obj_empty", "gobj", _root.getNextHighestDepth());
_root.im_bg.gotoAndStop(_root.level);
attachClip();
_root.item01num = 0;
_root.item02num = 0;
_root.enemynum = 0;
_root.energy = 0;
_root.spreadbombnum = 0;
_root.gage_bossshie.gotoAndStop(1);
_root.timecounter = _root.timecounterini;
_root.enemy_cdt = 0;
if (_root.level == 1) {
_root.attachMovie("M in_tutorial", "in_tutorial", _root.getNextHighestDepth());
_root.in_tutorial._x = 320;
_root.in_tutorial._y = 240;
}
if (_root.level == 3) {
objRandomPlacerOB(_root.gobj, "boss", "obj_boss", "M obj_boss00", 740, -100, -100, 580, 640, 480);
eneHomingAT(_root.gobj["obj_boss" + _root.bossid], _root.gobj.obj_hero, 2, 90, 60, "fx_explode", "M fx_explode05", 0, Shoot_actt, Attype, Buspd, 700, 2000, Busource);
}
if (_root.level == 6) {
objRandomPlacerOB(_root.gobj, "boss", "obj_boss", "M obj_boss01", 740, -100, -100, 580, 640, 480);
eneHomingST(_root.gobj["obj_boss" + _root.bossid], _root.gobj.obj_hero, 10, 2, 45, "fx_explode", "M fx_explode05", 0, Shoot_actt, Attype, Buspd, 1150, 4000, Busource);
}
if (_root.level == 9) {
objRandomPlacerOB(_root.gobj, "boss", "obj_boss", "M obj_boss02", 740, -100, -100, 580, 640, 480);
eneHomingST(_root.gobj["obj_boss" + _root.bossid], _root.gobj.obj_hero, 6, 120, 120, "fx_explode", "M fx_explode05", 1, 80, 1, 0.5, 1300, 6000, "M obj_bullet07");
}
if (_root.level == 12) {
objRandomPlacerOB(_root.gobj, "boss", "obj_boss", "M obj_boss03", 740, -100, -100, 580, 640, 480);
eneHomingAT(_root.gobj["obj_boss" + _root.bossid], _root.gobj.obj_hero, 2, 90, 45, "fx_explode", "M fx_explode05", 1, 90, 2, 2, 1700, 10000, "M obj_bullet07");
}
if (_root.level == 15) {
objRandomPlacerOB(_root.gobj, "boss", "obj_boss", "M obj_boss04", 740, -100, -100, 580, 640, 480);
eneHomingST(_root.gobj["obj_boss" + _root.bossid], _root.gobj.obj_hero, 3, 240, 60, "fx_explode", "M fx_explode05", 1, 90, 2, 8, 1500, 18000, "M obj_bullet07");
}
}
function gameRule() {
_root.timecounter = _root.timecounter - (1 * _root.difflevel);
if ((Math.round(_root.timecounter) <= 0) || ((_root.heroshield <= 0) and (_root.gameover == false))) {
_root.gobj.attachMovie("M fx_explode04", "fx_explode04", _root.gobj.getNextHighestDepth());
_root.gobj._x = _root.gobj.obj_hero._x;
_root.gobj._y = _root.gobj.obj_hero._y;
removeMovieClip(_root.gobj.obj_hero);
_root.gameover = true;
_root.systpause = true;
_root.attachMovie("M dialog_gameover", "dialog_gameover", _root.getNextHighestDepth());
if (Math.round(_root.timecounter) <= 0) {
_root.dialog_gameover.quickmessage.gotoAndStop(1);
}
if (_root.heroshield <= 0) {
_root.dialog_gameover.quickmessage.gotoAndStop(2);
}
_root.dialog_gameover._x = 320;
_root.dialog_gameover._y = 240;
trace("Game Over");
}
if (_root.energy > _root.energyrq[_root.level]) {
_root.level++;
_root.attachMovie("M dialog_levelclear", "dialog_levelclear", _root.getNextHighestDepth());
_root.dialog_levelclear._x = 320;
_root.dialog_levelclear._y = 240;
_root.dialog_levelclear.play();
_root.systpause = true;
}
}
function objPlacer(Attapath, Type, Newid, Attachid, X, Y) {
_root[Type + "id"]++;
_root[Type + "num"]++;
if (_root[Type + "id"] > _root[Type + "idmax"]) {
_root[Type + "id"] = 0;
}
var _local2 = Newid + _root[Type + "id"];
removeMovieClip(Attapath[_local2]);
Attapath.attachMovie(Attachid, _local2, Attapath.getNextHighestDepth());
Attapath[_local2].objtype = Type;
Attapath[_local2]._x = X;
Attapath[_local2]._y = Y;
Attapath[_local2].play();
}
function objRandomPlacer(Attapath, Type, Newid, Attachid, Xa, Xb, Ya, Yb) {
_root[Type + "id"]++;
_root[Type + "num"]++;
if (_root[Type + "id"] > _root[Type + "idmax"]) {
_root[Type + "id"] = 0;
}
var _local2 = Newid + _root[Type + "id"];
removeMovieClip(Attapath[_local2]);
Attapath.attachMovie(Attachid, _local2, Attapath.getNextHighestDepth());
Attapath[_local2].objtype = Type;
Attapath[_local2]._x = random(Xa) + Xb;
Attapath[_local2]._y = random(Ya) + Yb;
Attapath[_local2].play();
}
function objRandomPlacerOB(Attapath, Type, Newid, Attachid, OBx1, OBx2, OBy1, OBy2, Gareax, Gareay) {
_root[Type + "id"]++;
_root[Type + "num"]++;
if (_root[Type + "id"] > _root[Type + "idmax"]) {
_root[Type + "id"] = 0;
}
var _local2 = Newid + _root[Type + "id"];
removeMovieClip(Attapath[_local2]);
Attapath.attachMovie(Attachid, _local2, Attapath.getNextHighestDepth());
Attapath[_local2].objtype = Type;
var _local5 = random(100);
if ((_local5 >= 0) and (ranside <= 24)) {
Attapath[_local2]._x = OBx1;
Attapath[_local2]._y = random(Gareay);
}
if ((_local5 > 25) and (ranside <= 50)) {
Attapath[_local2]._x = OBx2;
Attapath[_local2]._y = random(Gareay);
}
if ((_local5 > 51) and (ranside <= 75)) {
Attapath[_local2]._x = random(Gareax);
Attapath[_local2]._y = OBy1;
}
if (_local5 > 76) {
Attapath[_local2]._x = random(Gareax);
Attapath[_local2]._y = OBy2;
}
Attapath[_local2].play();
}
function itemEnergy(Obj, Obj2, Power, Activeframs) {
Obj.onEnterFrame = function () {
if (this.setuped != true) {
this.setuped = true;
this.life = _root.item01_life;
this.die = false;
}
if (this._currentframe >= this._totalframes) {
_root.item01num--;
removeMovieClip(this);
}
if (this.die == true) {
this.play();
}
if (((_root.gamepause == false) and (_root.systpause == false)) and (this.die == false)) {
if (this._currentframe >= Activeframe) {
this.life--;
if (this.life <= 0) {
this.die = true;
}
this.xdiffer = this._x - Obj2._x;
this.ydiffer = this._y - Obj2._y;
this.distance = Math.sqrt((this.xdiffer * this.xdiffer) + (this.ydiffer * this.ydiffer));
if (this.distance < ((Obj._width / 2) + _root.herovsitem)) {
_root.energy = _root.energy + Power;
this.die = true;
}
}
}
};
}
function itemMaterial(Obj, Obj2, Power) {
Obj.onEnterFrame = function () {
if (this._currentframe >= this._totalframes) {
_root.item02num--;
removeMovieClip(this);
}
if (this.setuped != true) {
this.setuped = true;
this.distx = random(640) - this._x;
this.disty = random(480) - this._y;
this.rad = Math.atan2(this.disty, this.distx);
this.spdx = _root.item02_spd * Math.cos(this.rad);
this.spdy = _root.item02_spd * Math.sin(this.rad);
this.die = false;
}
if (((_root.gamepause == false) and (_root.systpause == false)) and (this.die == false)) {
this._x = this._x + this.spdx;
this._y = this._y + this.spdy;
this.xdiffer = this._x - Obj2._x;
this.ydiffer = this._y - Obj2._y;
this.distance = Math.sqrt((this.xdiffer * this.xdiffer) + (this.ydiffer * this.ydiffer));
if (this.distance < ((Obj._width / 2) + _root.herovsitem)) {
_root.material = _root.material + Power;
this.die = true;
this.play();
} else if ((((this._x < _root.gbdx1) or (this._x > _root.gbdx2)) or (this._y < _root.gbdy1)) or (this._y > _root.gbdy2)) {
this.die = true;
this.play();
}
}
};
}
function eneRandom(Obj, Obj2, Objspd, Newfxid, Attafxid, Shoot, Shoot_actt, Attype, Buspd, HP, Score, Busource) {
Obj.onEnterFrame = function () {
if (this.setuped != true) {
this.setuped = true;
this.hp = HP;
this.distx = random(640) - this._x;
this.disty = random(480) - this._y;
this.rad = Math.atan2(this.disty, this.distx);
this.spdx = Objspd * Math.cos(this.rad);
this.spdy = Objspd * Math.sin(this.rad);
this.die = false;
this.shoot = Shoot;
this.shoot_cdt = 0;
this.shoot_actt = Shoot_actt;
if (this.spdx < 0) {
this._xscale = 100;
} else {
this._xscale = -100;
}
}
if (((_root.gamepause == false) and (_root.systpause == false)) and (this.die == false)) {
this._x = this._x + this.spdx;
this._y = this._y + this.spdy;
if (this.shoot == 1) {
this.shoot_cdt = this.shoot_cdt + 1;
if (this.shoot_cdt >= this.shoot_actt) {
this.shoot_cdt = 0;
_root.objPlacer(_root.gobj, "bullet", "obj_bullet01", Busource, this._x, this._y);
if (Attype == 1) {
_root.eneRandom(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
} else if (Attype == 2) {
_root.eneTarget(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, _root.gobj.obj_hero._x, _root.gobj.obj_hero._y, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
} else if (Attype == 3) {
eneHomingT(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, 60, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
}
}
}
this.xdiffer = this._x - Obj2._x;
this.ydiffer = this._y - Obj2._y;
this.distance = Math.sqrt((this.xdiffer * this.xdiffer) + (this.ydiffer * this.ydiffer));
if (this.distance < ((Obj._width / 2) + _root.herovsene)) {
_root.heroshield = _root.heroshield - 1;
objPlacer(_root.gobj, "fx", "fx_shield", "M fx_shield", _root.gobj.obj_hero._x, _root.gobj.obj_hero._y);
} else if ((((this._x < _root.gbdx1) or (this._x > _root.gbdx2)) or (this._y < _root.gbdy1)) or (this._y > _root.gbdy2)) {
if (this.objtype == "enemy") {
_root.enemynum--;
}
removeMovieClip(this);
}
if ((this.hp <= 0) and (this.hp != -9999)) {
this.die = true;
_root.score = _root.score + (Score * _root.scorebonus);
}
if (this.die == true) {
_root.objPlacer(_root.gobj, "fx", Newfxid, Attafxid, this._x, this._y);
if (this.objtype == "enemy") {
_root.enemynum--;
}
removeMovieClip(this);
}
}
};
}
function eneTarget(Obj, Obj2, Objspd, Tarx, Tary, Newfxid, Attafxid, Shoot, Shoot_actt, Attype, Buspd, HP, Score, Busource) {
Obj.onEnterFrame = function () {
if (this.setuped != true) {
this.setuped = true;
this.hp = HP;
this.distx = Tarx - this._x;
this.disty = Tary - this._y;
this.rad = Math.atan2(this.disty, this.distx);
this.spdx = Objspd * Math.cos(this.rad);
this.spdy = Objspd * Math.sin(this.rad);
this.die = false;
this.shoot = Shoot;
this.shoot_cdt = 0;
this.shoot_actt = Shoot_actt;
if (this.spdx < 0) {
this._xscale = -100;
}
}
if (((_root.gamepause == false) and (_root.systpause == false)) and (this.die == false)) {
this._x = this._x + this.spdx;
this._y = this._y + this.spdy;
if (this.shoot == 1) {
this.shoot_cdt = this.shoot_cdt + 1;
if (this.shoot_cdt >= this.shoot_actt) {
this.shoot_cdt = 0;
_root.objPlacer(_root.gobj, "bullet", "obj_bullet01", Busource, this._x, this._y);
if (Attype == 1) {
_root.eneRandom(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
} else if (Attype == 2) {
_root.eneTarget(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, _root.gobj.obj_hero._x, _root.gobj.obj_hero._y, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
} else if (Attype == 3) {
eneHomingT(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, 60, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
}
}
}
this.xdiffer = this._x - Obj2._x;
this.ydiffer = this._y - Obj2._y;
this.distance = Math.sqrt((this.xdiffer * this.xdiffer) + (this.ydiffer * this.ydiffer));
if (this.distance < ((Obj._width / 2) + _root.herovsene)) {
_root.heroshield = _root.heroshield - 1;
objPlacer(_root.gobj, "fx", "fx_shield", "M fx_shield", _root.gobj.obj_hero._x, _root.gobj.obj_hero._y);
} else if ((((this._x < _root.gbdx1) or (this._x > _root.gbdx2)) or (this._y < _root.gbdy1)) or (this._y > _root.gbdy2)) {
if (this.objtype == "enemy") {
_root.enemynum--;
}
removeMovieClip(this);
}
if ((this.hp <= 0) and (this.hp != -9999)) {
this.die = true;
_root.score = _root.score + (Score * _root.scorebonus);
}
if (this.die == true) {
_root.objPlacer(_root.gobj, "fx", Newfxid, Attafxid, this._x, this._y);
if (this.objtype == "enemy") {
_root.enemynum--;
}
removeMovieClip(this);
}
}
};
}
function eneHomingT(Obj, Obj2, Objspd, Homingtime, Newfxid, Attafxid, Shoot, Shoot_actt, Attype, Buspd, HP, Score, Busource) {
Obj.onEnterFrame = function () {
if (this.setuped != true) {
this.setuped = true;
this.hp = HP;
this.die = false;
this.shoot = Shoot;
this.shoot_cdt = 0;
this.shoot_actt = Shoot_actt;
this.homingtime = Homingtime;
}
if (((_root.gamepause == false) and (_root.systpause == false)) and (this.die == false)) {
if (this.homingtime > 0) {
this.homingtime--;
this.distx = _root.gobj.obj_hero._x - this._x;
this.disty = _root.gobj.obj_hero._y - this._y;
this.rad = Math.atan2(this.disty, this.distx);
this.spdx = Objspd * Math.cos(this.rad);
this.spdy = Objspd * Math.sin(this.rad);
}
this._x = this._x + this.spdx;
this._y = this._y + this.spdy;
if (this.spdx < 0) {
this._xscale = 100;
} else {
this._xscale = -100;
}
if (this.shoot == 1) {
this.shoot_cdt = this.shoot_cdt + 1;
if (this.shoot_cdt >= this.shoot_actt) {
this.shoot_cdt = 0;
_root.objPlacer(_root.gobj, "bullet", "obj_bullet01", Busource, this._x, this._y);
if (Attype == 1) {
_root.eneRandom(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
} else if (Attype == 2) {
_root.eneTarget(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, _root.gobj.obj_hero._x, _root.gobj.obj_hero._y, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
} else if (Attype == 3) {
eneHomingT(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, 60, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
}
}
}
this.xdiffer = this._x - Obj2._x;
this.ydiffer = this._y - Obj2._y;
this.distance = Math.sqrt((this.xdiffer * this.xdiffer) + (this.ydiffer * this.ydiffer));
if (this.distance < ((Obj._width / 2) + _root.herovsene)) {
_root.heroshield = _root.heroshield - 1;
objPlacer(_root.gobj, "fx", "fx_shield", "M fx_shield", _root.gobj.obj_hero._x, _root.gobj.obj_hero._y);
} else if ((((this._x < _root.gbdx1) or (this._x > _root.gbdx2)) or (this._y < _root.gbdy1)) or (this._y > _root.gbdy2)) {
if (this.objtype == "enemy") {
_root.enemynum--;
}
removeMovieClip(this);
}
if ((this.hp <= 0) and (this.hp != -9999)) {
this.die = true;
_root.score = _root.score + (Score * _root.scorebonus);
}
if (this.die == true) {
_root.objPlacer(_root.gobj, "fx", Newfxid, Attafxid, this._x, this._y);
if (this.objtype == "enemy") {
_root.enemynum--;
}
removeMovieClip(this);
}
}
};
}
function eneHomingAT(Obj, Obj2, Objspd, Homingtime, Homingreset, Newfxid, Attafxid, Shoot, Shoot_actt, Attype, Buspd, HP, Score, Busource) {
Obj.onEnterFrame = function () {
if (this.setuped != true) {
this.setuped = true;
this.hp = HP;
this.hpmax = HP;
this.die = false;
this.shoot = Shoot;
this.shoot_cdt = 0;
this.shoot_actt = Shoot_actt;
this.homingtime = Homingtime;
this.homingtreset = Homingreset;
}
if (((_root.gamepause == false) and (_root.systpause == false)) and (this.die == false)) {
if (this.homingtime > 0) {
this.homingtime--;
this.distx = _root.gobj.obj_hero._x - this._x;
this.disty = _root.gobj.obj_hero._y - this._y;
this.rad = Math.atan2(this.disty, this.distx);
this.spdx = Objspd * Math.cos(this.rad);
this.spdy = Objspd * Math.sin(this.rad);
this._x = this._x + this.spdx;
this._y = this._y + this.spdy;
}
if (this.homingtime <= 0) {
this.homingtreset--;
if (this.homingtreset <= 0) {
this.homingtime = Homingtime;
this.homingtreset = Homingreset;
}
}
if (this.shoot == 1) {
this.shoot_cdt = this.shoot_cdt + 1;
if (this.shoot_cdt >= this.shoot_actt) {
this.shoot_cdt = 0;
_root.objPlacer(_root.gobj, "bullet", "obj_bullet01", Busource, this._x, this._y);
if (Attype == 1) {
_root.eneRandom(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
} else if (Attype == 2) {
_root.eneTarget(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, _root.gobj.obj_hero._x, _root.gobj.obj_hero._y, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
} else if (Attype == 3) {
eneHomingT(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, 60, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
}
}
}
this.xdiffer = this._x - Obj2._x;
this.ydiffer = this._y - Obj2._y;
this.distance = Math.sqrt((this.xdiffer * this.xdiffer) + (this.ydiffer * this.ydiffer));
if (this.distance < ((Obj._width / 2) + _root.herovsene)) {
_root.heroshield = _root.heroshield - 1;
objPlacer(_root.gobj, "fx", "fx_shield", "M fx_shield", _root.gobj.obj_hero._x, _root.gobj.obj_hero._y);
}
if ((this.hp <= 0) and (this.hp != -9999)) {
this.die = true;
_root.score = _root.score + (Score * _root.scorebonus);
}
if (this.die == true) {
_root.objPlacer(_root.gobj, "fx", Newfxid, Attafxid, this._x, this._y);
if (this.objtype == "enemy") {
_root.enemynum--;
}
removeMovieClip(this);
}
}
};
}
function eneHomingST(Obj, Obj2, Objspd, Homingtime, Homingreset, Newfxid, Attafxid, Shoot, Shoot_actt, Attype, Buspd, HP, Score, Busource) {
Obj.onEnterFrame = function () {
if (this.setuped != true) {
this.setuped = true;
this.hp = HP;
this.hpmax = HP;
this.die = false;
this.shoot = Shoot;
this.shoot_cdt = 0;
this.shoot_actt = Shoot_actt;
this.homingtime = Homingtime;
this.homingtreset = Homingreset;
}
if (((_root.gamepause == false) and (_root.systpause == false)) and (this.die == false)) {
if (this.homingtime > 0) {
this.homingtime--;
this.distx = _root.gobj.obj_hero._x - this._x;
this.disty = _root.gobj.obj_hero._y - this._y;
this.rad = Math.atan2(this.disty, this.distx);
this.spdx = Objspd * Math.cos(this.rad);
this.spdy = Objspd * Math.sin(this.rad);
}
if (this.homingtime <= 0) {
this.homingtreset--;
if (this.homingtreset <= 0) {
this.homingtime = Homingtime;
this.homingtreset = Homingreset;
}
}
this._x = this._x + this.spdx;
this._y = this._y + this.spdy;
if (this.shoot == 1) {
this.shoot_cdt = this.shoot_cdt + 1;
if (this.shoot_cdt >= this.shoot_actt) {
this.shoot_cdt = 0;
_root.objPlacer(_root.gobj, "bullet", "obj_bullet01", Busource, this._x, this._y);
if (Attype == 1) {
_root.eneRandom(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
} else if (Attype == 2) {
_root.eneTarget(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, _root.gobj.obj_hero._x, _root.gobj.obj_hero._y, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
} else if (Attype == 3) {
eneHomingT(_root.gobj["obj_bullet01" + _root.bulletid], _root.gobj.obj_hero, Buspd, 60, "fx_explode", "M fx_explode01", 0, 0, 0, 0, -9999, 0, null);
}
}
}
this.xdiffer = this._x - Obj2._x;
this.ydiffer = this._y - Obj2._y;
this.distance = Math.sqrt((this.xdiffer * this.xdiffer) + (this.ydiffer * this.ydiffer));
if (this.distance < ((Obj._width / 2) + _root.herovsene)) {
_root.heroshield = _root.heroshield - 1;
objPlacer(_root.gobj, "fx", "fx_shield", "M fx_shield", _root.gobj.obj_hero._x, _root.gobj.obj_hero._y);
}
if ((this.hp <= 0) and (this.hp != -9999)) {
this.die = true;
_root.score = _root.score + (Score * _root.scorebonus);
}
if (this.die == true) {
_root.objPlacer(_root.gobj, "fx", Newfxid, Attafxid, this._x, this._y);
if (this.objtype == "enemy") {
_root.enemynum--;
}
removeMovieClip(this);
}
}
};
}
function gameCore() {
if (((_root.gamepause == false) and (_root.systpause == false)) and (_root.gameover == false)) {
gameRule();
playerControll(_root.gobj.obj_hero);
if (_root.item01num < _root.item01nummax) {
_root.item01_cdt = _root.item01_cdt + 1;
if (_root.item01_cdt >= _root.item01_actt) {
_root.item01_cdt = 0;
objRandomPlacer(_root.gobj, "item01", "obj_item01_", "M obj_item01(energy)", 540, 50, 380, 50);
itemEnergy(_root.gobj["obj_item01_" + _root.item01id], _root.gobj.obj_hero, 1, 8);
}
}
if (_root.item02num < _root.item02nummax) {
_root.item02_cdt = _root.item02_cdt + 1;
if (_root.item02_cdt >= _root.item02_actt) {
_root.item02_cdt = 0;
objRandomPlacerOB(_root.gobj, "item02", "obj_item02_", "M obj_item02(material)", 740, -100, -100, 580, 640, 480);
itemMaterial(_root.gobj["obj_item02_" + _root.item02id], _root.gobj.obj_hero, 1, 8);
}
}
if (_root.enemynum < _root.enemynummax) {
_root.enemy_cdt = _root.enemy_cdt + 1;
if (_root.enemy_cdt >= _root.enemy_actt[_root.level]) {
_root.enemy_cdt = 0;
if (random(100) < _root.enemy01chance[_root.level]) {
objRandomPlacerOB(_root.gobj, "enemy", "obj_enemy", "M obj_enemy_meteor01", 740, -100, -100, 580, 640, 480);
eneRandom(_root.gobj["obj_enemy" + _root.enemyid], _root.gobj.obj_hero, 5, "fx_explode", "M fx_explode01", 0, Shoot_actt, Attype, Buspd, 2, 10, Busource);
}
if (random(100) < _root.enemy02chance[_root.level]) {
objRandomPlacerOB(_root.gobj, "enemy", "obj_enemy", "M obj_enemy_meteor02", 740, -100, -100, 580, 640, 480);
eneRandom(_root.gobj["obj_enemy" + _root.enemyid], _root.gobj.obj_hero, 7, "fx_explode", "M fx_explode01", 0, Shoot_actt, Attype, Buspd, 3, 15, Busource);
}
if (random(100) < _root.enemy03chance[_root.level]) {
objRandomPlacerOB(_root.gobj, "enemy", "obj_enemy", "M obj_enemy_meteor03", 740, -100, -100, 580, 640, 480);
eneRandom(_root.gobj["obj_enemy" + _root.enemyid], _root.gobj.obj_hero, 2, "fx_explode", "M fx_explode01", 0, Shoot_actt, Attype, Buspd, 7, 20, Busource);
}
if (random(100) < _root.enemy04chance[_root.level]) {
objRandomPlacerOB(_root.gobj, "enemy", "obj_enemy", "M obj_enemy_weir01", 740, -100, -100, 580, 640, 480);
eneTarget(_root.gobj["obj_enemy" + _root.enemyid], _root.gobj.obj_hero, 6, _root.gobj.obj_hero._x, _root.gobj.obj_hero._y, "fx_explode", "M fx_explode01", 1, 120, 1, 2, 3, 25, "M obj_bullet07");
}
if (random(100) < _root.enemy05chance[_root.level]) {
objRandomPlacerOB(_root.gobj, "enemy", "obj_enemy", "M obj_enemy_weir02", 740, -100, -100, 580, 640, 480);
eneTarget(_root.gobj["obj_enemy" + _root.enemyid], _root.gobj.obj_hero, 4, _root.gobj.obj_hero._x, _root.gobj.obj_hero._y, "fx_explode", "M fx_explode01", 1, 90, 2, 3, 2, 30, "M obj_bullet07");
}
if (random(100) < _root.enemy06chance[_root.level]) {
objRandomPlacerOB(_root.gobj, "enemy", "obj_enemy", "M obj_enemy_alien01", 740, -100, -100, 580, 640, 480);
eneRandom(_root.gobj["obj_enemy" + _root.enemyid], _root.gobj.obj_hero, 8, "fx_explode", "M fx_explode01", 1, 120, 2, 3, 2, 35, "M obj_bullet07");
}
if (random(100) < _root.enemy07chance[_root.level]) {
objRandomPlacerOB(_root.gobj, "enemy", "obj_enemy", "M obj_enemy_alien02", 740, -100, -100, 580, 640, 480);
eneRandom(_root.gobj["obj_enemy" + _root.enemyid], _root.gobj.obj_hero, 4, "fx_explode", "M fx_explode01", 1, 160, 1, 4, 7, 35, "M obj_bullet07");
}
if (random(100) < _root.enemy08chance[_root.level]) {
objRandomPlacerOB(_root.gobj, "enemy", "obj_enemy", "M obj_enemy_alien03", 740, -100, -100, 580, 640, 480);
eneHomingT(_root.gobj["obj_enemy" + _root.enemyid], _root.gobj.obj_hero, 6, 180, "fx_explode", "M fx_explode01", 0, Shoot_actt, Attype, Buspd, 4, 40, "M obj_bullet07");
}
if (random(100) < _root.enemy09chance[_root.level]) {
objRandomPlacerOB(_root.gobj, "enemy", "obj_enemy", "M obj_enemy_ship01", 740, -100, -100, 580, 640, 480);
eneTarget(_root.gobj["obj_enemy" + _root.enemyid], _root.gobj.obj_hero, 3, _root.gobj.obj_hero._x, _root.gobj.obj_hero._y, "fx_explode", "M fx_explode01", 1, 130, 2, 5, 8, 45, "M obj_bullet07");
}
if (random(100) < _root.enemy10chance[_root.level]) {
objRandomPlacerOB(_root.gobj, "enemy", "obj_enemy", "M obj_enemy_ship02", 740, -100, -100, 580, 640, 480);
eneTarget(_root.gobj["obj_enemy" + _root.enemyid], _root.gobj.obj_hero, 7, _root.gobj.obj_hero._x, _root.gobj.obj_hero._y, "fx_explode", "M fx_explode01", 1, 90, 2, 4, 4, 45, "M obj_bullet07");
}
if (random(100) < _root.enemy11chance[_root.level]) {
objRandomPlacerOB(_root.gobj, "enemy", "obj_enemy", "M obj_enemy_ship03", 740, -100, -100, 580, 640, 480);
eneHomingT(_root.gobj["obj_enemy" + _root.enemyid], _root.gobj.obj_hero, 5, 180, "fx_explode", "M fx_explode01", 1, 120, 1, 4, 4, 50, "M obj_bullet07");
}
}
}
_root.sho_material = _root.material;
_root.sho_score = Math.round(_root.score);
_root.gage_shie.gotoAndStop(5 + Math.round((_root.heroshield / _root.enegyshield[_root.enegyshieldlv]) * 100));
_root.gage_ener.gotoAndStop(5 + Math.round((_root.energy / _root.energyrq[_root.level]) * 100));
_root.gage_time.gotoAndStop(5 + Math.round((_root.timecounter / _root.timecounterini) * 100));
if (((((_root.level == 3) or (_root.level == 6)) or (_root.level == 9)) or (_root.level == 12)) or (_root.level == 15)) {
_root.gage_bossshie.gotoAndStop(5 + Math.round((_root.gobj.obj_boss0.hp / _root.gobj.obj_boss0.hpmax) * 100));
}
_root.gage_gpro.gotoAndStop(_root.level);
}
}
function autoVulcan(Obj, Speed, Power, Radians) {
Obj.onEnterFrame = function () {
if (this.setuped != true) {
this.setuped = true;
this.gotoAndStop(_root.autodefgunlv);
}
if ((_root.gamepause == false) and (_root.systpause == false)) {
this._x = this._x + (Speed * Math.cos(Radians));
this._y = this._y + (Speed * Math.sin(Radians));
i = 0;
while (i <= _root.enemynummax) {
if (((((_root.level == 3) or (_root.level == 6)) or (_root.level == 9)) or (_root.level == 12)) or (_root.level == 15)) {
this.xdifferB = this._x - _root.gobj["obj_boss" + i]._x;
this.ydifferB = this._y - _root.gobj["obj_boss" + i]._y;
this.distanceB = Math.sqrt((this.xdifferB * this.xdifferB) + (this.ydifferB * this.ydifferB));
if (this.distanceB < ((this._width / 2) + (_root.gobj["obj_boss" + i]._width / 2))) {
_root.gobj["obj_boss" + i].hp = _root.gobj["obj_boss" + i].hp - Power;
_root.objPlacer(_root.gobj, "fx", "fx_explode02", "M fx_explode02", this._x, this._y);
removeMovieClip(this);
}
}
this.xdiffer = this._x - _root.gobj["obj_enemy" + i]._x;
this.ydiffer = this._y - _root.gobj["obj_enemy" + i]._y;
this.distance = Math.sqrt((this.xdiffer * this.xdiffer) + (this.ydiffer * this.ydiffer));
if (this.distance < ((this._width / 2) + (_root.gobj["obj_enemy" + i]._width / 2))) {
_root.gobj["obj_enemy" + i].hp = _root.gobj["obj_enemy" + i].hp - Power;
_root.objPlacer(_root.gobj, "fx", "fx_explode02", "M fx_explode02", this._x, this._y);
removeMovieClip(this);
} else if ((((this._x < _root.gbdx1) or (this._x > _root.gbdx2)) or (this._y < _root.gbdy1)) or (this._y > _root.gbdy2)) {
removeMovieClip(this);
}
i++;
}
}
};
}
function bompLauncher(Obj, Speed, Power, Radians) {
Obj.onEnterFrame = function () {
if ((_root.gamepause == false) and (_root.systpause == false)) {
this._x = this._x + (Speed * Math.cos(Radians));
this._y = this._y + (Speed * Math.sin(Radians));
i = 0;
while (i <= _root.enemynummax) {
if (((((_root.level == 3) or (_root.level == 6)) or (_root.level == 9)) or (_root.level == 12)) or (_root.level == 15)) {
this.xdifferB = this._x - _root.gobj["obj_boss" + i]._x;
this.ydifferB = this._y - _root.gobj["obj_boss" + i]._y;
this.distanceB = Math.sqrt((this.xdifferB * this.xdifferB) + (this.ydifferB * this.ydifferB));
if (this.distanceB < ((this._width / 2) + (_root.gobj["obj_boss" + i]._width / 2))) {
_root.spreadbombnum--;
_root.objPlacer(_root.gobj, "herobullet", "fx_explode03", "M fx_explode03", this._x, this._y);
_root.gobj["fx_explode03" + _root.herobulletid]._xscale = 100 + (_root.spreadbomblv * _root.spreadbomrad);
_root.gobj["fx_explode03" + _root.herobulletid]._yscale = 100 + (_root.spreadbomblv * _root.spreadbomrad);
_root.spreadBomb(_root.gobj["fx_explode03" + _root.herobulletid], Power);
_root.fx_explode03.start(0, 1);
removeMovieClip(this);
}
}
this.xdiffer = this._x - _root.gobj["obj_enemy" + i]._x;
this.ydiffer = this._y - _root.gobj["obj_enemy" + i]._y;
this.distance = Math.sqrt((this.xdiffer * this.xdiffer) + (this.ydiffer * this.ydiffer));
if (this.distance < (this._width + _root.gobj["obj_enemy" + i]._width)) {
_root.spreadbombnum--;
_root.objPlacer(_root.gobj, "herobullet", "fx_explode03", "M fx_explode03", this._x, this._y);
_root.gobj["fx_explode03" + _root.herobulletid]._xscale = 100 + (_root.spreadbomblv * _root.spreadbomrad);
_root.gobj["fx_explode03" + _root.herobulletid]._yscale = 100 + (_root.spreadbomblv * _root.spreadbomrad);
_root.spreadBomb(_root.gobj["fx_explode03" + _root.herobulletid], Power);
_root.fx_explode03.start(0, 1);
removeMovieClip(this);
} else if ((((this._x < _root.gbdx1) or (this._x > _root.gbdx2)) or (this._y < _root.gbdy1)) or (this._y > _root.gbdy2)) {
_root.spreadbombnum--;
removeMovieClip(this);
}
i++;
}
}
};
}
function spreadBomb(Obj, Power) {
Obj.onEnterFrame = function () {
if ((_root.gamepause == false) and (_root.systpause == false)) {
if (this._currentframe >= this._totalframes) {
removeMovieClip(this);
}
i = 0;
while (i <= _root.enemynummax) {
if (((((_root.level == 3) or (_root.level == 6)) or (_root.level == 9)) or (_root.level == 12)) or (_root.level == 15)) {
this.xdifferB = this._x - _root.gobj["obj_boss" + i]._x;
this.ydifferB = this._y - _root.gobj["obj_boss" + i]._y;
this.distanceB = Math.sqrt((this.xdifferB * this.xdifferB) + (this.ydifferB * this.ydifferB));
if (this.distanceB < ((this._width / 2) + (_root.gobj["obj_boss" + i]._width / 2))) {
_root.gobj["obj_boss" + i].hp = _root.gobj["obj_boss" + i].hp - Power;
}
}
this.xdiffer = this._x - _root.gobj["obj_enemy" + i]._x;
this.ydiffer = this._y - _root.gobj["obj_enemy" + i]._y;
this.distance = Math.sqrt((this.xdiffer * this.xdiffer) + (this.ydiffer * this.ydiffer));
if (this.distance < ((this._width / 2) + (_root.gobj["obj_enemy" + i]._width / 2))) {
_root.gobj["obj_enemy" + i].hp = _root.gobj["obj_enemy" + i].hp - Power;
}
i++;
}
}
};
}
function playerControll(obj) {
obj._x = _xmouse;
obj._y = _ymouse;
obj.onMouseDown = function () {
_root.herogunrotspd = 15;
};
obj.onMouseUp = function () {
_root.herogunrotspd = 0;
};
if (_root.heroshield < _root.enegyshield[_root.enegyshieldlv]) {
_root.heroreco_cdt++;
if (_root.heroreco_cdt >= _root.heroreco_actt) {
_root.heroreco_cdt = 0;
_root.heroshield = _root.heroshield + ((_root.enegyshieldlv / 3) + (_root.enegyshield[_root.enegyshieldlv] / 20));
}
if (_root.heroshield > _root.enegyshield[_root.enegyshieldlv]) {
_root.heroshield = _root.enegyshield[_root.enegyshieldlv];
}
}
_root.gobj.obj_hero.gun._rotation = _root.gobj.obj_hero.gun._rotation + (1 + _root.herogunrotspd);
_root.heroatt_cdt = _root.heroatt_cdt + (1 + (random(14) / 5));
if (_root.spreadbombnum < _root.spreadbombnummax) {
_root.herobomp_cdt = _root.herobomp_cdt + 1;
}
if (_root.heroatt_cdt >= _root.heroatt_actt[_root.autodefgunlv]) {
var _local2 = _root.gobj.obj_hero.gun._rotation * (Math.PI/180);
var _local5 = _root.gobj.obj_hero._x + (_root.gobj.obj_hero.gun._width * Math.cos(_local2));
var _local4 = _root.gobj.obj_hero._y + (_root.gobj.obj_hero.gun._width * Math.sin(_local2));
_root.fx_gun02.start(0, 1);
_root.heroatt_cdt = _root.heroatt_cdt - _root.heroatt_actt[_root.autodefgunlv];
objPlacer(_root.gobj, "herobullet", "obj_bullet00", "M obj_bullet02", _local5, _local4);
autoVulcan(_root.gobj["obj_bullet00" + _root.herobulletid], _root.herobulletspd, _root.autogunattpow[_root.autodefgunlv], _local2);
}
if (_root.herobomp_cdt >= _root.herobomp_actt[_root.spreadbomblv]) {
var _local2 = _root.gobj.obj_hero.gun._rotation * (Math.PI/180);
var _local5 = _root.gobj.obj_hero._x + (_root.gobj.obj_hero.gun._width * Math.cos(_local2));
var _local4 = _root.gobj.obj_hero._y + (_root.gobj.obj_hero.gun._width * Math.sin(_local2));
_root.spreadbombnum++;
_root.herobomp_cdt = _root.herobomp_cdt - _root.herobomp_actt[_root.spreadbomblv];
objPlacer(_root.gobj, "herobullet", "obj_bullet03", "M obj_bullet03", _local5, _local4);
bompLauncher(_root.gobj["obj_bullet03" + _root.herobulletid], 1, _root.spreadbombpow, _local2);
}
}
function removeClip() {
removeMovieClip(_root.pa_help);
removeMovieClip(_root.pa_syst);
removeMovieClip(_root.fx_over);
removeMovieClip(_root.fx_lvclear);
}
function attachClip(Attapath) {
_root.gobj.attachMovie("M obj_hero", "obj_hero", _root.gobj.getNextHighestDepth());
_root.gobj.obj_hero._x = -100;
}
function pauseChecke() {
if ((_root.gamepause == true) or (_root.systpause == true)) {
_root.b_pause.gotoAndStop("pause");
} else {
_root.b_pause.gotoAndStop("play");
}
}
function saveData() {
_root.so.data.level = _root.level;
}
if (_root.so.data.continued == true) {
_root.so.data.continued = false;
_root.so.data.continued = false;
} else {
_root.level = 1;
_root.score = 0;
}
_root.gamepause = false;
_root.systpause = false;
_root.levelmax = 15;
_root.gobj.obj_boss0.hp = 0;
_root.gameover = false;
_root.timecounterini = 2100;
_root.timecounter = 0;
_root.material = 0;
_root.energy = 0;
_root.energyrq = new Array(0, 30, 30, 25, 31, 31, 26, 32, 32, 27, 33, 33, 28, 34, 35, 29);
_root.gbdx1 = -200;
_root.gbdx2 = 840;
_root.gbdy1 = -100;
_root.gbdy2 = 580;
_root.bulletid = 0;
_root.bulletidmax = 200;
_root.fxid = 0;
_root.fxidmax = 50;
_root.heroshield = 0;
_root.heroreco_cdt = 0;
_root.heroreco_actt = 600;
_root.herobulletid = 0;
_root.herobulletidmax = 150;
_root.herovsitem = 15;
_root.herovsene = 1;
_root.herogunrotspd = 0;
_root.herobulletspd = 22;
_root.heroatt_cdt = 0;
_root.heroatt_actt = new Array(99, 30, 28, 26, 24, 22, 20, 18, 16, 14);
_root.herobomp_cdt = 0;
_root.herobomp_actt = new Array(99, 47, 45, 43, 41, 39, 37, 35, 33, 31);
_root.enegyshield = new Array(0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50);
_root.enegyshieldlv = 1;
_root.enegyshieldpri = [0, 2, 3, 4, 5, 6, 7, 8, 9, 10, "--"];
_root.autodefgunlv = 1;
_root.autogunattpow = [0, 1.6, 1.9, 2.2, 2.5, 2.8, 3.1, 3.4, 3.7, 4];
_root.autogunpri = [0, 3, 4, 5, 9, 10, 11, 15, 16, 17, "--"];
_root.spreadbomblv = 1;
_root.spreadbomrad = 15;
_root.spreadbombpow = 2;
_root.spreadbombnum = 0;
_root.spreadbombnummax = 4;
_root.spreadbombpri = [0, 3, 4, 5, 9, 10, 11, 15, 16, 17, "--"];
_root.heroshield = _root.enegyshield[_root.enegyshieldlv];
_root.item01id = 0;
_root.item01idmax = 10;
_root.item01num = 0;
_root.item01nummax = 1;
_root.item01_cdt = 0;
_root.item01_actt = 5;
_root.item01_life = 9999;
_root.item02id = 0;
_root.item02idmax = 10;
_root.item02num = 0;
_root.item02nummax = 1;
_root.item02_cdt = 0;
_root.item02_actt = 70;
_root.item02_spd = 5;
_root.bossid = 0;
_root.bossidmax = 0;
_root.bossnum = 0;
_root.bossnummax = 0;
_root.enemyid = 0;
_root.enemyidmax = 40;
_root.enemynum = 0;
_root.enemynummax = 40;
_root.enemy01chance = [0, 99, 0, 80, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
_root.enemy02chance = [0, 50, 99, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0];
_root.enemy03chance = [0, 0, 60, 99, 0, 80, 70, 0, 80, 0, 0, 0, 0, 90, 0, 0];
_root.enemy04chance = [0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
_root.enemy05chance = [0, 0, 0, 0, 90, 30, 0, 40, 0, 0, 30, 0, 0, 0, 0, 0];
_root.enemy06chance = [0, 0, 0, 0, 0, 0, 90, 30, 99, 0, 0, 99, 0, 0, 0, 0];
_root.enemy07chance = [0, 0, 0, 0, 0, 0, 0, 80, 0, 60, 0, 0, 0, 0, 0, 0];
_root.enemy08chance = [0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 40, 0, 0, 0, 0, 0];
_root.enemy09chance = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 50, 50, 60, 80, 0];
_root.enemy10chance = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 0, 60, 50, 0];
_root.enemy11chance = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 90];
_root.enemy_cdt = 30;
_root.enemy_actt = [99, 30, 30, 45, 28, 28, 45, 26, 26, 45, 24, 24, 45, 22, 22, 45];
_root.Mouse.hide();
_root.songnum = 0;
_root.mainbgm = new Sound();
_root.mainbgm.attachSound("bgm0");
_root.mainbgm.start(0, 1);
_root.fx_gun02 = new Sound();
_root.fx_gun02.attachSound("fx_gun02");
_root.fx_explode01 = new Sound();
_root.fx_explode01.attachSound("fx_explode01");
_root.fx_explode03 = new Sound();
_root.fx_explode03.attachSound("fx_explode03");
_root.fx_explode05 = new Sound();
_root.fx_explode05.attachSound("fx_explode05");
_root.mainbgm.onSoundComplete = function () {
_root.songnum++;
if (_root.songnum > 1) {
_root.songnum = 0;
}
_root.mainbgm.attachSound("bgm" + _root.songnum);
_root.mainbgm.start(0, 1);
};
levelIni();
_root.onEnterFrame = gameCore;
stop();
Symbol 4 Button
on (release) {
moreGame();
}
Symbol 9 MovieClip Frame 1
stop();
Symbol 28 MovieClip [M fx_explode01] Frame 2
_root.fx_explode01.start(0, 1);
Symbol 28 MovieClip [M fx_explode01] Frame 9
removeMovieClip(this);
Symbol 42 Button
on (release) {
_root.moreGame();
}
Symbol 50 Button
on (release) {
getURL ("http://www.mofunzone.com/online_games/blackhole_trek.shtml", "_blank");
}
Symbol 53 Button
on (release) {
_root.moreGame();
}
Symbol 54 MovieClip [M in_submit] Frame 1
stop();
Selection.setFocus("newname");
b_menu.onRelease = function () {
removeMovieClip(_root.gobj);
_root.gotoAndStop("Title", "title");
removeMovieClip(_root.in_submit);
};
b_submit.onRelease = function () {
removeMovieClip(_root.gobj);
_root.gotoAndStop("Title", "title");
removeMovieClip(_root.in_submit);
};
Symbol 75 MovieClip [M obj_enemy_alien01] Frame 9
gotoAndPlay (1);
Symbol 115 MovieClip [M fx_explode02] Frame 8
removeMovieClip(this);
Symbol 121 Button
on (keyPress "k") {
gotoAndPlay ("end");
}
Symbol 197 MovieClip [M in_tutorial] Frame 1
_root.systpause = true;
Symbol 197 MovieClip [M in_tutorial] Frame 435
stop();
_root.systpause = false;
removeMovieClip(this);
Symbol 204 MovieClip [M obj_bullet02] Frame 1
stop();
Symbol 223 MovieClip [M obj_enemy_alien02] Frame 9
gotoAndPlay (1);
Symbol 243 MovieClip [M obj_item01(energy)] Frame 8
stop();
Symbol 276 MovieClip [M fx_explode03] Frame 16
removeMovieClip(this);
Symbol 281 MovieClip Frame 1
stop();
Symbol 285 MovieClip [M dialog_gameover] Frame 1
Symbol 285 MovieClip [M dialog_gameover] Frame 170
_root.attachMovie("M in_submit", "in_submit", _root.getNextHighestDepth());
_root.in_submit._x = 320;
_root.in_submit._y = 240;
removeMovieClip(this);
stop();
Symbol 321 MovieClip [M obj_enemy_alien03] Frame 9
gotoAndPlay (1);
Symbol 341 MovieClip [M obj_item02(material)] Frame 8
stop();
Symbol 359 MovieClip [M fx_explode04] Frame 9
removeMovieClip(this);
Symbol 371 MovieClip [M dialog_help] Frame 1
stop();
b_close.onRelease = function () {
if (_root.gamepause == true) {
_root.gamepause = false;
}
removeMovieClip(_root.dialog_help);
};
b_back.onRelease = function () {
showpage = _currentframe;
if (_currentframe == 1) {
gotoAndStop(_totalframes);
} else {
prevFrame();
}
};
b_next.onRelease = function () {
showpage = _currentframe;
if (_currentframe == _totalframes) {
gotoAndStop (1);
} else {
nextFrame();
}
};
Symbol 391 MovieClip [M obj_enemy_meteor01] Frame 8
gotoAndPlay (1);
Symbol 415 MovieClip [M fx_shield] Frame 4
removeMovieClip(this);
Symbol 473 MovieClip Frame 19
stop();
Symbol 476 Button
on (release) {
_root.moreGame();
}
Symbol 478 MovieClip [M dialog_levelclear] Frame 1
Symbol 478 MovieClip [M dialog_levelclear] Frame 75
if (_root.level >= (_root.levelmax + 1)) {
gotoAndPlay ("ending");
} else {
stop();
}
b_okay.onRelease = function () {
_root.levelIni();
play();
};
_root.b_more.onRelease = function () {
_root.moreGame();
};
sho_material = (sho_material = _root.material);
sho_price0 = _root.enegyshieldpri[_root.enegyshieldlv + 1];
sho_price1 = _root.autogunpri[_root.autodefgunlv + 1];
sho_price2 = _root.spreadbombpri[_root.spreadbomblv + 1];
sho_enegyshieldlv = _root.enegyshieldlv;
sho_autodefgunlv = _root.autodefgunlv;
sho_spreadbomblv = _root.spreadbomblv;
b_upgrade0.onRelease = function () {
if (_root.enegyshieldlv < 9) {
if (_root.material >= _root.enegyshieldpri[_root.enegyshieldlv + 1]) {
_root.enegyshieldlv++;
_root.material = _root.material - _root.enegyshieldpri[_root.enegyshieldlv];
sho_material = _root.material;
sho_enegyshieldlv = _root.enegyshieldlv;
sho_price0 = _root.enegyshieldpri[_root.enegyshieldlv + 1];
}
}
};
b_upgrade1.onRelease = function () {
if (_root.autodefgunlv < 9) {
if (_root.material >= _root.autogunpri[_root.autodefgunlv + 1]) {
_root.autodefgunlv++;
_root.material = _root.material - _root.autogunpri[_root.autodefgunlv];
sho_material = _root.material;
sho_autodefgunlv = _root.autodefgunlv;
sho_price1 = _root.autogunpri[_root.autodefgunlv + 1];
}
}
};
b_upgrade2.onRelease = function () {
if (_root.spreadbomblv < 9) {
if (_root.material >= _root.spreadbombpri[_root.spreadbomblv + 1]) {
_root.spreadbomblv++;
_root.material = _root.material - _root.spreadbombpri[_root.spreadbomblv];
sho_material = _root.material;
sho_spreadbomblv = _root.spreadbomblv;
sho_price2 = _root.spreadbombpri[_root.spreadbomblv + 1];
}
}
};
Symbol 478 MovieClip [M dialog_levelclear] Frame 90
_root.systpause = false;
removeMovieClip(this);
Symbol 478 MovieClip [M dialog_levelclear] Frame 270
_root.attachMovie("M in_submit", "in_submit", _root.getNextHighestDepth());
_root.in_submit._x = 320;
_root.in_submit._y = 240;
removeMovieClip(this);
Symbol 498 MovieClip [M obj_enemy_meteor02] Frame 8
gotoAndPlay (1);
Symbol 555 MovieClip [M fx_explode05] Frame 2
_root.fx_explode05.start(0, 1);
Symbol 555 MovieClip [M fx_explode05] Frame 19
removeMovieClip(this);
Symbol 575 MovieClip [M obj_enemy_meteor03] Frame 8
gotoAndPlay (1);
Symbol 597 MovieClip [M obj_enemy_ship01] Frame 9
gotoAndPlay (1);
Symbol 617 MovieClip [M obj_enemy_ship02] Frame 9
gotoAndPlay (1);
Symbol 636 MovieClip [M obj_enemy_ship03] Frame 9
gotoAndPlay (1);
Symbol 655 MovieClip [M obj_enemy_weir01] Frame 9
gotoAndPlay (1);
Symbol 674 MovieClip [M obj_enemy_weir02] Frame 9
gotoAndPlay (1);
Symbol 675 MovieClip Frame 1
stop();
Symbol 688 Button
on (release) {
getURL ("http://www.mofunzone.com/", "_blank");
}
Symbol 697 Button
on (release) {
moreGame();
}
Symbol 738 MovieClip Frame 1
stop();
Symbol 746 MovieClip Frame 1
stop();
Symbol 750 MovieClip Frame 1
stop();
Symbol 753 MovieClip Frame 1
stop();
Symbol 762 MovieClip Frame 1
stop();
Symbol 764 MovieClip Frame 1
stop();
Symbol 766 MovieClip Frame 20
gotoAndPlay (1);
Symbol 768 MovieClip Frame 20
gotoAndPlay (1);
Symbol 773 MovieClip Frame 1
stop();
Symbol 773 MovieClip Frame 2
stop();
Symbol 777 MovieClip Frame 1
_root.bgm.setVolume(100);
stop();
Symbol 777 MovieClip Frame 2
_root.bgm.setVolume(0);
stop();