Frame 1
function set_score() {
score.sbox.text = sc_point;
}
Stage.scaleMode = "noScale";
Stage.align = "";
Stage.showMenu = false;
System.useCodepage = true;
var sc_point = 0;
var rank_up = false;
Frame 2
this.stop();
Frame 7
this.stop();
Symbol 12 MovieClip [kake] Frame 19
gotoAndPlay (1);
Symbol 42 MovieClip Frame 40
gotoAndPlay (1);
Symbol 44 MovieClip Frame 21
this.stop();
Symbol 45 MovieClip [mu2] Frame 17
gotoAndPlay ("down");
Symbol 45 MovieClip [mu2] Frame 26
gotoAndPlay ("nback");
Symbol 45 MovieClip [mu2] Frame 43
gotoAndPlay ("up");
Symbol 45 MovieClip [mu2] Frame 96
this.stop();
Symbol 45 MovieClip [mu2] Frame 114
this.md = 2;
Symbol 45 MovieClip [mu2] Frame 147
gotoAndPlay ("guru");
Symbol 45 MovieClip [mu2] Frame 157
this.stop();
Symbol 45 MovieClip [mu2] Frame 169
this.stop();
Symbol 45 MovieClip [mu2] Frame 191
this.stop();
Symbol 60 MovieClip [mu3] Frame 36
gotoAndPlay ("down");
Symbol 60 MovieClip [mu3] Frame 45
gotoAndPlay ("nback");
Symbol 60 MovieClip [mu3] Frame 54
gotoAndPlay ("up");
Symbol 60 MovieClip [mu3] Frame 79
gotoAndPlay ("dstop");
Symbol 60 MovieClip [mu3] Frame 126
this.md = 2;
Symbol 60 MovieClip [mu3] Frame 159
gotoAndPlay ("guru");
Symbol 60 MovieClip [mu3] Frame 169
this.stop();
Symbol 60 MovieClip [mu3] Frame 181
this.stop();
Symbol 60 MovieClip [mu3] Frame 203
this.stop();
Symbol 71 MovieClip [mu4] Frame 17
gotoAndPlay ("down");
Symbol 71 MovieClip [mu4] Frame 26
gotoAndPlay ("nback");
Symbol 71 MovieClip [mu4] Frame 43
gotoAndPlay ("up");
Symbol 71 MovieClip [mu4] Frame 96
this.stop();
Symbol 71 MovieClip [mu4] Frame 114
this.md = 2;
Symbol 71 MovieClip [mu4] Frame 147
gotoAndPlay ("guru");
Symbol 71 MovieClip [mu4] Frame 157
this.stop();
Symbol 71 MovieClip [mu4] Frame 169
this.stop();
Symbol 71 MovieClip [mu4] Frame 191
this.stop();
Symbol 76 MovieClip [toge] Frame 16
gotoAndPlay ("down");
Symbol 76 MovieClip [toge] Frame 32
gotoAndPlay ("nback");
Symbol 76 MovieClip [toge] Frame 49
gotoAndPlay ("up");
Symbol 76 MovieClip [toge] Frame 103
this.stop();
Symbol 76 MovieClip [toge] Frame 131
this.md = 2;
Symbol 76 MovieClip [toge] Frame 164
gotoAndPlay ("guru");
Symbol 76 MovieClip [toge] Frame 174
this.stop();
Symbol 76 MovieClip [toge] Frame 195
this.stop();
Symbol 76 MovieClip [toge] Frame 217
this.stop();
Symbol 81 MovieClip [egg] Frame 39
gotoAndPlay ("down");
Symbol 81 MovieClip [egg] Frame 48
gotoAndPlay ("nback");
Symbol 81 MovieClip [egg] Frame 65
gotoAndPlay ("up");
Symbol 81 MovieClip [egg] Frame 119
this.stop();
Symbol 81 MovieClip [egg] Frame 177
this.md = 2;
Symbol 81 MovieClip [egg] Frame 210
gotoAndPlay ("guru");
Symbol 81 MovieClip [egg] Frame 224
this.stop();
Symbol 81 MovieClip [egg] Frame 245
this.stop();
Symbol 81 MovieClip [egg] Frame 267
this.stop();
Symbol 104 MovieClip [mu5] Frame 17
gotoAndPlay ("down");
Symbol 104 MovieClip [mu5] Frame 26
gotoAndPlay ("nback");
Symbol 104 MovieClip [mu5] Frame 43
gotoAndPlay ("up");
Symbol 104 MovieClip [mu5] Frame 96
this.stop();
Symbol 104 MovieClip [mu5] Frame 112
this.md = 2;
Symbol 104 MovieClip [mu5] Frame 136
this.md = 2;
Symbol 104 MovieClip [mu5] Frame 169
gotoAndPlay ("guru");
Symbol 104 MovieClip [mu5] Frame 179
this.stop();
Symbol 104 MovieClip [mu5] Frame 191
this.stop();
Symbol 104 MovieClip [mu5] Frame 213
this.stop();
Symbol 121 MovieClip [mu1] Frame 17
gotoAndPlay ("down");
Symbol 121 MovieClip [mu1] Frame 26
gotoAndPlay ("nback");
Symbol 121 MovieClip [mu1] Frame 43
gotoAndPlay ("up");
Symbol 121 MovieClip [mu1] Frame 96
this.stop();
Symbol 121 MovieClip [mu1] Frame 114
this.md = 2;
Symbol 121 MovieClip [mu1] Frame 147
gotoAndPlay ("guru");
Symbol 121 MovieClip [mu1] Frame 157
this.stop();
Symbol 121 MovieClip [mu1] Frame 169
this.stop();
Symbol 121 MovieClip [mu1] Frame 191
this.stop();
Symbol 124 MovieClip [tama_wa] Frame 11
this.stop();
Symbol 128 MovieClip [rankkey2] Frame 1
this.stop();
Symbol 131 MovieClip [rankkey] Frame 1
this.stop();
Symbol 139 MovieClip [rankpanel] Frame 1
this.stop();
Symbol 159 MovieClip [klo] Frame 29
this.stop();
Symbol 159 MovieClip [klo] Frame 38
this.stop();
Symbol 159 MovieClip [klo] Frame 69
this.stop();
Symbol 177 MovieClip Frame 43
this.stop();
btn_start.onPress = function () {
play();
};
btn_rank.onPress = function () {
_parent.rank_mc.gotoAndPlay("list");
};
Symbol 177 MovieClip Frame 63
this.stop();
_parent.gotoAndStop("game");
Symbol 179 MovieClip Frame 1
this.onPress = function () {
};
this.useHandCursor = false;
Symbol 215 MovieClip Frame 1
this.stop();
Symbol 225 MovieClip Frame 1
this.stop();
Symbol 225 MovieClip Frame 40
this.stop();
Symbol 239 MovieClip Frame 1
function get_code(cky) {
var _local4;
var _local3;
var _local1;
var _local5;
_local3 = 0;
_local1 = 0;
while (_local1 < cky.length) {
_local3 = _local3 + codetxt.indexOf(cky.charAt(_local1));
_local1++;
}
_local4 = Math.floor(_local3 / 3);
_local3 = _local3 % codelen;
newcode = (codetxt + codetxt).substring(_local3, _local3 + codelen);
return(_local4);
}
function ango_encode(dat, ckey) {
var _local6;
var _local2;
var _local5;
var _local4;
var _local8;
var _local7;
var _local3;
var _local1;
_local3 = get_code(ckey);
_local6 = "";
_local1 = 0;
while (_local1 < dat.length) {
_local2 = dat.charCodeAt(_local1);
if (_local2 > 255) {
_local5 = (_local2 + (_local1 * _local3)) % codelen;
_local4 = Math.floor(_local2 / codelen);
_local8 = (_local4 + (_local1 * _local3)) % codelen;
_local7 = (Math.floor(_local4 / codelen) + (_local1 * _local3)) % codelen;
_local6 = _local6 + (((wbyte + newcode.charAt(_local5)) + newcode.charAt(_local8)) + newcode.charAt(_local7));
} else {
_local5 = (_local2 + (_local1 * _local3)) % codelen;
_local4 = (Math.floor(_local2 / codelen) + (_local1 * _local3)) % codelen;
_local6 = _local6 + (newcode.charAt(_local5) + newcode.charAt(_local4));
}
_local3 = _local3 + _local2;
_local1++;
}
return(_local6);
}
function ango_decode(dat, ckey) {
var _local10;
var _local9;
var _local3;
var _local2;
var _local8;
var _local7;
var _local4;
var _local12;
var _local1;
var _local5;
_local4 = get_code(ckey);
trace(_local4);
_local1 = 0;
_local5 = 0;
_local10 = "";
while (_local1 < dat.length) {
_local9 = dat.charAt(_local1);
if (_local9 == wbyte) {
_local1++;
_local3 = newcode.indexOf(dat.charAt(_local1)) - ((_local5 * _local4) % codelen);
if (_local3 < 0) {
_local3 = _local3 + codelen;
}
_local1++;
_local2 = newcode.indexOf(dat.charAt(_local1)) - ((_local5 * _local4) % codelen);
if (_local2 < 0) {
_local2 = _local2 + codelen;
}
_local1++;
_local8 = newcode.indexOf(dat.charAt(_local1)) - ((_local5 * _local4) % codelen);
if (_local8 < 0) {
_local8 = _local8 + codelen;
}
_local7 = (_local3 + (_local2 * codelen)) + ((_local8 * codelen) * codelen);
_local10 = _local10 + String.fromCharCode(_local7);
} else {
_local3 = newcode.indexOf(_local9) - ((_local5 * _local4) % codelen);
if (_local3 < 0) {
_local3 = _local3 + codelen;
}
_local1++;
_local2 = newcode.indexOf(dat.charAt(_local1)) - ((_local5 * _local4) % codelen);
if (_local2 < 0) {
_local2 = _local2 + codelen;
}
_local7 = _local3 + (_local2 * codelen);
_local10 = _local10 + String.fromCharCode(_local7);
}
_local4 = _local4 + _local7;
_local1++;
_local5++;
}
return(_local10);
}
var wbyte = "i";
var codetxt = "rJeaEz0RcW8g6YoZfAnwQpSC59FVLUbDd3shTqmHyGKkBuXNl24PM1jIt7vOx";
var codelen = codetxt.length;
var codekey = "mu";
var newcode = "";
var rank_url;
var my_name = "";
var my_score = 0;
var lvsend;
var lvload;
var rdat;
var scl = 0;
var rmax = 0;
var rht = 30;
var ranksy;
var rankd = 0;
var keydata = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!?;:,.0123456789-/&@ <";
var strnum;
var strname;
var namemax = 6;
var rankstr;
var rankenc;
var mylc = new LocalConnection();
if (mylc.domain() == "localhost") {
rank_url = "http://localhost/bannam/klo/ranking.php";
} else {
rank_url = "ranking.php";
}
Symbol 239 MovieClip Frame 2
this.stop();
Symbol 239 MovieClip Frame 13
function set_rank() {
var _local3;
var _local2;
var _local1;
rmax = 0;
_local2 = 0;
while (_local2 < rdat.length) {
if (rdat[_local2]) {
_local1 = new Array();
_local1 = rdat[_local2].split("<>");
_local3 = ranklist.attachMovie("rankpanel", "r" + _local2, _local2 + 1);
_local3._y = _local2 * rht;
_local3.rbox.text = _local1[0];
_local3.nbox.text = _local1[2];
_local3.sbox.text = _local1[1];
_local3.dbox.text = _local1[3];
if ((my_score == Number(_local1[1])) && (my_name == _local1[2])) {
_local3.gotoAndStop(2);
}
rmax++;
}
if (rmax >= 100) {
break;
}
_local2++;
}
if (rmax > 10) {
btn_up._visible = true;
btn_dw._visible = true;
}
}
this.stop();
rmax = 0;
scl = 0;
rankd = 0;
btn_up._visible = false;
btn_dw._visible = false;
ranksy = ranklist._y;
error_mc._visible = false;
ranklist.setMask(rank_mask);
btn_close._visible = false;
lvsend = new LoadVars();
lvsend.md = "list";
lvload = new LoadVars();
lvsend.sendAndLoad(rank_url, lvload, "POST");
lvload.onData = function (src) {
btn_close._visible = true;
if ((src == "error") || (src == undefined)) {
err = src.substr(4);
error_mc._visible = true;
} else {
rdat = src.split(newline);
set_rank();
}
};
ranklist.onEnterFrame = function () {
if (scl != 0) {
rankd = rankd + scl;
if (rankd < 0) {
rankd = 0;
} else if (rankd > (rmax - 10)) {
rankd = rmax - 10;
}
}
ranklist._y = ranklist._y + (((ranksy - (rankd * rht)) - ranklist._y) / 4);
};
btn_up.onPress = function () {
scl = -1;
};
btn_dw.onPress = function () {
scl = 1;
};
btn_up.onRelease = (btn_up.onReleaseOutside = function () {
scl = 0;
});
btn_dw.onRelease = (btn_dw.onReleaseOutside = function () {
scl = 0;
});
btn_close.onPress = function () {
play();
};
Symbol 239 MovieClip Frame 21
gotoAndStop ("stop");
Symbol 239 MovieClip Frame 32
function key_button() {
var _local3;
var _local2;
var _local4 = 0;
var _local5 = 0;
_local4 = 0;
_local5 = 0;
_local3 = 0;
while (_local3 < keydata.length) {
if (keydata.charAt(_local3) == "<") {
_local2 = keybd.attachMovie("rankkey2", "k" + _local3, _local3 + 1);
} else {
_local2 = keybd.attachMovie("rankkey", "k" + _local3, _local3 + 1);
_local2.tbox.text = keydata.charAt(_local3);
}
_local2._x = _local4 * 35;
_local2._y = _local5 * 40;
_local2.str = keydata.charAt(_local3);
_local2.onRollOver = function () {
key_over(this);
};
_local2.onRollOut = function () {
key_out(this);
};
_local2.onReleaseOutside = function () {
key_out(this);
};
_local2.onPress = function () {
key_press(this);
};
_local4++;
if (_local4 > 15) {
_local4 = 0;
_local5++;
}
_local3++;
}
}
function key_over(mc) {
mc.gotoAndStop(2);
}
function key_out(mc) {
mc.gotoAndStop(1);
}
function key_press(mc) {
if (mc.str == "<") {
if (strnum > 0) {
strnum--;
eval ("in" + strnum).tbox.text = "";
}
} else if (strnum < namemax) {
eval ("in" + strnum).tbox.text = mc.str;
strnum++;
}
input_box();
}
function input_box() {
var i;
i = 0;
while (i < namemax) {
if (i == strnum) {
eval ("in" + i).gotoAndStop(2);
} else {
eval ("in" + i).gotoAndStop(1);
}
i++;
}
if (strnum == 0) {
btn_send._alpha = 30;
btn_send.enabled = false;
} else {
btn_send._alpha = 100;
btn_send.enabled = true;
}
}
this.stop();
strnum = 0;
strname = "";
key_button();
input_box();
btn_send.onPress = function () {
strname = "";
i = 0;
while (i < namemax) {
strname = strname + eval ("in" + i).tbox.text;
i++;
}
play();
};
btn_cancel.onPress = function () {
gotoAndPlay ("end");
};
Symbol 239 MovieClip Frame 33
this.stop();
error_mc._visible = false;
btn_next._visible = false;
rankin._visible = false;
rankout._visible = false;
effect._visible = false;
rankstr = ((((_parent.sc_point + "<>") + strname) + "<>") + codekey) + "<>";
rankenc = ango_encode(rankstr, codekey);
lvsend = new LoadVars();
lvsend.md = "add";
lvsend.p = rankenc;
lvload = new LoadVars();
lvsend.sendAndLoad(rank_url, lvload, "POST");
lvload.onData = function (src) {
btn_next._visible = true;
if ((src == "error") || (src == undefined)) {
err = src.substr(4);
error_mc._visible = true;
} else if (src == "0") {
rankout._visible = true;
my_score = _parent.sc_point;
my_name = strname;
_parent.rank_up = true;
} else {
rankin._visible = true;
rankin.rbox.text = src;
my_score = _parent.sc_point;
my_name = strname;
_parent.rank_up = true;
if (Number(src) <= 100) {
effect._visible = true;
effect.gotoAndPlay(2);
}
}
};
btn_next.onPress = function () {
gotoAndStop ("disp");
};
Symbol 239 MovieClip Frame 42
gotoAndStop ("stop");
Symbol 259 MovieClip Frame 1
this.stop();
Symbol 259 MovieClip Frame 28
this.stop();
if (_parent._parent.sc_point == 0) {
btn_rank._visible = false;
}
_parent._parent.rank_up = false;
btn_title.onPress = function () {
play();
};
btn_rank.onPress = function () {
_parent._parent.rank_mc.gotoAndPlay("add");
};
this.onEnterFrame = function () {
if (_parent._parent.rank_up) {
btn_rank._visible = false;
}
};
Symbol 259 MovieClip Frame 47
this.stop();
delete this.onEnterFrame;
_parent._parent.gotoAndStop("title");
Symbol 260 MovieClip Frame 1
function set_game_over() {
var _local1;
click_area._visible = false;
game_over = true;
gover._visible = true;
gover.gotoAndPlay("start");
}
function enemy_set() {
var en;
var mc;
var i;
var itm;
var ymu;
if (ewt > 0) {
ewt--;
return(undefined);
}
en = -1;
i = 0;
while (i < enemy.length) {
if (enemy[i] == 0) {
en = i;
break;
}
i++;
}
if (en == -1) {
ewt = 30;
return(undefined);
}
if (killcount >= eggcount) {
eggcount = eggcount + 50;
itm = 9;
} else if (munomal < 3) {
munomal++;
if (mucount > 100) {
itm = Math.floor(Math.random() * 6);
} else {
itm = 0;
}
} else {
munomal = 0;
if (mucount < 8) {
itm = 0;
} else if (mucount < 16) {
itm = 1;
} else if (mucount < 20) {
itm = 2;
} else if (mucount < 32) {
itm = Math.floor(Math.random() * 2) + 1;
} else if (mucount < 36) {
itm = 3;
} else if (mucount < 50) {
itm = Math.floor(Math.random() * 3) + 1;
} else if (mucount < 54) {
itm = 4;
} else if (mucount < 100) {
itm = Math.floor(Math.random() * 4) + 1;
} else {
itm = Math.floor(Math.random() * 5) + 1;
}
}
if (itm == 4) {
i = 0;
while (i < enemy.length) {
if (enemy[i] == (itm + 10)) {
itm = 0;
break;
}
i++;
}
}
ymu = 0;
if (itm == 3) {
i = 0;
while (i < enemy.length) {
if (enemy[i] == (itm + 10)) {
ymu++;
}
i++;
}
if (ymu >= 4) {
itm = 0;
}
}
enemy[en] = itm + 10;
switch (itm) {
case 0 :
mc = mv1.attachMovie("mu1", "mu" + en, en + dep[2]);
mc.ct = itm + 10;
mc.sc = 50;
mc.spd = 2;
if ((mucount > 20) && (Math.random() < 0.3)) {
mc.spd = 3;
}
mc.hp = 1;
mc.def = false;
mc.mt = false;
mc.nb = true;
mc.pt = 100;
break;
case 1 :
mc = mv1.attachMovie("mu2", "mu" + en, en + dep[2]);
mc.ct = itm + 10;
mc.sc = 50;
mc.spd = 3;
if ((mucount > 30) && (Math.random() < 0.3)) {
mc.spd = 4;
}
mc.hp = 1;
mc.def = true;
mc.mt = false;
mc.nb = true;
mc.pt = 200;
break;
case 2 :
mc = mv1.attachMovie("mu3", "mu" + en, en + dep[2]);
mc.ct = itm + 10;
mc.sc = 50;
mc.spd = 4;
if ((mucount > 30) && (Math.random() < 0.3)) {
mc.spd = 6;
}
mc.hp = 1;
mc.def = false;
mc.mt = false;
mc.nb = true;
mc.pt = 200;
break;
case 3 :
mc = mv1.attachMovie("mu4", "mu" + en, en + dep[2]);
mc.ct = itm + 10;
mc.sc = 50;
mc.spd = 2;
mc.hp = 1;
mc.def = false;
mc.mt = true;
mc.nb = true;
mc.pt = 500;
break;
case 4 :
mc = mv1.attachMovie("mu1", "mu" + en, en + dep[2]);
mc.ct = itm + 10;
mc.sc = 120;
mc.spd = 1;
mc.hp = 5;
mc.def = false;
mc.mt = true;
mc.nb = false;
mc.pt = 1000;
break;
case 5 :
mc = mv1.attachMovie("toge", "mu" + en, en + dep[2]);
mc.ct = itm + 10;
mc.sc = 50;
mc.spd = 6;
if ((mucount > 200) && (Math.random() < 0.5)) {
mc.spd = 8;
}
mc.hp = 256;
mc.def = false;
mc.mt = true;
mc.nb = false;
mc.pt = 0;
break;
case 9 :
mc = mv1.attachMovie("egg", "mu" + en, en + dep[2]);
mc.ct = itm + 10;
mc.sc = 50;
mc.spd = 0;
mc.hp = 1;
mc.def = false;
mc.mt = true;
mc.nb = false;
mc.pt = 5000;
}
mc.id = en;
mc.wt = Math.floor((Math.random() * 160) + 10);
mc.md = 1;
mc.omd = 1;
mc.cy = gh;
mc.cz = 950;
if (itm == 5) {
mc.cx = klo.cx;
mc.tg == 0;
mc.pd = 270;
} else {
mc.cx = (Math.random() * 600) - 300;
mc.tg = lockon(rd);
if (mc.tg >= 0) {
mc.pd = houkou(mc, eval ("mv1.kake" + mc.tg));
} else {
mc.pd = 270;
}
}
mc.sd = mv2.attachMovie("shadow", "sd" + en, en + dep[2]);
mc.sd._alpha = 30;
mc.gotoAndPlay("fall");
obj.push(mc);
if (itm == 9) {
ewt = Math.floor((Math.random() * 30) + 10);
} else {
mucount++;
if (mucount < 30) {
ewt = Math.floor((Math.random() * 60) + 30);
} else if (mucount < 50) {
ewt = Math.floor((Math.random() * 30) + 30);
} else if (mucount < 100) {
ewt = Math.floor((Math.random() * 60) + 30);
} else if (mucount < 150) {
ewt = Math.floor((Math.random() * 30) + 30);
} else if (mucount < 200) {
ewt = Math.floor((Math.random() * 60) + 15);
} else if (mucount < 250) {
ewt = Math.floor((Math.random() * 30) + 15);
} else if (mucount < 500) {
ewt = Math.floor((Math.random() * 30) + 15);
} else {
ewt = Math.floor((Math.random() * 30) + 5);
}
}
}
function change_yoroi(num) {
var mc;
var mn;
var dp;
dp = (obj[num].id + dep[2]) + 100;
mc = mv1.attachMovie("mu5", "mu" + dp, dp);
mc.ct = 16;
mc.sc = 50;
mc.spd = 4;
mc.hp = 1;
mc.def = false;
mc.mt = false;
mc.nb = true;
mc.pt = 500;
mc.id = obj[num].id;
mc.wt = Math.floor((Math.random() * 60) + 30);
mc.md = 7;
mc.omd = 7;
mc.cy = gh;
mc.cz = obj[num].cz;
mc.cx = obj[num].cx;
mc.tg = obj[num].tg;
if (mc.tg >= 0) {
mc.pd = houkou(mc, eval ("mv1.kake" + mc.tg));
} else {
mc.pd = 270;
}
mc.sd = obj[num].sd;
mc.gotoAndPlay("change");
enemy[obj[num].id] = 16;
obj[num].removeMovieClip();
obj[num] = mc;
}
function lockon() {
var _local2;
var _local1;
_local1 = Math.floor(Math.random() * kakera.length);
if (kakera[_local1] == 1) {
return(_local1);
}
return(-1);
}
function houkou(mc1, mc2) {
return(_kakudo(mc1.cx, mc1.cz, mc2.cx, mc2.cz));
}
function object_move() {
var _local1;
var _local2;
_local1 = 0;
while (_local1 < obj.length) {
switch (obj[_local1].ct) {
case 2 :
klo_fire_move(obj[_local1]);
break;
case 10 :
case 16 :
mu1_mv(obj[_local1]);
break;
case 11 :
mu1_mv(obj[_local1]);
break;
case 12 :
mu1_mv(obj[_local1]);
break;
case 13 :
mu1_mv(obj[_local1]);
break;
case 14 :
mu1_mv(obj[_local1]);
break;
case 15 :
toge_mv(obj[_local1]);
break;
case 19 :
egg_mv(obj[_local1]);
}
_local1++;
}
}
function mu1_mv(mc) {
var fr;
var flg;
var i;
switch (mc.md) {
case 1 :
case 2 :
if (mc.md != mc.omd) {
mc.omd = mc.md;
mc.gotoAndPlay("down");
}
mc.cx = mc.cx + (Math.cos((mc.pd / 180) * Math.PI) * mc.spd);
mc.cz = mc.cz + (Math.sin((mc.pd / 180) * Math.PI) * mc.spd);
flg = false;
i = 0;
while (i < obj.length) {
if ((obj[i].ct == 1) && (kakera[obj[i].id] == 1)) {
if (hantei(mc, obj[i], 20)) {
kakera[obj[i].id] = 2;
mc.tg = obj[i].id;
mc.md = 10;
mc.pd = 90;
flg = true;
break;
}
}
i++;
}
if (flg == false) {
move_hantei(mc);
mc.wt--;
if (mc.wt <= 0) {
if (mc.ct == 12) {
mc.wt = 48;
} else {
mc.wt = 52;
}
mc.md = 4;
}
}
if (mc.ct == 11) {
mc.def = true;
}
return;
case 4 :
if (mc.md != mc.omd) {
mc.omd = mc.md;
mc.gotoAndPlay("dstop");
}
mc.wt--;
if (mc.wt <= 0) {
mc.wt = Math.floor((Math.random() * 150) + 30);
mc.md = 2;
if (mc.tg >= 0) {
if (kakera[mc.tg] == 1) {
mc.pd = houkou(mc, eval ("mv1.kake" + mc.tg));
} else {
mc.tg = lockon();
}
} else {
mc.tg = lockon();
}
}
if (mc.ct == 11) {
mc.def = false;
}
return;
case 6 :
if (mc.md != mc.omd) {
mc.omd = mc.md;
mc.gotoAndPlay("nback");
}
mc.cz = mc.cz + 2;
mc.wt--;
if (mc.wt <= 0) {
mc.wt = Math.floor((Math.random() * 60) + 10);
mc.md = 2;
if (mc.tg >= 0) {
if (kakera[mc.tg] == 1) {
mc.pd = houkou(mc, eval ("mv1.kake" + mc.tg));
} else {
mc.tg = lockon();
}
} else {
mc.tg = lockon();
}
}
if (mc.ct == 11) {
mc.def = true;
}
return;
case 7 :
mc.cz = mc.cz + 2;
return;
case 10 :
if (mc.md != mc.omd) {
mc.omd = mc.md;
mc.gotoAndPlay("up");
}
mc.cx = mc.cx + ((Math.cos((mc.pd / 180) * Math.PI) * mc.spd) / 2);
mc.cz = mc.cz + ((Math.sin((mc.pd / 180) * Math.PI) * mc.spd) / 2);
eval ("mv1.kake" + mc.tg).cx = mc.cx;
eval ("mv1.kake" + mc.tg).cz = mc.cz - 5;
if (mc.cz > 950) {
mc.md = 30;
mc.wt = 20;
if (mc.sd) {
mc.sd.removeMovieClip();
mc.sd = null;
}
mc.gotoAndPlay("get");
kakera[mc.tg] = 0;
object_erace(eval ("mv1.kake" + mc.tg));
kakenum--;
if (kakenum <= 0) {
set_game_over();
}
}
if (mc.ct == 11) {
mc.def = false;
}
return;
case 20 :
mc.cz = mc.cz - 20;
mc.cx = mc.cx + ((klo.cx - mc.cx) / 4);
return;
case 21 :
mc.cx = klo.cx;
return;
case 22 :
mc.cz = mc.cz + 10;
flg = false;
i = 0;
while (i < obj.length) {
if ((obj[i].ct >= 10) and (obj[i].ct < 20)) {
if ((mc.id != obj[i].id) && (obj[i].md < 20)) {
if (hantei(mc, obj[i], (100 * obj[i].sc) / 100)) {
mc.md = 30;
mc.wt = 15;
if (mc.sd) {
mc.sd.removeMovieClip();
mc.sd = null;
}
killcount++;
mc.gotoAndPlay("bomb");
if (obj[i].md == 10) {
kakera[obj[i].tg] = 1;
}
obj[i].hp--;
if (obj[i].def) {
obj[i].hp++;
}
if (obj[i].hp <= 0) {
if (obj[i].ct == 13) {
change_yoroi(i);
} else {
_parent.sc_point = _parent.sc_point + obj[i].pt;
_parent.sc_point = _parent.sc_point + (Math.ceil(mc.cz / 10) * 10);
_parent.set_score();
obj[i].md = 30;
obj[i].wt = 15;
if (obj[i].sd) {
obj[i].sd.removeMovieClip();
obj[i].sd = null;
}
killcount++;
obj[i].gotoAndPlay("bomb2");
}
} else {
obj[i].md = 6;
obj[i].wt = 20;
}
flg = true;
break;
}
}
}
i++;
}
if ((mc.cz > 980) && (flg == false)) {
mc.md = 30;
mc.wt = 15;
if (mc.sd) {
mc.sd.removeMovieClip();
mc.sd = null;
}
mc.gotoAndPlay("bomb");
}
return;
case 30 :
mc.wt--;
if (mc.wt > 0) {
break;
}
enemy[mc.id] = 0;
object_erace(mc);
}
}
function toge_mv(mc) {
var _local3;
var _local2;
var _local4;
switch (mc.md) {
case 1 :
mc.cx = mc.cx + (Math.cos((mc.pd / 180) * Math.PI) * mc.spd);
mc.cz = mc.cz + (Math.sin((mc.pd / 180) * Math.PI) * mc.spd);
case 2 :
case 6 :
if (mc.md == 6) {
mc.md = 2;
}
if (mc.md != mc.omd) {
mc.omd = mc.md;
mc.gotoAndPlay("down");
}
mc.cx = mc.cx + (Math.cos((mc.pd / 180) * Math.PI) * mc.spd);
mc.cz = mc.cz + (Math.sin((mc.pd / 180) * Math.PI) * mc.spd);
if (hantei(mc, klo, 40)) {
mc.md = 30;
mc.wt = 15;
klo.hit = 30;
if (mc.sd) {
mc.sd.removeMovieClip();
mc.sd = null;
}
mc.gotoAndPlay("bomb");
}
if (mc.cz < 400) {
if (mc.sd) {
mc.sd.removeMovieClip();
mc.sd = null;
}
enemy[mc.id] = 0;
object_erace(mc);
}
break;
case 30 :
mc.wt--;
if (mc.wt > 0) {
break;
}
enemy[mc.id] = 0;
object_erace(mc);
}
}
function egg_mv(mc) {
var _local3;
var _local2;
var _local4;
switch (mc.md) {
case 1 :
mc.cz = mc.cz - 2;
mc.wt = 900;
case 2 :
if (mc.md != mc.omd) {
mc.omd = mc.md;
mc.gotoAndPlay("down");
}
mc.wt--;
if (mc.wt <= 0) {
mc.md = 30;
mc.wt = 15;
if (mc.sd) {
mc.sd.removeMovieClip();
mc.sd = null;
}
mc.gotoAndPlay("bomb");
}
break;
case 30 :
mc.wt--;
if (mc.wt > 0) {
break;
}
enemy[mc.id] = 0;
object_erace(mc);
}
}
function move_hantei(mc) {
var _local2 = false;
if ((mc.pd > 0) && (mc.pd < 180)) {
if (mc.cz > 950) {
_local2 = true;
}
}
if ((mc.pd > 180) && (mc.pd < 360)) {
if (mc.cz < 500) {
_local2 = true;
}
}
if ((mc.pd > 90) && (mc.pd < 270)) {
if (mc.cx < -320) {
_local2 = true;
}
}
if ((mc.pd < 90) || (mc.pd > 270)) {
if (mc.cx > 320) {
_local2 = true;
}
}
if (_local2) {
mc.pd = (mc.pd + 180) % 360;
}
}
function klo_init() {
klo.ct = 0;
klo.cx = klo._x;
klo.cy = gh;
klo.cz = 460;
klo.sc = 40;
klo.sd = mv2.ks;
klo.wt = 0;
klo.hit = 0;
klo.enmy = null;
obj.push(klo);
}
function kakera_init() {
var _local1;
var _local2;
_local2 = 0;
while (_local2 < kakera.length) {
_local1 = mv1.attachMovie("kake", "kake" + _local2, _local2 + dep[0]);
_local1.ct = 1;
_local1.id = _local2;
_local1.cx = -250 + (_local2 * 125);
_local1.cy = gh;
_local1._y = -100;
_local1.cz = 500;
_local1.sc = 70;
obj.push(_local1);
_local2++;
}
}
function object_disp() {
var _local3;
var _local1;
var _local2;
var _local4;
_local1 = 0;
while (_local1 < (obj.length - 1)) {
_local2 = _local1 + 1;
while (_local2 < obj.length) {
if (obj[_local1].cz < obj[_local2].cz) {
_local3 = obj[_local2];
obj[_local2] = obj[_local1];
obj[_local1] = _local3;
}
_local2++;
}
_local1++;
}
if (game_over) {
_local1 = 0;
while (_local1 < obj.length) {
obj[_local1].stop();
_local1++;
}
return(undefined);
}
_local4 = true;
_local1 = 0;
while (_local1 < obj.length) {
obj[_local1]._x = posx(obj[_local1].cx, obj[_local1].cz);
obj[_local1]._y = posy(obj[_local1].cy, obj[_local1].cz);
obj[_local1]._xscale = (obj[_local1]._yscale = scale(obj[_local1].cz) * obj[_local1].sc);
obj[_local1].swapDepths(_local1 + 1000);
if (obj[_local1].sd) {
obj[_local1].sd._x = obj[_local1]._x;
obj[_local1].sd._y = posy(gh, obj[_local1].cz);
obj[_local1].sd._xscale = (obj[_local1].sd._yscale = obj[_local1]._xscale);
}
if ((obj[_local1].ct >= 10) and (obj[_local1].ct < 20)) {
if (obj[_local1].md == 10) {
_local4 = false;
}
}
_local1++;
}
if (_local4) {
_local1 = 0;
while (_local1 < kakera.length) {
if (kakera[_local1] == 2) {
kakera[_local1] = 1;
}
_local1++;
}
}
}
function object_erace(mc) {
var _local1;
_local1 = 0;
while (_local1 < obj.length) {
if (obj[_local1] == mc) {
if (obj[_local1].sd) {
obj[_local1].sd.removeMovieClip();
}
obj[_local1].removeMovieClip();
obj[_local1] = obj[obj.length - 1];
obj.pop();
}
_local1++;
}
}
function klo_move() {
var _local1;
var _local3;
var _local2;
var _local4;
if (klo.hit > 0) {
if (klo.hit == 30) {
klo.gotoAndPlay("hit");
}
klo.hit--;
klo.wt = 0;
return(undefined);
}
if (tama_mode == 13) {
klo.wt--;
if (klo.wt <= 0) {
tama_mode = 0;
} else {
return(undefined);
}
}
if ((tama_mode != 0) && (tama_mode != 11)) {
return(undefined);
}
klx = _xmouse;
kly = _ymouse + 617;
klx = (1097 / kly) * klx;
_local3 = klx - klo.cx;
klo.cx = klo.cx + (_local3 / 5);
if (klo.cx < -280) {
klo.cx = -280;
} else if (klo.cx > 280) {
klo.cx = 280;
}
_local2 = Math.abs(Math.ceil(_local3 / 20));
if (_local2 > 4) {
_local2 = 4;
} else if (_local2 < 1) {
_local2 = 1;
}
kmv = (kmv + _local2) % 32;
_local4 = Math.floor(kmv / 8);
if (Math.abs(_local3) < 1) {
if (tama_mode <= 10) {
_local1 = "up";
} else {
_local1 = "up2";
}
_local4 = 0;
} else if (klo.cx > klx) {
if (tama_mode <= 10) {
_local1 = "left";
} else {
_local1 = "lup";
}
} else if (klo.cx < klx) {
if (tama_mode <= 10) {
_local1 = "right";
} else {
_local1 = "rup";
}
}
klo.gotoAndStop(_local1);
klo.gotoAndStop(klo._currentframe + _local4);
}
function klo_fire() {
var _local1;
if (tama_mode == 1) {
_local1 = mv1.attachMovie("tama", "tama", dep[1]);
_local1.ct = 2;
_local1.cx = klo._x;
_local1.cy = gh;
_local1.cz = 500;
_local1.sc = 100;
_local1._rotation = (-klo._x) / 20;
obj.push(_local1);
tama_mode = 2;
_local1 = mv1.attachMovie("tama_wa", "tamawa", dep[1] + 1);
_local1.ct = 0;
_local1.cx = klo._x;
_local1.cy = gh;
_local1.cz = 500;
_local1.sc = 100;
obj.push(_local1);
klo.gotoAndPlay("up");
} else if (tama_mode == 12) {
tama_mode = 13;
klo.enmy.md = 22;
klo.enmy.cy = gh;
klo.enmy.cz = klo.enmy.cz + 10;
klo.wt = 10;
klo.gotoAndPlay("up2");
}
}
function klo_fire_move(mc) {
var _local2;
if (tama_mode == 2) {
mc.cz = mc.cz + 20;
if (mc.cz > 600) {
tama_mode = 3;
}
_local2 = 0;
while (_local2 < obj.length) {
if ((obj[_local2].ct >= 10) and (obj[_local2].ct < 20)) {
if (obj[_local2].md < 20) {
if (hantei(mc, obj[_local2], 30)) {
if (obj[_local2].md == 10) {
kakera[obj[_local2].tg] = 1;
}
if (obj[_local2].mt || (obj[_local2].def)) {
if (obj[_local2].nb) {
obj[_local2].md = 6;
obj[_local2].wt = 20;
}
tama_mode = 3;
} else {
obj[_local2].md = 20;
klo.enmy = obj[_local2];
_parent.sc_point = _parent.sc_point + 10;
_parent.set_score();
tama_mode = 10;
}
break;
}
}
}
_local2++;
}
} else if (tama_mode == 3) {
mc.cz = mc.cz - 20;
if (mc.cz < 500) {
object_erace(mc);
object_erace(mv1.tamawa);
tama_mode = 0;
}
} else if (tama_mode == 10) {
mc.cz = mc.cz - 20;
if (mc.cz < 500) {
object_erace(mc);
object_erace(mv1.tamawa);
tama_mode = 11;
klo.enmy.md = 21;
klo.enmy.cz = klo.cz - 2;
klo.enmy.cy = gh + 30;
klo.enmy.gotoAndPlay("guru");
}
}
}
function hantei(mc1, mc2, d) {
var _local1 = mc1.cz * 2;
var _local2 = mc2.cz * 2;
var _local5 = ((mc1.cx - mc2.cx) * (mc1.cx - mc2.cx)) + ((_local1 - _local2) * (_local1 - _local2));
if (_local5 < (d * d)) {
return(true);
}
return(false);
}
function posx(px, pz) {
if (pz) {
return((px * ph) / pz);
}
return(0);
}
function posy(py, pz) {
if (pz) {
return(((((-py) * ph) / pz) * 1.5) - (ph * 0.7));
}
return(0);
}
function scale(pz) {
var _local1 = ph / (((pz - ph) / 2) + ph);
return(_local1);
}
function _kakudo(x0, y0, x1, y1) {
var _local2;
var _local1 = (Math.atan(Math.abs(y0 - y1) / (Math.abs(x0 - x1) + 0.001)) * 180) / Math.PI;
switch (_quadrant(x0, y0, x1, y1)) {
case 1 :
_local2 = _local1;
break;
case 2 :
_local2 = 180 - _local1;
break;
case 3 :
_local2 = 180 + _local1;
break;
case 4 :
_local2 = 360 - _local1;
}
return(_local2);
}
function _quadrant(x0, y0, x1, y1) {
var _local1;
if ((x1 >= x0) && (y1 >= y0)) {
_local1 = 1;
} else if ((x1 < x0) && (y1 >= y0)) {
_local1 = 2;
} else if ((x1 < x0) && (y1 < y0)) {
_local1 = 3;
} else if ((x1 >= x0) && (y1 < y0)) {
_local1 = 4;
}
return(_local1);
}
function _kyori(x0, y0, x1, y1) {
var _local1;
_local1 = Math.sqrt(((x0 - x1) * (x0 - x1)) + ((y0 - y1) * (y0 - y1)));
return(_local1);
}
var dep = [1, 11, 21, 51, 81];
var kakera = [1, 1, 1, 1, 1];
var kakenum = kakera.length;
var enemy = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var munomal = 0;
var mucount = 0;
var killcount = 0;
var eggcount = 50;
var game_over = false;
var klx = klo._x;
var kly = 0;
var kmv = 0;
var ph = 500;
var gh = -500;
var tama_mode = 0;
var ewt = 30;
var obj = new Array();
var klo = mv1.klomc;
gover._visible = false;
_parent.sc_point = 0;
_parent.set_score();
klo_init();
kakera_init();
click_area.useHandCursor = false;
click_area.onPress = function () {
if (klo_hit > 0) {
return(undefined);
}
if (tama_mode == 0) {
tama_mode = 1;
} else if (tama_mode == 11) {
tama_mode = 12;
}
};
this.onEnterFrame = function () {
if (game_over) {
return(undefined);
}
enemy_set();
klo_move();
klo_fire();
object_move();
object_disp();
};