Frame 1
function randomInt(maxNum) {
var rndNum = (Math.random() * maxNum);
if (rndNum == 0) {
rndNum = 1;
} else {
rndNum = Math.ceil(rndNum);
}
return(rndNum);
}
function dokan() {
_root.bg.yure();
i = 1;
while (i <= 10) {
_root["hito" + i].jump();
i++;
}
i = 1;
while (i <= 30) {
_root["teki" + i].jump();
i++;
}
}
_root.arm_r.removeMovieClip();
_root.arm_l.removeMovieClip();
i = 1;
while (i <= 10) {
_root["hito" + i].removeMovieClip();
i++;
}
i = 1;
while (i <= 30) {
_root["teki" + i].removeMovieClip();
i++;
}
cSpeed = 3;
stageNum = 1;
rock = 0;
stop();
Frame 51
stagemsg = "STAGE " + stageNum;
rock = 0;
Frame 111
_root.hitNum = 0;
restTime = 30;
i = 1;
while (i <= _root.stageNum) {
newName = "teki" + i;
_root.attachMovie("teki", newName, i);
_root[newName]._x = _root.randomInt(360) + 20;
_root[newName]._y = 198;
i++;
}
adNum = Math.floor(_root.stageNum / 3);
trace(adNum);
i = 1;
while (i <= (1 + adNum)) {
newName = "hito" + i;
if (_root.randomInt(2) == 1) {
_root.attachMovie("boy", newName, i + 30);
} else {
_root.attachMovie("girl", newName, i + 30);
}
_root[newName]._x = _root.randomInt(360) + 20;
_root[newName]._y = 197;
i++;
}
Frame 230
_root.dokan();
Frame 240
_root.attachMovie("arm_r", "arm_r", 100);
_root.attachMovie("arm_l", "arm_l", 101);
_root.arm_r._x = 115;
_root.arm_r._y = 130;
_root.arm_l._x = 283;
_root.arm_l._y = 130;
stop();
Frame 250
rock = 1;
Frame 260
rock = 1;
Frame 268
rock = 1;
i = 1;
while (i <= 10) {
_root["hito" + i].gotoAndStop(3);
i++;
}
Frame 278
_root.arm_r.removeMovieClip();
_root.arm_l.removeMovieClip();
Frame 398
i = 1;
while (i <= 10) {
_root["hito" + i].removeMovieClip();
i++;
}
if (_root.stageNum != 10) {
_root.stageNum++;
_root.gotoAndPlay("next");
} else {
_root.gotoAndPlay("ending");
}
Frame 399
_root.arm_r.removeMovieClip();
_root.arm_l.removeMovieClip();
i = 1;
while (i <= 10) {
_root["hito" + i].removeMovieClip();
i++;
}
i = 1;
while (i <= 30) {
_root["teki" + i].removeMovieClip();
i++;
}
Frame 458
stop();
Symbol 13 MovieClip [boy] Frame 1
function jump() {
if (this._currentframe == 1) {
this.gotoAndStop(2);
}
}
if (_root.randomInt(2) == 1) {
this.xSpeed = _root.cSpeed;
} else {
this.xSpeed = -_root.cSpeed;
}
this.onEnterFrame = function () {
this._x = this._x + this.xSpeed;
if (this._x <= 20) {
this._x = 20;
this.xSpeed = -this.xSpeed;
} else if (this._x >= 380) {
this._x = 380;
this.xSpeed = -this.xSpeed;
} else if (_root.randomInt(50) == 1) {
this.xSpeed = -this.xSpeed;
}
};
stop();
Instance of Symbol 6 MovieClip "hp" in Symbol 13 MovieClip [boy] Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.arm_r.hp) || (this.hitTest(_root.arm_l.hp))) {
_parent.gotoAndPlay(4);
}
}
Symbol 13 MovieClip [boy] Frame 2
jump = 10;
motoY = this._y;
this.onEnterFrame = function () {
jump = jump - 1;
this._y = this._y - jump;
if (this._y >= motoY) {
this._y = motoY;
this.gotoAndStop(1);
}
};
stop();
Symbol 13 MovieClip [boy] Frame 3
this.onEnterFrame = function () {
};
stop();
Symbol 13 MovieClip [boy] Frame 4
this.onEnterFrame = function () {
};
Symbol 13 MovieClip [boy] Frame 40
_root.gotoAndStop("gameover");
stop();
Symbol 25 MovieClip [girl] Frame 1
function jump() {
if (this._currentframe == 1) {
this.gotoAndStop(2);
}
}
if (_root.randomInt(2) == 1) {
this.xSpeed = _root.cSpeed;
} else {
this.xSpeed = -_root.cSpeed;
}
this.onEnterFrame = function () {
this._x = this._x + this.xSpeed;
if (this._x <= 20) {
this._x = 20;
this.xSpeed = -this.xSpeed;
} else if (this._x >= 380) {
this._x = 380;
this.xSpeed = -this.xSpeed;
} else if (_root.randomInt(50) == 1) {
this.xSpeed = -this.xSpeed;
}
};
stop();
Instance of Symbol 6 MovieClip "hp" in Symbol 25 MovieClip [girl] Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.arm_r.hp) || (this.hitTest(_root.arm_l.hp))) {
_parent.gotoAndPlay(4);
}
}
Symbol 25 MovieClip [girl] Frame 2
jump = 10;
motoY = this._y;
this.onEnterFrame = function () {
jump = jump - 1;
this._y = this._y - jump;
if (this._y >= motoY) {
this._y = motoY;
this.gotoAndStop(1);
}
};
stop();
Symbol 25 MovieClip [girl] Frame 3
this.onEnterFrame = function () {
};
stop();
Symbol 25 MovieClip [girl] Frame 4
this.onEnterFrame = function () {
};
Symbol 25 MovieClip [girl] Frame 40
_root.gotoAndStop("gameover");
stop();
Symbol 28 MovieClip [arm_l] Frame 1
this.onEnterFrame = function () {
};
this.onMouseDown = function () {
if ((_root._xmouse > 200) && (_root.rock == 0)) {
this.nextFrame();
}
};
this.stop();
Symbol 28 MovieClip [arm_l] Frame 2
this.onMouseDown = function () {
};
this.onEnterFrame = function () {
this._y = this._y + 10;
if (this._y >= 180) {
this._y = 180;
this.play();
}
};
this.stop();
Symbol 28 MovieClip [arm_l] Frame 3
this.onMouseDown = function () {
};
this.onEnterFrame = function () {
};
_root.dokan();
Symbol 28 MovieClip [arm_l] Frame 10
this.onMouseDown = function () {
};
this.onEnterFrame = function () {
this._y = this._y - 2;
if (this._y <= 130) {
this._y == 130;
this.gotoAndStop(1);
}
};
this.stop();
Symbol 30 MovieClip [arm_r] Frame 1
this.onEnterFrame = function () {
};
this.onMouseDown = function () {
if ((_root._xmouse < 200) && (_root.rock == 0)) {
this.nextFrame();
}
};
this.stop();
Symbol 30 MovieClip [arm_r] Frame 2
this.onMouseDown = function () {
};
this.onEnterFrame = function () {
this._y = this._y + 10;
if (this._y >= 180) {
this._y = 180;
this.play();
}
};
this.stop();
Symbol 30 MovieClip [arm_r] Frame 3
this.onMouseDown = function () {
};
this.onEnterFrame = function () {
};
_root.dokan();
Symbol 30 MovieClip [arm_r] Frame 10
this.onMouseDown = function () {
};
this.onEnterFrame = function () {
this._y = this._y - 2;
if (this._y <= 130) {
this._y == 130;
this.gotoAndStop(1);
}
};
this.stop();
Symbol 38 MovieClip Frame 1
this.onEnterFrame = function () {
if (_parent.xSpeed > 0) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
};
Symbol 43 MovieClip [teki] Frame 1
function jump() {
if (this._currentframe == 1) {
this.gotoAndStop(2);
}
}
if (_root.randomInt(2) == 1) {
this.xSpeed = _root.cSpeed;
} else {
this.xSpeed = -_root.cSpeed;
}
this.onEnterFrame = function () {
this._x = this._x + this.xSpeed;
if (this._x <= 20) {
this._x = 20;
this.xSpeed = -this.xSpeed;
} else if (this._x >= 380) {
this._x = 380;
this.xSpeed = -this.xSpeed;
} else if (_root.randomInt(50) == 1) {
this.xSpeed = -this.xSpeed;
}
};
stop();
Instance of Symbol 6 MovieClip "hp" in Symbol 43 MovieClip [teki] Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.arm_r.hp) || (this.hitTest(_root.arm_l.hp))) {
_parent.gotoAndPlay(3);
}
}
Symbol 43 MovieClip [teki] Frame 2
jump = 10;
motoY = this._y;
this.onEnterFrame = function () {
jump = jump - 1;
this._y = this._y - jump;
if (this._y >= motoY) {
this._y = motoY;
this.gotoAndStop(1);
}
};
stop();
Symbol 43 MovieClip [teki] Frame 3
this.onEnterFrame = function () {
};
play();
Symbol 43 MovieClip [teki] Frame 30
_root.hitNum++;
if (_root.hitNum >= _root.stageNum) {
_root.gotoAndPlay("clear");
}
this.removeMovieClip();
Symbol 55 Button
on (press) {
play();
}
Symbol 66 MovieClip Frame 11
stop();
Symbol 77 MovieClip Frame 1
function yure() {
this.gotoAndPlay("yure");
}
stop();
Symbol 82 MovieClip Frame 1
timeOut = 1000;
startTime = getTimer();
Symbol 82 MovieClip Frame 3
if (getTimer() > (startTime + timeOut)) {
_root.restTime--;
if (_root.restTime == 0) {
_root.gotoAndStop("timeup");
this.stop();
} else {
this.gotoAndPlay(1);
}
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 84 Button
on (press) {
_root.gotoAndStop("opening");
}