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;
}
function makeC() {
var _local1 = _root;
newName = "c" + cNum;
if (!_local1[newName]) {
_local1.attachMovie("cSet", newName, cNum);
_local1[newName].id = cNum;
}
cNum++;
if (cNum > 33) {
cNum = 3;
}
}
System.useCodePage = true;
_root.pSet.removeMovieClip();
_root.eSet.removeMovieClip();
score = 0;
levelNum = 1;
comboNum = 0;
point = 0;
dataID = "kuma";
defurl = "../../../cgi-bin/ranking/score.cgi?";
sSound1 = new Sound(_root);
sSound1.attachSound("bgm");
sSound1.setVolume(100);
sSound1.stop();
sSound2 = new Sound(_root);
sSound2.attachSound("bgm2");
sSound2.setVolume(100);
sSound2.stop();
i = 3;
while (i <= 50) {
_root["c" + i].removeMovieClip();
i++;
}
cNum = 3;
stop();
Frame 2
timeOut = 3000;
startTime = getTimer();
this.onEnterFrame = function () {
if (getTimer() > (startTime + timeOut)) {
_root.makeC();
startTime = getTimer();
}
};
_root.pSet.walk();
_root.eSet.walk();
stop();
Frame 3
delete _root.pSet.onEnterFrame;
delete _root.pSet.onMouseDown;
delete _root.eSet.onEnterFrame;
i = 3;
while (i <= 40) {
delete _root["c" + i].onEnterFrame;
i++;
}
sSound1.stop();
sSound2.stop();
stopTimer(this, 3000);
Frame 4
stop();
Symbol 13 MovieClip [clearPanel] Frame 1
point = 0;
Symbol 13 MovieClip [clearPanel] Frame 7
_root.stopTimer(this, 2000);
Symbol 13 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 13 MovieClip [clearPanel] Frame 9
_root.stopTimer(this, 3000);
Symbol 13 MovieClip [clearPanel] Frame 15
_root.stageNum++;
_root.gotoAndPlay("next");
this.removeMovieClip();
Symbol 19 MovieClip [unit] Frame 1
this.rank = _root["rank" + this.ID];
this.name = _root["name" + this.ID];
this.score = _root["score" + this.ID];
Symbol 28 Button
on (press) {
_root.gotoAndStop("opening");
this.removeMovieClip();
}
Symbol 33 Button
on (release) {
_parent.pageNum--;
_parent.play();
}
Symbol 34 MovieClip Frame 1
this.onEnterFrame = function () {
if (_parent.pageNum == 1) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
};
Symbol 35 Button
on (release) {
_parent.pageNum++;
_parent.play();
}
Symbol 36 MovieClip Frame 1
this.onEnterFrame = function () {
if (_parent.pageNum == 10) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
};
Symbol 41 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 41 MovieClip Frame 2
i = 1;
while (i <= 100) {
this["unit" + i].removeMovieClip();
i++;
}
Symbol 42 MovieClip [rankPanel] Frame 1
this.guard.useHandCursor = false;
Symbol 42 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 42 MovieClip [rankPanel] Frame 12
stop();
Instance of Symbol 41 MovieClip in Symbol 42 MovieClip [rankPanel] Frame 12
onClipEvent (load) {
this.pageNum = 1;
}
Symbol 43 Button
on (press) {
_root.gotoAndStop("opening");
this.removeMovieClip();
}
Symbol 46 MovieClip [helpPanel] Frame 1
this.guard.useHandCursor = false;
Symbol 46 MovieClip [helpPanel] Frame 12
stop();
Symbol 47 Button
on (press) {
play();
}
Symbol 49 Button
on (press) {
_root.pSet.removeMovieClip();
_root.eSet.removeMovieClip();
_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 99 MovieClip [cSet] Frame 1
function walk() {
var _local1 = this;
var _local2 = _root;
flg = 0;
_local1.gotoAndStop(2);
_local1.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
_x = (_x + xSpeed);
if ((_x < -60) || (_x > 460)) {
_local2.removeMovieClip();
}
saX = Math.abs(_local1.pSet._x - _x);
saY = Math.abs(_local1.pSet._y - _y);
if (((saX <= 30) && (saY <= 30)) && (_local1.pSet._currentframe <= 2)) {
_local2.findKuma();
}
saX1 = Math.abs(_local1.eSet._x - _x);
saY1 = Math.abs(_local1.eSet._y - _y);
if ((saX1 <= 20) && (saY1 <= 20)) {
_local2.away();
}
};
}
function findKuma() {
var _local1 = _root;
sSound.start();
_local1.score = _local1.score + 10;
_local1.comboNum++;
_local1.pSet.speed = _local1.pSet.speed - 0.1;
if (_local1.pSet.speed < 0.1) {
_local1.pSet.speed = 0.1;
}
offSetX = _local1.randomInt(100) - 50;
offSetY = _local1.randomInt(20);
this.fun2();
}
function fun1() {
var _local1 = _root;
var _local2 = this;
flg = 1;
_local2.gotoAndStop(3);
_local2.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
_local2.swapDepths((_local2._y * 100) + id);
opX = _local1.pSet._x + offSetX;
opY = _local1.pSet._y + offSetY;
saX = opX - _x;
saY = opY - _y;
if ((Math.abs(saX) < 2) && (Math.abs(saY) < 2)) {
} else {
_local2._x = _local2._x + (saX / 10);
_local2._y = _local2._y + (saY / 10);
}
if (_local1.pSet._x > _x) {
_xscale = -100;
} else {
_xscale = 100;
}
if (_local1.randomInt(200) == 1) {
_local2.fun2();
}
saX1 = Math.abs(_local1.eSet._x - _x);
saY1 = Math.abs(_local1.eSet._y - _y);
if ((saX1 <= 20) && (saY1 <= 20)) {
_local1.comboNum--;
if (_local1.comboNum < 0) {
_local1.comboNum = 0;
}
_local1.pSet.speed = _local1.pSet.speed + 0.1;
if (_local1.pSet.speed > 2) {
_local1.pSet.speed = 2;
}
_local2.away();
}
};
}
function fun2() {
var _local1 = _root;
var _local2 = this;
flg = 1;
_local2.gotoAndStop(4);
timeOut = 2000;
startTime = getTimer();
_local2.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
_local2.swapDepths((_local2._y * 100) + id);
opX = _local1.pSet._x + offSetX;
opY = _local1.pSet._y + offSetY;
saX = opX - _x;
saY = opY - _y;
if ((Math.abs(saX) < 2) && (Math.abs(saY) < 2)) {
} else {
_local2._x = _local2._x + (saX / 10);
_local2._y = _local2._y + (saY / 10);
}
if (_local1.pSet._x > _x) {
_xscale = -100;
} else {
_xscale = 100;
}
if (getTimer() > (startTime + timeOut)) {
_local2.fun1();
}
saX1 = Math.abs(_local1.eSet._x - _x);
saY1 = Math.abs(_local1.eSet._y - _y);
if ((saX1 <= 20) && (saY1 <= 20)) {
_local1.comboNum--;
if (_local1.comboNum < 0) {
_local1.comboNum = 0;
}
_local1.pSet.speed = _local1.pSet.speed + 0.1;
if (_local1.pSet.speed > 2) {
_local1.pSet.speed = 2;
}
_local2.away();
}
};
}
function awawa() {
var _local1 = this;
flg = 2;
_local1.gotoAndStop(5);
radian = Math.atan2(_root.pSet._y - _y, _root.pSet._x - _x);
_local1.opX = _local1._x - (40 * Math.cos(radian));
_local1.opY = _local1._y - (40 * Math.sin(radian));
timeOut = 3000;
startTime = getTimer();
_local1.onEnterFrame = function () {
var _local1 = this;
_local1.swapDepths((_local1._y * 100) + id);
_local1._x = _local1._x + ((opX - _x) / 40);
_local1._y = _local1._y + ((opY - _y) / 40);
if (getTimer() > (startTime + timeOut)) {
_local1.away();
}
};
}
function away() {
var _local1 = this;
_local1.gotoAndStop(6);
opY = 300;
opX = _root.randomInt(800) - 200;
_local1.onEnterFrame = function () {
var _local1 = this;
_local1.swapDepths((_local1._y * 100) + id);
radian = Math.atan2(opY - _y, opX - _x);
_local1._x = _local1._x + (3 * Math.cos(radian));
_local1._y = _local1._y + (3 * Math.sin(radian));
if (_y > 280) {
_local1.removeMovieClip();
}
};
}
sSound = new Sound(this);
sSound.attachSound("piropiro");
sSound.setVolume(100);
flg = 0;
if (_root.randomInt(2) == 1) {
_x = 450;
xSpeed = ((-_root.random(20)) / 10) - 1;
_xscale = 100;
} else {
_x = -50;
xSpeed = (_root.random(20) / 10) + 1;
_xscale = -100;
}
_y = (_root.randomInt(120) + 120);
this.swapDepths((this._y * 100) + id);
walk();
stop();
Symbol 125 MovieClip Frame 1
function rev() {
var _local1 = this;
_local1.onEnterFrame = function () {
this.gotoAndStop(_currentframe - 1);
if (this._currentframe == 1) {
_parent.walk();
}
};
}
Symbol 125 MovieClip Frame 12
i = 2;
while (i <= 50) {
if (_root["c" + i].flg == 1) {
_root["c" + i].awawa();
}
i++;
}
_root.point = (_root.comboNum * _root.comboNum) * 10;
_root.score = _root.score + _root.point;
this.msg = ((("\u00D7" + _root.comboNum) + newline) + _root.point) + "\u70B9";
_root.sSound2.start();
stop();
Symbol 126 MovieClip Frame 1
function walk() {
var _local1 = this;
var _local2 = _root;
_local2.sSound2.stop();
_local2.sSound1.start(0, 1000);
_local2.comboNum = 0;
_local2.point = 0;
speed = 2;
gotoAndStop (2);
_local1.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if ((Math.abs(_local2._ymouse - (_y - 32)) < 3) && (Math.abs(_local2._xmouse - _x) < 3)) {
} else {
_local1.swapDepths((_local1._y * 100) + id);
radian = Math.atan2(_local2._ymouse - (_y - 32), _local2._xmouse - _x);
_local1._x = _local1._x + (speed * Math.cos(radian));
_local1._y = _local1._y + (speed * Math.sin(radian));
if (_local1._y < 110) {
_local1._y = 110;
}
}
};
_local1.onMouseDown = function () {
if (_root.comboNum >= 5) {
this.oyaji();
}
};
}
function oyaji() {
var _local1 = this;
_root.sSound1.stop();
_local1.gotoAndStop(3);
timeOut = 5000;
startTime = getTimer();
_local1.onEnterFrame = function () {
if (getTimer() > (startTime + timeOut)) {
this.p.rev();
delete this.onEnterFrame;
}
};
delete _local1.onMouseDown;
}
id = 1;
this.swapDepths((this._y * 100) + id);
stop();
Symbol 135 MovieClip Frame 1
function direct() {
var _local1 = _root;
if (_local1.randomInt(2) == 1) {
xSpeed = ((-_local1.random(40)) / 10) - 1;
} else {
xSpeed = (_local1.random(40) / 10) + 1;
}
if (_local1.randomInt(2) == 1) {
ySpeed = ((-_local1.random(40)) / 10) - 1;
} else {
ySpeed = (_local1.random(40) / 10) + 1;
}
}
function walk() {
var _local1 = this;
_local1.onEnterFrame = function () {
var _local1 = this;
_local1.swapDepths((_local1._y * 100) + id);
_local1._x = _local1._x + xSpeed;
_local1._y = _local1._y + ySpeed;
if (_local1._x < 20) {
_local1._x = 20;
xSpeed = -xSpeed;
} else if (_local1._x > 380) {
_local1._x = 380;
xSpeed = -xSpeed;
}
if (_local1._y < 120) {
_local1._y = 120;
ySpeed = -ySpeed;
} else if (_local1._y > 240) {
_local1._y = 240;
ySpeed = -ySpeed;
}
if (_root.randomInt(100) == 1) {
_local1.direct();
}
};
}
id = 2;
direct();
stop();
Symbol 139 Button
on (release) {
play();
}
Symbol 144 MovieClip Frame 1
time = 99;
timeOut = 1000;
startTime = getTimer();
this.onEnterFrame = function () {
if (getTimer() > (startTime + timeOut)) {
time--;
if (time <= 0) {
_root.gotoAndStop("timeup");
delete this.onEnterFrame;
} else {
startTime = getTimer();
}
}
};
stop();
Symbol 151 Button
on (press) {
_root.pSet.removeMovieClip();
_root.eSet.removeMovieClip();
_root.gotoAndStop("opening");
}