Frame 1
function randomInt(maxNum) {
var _local1 = Math.random() * maxNum;
if (_local1 == 0) {
_local1 = 1;
} else {
_local1 = Math.ceil(_local1);
}
return(_local1);
}
function stopTimer(trg, sec) {
var _local1 = this;
target = trg;
target.stop();
target.createEmptyMovieClip("mcTimer", 100000);
target.mcTimer.timeOut = sec;
target.mcTimer.startTime = getTimer();
target.mcTimer.onEnterFrame = function () {
var _local1 = this;
if (getTimer() > (_local1.startTime + _local1.timeOut)) {
_local1._parent.play();
_local1.removeMovieClip();
}
};
}
function talk(trg, delay, msg) {
var _local1 = this;
target = trg;
target.stop();
target.msg = "";
target.createEmptyMovieClip("mcTalk", 100001);
target.mcTalk.msg = msg;
target.mcTalk.msgleng = target.mcTalk.msg.length;
target.mcTalk.i = 0;
target.mcTalk.delay = delay;
target.mcTalk.timeOut = 0;
target.mcTalk.startTime = getTimer();
target.mcTalk.onEnterFrame = function () {
var _local1 = this;
if (getTimer() > (_local1.startTime + _local1.timeOut)) {
_local1.mchara = _local1.msg.charAt(_local1.i);
_local1._parent.msg = _local1._parent.msg + _local1.mchara;
_local1.i++;
if (_local1.i < _local1.msgleng) {
_local1.timeOut = _local1.delay;
_local1.startTime = getTimer();
} else {
_local1._parent.play();
_local1.removeMovieClip();
}
}
};
}
function endP(X, Y) {
var _local1 = _root;
_local1.attachMovie("endPanel", "endPanel", 100002);
_local1.endPanel._x = X;
_local1.endPanel._y = Y;
}
function rankP(X, Y) {
var _local1 = _root;
_local1.attachMovie("rankPanel", "rankPanel", 100002);
_local1.rankPanel._x = X;
_local1.rankPanel._y = Y;
}
function helpP(X, Y) {
var _local1 = _root;
_local1.attachMovie("helpPanel", "helpPanel", 100002);
_local1.helpPanel._x = X;
_local1.helpPanel._y = Y;
}
function clearP(X, Y) {
var _local1 = _root;
_local1.attachMovie("clearPanel", "clearPanel", 100003);
_local1.clearPanel._x = X;
_local1.clearPanel._y = Y;
}
System.useCodePage = true;
fscommand ("showmenu", "false");
score = 0;
levelNum = 0;
gSound = new Sound(_root);
gSound.attachSound("goalsound");
gSound.setVolume(100);
gSound.stop();
hSound = new Sound(_root);
hSound.attachSound("kicksound");
hSound.setVolume(100);
hSound.stop();
stop();
Frame 3
stop();
Symbol 17 MovieClip [clearPanel] Frame 1
point = 0;
this.guard.useHandCursor = false;
Symbol 17 MovieClip [clearPanel] Frame 7
_root.stopTimer(this, 2000);
Symbol 17 MovieClip [clearPanel] Frame 8
pinSound = new Sound(this);
pinSound.attachSound("pin");
pinSound.setVolume(100);
pinSound.start(0, 1000);
this.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
_local1.timeBar._width--;
_local2.point = _local2.point + 10;
_local1.score = _local1.score + 10;
if (_local1.timeBar._width < 1) {
_local1.timeBar._visible = false;
pinSound.stop();
_local2.play();
delete _local2.onEnterFrame;
}
};
stop();
Symbol 17 MovieClip [clearPanel] Frame 9
_root.stopTimer(this, 3000);
Symbol 17 MovieClip [clearPanel] Frame 15
_root.stageNum++;
_root.gotoAndPlay("next");
this.removeMovieClip();
Symbol 23 MovieClip [unit] Frame 1
this.rank = _root["rank" + this.ID];
this.name = _root["name" + this.ID];
this.score = _root["score" + this.ID];
Symbol 30 Button
on (press) {
_root.gotoAndStop("opening");
this.removeMovieClip();
}
Symbol 35 Button
on (release) {
_parent.pageNum--;
_parent.play();
}
Symbol 36 MovieClip Frame 1
this.onEnterFrame = function () {
if (_parent.pageNum == 1) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
};
Symbol 37 Button
on (release) {
_parent.pageNum++;
_parent.play();
}
Symbol 38 MovieClip Frame 1
this.onEnterFrame = function () {
if (_parent.pageNum == 10) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
};
Symbol 43 MovieClip Frame 1
this.page = this.pageNum + "/10";
sNum = ((this.pageNum - 1) * 10) + 1;
mNum = sNum + 9;
pNum = 1;
i = sNum;
while (i <= mNum) {
newName = "unit" + i;
trace(newName);
this.attachMovie("unit", newName, i);
this[newName]._y = 20 * pNum;
this[newName].ID = i;
pNum++;
i++;
}
stop();
Symbol 43 MovieClip Frame 2
i = 1;
while (i <= 100) {
this["unit" + i].removeMovieClip();
i++;
}
Symbol 44 MovieClip [rankPanel] Frame 1
this.guard.useHandCursor = false;
Symbol 44 MovieClip [rankPanel] Frame 11
function loaded(result) {
loadRank(result);
}
function loadRank(list) {
var _local1 = _root;
var _local3 = list.split(newline);
_local1.rankNum = _local3.length - 1;
_local1.rank = 0;
_local1.preScore = "";
i = 0;
while (i <= (_local1.rankNum - 1)) {
var _local2 = _local3[i].split("\t");
_local1["name" + (i + 1)] = _local2[0];
_local1["score" + (i + 1)] = _local2[1];
if (_local1["score" + (i + 1)] == _local1.preScore) {
_local1["rank" + (i + 1)] = _local1.rank;
} else {
_local1.rank++;
_local1["rank" + (i + 1)] = _local1.rank;
}
_local1.preScore = _local1["score" + (i + 1)];
check = (((((i + "\u9806\u4F4D\uFF1A") + _local1["rank" + (i + 1)]) + "\u3000/\u3000\u540D\u524D\uFF1A") + _local1["name" + (i + 1)]) + "\u3000/\u3000\u30B9\u30B3\u30A2\uFF1A") + _local1["score" + (i + 1)];
trace(check);
i++;
}
this.play();
}
var SendData = new LoadVars();
var LoadData = new LoadVars();
SendData.command = "view";
SendData.id = _root.dataID;
conecturl = _root.defurl + Math.random(65536);
SendData.sendAndLoad(conecturl, LoadData, "POST");
LoadData.onData = loaded;
stop();
Symbol 44 MovieClip [rankPanel] Frame 12
stop();
Instance of Symbol 43 MovieClip in Symbol 44 MovieClip [rankPanel] Frame 12
onClipEvent (load) {
this.pageNum = 1;
}
Symbol 45 Button
on (press) {
_root.gotoAndStop("opening");
this.removeMovieClip();
}
Symbol 48 MovieClip [helpPanel] Frame 1
this.guard.useHandCursor = false;
Symbol 48 MovieClip [helpPanel] Frame 12
stop();
Symbol 49 Button
on (press) {
_root.gotoAndStop("opening");
_parent.removeMovieClip();
}
Symbol 54 Button
on (press) {
if (this.name != "") {
play();
}
}
Symbol 64 MovieClip Frame 1
score = _root.score;
stop();
Symbol 64 MovieClip Frame 2
name = "";
stop();
Symbol 64 MovieClip Frame 3
play();
Symbol 64 MovieClip Frame 5
function loaded(result) {
_root.err = result;
play();
}
var SendData = new LoadVars();
var LoadData = new LoadVars();
SendData.command = "save";
SendData.name = this.name;
SendData.score = this.score;
SendData.id = _root.dataID;
conecturl = _root.defurl + Math.random(65536);
SendData.sendAndLoad(conecturl, LoadData, "POST");
LoadData.onData = loaded;
stop();
Symbol 64 MovieClip Frame 10
this.err = _root.err;
stop();
Symbol 65 MovieClip [endPanel] Frame 1
this.guard.useHandCursor = false;
Symbol 65 MovieClip [endPanel] Frame 11
stop();
Symbol 84 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 1
stop();
Symbol 122 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 1
stop();
Symbol 145 MovieClip [pSet] Frame 1
function init() {
this.p.gotoAndStop(this.id);
reSet();
}
function reSet() {
speed = 30 - _root.levelNum;
if (speed <= 2) {
speed = 2;
}
run();
}
function run() {
var _local1 = this;
var _local2 = _root;
p.p.gotoAndStop("run");
opX = 200 + _local2.randomInt(200);
opY = 150 + _local2.randomInt(180);
_local1.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
saBallY = _local2.ballSet1._y - _local1._y;
saBallX = _local2.ballSet1._x - _local1._x;
if ((saBallY <= 0) && (saBallY >= -50)) {
if (saBallX > 5) {
_local1._x = _local1._x + 5;
_xscale = -100;
} else if (saBallX < -5) {
_local1._x = _local1._x - 5;
_xscale = 100;
}
if (_local1.hp.hitTest(_local2.ballSet1)) {
shoot();
}
} else {
saX = opX - _x;
saY = opY - _y;
if ((Math.abs(saX) <= 3) && (Math.abs(saY) <= 3)) {
run();
} else {
if (saX < 0) {
_xscale = 100;
} else {
_xscale = -100;
}
_x = (_x + (saX / speed));
_y = (_y + (saY / speed));
_local1.swapDepths((_local1._y * 100) + id);
}
}
};
}
function shoot() {
var _local1 = this;
_parent.sID = id;
_root.hSound.start();
_root.ballSet1.init();
_parent.ballSet.shoot(_local1._x + 10, _local1._y - 30);
_xscale = -100;
p.p.gotoAndStop("head");
delete _local1.onEnterFrame;
}
function good(X, Y) {
var _local1 = _root;
var _local2 = this;
defX = X;
defY = Y;
p.p.gotoAndStop("good");
opX = (defX + _local1.randomInt(40)) - 20;
opY = (defY + _local1.randomInt(40)) - 20;
_local2.onEnterFrame = function () {
saX = opX - _x;
saY = opY - _y;
if ((Math.abs(saX) <= 1) && (Math.abs(saY) <= 1)) {
opX = (defX + _root.randomInt(40)) - 20;
opY = (defY + _root.randomInt(40)) - 20;
} else {
if (saX < 0) {
_xscale = 100;
} else {
_xscale = -100;
}
_x = (_x + (saX / 5));
_y = (_y + (saY / 5));
this.swapDepths((this._y * 100) + id);
}
};
}
init();
Symbol 156 MovieClip Frame 11
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 158 MovieClip [eSet] Frame 1
function init() {
reSet();
}
function reSet() {
speed = 30 - _root.levelNum;
if (speed <= 2) {
speed = 2;
}
run();
}
function run() {
var _local1 = this;
var _local2 = _root;
e.gotoAndStop("run");
opX = 200 + _local2.randomInt(200);
opY = 150 + _local2.randomInt(180);
_local1.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
saBallY = _local2.ballSet1._y - _local1._y;
saBallX = _local2.ballSet1._x - _local1._x;
if ((saBallY <= 0) && (saBallY >= -30)) {
if (saBallX > 5) {
_local1._x = _local1._x + 5;
_xscale = -100;
} else if (saBallX < -5) {
_local1._x = _local1._x - 5;
_xscale = 100;
}
if (_local1.hp.hitTest(_local2.ballSet1)) {
clearBall();
}
} else {
saX = opX - _x;
saY = opY - _y;
if ((Math.abs(saX) <= 3) && (Math.abs(saY) <= 3)) {
run();
} else {
if (saX < 0) {
_xscale = 100;
} else {
_xscale = -100;
}
_x = (_x + (saX / speed));
_y = (_y + (saY / speed));
_local1.swapDepths((_local1._y * 100) + id);
}
}
};
}
function clearBall() {
var _local1 = this;
_root.hSound.start();
_root.ballSet1.init();
_parent.ballSet.clearBall(_local1._x, _local1._y - 40);
_xscale = 100;
e.gotoAndStop("jump");
delete _local1.onEnterFrame;
}
init();
Symbol 159 Button
on (release) {
play();
}
Symbol 170 MovieClip Frame 1
function init() {
delete this.onEnterFrame;
_y = -100;
}
function shoot(X, Y) {
var _local1 = this;
_x = X;
_y = Y;
radian = Math.atan2((200 + _root.randomInt(50)) - _local1._y, 480 - _local1._x);
kakudo = (radian / (Math.PI/180)) + 90;
r = kakudo * (Math.PI/180);
ySpeed = -15 * Math.cos(r);
xSpeed = 15 * Math.sin(r);
_local1.onEnterFrame = function () {
_y = (_y + ySpeed);
_x = (_x + xSpeed);
if (_x >= 480) {
_parent.goal();
_x = 480;
delete this.onEnterFrame;
}
};
}
function clearBall(X, Y) {
var _local1 = _parent;
var _local2 = _root;
var _local3 = this;
_x = X;
_y = Y;
radian = Math.atan2(-100 - _local3._y, _local2.randomInt(200) - _local3._x);
kakudo = (radian / (Math.PI/180)) + 90;
r = kakudo * (Math.PI/180);
ySpeed = -15 * Math.cos(r);
xSpeed = 15 * Math.sin(r);
_local3.onEnterFrame = function () {
var _local1 = _parent;
var _local2 = _root;
_y = (_y + ySpeed);
_x = (_x + xSpeed);
if (_y <= -30) {
_local2.missSet.nextFrame();
if (_local2.missSet._currentframe >= 6) {
_local2.kSet.bad();
delete this.onEnterFrame;
} else {
i = 4;
while (i < (4 + _local1.eNum)) {
_local1["e" + i].reSet();
i++;
}
_local2.kSet.reSet();
init();
}
}
};
}
init();
stop();
Symbol 171 MovieClip Frame 1
function goal() {
var _local1 = this;
var _local2 = _root;
_local2.gSound.start();
i = 1;
while (i <= 3) {
_local1["p" + i].good(_local1["p" + sID]._x, _local1["p" + sID]._y);
i++;
}
_local2.missSet.gotoAndStop(1);
_local2.score++;
_local2.count++;
if (_local2.count >= 3) {
_local2.count = 0;
_local2.levelNum++;
if ((_local2.levelNum % 3) == 0) {
addE();
}
}
timeOut = 3000;
startTime = getTimer();
_local1.onEnterFrame = function () {
if (getTimer() > (startTime + timeOut)) {
reSet();
delete this.onEnterFrame;
}
};
}
function reSet() {
var _local1 = this;
i = 1;
while (i <= 3) {
_local1["p" + i].reSet();
i++;
}
_local1.ballSet.init();
_root.kSet.reSet();
}
function addE() {
var _local1 = this;
eNum++;
newName = "e" + (3 + eNum);
_local1.attachMovie("eSet", newName, 3 + eNum);
_local1[newName].id = 3 + eNum;
_local1[newName]._x = 250;
_local1[newName]._y = 400;
}
sID = 0;
eNum = 2;
i = 1;
while (i <= 3) {
newName = "p" + i;
this.attachMovie("pSet", newName, i);
this[newName].id = i;
this[newName]._x = 250;
this[newName]._y = 400;
i++;
}
i = 4;
while (i < (4 + eNum)) {
newName = "e" + i;
this.attachMovie("eSet", newName, i);
this[newName].id = i;
this[newName]._x = 250;
this[newName]._y = 400;
i++;
}
Symbol 175 MovieClip Frame 5
stop();
Symbol 177 MovieClip Frame 1
speed = 3 + (_root.levelNum / 5);
this.onEnterFrame = function () {
_rotation = (_rotation + speed);
if (_rotation > 80) {
_rotation = 80;
speed = -speed;
} else if (_rotation < 0) {
_rotation = 0;
speed = -speed;
}
};
Symbol 180 MovieClip Frame 1
function reSet() {
var _local1 = this;
_local1.gotoAndStop(3);
timeOut = 300;
startTime = getTimer();
_local1.onEnterFrame = function () {
var _local1 = this;
if (getTimer() > (startTime + timeOut)) {
_local1.gotoAndStop(4);
_local1.onMouseDown = function () {
nage();
};
delete _local1.onEnterFrame;
}
};
}
function nage() {
var _local1 = this;
delete yaji.onEnterFrame;
_root.ballSet1.nage(yaji._rotation);
_local1.gotoAndStop(5);
timeOut = 1000;
startTime = getTimer();
_local1.onEnterFrame = function () {
if (getTimer() > (startTime + timeOut)) {
gotoAndStop (2);
delete this.onEnterFrame;
}
};
delete _local1.onMouseDown;
}
function bad() {
var _local1 = this;
trace("bad");
_root.gameover._alpha = 100;
_local1.gotoAndStop("bad");
delete _local1.onMouseDown;
timeOut = 2000;
startTime = getTimer();
_local1.onEnterFrame = function () {
if (getTimer() > (startTime + timeOut)) {
_root.endP(250, 175);
delete this.onEnterFrame;
}
};
}
reSet();
stop();
Symbol 181 MovieClip Frame 1
function init() {
delete this.onEnterFrame;
_y = -100;
}
function nage(num) {
var _local1 = _root;
rot = num;
r = (rot * Math.PI) / 180;
ySpeed = -18 * Math.cos(r);
xSpeed = 18 * Math.sin(r);
_x = 55;
_y = 150;
this.onEnterFrame = function () {
var _local1 = _root;
ySpeed = ySpeed + 1;
_y = (_y + ySpeed);
_x = (_x + xSpeed);
if ((_x >= 520) || (_y >= 400)) {
_local1.missSet.nextFrame();
if (_local1.missSet._currentframe >= 6) {
_local1.kSet.bad();
delete this.onEnterFrame;
} else {
_local1.kSet.reSet();
init();
}
}
};
}
stop();
Symbol 183 MovieClip Frame 1
stop();