Frame 1
_quality = "low";
stop();
Frame 3
function randomInt(maxNum) {
var _local1 = Math.random() * maxNum;
if (_local1 == 0) {
_local1 = 1;
} else {
_local1 = Math.ceil(_local1);
}
return(_local1);
}
function playSE(se_name) {
se = new Sound(this);
se.attachSound(se_name);
se.start(0, 1);
}
function playBGM(bgm_name) {
this.bgm.attachSound(bgm_name);
this.bgm.start(0, 10000);
}
function stopBGM() {
this.bgm.stop();
}
this.bgm = new Sound(this);
Instance of Symbol 384 MovieClip "mc_stage" in Frame 4
/* no clip actions */
Frame 5
this.onEnterFrame = function () {
mc_stage.run();
};
keyListener = new Object();
keyListener.onKeyDown = function () {
mc_stage.onKeyPress(Key.getCode());
};
keyListener.onKeyUp = function () {
mc_stage.onKeyRelease(Key.getCode());
};
Key.addListener(keyListener);
stop();
Symbol 25 MovieClip Frame 1
stop();
Symbol 26 MovieClip [Player] Frame 1
function init() {
MAX_SPEED = 8;
_state = "fall";
px = 50;
py = 0;
walk_anm_list = [5, 6, 7, 8];
fn = 1;
anm_list_ptr = 0;
direct = 1;
walk_speed = 0;
adx = 0;
ady = 0;
hit_target_bg = _parent.mc_bg.mc_hit;
landing_flg = false;
jump_add_adx = 1;
key_right = false;
key_left = false;
key_jump_cnt = 0;
auto_flg = false;
stg2Evt_flg = false;
if (_parent.stage_num >= 3) {
nude_fn = 30;
} else {
nude_fn = 0;
}
on_obj_flg = false;
stay_cnt = 0;
death_flg = false;
}
function run() {
if (on_obj_flg) {
px = px + (hit_obj_target.dx * 10);
py = py + (hit_obj_target.dy * 10);
}
switch (_state) {
case "walk" :
walk();
break;
case "fall" :
fall();
break;
case "jump" :
jump();
on_obj_flg = false;
break;
case "clearWalk" :
clearWalk();
break;
case "stg2Evt" :
stg2Evt();
break;
case "death" :
if (stay_cnt == 15) {
_parent.reStart();
} else {
stay_cnt++;
}
}
if (adx > MAX_SPEED) {
adx = MAX_SPEED;
}
if (adx < (-MAX_SPEED)) {
adx = -MAX_SPEED;
}
px = px + adx;
py = py + ady;
py = py + 2;
if (px < 10) {
px = 10;
}
if (!death_flg) {
if (px > 630) {
if (!auto_flg) {
px = 630;
}
}
on_obj_flg = bgObjHit();
if (on_obj_flg) {
} else {
bgHit();
}
if (!_parent.bg_stop_flg) {
if (px > _parent.SCR_R) {
sx = px - _parent.SCR_R;
_parent.scrollBG(-sx);
px = _parent.SCR_R;
}
}
if (landing_flg && (_state != "clearWalk")) {
if (_parent.mc_bg.mc_hitClear.hitTest(this)) {
auto_flg = true;
walk_speed = 0;
direct = 1;
_state = "clearWalk";
}
}
if (py > 640) {
death_flg = true;
stay_cnt = 0;
_state = "death";
_root.playSE("SE_fall");
}
if (_parent.stage_num == 4) {
if (py > 430) {
_parent.setWaterBits(px, 420);
stay_cnt = 0;
_state = "death";
death_flg = true;
}
}
if (_parent.stage_num == 3) {
if (_parent.mc_bg.mc_hit2.hitTest(px, py, true)) {
_state = "end";
auto_flg = true;
setDeath();
}
}
}
_x = px;
_y = py;
mc_g._xscale = direct * 100;
mc_g.gotoAndStop(fn + nude_fn);
}
function onKeyPress(code) {
if (auto_flg || (death_flg)) {
return(undefined);
}
switch (code) {
case 39 :
direct = 1;
key_right = true;
if (landing_flg) {
if (_state != "walk") {
_state = "walk";
walk_speed = 1;
}
}
break;
case 37 :
direct = -1;
key_left = true;
if (landing_flg) {
if (_state != "walk") {
_state = "walk";
walk_speed = 1;
}
}
break;
case 32 :
case 38 :
if (landing_flg) {
if ((_state != "jump") && (_state != "fall")) {
key_jump = true;
key_jump_cnt = 5;
landing_flg = false;
ady = -15;
_state = "jump";
fn = 10;
py = py + ady;
}
}
break;
case 40 :
if (!((_parent.stage_num == 8) && (landing_flg))) {
break;
}
i = 1;
for(;;){
if (i > 6) {
break;
}
if (_parent.mc_bg["mc_torii" + i].hitTest(px, py, true)) {
_parent.setEnding(i);
_state = "ending";
break;
}
i++;
};
}
}
function onKeyRelease(code) {
if (auto_flg) {
return(undefined);
}
switch (code) {
case 39 :
key_right = false;
if (_state == "walk") {
adx = 0;
fn = 1;
_state = "stay";
}
break;
case 37 :
key_left = false;
if (_state == "walk") {
adx = 0;
fn = 1;
_state = "stay";
}
break;
case 32 :
case 38 :
key_jump = false;
break;
case 40 :
}
}
function walk() {
fn = walk_anm_list[Math.floor(anm_list_ptr)];
anm_list_ptr = anm_list_ptr + 0.25;
if (anm_list_ptr >= walk_anm_list.length) {
anm_list_ptr = 0;
}
adx = walk_speed * direct;
walk_speed++;
if (walk_speed >= MAX_SPEED) {
walk_speed = MAX_SPEED;
}
}
function fall() {
if (key_right) {
adx = adx + jump_add_adx;
}
if (key_left) {
adx = adx - jump_add_adx;
}
ady = ady + 2;
}
function jump() {
if (key_jump_cnt >= 0) {
if (key_jump) {
ady = ady - 3;
}
key_jump_cnt--;
}
if (key_right) {
adx = adx + jump_add_adx;
}
if (key_left) {
adx = adx - jump_add_adx;
}
ady = ady + 2;
}
function bgObjHit() {
i = 0;
while (i < _parent.mc_bg.obj_list.length) {
hit_obj_target = _parent.mc_bg.obj_list[i];
if (hit_obj_target.hitTest(px, py, true)) {
while (hit_obj_target.hitTest(px, py, true)) {
py--;
}
py++;
if ((_state == "jump") || (_state == "fall")) {
if ((key_right || (key_left)) && (!auto_flg)) {
_state = "walk";
} else {
fn = 1;
adx = 0;
_state = "stay";
}
ady = 0;
landing_flg = true;
_root.playSE("SE_landing");
}
return(true);
}
i++;
}
if (on_obj_flg) {
ady = 0;
_state = "fall";
}
return(false);
}
function bgHit() {
var _local2 = false;
var _local3 = ady;
ss = 0;
ofx = 12;
ofy = 30;
if (_state == "jump") {
if (hit_target_bg.hitTest(px + ss, py - 80, true)) {
while (hit_target_bg.hitTest(nx, py - 80, true)) {
py++;
}
ady = 0;
_state = "fall";
return(undefined);
}
}
if (hit_target_bg.hitTest(px + ss, py, true)) {
while (hit_target_bg.hitTest(px + ss, py, true)) {
py--;
_local2 = true;
}
py++;
} else {
_local2 = false;
}
if ((!_local2) && (_state == "walk")) {
if (!hit_target_bg.hitTest(px + ss, py + 10, true)) {
landing_flg = false;
_state = "fall";
fn = 1;
ady = 1;
} else {
while (!hit_target_bg.hitTest(px + ss, py, true)) {
py++;
}
}
}
if (_local2) {
if ((_state == "jump") || (_state == "fall")) {
if ((key_right || (key_left)) && (!auto_flg)) {
_state = "walk";
} else {
fn = 1;
adx = 0;
_state = "stay";
}
ady = 2;
landing_flg = true;
_root.playSE("SE_landing");
}
}
if (adx > 0) {
if (hit_target_bg.hitTest((px + ss) + ofx, py - ofy, true)) {
adx = 0;
while (hit_target_bg.hitTest((px + ss) + ofx, py - ofy, true)) {
px--;
}
}
} else if (adx < 0) {
if (hit_target_bg.hitTest((px + ss) - ofx, py - ofy, true)) {
adx = 0;
while (hit_target_bg.hitTest((px + ss) - ofx, py - ofy, true)) {
px++;
}
}
}
}
function setDeath() {
death_flg = true;
_state = "death";
stay_cnt = 0;
auto_flg = true;
_visible = false;
_parent.setPlayerBits(px, py);
}
function hitEnemy() {
if (!death_flg) {
setDeath();
}
}
function clearWalk() {
walk();
if (px > 700) {
_parent.setClear();
_state = "setClear";
}
}
function setAutoFlg(flg) {
auto_flg = flg;
}
function setStg2Event() {
adx = 0;
auto_flg = true;
if (_state == "walk") {
fn = 1;
adx = 0;
_state = "stay";
}
}
function setStg2Event2() {
walk_speed = 1;
direct = 1;
_state = "stg2Evt";
}
function stg2Evt() {
walk();
if (_parent.bg_stop_flg) {
adx = 0;
fn = 1;
_state = "stay";
}
}
function setNude() {
nude_fn = 30;
}
function setStg2Event3() {
auto_flg = false;
}
init();
stop();
Symbol 50 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 30
_parent._parent.mc_player.setStg2Event2();
Symbol 50 MovieClip Frame 97
_root.playSE("SE_landing");
Symbol 50 MovieClip Frame 100
_root.playSE("SE_landing");
Symbol 50 MovieClip Frame 109
_parent._parent.mc_player.setNude();
Symbol 50 MovieClip Frame 119
_root.playSE("SE_landing");
Symbol 50 MovieClip Frame 130
_root.playSE("SE_landing");
Symbol 50 MovieClip Frame 149
_root.playSE("SE_landing");
Symbol 50 MovieClip Frame 159
_root.playSE("SE_tree");
Symbol 50 MovieClip Frame 174
_parent._parent.mc_player.setStg2Event3();
stop();
Symbol 59 MovieClip Frame 1
alg_num = 1;
init_y = _y;
cnt = 0;
ax = -speed;
d = 0;
this.onEnterFrame = function () {
if (!(alg_num === 1)) {
} else {
ay = Math.cos((d * Math.PI) / 180) * 1;
_x = (_x + ax);
_y = (init_y + ay);
if (cnt == turn_cnt) {
cnt = 0;
ax = -ax;
_xscale = (-_xscale);
} else {
cnt++;
}
d = d + 10;
}
if (mc_hit.hitTest(_parent._parent.mc_player)) {
_parent._parent.mc_player.hitEnemy();
}
};
Symbol 59 MovieClip Frame 2
stop();
Symbol 63 MovieClip Frame 1
switch_flg = false;
this.onEnterFrame = function () {
if (!switch_flg) {
if (this.hitTest(_parent._parent.mc_player)) {
switch_flg = true;
_parent._parent.mc_player.setStg2Event();
_parent.mc_event.gotoAndPlay(2);
}
}
};
Symbol 65 MovieClip Frame 1
hit_cnt = 5;
this.onEnterFrame = function () {
if (hit_cnt == 0) {
if (_parent._parent.mc_player.ady > 2) {
if (this.hitTest(_parent._parent.mc_player)) {
_parent._parent.setWaterBits(_parent._parent.mc_player._x, 390);
hit_cnt = 5;
}
}
} else if (hit_cnt > 0) {
hit_cnt--;
}
};
Instance of Symbol 59 MovieClip in Symbol 66 MovieClip [Stage2] Frame 1
//component parameters
onClipEvent (construct) {
speed = 0.5;
turn_cnt = 60;
}
Instance of Symbol 59 MovieClip in Symbol 66 MovieClip [Stage2] Frame 1
//component parameters
onClipEvent (construct) {
speed = 0.8;
turn_cnt = 40;
}
Instance of Symbol 59 MovieClip in Symbol 66 MovieClip [Stage2] Frame 1
//component parameters
onClipEvent (construct) {
speed = 0.3;
turn_cnt = 240;
}
Symbol 75 MovieClip Frame 1
alg_num = 1;
ay = 0;
stop();
this.onEnterFrame = function () {
my_x = (_x * 10) + _parent._x;
switch (alg_num) {
case 1 :
dx = my_x - _parent._parent.mc_player._x;
if (Math.abs(dx) < 80) {
_root.playSE("SE_sho1");
alg_num = 2;
}
break;
case 2 :
_y = (_y + ay);
ay = ay + 0.01;
if (ay > 0.1) {
alg_num = 3;
}
break;
case 3 :
_y = (_y + ay);
ay = ay + 0.2;
if (ay > 2) {
ay = 2;
}
if (mc_hit.hitTest(_parent._parent.mc_player)) {
_parent._parent.mc_player.hitEnemy();
}
if (!_parent.mc_hit.hitTest(my_x, _y * 10, true)) {
break;
}
_root.playSE("SE_sho2");
alg_num = 4;
}
};
Symbol 75 MovieClip Frame 2
stop();
Instance of Symbol 72 MovieClip "mc_torii4" in Symbol 78 MovieClip [Stage8] Frame 1
//component parameters
onClipEvent (construct) {
num = 4;
}
Instance of Symbol 72 MovieClip "mc_torii1" in Symbol 78 MovieClip [Stage8] Frame 1
//component parameters
onClipEvent (construct) {
num = 1;
}
Instance of Symbol 72 MovieClip "mc_torii2" in Symbol 78 MovieClip [Stage8] Frame 1
//component parameters
onClipEvent (construct) {
num = 2;
}
Instance of Symbol 72 MovieClip "mc_torii3" in Symbol 78 MovieClip [Stage8] Frame 1
//component parameters
onClipEvent (construct) {
num = 3;
}
Instance of Symbol 72 MovieClip "mc_torii5" in Symbol 78 MovieClip [Stage8] Frame 1
//component parameters
onClipEvent (construct) {
num = 5;
}
Instance of Symbol 72 MovieClip "mc_torii6" in Symbol 78 MovieClip [Stage8] Frame 1
//component parameters
onClipEvent (construct) {
num = 6;
}
Symbol 88 MovieClip Frame 1
alg_num = 1;
ay = 0;
stop();
this.onEnterFrame = function () {
my_x = (_x * 10) + _parent._x;
switch (alg_num) {
case 1 :
dx = my_x - _parent._parent.mc_player._x;
if (Math.abs(dx) < 80) {
_root.playSE("SE_crow");
alg_num = 2;
gotoAndPlay (2);
}
break;
case 2 :
if (!mc_g.mc_hit.hitTest(_parent._parent.mc_player)) {
break;
}
_parent._parent.mc_player.hitEnemy();
}
};
Symbol 88 MovieClip Frame 121
alg_num = 3;
stop();
Symbol 89 MovieClip Frame 1
alg_num = 1;
ay = 0;
stop();
this.onEnterFrame = function () {
my_x = (_x * 10) + _parent._x;
switch (alg_num) {
case 1 :
dx = my_x - _parent._parent.mc_player._x;
if (Math.abs(dx) < 80) {
_root.playSE("SE_crow");
alg_num = 2;
gotoAndPlay (2);
}
break;
case 2 :
if (!mc_g.mc_hit.hitTest(_parent._parent.mc_player)) {
break;
}
_parent._parent.mc_player.hitEnemy();
}
};
Symbol 89 MovieClip Frame 121
alg_num = 3;
stop();
Symbol 90 MovieClip Frame 1
alg_num = 1;
ay = 0;
stop();
this.onEnterFrame = function () {
my_x = (_x * 10) + _parent._x;
switch (alg_num) {
case 1 :
dx = my_x - _parent._parent.mc_player._x;
if (Math.abs(dx) < 120) {
_root.playSE("SE_crow");
alg_num = 2;
gotoAndPlay (2);
}
break;
case 2 :
if (!mc_g.mc_hit.hitTest(_parent._parent.mc_player)) {
break;
}
_parent._parent.mc_player.hitEnemy();
}
};
Symbol 90 MovieClip Frame 180
alg_num = 3;
stop();
Symbol 91 MovieClip Frame 1
alg_num = 1;
ay = 0;
stop();
this.onEnterFrame = function () {
my_x = (_x * 10) + _parent._x;
switch (alg_num) {
case 1 :
dx = my_x - _parent._parent.mc_player._x;
if (Math.abs(dx) < 200) {
_root.playSE("SE_crow");
alg_num = 2;
gotoAndPlay (2);
}
break;
case 2 :
if (!mc_g.mc_hit.hitTest(_parent._parent.mc_player)) {
break;
}
_parent._parent.mc_player.hitEnemy();
}
};
Symbol 91 MovieClip Frame 180
alg_num = 3;
stop();
Symbol 92 MovieClip Frame 1
alg_num = 1;
ay = 0;
stop();
this.onEnterFrame = function () {
my_x = (_x * 10) + _parent._x;
switch (alg_num) {
case 1 :
dx = my_x - _parent._parent.mc_player._x;
if (Math.abs(dx) < 80) {
_root.playSE("SE_crow");
alg_num = 2;
gotoAndPlay (2);
}
break;
case 2 :
if (!mc_g.mc_hit.hitTest(_parent._parent.mc_player)) {
break;
}
_parent._parent.mc_player.hitEnemy();
}
};
Symbol 92 MovieClip Frame 107
alg_num = 3;
stop();
Symbol 99 MovieClip Frame 1
alg_num = 1;
ay = -init_ay;
this.onEnterFrame = function () {
switch (alg_num) {
case 1 :
_y = (_y + ay);
ay = ay + 0.2;
if (ay > 0) {
if (ay < 1) {
gotoAndStop (3);
} else {
gotoAndStop (4);
}
}
if (_y > 55) {
_y = 55;
alg_num = 2;
stay_cnt = 0;
}
break;
case 2 :
if (stay_cnt == stay_fn) {
ay = -init_ay;
alg_num = 1;
my_x = (_x * 10) + _parent._x;
if ((my_x > -40) && (my_x < 680)) {
_root.playSE("SE_fire");
}
gotoAndStop (2);
} else {
stay_cnt++;
}
}
if (mc_hit.hitTest(_parent._parent.mc_player)) {
_parent._parent.mc_player.hitEnemy();
}
};
Symbol 99 MovieClip Frame 2
stop();
Symbol 102 MovieClip Frame 1
_parent.obj_list.push(this);
ax = 0;
ay = 0;
deg = 0;
init_x = _x;
_x_bak = _x;
dx = 0;
dy = 0;
this.onEnterFrame = function () {
ax = Math.cos((deg * Math.PI) / 180) * 15;
_x = (init_x + ax);
dx = _x - _x_bak;
_x_bak = _x;
deg++;
};
Symbol 103 MovieClip [Stage6] Frame 1
this.obj_list = [];
Instance of Symbol 99 MovieClip in Symbol 103 MovieClip [Stage6] Frame 1
//component parameters
onClipEvent (construct) {
init_ay = 4;
stay_fn = 15;
}
Instance of Symbol 99 MovieClip in Symbol 103 MovieClip [Stage6] Frame 1
//component parameters
onClipEvent (construct) {
init_ay = 4;
stay_fn = 5;
}
Instance of Symbol 99 MovieClip in Symbol 103 MovieClip [Stage6] Frame 1
//component parameters
onClipEvent (construct) {
init_ay = 4;
stay_fn = 15;
}
Instance of Symbol 99 MovieClip in Symbol 103 MovieClip [Stage6] Frame 1
//component parameters
onClipEvent (construct) {
init_ay = 4;
stay_fn = 1;
}
Instance of Symbol 99 MovieClip in Symbol 103 MovieClip [Stage6] Frame 1
//component parameters
onClipEvent (construct) {
init_ay = 3;
stay_fn = 5;
}
Instance of Symbol 99 MovieClip in Symbol 103 MovieClip [Stage6] Frame 1
//component parameters
onClipEvent (construct) {
init_ay = 3.5;
stay_fn = 5;
}
Instance of Symbol 99 MovieClip in Symbol 103 MovieClip [Stage6] Frame 1
//component parameters
onClipEvent (construct) {
init_ay = 5;
stay_fn = 1;
}
Instance of Symbol 99 MovieClip in Symbol 103 MovieClip [Stage6] Frame 1
//component parameters
onClipEvent (construct) {
init_ay = 5;
stay_fn = 1;
}
Symbol 108 MovieClip Frame 1
cnt = 15;
this.onEnterFrame = function () {
if (cnt == 0) {
if (_parent._parent._state == "run") {
_parent._parent.setEnemy("EnemyRock");
cnt = 45;
}
} else {
cnt--;
}
};
Symbol 116 MovieClip Frame 1
_parent.obj_list.push(this);
ax = 0;
ay = 0;
deg = 0;
init_x = _x;
_x_bak = _x;
dx = 0;
dy = 0;
this.onEnterFrame = function () {
ax = Math.cos((deg * Math.PI) / 180) * 15;
_x = (init_x + ax);
dx = _x - _x_bak;
_x_bak = _x;
deg++;
};
Symbol 119 MovieClip Frame 1
_parent.obj_list.push(this);
ax = 0;
ay = 0;
deg = 0;
init_y = _y;
_y_bak = _y;
dx = 0;
dy = 0;
this.onEnterFrame = function () {
ay = Math.cos((deg * Math.PI) / 180) * 10;
_y = (init_y + ay);
dy = _y - _y_bak;
_y_bak = _y;
deg = deg + 2;
};
Symbol 122 MovieClip Frame 1
_parent.obj_list.push(this);
ax = 0;
ay = 0;
deg = 0;
init_y = _y;
_y_bak = _y;
dx = 0;
dy = 0;
this.onEnterFrame = function () {
ay = Math.cos((deg * Math.PI) / 180) * 7;
_y = (init_y + ay);
dy = _y - _y_bak;
_y_bak = _y;
deg = deg + 3;
};
Symbol 123 MovieClip [Stage4] Frame 1
this.obj_list = [];
Symbol 138 MovieClip Frame 1
alg_num = 1;
stay_cnt = 0;
this.onEnterFrame = function () {
switch (alg_num) {
case 1 :
if (stay_cnt == stay_fn1) {
alg_num = 2;
stay_cnt = 0;
my_x = (_x * 10) + _parent._x;
if ((my_x > -40) && (my_x < 680)) {
_root.playSE("SE_needle");
}
gotoAndPlay ("in");
} else {
stay_cnt++;
}
break;
case 2 :
if (stay_cnt == stay_fn2) {
gotoAndPlay ("out");
alg_num = 1;
stay_cnt = 0;
} else {
if (stay_cnt >= 2) {
if (mc_hit.hitTest(_parent._parent.mc_player)) {
_parent._parent.mc_player.hitEnemy();
}
}
stay_cnt++;
}
}
};
Symbol 138 MovieClip Frame 2
stop();
Symbol 138 MovieClip Frame 5
stop();
Symbol 138 MovieClip Frame 13
stop();
Symbol 139 MovieClip [Stage3] Frame 1
mc_hit2._alpha = 0;
Instance of Symbol 138 MovieClip in Symbol 139 MovieClip [Stage3] Frame 1
//component parameters
onClipEvent (construct) {
stay_fn1 = 30;
stay_fn2 = 30;
}
Instance of Symbol 138 MovieClip in Symbol 139 MovieClip [Stage3] Frame 1
//component parameters
onClipEvent (construct) {
stay_fn1 = 60;
stay_fn2 = 30;
}
Instance of Symbol 138 MovieClip in Symbol 139 MovieClip [Stage3] Frame 1
//component parameters
onClipEvent (construct) {
stay_fn1 = 45;
stay_fn2 = 30;
}
Instance of Symbol 138 MovieClip in Symbol 139 MovieClip [Stage3] Frame 1
//component parameters
onClipEvent (construct) {
stay_fn1 = 30;
stay_fn2 = 30;
}
Instance of Symbol 138 MovieClip in Symbol 139 MovieClip [Stage3] Frame 1
//component parameters
onClipEvent (construct) {
stay_fn1 = 30;
stay_fn2 = 30;
}
Instance of Symbol 138 MovieClip in Symbol 139 MovieClip [Stage3] Frame 1
//component parameters
onClipEvent (construct) {
stay_fn1 = 60;
stay_fn2 = 15;
}
Instance of Symbol 138 MovieClip in Symbol 139 MovieClip [Stage3] Frame 1
//component parameters
onClipEvent (construct) {
stay_fn1 = 80;
stay_fn2 = 15;
}
Symbol 152 MovieClip Frame 1
alg_num = 1;
ax = -1;
ay = 1;
stop();
this.onEnterFrame = function () {
my_x = (_x * 10) + _parent._x;
switch (alg_num) {
case 1 :
dx = my_x - _parent._parent.mc_player._x;
if (Math.abs(dx) < 480) {
_root.playSE("SE_ken2");
alg_num = 2;
}
break;
case 2 :
_x = (_x + ax);
_y = (_y + ay);
if (mc_hit.hitTest(_parent._parent.mc_player)) {
_parent._parent.mc_player.hitEnemy();
}
if (!_parent.mc_hit.hitTest(my_x, _y * 10, true)) {
break;
}
_root.playSE("SE_ken");
alg_num = 3;
}
};
Symbol 152 MovieClip Frame 2
stop();
Symbol 155 MovieClip Frame 1
alg_num = 1;
ax = -1.5;
ay = 0;
total_move = 0;
stop();
this.onEnterFrame = function () {
my_x = (_x * 10) + _parent._x;
switch (alg_num) {
case 1 :
dx = my_x - _parent._parent.mc_player._x;
if (Math.abs(dx) < 640) {
_root.playSE("SE_ken2");
alg_num = 2;
}
break;
case 2 :
_x = (_x + ax);
_y = (_y + ay);
total_move = total_move + ax;
if (total_move > 100) {
alg_num = 3;
}
if (!mc_hit.hitTest(_parent._parent.mc_player)) {
break;
}
_parent._parent.mc_player.hitEnemy();
}
};
Symbol 155 MovieClip Frame 2
stop();
Symbol 194 MovieClip [ScreenFadeIn] Frame 30
this.removeMovieClip();
Symbol 195 MovieClip [ScreenFadeOut] Frame 30
_parent.endFadeOut();
stop();
Symbol 209 MovieClip [Event7] Frame 201
_root.playSE("SE_open");
Symbol 209 MovieClip [Event7] Frame 214
_root.playSE("SE_fall");
Symbol 209 MovieClip [Event7] Frame 228
_root.playSE("SE_close");
Symbol 209 MovieClip [Event7] Frame 260
_parent.endEvent();
this.removeMovieClip();
Symbol 212 MovieClip [Event6] Frame 201
_root.playSE("SE_open");
Symbol 212 MovieClip [Event6] Frame 214
_root.playSE("SE_fall");
Symbol 212 MovieClip [Event6] Frame 228
_root.playSE("SE_close");
Symbol 212 MovieClip [Event6] Frame 260
_parent.endEvent();
this.removeMovieClip();
Symbol 215 MovieClip [Event5] Frame 201
_root.playSE("SE_open");
Symbol 215 MovieClip [Event5] Frame 214
_root.playSE("SE_fall");
Symbol 215 MovieClip [Event5] Frame 228
_root.playSE("SE_close");
Symbol 215 MovieClip [Event5] Frame 260
_parent.endEvent();
this.removeMovieClip();
Symbol 218 MovieClip [Event4] Frame 201
_root.playSE("SE_open");
Symbol 218 MovieClip [Event4] Frame 214
_root.playSE("SE_fall");
Symbol 218 MovieClip [Event4] Frame 228
_root.playSE("SE_close");
Symbol 218 MovieClip [Event4] Frame 260
_parent.endEvent();
this.removeMovieClip();
Symbol 221 MovieClip [Event3] Frame 201
_root.playSE("SE_open");
Symbol 221 MovieClip [Event3] Frame 214
_root.playSE("SE_fall");
Symbol 221 MovieClip [Event3] Frame 228
_root.playSE("SE_close");
Symbol 221 MovieClip [Event3] Frame 260
_parent.endEvent();
this.removeMovieClip();
Symbol 224 MovieClip [Event2] Frame 201
_root.playSE("SE_open");
Symbol 224 MovieClip [Event2] Frame 214
_root.playSE("SE_fall");
Symbol 224 MovieClip [Event2] Frame 228
_root.playSE("SE_close");
Symbol 224 MovieClip [Event2] Frame 260
_parent.endEvent();
this.removeMovieClip();
Symbol 242 MovieClip [SS] Frame 1
mc_g.gotoAndStop(_parent.stage_num);
Symbol 242 MovieClip [SS] Frame 71
this.removeMovieClip();
Symbol 249 MovieClip [Event1] Frame 201
_root.playSE("SE_open");
Symbol 249 MovieClip [Event1] Frame 214
_root.playSE("SE_fall");
Symbol 249 MovieClip [Event1] Frame 228
_root.playSE("SE_close");
Symbol 249 MovieClip [Event1] Frame 260
_parent.endEvent();
this.removeMovieClip();
Symbol 251 MovieClip [WaterBitBlue] Frame 1
this.onEnterFrame = function () {
_x = (_x + ax);
_y = (_y + ay);
ay++;
if (_y > 500) {
this.removeMovieClip();
}
};
Symbol 253 MovieClip [WaterBitRed] Frame 1
this.onEnterFrame = function () {
_x = (_x + ax);
_y = (_y + ay);
ay++;
if (_y > 500) {
this.removeMovieClip();
}
};
Symbol 255 MovieClip [PlayerBit] Frame 1
this.onEnterFrame = function () {
_x = (_x + ax);
_y = (_y + ay);
ay++;
if (_y > 500) {
this.removeMovieClip();
}
};
Symbol 296 MovieClip [Circle] Frame 45
_parent.setEnding2();
Symbol 296 MovieClip [Circle] Frame 140
this.removeMovieClip();
Symbol 302 MovieClip Frame 1
this.onPress = function () {
_parent._parent.onKeyPress(0);
};
Symbol 305 MovieClip [Title] Frame 1
stop();
Symbol 322 MovieClip [Credit] Frame 579
_parent.endFadeOut();
stop();
Symbol 325 MovieClip [PlayerHead] Frame 1
cnt = 5;
this.onEnterFrame = function () {
_x = (_x + _parent.bg_scroll_x);
_x = (_x + ax);
_y = (_y + ay);
if (cnt == 0) {
cnt = 5;
_rotation = (_rotation + 90);
} else {
cnt--;
}
ay = ay + 2;
if (_y > 500) {
this.removeMovieClip();
}
};
Symbol 334 MovieClip [EnemyRockS] Frame 1
gotoAndStop(fn);
cnt = 5;
this.onEnterFrame = function () {
_x = (_x + _parent.bg_scroll_x);
_x = (_x + ax);
_y = (_y + ay);
if (cnt == 0) {
cnt = 5;
_rotation = (_rotation + 90);
} else {
cnt--;
}
ay = ay + 2;
if (_y > 500) {
this.removeMovieClip();
}
};
Symbol 337 MovieClip [EnemyRock] Frame 1
_y = -100;
_x = (580 + _root.randomInt(500));
_root.playSE("SE_rockFly");
stop();
this.onEnterFrame = function () {
_x = (_x + _parent.bg_scroll_x);
_x = (_x - 10);
_y = (_y + 10);
if (mc_hit.hitTest(_parent.mc_player)) {
_parent.mc_player.hitEnemy();
}
if (_parent.mc_bg.mc_hit.hitTest(_x, _y, true)) {
_root.playSE("SE_rockBreak");
_parent.setRockSmall(_x, _y);
this.removeMovieClip();
}
};
Symbol 344 MovieClip Frame 1
load_finish_flg = false;
stop();
this.onEnterFrame = function () {
if (load_finish_flg == false) {
loaded_size = _root.getBytesLoaded();
total_size = _root.getBytesTotal();
if (loaded_size >= total_size) {
load_finish_flg = true;
gotoAndPlay ("ok");
} else {
var _local3 = (loaded_size / total_size) * 100;
var _local2 = Math.round(_local3);
mc_bar._width = 300 * (_local2 / 100);
}
}
};
Symbol 344 MovieClip Frame 19
_parent.play();
Symbol 351 MovieClip Frame 1
stop();
Symbol 382 MovieClip Frame 1
stop();
Symbol 384 MovieClip Frame 1
function run() {
switch (_state) {
case "title" :
break;
case "setStage" :
setStage(stage_num);
_parent.mc_scanLine.gotoAndStop(1);
_state = "initStage";
break;
case "initStage" :
initStage();
_state = "run";
break;
case "run" :
mc_player.run();
break;
case "ending2" :
if (stay_cnt == 240) {
_state = "credit";
endFadeOut();
} else {
stay_cnt++;
}
break;
}
bg_scroll_x = mc_bg._x - mc_bg_x_bak;
mc_bg_x_bak = mc_bg._x;
}
function onKeyPress(code) {
switch (_state) {
case "title" :
this.attachMovie("ScreenFadeOut", "mc_fade", depth_fade);
_state = "titleEnd";
_root.stopBGM();
_root.playSE("SE_mario");
break;
case "run" :
if (code == 82) {
_root.stopBGM();
releaseStage();
setTitle();
} else {
mc_player.onKeyPress(code);
}
}
}
function onKeyRelease(code) {
if (!(_state === "run")) {
} else {
mc_player.onKeyRelease(code);
}
}
function setTitle() {
_parent.mc_scanLine.gotoAndStop(1);
this.attachMovie("Title", "mc_screen", depth_screen);
_state = "title";
_root.playBGM("BGM_title");
}
function initGame() {
stage_num = 1;
death_cnt = 0;
}
function setStage(n) {
this.attachMovie("ScreenFadeIn", "mc_fade", depth_fade);
this.attachMovie("Stage" + n, "mc_bg", depth_bg1);
this.attachMovie(("Stage" + n) + "_2", "mc_bg2", depth_bg2);
this.attachMovie("Player", "mc_player", depth_player);
this.attachMovie("SS", "mc_ss", depth_ss);
switch (n) {
case 2 :
this.attachMovie("Stage2_1t", "mc_bgt", depth_bgt);
break;
case 4 :
this.attachMovie("Stage4_1t", "mc_bgt", depth_bgt);
break;
case 7 :
this.attachMovie("Stage7_1t", "mc_bgt", depth_bgt);
}
}
function reStart() {
death_cnt++;
_state = "reStart";
this.attachMovie("ScreenFadeOut", "mc_fade", depth_fade);
_root.stopBGM();
}
function initStage() {
bg_x = 0;
bg_stop_flg = false;
mc_bg.mc_hit._alpha = 0;
mc_bg._xscale = 1000;
mc_bg._yscale = 1000;
mc_bg2._xscale = 1000;
mc_bg2._yscale = 1000;
mc_player._xscale = 1000;
mc_player._yscale = 1000;
if (mc_bgt != undefined) {
mc_bgt._xscale = 1000;
mc_bgt._yscale = 1000;
}
bg_scroll_x = 0;
mc_bg_x_bak = mc_bg._x;
_root.playBGM("BGM_stg" + stage_num);
}
function endFadeOut() {
switch (_state) {
case "titleEnd" :
mc_screen.removeMovieClip();
initGame();
_state = "setStage";
break;
case "clear" :
setEvent();
_parent.mc_scanLine.gotoAndStop(2);
break;
case "reStart" :
releaseStage();
mc_fade.removeMovieClip();
_state = "setStage";
break;
case "credit" :
mc_fade.removeMovieClip();
this.attachMovie("Credit", "mc_screen", depth_screen);
_state = "credit2";
break;
case "credit2" :
mc_screen.removeMovieClip();
mc_ending.removeMovieClip();
setTitle();
}
}
function endEvent() {
stage_num++;
_state = "setStage";
}
function setClear() {
_state = "clear";
_root.stopBGM();
this.attachMovie("ScreenFadeOut", "mc_fade", depth_fade);
}
function setEnding(n) {
_state = "ending";
_root.stopBGM();
this.attachMovie("Circle", "mc_fade", depth_fade);
mc_fade._x = mc_player._x;
mc_fade._y = mc_player._y - 40;
ending_num = n;
switch (true) {
case death_cnt == 0 :
ending_num = 6;
break;
case death_cnt <= 5 :
ending_num = 5;
break;
default :
if ((n == 6) || (n == 5)) {
ending_num = _root.randomInt(4);
} else {
ending_num = n;
}
}
}
function setEnding2() {
this.attachMovie("Ending", "mc_ending", depth_ending);
_parent.mc_scanLine.gotoAndStop(3);
mc_fade._x = 320;
mc_fade._y = 240;
mc_ending.gotoAndStop(ending_num);
_state = "ending2";
stay_cnt = 0;
_root.playSE("BGM_ending");
}
function setEvent() {
releaseStage();
mc_fade.removeMovieClip();
this.attachMovie("Event" + stage_num, "mc_event", depth_event);
_root.playSE("BGM_event");
}
function releaseStage() {
mc_bg.removeMovieClip();
mc_bg2.removeMovieClip();
mc_player.removeMovieClip();
if (mc_bgt != undefined) {
mc_bgt.removeMovieClip();
}
if (mc_ss != undefined) {
mc_ss.removeMovieClip();
}
}
function scrollBG(n) {
if (n < 0) {
bg_x = bg_x + n;
if (bg_x <= BG_LIMIT) {
bg_x = BG_LIMIT;
bg_stop_flg = true;
}
mc_bg._x = bg_x;
if (mc_bgt != undefined) {
mc_bgt._x = bg_x;
}
if (!bg_stop_flg) {
mc_bg2._x = mc_bg2._x + (n / 4);
}
}
}
function setPlayerBits(nx, ny) {
_root.playSE("SE_death");
i = 0;
while (i < 12) {
var _local5 = "mc_bit" + i;
this.attachMovie("PlayerBit", _local5, depth_player_bit + i);
this[_local5]._x = nx;
this[_local5]._y = ny;
this[_local5].ax = _root.randomInt(10) - 5;
this[_local5].ay = (-_root.randomInt(10)) - 5;
sc = _root.randomInt(2) * 100;
this[_local5]._xscale = sc;
this[_local5]._yscale = sc;
i++;
}
var _local5 = "mc_head";
this.attachMovie("PlayerHead", _local5, (depth_player_bit + i) + 1);
this[_local5]._x = nx;
this[_local5]._y = ny;
this[_local5].ax = _root.randomInt(10) - 5;
this[_local5].ay = -20;
}
function setWaterBits(nx, ny) {
_root.playSE("SE_waterIn");
if (stage_num == 2) {
id = "WaterBitBlue";
} else {
id = "WaterBitRed";
}
i = 0;
while (i < 12) {
var _local3 = "mc_bit" + i;
this.attachMovie(id, _local3, depth_player_bit + i);
this[_local3]._x = nx;
this[_local3]._y = ny;
this[_local3].ax = _root.randomInt(10) - 5;
this[_local3].ay = (-_root.randomInt(10)) - 5;
sc = _root.randomInt(2) * 100;
this[_local3]._xscale = sc;
this[_local3]._yscale = sc;
i++;
}
}
function setEnemy(id) {
mc_name = "mc_ene" + depth_enemy;
this.attachMovie(id, mc_name, depth_enemy);
depth_enemy++;
if (depth_enemy > 6000) {
depth_enemy = 5000;
}
}
function setRockSmall(nx, ny) {
mc_name = "mc_ene" + depth_enemy;
this.attachMovie("EnemyRockS", mc_name, depth_enemy++);
this[mc_name]._x = nx + 10;
this[mc_name]._y = ny - 10;
this[mc_name].ax = 4;
this[mc_name].ay = -20;
this[mc_name].fn = 1;
mc_name = "mc_ene" + depth_enemy;
this.attachMovie("EnemyRockS", mc_name, depth_enemy++);
this[mc_name]._x = nx - 10;
this[mc_name]._y = ny - 10;
this[mc_name].ax = -4;
this[mc_name].ay = -20;
this[mc_name].fn = 2;
mc_name = "mc_ene" + depth_enemy;
this.attachMovie("EnemyRockS", mc_name, depth_enemy++);
this[mc_name]._x = nx + 10;
this[mc_name]._y = ny + 10;
this[mc_name].ax = 2;
this[mc_name].ay = -10;
this[mc_name].fn = 3;
mc_name = "mc_ene" + depth_enemy;
this.attachMovie("EnemyRockS", mc_name, depth_enemy++);
this[mc_name]._x = nx - 10;
this[mc_name]._y = ny + 10;
this[mc_name].ax = -2;
this[mc_name].ay = -10;
this[mc_name].fn = 4;
if (depth_enemy > 6000) {
depth_enemy = 5000;
}
}
SCR_R = 350;
BG_LIMIT = -1920;
depth_bg2 = 10;
depth_bg1 = 20;
depth_player = 1000;
depth_player_bit = 3000;
depth_enemy = 5000;
depth_bgt = 10000;
depth_ending = 90000 /* 0x015F90 */;
depth_screen = 90001 /* 0x015F91 */;
depth_fade = 100000 /* 0x0186A0 */;
depth_ss = 110000 /* 0x01ADB0 */;
_state = "init";
setTitle();