Frame 1
fscommand ("allowscale", "false");
stop();
Frame 2
stop();
Frame 3
_quality = "medium";
stop();
Symbol 5 MovieClip Frame 1
_root.stop();
ini_time = int(getTimer() / 1000);
b_total = _root.getBytesTotal();
Symbol 5 MovieClip Frame 2
b_cargados = _root.getBytesLoaded();
time = (getTimer() / 1000) - ini_time;
bps = b_cargados / time;
b_restantes = b_total - b_cargados;
s_restantes = Math.ceil(b_restantes / bps);
m_restantes = Math.floor(s_restantes / 60);
s_restantes = s_restantes - Math.floor(m_restantes * 60);
porciento = (b_cargados / b_total) * 100;
if (m_restantes < 10) {
minutos = "0" add m_restantes;
} else {
minutos = m_restantes;
}
if (s_restantes < 10) {
segundos = "0" add s_restantes;
} else {
segundos = s_restantes;
}
timeleft = (minutos add ":") add segundos;
bit_rate = (int(bps / 100) / 10) add " Kbytes";
b_porciento = int(porciento) add "%";
barra._xscale = porciento;
Symbol 5 MovieClip Frame 3
if (b_cargados >= b_total) {
_root.play();
stop();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 11 Button
on (release) {
getURL ("http://www.oneztv.com", "_blank");
}
Symbol 12 Button
on (release) {
getURL ("http://www.onez.com", "_blank");
}
Symbol 60 MovieClip Frame 95
rand = random(100);
if (50 < rand) {
gotoAndPlay(_currentframe - 50);
} else if (rand < 30) {
gotoAndPlay (132);
}
Symbol 60 MovieClip Frame 121
gotoAndPlay (1);
Symbol 73 Button
on (release) {
_quality = "medium";
_root.play();
}
Symbol 74 MovieClip Frame 13
stop();
Symbol 79 MovieClip Frame 1
_quality = "high";
Instance of Symbol 21 MovieClip in Symbol 79 MovieClip Frame 1
onClipEvent (load) {
inix = (random(5) + 2) / 2;
}
onClipEvent (enterFrame) {
_x = (_x - inix);
if (_x < -270) {
_x = 270;
inix = (random(5) + 2) / 2;
}
}
Instance of Symbol 21 MovieClip in Symbol 79 MovieClip Frame 1
onClipEvent (load) {
inix = (random(5) + 2) / 2;
}
onClipEvent (enterFrame) {
_x = (_x - inix);
if (_x < -270) {
_x = 270;
inix = (random(5) + 2) / 2;
}
}
Symbol 79 MovieClip Frame 121
stop();
Symbol 83 MovieClip Frame 1
function init(ymax, zoffset, zetas_per_line) {
this.ymax = ymax;
this.zoffset = zoffset;
this.zetas_per_line = zetas_per_line;
zetas = new Array(ymax * 2);
reset();
}
function reset() {
cont = 0;
while (cont != zetas.length) {
zetas[cont] = -1;
cont++;
}
}
function reset(line) {
zetas[getLinePos(line)] = -1;
}
function decZ(line) {
pos = getLinePos(line);
zetas[pos] = Math.max(-1, zetas[pos] - 1);
}
function updateZ(line) {
pos = getLinePos(line);
zetas[pos] = (zetas[pos] + 1) % zetas_per_line;
return(((pos * zetas_per_line) + zetas[pos]) + zoffset);
}
function getLinePos(line) {
return(int(ymax + line));
}
Symbol 87 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 2
stop();
Symbol 105 MovieClip Frame 1
stop();
Instance of Symbol 21 MovieClip in Symbol 105 MovieClip Frame 1
onClipEvent (load) {
inix = (random(5) + 2) / 2;
}
onClipEvent (enterFrame) {
_x = (_x - inix);
if (_x < -270) {
_x = 270;
inix = (random(5) + 2) / 2;
}
}
Instance of Symbol 97 MovieClip in Symbol 105 MovieClip Frame 1
onClipEvent (load) {
inix = (random(5) + 2) / 2;
}
onClipEvent (enterFrame) {
_x = (_x - inix);
if (_x < -270) {
_x = 270;
inix = (random(5) + 2) / 2;
}
}
Symbol 109 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 6
gotoAndStop (1);
Symbol 125 MovieClip Frame 1
stop();
Symbol 125 MovieClip Frame 2
_parent.lives--;
_parent.vidas.gotoAndStop(_parent.lives + 1);
_parent.main.removeShurikens();
_parent.main.removeKameames();
_parent.chino._visible = false;
Symbol 125 MovieClip Frame 43
if (this._visible) {
this._visible = false;
_parent.player._visible = true;
_parent.boss.enespera = 0;
_parent.death_window._visible = true;
_parent.main.removeNinjas();
_parent.death_window.gotoAndPlay(3);
}
stop();
Symbol 154 MovieClip Frame 9
stop();
Symbol 169 MovieClip Frame 1
stop();
stop();
Symbol 181 MovieClip Frame 12
gotoAndPlay (4);
Symbol 185 MovieClip Frame 9
stop();
Symbol 186 MovieClip Frame 1
stop();
Symbol 186 MovieClip Frame 2
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 233 MovieClip Frame 62
stop();
Symbol 241 MovieClip Frame 60
stop();
Symbol 253 MovieClip Frame 1
stop();
Symbol 253 MovieClip Frame 4
stop();
Symbol 257 MovieClip Frame 111
stop();
Symbol 259 MovieClip Frame 44
stop();
Symbol 261 MovieClip Frame 1
stop();
Symbol 261 MovieClip Frame 4
stop();
Symbol 263 MovieClip Frame 1
stop();
Symbol 263 MovieClip Frame 2
stop();
Symbol 263 MovieClip Frame 3
stop();
Symbol 263 MovieClip Frame 4
stop();
Symbol 263 MovieClip Frame 5
stop();
Symbol 278 MovieClip Frame 16
stop();
Instance of Symbol 278 MovieClip in Symbol 279 MovieClip Frame 41
onClipEvent (load) {
if (_parent._parent._xscale < 0) {
this._xscale = -100;
}
}
Symbol 279 MovieClip Frame 95
stop();
Symbol 293 MovieClip Frame 101
stop();
Symbol 294 MovieClip Frame 1
stop();
Symbol 294 MovieClip Frame 2
stop();
Symbol 294 MovieClip Frame 3
stop();
Symbol 302 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 2
_parent.lives--;
_parent.vidas.gotoAndStop(_parent.lives + 1);
_parent.main.removeShurikens();
_parent.main.removeKameames();
_parent.chino._visible = false;
Symbol 302 MovieClip Frame 37
this._visible = false;
_parent.player._visible = true;
_parent.death_window._visible = true;
_parent.main.removeNinjas();
_parent.death_window.gotoAndPlay(3);
stop();
Symbol 308 Button
on (release, keyPress "<Space>") {
_visible = false;
_parent.main.resetScene();
_parent.player_death._visible = false;
_parent.player_death.gotoAndStop(1);
_parent.ninja_pp.gotoAndStop(1);
_parent.player_death._visible = false;
_parent.player._visible = true;
gotoAndStop (1);
}
Symbol 310 MovieClip Frame 1
stop();
Symbol 310 MovieClip Frame 59
if (!_parent.final._visible) {
_visible = false;
_parent.main.resetScene();
_parent.player_death._visible = false;
_parent.player_death.gotoAndStop(1);
_parent.ninja_pp.gotoAndStop(1);
_parent.player_death._visible = false;
_parent.player._visible = true;
}
gotoAndStop (1);
Symbol 315 MovieClip Frame 1
stop();
Symbol 315 MovieClip Frame 64
_root.gotoAndStop(2);
Symbol 319 MovieClip Frame 1
stop();
Symbol 319 MovieClip Frame 52
_parent.main.resetScene();
_visible = false;
Symbol 323 MovieClip Frame 1
stop();
Symbol 323 MovieClip Frame 2
stop();
Symbol 323 MovieClip Frame 3
stop();
Symbol 323 MovieClip Frame 4
stop();
Symbol 326 MovieClip Frame 1
function Rectangle(x1, y1, x2, y2, x3, y3, x4, y4) {
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
this.x3 = x3;
this.y3 = y3;
this.x4 = x4;
this.y4 = y4;
}
function Tarima(x1, x2, y, scale, percentages) {
this.x1 = x1;
this.x2 = x2;
this.y = y;
this.scale = scale;
this.percentages = percentages;
}
function reset() {
resetScore();
resetLevel();
_parent.scenes.gotoAndStop(1);
}
function resetScore() {
_parent.lives = 3;
_parent.vidas.gotoAndStop(_parent.lives + 1);
_parent.points = 0;
_parent.killed = 0;
_parent.level = 1;
}
function resetLevel() {
resetScene();
}
function resetScene() {
_parent.engine.zmanager.reset();
_parent.nextlevel._visible = false;
_parent.gameover._visible = false;
_parent.final._visible = false;
_parent.player_death._visible = false;
_parent.player_death.gotoAndStop(1);
_parent.ninja_pp.gotoAndStop(1);
_parent.player._x = bounds.x1 + ((bounds.x2 - bounds.x1) / 2);
_parent.boss._visible = false;
_parent.boss_life._visible = false;
_parent.chino._visible = false;
removeNinjas();
removeShurikens();
removeKameames();
ninjas = new Array();
shurikens = new Array();
kameames = new Array();
n_ninjas = 0;
n_shurikens = 0;
n_kameames = 0;
}
function addShuriken(x, y) {
z = _parent.engine.zmanager.updateZ(y);
_parent.shuriken.duplicateMovieClip("shuriken" + n_shurikens, z);
shuriken = _parent["shuriken" + n_shurikens];
shuriken._x = x;
shuriken._y = y;
centrox = (bounds.x2 - bounds.x1) >> 1;
per = (centrox - x) / centrox;
shuriken.perspective = ((bounds.x3 - bounds.x1) * per) / (bounds.y1 - bounds.y3);
shuriken._xscale = tarimas[tarimas.length - 1].scale * 1.5;
shuriken._yscale = tarimas[tarimas.length - 1].scale * 1.5;
shuriken.scale = ((tarimas[tarimas.length - 1].scale * 1.5) - (tarimas[0].scale / 3)) / (bounds.y3 - bounds.y1);
shurikens.push(shuriken);
n_shurikens++;
return(shuriken);
}
function removeShuriken(cont) {
shurikens[cont].removeMovieClip();
shurikens.splice(cont, 1);
}
function removeShurikens() {
while (0 < shurikens.length) {
removeShuriken(0);
}
}
function addNinja(n_tarima, dir) {
tarima = tarimas[n_tarima];
z = _parent.engine.zmanager.updateZ(tarima.y);
_parent.ninja.duplicateMovieClip("ninja" + n_ninjas, z);
ninja = _parent["ninja" + n_ninjas];
ninja.dir = dir;
ninja.n_tarima = n_tarima;
ninja._y = tarima.y;
ninja._xscale = (-tarima.scale) * dir;
ninja._yscale = tarima.scale;
distance = 50 + (Math.random() * (tarima.x2 - tarima.x1));
if (dir == 1) {
ninja._x = tarima.x1;
ninja.limit = Math.min(tarima.x2, tarima.x1 + distance);
} else {
ninja._x = tarima.x2;
ninja.limit = Math.max(tarima.x1, tarima.x2 - distance);
}
ninjas.push(ninja);
n_ninjas++;
return(ninja);
}
function removeNinja(cont) {
ninjas[cont].removeMovieClip();
ninjas.splice(cont, 1);
}
function removeNinjas() {
while (0 < ninjas.length) {
removeNinja(0);
}
}
function addKameame(x, y) {
if (random(100) < 20) {
addSimpleKameame(x - 100, y, -1);
addSimpleKameame(x + 100, y, 1);
} else {
addSimpleKameame(x, y, 0);
}
}
function addSimpleKameame(x, y, tipo) {
z = _parent.engine.zmanager.updateZ(y);
_parent.kameame.duplicateMovieClip("kameame" + n_kameames, z);
kameame = _parent["kameame" + n_kameames];
kameame._x = x;
kameame._y = y;
centrox = (bounds.x2 - bounds.x1) >> 1;
per = (centrox - x) / centrox;
kameame.perspective = ((bounds.x3 - bounds.x1) * per) / (bounds.y1 - bounds.y3);
kameame._xscale = tarimas[0].scale;
kameame._yscale = tarimas[0].scale;
kameame.scale = (tarimas[tarimas.length - 1].scale - tarimas[0].scale) / (bounds.y1 - bounds.y3);
var tmpx;
if (tipo == 0) {
tmpx = _parent.player._x;
if (random(100) < 50) {
tmpx = random(Math.floor(bounds.x2 - bounds.x1)) + bounds.x1;
}
} else {
tmpx = _parent.player._x + (75 * tipo);
}
kameame.incx = (tmpx - x) / (bounds.y1 - bounds.y3);
kameame.espera = Math.abs(tipo * 40);
_parent.boss.enespera++;
kameames.push(kameame);
n_kameames++;
}
function removeKameame(cont) {
kameames[cont].removeMovieClip();
kameames.splice(cont, 1);
}
function removeKameames() {
while (0 < kameames.length) {
removeKameame(0);
}
}
function hit(obj1, obj2) {
ok = obj1.hitTest(obj2);
if (ok) {
return(((obj2._y - 10) < obj1._y) && (obj1._y < (obj2._y + 10)));
}
}
function inPercentage(offset) {
if (offset == 0) {
return(false);
}
r = Math.random() * 100;
ini = 50 - offset;
fin = 50 + offset;
return((r >= ini) && (fin >= r));
}
bounds = new Rectangle(0, 300, 380, 300, 0, 80, 380, 80);
tarima0 = new Tarima(5, 395, 85, 60, new Array(1, 2, 3, 3, 2, 2, 1, 0));
tarima1 = new Tarima(5, 395, 135, 100, new Array(0, 0, 1, 2, 3, 3, 2, 2));
tarima2 = new Tarima(5, 395, 220, 140, new Array(0, 0, 0, 0, 1, 2, 3, 4));
tarimas = new Array(tarima0, tarima1, tarima2);
ninjas_per_level = new Array(10, 25, 45, 65, 90, 115, 145, 175);
reset();
Symbol 349 Button
on (release) {
_parent._parent.gotoAndStop(2);
}
Symbol 350 MovieClip Frame 1
stop();
Instance of Symbol 21 MovieClip in Symbol 350 MovieClip Frame 59
onClipEvent (load) {
inix = (random(5) + 2) / 2;
}
onClipEvent (enterFrame) {
_x = (_x - inix);
if (_x < -270) {
_x = 270;
inix = (random(5) + 2) / 2;
}
}
Instance of Symbol 21 MovieClip in Symbol 350 MovieClip Frame 59
onClipEvent (load) {
inix = (random(5) + 2) / 2;
}
onClipEvent (enterFrame) {
_x = (_x - inix);
if (_x < -270) {
_x = 270;
inix = (random(5) + 2) / 2;
}
}
Symbol 350 MovieClip Frame 96
stop();
Instance of Symbol 93 MovieClip "keyboard" in Symbol 351 MovieClip Frame 1
onClipEvent (keyDown) {
if ((_parent.nextlevel._visible || (_parent.gameover._visible)) || (_parent.final._visible)) {
_parent.left = false;
_parent.right = false;
_parent.shoot = false;
return(undefined);
}
KeyDown = Key.getCode();
if (KeyDown == Key.LEFT) {
_parent.left = true;
}
if (KeyDown == Key.RIGHT) {
_parent.right = true;
}
}
onClipEvent (keyUp) {
if ((_parent.nextlevel._visible || (_parent.gameover._visible)) || (_parent.final._visible)) {
_parent.left = false;
_parent.right = false;
_parent.shoot = false;
return(undefined);
}
KeyUp = Key.getCode();
if (KeyUp == Key.LEFT) {
_parent.left = false;
}
if (KeyUp == Key.RIGHT) {
_parent.right = false;
}
if (KeyUp == Key.SPACE) {
_parent.shoot = true;
}
}
Symbol 351 MovieClip Frame 2
stop();
Instance of Symbol 109 MovieClip "player" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
n_frames = 0;
}
onClipEvent (enterFrame) {
if (1 < _parent.player_death._currentframe) {
return(undefined);
}
n_frames++;
if (_parent.left) {
_x = Math.max(_parent.main.bounds.x1, _x - 10);
}
if (_parent.right) {
_x = Math.min(_parent.main.bounds.x2, _x + 10);
}
if ((_parent.shoot && ((n_frames % 4) == 0)) && (_parent.main.shurikens.length < 3)) {
_parent.shoot = false;
gotoAndPlay (2);
_parent.main.addShuriken(_x + 20, _y - 30);
}
}
Instance of Symbol 125 MovieClip "player_death" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 169 MovieClip "ninja" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
live = 1;
speed = (5 + (_parent.level / 3)) + random(2);
points = 500;
jumping = false;
relax = 0;
relax_min = new Array(12, 20, 26);
relax_delay = 24;
if (_name == "ninja") {
anda.stop();
}
}
onClipEvent (enterFrame) {
function nextTarget() {
if (n_tarima < _parent.main.tarimas.length) {
tarima = _parent.main.tarimas[n_tarima];
distance = 50 + (Math.random() * (tarima.x2 - tarima.x1));
if (Math.random() < 0.5) {
dir = 1;
} else {
dir = -1;
}
if ((dir == 1) && (_x >= (tarima.x2 - 50))) {
dir = -1;
} else if ((dir == -1) && ((tarima.x1 + 50) >= _x)) {
dir = 1;
}
if (dir == 1) {
limit = Math.min(tarima.x2 - 50, _x + distance);
} else {
limit = Math.max(tarima.x1 + 50, _x - distance);
}
if (_y != tarima.y) {
z = _parent.engine.zmanager.updateZ(tarima.y);
this.swapDepths(z);
_y = tarima.y;
}
_xscale = ((-tarima.scale) * dir);
_yscale = tarima.scale;
}
}
if (_parent.nextlevel._visible || (_parent.gameover._visible)) {
return(undefined);
}
if (_name == "ninja") {
return(undefined);
}
if (_currentframe == 3) {
return(undefined);
}
if (_parent.ninja_pp._currentframe >= 2) {
if (_currentframe != 2) {
relax.gotoAndPlay(1);
gotoAndStop (2);
}
return(undefined);
}
if (0 < relax) {
relax--;
return(undefined);
}
if (jumping && (3 >= _currentframe)) {
jump_up.gotoAndPlay(1);
gotoAndStop (4);
} else if ((_currentframe == 4) && (jump_up._currentframe == jump_up._totalframes)) {
if (n_tarima < (_parent.main.tarimas.length - 1)) {
_xscale = ((-_parent.main.tarimas[n_tarima + 1].scale) * dir);
_yscale = _parent.main.tarimas[n_tarima + 1].scale;
jump_down.gotoAndPlay(1);
gotoAndStop (5);
} else {
_parent.player._visible = false;
_parent.ninja_pp._visible = true;
_parent.ninja_pp.gotoAndPlay(2);
this.removeMovieClip();
}
} else if ((_currentframe == 5) && (jump_down._currentframe == jump_down._totalframes)) {
n_tarima++;
run.gotoAndPlay(1);
gotoAndStop (1);
jumping = false;
nextTarget();
}
if (jumping) {
return(undefined);
}
_x = (_x + (speed * dir));
if (((dir == 1) && (_x >= limit)) || ((dir == -1) && (limit >= _x))) {
_x = limit;
if (Math.random() < 0.5) {
jumping = true;
relax = relax_min[n_tarima];
relax.gotoAndPlay(1);
gotoAndStop (2);
} else {
relax = relax_min[n_tarima] + (Math.random() * relax_delay);
relax.gotoAndPlay(1);
gotoAndStop (2);
nextTarget();
}
} else if (_currentframe != 1) {
run.gotoAndPlay(1);
gotoAndStop (1);
}
}
Instance of Symbol 174 MovieClip "shuriken" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
speed = 10;
damage = 1;
}
onClipEvent (enterFrame) {
if (_parent.nextlevel._visible || (_parent.gameover._visible)) {
return(undefined);
}
if (_name == "shuriken") {
return(undefined);
}
_x = (_x + (perspective * speed));
_y = (_y - speed);
z = _parent.engine.zmanager.updateZ(_y);
this.swapDepths(z);
_xscale = (_xscale + (scale * speed));
_yscale = (_yscale + (scale * speed));
}
Instance of Symbol 186 MovieClip "kameame" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
speed = 10;
damage = 1;
points = 10;
if (!espera) {
espera = 1;
}
}
onClipEvent (enterFrame) {
if (_parent.nextlevel._visible || (_parent.gameover._visible)) {
relax.stop();
return(undefined);
}
if ((_name == "kameame") || (_currentframe == 2)) {
relax.stop();
return(undefined);
}
if (0 >= espera) {
if (espera == 0) {
_parent.boss.enespera--;
espera = -1;
}
_x = (_x + ((incx * speed) + (perspective * speed)));
_y = (_y + speed);
z = _parent.engine.zmanager.updateZ(_y);
this.swapDepths(z);
_xscale = (_xscale + (scale * speed));
_yscale = (_yscale + (scale * speed));
if ((((305 < _y) && ((_parent.player._x - 75) < _x)) && (_x < (_parent.player._x + 75))) && (!_parent.player_death._visible)) {
_parent.player_death._x = _parent.player._x;
_parent.player_death._visible = true;
_parent.player._visible = false;
_parent.player_death.gotoAndPlay(2);
this.removeMovieClip();
} else if (305 < _y) {
this.removeMovieClip();
}
}
if (0 < espera) {
espera--;
}
}
Instance of Symbol 220 MovieClip "boss_life" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
function init() {
_visible = true;
}
swapDepths(600001);
_visible = false;
gotoAndStop (1);
}
Instance of Symbol 263 MovieClip "boss" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
live = 20;
speed = 10;
points = 1000;
n_tarima = 0;
_visible = false;
damageCount = 0;
dir = 0;
enespera = 0;
}
onClipEvent (enterFrame) {
function init() {
tarima = _parent.main.tarimas[n_tarima];
_x = (tarima.x1 + ((tarima.x2 - tarima.x1) / 2));
_y = tarima.y;
shooting();
_visible = true;
}
function shooting() {
gotoAndStop (2);
shoot.gotoAndPlay(2);
}
function damaging() {
if (damageCount != -1) {
damageCount++;
}
if ((_currentframe != 3) && (_currentframe != 5)) {
gotoAndStop (3);
}
if (((damageCount >= 8) && (damageCount != -1)) && (_currentframe != 5)) {
damageCount = -1;
damage.gotoAndPlay(7);
live = Math.max(0, live - 1);
} else {
if (_currentframe == 3) {
if (damage.luz) {
damage.luz.gotoAndPlay(2);
}
live = Math.max(0, live - 0.1);
}
if (_currentframe == 5) {
damageCount = 0;
if (relax.luz) {
relax.luz.gotoAndPlay(2);
}
live = Math.max(0, live - 0.1);
}
}
}
function nextTarget() {
if (n_tarima < _parent.main.tarimas.length) {
tarima = _parent.main.tarimas[n_tarima];
distance = 50 + (Math.random() * (tarima.x2 - tarima.x1));
if (Math.random() < 0.5) {
dir = 1;
} else {
dir = -1;
}
if ((dir == 1) && (_x >= (tarima.x2 - 80))) {
dir = -1;
} else if ((dir == -1) && ((tarima.x1 + 80) >= _x)) {
dir = 1;
}
if (dir == 1) {
limit = Math.min(tarima.x2 - 80, _x + distance);
} else {
limit = Math.max(tarima.x1 + 80, _x - distance);
}
if (_y != tarima.y) {
z = _parent.engine.zmanager.updateZ(tarima.y);
this.swapDepths(z);
_y = tarima.y;
}
}
}
if (_parent.nextlevel._visible || (_parent.gameover._visible)) {
run.stop();
return(undefined);
}
if (!_visible) {
run.stop();
return(undefined);
}
if ((_parent.ninja_pp._currentframe >= 2) || (_parent.player_death._currentframe >= 2)) {
gotoAndStop (2);
shoot.gotoAndStop(1);
return(undefined);
}
if ((_currentframe == 1) && (10 < run._currentframe)) {
if ((dir < 0) && (!run.yainvertido)) {
run.yainvertido = true;
run._xscale = -run._xscale;
}
_x = (_x + (speed * dir));
if (((dir == 1) && (_x >= limit)) || ((dir == -1) && (limit >= _x))) {
_x = limit;
if (run._currentframe == run._totalFrames) {
shooting();
}
} else if (run._currentframe == 21) {
run.gotoAndPlay(16);
}
} else if ((_currentframe == 2) && (shoot._currentframe == 20)) {
_parent.main.addKameame(_x, _y - 20);
} else if ((_currentframe == 2) && (shoot._currentframe == shoot._totalframes)) {
nextTarget();
gotoAndStop (1);
} else if ((((_currentframe == 3) && (damage._currentframe == damage._totalframes)) && (damageCount == -1)) && (0 >= enespera)) {
damageCount = 0;
nextTarget();
gotoAndStop (1);
} else if ((((_currentframe == 3) && (damage._currentframe == 6)) && (damageCount != -1)) && (0 >= enespera)) {
if (random(100) < 20) {
damageCount = 0;
nextTarget();
gotoAndStop (1);
} else {
gotoAndStop (2);
_parent.main.addKameame(_x, _y - 20);
}
} else if (0 < enespera) {
if (_currentframe != 5) {
gotoAndStop (5);
}
} else if (enespera == 0) {
if (_currentframe == 5) {
gotoAndStop (2);
}
}
}
Instance of Symbol 294 MovieClip "chino" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
dir = -1;
speed = 10;
n_tarima = 2;
points = 1000;
_xscale = 220;
_yscale = 220;
_visible = false;
}
onClipEvent (enterFrame) {
function running() {
tarima = _parent.main.tarimas[n_tarima];
if (Math.random() < 0.5) {
if (dir == 1) {
_xscale = (-_xscale);
}
dir = -1;
_x = (tarima.x2 + 75);
limit = tarima.x1 - 75;
} else {
if (dir == -1) {
_xscale = (-_xscale);
}
dir = 1;
_x = (tarima.x1 - 75);
limit = tarima.x2 + 75;
}
if (_y != tarima.y) {
z = _parent.engine.zmanager.updateZ(tarima.y);
this.swapDepths(z);
_y = tarima.y;
}
gotoAndStop (1);
run.gotoAndPlay(1);
_visible = true;
}
function changeDir() {
tarima = _parent.main.tarimas[n_tarima];
if (dir == 1) {
_xscale = (-_xscale);
dir = -1;
limit = tarima.x1 - 75;
} else {
_xscale = (-_xscale);
dir = 1;
limit = tarima.x2 + 75;
}
}
function damaging() {
gotoAndStop (2);
damage.gotoAndPlay(1);
}
function quemequemo() {
gotoAndStop (3);
}
if (!_visible) {
run.stop();
return(undefined);
}
if (_currentframe == 1) {
_x = (_x + (speed * dir));
}
if (((dir == 1) && (_x >= limit)) || ((dir == -1) && (limit >= _x))) {
_x = limit;
_visible = false;
}
if ((_currentframe == 2) && (damage._currentframe == damage._totalframes)) {
_x = limit;
_visible = false;
} else if ((_currentframe == 3) && (incinerado._currentframe == incinerado._totalframes)) {
_x = limit;
_visible = false;
}
}
Instance of Symbol 302 MovieClip "ninja_pp" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
this._visible = false;
swapDepths(500000);
}
Instance of Symbol 310 MovieClip "death_window" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
swapDepths(600000);
_visible = false;
}
Instance of Symbol 315 MovieClip "gameover" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
swapDepths(1000000);
_visible = false;
}
Instance of Symbol 319 MovieClip "nextlevel" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
swapDepths(700000);
_visible = false;
}
Instance of Symbol 326 MovieClip "main" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
_parent.engine.zmanager.init(2000, 100, 100);
n_frames = 0;
last_ninja_wait = 6;
last_ninja = new Array(-last_ninja_wait, (-last_ninja_wait) + 1, (-last_ninja_wait) + 2);
}
onClipEvent (enterFrame) {
function checkShurikens() {
cont = shurikens.length - 1;
while (cont >= 0) {
if (shurikens[cont]._y < (bounds.y3 - 30)) {
removeShuriken(cont);
}
cont--;
}
}
function checkShurikensNinjas() {
cont = shurikens.length - 1;
while (cont >= 0) {
cont2 = ninjas.length - 1;
while (cont2 >= 0) {
ninja = ninjas[cont2];
if ((ninja._currentframe < 3) && (hit(shurikens[cont], ninja))) {
ninja.live = Math.max(0, ninja.live - shurikens[cont].damage);
if (ninja.live == 0) {
_parent.killed++;
_parent.points = _parent.points + ninja.points;
ninja.death.gotoAndPlay(1);
ninja.gotoAndStop(3);
if (_parent.killed == ninjas_per_level[_parent.level - 1]) {
_parent.level++;
removeNinjas();
removeShurikens();
_parent.nextlevel.gotoAndPlay(2);
_parent.nextlevel._visible = true;
_parent.nextlevel.nextlevel_level = _parent.level;
_parent.scenes.gotoAndStop(_parent.level);
}
}
removeShuriken(cont);
break;
}
if ((ninja._currentframe == 3) && (ninja.death._currentframe == ninja.death._totalframes)) {
removeNinja(cont2);
}
cont2--;
}
cont--;
}
}
function checkShurikensBoss() {
boss = _parent.boss;
cont = shurikens.length - 1;
while (cont >= 0) {
if (((((boss._currentframe == 2) || (boss._currentframe == 3)) || (boss._currentframe == 5)) || ((boss._currentframe == 1) && (33 < boss.run._currentframe))) && (hit(shurikens[cont], boss))) {
removeShuriken(cont);
_parent.points = _parent.points + boss.points;
_parent.boss_life.gotoAndStop(Math.floor((_parent.boss_life._totalframes - _parent.boss.live) + 1));
boss.damaging();
if (0 >= boss.live) {
boss.gotoAndStop(4);
boss.death.gotoAndPlay(1);
_parent.death_window.stop();
_parent.ninja_pp.stop();
_parent.player_death.stop();
_parent.player._visible = false;
_parent.player_death._visible = false;
_parent.boss_life._visible = false;
_parent.vidas._visible = false;
_parent.death_window._visible = false;
_parent.ninja_pp._visible = false;
_parent.player_death._visible = false;
_parent.final._visible = true;
_parent.final.gotoAndPlay(2);
_parent.final.init();
stop();
}
}
cont--;
}
}
function checkKameames() {
cont = shurikens.length - 1;
while (cont >= 0) {
cont2 = kameames.length - 1;
while (cont2 >= 0) {
kameame = kameames[cont2];
if (kameame.espera == -1) {
var makeamehitmask = ((((shurikens[cont]._y - 10) < kameame._y) && (kameame._y < (shurikens[cont]._y + 10))) && (((shurikens[cont]._x - 40) < kameame._x) && (kameame._x < (shurikens[cont]._x + 40))));
if ((kameame._currentframe == 1) && (makeamehitmask)) {
_parent.points = _parent.points + kameame.points;
kameame.death.gotoAndPlay(1);
kameame.gotoAndStop(2);
removeShuriken(cont);
break;
}
if ((kameame._currentframe == 2) && (kameame.death._currentframe == kameame.death._totalframes)) {
removeKameame(cont2);
}
}
cont2--;
}
cont--;
}
}
function checkKameamesChino() {
cont = kameames.length - 1;
while (cont >= 0) {
if ((chino._currentframe == 1) && (hit(kameames[cont], chino))) {
removeKameame(cont2);
chino.quemequemo();
}
cont--;
}
}
function checkShurikensChino() {
chino = _parent.chino;
cont = shurikens.length - 1;
while (cont >= 0) {
if ((chino._currentframe == 1) && (hit(shurikens[cont], chino))) {
_parent.points = _parent.points + chino.points;
chino.damaging();
}
cont--;
}
}
function createNinjas() {
cont2 = 0;
while (cont2 < tarimas.length) {
tmptarima = tarimas[cont2];
tmptarima.ninjasCount = 0;
cont3 = ninjas.length - 1;
while (cont3 >= 0) {
tmpninja = ninjas[cont3];
if (tmpninja._y == tmptarima.y) {
tmptarima.ninjasCount++;
}
cont3--;
}
cont2++;
}
cont = 0;
while (cont < tarimas.length) {
tarima = tarimas[cont];
ok = (ninjas.length == 0) || ((last_ninja[cont] + last_ninja_wait) < n_frames);
ok = ((ok && (ninjas.length < 6)) && (tarimas[cont].ninjasCount < 2)) && (tarimas[cont + 1].ninjasCount < 3);
if (ok && (inPercentage(tarima.percentages[_parent.level - 1]))) {
if (Math.random() < 0.5) {
addNinja(cont, 1);
} else {
addNinja(cont, -1);
}
last_ninja[cont] = n_frames;
}
cont++;
}
}
if (_parent.nextlevel._visible || (_parent.final._visible)) {
return(undefined);
}
if ((_parent.lives == 0) && (!_parent.gameover._visible)) {
_parent.gameover.gotoAndPlay(1);
_parent.gameover._visible = true;
} else if (_parent.gameover._visible) {
return(undefined);
}
if (_parent.boss._visible && (_parent.boss._currentframe == 4)) {
if (_parent.boss.death._currentframe == _parent.boss.death._totalframes) {
_parent.boss._visible = false;
}
return(undefined);
}
if ((_parent.ninja_pp._currentframe == 1) && (!_parent.player_death._visible)) {
n_frames++;
checkShurikens();
checkShurikensNinjas();
if (_parent.level < ((ninjas_per_level.length - 7) + 7)) {
createNinjas();
} else {
if (!_parent.boss._visible) {
_parent.boss.init();
_parent.boss_life.init();
}
checkShurikensBoss();
checkKameames();
}
if ((((!_parent.chino._visible) && (inPercentage(1))) && ((n_frames % 6) == 0)) && (2 < _parent.level)) {
_parent.chino.running();
} else if (_parent.chino._visible) {
checkShurikensChino();
checkKameamesChino();
}
}
}
Instance of Symbol 350 MovieClip "final" in Symbol 351 MovieClip Frame 2
onClipEvent (load) {
function init() {
}
swapDepths(1200000);
_visible = false;
}